"status","name"=>'审核状态',"value"=>array('0'=>'未审核','1'=>'已审核','2'=>'已拒绝')); $search_list[]=array("param"=>"end","name"=>'发送时间',"value"=>array('1'=>'今天','3'=>'最近三天','7'=>'最近七天','15'=>'最近半月','30'=>'最近一个月')); $search_list[]=array("param"=>"r_time","name"=>'回复时间',"value"=>array('1'=>'今天','3'=>'最近三天','7'=>'最近七天','15'=>'最近半月','30'=>'最近一个月')); $this->yunset("search_list",$search_list); } function index_action(){ $this->set_search(); $companyM = $this -> MODEL('company'); $resumeM = $this -> MODEL('resume'); if($_GET['end']){ if($_GET['end']=='1'){ $where['ctime'] = array('>=',strtotime('today')); }else{ $where['ctime'] = array('>=',strtotime('-'.intval($_GET['end']).' day')); } $urlarr['end'] = $_GET['end']; } if($_GET['r_time']){ if($_GET['r_time']=='1'){ $where['reply_time'] = array('>=',strtotime('today')); }else{ $where['reply_time'] = array('>=',strtotime('-'.intval($_GET['r_time']).' day')); } $urlarr['r_time'] = $_GET['r_time']; } if($_GET['keyword']){ $keytype = intval($_GET['type']); $keyword = trim($_GET['keyword']); if($keytype == 1){ $rwhere['name'] = array('like',$keyword); $resume = $resumeM -> getResumeList($rwhere,array('field'=>'uid,name')); foreach($resume as $v){ $userid[]=$v['uid']; } $where['uid'] = array('in',pylode(',',$userid)); }elseif($keytype == 2){ $cwhere['name'] = array('like',$keyword); $ctList = $companyM ->getList($cwhere,array('field'=>'uid')); $comapant = $ctList['list']; foreach($comapant as $v){ $comid[]=$v['uid']; } $where['cuid'] = array('in',pylode(',',$comid)); }elseif($keytype == 3){ $where['content'] = array('like',$keyword); }elseif($keytype == 4){ $where['reply'] = array('like',$keyword); } $urlarr['keytype'] = $keytype; $urlarr['keyword'] = $keyword; } if(isset($_GET['status'])){ $where['status'] = $_GET['status']; $urlarr['status'] = $_GET['status']; } $urlarr = $_GET; $urlarr['page'] = "{{page}}"; $pageurl = Url($_GET['m'],$urlarr,'admin'); $pageM = $this -> MODEL('page'); $pages = $pageM -> pageList('company_msg',$where,$pageurl,$_GET['page']); if($pages['total'] > 0){ //limit order 只有在列表查询时才需要 if($_GET['order']){ $where['orderby'] = $_GET['t'].','.$_GET['order']; $urlarr['order'] = $_GET['order']; $urlarr['t'] = $_GET['t']; }else{ $where['orderby'] = array('id,desc'); } } $where['limit'] = $pages['limit']; $mes_list = $companyM -> getCompanyMsgList($where,array('utype'=>'admin','cache'=>'1')); $this->yunset("mes_list",$mes_list); $this->yuntpl(array('admin/admin_compl')); } function lockinfo_action(){ $companyM = $this -> MODEL('company'); $msg = $companyM -> getCompanyMsgInfo(array('id'=>$_POST['cid']),array('field'=>'statusbody')); echo trim($msg['statusbody']);die; } function status_action(){ $companyM = $this -> MODEL('company'); $post = array( 'status' => intval($_POST['status']), 'statusbody' => trim($_POST['statusbody']) ); $cids = @explode(',', $_POST['cid']); $return = $companyM -> statusComment(array('id' => array('in', pylode(',', $cids))), array('post' => $post)); if($return['errcode']==9){ $this -> ACT_layer_msg($return['msg'],$return['errcode'],"index.php?m=com_pl",2,1); }else{ $this -> ACT_layer_msg($return['msg'],$return['errcode']); } } function del_action(){ $compannyM = $this -> MODEL('company'); $delID = is_array($_POST['del']) ? $_POST['del'] : $_GET['id']; if($delID){ $where['id'] = array('in',pylode(',',$delID)); $list = $compannyM -> getCompanyMsgList($where,array('field'=>'uid')); $return = $compannyM -> delCompanyMsg($delID); if($list){ foreach($list as $v){ $this->automsg('管理员操作:删除会员(ID:'.$v['uid'].')面试评论',$v['uid']); } } $this->layer_msg($return['msg'],$return['errcode'],$return['layertype'],$_SERVER['HTTP_REFERER']); }else{ $this->layer_msg('非法操作!',8); } } function show_action(){ $companyM = $this->MODEL("company"); $id = intval($_POST['id']); $info = $companyM->getCompanyMsgInfo(array('id' => $id), array('field'=>'content,othercontent,reply','type'=>'admin')); $data['content'] = $info['content']; $data['othercontent'] = $info['othercontent']; $data['reply'] = $info['reply']; echo json_encode($data);die; } } ?>