very big update

This commit is contained in:
unknown
2012-04-19 17:41:33 +03:00
parent e74c7a9518
commit f597c070d5
55 changed files with 1789 additions and 694 deletions
+65 -3
View File
@@ -122,8 +122,39 @@ if($academy == 0 && $mainbuilding >= 3 && $barrack >= 3 && $id != 39 && $id != 4
include("avaliable/academy.tpl");
}
//fix palace
if($palace == 0 && $embassy >= 1 && $mainbuilding >= 5 && $$UnderConstruction <> -1 && $id != 39 && $id != 40 && $residence == 0) {
include("avaliable/palace.tpl");
if($palace == 0 && $embassy >= 1 && $mainbuilding >= 5 && $id != 39 && $id != 40 && $residence == 0) {
//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("avaliable/palace.tpl");
}
//end Fix
}
if($blacksmith == 0 && $academy >= 3 && $mainbuilding >= 3 && $id != 39 && $id != 40) {
include("avaliable/blacksmith.tpl");
@@ -213,7 +244,38 @@ if($academy == 0 && ($mainbuilding <= 2 || $barrack <= 2)) {
include("soon/academy.tpl");
}
if($embassy == 0 || $mainbuilding >= 2 && $mainbuilding <= 4) {
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 <= 2 || $mainbuilding <= 2)) {
include("soon/blacksmith.tpl");