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
+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>
+55
View File
@@ -0,0 +1,55 @@
<?php
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The alliance <b>".$_SESSION['search']."</b> does not exist.</p>";
$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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['name']) && $ranking[$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=".$ranking[$i]['id']."\">".$ranking[$i]['tag']."</a></td><td class=\"pla \" >";
echo $ranking[$i]['players']."</td><td class=\"av \" >".$ranking[$i]['avg']."</td><td class=\"po \">".$ranking[$i]['totalpop']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No alliance's found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+55
View File
@@ -0,0 +1,55 @@
<?php
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The alliance <b>".$_SESSION['search']."</b> does not exist.</p>";
$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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['name']) && $ranking[$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=".$ranking[$i]['id']."\">".$ranking[$i]['tag']."</a></td><td class=\"pla \" >";
echo $ranking[$i]['players']."</td><td class=\"po \">".$ranking[$i]['totalap']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+55
View File
@@ -0,0 +1,55 @@
<?php
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The alliance <b>".$_SESSION['search']."</b> does not exist.</p>";
$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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['name']) && $ranking[$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=".$ranking[$i]['id']."\">".$ranking[$i]['tag']."</a></td><td class=\"pla \" >";
echo $ranking[$i]['players']."</td><td class=\"po \">".$ranking[$i]['totaldp']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+222
View File
@@ -0,0 +1,222 @@
<?php
$db_host=SQL_SERVER; $db_user=SQL_USER; $db_pass=SQL_PASS; $db_name=SQL_DB;
$con = mysql_connect($db_host, $db_user, $db_pass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
mysql_select_db($db_name, $con);
$result = mysql_query("SELECT * FROM ".TB_PREFIX."alidata ORDER BY ap DESC Limit 10");
$result2 = mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY ap 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 = mysql_fetch_array($result))
{
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 = mysql_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&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 = mysql_query("SELECT * FROM ".TB_PREFIX."alidata ORDER BY dp DESC Limit 10");
$result2 = mysql_query("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 = mysql_fetch_array($result))
{
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 = mysql_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&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 = mysql_query("SELECT * FROM ".TB_PREFIX."alidata ORDER BY clp DESC Limit 10");
$result2 = mysql_query("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>Ranks</td>
</tr>
</thead>
<tbody>
<?php
while($row = mysql_fetch_array($result))
{
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 = mysql_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&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 = mysql_query("SELECT * FROM ".TB_PREFIX."alidata ORDER BY RR DESC Limit 10");
$result2 = mysql_query("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 = mysql_fetch_array($result))
{
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 = mysql_fetch_array($result2))
{
if($row['id'] == $session->alliance) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&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>";
}
mysql_close($con);
?>
</tbody>
</table>
<div>
+103
View File
@@ -0,0 +1,103 @@
<?php
/** --------------------------------------------------- **\
| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |
+---------------------------------------------------------+
| Credits: All the developers including the leaders: |
| Advocaite & Dzoki & Donnchadh |
| |
| Copyright: TravianX Project All rights reserved |
\** --------------------------------------------------- **/
$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")) - 4; ?>
<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 = mysql_num_rows(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE ".time()."-timestamp < (3600*24)"));
echo $active; ?></td>
</tr>
<tr>
<th>Players online</th>
<td><?php
$online = mysql_num_rows(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE ".time()."-timestamp < (60*5)"));
echo $online; ?></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] - 2; ?></td>
<td><?php
$percents = 100 * (($tribes[0]-2) / $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>
+74
View File
@@ -0,0 +1,74 @@
<?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'])) {
echo "<p class=\"error\">The user <b>" . $_SESSION['search'] . "</b> does not exist or has no hero.</p>";
$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
if(isset($_GET['rank'])) {
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank()) - 1;
}
while($_GET['rank'] > (20 * $multiplier)) {
$multiplier += 1;
}
$start = 20 * $multiplier - 19;
} else {
$start = ($_SESSION['start'] + 1);
}
} else {
$start = ($_SESSION['start'] + 1);
}
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i = $start; $i < ($start + 20); $i++) {
if(isset($ranking[$i]['name']) && $ranking[$i] != "pad") {
if($ranking[$i]['uid'] == $session->uid) {
echo "<tr class=\"hl \"><td class=\"ra fc\" >";
} else {
echo "<tr><td class=\"ra \" >";
}
echo $i . ".</td>
<td class=\"hero \">
<img class=\"unit u" . $ranking[$i]['unit'] . "\" alt=\"\" title=\"\" src=\"img/x.gif\"> " . $ranking[$i]['name'] . "</td>
<td class=\"pla \"><center><a href=\"spieler.php?uid=" . $ranking[$i]['uid'] . "\">" . $ranking[$i]['owner'] . "</a></center></td>
<td class=\"lev \">" . $ranking[$i]['level'] . "</td>
<td class=\"xp \">" . $ranking[$i]['experience'] . "</td>
</tr>
";
}
}
} else {
echo "<td class=\"none\" colspan=\"5\">No heros found</td>";
}
?>
</tbody>
</table>
<?php
include ("ranksearch.tpl");
?>
+67
View File
@@ -0,0 +1,67 @@
<?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="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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['username']) && $ranking[$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($ranking[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($ranking[$i]['aname'] != "") {
echo "<a href=\"allianz.php?aid=".$ranking[$i]['alliance']."\">".$ranking[$i]['aname']."</a>";
}
else {
echo "-";
}
echo "</td><td class=\"pop\" >".$ranking[$i]['totalpop']."</td><td class=\"vil\">".$ranking[$i]['totalvillage']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+67
View File
@@ -0,0 +1,67 @@
<?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="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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['username']) && $ranking[$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($ranking[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($ranking[$i]['alliance'] != 0) {
echo "<a href=\"allianz.php?aid=".$ranking[$i]['alliance']."\">".$ranking[$i]['aname']."</a>";
}
else {
echo "-";
}
echo "</td><td class=\"pop\" >".$ranking[$i]['totalpop']."</td><td class=\"vil\">".$ranking[$i]['totalvillage']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+67
View File
@@ -0,0 +1,67 @@
<?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="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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['username']) && $ranking[$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($ranking[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($ranking[$i]['alliance'] != 0) {
echo "<a href=\"allianz.php?aid=".$ranking[$i]['alliance']."\">".$ranking[$i]['aname']."</a>";
}
else {
echo "-";
}
echo "</td><td class=\"pop\" >".$ranking[$i]['totalpop']."</td><td class=\"vil\">".$ranking[$i]['totalvillage']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+67
View File
@@ -0,0 +1,67 @@
<?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="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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['username']) && $ranking[$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($ranking[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$ranking[$i]['userid']."\">".$ranking[$i]['username']."</a>";
}
echo"</td><td class=\"al\" >";
if($ranking[$i]['alliance'] != 0) {
echo "<a href=\"allianz.php?aid=".$ranking[$i]['alliance']."\">".$ranking[$i]['aname']."</a>";
}
else {
echo "-";
}
echo "</td><td class=\"pop\" >".$ranking[$i]['totalpop']."</td><td class=\"vil\">".$ranking[$i]['totalvillage']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+58
View File
@@ -0,0 +1,58 @@
<?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_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=1"><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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['username']) && $ranking[$i] != "pad") {
if($session->uid == $ranking[$i]['id']){
echo "<tr class=\"hl\"><td class=\"ra fc\" >";
}
else {
echo "<tr><td class=\"ra \" >";
}
echo $i.".</td><td class=\"pla \" >";
if($ranking[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$ranking[$i]['id']."\">".$ranking[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$ranking[$i]['id']."\">".$ranking[$i]['username']."</a>";
}
echo"</td><td class=\"pop \" >".$ranking[$i]['totalpop']."";
echo "</td><td class=\"vil\">".$ranking[$i]['totalvillages']."</td><td class=\"po \" >".$ranking[$i]['apall']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
<?php
include("ranksearch.tpl");
?>
+61
View File
@@ -0,0 +1,61 @@
<?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_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=1"><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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['username']) && $ranking[$i] != "pad") {
if($session->uid == $ranking[$i]['id']){
echo "<tr class=\"hl\"><td class=\"ra fc\" >";
}
else {
echo "<tr><td class=\"ra \" >";
}
echo $i.".</td><td class=\"pla \" >";
if($ranking[$i]['access'] > 2){
echo"<u><a href=\"spieler.php?uid=".$ranking[$i]['id']."\">".$ranking[$i]['username']."</a></u>";
} else {
echo"<a href=\"spieler.php?uid=".$ranking[$i]['id']."\">".$ranking[$i]['username']."</a>";
}
echo"</td><td class=\"pop \" >".$ranking[$i]['totalpop'];
echo "</td><td class=\"vil\">".$ranking[$i]['totalvillages']."</td><td class=\"po \" >".$ranking[$i]['dpall']."</td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
?>
</tbody>
</table>
<?php
include("ranksearch.tpl");
?>
+221
View File
@@ -0,0 +1,221 @@
<?php
$db_host=SQL_SERVER; $db_user=SQL_USER; $db_pass=SQL_PASS; $db_name=SQL_DB;
$con = mysql_connect($db_host, $db_user, $db_pass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
for($i=1;$i<=0;$i++) {
echo "Row ".$i;
}
mysql_select_db($db_name, $con);
$result = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 3 AND tribe<=3 ORDER BY ap DESC Limit 10");
$result2 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE username = '".$session->username."' ORDER BY ap 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=1"><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 = mysql_fetch_array($result))
{
if($row['username']==$session->username) {
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 = mysql_fetch_array($result2))
{
if($row['username'] == $session->username) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&nbsp;</td>";
if($row['username'] == $session->username) {
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 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 3 AND tribe<=3 ORDER BY dp DESC Limit 10");
$result2 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE username = '".$session->username."' 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 = mysql_fetch_array($result))
{
if($row['username']==$session->username) {
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 = mysql_fetch_array($result2))
{
if($row['username'] == $session->username) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&nbsp;</td>";
if($row['username'] == $session->username) {
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 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 3 AND tribe<=3 ORDER BY clp DESC Limit 10");
$result2 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE username = '".$session->username."' 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 = mysql_fetch_array($result))
{
if($row['username']==$session->username) {
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 = mysql_fetch_array($result2))
{
if($row['username'] == $session->username) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&nbsp;</td>";
if($row['username'] == $session->username) {
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 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 3 AND tribe<=3 ORDER BY RR DESC Limit 10");
$result2 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE username = '".$session->username."' 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 = mysql_fetch_array($result))
{
if($row['username']==$session->username) {
echo "<tr class=\"own hl\">"; } else { echo "<tr>"; }
echo "<td>".$i++.".&nbsp;</td>";
echo "<td><a href='spieler.php?uid=".$row['id']."'>".$row['username']."</a></td>";
echo "<td>".$row['RR']."</td>";
echo "</tr>";
}
?>
<tr>
<td colspan="3" class="empty"></td>
</tr>
<?php
while($row = mysql_fetch_array($result2))
{
if($row['username'] == $session->username) {
echo "<tr class=\"none\">"; } else { echo "<tr class=\"own hl\">"; }
echo "<td class=\"ra fc\">?&nbsp;</td>";
if($row['username'] == $session->username) {
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>";
}
mysql_close($con);
?>
</tbody>
</table>
<div>
+30
View File
@@ -0,0 +1,30 @@
<?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="20" 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; ?>" />
<input type="image" value="submit" name="submit" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" />
</div>
</form>
<div class="navi">
<?php
if($start != 1 && $start+20 < count($ranking)) {
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($ranking)) {
echo "&laquo; back | <a href=\"statistiken.php?id=".$_GET['id']."&amp;rank=".($start+20)."\">forward &raquo;</a>";
}
else if($start != 1 && $start-20 < count($ranking)) {
echo "<a href=\"statistiken.php?id=".$_GET['id']."&amp;rank=".($start-20)."\">&laquo; back</a> | forward &raquo;";
}
else {
echo "&laquo; back | forward &raquo;";
}
?>
+54
View File
@@ -0,0 +1,54 @@
<?php
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The village <b>".$_SESSION['search']."</b> does not exist.</p>";
$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
if(isset($_GET['rank'])){
$multiplier = 1;
if(is_numeric($_GET['rank'])) {
if($_GET['rank'] > count($ranking->getRank())) {
$_GET['rank'] = count($ranking->getRank())-1;
}
while($_GET['rank'] > (20*$multiplier)) {
$multiplier +=1;
}
$start = 20*$multiplier-19;
} else { $start = ($_SESSION['start']+1); }
} else { $start = ($_SESSION['start']+1); }
if(count($ranking->getRank()) > 0) {
$ranking = $ranking->getRank();
for($i=$start;$i<($start+20);$i++) {
if(isset($ranking[$i]['wref']) && $ranking[$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=".$ranking[$i]['wref']."&amp;c=".$generator->getMapCheck($ranking[$i]['wref'])."\">".$ranking[$i]['name']."</a></td>";
echo "<td class=\"pla \" ><a href=\"spieler.php?uid=".$ranking[$i]['owner']."\">".$ranking[$i]['user']."</a></td>";
echo "<td class=\"hab\">".$ranking[$i]['pop']."</td><td class=\"aligned_coords \" ><div class=\"cox\">(".$ranking[$i]['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$ranking[$i]['y'].")</div></td></tr>";
}
}
}
else {
echo "<td class=\"none\" colspan=\"5\">No villages found</td>";
}
?>
<?php
include("ranksearch.tpl");
?>
+43
View File
@@ -0,0 +1,43 @@
<?php
$result = mysql_query("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
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 ");
?>
<table cellpadding="1" cellspacing="1" id="villages" class="row_table_data">
<thead>
<tr>
<th colspan="6">
Wonder of the world
</th>
</tr>
<tr>
<td></td>
<td>Player</td>
<td>Name</td>
<td>Alliance</td>
<td>Level</td>
</tr>
</thead><tbody>
<?php
$cont = 1;
while($row = mysql_fetch_array($result))
{
$ally = $database->getAlliance($row[alliance]);
?>
<tr>
<td><?php echo $cont; $cont++;?>.</td>
<td><a href="spieler.php?uid=<?php echo $row['id'];?>"><?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>
</tr>
<?php }
?>