mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-04 20:04:21 +00:00
fix: a lot of MySQL calls in templates replaced by MySQLi ones
This commit is contained in:
@@ -12,23 +12,23 @@ 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>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
ap = '".$_POST['off']."',
|
||||
dp = '".$_POST['def']."',
|
||||
RR = '".$_POST['res']."'
|
||||
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