diff --git a/Admin/Templates/server_info.tpl b/Admin/Templates/server_info.tpl index 51f831a5..631fd59c 100644 --- a/Admin/Templates/server_info.tpl +++ b/Admin/Templates/server_info.tpl @@ -1,182 +1,182 @@ - +$tribe1 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 1"); +$tribe2 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 2"); +$tribe3 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 3"); +$tribes = Array(mysql_num_rows($tribe1),mysql_num_rows($tribe2),mysql_num_rows($tribe3)); +$users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users")) - 1; +?> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Player Information
Registered players
Active players
Players online -
Players Banned -
Villages settled -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
Player Information
TribeRegisteredPercent
Romans
Teutons
Gauls
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Player Information
Registered players
Active players
Players online +
Players Banned +
Villages settled +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Player Information
TribeRegisteredPercent
Romans
Teutons
Gauls
-
+
- - - - - - - - - - - - - - - - -
Server Information
TotalAverage
Gold Gold
- - - - - - - '; - } - echo ''; - for($i=1; $i<11; $i++) - { - $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); - $troop = mysql_fetch_assoc($t); - echo ''; - } - - echo ""; - for($i=11; $i<21; $i++) - { - echo ''; - } - echo ''; - for($i=11; $i<21; $i++) - { - $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); - $troop = mysql_fetch_assoc($t); - echo ''; - } - - echo ""; - for($i=21; $i<31; $i++) - { - echo ''; - } - echo ''; - for($i=21; $i<31; $i++) - { - $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); - $troop = mysql_fetch_assoc($t); - echo ''; - } - - echo ""; - for($i=31; $i<41; $i++) - { - echo ''; - } - echo ''; - for($i=31; $i<41; $i++) - { - $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); - $troop = mysql_fetch_assoc($t); - echo ''; - } - - echo ""; - for($i=41; $i<51; $i++) - { - echo ''; - } - echo ''; - for($i=41; $i<51; $i++) - { - $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); - $troop = mysql_fetch_assoc($t); - echo ''; - } - ?> - -
Troops on the Server
'.$troop['sumof'].'
'.$troop['sumof'].'
'.$troop['sumof'].'
'.$troop['sumof'].'
'.$troop['sumof'].'
+ + + + + + + + + + + + + + + + +
Server Information
TotalAverage
Gold Gold
+ + + + + + + '; + } + echo ''; + for($i=1; $i<11; $i++) + { + $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); + $troop = mysql_fetch_assoc($t); + echo ''; + } + + echo ""; + for($i=11; $i<21; $i++) + { + echo ''; + } + echo ''; + for($i=11; $i<21; $i++) + { + $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); + $troop = mysql_fetch_assoc($t); + echo ''; + } + + echo ""; + for($i=21; $i<31; $i++) + { + echo ''; + } + echo ''; + for($i=21; $i<31; $i++) + { + $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); + $troop = mysql_fetch_assoc($t); + echo ''; + } + + echo ""; + for($i=31; $i<41; $i++) + { + echo ''; + } + echo ''; + for($i=31; $i<41; $i++) + { + $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); + $troop = mysql_fetch_assoc($t); + echo ''; + } + + echo ""; + for($i=41; $i<51; $i++) + { + echo ''; + } + echo ''; + for($i=41; $i<51; $i++) + { + $t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units"); + $troop = mysql_fetch_assoc($t); + echo ''; + } + ?> + +
Troops on the Server
'.$troop['sumof'].'
'.$troop['sumof'].'
'.$troop['sumof'].'
'.$troop['sumof'].'
'.$troop['sumof'].'
\ No newline at end of file diff --git a/Templates/Build/17.tpl b/Templates/Build/17.tpl index 3d355501..c2ad6583 100644 --- a/Templates/Build/17.tpl +++ b/Templates/Build/17.tpl @@ -23,7 +23,9 @@ else if($_POST['dname']!=""){ $getwref = $database->getVillageByName($_POST['dname']); $checkexist = $database->checkVilExist($getwref); } -if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $market->maxcarry && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist){ +$maxcarry = $market->maxcarry; +$maxcarry *= $market->merchantAvail(); +if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist){ ?>
@@ -200,7 +202,7 @@ if(isset($_POST['ft'])=='check'){ $error = 'Resources not selected.'; }elseif(!$_POST['x'] && !$_POST['y'] && !$_POST['dname']){ $error = 'Enter coordinates or village name.'; - }elseif($allres > $market->maxcarry){ + }elseif($allres > $maxcarry){ $error = 'Too few merchants.'; } echo $error; diff --git a/allianz.php b/allianz.php index 236e46be..1e47db7c 100644 --- a/allianz.php +++ b/allianz.php @@ -14,7 +14,7 @@ | TravianX All rights reserved | */ - +if(isset($_GET['aid']) && !is_numeric($_GET['aid'])) die('Attempt of sql injection blocked'); include ("GameEngine/Village.php"); include ("GameEngine/Chat.php"); $start = $generator->pageLoadTimeStart();