BlogReplyController.class.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * 小梦科技资源nanodreamtech.com
  4. *
  5. * ==========================================================================
  6. * @link https://www.nanodreamtech.com/
  7. * @copyright Copyright (c) 2015 liofis.com.
  8. * @license https://www.nanodreamtech.com/license.html License
  9. * ==========================================================================
  10. *
  11. * @author fish
  12. *
  13. */
  14. namespace Admin\Controller;
  15. use Admin\Model\BlogReplyModel;
  16. class BlogReplyController extends CommonController{
  17. protected function _initialize(){
  18. parent::_initialize();
  19. $this->breadcrumb1='博客';
  20. $this->breadcrumb2='博客回复';
  21. }
  22. public function index(){
  23. $model=new BlogReplyModel();
  24. $data=$model->show_blog_reply_page();
  25. $this->assign('empty',$data['empty']);// 赋值数据集
  26. $this->assign('list',$data['list']);// 赋值数据集
  27. $this->assign('page',$data['page']);// 赋值分页输出
  28. /**/
  29. $this->display();
  30. }
  31. function set_status(){
  32. $d['reply_id']=I('get.id');
  33. $d['status']=I('get.status');
  34. $r=M('BlogReply')->save($d);
  35. if($r){
  36. $this->redirect('BlogReply/index');
  37. }
  38. }
  39. }
  40. ?>