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
+5 -5
View File
@@ -14,19 +14,19 @@ include_once("../../config.php");
error_reporting(E_ALL);
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'];
$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>");
$q = "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id != '0'";
mysql_query($q) or die(mysql_error());
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
header("Location: ../../../Admin/admin.php?p=maintenenceResetPlusBonus&g");
?>