<?php
class picAction extends baseAction {
    public function index(){
    $data = D('pages');
    $start_time = time()-(60*60*8);
	$map = " 1=1 and a.status='1' and a.thumb!='' ";
	$order = ' order by a.id desc ';
	$result = $data->content_page(25,$map,$order,'pic');
	// print_r($result);
	$this->assign('list',$result['list']);
	$this->assign('page',$result['page']);
	//调取列表页笑话大全
	$dq_list = M('tag')->order("number desc")->limit(30)->select();
	//调取爆笑精选，带图片
	$bx_list = M('content_content')->where("status=1 and thumb != ''")->order('rand()')->limit(10)->select();
	$this->assign('dq_list',$dq_list);
	$this->assign('bx_list',$bx_list);
	$this->assign('model','pic');
	$this->assign('action','pic');
	$this->display(C('default_tpl').'/Index/index');
    }
    public function pichot(){
    $data = D('pages');
    $start_time = time()-(60*60*8);
	$map = " 1=1 and a.status='1' and a.thumb!='' ";
	$order = ' order by a.yes desc,a.id desc ';
	$result = $data->content_page(25,$map,$order,'pichot');
	// print_r($result);
	$this->assign('list',$result['list']);
	$this->assign('page',$result['page']);
	//调取列表页笑话大全
	$dq_list = M('tag')->order("number desc")->limit(30)->select();
	//调取爆笑精选，带图片
	$bx_list = M('content_content')->where("status=1 and thumb != ''")->order('rand()')->limit(10)->select();
	$this->assign('dq_list',$dq_list);
	$this->assign('bx_list',$bx_list);
	$this->assign('model','pic');
	$this->assign('action','pichot');
	$this->display(C('default_tpl').'/Index/index');
    }
    
}