public function job_detail1()
 {
     $id = $_GET['id'];
     if (empty($id)) {
         header("location:/index.php?s=/Index/index");
         exit;
     }
     $jobOb = new JobModel();
     $result = $jobOb->get_detail($id);
     //var_dump($result);
     $tag = 0;
     //默认是未收藏状态
     //判断当前用户是否登陆,如果登陆判断当前页面当前用户是否已藏
     $userinfo = $_SESSION['userinfo'];
     if (!empty($userinfo)) {
         $username = $userinfo['username'];
         //判断当前页面当前用户是否已藏
         $jcOb = M("job_collection");
         $jcArr = $jcOb->where("username='******' and status=1 and j_id=" . $id)->find();
         //echo $jcOb ->getLastSql();
         //var_dump($jcArr);
         if (!empty($jcArr)) {
             $tag = 1;
             //收藏表里有相关数据,改为已收藏状态
         }
     }
     ///////////////////////////////////////处理分享//////////////////////////////////////////////////////
     $shareUrl2 = rtrim($_GET['share'], ".html");
     $url = decrypt($shareUrl2, "share");
     if ($url == false) {
         $shareUrl2 = str_replace(" ", "+", $shareUrl2);
         $url = decrypt($shareUrl2, "share");
     }
     //如果是分享连接
     if (strpos($url, "tag") !== false && strpos($url, "channel") !== false) {
         $arUrl = explode("&", $url);
         $shareUrl2 = array();
         foreach ($arUrl as $u) {
             $au = explode("=", $u);
             $shareUrl2[$au[0]] = $au[1];
         }
         $_SESSION['shareurl'] = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
         $_SESSION['backurl'] = $_SERVER['HTTP_REFERER'];
         $_SESSION['sharetag'] = $shareUrl2['tag'];
         $_SESSION['sharechannel'] = $shareUrl2['channel'];
         $_SESSION['shareaid'] = $shareUrl2['aid'];
         $_SESSION['shareuname'] = $shareUrl2['uname'];
     }
     //echo "<pre>";var_dump($_SESSION);echo "</pre>";
     ///////////////////////////////////////处理分享//////////////////////////////////////////////////////
     //如果不是分享过来的,则判断登陆没有,如果没有登陆则不允许浏览
     if ($this->isLogin == true) {
         setcookie("gourl", "/index.php?s=/Job/job_detail1/id/" . $id, time() + 3600, "/");
         header("location:/index.php?s=/Login/login");
         die;
     } else {
         setcookie("gourl", "", time() - 1, "/");
     }
     //分享相关
     $requestUrl = $_SERVER['QUERY_STRING'];
     $shareUrl = "http://m.renrenlie.com/index.php";
     if ($_SESSION['userinfo']['username']) {
         $username = $_SESSION['userinfo']['username'];
         $shareUrlTmp = "tag=ShareJob&channel=WapShare&aid=" . C('SHARE_JOB_ID') . "&uname=" . $username;
         $shareUrl = $shareUrl . "?" . $requestUrl . "&share=" . encrypt($shareUrlTmp, "share");
     } else {
         $username = "";
         $shareUrl = $shareUrl . "?" . $requestUrl;
     }
     $share['url'] = $shareUrl;
     $share['title'] = "即刻分享" . $result['title'] . "职位,立得N个“百元”现金。";
     $share['description'] = "[renrenlie.com] " . $result['cpname'] . "直招" . $result['title'] . "职位" . $result['employ'] . "人,月薪:" . $result['treatmentdata'] . " ,推荐或自荐成功入职即得推荐费" . $result['Tariff'] . "元。";
     $this->assign("shareurl", $shareUrl);
     $this->assign("share", $share);
     //echo "<pre>";var_dump($result);echo "</pre>";
     $this->assign("tag", $tag);
     $this->assign("result", $result);
     $this->display("./Job/job_detail1");
 }
 public function job_detail()
 {
     $id = $_GET['id'];
     if (!$id) {
         header("location:/Companyabout/recording");
         die;
     }
     $jobOb = new JobModel();
     $arJob = $jobOb->get_detail($id);
     $this->assign("arJob", $arJob);
     //为引入的头部传入标题
     $lArr = array(array("name" => "回到首页", "url" => "/", "img" => "/Public/new-images/head-icon/m-icon1.png"), array("name" => "发布职位", "url" => "/index.php?s=/Company/send_job", "img" => "/Public/new-images/com-head-icon/send_job.png"), array("name" => "正在招聘", "url" => "/index.php?s=/Companyabout/recording", "img" => "/Public/new-images/com-head-icon/recording.png"), array("name" => "往期招聘", "url" => "/index.php?s=/Companyabout/recorded", "img" => "/Public/new-images/com-head-icon/recorded.png"));
     $this->assign("lArr", $lArr);
     $this->assign("header_title", "职位详情");
     $this->assign("select", "send_job");
     $this->display("Company/job_detail");
 }