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
+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>