<?php
class IndexAction extends BaseAction{
	//关注回复
	public function index(){
		$info2=M('Case')->where('status=2')->limit(5)->order('id DESC')->select();
		$info1=M('Case')->where('status=1')->limit(5)->order('id DESC')->select();
		$info0=M('Case')->where('status=0')->limit(5)->order('id DESC')->select();
		$this->assign('info2',$info2);
		$this->assign('info1',$info1);
		$this->assign('info0',$info0);
		$this->display();
	}
	public function resetpwd(){
		$uid=$this->_get('uid','intval');
		$code=$this->_get('code','trim');
		$rtime=$this->_get('resettime','intval');
		$info=M('Users')->find($uid);
		if( (md5($info['uid'].$info['password'].$info['email'])!==$code) || ($rtime<time()) ){
			$this->error('非法操作',U('Index/index'));
		}
		$this->assign('uid',$uid);
		$this->display();
	}
}