mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-06 21:04:20 +00:00
fix: a lot of MySQL calls in templates replaced by MySQLi ones
This commit is contained in:
@@ -12,21 +12,21 @@ 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'];
|
||||
|
||||
|
||||
$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>");
|
||||
|
||||
$query = "INSERT INTO ".TB_PREFIX."mdata (target, owner, topic, message, viewed, time) VALUES ('$uid', 1, '$topic', '$message', 0, '$time')";
|
||||
|
||||
mysql_query($query);
|
||||
mysqli_query($GLOBALS["link"], $query);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=Newmessage&uid=".$uid."&msg=ok");
|
||||
?>
|
||||
Reference in New Issue
Block a user