public function ins() { $uid = $_GET['uid']; $id = $_GET['id']; $foremod = new ForemanviewModel(); $finfo = $foremod->getforemaninfo($uid); if ($finfo) { $gdmod = new GongdiModel(); $info = $gdmod->getgongdiimg($id); $this->assign("info", $info); } else { $this->error("该用户已经被禁用!"); } $this->display(); }
/** * ajax * 获取工长 */ public function ajax_getforeman() { header("Content-Type:application/json; charset=utf-8"); $page = $_GET['click']; $formod = new ForemanviewModel(); $cid = $_SESSION['cid']; if ($formod->is_fore_group($cid, $page)) { $list = $formod->getforeman($cid, $page); } else { $list = $formod->getforeman($cid, 1); } $data = array(); if (empty($list)) { $data['status'] = 0; $data['list'] = array(); } else { $data['status'] = 1; $data['list'] = $list; } echo json_encode($data); }
/** * 装修案例 */ public function caselist() { $id = $_GET['id']; $this->assign("id", $id); $M = new ForemanviewModel(); $info = $M->getforemaninfo($id); if ($info) { if (empty($info['logo']) || !file_exists("." . $info['logo'])) { $info['logo'] = "/Public/web/images/nopic_193.jpg"; } $this->assign("info", $info); #获取户型 $hxmod = new HxcategoryModel(); $dxlist = $hxmod->gethuxing(); $this->assign("dxlist", $dxlist); #获取风格 $fgmod = new FgcategoryModel(); $fglist = $fgmod->getfengge(); $this->assign("fglist", $fglist); #预算 $yusuan = array(0 => array("key" => "0-5", "val" => "5万以下"), 1 => array("key" => "5-10", "val" => "5-10万"), 2 => array("key" => "10-20", "val" => "10-20万"), 3 => array("key" => "20-40", "val" => "20-40万"), 4 => array("key" => "40-", "val" => "40万以上")); $this->assign("yusuan", $yusuan); #面积 $mianji = array(0 => array("key" => "0-50", "val" => "50㎡"), 1 => array("key" => "60-80", "val" => "60-80㎡"), 2 => array("key" => "80-100", "val" => "80-100㎡"), 3 => array("key" => "100-120", "val" => "100-120㎡"), 4 => array("key" => "120-150", "val" => "120-150㎡"), 5 => array("key" => "150-", "val" => "150㎡以上")); $this->assign("mianji", $mianji); $filter = array(); $filter["hid"] = $_GET['hid']; $filter["fid"] = $_GET['fid']; $filter["ys"] = $_GET['ys']; $filter["mianji"] = $_GET['mianji']; $this->assign("filter", $filter); $filterstr['hxname'] = "<a href='" . U('Case/caselist') . "?id=" . $id . "&hid=&fid=" . $filter['fid'] . "&ys=" . $filter['ys'] . "&mianji=" . $filter['mianji'] . "'>" . $hxmod->gethxname($filter["hid"]) . "</a>"; } else { $this->error("该工长已经被禁止,请联系管理员开通."); } $this->display(); }
/** * 工长列表 */ public function foremanlist() { $cid = $_SESSION['cid']; //广告位 $admod = new AdModel(); $cid = $this->cid; $adlist = $admod->getad(2, $cid); $this->assign("adlist", $adlist); #城市 $Amod = new AreaModel(); $arealist = $Amod->getcity($cid); $this->assign("arealist", $arealist); import("ORG.Util.Page"); $M = new ForemanviewModel(); $where = "status=1 "; $areaid = $_GET['areaid']; if (!empty($areaid)) { $where .= " and q_id=" . $areaid; } $this->assign("areaid", $areaid); $where .= " and c_id=" . $cid; $totalRows = $M->getforemannum($where); $p = new Page($totalRows, 48); $list = $M->getforemanbywhere($where, $p->firstRow, $p->listRows); $this->assign("list", $list); $this->assign("page", $p->show()); #------------------------------列表结束 #设计师 $M1 = new ShejiviewModel(); $sjlist = $M1->getsheji($cid); $this->assign("sjlist", $sjlist); #施工动态 $M2 = new ShigongdtModel(); $sgdtlist = $M2->getsgdtbytime(); #var_dump($sgdtlist); $this->assign("sgdtlist", $sgdtlist); #经典案例 $M3 = new CaseModel(); $caselist = $M3->getjdcase($cid); $this->assign("caselist", $caselist); #var_dump($caselist); $this->display(); }