ThinkPHP搭建cms-查看所有用户和简历详情
namespace AdminController;
class MemberController extends CommonController
{
/**
* 会员列表
* @author wusn <message@jswusn.com>
*/
public function index()
{
$this->mtitle='会员列表';
$data = M('member')->order('id')->select();
$this->assign('data',$data);
$this->assign('empty','<tr><td colspan="5" align="center"><span >暂无内容!</span></td ></tr>');
$this->display();
}
/**
* 查看填写简历
* @author wusn <message@jswusn.com>
*/
public function see(){
$uid = I('id','','intval');
$db = M('member');
$userInfo = $db->where(array('id'=>$uid))->find();
if(!$userInfo){
$this->error('用户不存在!');
}
$resume = M('resume')->where(array('uid'=>$uid))->find();
if(!$resume){
$this->error('当前用户没有填写简历!');
}
$edu_history = M('eduhistory')->where(array('uid'=>$uid))->order('education')->select();
$edu = $this->edu();
$this->assign('edu',$edu);
$this->assign('work_time',$this->work_time());
$this->assign('edu_history',$edu_history);
$this->assign('userInfo',$userInfo);
$this->assign('resume',$resume);
$this->display();
}
/**
* 学历
* @return array
* @author wusn <message@jswusn.com>
*/
protected function edu(){
return array('不限','小学','初中','高中','中专','大专','本科及以上','其他');
}
/**
* 工作年限
* @return array
* @author wusn <message@jswusn.com>
*/
protected function work_time(){
return array('0'=>'不限','1'=>'1年以内','2'=>'1-3年','3'=>'3-5年','4'=>'5-10年','5'=>'10年以上');
}
} 以上代码由苏州网站建设构思!








