first commit

This commit is contained in:
unknown
2012-03-29 13:00:34 +02:00
commit 6928cbcd1d
2446 changed files with 85772 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
deny from all
+24
View File
@@ -0,0 +1,24 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename 404.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<div style="margin-top: 50px;">
<center>
<h1>404 - File not found</h1>
This system is not finished yet or page does not exist.<br>
<br>
</center>
</div>
+311
View File
@@ -0,0 +1,311 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename addTroops.tpl ##
## Developed by: Dzoki & Advocatie ##
## License: TravianX Project ##
## Thanks to: Dzoki & itay2277(Edit troops) ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
include("../GameEngine/Lang/".LANG.".php");
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_GET['did'];
if(isset($id)){
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$units = $database->getUnit($village['wref']);
?>
<form action="../GameEngine/Admin/Mods/addTroops.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $id; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<thead>
<tr>
<th colspan="2">Edit troops</th>
<?php if($user['tribe'] == 1){ ?>
</tr></thead><tbody>
<tr>
<td class="addTroops"><img src="../img/un/u/1.gif"></img> <?php echo U1; ?></td>
<td class="addTroops"><input class="addTroops" name="u1" id="u1" value="<?php echo $units['u1']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u1']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/2.gif"></img> <?php echo U2; ?></td>
<td><input class="addTroops" name="u2" id="u2" value="<?php echo $units['u2']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u2']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/3.gif"></img> <?php echo U3; ?></td>
<td><input class="addTroops" name="u3" id="u3" value="<?php echo $units['u3']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u3']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/4.gif"></img> <?php echo U4; ?></td>
<td><input class="addTroops" name="u4" id="u4" value="<?php echo $units['u4']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u4']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/5.gif"></img> <?php echo U5; ?></td>
<td><input class="addTroops" name="u5" id="u5" value="<?php echo $units['u5']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u5']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/6.gif"></img> <?php echo U6; ?></td>
<td><input class="addTroops" name="u6" id="u6" value="<?php echo $units['u6']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u6']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/7.gif"></img> <?php echo U7; ?></td>
<td><input class="addTroops" name="u7" id="u7" value="<?php echo $units['u7']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u7']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/8.gif"></img> <?php echo U8; ?></td>
<td><input class="addTroops" name="u8" id="u8" value="<?php echo $units['u8']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u8']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/9.gif"></img> <?php echo U9; ?></td>
<td><input class="addTroops" name="u9" id="u9" value="<?php echo $units['u9']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u9']; ?></b><font></td>
</tr>
<tr>
<td><img src="../img/un/u/10.gif"></img> <?php echo U10; ?></td>
<td><input class="addTroops" name="u10" id="u10" value="<?php echo $units['u10']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u10']; ?></b><font></td>
</tr>
<?php }
else if($user['tribe'] == 2){ ?>
</tr></thead><tbody>
<tr>
<td class="addTroops"><img src="../img/un/u/11.gif"></img> <?php echo U11; ?></td>
<td class="addTroops"><input class="addTroops" name="u11" id="u11" value="<?php echo $units['u11']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u11']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/12.gif"></img> <?php echo U12; ?></td>
<td><input class="addTroops" name="u12" id="u12" value="<?php echo $units['u12']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u12']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/13.gif"></img> <?php echo U13; ?></td>
<td><input class="addTroops" name="u13" id="u13" value="<?php echo $units['u13']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u13']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/14.gif"></img> <?php echo U14; ?></td>
<td><input class="addTroops" name="u14" id="u14" value="<?php echo $units['u14']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u14']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/15.gif"></img> <?php echo U15; ?></td>
<td><input class="addTroops" name="u15" id="u15" value="<?php echo $units['u15']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u15']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/16.gif"></img> <?php echo U16; ?></td>
<td><input class="addTroops" name="u16" id="u16" value="<?php echo $units['u16']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u16']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/17.gif"></img> <?php echo U17; ?></td>
<td><input class="addTroops" name="u17" id="u17" value="<?php echo $units['u17']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u17']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/18.gif"></img> <?php echo U18; ?></td>
<td><input class="addTroops" name="u18" id="u18" value="<?php echo $units['u18']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u18']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/19.gif"></img> <?php echo U19; ?></td>
<td><input class="addTroops" name="u19" id="u19" value="<?php echo $units['u19']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u19']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/20.gif"></img> <?php echo U20; ?></td>
<td><input class="addTroops" name="u20" id="u20" value="<?php echo $units['u20']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u20']; ?></td>
</tr>
<?php }
else if($user['tribe'] == 3){ ?>
</tr></thead><tbody>
<tr>
<td class="addTroops"><img src="../img/un/u/21.gif"></img> <?php echo U21; ?></td>
<td class="addTroops"><input class="addTroops" name="u21" id="u21" value="<?php echo $units['u21']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u21']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/22.gif"></img> <?php echo U22; ?></td>
<td><input class="addTroops" name="u22" id="u22" value="<?php echo $units['u22']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u22']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/23.gif"></img> <?php echo U23; ?></td>
<td><input class="addTroops" name="u23" id="u23" value="<?php echo $units['u23']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u23']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/24.gif"></img> <?php echo U24; ?></td>
<td><input class="addTroops" name="u24" id="u24" value="<?php echo $units['u24']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u24']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/25.gif"></img> <?php echo U25; ?></td>
<td><input class="addTroops" name="u25" id="u25" value="<?php echo $units['u25']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u25']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/26.gif"></img> <?php echo U26; ?></td>
<td><input class="addTroops" name="u26" id="u26" value="<?php echo $units['u26']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u26']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/27.gif"></img> <?php echo U27; ?></td>
<td><input class="addTroops" name="u27" id="u27" value="<?php echo $units['u27']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u27']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/28.gif"></img> <?php echo U28; ?></td>
<td><input class="addTroops" name="u28" id="u28" value="<?php echo $units['u28']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u28']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/29.gif"></img> <?php echo U29; ?></td>
<td><input class="addTroops" name="u29" id="u29" value="<?php echo $units['u29']; ?>"" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u29']; ?></td>
</tr>
<tr>
<td><img src="../img/un/u/30.gif"></img> <?php echo U30; ?></td>
<td><input class="addTroops" name="u30" id="u30" value="<?php echo $units['u30']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u30']; ?></td>
</tr>
<?php }
else if($user['tribe'] == 4){ ?>
</tr></thead><tbody>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/31.gif"></img> <?php echo U31; ?></td>
<td class="addTroops"><input class="addTroops" name="u31" id="u31" value="<?php echo $units['u31']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u31']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/32.gif"></img> <?php echo U32; ?></td>
<td><input class="addTroops" name="u32" id="u32" value="<?php echo $units['u32']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u32']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/33.gif"></img> <?php echo U33; ?></td>
<td><input class="addTroops" name="u33" id="u33" value="<?php echo $units['u33']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u33']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/34.gif"></img> <?php echo U34; ?></td>
<td><input class="addTroops" name="u34" id="u34" value="<?php echo $units['u34']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u34']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/35.gif"></img> <?php echo U35; ?></td>
<td><input class="addTroops" name="u35" id="u35" value="<?php echo $units['u35']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u35']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/36.gif"></img> <?php echo U36; ?></td>
<td><input class="addTroops" name="u36" id="u36" value="<?php echo $units['u36']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u36']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/37.gif"></img> <?php echo U37; ?></td>
<td><input class="addTroops" name="u37" id="u37" value="<?php echo $units['u37']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u37']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/38.gif"></img> <?php echo U38; ?></td>
<td><input class="addTroops" name="u38" id="u38" value="<?php echo $units['u38']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u38']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/39.gif"></img> <?php echo U39; ?></td>
<td><input class="addTroops" name="u39" id="u39" value="<?php echo $units['u39']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u39']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/40.gif"></img> <?php echo U40; ?></td>
<td><input class="addTroops" name="u40" id="u40" value="<?php echo $units['u40']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u40']; ?></td>
</tr>
<?php }
else if($user['tribe'] == 5){ ?>
</tr></thead><tbody>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/41.gif"></img> <?php echo U41; ?></td>
<td class="addTroops"><input class="addTroops" name="u41" id="u41" value="<?php echo $units['u41']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u41']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/42.gif"></img> <?php echo U42; ?></td>
<td><input class="addTroops" name="u42" id="u42" value="<?php echo $units['u42']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u42']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/43.gif"></img> <?php echo U43; ?></td>
<td><input class="addTroops" name="u43" id="u43" value="<?php echo $units['u43']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u43']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/44.gif"></img> <?php echo U44; ?></td>
<td><input class="addTroops" name="u44" id="u44" value="<?php echo $units['u44']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u44']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/45.gif"></img> <?php echo U45; ?></td>
<td><input class="addTroops" name="u45" id="u45" value="<?php echo $units['u45']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u45']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/46.gif"></img> <?php echo U46; ?></td>
<td><input class="addTroops" name="u46" id="u46" value="<?php echo $units['u46']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u46']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/47.gif"></img> <?php echo U47; ?></td>
<td><input class="addTroops" name="u47" id="u47" value="<?php echo $units['u47']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u47']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/48.gif"></img> <?php echo U48; ?></td>
<td><input class="addTroops" name="u48" id="u48" value="<?php echo $units['u48']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u48']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/49.gif"></img> <?php echo U49; ?></td>
<td><input class="addTroops" name="u49" id="u49" value="<?php echo $units['u49']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u49']; ?></td>
</tr>
<tr>
<td class="addTroops"><img src="../gpack/travian_default/img/u/50.gif"></img> <?php echo U50; ?></td>
<td><input class="addTroops" name="u50" id="u50" value="<?php echo $units['u50']; ?>" maxlength="10">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u50']; ?></td>
</tr>
<?php } ?>
</tbody></table>
<br />
<div align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif">
</form>
<?php } ?>
<br /><br /><div align="right"><?php if(isset($_GET['d'])) { echo '<font color="Red"><b>Troops edited</font></b>';
} ?>
+44
View File
@@ -0,0 +1,44 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename add_village.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form method="post" action="admin.php">
<input name="action" type="hidden" value="addVillage">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
<table id="member" style="width: 225px;">
<thead>
<tr>
<th colspan="2">Add Village</th>
</tr>
</thead>
<tr>
<td colspan="2"><center>Coordinates (<b>X</b>|<b>Y</b>)</center></td>
</tr>
<tr>
<td>X:</td>
<td><input name="x" class="fm" value="" type="input" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></td>
</tr>
<tr>
<td>Y:</td>
<td><input name="y" class="fm" value="" type="input" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></td>
</tr>
<tr>
<td colspan="2"><center><input value="Add Village" type="submit" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></center></td>
</tr>
</table>
</form>
+56
View File
@@ -0,0 +1,56 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<link REL="shortcut icon" HREF="favicon.ico"/>
<title><?php if($_SESSION['access'] == ADMIN){ echo 'Admin Control Panel - TravianX'; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'Multihunter Control Panel - TravianX'; } ?></title>
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
<link rel=stylesheet type="text/css" href="../img/../img.css">
<script src="mt-full.js?423cb" type="text/javascript"></script>
<script src="ajax.js" type="text/javascript"></script>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="no">
</head>
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename admin_log.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); ?>
<?php
$no = count($database->getAdminLog());
$log = $database->getAdminLog();
for($i=0;$i<$no;$i++) {
$admid = $log[$i]['user']?>
------------------------------------<br>
<b>Log ID:</b> <?php echo $log[$i]['id']; ?><br />
<b>Admin:</b> <?php $user = $database->getUserField($admid,"username",0);
if($user == 'Multihunter') {
echo '<b>CONTROL PANEL</b>';
} else { echo '<a href="admin.php?p=player&uid='.$admid.'">'.$user.'</a>'; }
?><br />
<b>Log:</b> <?php echo $log[$i]['log']; ?><br />
<b>Date:</b> <?php echo date("d.m.Y H:i:s",$log[$i]['time']+3600*2); ?><br />
<?php } ?>
+140
View File
@@ -0,0 +1,140 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename alliance.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
if($_GET['aid']){
$alidata = $database->getAlliance($_GET['aid']);
$aliusers = $database->getAllMember($_GET['aid']);
if($alidata and $aliusers){
foreach($aliusers as $member) {
$totalpop += $database->getVSumField($member['id'],"pop");
}
?>
<br>
<table id="profile" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="2">Alliance <a href="?p=alliance&aid=<?php echo $alidata['id'];?>"><?php echo $alidata['name'];?></a></th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr><td class="empty"></td><td class="empty"></td></tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tbody><tr>
<th>Tag</th>
<td><?php echo $alidata['tag']; ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo $alidata['name']; ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<th>Rank</th>
<td>???</td>
</tr>
<tr>
<th>Points</th>
<td><?php echo $totalpop; ?></td>
</tr>
<tr>
<th>Members</th>
<td><?php echo count($aliusers); ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<th>alliance founder</th>
<td><a href="?p=player&uid=<?php echo $alidata['leader']; ?>"><?php echo $database->getUserField($alidata['leader'],"username",0); ?></a></td>
</tr>
<tr>
<td colspan="2">
<a href="?p=editAli&aid=<?php echo $alidata['id'];?>">» Edit Alliance</a>
</td>
</tr>
<tr>
<td colspan="2">
<a href="?p=DelAli&aid=<?php echo $alidata['id'];?>">» Delete Alliance</a>
</td>
</tr>
<tr>
<td colspan="2" class="emmty"></td>
</tr>
<tr>
<td class="desc2" colspan="2"> bb </td>
</tr>
</tbody></table>
</td>
<td class="desc1">aa </td>
</tr>
</tbody>
</table><table id="member" cellpadding="1" cellspacing="1"><thead>
<tr>
<th>&nbsp;</th>
<th>Player</th>
<th>Population</th>
<th>Villages</th>
<th>&nbsp;</th></tr>
</thead>
<tbody>
<?php
foreach($aliusers as $user) {
$rank++;
$TotalUserPop = $database->getVSumField($user['id'],"pop");
$TotalVillages = $database->getProfileVillages($user['id']);
echo " <tr>";
echo " <td class=ra>".$rank.".</td>";
echo " <td class=pla><a href=spieler.php?uid=".$user['id'].">".$user['username']."</a></td>";
echo " <td class=hab>".$TotalUserPop."</td>";
echo " <td class=vil>".count($TotalVillages)."</td>";
if($aid == $session->alliance){
if ((time()-600) < $user['timestamp']){ // 0 Min - 10 Min
echo " <td class=on><img class=online1 src=img/x.gif title=now online alt=now online /></td>";
}elseif ((time()-86400) < $user['timestamp'] && (time()-600) > $user['timestamp']){ // 10 Min - 1 Days
echo " <td class=on><img class=online2 src=img/x.gif title=now online alt=now online /></td>";
}elseif ((time()-259200) < $user['timestamp'] && (time()-86400) > $user['timestamp']){ // 1-3 Days
echo " <td class=on><img class=online3 src=img/x.gif title=now online alt=now online /></td>";
}elseif ((time()-604800) < $user['timestamp'] && (time()-259200) > $user['timestamp']){
echo " <td class=on><img class=online4 src=img/x.gif title=now online alt=now online /></td>";
}else{
echo " <td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
}
}
echo " </tr>";
}
?>
</tbody>
</table>
<?php
}else{
echo "Not found...<a href=\"javascript: history.go(-1)\">Back</a>";
}
}
?>
+8
View File
@@ -0,0 +1,8 @@
<p>
<a href="admin.php">Homepage</a>
<a href="?page=1">Configuration</a>
<a href="?page=2">Search</a>
<a href="?page=5">Online players</a>
<a href="?page=6">Bug report</a>
</p>
+39
View File
@@ -0,0 +1,39 @@
<?php
$database->BugReportSetViewed();
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="10">Bug report</th>
</tr>
<tr><td></td><td>Player</td><td>Page</td><td>Report</td><td>Time</td><td>IP</td><td></td></tr>
</thead><tbody>
<?php
$bug = $database->BugReport();
if(count($bug)>0) {
for ($i = 0; $i < count($bug); $i++) {
if($bug[$i]==0){
$del = "<td></td>";
}else{
$del = '<td ><a href="?delete='.$bug[$i]['id'].'&where=bug_report"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
}
$id = $i+1;
echo "<tr><td class=\"ra \" >".$id.".</td>";
echo "<td><a href=\"?uid=".$bug[$i]['user']."\">".$database->getUserField($bug[$i]['user'],'username',0)."</a></td>";
echo "<td>".$bug[$i]['page']."</td>";
echo "<td>".$bug[$i]['report']."</td>";
echo "<td class=\"vil\">".date("H:i d.m.y",$bug[$i]['time'])."</td>";
echo "<td>".$bug[$i]['ip']."</td>";
echo $del;
echo "</tr>";
}
}
else {
echo "<tr><td class=\"none\" colspan=\"7\">No bug report</td></tr>";
}
?>
</tbody>
</table>
+138
View File
@@ -0,0 +1,138 @@
<?
if($_POST){
$database->update_config($_POST);
$database->reload('admin.php?page=1');
}
?>
<form action="" method="post">
<table id="del_acc" class="account" cellpadding="1" cellspacing="1"><thead>
<tr>
<th colspan="2">Server Settings</th>
</tr>
</thead><tbody>
<tr>
<th>Title name:</th>
<td><input class="text" name="SERVER_NAME" value="<?php echo SERVER_NAME;?>" maxlength="20" type="text"></td>
</tr>
<tr>
<th>Language:</th>
<td>
<select class="dropdown" name="LANG"">
<?php
$handle=opendir('GameEngine/lang');
while (false!==($file = readdir($handle)))
{
if (similar_text(".",$file)<1)
{
if(LANG==$file){$sel = "selected";}else{$sel = "";}
echo '<option value="'.$file.'"'.$sel.'>'.$file.'</option>\n';
}
}
closedir($handle);
?>
</select>
</td>
</tr>
<tr>
<th>Speed</th>
<td class="speed">
<input class="radio" name="SPEED" value="1" <?php if(SPEED==1){echo 'checked';}?> type="radio"> 1x
<input class="radio" name="SPEED" value="2" <?php if(SPEED==2){echo 'checked';}?> type="radio"> 2x
<input class="radio" name="SPEED" value="3" <?php if(SPEED==3){echo 'checked';}?> type="radio"> 3x
<input class="radio" name="SPEED" value="5" <?php if(SPEED==5){echo 'checked';}?> type="radio"> 5x
<input class="radio" name="SPEED" value="10" <?php if(SPEED==10){echo 'checked';}?> type="radio"> 10x
</td>
</tr>
<tr>
<th>Graphic pack:</th>
<td>
<input type="radio" name="GP_ENABLE" <?php if(GP_ENABLE==1){echo 'checked';}?> value="1"> On
<input type="radio" name="GP_ENABLE" <?php if(GP_ENABLE==0){echo 'checked';}?> value="0"> Off
</td>
</tr>
<tr>
<th>Server online:</th>
<td>
<input class="checkbox" name="active" value="1" <?php if(active==1){echo 'checked';}?> type="radio"> On
<input class="checkbox" name="active" value="0" <?php if(active==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Censored:</th>
<td>
<input class="checkbox" name="WORD_CENSOR" value="1" <?php if(WORD_CENSOR==1){echo 'checked';}?> type="radio"> On
<input class="checkbox" name="WORD_CENSOR" value="0" <?php if(WORD_CENSOR==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Censored words:</th>
<td><textarea class="text" name="CENSORED" maxlength="100"><?php echo CENSORED;?></textarea></td>
</tr>
<tr>
<th>Log build:</th>
<td>
<input class="radio" name="LOG_BUILD" value="1" <?php if(LOG_BUILD==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_BUILD" value="0" <?php if(LOG_BUILD==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log Technology:</th>
<td>
<input class="radio" name="LOG_TECH" value="1" <?php if(LOG_TECH==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_TECH" value="0" <?php if(LOG_TECH==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log Login:</th>
<td>
<input class="radio" name="LOG_LOGIN" value="1" <?php if(LOG_LOGIN==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_LOGIN" value="0" <?php if(LOG_LOGIN==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log Gold:</th>
<td>
<input class="radio" name="LOG_GOLD_FIN" value="1" <?php if(LOG_GOLD_FIN==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_GOLD_FIN" value="0" <?php if(LOG_GOLD_FIN==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log Admin:</th>
<td>
<input class="radio" name="LOG_ADMIN" value="1" <?php if(LOG_ADMIN==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_ADMIN" value="0" <?php if(LOG_ADMIN==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log War:</th>
<td>
<input class="radio" name="LOG_WAR" value="1" <?php if(LOG_WAR==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_WAR" value="0" <?php if(LOG_WAR==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log Market:</th>
<td>
<input class="radio" name="LOG_MARKET" value="1" <?php if(LOG_MARKET==1){echo 'checked';}?> type="radio"> On
<input class="radio" name="LOG_MARKET" value="0" <?php if(LOG_MARKET==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Log Illegal:</th>
<td>
<input class="checkbox" name="LOG_ILLEGAL" value="1" <?php if(LOG_ILLEGAL==1){echo 'checked';}?> type="radio"> On
<input class="checkbox" name="LOG_ILLEGAL" value="0" <?php if(LOG_ILLEGAL==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<th>Bug Report:</th>
<td>
<input class="checkbox" name="BUG_REPORT" value="1" <?php if(BUG_REPORT==1){echo 'checked';}?> type="radio"> On
<input class="checkbox" name="BUG_REPORT" value="0" <?php if(BUG_REPORT==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
</tbody></table>
<input type="submit">
</form>
+47
View File
@@ -0,0 +1,47 @@
<?php
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="10">Online players</th>
</tr>
<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td><td>Villages</td><td>Tribe</td></tr>
</thead><tbody>
<?php
$users = $database->getUsersAll();
for ($i = 0; $i < count($users); $i++) {
if(count($users)>0) {
$users[$i]['totalvillage'] = count($database->getVillagesID($users[$i]['id']));
$users[$i]['totalpop'] = $database->getVSumField($users[$i]['id'],"pop");
$users[$i]['aname'] = $database->getAllianceName($users[$i]['alliance']);
$id = $i+1;
echo "<tr><td class=\"ra \" >".$id.".</td>";
echo "<td class=\"pla \" ><a href=\"spieler.php?uid=".$users[$i]['id']."\">".$users[$i]['username']."</a> [".$users[$i]['id']."]</td>";
echo "<td class=\"pla \" >".$users[$i]['access']."</td>";
echo "<td class=\"pla \" >".$users[$i]['gold']."</td>";
echo "<td class=\"pla \" >".$users[$i]['email']."</td>";
echo "<td class=\"al \" ><a href=\"allianz.php?aid=".$users[$i]['alliance']."\">".$users[$i]['aname']."</a></td>";
echo "<td class=\"pop \" >".$users[$i]['totalpop']."</td><td class=\"vil\">".$users[$i]['totalvillage']."</td><td class=\"vil\">".$users[$i]['tribe']."</td></tr>";
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
}
?>
</tbody>
</table>
+75
View File
@@ -0,0 +1,75 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename editUser.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
$uid = $_GET['uid'];
$user = $database->getUser($uid);
if($_POST){
$profile->updateProfil($_POST);
$database->reload('?uid='.$uid);
}
?>
<div id="content" class="player" style="width:100%">
<form action="" method="POST">
<input type="hidden" name="ft" value="p1" />
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<table cellpadding="1" cellspacing="1" id="edit" ><thead>
<tr>
<th colspan="3">Player <?php echo $user['username']; ?> </th>
</tr>
<tr>
<td colspan="2">Details</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2" class="empty"></td><td class="empty"></td></tr>
<tr>
<?php
if($user['birthday'] != 0) {
$bday = explode("-",$user['birthday']);
}
else {
$bday = array('','','');
}
?>
<th>Birthday</th><td class="birth"><input tabindex="1" class="text day" type="text" name="tag" value="<?php echo $bday[2]; ?>" maxlength="2" /> <select tabindex="2" name="monat" size="" class="dropdown">
<option value="0"></option><option value="1" <?php if($bday[1] == 1) { echo "selected"; } ?>>Jan</option><option value="2"<?php if($bday[1] == 2) { echo "selected"; } ?>>Feb</option><option value="3"<?php if($bday[1] == 3) { echo "selected"; } ?>>Mar</option><option value="4"<?php if($bday[1] == 4) { echo "selected"; } ?>>Apr</option><option value="5"<?php if($bday[1] == 5) { echo "selected"; } ?>>May</option><option value="6"<?php if($bday[1] == 6) { echo "selected"; } ?>>June</option><option value="7"<?php if($bday[1] == 7) { echo "selected"; } ?>>July</option><option value="8"<?php if($bday[1] == 8) { echo "selected"; } ?>>Aug</option><option value="9"<?php if($bday[1] == 9) { echo "selected"; } ?>>Sep</option><option value="10"<?php if($bday[1] == 10) { echo "selected"; } ?>>Oct</option><option value="11"<?php if($bday[1] == 11) { echo "selected"; } ?>>Nov</option><option value="12"<?php if($bday[1] == 12) { echo "selected"; } ?>>Dec</option></select> <input tabindex="3" type="text" name="jahr" value="<?php echo $bday[0]; ?>" maxlength="4" class="text year"></td>
<td rowspan="100" class="desc1"><textarea tabindex="7" name="be1"><?php echo $user['desc2']; ?></textarea></td></tr>
<tr><th>Gender</th>
<td class="gend">
<label><input class="radio" type="radio" name="mw" value="0" <?php if($user['gender'] == 0) { echo "checked"; } ?> tabindex="4">n/a</label>
<label><input class="radio" type="radio" name="mw" value="1" <?php if($user['gender'] == 1) { echo "checked"; } ?> >m</label>
<label><input class="radio" type="radio" name="mw" value="2" <?php if($user['gender'] == 2) { echo "checked"; } ?> >f</label>
</td></tr>
<tr><th>Location</th><td><input tabindex="5" type="text" name="ort" value="<?php echo $user['location']; ?>" maxlength="30" class="text"></td></tr>
<tr><td colspan="2" class="empty"></td></tr>
<?php
$varray = $database->getProfileVillages($uid);
for($i=0;$i<=count($varray)-1;$i++) {
echo "<tr><th>Village name</th><td><input tabindex=\"6\" type=\"text\" name=\"dname$i\" value=\"".$varray[$i]['name']."\" maxlength=\"20\" class=\"text\"></td></tr>";
}
?>
<tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="desc2"><textarea tabindex="8" name="be2"><?php echo $user['desc1']; ?></textarea></td></tr>
</table><p class="btn"><input type="image" value="" tabindex="9" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p>
</form>
+3
View File
@@ -0,0 +1,3 @@
<h1>Welcome to admin</h1>
heloo
+61
View File
@@ -0,0 +1,61 @@
<?php
$ranking->procRankReq($_GET);
$ranking->procRank($_POST);
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="10">Online players</th>
</tr>
<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td><td>Villages</td><td>Tribe</td></tr>
</thead><tbody>
<?php
$users = $database->getUsersAll();
$holder = array();
foreach($users as $value) {
$value['totalvillage'] = count($database->getVillagesID($value['id']));
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
$value['aname'] = $database->getAllianceName($value['alliance']);
array_push($holder,$value);
}
$users = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
for ($i = 0; $i < count($users); $i++) {
if(count($users)>0) {
/*
$users[$i]['totalvillage'] = count($database->getVillagesID($users[$i]['id']));
$users[$i]['totalpop'] = $database->getVSumField($users[$i]['id'],"pop");
$users[$i]['aname'] = $database->getAllianceName($users[$i]['alliance']);
*/
$id = $i+1;
echo "<tr><td class=\"ra \" >".$id.".</td>";
echo "<td class=\"pla \" ><a href=\"?uid=".$users[$i]['id']."\">".$users[$i]['username']."</a> [".$users[$i]['id']."]</td>";
echo "<td class=\"pla \" >".$users[$i]['access']."</td>";
echo "<td class=\"pla \" >".$users[$i]['gold']."</td>";
echo "<td class=\"pla \" >".$users[$i]['email']."</td>";
echo "<td class=\"al \" ><a href=\"?aid=".$users[$i]['alliance']."\">".$users[$i]['aname']."</a></td>";
echo "<td class=\"pop \" >".$users[$i]['totalpop']."</td><td class=\"vil\">".$users[$i]['totalvillage']."</td><td class=\"vil\">".$users[$i]['tribe']."</td></tr>";
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
}
?>
</tbody>
</table>
@@ -0,0 +1,70 @@
<table id="player" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="15">Results in <?php echo $_POST['search_in'];?></th>
</tr>
</thead><tbody>
<?php
if($_POST['search_in']=="player"){
echo '<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td>
<td>Villages</td><td>Tribe</td><td>Last activity</td><td></td></tr>';
for ($i = 0; $i <= count($search)-1; $i++) {
$search[$i]['totalvillage'] = count($database->getVillagesID($search[$i]['id']));
$search[$i]['totalpop'] = $database->getVSumField($search[$i]['id'],"pop");
$search[$i]['aname'] = $database->getAllianceName($search[$i]['alliance']);
if($search[$i]['id']==0 or $search[$i]['id']==1){
$del = "<td></td>";
}else{
$del = '<td ><a href="?delete='.$search[$i]['id'].'"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
}
echo' <tr>
<td class="ra fc">'.($i+1).'.</td>
<td class="pla "><a href="?uid='.$search[$i]['id'].'">'.$search[$i]['username'].'</a></td>
<td class="vil">'.$search[$i]['access'].'</td>
<td class="vil">'.$search[$i]['gold'].'</td>
<td class="vil">'.$search[$i]['email'].'</td>
<td class="al "><a href="?aid='.$search[$i]['alliance'].'">'.$search[$i]['aname'].'</a></td>
<td class="pop ">'.$search[$i]['totalpop'].'</td>
<td class="vil">'.$search[$i]['totalvillage'].'</td>
<td class="vil">'.$search[$i]['tribe'].'</td>
<td class="vil">'.date("H:m d.m.y",$search[$i]['timestamp']).'</td>
'.$del.'
</tr>
';
}
}
if($_POST['search_in']=="village"){
echo '<tr><td></td><td>Village</td><td>Owner</td><td><img src="img/x.gif" class="r1">Wood</td><td><img src="img/x.gif" class="r2">Clay</td><td><img src="img/x.gif" class="r3">Iron</td><td>Max store</td><td><img src="img/x.gif" class="r4">Crop</td><td>Max Crop</td><td>Pop</td><td>Capital</td></tr>';
for ($i = 0; $i <= count($search)-1; $i++) {
$owner = $database->getUserField($search[$i]['owner'],'username',0);
echo '<tr>
<td class="fc">'.($i+1).'.</td>
<td class="vil"><a href="?uid='.$search[$i]['wref'].'">'.$search[$i]['name'].'</a></td>
<td class="vil"><a href="?uid='.$search[$i]['owner'].'">'.$owner.'</td>
<td class="vil">'.$search[$i]['wood'].'</td>
<td class="vil">'.$search[$i]['clay'].'</td>
<td class="vil">'.$search[$i]['iron'].'</td>
<td class="vil">'.$search[$i]['maxstore'].'</td>
<td class="vil">'.$search[$i]['crop'].'</td>
<td class="vil">'.$search[$i]['maxcrop'].'</td>
<td class="vil">'.$search[$i]['pop'].'</td>
<td class="vil">'.$search[$i]['capital'].'</td>
</tr>';
//echo $search[$i]['name'].$search[$i]['owner']."<br>";
}
}
?>
</tbody>
</table>
+104
View File
@@ -0,0 +1,104 @@
<table id="player" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="15">Results in <?php echo $_GET['search_in'];?></th>
</tr>
</thead><tbody>
<?php
if($_GET['search_in']=="player"){
echo '<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td>
<td>Villages</td><td>Tribe</td><td>Last activity</td><td></td></tr>';
$holder = array();
foreach($search as $value) {
$value['totalvillage'] = count($database->getVillagesID($value['id']));
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
$value['aname'] = $database->getAllianceName($value['alliance']);
array_push($holder,$value);
}
$search = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
for ($i = 0; $i <= count($search)-1; $i++) {
if($search[$i]['id']==0 or $search[$i]['id']==1){
$del = "<td></td>";
}else{
$del = '<td ><a href="?delete='.$search[$i]['id'].'&where=user"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
}
echo'<tr>
<td class="ra fc">'.($i+1).'.</td>
<td class="pla "><a href="?uid='.$search[$i]['id'].'">'.$search[$i]['username'].'</a></td>
<td class="vil">'.$search[$i]['access'].'</td>
<td class="vil">'.$search[$i]['gold'].'</td>
<td class="vil">'.$search[$i]['email'].'</td>
<td class="al "><a href="?aid='.$search[$i]['alliance'].'">'.$search[$i]['aname'].'</a></td>
<td class="pop ">'.$search[$i]['totalpop'].'</td>
<td class="vil">'.$search[$i]['totalvillage'].'</td>
<td class="vil">'.$search[$i]['tribe'].'</td>
<td class="pla">'.date("H:i d.m.y",$search[$i]['timestamp']).'</td>
'.$del.'
</tr>
';
}
}
if($_GET['search_in']=="village"){
foreach ($_GET as $value=>$el) {
if($value!="sort"){
$page .= $value."=".$el."&";
}
}
echo '<tr><td></td>
<td><a class="rn3" href="?'.$page.'sort=name">Village</a></td>
<td><a class="rn3" href="?'.$page.'sort=owner">Owner</a></td>
<td><a class="rn3" href="?'.$page.'sort=wood"><img src="img/x.gif" class="r1"> Wood</a></td>
<td><a class="rn3" href="?'.$page.'sort=clay"><img src="img/x.gif" class="r2"> Clay</a></td>
<td><a class="rn3" href="?'.$page.'sort=iron"><img src="img/x.gif" class="r3"> Iron</a></td>
<td><a class="rn3" href="?'.$page.'sort=maxstore">Max store</a></td>
<td><a class="rn3" href="?'.$page.'sort=crop"><img src="img/x.gif" class="r4"> Crop</a></td>
<td><a class="rn3" href="?'.$page.'sort=maxcrop">Max Crop</a></td>
<td><a class="rn3" href="?'.$page.'sort=pop">Pop</a></td>
<td><a class="rn3" href="?'.$page.'sort=capital">Capital</a></td>
</tr>
<tr><td colspan="15"></td></tr>';
$sort = $_GET['sort'];
if(!$sort){
$search = $multisort->sorte($search, "'pop'", false, 2);
}
else{
$search = $multisort->sorte($search, "'$sort'", true, 2);
}
for ($i = 0; $i <= count($search)-1; $i++) {
$owner = $database->getUserField($search[$i]['owner'],'username',0);
$owner_id = $database->getUserField($search[$i]['owner'],'id',0);
echo '<tr>
<td>'.($i+1).'.</td>
<td><a href="?wref='.$search[$i]['wref'].'">'.$search[$i]['name'].'</a></td>
<td><a href="?uid='.$search[$i]['owner'].'">'.$owner.'</a></td>
<td>'.$search[$i]['wood'].'</td>
<td>'.$search[$i]['clay'].'</td>
<td>'.$search[$i]['iron'].'</td>
<td>'.$search[$i]['maxstore'].'</td>
<td>'.$search[$i]['crop'].'</td>
<td>'.$search[$i]['maxcrop'].'</td>
<td>'.$search[$i]['pop'].'</td>
<td>'.$search[$i]['capital'].'</td>
</tr>';
}
}
?>
</tbody>
</table>
+46
View File
@@ -0,0 +1,46 @@
<?php
if($_GET['search_in']){
if(!$_GET['sort']){$sort = $_GET['search_in'];}
else{
$sort = $_GET['sort'];
}
$search = $database->search($_GET['search'],$_GET['search_in'],$sort);
}
?>
<form action="" method="get">
<input type="hidden" name="page" value="2">
<table id="member" >
<thead>
<tr><th colspan="3">
Search
</th></tr>
</thead>
<tbody>
<tr>
<td>
<select class="dropdown" name="search_in">
<option value="player" <?php if($_GET['search_in']=="player"){echo "selected";}?>>Search player</option>
<option value="village" <?php if($_GET['search_in']=="village"){echo "selected";}?>>Search villages</option>
<option value="alliance" <?php if($_GET['search_in']=="alliance"){echo "selected";}?>>Search alliances</option>
<option value="email" <?php if($_GET['search_in']=="email"){echo "selected";}?>>Search E-Mail addresses</option>
<option value="ip" <?php if($_GET['search_in']=="ip"){echo "selected";}?>>Search Ips</option>
<option value="del_players" <?php if($_GET['search_in']=="del_players"){echo "selected";}?>>Search deleted players</option>
</select>
</td>
<td>
<input type="text" class="text" name="search" value="<?php echo $_GET['search'];?>">
</td>
<td>
<input class="text" type="submit" value="Search">
</td>
</tr>
</tbody>
</table>
</form>
<br>
<?php
if($_GET['search'] or $_GET['search_in']){
include('templates/admin/results.tpl');
}
?>
+141
View File
@@ -0,0 +1,141 @@
<?php
$ranking->procRankReq($_GET);
$displayarray = $database->getUserArray($_GET['uid'],1);
$varray = $database->getProfileVillages($_GET['uid']);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
?>
<div id="content" class="player" style="width:100%">
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Player <?php echo $displayarray['username']; ?> </th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Rank</th>
<td><?php echo $ranking->searchRank($displayarray['username'],"username"); ?></td>
</tr>
<tr>
<th>Tribe</th>
<td><?php
if($displayarray['tribe'] == 1) {
echo "Roman";
}
else if($displayarray['tribe'] == 2) {
echo "Teutons";
}
else if($displayarray['tribe'] == 3) {
echo "Gauls";
} ?></td>
</tr>
<tr>
<th>Alliance</th>
<td><?php if($displayarray['alliance'] == 0) {
echo "-";
}
else {
$displayalliance = $database->getAllianceName($displayarray['alliance']);
echo "<a href=\"?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
} ?></td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $totalpop; ?></td>
</tr>
<?php
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
$age = date("Y")-substr($displayarray['birthday'],0,4);
echo "<tr><th>Age</th><td>$age</td></tr>";
}
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
}
if($displayarray['location'] != "") {
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
}
?>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">&raquo; Change profile</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?action=message&amp;id=<?php echo $_GET['uid'];?>">&raquo; Write message</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">&raquo; Delete player</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?log_login=<?php echo $_GET['uid'];?>">&raquo; Login Log</a></td>
</tr>
<tr>
<td colspan="2" class="desc2">
<div class="desc2div"><?php echo $displayarray['desc1']; ?></div>
</td>
</tr>
</table>
</td>
<td class="desc1" >
<?php echo $displayarray['desc2']; ?>
</td>
</tr>
</tbody>
</table>
<br>
<table cellpadding="1" cellspacing="1" id="villages">
<thead>
<tr>
<th colspan="3">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead><tbody>
<?php
if(count($varray)>0){
foreach($varray as $vil) {
$coor = $database->getCoor($vil['wref']);
echo "<tr><td class=\"nam\"><a href=\"?wref=".$vil['wref']."\">".$vil['name']."</a>";
if($vil['capital'] == 1) {
echo "<span class=\"none3\"> (capital)</span>";
}
echo "</td>";
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
}
}
else{
echo "<tr><td colspan=\"3\" class=\"none\">No village</td></tr>";
}
?>
</tbody></table>
+136
View File
@@ -0,0 +1,136 @@
<?php
$village = $database->getVillage($_GET['wref']);
?>
<div id="content" class="player" style="width:100%">
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Village: <a href="?wref=<?php echo $village['wref']; ?>"><?php echo $village['name']; ?></a> - user '<?php echo $village['owner']; ?>'</th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Wood</th>
<td><?php echo $village['wood']; ?></td>
</tr>
<tr>
<th>Clay</th>
<td><?php echo $village['clay']; ?></td>
</tr>
<tr>
<th>Iron</th>
<td><?php echo $village['iron']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxstore']; ?></td>
</tr>
<tr>
<th>Crop</th>
<td><?php echo $village['crop']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxcrop']; ?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $village['pop']; ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">&raquo; Change profile</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?action=message&amp;id=<?php echo $_GET['uid'];?>">&raquo; Write message</a></td>
</tr>
<tr>
<td colspan="2"> <a href="#?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">&raquo; Delete player</a></td>
</tr>
</table>
</td>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Capital</th>
<td><?php echo $village['capital']; ?></td>
</tr>
<tr>
<th>Clay</th>
<td><?php echo $village['clay']; ?></td>
</tr>
<tr>
<th>Iron</th>
<td><?php echo $village['iron']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxstore']; ?></td>
</tr>
<tr>
<th>Crop</th>
<td><?php echo $village['crop']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxcrop']; ?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $village['pop']; ?></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table id="villages" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="3">Villages:</th>
</tr>
<tr>
<td>Name</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead><tbody>
<?php
$villages = $database->getProfileVillages($village['owner']);
foreach($villages as $vil){
$coor = $database->getCoor($vil['wref']);
if($vil['capital']==1) {$cap = '<span class="none3">(capital)</span>';} else{$cap = "";}
echo '
<tr>
<td class="nam"><a href="?wref='.$vil['wref'].'">'.$vil['name'].'</a> '.$cap.'</td>
<td class="hab">'.$vil['pop'].'</td>
<td class="aligned_coords">
<div class="cox">('.$coor['x'].'</div>
<div class="pi">|</div>
<div class="coy">'.$coor['y'].')</div>
</td>
</tr>'; }
?>
</tbody></table>
+35
View File
@@ -0,0 +1,35 @@
<?php
$log = $database->getUser_log($_GET['log_login']);
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="10">User id <?php echo $_GET['log_login'];?> login log</th>
</tr>
<tr><td></td><td>Player</td><td>IP</td><td>Time</td><td></td></tr>
</thead><tbody>
<?php
if(count($log)>0) {
for ($i = 0; $i < count($log); $i++) {
//$del = '<td class="vil"><a href="?delete='.$log[$i]['id'].'&where=login_log"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
if(!$del){$del = '<td></td>';}
$id = $i+1;
echo "<tr><td class=\"ra \" >".$id.".</td>";
echo "<td><a href=\"?uid=".$log[$i]['id']."\">".$database->getUserField($log[$i]['uid'],'username',0)."</a></td>";
echo "<td>".$log[$i]['ip']."</td>";
echo "<td>".date("d.m.y H:i:s",$log[$i]['time'])."</td>";
echo $del;
echo "</tr>";
}
}
else {
echo "<tr><td class=\"none\" colspan=\"7\">No logs</td></tr>";
}
?>
</tbody>
</table>
+217
View File
@@ -0,0 +1,217 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename ban.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form action="" method="get">
<input name="action" type="hidden" value="addBan">
<table id="member" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="6">Ban</th>
</tr>
</thead>
<tr>
<td>User ID</td>
<td>
<input type="text" class="fm" name="uid" value="<?php echo $_GET['uid'];?>">
</td>
</tr>
<tr>
<td>Reason</td>
<td>
<select name="reason" class="fm">
<?php
$arr = array('Pushing','Cheat','Hack','Bug','Bad Name','Multi Account','Swearing');
foreach($arr as $r){
echo '<option value="'.$r.'">'.$r.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td>Time</td>
<td>
<select name="time" class="fm">
<?php
$arr = array(1,2,5,10,12);
foreach($arr as $r){
echo '<option value="'.($r*3600).'">'.$r.' hour/s</option>';
}
$arr2 = array(1,2,5,10,30,50,90);
foreach($arr2 as $r){
echo '<option value="'.($r*3600*24).'">'.$r.' day/s</option>';
}
echo '<option value="">Forever</option>';
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" class="on"><input type="submit" value="Save"></td>
</tr>
</table>
</form>
<?php
$bannedUsers = $admin->search_banned();
?>
<br>
<table id="member" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="6">Ban List</th>
</tr>
</thead><tbody>
<tr>
<td><b>Username</b></td>
<td><b>Length (from/to)</b></td>
<td><b>Reason</b></td>
<td></td>
</tr>
<?php
if($bannedUsers){
for ($i = 0; $i <= count($bannedUsers)-1; $i++) {
if($database->getUserField($bannedUsers[$i]['uid'],'username',0)==''){
$name = $bannedUsers[$i]['name'];
$link = "<span class=\"c b\">[".$name."]</span>";
}else{
$name = $database->getUserField($bannedUsers[$i]['uid'],'username',0);
$link = '<a href="?p=player&uid='.$bannedUsers[$i]['uid'].'">'.$name.'<a/>';
}
if($bannedUsers[$i]['end']){$end = date("d.m.y H:i",$bannedUsers[$i]['end']);}else{$end = '*';}
echo '
<tr>
<td>'.$link.'</td>
<td ><span class="f7">'.date("d.m.y H:i",$bannedUsers[$i]['time']).' - '.$end.'</td>
<td>'.$bannedUsers[$i]['reason'].'</td>
<td class="on"><a href="?action=delBan&uid='.$bannedUsers[$i]['uid'].'&id='.$bannedUsers[$i]['id'].'" onClick="return del(\'unban\',\''.$name.'\')"><img src="../img/Admin/del.gif" class="del" title="cancel" alt="cancel"></img></a></td>
</tr>
';
}
}else{
echo '<tr><td colspan="6" class="on">No results...</td></tr>';
}
?>
</tbody>
</table>
+38
View File
@@ -0,0 +1,38 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename ban_msq.tpl ##
## Developed by: yi12345 ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
$ban = mysql_query("SELECT * FROM ".TB_PREFIX."banlist WHERE `uid` = '".$session->uid."'");
$ban1 = mysql_fetch_array($ban);
?>
<p></br>
Hello <?php echo $ban1['name']; ?>!
You have been banned due to a violation of the rules.
</br><?php
if ($ban1['reason']=='Pushing') {
echo "Every player may only own and play one account on each server."; }
if ($ban1['reason']=='Cheat') {
echo "Every player may only own and play one account on each server."; }
if ($ban1['reason']=='Hack') {
echo "Every player may only own and play one account on each server."; }
if ($ban1['reason']=='Bug') {
echo "Every player may only own and play one account on each server."; }
if ($ban1['reason']=='Bad Name') {
echo "Every player may only own and play one account on each server."; }
if ($ban1['reason']=='Multi Account') {
echo "Every player may only own and play one account on each server."; }
if ($ban1['reason']=='Swearing') {
echo "Every player may only own and play one account on each server."; }
?>
</br></br> To ensure that you won't get banned again in the future, you shuold read the rules carefully:
</br></br> <?php echo "<a class=\"rules\" href=\"rules.php\">» Game rules"; ?>
</br></br></br>
</p>
+506
View File
@@ -0,0 +1,506 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename config.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
mysql_select_db(SQL_DB);
if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><b><font color='Red'><center>Access Denied: You are not admin</b></font></center>");
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<h2><center>Made by Dzoki</center></h2>
<table id="member">
<thead>
<tr>
<th>~ Server Settings ~</th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Server Name</td>
<td><?php echo SERVER_NAME;?></td>
</tr>
<tr>
<td>Server Started</td>
<td><?php echo date("d.m.y H:i",COMMENCE);?></td>
</tr>
<tr>
<td>Language</td>
<td><?php if(LANG == en){
echo "English";
} ?></td>
</tr>
<tr>
<td>Server Speed</td>
<td><?php echo ''.SPEED.'x';?></td>
</tr>
<tr>
<td>Map Size</td>
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
</tr>
<tr>
<td>Troop Speed</td>
<td><?php echo INCREASE_SPEED;?>x</td>
</tr>
<tr>
<td>Village Expanding Speed</td>
<td><?php if(CP == 0){
echo "Fast";
}
else if(CP == 1){
echo "Slow";
} ?></td>
</tr>
<tr>
<td>Beginners Protection</td>
<td><?php echo (PROTECTION/3600);?> hour/s</td>
</tr>
<tr>
<td>Activation Mail</td>
<td><?php if(AUTH_EMAIL == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(AUTH_EMAIL == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Quest</td>
<td><?php
if(QUEST == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(QUEST == false) {
echo "<b><font color='Red'>Disabled</font></b>";
} ?></td>
</tr>
<tr>
<td>Demolish - Level required</td>
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
</tr>
<tr>
<td>World Wonder - Statistics</td>
<td><?php
if(WW == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(WW == false) {
echo "<b><font color='Red'>Disabled</font></b>";
} ?></td>
</tr>
<tr>
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> account duration</td>
<td><?php if(PLUS_TIME >= 86400){
echo ''.(PLUS_TIME/86400).' Days';
} else if(PLUS_TIME < 86400){
echo ''.(PLUS_TIME/3600).' Hours';
} ?></td>
</tr>
<tr>
<td>+25% production duration</td>
<td><?php if(PLUS_PRODUCTION >= 86400){
echo ''.(PLUS_PRODUCTION/86400).' Days';
} else if(PLUS_PRODUCTION < 86400){
echo ''.(PLUS_PRODUCTION/3600).' Hours';
} ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Log Settings ~</th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Log Build</td>
<td><?php if(LOG_BUILD == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_BUILD == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log Technology</td>
<td><?php if(LOG_TECH == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_TECH == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log Login</td>
<td><?php if(LOG_LOGIN == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_LOGIN == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log Gold</td>
<td><?php if(LOG_GOLD_FIN == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(ALOG_GOLD_FIN == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log Admin</td>
<td><?php if(LOG_ADMIN == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_ADMIN == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log War</td>
<td><?php if(LOG_WAR == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_WAR == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log Market</td>
<td><?php if(LOG_MARKET == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_MARKET == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
<tr>
<td>Log Illegal</td>
<td><?php if(LOG_ILLEGAL == true) {
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LOG_ILLEGAL == false){
echo "<b><font color='Red'>Disabled</font></b>";
}
?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Newsbox Settings ~</th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Newsbox 1</td>
<td><?php if(NEWSBOX1 == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(NEWSBOX1 == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?> </td>
</tr>
<tr>
<td>Newsbox 2</td>
<td><?php if(NEWSBOX2 == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(NEWSBOX2 == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?> </td>
</tr>
<tr>
<td>Newsbox 3</td>
<td><?php if(NEWSBOX3 == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(NEWSBOX3 == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?> </td>
</tr>
<td>Home 1</td>
<td><?php if(HOME1 == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(HOME1 == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?> </td>
</tr>
<td>Home 2</td>
<td><?php if(HOME2 == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(HOME2 == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?> </td>
</tr>
<td>Home 3</td>
<td><?php if(HOME3 == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(HOME3 == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?> </td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ SQL Settings ~</th>
</tr>
</thead>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Hostname</td>
<td><?php echo SQL_SERVER;?></td>
</tr>
<tr>
<td>DB Username</td>
<td><?php echo SQL_USER;?></td>
</tr>
<tr>
<td>DB Password</td>
<td>*********</td>
</tr>
<tr>
<td>DB Name</td>
<td><?php echo SQL_DB;?></td>
</tr>
<tr>
<td>Table Prefix</td>
<td><?php echo TB_PREFIX;?></td>
</tr>
<tr>
<td>DB Type</td>
<td><?php
if(DB_TYPE == 0) {
echo "MYSQL";
}
else if(DB_TYPE == 1) {
echo "MYSQLi";
} ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Extra Settings ~</th>
</tr>
</thead>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Limit Mailbox</td>
<td><?php if(LIMIT_MAILBOX == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(LIMIT_MAILBOX == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?></td>
</tr>
<tr>
<td>Max number of mails</td>
<td><?php if(LIMIT_MAILBOX == true){
echo MAX_MAIL;
}
else if(LIMIT_MAILBOX == false){
echo "<font color='Gray'>Limit mailbox disabled</font>";
} ?></td>
</tr>
<tr>
<td>Include Admin in rank</td>
<td><?php if(INCLUDE_ADMIN == true){
echo "<b><font color='Green'>Enabled</font></b>";
}
else if(INCLUDE_ADMIN == false){
echo "<b><font color='Red'>Disabled</font></b>";
} ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Admin Information ~</th>
</tr>
</thead>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Admin Email</td>
<td><?php if(ADMIN_EMAIL == ''){
echo "<b><font color='Red'>No admin email defined!</b></font>";
}
else if(ADMIN_EMAIL != ''){
echo ADMIN_EMAIL;
} ?></td>
</tr>
<tr>
<td>Admin Name</td>
<td><?php if(ADMIN_NAME == ''){
echo "<b><font color='Red'>No admin name defined!</b></font>";
}
else if(ADMIN_NAME != ''){
echo ADMIN_NAME;
} ?></td>
</tr>
</table>
<?php
function define_array( $array, $keys = NULL )
{
foreach( $array as $key => $value )
{
$keyname = ($keys ? $keys . "_" : "") . $key;
if( is_array( $array[$key] ) )
define_array( $array[$key], $keyname );
else
define( $keyname, $value );
}
}
//define_array($array);
?>
+114
View File
@@ -0,0 +1,114 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename deletion.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<?php
if($_GET['uid']){
$user = $database->getUserArray($_GET['uid'],1);
$varray = $database->getProfileVillages($_GET['uid']);
if($user){
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
?>
<form action="" method="post">
<input type="hidden" name="action" value="DelPlayer">
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<thead>
<tr>
<th colspan="4">Delete player</th>
</tr>
</thead>
<tr>
<td>Name:</td>
<td><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></td>
<td>Gold:</td>
<td><?php echo $user['gold'];?></td>
</tr>
<tr>
<td>Rank:</td>
<td>???.</td>
<td>Population:</td>
<td><?php echo $totalpop;?></td>
</tr>
<tr>
<td>Villages:</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata WHERE owner = ".$user['id']."");
$num_rows = mysql_num_rows($result);
echo $num_rows;
?></td>
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b>:</td>
<td><?php
$plus = date('d.m.Y H:i',$user['plus']);
echo $plus;?></td>
</tr>
<tr>
<td>Alliance:</td>
<td><?php echo $database->getAllianceName($user['alliance']);?></td>
<td>Status:</td>
<td>-</td>
</tr>
<tr>
<td colspan="4" class="empty"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="text" name="pass"></td>
<td colspan="2"><input type="submit" class="c5" value="Delete player"></td>
</tr>
</table>
<br /><br /><font color="Red"><b>NOTICE: DELETE ALL PLAYER VILLAGES BELLOW BEFORE DELETING PLAYER!</font></b><br /><br />
<table id="profile">
<tr>
<td>Name</td>
<td>Population</td>
<td>Coordinates</td>
<td></td>
</tr>
<?php
for ($i = 0; $i <= count($varray)-1; $i++) {
$coorproc = $database->getCoor($varray[$i]['wref']);
if($varray[$i]['capital']){
$capital = '<span class="c">(Capital)</span>';
$delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return del(\'did\','.$varray[$i]['wref'].');"><img src="../img/Admin/del.gif" class="del"></a>';
}else{
$capital = '';
$delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return del(\'did\','.$varray[$i]['wref'].');"><img src="../img/Admin/del.gif" class="del"></a>';
}
echo '
<tr>
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Check<a/></td>
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
<td>'.$delLink.' </td>
</tr>
';
}
?>
</form>
<?php
}
}
?>
+125
View File
@@ -0,0 +1,125 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename deletion.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$id = $_GET['uid'];
if(isset($id)){
$user = $database->getUserArray($id,1);
$varray = $database->getProfileVillages($id);
$varmedal = $database->getProfileMedal($id);
?>
<br />
<form action="../GameEngine/Admin/Mods/editUser.php" method="POST">
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr><th>Tribe</th>
<td><select name="tribe">
<option value="1" <?php if($user['tribe'] == 1) { echo "selected='selected'"; } else { echo ''; } ?>>Roman</option>
<option value="2" <?php if($user['tribe'] == 2) { echo "selected='selected'"; } else { echo ''; } ?>>Teuton</option>
<option value="3" <?php if($user['tribe'] == 3) { echo "selected='selected'"; } else { echo ''; } ?>>Gaul</option>
</select></td>
</tr>
<?php
echo "<tr><th>Location</th><td><input class=\"fm\" name=\"location\" value=\"".$user['location']."\"></td></tr>";
echo "<tr><th>Email</th><td><input class=\"fm\" name=\"email\" value=\"".$user['email']."\"></td></tr>";
echo '<tr><td colspan="2" class="empty"></td></tr>';
echo '<tr><td colspan="2"><a href="?p=player&uid='.$user['id'].'"><span class="rn2" >&raquo;</span> Go back</a></td></tr>';
echo '<tr><td colspan="2" class="empty"></td></tr>';
echo '<tr><td colspan="2" class="desc2"><textarea cols="25" rows="14" tabindex="1" name="desc1">'.nl2br($user['desc1']).'</textarea></td></tr>';
?>
</table>
</td>
<td class="desc1">
<textarea tabindex="8" cols="30" rows="20" name="desc2"><?php echo nl2br($user['desc2']); ?></textarea>
</td>
</tr>
<tr><td colspan="2" class="empty"></td></tr>
</tbody>
</table>
<p>
<table cellspacing="1" cellpadding="2" class="tbg">
<tr><td class="rbg" colspan="4">Medals</td></tr>
<tr>
<td>Category</td>
<td>Rang</td>
<td>Week</td>
<td>BB-Code</td>
</tr>
<?php
/******************************
INDELING CATEGORIEEN:
===============================
== 1. Aanvallers top 10 ==
== 2. Defence top 10 ==
== 3. Klimmers top 10 ==
== 4. Overvallers top 10 ==
== 5. In att en def tegelijk ==
== 6. in top 3 - aanval ==
== 7. in top 3 - verdediging ==
== 8. in top 3 - klimmers ==
== 9. in top 3 - overval ==
******************************/
foreach($varmedal as $medal) {
$titel="Bonus";
switch ($medal['categorie']) {
case "1":
$titel="Attacker of the Week";
break;
case "2":
$titel="Defender of the Week";
break;
case "3":
$titel="Climber of the week";
break;
case "4":
$titel="Robber of the week";
break;
}
echo"<tr>
<td> ".$titel."</td>
<td>".$medal['plaats']."</td>
<td>".$medal['week']."</td>
<td>[#".$medal['id']."]</td>
</tr>";
} ?>
<tr>
<td>Beginners Protection</td>
<td></td>
<td></td>
<td>[#0]</td>
</tr>
</table></p>
<center><button>OK</button></p>
</center></form>
<?php } ?>
+26
View File
@@ -0,0 +1,26 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename gold.php ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?>
<?php $id = $_SESSION['id']; ?>
<form action="../GameEngine/Admin/Mods/gold.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $id; ?>">
<br /><br /><br /><br /><br /><br /><br /><br /><br />
<center><b>How much gold do you want to give to the users?</b></center>
<center><br /><input class="give_gold" name="gold" id="gold" value="20" maxlength="4">&nbsp;<img src="../img/admin/gold.gif" class="gold" alt="Gold" title="Gold"/>&nbsp;&nbsp;<font color="gray" size="1">insert number and press 'enter'</center></form>
<?php
if(isset($_GET['g'])) {
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
}
?>
+29
View File
@@ -0,0 +1,29 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename home.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<br />
<font size="3"><b><center>
WELCOME TO <?php if($_SESSION['access'] == MULTIHUNTER) { echo 'MULTIHUNTER';
} else if($_SESSION['access'] == ADMIN){ echo 'ADMINISTRATOR'; } ?> CONTROL PANEL
</center></b></font>
<br /><br /><br /><br />
Hello <b><?php echo $_SESSION['username']; ?></b>,<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You are logged in as: <?php if($_SESSION['access'] == MULTIHUNTER) { echo '<b><font color="Blue">Multihunter</font></b>';
} else if($_SESSION['access'] == ADMIN){ echo '<b><font color="Red">Administrator</font></b>'; } ?></center>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></b>
<font color="#c5c5c5" size="1">Credits: Akakori & Elmar<br />
Fixed, remade and new features added by <b>Dzoki</b>
</font>
+53
View File
@@ -0,0 +1,53 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename login.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<div align="center"><img src="../img/admin/admin.gif" width="468" height="60" border="0"></div>
<p>Login to control panel:</p>
<form method="post" action="admin.php">
<input type="hidden" name="action" value="login">
<p class="old_p1">
<table width="100%" cellspacing="1" cellpadding="0">
<tr><td><label>Username:</label>
<input class="fm fm110" type="text" name="name" value="<?php echo $_SESSION['username']?>" maxlength="15"> <span class="e f7"></span>
</td></tr>
<tr><td><label>Password:</label>
<input class="fm fm110" type="password" name="pw" value="" maxlength="20"> <span class="e f7"></span>
</td></tr>
</table>
</p>
<p align="center"><input type="image" border="0" src="../img/admin/b/l1.gif" width="80" height="20">
<img align="right" src="../img/admin/senator_roemer.png" width="450" height="620">
</form>
+76
View File
@@ -0,0 +1,76 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<link REL="shortcut icon" HREF="favicon.ico"/>
<title><?php
if($_SESSION['access'] == ADMIN) {
echo 'Admin Control Panel - TravianX';
} else
if($_SESSION['access'] == MULTIHUNTER) {
echo 'Multihunter Control Panel - TravianX';
}
?></title>
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
<link rel=stylesheet type="text/css" href="../img/../img.css">
<script src="mt-full.js?423cb" type="text/javascript"></script>
<script src="ajax.js" type="text/javascript"></script>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="no">
</head>
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename login_log.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?>
<br>
<table cellpadding="1" cellspacing="1" id="member">
<thead>
<tr>
<th colspan="4">User login log</th>
</tr>
<tr><td>ID</td><td>Username</td><td>IP</td><td>Time</td></tr>
</thead><tbody>
<?php
$no = count($database->getLoginLog());
$log = $database->getLoginLog();
for ($i = 0; $i < $no; $i++) {
$userid = $log[$i]['uid'];
$username = $database->getUserField($userid, "username", 0);
echo "<tr>";
echo "<td>".$log[$i]['id']."</td>";
echo "<td><a href=\"admin.php?p=player&uid=".$userid."\">".$username."</a>";
echo "<td>".$log[$i]['ip']."</td>";
echo "<td>".date("d.m.Y H:i", $log[$i]['time'])."</td>";
echo "</tr>";
}
echo "</tbody></table>\n";
?>
+44
View File
@@ -0,0 +1,44 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename map.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
comming soon
<div>
<img style="border: 1px solid blue;" src="img/x.gif" usemap="#mymap" alt="imagemap" border="0" height="525 width="525">
</div>
<map name="mymap">
<?php
function line($x,$W){
$a = 0;
for ($i = 0; $i <= $x; $i++) {
$X = $W.'-'.$i;
$c += 25;
$d = $W*25+25;
$b = 25*($W-1);
echo '<area shape="rect" coords="'.$a.','.$b.','.$c.','.$d.'" href="?x='.$W.'&y='.$i.'" alt="frames">';
$a += 25;
}
}
function map($x,$y){
for ($i = 0; $i <= $y; $i++) {
line($x,$i);
}
}
map(20,20);
?>
</map>
+67
View File
@@ -0,0 +1,67 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename message.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<table id="member" style="width:225px">
<thead>
<tr>
<th colspan="2">IGM/Reports</th>
</tr>
</thead>
<tr>
<td>IGM ID</td>
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="nid" value="<?php echo $_GET['nid'];?>"> <input type="submit" value="ok"></form></td>
</tr>
<tr>
<td>Report ID</td>
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="bid" value="<?php echo $_GET['bid'];?>"> <input type="submit" value="ok"></form></td>
</tr>
</table><br>
<?php
error_reporting(0);
if($_GET['nid'] and ereg('^[0-9]', $_GET['nid'])){
include('msg.tpl');
}elseif($_GET['bid'] and ereg('^[0-9]', $_GET['bid'])){
include('report.tpl');
}
?>
+42
View File
@@ -0,0 +1,42 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename msg.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$msg = $database->getMessage($_GET['nid'],3);;
if($msg){
?>
<div id="content" class="messages">
<h1>Messages</h1>
<div id="read_head" class="msg_head"></div>
<div id="read_content" class="msg_content">
<img src="img/x.gif" id="label" class="read" alt="">
<div id="heading">
<div><span class="b">From</span>: <?php echo $database->getUserField($msg[0]['owner'],'username',0);?></div>
<div><span class="b">To</span>: <?php echo $database->getUserField($msg[0]['target'],'username',0);?></div>
<div><span class="b">Topic</span>: <?php echo $msg[0]['topic'];?>
<div style="float:right;"><?php echo date('d.m.y H:i',$msg[0]['time']);?></div>
</div>
</div>
<div class="clear"></div>
<div id="line"></div>
<div class="message" style="margin-top: 10px;">
<?php echo $msg[0]['message'];?>
</div>
</div>
<div id="read_foot" class="msg_foot"></div>
</form>
</div>
<?php
}else{
echo "Message id ".$_GET['nid']." wasn´t found.";
}
?>
+51
View File
@@ -0,0 +1,51 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename natarstart.php ##
## Developed by: advocaite ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?>
<?php $id = $_SESSION['id']; ?>
<form action="../GameEngine/Admin/Mods/natarend.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $id; ?>">
<br /><br /><br /><br /><br /><br /><br /><br /><br />
<center><b>Create World Wonder villages?</b></center>
<center><br /><input class="give_gold" name="vill_amount" id="vill_amount" value="10" maxlength="4">&nbsp;<img src="http://forum.ragezone.com/f583/img/admin/gold.gif" class="gold" alt="gold" title="gold"/>&nbsp;&nbsp;<font color="gray" size="1">insert number of Wonders and press 'enter'</center></form>
<?php
if(isset($_GET['g'])) {
echo '<br /><br /><font color="Red"><b>World Wonders Added</font></b>';
}
?>
+67
View File
@@ -0,0 +1,67 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename online.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$active = $admin->getUserActive();
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<table id="member">
<thead>
<tr>
<th colspan="6">Online users (<?php echo count($active);?>)</th>
</tr>
</thead>
<tr>
<td>Name [access]</td>
<td>Time</td>
<td>Tribe</td>
<td>Pop</td>
<td>Villages</td>
<td>Gold</td>
</tr>
<?php
if($active){
for ($i = 0; $i <= count($active)-1; $i++) {
$uid = $database->getUserField($active[$i]['username'],'id',1);
$varray = $database->getProfileVillages($uid);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
if($active[$i]['tribe'] == 1){
$tribe = "Roman";
} else if($active[$i]['tribe'] == 2){
$tribe = "Teuton";
} else if($active[$i]['tribe'] == 3){
$tribe = "Gaul";
}
echo '
<tr>
<td><a href="?p=player&uid='.$uid.'">'.$active[$i]['username'].' ['.$active[$i]['access'].']</a></td>
<td>'.date("d.m.y H:i:s",$active[$i]['timestamp']).'</td>
<td>'.$tribe.'</td>
<td>'.$totalpop.'</td>
<td>'.count($varray).'</td>
<td><img src="../img/admin/gold.gif" class="gold" alt="Gold" title="This user has: '.$active[$i]['gold'].' gold"/> '.$active[$i]['gold'].'</td>
</tr>
';
}
}else{
echo '<tr><td colspan="6" class="hab">No online users</td></tr>';
}
?>
</table>
+377
View File
@@ -0,0 +1,377 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename player.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$id = $_GET['uid'];
if(isset($id)){
$user = $database->getUserArray($id,1);
$varray = $database->getProfileVillages($id);
if($user){
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
include('search2.tpl');
?>
<?php
$deletion = false;
if($deletion){
?>
<table id="member" cellpadding="1" cellspacing="1">
<tr>
<td>The account will be deleted in <span class="c2">79:56:11</span>
<a href="?action=StopDel&uid=<?php echo $user['id'];?>" onClick="return del('stopDel','<?php echo $user['username'];?>');"><img src="img/x.gif" class="del"></a>
</td>
</tr>
</table>
<?php
}
?>
<br>
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Rank</th>
<td><?php //echo $ranking->searchRank($displayarray['username'],"username"); ?></td>
</tr>
<tr>
<th>Tribe</th>
<td><?php
if($user['tribe'] == 1) {
echo "Roman";
}
else if($user['tribe'] == 2) {
echo "Teutons";
}
else if($user['tribe'] == 3) {
echo "Gauls";
}
else if($user['tribe'] == 4) {
echo "Natars";
} ?></td>
</tr>
<tr>
<th>Alliance</th>
<td>
<?php if($user['alliance'] == 0) {
echo "-";
}
else {
echo "<a href=\"?p=alliance&aid=".$user['alliance']."\">".$database->getAllianceName($user['alliance'])."</a>";
} ?>
</td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $totalpop;?> <a href="?action=recountPopUsr&uid=<?php echo $user['id'];?>">Recount</a></td>
</tr>
<?php
if(isset($user['birthday']) && $user['birthday'] != 0) {
$age = date("Y")-substr($user['birthday'],0,4);
echo "<tr><th>Age</th><td>$age</td></tr>";
}
if(isset($user['gender']) && $user['gender'] != 0) {
$gender = ($user['gender']== 1)? "Male" : "Female";
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
}
echo "<tr><th>Location</th><td><input disabled class=\"fm\" name=\"location\" value=\"".$user['location']."\"></td></tr>";
echo "<tr><th><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b></th><td>";
if(date('d.m.Y H:i',$user['plus']) == '01.01.1970 00:00') {
echo "Not enabled!</tr></th>";
} else { echo "".date('d.m.Y H:i',$user['plus']+3600*2)."</tr></th>"; }
echo "<tr><th>Email</th><td><input disabled class=\"fm\" name=\"email\" value=\"".$user['email']."\"></td></tr>";
echo '<tr><td colspan="2" class="empty"></td></tr>';
if($_SESSION['access'] == ADMIN){
echo '<tr><td colspan="2"><a href="?p=editUser&uid='.$user['id'].'">&raquo; Change profile</a></td></tr>';
} else if($_SESSION['access'] == MULTIHUNTER){
echo '';
}
echo '<tr><td colspan="2"> <a href="?p=Newmessage&uid='.$user['id'].'">&raquo; Write message</a></td></tr>';
if($_SESSION['access'] == ADMIN){
echo '<tr><td colspan="2"> <a class="rn3" href="?p=deletion&uid='.$user['id'].'">&raquo; Delete player</a></td></tr>';
} else if($_SESSION['access'] == MULTIHUNTER){
echo '';
}
echo '<tr><td colspan="2"> <a href="?p=ban&uid='.$user['id'].'">&raquo; Ban</a></td></tr>';
echo '<tr><td colspan="2" class="desc2"><div class="desc2div"><center>'.nl2br($user['desc1']).'</center></div></td></tr>';
?>
</table>
</td>
<td class="desc1">
<center><?php echo nl2br($user['desc2']); ?></center>
</td>
</tr>
</tbody>
</table>
<!-- ADDITIONAL USER INFORMATION -->
<table id="member">
<thead>
<tr>
<th colspan="2">Additional Information</th>
</tr>
</thead>
<tr>
<td>Access</td>
<td><?php
if($user['access'] == 0){
echo "Banned";
}
else if($user['access'] == 2){
echo "Normal user";
}
else if($user['access'] == 8){
echo "<b><font color=\"Blue\">Multihunter</font></b>";
}
else if($user['access'] == 9){
echo "<b><font color=\"Red\">Administrator</font></b>";
}?></td>
</tr>
<tr>
<td>Remaining gold</td>
<td><?php
if($user['gold'] == 0){ ?>
This user has no gold! (<img src='../img/admin/gold_g.gif' class='gold' alt='Gold' title='This user has: <?php echo $user['gold']; ?> gold'/> <?php echo $user['gold']; ?>) <?php if($_SESSION['access'] == ADMIN){ ?><a href='admin.php?p=player&uid=<?php echo $id; ?>&g'>Give gold <?php } ?></a>
<?php }
else if($user['gold'] > 0){ ?>
<img src='../img/admin/gold.gif' class='gold' alt='Gold' title='This user has: <?php echo $user['gold']; ?> gold'/> <?php echo $user['gold']; ?> <?php if($_SESSION['access'] == ADMIN){ ?><a href='admin.php?p=player&uid=<?php echo $id; ?>&g'><img src='../img/admin/edit.gif' title='Give Gold'><?php } ?></a></td>
<?php }
?>
</tr>
<?php
if($_SESSION['access'] == ADMIN){
if($_GET['g'] == 'ok'){
echo '';
} else {
if(isset($_GET['g'])){ ?>
<form action="../GameEngine/Admin/Mods/gold_1.php" method="POST">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<tr>
<td>Insert number and press 'enter'</td>
<td><input class="give_gold" name="gold" value="0"> <a href="admin.php?p=player&uid=<?php echo $id; ?>"><img src="../img/admin/del.gif" title="Cancel"></a></td>
</tr></form>
<?php } } }?>
<tr><td></td><td></td></tr>
<tr>
<td>Sitter 1</td>
<td><?php
if($user['sit1'] >= 1){
echo '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>';
}
else if($user['sit1'] == 0){
echo 'No sitter';
}
?>
</tr>
<tr>
<td>Sitter 2</td>
<td><?php
if($user['sit2'] >= 1){
echo '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>';
}
else if($user['sit2'] == 0){
echo 'No sitter';
}
?>
</tr>
<tr><td></td><td></td></tr>
<tr>
<td>Beginners Protection</td>
<td><?php
echo ''.date('d.m.Y H:i',$user['protect']+3600*2).'';
?>
</tr>
<tr>
<td>Cultural Points</td>
<td><?php echo $user['cp'];?> <?php if($_SESSION['access'] == ADMIN){ ?><a href='admin.php?p=player&uid=<?php echo $id; ?>&cp'><img src='../img/admin/edit.gif' title='Give Gold'><?php } ?>
</tr>
<?php if($_SESSION['access'] == ADMIN){
if($_GET['cp'] == 'ok'){
echo '';
} else {
if(isset($_GET['cp'])){ ?>
<form action="../GameEngine/Admin/Mods/cp.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<tr>
<td>Insert number and press 'enter'</td>
<td><input class="give_gold" name="cp" value="0"> <a href="admin.php?p=player&uid=<?php echo $id; ?>"><img src="../img/admin/del.gif" title="Cancel"></a></td>
</tr></form>
<?php } } }?>
<tr>
<td>Last activity</td>
<td><?php
echo ''.date('d.m.Y H:i',$user['timestamp']+3600*2).'';
?>
</tr>
</table>
<center><?php include ('punish.tpl'); ?></center>
<?php
include ('villages.tpl');
include ('add_village.tpl');
}else{
echo "Not found...<a href=\"javascript: history.go(-1)\">Back</a>";
}
}
?>
+82
View File
@@ -0,0 +1,82 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename punish.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$active = $admin->getUserActive();
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form method="post" action="admin.php">
<input name="action" type="hidden" value="punish">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member" style="width: 200px;">
<thead>
<tr>
<th colspan="2">Punish Player</th>
</tr>
</thead>
<tr>
<td><center /><select name="punish">
<option name="punish" value="10" selected="selected">10%
<option name="punish" value="20">20%
<option name="punish" value="30">30%
<option name="punish" value="40">40%
<option name="punish" value="50">50%
<option name="punish" value="60" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>>60%
<option name="punish" value="70" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>>70%
<option name="punish" value="80" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>>80%
<option name="punish" value="90" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>>90%
<option name="punish" value="100" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>>100%</option></td>
<td rowspan="1"><center /><input value="OK" type="submit"></td>
</tr>
<!--<tr>
<td colspan="1" style="text-align: center;">
<input type="checkbox" name="del_troop" value="1"> Delete troops
</td>
</tr>
<tr>
<td colspan="1" style="text-align: center;">
<input type="checkbox" name="clean_ware" value="1"> Empty warehouses
</td>
</tr> -->
</table>
</form>
+12
View File
@@ -0,0 +1,12 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename report.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
comming soon
+51
View File
@@ -0,0 +1,51 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename results_alliances.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$result = $admin->search_alliance($_POST['s']);
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found alliances (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">AID</td>
<td class="b">Name</td>
<td class="b">Tag</td>
<td class="b">Founder</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
echo '
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["name"].'</a></td>
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["tag"].'</a></td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td>
</tr>
';
}}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
</table>
+49
View File
@@ -0,0 +1,49 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename resutls_email.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$result = $admin->search_email($_POST['s']);
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found emails (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">UID</td>
<td class="b">Name</td>
<td class="b">Email</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
echo '
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td>
<td>'.$result[$i]["email"].'</td>
</tr>
';
}}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
</table>
+63
View File
@@ -0,0 +1,63 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename results_ip.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$result = $admin->search_ip($_POST['s']);
$newArray = array();
function arr($arr,$el){
global $newArray;
for ($i = 0; $i <= count($arr)-1; $i++) {
if(in_array($el,$newArray)){
return false;
}else{
array_push($newArray,$el);
return true;
}
}
}
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found IPs (<?php echo count($newArray);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">IP</td>
<td class="b">Name</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){
echo '
<tr>
<td>'.$result[$i]["ip"].'</td>
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td>
</tr>
';
}
}
}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
</table>
+56
View File
@@ -0,0 +1,56 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename results_player.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$result = $admin->search_player($_POST['s']);
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found player (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">UID</td>
<td class="b">Player</td>
<td class="b">Villages</td>
<td class="b">Pop</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
$varray = $database->getProfileVillages($result[$i]["id"]);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
echo '
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td>
<td>'.count($varray).'</td>
<td>'.$totalpop.'</td>
</tr>
';
}}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
</table>
+58
View File
@@ -0,0 +1,58 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename results_villages.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$result = $admin->search_village($_POST['s']);
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found villages (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">ID</td>
<td class="b">Name</td>
<td class="b">Owner</td>
<td class="b">Pop</td>
<td></td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
if($_SESSION['access'] == ADMIN){
$delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return del(\'did\','.$varray[$i]['wref'].');"><img src="../img/Admin/del.gif" class="del"></a>';
}else if($_SESSION['access'] == MULTIHUNTER){
$delLink = '<a href="#"><img src="../img/Admin/del_g.gif" class="del"></a>';
}
echo '
<tr>
<td>'.$result[$i]["wref"].'</td>
<td><a href="?p=village&did='.$result[$i]["wref"].'">'.$result[$i]["name"].'</a></td>
<td><a href="?p=player&uid='.$result[$i]["owner"].'">'.$database->getUserField($result[$i]["owner"],'username',0).'</a></td>
<td>'.$result[$i]["pop"].'</td>
<td>'.$delLink.'</td>
</tr>
';
}}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
</table>
+90
View File
@@ -0,0 +1,90 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename search.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<form action="" method="post">
<table id="member">
<thead>
<tr>
<th colspan="3">Search v1.0</th>
</tr>
</thead>
<tr class="slr3">
<td>
<select name="p" size="1" class="slr3">
<option value="player" <?php if($_POST['p']=='player'){echo "selected";}?>>Search player</option>
<option value="alliances" <?php if($_POST['p']=='alliances'){echo "selected";}?>>Search alliances</option>
<option value="villages" <?php if($_POST['p']=='villages'){echo "selected";}?>>Search villages</option>
<option value="email" <?php if($_POST['p']=='email'){echo "selected";}?>>Search E-mail</option>
<option value="ip" <?php if($_POST['p']=='ip'){echo "selected";}?>>Search IPs</option>
<option value="deleted_players" <?php if($_POST['p']=='deleted_players'){echo "selected";}?>>Search deleted players</option>
</select>
</td>
<td>
<input name="s" value="<?php echo $_POST['s'];?>">
</td>
<td>
<input type=submit value=Search class="slr3">
</td>
</tr>
</table>
</form>
<?php
if($_GET['msg']){
echo '<div style="margin-top: 50px;" class="b"><center>';
if($_GET['msg'] == 'ursdel'){
echo "User was deleted.";
}
echo '</center></div>';
}
?>
+51
View File
@@ -0,0 +1,51 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename search2.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<form action="" method="post">
<table id="profile">
<thead>
<tr>
<th colspan="3" class="left">Information</th>
</tr>
</thead>
</table>
<center><div id="s_nav2">
<span class="f8">
<span class="b"><br />Player</span>: <a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a> (uid: <?php echo $user['id'];?>)
</span>
<br>
<span class="f8">
<span class="b">Tribe</span>: <?php
if($user['tribe'] == 1) {
echo "Roman";
}
else if($user['tribe'] == 2) {
echo "Teutons";
}
else if($user['tribe'] == 3) {
echo "Gauls";
} ?> | <span class="b">Villages</span>: <?php echo count($varray);?><br /><br />
</span>
</div>
<?php if($_GET['did']){ ?>
<div id="s_nav4">
<span class="f10">
<span class="b">Village</span>: <a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo $village['name'];?></a> (did: <?php echo $village['wref'];?>)
</span>
<br>
<span class="f8">
<span class="b">Coordinates</span>: (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) | <span class="b">Inhabitants</span>: <?php echo $village['pop'];?>
</span
</div>
<?php }?>
</center>
</form>
+157
View File
@@ -0,0 +1,157 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename server_info.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<?php
$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;
?>
<br /><br />
<table id="profile">
<thead>
<tr><th colspan="2">Player Information</th></tr>
</thead>
<tbody>
<tr>
<td>Registered players</td>
<td><?php
echo $users;
?>
</td>
</tr>
<tr>
<td>Active players</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."active");
$num_rows = mysql_num_rows($result);
echo $num_rows;
?>
</td>
</tr>
<tr>
<td>Players online</td>
<td><?php
$t =time();
$result = mysql_query(
"SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysql_error());;
$num_rows = mysql_num_rows($result);
echo $num_rows;
?>
</td>
</tr>
<tr>
<td>Players Banned</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
$num_rows = mysql_num_rows($result);
echo $num_rows;
?>
</td>
</tr>
<tr>
<td>Villages settled</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
$num_rows = mysql_num_rows($result);
echo $num_rows;
?>
</td>
</tr>
</tbody>
</table>
<br />
<table id="profile">
<thead>
<tr><th colspan="3">Player Information</th></tr>
<td class="b">Tribe</td>
<td class="b">Registered</td>
<td class="b">Percent</td>
</thead>
<tbody>
<tr>
<td>Romans</td>
<td><?php
echo $tribes[0];
?>
</td>
<td><?php
$percents = 100*($tribes[0] / $users);
echo $percents = intval ($percents);
echo "%";
?></td>
</tr>
<tr>
<td>Teutons</td>
<td><?php
echo $tribes[1];
?>
</td>
<td><?php
$percents = 100*($tribes[1] / $users);
echo $percents = intval ($percents);
echo "%";
?>
</td>
</tr>
<tr>
<td>Gauls</td>
<td><?php
echo $tribes[2];
?></td>
<td><?php
$percents = 100*($tribes[2] / $users);
echo $percents = intval ($percents);
echo "%";
?></td>
</tr>
</tbody>
</table>
<div>
+960
View File
@@ -0,0 +1,960 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename village.php ##
## Developed by: Dzoki & Advocatie ##
## License: TravianX Project ##
## Thanks to: Dzoki & itay2277(Edit some additions) ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<?php
$id = $_GET['did'];
if(isset($id)){
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$units = $database->getUnit($village['wref']);
if($type == 3){
$typ = array(4,4,4,6);
}elseif($type == 6){
$typ = array(1,1,1,15);
}
if($village and $user){
?>
<br>
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Village Information</th>
</tr>
</thead><tbody>
<tr>
<td>Village name:</td>
<td><?php echo $village['name'];?></td>
</tr>
<tr>
<td>Population</td>
<td><?php echo $village['pop'];?></td>
</tr>
<tr>
<td>Coordinates:</td>
<td>(<?php echo $coor['x'];?>|<?php echo $coor['y'];?>)</td>
</tr>
<tr>
<td>Village ID</td>
<td><?php echo $village['wref'];?></td>
</tr>
<tr>
<td>Field type</td>
<td><?php
for ($i = 0; $i <= 3; $i++) {
$a = $i+1;
if($i != 3){
echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif">| ';
}else{
echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif"> ';
}
}
?></td>
</tr>
</tbody>
</table>
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="4">Resources</th>
</tr>
<tr>
<td class="hab">Resource</td>
<td class="hab" colspan="2">Warehouse</td>
</tr>
</thead><tbody>
<tr>
<td><img src="../img/admin/r/1.gif"> Lumber</td>
<td class="hab"><?php echo floor($village['wood']);?></td>
<td class="hab" rowspan="3"><?php echo $village['maxstore'];?></td>
</tr>
<tr>
<td><img src="../img/admin/r/2.gif"> Clay</td>
<td class="hab"><?php echo floor($village['clay']);?></td>
</tr>
<tr>
<td><img src="../img/admin/r/3.gif"> Iron</td>
<td class="hab"><?php echo floor($village['iron']);?></td>
</tr>
<tr>
<td><img src="../img/admin/r/4.gif"> Crop</td>
<td class="hab"><?php echo floor($village['crop']);?></td>
<td class="hab"><?php echo $village['maxcrop'];?></td>
</tr>
</tbody>
</table>
<!-- OASIS -->
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="5">Oasis</th>
</tr>
<tr>
<td class="ra"></td>
<td class="hab">Name</td>
<td class="hab">Coordinates</td>
<td class="hab">Loyalty</td>
<td class="hab">Resource</td>
</tr>
</thead><tbody>
<tr>
<td><a href="?delOas&oid=" onClick="return del(\'oas\','.$varray[$i]['wref'].');"><img src="../img/admin/del.gif"></a></td>
<td class="hab">Cooming soon</td>
<td class="hab">Cooming soon</td>
<td class="hab">Cooming soon</td>
<td class="hab">Cooming soon</td>
</tr>
</tbody>
</table>
<!-- TROOPS IN VILLAGE -->
<table id="member">
<thead>
<tr>
<th colspan="10">Troops in village</th>
<?php
#== Romans ==#
#========================================
if($units['u1'] == 0){
$u1 = '<font color="gray">'.$units['u1'].'';
}
else if($units['u1'] > 0){
$u1 = '<font color="black">'.$units['u1'].'';
}
#========================================
if($units['u2'] == 0){
$u2 = '<font color="gray">'.$units['u2'].'';
}
else if($units['u2'] > 0){
$u2 = '<font color="black">'.$units['u2'].'';
}
#========================================
if($units['u3'] == 0){
$u3 = '<font color="gray">'.$units['u3'].'';
}
else if($units['u3'] > 0){
$u3 = '<font color="black">'.$units['u3'].'';
}
#========================================
if($units['u4'] == 0){
$u4 = '<font color="gray">'.$units['u4'].'';
}
else if($units['u4'] > 0){
$u4 = '<font color="black">'.$units['u4'].'';
}
#========================================
if($units['u5'] == 0){
$u5 = '<font color="gray">'.$units['u5'].'';
}
else if($units['u5'] > 0){
$u5 = '<font color="black">'.$units['u5'].'';
}
#========================================
if($units['u6'] == 0){
$u6 = '<font color="gray">'.$units['u6'].'';
}
else if($units['u6'] > 0){
$u6 = '<font color="black">'.$units['u6'].'';
}
#========================================
if($units['u7'] == 0){
$u7 = '<font color="gray">'.$units['u7'].'';
}
else if($units['u7'] > 0){
$u7 = '<font color="black">'.$units['u7'].'';
}
#========================================
if($units['u8'] == 0){
$u8 = '<font color="gray">'.$units['u8'].'';
}
else if($units['u8'] > 0){
$u8 = '<font color="black">'.$units['u8'].'';
}
#========================================
if($units['u9'] == 0){
$u9 = '<font color="gray">'.$units['u9'].'';
}
else if($units['u9'] > 0){
$u9 = '<font color="black">'.$units['u9'].'';
}
#========================================
if($units['u10'] == 0){
$u10 = '<font color="gray">'.$units['u10'].'';
}
else if($units['u10'] > 0){
$u10 = '<font color="black">'.$units['u10'].'';
}
#========================================
#== Teuotons ==#
#========================================
if($units['u11'] == 0){
$u11 = '<font color="gray">'.$units['u11'].'';
}
else if($units['u11'] > 0){
$u11 = '<font color="black">'.$units['u11'].'';
}
#========================================
if($units['u12'] == 0){
$u12 = '<font color="gray">'.$units['u12'].'';
}
else if($units['u12'] > 0){
$u12 = '<font color="black">'.$units['u12'].'';
}
#========================================
if($units['u13'] == 0){
$u13 = '<font color="gray">'.$units['u13'].'';
}
else if($units['u13'] > 0){
$u13 = '<font color="black">'.$units['u13'].'';
}
#========================================
if($units['u14'] == 0){
$u14 = '<font color="gray">'.$units['u14'].'';
}
else if($units['u14'] > 0){
$u14 = '<font color="black">'.$units['u14'].'';
}
#========================================
if($units['u15'] == 0){
$u15 = '<font color="gray">'.$units['u15'].'';
}
else if($units['u15'] > 0){
$u15 = '<font color="black">'.$units['u15'].'';
}
#========================================
if($units['u16'] == 0){
$u16 = '<font color="gray">'.$units['u16'].'';
}
else if($units['u16'] > 0){
$u16 = '<font color="black">'.$units['u16'].'';
}
#========================================
if($units['u17'] == 0){
$u17 = '<font color="gray">'.$units['u17'].'';
}
else if($units['u17'] > 0){
$u17 = '<font color="black">'.$units['u17'].'';
}
#========================================
if($units['u18'] == 0){
$u18 = '<font color="gray">'.$units['u18'].'';
}
else if($units['u18'] > 0){
$u18 = '<font color="black">'.$units['u18'].'';
}
#========================================
if($units['u19'] == 0){
$u19 = '<font color="gray">'.$units['u19'].'';
}
else if($units['u19'] > 0){
$u19 = '<font color="black">'.$units['u19'].'';
}
#========================================
if($units['u20'] == 0){
$u20 = '<font color="gray">'.$units['u20'].'';
}
else if($units['u20'] > 0){
$u20 = '<font color="black">'.$units['u20'].'';
}
#========================================
#== Gauls ==#
#========================================
if($units['u21'] == 0){
$u21 = '<font color="gray">'.$units['u21'].'';
}
else if($units['u21'] > 0){
$u21 = '<font color="black">'.$units['u21'].'';
}
#========================================
if($units['u22'] == 0){
$u22 = '<font color="gray">'.$units['u22'].'';
}
else if($units['u22'] > 0){
$u22 = '<font color="black">'.$units['u22'].'';
}
#========================================
if($units['u23'] == 0){
$u23 = '<font color="gray">'.$units['u23'].'';
}
else if($units['u23'] > 0){
$u23 = '<font color="black">'.$units['u23'].'';
}
#========================================
if($units['u24'] == 0){
$u24 = '<font color="gray">'.$units['u24'].'';
}
else if($units['u24'] > 0){
$u24 = '<font color="black">'.$units['u24'].'';
}
#========================================
if($units['u25'] == 0){
$u25 = '<font color="gray">'.$units['u25'].'';
}
else if($units['u25'] > 0){
$u25 = '<font color="black">'.$units['u25'].'';
}
#========================================
if($units['u26'] == 0){
$u26 = '<font color="gray">'.$units['u26'].'';
}
else if($units['u26'] > 0){
$u26 = '<font color="black">'.$units['u26'].'';
}
#========================================
if($units['u27'] == 0){
$u27 = '<font color="gray">'.$units['u27'].'';
}
else if($units['u27'] > 0){
$u27 = '<font color="black">'.$units['u27'].'';
}
#========================================
if($units['u28'] == 0){
$u28 = '<font color="gray">'.$units['u28'].'';
}
else if($units['u28'] > 0){
$u28 = '<font color="black">'.$units['u28'].'';
}
#========================================
if($units['u29'] == 0){
$u29 = '<font color="gray">'.$units['u29'].'';
}
else if($units['u29'] > 0){
$u29 = '<font color="black">'.$units['u29'].'';
}
#========================================
if($units['u30'] == 0){
$u30 = '<font color="gray">'.$units['u30'].'';
}
else if($units['u30'] > 0){
$u30 = '<font color="black">'.$units['u30'].'';
}
#========================================
#== Nature ==#
if($units['u31'] == 0){
$u31 = '<font color="gray">'.$units['u31'].'';
}
else if($units['u31'] > 0){
$u31 = '<font color="black">'.$units['u31'].'';
}
#========================================
if($units['u32'] == 0){
$u32 = '<font color="gray">'.$units['u32'].'';
}
else if($units['u32'] > 0){
$u32 = '<font color="black">'.$units['u32'].'';
}
#========================================
if($units['u33'] == 0){
$u33 = '<font color="gray">'.$units['u33'].'';
}
else if($units['u33'] > 0){
$u33 = '<font color="black">'.$units['u33'].'';
}
#========================================
if($units['u34'] == 0){
$u34 = '<font color="gray">'.$units['u34'].'';
}
else if($units['u34'] > 0){
$u34 = '<font color="black">'.$units['u34'].'';
}
#========================================
if($units['u35'] == 0){
$u35 = '<font color="gray">'.$units['u35'].'';
}
else if($units['u35'] > 0){
$u35 = '<font color="black">'.$units['u35'].'';
}
#========================================
if($units['u36'] == 0){
$u36 = '<font color="gray">'.$units['u36'].'';
}
else if($units['u36'] > 0){
$u36 = '<font color="black">'.$units['u36'].'';
}
#========================================
if($units['u37'] == 0){
$u37 = '<font color="gray">'.$units['u37'].'';
}
else if($units['u37'] > 0){
$u37 = '<font color="black">'.$units['u37'].'';
}
#========================================
if($units['u38'] == 0){
$u38 = '<font color="gray">'.$units['u38'].'';
}
else if($units['u38'] > 0){
$u38 = '<font color="black">'.$units['u38'].'';
}
#========================================
if($units['u39'] == 0){
$u39 = '<font color="gray">'.$units['u39'].'';
}
else if($units['u39'] > 0){
$u39 = '<font color="black">'.$units['u39'].'';
}
#========================================
#== Natars ==#
if($units['u40'] == 0){
$u40 = '<font color="gray">'.$units['u40'].'';
}
else if($units['u40'] > 0){
$u40 = '<font color="black">'.$units['u40'].'';
}
#========================================
if($units['u41'] == 0){
$u41 = '<font color="gray">'.$units['u41'].'';
}
else if($units['u41'] > 0){
$u41 = '<font color="black">'.$units['u41'].'';
}
#========================================
if($units['u42'] == 0){
$u42 = '<font color="gray">'.$units['u42'].'';
}
else if($units['u42'] > 0){
$u42 = '<font color="black">'.$units['u42'].'';
}
#========================================
if($units['u43'] == 0){
$u43 = '<font color="gray">'.$units['u43'].'';
}
else if($units['u43'] > 0){
$u43 = '<font color="black">'.$units['u43'].'';
}
#========================================
if($units['u44'] == 0){
$u44 = '<font color="gray">'.$units['u44'].'';
}
else if($units['u44'] > 0){
$u44 = '<font color="black">'.$units['u44'].'';
}
#========================================
if($units['u45'] == 0){
$u45 = '<font color="gray">'.$units['u45'].'';
}
else if($units['u45'] > 0){
$u45 = '<font color="black">'.$units['u45'].'';
}
#========================================
if($units['u46'] == 0){
$u46 = '<font color="gray">'.$units['u46'].'';
}
else if($units['u46'] > 0){
$u46 = '<font color="black">'.$units['u46'].'';
}
#========================================
if($units['u47'] == 0){
$u47 = '<font color="gray">'.$units['u47'].'';
}
else if($units['u47'] > 0){
$u47 = '<font color="black">'.$units['u47'].'';
}
#========================================
if($units['u48'] == 0){
$u48 = '<font color="gray">'.$units['u48'].'';
}
else if($units['u48'] > 0){
$u48 = '<font color="black">'.$units['u48'].'';
}
#========================================
if($units['u49'] == 0){
$u49 = '<font color="gray">'.$units['u49'].'';
}
else if($units['u49'] > 0){
$u49 = '<font color="black">'.$units['u49'].'';
}
#========================================
if($units['u50'] == 0){
$u50 = '<font color="gray">'.$units['u50'].'';
}
else if($units['u50'] > 0){
$u50 = '<font color="black">'.$units['u50'].'';
}
#========================================
?>
<!-- ROMAN UNITS -->
<?php if($_SESSION['access'] == ADMIN) {
if($user['tribe'] == 1){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/1.gif"></img></td>
<td><center /><img src="../img/un/u/2.gif"></img></td>
<td><center /><img src="../img/un/u/3.gif"></img></td>
<td><center /><img src="../img/un/u/4.gif"></img></td>
<td><center /><img src="../img/un/u/5.gif"></img></td>
<td><center /><img src="../img/un/u/6.gif"></img></td>
<td><center /><img src="../img/un/u/7.gif"></img></td>
<td><center /><img src="../img/un/u/8.gif"></img></td>
<td><center /><img src="../img/un/u/9.gif"></img></td>
<td><center /><img src="../img/un/u/10.gif"></img></td>
</tr>
<tr>
<td><center />'.$u1.'</td>
<td><center />'.$u2.'</td>
<td><center />'.$u3.'</td>
<td><center />'.$u4.'</td>
<td><center />'.$u5.'</td>
<td><center />'.$u6.'</td>
<td><center />'.$u7.'</td>
<td><center />'.$u8.'</td>
<td><center />'.$u9.'</td>
<td><center />'.$u10.'</td>
</tr>';
}
// TEUTON UNITS
else if($user['tribe'] == 2){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/11.gif"></img></td>
<td><center /><img src="../img/un/u/12.gif"></img></td>
<td><center /><img src="../img/un/u/13.gif"></img></td>
<td><center /><img src="../img/un/u/14.gif"></img></td>
<td><center /><img src="../img/un/u/15.gif"></img></td>
<td><center /><img src="../img/un/u/16.gif"></img></td>
<td><center /><img src="../img/un/u/17.gif"></img></td>
<td><center /><img src="../img/un/u/18.gif"></img></td>
<td><center /><img src="../img/un/u/19.gif"></img></td>
<td><center /><img src="../img/un/u/20.gif"></img></td>
</tr>
<tr>
<td><center />'.$u11.'</td>
<td><center />'.$u12.'</td>
<td><center />'.$u13.'</td>
<td><center />'.$u14.'</td>
<td><center />'.$u15.'</td>
<td><center />'.$u16.'</td>
<td><center />'.$u17.'</td>
<td><center />'.$u18.'</td>
<td><center />'.$u19.'</td>
<td><center />'.$u20.'</td>
</tr>';
}
// GAUL UNITS
else if($user['tribe'] == 3){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/21.gif"></img></td>
<td><center /><img src="../img/un/u/22.gif"></img></td>
<td><center /><img src="../img/un/u/23.gif"></img></td>
<td><center /><img src="../img/un/u/24.gif"></img></td>
<td><center /><img src="../img/un/u/25.gif"></img></td>
<td><center /><img src="../img/un/u/26.gif"></img></td>
<td><center /><img src="../img/un/u/27.gif"></img></td>
<td><center /><img src="../img/un/u/28.gif"></img></td>
<td><center /><img src="../img/un/u/29.gif"></img></td>
<td><center /><img src="../img/un/u/30.gif"></img></td>
</tr>
<tr>
<td><center />'.$u21.'</td>
<td><center />'.$u22.'</td>
<td><center />'.$u23.'</td>
<td><center />'.$u24.'</td>
<td><center />'.$u25.'</td>
<td><center />'.$u26.'</td>
<td><center />'.$u27.'</td>
<td><center />'.$u28.'</td>
<td><center />'.$u29.'</td>
<td><center />'.$u30.'</td>
</tr>';
}
// Nature UNITS
else if($user['tribe'] == 4){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../gpack/travian_default/img/u/31.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/32.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/33.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/34.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/35.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/36.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/37.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/38.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/39.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/40.gif"></img></td>
</tr>
<tr>
<td><center />'.$u31.'</td>
<td><center />'.$u32.'</td>
<td><center />'.$u33.'</td>
<td><center />'.$u34.'</td>
<td><center />'.$u35.'</td>
<td><center />'.$u36.'</td>
<td><center />'.$u37.'</td>
<td><center />'.$u38.'</td>
<td><center />'.$u39.'</td>
<td><center />'.$u40.'</td>
</tr>';
}
// Natras UNITS
else if($user['tribe'] == 5){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../gpack/travian_default/img/u/41.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/42.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/43.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/44.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/45.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/46.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/47.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/48.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/49.gif"></img></td>
<td><center /><img src="../gpack/travian_default/img/u/50.gif"></img></td>
</tr>
<tr>
<td><center />'.$u41.'</td>
<td><center />'.$u42.'</td>
<td><center />'.$u43.'</td>
<td><center />'.$u44.'</td>
<td><center />'.$u45.'</td>
<td><center />'.$u46.'</td>
<td><center />'.$u47.'</td>
<td><center />'.$u48.'</td>
<td><center />'.$u49.'</td>
<td><center />'.$u50.'</td>
</tr>';
}
} else if($_SESSION['access'] == MULTIHUNTER){
if($user['tribe'] == 1){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/1.gif"></img></td>
<td><center /><img src="../img/un/u/2.gif"></img></td>
<td><center /><img src="../img/un/u/3.gif"></img></td>
<td><center /><img src="../img/un/u/4.gif"></img></td>
<td><center /><img src="../img/un/u/5.gif"></img></td>
<td><center /><img src="../img/un/u/6.gif"></img></td>
<td><center /><img src="../img/un/u/7.gif"></img></td>
<td><center /><img src="../img/un/u/8.gif"></img></td>
<td><center /><img src="../img/un/u/9.gif"></img></td>
<td><center /><img src="../img/un/u/10.gif"></img></td>
</tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
</tr>';
}
// TEUTON UNITS
else if($user['tribe'] == 2){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/11.gif"></img></td>
<td><center /><img src="../img/un/u/12.gif"></img></td>
<td><center /><img src="../img/un/u/13.gif"></img></td>
<td><center /><img src="../img/un/u/14.gif"></img></td>
<td><center /><img src="../img/un/u/15.gif"></img></td>
<td><center /><img src="../img/un/u/16.gif"></img></td>
<td><center /><img src="../img/un/u/17.gif"></img></td>
<td><center /><img src="../img/un/u/18.gif"></img></td>
<td><center /><img src="../img/un/u/19.gif"></img></td>
<td><center /><img src="../img/un/u/20.gif"></img></td>
</tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
</tr>';
}
// GAUL UNITS
else if($user['tribe'] == 3){
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/21.gif"></img></td>
<td><center /><img src="../img/un/u/22.gif"></img></td>
<td><center /><img src="../img/un/u/23.gif"></img></td>
<td><center /><img src="../img/un/u/24.gif"></img></td>
<td><center /><img src="../img/un/u/25.gif"></img></td>
<td><center /><img src="../img/un/u/26.gif"></img></td>
<td><center /><img src="../img/un/u/27.gif"></img></td>
<td><center /><img src="../img/un/u/28.gif"></img></td>
<td><center /><img src="../img/un/u/29.gif"></img></td>
<td><center /><img src="../img/un/u/30.gif"></img></td>
</tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
<td><center /><font color="#bcbdbc">?</font></td>
</tr>';
}
}
?>
</tbody></table>
<?php if($_SESSION['access'] == ADMIN){ echo '<div align="right"><a href="admin.php?p=addTroops&did='.$id.'">Edit troops</div></a>';
} else if($_SESSION['access'] == MULTIHUNTER){ echo '<a href="#"><b><div align="right"><font color="#bcbdbc">Edit troops</font></div></a></b>'; }
?>
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="4">Buildings</th>
</tr>
<tr>
<td class="on">ID</td>
<td class="on">GID</td>
<td class="hab">Name</td>
<td class="on">Level</td>
</tr>
</thead><tbody>
<?php
for ($i = 1; $i <= 40; $i++) {
if($fdata['f'.$i.'t'] == 0){
$bu = "-";
}else{
$bu = $funct->procResType($fdata['f'.$i.'t']);
}
echo '
<tr>
<td class="on">'.$i.'</td>
<td class="on">'.$fdata['f'.$i.'t'].'</td>
<td class="hab">'.$bu.'</td>
<td class="on">'.$fdata['f'.$i].'</td>
</tr>
';
}
?>
</tbody>
</table>
<?php
}else{
echo "Not found...<a href=\"javascript: history.go(-1)\">Back</a>";
}
}
?>
+57
View File
@@ -0,0 +1,57 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename villages.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<table id="member">
<thead>
<tr>
<th>Villages</th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td>Name</td>
<td>Population</td>
<td>Coordinates</td>
<td></td>
</tr>
<?php
for ($i = 0; $i <= count($varray)-1; $i++) {
$coorproc = $database->getCoor($varray[$i]['wref']);
if($varray[$i]['capital']){
$capital = '<span class="c">(Capital)</span>';
$delLink = '<a href="#"><img src="../img/Admin/del_g.gif" class="del"></a>';
}else{
$capital = '';
if($_SESSION['access'] == ADMIN){
$delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return del(\'did\','.$varray[$i]['wref'].');"><img src="../img/Admin/del.gif" class="del"></a>';
}else if($_SESSION['access'] == MULTIHUNTER){
$delLink = '<a href="#"><img src="../img/Admin/del_g.gif" class="del"></a>';
}
}
echo '
<tr>
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Recount<a/></td>
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
<td>'.$delLink.' </td>
</tr>
';
}
?>
</table>
+135
View File
@@ -0,0 +1,135 @@
<?php
session_start();
include('GameEngine/config.php');
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DB) or die(mysql_error());
include("GameEngine/Generator.php");
//include("GameEngine/Session.php");
if($y < $yy) {$y = $y + (($yy - $y) /2);}
else {$y = $yy + (($y - $yy) /2);}
$x = $x - (($x - $xx) / 2);
$x = ($x < -WORLD_MAX)? $x+WORLD_MAX*2+1 : $x;
$x = ($x > WORLD_MAX)? $x-WORLD_MAX*2-1 : $x;
$y = ($y < -WORLD_MAX)? $y+WORLD_MAX*2+1 : $y;
$y = ($y > WORLD_MAX)? $y-WORLD_MAX*2-1 : $y;
$xm3 = ($x-3) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-2 : $x-3;
$xm2 = ($x-2) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-1 : $x-2;
$xm1 = ($x-1) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX : $x-1;
$xp1 = ($x+1) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX : $x+1;
$xp2 = ($x+2) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+1 : $x+2;
$xp3 = ($x+3) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+2: $x+3;
$ym3 = ($y-3) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-2 : $y-3;
$ym2 = ($y-2) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-1 : $y-2;
$ym1 = ($y-1) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX : $y-1;
$yp1 = ($y+1) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX : $y+1;
$yp2 = ($y+2) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+1 : $y+2;
$yp3 = ($y+3) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+2: $y+3;
$xarray = array($xm3,$xm2,$xm1,$x,$xp1,$xp2,$xp3);
$yarray = array($ym3,$ym2,$ym1,$y,$yp1,$yp2,$yp3);
$maparray = array();
$xcount = 0;
$maparray = '';
$maparray2 = '';
for($i=0; $i<=6; $i++){
if($xcount != 7){
$maparray .= '\''.$generator->getBaseID($xarray[$xcount],$yarray[$i]).'\',';
$maparray2 .= $generator->getBaseID($xarray[$xcount],$yarray[$i]).',';
if($i==6){
$i = -1;
$xcount +=1;
}
}
}
header("Content-Type: application/json;");
$maparray = (substr($maparray, 0, -1));
$query2 = "SELECT
s1_wdata.id AS map_id,
s1_wdata.fieldtype AS map_fieldtype,
s1_wdata.oasistype AS map_oasis,
s1_wdata.x AS map_x,
s1_wdata.y AS map_y,
s1_wdata.occupied AS map_occupied,
s1_wdata.image AS map_image,
s1_odata.conqured AS oasis_conqured,
info_user_oasis.username AS oasis_user,
info_user_oasis.tribe AS oasis_tribe,
info_alliance_oasis.tag AS oasis_alli_name,
s1_vdata.wref AS ville_id,
s1_vdata.owner AS ville_user,
s1_vdata.name AS ville_name,
s1_vdata.capital AS ville_capital,
s1_vdata.pop AS ville_pop,
s1_users.id AS user_id,
s1_users.username AS user_username,
s1_users.tribe AS user_tribe,
s1_users.alliance AS user_alliance,
s1_alidata.id AS aliance_id,
s1_alidata.tag AS aliance_name
FROM ((((((s1_wdata
LEFT JOIN s1_vdata ON s1_vdata.wref = s1_wdata.id )
LEFT JOIN s1_odata ON s1_odata.wref = s1_wdata.id )
LEFT JOIN s1_users AS info_user_oasis ON info_user_oasis.id = s1_odata.owner )
LEFT JOIN s1_alidata AS info_alliance_oasis ON info_alliance_oasis.id = info_user_oasis.alliance )
LEFT JOIN s1_users ON s1_users.id = s1_vdata.owner )
LEFT JOIN s1_alidata ON s1_alidata.id = s1_users.alliance )
where s1_wdata.id IN ($maparray)
ORDER BY FIND_IN_SET(s1_wdata.id,'$maparray2')";
$result2 = mysql_query($query2) or die(mysql_error());
$targetalliance = array();
$neutralarray = array();
$friendarray = array();
$enemyarray = array();
$i=0;
//Load coor array
$yrow = 0;
$map_js ='';
while ($donnees = mysql_fetch_assoc($result2)){
$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? (in_array($targetalliance,$friendarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (in_array($targetalliance,$enemyarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (in_array($targetalliance,$neutralarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image'];
//Javascript map info
if($yrow!=7){
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\"";
if($donnees['map_occupied']){
if($donnees['map_fieldtype'] != 0){
$map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n";
}
}
elseif($donnees['map_oasis'] != 0){
if ($donnees['oasis_conqured'] != 0){
$map_js.= ",\"\",\"".$donnees['oasis_user']."\",\"-\",\"".$donnees['oasis_alli_name']."\",\"".$donnees['oasis_tribe']."\"]";
}
else{
$map_js.="]";
}
}
else{$map_js .= "]";}
if($i == 6 && $yrow !=6){
$i = -1;
$yrow +=1;
$map_js .= "],[";
}
else {
if($yrow == 6 && $i == 6) {$map_js .= "]";}
else {$map_js .= ",";}
}
$regcount += 1;
}
else {$map_js .= "]";}
++$i;
}
echo '[['.$map_js.']';
+154
View File
@@ -0,0 +1,154 @@
<?php
session_start();
include('GameEngine/config.php');
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DB) or die(mysql_error());
include("GameEngine/Generator.php");
header("Content-Type: application/json;");
//include("GameEngine/Session.php");
if($y < $yy) {$y = $y + (($yy - $y) /2);}
else {$y = $yy + (($y - $yy) /2);}
$x = $x - (($x - $xx) / 2);
$x = ($x < -WORLD_MAX)? $x+WORLD_MAX*2+1 : $x;
$x = ($x > WORLD_MAX)? $x-WORLD_MAX*2-1 : $x;
$y = ($y < -WORLD_MAX)? $y+WORLD_MAX*2+1 : $y;
$y = ($y > WORLD_MAX)? $y-WORLD_MAX*2-1 : $y;
$xm6 = ($x-6) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-5 : $x-6;
$xm5 = ($x-5) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-4 : $x-5;
$xm4 = ($x-4) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-3 : $x-4;
$xm3 = ($x-3) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-2 : $x-3;
$xm2 = ($x-2) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-1 : $x-2;
$xm1 = ($x-1) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX : $x-1;
$xp1 = ($x+1) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX : $x+1;
$xp2 = ($x+2) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+1 : $x+2;
$xp3 = ($x+3) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+2: $x+3;
$xp4 = ($x+4) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+3 : $x+4;
$xp5 = ($x+5) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+4 : $x+5;
$xp6 = ($x+6) > WORLD_MAX? $x-WORLD_MAX-WORLD_MAX+5: $x+6;
$ym6 = ($y-6) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-5 : $y-6;
$ym5 = ($y-5) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-4 : $y-5;
$ym4 = ($y-4) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-3 : $y-4;
$ym3 = ($y-3) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-2 : $y-3;
$ym2 = ($y-2) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX-1 : $y-2;
$ym1 = ($y-1) < -WORLD_MAX? $y+WORLD_MAX+WORLD_MAX : $y-1;
$yp1 = ($y+1) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX : $y+1;
$yp2 = ($y+2) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+1 : $y+2;
$yp3 = ($y+3) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+2: $y+3;
$yp4 = ($y+4) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+3: $y+4;
$yp5 = ($y+5) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+4 : $y+5;
$yp6 = ($y+6) > WORLD_MAX? $y-WORLD_MAX-WORLD_MAX+5: $y+6;
$xarray = array($xm6,$xm5,$xm4,$xm3,$xm2,$xm1,$x,$xp1,$xp2,$xp3,$xp4,$xp5,$xp6);
$yarray = array($ym6,$ym5,$ym4,$ym3,$ym2,$ym1,$y,$yp1,$yp2,$yp3,$yp4,$yp5,$yp6);
$maparray = array();
$xcount = 0;
$maparray = '';
$maparray2 = '';
for($i=0; $i<=12; $i++){
if($xcount != 13){
$maparray .= '\''.$generator->getBaseID($xarray[$xcount],$yarray[$i]).'\',';
$maparray2 .= $generator->getBaseID($xarray[$xcount],$yarray[$i]).',';
if($i==12){
$i = -1;
$xcount +=1;
}
}
}
$maparray = (substr($maparray, 0, -1));
$maparray2 = (substr($maparray2, 0, -1));
//echo $maparray;
$query2 = "SELECT
s1_wdata.id AS map_id,
s1_wdata.fieldtype AS map_fieldtype,
s1_wdata.oasistype AS map_oasis,
s1_wdata.x AS map_x,
s1_wdata.y AS map_y,
s1_wdata.occupied AS map_occupied,
s1_wdata.image AS map_image,
s1_odata.conqured AS oasis_conqured,
info_user_oasis.username AS oasis_user,
info_user_oasis.tribe AS oasis_tribe,
info_alliance_oasis.tag AS oasis_alli_name,
s1_vdata.wref AS ville_id,
s1_vdata.owner AS ville_user,
s1_vdata.name AS ville_name,
s1_vdata.capital AS ville_capital,
s1_vdata.pop AS ville_pop,
s1_users.id AS user_id,
s1_users.username AS user_username,
s1_users.tribe AS user_tribe,
s1_users.alliance AS user_alliance,
s1_alidata.id AS aliance_id,
s1_alidata.tag AS aliance_name
FROM ((((((s1_wdata
LEFT JOIN s1_vdata ON s1_vdata.wref = s1_wdata.id )
LEFT JOIN s1_odata ON s1_odata.wref = s1_wdata.id )
LEFT JOIN s1_users AS info_user_oasis ON info_user_oasis.id = s1_odata.owner )
LEFT JOIN s1_alidata AS info_alliance_oasis ON info_alliance_oasis.id = info_user_oasis.alliance )
LEFT JOIN s1_users ON s1_users.id = s1_vdata.owner )
LEFT JOIN s1_alidata ON s1_alidata.id = s1_users.alliance )
where s1_wdata.id IN ($maparray)
ORDER BY FIND_IN_SET(s1_wdata.id,'$maparray2')";
//echo $query2;
$result2 = mysql_query($query2) or die(mysql_error());
$targetalliance = array();
$neutralarray = array();
$friendarray = array();
$enemyarray = array();
$i=0;
$i2=0;
$yrow = 0;
$row = 0;
$coorindex = 0;
$map_js ='';
while ($donnees = mysql_fetch_assoc($result2)){
$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $_SESSION['id_user'])? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? (in_array($targetalliance,$friendarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (in_array($targetalliance,$enemyarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (in_array($targetalliance,$neutralarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $_SESSION['alliance_user']? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image'];
//Javascript map info
if($yrow!=13){
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\"";
if($donnees['map_occupied']){
if($donnees['map_fieldtype'] != 0){
$map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n";
}
}
elseif($donnees['map_oasis'] != 0){
if ($donnees['oasis_conqured'] != 0){
$map_js.= ",\"\",\"".$donnees['oasis_user']."\",\"-\",\"".$donnees['oasis_alli_name']."\",\"".$donnees['oasis_tribe']."\"]";
}
else{
$map_js.="]";
}
}
else{$map_js .= "]";}
if($i == 12 && $yrow !=12){
$i = -1;
$yrow +=1;
$map_js .= "],[";
}
else {
if($yrow == 12 && $i == 12) {$map_js .= "]";}
else {$map_js .= ",";}
}
$regcount += 1;
}
else {$map_js .= "]";}
++$i;
}
echo '[['.$map_js.']';
File diff suppressed because one or more lines are too long
+729
View File
@@ -0,0 +1,729 @@
<?php
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| .: PLEASE DONT'T REMOVE OR CHANGE THIS NOTICE :. |
| --------------------------------------------------------------------------- |
| Filename quest_core.tpl |
| Version 0.1 |
| Developed by: DesPlus <desplus@gmail.com> |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
include("GameEngine/Village.php");
$uArray = $database->getUserArray($_SESSION['username'],0);
if($message->unread && !$message->nunread) { $messagelol = "i2"; }
else if(!$message->unread && $message->nunread) { $messagelol = "i3"; }
else if($message->unread && $message->nunread) { $messagelol = "i1"; }
else { $messagelol = "i4"; }
if (isset($qact)){
switch($qact) {
case 'enter':
$database->updateUserField($_SESSION['username'],'quest','1',0);
$_SESSION['qst']= 1;
break;
case 'skip':
$database->updateUserField($_SESSION['username'],'quest','23',0);
$_SESSION['qst']= 23;
//Give Reward
$gold=$database->getUserField($_SESSION['username'],'gold','username');
$gold+=25;
$database->updateUserField($_SESSION['username'],'gold',$gold,0);
$skiped=true;
break;
case '2':
$database->updateUserField($_SESSION['username'],'quest','2',0);
$_SESSION['qst']= 2;
break;
case '3':
$database->updateUserField($_SESSION['username'],'quest','3',0);
$_SESSION['qst']= 3;
//Give Reward
$database->modifyResource($session->villages[0],50,60,30,10,1);
break;
case '4':
$database->updateUserField($_SESSION['username'],'quest','4',0);
$_SESSION['qst']= 4;
//Give Reward
$database->modifyResource($session->villages[0],30,60,30,20,1);
break;
case 'rank':
$rSubmited=$qact2;
break;
case '5':
$database->updateUserField($_SESSION['username'],'quest','5',0);
$_SESSION['qst']= 5;
//Give Reward
$database->modifyResource($session->villages[0],40,30,20,30,1);
break;
case '6':
$database->updateUserField($_SESSION['username'],'quest','6',0);
$_SESSION['qst']= 6;
$Subject="Message From The Taskmaster";
$Message="You are to be informed that a nice reward is waiting for you at the taskmaster.<br /><br />Hint: The message has been generated automatically. An answer is not necessary.";
$database->sendMessage($session->userinfo['id'],0,$Subject,$Message,0);
$RB=true;
//Give Reward
$database->modifyResource($session->villages[0],50,60,30,30,1);
break;
case '7':
$database->updateUserField($_SESSION['username'],'quest','7',0);
$_SESSION['qst']= 7;
//Give Reward
$gold=$database->getUserField($_SESSION['username'],'gold','username');
$gold+=20;
$database->updateUserField($_SESSION['username'],'gold',$gold,0);
break;
case '8':
$crop = round($village->acrop);
if ($crop>=200){
$database->updateUserField($_SESSION['username'],'quest','8',0);
$_SESSION['qst']= 8;
//Get 200 Crop
$database->modifyResource($session->villages[0],0,0,0,-200,1);
//Give Reward
$database->modifyUnit($village->wid,array($unit),array(3),array(0));
} else{
$NoCrop="No Enough Crop!";
}
break;
case '9':
$database->updateUserField($_SESSION['username'],'quest','9',0);
$_SESSION['qst']= 9;
//Give Reward
$database->modifyResource($session->villages[0],75,80,30,50,1);
break;
case '10':
$database->updateUserField($_SESSION['username'],'quest','10',0);
$_SESSION['qst']= 10;
//Give Reward
$database->modifyResource($session->villages[0],120,200,140,100,1);
break;
case '11':
$database->updateUserField($_SESSION['username'],'quest','11',0);
$_SESSION['qst']= 11;
//Give Reward
$database->modifyResource($session->villages[0],150,180,30,130,1);
break;
case '12':
$database->updateUserField($_SESSION['username'],'quest','12',0);
$_SESSION['qst']= 12;
//Give Reward
$database->modifyResource($session->villages[0],60,50,40,30,1);
break;
case 'lumber':
$lSubmited=$qact2;
break;
case '13':
$database->updateUserField($_SESSION['username'],'quest','13',0);
$_SESSION['qst']= 13;
//Give Reward
$database->modifyResource($session->villages[0],50,30,60,20,1);
break;
case '14':
$database->updateUserField($_SESSION['username'],'quest','14',0);
$_SESSION['qst']= 14;
//Give Reward
$database->modifyResource($session->villages[0],75,75,40,40,1);
break;
case '15':
$database->updateUserField($_SESSION['username'],'quest','15',0);
$_SESSION['qst']= 15;
//Give Reward
$database->modifyResource($session->villages[0],100,90,100,60,1);
break;
case '16':
$database->updateUserField($_SESSION['username'],'quest','16',0);
$_SESSION['qst']= 16;
break;
case '17':
$database->updateUserField($_SESSION['username'],'quest','17',0);
$_SESSION['qst']= 17;
//Give Reward
$database->modifyResource($session->villages[0],80,90,60,40,1);
break;
case '18':
$database->updateUserField($_SESSION['username'],'quest','18',0);
$_SESSION['qst']= 18;
//Give Reward
$database->modifyResource($session->villages[0],70,100,90,100,1);
break;
case '19':
$database->updateUserField($_SESSION['username'],'quest','19',0);
$_SESSION['qst']= 19;
break;
case '20':
$database->updateUserField($_SESSION['username'],'quest','20',0);
$_SESSION['qst']= 20;
//Give Reward
$database->modifyResource($session->villages[0],80,90,60,40,1);
break;
case '21':
$database->updateUserField($_SESSION['username'],'quest','21',0);
$_SESSION['qst']= 21;
break;
case '22':
$database->updateUserField($_SESSION['username'],'quest','22',0);
$_SESSION['qst']= 22;
//Give Reward
$database->modifyResource($session->villages[0],300,320,360,570,1);
break;
case '23':
$database->updateUserField($_SESSION['username'],'quest','23',0);
$_SESSION['qst']= 23;
//Give Reward
$gold=$database->getUserField($_SESSION['username'],'gold','username');
$gold+=15;
$database->updateUserField($_SESSION['username'],'gold',$gold,0);
break;
}
}
header("Content-Type: application/json;");
if($session->access!=BANNED){
if($_SESSION['qst']== 0){
?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Welcome to <?php echo SERVER_NAME; ?>!<\/h1><br \/><i>&bdquo;As I see you have been made chieftain of this little village. I will be your counselor for the first few days and never leave your (right hand) side.&rdquo;<\/i><br \/><br \/><span id=\"qst_accpt\"><a class=\"qle\" href=\"javascript: qst_next('','enter'); \">To the first task.<\/a><a class=\"qri\" href=\"javascript: qst_fhandle();\">Look\u00a0around\u00a0on\u00a0your\u00a0own.<\/a><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/><br \/><br \/><br \/><a class=\"qri\" href=\"javascript: qst_next('','skip');\">Play no tasks.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"intro\"><\/div>\n\t\t","number":null,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":1}
<?php } elseif($_SESSION['qst']== 1){
//Check one of Woodcutters is level 1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$woodL=$tRes['f1']+$tRes['f3']+$tRes['f14']+$tRes['f17'];
if ($woodL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 1: Woodcutter<\/h1><br \/><i>&bdquo;There are four green forests around your village. Construct a woodcutter on one of them. Lumber is an important resource for our new settlement.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a woodcutter.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"wood\"><\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 1: Woodcutter<\/h1><br \/><i>&bdquo;Yes, that way you gain more lumber.I helped a bit and completed the order instantly.&rdquo;<\/i><br \/><br \/><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/><div class=\"rew\"><p class=\"ta_aw\">Your reward:<\/p>Woodcutter instantly completed.<br \/><\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','2');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"wood\"><\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 2){
//Check one of Croplands is level 1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$cropL=$tRes['f2']+$tRes['f8']+$tRes['f9']+$tRes['f12']+$tRes['f13']+$tRes['f15'];
if ($cropL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 2: Crop<\/h1><br \/><i>&bdquo;Now your subjects are hungry from working all day. Extend a cropland to improve your subjects' supply. Come back here once the building is complete.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend one cropland.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"farm\"><\/div>\n\t\t","number":"-2","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 2: Crop<\/h1><br \/><i>&bdquo;Very good. Now your subjects have enough to eat again...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>10&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','3');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"farm\"><\/div>\n\t\t","number":2,"reward":{"plus":1},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 3){
//Check the village name is changed or is default name
$vName=$village->vname;
if ($vName==$session->userinfo['username']."'s village"){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/>Task 3: Your Village's Name<\/h1><br \/><i>&bdquo;Creative as you are you can grant your village the ultimate name.\r\n<br \/><br \/>\r\nClick on 'profile' in the left hand menu and then select 'change profile'...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Change your village's name to something nice.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"village_name\"><\/div>\n\t\t","number":"-3","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/>Task 3: Your Village's Name<\/h1><br \/><i>&bdquo;Wow, a great name for their village. It could have been the name of my village!...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>20&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','4');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"village_name\"><\/div>\n\t\t","number":3,"reward":{"wood":30,"clay":60,"iron":30,"crop":20},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 4){
// Compare real player rank with submited rank
$temp['uid']=$session->userinfo['id'];
$ranking->procRankReq($temp);
$displayarray = $database->getUserArray($temp['uid'],1);
$rRes=$ranking->searchRank($displayarray['username'],"username");
if ($rRes!=$rSubmited){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 4: Other Players<\/h1><br \/><i>&bdquo;In <?php echo SERVER_NAME; ?> you play along with billions of other players. Click 'statistics' in the top menu to look up your rank and enter it here.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Look for your rank in the statistics and enter it here.<\/div><br \/><input id=\"qst_val\" class=\"text\" type=\"text\" name=\"qstin\" \/> <input onclick=\"qst_next('','rank',document.getElementById('qst_val').value)\" type=\"button\" value=\"complete task\"\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"rank\"><\/div>\n\t\t","number":-4,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 4: Other Players<\/h1><br \/><i>„Exactly! That's your rank.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>40&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>20&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>30&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','5');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t","number":4,"reward":{"wood":40,"clay":30,"iron":20,"crop":30},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 5){
//Check one of Iron Mines and one of Clay Pites are level 1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=$tRes['f4']+$tRes['f7']+$tRes['f10']+$tRes['f11'];
$clayL=$tRes['f5']+$tRes['f6']+$tRes['f16']+$tRes['f18'];
if ($ironL<1 || $clayL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 5: Two Building Orders<\/h1><br \/><i>&bdquo;Build an iron mine and a clay pit. Of iron and clay one can never have enough.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p><ul><li>Extend one iron mine.<\/li><li>Extend one clay pit.<\/li><\/ul><\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"clay_iron\"><\/div>\n\t\t","number":-5,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 5: Two Building Orders<\/h1><br \/><i>&bdquo;As you noticed, building orders take rather long. The world of <?php echo SERVER_NAME; ?> will continue to spin even if you are offline. Even in a few months there will be many new things for you to discover.\r\n<br \/><br \/>\r\nThe best thing to do is occasionally checking your village and giving you subjects new tasks to do.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>30&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','6');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"clay_iron\"><\/div>\n\t\t","number":5,"reward":{"wood":50,"clay":60,"iron":30,"crop":30},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 6){
//Check message is viewed or no
if ($message->unread || $RB==true){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 6: Messages<\/h1><br \/><i>&bdquo;You can talk to other players using the messaging system. I sent a message to you. Read it and come back here.\r\n<br \/><br \/>\r\nP.S. Don't forget: on the left the reports, on the right the messages.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Read your new message.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"msg\"><\/div>\n\t\t","number":"-6","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"i2","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 6: Messages<\/h1><br \/><i>&bdquo;You received it? Very good.\r\n<br \/><br \/>\r\nHere is some Gold. With Gold you can do several things, e.g. extend your <b><font color=\"#71D000\">P<\/font><font color=\"#FF6F0F\">l<\/font><font color=\"#71D000\">u<\/font><font color=\"#FF6F0F\">s<\/font><\/b>-Account or increase your resource production.To do so click <a href=\"plus.php?id=3\"><font color=\"#000000\"><?php echo SERVER_NAME; ?><\/font> <b><font color=\"#71D000\">P<\/font><font color=\"#FF6F0F\">l<\/font><font color=\"#71D000\">u<\/font><font color=\"#FF6F0F\">s<\/font><\/b><\/a> in the left hand menu.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p>20 Gold<br \/><\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','7');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"msg\"><\/div>\n\t\t","number":6,"reward":{"gold":20},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 7){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 7: Huge Army!<\/h1><br \/><i>&bdquo;Now I've got a very special quest for you. I am hungry. Give me 200 crop!\r\n<br \/><br \/>\r\nIn return I will try to organize a huge army to protect your village.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Send 200 crop to the taskmaster.<\/div><br \/><img class=\"r4\" src=\"img\/x.gif\" title=\"Crop\" alt=\"Crop\" \/>200 <input type=\"hidden\" id=\"qst_val\" value=\"set\" \/><input onclick=\"javascript: qst_next('','8');\" name=\"qstin\" type=\"button\" value=\"Send crop.\" \/><br \/><font color='#FF0000'><?php if(isset($NoCrop)){echo $NoCrop;}?><font\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"army\"><\/div>\n\t\t","number":-8,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } elseif($_SESSION['qst']== 8){
//Check additional of each resource upgraded to lvl1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=0;$clayL=0;$woodL=0;$cropL=0;
if($tRes['f4']>0){$ironL++;};if($tRes['f7']>0){$ironL++;};if($tRes['f10']>0){$ironL++;};if($tRes['f11']>0){$ironL++;}
if($tRes['f5']>0){$clayL++;};if($tRes['f6']>0){$clayL++;};if($tRes['f16']>0){$clayL++;};if($tRes['f18']>0){$clayL++;}
if($tRes['f1']>0){$woodL++;};if($tRes['f3']>0){$woodL++;};if($tRes['f14']>0){$woodL++;};if($tRes['f17']>0){$woodL++;}
if($tRes['f2']>0){$cropL++;};if($tRes['f8']>0){$cropL++;};if($tRes['f9']>0){$cropL++;};if($tRes['f12']>0){$cropL++;};if($tRes['f13']>0){$cropL++;};if($tRes['f15']>0){$cropL++;}
if ($ironL<4 || $clayL<4 || $woodL<4 || $cropL<6){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/><?php echo $questc->q;?> Task 8: Everything to 1.<\/h1><br \/><i>&bdquo;Now we should increase your resource production a bit. Extend all your resource tiles to level 1.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend all resource tiles to level 1.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":-12,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 8: Everything to 1.<\/h1><br \/><i>&bdquo;Very good, your resource production just thrives.\r\n<br \/><br \/>\r\nSoon we can start with constructing buildings in the village.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>75&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>80&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>50&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','9');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":12,"reward":{"wood":75,"clay":80,"iron":30,"crop":50},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 9){
//Check player Descriptions for [#0]
$Dave= strrpos ($uArray['desc1'],'[#0]');
$Dave2=strrpos ($uArray['desc2'],'[#0]');
if (!is_numeric($Dave) and !is_numeric($Dave2)){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 9: Dove of Peace<\/h1><br \/><i>&bdquo;The first days after signing up you are protected against attacks by your fellow players. You can see how long this protection lasts by adding the code <b>[#0]<\/b> to your profile.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Write the code <b>[#0]<\/b> into your profile by adding it to one of the two description fields.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"medal\"><\/div>\n\t\t","number":"-13","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 9: Dove of Peace<\/h1><br \/><i>&bdquo;Well done! Now everyone can see what a great warrior the world is approached by.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>120&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>200&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>140&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>100&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','10');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"medal\"><\/div>\n\t\t","number":13,"reward":{"wood":120,"clay":200,"iron":140,"crop":100},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 10){
//Check cranny builded or no
$cranny = $building->getTypeLevel(23);
if ($cranny == 0){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 10: Cranny<\/h1><br \/><i>&bdquo;It's getting time to erect a cranny. The world of <?php echo SERVER_NAME; ?> is dangerous.\r\n<br \/><br \/>\r\nMany players live by stealing other players' resources. Build a cranny to hide some of your resources from enemies.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a Cranny.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"hide\"><\/div>\n\t\t","number":-14,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 10: Cranny<\/h1><br \/><i>&bdquo;Well done, now it's way harder for your mean fellow players to plunder your village.\r\n<br \/><br \/>\r\nIf under attack, your villagers will hide the resources in the Cranny all on their own.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>150&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>180&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>130&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','11');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"hide\"><\/div>\n\t\t","number":14,"reward":{"wood":150,"clay":180,"iron":30,"crop":130},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 11){
//Check one of each resource is lvl2 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=0;$clayL=0;$woodL=0;$cropL=0;
if($tRes['f4']>1){$ironL++;};if($tRes['f7']>1){$ironL++;};if($tRes['f10']>1){$ironL++;};if($tRes['f11']>1){$ironL++;}
if($tRes['f5']>1){$clayL++;};if($tRes['f6']>1){$clayL++;};if($tRes['f16']>1){$clayL++;};if($tRes['f18']>1){$clayL++;}
if($tRes['f1']>1){$woodL++;};if($tRes['f3']>1){$woodL++;};if($tRes['f14']>1){$woodL++;};if($tRes['f17']>1){$woodL++;}
if($tRes['f2']>1){$cropL++;};if($tRes['f8']>1){$cropL++;};if($tRes['f9']>1){$cropL++;};if($tRes['f12']>1){$cropL++;};if($tRes['f13']>1){$cropL++;};if($tRes['f15']>1){$cropL++;}
if ($ironL<1 || $clayL<1 || $woodL<1 || $cropL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 11: To Two.<\/h1><br \/><i>&bdquo;In <?php echo SERVER_NAME; ?> there is always something to do! Extend one woodcutter, one clay pit, one iron mine and one cropland to level 2 each.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend one of each resource tile to level 2.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":"-15","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 11: To Two.<\/h1><br \/><i>&bdquo;Very good, your village grows and thrives!&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>40&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>30&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','12');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":15,"reward":{"wood":60,"clay":50,"iron":40,"crop":30},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 12){
//Check player submited number Barracks cost lumber
if ($lSubmited!=210){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 12: Instructions<\/h1><br \/><i>&bdquo;In the ingame instructions you can find short information texts about different buildings and types of units.\r\n<br \/><br \/>\r\nClick on 'instructions' at the left to find out how much lumber is required for the barracks.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Enter how much lumber barracks cost<\/div><br \/><input id=\"qst_val\" class=\"text\" type=\"text\" name=\"qstin\" \/> <input onclick=\"qst_next('','lumber',document.getElementById('qst_val').value)\" type=\"button\" value=\"complete task\"\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"cost\"><\/div>\n\t\t","number":"-16","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 12: Instructions<\/h1><br \/><i>„Exactly! Barracks cost 210 lumber.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>20&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','13');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t","number":16,"reward":{"wood":50,"clay":30,"iron":60,"crop":20},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 13){
//Check main building lvl is 3 or upper
$mainbuilding = $building->getTypeLevel(15);
if ($mainbuilding<3){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 13: Main Building<\/h1><br \/><i>&bdquo;Your master builders need a main building level 3 to erect important buildings such as the marketplace or barracks.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend your main building to level 3.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"main\"><\/div>\n\t\t","number":-17,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 13: Main Building<\/h1><br \/><i>&bdquo;Well done. The main building level 3 has been completed.\r\n<br><br>\r\nWith this upgrade your master builders cannot only construct more types of buildings but also do so faster.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>75&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>75&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>40&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>40&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','14');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"main\"><\/div>\n\t\t","number":17,"reward":{"wood":75,"clay":75,"iron":40,"crop":40},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 14){
// Compare real player rank with submited rank
$temp['uid']=$session->userinfo['id'];
$ranking->procRankReq($temp);
$displayarray = $database->getUserArray($temp['uid'],1);
$rRes=$ranking->searchRank($displayarray['username'],"username");
if ($rRes!=$rSubmited){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 14: Advanced!<\/h1><br \/><i>&bdquo;Look up your rank in the player statistics again and enjoy your progress.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Look for your rank in the statistics and enter it here.<\/div><br \/><input id=\"qst_val\" class=\"text\" type=\"text\" name=\"qstin\" \/> <input onclick=\"qst_next('','rank',document.getElementById('qst_val').value)\" type=\"button\" value=\"complete task\"\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"rank\"><\/div>\n\t\t","number":"-18","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 14: Advanced!<\/h1><br \/><i>„Well done! That's your current rank.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\">100&nbsp;&nbsp;<img src=\"img/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\">90&nbsp;&nbsp;<img src=\"img/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\">100&nbsp;&nbsp;<img src=\"img/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\">60&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','15');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":18,"reward":{"wood":100,"clay":90,"iron":100,"crop":60},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 15){
// Ask from plyer ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Weapons or Dough<\/h1><br \/><i>&bdquo;Now you have to make a decision: Either trade peacefully or become a dreaded warrior.\r\n<br \/><br \/>\r\nFor the marketplace you need a granary, for the barracks you need a rally point.&rdquo;<\/i><br \/><br \/><input type=\"hidden\" id=\"qst_val\" value=\"\" \/><input onclick=\"javascript: qst_next('','19');\" type=\"button\" value=\"Economy\" class=\"qb1\"\/><input onclick=\"javascript: qst_next('','16');\" type=\"button\" value=\"Military\" class=\"qb2\" \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":"-19","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } elseif($_SESSION['qst']== 16){
// Checking rollypoint builded or no
$rallypoint = $building->getTypeLevel(16);
if ($rallypoint==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Military<\/h1><br \/><i>&bdquo;A brave decision. To be able to send troops you need a rally point.\r\n<br \/><br \/>\r\nThe rally point must be built on a specific building site. The <a href=\"build.php?id=39\">building site<\/a> is located on the right side of the main building, slightly below it. The building site itself is curved.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a rally point.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":"-19","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Military<\/h1><br \/><i>&bdquo;Your rally point has been erected! A good move towards world domination!&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>80&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>40&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','17');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":19,"reward":{"wood":80,"clay":90,"iron":60,"crop":40},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']==17){
// Checking barrack builded or no
$barrack = $building->getTypeLevel(19);
if ($barrack==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Barracks<\/h1><br \/><i>&bdquo;Now you have a main building level 3 and a rally point. That means that all prerequisites for building barracks have been fulfilled.\r\n<br><br>\r\nYou can use the barracks to train troops for fighting.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct barracks.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"barracks\"><\/div>\n\t\t","number":"-20","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Barracks<\/h1><br \/><i>&bdquo;Well done... The best instructors from the whole country have gathered to train your men\u2019s fighting skills to top form.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>70&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>100&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>100&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','18');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"barracks\"><\/div>\n\t\t","number":20,"reward":{"wood":70,"clay":100,"iron":90,"crop":100},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 18){
// Checking 2 warrior trained or no
$units = $village->unitall;
$unarray=array("","Legionnaire", "Clubswinger","Phalanx");
$unarray2=array("","u1", "u11","u21");
if ($units[$unarray2[$session->userinfo['tribe']]]<2){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Train.<\/h1><br \/><i>&bdquo;Now that you have barracks you can start training troops. Train two <?php echo $unarray[$session->userinfo['tribe']];?>.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Please train 2 <?php echo $unarray[$session->userinfo['tribe']];?>.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"units\"><\/div>\n\t\t","number":"-21","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Train.<\/h1><br \/><i>&bdquo;The foundation for your glorious army has been laid.<br \/><br \/>\r\nBefore sending your army off to plunder you should check with the <a href=\"warsim.php\">Combat-Simulator<\/a> to see how many troops you need to successfully fight one rat without losses.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>300&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>320&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>360&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>570&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','22');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"units\"><\/div>\n\t\t","number":21,"reward":{"wood":300,"clay":320,"iron":360,"crop":570},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 19){
// Checking granary builded or no
$granary = $building->getTypeLevel(11);
if ($granary ==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Economy <\/h1><br \/><i>&bdquo;„Trade & Economy was your choice. Golden times await you for sure!”<br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a Granary.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":"-19","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Economy <\/h1><br \/><i>&bdquo;Well done! With the Granary you can store more wheat.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>80&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>40&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','20');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":19,"reward":{"wood":80,"clay":90,"iron":60,"crop":40},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']==20){
// Checking warehouse builded or no
$warehouse = $building->getTypeLevel(10);
if ($warehouse==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Warehouse<\/h1><br \/><i>&bdquo;Not only Crop has to be saved. Other resources can go to waste as well if they are not stored correctly. Construct a Warehouse!&rdquo;\r\n<br><br>\r\n<\/i><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct Warehouse.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"warehouse\"><\/div>\n\t\t","number":"-20","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Warehouse<\/h1><br \/><i>&bdquo;Well done, your Warehouse is complete...&rdquo;<\/i><br \/>Now you have fulfilled all prerequisites required to construct a Marketplace.<br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>70&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>120&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>50&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','21');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"warehouse\"><\/div>\n\t\t","number":20,"reward":{"wood":70,"clay":120,"iron":90,"crop":50},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 21){
// Checking market builded or no
$market = $building->getTypeLevel(17);
if ($market==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Marketplace.<\/h1><br \/><i>&bdquo;Construct a Marketplace so you can trade with your fellow players.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Please build a Marketplace.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"market\"><\/div>\n\t\t","number":"-21","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Marketplace.<\/h1><br \/><i>&bdquo;The Marketplace has been completed. Now you can make offers of your own and accept foreign offers! When creating your own offers, you should think about offering what other players need most to get more profit.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>200&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>200&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>700&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>450&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','22');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"market\"><\/div>\n\t\t","number":21,"reward":{"wood":300,"clay":320,"iron":360,"crop":570},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 22){
// Checking all resource lvl are 2 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=0;$clayL=0;$woodL=0;$cropL=0;
if($tRes['f4']>1){$ironL++;};if($tRes['f7']>1){$ironL++;};if($tRes['f10']>1){$ironL++;};if($tRes['f11']>1){$ironL++;}
if($tRes['f5']>1){$clayL++;};if($tRes['f6']>1){$clayL++;};if($tRes['f16']>1){$clayL++;};if($tRes['f18']>1){$clayL++;}
if($tRes['f1']>1){$woodL++;};if($tRes['f3']>1){$woodL++;};if($tRes['f14']>1){$woodL++;};if($tRes['f17']>1){$woodL++;}
if($tRes['f2']>1){$cropL++;};if($tRes['f8']>1){$cropL++;};if($tRes['f9']>1){$cropL++;};if($tRes['f12']>1){$cropL++;};if($tRes['f13']>1){$cropL++;};if($tRes['f15']>1){$cropL++;}
if ($ironL<4 || $clayL<4 || $woodL<4 || $cropL<6){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 19: Everything to 2.<\/h1><br \/><i>&bdquo;Now it's time again to extend the cornerstones of might and wealth! This time level 1 is not enough... it will take a while but in the end it will be worth it. Extend all your resource tiles to level 2!&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend all resource tiles to level 2.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":"-22","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 19: Everything to 2.<\/h1><br \/><i>&bdquo;Congratulations! Your village grows and thrives...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p>15 Gold<br \/><\/div><br \/><span id=\"qst_accpt\"><a href=\"javascript: qst_next('','23');\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":22,"reward":{"gold":15},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
// End tasks message
<?php } elseif($_SESSION['qst']== 23){
$database->updateUserField($_SESSION['username'],'quest','24',0);
$_SESSION['qst']= 24; ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Tasks<\/h1><br \/><i>&bdquo;<?php if ($skiped==true){echo 'Tasks skpiped <br \/> Your reward: 25 Gold.' ;}else{echo 'All tasks achieved!';}?>&rdquo;<\/i><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"intro\"><\/div>\n\t\t","number":-25,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"i2","altstep":0}
<?php } else { ?>
<?php }}else{
if($_SESSION['qst']== 0){
?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Welcome to <?php echo SERVER_NAME; ?>!<\/h1><br \/><i>&bdquo;As I see you have been made chieftain of this little village. I will be your counselor for the first few days and never leave your (right hand) side.&rdquo;<\/i><br \/><br \/><span id=\"qst_accpt\"><a class=\"qle\" href=\"banned.php\">To the first task.<\/a><a class=\"qri\" href=\"banned.php\">Look\u00a0around\u00a0on\u00a0your\u00a0own.<\/a><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/><br \/><br \/><br \/><a class=\"qri\" href=\"banned.php\">Play no tasks.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"intro\"><\/div>\n\t\t","number":null,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":1}
<?php } elseif($_SESSION['qst']== 1){
//Check one of Woodcutters is level 1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$woodL=$tRes['f1']+$tRes['f3']+$tRes['f14']+$tRes['f17'];
if ($woodL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 1: Woodcutter<\/h1><br \/><i>&bdquo;There are four green forests around your village. Construct a woodcutter on one of them. Lumber is an important resource for our new settlement.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a woodcutter.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"wood\"><\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 1: Woodcutter<\/h1><br \/><i>&bdquo;Yes, that way you gain more lumber.I helped a bit and completed the order instantly.&rdquo;<\/i><br \/><br \/><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/><div class=\"rew\"><p class=\"ta_aw\">Your reward:<\/p>Woodcutter instantly completed.<br \/><\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"wood\"><\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 2){
//Check one of Croplands is level 1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$cropL=$tRes['f2']+$tRes['f8']+$tRes['f9']+$tRes['f12']+$tRes['f13']+$tRes['f15'];
if ($cropL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 2: Crop<\/h1><br \/><i>&bdquo;Now your subjects are hungry from working all day. Extend a cropland to improve your subjects' supply. Come back here once the building is complete.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend one cropland.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"farm\"><\/div>\n\t\t","number":"-2","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 2: Crop<\/h1><br \/><i>&bdquo;Very good. Now your subjects have enough to eat again...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>10&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"farm\"><\/div>\n\t\t","number":2,"reward":{"plus":1},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 3){
//Check the village name is changed or is default name
$vName=$village->vname;
if ($vName==$session->userinfo['username']."'s village"){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/>Task 3: Your Village's Name<\/h1><br \/><i>&bdquo;Creative as you are you can grant your village the ultimate name.\r\n<br \/><br \/>\r\nClick on 'profile' in the left hand menu and then select 'change profile'...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Change your village's name to something nice.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"village_name\"><\/div>\n\t\t","number":"-3","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/>Task 3: Your Village's Name<\/h1><br \/><i>&bdquo;Wow, a great name for their village. It could have been the name of my village!...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>20&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"village_name\"><\/div>\n\t\t","number":3,"reward":{"wood":30,"clay":60,"iron":30,"crop":20},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 4){
// Compare real player rank with submited rank
$temp['uid']=$session->userinfo['id'];
$ranking->procRankReq($temp);
$displayarray = $database->getUserArray($temp['uid'],1);
$rRes=$ranking->searchRank($displayarray['username'],"username");
if ($rRes!=$rSubmited){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 4: Other Players<\/h1><br \/><i>&bdquo;In <?php echo SERVER_NAME; ?> you play along with billions of other players. Click 'statistics' in the top menu to look up your rank and enter it here.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Look for your rank in the statistics and enter it here.<\/div><br \/><input id=\"qst_val\" class=\"text\" type=\"text\" name=\"qstin\" \/> <input onclick=\"banned.php\" type=\"button\" value=\"complete task\"\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"rank\"><\/div>\n\t\t","number":-4,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 4: Other Players<\/h1><br \/><i>„Exactly! That's your rank.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>40&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>20&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>30&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t","number":4,"reward":{"wood":40,"clay":30,"iron":20,"crop":30},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 5){
//Check one of Iron Mines and one of Clay Pites are level 1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=$tRes['f4']+$tRes['f7']+$tRes['f10']+$tRes['f11'];
$clayL=$tRes['f5']+$tRes['f6']+$tRes['f16']+$tRes['f18'];
if ($ironL<1 || $clayL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 5: Two Building Orders<\/h1><br \/><i>&bdquo;Build an iron mine and a clay pit. Of iron and clay one can never have enough.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p><ul><li>Extend one iron mine.<\/li><li>Extend one clay pit.<\/li><\/ul><\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"clay_iron\"><\/div>\n\t\t","number":-5,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 5: Two Building Orders<\/h1><br \/><i>&bdquo;As you noticed, building orders take rather long. The world of <?php echo SERVER_NAME; ?> will continue to spin even if you are offline. Even in a few months there will be many new things for you to discover.\r\n<br \/><br \/>\r\nThe best thing to do is occasionally checking your village and giving you subjects new tasks to do.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>30&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"clay_iron\"><\/div>\n\t\t","number":5,"reward":{"wood":50,"clay":60,"iron":30,"crop":30},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 6){
//Check message is viewed or no
if ($message->unread || $RB==true){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 6: Messages<\/h1><br \/><i>&bdquo;You can talk to other players using the messaging system. I sent a message to you. Read it and come back here.\r\n<br \/><br \/>\r\nP.S. Don't forget: on the left the reports, on the right the messages.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Read your new message.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"msg\"><\/div>\n\t\t","number":"-6","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"i2","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 6: Messages<\/h1><br \/><i>&bdquo;You received it? Very good.\r\n<br \/><br \/>\r\nHere is some Gold. With Gold you can do several things, e.g. extend your <b><font color=\"#71D000\">P<\/font><font color=\"#FF6F0F\">l<\/font><font color=\"#71D000\">u<\/font><font color=\"#FF6F0F\">s<\/font><\/b>-Account or increase your resource production.To do so click <a href=\"banned.php\"><font color=\"#000000\"><?php echo SERVER_NAME; ?><\/font> <b><font color=\"#71D000\">P<\/font><font color=\"#FF6F0F\">l<\/font><font color=\"#71D000\">u<\/font><font color=\"#FF6F0F\">s<\/font><\/b><\/a> in the left hand menu.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p>20 Gold<br \/><\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"msg\"><\/div>\n\t\t","number":6,"reward":{"gold":20},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 7){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 7: Huge Army!<\/h1><br \/><i>&bdquo;Now I've got a very special quest for you. I am hungry. Give me 200 crop!\r\n<br \/><br \/>\r\nIn return I will try to organize a huge army to protect your village.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Send 200 crop to the taskmaster.<\/div><br \/><img class=\"r4\" src=\"img\/x.gif\" title=\"Crop\" alt=\"Crop\" \/>200 <input type=\"hidden\" id=\"qst_val\" value=\"set\" \/><input onclick=\"banned.php\" name=\"qstin\" type=\"button\" value=\"Send crop.\" \/><br \/><font color='#FF0000'><?php if(isset($NoCrop)){echo $NoCrop;}?><font\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"army\"><\/div>\n\t\t","number":-8,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } elseif($_SESSION['qst']== 8){
//Check additional of each resource upgraded to lvl1 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=0;$clayL=0;$woodL=0;$cropL=0;
if($tRes['f4']>0){$ironL++;};if($tRes['f7']>0){$ironL++;};if($tRes['f10']>0){$ironL++;};if($tRes['f11']>0){$ironL++;}
if($tRes['f5']>0){$clayL++;};if($tRes['f6']>0){$clayL++;};if($tRes['f16']>0){$clayL++;};if($tRes['f18']>0){$clayL++;}
if($tRes['f1']>0){$woodL++;};if($tRes['f3']>0){$woodL++;};if($tRes['f14']>0){$woodL++;};if($tRes['f17']>0){$woodL++;}
if($tRes['f2']>0){$cropL++;};if($tRes['f8']>0){$cropL++;};if($tRes['f9']>0){$cropL++;};if($tRes['f12']>0){$cropL++;};if($tRes['f13']>0){$cropL++;};if($tRes['f15']>0){$cropL++;}
if ($ironL<4 || $clayL<4 || $woodL<4 || $cropL<6){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/><?php echo $questc->q;?> Task 8: Everything to 1.<\/h1><br \/><i>&bdquo;Now we should increase your resource production a bit. Extend all your resource tiles to level 1.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend all resource tiles to level 1.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":-12,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 8: Everything to 1.<\/h1><br \/><i>&bdquo;Very good, your resource production just thrives.\r\n<br \/><br \/>\r\nSoon we can start with constructing buildings in the village.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>75&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>80&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>50&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":12,"reward":{"wood":75,"clay":80,"iron":30,"crop":50},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 9){
//Check player Descriptions for [#0]
$Dave= strrpos ($uArray['desc1'],'[#0]');
$Dave2=strrpos ($uArray['desc2'],'[#0]');
if (!is_numeric($Dave) and !is_numeric($Dave2)){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 9: Dove of Peace<\/h1><br \/><i>&bdquo;The first days after signing up you are protected against attacks by your fellow players. You can see how long this protection lasts by adding the code <b>[#0]<\/b> to your profile.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Write the code <b>[#0]<\/b> into your profile by adding it to one of the two description fields.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"medal\"><\/div>\n\t\t","number":"-13","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 9: Dove of Peace<\/h1><br \/><i>&bdquo;Well done! Now everyone can see what a great warrior the world is approached by.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>120&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>200&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>140&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>100&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"medal\"><\/div>\n\t\t","number":13,"reward":{"wood":120,"clay":200,"iron":140,"crop":100},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 10){
//Check cranny builded or no
$cranny = $building->getTypeLevel(23);
if ($cranny == 0){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 10: Cranny<\/h1><br \/><i>&bdquo;It's getting time to erect a cranny. The world of <?php echo SERVER_NAME; ?> is dangerous.\r\n<br \/><br \/>\r\nMany players live by stealing other players' resources. Build a cranny to hide some of your resources from enemies.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a Cranny.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"hide\"><\/div>\n\t\t","number":-14,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 10: Cranny<\/h1><br \/><i>&bdquo;Well done, now it's way harder for your mean fellow players to plunder your village.\r\n<br \/><br \/>\r\nIf under attack, your villagers will hide the resources in the Cranny all on their own.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>150&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>180&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>130&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"hide\"><\/div>\n\t\t","number":14,"reward":{"wood":150,"clay":180,"iron":30,"crop":130},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 11){
//Check one of each resource is lvl2 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=0;$clayL=0;$woodL=0;$cropL=0;
if($tRes['f4']>1){$ironL++;};if($tRes['f7']>1){$ironL++;};if($tRes['f10']>1){$ironL++;};if($tRes['f11']>1){$ironL++;}
if($tRes['f5']>1){$clayL++;};if($tRes['f6']>1){$clayL++;};if($tRes['f16']>1){$clayL++;};if($tRes['f18']>1){$clayL++;}
if($tRes['f1']>1){$woodL++;};if($tRes['f3']>1){$woodL++;};if($tRes['f14']>1){$woodL++;};if($tRes['f17']>1){$woodL++;}
if($tRes['f2']>1){$cropL++;};if($tRes['f8']>1){$cropL++;};if($tRes['f9']>1){$cropL++;};if($tRes['f12']>1){$cropL++;};if($tRes['f13']>1){$cropL++;};if($tRes['f15']>1){$cropL++;}
if ($ironL<1 || $clayL<1 || $woodL<1 || $cropL<1){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 11: To Two.<\/h1><br \/><i>&bdquo;In <?php echo SERVER_NAME; ?> there is always something to do! Extend one woodcutter, one clay pit, one iron mine and one cropland to level 2 each.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend one of each resource tile to level 2.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":"-15","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 11: To Two.<\/h1><br \/><i>&bdquo;Very good, your village grows and thrives!&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>40&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>30&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":15,"reward":{"wood":60,"clay":50,"iron":40,"crop":30},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 12){
//Check player submited number Barracks cost lumber
if ($lSubmited!=210){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 12: Instructions<\/h1><br \/><i>&bdquo;In the ingame instructions you can find short information texts about different buildings and types of units.\r\n<br \/><br \/>\r\nClick on 'instructions' at the left to find out how much lumber is required for the barracks.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Enter how much lumber barracks cost<\/div><br \/><input id=\"qst_val\" class=\"text\" type=\"text\" name=\"qstin\" \/> <input onclick=\"banned.php\" type=\"button\" value=\"complete task\"\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"cost\"><\/div>\n\t\t","number":"-16","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 12: Instructions<\/h1><br \/><i>„Exactly! Barracks cost 210 lumber.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>50&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>30&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>20&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t","number":16,"reward":{"wood":50,"clay":30,"iron":60,"crop":20},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 13){
//Check main building lvl is 3 or upper
$mainbuilding = $building->getTypeLevel(15);
if ($mainbuilding<3){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 13: Main Building<\/h1><br \/><i>&bdquo;Your master builders need a main building level 3 to erect important buildings such as the marketplace or barracks.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend your main building to level 3.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"main\"><\/div>\n\t\t","number":-17,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 13: Main Building<\/h1><br \/><i>&bdquo;Well done. The main building level 3 has been completed.\r\n<br><br>\r\nWith this upgrade your master builders cannot only construct more types of buildings but also do so faster.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>75&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>75&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>40&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>40&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"main\"><\/div>\n\t\t","number":17,"reward":{"wood":75,"clay":75,"iron":40,"crop":40},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 14){
// Compare real player rank with submited rank
$temp['uid']=$session->userinfo['id'];
$ranking->procRankReq($temp);
$displayarray = $database->getUserArray($temp['uid'],1);
$rRes=$ranking->searchRank($displayarray['username'],"username");
if ($rRes!=$rSubmited){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 14: Advanced!<\/h1><br \/><i>&bdquo;Look up your rank in the player statistics again and enjoy your progress.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Look for your rank in the statistics and enter it here.<\/div><br \/><input id=\"qst_val\" class=\"text\" type=\"text\" name=\"qstin\" \/> <input onclick=\"banned.php\" type=\"button\" value=\"complete task\"\/><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"rank\"><\/div>\n\t\t","number":"-18","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 14: Advanced!<\/h1><br \/><i>„Well done! That's your current rank.”<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\">100&nbsp;&nbsp;<img src=\"img/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\">90&nbsp;&nbsp;<img src=\"img/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\">100&nbsp;&nbsp;<img src=\"img/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\">60&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":18,"reward":{"wood":100,"clay":90,"iron":100,"crop":60},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }?>
<?php } elseif($_SESSION['qst']== 15){
// Ask from plyer ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Weapons or Dough<\/h1><br \/><i>&bdquo;Now you have to make a decision: Either trade peacefully or become a dreaded warrior.\r\n<br \/><br \/>\r\nFor the marketplace you need a granary, for the barracks you need a rally point.&rdquo;<\/i><br \/><br \/><input type=\"hidden\" id=\"qst_val\" value=\"\" \/><input onclick=\"banned.php\" type=\"button\" value=\"Economy\" class=\"qb1\"\/><input onclick=\"banned.php\" type=\"button\" value=\"Military\" class=\"qb2\" \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":"-19","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } elseif($_SESSION['qst']== 16){
// Checking rollypoint builded or no
$rallypoint = $building->getTypeLevel(16);
if ($rallypoint==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Military<\/h1><br \/><i>&bdquo;A brave decision. To be able to send troops you need a rally point.\r\n<br \/><br \/>\r\nThe rally point must be built on a specific building site. The <a href=\"banned.php\">building site<\/a> is located on the right side of the main building, slightly below it. The building site itself is curved.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a rally point.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":"-19","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Military<\/h1><br \/><i>&bdquo;Your rally point has been erected! A good move towards world domination!&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>80&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>40&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":19,"reward":{"wood":80,"clay":90,"iron":60,"crop":40},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']==17){
// Checking barrack builded or no
$barrack = $building->getTypeLevel(19);
if ($barrack==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Barracks<\/h1><br \/><i>&bdquo;Now you have a main building level 3 and a rally point. That means that all prerequisites for building barracks have been fulfilled.\r\n<br><br>\r\nYou can use the barracks to train troops for fighting.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct barracks.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"barracks\"><\/div>\n\t\t","number":"-20","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Barracks<\/h1><br \/><i>&bdquo;Well done... The best instructors from the whole country have gathered to train your men\u2019s fighting skills to top form.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>70&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>100&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>100&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"barracks\"><\/div>\n\t\t","number":20,"reward":{"wood":70,"clay":100,"iron":90,"crop":100},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 18){
// Checking 2 warrior trained or no
$units = $village->unitall;
$unarray=array("","Legionnaire", "Clubswinger","Phalanx");
$unarray2=array("","u1", "u11","u21");
if ($units[$unarray2[$session->userinfo['tribe']]]<2){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Train.<\/h1><br \/><i>&bdquo;Now that you have barracks you can start training troops. Train two <?php echo $unarray[$session->userinfo['tribe']];?>.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Please train 2 <?php echo $unarray[$session->userinfo['tribe']];?>.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"units\"><\/div>\n\t\t","number":"-21","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Train.<\/h1><br \/><i>&bdquo;The foundation for your glorious army has been laid.<br \/><br \/>\r\nBefore sending your army off to plunder you should check with the <a href=\"banned.php\">Combat-Simulator<\/a> to see how many troops you need to successfully fight one rat without losses.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>300&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>320&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>360&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>570&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"units\"><\/div>\n\t\t","number":21,"reward":{"wood":300,"clay":320,"iron":360,"crop":570},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 19){
// Checking granary builded or no
$granary = $building->getTypeLevel(11);
if ($granary ==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Economy <\/h1><br \/><i>&bdquo;„Trade & Economy was your choice. Golden times await you for sure!”<br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct a Granary.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":"-19","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 16: Economy <\/h1><br \/><i>&bdquo;Well done! With the Granary you can store more wheat.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>80&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>60&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>40&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"granary_rally\"><\/div>\n\t\t","number":19,"reward":{"wood":80,"clay":90,"iron":60,"crop":40},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']==20){
// Checking warehouse builded or no
$warehouse = $building->getTypeLevel(10);
if ($warehouse==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Warehouse<\/h1><br \/><i>&bdquo;Not only Crop has to be saved. Other resources can go to waste as well if they are not stored correctly. Construct a Warehouse!&rdquo;\r\n<br><br>\r\n<\/i><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Construct Warehouse.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"warehouse\"><\/div>\n\t\t","number":"-20","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 17: Warehouse<\/h1><br \/><i>&bdquo;Well done, your Warehouse is complete...&rdquo;<\/i><br \/>Now you have fulfilled all prerequisites required to construct a Marketplace.<br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>70&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>120&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>90&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>50&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"warehouse\"><\/div>\n\t\t","number":20,"reward":{"wood":70,"clay":120,"iron":90,"crop":50},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 21){
// Checking market builded or no
$market = $building->getTypeLevel(17);
if ($market==0){ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Marketplace.<\/h1><br \/><i>&bdquo;Construct a Marketplace so you can trade with your fellow players.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Please build a Marketplace.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"market\"><\/div>\n\t\t","number":"-21","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 18: Marketplace.<\/h1><br \/><i>&bdquo;The Marketplace has been completed. Now you can make offers of your own and accept foreign offers! When creating your own offers, you should think about offering what other players need most to get more profit.&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p><img src=\"img\/x.gif\" class=\"r1\" alt=\"Lumber\" title=\"Lumber\" \/>200&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" \/>200&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" \/>700&nbsp;&nbsp;<img src=\"img\/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" \/>450&nbsp;&nbsp;<\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"market\"><\/div>\n\t\t","number":21,"reward":{"wood":300,"clay":320,"iron":360,"crop":570},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
<?php } elseif($_SESSION['qst']== 22){
// Checking all resource lvl are 2 or upper
$tRes = $database->getResourceLevel($session->villages[0]);
$ironL=0;$clayL=0;$woodL=0;$cropL=0;
if($tRes['f4']>1){$ironL++;};if($tRes['f7']>1){$ironL++;};if($tRes['f10']>1){$ironL++;};if($tRes['f11']>1){$ironL++;}
if($tRes['f5']>1){$clayL++;};if($tRes['f6']>1){$clayL++;};if($tRes['f16']>1){$clayL++;};if($tRes['f18']>1){$clayL++;}
if($tRes['f1']>1){$woodL++;};if($tRes['f3']>1){$woodL++;};if($tRes['f14']>1){$woodL++;};if($tRes['f17']>1){$woodL++;}
if($tRes['f2']>1){$cropL++;};if($tRes['f8']>1){$cropL++;};if($tRes['f9']>1){$cropL++;};if($tRes['f12']>1){$cropL++;};if($tRes['f13']>1){$cropL++;};if($tRes['f15']>1){$cropL++;}
if ($ironL<4 || $clayL<4 || $woodL<4 || $cropL<6){?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 19: Everything to 2.<\/h1><br \/><i>&bdquo;Now it's time again to extend the cornerstones of might and wealth! This time level 1 is not enough... it will take a while but in the end it will be worth it. Extend all your resource tiles to level 2!&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\">Order:<\/p>Extend all resource tiles to level 2.<\/div><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":"-22","reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php }else{ ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Task 19: Everything to 2.<\/h1><br \/><i>&bdquo;Congratulations! Your village grows and thrives...&rdquo;<\/i><br \/><br \/><div class=\"rew\"><p class=\"ta_aw\"><input type=\"hidden\" id=\"qst_val\" value=\"2\" \/>Your reward:<\/p>15 Gold<br \/><\/div><br \/><span id=\"qst_accpt\"><a href=\"banned.php\">Continue with the next task.<\/a><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"allres\"><\/div>\n\t\t","number":22,"reward":{"gold":15},"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>g","msrc":"<?php echo $messagelol; ?>","altstep":0}
<?php } ?>
// End tasks message
<?php } elseif($_SESSION['qst']== 23){
$database->updateUserField($_SESSION['username'],'quest','24',0);
$_SESSION['qst']= 24; ?>
{"markup":"\n\t\t<div id=\"qstd\"><h1> <img class=\"point\" src=\"img\/x.gif\" alt=\"\" title=\"\"\/> Tasks<\/h1><br \/><i>&bdquo;<?php if ($skiped==true){echo 'Tasks skpiped <br \/> Your reward: 25 Gold.' ;}else{echo 'All tasks achieved!';}?>&rdquo;<\/i><br \/><span id=\"qst_accpt\"><\/span><\/div>\n\t\t<div id=\"qstbg\" class=\"intro\"><\/div>\n\t\t","number":-25,"reward":false,"qgsrc":"q_l<?php echo $session->userinfo['tribe'];?>","msrc":"i2","altstep":0}
<?php } else { ?>
<?php }} ?>
+186
View File
@@ -0,0 +1,186 @@
<!-- //////////////// made by TTMTT //////////////// -->
<?php
if($session->access!=BANNED){
?>
<script language="JavaScript" type="text/javascript">
function showCheckList() {
bid = document.getElementById('bid');
if(bid.value == 2) {
document.getElementById('conf_list').className = '';
document.getElementById('ally_list').className = '';
document.getElementById('user_list').className = 'hide';
}
else if (bid.value == 3) {
document.getElementById('conf_list').className = 'hide';
document.getElementById('ally_list').className = 'hide';
document.getElementById('user_list').className = '';
}
else {
document.getElementById('conf_list').className = 'hide';
document.getElementById('ally_list').className = 'hide';
document.getElementById('user_list').className = 'hide';
}
}
</script>
<script language="JavaScript" type="text/javascript">
function addRow(element_id) {
// element_id: user_list, ally_list
liste = document.getElementById(element_id);
liste = liste.getElementsByTagName('tbody')[0];
var anzahl_trs = liste.getElementsByTagName('tr').length;
var num_fields = anzahl_trs;
var num_last_tr = anzahl_trs -1;
lastTR = liste.getElementsByTagName('tr')[num_last_tr];
lastTD = lastTR.getElementsByTagName('td')[2];
lastIMG = lastTD.getElementsByTagName('img')[0];
lastTD.removeChild(lastIMG);
newTR = document.createElement('tr');
newTD1 = document.createElement('td');
newTD2 = document.createElement('td');
newTD3 = document.createElement('td');
newTR.appendChild(newTD1);
newTR.appendChild(newTD2);
newTR.appendChild(newTD3);
liste.appendChild(newTR);
var html_input_1 = '<input class="text" type="text" ';
if(element_id == 'ally_list') {
newTD1.className = 'ally';
newTD2.className = 'tag';
newTD3.className = 'ad';
newTD1.innerHTML = html_input_1 + 'id="allys_by_id_'+num_fields+'" class="text" maxlength="8" name="allys_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
newTD2.innerHTML = html_input_1 + 'id="allys_by_name_'+num_fields+'" class="text" maxlength="8" name="allys_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
}
if(element_id == 'user_list') {
newTD1.className = 'id';
newTD2.className = 'pla';
newTD3.className = 'ad';
newTD1.innerHTML = html_input_1 + 'id="users_by_id_'+num_fields+'" class="text" maxlength="8" name="users_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
newTD2.innerHTML = html_input_1 + 'id="users_by_name_'+num_fields+'" class="text" maxlength="15" name="users_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
}
newTD3.innerHTML = '<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow(\''+element_id+'\')">';
}
</script>
<script language="JavaScript" type="text/javascript">
function checkInputs(id, typ) {
id_field = document.getElementById(typ+'_by_id_'+id);
name_field = document.getElementById(typ+'_by_name_'+id);
//alert(id_field.value);
//alert(name_field.value);
if (id_field.value != '' && id_field.disabled == false) {
name_field.disabled = true;
name_field.style.border = '1px solid #999';
}
else {
name_field.disabled = false;
name_field.style.border = '1px solid #71D000';
}
if (name_field.value != '' && name_field.disabled == false) {
id_field.disabled = true;
id_field.style.border = '1px solid #999';
}
else {
id_field.disabled = false;
id_field.style.border = '1px solid #71D000';
}
}
</script><form method="post" action="allianz.php?s=2">
<input type="hidden" name="new" value="1">
<input type="hidden" name="newforum" value="1">
<input type="hidden" name="admin" value="1">
<table cellpadding="1" cellspacing="1" id="new_forum"><thead>
<tr>
<th colspan="2">New forum</th>
</tr>
</thead><tbody>
<tr>
<th>Forum name</th>
<td><input class="text" type="text" name="u1" value="" maxlength="20"></td>
</tr>
<tr>
<th>Description</th>
<td><input class="text" type="text" name="u2" value="" maxlength="38"></td>
</tr>
<tr>
<th>Forum type</th>
<td><select class="dropdown" id="bid" name="bid" onchange="showCheckList();"><option value="1">Public Forum</option><option value="2">Confederation Forum</option><option value="0"selected>Alliance Forum</option><option value="3">Closed Forum</option></select></td>
</tr>
</tbody></table><table cellpadding="1" cellspacing="1" id="ally_list"><thead>
<tr>
<th colspan="3">Open for more alliances</th>
</tr>
<tr>
<td>Alliance ID</td>
<td>Tag:</td>
<td>Add</td>
</tr>
</thead><tbody>
<tr>
<td class="ally">
<input class="text" type="text" id="allys_by_id_0" maxlength="8" name="allys_by_id[0]" onkeyup="checkInputs(0,'allys');" />
</td>
<td class="tag">
<input class="text" type="text" id="allys_by_name_0" maxlength="8" name="allys_by_name[0]" onkeyup="checkInputs(0,'allys');" />
</td>
<td class="ad">
<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow('ally_list')" />
</td>
</tr>
</table><table cellpadding="1" cellspacing="1" id="user_list"><thead>
<tr>
<th colspan="3">Open forum for the following players</th>
</tr>
<tr>
<td>User ID</td>
<td>Name:</td>
<td>Add</td>
</tr>
</thead><tbody>
<tr>
<td class="id">
<input class="text" type="text" id="users_by_id_0" maxlength="8" name="users_by_id[0]" onkeyup="checkInputs(0,'users');" />
</td>
<td class="pla">
<input class="text" type="text" id="users_by_name_0" maxlength="15" name="users_by_name[0]" onkeyup="checkInputs(0,'users');" />
</td>
<td class="ad">
<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow('user_list')" />
</td>
</tr>
</tbody></table>
<script language="JavaScript" type="text/javascript">
showCheckList();
</script>
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></p></form>
<?php }else{
header("Location: banned.php");
}
?>
File diff suppressed because one or more lines are too long
+211
View File
@@ -0,0 +1,211 @@
<?php
//////////////// made by TTMTT ////////////////
if($session->access!=BANNED){
$displayarray = $database->getUserArray($session->uid,1);
$forumcat = $database->ForumCat(htmlspecialchars($displayarray['alliance']));
$forum_cat = $database->ForumCat;
?>
<table cellpadding="1" cellspacing="1" id="public"><thead>
<tr>
<th colspan="4">Public Forum</th>
</tr>
<tr>
<td></td>
<td>Forum name</td>
<td>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</td>
</tr></thead><tbody>
<?php
foreach($forumcat as $arr) {
if($arr['forum_area']==1){
$countop = $database->CountCat($arr['id']);
$ltopic = $database->LastTopic($arr['id']);
foreach($ltopic as $las) {
}
$lpos = $database->LastPost($las['id']);
foreach($lpos as $pos) {
}
if($database->CheckLastTopic($arr['id'])){
if($database->CheckLastPost($las['id'])){
$lpost = date('m/d/y H:i a',$pos['date']);
$owner = $database->getUserArray($pos['owner'],1);
}else{
$lpost = date('m/d/y H:i a',$las[date]);
$owner = $database->getUserArray($las['owner'],1);
}
}else{
$lpost = "";
$owner = "";
}
echo '<tr><td class="ico">';
if($database->CheckEditRes($aid)=="1"){
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
}else{
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
}
echo '</td><td class="tit"><a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
<td class="cou">'.$countop.'</td>
<td class="last">'.$lpost.'</span><span><br /><a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></td>
</tr>';
}
}
?>
</tbody></table>
<table cellpadding="1" cellspacing="1" id="confederation"><thead>
<tr>
<th colspan="4">Confederation Forum</th>
</tr>
<tr>
<td></td>
<td>Forum name</td>
<td>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</td>
</tr></thead><tbody>
<?php
foreach($forumcat as $arr) {
if($arr['forum_area']==2){
$countop = $database->CountCat($arr['id']);
$ltopic = $database->LastTopic($arr['id']);
foreach($ltopic as $las) {
}
$lpos = $database->LastPost($las['id']);
foreach($lpos as $pos) {
}
if($database->CheckLastTopic($arr['id'])){
if($database->CheckLastPost($las['id'])){
$lpost = date('m/d/y H:i a',$pos['date']);
$owner = $database->getUserArray($pos['owner'],1);
}else{
$lpost = date('m/d/y H:i a',$las[date]);
$owner = $database->getUserArray($las['owner'],1);
}
}else{
$lpost = "";
$owner = "";
}
echo '<tr><td class="ico">';
if($database->CheckEditRes($aid)=="1"){
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
}else{
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
}
echo '</td><td class="tit"><a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
<td class="cou">'.$countop.'</td>
<td class="last">'.$lpost.'</span><span><br /><a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></td>
</tr>';
}
}
?>
</tbody></table>
<table cellpadding="1" cellspacing="1" id="alliance"><thead>
<tr>
<th colspan="4">Alliance Forum</th>
</tr>
<tr>
<td></td>
<td>Forum name</td>
<td>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</td>
</tr></thead><tbody>
<?php
foreach($forumcat as $arr) {
if($arr['forum_area']==0){
$countop = $database->CountCat($arr['id']);
$ltopic = $database->LastTopic($arr['id']);
foreach($ltopic as $las) {
}
$lpos = $database->LastPost($las['id']);
foreach($lpos as $pos) {
}
if($database->CheckLastTopic($arr['id'])){
if($database->CheckLastPost($las['id'])){
$lpost = date('m/d/y H:i a',$pos['date']);
$owner = $database->getUserArray($pos['owner'],1);
}else{
$lpost = date('m/d/y H:i a',$las[date]);
$owner = $database->getUserArray($las['owner'],1);
}
}else{
$lpost = "";
$owner = "";
}
echo '<tr><td class="ico">';
if($database->CheckEditRes($aid)=="1"){
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
}else{
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
}
echo '</td><td class="tit"><a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
<td class="cou">'.$countop.'</td>
<td class="last">'.$lpost.'</span><span><br /><a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></td>
</tr>';
}
}
?>
</tbody></table>
<table cellpadding="1" cellspacing="1" id="closed"><thead>
<tr>
<th colspan="4">Closed Forum</th>
</tr>
<tr>
<td></td>
<td>Forum name</td>
<td>&nbsp;Threads&nbsp;</td>
<td>&nbsp;Last post&nbsp;</td>
</tr></thead><tbody>
<?php
foreach($forumcat as $arr) {
if($arr['forum_area']==3){
$countop = $database->CountCat($arr['id']);
$ltopic = $database->LastTopic($arr['id']);
foreach($ltopic as $las) {
}
$lpos = $database->LastPost($las['id']);
foreach($lpos as $pos) {
}
if($database->CheckLastTopic($arr['id'])){
if($database->CheckLastPost($las['id'])){
$lpost = date('m/d/y H:i a',$pos['date']);
$owner = $database->getUserArray($pos['owner'],1);
}else{
$lpost = date('m/d/y H:i a',$las[date]);
$owner = $database->getUserArray($las['owner'],1);
}
}else{
$lpost = "";
$owner = "";
}
echo '<tr><td class="ico">';
if($database->CheckEditRes($aid)=="1"){
echo '<a class="up_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=-1" title="To top"><img src="img/x.gif" alt="To top" /></a><a class="edit" href="allianz.php?s=2&idf='.$arr['id'].'&admin=editforum" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="down_arr" href="allianz.php?s=2&fid='.$arr['id'].'&bid=0&admin=pos&res=1" title="To bottom"><img src="img/x.gif" alt="To bottom" /></a><a class="fdel" href="allianz.php?s=2&idf='.$arr['id'].'&admin=delforum" onClick="return confirm(\'confirm delete?\');" title="delete"><img src="img/x.gif" alt="delete" /></a>';
}else{
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
}
echo '</td><td class="tit"><a href="allianz.php?s=2&fid='.$arr['id'].'&pid='.$aid.'" title="'.$arr['forum_name'].'">'.$arr['forum_name'].'</a><br />'.$arr['forum_des'].'</td>
<td class="cou">'.$countop.'</td>
<td class="last">'.$lpost.'</span><span><br /><a href="spieler.php?uid='.$owner['id'].'">'.$owner['username'].'</a> <img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></td>
</tr>';
}
}
?>
</tbody></table><p>
<?php
$opt = $database->getAlliPermissions($session->uid, $aid);
if($opt['opt5'] == 1){
echo '<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a>
<a href="allianz.php?s='.$ids.'&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
}
?>
</p>
<?php }else{
header("Location: banned.php");
}
?>
+46
View File
@@ -0,0 +1,46 @@
<?php
//////////////// made by TTMTT ////////////////
if($session->access!=BANNED){
$topic_id = $_GET['idt'];
$show_topic = $database->ShowTopic($topic_id);
foreach($show_topic as $topi) {
$title = $topi['title'];
}
?>
<form method="post" action="allianz.php?s=2&fid=<?php echo $_GET['idf']; ?>&pid=<?php echo $aid; ?>">
<input type="hidden" name="s" value="2">
<input type="hidden" name="tid" value="<?php echo $topic_id; ?>">
<input type="hidden" name="edittopic" value="1">
<table cellpadding="1" cellspacing="1" id="edit_topic"><thead>
<tr>
<th colspan="2">Edit topic</td>
</tr>
</thead><tbody>
<tr>
<th>Thread</th>
<td><input class="text" type="Text" name="thema" value="<?php echo $title; ?>" maxlength="35"></td>
</tr>
<tr>
<th>Move topic</td>
<td><select class="dropdown" name="fid">
<?php
$show_cat = $database->ForumCat();
foreach($show_cat as $cats) {
if($cats['id'] == $_GET['idf']){
echo '<option value="'.$cats['id'].'" selected>'.$cats['forum_name'].'</option>';
}else{
echo '<option value="'.$cats['id'].'">'.$cats['forum_name'].'</option>';
}
}
?>
</select></td>
</tr>
</tbody></table>
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<?php }else{
header("Location: banned.php");
}
?>
+107
View File
@@ -0,0 +1,107 @@
<?php
//////////////// made by TTMTT ////////////////
if($session->access!=BANNED){
$cat_id = $_GET['fid'];
$CatName = $database->ForumCatName($cat_id);
$ChckTopic = $database->CheckCatTopic($cat_id);
$Topics = $database->ForumCatTopic($cat_id);
$TopicsStick = $database->ForumCatTopicStick($cat_id);
?>
<h4><a href="allianz.php?s=2">Alliance</a> -> <a href="allianz.php?s=2&pid=<?php echo $_GET['pid']; ?>&fid=<?php echo $cat_id; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="topics"><thead>
<tr>
<th colspan="4"><?php echo $CatName; ?></th>
</tr>
<tr>
<td></td>
<td>Threads</td>
<td>Replies</td>
<td>Last post</td>
</tr></thead><tbody>
<?php
if($ChckTopic){
foreach($TopicsStick as $arrs) {
$CountPosts = $database->CountPost($arrs['id']);
$lposts = $database->LastPost($arrs['id']);
foreach($lposts as $post) {
}
if($database->CheckLastPost($arrs[id])){
$post_dates = date('m/d/y, H:i a',$post['date']);
$owner_topics = $database->getUserArray($post['owner'],1);
}else{
$post_dates = date('m/d/y, H:i a',$arrs['date']);
$owner_topics = $database->getUserArray($arrs['owner'],1);
}
echo '<tr><td class="ico">';
if($database->CheckEditRes($aid)=="1"){
if($database->CheckCloseTopic($arrs['id']) == 1){
$locks = '<a class="unlock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unlock" title="open topic"><img src="img/x.gif" alt="open topic" /></a>';
}else{
$locks = '<a class="lock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=lock" title="close topic"><img src="img/x.gif" alt="close topic" /></a>';
}
echo ''.$locks.'<a class="edit" href="?s=2&idf='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="unpin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=unpin" title="stick topic"><img src="img/x.gif" alt="stick topic" /></a><a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arrs['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
}elseif($arrs['close']=="1"){
echo '<img class="folder_sticky_lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
}else{
echo '<img class="folder_sticky" src="img/x.gif" alt="Important Thread without new posts" title="Important Thread without new posts" />';
}
echo '</td>
<td class="tit"><a href="allianz.php?s=2&pid='.$aid.'&tid='.$arrs['id'].'">'.$arrs['title'].'</a><br></td>
<td class="cou">'.$CountPosts.'</td>
<td class="last">'.$post_dates.'<br /><a href="spieler.php?uid='.$arrs[owner].'">'.$owner_topics['username'].'</a> <a href="allianz.php?s=2&pid='.$aid.'&tid='.$arrs['id'].'&seite=max"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
</td></tr>';
}
foreach($Topics as $arr) {
$CountPost = $database->CountPost($arr['id']);
$lpost = $database->LastPost($arr['id']);
foreach($lpost as $pos) {
}
if($database->CheckLastPost($arr['id'])){
$post_date = date('m/d/y, H:i a',$pos['date']);
$owner_topic = $database->getUserArray($pos['owner'],1);
}else{
$post_date = date('m/d/y, H:i a',$arr['date']);
$owner_topic = $database->getUserArray($arr['owner'],1);
}
echo '<tr><td class="ico">';
if($database->CheckEditRes($aid)=="1"){
if($database->CheckCloseTopic($arr['id']) == 1){
$lock = '<a class="unlock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=unlock" title="open topic"><img src="img/x.gif" alt="open topic" /></a>';
}else{
$lock = '<a class="lock" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=lock" title="close topic"><img src="img/x.gif" alt="close topic" /></a>';
}
echo ''.$lock.'<a class="edit" href="?s=2&idf='.$_GET['fid'].'&idt='.$arr['id'].'&admin=edittopic" title="edit"><img src="img/x.gif" alt="edit" /></a><br /><a class="pin" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=pin" title="stick topic"><img src="img/x.gif" alt="stick topic" /></a><a class="fdel" href="?s=2&fid='.$_GET['fid'].'&idt='.$arr['id'].'&admin=deltopic" title="delete"><img src="img/x.gif" alt="delete" onClick="return confirm(\'confirm delete?\');" /></a>';
}elseif($arr['close']=="1"){
echo '<img class="folder_lock" src="img/x.gif" alt="Closed Thread without new posts" title="Closed Thread without new posts" />';
}else{
echo '<img class="folder" src="img/x.gif" title="Thread without new posts" alt="Thread without new posts">';
}
echo '</td>
<td class="tit"><a href="allianz.php?s=2&pid='.$aid.'&tid='.$arr['id'].'">'.$arr['title'].'</a><br></td>
<td class="cou">'.$CountPost.'</td>
<td class="last">'.$post_date.'<br /><a href="spieler.php?uid='.$arr['owner'].'">'.$owner_topic['username'].'</a> <a href="allianz.php?s=2&aid='.$aid.'&tid='.$arr['id'].'&seite=max"><img class="latest_reply" src="img/x.gif" alt="Show last post" title="Show last post" /></a>
</td></tr>';
}
}else{
echo '<tr>
<td class="none" colspan="4">No topic yet</td>
</tr>';
}
?>
</tbody></table><p>
<a href="allianz.php?s=2&pid=<?php echo $aid; ?>&fid=<?php echo $cat_id; ?>&ac=newtopic"><img id="fbtn_post" class="dynamic_img" src="img/x.gif" alt="Post new thread" /></a>
<?php
$opt = $database->getAlliPermissions($session->uid, $aid);
if($opt[opt5] == 1){
echo '<a href="allianz.php?s=2&fid='.$cat_id.'&seite=1&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
}
?>
</p>
<?php }else{
header("Location: banned.php");
}
?>
File diff suppressed because one or more lines are too long
+109
View File
@@ -0,0 +1,109 @@
<?php
//////////////// made by TTMTT ////////////////
if($session->access!=BANNED){
$tid = $_GET['tid'];
$opt = $database->getAlliPermissions($session->uid, $aid);
$topics = $database->ShowTopic($tid);
$posts = $database->ShowPost($tid);
foreach($topics as $arr) {
$cat_id = $arr['cat'];
$owner = $database->getUserArray($arr['owner'],1);
$CatName = $database->ForumCatName($cat_id);
$allianceinfo = $database->getAlliance($owner['alliance']);
}
$date = date('m/d/y H:i a',$arr['date']);
$varray = $database->getProfileVillages($arr['owner']);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
$countAu = $database->CountTopic($arr['owner']);
$displayarray = $database->getUserArray($arr['owner'],1);
if($displayarray['tribe'] == 1) {
$trip = "Roman";
}else if($displayarray['tribe'] == 2) {
$trip = "Teutons";
}else if($displayarray['tribe'] == 3) {
$trip = "Gauls";
}
$input = $arr['post'];
$bbcoded = $input;
include("GameEngine/bbcode.php");
$bbcode_topic = nl2br($bbcoded);
?>
<h4><a href="allianz.php?s=2&pid=<?php echo $arr['alliance']; ?>">Alliance</a> -> <a href="allianz.php?s=2&pid=<?php echo $arr['alliance']; ?>&fid=<?php echo $arr['cat']; ?>"><?php echo $CatName; ?></a></h4><table cellpadding="1" cellspacing="1" id="posts"><thead>
<tr>
<th colspan="2"><?php echo $arr['title']; ?></th>
</tr><tr>
<td>Author</td>
<td>Message</td>
</tr></thead><tbody>
<tr><td class="pinfo"><a class="name" href="spieler.php?uid=<?php echo $arr['owner']; ?>"><?php echo $owner['username']; ?></a><br /><a href="allianz.php?aid=<?php echo $allianceinfo['id']; ?>"><?php echo $allianceinfo['tag']; ?></a><br />
Posts: <?php echo $countAu; ?><br />
<br />
Pop.: <?php echo $totalpop; ?><br />
Villages: <?php echo count($varray);?><br />
<?php echo $trip; ?>
</td>
<td class="pcontent"><div class="posted">created: <?php echo $date; ?></div>
<?php
if($database->CheckEditRes($aid)=="1"){
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&pid='.$arr['alliance'].'&idf='.$arr['cat'].'&idt='.$arr['id'].'&admin=editans"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pid='.$arr['alliance'].'&tid='.$arr['id'].'&admin=deltopic" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
}
?>
<div class="clear dotted"></div><div class="text"><?php echo $bbcode_topic; ?></div></td>
</tr>
<?php
foreach($posts as $po) {
$date = date('m/d/y H:i a',$po['date']);
$countAu = $database->CountTopic($po['owner']);
$varray = $database->getProfileVillages($po['owner']);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
$displayarray = $database->getUserArray($po['owner'],1);
if($displayarray['tribe'] == 1) {
$trip = "Roman";
}else if($displayarray['tribe'] == 2) {
$trip = "Teutons";
}else if($displayarray['tribe'] == 3) {
$trip = "Gauls";
}
$owner = $database->getUserArray($po['owner'],1);
$allianceinfo = $database->getAlliance($owner['alliance']);
$input = $po['post'];
include("GameEngine/BBCode.php");
$bbcode_post = nl2br($bbcoded);
echo '<tr><td class="pinfo"><a class="name" href="spieler.php?uid='.$po['owner'].'">'.$owner['username'].'</a><br /><a href="allianz.php?aid='.$allianceinfo['id'].'">'.$allianceinfo['tag'].'</a><br />
Posts: '.$countAu.'<br />
<br />
Inhbs.: '.$totalpop.'<br />
Villages: '.count($varray).'<br />
'.$trip.'
</td>
<td class="pcontent"><div class="posted">created: '.$date.'</div>';
if($database->CheckEditRes($aid)=="1"){
echo '<div class="admin"><a class="edit" href="allianz.php?s=2&pid='.$arr['alliance'].'&idt='.$_GET['tid'].'&pod='.$po['id'].'&admin=editpost"><img src="img/x.gif" title="edit" alt="edit" /></a><a class="fdel" href="?s=2&pid='.$arr['alliance'].'&pod='.$po['id'].'&tid='.$_GET['tid'].'&admin=delpost" onClick="return confirm(\'confirm delete?\');"><img src="img/x.gif" title="delete" alt="delete" /></a></div><br />';
}
echo '<div class="clear dotted"></div><div class="text">'.$bbcode_post.'</div></td>
</tr>';
}
?>
</tbody></table><div style="margin-top: 15px;">
<?php
if(empty($arr[close])){
echo '<a href="allianz.php?s=2&pid='.$arr['alliance'].'&tid='.$arr['id'].'&ac=newpost"><img id="fbtn_reply" class="dynamic_img"src="img/x.gif" alt="Replies" /></a>';
}
if($opt[opt5] == 1){
echo '<a href="allianz.php?s=2&pid='.$aid.'&tid='.$arr['id'].'&admin=switch_admin" title="Toggle Admin mode"><img class="switch_admin dynamic_img" src="img/x.gif" alt="Toggle Admin mode" /></a>';
}
echo '</div>';
}else{
header("Location: banned.php");
}
?>
File diff suppressed because one or more lines are too long
+110
View File
@@ -0,0 +1,110 @@
<?php
//////////////// made by TTMTT ////////////////
if($session->access!=BANNED){
$forum_data = $database->ForumCatEdit($_GET['idf']);
foreach($forum_data as $cats) {
$cat_name = $cats['forum_name'];
$cat_des = $cats['forum_des'];
}
?>
<script language="JavaScript" type="text/javascript">
function addRow(element_id) {
// element_id: user_list, ally_list
liste = document.getElementById(element_id);
liste = liste.getElementsByTagName('tbody')[0];
var anzahl_trs = liste.getElementsByTagName('tr').length;
var num_fields = anzahl_trs;
var num_last_tr = anzahl_trs -1;
lastTR = liste.getElementsByTagName('tr')[num_last_tr];
lastTD = lastTR.getElementsByTagName('td')[2];
lastIMG = lastTD.getElementsByTagName('img')[0];
lastTD.removeChild(lastIMG);
newTR = document.createElement('tr');
newTD1 = document.createElement('td');
newTD2 = document.createElement('td');
newTD3 = document.createElement('td');
newTR.appendChild(newTD1);
newTR.appendChild(newTD2);
newTR.appendChild(newTD3);
liste.appendChild(newTR);
var html_input_1 = '<input class="text" type="text" ';
if(element_id == 'ally_list') {
newTD1.className = 'ally';
newTD2.className = 'tag';
newTD3.className = 'ad';
newTD1.innerHTML = html_input_1 + 'id="allys_by_id_'+num_fields+'" class="text" maxlength="8" name="allys_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
newTD2.innerHTML = html_input_1 + 'id="allys_by_name_'+num_fields+'" class="text" maxlength="8" name="allys_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'allys\')">';
}
if(element_id == 'user_list') {
newTD1.className = 'id';
newTD2.className = 'pla';
newTD3.className = 'ad';
newTD1.innerHTML = html_input_1 + 'id="users_by_id_'+num_fields+'" class="text" maxlength="8" name="users_by_id['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
newTD2.innerHTML = html_input_1 + 'id="users_by_name_'+num_fields+'" class="text" maxlength="15" name="users_by_name['+num_fields+']" onkeyup="checkInputs('+num_fields+',\'users\')">';
}
newTD3.innerHTML = '<img class="add" src="img/x.gif" title="add" alt="add" onclick="addRow(\''+element_id+'\')">';
}
</script>
<script language="JavaScript" type="text/javascript">
function checkInputs(id, typ) {
id_field = document.getElementById(typ+'_by_id_'+id);
name_field = document.getElementById(typ+'_by_name_'+id);
//alert(id_field.value);
//alert(name_field.value);
if (id_field.value != '' && id_field.disabled == false) {
name_field.disabled = true;
name_field.style.border = '1px solid #999';
}
else {
name_field.disabled = false;
name_field.style.border = '1px solid #71D000';
}
if (name_field.value != '' && name_field.disabled == false) {
id_field.disabled = true;
id_field.style.border = '1px solid #999';
}
else {
id_field.disabled = false;
id_field.style.border = '1px solid #71D000';
}
}
</script><form method="post" action="allianz.php?s=2">
<input type="hidden" name="s" value="2">
<input type="hidden" name="fid" value="<?php echo $_GET['idf']; ?>">
<input type="hidden" name="editforum" value="1">
<table cellpadding="1" cellspacing="1" id="edit_forum"><thead>
<tr>
<th colspan="2">edit forum</th>
</tr>
</thead><tbody>
<tr>
<th>Forum name</th>
<td><input class="text" type="text" name="u1" value="<?php echo $cat_name; ?>" maxlength="30"></td>
</tr>
<tr>
<th>Description</th>
<td><input class="text" type="text" name="u2" value="<?php echo $cat_des; ?>" maxlength="38"></td>
</tr>
</table><p class="btn"><input type="image" value="ok" name="s1" id="fbtn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<?php }else{
header("Location: banned.php");
}
?>
File diff suppressed because one or more lines are too long
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="option.html" server="D:/wamp/www/New/" local="129116774126982421" remote="129116774120000000" />
</dwsync>
+14
View File
@@ -0,0 +1,14 @@
<?php if($session->alliance == $aid) {
?>
<div id="textmenu">
<a href="allianz.php" <?php if(!isset($_GET['s'])) { echo "class=\"selected\""; } ?>>Overview</a>
| <a href="allianz.php?s=2" <?php if(isset($_GET['s']) && $_GET['s'] == 2) { echo "class=\"selected\""; } ?>>Forum</a>
| <a href="allianz.php?s=6" <?php if(isset($_GET['s']) && $_GET['s'] == 6) { echo "class=\"selected\""; } ?>>Chat</a>
| <a href="allianz.php?s=3" <?php if(isset($_GET['s']) && $_GET['s'] == 3) { echo "class=\"selected\""; } ?>>Attacks</a>
| <a href="allianz.php?s=4" <?php if(isset($_GET['s']) && $_GET['s'] == 4) { echo "class=\"selected\""; } ?>>News</a>
| <a href="allianz.php?s=5" <?php if(isset($_GET['s']) && $_GET['s'] == 5) { echo "class=\"selected\""; } ?>>Options</a>
</div>
<?php
}
?>
+142
View File
@@ -0,0 +1,142 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$varmedal = $database->getProfileMedalAlly($aid);
$allianceinfo = $database->getAlliance($aid);
$memberlist = $database->getAllMember($aid);
$totalpop = 0;
foreach($memberlist as $member) {
$totalpop += $database->getVSumField($member['id'],"pop");
}
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<table cellpadding="1" cellspacing="1" id="edit"><thead>
<form method="post" action="allianz.php">
<input type="hidden" name="a" value="3">
<input type="hidden" name="o" value="3">
<input type="hidden" name="s" value="5">
<tr>
<th colspan="3">Alliance</th>
</tr><tr>
<td colspan="2">Details</td>
<td>Description</td>
</tr></thead>
<tbody>
<tr><td colspan="2"></td><td class="empty"></td></tr>
<tr>
<th>Tag</td><td class="s7"><?php echo $allianceinfo['tag']; ?></th>
<td rowspan="8" class="desc1"><textarea tabindex="1" name="be1"><?php echo $allianceinfo['desc']; ?></textarea></td>
</tr>
<tr>
<th>Name</th><td><?php echo $allianceinfo['name']; ?></td>
</tr>
<tr><td colspan="2" class="empty"></td></tr>
<tr>
<th>Rank</th><td><?php echo $ranking->getAllianceRank($aid); ?>.</td>
</tr>
<tr>
<th>Points</th><td><?php echo $totalpop; ?></td>
</tr>
<tr>
<th>Members</th><td><?php echo count($memberlist); ?></td>
</tr>
<tr><td colspan="2" class="empty"></td></tr>
<tr><td colspan="2" class="desc2"><textarea tabindex="2" name="be2"><?php echo $allianceinfo['notice']; ?></textarea></td></tr>
<p>
<table cellspacing="1" cellpadding="2" class="tbg">
<tr><td class="rbg" colspan="4">Medals</td></tr>
<tr>
<td>Category</td>
<td>Rang</td>
<td>Week</td>
<td>BB-Code</td>
</tr>
<?php
/******************************
INDELING CATEGORIEEN:
===============================
== 1. Aanvallers top 10 ==
== 2. Defence top 10 ==
== 3. Klimmers top 10 ==
== 4. Overvallers top 10 ==
== 5. In att en def tegelijk ==
== 6. in top 3 - aanval ==
== 7. in top 3 - verdediging ==
== 8. in top 3 - klimmers ==
== 9. in top 3 - overval ==
******************************/
foreach($varmedal as $medal) {
$titel="Bonus";
switch ($medal['categorie']) {
case "1":
$titel="Attacker of the Week";
break;
case "2":
$titel="Defender of the Week";
break;
case "3":
$titel="Pop Climber of the week";
break;
case "4":
$titel="Robber of the week";
break;
case "5":
$titel="Top 10 of both attacckers and defenders";
break;
case "6":
$titel="Top 3 of Attackers of week ".$medal['points']." in a row";
break;
case "7":
$titel="Top 3 of Defenders of week ".$medal['points']." in a row";
break;
case "8":
$titel="Top 3 of Pop climbers of week ".$medal['points']." in a row";
break;
case "9":
$titel="Top 3 of Robbers of week ".$medal['points']." in a row";
break;
case "10":
$titel="Rank Climber of the week";
break;
case "11":
$titel="Top 3 of Rank climbers of week ".$medal['points']." in a row";
break;
case "12":
$titel="Top 10 of Rank Attackers of week ".$medal['points']." in a row";
break;
}
echo"<tr>
<td> ".$titel."</td>
<td>".$medal['plaats']."</td>
<td>".$medal['week']."</td>
<td>[#".$medal['id']."]</td>
</tr>";
} ?>
</table></p>
</table>
<p class="btn"><input tabindex="3" type="image" value="" name="s1" id="btn_save" class="dynamic_img" src="img/x.gif" alt="save" /></p></form>
<?php
}else{
header("Location: banned.php");
}
?>
+51
View File
@@ -0,0 +1,51 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
$memberlist = $database->getAllMember($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<form method="post" action="allianz.php">
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
<thead>
<tr>
<th colspan="2">Assign to position</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2">Here you can grant the players from your alliance rights & positions.</th>
</tr>
<tr>
<th>Name</th>
<td>
<select name="a_user" class="name dropdown">
<?php
foreach($memberlist as $member) {
echo "<option value=".$member['id'].">".$member['username']."</option>";
}
?>
</select>
</td>
</tr>
</tbody>
</table>
<p>
<input type="hidden" name="o" value="1">
<input type="hidden" name="s" value="5">
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
</p>
</form>
<p class="error"></p>
<?php
}else{
header("Location: banned.php");
}
?>
+75
View File
@@ -0,0 +1,75 @@
<?php
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
$name = 1;
if($query == 0) {
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
}else{
while($row = mysql_fetch_array($sql)){
$dataarray = explode(",",$row['data']);
$id = $row["id"];
$uid = $row["uid"];
$ally = $row["ally"];
$topic = $row["topic"];
$ntype = $row["ntype"];
$data = $row["data"];
$time = $row["time"];
$viewed = $row["viewed"];
$archive = $row["archive"];
$outputList .= "<tr>";
$outputList .= "<td class=\"sub\">";
if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$type2 = '32';
}else{
$type2 = '31';
}
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
$outputList .= "</a>";
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
$outputList .= $database->getUserField($dataarray[0],username,0);
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
}
$getAllyName = $database->getAllianceName($getUserAlly);
if($getUserAlly==$session->alliance || !$getUserAlly){
$allyName = "-";
}else{
$allyName = "<a href=\"allianz.php?aid=".$getUserAlly."\">".$getAllyName."</a>";
}
$outputList .= "<td class=\"al\">".$allyName."</td>";
$date = $generator->procMtime($time);
$outputList .= "<td class=\"dat\">".$date[0]." ".date('H:i',$time)."</td>";
$outputList .= "</tr>";
$name++;
}
}
?>
<table cellpadding="1" cellspacing="1" id="offs">
<thead>
<tr>
<td>Player</td>
<td>Alliance</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<?php echo $outputList; ?>
</tbody>
</table>
+75
View File
@@ -0,0 +1,75 @@
<?php
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=0 AND ntype!=1 AND ntype!=2 AND ntype!=3 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
$name = 1;
if($query == 0) {
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
}else{
while($row = mysql_fetch_array($sql)){
$dataarray = explode(",",$row['data']);
$id = $row["id"];
$uid = $row["uid"];
$ally = $row["ally"];
$topic = $row["topic"];
$ntype = $row["ntype"];
$data = $row["data"];
$time = $row["time"];
$viewed = $row["viewed"];
$archive = $row["archive"];
$outputList .= "<tr>";
$outputList .= "<td class=\"sub\">";
if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$type2 = '32';
}else{
$type2 = '31';
}
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
$outputList .= "</a>";
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
$outputList .= $database->getUserField($dataarray[0],username,0);
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
}
$getAllyName = $database->getAllianceName($getUserAlly);
if($getUserAlly==$session->alliance || !$getUserAlly){
$allyName = "-";
}else{
$allyName = "<a href=\"allianz.php?aid=".$getUserAlly."\">".$getAllyName."</a>";
}
$outputList .= "<td class=\"al\">".$allyName."</td>";
$date = $generator->procMtime($time);
$outputList .= "<td class=\"dat\">".$date[0]." ".date('H:i',$time)."</td>";
$outputList .= "</tr>";
$name++;
}
}
?>
<table cellpadding="1" cellspacing="1" id="offs">
<thead>
<tr>
<td>Player</td>
<td>Alliance</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<?php echo $outputList; ?>
</tbody>
</table>
+103
View File
@@ -0,0 +1,103 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
?>
<div class="clear"></div>
<h4 class="chartHeadline">Military events</h4>
<div id="submenu">
<a href="allianz.php?s=3&f=32">
<img src="img/x.gif" class="btn_def" alt="Defender" title="Defender" />
</a>
<a href="allianz.php?s=3&f=31">
<img src="img/x.gif" class="btn_off" alt="Attacker" title="Attacker" />
</a>
</div>
<?php
if($_GET['f']==31){
include "Templates/Alliance/attack-attacker.tpl";
}elseif($_GET['f']==32){
include "Templates/Alliance/attack-defender.tpl";
}else{
$prefix = "".TB_PREFIX."ndata";
$limit = "ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=15";
$sql = mysql_query("SELECT * FROM $prefix WHERE ally = $session->alliance AND $limit ORDER BY time DESC LIMIT 20");
$query = mysql_num_rows($sql);
$outputList = '';
$name = 1;
if($query == 0) {
$outputList .= "<td colspan=\"4\" class=\"none\">There are no reports available.</td>";
}else{
while($row = mysql_fetch_array($sql)){
$dataarray = explode(",",$row['data']);
$id = $row["id"];
$uid = $row["uid"];
$ally = $row["ally"];
$topic = $row["topic"];
$ntype = $row["ntype"];
$data = $row["data"];
$time = $row["time"];
$viewed = $row["viewed"];
$archive = $row["archive"];
$outputList .= "<tr>";
$outputList .= "<td class=\"sub\">";
if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$type2 = '32';
}else{
$type2 = '31';
}
$outputList .= "<a href=\"allianz.php?s=3&f=".$type2."\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $archive : $ntype;
$outputList .= "<img src=\"img/x.gif\" class=\"iReport iReport$type\" title=\"".$topic."\">";
$outputList .= "</a>";
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
$outputList .= $database->getUserField($dataarray[0],username,0);
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
if($ntype==0 or $ntype==1 or $ntype==2 or $ntype==3){
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
}else{
$getUserAlly = $database->getUserField($dataarray[30],alliance,0);
}
$getAllyName = $database->getAllianceName($getUserAlly);
if($getUserAlly==$session->alliance || !$getUserAlly){
$allyName = "-";
}else{
$allyName = "<a href=\"allianz.php?aid=".$getUserAlly."\">".$getAllyName."</a>";
}
$outputList .= "<td class=\"al\">".$allyName."</td>";
$date = $generator->procMtime($time);
$outputList .= "<td class=\"dat\">".$date[0]." ".date('H:i',$time)."</td>";
$outputList .= "</tr>";
$name++;
}
}
?>
<table cellpadding="1" cellspacing="1" id="offs">
<thead>
<tr>
<td>Player</td>
<td>Alliance</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<?php echo $outputList; ?>
</tbody>
</table>
<?php } ?>
+44
View File
@@ -0,0 +1,44 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<table cellpadding="1" cellspacing="1" cellpadding="1" cellspacing="1" id="name" class="small_option"><thead>
<form method="post" action="allianz.php">
<input type="hidden" name="a" value="100">
<input type="hidden" name="o" value="100">
<input type="hidden" name="s" value="5">
<tr>
<th colspan="2">Change name</th>
</tr></thead>
<tbody><tr>
<th>Tag</th>
<td><input class="tag text" name="ally1" value="<?php echo $allianceinfo['tag']; ?>" maxlength="8">
<span class="error2"></span></td>
</tr>
<tr>
<th>Name</th>
<td><input class="name text" name="ally2" value="<?php echo $allianceinfo['name']; ?>" maxlength="25">
<span class="error2"></span></td>
</tr></tbody></table>
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<p class="error3"><?php echo $form->getError("ally1"); ?></p>
<p class="error3"><?php echo $form->getError("ally2"); ?></p>
<p class="error3"><?php echo $form->getError("owner"); ?></p>
<p class="error3"><?php echo $form->getError("tag"); ?></p>
<p class="error3"><?php echo $form->getError("name"); ?></p>
<?php
}else{
header("Location: banned.php");
}
?>
+89
View File
@@ -0,0 +1,89 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$playerData = $database->getAlliPermissions($_POST['a_user'], $session->alliance);
$playername = $database->getUserField($_POST['a_user'],'username',0);
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
?>
<form method="post" action="allianz.php">
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
<thead>
<tr>
<th colspan="2">Assign to position</th>
</tr>
</thead>
<tbody>
<tr>
<th>Name:</th>
<td> <?php echo $playername; ?> </td>
</tr>
<tr>
<th>Position:</th>
<td><input class="name text" type="text" name="a_titel" value="<?php echo $playerData[rank]; ?>" maxlength="20" /></td>
</tr>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="rights" class="small_option">
<thead>
<tr>
<th colspan="2">Assign rights</th>
</tr>
</thead>
<tbody>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e1" value="1" <?php if ($playerData[opt1]) { echo "checked=checked"; } ?> ></td>
<td>Assign to position</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e2" value="1" <?php if ($playerData[opt2]) { echo "checked=checked"; } ?> ></td>
<td>Kick player</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e3" value="1" <?php if ($playerData[opt3]) { echo "checked=checked"; } ?> ></td>
<td>Change alliance description</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e6" value="1"<?php if ($playerData[opt6]) { echo "checked=checked"; } ?> ></td>
<td>Alliance diplomacy</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e7" value="1" <?php if ($playerData[opt7]) { echo "checked=checked"; } ?> ></td>
<td>IGMs to every alliance member</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e4" value="1" <?php if ($playerData[opt4]) { echo "checked=checked"; } ?> ></td>
<td>Invite a player into the alliance</td>
</tr>
<tr>
<td class="sel"><input class="check" type="checkbox" name="e5" value="1" <?php if ($playerData[opt5]) { echo "checked=checked"; } ?> ></td>
<td>Manage forums</td>
</tr>
</tbody>
</table>
<p>
<input type="hidden" name="a" value="1">
<input type="hidden" name="o" value="1">
<input type="hidden" name="s" value="5">
<input type="hidden" name="a_user" value="<?php echo $_POST['a_user']; ?>">
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
</p>
</form>
+59
View File
@@ -0,0 +1,59 @@
<?php
////////////// made by TTMTT //////////////
ob_start();
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
?>
<script type="text/javascript">
<?php sajax_show_javascript();?>
function show_data_cb(text) { document.getElementById("masnun").innerHTML = text; }
function start_it() { x_get_data(show_data_cb); setTimeout("start_it()",1000); }
function add_cb() {}
function send_data() {
msg = document.form1.msg.value;
x_add_data(name +"|"+msg,add_cb); }
</script>
<?php
if($session->access!=BANNED){
?>
<body onload="start_it()">
<form name="form1" onSubmit="send_data()">
<div id="TitleName" class="chatHeader">Ally-Chat</div>
<div id="chatContainer" style="position:relative; top:0; right:0; height: 220px; width: 500px; overflow: hidden; background-color: #FFF; border: 1px solid #C0C0C0;">
<div id="masnun" style="position:absolute; top:0; right:5px; width:470px; background-color: #FFF; "></div>
<div id="scrollbarbackground2" style="position:absolute; top:0; right:481px; width:17px; height:198px;"></div>
<div id="scrollbarbackground" style="position:absolute; top:0; right:489px; width:1px; height:198px; border-width:1px; border-style:solid; border-color:#71D000; background-color: #FFF; "></div>
<div id="scrollbar" style="position:absolute; top:0; right:481px; width:17px; height:198px; border-width:1px; border-style:solid; border-color:#71D000; background-color: #F0FFF0; "></div>
<input id="scrollCheckbox" class="fm" checked="checked" type="checkbox" style="position:absolute; top:200px; right:481px; " />
</div>
<div style="margin-top:10px; margin-bottom:10px;">
<table cellpadding="1" cellspacing="1"><tr><td>
<input name="s" value="6" type="hidden" />
<input class="text" type="text" name="msg" style="width: 415px;" />
</td><td>
<input type="button" src="img/x.gif" id="btn_ok" style="border: 0px; float:left;" alt="ok" onClick="send_data()" />
</td></tr></table>
</div>
</form>
</body>
<div id="rooms">
</div>
<?php
}else{
header("Location: banned.php");
}
?>
+208
View File
@@ -0,0 +1,208 @@
<?php
/*
|--------------------------------------------------------------------------
| PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE!
|--------------------------------------------------------------------------
|
| Developed by: Dzoki < dzoki.travian@gmail.com >
|
| This script is property of TravianX Project. You are allowed to change
| its source and release it, but you have no rights to remove copyright
| notices.
|
| TravianX All rights reserved
|
*/
if(isset($aid)) {
$aid = $aid;
} else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<form method="post" action="allianz.php">
<input type="hidden" name="a" value="6"> <input type="hidden" name="o" value="6"> <input type="hidden" name="s" value="5">
<table cellpadding="1" cellspacing="1" id="diplomacy" class="dipl">
<thead>
<tr>
<th colspan="2">Alliance diplomacy</th>
</tr>
</thead>
<tbody>
<tr>
<th>Alliance</th>
<td><input class="ally text" type="text" name="a_name" maxlength="8"></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"><label><input class="radio" type="radio" name="dipl" value="1"> offer a confederation</label></td>
</tr>
<tr>
<td colspan="2"><label><input class="radio" type="radio" name="dipl" value="2"> offer non-aggression pact</label></td>
</tr>
<tr>
<td colspan="2"><label><input class="radio" type="radio" name="dipl" value="3"> declare war</label></td>
</tr>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="hint" class="infos">
<thead>
<tr>
<th colspan="2">Hint</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">It's part of diplomatic etiquette to talk to another alliance and negotiate before sending an offer for a non-aggression pact or a confederation.</td>
</tr>
</tbody>
</table>
<div id="box">
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK"></p>
<p class="error"></p>
</div>
</form>
<div class="clear"></div>
<table cellpadding="1" cellspacing="1" id="own" class="dipl">
<thead>
<tr>
<th colspan="3">Own offers</th>
</tr>
</thead>
<tbody>
<tr>
<?php
$alliance = $session->alliance;
if(count($database->diplomacyOwnOffers($alliance))){
foreach($database->diplomacyOwnOffers($alliance) as $key => $value){
if($value['type'] == 1){
$type = "Conf.";
} else if($value['type'] == 2){
$type = "Nap";
} else if($value['type'] == 3){
$type = "War";
}
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="101"><input type="hidden" name="id" value="'.$value['id'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$value['alli2'].'"><center>'.$database->getAllianceName($value['alli2']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
}
} else {
echo '<tr><td colspan="3" class="none">none</td></tr>';
}
?>
</tr>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="tip" class="infos">
<thead>
<tr>
<th colspan="2">Tip</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">If you want to see connections in the alliance description automatically, type <span class="e">[diplomatie]</span> into the description, <span class="e">[ally]</span>, <span class="e">[nap]</span> and <span class="e">[war]</span> are also possible.</td>
</tr>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="foreign" class="dipl">
<thead>
<tr>
<th colspan="4">Foreign offers</th>
</tr>
</thead>
<tbody>
<?php
unset($type);
$alliance = $session->alliance;
if(count($database->diplomacyInviteCheck($alliance))){
foreach($database->diplomacyInviteCheck($alliance) as $key => $row){
if($row['type'] == 1){
$type = "Conf.";
} else if($row['type'] == 2){
$type = "Nap";
} else if($row['type'] == 3){
$type = "War";
}
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="102"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli1" value="'.$row['alli1'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></td></form><form method="post" action="allianz.php"><td width="18"><input type="hidden" name="o" value="103"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli2'].'"><input type="image" class="accept" src="img/x.gif" title="Accept" /></td></form><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
}
} else {
echo '<tr><td colspan="3" class="none">none</td></tr>';
}
?>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="existing" class="dipl">
<thead>
<tr>
<th colspan="3">Existing relationships</th>
</tr>
</thead>
<tbody>
<?php
unset($type);
unset($row);
$alliance = $session->alliance;
if(count($database->diplomacyExistingRelationships($alliance))){
foreach($database->diplomacyExistingRelationships($alliance) as $key => $row){
if($row['type'] == 1){
$type = "Conf.";
} else if($row['type'] == 2){
$type = "Nap";
} else if($row['type'] == 3){
$type = "War";
}
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli2'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli1'].'"><center>'.$database->getAllianceName($row['alli1']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
}
} elseif(count($database->diplomacyExistingRelationships2($alliance))){
foreach($database->diplomacyExistingRelationships2($alliance) as $key => $row){
if($row['type'] == 1){
$type = "Conf.";
} else if($row['type'] == 2){
$type = "Nap";
} else if($row['type'] == 3){
$type = "War";
}
echo '<tr><td width="18"><form method="post" action="allianz.php"><input type="hidden" name="o" value="104"><input type="hidden" name="id" value="'.$row['id'].'"><input type="hidden" name="alli2" value="'.$row['alli1'].'"><input type="image" class="cancel" src="img/x.gif" title="Cancel" /></form></td><td><a href="allianz.php?aid='.$row['alli2'].'"><center>'.$database->getAllianceName($row['alli2']).'</a></center></td><td width="80"><center>'.$type.'</center></td></tr>';
}
}else {
echo '<tr><td colspan="3" class="none">none</td></tr>';
}
?>
</tbody>
</table>
<?php
}else{
header("Location: banned.php");
}
?>
+146
View File
@@ -0,0 +1,146 @@
<?php
//////////////// made by TTMTT ////////////////
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
$opt = $database->getAlliPermissions($session->uid, $aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
$ids = $_GET['s'];
if(isset($_POST['new'])){
$forum_name = $_POST['u1'];
$forum_des = $_POST['u2'];
$forum_owner = $session->uid;
$forum_area = $_POST['bid'];
$database->CreatForum($forum_owner,$aid,$forum_name,$forum_des,$forum_area);
}
if(isset($_POST['edittopic'])){
$topic_name = $_POST['thema'];
$topic_cat = $_POST['fid'];
$topic_id = $_POST['tid'];
$database->UpdateEditTopic($topic_id,$topic_name,$topic_cat);
}
if(isset($_POST['editforum'])){
$forum_name = $_POST['u1'];
$$forum_name = htmlspecialchars($forum_name);
$forum_des = $_POST['u2'];
$forum_des = htmlspecialchars($forum_des);
$forum_id = $_POST['fid'];
$database->UpdateEditForum($forum_id,$forum_name,$forum_des);
}
if(isset($_POST['newtopic'])){
$title = $_POST['thema'];
$post = $_POST['text'];
$cat = $_POST['fid'];
$owner = $session->uid;
$alli = $_POST['pid'];
if(isset($_POST['umfrage_ende'])){
$ends = "";
}else{
$ends = '';
}
$database->CreatTopic($title,$post,$cat,$owner,$alli,$ends);
}
if(isset($_POST['newpost'])){
$post = $_POST['text'];
$post = htmlspecialchars($post);
$tids = $_POST['tid'];
$owner = $session->uid;
$database->UpdatePostDate($tids);
$database->CreatPost($post,$tids,$owner);
}
if(isset($_POST['editans'])){
$post = $_POST['text'];
$topic_id = $_POST['tid'];
$database->EditUpdateTopic($topic_id,$post);
}
if(isset($_POST['editpost'])){
$post = $_POST['text'];
$post = htmlspecialchars($post);
$posts_id = $_POST['pod'];
$database->EditUpdatePost($posts_id,$post);
}
if(!isset($_GET['admin'])) {
$_GET['admin'] = null;
}
if($_GET['admin']== "switch_admin"){
if($database->CheckResultEdit($aid) != 1){
$database->CreatResultEdit($aid,1);
}else{
if($database->CheckEditRes($aid) == 1){
$database->UpdateResultEdit($aid,'');
}else{
$database->UpdateResultEdit($aid,1);
}
}
}
if($_GET['admin']== "pin"){
$database->StickTopic($_GET[idt],1); // stick topic
}
if($_GET['admin']== "unpin"){
$database->StickTopic($_GET[idt],''); // unstick topic
}
if($_GET['admin']== "delforum"){
$database->DeleteCat($_GET[idf]); // delete forum
}
if($_GET['admin']== "deltopic"){
$database->DeleteTopic($_GET[idt]); // delete topic
}
if($_GET['admin']== "delpost"){
$database->DeletePost($_GET[pod]); // stick topic
}
if($_GET['admin']== "lock"){
$database->LockTopic($_GET[idt],1); // lock topic
}
if($_GET['admin']== "unlock"){
$database->LockTopic($_GET[idt],''); // unlock topic
}
if($_GET['admin']== "newforum"){
include("Forum/forum_1.tpl"); // new forum
}elseif(isset($_GET['fid'])){
if(isset($_GET['ac'])){
include("Forum/forum_5.tpl"); // new topic
}else{
include("Forum/forum_4.tpl"); // topic cat
}
}elseif($_GET['admin'] == "editforum"){
include("Forum/forum_8.tpl"); // edit topic
}elseif($_GET['admin'] == "editans"){
include("Forum/forum_9.tpl"); // edit answer
}elseif($_GET['admin'] == "editpost"){
include("Forum/forum_10.tpl"); // edit answer
}elseif($_GET['admin'] == "edittopic"){
include("Forum/forum_3.tpl"); // edit topic
}elseif(isset($_GET['tid'])){
if(isset($_GET['ac'])){
include("Forum/forum_7.tpl"); // new post
}else{
include("Forum/forum_6.tpl"); // showtopic
}
}else{
if($database->CheckForum($aid)){
include("Forum/forum_2.tpl");
}else if($opt['opt5'] == 1){
if($session->access==BANNED){
echo '<p class="error">Forum is not created yet</p><p>
<a href="banned.php"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a></p>';
}else{
echo '<p class="error">Forum is not created yet</p><p>
<a href="allianz.php?s=2&admin=newforum"><img id="fbtn_newforum" class="dynamic_img" src="img/x.gif" alt="New forum" /></a></p>';
}}else{
echo '<p class="error">Forum is not created yet</p>';
}
}
?>
+61
View File
@@ -0,0 +1,61 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
$allianceInvitations = $database->getAliInvitations($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<table cellpadding="1" cellspacing="1" id="invite" class="small_option"><thead>
<form method="post" action="allianz.php">
<input type="hidden" name="s" value="5">
<input type="hidden" name="o" value="4">
<input type="hidden" name="a" value="4">
<tr>
<th colspan="2">Invite a player into the alliance</th>
</tr>
</thead><tbody>
<tr><th>Name</th>
<td><input class="name text" type="text" name="a_name" maxlength="20"><span class="error"></span></td>
</tr>
</tbody></table>
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form> </p>
<p class="error"><?php echo $form->getError("name1"); ?><br /><?php echo $form->getError("name2"); ?><br /><?php echo $form->getError("name3"); ?><br /><?php echo $form->getError("name4"); ?><br /><?php echo $form->getError("name5"); ?><br /><?php echo $form->getError("perm"); ?></p><br />
<table cellpadding="1" cellspacing="1" id="invitations" class="small_option"><thead>
<tr>
<th colspan="2">Invitations:</th>
</tr></thead>
<tbody>
<?php
if (count($allianceInvitations) == 0) {
echo "<tr>";
echo "<td class=none colspan=2>none</td>";
echo "</tr>";
} else {
foreach($allianceInvitations as $invit) {
$invited = $database->getUserField($invit['uid'],username,0);
echo "<tr>";
echo "<td class=abo><a href=\"?o=4&s=5&d=".$invit['id']."\"><img src=\"gpack/travian_default/img/a/del.gif\" width=\"12\" height=\"12\" alt=\"Del\"></a></td>";
echo "<td><a href=spieler.php?uid=".$invit['uid'].">".$invited."</td>";
echo "</tr>";
}
}
?>
</tbody>
</table>
<?php
}else{
header("Location: banned.php");
}
?>
+51
View File
@@ -0,0 +1,51 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$memberlist = $database->getAllMember($aid);
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<form method="post" action="allianz.php">
<table cellpadding="1" cellspacing="1" id="position" class="small_option">
<thead>
<tr>
<th colspan="2">Kick Player:</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2">Here you can kick the players from your alliance.</th>
</tr>
<tr>
<th>Name</th>
<td>
<select name="a_user" class="name dropdown">
<?php
foreach($memberlist as $member) {
echo "<option value=".$member['id'].">".$member['username']."</option>";
}
?>
</select>
</td>
</tr>
</tbody>
</table>
<p>
<input type="hidden" name="o" value="2">
<input type="hidden" name="s" value="5">
<input type="hidden" name="a" value="2">
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
</p>
</form>
<p class="error"></p>
<?php
}else{
header("Location: banned.php");
}
?>
+38
View File
@@ -0,0 +1,38 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<form method="post" action="allianz.php">
<input type="hidden" name="a" value="5">
<input type="hidden" name="o" value="5">
<input type="hidden" name="s" value="5">
<tr>
<th colspan="2">Link to the forum</th>
</tr>
</thead><tbody>
<tr><th>URL</th>
<td><input class="link text" type="text" name="f_link" value="" maxlength="200"></td>
</tr>
<tr>
<td colspan="2" class="info">If your alliance wants to use an external forum, you can enter the url here.</td>
</tr></tbody>
</table>
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<?php
}else{
header("Location: banned.php");
}
?>
+105
View File
@@ -0,0 +1,105 @@
<?php
//gp link
if($session->gpack == null || GP_ENABLE == false) {
$gpack= GP_LOCATE;
} else {
$gpack= $session->gpack;
}
//de lintjes
/******************************
INDELING CATEGORIEEN:
===============================
== 1. Aanvallers top 10 ==
== 2. Defence top 10 ==
== 3. Klimmers top 10 ==
== 4. Overvallers top 10 ==
== 5. In att en def tegelijk ==
== 6. in top 3 - aanval ==
== 7. in top 3 - verdediging ==
== 8. in top 3 - klimmers ==
== 9. in top 3 - overval ==
******************************/
$geregistreerd=date('d-m-Y', ($allianceinfo['timestamp']));
$profiel = preg_replace("/\[war]/s",'At war with<br>'.$database->getAllianceDipProfile($aid,3), $profiel, 1);
$profiel = preg_replace("/\[ally]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1), $profiel, 1);
$profiel = preg_replace("/\[nap]/s",'NAPs<br>'.$database->getAllianceDipProfile($aid,2), $profiel, 1);
$profiel = preg_replace("/\[diplomatie]/s",'Confederacies<br>'.$database->getAllianceDipProfile($aid,1).'<br>NAPs<br>'.$database->getAllianceDipProfile($aid,2).'<br>At war with<br>'.$database->getAllianceDipProfile($aid,3), $profiel, 1);
foreach($varmedal as $medal) {
switch ($medal['categorie']) {
case "1":
$titel="Attackers of the Week";
$woord="Points";
break;
case "2":
$titel="Defenders of the Week";
$woord="Points";
break;
case "3":
$titel="Climbers of the week(Ranks)";
$woord="Ranks";
break;
case "4":
$titel="Robbers of the week";
$woord="Resources";
break;
case "5":
$titel="Receiving this medal shows that your alliance was in the top 3 of both attacckers and defenders of the week.";
$bonus[$medal['id']]=1;
break;
case "6":
$titel="Receiving this medal shows that your alliance was in the top 3 of the attackers of the week ".$medal['points']." in a row";
$bonus[$medal['id']]=1;
break;
case "7":
$titel="Receiving this medal shows that your alliance was in the top 3 of the deffenders of the week ".$medal['points']." in a row";
$bonus[$medal['id']]=1;
break;
case "8":
$titel="Receiving this medal shows that your alliance was in the top 3 of the rank climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "9":
$titel="Receiving this medal shows that your alliance was in the top 3 of the robbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "11":
$titel="Receiving this medal shows that you were in the top 3 of the Rank Climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "12":
$titel="Receiving this medal shows that you were in the top 10 Attackers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "13":
$titel="Receiving this medal shows that you were in the top 10 Defenders of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "15":
$titel="Receiving this medal shows that you were in the top 10 Robbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
case "16":
$titel="Receiving this medal shows that you were in the top 10 Rank Climbers of the week ".$medal['points']." in a row.";
$bonus[$medal['id']]=1;
break;
}
if(isset($bonus[$medal['id']])){
$profiel = preg_replace("/\[#".$medal['id']."]/is",'<img src="'.$gpack.'img/t/'.$medal['img'].'.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>'.$titel.'<br /><br />Received in week: '.$medal['week'].'</td></tr></table>\')">', $profiel, 1);
} else {
$profiel = preg_replace("/\[#".$medal['id']."]/is",'<img src="'.$gpack.'img/t/'.$medal['img'].'.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Category:</td><td>'.$titel.'</td></tr><tr><td>Week:</td><td>'.$medal['week'].'</td></tr><tr><td>Rank:</td><td>'.$medal['plaats'].'</td></tr><tr><td>'.$woord.':</td><td>'.$medal['points'].'</td></tr></table>\')">', $profiel, 1);
}
}
?>
+33
View File
@@ -0,0 +1,33 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
$noticeArray = $database->readAlliNotice($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
?>
<table cellpadding="1" cellspacing="1" id="events"><thead>
<tr><th colspan="2">Alliance events</th></tr>
<tr>
<td>Event</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<?php
foreach($noticeArray as $notice) {
$date = $generator->procMtime($notice['date']);
echo "<tr>";
echo "<td class=event>".$notice['comment']."</td>";
echo "<td class=dat>".$date['0']." ".$date['1']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
+85
View File
@@ -0,0 +1,85 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
?>
<table cellpadding="1" cellspacing="1" id="options" class="small_option"><thead>
<form method="POST" action="allianz.php">
<input type="hidden" name="s" value="5">
<tr>
<th colspan="2">Options</th>
</tr></thead><tbody>
<?php
if ($alliance->userPermArray['opt1']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="1"></td>
<td class="val">Assign to position</td>
</tr>
<?php
}
if ($alliance->userPermArray['opt3']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="100"></td>
<td class="val">Change name</td>
</tr>
<?php
}
if ($alliance->userPermArray['opt2']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="2"></td>
<td class="val">Kick player</td>
</tr>
<?php
}
if ($alliance->userPermArray['opt3']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="3"></td>
<td class="val">Change alliance description</td>
</tr>
<?php
}
if ($alliance->userPermArray['opt6']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="6"></td>
<td class="val">Alliance diplomacy</td>
</tr>
<?php
}
if ($alliance->userPermArray['opt4']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="4"></td>
<td class="val">Invite a player into the alliance</td>
</tr>
<?php
}
if ($alliance->userPermArray['opt5']==1){
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="5"></td>
<td class="val">Link to the forum</td>
</tr>
<?php
}
?>
<tr>
<td class="sel"><input class="radio" type="radio" name="o" value="11"></td>
<td class="val">Quit alliance</td>
</tr>
</tbody>
</table>
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
+151
View File
@@ -0,0 +1,151 @@
<?php
if(isset($_GET['aid'])) {
$aid = $_GET['aid'];
}
else {
$aid = $session->alliance;
}
$varmedal = $database->getProfileMedalAlly($aid);
$allianceinfo = $database->getAlliance($aid);
$memberlist = $database->getAllMember($aid);
$totalpop = 0;
foreach($memberlist as $member) {
$totalpop += $database->getVSumField($member['id'],"pop");
}
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
$profiel="".$allianceinfo['notice']."".md5(skJkev3)."".$allianceinfo['desc']."";
require("medal.php");
$profiel=explode("".md5(skJkev3)."", $profiel);
include("alli_menu.tpl");
?>
<table cellpadding="1" cellspacing="1" id="profile">
<thead>
<tr>
<th colspan="2">Alliance</th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr><td class="empty"></td><td class="empty"></td></tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Tag</th>
<td><?php echo $allianceinfo['tag']; ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo $allianceinfo['name']; ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<th>Rank</th>
<td><?php echo $ranking->getAllianceRank($aid); ?>.</td>
</tr>
<tr>
<th>Points</th>
<td><?php echo $totalpop; ?></td>
</tr>
<tr>
<th>Members</th>
<td><?php echo count($memberlist); ?></td>
</tr><tr>
<td colspan="2" class="empty"></td>
</tr>
<?php
foreach($memberlist as $member) {
//rank name
$rank = $database->getAlliancePermission($member['id'],"rank",0);
//username
$name = $database->getUserField($member['id'],"username",0);
//if there is no rank defined, user will not be printed
if($rank == ''){
echo '';
}
//if there is user rank defined, user will be printed
else if($rank != ''){
echo "<tr>";
echo "<th>".$rank."</th>";
echo "<td><a href='spieler.php?uid=".$member['id']."'>".$name."</td>";
echo "</tr>";
}
}?>
<tr>
<td colspan="2" class="emmty"></td>
</tr>
<tr>
<td class="desc2" colspan="2"><?php echo nl2br($profiel[0]); ?>
</td>
</tr>
</table>
</td>
<td class="desc1"><?php echo nl2br($profiel[1]); ?>
</td>
</tr>
</tbody>
</table><table cellpadding="1" cellspacing="1" id="member"><thead>
<tr>
<th>&nbsp;</th>
<th>Player</th>
<th>Population</th>
<th>Villages</th>
<?php
if($aid == $session->alliance){
echo "<th>&nbsp;</th>";
}
?>
</tr>
</thead>
<tbody>
<?php
// Alliance Member list loop
$rank=0;
foreach($memberlist as $member) {
$rank = $rank+1;
$TotalUserPop = $database->getVSumField($member['id'],"pop");
$TotalVillages = $database->getProfileVillages($member['id']);
echo " <tr>";
echo " <td class=ra>".$rank.".</td>";
echo " <td class=pla><a href=spieler.php?uid=".$member['id'].">".$member['username']."</a></td>";
echo " <td class=hab>".$TotalUserPop."</td>";
echo " <td class=vil>".count($TotalVillages)."</td>";
if($aid == $session->alliance){
if ((time()-600) < $member['timestamp']){ // 0 Min - 10 Min
echo " <td class=on><img class=online1 src=img/x.gif title='Now online' alt='Now online' /></td>";
}elseif ((time()-86400) < $member['timestamp'] && (time()-600) > $member['timestamp']){ // 10 Min - 1 Days
echo " <td class=on><img class=online2 src=img/x.gif title='Offline' alt='Offline' /></td>";
}elseif ((time()-259200) < $member['timestamp'] && (time()-86400) > $member['timestamp']){ // 1-3 Days
echo " <td class=on><img class=online3 src=img/x.gif title='Last 3 days' alt='Last 3 days' /></td>";
}elseif ((time()-604800) < $member['timestamp'] && (time()-259200) > $member['timestamp']){
echo " <td class=on><img class=online4 src=img/x.gif title='Last 7 days' alt='Last 7 days' /></td>";
}else{
echo " <td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
}
}
echo " </tr>";
}
?>
</tbody>
</table>
+34
View File
@@ -0,0 +1,34 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
if($session->access!=BANNED){
?>
<table cellpadding="1" cellspacing="1" id="quit" class="small_option"><thead>
<form method="post" action="allianz.php">
<input type="hidden" name="a" value="11">
<input type="hidden" name="o" value="11">
<input type="hidden" name="s" value="5">
<tr>
<th colspan="2">Quit alliance</th>
</tr>
</thead><tbody>
<tr><td colspan="2" class="info">In order to quit the alliance you have to enter your password again for safety reasons.</td></tr>
<tr><th>password:</th>
<td><input class="pass text" type="password" name="pw" maxlength="20"></td>
</tr></tbody></table>
<p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
<?php
}else{
header("Location: banned.php");
}
?>
File diff suppressed because it is too large Load Diff
+794
View File
@@ -0,0 +1,794 @@
<p class=f9>
At the beginning you should try to get a good economic basis. In order to do so you have to extend the 18 resource fields (village overview). There are four different types of resource fields: Woodcutter, Clay pit, Iron mine and Cropland. If you click one of them, you will get more information and the option to extend it.
<br><br>
Later in the game the buildings in the village become important too. In order to construct a new building you have to click on one of the green ovals. A list with every building that is available will appear.
<br><br>
Some buildings can only be built if you fulfil the prerequisites which are other buildings.</p>
<h2>Main Building</h2>
<p>
<img src="img/un/h/gid15.gif" width=166 height=150 border=0 alt="Main Building" title="Main Building" align="left" />
The village's master builders live in the main building. The higher its level the faster your master builders complete the construction of new buildings.
<br><br>
<b>Tribe advantage:</b><br>
Romans: Can build/extend a resource field and a village building at the same time. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
70 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
40 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
60 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
20 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
2 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
none</p>
<h2>Warehouse</h2>
<p>
<img src="img/un/h/gid10.gif" width=166 height=150 border=0 alt="Warehouse" title="Warehouse" align="right" />
The resources lumber, clay and iron are stored in your warehouse. By increasing its level you increase your warehouse's capacity. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
130 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
160 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
90 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
40 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
1 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 1</p>
<h2>Granary</h2>
<p>
<img src="img/un/h/gid11.gif" width=166 height=150 border=0 alt="Granary" title="Granary" align="right" />
The crop produced by your farms is stored in the granary. By increasing its level you increase the granary?s capacity. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
80 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
100 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
70 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
20 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
1 | <img src=img/un/h/clock.gif width=18 height=12>
0:26:40 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 1</p>
<h2>Cranny</h2>
<p>
<img src="img/un/h/gid23.gif" width=166 height=150 border=0 alt="Cranny" title="Cranny" align="left" />
The cranny is used to hide some of your resources when the village is attacked. These resources cannot be stolen. At level 1 100 resources are hidden.
<br><br>
<b>Tribe advantage:</b><br>
Gauls: The cranny is twice as big.<br>
Teutons: Enemy crannies only hides 66% of the normal amount in Travian version 2.5 and 3, and 80% of the normal amount in Travian version 3.5. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
40 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
50 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
30 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
10 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
0 | <img src=img/un/h/clock.gif width=18 height=12>
0:12:30 <br>
<br>
<b>
Prerequisites: </b>
<br>
none</p>
<h2>Embassy</h2>
<p>
<img src="img/un/h/gid18.gif" width=166 height=150 border=0 alt="Embassy" title="Embassy" align="right" />
In order to join an alliance you need an embassy. With an embassy level 3 you can even found one yourself. With each higher level the maximum size of the alliance increases by 3. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
180 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
130 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
150 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
80 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
3 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 1</p>
<h2>Rally Point</h2>
<p>
<img src="img/un/h/gid16.gif" width=166 height=150 border=0 alt="Rally Point" title="Rally Point" align="right" />
At the rally point you can instruct your troops and can see the sender of oncoming troops. The rally point can only be build at the building site right of the village centre. The higher its level the more targets for the catapults become available. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
110 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
160 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
90 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
70 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
1 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
none</p>
<h2>Marketplace</h2>
<p>
<img src="img/un/h/gid17.gif" width=166 height=150 border=0 alt="Marketplace" title="Marketplace" align="left" />
At the marketplace you can trade resources with other players. The higher its level, the more resources can be transported at the same time.
<br><br>
<b>Tribe advantage:</b><br>
Romans: Each merchant can carry 500 resources.<br>
Velocity: 16 fields/hour.<br>
Teutons: Each merchant can carry 1000 resources.<br>
Velocity: 12 fields/hour.<br>
Gauls: Each merchant can carry 750 resources.<br>
Velocity: 24 fields/hour. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
80 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
70 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
120 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
70 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
4 | <img src=img/un/h/clock.gif width=18 height=12>
0:30:00 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 3, Warehouse Level 1, Granary Level 1</p>
<h2>Barracks</h2>
<p>
<img src="img/un/h/gid19.gif" width=166 height=150 border=0 alt="Barracks" title="Barracks" align="left" />
Infantry can be trained in the barracks. The higher its level the faster the troops are trained. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
210 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
140 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
260 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
120 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
4 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Rally Point Level 1, Main Building Level 3</p>
<h2>Stable</h2>
<p>
<img src="img/un/h/gid20.gif" width=166 height=150 border=0 alt="Stable" title="Stable" align="left" />
Cavalry is trained in the stable. The higher its level the faster the troops are trained. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
260 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
140 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
220 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
100 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
5 | <img src=img/un/h/clock.gif width=18 height=12>
0:36:40 <br>
<br>
<b>
Prerequisites: </b>
<br>
Blacksmith Level 3, Academy Level 5</p>
<h2>Workshop</h2>
<p>
<img src="img/un/h/gid21.gif" width=166 height=150 border=0 alt="Workshop" title="Workshop" align="left" />
Siege engines like catapults and rams can be built in the workshop. The higher its level the faster the units are produced. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
460 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
510 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
600 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
320 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
3 | <img src=img/un/h/clock.gif width=18 height=12>
0:50:00 <br>
<br>
<b>
Prerequisites: </b>
<br>
Academy Level 10, Main Building Level 5</p>
<h2>Academy</h2>
<p>
<img src="img/un/h/gid22.gif" width=166 height=150 border=0 alt="Academy" title="Academy" align="right" />
New unit types can be developed in the academy. By increasing its level you can order the research of better units. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
220 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
160 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
90 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
40 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
4 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Barracks Level 3, Main Building Level 3</p>
<h2>Blacksmith</h2>
<p>
<img src="img/un/h/gid12.gif" width=166 height=150 border=0 alt="Blacksmith" title="Blacksmith" align="left" />
Your warriors' weapons are enhanced in the blacksmith?s melting furnaces. By increasing its level you can order the fabrication of even better weapons. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
170 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
200 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
380 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
130 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
4 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 3, Academy Level 3</p>
<h2>Armoury</h2>
<p>
<img src="img/un/h/gid13.gif" width=166 height=150 border=0 alt="Armoury" title="Armoury" align="right" />
Your warriors' armour is enhanced in the armoury's melting furnaces. By increasing its level you can order the fabrication of even better armour. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
130 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
210 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
410 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
130 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
4 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 3, Academy Level 1</p>
<h2>Palace</h2>
<p>
<img src="img/un/h/gid26.gif" width=166 height=150 border=0 alt="Palace" title="Palace" align="left" />
The King or Queen of the empire lives in the palace. The palace can only be built in one village at a time and can be used to make a village the capital. Capitals cannot be conquered.
<br><br>
At level 10, 15 and 20 three settlers or one administrator (Senator, Chief or Chieftain) can be trained.
<br><br>
The Capital is the only place a stonemason's lodge can be erected. Also the capital is the only village where resource fields can be extended beyond level 10. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
550 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
800 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
750 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
250 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
1 | <img src=img/un/h/clock.gif width=18 height=12>
1:23:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Embassy Level 1, Main Building Level 5, <strike>Residence</strike></p>
<h2>Residence</h2>
<p>
<img src="img/un/h/gid25.gif" width=166 height=150 border=0 alt="Residence" title="Residence" align="left" />
The residence is a small palace where the king or queen lives when he or she visits the village. The residence protects the village against enemies who want to conquer it as long as it is not destroyed.
<br><br>
At level 10 and 20 three settlers or one administrator (Senator, Chief or Chieftain) can be trained. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
580 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
460 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
350 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
180 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
1 | <img src=img/un/h/clock.gif width=18 height=12>
0:33:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Main Building Level 5, <strike>Palace</strike></p>
<h2>Trade Office</h2>
<p>
<img src="img/un/h/gid28.gif" width=166 height=150 border=0 alt="Trade Office" title="Trade Office" align="left" />
In the trade office the merchants' carts get improved and equipped with powerful horses. The higher its level the more your merchants are able to carry.
<br><br>
With each level the capacity increases by 10%. At level 20 your merchants can carry thrice as much as normal.
<br><br>
<b>Tribe advantage:</b><br>
Romans: In Travian version 3.5 the Roman trade office increases the capacity by 20% per level. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
1400 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
1330 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
1200 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
400 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
3 | <img src=img/un/h/clock.gif width=18 height=12>
0:50:00 <br>
<br>
<b>
Prerequisites: </b>
<br>
Marketplace Level 20, Stable Level 10</p>
<h2>Tournament Square</h2>
<p>
<img src="img/un/h/gid14.gif" width=166 height=150 border=0 alt="Tournament Square" title="Tournament Square" align="left" />
Your troops can train to increase their stamina at the tournament square. The further the building is upgraded the faster your troops are beyond a minimum distance of 30 squares. <br>
<br>
<b>Costs</b> and <b>construction time</b> for level 1: <br>
<img src=img/un/res/1.gif width=18 height=12 alt=Lumber " title="
Lumber " style="padding-top: 4px" />
1750 | <img src=img/un/res/2.gif width=18 height=12 alt="Clay" title="Clay">
2250 | <img src="img/un/res/3.gif" width=18 height=12 alt="Iron" title="Iron">
1530 | <img src=img/un/res/4.gif width=18 height=12 alt="Crop" title="Crop">
240 | <img src=img/un/res/5.gif width=18 height=12 alt="Crop consumption" title="Crop consumption">
1 | <img src=img/un/h/clock.gif width=18 height=12>
0:58:20 <br>
<br>
<b>
Prerequisites: </b>
<br>
Rally Point Level 15</p>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<div class="container">
<a href="#" class="logo"><img src="img/x.gif" alt="Travian Games" class="logo_traviangames" /></a>
<li class="copyright">&copy; <?php echo TRAVIAN_COPYRIGHT; ?></li>
</div>
</div>
</div>
+77
View File
@@ -0,0 +1,77 @@
<p><img src="img/un/h/faq_vp.jpg" width="116" height="128" border="0" alt="Rally point" title="Rally point" align="right"></p>
<p class="question">How can I build a rally point?</p>
<p class="answer">The rally point can only be built at one location. This location is found to the right of your villages centre on the meadow.</p>
<p><img src="img/un/h/faq_botschaft.jpg" width="122" height="150" border="0" alt="Embassy" title="Embassy" align="left"></p>
<p class="question">How can I found an alliance?</p>
<p class="answer">To found an alliance you need an embassy at level 3. To be able to join an alliance you just need an embassy at level 1 and, of course, an invitation to join the alliance.</p>
<p class="question">How can I change the name of my village?</p>
<p class="answer">First select the village you wish to remain by clicking it under <i>Villages</i>. Next click <i>Profile</i> at the left then <i>Change Profile</i>. Change the name in the <i>Village name</i> box and click OK.</p>
<p class="question">How do I train troops?</p>
<p class="answer">You need a rally point which is at least level 1 and a main building which is at least level 3. When you have those you can raise Barracks and there you can train infantry.</p>
<p class="question">How do I defend my village?</p>
<p class="answer">As long as there are troops (your own or troops sent to reinforce you) in your village they defend your village automatically.</p>
<p class="answer">Each building increases the population of your village by a certain number of new inhabitants. How many new inhabitants are produced by raising/extending a building is shown next to the symbol <img src="img/un/res/5.gif" width="18" height="12" border="0" alt="Use of crop" title="use of crop">.</p>
<p class="question">Help, my crop production sinks more and more!</p>
<p class="answer">At <i>Production</i> (e.g. 10) your crop production minus your use of crop because of <i>population</i> (e.g. 5) and <i>Troops</i> is shown. Your total crop production is shown in the upper right corner. e.g. <img src="img/un/res/5.gif" width="18" height="12" border="0" alt="use of crop" title="use of crop"> 5/15
<br>In the example 8 would be your use of crop, 15 your total crop production, <br>15 - 8 = 7 units of crop per hour. </p>
<p class="question">Why do my troops plunder so few resources?</p>
<p class="answer">There are two explanations. Firstly, each troop type can only carry a certain number of resources. Secondly, your victim might have a <i>cranny</i> where his or her villagers automatically hide a certain number of resources that your plundering hordes cannot find.</p>
<p class="question">How can I found or conquer new villages?</p>
<p class="answer">You need three settlers to found a new village. To conquer a village you need an administrator (senator, chief or chieftain) which can be trained in your palace/residence at level 10. Additionally you need a certain number of <a href="anleitung.php?s=4">culture points</a>.</p>
<p class="question">Can I lose a village?</p>
<p class="answer">Every village can be catapulted to 0 inhabitants and as long as it is not the last of your account it will disappear after a short time. The only village that cannot be conquered is the capital. Note that destroying the capital is still possible.</p>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<div class="container">
<a href="#" class="logo"><img src="img/x.gif" alt="Travian Games" class="logo_traviangames" /></a>
<li class="copyright">&copy; <?php echo TRAVIAN_COPYRIGHT; ?></li>
</div>
</div>
</div>
File diff suppressed because it is too large Load Diff
+25
View File
@@ -0,0 +1,25 @@
<div id="build" class="gid1"><a href="#" onClick="return Popup(0,4);" class="build_logo">
<img class="building g1" src="img/x.gif" alt="<?php echo B1; ?>" title="<?php echo B1; ?>" />
</a>
<h1><?php echo B1; ?> <span class="level"><?php echo LEVEL." "; echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc"><?php echo B1_DESC; ?></p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th><?php echo CUR_PROD; ?>:</th>
<td><b><?php echo $bid1[$village->resarray['f'.$id]]['prod']* SPEED; ?></b> <?php echo PER_HR; ?></td>
</tr>
<?php
if(!$building->isMax($village->resarray['f'.$id.'t'],$id)) {
?>
<tr>
<th><?php echo NEXT_PROD; echo $village->resarray['f'.$id]+1; ?>:</th>
<td><b><?php echo $bid1[$village->resarray['f'.$id]+1]['prod']* SPEED; ?></b> <?php echo PER_HR; ?></td>
</tr>
<?php
}
?>
</table>
<?php
include("upgrade.tpl");
?>
</p></div>
+27
View File
@@ -0,0 +1,27 @@
<div id="build" class="gid10"><a href="#" onClick="return Popup(10,4);" class="build_logo">
<img class="building g10" src="img/x.gif" alt="Warehouse" title="Warehouse" />
</a>
<h1>Warehouse <span class="level">Level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">The resources wood, clay and iron are stored in your Warehouse. By increasing its level you increase your Warehouse's capacity. .</p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th>Current capacity:</th>
<td><b><?php echo $bid10[$village->resarray['f'.$id]]['attri']*STORAGE_MULTIPLIER; ?></b> units</td>
</tr>
<tr>
<?php
if(!$building->isMax($village->resarray['f'.$id.'t'],$id)) {
?>
<th>Capacity at level <?php echo $village->resarray['f'.$id]+1; ?>:</th>
<td><b><?php echo $bid10[$village->resarray['f'.$id]+1]['attri']*STORAGE_MULTIPLIER; ?></b> units</td>
<?php
}
?>
</tr>
</table>
<?php
include("upgrade.tpl");
?>
</p></div>
+28
View File
@@ -0,0 +1,28 @@
<div id="build" class="gid11"><a href="#" onClick="return Popup(11,4);" class="build_logo">
<img class="building g11" src="img/x.gif" alt="Granary" title="Granary" />
</a>
<h1>Granary <span class="level">Level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">Crop produced by your farms is stored in the Granary. By increasing its level you increase the Granary's capacity.</p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th>Current capacity:</th>
<td><b><?php echo $bid11[$village->resarray['f'.$id]]['attri']*STORAGE_MULTIPLIER; ?></b> units</td>
</tr>
<tr>
<?php
if(!$building->isMax($village->resarray['f'.$id.'t'],$id)) {
?>
<th>Capacity at level <?php echo $village->resarray['f'.$id]+1; ?>:</th>
<td><b><?php echo $bid11[$village->resarray['f'.$id]+1]['attri']*STORAGE_MULTIPLIER; ?></b> units</td>
<?php
}
?>
</tr>
</table>
<?php
include("upgrade.tpl");
?>
</p></div>
+16
View File
@@ -0,0 +1,16 @@
<div id="build" class="gid12"><a href="#" onClick="return Popup(12,4);" class="build_logo">
<img class="building g12" src="img/x.gif" alt="Blacksmith" title="Blacksmith" />
</a>
<h1>Blacksmith <span class="level">Level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">In the blacksmith's melting furnaces your warriors' weapons are enhanced. By increasing its level you can order the fabrication of even better weapons.
<?php
if ($building->getTypeLevel(12) > 0) {
include("12_upgrades.tpl");
} else {
echo "<p><b>Upgrades can commence when blacksmith is completed.</b><br>\n";
}
include("upgrade.tpl");
?>
</p>
</div>
+78
View File
@@ -0,0 +1,78 @@
<table cellpadding="1" cellspacing="1" class="build_details">
<thead>
<tr>
<td>Blacksmith</td>
<td>Action</td>
</tr>
</thead>
<tbody>
<tr>
<?php
$abdata = $database->getABTech($village->wid);
$ABups = $technology->getABUpgrades('b');
for($i=($session->tribe*10-9);$i<=($session->tribe*10-2);$i++) {
$j = $i % 10 ;
if ( $technology->getTech($i) || $j == 1 ) {
echo "<tr><td class=\"desc\"><div class=\"tit\">
<img class=\"unit u".$i."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" />
<a href=\"#\" onClick=\"return Popup(".$i.",1);\">".$technology->getUnitName($i)."</a> (Level ".$abdata['b'.$j].")
</div>";
if($abdata['b'.$j] != 20) {
echo "<div class=\"details\"><img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".${'ab'.$i}[$abdata['b'.$j]+1]['wood']."|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".${'ab'.$i}[$abdata['b'.$j]+1]['clay']."|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".${'ab'.$i}[$abdata['b'.$j]+1]['iron']."|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".${'ab'.$i}[$abdata['b'.$j]+1]['crop']."|<img class=\"clock\" src=\"img/x.gif\" alt=\"duration\" title=\"duration\" />";
echo $generator->getTimeFormat(round(${'ab'.$i}[$abdata['b'.$j]+1]['time']*($bid12[$building->getTypeLevel(12)]['attri'] / 100)/SPEED));
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
echo "|<a href=\"build.php?gid=17&t=3&r1=".${'ab'.$i}[$abdata['b'.$j]+1]['wood']."&r2=".${'ab'.$i}[$abdata['b'.$j]+1]['clay']."&r3=".${'ab'.$i}[$abdata['b'.$j]+1]['iron']."&r4=".${'ab'.$i}[$abdata['b'.$j]+1]['crop']."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
}
}
if($abdata['b'.$j] == 20) {
echo "<td class=\"act\"><div class=\"none\">Maximum<br>level</div></td></tr>";
}
else if(${'ab'.$i}[$abdata['b'.$j]+1]['wood'] > $village->maxstore || ${'ab'.$i}[$abdata['b'.$j]+1]['clay'] > $village->maxstore || ${'ab'.$i}[$abdata['b'.$j]+1]['iron'] > $village->maxstore) {
echo "<td class=\"act\"><div class=\"none\">Expand<br>warehouse</div></td></tr>";
}
else if (${'ab'.$i}[$abdata['b'.$j]+1]['crop'] > $village->maxcrop) {
echo "<td class=\"act\"><div class=\"none\">Expand<br>granary</div></td></tr>";
}
else if (${'ab'.$i}[$abdata['b'.$j]+1]['wood'] > $village->awood || ${'ab'.$i}[$abdata['b'.$j]+1]['clay'] > $village->aclay || ${'ab'.$i}[$abdata['b'.$j]+1]['iron'] > $village->airon || ${'ab'.$i}[$abdata['b'.$j]+1]['crop'] > $village->acrop) {
if($village->getProd("crop")>0 || $village->acrop > ${'ab'.$i}[$abdata['b'.$j]+1]['crop']){
$time = $technology->calculateAvaliable(12,${'ab'.$i}[$abdata['b'.$j]+1]);
echo "<br><span class=\"none\">Enough resources ".$time[0]." at ".$time[1]."</span></div></td>";
} else {
echo "<br><span class=\"none\">Crop production is negative so you will never reach the required resources</span></div></td>";
}
echo "<td class=\"act\"><div class=\"none\">Too few<br>resources</div></td></tr>";
}
else if ($building->getTypeLevel(12) <= $abdata['b'.$j]) {
echo "<td class=\"act\"><div class=\"none\">Upgrade<br>blacksmith</div></td></tr>";
}
else if (count($ABups) > 0) {
echo "<td class=\"act\"><div class=\"none\">Upgrade in<br>progress</div></td></tr>";
}
else if($session->access != BANNED){
echo "<td class=\"act\"><a class=\"research\" href=\"build.php?id=$id&amp;a=$j&amp;c=".$session->mchecker."\">Upgrade</a></td></tr>";
}else{
echo "<td class=\"act\"><a class=\"research\" href=\"banned.php\">Upgrade</a></td></tr>";
}
}
}
?>
</tbody>
</table>
<?php
if(count($ABups) > 0) {
echo "<table cellpadding=\"1\" cellspacing=\"1\" class=\"under_progress\"><thead><tr><td>Upgrading</td><td>Duration</td><td>Complete</td></tr>
</thead><tbody>";
$timer = 1;
foreach($ABups as $black) {
$unit = ($session->tribe-1)*10 + substr($black['tech'],1,2);
echo "<tr><td class=\"desc\"><img class=\"unit u$unit\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($unit)."\" title=\"".$technology->getUnitName($unit)."\" />".$technology->getUnitName($unit)."</td>";
echo "<td class=\"dur\"><span id=\"timer$timer\">".$generator->getTimeFormat($black['timestamp']-time())."</span></td>";
$date = $generator->procMtime($black['timestamp']);
echo "<td class=\"fin\"><span>".$date[1]."</span><span> hrs</span></td>";
echo "</tr>";
$timer +=1;
}
echo "</tbody></table>";
}
?>
+16
View File
@@ -0,0 +1,16 @@
<div id="build" class="gid13"><a href="#" onClick="return Popup(13,4);" class="build_logo">
<img class="building g13" src="img/x.gif" alt="Armoury" title="Armoury" />
</a>
<h1>Armoury <span class="level">Level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">In the armoury&#39;s melting furnaces your warriors&#39; armour is enhanced. By increasing its level you can order the fabrication of even better armour.
<?php
if ($building->getTypeLevel(13) > 0) {
include("13_upgrades.tpl");
} else {
echo "<p><b>Upgrades can commence when armoury is completed.</b><br>\n";
}
include("upgrade.tpl");
?>
</p>
</div>
+78
View File
@@ -0,0 +1,78 @@
<table cellpadding="1" cellspacing="1" class="build_details">
<thead>
<tr>
<td>Armoury</td>
<td>Action</td>
</tr>
</thead>
<tbody>
<tr>
<?php
$abdata = $database->getABTech($village->wid);
$ABups = $technology->getABUpgrades('a');
for($i=($session->tribe*10-9);$i<=($session->tribe*10-2);$i++) {
$j = $i % 10 ;
if ( $technology->getTech($i) || $j == 1 ) {
echo "<tr><td class=\"desc\"><div class=\"tit\">
<img class=\"unit u".$i."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" />
<a href=\"#\" onClick=\"return Popup(".$i.",1);\">".$technology->getUnitName($i)."</a> (Level ".$abdata['a'.$j].")
</div>";
if($abdata['a'.$j] != 20) {
echo "<div class=\"details\"><img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".${'ab'.$i}[$abdata['a'.$j]+1]['wood']."|<img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".${'ab'.$i}[$abdata['a'.$j]+1]['clay']."|<img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".${'ab'.$i}[$abdata['a'.$j]+1]['iron']."|<img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".${'ab'.$i}[$abdata['a'.$j]+1]['crop']."|<img class=\"clock\" src=\"img/x.gif\" alt=\"duration\" title=\"duration\" />";
echo $generator->getTimeFormat(round(${'ab'.$i}[$abdata['a'.$j]+1]['time']*($bid13[$building->getTypeLevel(13)]['attri'] / 100)/SPEED));
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
echo "|<a href=\"build.php?gid=17&t=3&r1=".${'ab'.$i}[$abdata['a'.$j]+1]['wood']."&r2=".${'ab'.$i}[$abdata['a'.$j]+1]['clay']."&r3=".${'ab'.$i}[$abdata['a'.$j]+1]['iron']."&r4=".${'ab'.$i}[$abdata['a'.$j]+1]['crop']."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
}
}
if($abdata['a'.$j] == 20) {
echo "<td class=\"act\"><div class=\"none\">Maximum<br>level</div></td></tr>";
}
else if(${'ab'.$i}[$abdata['a'.$j]+1]['wood'] > $village->maxstore || ${'ab'.$i}[$abdata['a'.$j]+1]['clay'] > $village->maxstore || ${'ab'.$i}[$abdata['a'.$j]+1]['iron'] > $village->maxstore) {
echo "<td class=\"act\"><div class=\"none\">Expand<br>warehouse</div></td></tr>";
}
else if (${'ab'.$i}[$abdata['a'.$j]+1]['crop'] > $village->maxcrop) {
echo "<td class=\"act\"><div class=\"none\">Expand<br>granary</div></td></tr>";
}
else if (${'ab'.$i}[$abdata['a'.$j]+1]['wood'] > $village->awood || ${'ab'.$i}[$abdata['a'.$j]+1]['clay'] > $village->aclay || ${'ab'.$i}[$abdata['a'.$j]+1]['iron'] > $village->airon || ${'ab'.$i}[$abdata['a'.$j]+1]['crop'] > $village->acrop) {
if($village->getProd("crop")>0 || $village->acrop > ${'ab'.$i}[$abdata['a'.$j]+1]['crop']){
$time = $technology->calculateAvaliable(13,${'ab'.$i}[$abdata['a'.$j]+1]);
echo "<br><span class=\"none\">Enough resources ".$time[0]." at ".$time[1]."</span></div></td>";
} else {
echo "<br><span class=\"none\">Crop production is negative so you will never reach the required resources</span></div></td>";
}
echo "<td class=\"act\"><div class=\"none\">Too few<br>resources</div></td></tr>";
}
else if ($building->getTypeLevel(13) <= $abdata['a'.$j]) {
echo "<td class=\"act\"><div class=\"none\">Upgrade<br>armoury</div></td></tr>";
}
else if (count($ABups) > 0) {
echo "<td class=\"act\"><div class=\"none\">Upgrade in<br>progress</div></td></tr>";
}
else if($session->access != BANNED){
echo "<td class=\"act\"><a class=\"research\" href=\"build.php?id=$id&amp;a=$j&amp;c=".$session->mchecker."\">Upgrade</a></td></tr>";
}else{
echo "<td class=\"act\"><a class=\"research\" href=\"banned.php\">Upgrade</a></td></tr>";
}
}
}
?>
</tbody>
</table>
<?php
if(count($ABups) > 0) {
echo "<table cellpadding=\"1\" cellspacing=\"1\" class=\"under_progress\"><thead><tr><td>Upgrading</td><td>Duration</td><td>Complete</td></tr>
</thead><tbody>";
$timer = 1;
foreach($ABups as $arms) {
$unit = ($session->tribe-1)*10 + substr($arms['tech'],1,2);
echo "<tr><td class=\"desc\"><img class=\"unit u$unit\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($unit)."\" title=\"".$technology->getUnitName($unit)."\" />".$technology->getUnitName($unit)."</td>";
echo "<td class=\"dur\"><span id=\"timer$timer\">".$generator->getTimeFormat($arms['timestamp']-time())."</span></td>";
$date = $generator->procMtime($arms['timestamp']);
echo "<td class=\"fin\"><span>".$date[1]."</span><span> hrs</span></td>";
echo "</tr>";
$timer +=1;
}
echo "</tbody></table>";
}
?>
+27
View File
@@ -0,0 +1,27 @@
<div id="build" class="gid14"><a href="#" onClick="return Popup(14,4);" class="build_logo">
<img class="building g14" src="img/x.gif" alt="Tournament Square" title="Tournament Square" />
</a>
<h1>Tournament Square <span class="level">Level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">At the Tournament Square your troops can train their stamina. The further the building is upgraded the faster your troops are beyond a minimum distance of <?php echo TS_THRESHOLD ?> squares.</p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th>Current speed bonus:</th>
<td><b><?php echo $bid14[$village->resarray['f'.$id]]['attri']; ?></b> Percent</td>
</tr>
<tr>
<?php
if(!$building->isMax($village->resarray['f'.$id.'t'],$id)) {
?>
<th>Speed bonus at level <?php echo $village->resarray['f'.$id]+1; ?>:</th>
<td><b><?php echo $bid14[$village->resarray['f'.$id]+1]['attri']; ?></b> Percent</td>
<?php
}
?>
</tr>
</table>
<?php
include("upgrade.tpl");
?>
</p></div>
+31
View File
@@ -0,0 +1,31 @@
<div id="build" class="gid15"><a href="#" onClick="return Popup(15,4);" class="build_logo">
<img class="building g15" src="img/x.gif" alt="Main Building" title="Main Building" />
</a>
<h1>Main Building <span class="level">Level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">In the main building the village's master builders live. The higher its level the faster your master builders complete the construction of new buildings.</p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th>Current construction time:</th>
<td><b><?php echo round($bid15[$village->resarray['f'.$id]]['attri']); ?></b> Percent</td>
</tr>
<tr>
<?php
if(!$building->isMax($village->resarray['f'.$id.'t'],$id)) {
?>
<th>Construction time at level <?php echo $village->resarray['f'.$id]+1; ?>:</th>
<td><b><?php echo round($bid15[$village->resarray['f'.$id]+1]['attri']); ?></b> Percent</td>
<?php
}
?>
</tr>
</table>
<?php
if($village->resarray['f'.$id] >= 10){
include("Templates/Build/15_1.tpl");
}
include("upgrade.tpl");
?>
</p></div>
+39
View File
@@ -0,0 +1,39 @@
<?php
if($_REQUEST["cancel"] == "1") {
$database->delDemolition($village->wid);
header("Location: build.php?gid=15&amp;cancel=0&amp;demolish=0");
}
if(!empty($_REQUEST["demolish"]) && $_REQUEST["c"] == $session->mchecker) {
if($_REQUEST["type"] != null) {
$type = $_REQUEST['type'];
$database->addDemolition($village->wid,$type);
$session->changeChecker();
header("Location: build.php?gid=15&amp;cancel=0&amp;demolish=0");
}
}
if($village->resarray['f'.$id] >= DEMOLISH_LEVEL_REQ) {
echo "<h2>Demolition of the building:</h2><p>If you no longer need a building, you can order the demolition of the building.</p>";
$VillageResourceLevels = $database->getResourceLevel($village->wid);
$DemolitionProgress = $database->getDemolition($village->wid);
if (!empty($DemolitionProgress)) {
$Demolition = $DemolitionProgress[0];
echo "<b>";
echo "<a href='build.php?id=26&cancel=1'><img src='img/x.gif' class='del' title='cancel' alt='cancel'></a> ";
echo "Demolition of ".$building->procResType($VillageResourceLevels['f'.$Demolition['buildnumber'].'t']).": <span id=timer1>".$generator->getTimeFormat($Demolition['timetofinish']-time())."</span>";
echo "</b>";
} else {
echo "
<form action=\"build.php?gid=15&amp;demolish=1&amp;cancel=0&amp;c=".$session->mchecker."\" method=\"POST\" style=\"display:inline\">
<select name=\"type\" class=\"dropdown\">";
for ($i=19; $i<=41; $i++) {
if ($VillageResourceLevels['f'.$i] >= 1 && !$building->isCurrent($i) && !$building->isLoop($i)) {
echo "<option value=".$i.">".$i.". ".$building->procResType($VillageResourceLevels['f'.$i.'t'])." (lvl ".$VillageResourceLevels['f'.$i].")</option>";
}
}
echo "</select><input id=\"btn_demolish\" name=\"demolish\" class=\"dynamic_img\" value=\"Demolish\" type=\"image\" src=\"img/x.gif\" alt=\"Demolish\" title=\"Demolish\" /></form>";
}
}
?>
+120
View File
@@ -0,0 +1,120 @@
<div id="build" class="gid16"><a href="#" onClick="return Popup(16,4);" class="build_logo">
<img class="g16" src="img/x.gif" alt="Rally point" title="Rally point" />
</a>
<h1>Rally point <span class="level">level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.</p>
<div id="textmenu">
<a href="build.php?id=<?php echo $id; ?>">Overview</a> |
<a href="a2b.php">Send troops</a> |
<a href="warsim.php">Combat Simulator</a></div>
<?php
$units_type = $database->getMovement("34",$village->wid,1);
$units_incoming = count($units_type);
for($i=0;$i<$units_incoming;$i++){
if($units_type[$i]['attack_type'] == 1)
$units_incoming -= 1;
}
if($units_incoming >= 1){
?>
<h4>Incoming troops (<?php echo $units_incoming; ?>)</h4>
<?php include("16_incomming.tpl");
}
?>
<h4>Troops in the village</h4>
<table class="troop_details" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td><td colspan="<?php if($village->unitarray['hero'] == 0) {echo"10";}else{echo"11";}?>">
<a href="spieler.php?uid=<?php echo $session->uid; ?>">Own troops</a></td></tr></thead>
<tbody class="units">
<?php include("16_troops.tpl");
?>
</tbody></table>
<?php
if(count($village->enforcetome) > 0) {
foreach($village->enforcetome as $enforce) {
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$enforce['from']."&c=".$generator->getMapCheck($enforce['from'])."\">".$database->getVillageField($enforce['from'],"name")."</a></td>
<td colspan=\"10\">";
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0);
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($start+9);$i++) {
if($enforce['u'.$i] == 0) {
echo "<td class=\"none\">";
}
else {
echo "<td>";
}
echo $enforce['u'.$i]."</td>";
}
echo "</tr></tbody>
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"10\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?w=".$enforce['id']."'>Send back</a></div></td></tr>";
echo "</tbody></table>";
}
}
if(count($village->enforcetoyou) > 0) {
echo "<h4>Troops in other village</h4>";
foreach($village->enforcetoyou as $enforce) {
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$enforce['vref']."&c=".$generator->getMapCheck($enforce['vref'])."\">".$database->getVillageField($enforce['vref'],"name")."</a></td>
<td colspan=\"10\">";
echo "<a href=\"spieler.php?uid=".$database->getVillageField($enforce['from'],"owner")."\">".$database->getUserField($database->getVillageField($enforce['from'],"owner"),"username",0)." troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$tribe = $database->getUserField($database->getVillageField($enforce['from'],"owner"),"tribe",0);
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($start+9);$i++) {
if($enforce['u'.$i] == 0) {
echo "<td class=\"none\">";
}
else {
echo "<td>";
}
echo $enforce['u'.$i]."</td>";
}
echo "</tr></tbody>
<tbody class=\"infos\"><tr><th>Upkeep</th><td colspan=\"10\"><div class='sup'>".$technology->getUpkeep($enforce,$tribe)."<img class=\"r4\" src=\"img/x.gif\" title=\"Crop\" alt=\"Crop\" />per hour</div><div class='sback'><a href='a2b.php?r=".$enforce['id']."'>Send back</a></div></td></tr>";
echo "</tbody></table>";
}
}
?>
<?php
$units_type = $database->getMovement("3",$village->wid,0);
$settlers = $database->getMovement("5",$village->wid,0);
$units_incoming = count($units_type);
for($i=0;$i<$units_incoming;$i++){
if($units_type[$i]['vref'] != $village->wid)
$units_incoming -= 1;
}
$units_incoming += count($settlers);
if($units_incoming >= 1){
echo "<h4>Troops on their way</h4>";
include("16_walking.tpl");
}
include("upgrade.tpl");
?>
</p></div>
+134
View File
@@ -0,0 +1,134 @@
<?php
$units = $database->getMovement("34",$village->wid,1);
$total_for = count($units);
for($y=0;$y < $total_for;$y++){
$timer = $y+1;
if ($units[$y]['sort_type']==3){
if ($units[$y]['attack_type']==3){
$actionType = "Attack on ";
} else if ($units[$y]['attack_type']==4){
$actionType = "Raid on ";
}
if($units[$y]['attack_type'] != 1){
echo "<table class=\"troop_details\" cellpadding=\"1\" cellspacing=\"1\"><thead><tr><td class=\"role\">
<a href=\"karte.php?d=".$units[$y]['from']."&c=".$generator->getMapCheck($units[$y]['from'])."\">".$database->getVillageField($units[$y]['from'],"name")."</a></td>
<td colspan=\"10\">";
echo "<a href=\"spieler.php?uid=".$database->getVillageField($units[$y]['from'],"owner")."\">".$database->getUserField($database->getVillageField($units[$y]['from'],"owner"),"username",0)."'s troops</a>";
echo "</td></tr></thead><tbody class=\"units\">";
$tribe = $database->getUserField($database->getVillageField($units[$y]['from'],"owner"),"tribe",0);
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
echo "</tr><tr><th>Troops</th>";
for($i=$start;$i<=($end);$i++) {
$tribe1 = $tribe-1;
$totalunits = $units[$y]['t'.$tribe1*10+1]+$units[$y]['t'.$tribe1*10+2]+$units[$y]['t'.$tribe1*10+3]+$units[$y]['t'.$tribe1*10+4]+$units[$y]['t'.$tribe1*10+5]+$units[$y]['t'.$tribe1*10+6]+$units[$y]['t'.$tribe1*10+7]+$units[$y]['t'.$tribe1*10+8]+$units[$y]['t'.$tribe1*10+9]+$units[$y]['t'.$tribe1*10+10];
if($totalunits > $building->getTypeLevel(16)){
echo "<td class=\"none\">?</td>";
}else{
if($units[$y]['t'.$i] == 0) {
echo "<td class=\"none\">0</td>";
}else{
echo "<td>?</td>";
}
}
}
echo "</tr></tbody>";
echo '
<tbody class="infos">
<tr>
<th>Arrival</th>
<td colspan="10">
<div class="in small"><span id=timer'.$timer.'>'.$generator->getTimeFormat($units[$y]['endtime']-time()).'</span> h</div>';
$datetime = $generator->procMtime($units[$y]['endtime']);
echo "<div class=\"at small\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>
</div>
</td>
</tr>
</tbody>";
echo "</table>";
}
}else if ($units[$y]['sort_type']==4){
if ($units[$y]['attack_type']==1){
$actionType = "Return from ";
} else if ($units[$y]['attack_type']==2){
$actionType = "Reinforment for ";
} else if ($units[$y]['attack_type']==3){
$actionType = "Return from ";
} else if ($units[$y]['attack_type']==4){
$actionType = "Return from ";
}
$to = $database->getMInfo($units[$y]['vref']);
?>
<table class="troop_details" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td>
<td colspan="<?php if($units[$y]['t11'] != 0) {echo"11";}else{echo"10";}?>"><a href="karte.php?d=<?php echo $to['wref']."&c=".$generator->getMapCheck($to['wref']); ?>"><?php echo "Returning to ".$to['name']; ?></a></td>
</tr>
</thead>
<tbody class="units">
<?php
$tribe = $session->tribe;
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($units[$y]['t11'] != 0) {
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
?>
</tr>
<tr><th>Troops</th>
<?php
for($i=1;$i<($units[$y]['t11'] != 0?12:11);$i++) {
if($units[$y]['t'.$i] == 0) {
echo "<td class=\"none\">?</td>";
}
else {
echo "<td>";
}
echo $units[$y]['t'.$i]."</td>";
}
?>
</tr></tbody>
<tbody class="infos">
<tr>
<th>Arrival</th>
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
<?php
echo "<div class=\"in small\"><span id=timer".$timer.">".$generator->getTimeFormat($units[$y]['endtime']-time())."</span> h</div>";
$datetime = $generator->procMtime($units[$y]['endtime']);
echo "<div class=\"at small\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>";
?>
</div>
</td>
</tr>
</tbody>
</table>
<?php
}
}
//}
?>
+34
View File
@@ -0,0 +1,34 @@
<?php
$tribe = $session->tribe;
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($village->unitarray['hero'] != 0) {
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
?>
</tr><tr><th>Troops</th>
<?php
for($i=$start;$i<=$end;$i++) {
if($village->unitarray['u'.$i] == 0) {
echo "<td class=\"none\">";
}
else {
echo "<td>";
}
echo $village->unitarray['u'.$i]."</td>";
}
if($village->unitarray['hero'] != 0) {
echo "<td>";
echo $village->unitarray['hero']."</td>";
}
?>
</tr></tbody>
<tbody class="infos"><tr><th>Upkeep</th>
<td colspan="<?php if($village->unitarray['hero'] == 0) {echo"10";}else{echo"11";}?>"><?php echo $technology->getUpkeep($village->unitarray,0); ?><img class="r4" src="img/x.gif" title="Crop" alt="Crop" />per hour</td></tr>
+150
View File
@@ -0,0 +1,150 @@
<?php
$units = $database->getMovement(3,$village->wid,0);
$total_for = count($units);
for($y=0;$y<$total_for;$y++){
$timer += 1;
if($units[$y]['attack_type'] == 2){
$attack_type = "Reinforcing";
}
if($units[$y]['attack_type'] == 1){
$attack_type = "Scouting";
}
if($units[$y]['attack_type'] == 3){
$attack_type = "Attack to";
}
if($units[$y]['attack_type'] == 4){
$attack_type = "Raid to";
}
$isoasis = $database->isVillageOases($units[$y]['to']);
if ($isoasis ==0){
$to = $database->getMInfo($units[$y]['to']);
} else {
$to = $database->getOMInfo($units[$y]['to']);}
?>
<table class="troop_details" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td>
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>"><a href="karte.php?d=<?php echo $to['wref']."&c=".$generator->getMapCheck($to['wref']); ?>"><?php echo $attack_type." ".$to['name']; ?></a></td>
</tr>
</thead>
<tbody class="units">
<?php
echo "<tr><th>&nbsp;</th>";
for($i=($session->tribe-1)*10+1;$i<=$session->tribe*10;$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
if($units[$y]['t11'] != 0) {
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
}
?>
</tr>
<tr><th>Troops</th>
<?php
if($units[$y]['t11'] != 0) {
$end = 12;
}else{
$end = 11;
}
for($i=1;$i<$end;$i++) {
if($units[$y]['t'.$i] == 0) {
echo "<td class=\"none\">";
}
else {
echo "<td>";
}
echo $units[$y]['t'.$i]."</td>";
}
?>
</tr></tbody>
<tbody class="infos">
<tr>
<th>Arrival</th>
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
<?php
echo "<div class=\"in small\"><span id=timer$timer>".$generator->getTimeFormat($units[$y]['endtime']-time())."</span> h</div>";
$datetime = $generator->procMtime($units[$y]['endtime']);
echo "<div class=\"at small\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>";
?>
<!--<div class="abort"><a href="build.php?id=39&a=4&t=5360004"><img src="img/x.gif" class="del" title="Annuleren" alt="Annuleren" /></a>-->
</div>
</td>
</tr>
</tbody>
</table>
<?php
}
?>
<?php
$settlers = $database->getMovement(5,$village->wid,0);
if($settlers){
$total_for = count($settlers);
for($y=0;$y<$total_for;$y++){
$timer += 1;
?>
<table class="troop_details" cellpadding="1" cellspacing="1">
<thead>
<tr>
<td class="role"><a href="karte.php?d=<?php echo $village->wid."&c=".$generator->getMapCheck($village->wid); ?>"><?php echo $village->vname; ?></a></td>
<td colspan="10"><a href="karte.php?d=<?php echo $settlers[$y]['to']."&c=".$generator->getMapCheck($settlers[$y]['to']); ?>">Found new village.</a></td>
</tr>
</thead>
<tbody class="units">
<?php
$tribe = $session->tribe;
$start = ($tribe-1)*10+1;
$end = ($tribe*10);
echo "<tr><th>&nbsp;</th>";
for($i=$start;$i<=($end);$i++) {
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
}
?>
</tr>
<tr><th>Troops</th>
<?php
$units[$y]['t10']=3;
for($i=1;$i<=10;$i++) {
if($units[$y]['t'.$i] == 0) {
echo "<td class=\"none\">";
}
else {
echo "<td>";
}
echo $units[$y]['t'.$i]."</td>";
}
?>
</tr></tbody>
<tbody class="infos">
<tr>
<th>Arrival</th>
<td colspan="<?php if($units[$y]['t11'] == 0) {echo"10";}else{echo"11";}?>">
<?php
echo "<div class=\"in small\"><span id=timer$timer>".$generator->getTimeFormat($settlers[$y]['endtime']-time())."</span> h</div>";
$datetime = $generator->procMtime($settlers[$y]['endtime']);
echo "<div class=\"at small\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>";
?>
<!--<div class="abort"><a href="build.php?id=39&a=4&t=5360004"><img src="img/x.gif" class="del" title="Annuleren" alt="Annuleren" /></a>-->
</div>
</td>
</tr>
</tbody>
</table>
<?php
}
}
?>
+174
View File
@@ -0,0 +1,174 @@
<div id="build" class="gid17"><a href="#" onClick="return Popup(17,4);" class="build_logo">
<img class="building g17" src="img/x.gif" alt="Marketplace" title="Marketplace" />
</a>
<h1>Marketplace <span class="level">level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">At the Marketplace you can trade resources with other players. The higher its level, the more resources can be transported at the same time.
</p>
<?php include("17_menu.tpl"); ?>
<script language="JavaScript">
<!--
var haendler = <?php echo $market->merchantAvail(); ?>;
var carry = <?php echo $market->maxcarry; ?>;
//-->
</script><form method="POST" name="snd" action="build.php">
<input type="hidden" name="ft" value="mk1">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<table id="send_select" class="send_res" cellpadding="1" cellspacing="1"><tr>
<td class="ico">
<a href="#" onClick="upd_res(1,1); return false;"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /></a>
</td>
<td class="nam">
Lumber:
</td>
<td class="val">
<input class="text" type="text" name="r1" id="r1" value="" maxlength="5" onKeyUp="upd_res(1)" tabindex="1">
</td>
<td class="max">
<a href="#" onMouseUp="add_res(1);" onClick="return false;">(<?php echo $market->maxcarry; ?>)</a>
</td>
</tr><tr>
<td class="ico">
<a href="#" onClick="upd_res(2,1); return false;"><img class="r2" src="img/x.gif" alt="Clay" title="Clay" /></a>
</td>
<td class="nam">
Clay:
</td>
<td class="val">
<input class="text" type="text" name="r2" id="r2" value="" maxlength="5" onKeyUp="upd_res(2)" tabindex="2">
</td>
<td class="max">
<a href="#" onMouseUp="add_res(2);" onClick="return false;">(<?php echo$market->maxcarry; ?>)</a>
</td>
</tr><tr>
<td class="ico">
<a href="#" onClick="upd_res(3,1); return false;"><img class="r3" src="img/x.gif" alt="Iron" title="Iron" /></a>
</td>
<td class="nam">
Iron:
</td>
<td class="val">
<input class="text" type="text" name="r3" id="r3" value="" maxlength="5" onKeyUp="upd_res(3)" tabindex="3">
</td>
<td class="max">
<a href="#" onMouseUp="add_res(3);" onClick="return false;">(<?php echo $market->maxcarry; ?>)</a>
</td>
</tr><tr>
<td class="ico">
<a href="#" onClick="upd_res(4,1); return false;"><img class="r4" src="img/x.gif" alt="Crop" title="Crop" /></a>
</td>
<td class="nam">
Crop:
</td>
<td class="val">
<input class="text" type="text" name="r4" id="r4" value="" maxlength="5" onKeyUp="upd_res(4)" tabindex="4">
</td>
<td class="max">
<a href="#" onMouseUp="add_res(4);" onClick="return false;">(<?php echo $market->maxcarry; ?>)</a>
</td>
</tr></table>
<table id="target_select" class="res_target" cellpadding="1" cellspacing="1">
<tr>
<td class="mer">Merchants <?php echo $market->merchantAvail(); ?>/<?php echo $market->merchant; ?></td>
</tr>
<tr>
<td class="vil">
<span>Villages:</span>
<input class="text" type="text" name="dname" value="" maxlength="20" tabindex="5">
</td>
<tr>
<td class="or">or</td>
</tr>
<tr>
<?php
if(isset($_GET['z'])){
$coor = $database->getCoor($_GET['z']);
}
else{
$coor['x'] = "";
$coor['y'] = "";
}
?>
<td class="coo">
<span>X:</span><input class="text" type="text" name="x" value="<?php echo $coor['x']; ?>" maxlength="4" tabindex="6">
<span>Y:</span><input class="text" type="text" name="y" value="<?php echo $coor['y']; ?>" maxlength="4" tabindex="7">
</td>
</tr>
</table>
<div class="clear"></div><p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" tabindex="8" alt="OK" <?php if(!$market->merchantAvail()) { echo "DISABLED"; }?>/></form></p><script language="JavaScript" type="text/javascript">
//<!--
document.snd.r1.focus();
//-->
</script>
<p>Each merchant can carry <b><?php echo $market->maxcarry; ?></b> units of resource</p>
<?php
$timer = 1;
if(count($market->recieving) > 0) {
echo "<h4>Merchants coming:</h4>";
foreach($market->recieving as $recieve) {
echo "<table class=\"traders\" cellpadding=\"1\" cellspacing=\"1\">";
$villageowner = $database->getVillageField($recieve['from'],"owner");
echo "<thead><tr><td><a href=\"spieler.php?uid=$villageowner\">".$database->getUserField($villageowner,"username",0)."</a></td>";
echo "<td><a href=\"karte.php?d=".$recieve['from']."&c=".$generator->getMapCheck($recieve['from'])."\">Transport from ".$database->getVillageField($recieve['from'],"name")."</a></td>";
echo "</tr></thead><tbody><tr><th>Arrival in</th><td>";
echo "<div class=\"in\"><span id=timer$timer>".$generator->getTimeFormat($recieve['endtime']-time())."</span> h</div>";
$datetime = $generator->procMtime($recieve['endtime']);
echo "<div class=\"at\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>";
echo "</td></tr></tbody> <tr class=\"res\"> <th>Resource</th> <td colspan=\"2\"><span class=\"f10\">";
echo "<img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".$recieve['wood']." | <img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".$recieve['clay']." | <img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".$recieve['iron']." | <img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".$recieve['crop']."</td></tr></tbody>";
echo "</table>";
$timer +=1;
}
}
if(count($market->sending) > 0) {
echo "<h4>Own merchants on the way:</h4>";
foreach($market->sending as $send) {
$villageowner = $database->getVillageField($send['to'],"owner");
$ownername = $database->getUserField($villageowner,"username",0);
echo "<table class=\"traders\" cellpadding=\"1\" cellspacing=\"1\">";
echo "<thead><tr> <td><a href=\"spieler.php?uid=$villageowner\">$ownername</a></td>";
echo "<td><a href=\"karte.php?d=".$send['to']."&c=".$generator->getMapCheck($send['to'])."\">Transport to ".$database->getVillageField($send['to'],"name")."</a></td>";
echo "</tr></thead> <tbody><tr> <th>Arrival in</th> <td>";
echo "<div class=\"in\"><span id=timer".$timer.">".$generator->getTimeFormat($send['endtime']-time())."</span> h</div>";
$datetime = $generator->procMtime($send['endtime']);
echo "<div class=\"at\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>";
echo "</td> </tr> <tr class=\"res\"> <th>Resource</th><td>";
echo "<img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".$send['wood']." | <img class=\"r2\" src=\"img/x.gif\" alt=\"Clay\" title=\"Clay\" />".$send['clay']." | <img class=\"r3\" src=\"img/x.gif\" alt=\"Iron\" title=\"Iron\" />".$send['iron']." | <img class=\"r4\" src=\"img/x.gif\" alt=\"Crop\" title=\"Crop\" />".$send['crop']."</td></tr></tbody>";
echo "</table>";
$timer += 1;
}
}
if(count($market->return) > 0) {
echo "<h4>Merchants returning:</h4>";
foreach($market->return as $return) {
$villageowner = $database->getVillageField($return['from'],"owner");
$ownername = $database->getUserField($villageowner,"username",0);
echo "<table class=\"traders\" cellpadding=\"1\" cellspacing=\"1\">";
echo "<thead><tr> <td><a href=\"spieler.php?uid=$villageowner\">$ownername</a></td>";
echo "<td><a href=\"karte.php?d=".$return['from']."&c=".$generator->getMapCheck($return['from'])."\">Return from ".$database->getVillageField($return['from'],"name")."</a></td>";
echo "</tr></thead> <tbody><tr> <th>Arrival in</th> <td>";
echo "<div class=\"in\"><span id=timer".$timer.">".$generator->getTimeFormat($return['endtime']-time())."</span> h</div>";
$datetime = $generator->procMtime($return['endtime']);
echo "<div class=\"at\">";
if($datetime[0] != "today") {
echo "on ".$datetime[0]." ";
}
echo "at ".$datetime[1]."</div>";
echo "</td> </tr>";
echo "</tbody></table>";
$timer += 1;
}
}
include("upgrade.tpl");
?>
</p></div>
+134
View File
@@ -0,0 +1,134 @@
<?php
if(isset($_GET['u'])) {
$u = $_GET['u'];
}
else {
$u=0;
}
?>
<div id="build" class="gid17"><a href="#" onClick="return Popup(17,4);" class="build_logo">
<img class="building g17" src="img/x.gif" alt="Marketplace" title="Marketplace" />
</a>
<h1>Marketplace <span class="level">level <?php echo $village->resarray['f'.$id]; ?></span></h1>
<p class="build_desc">At the Marketplace you can trade resources with other players. The higher its level, the more resources can be transported at the same time.
</p>
<?php include("17_menu.tpl");
if($session->plus) {
?>
<table id="search_select" class="buy_select" cellpadding="1" cellspacing="1">
<thead><tr>
<td colspan="4">I'm searching</td>
</tr></thead>
<tbody><tr>
<td <?php if(isset($_GET['s']) && $_GET['s'] == 1) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&s=1<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['b'])) echo "&b=".$_GET['b']; ?>"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /></a></td>
<td <?php if(isset($_GET['s']) && $_GET['s'] == 2) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&s=2<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['b'])) echo "&b=".$_GET['b']; ?>"><img class="r2" src="img/x.gif" alt="Clay" title="Clay" /></a></td>
<td <?php if(isset($_GET['s']) && $_GET['s'] == 3) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&s=3<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['b'])) echo "&b=".$_GET['b']; ?>"><img class="r3" src="img/x.gif" alt="Iron" title="Iron" /></a></td>
<td <?php if(isset($_GET['s']) && $_GET['s'] == 4) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&s=4<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['b'])) echo "&b=".$_GET['b']; ?>"><img class="r4" src="img/x.gif" alt="Crop" title="Crop" /></a></td></tr></tbody>
</table><table id="ratio_select" class="buy_select" cellpadding="1" cellspacing="1">
<tbody>
<tr><td <?php if(isset($_GET['v'])) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&v=1:1<?php if(isset($_GET['s'])) echo "&s=".$_GET['s']; if(isset($_GET['b'])) echo "&b=".$_GET['b']; ?>">1:1</a></td>
</tr><tr><td <?php if(!isset($_GET['v'])) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1<?php if(isset($_GET['s'])) echo "&s=".$_GET['s']; if(isset($_GET['b'])) echo "&b=".$_GET['b']; ?>">1:x</a></td>
</tr>
</tbody>
</table>
<table id="bid_select" class="buy_select" cellpadding="1" cellspacing="1">
<thead><tr>
<td colspan="4">I'm offering</td>
</tr></thead>
<tbody><tr>
<td <?php if(isset($_GET['b']) && $_GET['b'] == 1) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&b=1<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['s'])) echo "&s=".$_GET['s']; ?>"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /></a></td>
<td <?php if(isset($_GET['b']) && $_GET['b'] == 2) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&b=2<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['s'])) echo "&s=".$_GET['s']; ?>"><img class="r2" src="img/x.gif" alt="Clay" title="Clay" /></a></td>
<td <?php if(isset($_GET['b']) && $_GET['b'] == 3) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&b=3<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['s'])) echo "&s=".$_GET['s']; ?>"><img class="r3" src="img/x.gif" alt="Iron" title="Iron" /></a></td>
<td <?php if(isset($_GET['b']) && $_GET['b'] == 4) echo "class=\"hl\""; ?>><a href="build.php?id=<?php echo $id; ?>&t=1&b=4<?php if(isset($_GET['v'])) echo "&v=".$_GET['v']; if(isset($_GET['s'])) echo "&s=".$_GET['s']; ?>"><img class="r4" src="img/x.gif" alt="Crop" title="Crop" /></a></td></tr></tbody>
</table>
<?php
}
?>
<div class="clear"></div><table id="range" cellpadding="1" cellspacing="1">
<thead><tr>
<th colspan="5"><a name="h2"></a>Offers at the marketplace</th>
</tr>
<tr>
<td>Offered
<br>to me</td>
<td>Wanted
<br>from me</td>
<td>Player</td>
<td>Duration</td>
<td>Action</td>
</tr></thead>
<tbody>
<?php
if(count($market->onsale) > 0) {
for($i=0+$u;$i<=40+$u;$i++) {
if(isset($market->onsale[$i])) {
echo "<tr><td class=\"val\">";
$reqMerc = 1;
if($market->onsale[$i]['wamt'] > $market->maxcarry) {
$reqMerc = round($market->onsale[$i]['wamt']/$market->maxcarry);
if($market->onsale[$i]['wamt'] > $market->maxcarry*$reqMerc) {
$reqMerc += 1;
}
}
switch($market->onsale[$i]['gtype']) {
case 1: echo "<img src=\"img/x.gif\" class=\"r1\" alt=\"Wood\" title=\"Wood\" />"; break;
case 2: echo "<img src=\"img/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" />"; break;
case 3: echo "<img src=\"img/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" />"; break;
case 4: echo "<img src=\"img/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" />"; break;
}
echo $market->onsale[$i]['gamt'];
echo "</td> <td class=\"val\">";
switch($market->onsale[$i]['wtype']) {
case 1: echo "<img src=\"img/x.gif\" class=\"r1\" alt=\"Wood\" title=\"Wood\" />"; break;
case 2: echo "<img src=\"img/x.gif\" class=\"r2\" alt=\"Clay\" title=\"Clay\" />"; break;
case 3: echo "<img src=\"img/x.gif\" class=\"r3\" alt=\"Iron\" title=\"Iron\" />"; break;
case 4: echo "<img src=\"img/x.gif\" class=\"r4\" alt=\"Crop\" title=\"Crop\" />"; break;
}
echo $market->onsale[$i]['wamt'];
echo "</td><td class=\"pla\" title=\"".$database->getVillageField($market->onsale[$i]['vref'],"name")."\">";
echo "<a href=\"karte.php?d=".$market->onsale[$i]['vref']."&c=".$generator->getMapCheck($market->onsale[$i]['vref'])."\">".$database->getUserField($database->getVillageField($market->onsale[$i]['vref'],"owner"),"username",0)."</a></td>";
echo "<td class=\"dur\">".$generator->getTimeFormat($market->onsale[$i]['duration'])."</td>";
if(($market->onsale[$i]['wtype'] == 1 && $village->awood <= $market->onsale[$i]['wamt']) ||($market->onsale[$i]['wtype'] == 2 && $village->aclay <= $market->onsale[$i]['wamt']) ||($market->onsale[$i]['wtype'] == 3 && $village->airon <= $market->onsale[$i]['wamt']) ||($market->onsale[$i]['wtype'] == 4 && $village->acrop <= $market->onsale[$i]['wamt'])) {
echo "<td class=\"act none\">Not Enough Resource</td></tr>";
}
else if($reqMerc > $market->merchantAvail()) {
echo "<td class=\"act none\">Not Enough Merchant</td></tr>";
}
else if($session->access != BANNED){
echo "<td class=\"act\"><a href=\"build.php?id=$id&t=1&a=".$session->mchecker."&g=".$market->onsale[$i]['id']."\">Accept offer</a></td>";
}else{
echo "<td class=\"act\"><a href=\"banned.php\">Accept offer</a></td>";
}
echo"</tr>";
}
}
}
else {
echo "<tr><td class=\"none\" colspan=\"5\">There are no avaliable offers on the market</td></tr>";
}
?>
</tbody><tfoot><tr><td colspan="5">
<span class="none">
<?php
if(!isset($_GET['u']) && count($market->onsale) < 40) {
echo "<span class=\"none\"><b>&laquo;</b></span><span class=\"none\"><b>&raquo;</b></span>";
}
else if (!isset($_GET['u']) && count($market->onsale) > 40) {
echo "<span class=\"none\"><b>&laquo;</b></span><a href=\"build.php?id=<?php echo $id; ?>&t=1&u=40\">&raquo;</a>";
}
else if(isset($_GET['u']) && count($market->onsale) > $_GET['u']) {
if(count($market->onsale) > ($_GET['u']+40) && $_GET['u']-40 < count($market->onsale) && $_GET['u'] != 0) {
echo "<a href=\"build.php?id=<?php echo $id; ?>&t=1&u=".($_GET['u']-40)."\">&laquo;</a><a href=\"build.php?id=<?php echo $id; ?>&t=1&u=".($_GET['u']+40)."\">&raquo;</a>";
}
else if(count($market->onsale) > $_GET['u']+40) {
echo "<span class=\"none\"><b>&laquo;</b></span><a href=\"build.php?id=<?php echo $id; ?>&t=1&u=".($_GET['u']+40)."\">&raquo;</a>";
}
else {
echo "<a href=\"build.php?id=<?php echo $id; ?>&t=1&u=".($_GET['u']-40)."\">&laquo;</a><span class=\"none\"><b>&raquo;</b></span>";
}
}
?>
</td></tr>
</table></div>

Some files were not shown because too many files have changed in this diff Show More