Example #1
0
                    $q[] = "by={$by}";
                    $title .= (!isset($type) ? 'Entries ' : '') . "by {$by} ";
                }
            } else {
                if (isset($q)) {
                    $q[] = 'by=' . CoreUtils::FIXPATH_EMPTY;
                }
            }
        }
        $q = array();
        if (isset($_GET['js'])) {
            $q[] = 'js=' . $_GET['js'];
        }
        process_filter($q);
        $Pagination = new Pagination('admin/logs', 20, $Database->count('log'));
        $heading = 'Global logs';
        if (!empty($title)) {
            $title .= '- ';
        }
        $title .= "Page {$Pagination->page} - {$heading}";
        CoreUtils::fixPath("/admin/logs/{$Pagination->page}" . (!empty($q) ? '?' . implode('&', $q) : ''));
        process_filter();
        $LogItems = $Database->orderBy('timestamp')->orderBy('entryid')->get('log', $Pagination->getLimit());
        if (isset($_GET['js'])) {
            $Pagination->respond(Logs::getTbody($LogItems), '#logs tbody');
        }
        CoreUtils::loadPage(array('title' => $title, 'view' => "{$do}-logs", 'css' => "{$do}-logs", 'js' => array("{$do}-logs", 'paginate')));
        break;
    default:
        CoreUtils::notFound();
}
Example #2
0
    echo isset($by) || isset($type) ? '' : ' disabled';
    ?>
></button>
		<datalist id="from_values">
			<option>Web server</option>
			<option>you</option>
		</datalist>
	</form>
	<?php 
    echo $Pagination->HTML;
    ?>
	<table id="logs">
		<thead>
			<tr>
				<th class="entryid">#</th>
				<th class="timestamp">Timestamp</th>
				<th class="ip">Initiator</th>
				<th class="reftype">Event</th>
			</tr>
		</thead>
		<tbody><?php 
    echo Logs::getTbody($LogItems);
    ?>
</tbody>
	</table>
<?php 
    echo $Pagination->HTML;
}
?>
</div>