public function fav_job()
 {
     //如果为登陆,跳转到login页面,否则查出uid和username字段
     $userinfo = $_COOKIE['userinfo'];
     if (empty($userinfo)) {
         setcookie("gourl", "/Home/Webchatnew/fav_job", time() + 3600, "/");
         header("location:/Home/Webchatlogin/login");
         die;
     } else {
         setcookie("gourl", "", time() - 1, "/");
     }
     get_login_time();
     //首先查看这个职位是否已经被删除在job表中
     $WebChatModel = D("JobCollection");
     $userinfoArr = unserialize($userinfo);
     $uid = $userinfoArr['userid'];
     $limit = "0,10";
     //每页的数据数和内容$limit
     $result = $WebChatModel->fav_job_list($uid, $limit);
     if (empty($result)) {
         $result = array();
     }
     $this->assign("result", $result);
     $this->assign("empty", "<div style='font-size: 14px;color: #b4b4b4;text-align:center;margin-top:10px;'>暂无收藏!</div>");
     $this->display("fav_list");
 }
 public function recommended()
 {
     //如果为登陆,跳转到login页面,否则查出uid和username字段
     $userinfo = $_COOKIE['userinfo'];
     if (empty($userinfo)) {
         setcookie("gourl", "/Home/Webchatrecommend/recommended", time() + 3600, "/");
         header("location:/Home/Webchatlogin/login");
         die;
     } else {
         setcookie("gourl", "", time() - 1, "/");
         $userinfoArr = unserialize($userinfo);
         $uid = $userinfoArr['userid'];
     }
     get_login_time();
     $jobOb = D("job");
     $limit = "0,10";
     $result = $jobOb->getRecommendJob(2, $limit, $uid);
     if (empty($result)) {
         $result = array();
     } else {
         foreach ($result as $k => $v) {
             $arNotice = M("notice_log")->where("type=1 and bt_id=" . $v['bt_id'])->order("id desc")->select();
             if (empty($arNotice)) {
                 $arNotice = array();
             } else {
                 foreach ($arNotice as $k1 => $v1) {
                     $arNotice[$k1]['posttime'] = date("Y-m-d H:i", $v1['created_at']);
                 }
             }
             $result[$k]['notice_log'] = $arNotice;
             //查看改用户是否已经评论过该职位
             $arEvaluate = M("evaluate")->where("uid=" . $uid . " and pid=" . $result[$k]['recordid'] . " and tag='record'")->find();
             if (empty($arEvaluate)) {
                 $result[$k]['is_evaluate'] = 1;
             }
         }
     }
     $this->assign("result", $result);
     $this->display("/Webchatnew/recommended");
 }
Beispiel #3
0
<?php

require_once '../../controller/common.php';
get_login_time();
echo "<a href='/empManage/views/user/login.php'><br/>返回重新登录</a>";
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<link href="/empManage/css/common.css" type="text/css" rel="stylesheet"/>
<link href="/empManage/css/empmanage_css.css" type="text/css" rel="stylesheet"/>
</head>
<h1>主界面</h1>
<ul class="emp_ul">
<li ><a href="/empManage/views/user/emplist.php">管理用户</a></li>
<li ><a href="/empManage/views/user/addEmp.php">添加员工</a></li>
<li ><a href="#">管理用户</a></li>
<li ><a href="#">管理用户</a></li>
</ul>
</html>