update: now cannot delete movements of another player

This commit is contained in:
unknown
2012-06-17 09:36:07 +03:00
parent 52dcdb6dfc
commit 7cbfd7acc9
+2 -2
View File
@@ -208,11 +208,11 @@ if($session->access != BANNED){
header("Location: banned.php"); header("Location: banned.php");
} }
} }
if ($_GET['mode']=='troops'&&$_GET['cancel']==1){ if($_GET['mode']=='troops' && $_GET['cancel']==1){
if($session->access != BANNED){ if($session->access != BANNED){
$oldmovement=$database->getMovementById($_GET['moveid']); $oldmovement=$database->getMovementById($_GET['moveid']);
$now=time(); $now=time();
if (($now-$oldmovement[0]['starttime'])<90){ if(($now-$oldmovement[0]['starttime'])<90 && $oldmovement[0]['from'] == $village->wid){
$qc="SELECT * FROM " . TB_PREFIX . "movement where proc = 0 and moveid = ".$_GET['moveid']; $qc="SELECT * FROM " . TB_PREFIX . "movement where proc = 0 and moveid = ".$_GET['moveid'];
$resultc=$database->query($qc) or die(mysql_error()); $resultc=$database->query($qc) or die(mysql_error());