Ejemplo n.º 1
0
function phorum_mod_event_logging_addon()
{
    // This function takes care of cleaning up the garbage.
    event_logging_countlogs();
    // Display a 1x1 transparent gif image.
    header("Content-type: image/gif");
    print "GIF89a‘" . "f™!" . "ù\t," . ";";
}
Ejemplo n.º 2
0
// Which page to show?
if (isset($_POST["prevpage"])) {
    $page = (int) $_POST["curpage"] - 1;
} elseif (isset($_POST["nextpage"])) {
    $page = (int) $_POST["curpage"] + 1;
} else {
    $page = isset($_POST["page"]) ? (int) $_POST["page"] : 1;
}
// What page length to use?
$pagelength = isset($_POST["pagelength"]) ? (int) $_POST["pagelength"] : $default_pagelength;
if (!isset($pagelengths[$pagelength])) {
    $pagelength = $default_pagelength;
}
$filter_base .= '&pagelength=' . $pagelength;
// Retrieve the total number of event logs.
$logcount = event_logging_countlogs($filter);
// Compute the number of pages.
$pages = ceil($logcount / $pagelength);
if ($pages <= 0) {
    $pages = 1;
}
// Create a page list for a drop down menu.
$pagelist = array();
for ($p = 1; $p <= $pages; $p++) {
    $pagelist[$p] = $p;
}
// Keep the current page within bounds.
if ($page <= 0) {
    $page = 1;
}
if ($page > $pages) {