<?php
class videoAction extends baseAction {
    public function index(){
    $data = D('pages');
    $start_time = time()-(60*60*8);
	$map = " 1=1 and a.status='1' and a.video !='' ";
	$order = ' order by a.id desc ';
	$result = $data->content_page(25,$map,$order,'video');
	// 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','video');
	$this->assign('action','video');
	$this->display(C('default_tpl').'/Index/index');
    }
    public function videohot(){
    $data = D('pages');
    $start_time = time()-(60*60*8);
	$map = " 1=1 and a.status='1' and a.video !='' ";
	$order = ' order by a.yes desc,a.id desc ';
	$result = $data->content_page(25,$map,$order,'videohot');
	// 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','video');
	$this->assign('action','videohot');
	$this->display(C('default_tpl').'/Index/index');
    }
    
}