Guest User

PHP snippet uber-panel

a guest
Dec 31st, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.96 KB | None | 0 0
  1. <?php
  2.  
  3.     /* --------------------------------------------------------
  4.      * Uber Panel :: A prive licenced Content Management Panel
  5.      * --------------------------------------------------------
  6.      *
  7.      * Copyright (C) Finley Siebert. All rights reserved
  8.      * 2013 - 2014
  9.      *
  10.      * --------------------------------------------------------
  11.      */
  12.  
  13.     $sitename = "uber-panel";
  14.     $url = "http://finleyhd.nl/uber-panel";
  15.  
  16.     error_reporting(E_ALL);
  17.  
  18.     session_start();
  19.  
  20.     $conn = new MySQLi("localhost", "", "", "finley_uber-panel");
  21.  
  22.     if($conn->connect_errno){
  23.         echo"<div class='announcement fail'>Uber Panel -> ". $conn->connect_error ."</div>";
  24.     }
  25.  
  26.     class User {
  27.         public function __construct($session) {
  28.             $this->session = $session;
  29.         }
  30.  
  31.         public function grabData($k) {
  32.             global $conn;
  33.  
  34.             $q = $conn->query("SELECT * FROM users WHERE email='$this->session'") or die(mysqli_error());
  35.             $r = mysqli_fetch_assoc($q);
  36.  
  37.             return $r[$k];
  38.         }
  39.     }
  40.  
  41.     $user = new User($_SESSION['email']);
  42.  
  43.  
  44.     $username = $user->grabData('username');
  45.     $user_query = $conn->query("SELECT * FROM `private_messages` WHERE `touser` = '$username' AND `mark` = 0") or die($conn->error);
  46.  
  47.     $unread_messages = $user_query->num_rows;
  48.     $secret_hash = "cbf28fe95080b7ab82135d105a5026be";
  49.  
  50.     $main_story = '
  51.     Welcome to <font color="#89c9cd">Uber-Panel</font>!<br />
  52.     My name is <b>Finley</b> and I am the system administrator. You can ask me anything you want, just PM!<br />
  53.     Before you continue you must now a few things!<br /><br />
  54.     - Your ip is logged, so dont try anything suspisius.<br />
  55.     - Be aware that this is an BETA version of the system and not fully developed yet<br />
  56.     - Have fun <br />
  57.     - Please report any bugs <br />
  58.     - If you think there is something wrong, please send a pm to finley<br /><br />
  59.  
  60.     If you act normal, and use the site were it is ment for, nothing is wrong. I asure you that there will be more!<br /><br />
  61.     Enjoy<br />
  62.     Finley
  63.     ';
  64. ?>
Advertisement
Add Comment
Please, Sign In to add comment