Inheritance: extends Model
 /**
  * [用于加载用户操作日志]
  */
 public function userlogs()
 {
     // 显示操作日志
     $logs = new LogsModel();
     // 当前页码
     $page = isset($_GET['page']) ? intval($_GET['page']) : 1;
     // 每页显示数量
     $counts = $GLOBALS['config']['admin_goods_pagecount'];
     //计算分页次数
     $pagecount = $logs->getAddNum();
     // 总记录数
     $pages = ceil($pagecount / $counts);
     // 字符过滤
     if (!is_integer($page) || $page < 1 || $page > $pages) {
         $page = 1;
     }
     // 分页显示数据
     $tables = $logs->getAllLogs($page, $counts);
     // 分页字符串
     $pagestr = Page::setAHtmlPage('index.php', 'index', 'userlogs', $pagecount, $counts, $page);
     // $pagestr .= Page::setTabHtmlPage('index.php', 'index','userlogs', $pagecount, $counts, $page);
     // $pagestr .= Page::setStrHtmlPage('index.php', 'index','userlogs', $pagecount, $counts, $page);
     // // 选择框分页
     // $pagestr .= Page::setHtmlOption('index.php', 'index','userlogs', $pagecount, $counts, $page);
     // 待实现分页
     include_once VIEW_DIR . '/user_logs.html';
 }
 public function actionView($date)
 {
     $model = new LogsModel();
     if (!$model->validateDate($date)) {
         die('lol that don\'t look right');
     }
     $file = $model->getLogFromDate($date);
     $dates = $model->getLogDates();
     $this->render('view', array('date' => $date, 'lines' => $file->getLines()));
 }
 /**
  * 删除留言
  * By:0x584A
  * Date:2015年9月23日 12:56:39
  */
 public function delmessage()
 {
     // 接收删除ID
     $bid = intval($_REQUEST['bid']);
     //判断删除的留言是否存在
     $message = new MessageModel();
     $talk = $message->getById($bid);
     if ($talk) {
         $message->deleteByID($bid);
         $logs = new LogsModel();
         $logs->insertOne($_SESSION['adminuser']['u_name'] . "删除留言【" . $talk['m_name'] . "】成功");
         $this->success('index.php?c=index&a=listmessage', '删除成功..');
     } else {
         $logs = new LogsModel();
         $logs->insertOne($_SESSION['adminuser']['u_name'] . "删除留言【" . $talk['m_name'] . "】<font style='color:red'>失败</font>");
         $this->error("index.php?c=index&a=listmessage", '删除失败,请联系管理员..');
     }
 }