|
if(isset($_GET['num'])) | $myts = MyTextSanitizer::getInstance() |
|
| $db = XoopsDatabaseFactory::getDatabaseConnection() |
|
| $pos = empty($_GET['pos']) ? 0 : (int)$_GET['pos'] |
|
| $num = empty($_GET['num']) ? 20 : (int)$_GET['num'] |
|
| $log_table = $db->prefix($mydirname . '_log') |
|
| $protector = Protector::getInstance($db->conn) |
|
| $conf = $protector->getConf() |
|
if(!empty($_POST['action'])) | $rs = $db->query("SELECT count(lid) FROM $log_table") |
|
| $prs = $db->query("SELECT l.lid, l.uid, l.ip, l.agent, l.type, l.description, UNIX_TIMESTAMP(l.timestamp), u.uname FROM $log_table l LEFT JOIN " . $db->prefix('users') . " u ON l.uid=u.uid ORDER BY timestamp DESC LIMIT $pos,$num") |
|
| $nav = new XoopsPageNav($numrows, $num, $pos, 'pos', "page=center&num=$num") |
|
| $nav_html = $nav->renderNav(10) |
|
| $num_options = '' |
|
| $num_array = array(20, 100, 500, 2000) |
|
if(!is_writable(dirname(__DIR__) . '/configs')) | $bad_ips = $protector->get_bad_ips(true) |
|
| $bad_ips4disp = '' |
|
foreach($bad_ips as $bad_ip=> $jailed_time) | $group1_ips = $protector->get_group1_ips() |
|
| $group1_ips4disp = htmlspecialchars(implode("\n", $group1_ips), ENT_QUOTES) |
|
| $oddeven = 'odd' |
|
| while (false !==(list( $lid, $uid, $ip, $agent, $type, $description, $timestamp, $uname)=$db->fetchRow( $prs))) |
|