fix: back arrow redirects to invalid page with < 10 records

#327
This commit is contained in:
Martin Ambrus
2017-11-26 22:42:44 +01:00
parent 3c13f3597b
commit 1d4f980871
4 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -16,10 +16,10 @@ include("menu.tpl");
<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
if(!isset($_GET['s']) && count($message->archived1) < 10) {
echo "&laquo;&raquo;";
echo "&laquo;&raquo;";
}
else if (!isset($_GET['s']) && count($message->archived1) > 10) {
echo "&laquo;<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=10&o=0\">&raquo;</a>";
echo "&laquo;<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=10&o=0\">&raquo;</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) {
@@ -28,8 +28,8 @@ include("menu.tpl");
else if(count($message->archived1) > $_GET['s']+10) {
echo "&laquo;<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']+10)."&o=0\">&raquo;</a>";
}
else {
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']-10)."&o=0\">&laquo;</a>&raquo;";
else if (count($message->archived1) > 10) {
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']-10)."&o=0\">&laquo;</a>&raquo;";
}
}
?></th></tr></tfoot><tbody>
+2 -2
View File
@@ -37,8 +37,8 @@
else if(count($message->inbox1) > $_GET['s']+10) {
echo "&laquo;<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']+10)."&o=0\">&raquo;</a>";
}
else {
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']-10)."&o=0\">&laquo;</a>&raquo;";
else if(count($message->inbox1) > 10) {
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']-10)."&o=0\">&laquo;</a>&raquo;";
}
}
?></th></tr></tfoot><tbody>
+1 -1
View File
@@ -43,7 +43,7 @@
else if(count($message->sent1) > $_GET['s']+10) {
echo "&laquo;<a href=\"?t=2&s=".($_GET['s']+10)."&o=".(!empty($_GET['o']) ? $_GET['o'] : 0)."\">&raquo;</a>";
}
else {
else if (count($message->sent1) > 10) {
echo "<a href=\"?t=2&s=".($_GET['s']-10)."&o=".(!empty($_GET['o']) ? $_GET['o'] : 0)."\">&laquo;</a>&raquo;";
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
else if(count($message->noticearray) > $_GET['s']+10) {
echo "&laquo;<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']+10)."&o=".(!empty($_GET['o']) ? $_GET['o'] : 0)."\">&raquo;</a>";
}
else {
else if (count($message->noticearray) > 10) {
echo "<a href=\"?".(!empty($_GET['t']) ? 't='.$_GET['t'].'&amp;' : '')."s=".($_GET['s']-10)."&o=".(!empty($_GET['o']) ? $_GET['o'] : 0)."\">&laquo;</a>&raquo;";
}
}