mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fix maxlogin.php pager
This commit is contained in:
+10
-8
@@ -25,7 +25,6 @@ function safe_query ($query,$id,$where = '') {
|
|||||||
}
|
}
|
||||||
function searchform () {
|
function searchform () {
|
||||||
?>
|
?>
|
||||||
<br />
|
|
||||||
<form method=post name=search action=maxlogin.php?>
|
<form method=post name=search action=maxlogin.php?>
|
||||||
<input type=hidden name=action value=searchip>
|
<input type=hidden name=action value=searchip>
|
||||||
<p class=success align=center>Search IP <input type=text name=ip size=25> <input type=submit name=submit value='Search IP' class=btn></p>
|
<p class=success align=center>Search IP <input type=text name=ip size=25> <input type=submit name=submit value='Search IP' class=btn></p>
|
||||||
@@ -51,15 +50,18 @@ elseif ($order == 'status')
|
|||||||
else
|
else
|
||||||
$orderby = "attempts";
|
$orderby = "attempts";
|
||||||
|
|
||||||
$perpage = 5;
|
$perpage = 50;
|
||||||
list($pagertop, $pagerbottom, $limit) = pager($perpage, $countrows, "maxlogin.php?order=$order&");
|
list($pagertop, $pagerbottom, $limit) = pager($perpage, $countrows, "maxlogin.php?order=$order&");
|
||||||
$msg = '';
|
$msg = '';
|
||||||
|
if ($update) {
|
||||||
|
$msg = "<h3><b>".htmlspecialchars($update)." Successful!</b></h3>";
|
||||||
|
}
|
||||||
if ($action == 'showlist') {
|
if ($action == 'showlist') {
|
||||||
stdhead ("Max. Login Attemps - Show List");
|
stdhead ("Max. Login Attemps - Show List");
|
||||||
print("<h1>Failed Login Attempts</h1>");
|
print("<h1>Failed Login Attempts</h1>");
|
||||||
|
print($msg);
|
||||||
print("<table border=1 cellspacing=0 cellpadding=5 width=100%>\n");
|
print("<table border=1 cellspacing=0 cellpadding=5 width=100%>\n");
|
||||||
if ($update)
|
|
||||||
$msg = "<tr><td colspan=6><b>".htmlspecialchars($update)." Successful!</b></td></tr>\n";
|
|
||||||
$res = sql_query("SELECT * FROM loginattempts ORDER BY $orderby DESC $limit") or sqlerr(__FILE__,__LINE__);
|
$res = sql_query("SELECT * FROM loginattempts ORDER BY $orderby DESC $limit") or sqlerr(__FILE__,__LINE__);
|
||||||
if (mysql_num_rows($res) == 0)
|
if (mysql_num_rows($res) == 0)
|
||||||
print("<tr><td colspan=2><b>Nothing found</b></td></tr>\n");
|
print("<tr><td colspan=2><b>Nothing found</b></td></tr>\n");
|
||||||
@@ -76,10 +78,10 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
print($msg);
|
print("</table>");
|
||||||
print("</table>\n");
|
if ($countrows > $perpage) {
|
||||||
if ($countrows > $perpage)
|
echo $pagerbottom;
|
||||||
echo '<tr><td colspan=2>'.$pagerbottom.'</td></tr>';
|
}
|
||||||
searchform();
|
searchform();
|
||||||
stdfoot();
|
stdfoot();
|
||||||
}elseif ($action == 'ban') {
|
}elseif ($action == 'ban') {
|
||||||
|
|||||||
Reference in New Issue
Block a user