本文整理汇总了PHP中SysLog::count方法的典型用法代码示例。如果您正苦于以下问题:PHP SysLog::count方法的具体用法?PHP SysLog::count怎么用?PHP SysLog::count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SysLog
的用法示例。
在下文中一共展示了SysLog::count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extract
<?php
require '../include/init.inc.php';
$page_no = $user_name = $class_name = $start_date = $end_date = "";
extract($_GET, EXTR_IF_EXISTS);
if ($class_name == 'ALL') {
$class_name = '';
}
$start_time = strtotime($start_date);
$end_time = strtotime($end_date);
//START 数据库查询及分页数据
if ($start_date != '' && $end_date != '') {
$row_count = SysLog::getCountByDate($class_name, $user_name, $start_time, $end_time);
} else {
$row_count = SysLog::count($class_name, $user_name);
}
$page_size = PAGE_SIZE;
$page_no = $page_no < 1 ? 1 : $page_no;
$total_page = $row_count % $page_size == 0 ? $row_count / $page_size : ceil($row_count / $page_size);
$total_page = $total_page < 1 ? 1 : $total_page;
$page_no = $page_no > $total_page ? $total_page : $page_no;
$start = ($page_no - 1) * $page_size;
//END
$sys_logs = SysLog::getLogs($class_name, $user_name, $start, $page_size, $start_time, $end_time);
$loadedClz = array();
$namePool = array();
foreach ($sys_logs as &$log) {
if (array_key_exists($log['action'], $OSADMIN_COMMAND_FOR_LOG)) {
$log['action'] = $OSADMIN_COMMAND_FOR_LOG[$log['action']];
}
$class_obj = $log['class_obj'];