<?php
namespace Mobile\Controller;
use Think\Controller;
class VideoController extends CoreController {
	public function index(){
		if(!session('?video')){
			$this->redirect('first');
		}
		$this->display();
	}

	public function first(){
		if(session('?video')){
			$this->redirect('index');
		}
		if(IS_POST){
			$v=M('video')->where('id=1')->find();
			if($v['p']==I('p')){
				session('video',1);
				$this->success('正在跳转至视频页面','index');
			}else{
				$this->error('密码不正确,请重试!');
			}
		}else{
			$this->display();
		}
	}
}