fix: a lot of MySQL calls in templates replaced by MySQLi ones

This commit is contained in:
Martin Ambrus
2017-08-28 23:56:59 +02:00
parent 814a904343
commit 92b9a7b043
75 changed files with 427 additions and 427 deletions
+6 -6
View File
@@ -11,14 +11,14 @@
include_once("../../config.php");
if (!isset($_SESSION)) session_start();
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
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);
$id = $_POST['id'];
$admid = $_POST['admid'];
//$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
//$access = mysql_fetch_array($sql);
//$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
//$access = mysqli_fetch_array($sql);
//$sessionaccess = $access['access'];
if (!isset($_SESSION)) {
session_start();
@@ -30,7 +30,7 @@ $access = $_POST['access'];
$dur = $_POST['protect'] * 86400;
$protection = (time() + $dur);
mysql_query("UPDATE ".TB_PREFIX."users SET
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
access = ".$access.",
gold = ".$_POST['gold'].",
sit1 = '".$_POST['sitter1']."',
@@ -42,7 +42,7 @@ mysql_query("UPDATE ".TB_PREFIX."users SET
RR = '".$_POST['res']."',
apall = '".$_POST['ooff']."',
dpall = '".$_POST['odef']."'
WHERE id = ".$id."") or die(mysql_error());
WHERE id = ".$id."") or die(mysqli_error());
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
?>