fix: failing to redirect from sendMessage.php in Admin

Closes #307
This commit is contained in:
Martin Ambrus
2017-11-06 18:34:08 +01:00
parent 5f5dfb978e
commit 48c46aa4e4
+1 -2
View File
@@ -7,7 +7,6 @@
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
#################################################################################
include_once("../../GameEngine/Account.php");
if (!isset($_SESSION)) session_start();
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
@@ -21,7 +20,7 @@ $topic = $_POST['topic'];
$message = $_POST['message'];
$time = time();
$query = "INSERT INTO ".TB_PREFIX."mdata VALUES ('', '$uid', 1, '$topic', '$message', 0, 0, 0, '$time', 0, 0, 0, 0, 0, 0)";
$query = "INSERT INTO ".TB_PREFIX."mdata SET target = $uid, owner = 1, topic = '$topic', message = '$message', viewed = 0, archived = 0, send = 0, time = $time, deltarget = 0, delowner = 0, alliance = 0, player = 0, coor = 0, report = 0";
mysqli_query($GLOBALS["link"], $query) OR DIE (mysqli_errno($GLOBALS["link"]));
header("Location: ../../../Admin/admin.php?p=Newmessage&uid=".$uid."&msg=ok");