mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 14:21:03 +00:00
Fixes
This commit is contained in:
@@ -163,26 +163,8 @@ if($palace == 0 && $palace1 == 0 && $embassy >= 1 && $mainbuilding >= 5 && $id !
|
||||
//id user
|
||||
$user = $session->uid;
|
||||
|
||||
//connect to DB
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
|
||||
//loop search village user
|
||||
$query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."");
|
||||
while($villaggi_array = mysql_fetch_array($query)){
|
||||
|
||||
//loop structure village
|
||||
$query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref']."");
|
||||
$strutture= mysql_fetch_array($query1);
|
||||
|
||||
//search Castle in array structure village
|
||||
$test = in_array(26,$strutture);
|
||||
if ($test){
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$test = in_array(26, $database->caststruc($user));
|
||||
|
||||
//if Castle no ready include palace.tpl
|
||||
if (!$test){
|
||||
|
||||
Reference in New Issue
Block a user