/**
  * 管理员展示列表、搜索列表
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     $field = array();
     $order = 'create_time desc';
     $word_form = I('post.w') ? I('post.w') : I('get.w');
     //获取查询字
     $word_form ? $where['truename'] = array('like', "%" . $word_form . "%") : '';
     //生成数据库查询条件
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     $where = !empty($where) ? $where : true;
     $admin_total = $this->AdminUserModel->getAdminTotal($where);
     //列表总数
     $page = max(1, $page);
     $page = min($page, ceil($admin_total / $this->page_number));
     $admin_data = $this->AdminUserModel->getAdminList($where, $field, $order, $page, $this->page_number);
     // 分页数据
     $map = $word_form ? array('w' => $word_form) : array();
     //生成分页连接参数
     $Page = new PageAdmin($admin_total, $this->page_number, $map);
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('word', $word_form);
     // 分页显示输出
     $this->assign('adminlist', $admin_data);
     $this->display();
 }
Пример #2
0
 /**
  * 校园职务列表、校园职务搜索
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     $field = array();
     $order = 'create_time desc';
     $word_form = I('post.w') ? I('post.w') : I('get.w');
     //获取查询字
     $word_form ? $where['title|description'] = array('like', "%" . $word_form . "%") : '';
     //生成数据库查询条件
     $where = !empty($where) ? $where : array();
     $where['is_delete'] = 2;
     //状态为未删除
     $major_total = $this->MajorModel->getMajorTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($major_total / $this->page_number));
     // 获取合法的分页数
     $major_data = $this->MajorModel->getMajorList($where, $field, $order, $page, $this->page_number);
     // 分页数据
     foreach ($major_data as $k => $v) {
         $major_data[$k]['type_id'] = AdminController::getCardType($v['type_id']);
     }
     $map = $word_form ? array('w' => $word_form) : array();
     //生成分页连接参数
     $Page = new PageAdmin($major_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('word', $word_form);
     // 查询关键字
     $this->assign('major', $major_data);
     $this->display();
 }
Пример #3
0
 public function index()
 {
     $where['is_delete'] = 2;
     $map = array();
     $field = array('pkid', 'msg_type', 'title', 'content', 'send_type', 'target_type', 'send_time', 'create_time');
     $word_form = trim(I('post.w') ? I('post.w') : I('get.w'));
     $date_form = trim(I('post.d') ? I('post.d') : I('get.d'));
     if ($word_form) {
         $where['title'] = array('like', "%" . $word_form . "%");
         $map['w'] = $word_form;
     }
     if ($date_form) {
         $where['send_time'] = array('elt', $date_form . ' 23:59:59');
         $map['d'] = $date_form;
     }
     $this->total = $this->MessageModel->where($where)->count();
     $this->page_current = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : $this->page_current;
     ${$this}->page_current = max(1, $this->page_current);
     $this->page_current = min($this->page_current, ceil($this->total / $this->page_number));
     $data = $this->MessageModel->field($field)->where($where)->page($this->page_current, $this->page_number)->order('pkid desc')->select();
     $page_show = new PageAdmin($this->total, $this->page_number, $map);
     $this->assign('page', $page_show->show());
     $this->assign('data', $this->eachData($data));
     $this->assign('map', $map);
     $this->display('Message:index');
 }
 public function index()
 {
     $where = array();
     $field = array('pkid as id', 'title', 'modify_time', 'create_time');
     $order = 'create_time desc';
     $param_form = I('post.') ? I('post.') : I('get.');
     //获取查询字
     #生成数据库查询条件  --begin--
     $param_form['title'] ? $where['title'] = array('like', "%" . $param_form['title'] . "%") : '';
     $where['is_delete'] = 2;
     #生成数据库查询条件   --end--
     $majortypetotal = $this->MajorTypeModel->getMajorTypeTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($majortypetotal / $this->page_number));
     // 获取合法的分页数
     $majortypelist = $this->MajorTypeModel->getMajorTypeList($where, $field, $order, $page, $this->page_number);
     $map = $param_form ? $param_form : array();
     //生成分页连接参数
     $Page = new PageAdmin($majortypetotal, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('param_form', $param_form);
     // 查询关键字
     $this->assign('majortypelist', $majortypelist);
     $this->display();
 }
 /**
  * 校园职务列表、校园职务搜索
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     $field = array();
     $order = 'create_time desc';
     $word_form = I('post.w') ? I('post.w') : I('get.w');
     //获取查询字
     $word_form ? $where['title|description'] = array('like', "%" . $word_form . "%") : '';
     //生成数据库查询条件
     $where = !empty($where) ? $where : array();
     $where['is_delete'] = 2;
     //状态为未删除
     $schooljob_total = $this->SchoolJobModel->getSchoolJobTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($schooljob_total / $this->page_number));
     // 获取合法的分页数
     $schooljob_data = $this->SchoolJobModel->getSchoolJobList($where, $field, $order, $page, $this->page_number);
     // 分页数据
     $map = $word_form ? array('w' => $word_form) : array();
     //生成分页连接参数
     $Page = new PageAdmin($schooljob_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('word', $word_form);
     // 查询关键字
     $this->assign('schooljob', $schooljob_data);
     $this->display();
 }
Пример #6
0
 /**
  * 简历列简历搜索
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     //生成搜索数组条件
     $search_name = I('post.n') ? I('post.n') : I('get.n');
     $search_school = I('post.s') ? I('post.s') : I('get.s');
     $search_major = I('post.m') ? I('post.m') : I('get.m');
     $search_education = I('post.e') ? I('post.e') : I('get.e');
     if (!empty($search_name)) {
         $where['student.name'] = array('like', "%" . $search_name . "%");
         $map['n'] = $search_name;
         $this->assign('search_n', $search_name);
     }
     if (!empty($search_school)) {
         $where['student.graduate_school'] = array('like', "%" . $search_school . "%");
         $map['s'] = $search_school;
         $this->assign('search_s', $search_school);
     }
     if (!empty($search_major)) {
         $where['student.detail_major'] = array('like', "%" . $search_major . "%");
         $map['m'] = $search_major;
         $this->assign('search_m', $search_major);
     }
     if (!empty($search_education)) {
         $where['graduate_year'] = $search_education;
         $map['e'] = $search_education;
         $this->assign('search_e', $search_education);
     }
     $where = !empty($where) ? $where : array();
     //$where['resume.valid_status'] = 1; //证书状态为1
     $Resume_total = $this->ResumeModel->getResumeTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($Resume_total / $this->page_number));
     // 获取合法的分页数
     $Resume_data = $this->ResumeModel->getResumeList($where, $page, $this->page_number);
     // 分页数据
     $map = !empty($map) ? $map : array();
     //生成分页连接参数
     $Page = new PageAdmin($Resume_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $Resume_data = self::eachdata($Resume_data);
     $this->assign('major', AdminController::getGraduateArr());
     $this->assign('resume', $Resume_data);
     $this->display();
 }
Пример #7
0
 /**
  * 学员展示列表、搜索列表
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     $field = '';
     $order = 'student.create_time desc';
     $word_form = I('post.w') ? I('post.w') : I('get.w');
     //获取查询字
     //生成数据库查询条件
     if ($word_form) {
         $condition['student.name'] = array('like', "%" . $word_form . "%");
         $condition['student.login_email'] = array('like', "%" . $word_form . "%");
         $condition['_logic'] = 'or';
         $where['_complex'] = $condition;
     }
     $where = !empty($where) ? $where : true;
     $student_total = $this->StudentModel->getStudentTotalOutDelete($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($student_total / $this->page_number));
     // 获取合法的分页数
     $student_data = $this->StudentModel->getStudentListOutDelete($where, $field, $order, $page, $this->page_number);
     // 分页数据
     $map = $word_form ? array('w' => $word_form) : array();
     //生成分页连接参数
     $Page = new PageAdmin($student_total, $this->page_number, $map);
     //分页类实例化
     foreach ($student_data as $k => $v) {
         $student_data[$k]['education'] = $v['education'] > 0 ? AdminController::getDegreeArr2($v['education']) : '';
         if ($v['email_verify'] == 1) {
             $student_data[$k]['email_verify'] = '已认证';
         } elseif ($v['email_verify'] == 2) {
             $student_data[$k]['email_verify'] = '未认证';
         } else {
             $student_data[$k]['email_verify'] = '未知';
         }
     }
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('word', $word_form);
     // 查询关键字
     $this->assign('studentlist', $student_data);
     $this->display();
 }
 /**
  * 简历列简历搜索
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     //生成搜索数组条件
     $search_name = I('post.w') ? I('post.w') : I('get.w');
     $search_status = I('post.s') ? I('post.s') : I('get.s');
     if (!empty($search_name)) {
         $where['student.name|post.title|enterprise.full_name'] = array('like', "%" . $search_name . "%");
         $map['w'] = $search_name;
         $this->assign('search_n', $search_name);
     }
     if (!empty($search_status)) {
         if ($this->getResumeStatusArr($search_status)) {
             $where['resume_post.status'] = intval($search_status);
             $map['s'] = $search_status;
             $this->assign('search_s', $search_status);
         }
     }
     if ($search_status == 3 || $search_status == 4) {
         $order = 'resume_post.deal_time desc';
     } else {
         $order = 'resume_post.pkid desc';
     }
     $where = !empty($where) ? $where : array();
     $Resume_total = $this->ResumeModel->getResumeTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($Resume_total / $this->page_number));
     // 获取合法的分页数
     $Resume_data = $this->ResumeModel->getResumeList($where, $page, $this->page_number, $order);
     // 分页数据
     $map = !empty($map) ? $map : array();
     //生成分页连接参数
     $Page = new PageAdmin($Resume_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('resume', $Resume_data);
     $this->assign('status', AdminController::getResumeStatusArr());
     $this->assign('front_url', C('FRONT_URL'));
     $this->display();
 }
 /**
  * 管理员列表
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     $field = 'enterprise.pkid as pkid,enterprise.login_email,enterprise.email_verify,full_name,scale_id,
     industry_id,telephone,order_num,is_hot,enterprise.create_time';
     $order = 'enterprise.create_time desc,order_num desc';
     $word_form = I('post.w') ? I('post.w') : I('get.w');
     //获取查询字
     //生成数据库查询条件
     if ($word_form) {
         $condition['enterprise.full_name'] = array('like', "%" . $word_form . "%");
         $condition['enterprise.login_email'] = array('like', "%" . $word_form . "%");
         $condition['_logic'] = 'or';
         $where['_complex'] = $condition;
     }
     $where = !empty($where) ? $where : true;
     $enterprise_total = $this->EnterpriseModel->getEnterpriseTotalOutDelete($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($enterprise_total / $this->page_number));
     // 获取合法的分页数
     $enterprise_data = $this->EnterpriseModel->getEnterpriseListOutDelete($where, $field, $order, $page, $this->page_number);
     // 分页数据
     $map = $word_form ? array('w' => $word_form) : array();
     //生成分页连接参数
     $Page = new PageAdmin($enterprise_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('word', $word_form);
     // 查询关键字
     $scaleModel = D('Scale');
     $industryModel = D('Industry');
     foreach ($enterprise_data as $k => $v) {
         $scale = $scaleModel->getScaleinfo($v['scale_id']);
         $industry = $industryModel->getIndustryinfo($v['industry_id']);
         $enterprise_data[$k]['scale'] = $scale['title'];
         $enterprise_data[$k]['industry'] = $industry['title'];
     }
     $this->assign('enterpriselist', $enterprise_data);
     $this->display();
 }
Пример #10
0
 public function index()
 {
     $where = true;
     $field = array('pkid as id', 'title', 'create_time');
     $where['status'] = 1;
     $welfareTotal = $this->WelfareModel->getWelfareTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($welfareTotal / $this->page_number));
     // 获取合法的分页数
     $welfareList = $this->WelfareModel->getWelfareList($where, $field, $page, $this->page_number);
     $Page = new PageAdmin($welfareTotal, $this->page_number);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('welfareList', $welfareList);
     $this->display();
 }
Пример #11
0
 public function index()
 {
     $where = array();
     $field = array('pkid as id', 'region_id', 'region_name', 'order_num');
     I('post.region_name') ? $where['region_name'] = array('like', "%" . I('post.region_name') . "%") : '';
     $where['is_delete'] = '2';
     $hotCityTotal = $this->HotCityModel->getHotCityTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($hotCityTotal / $this->page_number));
     // 获取合法的分页数
     $hotCityList = $this->HotCityModel->getHotcityList($where, $field, $page, $this->page_number);
     $Page = new PageAdmin($hotCityTotal, $this->page_number, $where);
     //分页类实例化
     $this->assign('where', I('post.'));
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('hotCityList', $hotCityList);
     $this->display();
 }
 /**
  * 证书列表、搜索列表
  * @author Martin.Cheng <*****@*****.**>
  */
 public function index()
 {
     $where = array();
     $field = array();
     $order = 'create_time desc';
     $word_form = I('post.w') ? I('post.w') : I('get.w');
     //获取查询字
     $word_form ? $where['full_name|description'] = array('like', "%" . $word_form . "%") : '';
     //生成数据库查询条件
     $where = !empty($where) ? $where : array();
     $where['is_delete'] = 2;
     //证书状态为未删除
     $certificate_total = $this->CertificateModel->getCertificateTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($certificate_total / $this->page_number));
     // 获取合法的分页数
     $certificate_data = $this->CertificateModel->getCertificateList($where, $field, $order, $page, $this->page_number);
     // 分页数据
     $map = $word_form ? array('w' => $word_form) : array();
     //生成分页连接参数
     $Page = new PageAdmin($certificate_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('word', $word_form);
     // 查询关键字
     foreach ($certificate_data as $key => $value) {
         $certificate_data[$key]['description'] = str_cut($certificate_data[$key]['description']);
         $certificate_data[$key]['certificate_type'] = self::getCertificateType($certificate_data[$key]['certificate_type']);
     }
     $this->assign('certificate', $certificate_data);
     $this->display();
 }
 public function effective()
 {
     $where['post.status'] = 1;
     $where['enterprise_id'] = session('account.enterprise_id');
     #岗位列表  --begin--
     $postTotal = $this->PostModel->getPostTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($postTotal / $this->page_number));
     // 获取合法的分页数
     $post = $this->PostModel->getPostList($where, $page, $this->page_number);
     foreach ($post as $k => $v) {
         $post[$k]['day_diff_disabled'] = strtotime($v['refresh_time']) ? reflushDay($v['create_time'], 1) : TRUE;
     }
     $Page = new PageAdmin($postTotal, $this->page_number);
     //分页类实例化
     $this->assign('list', $this->infoList());
     $this->assign('postList', $post);
     $this->assign('page', $Page->show());
     $this->display();
 }
Пример #14
0
 public function index()
 {
     $where = array();
     $field = array('post.pkid as id', 'post.title', 'post.week_available', 'post.keep_on', 'post.education', 'post.major_wish', 'post.salary_range', 'post.current_grade', 'post.enterprise_id', 'post.is_hot', 'post.home_show', 'post.order_num', 'post.graduate_year', 'post.create_time', 'post.refresh_time', 'enterprise.full_name', 'enterprise.telephone', 'post.join_activity');
     $order = 'post.order_num desc,post.create_time desc';
     $param_form = I('post.') ? I('post.') : I('get.');
     //获取查询字
     isset($_GET['tag']) && I('get.tag') ? $param_form['tag'] = I('get.tag') : '';
     #生成数据库查询条件  --begin--
     isset($param_form['title']) && $param_form['title'] ? $where['post.title|enterprise.full_name'] = array('like', "%" . $param_form['title'] . "%") : '';
     isset($param_form['education']) && $param_form['education'] ? $where['post.education'] = $param_form['education'] : '';
     isset($param_form['salary']) && $param_form['salary'] ? $where['post.salary_range'] = $param_form['salary'] : '';
     isset($param_form['active']) && $param_form['active'] ? $where['post.status'] = $param_form['active'] : '';
     $where['post.is_delete'] = 2;
     $where['post.create_time'] = array('neq', '0000-00-00 00:00:00');
     $param_form['tag'] == 'offline' ? $where['post.status'] = 2 : ($where['post.status'] = 1);
     # --end--
     $post_total = $this->PostModel->postTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = min($page, ceil($post_total / $this->page_number));
     // 获取合法的分页数
     $post_list = $this->PostModel->postList($where, $field, $order, $page, $this->page_number);
     $map = $param_form ? $param_form : array();
     //生成分页连接参数
     $Page = new PageAdmin($post_total, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('param_form', $param_form);
     // 查询关键字
     $this->assign('postlist', $post_list);
     $this->assign('list', $this->infoList());
     $this->display();
 }
Пример #15
0
 public function index()
 {
     $field = array('pkid as id', 'title', 'type', 'range', 'create_time', 'modify_time', 'is_delete');
     $param_form = I('post.') ? I('post.') : I('get.');
     //获取查询字
     I('get.tag') ? $param_form['tag'] = I('get.tag') : '';
     $param_form['title'] ? $where['title'] = array('like', "%" . $param_form['title'] . "%") : '';
     $param_form['range'] ? $where['range'] = array('like', "%" . $param_form['range'] . "%") : '';
     $param_form['tag'] == 'user' ? $where['type'] = 2 : ($where['type'] = 1);
     $begin_time = trim(I('post.time') ? I('post.time') : I('get.time'));
     $end_time = trim(I('post.end') ? I('post.end') : I('get.end'));
     if (!empty($begin_time) && !empty($end_time)) {
         $where['create_time'] = array(array('egt', $begin_time . ' 00:00:00'), array('elt', $end_time . ' 23:59:59'), 'and');
     }
     if (!empty($begin_time) && empty($end_time)) {
         $where['create_time'] = array('egt', $begin_time . ' 00:00:00');
     }
     if (empty($begin_time) && !empty($end_time)) {
         $where['create_time'] = array('elt', $end_time . ' 23:59:59');
     }
     $where['is_delete'] = 2;
     $tagTotal = $this->TagModel->getTagTotal($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($tagTotal / $this->page_number));
     // 获取合法的分页数
     $tagList = $this->TagModel->getTagList($where, $field, $page, $this->page_number);
     if (!empty($tagList)) {
         foreach ($tagList as $key => $value) {
             switch ($value['type']) {
                 case '2':
                     if ($value['range'] == 1) {
                         $tagList[$key]['typer'] = D('Enterprise')->where(array('account_id' => $value['account_id']))->getField('full_name');
                     }
                     if ($value['range'] == 2) {
                         $tagList[$key]['typer'] = D('Enterprise')->where(array('account_id' => $value['account_id']))->getField('full_name');
                     }
                     if ($value['range'] == 3) {
                         $tagList[$key]['typer'] = D('Student')->where(array('account_id' => $value['account_id']))->getField('name');
                     }
                     if ($value['range'] == 4) {
                         $tagList[$key]['typer'] = D('Student')->where(array('account_id' => $value['account_id']))->getField('name');
                     }
                     break;
                 default:
                     if ($value['account_id'] == 0) {
                         $tagList[$key]['typer'] = "系统";
                     }
                     break;
             }
             if (strpos($value['range'], ',')) {
                 $rangeArr = explode(',', $value['range']);
                 $bb = "";
                 foreach ($rangeArr as $k => $v) {
                     if ($v == 1) {
                         $bb .= "职位,";
                     }
                     if ($v == 2) {
                         $bb .= "企业,";
                     }
                     if ($v == 3) {
                         $bb .= "简历,";
                     }
                     if ($v == 4) {
                         $bb .= "学生,";
                     }
                 }
                 $aa = rtrim($bb, ',');
                 $tagList[$key]['rangeInfo'] = $aa;
             } else {
                 switch ($value['range']) {
                     case '1':
                         $cc = "职位";
                         break;
                     case '2':
                         $cc = "企业";
                         break;
                     case '3':
                         $cc = "简历";
                         break;
                     case '4':
                         $cc = "学生";
                         break;
                 }
                 $tagList[$key]['rangeInfo'] = $cc;
             }
         }
     }
     $map = $param_form ? $param_form : array();
     //生成分页连接参数
     $Page = new PageAdmin($tagTotal, $this->page_number, $map);
     //分页类实例化
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('param_form', $param_form);
     // 查询关键字
     $this->assign('tagList', $tagList);
     $this->assign('rangeList', AdminController::getRange());
     $this->display();
 }
 public function lists()
 {
     $where = array();
     $param = I('get.') ? I('get.') : I('post.');
     //获取查询字
     #生成数据库查询条件  --begin--
     isset($param['ct']) ? $where['city_id'] = $param['ct'] : '';
     isset($param['in']) ? $where['industry_id'] = $param['in'] : '';
     isset($param['si']) ? $where['scale_id'] = $param['si'] : '';
     # --end--
     //$where['approve_status'] = 1;//认证状态
     $where['approve_status'] = array('gt', 0);
     //认证状态暂时不做判断
     $enterpriseTotal = $this->EnterpriseModel->getTotalOfEnterprise($where);
     //列表总数量
     $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : '';
     //获取url的分页参数
     $page = max(1, $page);
     $page = min($page, ceil($enterpriseTotal / $this->page_number));
     // 获取合法的分页数
     $enterpriseList = $this->EnterpriseModel->getListOfEnterprise($where, $page, $this->page_number);
     $map = $param ? $param : array();
     //生成分页连接参数
     $Page = new PageAdmin($enterpriseTotal, $this->page_number, $map);
     //分页类实例化
     //热门城市,前5个
     $hotCityList = M('HotCity')->where(array('is_delete' => 2))->order('order_num desc')->limit(5)->getField('region_id,region_name');
     foreach ($enterpriseList as $key => $value) {
         if (mb_strlen($value['city_name'], 'utf8') >= 3) {
             $enterpriseList[$key]['city_name'] = mb_substr($value['city_name'], 0, mb_strlen($value['city_name'], 'utf8') - 1, 'utf8');
         }
         $enterpriseList[$key]['logo'] = imageLogoExist(imageExist($value['logo']));
     }
     if (!empty($param['ct'])) {
         $result = D('Regions')->field('region_name')->where(array('region_id' => $param['ct']))->find();
         $param['ct'] = $result['region_name'];
     }
     if (empty($param['ct']) && empty($param['in']) && empty($param['si'])) {
         $param = array();
     }
     $this->assign('page', $Page->show());
     // 分页显示输出
     $this->assign('param', $param);
     // 查询关键字
     $this->assign('industryList', parent::getIndustryList());
     $this->assign('app_url', C('APP_URL'));
     $this->assign('hotCityList', $hotCityList);
     $this->assign('enterpriseList', $enterpriseList);
     $this->assign('scaleList', $this->getScaleList());
     if (!empty($_GET['p'])) {
         $this->assign('p', $_GET['p']);
     }
     if (isMobile()) {
         redirect('/MobileEnterprise/lists');
     }
     $this->display('lists');
 }