mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-03 11:04:24 +00:00
fix: a lot of MySQL calls in templates replaced by MySQLi ones
This commit is contained in:
@@ -12,14 +12,14 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
@@ -27,9 +27,9 @@ if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not
|
||||
$dur = $_POST['protect'] * 86400;
|
||||
$protection = (time() + $dur);
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
protect = '".$protection."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
Reference in New Issue
Block a user