mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
fix: pagination returns to ALL from Attacks page in battle reports
Closes #343
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Won scouting as attacker","Lost scouting as attacker","Won scouting as defender","Lost scouting as defender","Scout Report");
|
||||
?>
|
||||
<form method="post" action="berichte.php" name="msg">
|
||||
@@ -20,32 +20,32 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
<input class="check" type="checkbox" id="s10" name="s10" onclick="Allmsg(this.form);" />
|
||||
<?php } ?></th>
|
||||
<th class="buttons"><input name="del" type="image" id="btn_delete" class="dynamic_img" src="img/x.gif" value="delete" alt="delete" />
|
||||
<?php if($session->plus) {
|
||||
<?php if($session->plus) {
|
||||
if(isset($_GET['t']) && $_GET['t'] == 5) {
|
||||
echo "<input name=\"start\" type=\"image\" value=\"back\" alt=\"back\" id=\"btn_back\" class=\"dynamic_img\" src=\"img/x.gif\" />";
|
||||
}
|
||||
else {
|
||||
echo "<input name=\"archive\" type=\"image\" value=\"Archive\" alt=\"Archive\" id=\"btn_archiv\" class=\"dynamic_img\" src=\"img/x.gif\" />";
|
||||
echo "<input name=\"archive\" type=\"image\" value=\"Archive\" alt=\"Archive\" id=\"btn_archiv\" class=\"dynamic_img\" src=\"img/x.gif\" />";
|
||||
}
|
||||
}?>
|
||||
</th>
|
||||
<th class=navi>
|
||||
<?php
|
||||
<?php
|
||||
if(!isset($_GET['s']) && count($rep1) < 10) {
|
||||
echo "«»";
|
||||
}
|
||||
else if (!isset($_GET['s']) && count($rep1) > 10) {
|
||||
echo "«<a href=\"?p=report&s=10&o=0\">»</a>";
|
||||
echo "«<a href=\"?p=report&".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=10&o=0\">»</a>";
|
||||
}
|
||||
else if(isset($_GET['s']) && count($rep1) > $_GET['s']) {
|
||||
if(count($rep1) > ($_GET['s']+10) && $_GET['s']-10 < count($rep1) && $_GET['s'] != 0) {
|
||||
echo "<a href=\"?p=report&s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?p=report&s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "<a href=\"?p=report&".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?p=report&".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else if(count($rep1) > $_GET['s']+10) {
|
||||
echo "«<a href=\"?p=report&s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "«<a href=\"?p=report&".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href=\"?p=report&s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
echo "<a href=\"?p=report&".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -53,7 +53,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
if(isset($_GET['s'])) {
|
||||
$s = $_GET['s'];
|
||||
@@ -61,7 +61,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
else {
|
||||
$s = 0;
|
||||
}
|
||||
|
||||
|
||||
$name = 1;
|
||||
$count = 0;
|
||||
for($i=(1+$s);$i<=(10+$s);$i++) {
|
||||
@@ -88,10 +88,9 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
}
|
||||
if(count($rep1) == 0) {
|
||||
echo "<td colspan=\"3\" class=\"none\">There are no reports available.</td></tr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="content" class="messages">
|
||||
<h1>Messages</h1>
|
||||
<?php
|
||||
<?php
|
||||
include("menu.tpl");
|
||||
?>
|
||||
<form method="post" action="nachrichten.php" name="msg" ><input type="hidden" name="ft" value="m5" /><table cellpadding="1" cellspacing="1" id="overview">
|
||||
@@ -14,26 +14,26 @@ include("menu.tpl");
|
||||
</th>
|
||||
<th colspan="2" class="buttons">
|
||||
<input name="delmsg" value="delete" type="image" id="btn_delete" class="dynamic_img" src="img/x.gif" alt="delete" /> <input name="start" type="image" value="Back" alt="Back" id="btn_back" class="dynamic_img" src="img/x.gif" /></th>
|
||||
<th class="navi"><?php
|
||||
<th class="navi"><?php
|
||||
if(!isset($_GET['s']) && count($message->archived1) < 10) {
|
||||
echo "«»";
|
||||
}
|
||||
else if (!isset($_GET['s']) && count($message->archived1) > 10) {
|
||||
echo "«<a href=\"?s=10&o=0\">»</a>";
|
||||
echo "«<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=10&o=0\">»</a>";
|
||||
}
|
||||
else if(isset($_GET['s']) && count($message->archived1) > $_GET['s']) {
|
||||
if(count($message->archived1) > ($_GET['s']+10) && $_GET['s']-10 < count($message->archived1) && $_GET['s'] != 0) {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else if(count($message->archived1) > $_GET['s']+10) {
|
||||
echo "«<a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "«<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
}
|
||||
}
|
||||
?></th></tr></tfoot><tbody>
|
||||
<?php
|
||||
<?php
|
||||
if(isset($_GET['s'])) {
|
||||
$s = $_GET['s'];
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
echo "«»";
|
||||
}
|
||||
else if (!isset($_GET['s']) && count($message->inbox1) > 10) {
|
||||
echo "«<a href=\"?s=10&o=0\">»</a>";
|
||||
echo "«<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=10&o=0\">»</a>";
|
||||
}
|
||||
else if(isset($_GET['s']) && count($message->inbox1) > $_GET['s']) {
|
||||
if(count($message->inbox1) > ($_GET['s']+10) && $_GET['s']-10 < count($message->inbox1) && $_GET['s'] != 0) {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else if(count($message->inbox1) > $_GET['s']+10) {
|
||||
echo "«<a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "«<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
}
|
||||
}
|
||||
?></th></tr></tfoot><tbody>
|
||||
|
||||
+11
-12
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Won scouting as attacker","Lost scouting as attacker","Won scouting as defender","Lost scouting as defender","Scout Report");
|
||||
?>
|
||||
<form method="post" action="berichte.php" name="msg">
|
||||
@@ -20,17 +20,17 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
<input class="check" type="checkbox" id="s10" name="s10" onclick="Allmsg(this.form);" />
|
||||
<?php } ?></th>
|
||||
<th class="buttons"><input name="del" type="image" id="btn_delete" class="dynamic_img" src="img/x.gif" value="delete" alt="delete" />
|
||||
<?php if($session->plus) {
|
||||
<?php if($session->plus) {
|
||||
if(isset($_GET['t']) && $_GET['t'] == 5) {
|
||||
echo "<input name=\"start\" type=\"image\" value=\"back\" alt=\"back\" id=\"btn_back\" class=\"dynamic_img\" src=\"img/x.gif\" />";
|
||||
}
|
||||
else {
|
||||
echo "<input name=\"archive\" type=\"image\" value=\"Archive\" alt=\"Archive\" id=\"btn_archiv\" class=\"dynamic_img\" src=\"img/x.gif\" />";
|
||||
echo "<input name=\"archive\" type=\"image\" value=\"Archive\" alt=\"Archive\" id=\"btn_archiv\" class=\"dynamic_img\" src=\"img/x.gif\" />";
|
||||
}
|
||||
}?>
|
||||
</th>
|
||||
<th class=navi>
|
||||
<?php
|
||||
<?php
|
||||
if(!isset($_GET['s']) && count($message->noticearray) < 10) {
|
||||
echo "«»";
|
||||
}
|
||||
@@ -39,13 +39,13 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
}
|
||||
else if(isset($_GET['s']) && count($message->noticearray) > $_GET['s']) {
|
||||
if(count($message->noticearray) > ($_GET['s']+10) && $_GET['s']-10 < count($message->noticearray) && $_GET['s'] != 0) {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else if(count($message->noticearray) > $_GET['s']+10) {
|
||||
echo "«<a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "«<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&' : '')."s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -53,7 +53,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
if(isset($_GET['s'])) {
|
||||
$s = $_GET['s'];
|
||||
@@ -61,7 +61,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
else {
|
||||
$s = 0;
|
||||
}
|
||||
|
||||
|
||||
$name = 1;
|
||||
$count = 0;
|
||||
for($i=(1+$s);$i<=(10+$s);$i++) {
|
||||
@@ -88,10 +88,9 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
}
|
||||
if(count($message->noticearray) == 0) {
|
||||
echo "<td colspan=\"3\" class=\"none\">There are no reports available.</td></tr>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user