Example #1
0
 /**
  * 列表
  * 团购活动
  */
 public function index()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     import("ORG.Util.Page");
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     $citymod = new CityModel();
     if ($is_qx == 1) {
         //是地区管理员
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
         #区
         $qlist = $citymod->getcity($c_id);
         $this->assign("qlist", $qlist);
     } else {
         #省
         $plist = $citymod->getprovince(1);
         $this->assign("plist", $plist);
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
     }
     $q_id = $_GET['q_id'];
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     $this->assign("p_id", $p_id);
     $this->assign("c_id", $c_id);
     $this->assign("q_id", $q_id);
     $this->assign("c_name", $citymod->getname($c_id));
     $this->assign("q_name", $citymod->getname($q_id));
     $where = "1";
     if (!empty($p_id)) {
         $where .= " and Group1.p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and  Group1.c_id=" . $c_id;
     }
     if (!empty($q_id)) {
         $where .= " and  Group1.q_id=" . $q_id;
     }
     if (!empty($keys)) {
         $where .= " and  Group1.title like '%" . $keys . "%'";
     }
     $this->assign("keys", $keys);
     $M = D("GroupView");
     $cou = $M->where($where)->count();
     $p = new Page($cou, 10);
     $list = $M->where($where)->order(" Group1.addtime desc")->limit($p->firstRow . "," . $p->listRows)->select();
     $arr = array("未审核", "已审核");
     $arr1 = array("普通", "推荐");
     foreach ($list as $k => $v) {
         $list[$k]['addtimef'] = date("Y-m-d H:i:s", $v['addtime']);
         $list[$k]['statusf'] = $arr[$v['status']];
         $list[$k]['is_tjf'] = $arr1[$v['is_tj']];
     }
     $this->assign("list", $list);
     $this->assign("page", $p->show());
     $this->display();
 }
Example #2
0
 /**
  * 设计师案例
  */
 public function index()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $this->assign("gzlist", $this->getgzh());
     #设计师
     $cmod = new CityModel();
     $pro_list = $cmod->getcity(1);
     $this->assign("pro_list", $pro_list);
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     $this->assign("is_qx", $is_qx);
     if ($is_qx == 0) {
         $p_id = $_GET['province'];
         $c_id = $_GET['city'];
     } else {
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
     }
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     $uid = $_GET['uid'];
     $this->assign("keys", $keys);
     $this->assign("uid", $uid);
     $this->assign("p_id", $p_id);
     $this->assign("c_id", $c_id);
     $this->assign("cityname", $cmod->getname($c_id));
     import("ORG.Util.Page");
     $where = "cases.type=2 ";
     if (!empty($p_id)) {
         $where .= " and cases.p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and cases.c_id=" . $c_id;
     }
     if (!empty($keys)) {
         $where .= " and cases.title like '%" . $keys . "%'";
     }
     if (!empty($uid)) {
         $where .= " and cases.uid=" . $uid;
     }
     $M = D("SjcaseView");
     $totalRows = $M->where($where)->count();
     $p = new Page($totalRows, 10);
     $list = $M->where($where)->order("cases.addtime desc")->limit($p->firstRow . "," . $p->listRows)->select();
     $this->assign("page", $p->show());
     $inf = (include_once './Common/config2.php');
     foreach ($list as $k => $v) {
         $list[$k]['is_jds'] = $v['is_jd'] == 1 ? "经典" : "普通";
         $list[$k]['status_f'] = $v['status'] == 1 ? "已审核" : "未审核";
     }
     $this->assign("list", $list);
     $this->assign("jd", $inf['zxjd']);
     $this->display();
 }
Example #3
0
 /**
  * 视频列表
  */
 public function index()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     $where = "1";
     if ($is_qx == 1) {
         $where .= " and p_id=" . $_SESSION['my_info']['proid'];
         $where .= " and c_id=" . $_SESSION['my_info']['cityid'];
     } else {
         $citymod = new CityModel();
         $plist = $citymod->getprovince(1);
         $this->assign("plist", $plist);
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         if (!empty($p_id)) {
             $where .= " and p_id=" . $p_id;
         }
         if (!empty($c_id)) {
             $where .= " and c_id=" . $c_id;
         }
         $this->assign("p_id", $p_id);
         $this->assign("c_id", $c_id);
         $this->assign("cname", $citymod->getname($c_id));
     }
     $this->assign("is_qx", $is_qx);
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     $uid = $_GET['uid'];
     if (!empty($keys)) {
         $where .= " and title like '%" . $keys . "%'";
     }
     if (!empty($uid)) {
         $where .= " and uid=" . $uid;
     }
     $this->assign("uid", $uid);
     $this->assign("keys", $keys);
     $M = M("Shipin");
     $cou = $M->where($where)->count();
     import("ORG.Util.Page");
     $p = new Page($cou, 10);
     $list = $M->where($where)->limit($p->firstRow . "," . $p->listRows)->order("addtime desc")->select();
     $arr = array("未审核", "已审核");
     foreach ($list as $k => $v) {
         $list[$k]['status_f'] = $arr[$v['status']];
     }
     $this->assign("list", $list);
     $this->assign("page", $p->show());
     $conf = (include './Common/config2.php');
     $memtype = $conf['memtp'];
     $this->assign("tplist", $memtype);
     $this->display();
 }
Example #4
0
 /**
  * 加盟列表
  */
 public function index()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $citymod = new CityModel();
     $province = $_GET['province'];
     $city = $_GET['city'];
     $where = "1";
     if ($this->getqx($_SESSION['my_info']['role']) == 0) {
         //非地区管理员
         $pro_list = $citymod->getprovince(1);
         $this->assign("pro_list", $pro_list);
         if (!empty($province)) {
             $where .= " and Zixun.p_id=" . $province;
         }
         if (!empty($city)) {
             $where .= " and Zixun.c_id=" . $city;
         }
         $this->assign("is_qx", $this->getqx($_SESSION['my_info']['role']));
         $this->assign("province", $province);
         $this->assign("city", $city);
         $cityname = $citymod->getname($city);
         $this->assign("cityname", $cityname);
     } else {
         $where .= " and p_id=" . $_SESSION['my_info']['proid'];
         $where .= " and c_id=" . $_SESSION['my_info']['cityid'];
         $this->assign("is_qx", $this->getqx($_SESSION['my_info']['role']));
     }
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     $uid = $_GET['uid'];
     if (!empty($keys)) {
         $where .= " and Zixun.name like '%" . $keys . "%'";
     }
     $this->assign("keys", $keys);
     $M = D("ZixunView");
     $cou = $M->where($where)->count();
     import("ORG.Util.Page");
     $p = new Page($cou, 10);
     $list = $M->where($where)->limit($p->firstRow . "," . $p->listRows)->order("Zixun.addtime desc")->select();
     $arr = array("未审核", "已审核");
     foreach ($list as $k => $v) {
         $list[$k]['status_f'] = $arr[$v['status']];
         $list[$k]['addtime_f'] = date("Y-m-d", $v['addtime']);
     }
     $this->assign("list", $list);
     $this->assign("page", $p->show());
     $this->display();
 }
Example #5
0
 /**
  * 意见反馈列表
  */
 public function index()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     @import("ORG.Util.Page");
     $where = "1";
     if ($is_qx == 0) {
         //非地区管理员
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         //省
         $mcity = new CityModel();
         $plist = $mcity->getprovince(1);
         $this->assign("plist", $plist);
         $this->assign("p_id", $p_id);
         $this->assign("c_id", $c_id);
         $this->assign("c_name", $mcity->getname($c_id));
     } else {
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
     }
     if (!empty($p_id)) {
         $where .= " and Yijian.p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and Yijian.c_id=" . $c_id;
     }
     $keys = trim($_GET['keys']);
     $keys = $keys == "请输入关键字" ? "" : $keys;
     $where .= " and Yijian.content like '%" . $keys . "%'";
     $this->assign("keys", $keys);
     $yjv = D("YijianView");
     $totalRows = $yjv->where($where)->count();
     $pm = new Page($totalRows, 10);
     $list = $yjv->where($where)->order("Yijian.addtime desc")->limit($pm->firstRow . "," . $pm->listRows)->select();
     $islx = array("0" => "未联系", "1" => "已联系");
     foreach ($list as $k => $v) {
         $list[$k]['addtimef'] = date("Y-m-d H:i:s", $v['addtime']);
         $list[$k]['islxf'] = $islx[$v['is_lx']];
     }
     $this->assign("list", $list);
     $this->assign("page", $pm->show());
     #echo $yjv->getLastSql();
     #省
     $this->display();
 }
Example #6
0
 /**
  * 列表小区
  */
 public function listxq()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $where = "1";
     $cmod = new CityModel();
     if ($this->getqx($_SESSION['my_info']['role']) == 1) {
         //地区管理员
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
         $qlist = $cmod->getcity($c_id);
         $this->assign("qlist", $qlist);
         $this->assign("p_id", $p_id);
         $this->assign("c_id", $c_id);
         $this->assign("is_qx", 1);
     } else {
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         $plist = $cmod->getcity(1);
         $this->assign("plist", $plist);
         $this->assign("p_id", $p_id);
         $this->assign("c_id", $c_id);
         $this->assign("c_name", $cmod->getname($c_id));
         $this->assign("is_qx", 0);
     }
     $q_id = $_GET['q_id'];
     $this->assign("q_id", $q_id);
     $this->assign("q_name", $cmod->getname($q_id));
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     $this->assign("keys", $keys);
     @import("ORG.Util.Page");
     $mod = D("XqView");
     if (!empty($p_id)) {
         $where .= " and Xq.p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and Xq.c_id=" . $c_id;
     }
     if (!empty($q_id)) {
         $where .= " and Xq.q_id=" . $q_id;
     }
     if (!empty($keys)) {
         $where .= " and Xq.name like '%" . $keys . "%'";
     }
     $totalRows = $mod->where($where)->count();
     $page = new Page($totalRows, 10);
     $list = $mod->where($where)->limit($page->firstRow . "," . $page->listRows)->order("Xq.addtime desc ")->select();
     foreach ($list as $k => $v) {
         $list[$k]['addtimef'] = date("Y-m-d H:i:s", $v['addtime']);
     }
     $this->assign("list", $list);
     $this->assign("page", $page->show());
     $this->display();
 }
Example #7
0
 /**
  * 查看详情
  */
 public function ins()
 {
     parent::_initalize();
     $systemConfig = $this->systemConfig;
     $this->assign("systemConfig", $systemConfig);
     $aid = $_GET['aid'];
     $amod = new Admininfo1Model();
     $inf = $amod->getinfo($aid, 1);
     $citymod = new CityModel();
     $inf['province'] = $citymod->getproname($inf['cityid']);
     $inf['city'] = $citymod->getname($inf['cityid']);
     $this->assign("info", $inf);
     $this->display();
 }
Example #8
0
 /**
  * 设计师 预约列表
  */
 public function gzyy()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $Mod = D("YuyueView");
     import("ORG.Util.Page");
     $where = "Yuyue.ytype=2";
     $citymod = new CityModel();
     if ($this->getqx($_SESSION['my_info']['role']) == 1) {
         $where .= " and Yuyue.p_id=" . $_SESSION['my_info']['proid'];
         $where .= " and Yuyue.c_id=" . $_SESSION['my_info']['cityid'];
     } else {
         $p_list = $citymod->getprovince(1);
         $this->assign("p_list", $p_list);
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         if (!empty($p_id)) {
             $where .= " and Yuyue.p_id=" . $p_id;
         }
         if (!empty($c_id)) {
             $where .= " and Yuyue.c_id=" . $c_id;
         }
         $this->assign("c_id", $c_id);
         $this->assign("c_name", $citymod->getname($c_id));
         $this->assign("p_id", $p_id);
     }
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     if (!empty($keys)) {
         $where .= " and Yuyue.name like '%" . $keys . "%'";
     }
     $this->assign("keys", $keys);
     $totalRows = $Mod->where($where)->count();
     $p = new Page($totalRows, 10);
     $list = $Mod->where($where)->order("Yuyue.addtime desc")->limit($p->firstRow . "," . $p->listRows)->select();
     $arr = array("未审核", "已审核");
     foreach ($list as $k => $v) {
         $list[$k]['status_f'] = $arr[$v['status']];
     }
     $this->assign("list", $list);
     $this->assign("page", $p->show());
     $this->display();
 }
Example #9
0
 /**
  * 广告列表
  */
 public function adlist()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $M = M("Adview");
     $where = "1";
     $keys = $_GET['keys'];
     $keys = $keys == "请输入关键字" ? "" : $keys;
     //省
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     if ($is_qx == 0) {
         //非地区管理员
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         //省
         $mcity = new CityModel();
         $plist = $mcity->getprovince(1);
         $this->assign("plist", $plist);
         $this->assign("p_id", $p_id);
         $this->assign("c_id", $c_id);
         $this->assign("c_name", $mcity->getname($c_id));
     } else {
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
     }
     $this->assign("is_qx", $is_qx);
     if (!empty($p_id)) {
         $where .= " and p_id = '" . $p_id . "'";
     }
     if (!empty($c_id)) {
         $where .= " and c_id = '" . $c_id . "'";
     }
     if (!empty($keys)) {
         $where .= " and title like '%" . $keys . "%'";
     }
     $this->assign("keys", $keys);
     $cou = $M->where($where)->count();
     @import("ORG.Util.Page");
     $page = new Page($cou, 10);
     $list = $M->where($where)->order("addtime desc")->limit($page->firstRow . "," . $page->listRows)->select();
     foreach ($list as $k => $v) {
         $list[$k]['addtimef'] = date("Y-m-d H:i:s", $v['addtime']);
     }
     $this->assign("list", $list);
     $showpage = $page->show();
     $this->assign("page", $showpage);
     $this->display();
 }
Example #10
0
 /**
  * 编辑单页面
  */
 public function edit_webpage()
 {
     if (IS_POST) {
         $name = trim($_POST['name']);
         $ywname = trim($_POST['ywname']);
         $p_id = trim($_POST['p_id']);
         $c_id = trim($_POST['c_id']);
         $contents = trim($_POST['contents']);
         $id = $_POST['id'];
         $M = M("Webpages");
         $data = array("name" => $name, "contents" => $contents, "ywname" => $ywname, "p_id" => $p_id, "c_id" => $c_id);
         $rs = $M->where("id=" . $id)->save($data);
         if ($rs) {
             $this->success("操作成功!", U("Webpages/index"));
         } else {
             $this->error("操作失败!");
         }
         exit;
     }
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $id = $_GET['id'];
     $wmod = M("Webpages");
     $info = $wmod->where("id=" . $id)->find();
     $this->assign("info", $info);
     #-------------------------------------------------------------省start
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     if ($is_qx == 0) {
         #省
         $citymod = new CityModel();
         $plist = $citymod->getprovince(1);
         $this->assign("plist", $plist);
     } else {
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
     }
     $p_id = $info['p_id'];
     $c_id = $info['c_id'];
     $c_name = $citymod->getname($c_id);
     $this->assign("p_id", $p_id);
     $this->assign("c_id", $c_id);
     $this->assign("c_name", $c_name);
     #-------------------------------------------------------------省end
     $this->display("add_webpage");
 }
 /**
  * 编辑友情链接
  */
 public function editfirendlink()
 {
     $m = M("Firendlink");
     if (IS_POST) {
         $id = $_POST['id'];
         $name = trim($_POST['name']);
         if (empty($name)) {
             $this->error("名称不能为空!");
             exit;
         }
         if ($_FILES['logo']['name'] != '') {
             $imginfo = $this->upload('./Uploads/fl/');
             if (!empty($imginfo[0]['savename'])) {
                 $logo = "/Uploads/fl/" . $imginfo[0]['savename'];
             } else {
                 $logo = "";
             }
         }
         $link = trim($_POST['link']);
         $orders = trim($_POST['orders']);
         $is_tj = $_POST['is_tj'];
         $p_id = $_POST['p_id'];
         $c_id = $_POST['c_id'];
         $data = array();
         if (!empty($name)) {
             $data['name'] = $name;
         }
         if (!empty($logo)) {
             $data['logo'] = $logo;
         }
         if (!empty($link)) {
             $data['link'] = $link;
         }
         if (!empty($orders)) {
             $data['orders'] = $orders;
         }
         if (!empty($is_tj)) {
             $data['is_tj'] = $is_tj;
         }
         if (!empty($p_id)) {
             $data['p_id'] = $p_id;
         }
         if (!empty($c_id)) {
             $data['c_id'] = $c_id;
         }
         $res = $m->where("id=" . $id)->save($data);
         if ($res) {
             $this->success("操作成功!", U("Firendlink/index"));
         } else {
             $this->error("操作失败!");
         }
         exit;
     }
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $id = $_GET['id'];
     $info = $m->where("id=" . $id)->find();
     $this->assign("info", $info);
     if ($this->getqx($_SESSION['my_info']['role']) == 0) {
         #读取省
         $mcity = new CityModel();
         $plist = $mcity->getprovince(1);
         $this->assign("plist", $plist);
         $this->assign("c_id", $info['c_id']);
         $this->assign("c_name", $mcity->getname($info['c_id']));
     }
     $this->assign("is_qx", $this->getqx($_SESSION['my_info']['role']));
     $this->display("addfriendlink");
 }
Example #12
0
 /**
  * 优惠券列表
  */
 public function list_yhq()
 {
     parent::_initalize();
     $this->assign('systemConfig', $this->systemConfig);
     import("ORG.Util.Page");
     $M = M("Yhq");
     $where = '1';
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     if ($is_qx == 1) {
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
     } else {
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         $this->assign("p_id", $p_id);
         $this->assign("c_id", $c_id);
         $citymod = new CityModel();
         $plist = $citymod->getprovince(1);
         $this->assign("plist", $plist);
         $this->assign("cname", $citymod->getname($c_id));
     }
     $this->assign("is_qx", $is_qx);
     $startdate = $_GET['startdate'];
     $startdate1 = $_GET['startdate1'];
     $enddate = $_GET['enddate'];
     $enddate1 = $_GET['enddate1'];
     $this->assign("startdate", $startdate);
     $this->assign("startdate1", $startdate1);
     $this->assign("enddate", $enddate);
     $this->assign("enddate1", $enddate1);
     if (!empty($startdate)) {
         $starttime = strtotime($startdate);
     }
     if (!empty($startdate1)) {
         $starttime1 = strtotime($startdate1);
     }
     if (!empty($enddate)) {
         $endtime = strtotime($enddate);
     }
     if (!empty($enddate1)) {
         $endtime1 = strtotime($enddate1);
     }
     if ($starttime > $starttime1) {
         $this->error("开始时间第一个不能大于第二个");
         exit;
     }
     if ($endtime > $endtime1) {
         $this->error("结束时间第一个不能大于第二个");
         exit;
     }
     if (!empty($p_id)) {
         $where .= " and p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and c_id=" . $c_id;
     }
     if (!empty($starttime) && !empty($starttime1)) {
         $where .= " and (startdate between '" . $starttime . "' and '" . $starttime1 . "' )";
     }
     if (!empty($endtime) && !empty($endtime1)) {
         $where .= " and (enddate between '" . $endtime . "' and '" . $endtime1 . "' )";
     }
     $totalRows = $M->where($where)->count();
     $p = new Page($totalRows, 10);
     $list = $M->where($where)->order(" addtime desc ")->limit($p->firstRow . "," . $p->listRows)->select();
     $arr = array("普通", '推荐');
     $arr1 = array("未审核", "已审核");
     foreach ($list as $k => $v) {
         $list[$k]['is_tj_f'] = $arr[$v['is_tj']];
         $list[$k]['status_f'] = $arr1[$v['status']];
         $list[$k]['startdate'] = date("Y-m-d H:i", $v['startdate']);
         $list[$k]['enddate'] = date("Y-m-d H:i", $v['enddate']);
     }
     $this->assign("list", $list);
     $this->assign("page", $p->show());
     $this->display();
 }
Example #13
0
 /**
  * 工人列表
  */
 public function grlist()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $is_qx = $this->getqx($_SESSION['my_info']['role']);
     $cmod = new CityModel();
     $q_id = $_GET['qu'];
     if ($is_qx == 1) {
         #地区管理员
         $c_id = $_SESSION['my_info']['cityid'];
         $p_id = $_SESSION['my_info']['proid'];
         $qlist = $cmod->getcity($c_id);
         $this->assign("qlist", $qlist);
         $this->assign("c_id", $c_id);
         $this->assign("p_id", $p_id);
     } else {
         #省
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         $plist = $cmod->getprovince(1);
         $this->assign("plist", $plist);
         $quname = $cmod->getname($q_id);
         $this->assign("quname", $quname);
         $cityname = $cmod->getname($c_id);
         $this->assign("cityname", $cityname);
         $this->assign("province", $p_id);
     }
     $this->assign("qu", $q_id);
     $this->assign("is_qx", $is_qx);
     @import("ORG.Util.Page");
     $where = "1";
     $start_date = $_GET['start_date'];
     $end_date = $_GET['end_date'];
     if (!empty($start_date)) {
         $start_date = strtotime($start_date . "0:0:0");
         $where .= " and UNIX_TIMESTAMP(ruzhitime)>= " . $start_date;
     }
     if (!empty($end_date)) {
         $end_date = strtotime($end_date . "23:59:59");
         $where .= " and UNIX_TIMESTAMP(ruzhitime)<= " . $end_date;
     }
     if (!empty($p_id)) {
         $where .= " and p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and c_id=" . $c_id;
     }
     if (!empty($q_id)) {
         $where .= " and q_id=" . $q_id;
     }
     $keys = $_GET['keys'] == "请输入关键字" ? "" : $keys;
     if (!empty($keys)) {
         $where .= " and truename like '%" . $keys . "%'";
     }
     $m = M("Gongrenview");
     $totalRows = $m->where($where)->count();
     $page = new Page($totalRows, 10);
     $list = $m->where($where)->limit($page->firstRow . "," . $page->listRows)->order("create_time desc")->select();
     $sex_arr = array("1" => "男", "2" => "女");
     foreach ($list as $k => $v) {
         $list[$k]['sexf'] = $sex_arr[$v['sex']];
     }
     $this->assign("list", $list);
     $this->assign("page", $page->show());
     $this->display();
 }
Example #14
0
 /**
  * 列表
  * 实体店幻灯片
  */
 public function liststhdp()
 {
     parent::_initalize();
     $this->assign("systemConfig", $this->systemConfig);
     $hdM = D("ShitihdpView");
     @import("ORG.Util.Page");
     $where = "1";
     $cmod = new CityModel();
     if ($this->getqx($_SESSION['my_info']['role']) == 1) {
         //地区管理员
         $p_id = $_SESSION['my_info']['proid'];
         $c_id = $_SESSION['my_info']['cityid'];
         $qlist = $cmod->getcity($c_id);
         //区
         $this->assign("qlist", $qlist);
         $this->assign("is_qx", 1);
     } else {
         //非地区管理员
         $plist = $cmod->getcity(1);
         //省
         $this->assign("plist", $plist);
         $p_id = $_GET['p_id'];
         $c_id = $_GET['c_id'];
         $this->assign("is_qx", 0);
     }
     $q_id = $_GET['q_id'];
     $stid = $_GET['stid'];
     $stlist = M("Shiti")->field("id,name")->order("addtime desc")->select();
     $this->assign("stlist", $stlist);
     if (!empty($p_id)) {
         $where .= " and Shiti.p_id=" . $p_id;
     }
     if (!empty($c_id)) {
         $where .= " and Shiti.c_id=" . $c_id;
     }
     if (!empty($q_id)) {
         $where .= " and Shiti.q_id=" . $q_id;
     }
     if (!empty($stid)) {
         $where .= " and Shitihdp.stid=" . $stid;
     }
     $cou = $hdM->where($where)->count();
     $page = new Page($cou, 10);
     $list = $hdM->where($where)->order("Shitihdp.addtime desc")->limit($page->firstRow . "," . $page->listRows)->select();
     $zt = array("0" => "隐藏", "1" => "显示");
     foreach ($list as $k => $v) {
         $list[$k]['addtimef'] = date("Y-m-d H:i:s", $v['addtime']);
         $list[$k]['isdis'] = $zt[$v['is_display']];
     }
     $this->assign("list", $list);
     $this->assign("p_id", $p_id);
     $this->assign("c_id", $c_id);
     $this->assign("c_name", $cmod->getname($c_id));
     $this->assign("q_id", $q_id);
     $this->assign("q_name", $cmod->getname($q_id));
     $this->assign("stid", $stid);
     $this->assign("page", $page->show());
     $this->display();
 }