fix compatibility with php8

This commit is contained in:
xiaomlove
2020-12-29 03:02:34 +08:00
parent 32d47b66c9
commit fe7489ef51
33 changed files with 249 additions and 212 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ else
}
}
$mask = trim($_GET['mask']);
$mask = trim($_GET['mask'] ?? '');
if ($mask == "" || $mask == "255.255.255.255")
{
$where1 = "u.ip = '$ip'";
@@ -54,7 +54,7 @@ else
begin_main_frame();
print("<h1 align=\"center\">".$lang_ipsearch['text_search_ip_history']."</h1>\n");
print("<form method=\"get\" action=\"".$_SERVER[PHP_SELF]."\">");
print("<form method=\"get\" action=\"".$_SERVER['PHP_SELF']."\">");
print("<table align=center border=1 cellspacing=0 width=115 cellpadding=5>\n");
tr($lang_ipsearch['row_ip']."<font color=red>*</font>", "<input type=\"text\" name=\"ip\" size=\"40\" value=\"".htmlspecialchars($ip)."\" />", 1);
tr("<nobr>".$lang_ipsearch['row_subnet_mask']."</nobr>", "<input type=\"text\" name=\"mask\" size=\"40\" value=\"" . htmlspecialchars($mask) . "\" />", 1);
@@ -81,8 +81,8 @@ GROUP BY u.id
die;
}
$order = $_GET['order'];
$page = 0 + $_GET["page"];
$order = $_GET['order'] ?? '';
$page = $_GET["page"] ?? 0;
$perpage = 20;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "$_SERVER[PHP_SELF]?ip=$ip&mask=$mask&order=$order&");