fix bug 10 (not %100, not shown after scroll) and bug 5 from the buglist + update Templates/movement.tpl

This commit is contained in:
yi12345
2013-09-25 15:42:31 +03:00
parent f58db26459
commit 792515c8ed
5 changed files with 52 additions and 18 deletions
+26 -11
View File
@@ -3416,28 +3416,43 @@ class MYSQL_DB {
Made by: Shadow
***************************/
function checkAttack($wref, $toWref){
$q = "SELECT * FROM ".TB_PREFIX."movement WHERE `from` = '$wref' AND `to` = '$toWref' AND `proc` = '0' AND `sort_type` = '3'";
function checkAttack($wref, $toWref){
$q = "SELECT * FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.from = $wref and " . TB_PREFIX . "movement.to = $toWref and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 and (" . TB_PREFIX . "attacks.attack_type = 3 or " . TB_PREFIX . "attacks.attack_type = 4) ORDER BY endtime ASC";
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result)) {
return mysql_fetch_array($result);
} else {
return true;
}else{
return false;
}
}
}
/***************************
Function checkEnforce
Made by: Shadow
***************************/
function checkEnforce($vid, $from) {
$q = "SELECT * from " . TB_PREFIX . "enforcement where `from` = $from and vref = $vid";
$result = mysql_query($q, $this->connection);
if(!empty($result)) {
return mysql_insert_id($this->connection);
}else{
function checkEnforce($wref, $toWref) {
$q = "SELECT * FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.from = $wref and " . TB_PREFIX . "movement.to = $toWref and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 and " . TB_PREFIX . "attacks.attack_type = 2 ORDER BY endtime ASC";
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result)) {
return true;
}else{
return false;
}
}
/***************************
Function checkEnforce
Made by: yi12345
***************************/
function checkScout($wref, $toWref) {
$q = "SELECT * FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "attacks where " . TB_PREFIX . "movement.from = $wref and " . TB_PREFIX . "movement.to = $toWref and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "attacks.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 3 and " . TB_PREFIX . "attacks.attack_type = 1 ORDER BY endtime ASC";
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result)) {
return true;
}else{
return false;
}
}
};