/**
  * 删除链接
  * By:0x584A
  * Date:2015年9月20日 14:18:04
  */
 public function delblogorll()
 {
     // 接收删除ID
     $bid = intval($_REQUEST['bid']);
     $blogroll = new BlogrollModel();
     // 取出记录
     $list = $blogroll->getOne($bid);
     if ($blogroll->deleteByID($bid)) {
         // 增加日志记录
         $logs = new LogsModel();
         $logs->insertOne($_SESSION['adminuser']['u_name'] . '删除了' . $list['b_name'] . '链接');
         $this->success('index.php?c=index&a=blogroll', '删除成功...');
     } else {
         $this->error("index.php?c=index&a=editblogroll&bid=" . $bid, '删除失败,请联系管理员...');
     }
 }
 /**
  * [修改友情链接]
  * By:0x584A
  * Date:2015年9月20日 14:11:08
  */
 public function editblogroll()
 {
     // 接收用户ID
     $bid = intval($_REQUEST['bid']);
     // 加载数据至页面
     $blogroll = new BlogrollModel();
     $list = $blogroll->getOne($bid);
     include_once VIEW_DIR . '/blogroll_edit.html';
 }
 /**
  * [前台首页 显示网站前台首页面]
  */
 public function index()
 {
     // 头部样式
     $this->header();
     $this->view->display('temp/article.html');
     // 文章
     $articleModel = new ArticeModel();
     $articles = $articleModel->getMainArtice();
     foreach ($articles as $key => $value) {
         $this->view->assgin('title2', $value['a_title']);
         $this->view->assgin('Simple_content', $this->sysSubStr(htmlspecialchars_decode($value['a_content']), 250));
         $this->view->assgin('newtime', date('Y-m-d', $value['a_time']));
         $this->view->assgin('name', $value['a_username']);
         $this->view->assgin('type', $value['s_name']);
         $this->view->assgin('scan', $value['a_scan']);
         $this->view->assgin('aid', $value['a_id']);
         $this->view->assgin('tid', $value['s_id']);
         $this->view->assgin('thumbimg', $value['a_thumb_img']);
         // 待添加评论
         $this->view->assgin('Reply_Num', $value['replysum']);
         $this->view->display('temp/article2.html');
     }
     // $this->view->display('temp/article.html');
     // 右边样式
     $abouts = new UserModel();
     $contente = $abouts->getUser();
     $this->view->assgin('autograph', $contente['u_autograph']);
     $this->view->assgin('name', $contente['u_name']);
     $this->view->assgin('profession', $contente['u_profession']);
     $this->view->assgin('native', $contente['u_native']);
     $this->view->assgin('phone', $contente['u_phone']);
     $this->view->assgin('email', $contente['u_email']);
     $this->view->display('temp/aside2.html');
     $this->view->display('temp/aside3_1.html');
     // 最新文章
     $articles = $articleModel->getMainArticeNew();
     foreach ($articles as $key => $value) {
         $this->view->assgin('title', $value['a_title']);
         $this->view->assgin('aid', $value['a_id']);
         $this->view->assgin('tid', $value['s_id']);
         $this->view->display('temp/aside3_2.html');
     }
     $this->view->display('temp/aside3_3.html');
     // 推荐文章
     $articles = $articleModel->getMainArticehot();
     foreach ($articles as $key => $value) {
         $this->view->assgin('title', $value['a_title']);
         $this->view->assgin('aid', $value['a_id']);
         $this->view->assgin('tid', $value['s_id']);
         $this->view->display('temp/aside3_4.html');
     }
     $this->view->display('temp/aside3_5.html');
     // 友情链接
     $blogroll = new BlogrollModel();
     $blogrolls = $blogroll->getNewBlogroll();
     foreach ($blogrolls as $key => $value) {
         $this->view->assgin('url', $value['b_url']);
         $this->view->assgin('Blogroll', $value['b_name']);
         $this->view->display('temp/aside3_6.html');
     }
     // 备案号
     $init = new InitModel();
     $inits = $init->getOne();
     $this->view->assgin('filing', $inits['i_filing']);
     $this->view->display('temp/aside3_7.html');
     // include_once(VIEW_DIR.'/temp/aside2.html');
 }