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
@@ -12,19 +12,19 @@ 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."fdata SET
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."fdata SET
f1 = '".$_POST['id1level']."',
f1t = '".$_POST['id1gid']."',
f2 = '".$_POST['id2level']."',
@@ -105,7 +105,7 @@ mysql_query("UPDATE ".TB_PREFIX."fdata SET
f39t = '".$_POST['id39gid']."',
f40 = '".$_POST['id40level']."',
f40t = '".$_POST['id40gid']."'
WHERE vref = $id") or die(mysql_error());
WHERE vref = $id") or die(mysqli_error());
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
?>