mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-04 03:44:23 +00:00
@@ -47,6 +47,34 @@ if(isset($_GET['id'])) {
|
||||
if (isset($_POST['a']) == 533374 && isset($_POST['id']) == 39){
|
||||
$units->Settlers($_POST);
|
||||
}
|
||||
if ($_GET['mode']=='troops'&&$_GET['cancel']==1){
|
||||
|
||||
$oldmovement=$database->getMovementById($_GET['moveid']);
|
||||
$now=time();
|
||||
if (($now-$oldmovement[0]['starttime'])<60){
|
||||
|
||||
$qc="SELECT * FROM " . TB_PREFIX . "movement where proc = 0 and moveid = ".$_GET['moveid'];
|
||||
$resultc=$database->query($qc) or die(mysql_error());
|
||||
|
||||
if (mysql_num_rows($resultc)==1){
|
||||
|
||||
$q = "UPDATE " . TB_PREFIX . "movement set proc = 1 where proc = 0 and moveid = ".$_GET['moveid'];
|
||||
$database->query($q);
|
||||
$end=$now+($now-$oldmovement[0]['starttime']);
|
||||
//echo "6,".$oldmovement[0]['to'].",".$oldmovement[0]['from'].",0,".$now.",".$end;
|
||||
$q2 = "SELECT id FROM " . TB_PREFIX . "send ORDER BY id DESC";
|
||||
$lastid=mysql_fetch_array(mysql_query($q2));
|
||||
$newid=$lastid['id']+1;
|
||||
$q2 = "INSERT INTO " . TB_PREFIX . "send values ($newid,0,0,0,0,0)";
|
||||
$database->query($q2);
|
||||
$database->addMovement(4,$oldmovement[0]['to'],$oldmovement[0]['from'],$oldmovement[0]['ref'],$end);
|
||||
|
||||
|
||||
$database->addMovement(6,$oldmovement[0]['to'],$oldmovement[0]['from'],$newid,$end);
|
||||
}
|
||||
}
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$_GET['id']);
|
||||
}
|
||||
if(isset($_GET['id'])){
|
||||
$automation->isWinner();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user