This commit is contained in:
unknown
2013-04-13 12:36:18 +03:00
parent 602115b009
commit 5503eec27b
+31 -1
View File
@@ -373,7 +373,37 @@ if($greatworkshop == 0 && $workshop >= 18 && $village->capital == 0 && GREAT_WKS
include("soon/academy.tpl");
}
if($palace == 0 && ($embassy == 0 || $mainbuilding <= 2)) {
include("soon/palace.tpl");
//Fix Castle
//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;
}
}
//if Castle no ready include palace.tpl
if (!$test){
include("soon/palace.tpl");
}
//end Fix
}
if($blacksmith == 0 && ($academy == 0 || $mainbuilding == 1)) {
include("soon/blacksmith.tpl");