Advertisement
nPhoenix

Fixed connection

Oct 20th, 2014
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1.  @session_save_path("");
  2.  @session_start();
  3.  
  4.  
  5.  /******************************************************
  6.  ------------------Required Configuration---------------
  7.  Please edit the following variables so the members area
  8.  can work correctly.
  9.  ******************************************************/
  10.  
  11.  if (!isset($_SESSION['admin']) || $_SESSION['admin'] != 1) {
  12.  //die('We are updating PokemonSoulless RPG Please Stand By.');
  13.  }
  14.  $connection = mysql_connect("localhost", "username", "password") or die(mysql_error());
  15.  $dbSelected = mysql_select_db('database', $connection) or die (mysql_error());
  16.  $mail_webmaster = 'email@email.com';
  17.  $url_root = 'http://site.com/';
  18.  $admin='admin';
  19.  /******************************************************
  20.  -----------------Optional Configuration----------------
  21.  ******************************************************/
  22.  
  23.  
  24.  //Home page file name
  25.  $url_home = 'membersarea.php';
  26.  
  27.  
  28.  //Design Name
  29.  $design = 'default';
  30.  
  31.  
  32.  
  33.  
  34.  // asdd stuffz
  35.  $filename = end( explode('/', $_SERVER["SCRIPT_NAME"]) );
  36.  
  37.  
  38.  if ($filename != 'battle.php' && $filename != 'battle2.php') {
  39.  unset($_SESSION['battle']);
  40.  }
  41.  
  42.  
  43.  if (isset($_SESSION['userid'])) {
  44.  $uid = (int) $_SESSION['userid'];
  45.  $time = time();
  46.  mysql_query("UPDATE `users` SET `lastseen`='{$time}' WHERE `id`='{$uid}' LIMIT 1");
  47.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement