chore: cleanup of old unused templates

This commit is contained in:
Martin Ambrus
2017-11-19 15:58:07 +01:00
parent 24789507a7
commit 1c8b732c39
13 changed files with 0 additions and 851 deletions
-7
View File
@@ -1,7 +0,0 @@
<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
@@ -1,39 +0,0 @@
<?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
@@ -1,138 +0,0 @@
<?
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
@@ -1,47 +0,0 @@
<?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
@@ -1,75 +0,0 @@
<?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>
-19
View File
@@ -1,19 +0,0 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename 404.tpl ##
## Developed by: aggenkeech ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
## ##
#################################################################################
?>
<div style="margin-top: 50px;">
<div style="text-align: center">
<h1>404 - File not found</h1>
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
<p>This system is not complete yet. So the page probably does not exist.</p><br>
</div>
</div>
-3
View File
@@ -1,3 +0,0 @@
<h1>Welcome to admin</h1>
heloo
-61
View File
@@ -1,61 +0,0 @@
<?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>
-104
View File
@@ -1,104 +0,0 @@
<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
@@ -1,46 +0,0 @@
<?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
@@ -1,141 +0,0 @@
<?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
@@ -1,136 +0,0 @@
<?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
@@ -1,35 +0,0 @@
<?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>