Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Warning: mysqli_query() expects parameter 1 to be mysqli, null given in
- /home1/j8f5w8o7/nepe.smeext-carding.com/pieces/inc.php on line 26
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in
- /home1/j8f5w8o7/nepe.smeext-carding.com/pieces/inc.php on line 27
- <?php
- session_start();
- ob_start();
- $display = new display();
- $user = new user();
- DEFINE("localhost", "");
- DEFINE("j8f5w8o7_finix", "");
- DEFINE("yael2204", "");
- DEFINE("j8f5w8o7_finix", "");
- $sql = new mysqli(host, username, password, database);
- function __destruct()
- {
- ob_clean();
- }
- class settings
- {
- public static function website($data)
- {
- global $sql;
- $website = mysqli_query($sql, 'SELECT * FROM merchant LIMIT 1');
- $fwebsite = mysqli_fetch_array($website);
- return $fwebsite[$data];
- }
- }
- class display {
- public static function success($msg)
- {
- echo('<div class="alert alert-success role="alert" style="text-align: center;">'.$msg.'</div>');
- }
- public static function error($msg)
- {
- echo('<div class="alert alert-danger role="alert" style="text-align: center;">'.$msg.'</div>');
- }
- }
- class user {
- function IsLogged()
- {
- global $sql;
- /* If session exists. */
- if(!isset($_SESSION['auth'])){
- header('Location: signin.php');
- exit();
- }
- /* Additional check.If session is null or user does not exists. */
- if(isset($_SESSION['auth'])) {
- if(is_numeric($_SESSION['auth']) && !empty($_SESSION['auth'])) {
- $query = mysqli_query($sql, 'SELECT UserName FROM users WHERE UserID = "'.$_SESSION['auth'].'"');
- if(mysqli_num_rows($query) == 0) {
- unset($_SESSION['auth']);
- header('Location: signin.php');
- exit();
- }
- }
- }
- }
- function IsBanned()
- {
- $banned = $this->GetData('UserBanned');
- if($banned == 1) {
- header('Location: ./index.php');
- exit();
- }
- }
- function IsAdmin()
- {
- if($this->GetData('UserAdmin') == 0) {
- header('Location: ./index.php');
- exit();
- }
- }
- function HasMembership()
- {
- if($this->GetData('UserMembership') == 0) {
- header('Location: ./purchase.php');
- exit();
- }
- }
- function GetData($data)
- {
- global $sql;
- if(isset($_SESSION['auth'])) {
- $id = $_SESSION['auth'];
- if(is_numeric($id)) {
- $query = mysqli_query($sql, 'SELECT '.$data.' FROM users WHERE UserID = "'.$id.'"');
- $row = mysqli_fetch_array($query);
- return $row[$data];
- }
- }
- }
- }
- DEFINE("HOST", "localhost");
- DEFINE("USERNAME", "j8f5w8o7_finix");
- DEFINE("PASSWORD", "yael2204");
- DEFINE("DATABASE", "j8f5w8o7_finix");
- $mysqli = new mysqli(HOST, USERNAME, PASSWORD, DATABASE);
- $host="localhost";
- $username="j8f5w8o7_finix";
- $password="yael2204";
- $database="j8f5w8o7_finix";
- $mysqli = new mysqli($host, $username, $password, $database);
Add Comment
Please, Sign In to add comment