The first release of the refactored version

It's still a work in progress, there are a lot of things that will
change in the final release
This commit is contained in:
iopietro
2018-09-16 17:22:39 +02:00
parent f032523e1c
commit 62d6e19ee9
3503 changed files with 90956 additions and 35819 deletions
+4
View File
@@ -0,0 +1,4 @@
<Files ~ "\.tpl$">
Order allow,deny
Deny from all
</Files>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="overview.tpl" server="D:/wamp/www/New/" local="129153257783427734" remote="129153257780000000" />
</dwsync>
+53
View File
@@ -0,0 +1,53 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The alliance <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else $search = $_SESSION['search'];
?>
<table cellpadding="1" cellspacing="1" id="alliance" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The largest alliances <div id="submenu"><a title="Top 10" href="statistiken.php?id=43"><img class="btn_top10" src="img/x.gif" alt="Top 10"></a><a title="defender" href="statistiken.php?id=42"><img class="btn_def" src="img/x.gif" alt="defender"></a><a title="attacker" href="statistiken.php?id=41"><img class="btn_off" src="img/x.gif" alt="attacker"></a></div>
</th>
</tr>
<tr><td></td><td>Alliance</td><td>Player</td><td>&Oslash;</td><td>Points</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20*$multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['name']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"al \" ><a href=\"allianz.php?aid=".$rankArray[$i]['id']."\">".$rankArray[$i]['tag']."</a></td><td class=\"pla \" >";
echo $rankArray[$i]['players']."</td><td class=\"av \" >".$rankArray[$i]['avg']."</td><td class=\"po \">".$rankArray[$i]['totalpop']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No alliances found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+53
View File
@@ -0,0 +1,53 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The alliance <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else $search = $_SESSION['search'];
?>
<table cellpadding="1" cellspacing="1" id="alliance_off" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The best alliances (off) <div id="submenu"><a title="Top 10" href="statistiken.php?id=43"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=42"><img class="btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=41"><img class="active btn_off" src="img/x.gif" alt="attacker" /></a></div>
</th>
</tr>
<tr><td></td><td>Alliance</td><td>Player</td><td>Points</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20*$multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['name']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"al \" ><a href=\"allianz.php?aid=".$rankArray[$i]['id']."\">".$rankArray[$i]['tag']."</a></td><td class=\"pla \" >";
echo $rankArray[$i]['players']."</td><td class=\"po \">".$rankArray[$i]['Aap']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No alliances found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+53
View File
@@ -0,0 +1,53 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The alliance <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else $search = $_SESSION['search'];
?>
<table cellpadding="1" cellspacing="1" id="alliance_def" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The best alliances (def) <div id="submenu"><a title="Top 10" href="statistiken.php?id=43"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=42"><img class="active btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=41"><img class="btn_off" src="img/x.gif" alt="attacker" /></a></div>
</th>
</tr>
<tr><td></td><td>Alliance</td><td>Player</td><td>Points</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20*$multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['name']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"al \" ><a href=\"allianz.php?aid=".$rankArray[$i]['id']."\">".$rankArray[$i]['tag']."</a></td><td class=\"pla \" >";
echo $rankArray[$i]['players']."</td><td class=\"po \">".$rankArray[$i]['Adp']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No alliances found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+228
View File
@@ -0,0 +1,228 @@
<?php
$place = $place1 = $place2 = $place3 = "?";
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY ap DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY ap DESC, id DESC Limit 1");
?>
<table cellpadding="1" cellspacing="1">
<thead>
<tr>
<th>Top 10 Alliances<div id="submenu"><a title="Top 10" href="statistiken.php?id=43"><img class="active btn_top10" src="img/x.gif" alt="Top 10"></a><a title="defender" href="statistiken.php?id=42"><img class="btn_def" src="img/x.gif" alt="defender"></a><a title="attacker" href="statistiken.php?id=41"><img class="btn_off" src="img/x.gif" alt="attacker"></a></div><div id="submenu2"><a title="Romans" href="statistiken.php?id=11"><img class="btn_v1" src="img/x.gif" alt="attacker"></a><a title="Teutons" href="statistiken.php?id=12"><img class="btn_v2" src="img/x.gif" alt="attacker"></a><a title="Gauls" href="statistiken.php?id=13"><img class="btn_v3" src="img/x.gif" alt="attacker"></a></div></th>
</tr>
</thead>
</table>
<table cellpadding="1" cellspacing="1" id="top10_offs" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Attackers of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Alliance</td>
<td>Points</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['id']==$session->alliance) {
$place = $i;
}
if($row['id']==$session->alliance) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>";
echo "<td class=\"val lc\">".$row['ap']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place."&nbsp;</td>";
if($row['id'] == $session->alliance) {
echo "<td class=\"pla\">".$row['tag']."</td>"; } else { echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>"; }
echo "<td class=\"val lc\">".$row['ap']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<?php
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY dp DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY dp DESC Limit 1");
?>
<table cellpadding="1" cellspacing="1" id="top10_defs" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Defenders of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Alliance</td>
<td>Points</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['id']==$session->alliance) {
$place1 = $i;
}
if($row['id']==$session->alliance) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>";
echo "<td class=\"val lc\">".$row['dp']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place1."&nbsp;</td>";
if($row['id'] == $session->alliance) {
echo "<td class=\"pla\">".$row['tag']."</td>"; } else { echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>"; }
echo "<td class=\"val lc\">".$row['dp']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<?php
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY clp DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY clp DESC Limit 1");
?>
<div class="clear"></div>
<table cellpadding="1" cellspacing="1" id="top10_climbers" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Climbers of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Alliance</td>
<td>Population</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['id']==$session->alliance) {
$place2 = $i;
}
if($row['id']==$session->alliance) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>";
echo "<td class=\"val lc\">".$row['clp']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place2."&nbsp;</td>";
if($row['id'] == $session->alliance) {
echo "<td class=\"pla\">".$row['tag']."</td>"; } else { echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>"; }
echo "<td class=\"val lc\">".$row['clp']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<?php
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY RR DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY RR DESC Limit 1");
?>
<table cellpadding="1" cellspacing="1" id="top10_raiders" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Robbers of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Alliance</td>
<td>Resources</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['RR'] >= 0) {
if($row['id']==$session->alliance) {
$place3 = $i;
}
if($row['id']==$session->alliance) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>";
echo "<td class=\"val lc\">".$row['RR']."</td>";
echo "</tr>";
}
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place3."&nbsp;</td>";
if($row['id'] == $session->alliance) {
echo "<td class=\"pla\">".$row['tag']."</td>"; } else { echo "<td class=\"pla\"><a href='allianz.php?aid=".$row['id']."'>".$row['tag']."</a></td>"; }
echo "<td class=\"val lc\">".$row['RR']."</td>";
echo "</tr>";
}
//mysqli_close($con);
?>
</tbody>
</table>
<div>
+168
View File
@@ -0,0 +1,168 @@
<?php
/** --------------------------------------------------- **\
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
+---------------------------------------------------------+
| Credits: All the developers including the leaders: |
| Advocaite & Dzoki & Donnchadh |
| |
| Copyright: TravianX Project All rights reserved |
\** --------------------------------------------------- **/
$tribe1 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 1"), MYSQLI_ASSOC);
$tribe2 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 2"), MYSQLI_ASSOC);
$tribe3 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 3"), MYSQLI_ASSOC);
$tribes = [$tribe1['Total'], $tribe2['Total'], $tribe3['Total']];
$users = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe > 0 AND tribe < 4"), MYSQLI_ASSOC);
$users = $users['Total'];
?>
<table cellpadding="1" cellspacing="1" id="world_player" class="world">
<thead>
<tr>
<th colspan="2">Players</th>
</tr>
</thead>
<tbody>
<tr>
<th>Registered players</th>
<td><?php
echo $users; ?></td>
</tr>
<tr>
<th>Active players</th>
<td><?php
$active = mysqli_num_rows(mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE timestamp > ".(time() - (3600*24))." AND tribe!=0 AND tribe!=4 AND tribe!=5"));
echo $active; ?></td>
</tr>
<tr>
<th>Players online</th>
<td><?php
$online = mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
if (!empty($online)) {
echo mysqli_fetch_assoc($online)['Total'];
} else {
echo 0;
}
?></td>
</tr>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="world_tribes" class="world">
<thead>
<tr>
<th colspan="3">Tribes</th>
</tr>
<tr>
<td>Tribe</td>
<td>Registered</td>
<td>Percent</td>
</tr>
</thead>
<tbody>
<tr>
<td>Romans</td>
<td><?php echo $tribes[0]; ?></td>
<td><?php echo ($users > 0) ? ($percents[0] = round(100 * ($tribes[0] / $users), 2))."%" : '---'; ?></td>
</tr>
<tr>
<td>Teutons</td>
<td><?php echo $tribes[1]; ?></td>
<td><?php echo ($users > 0) ? ($percents[1] = round(100 * ($tribes[1] / $users), 2))."%" : "---"; ?></td>
</tr>
<tr>
<td>Gauls</td>
<td><?php echo $tribes[2]; ?></td>
<td><?php echo ($users > 0) ? (100-$percents[0]-$percents[1])."%" : '---'; ?></td>
</tr>
</tbody>
</table>
<table cellpadding="1" cellspacing="1" id="world_tribes" class="world">
<thead>
<tr>
<th colspan="3">Miscellaneous</th>
</tr>
<tr>
<td>Attacks</td>
<td>Casualties</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $database->getAttackByDate(time()); ?></td>
<td><?php echo $database->getAttackCasualties(time()); ?></td>
<td><?php echo date("j. M"); ?></td>
</tr>
<tr>
<td><?php echo $database->getAttackByDate(time()-(86400*1)); ?></td>
<td><?php echo $database->getAttackCasualties(time()-(86400*1)); ?></td>
<td><?php echo date("j. M",time()-(86400*1)); ?></td>
</tr>
<tr>
<td><?php echo $database->getAttackByDate(time()-(86400*2)); ?></td>
<td><?php echo $database->getAttackCasualties(time()-(86400*2)); ?></td>
<td><?php echo date("j. M",time()-(86400*2)); ?></td>
</tr>
<tr>
<td><?php echo $database->getAttackByDate(time()-(86400*3)); ?></td>
<td><?php echo $database->getAttackCasualties(time()-(86400*3)); ?></td>
<td><?php echo date("j. M",time()-(86400*3)); ?></td>
</tr>
<tr>
<td><?php echo $database->getAttackByDate(time()-(86400*4)); ?></td>
<td><?php echo $database->getAttackCasualties(time()-(86400*4)); ?></td>
<td><?php echo date("j. M",time()-(86400*4)); ?></td>
</tr>
<tr>
<td><?php echo $database->getAttackByDate(time()-(86400*5)); ?></td>
<td><?php echo $database->getAttackCasualties(time()-(86400*5)); ?></td>
<td><?php echo date("j. M",time()-(86400*5)); ?></td>
</tr>
<tr>
<td><?php echo $database->getAttackByDate(time()-(86400*6)); ?></td>
<td><?php echo $database->getAttackCasualties(time()-(86400*6)); ?></td>
<td><?php echo date("j. M",time()-(86400*6)); ?></td>
</tr>
</tbody>
</table>
<?php ?>
<table cellpadding="1" cellspacing="1" id="search_navi"> <?php //fix the problem with footer.php, don't change or remove it ?>
+71
View File
@@ -0,0 +1,71 @@
<?php
/** --------------------------------------------------- **\
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
+---------------------------------------------------------+
| Released by: Dzoki < dzoki.travian@gmail.com > |
| Copyright: TravianX Project All rights reserved |
\** --------------------------------------------------- **/
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The hero <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
} else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="heroes" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The most experienced heroes </th>
</tr>
<tr><td></td><td>Hero</td><td>Player</td><td>Level</td><td>Experience</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['name']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl \"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i . ".</td>
<td class=\"hero \">
<img class=\"unit u" . $rankArray[$i]['unit'] . "\" alt=\"\" title=\"\" src=\"img/x.gif\"> " . $rankArray[$i]['name'] . "</td>
<td class=\"pla \"><center><a href=\"spieler.php?uid=" . $rankArray[$i]['uid'] . "\">" . $rankArray[$i]['owner'] . "</a></center></td>
<td class=\"lev \">" . $rankArray[$i]['level'] . "</td>
<td class=\"xp \">" . $rankArray[$i]['experience'] . "</td>
</tr>
";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No heros found</td>";
?>
</tbody>
</table>
<?php
include ("ranksearch.tpl");
?>
+64
View File
@@ -0,0 +1,64 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The user <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="5">
The largest players <div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=32"><img class="btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=31"><img class="btn_off" src="img/x.gif" alt="attacker" /></a></div><br><div id="submenu2"><a title="Romans" href="statistiken.php?id=11"><img class="btn_v1" src="img/x.gif" alt="attacker"></a><a title="Teutons" href="statistiken.php?id=12"><img class="btn_v2" src="img/x.gif" alt="attacker"></a><a title="Gauls" href="statistiken.php?id=13"><img class="btn_v3" src="img/x.gif" alt="attacker"></a></div>
</th>
</tr>
<tr><td></td><td>Player</td><td>Alliance</td><td>Population</td><td>Villages</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['username']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"pla \" >";
if(isset($rankArray[$i]['access']) && $rankArray[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($rankArray[$i]['aname'] != "") {
echo "<a href=\"allianz.php?aid=".$rankArray[$i]['alliance']."\">".$rankArray[$i]['aname']."</a>";
}
else echo "-";
echo "</td><td class=\"pop\" >".$rankArray[$i]['totalpop']."</td><td class=\"vil\">".$rankArray[$i]['totalvillage']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No users found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+65
View File
@@ -0,0 +1,65 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The user <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="5">
The largest Romans <div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=32"><img class="btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=31"><img class="btn_off" src="img/x.gif" alt="attacker" /></a></div><br><div id="submenu2"><a title="Romans" href="statistiken.php?id=11"><img class="active btn_v1" src="img/x.gif" alt="attacker"></a><a title="Teutons" href="statistiken.php?id=12"><img class="btn_v2" src="img/x.gif" alt="attacker"></a><a title="Gauls" href="statistiken.php?id=13"><img class="btn_v3" src="img/x.gif" alt="attacker"></a></div>
</th>
</tr>
<tr><td></td><td>Player</td><td>Alliance</td><td>Population</td><td>Villages</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($database->getUserByTribe(1)) > 0) {
for($i = $start; $i< $start + 20; $i++) {
if(isset($rankArray[$i]['username']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"pla \" >";
if(isset($rankArray[$i]['access']) && $rankArray[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($rankArray[$i]['alliance'] > 0) {
echo "<a href=\"allianz.php?aid=".$rankArray[$i]['alliance']."\">".$rankArray[$i]['aname']."</a>";
}
else echo "-";
echo "</td><td class=\"pop\" >".$rankArray[$i]['totalpop']."</td><td class=\"vil\">".$rankArray[$i]['totalvillage']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No users found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+65
View File
@@ -0,0 +1,65 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The user <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="5">
The largest Teutons <div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=32"><img class="btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=31"><img class="btn_off" src="img/x.gif" alt="attacker" /></a></div><br><div id="submenu2"><a title="Romans" href="statistiken.php?id=11"><img class="btn_v1" src="img/x.gif" alt="attacker"></a><a title="Teutons" href="statistiken.php?id=12"><img class="active btn_v2" src="img/x.gif" alt="attacker"></a><a title="Gauls" href="statistiken.php?id=13"><img class="btn_v3" src="img/x.gif" alt="attacker"></a></div>
</th>
</tr>
<tr><td></td><td>Player</td><td>Alliance</td><td>Population</td><td>Villages</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($database->getUserByTribe(2)) > 0) {
for($i = $start; $i< $start + 20; $i++) {
if(isset($rankArray[$i]['username']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"pla \" >";
if(isset($rankArray[$i]['access']) && $rankArray[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($rankArray[$i]['alliance'] > 0) {
echo "<a href=\"allianz.php?aid=".$rankArray[$i]['alliance']."\">".$rankArray[$i]['aname']."</a>";
}
else echo "-";
echo "</td><td class=\"pop\" >".$rankArray[$i]['totalpop']."</td><td class=\"vil\">".$rankArray[$i]['totalvillage']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No users found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+65
View File
@@ -0,0 +1,65 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The user <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="5">
The largest Gauls <div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=32"><img class="btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=31"><img class="btn_off" src="img/x.gif" alt="attacker" /></a></div><br><div id="submenu2"><a title="Romans" href="statistiken.php?id=11"><img class="btn_v1" src="img/x.gif" alt="attacker"></a><a title="Teutons" href="statistiken.php?id=12"><img class="btn_v2" src="img/x.gif" alt="attacker"></a><a title="Gauls" href="statistiken.php?id=13"><img class="active btn_v3" src="img/x.gif" alt="attacker"></a></div>
</th>
</tr>
<tr><td></td><td>Player</td><td>Alliance</td><td>Population</td><td>Villages</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($database->getUserByTribe(3)) > 0) {
for($i = $start; $i< $start + 20; $i++) {
if(isset($rankArray[$i]['username']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"pla \" >";
if(isset($rankArray[$i]['access']) && $rankArray[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$rankArray[$i]['userid']."\">".$rankArray[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($rankArray[$i]['alliance'] > 0) {
echo "<a href=\"allianz.php?aid=".$rankArray[$i]['alliance']."\">".$rankArray[$i]['aname']."</a>";
}
else echo "-";
echo "</td><td class=\"pop\" >".$rankArray[$i]['totalpop']."</td><td class=\"vil\">".$rankArray[$i]['totalvillage']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No users found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+60
View File
@@ -0,0 +1,60 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The user <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player_off" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The most successful attackers <div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=32"><img class="btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=31"><img class="active btn_off" src="img/x.gif" alt="attacker" /></a></div>
</th>
</tr>
<tr><td></td><td>Player</td><td>Population</td><td>Villages</td><td>Points</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['username']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"pla \" >";
if($rankArray[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$rankArray[$i]['id']."\">".$rankArray[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$rankArray[$i]['id']."\">".$rankArray[$i]['username']."</a>";
}
echo"</td><td class=\"pop \" >".$rankArray[$i]['totalpop']."";
echo "</td><td class=\"vil\">".$rankArray[$i]['totalvillages']."</td><td class=\"po \" >".$rankArray[$i]['apall']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No users found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+60
View File
@@ -0,0 +1,60 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The user <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
<table cellpadding="1" cellspacing="1" id="player_def" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The most successful defenders <div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="btn_top10" src="img/x.gif" alt="Top 10" /></a><a title="defender" href="statistiken.php?id=32"><img class="active btn_def" src="img/x.gif" alt="defender" /></a><a title="attacker" href="statistiken.php?id=31"><img class="btn_off" src="img/x.gif" alt="attacker" /></a></div>
</th>
</tr>
<tr><td></td><td>Player</td><td>Population</td><td>Villages</td><td>Points</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['username']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"pla \" >";
if($rankArray[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$rankArray[$i]['id']."\">".$rankArray[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$rankArray[$i]['id']."\">".$rankArray[$i]['username']."</a>";
}
echo"</td><td class=\"pop \" >".$rankArray[$i]['totalpop']."";
echo "</td><td class=\"vil\">".$rankArray[$i]['totalvillages']."</td><td class=\"po \" >".$rankArray[$i]['dpall']."</td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No users found</td>";
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+228
View File
@@ -0,0 +1,228 @@
<?php
$place = $place1 = $place2 = $place3 = "?";
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY ap DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY ap DESC, id DESC Limit 1");
?>
<table cellpadding="1" cellspacing="1">
<thead>
<tr>
<th>Top 10 players<div id="submenu"><a title="Top 10" href="statistiken.php?id=7"><img class="active btn_top10" src="img/x.gif" alt="Top 10"></a><a title="defender" href="statistiken.php?id=32"><img class="btn_def" src="img/x.gif" alt="defender"></a><a title="attacker" href="statistiken.php?id=31"><img class="btn_off" src="img/x.gif" alt="attacker"></a></div><div id="submenu2"><a title="Romans" href="statistiken.php?id=11"><img class="btn_v1" src="img/x.gif" alt="attacker"></a><a title="Teutons" href="statistiken.php?id=12"><img class="btn_v2" src="img/x.gif" alt="attacker"></a><a title="Gauls" href="statistiken.php?id=13"><img class="btn_v3" src="img/x.gif" alt="attacker"></a></div></th>
</tr>
</thead>
</table>
<table cellpadding="1" cellspacing="1" id="top10_offs" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Attackers of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Player</td>
<td>Points</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['id']==$session->uid) {
if($row['id']==$session->uid) {
$place = $i;
}
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>";
echo "<td class=\"val lc\">".$row['ap']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->uid) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place."&nbsp;</td>";
if($row['id'] == $session->uid) {
echo "<td class=\"pla\">".$row['username']."</td>"; } else { echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>"; }
echo "<td class=\"val lc\">".$row['ap']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<?php
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY dp DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY dp DESC Limit 1");
?>
<table cellpadding="1" cellspacing="1" id="top10_defs" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Defenders of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Player</td>
<td>Points</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['id']==$session->uid) {
$place1 = $i;
}
if($row['id']==$session->uid) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>";
echo "<td class=\"val lc\">".$row['dp']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->uid) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place1."&nbsp;</td>";
if($row['id'] == $session->uid) {
echo "<td class=\"pla\">".$row['username']."</td>"; } else { echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>"; }
echo "<td class=\"val lc\">".$row['dp']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<?php
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY clp DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY clp DESC Limit 1");
?>
<div class="clear"></div>
<table cellpadding="1" cellspacing="1" id="top10_climbers" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Climbers of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Player</td>
<td>Ranks</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['id']==$session->uid) {
$place2 = $i;
}
if($row['id']==$session->uid) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>";
echo "<td class=\"val lc\">".$row['clp']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id'] == $session->uid) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place2."&nbsp;</td>";
if($row['id'] == $session->uid) {
echo "<td class=\"pla\">".$row['username']."</td>"; } else { echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>"; } echo "<td class=\"val lc\">".$row['clp']."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<?php
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY RR DESC, id DESC Limit 10");
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY RR DESC Limit 1");
?>
<table cellpadding="1" cellspacing="1" id="top10_raiders" class="top10 row_table_data">
<thead>
<tr>
<th onclick="return Popup(3,5)"><img src="img/x.gif" class="help" alt="Instructions" title="Instructions">
</th>
<th colspan="2">Robbers of the week</th>
</tr>
<tr>
<td>No.</td>
<td>Player</td>
<td>Resources</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
if($row['RR'] >= 0) {
if($row['id']==$session->uid) {
$place3 = $i;
}
if($row['id']==$session->uid) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td class=\"ra fc\">".$i++.".&nbsp;</td>";
echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>";
echo "<td class=\"val lc\">".$row['RR']."</td>";
echo "</tr>";
}
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysqli_fetch_array($result2))
{
if($row['id']==$session->uid) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">".$place3."&nbsp;</td>";
if($row['id']==$session->uid) {
echo "<td class=\"pla\">".$row['username']."</td>"; } else { echo "<td class=\"pla\"><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>"; }
echo "<td class=\"val lc\">".$row['RR']."</td>";
echo "</tr>";
}
// mysqli_close($con);
?>
</tbody>
</table>
<div>
+27
View File
@@ -0,0 +1,27 @@
<?php
if(!isset($_GET['id'])){ $_GET['id']='1'; }
?>
<table cellpadding="1" cellspacing="1" id="search_navi">
<tr>
<td>
<form method="post" action="statistiken.php?id=<?php echo isset($_GET['id'])? $_GET['id'] : 1; ?>">
<div class="search">
<span>rank<input type="text" class="text ra" maxlength="5" name="rank" value="<?php echo ($search == 0)? $start : $search; ?>" /></span>
<span class="or">or</span>
<span>name<input type="text" class="text name" maxlength="30" name="name" value="<?php if(!is_numeric($search)) {echo $search; } ?>" /></span>
<input type="hidden" name="ft" value="r<?php echo isset($_GET['id'])? $_GET['id'] : 1; ?>" />
<button value="submit" name="submit" id="btn_ok" class="trav_buttons" alt="OK" /> OK </button>
</div>
</form>
<div class="navi">
<?php
if(count($rankArray) < 22){
echo "&laquo; back | forward &raquo;";
}else if($start != 1 && $start + 20 < count($rankArray)) {
echo "<a href=\"statistiken.php?id=".$_GET['id']."&amp;rank=".($start - 20)."\">&laquo; back</a> | <a href=\"statistiken.php?id=".$_GET['id']."&amp;rank=".($start + 20)."\">forward &raquo;</a>";
}else if($start == 1 && $start + 20 < count($rankArray)) {
echo "&laquo; back | <a href=\"statistiken.php?id=".$_GET['id']."&amp;rank=".($start + 20)."\">forward &raquo;</a>";
}else if($start != 1 && $start - 20 < count($rankArray)) {
echo "<a href=\"statistiken.php?id=".$_GET['id']."&amp;rank=".($start - 20)."\">&laquo; back</a> | forward &raquo;";
}
?>
+51
View File
@@ -0,0 +1,51 @@
<?php
if(!is_numeric($_SESSION['search'])) {
?>
<center><font color=orange size=2><p class=\"error\">The village <b>"<?php echo $_SESSION['search']; ?>"</b> does not exist.</p></font></center>
<?php
$search = 0;
}
else $search = $_SESSION['search'];
?>
<table cellpadding="1" cellspacing="1" id="villages" class="row_table_data">
<thead>
<tr>
<th colspan="5">
The largest villages
</th>
</tr>
<tr><td></td><td>Village</td><td>Player</td><td>Inhabitants</td><td>Coordinates</td></tr>
</thead><tbody>
<?php
$rankArray = $ranking->getRank();
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($rankArray)) {
$_GET['rank'] = count($rankArray) - 1;
}
while($_GET['rank'] > (20*$multiplier)) $multiplier++;
$start = 20 * $multiplier - 19;
}
else $start = ($_SESSION['start'] + 1);
}
else $start = ($_SESSION['start'] + 1);
if(count($rankArray) > 1) {
for($i = $start; $i < $start + 20; $i++) {
if(isset($rankArray[$i]['wref']) && $rankArray[$i] != "pad") {
if($i == $search) echo "<tr class=\"hl\"><td class=\"ra fc\" >";
else echo "<tr><td class=\"ra \" >";
echo $i.".</td><td class=\"vil \" ><a href=\"karte.php?d=".$rankArray[$i]['wref']."&amp;c=".$generator->getMapCheck($rankArray[$i]['wref'])."\">".$rankArray[$i]['name']."</a></td>";
echo "<td class=\"pla \" ><a href=\"spieler.php?uid=".$rankArray[$i]['owner']."\">".$rankArray[$i]['user']."</a></td>";
echo "<td class=\"hab\">".$rankArray[$i]['pop']."</td><td class=\"aligned_coords \" ><div class=\"cox\">(".$rankArray[$i]['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$rankArray[$i]['y'].")</div></td></tr>";
}
}
}
else echo "<td class=\"none\" colspan=\"5\">No villages found</td>";
include("ranksearch.tpl");
?>
</tbody></table>
+61
View File
@@ -0,0 +1,61 @@
<?php
if (WW == True)
{
$result = mysqli_query($database->dblink,"select " . TB_PREFIX . "users.id, " . TB_PREFIX . "users.username," . TB_PREFIX . "users.alliance, " . TB_PREFIX . "fdata.wwname, " . TB_PREFIX . "fdata.f99, " . TB_PREFIX . "vdata.name, " . TB_PREFIX . "fdata.vref
FROM " . TB_PREFIX . "users
INNER JOIN " . TB_PREFIX . "vdata ON " . TB_PREFIX . "users.id = " . TB_PREFIX . "vdata.owner
INNER JOIN " . TB_PREFIX . "fdata ON " . TB_PREFIX . "fdata.vref = " . TB_PREFIX . "vdata.wref
WHERE " . TB_PREFIX . "fdata.f99t = 40 ORDER BY " . TB_PREFIX . "fdata.f99 Desc, id Desc LIMIT 20");
?>
<table cellpadding="1" cellspacing="1" id="villages" class="row_table_data">
<thead>
<tr>
<th colspan="7">Wonder of the world</th>
</tr>
<tr>
<td></td>
<td><?php echo PLAYER; ?></td>
<td><?php echo NAME; ?></td>
<td><?php echo ALLIANCE; ?></td>
<td><?php echo LEVEL; ?></td>
<td></td>
</tr>
</thead>
<tbody>
<?php
$count = 0;
while ($row = mysqli_fetch_array($result))
{
$ally = $database->getAlliance($row['alliance']);
$query = @mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'ww_attacks` WHERE `vid` = ' . $row['vref'] . ' ORDER BY `attack_time` ASC LIMIT 1');
$row2 = @mysqli_fetch_assoc($query);
?>
<tr>
<td><?php echo ++$count; ?>.</td>
<td><?php echo "<a href=\"karte.php?d=" . $row['vref'] . "&amp;c=" . $generator->getMapCheck($row['vref']) . "\">"; ?><?php echo $row['username']; ?></a></td>
<td><?php echo $row['wwname']; ?></td>
<td><a href="allianz.php?aid=<?php echo $ally['id']; ?>"><?php echo $ally['tag']; ?></a></td>
<td><?php echo $row['f99']; ?></td>
<?php if ($row2['attack_time'] != 0): ?>
<td><img src="gpack/travian_default/img/a/att1.gif" title="<?php print date('d.m.Y, H:i:s', $row2['attack_time']); ?>" /></td>
<?php else: ?>
<td>&nbsp;</td>
<?php endif; ?>
</tr>
<?php
}
if($count == 0){
?>
<tr>
<td class="none" colspan="7"><?php echo NO_WW; ?></td>
</tr>
<?php
}
}
else
{
header("Location: statistiken.php");
exit;
}
?>