示例#1
0
 /**
  * View system logs
  */
 public function actionLogs()
 {
     $curPage = $this->getPage("page");
     $pageSize = $this->getPageSize("pagesize", 10);
     $count = SystemLog::find()->count();
     $logs = SystemLog::find()->order_desc("id")->join('user')->range(($curPage - 1) * $pageSize, $pageSize);
     $pager = new RPager('page', $count, $pageSize, RHtml::siteUrl('admin/logs'), $curPage);
     $this->setHeaderTitle("System logs");
     $this->render('logs', ['logs' => $logs, 'pager' => $pager->showPager(), 'count' => $count], false);
 }