From 9b222a61142af6b322f04121f04c78680b7fc559 Mon Sep 17 00:00:00 2001 From: Shadow Date: Fri, 24 Jan 2014 14:46:05 +0200 Subject: [PATCH] Update vilview.tpl --- Templates/Map/vilview.tpl | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/Templates/Map/vilview.tpl b/Templates/Map/vilview.tpl index 487cf641..37a39ca1 100644 --- a/Templates/Map/vilview.tpl +++ b/Templates/Map/vilview.tpl @@ -1,5 +1,21 @@
getMInfo($_GET['d']); $uinfo = $database->getVillage($basearray['id']); $oasis1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_real_escape_string($_GET['d'])); @@ -163,7 +179,6 @@ if($query != 0){ while($row = mysql_fetch_array($result)){ $dataarray = explode(",",$row['data']); $type = $row['ntype']; - $topic=$row['topic']; echo ""; if($type==18 or $type==19 or $type==20 or $type==21){ echo "\"".$topic."\""; @@ -470,16 +485,16 @@ if($type==18 or $type==19 or $type==20 or $type==21){ $enough_cp = false; } - $otext = ($oasis['name']); - if($village->unitarray['u'.$session->tribe.'0'] >= 3 AND $enough_cp AND $village->resarray['f39']) { + $otext = ($oasis['name']); + if($village->unitarray['u'.$session->tribe.'0'] >= 3 AND $enough_cp) { $test = "» Found new village."; - } elseif($village->unitarray['u'.$session->tribe.'0'] >= 3 AND !$enough_cp) { + } elseif($village->unitarray['u'.$session->tribe.'0'] >= 3 AND !$enough_cp) { $test = "» Found new village. ($cps/$need_cps culture points)"; - } elseif(!$village->resarray['f39']) { + } elseif(!$village->resarray['f39']) { $test = "» Found new village. (build a rally point)"; - } else { + } else { $test = "» Found new village. (".$village->unitarray['u'.$session->tribe.'0']."/3 settlers available)"; - } + } echo ($basearray['fieldtype']==0)? ($village->resarray['f39']==0)? @@ -507,9 +522,12 @@ if($type==18 or $type==19 or $type==20 or $type==21){ $data1 = mysql_fetch_assoc($query1); $query2 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']); $data2 = mysql_fetch_assoc($query2); + // Vacation mode added by Shadow - cata7007@gmail.com / Skype : cata7007 if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') { echo "» Send troops. (Player is banned)"; - } else if($data2['protect'] < time()) { + } else if($data2['vac_mode']=='1') { + echo "» Send troops. (Vacation mode on)"; + } else if($data2['protect'] < time()) { echo $village->resarray['f39']? "» Send troops." : "» Send troops. (build a rally point)"; } else { echo "» Send troops. (beginners protection)"; @@ -522,6 +540,8 @@ if($type==18 or $type==19 or $type==20 or $type==21){ getTypeLevel(17)? "getTypeField(17) . "\">» Send merchant(s)." : "» Send merchant(s). (build marketplace)"; }