<?php
// 留言
class GuestbookAction extends CommonAction {
    public function index(){
		$garr= D('Guestbook')->gclist("id,username,inputtime,pid,url,content,path,concat(path,'-',id) as bpath");
		$this->assign('hotlist', D('News')->Hot());
		$this->assign('newslist', D('News')->newsinfo());
		$this->assign('bloglist', D('Blog')->newsinfo());
		$this->assign('Gklist', $garr['list']);
		$this->assign('DateList', D('News')->DateList('News'));	
		$this->assign('title', $title='网志留言板'); 
		$this->assign('page',$garr['page']);
        $this->display();
    }
		
	public function add(){
		$this->adddata('Guestbook');
				
		}
	public function tourl(){
	  $this->gettourl('Guestbook');
      } 
}
?>