daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jun 5th, 2017 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /**
  4.  * File: index.php
  5.  *
  6.  * Revision: 1.0.0.091019
  7.  *
  8.  */
  9.  
  10. //echo "Sorry but the element website is currently experiencing some technical issues which are currently been fixed. Sorry for any problems this has caused.<br /> If anyone needs urgent contact, /w Mosphet in game on Bloodfeather EU";
  11.  
  12. /* Debugging Stuff */
  13. error_reporting(E_ALL);
  14. ini_set("display_errors", 0);
  15.  
  16. if(!isset($_GET['page'])) { $_GET['page'] = null; }
  17.  
  18. session_start();
  19.  
  20. require_once("./includes/config.php");
  21. require_once("./includes/functions.php");
  22. require_once("./includes/bbcode.php");
  23. require_once("./includes/class.php");
  24.  
  25. $connection = mysql_connect("$mysql_hostname", "$mysql_username", "$mysql_password") or mysql_die();
  26. mysql_select_db("$mysql_database");
  27.  
  28. if(isset($_SESSION['isloggedin'])) {
  29.     $username = $_SESSION['username'];
  30.     $time = time();
  31.     $query = mysql_query("UPDATE ele_users SET `last_visit` = '$time' WHERE username = '$username'");  
  32.     $query = mysql_query("SELECT * FROM ele_users WHERE username = '$username'");
  33.     while($result = mysql_fetch_array($query)) {
  34.       $_SESSION['userclass'] = $result['userclass'];
  35.     }
  36. } else {
  37.   if(isset($_COOKIE['ele_username'])) {
  38.     $username = $_COOKIE['ele_username'];
  39.     $password = $_COOKIE['ele_password'];
  40.     $autologin = mysql_query("SELECT * FROM ele_users WHERE username = '$username'");
  41.     $num = mysql_num_rows($autologin);
  42.     if($num == "1") {
  43.       $_SESSION['isloggedin'] = "1";
  44.       $_SESSION['username'] = $username;
  45.     }
  46.   }
  47. }
  48.  
  49. show_header();
  50.  
  51. if ($_GET["page"]) {
  52.   $boobs = "content/".$_GET["page"].".php";
  53.   if (!is_file($boobs)) {
  54.     include_once("404.php");
  55.   } else {
  56.     include_once($boobs);
  57.   }
  58. } else {
  59.   @include_once("content/default.php");
  60. }
  61.  
  62. show_footer();
  63.  
  64. mysql_close($connection);
  65.  
  66. /**
  67.  * E.O.F
  68.  */
  69.  
  70. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top