API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|
Functions | |
protector_ip_cmp ($a, $b) | |
protector_normalize_ipv4 ($n) | |
Variables | |
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) | |
foreach ( $num_array as $n) | |
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))) | |
protector_ip_cmp | ( | $a, | |
$b | |||
) |
Callback used by uksort and usort for ip sorting
string | $a | |
string | $b |
protector_normalize_ipv4 | ( | $n | ) |
pad all octets in an ipv4 address to 3 digits for sorting
string | $n | ipv4 address |
$bad_ips4disp = '' |
$conf = $protector->getConf() |
foreach ( $bad_ips as $bad_ip=> $jailed_time) $group1_ips = $protector->get_group1_ips() |
$group1_ips4disp = htmlspecialchars(implode("\n", $group1_ips), ENT_QUOTES) |
$log_table = $db->prefix($mydirname . '_log') |
if (isset( $_GET[ 'num'])) $myts = MyTextSanitizer::getInstance() |
$nav = new XoopsPageNav($numrows, $num, $pos, 'pos', "page=center&num=$num") |
$nav_html = $nav->renderNav(10) |
$num = empty($_GET['num']) ? 20 : (int)$_GET['num'] |
$num_array = array(20, 100, 500, 2000) |
$num_options = '' |
$oddeven = 'odd' |
$pos = empty($_GET['pos']) ? 0 : (int)$_GET['pos'] |
$protector = Protector::getInstance($db->conn) |
$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") |
if (!empty( $_POST[ 'action'])) $rs = $db->query("SELECT count(lid) FROM $log_table") |
foreach($num_array as $n) | ( | $num_array as | ) |
while(false !==(list($lid, $uid, $ip, $agent, $type, $description, $timestamp, $uname)=$db->fetchRow($prs))) | ( | false ! | = = (list($lid, $uid, $ip, $agent, $type, $description, $timestamp, $uname) = $db->fetchRow($prs)) | ) |