function add_action() { $this->rightinfo(); if ($this->config['sy_wzp_web'] == "2") { $data['msg'] = 'ºÜ±§Ç¸£¡¸ÃÄ£¿éÒѹرգ¡'; $data['url'] = 'index.php'; $this->yunset("layer", $data); } $TinyM = $this->MODEL('once'); if ($_GET['id']) { $row = $TinyM->GetOncejobOne(array('id' => $_GET[id])); $row['edate'] = round(($row['edate'] - $row['ctime']) / 3600 / 24); $this->yunset("row", $row); } if ($_POST['submit']) { $_POST = $this->post_trim($_POST); $_POST['mans'] = (int) $_POST['mans']; $_POST = yun_iconv('utf-8', 'gbk', $_POST); $_POST['status'] = $this->config['com_fast_status']; $_POST['ctime'] = time(); $_POST['edate'] = strtotime("+" . (int) $_POST['edate'] . " days"); $password = md5(trim($_POST['password'])); unset($_POST['submit']); $id = intval($_POST['id']); if ($id < 1) { $_POST['password'] = $password; $nid = $TinyM->AddOncejob($_POST); $nid ? $data['msg'] = '²Ù×÷³É¹¦£¡' : ($data['msg'] = '²Ù×÷ʧ°Ü£¡'); $data['url'] = 'index.php?c=once'; } else { $arr = $TinyM->GetOncejobOne(array('id' => $id, 'password' => $password)); if ($arr['id']) { if ($_POST['id']) { unset($_POST['id']); unset($_POST['password']); $nid = $TinyM->UpdateOncejob($_POST, array("id" => $arr['id'])); } else { $_POST['password'] = $password; $nid = $TinyM->AddOncejob($_POST); } $nid ? $data['msg'] = '²Ù×÷³É¹¦£¡' : ($data['msg'] = '²Ù×÷³É¹¦£¡'); $data['url'] = 'index.php?c=once'; } else { $data['msg'] = 'ÃÜÂë´íÎó£¡'; $data['url'] = '1'; } } $data = yun_iconv('gbk', 'utf-8', $data); echo json_encode($data); die; } $CacheList = $this->MODEL('cache')->GetCache('user'); $this->yunset($CacheList); $this->yunset("layer", $data); $this->yunset("headertitle", "΢ÕÐƸ"); $this->yunset("title", "Ìí¼Ó΢ÕÐƸ"); $this->yuntpl(array('mobile/once_add')); }
function add_action() { $this->rightinfo(); if ($this->config['sy_wjl_web'] == "2") { $data['msg'] = '您访问的不存在了呢'; $data['url'] = 'index.php'; $this->yunset("layer", $data); } $TinyM = $this->MODEL('tiny'); if ($_GET['id']) { $row = $TinyM->GetTinyresumeOne(array('id' => $_GET[id])); $this->yunset("row", $row); } if ($_POST['submit']) { $_POST['status'] = $this->config['user_wjl']; $_POST['time'] = time(); $_POST['username'] = yun_iconv('utf-8', 'gbk', trim($_POST['username'])); $_POST['production'] = yun_iconv('utf-8', 'gbk', trim($_POST['production'])); $_POST['job'] = yun_iconv('utf-8', 'gbk', trim($_POST['job'])); $password = md5(trim($_POST['password'])); $type = trim($_POST['type']); unset($_POST['submit']); unset($_POST['type']); $id = intval($_POST['id']); if (!isset($_POST['id'])) { $_POST['password'] = $password; $nid = $this->obj->insert_into("resume_tiny", $_POST); $nid ? $data['msg'] = '操作成功!' : ($data['msg'] = '操作失败!'); $data['url'] = 'index.php?c=tiny'; } else { $arr = $TinyM->GetTinyresumeOne(array('id' => $id, 'password' => $password)); if ($arr['id']) { if ($_POST['id']) { unset($_POST['id']); $nid = $TinyM->UpdateTinyresume($_POST, array("id" => $arr['id'])); } else { $_POST['password'] = $password; $nid = $TinyM->AddTinyresume($_POST); } $nid ? $data['msg'] = '操作成功!' : ($data['msg'] = '操作成功!'); $data['url'] = 'index.php?c=tiny'; } else { $data['msg'] = '密码错误!'; $data['url'] = '1'; } } $data = yun_iconv('gbk', 'utf-8', $data); echo json_encode($data); die; } /* $CacheList=$this->MODEL('cache')->GetCache('user');print_r($CacheList); $this->yunset($CacheList);*/ $this->user_cache(); $this->yunset(array("layer" => $data, "headertitle" => "微简历")); $this->yunset("title", "添加微简历"); $this->yuntpl(array('wap/tiny_add')); }
function joblist_action() { $this->get_moblie(); $CompanyM = $this->MODEL('company'); $JobM = $this->MODEL('job'); $page = $_POST['page']; $pagesize = 10; if ($_POST['keyword']) { $Where[] = '`name` like \'%' . $_POST['keyword'] . '%\''; } $xy = getAround($_POST[x], $_POST[y], $_POST[r]); if ($xy[0]) { $Where[] = "`x`>='" . $xy[0] . "' AND `x`<='" . $xy[1] . "' AND `y`>='" . $xy[3] . "' AND `y`<='" . $xy[2] . "'"; } $CompanyNum = $CompanyM->GetComNum($Where); if (!$page || $page <= 1) { $pagelimit = 10; } else { if ($page <= $CompanyNum / $pagesize) { $pagelimit = $pagesize * $page . ',' . $pagesize; } else { $pagelimit = $CompanyNum / $pagesize * $page . ',' . $pagesize; } } $CompanyList = $CompanyM->GetComList($Where, array('limit' => $pagelimit)); foreach ($CompanyList as $k => $v) { $UIDList[] = $v['uid']; } $JobList = $JobM->GetComjobList(array('`uid` in (' . implode(',', $UIDList) . ')')); foreach ($CompanyList as $k1 => $v1) { foreach ($JobList as $k2 => $v2) { if ($v1['uid'] == $v2['uid']) { $CompanyList[$k1]['joblist'][] = $v2; } } } $json_list = array(); foreach ($CompanyList as $k1 => $v1) { $json_list[$k1]['name'] = yun_iconv('gbk', 'utf-8', $v1['name']); $json_list[$k1]['x'] = yun_iconv('gbk', 'utf-8', $v1['x']); $json_list[$k1]['y'] = yun_iconv('gbk', 'utf-8', $v1['y']); $json_list[$k1]['address'] = yun_iconv('gbk', 'utf-8', $v1['address']); $json_list[$k1]['com_url'] = Url('wap', array('c' => 'company', 'a' => 'show', 'id' => $v1['uid'])); foreach ($CompanyList[$k1]['joblist'] as $k2 => $v2) { $json_list[$k1]['joblist'][] = array('name' => yun_iconv('gbk', 'utf-8', $v2['name']), 'job_url' => Url('wap', array('c' => 'job', 'a' => 'view', 'id' => $v2['id']))); } } echo json_encode(array('list' => $json_list, 'pagecount' => $CompanyNum / $pagesize + 1)); die; }
function autosearch_action() { $M = $this->MODEL('ask'); $keyword = yun_iconv("utf-8", "gbk", trim($_POST['keyword'])); $rows = $M->GetQuestionList(array("`title` like '%" . $keyword . "%'"), array("field" => "`id`,`title`,`answer_num`", "orderby" => 'answer_num', "desc" => 'desc', "limit" => 6)); if ($rows && is_array($rows)) { foreach ($rows as $key => $val) { $rows[$key]['url'] = Url('ask', array("c" => "content", "id" => $val['id'])); $rows[$key]['title'] = urlencode(str_replace($keyword, "<b>" . $keyword . "</b>", $val['title'])); } } $rows = json_encode($rows); echo urldecode($rows); die; }
function index_action() { $CompanyM = $this->MODEL('company'); $JobM = $this->MODEL('job'); $page = $_POST['page']; $pagesize = 10; if ($_POST['keyword']) { $where = ' and `name` like \'%' . iconv("utf8", "gbk", $_POST['keyword']) . '%\''; } if ($_POST['min_lng'] && $_POST['max_lng']) { $lng = "`x`>='" . $_POST['min_lng'] . "' AND `x`<='" . $_POST['max_lng'] . "' AND `y`>='" . $_POST['min_lat'] . "' AND `y`<='" . $_POST['max_lat'] . "'"; } $CompanyNum = $CompanyM->GetComNum(array($lng, $where)); if ($page == 0) { $pagelimit = 10; } else { if ($page <= $CompanyNum / $pagesize) { $pagelimit = $pagesize * $page . ',' . $pagesize; } else { $pagelimit = $CompanyNum / $pagesize * $page . ',' . $pagesize; } } $CompanyList = $CompanyM->GetComList(array($lng, $where), array('limit' => $pagelimit)); foreach ($CompanyList as $k => $v) { $UIDList[] = $v['uid']; } $JobList = $JobM->GetComjobList(array('`uid` in (' . implode(',', $UIDList) . ')')); foreach ($CompanyList as $k1 => $v1) { foreach ($JobList as $k2 => $v2) { if ($v1['uid'] == $v2['uid']) { $CompanyList[$k1]['joblist'][] = $v2; } } } $json_list = array(); foreach ($CompanyList as $k1 => $v1) { $json_list[$k1]['name'] = mb_substr(yun_iconv('gbk', 'utf-8', $v1['name']), 0, 12, 'utf-8'); $json_list[$k1]['x'] = yun_iconv('gbk', 'utf-8', $v1['x']); $json_list[$k1]['y'] = yun_iconv('gbk', 'utf-8', $v1['y']); $json_list[$k1]['address'] = yun_iconv('gbk', 'utf-8', $v1['address']); $json_list[$k1]['com_url'] = Url('company', array('c' => 'show', 'id' => $v1['uid'])); foreach ($CompanyList[$k1]['joblist'] as $k2 => $v2) { $json_list[$k1]['joblist'][] = array('name' => mb_substr(yun_iconv('gbk', 'utf-8', $v2['name']), 0, 12, 'utf-8'), 'job_url' => Url('job', array('c' => 'comapply', 'id' => $v2['id']))); } } echo json_encode(array('list' => $json_list, 'count' => $CompanyNum)); die; }
function index_action() { if ($this->uid || $this->username) { echo "<script>location.href='member/index.php';</script>"; } if ($_POST['submit']) { $usertype = $_POST['usertype'] ? $_POST['usertype'] : 1; $_POST['username'] = yun_iconv('utf-8', 'gbk', $_POST['username']); if (!$this->CheckRegUser($_POST['username']) && !$this->CheckRegEmail($_POST['username'])) { $this->layer_msg('无效的用户名!', 9, 0, ''); } if (!$this->CheckRegEmail($_POST['email'])) { $this->layer_msg('邮箱格式不正确!', 9, 0, ''); } $UserinfoM = $this->MODEL('userinfo'); $member = $UserinfoM->GetMemberOne(array('username' => $_POST['username'], " or `email`='" . $_POST['email'] . "'")); if (is_array($member)) { if ($member['username'] == $_POST['username']) { $this->layer_msg('用户名已存在,请重新输入!', 9, 0, ''); } elseif ($member['email'] == $_POST['email']) { $this->layer_msg('邮箱已存在,请重新输入!', 9, 0, ''); } } else { $regname = @explode(",", $this->config['sy_regname']); if (in_array($_POST['username'], $regname)) { $this->layer_msg('用户名已存在,请重新输入!', 9, 0, ''); } } if ($usertype == '1') { $status = 1; } elseif ($usertype == '2') { $status = $this->config['com_status']; } if ($this->config['sy_uc_type'] == "uc_center") { $this->uc_open(); $uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']); if ($uid <= 0) { $this->layer_msg('该用户或邮箱已存在!', 9, 0, ''); } else { list($uid, $username, $password, $email, $salt) = uc_user_login($_POST['username'], $_POST['password']); $pass = md5(md5($_POST['password']) . $salt); $ucsynlogin = uc_user_synlogin($uid); } } elseif ($this->config['sy_pw_type'] == "pw_center") { include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php"; $username = $username; $password = $_POST['password']; $email = $_POST['email']; $pw = new PwClientAPI($username, $password, $email); $pwuid = $pw->register(); $salt = substr(uniqid(rand()), -6); $pass = md5(md5($password) . $salt); } else { $salt = substr(uniqid(rand()), -6); $pass = md5(md5($_POST['password']) . $salt); } $idata = array('username' => $_POST['username'], 'password' => $pass, 'email' => $_POST['email'], 'usertype' => $usertype, 'status' => $status, 'salt' => $salt, 'reg_date' => time(), 'login_date' => time()); $userid = $UserinfoM->AddMember($idata); if ($userid) { if ($_COOKIE['wxid']) { $UserinfoM->UpdateMember(array('wxid' => ''), array('wxid' => $_COOKIE['wxid'])); $UserinfoM->UpdateMember(array('wxid' => $_COOKIE['wxid']), array('uid' => $userid)); setcookie("wxid", '', time() - 86400, "/"); } if ($_COOKIE['unionid']) { $UserinfoM->UpdateMember(array('unionid' => ''), array('unionid' => $_COOKIE['unionid'])); $UserinfoM->UpdateMember(array('unionid' => $_COOKIE['unionid']), array('uid' => $userid)); setcookie("unionid", '', time() - 86400, "/"); } if ($this->config[sy_pw_type] == "pw_center") { $UserinfoM->UpdateMember(array('pwuid' => $pwuid), array('uid' => $userid)); } $UserinfoM->RegisterMember($_POST, array('uid' => $userid, 'usertype' => $usertype)); if ($this->config['integral_reg'] != "") { $UserinfoM->company_invtal($userid, $this->config['integral_reg'], true, "注册", true, 2, 'integral', '26'); } $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype); $this->layer_msg('恭喜您,已成功注册会员!', 9, 0, 'member/index.php?c=addresume'); } } if ($_GET['usertype'] == "2") { $this->yunset("headertitle", "会员注册"); } else { $this->yunset("headertitle", "会员注册"); } $this->seo("register"); $this->yuntpl(array('mobile/register')); }
function ajax_action() { session_start(); if (md5($_POST['code']) != $_SESSION['authcode']) { unset($_SESSION['authcode']); echo 1; die; } $M = $this->MODEL('once'); $jobinfo = $M->GetOncejobOne(array('id' => (int) $_POST['tid'], 'password' => md5($_POST['pw']))); if (!is_array($jobinfo) || empty($jobinfo)) { echo 2; die; } if ($_POST['type'] == 1) { $M->UpdateOncejob(array('ctime' => time()), array('id' => (int) $jobinfo['id'])); echo 3; die; } elseif ($_POST['type'] == 3) { $M->DeleteOncejob(array('id' => (int) $jobinfo['id'])); echo 4; die; } else { if ($jobinfo['edate'] > mktime()) { $jobinfo['edate'] = ceil(($jobinfo['edate'] - mktime()) / 86400); } else { $jobinfo['edate'] = yun_iconv("gbk", "utf-8", "已过期"); } $jobinfo = array_merge($jobinfo, array('title' => yun_iconv('gbk', 'utf-8', $jobinfo['title']), 'companyname' => yun_iconv('gbk', 'utf-8', $jobinfo['companyname']), 'linkman' => yun_iconv('gbk', 'utf-8', $jobinfo['linkman']), 'address' => yun_iconv('gbk', 'utf-8', $jobinfo['address']), 'require' => yun_iconv('gbk', 'utf-8', $jobinfo['require']))); echo json_encode($jobinfo); die; } }
function index_action() { if (preg_match("/^[a-zA-Z0-9_-]+\$/", $_GET['wxid'])) { setcookie("wxid", $_GET['wxid'], time() + 86400, "/"); } if (preg_match("/^[a-zA-Z0-9_-]+\$/", $_GET['unionid'])) { setcookie("unionid", $_GET['unionid'], time() + 86400, "/"); } if ($this->uid || $this->username) { if ($_GET['bind'] == '1') { $this->unset_cookie(); $data['msg'] = '重新绑定您的求职账户!'; } elseif ($_GET['wxid']) { $this->unset_cookie(); } else { $this->wapheader('member/index.php'); } } if ($_POST['submit']) { $UserinfoM = $this->MODEL('userinfo'); if ($_POST['wxid']) { $wxparse = '&wxid=' . $_POST['wxid']; } $username = yun_iconv("utf-8", "gbk", $_POST['username']); if (!$this->CheckRegUser($username) && !$this->CheckRegEmail($username)) { $data['msg'] = '无效的用户名!'; $this->layer_msg($data['msg'], 9, 0, '', 2); } if ($username != '') { $userinfo = $UserinfoM->GetMemberOne(array('username' => $username), array('field' => "username,usertype,password,uid,salt")); if (!is_array($userinfo)) { $data['msg'] = '用户不存在!'; $this->layer_msg($data['msg'], 9, 0, '', 2); } if ($userinfo['usertype'] == '3') { $data['msg'] = '手机访问暂只支持求职与招聘用户!'; $this->layer_msg($data['msg'], 9, 0, '', 2); } $pass = md5(md5($_POST['password']) . $userinfo['salt']); if ($pass != $userinfo['password']) { $data['msg'] = '密码不正确!'; } else { if ($_COOKIE['wxid']) { $UserinfoM->UpdateMember(array('wxid' => '', 'unionid' => '', 'wxopenid' => ''), array('wxid' => $_COOKIE['wxid'])); $UserinfoM->UpdateMember(array('wxid' => $_COOKIE['wxid']), array('uid' => $userinfo['uid'])); setcookie("wxid", '', time() - 86400, "/"); } if ($_COOKIE['unionid']) { $UserinfoM->UpdateMember(array('unionid' => ''), array('unionid' => $_COOKIE['unionid'])); $UserinfoM->UpdateMember(array('unionid' => $_COOKIE['unionid']), array('uid' => $userinfo['uid'])); setcookie("unionid", '', time() - 86400, "/"); } $this->add_cookie($userinfo['uid'], $userinfo['username'], $userinfo['salt'], $userinfo['email'], $userinfo['password'], $userinfo['usertype']); if ($_COOKIE['wxid']) { $this->layer_msg('绑定成功,请按左上方返回进入微信客户端', 9, 0, $this->config['sy_wapdomain'] . '/member/', 2); } else { $this->layer_msg('', 9, 0, $this->config['sy_wapdomain'] . '/member/', 2); } } } else { $data['msg'] = '数据错误!'; } $this->layer_msg($data['msg'], 9, 0, '', 2); } if ($_GET['usertype'] == "2") { $this->yunset("headertitle", "会员登录"); } else { $this->yunset("headertitle", "会员登录"); } $this->seo("login"); $this->yuntpl(array('wap/login')); }
function add_action() { $this->rightinfo(); if ($this->config['sy_wzp_web'] == "2") { $data['msg'] = '很抱歉!该模块已关闭!'; $data['url'] = 'index.php'; $this->yunset("layer", $data); } $this->get_moblie(); $TinyM = $this->MODEL('once'); if ($_GET['id']) { $row = $TinyM->GetOncejobOne(array('id' => $_GET[id])); $row['edate'] = round(($row['edate'] - $row['ctime']) / 3600 / 24); $this->yunset("row", $row); } if ($_POST['submit']) { $_POST = $this->post_trim($_POST); $_POST['mans'] = (int) $_POST['mans']; $_POST = yun_iconv('utf-8', 'gbk', $_POST); $_POST['status'] = $this->config['com_fast_status']; $_POST['ctime'] = time(); $_POST['edate'] = strtotime("+" . (int) $_POST['edate'] . " days"); $password = md5(trim($_POST['password'])); unset($_POST['submit']); $id = intval($_POST['id']); if ($id < 1) { $_POST['password'] = $password; $nid = $TinyM->AddOncejob($_POST); $nid ? $data['msg'] = '操作成功!' : ($data['msg'] = '操作失败!'); $data['url'] = 'index.php?c=once'; } else { $arr = $TinyM->GetOncejobOne(array('id' => $id, 'password' => $password)); if ($arr['id']) { if ($_POST['id']) { unset($_POST['id']); unset($_POST['password']); $nid = $TinyM->UpdateOncejob($_POST, array("id" => $arr['id'])); } else { $_POST['password'] = $password; $nid = $TinyM->AddOncejob($_POST); } $nid ? $data['msg'] = '操作成功!' : ($data['msg'] = '操作成功!'); $data['url'] = 'index.php?c=once'; } else { $data['msg'] = '密码错误!'; $data['url'] = '1'; } } $data = yun_iconv('gbk', 'utf-8', $data); echo json_encode($data); die; } $CacheList = $this->MODEL('cache')->GetCache('user'); //这里是微信jssdk $jssdk = new JSSDK(); $WxData = $jssdk->getSignPackage(); $this->yunset("wxAppid", $WxData['appId']); $this->yunset('wxNonceStr', $WxData['nonceStr']); $this->yunset('wxTimestamp', $WxData['timestamp']); $this->yunset('wxSignature', $WxData['signature']); //微信jssdk结束 $this->yunset($CacheList); $this->yunset("layer", $data); $this->yunset("headertitle", "微招聘"); $this->yunset("title", "添加微招聘"); $this->yuntpl(array('wap/once_add')); }
function statelist_action() { $M = $this->MODEL('friend'); $AskM = $this->MODEL('ask'); $myfriend = $AskM->GetAtnList(array("uid" => $this->uid)); $fuids = array(); foreach ($myfriend as $val) { $fuids[] = $val['sc_uid']; } if ($_POST['page']) { $fuids[] = $this->uid; $where = array("`uid` in (" . @implode(',', $fuids) . ")", "type" => '1'); $limit = 11; $page = $_POST['page'] < 1 ? 1 : $_POST['page']; $ststrsql = $page * $limit; $list = $M->GetStateAll($where, array("orderby" => "`id` DESC", "limit" => "{$ststrsql},{$limit}")); if (is_array($list) && $list) { $lids = array(); foreach ($list as $val) { $lids[] = $val['id']; } $stateids = pylode(',', $lids); $replylist = $M->GetFriendReplyAll(array("nid in (" . $stateids . ")"), array("orderby" => "id asc")); if (is_array($replylist)) { foreach ($replylist as $v) { if (in_array($v['uid'], $fuids) == false) { $fuids[] = $v['uid']; } } $friendinfo = $M->GetFriendAll(array("uid in (" . pylode(',', $fuids) . ")"), array("field" => "`uid`,`pic`,`nickname`")); $friends = array(); foreach ($friendinfo as $val) { if ($val['pic'] == '') { $val['pic'] = $this->config['sy_weburl'] . $this->config['sy_friend_icon']; } $friends[$val['uid']]['uid'] = $val['uid']; $friends[$val['uid']]['pic'] = $val['pic']; $friends[$val['uid']]['nickname'] = yun_iconv("gbk", "utf-8", $val['nickname']); } foreach ($replylist as $k => $v) { $replylist[$k]['ctime'] = date("Y-m-d H:i", $v['ctime']); $replylist[$k]['nickname'] = $friends[$v['uid']]['nickname']; $replylist[$k]['reply'] = yun_iconv("gbk", "utf-8", $v['reply']); $replylist[$k]['pic'] = $friends[$v['uid']]['pic']; $replylist[$k]['url'] = Url('ask', array("c" => "friend", "uid" => $v['uid'])); } } foreach ($list as $k => $v) { $list[$k]['ctime'] = date("Y-m-d H:i", $v['ctime']); $list[$k]['content'] = yun_iconv("gbk", "utf-8", $list[$k]['content']); $list[$k]['nickurl'] = Url('ask', array("c" => "friend", "uid" => $v[uid])); $list[$k]['nickname'] = $friends[$v['uid']]['nickname']; $list[$k]['pic'] = $friends[$v['uid']]['pic']; $list[$k]['commentnum'] = "0"; if (is_array($replylist)) { foreach ($replylist as $kk => $vv) { if ($vv['nid'] == $v['id']) { $list[$k]['commentnum'] += 1; $list[$k]['reply'][] = $vv; } } } } } echo urldecode(json_encode($list)); die; } }
function savedescription_action() { if (!is_numeric($_POST['eid'])) { $this->ACT_msg("", "简历编号格式不正确!"); die; } $IsSuccess = $this->obj->update_once('resume', array('description' => yun_iconv('utf-8', 'gbk', $_POST['description'])), array('uid' => $this->uid)); if ($IsSuccess) { echo 1; die; $this->ACT_layer_msg("修改成功!", 9, $_SERVER['HTTP_REFERER'], 2, 0); die; } else { echo 0; die; $this->ACT_layer_msg("修改失败!", 9, $_SERVER['HTTP_REFERER'], 2, 0); die; } }
function add_action() { $this->rightinfo(); if ($this->config['sy_wjl_web'] == "2") { $data['msg'] = '很抱歉!该模块已关闭!'; $data['url'] = 'index.php'; $this->yunset("layer", $data); } $this->get_moblie(); $TinyM = $this->MODEL('tiny'); if ($_GET['id']) { $row = $TinyM->GetTinyresumeOne(array('id' => $_GET[id])); $this->yunset("row", $row); } if ($_POST['submit']) { $_POST['status'] = $this->config['user_wjl']; $_POST['time'] = time(); $_POST['username'] = yun_iconv('utf-8', 'gbk', trim($_POST['username'])); $_POST['production'] = yun_iconv('utf-8', 'gbk', trim($_POST['production'])); $_POST['job'] = yun_iconv('utf-8', 'gbk', trim($_POST['job'])); $password = md5(trim($_POST['password'])); $type = trim($_POST['type']); unset($_POST['submit']); unset($_POST['type']); $id = intval($_POST['id']); if (!isset($_POST['id'])) { $_POST['password'] = $password; $nid = $this->obj->insert_into("resume_tiny", $_POST); $nid ? $data['msg'] = '操作成功!' : ($data['msg'] = '操作失败!'); $data['url'] = 'index.php?c=tiny'; } else { $arr = $TinyM->GetTinyresumeOne(array('id' => $id, 'password' => $password)); if ($arr['id']) { if ($_POST['id']) { unset($_POST['id']); $nid = $TinyM->UpdateTinyresume($_POST, array("id" => $arr['id'])); } else { $_POST['password'] = $password; $nid = $TinyM->AddTinyresume($_POST); } $nid ? $data['msg'] = '操作成功!' : ($data['msg'] = '操作成功!'); $data['url'] = 'index.php?c=tiny'; } else { $data['msg'] = '密码错误!'; $data['url'] = '1'; } } $data = yun_iconv('gbk', 'utf-8', $data); echo json_encode($data); die; } //这里是微信jssdk $jssdk = new JSSDK(); $WxData = $jssdk->getSignPackage(); $this->yunset("wxAppid", $WxData['appId']); $this->yunset('wxNonceStr', $WxData['nonceStr']); $this->yunset('wxTimestamp', $WxData['timestamp']); $this->yunset('wxSignature', $WxData['signature']); //微信jssdk结束 /* $CacheList=$this->MODEL('cache')->GetCache('user');print_r($CacheList); $this->yunset($CacheList);*/ $this->user_cache(); $this->yunset(array("layer" => $data, "headertitle" => "微简历")); $this->yunset("title", "添加微简历"); $this->yuntpl(array('wap/tiny_add')); }
function editpw_action() { $username = yun_iconv("utf-8", "gbk", $_POST['username']); if (!$this->CheckRegUser($username) && !$this->CheckRegEmail($username)) { $res['msg'] = yun_iconv("gbk", "utf-8", "用户名不符合规范!"); $res['type'] = '8'; echo json_encode($res); die; } $M = $this->MODEL("userinfo"); $where = array("`username`='" . $username . "' or `email`='" . $username . "' or `moblie`='" . $username . "'"); $info = $M->GetMemberOne($where, array("field" => "`uid`,`username`,`email`,`moblie`")); if ($_POST['sendtype'] == 'email') { $check = $info['email']; } else { $check = $info['moblie']; } $cert = $M->GetCompanyCert(array("uid" => $info['uid'], "type" => "5", "check" => $check), array("field" => "`uid`,`check2`,`ctime`,`id`")); if ($_POST['code'] != $cert['check2']) { $res['msg'] = yun_iconv("gbk", "utf-8", "验证码错误"); $res['type'] = '8'; echo json_encode($res); die; } if (!$_POST['password']) { $res['msg'] = yun_iconv("gbk", "utf-8", "请完整填写信息!"); $res['type'] = '8'; echo json_encode($res); die; } $password = $_POST['password']; if (is_array($info)) { if ($this->config[sy_uc_type] == "uc_center" && $info['name_repeat'] != "1") { $this->uc_open(); uc_user_edit($info[username], "", $password, $info['email'], "0"); } else { $salt = substr(uniqid(rand()), -6); $pass2 = md5(md5($password) . $salt); $M->UpdateMember(array("password" => $pass2, "salt" => $salt), array("uid" => $cert['uid'])); } $res['msg'] = yun_iconv("gbk", "utf-8", '密码修改成功!'); $res['type'] = '1'; $res['uid'] = $info['uid']; $res['username'] = $this->half_replace(yun_iconv("gbk", "utf-8", $info['username']), 'GBK'); $res['email'] = $this->half_replace($info['email']); $res['moblie'] = $this->half_replace($info['moblie']); echo json_encode($res); die; } else { $res['msg'] = yun_iconv("gbk", "utf-8", "对不起!没有该用户!"); $res['type'] = '8'; echo json_encode($res); die; } }
function friendreply_action() { if ($_COOKIE['uid'] > 0) { if ($_POST['nid']) { $M = $this->MODEL('friend'); $_POST['reply'] = $this->stringfilter($_POST['reply']); $M->InsertFriendReply(array('nid' => (int) $_POST['nid'], 'reply' => $_POST['reply'], 'fid' => (int) $_POST['fid'], 'uid' => $this->uid, 'ctime' => time())); if ($_POST['fid'] != $this->uid) { $msg_content = "您的动态有了新的回复!"; $this->automsg($msg_content, (int) $_POST['fid']); $M->member_log("回复动态"); } $reply = $M->GetFriendReplyOne(array("nid" => (int) $_POST['nid']), array("orderby" => "id desc")); $info = $M->GetFriendInfo(array("uid" => $reply['uid'])); $comment['ctime'] = date("Y-m-d H:i:s", $reply['ctime']); if ($info['pic'] == "") { $comment['pic'] = $this->config['sy_weburl'] . "/" . $this->config['sy_friend_icon']; } else { $comment['pic'] = str_replace("..", $this->config['sy_weburl'], $info['pic']); } $comment['url'] = Url('ask', array('c' => 'friend', 'uid' => $reply["uid"])); $comment['nickname'] = yun_iconv("gbk", "utf-8", $info['nickname']); $comment['reply'] = yun_iconv("gbk", "utf-8", $reply['reply']); echo urldecode(json_encode($comment)); die; } } else { echo 1; die; } }
function stringfilter($string) { $str = yun_iconv("utf-8", "gbk", trim($string)); $regex = "/\\\$|\\'|\\\\|/"; $str = preg_replace($regex, "", $str); return $str; }
function Encode($string, $charset) { $InputCoding = strtolower(mb_detect_encoding($string, array('utf-8', 'gbk'))); if ($charset == $InputCoding) { return $string; } else { return yun_iconv($InputCoding, $charset, $string); } }
function loginsave_action() { $username = yun_iconv("utf-8", "gbk", $_POST['username']); if ($this->uid > 0 && $_COOKIE['username'] != "") { if ($_COOKIE['usertype'] == '1') { $this->ajaxlogin("您现在是个人会员登录状态!"); } elseif ($_COOKIE['usertype'] == '2') { $this->ajaxlogin("您现在是企业会员登录状态!"); } } if ($_POST['path'] != "index") { if (strstr($this->config['code_web'], '前台登陆')) { session_start(); if (md5($_POST['authcode']) != $_SESSION['authcode']) { unset($_SESSION['authcode']); $this->ajaxlogin("验证码错误!"); } } } if (!$this->CheckRegUser($username) && !$this->CheckRegEmail($username)) { $this->ajaxlogin("无效的用户名!"); } if ($username != "") { $Member = $this->MODEL("userinfo"); if ($this->config['sy_uc_type'] == "uc_center") { $this->uc_open(); $uname = $username; list($uid, $username, $password, $email) = uc_user_login($username, $_POST['password']); if ($uid < 1) { $user = $Member->GetMemberOne(array("username" => $uname), array("field" => "username,email,uid,password,salt")); $pass = md5(md5($_POST['password']) . $user['salt']); if ($pass == $user['password']) { $uid = $user['uid']; uc_user_register($user['username'], $_POST['password'], $user['email']); list($uid, $username, $password, $email) = uc_user_login($uname, $_POST['password']); } else { $this->ajaxlogin("账户或密码错误!"); } } else { if ($uid > 0) { $ucsynlogin = uc_user_synlogin($uid); $msg = '登录成功!'; $user = $Member->GetMemberOne(array("username" => $username), array("field" => "`uid`,`usertype`,`email_status`")); if (!empty($user)) { if (session_id() == "") { session_start(); } if ($_SESSION['qq']['openid']) { $Member->UpdateMember(array("qqid" => $_SESSION['qq']['openid']), array("username" => $username)); unset($_SESSION['qq']); } if ($_SESSION['wx']['openid']) { $udate = array('wxopenid' => $_SESSION['wx']['openid']); if ($_SESSION['wx']['unionid']) { $udate['unionid'] = $_SESSION['wx']['unionid']; } $Member->UpdateMember($udate, array("username" => $username)); unset($_SESSION['wx']); } if ($_SESSION['sina']['openid']) { $Member->UpdateMember(array("sinaid" => $_SESSION['sina']['openid']), array("username" => $username)); unset($_SESSION['sina']); } if (!$user['usertype']) { $this->unset_cookie(); $this->addcookie("username", $username, time() + 3600); $this->addcookie("password", $_POST['password'], time() + 3600); $this->ajaxlogin($ucsynlogin, Url("login", array("c" => "utype"), "1"), '3'); } if ($this->config['user_status'] == "1") { if ($user['email_status'] != "1") { $this->ajaxlogin("您的账户还未激活,请先激活!", Url("activate", '', "1")); die; } } if ($_POST['loginname']) { setcookie("loginname", $username, time() + 8640000); } $this->autoupjob($user['uid'], $user['usertype']); } else { $this->unset_cookie(); $this->addcookie("username", $username, time() + 3600); $this->addcookie("password", $_POST['password'], time() + 3600); $this->ajaxlogin($ucsynlogin, Url("login", array("c" => "utype"), "1"), '3'); } $this->ajaxlogin($ucsynlogin, $this->config['sy_weburl'] . "/member", '2'); } elseif ($uid == -1) { $msg = '用户不存在,或者被删除'; } elseif ($uid == -2) { $msg = '密码错误'; } else { $msg = '该用户未定义!'; } } $this->ajaxlogin($ucsynlogin, Url("login", array("c" => "utype"), "1"), '3'); } else { $user = $Member->GetMemberOne(array("username" => $username), array("field" => "`pw_repeat`,`pwuid`,`uid`,`username`,`salt`,`email`,`password`,`usertype`,`status`,`email_status`")); if ($this->config['sy_pw_type'] == "pw_center") { if ($user['pw_repeat'] != "1") { include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php"; $pw = new PwClientAPI($username, $_POST['password'], ""); $pwuser = $pw->user_login(); if ($pwuser['uid'] > 0) { if (empty($user)) { $user = $this->newuser($Member, $pwuser['username'], $pwuser['password'], $pwuser['email'], $user['usertype'], $pwuser['uid'], $qqid); } else { if ($pwuser['uid'] == $user['pwuid']) { $pwrows = $pw->login($pwuser['uid']); $this->add_cookie($user['uid'], $user['username'], $user['salt'], $user['email'], $user['password'], $user['usertype'], $_POST['loginname']); $time = strtotime(date("Y-m-d")); $row = $Member->GetPayinfoOne(array("`com_id`='" . $user['uid'] . "' and `pay_time`>'" . $time . "' and `pay_remark`='会员登录'")); if (empty($row)) { $this->get_integral_action($user['uid'], "integral_login", "会员登录"); } $this->ajaxlogin('登录成功', '', '2'); } else { $Member->UpdateMember(array("pw_repeat" => "1"), array("uid" => $user['uid'])); } } } } } if (is_array($user)) { $pass = md5(md5($_POST['password']) . $user['salt']); if ($user['password'] == $pass) { if ($user['status'] == "2") { $this->ajaxlogin("您的账号已被锁定!", Url("register", array("c" => "ok", "type" => 2), "1")); } if ($user['usertype'] == "2" && $this->config['com_status'] != "1" && $user['status'] != "1") { $this->ajaxlogin("您还没有通过审核!", Url("register", array("c" => "ok", "type" => 3), "1")); } if ($this->config['user_status'] == "1" && $user['usertype'] == "1" && $user['email_status'] != "1") { $this->ajaxlogin("您的账户还未激活,请先激活!", Url("activate", '', "1")); } if (session_id() == "") { session_start(); } if ($_SESSION['qq']['openid']) { $Member->UpdateMember(array("qqid" => $_SESSION['qq']['openid']), array("username" => $username)); unset($_SESSION['qq']); } if ($_SESSION['wx']['openid']) { $udate = array('wxopenid' => $_SESSION['wx']['openid']); if ($_SESSION['wx']['unionid']) { $udate['unionid'] = $_SESSION['wx']['unionid']; } $Member->UpdateMember($udate, array("username" => $username)); unset($_SESSION['wx']); } if ($_SESSION['sina']['openid']) { $Member->UpdateMember(array("sinaid" => $_SESSION['sina']['openid']), array("username" => $username)); unset($_SESSION['sina']); } $time = time(); $ip = fun_ip_get(); $Member->UpdateMember(array("login_ip" => $ip, "login_date" => $time, "login_hits" => "`login_hits`+1"), array("uid" => $user['uid'])); $this->unset_cookie(); $this->add_cookie($user['uid'], $user['username'], $user['salt'], $user['email'], $user['password'], $user['usertype'], $_POST['loginname']); $time = strtotime(date("Y-m-d")); $row = $Member->GetPayinfoOne(array("`com_id`='" . $user['uid'] . "' and `pay_time`>'" . $time . "' and `pay_remark`='会员登录'")); if (empty($row)) { $this->get_integral_action($user['uid'], "integral_login", "会员登录"); } if ($qqid) { $Member->UpdateMember(array("qqid" => $qqid, "username" => $username), array("uid" => $user['uid'])); } if ($user['usertype'] == '1') { $Resume = $this->MODEL("resume"); $info = $Resume->SelectResumeOne(array("uid" => $user['uid']), "`name`,`birthday`"); } else { if ($user['usertype'] == '2') { $Company = $this->MODEL("company"); $info = $Company->GetCompanyInfo(array("uid" => $user['uid']), array("field" => 'name')); $this->autoupjob($user['uid'], $user['usertype']); } } if ($info['name']) { $this->ajaxlogin('登录成功', $this->config['sy_weburl'] . "/member", '1'); } else { if ($info['name'] == '') { $this->ajaxlogin('登录成功', $this->config['sy_weburl'] . "/member/index.php?c=info", '1'); } } } else { $this->ajaxlogin("密码不正确!"); } } else { $this->ajaxlogin("该用户不存在!"); } } } else { $this->ajaxlogin("用户名不能为空!"); } }
function regsave_action() { $_POST = $this->post_trim($_POST); $usertype = intval($_POST['usertype']); $_POST['username'] = yun_iconv("utf-8", "gbk", $_POST['username']); $_POST['unit_name'] = yun_iconv("utf-8", "gbk", $_POST['unit_name']); $_POST['address'] = yun_iconv("utf-8", "gbk", $_POST['address']); $_POST['linkman'] = yun_iconv("utf-8", "gbk", $_POST['linkman']); $_POST['name'] = yun_iconv("utf-8", "gbk", $_POST['name']); if ($_COOKIE['uid'] != "" && $_COOKIE['username'] != "") { $this->errjson('您已经登录了!'); } if (strpos($this->config['code_web'], '注册会员') !== false) { session_start(); if (md5($_POST['authcode']) != $_SESSION['authcode']) { $this->errjson('验证码错误!'); } } if (!$this->CheckRegUser($_POST['username']) && !$this->CheckRegEmail($_POST['username'])) { $this->errjson('用户名包含特殊字符!'); } $Member = $this->MODEL("userinfo"); if ($_POST['codeid'] == '1') { if ($this->config['reg_username'] == '1' && $usertype == '1') { if (!$this->CheckRegUser($_POST['name']) || $_POST['name'] == "") { $this->errjson('真实姓名格式不规范'); } } if ($this->config['reg_usertel'] == '1' && $usertype == '1' || $this->config['reg_comtel'] == '1' && $usertype == '2') { if (!preg_match("/1[34578]{1}\\d{9}\$/", $_POST['moblie'])) { $this->errjson('手机格式错误!'); } else { $moblieNum = $Member->GetMemberNum(array("moblie" => $_POST['moblie'])); if ($moblieNum > 0) { $this->errjson('手机已存在!'); } } } if ($this->config['reg_useremail'] == '1' && $usertype == '1' || $this->config['reg_comemail'] == '1' && $usertype == '2') { if (!$this->CheckRegEmail($_POST['email']) || $_POST['email'] == "") { $this->errjson('Email格式不规范!'); } } if ($usertype == '2') { if ($this->config['reg_comname'] == '1') { if (!$this->CheckRegUser($_POST['unit_name']) || $_POST['unit_name'] == "") { $this->errjson('请正确填写企业名称!'); } } if ($this->config['reg_comaddress'] == '1') { if (!$this->CheckRegUser($_POST['address']) || $_POST['address'] == "") { $this->errjson('请正确填写企业地址!'); } } if ($this->config['reg_comlink'] == '1') { if (!$this->CheckRegUser($_POST['linkman']) || $_POST['linkman'] == "") { $this->errjson('请正确填写企业联系人'); } } } } elseif ($_POST['codeid'] == '2') { if (!preg_match("/1[34578]{1}\\d{9}\$/", $_POST['moblie'])) { $this->errjson('手机格式错误!'); } if ($this->config['sy_msg_regcode'] == "1") { if ($_POST['moblie_code']) { $regCertMobile = $Member->GetCompanyCert(array("type" => '2', "check" => $_POST['moblie'])); } if ($regCertMobile['check2'] != $_POST['moblie_code'] || $regCertMobile['check2'] == '') { $this->errjson('短信验证码错误!'); } } $_POST['username'] = $_POST['moblie']; } elseif ($_POST['codeid'] == '3') { if (!$this->CheckRegEmail($_POST['email']) || $_POST['email'] == "") { $this->errjson('Email格式不规范!'); } $_POST['username'] = $_POST['email']; } if ($_POST['username'] != "") { $nid = $Member->GetMemberNum(array("username" => $_POST['username'])); if ($nid) { $this->errjson('账户名已存在!'); } else { if ($_POST['usertype'] == '1') { $satus = 1; } elseif ($_POST['usertype'] == '2') { $satus = $this->config['com_status']; } if ($this->config['sy_uc_type'] == "uc_center") { $this->uc_open(); $uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']); if ($uid <= 0) { $this->errjson('该邮箱已存在!'); } else { list($uid, $username, $password, $email, $salt) = uc_user_login($_POST['username'], $_POST['password']); $pass = md5(md5($_POST['password']) . $salt); $ucsynlogin = uc_user_synlogin($uid); } } elseif ($this->config['sy_pw_type'] == "pw_center") { include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php"; $password = $_POST['password']; $email = $_POST['email']; $pw = new PwClientAPI($username, $password, $email); $pwuid = $pw->register(); $salt = substr(uniqid(rand()), -6); $pass = md5(md5($password) . $salt); } else { $salt = substr(uniqid(rand()), -6); $pass = md5(md5($_POST['password']) . $salt); } $ip = fun_ip_get(); $data['username'] = $_POST['username']; $data['password'] = $pass; $data['usertype'] = $_POST['usertype']; $data['email'] = $_POST['email']; $data['moblie'] = $_POST['moblie']; $data['status'] = $satus; $data['salt'] = $salt; $data['reg_date'] = time(); $data['reg_ip'] = $ip; $data['qqid'] = $_SESSION['qq']['openid']; $data['sinaid'] = $_SESSION['sina']['openid']; $data['wxid'] = $_SESSION['wx']['openid']; $data['regcode'] = (int) $_COOKIE['regcode']; $userid = $Member->AddMember($data); if (!$userid) { $user_id = $Member->GetMemberOne(array("username" => $_POST['username']), array("field" => "uid")); $userid = $user_id['uid']; } if ($userid) { $this->unset_cookie(); if ($this->config['sy_pw_type'] == "pw_center") { $Member->UpdateMember(array("pwuid" => $pwuid), array("uid" => $userid)); } if ($_POST['usertype'] == "1") { $table = "member_statis"; $table2 = "resume"; $data1 = array("uid" => $userid); $data2 = array("uid" => $userid, "email" => $_POST['email'], "telphone" => $_POST['moblie'], "name" => $_POST['name']); } elseif ($_POST['usertype'] == "2") { $table = "company_statis"; $table2 = "company"; $data1 = $Member->FetchRatingInfo(array("uid" => $userid)); $data2['uid'] = $userid; $data2['linkmail'] = $_POST['email']; $data2['name'] = $_POST['unit_name']; $data2['linktel'] = $_POST['moblie']; $data2['address'] = $_POST['address']; $data2['linkman'] = $_POST['linkman']; if ($this->config['com_status'] == 0) { $data2['r_status'] = 2; } } if ($_POST['codeid'] == '2' && $this->config['sy_msg_regcode'] == "1") { $Member->UpdateMember(array("moblie" => ''), array("moblie" => trim($_POST['moblie']))); if ($usertype == '1') { $Member->UpdateResume(array("telphone" => "", "moblie_status" => "0"), array("telphone" => $_POST['moblie'])); $data2['moblie_status'] = "1"; } elseif ($usertype == '2') { $Member->UpdateCompany(array("linktel" => "", "moblie_status" => "0"), array("linktel" => $_POST['moblie'])); $data2['moblie_status'] = "1"; } } $Member->InsertReg($table, $data1); $Member->InsertReg($table2, $data2); $Friend = $this->MODEL("friend"); $Friend->SaveFriendInfo(array("uid" => $userid, "nickname" => $_POST['username'], "usertype" => $_POST['usertype'])); if ($_COOKIE['regcode'] != "") { if ($this->config['integral_invite_reg_type'] == "1") { $auto = true; } else { $auto = false; } $Member->company_invtal((int) $_COOKIE['regcode'], $this->config['integral_invite_reg'], $auto, "邀请注册", true, 2, 'integral', 23); } if ($this->config['integral_reg'] > 0) { $Member->company_invtal($userid, $this->config['integral_reg'], true, "注册赠送", true, 2, 'integral', 23); } if ($_POST['usertype'] == "1") { if ($this->config['user_status'] == "1" && $_POST['email']) { $randstr = rand(10000000, 99999999); $base = base64_encode($userid . "|" . $randstr . "|" . $this->config['coding']); $data_cert['uid'] = $userid; $data_cert['type'] = "cert"; $data_cert['email'] = $_POST['email']; $data_cert['url'] = "<a href='" . $this->config['sy_weburl'] . "/index.php?m=qqconnect&c=mcert&id=" . $base . "'>点击认证</a>"; $data_cert['date'] = date("Y-m-d"); if ($this->config['sy_smtpserver'] != "" && $this->config['sy_smtpemail'] != "" && $this->config['sy_smtpuser'] != "") { $this->send_msg_email($data_cert); $this->errjson('帐号激活邮件已发送到您邮箱,请先激活!', 7); } else { $this->errjson('还没有配置邮箱,请联系管理员!'); } } else { $Member->UpdateMember(array("login_date" => time()), array("uid" => $userid)); $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype); $_POST['uid'] = $userid; $this->regemail($_POST); $this->errjson('', 1); } } elseif ($usertype == "2") { $_POST['uid'] = $userid; $this->regemail($_POST); if ($this->config['com_status'] != "1") { $this->errjson('注册成功,请等待管理员审核!', 7); } else { $Member->UpdateMember(array("login_date" => time()), array("uid" => $userid)); $this->add_cookie($userid, $_POST['username'], $salt, $_POST['email'], $pass, $usertype); $this->errjson('', 1); } } } else { $this->errjson('注册失败!', 8); } } } else { if ($_POST['username'] == '') { $this->errjson('用户名不能为空!', 8); } } }
function reply_action() { $M = $this->MODEL("friend"); $data['pid'] = (int) $_POST['pid']; $data['content'] = yun_iconv("utf-8", "gbk", $_POST['content']); $data['fid'] = (int) $_POST['fid']; $data['status'] = 0; $data['ctime'] = time(); $data['uid'] = $this->uid; $nid = $M->InsertFriendMessage($data); if ($nid) { $M->member_log("回复朋友圈留言"); $this->get_integral_action($this->uid, "integral_friend_reply", "朋友圈回复"); echo '1||' . date("Y-m-d H:i:s"); } else { echo '0||0'; } }
function ajax_url_action() { if ($_POST) { if ($_POST['url'] != "") { $urls = @explode("&", $_POST['url']); foreach ($urls as $v) { if (strpos($v, $_POST['type']) === false) { $gourl[] = yun_iconv('utf-8', 'gbk', $v); } } $gourl = @implode("&", $gourl) . "&" . $_POST['type'] . "=" . $_POST['id']; } else { $gourl = $_POST['type'] . "=" . $_POST['id']; } echo "?" . $gourl; die; } }
function sava_ajaxresume_action() { $_POST['uid'] = intval($_POST['uid']); $data['uid'] = $_POST['uid']; $data['title'] = '面试邀请'; $data['content'] = yun_iconv("utf-8", "gbk", $_POST['content']); $data['fid'] = $this->uid; $data['datetime'] = time(); $data['address'] = iconv("utf-8", "gbk", $_POST['address']); $data['intertime'] = iconv("utf-8", "gbk", $_POST['intertime']); $data['linkman'] = iconv("utf-8", "gbk", $_POST['linkman']); $data['linktel'] = iconv("utf-8", "gbk", $_POST['linktel']); $data['jobname'] = iconv("utf-8", "gbk", $_POST['jobname']); $data['jobid'] = iconv("utf-8", "gbk", $_POST['jobid']); $info['jobname'] = iconv("utf-8", "gbk", $_POST['jobname']); $info['username'] = iconv("utf-8", "gbk", $_POST['username']); $info['content'] = $data['content']; $p_uid = $_POST['uid']; $black = $this->MODEL()->DB_select_once("blacklist", "`p_uid`='" . $p_uid . "' and `c_uid`='" . $this->uid . "'"); if (!empty($black)) { $arr['status'] = 8; echo json_encode($arr); die; } $black = $this->MODEL()->DB_select_once("blacklist", "`c_uid`='" . $p_uid . "' and `p_uid`='" . $this->uid . "'"); if (!empty($black)) { $arr['status'] = 9; echo json_encode($arr); die; } if (!$this->uid || !$this->username || $_COOKIE['usertype'] != 2) { $arr['status'] = 0; echo json_encode($arr); die; } else { $umessage = $this->MODEL()->DB_select_once("userid_msg", "`uid`='" . $p_uid . "' AND `fid`='" . $this->uid . "'"); if (is_array($umessage)) { $arr['status'] = 7; } else { $com = $this->MODEL()->DB_select_once("company", "`uid`='" . $this->uid . "'", "name"); $resume = $this->MODEL()->DB_select_once("resume", "`uid`='" . $p_uid . "'", "name,def_job"); $data['fname'] = $com['name']; if ($_POST['update_yq'] == '1') { $data['default'] = 1; } else { $this->MODEL()->DB_update_all("userid_msg", "`default`='0'", "`fid`='" . $this->uid . "'"); } $row = $this->MODEL()->DB_select_once("company_statis", "`uid`='" . $this->uid . "'", "`rating`,`vip_etime`,`integral`,`invite_resume`,`rating_type`"); if ($row['rating'] == 0) { if ($row['integral'] < $this->config['integral_interview'] && $this->config['integral_interview_type'] == "2") { $arr['status'] = 5; $arr['integral'] = $row["integral"]; } else { $this->MODEL()->insert_into("userid_msg", $data); if ($this->config['integral_interview_type'] == "1") { $auto = true; } else { $auto = false; } $this->MODEL('userinfo')->company_invtal($this->uid, $this->config['integral_interview'], $auto, "邀请会员面试", true, 2, 'integral', 14); $this->msg_post($_POST['uid'], $this->uid, $info); $state_content = "我刚邀请了人才 <a href=\"" . Url('resume', array("c" => "show", "id" => $resume['def_job'])) . "\" target=\"_blank\">" . $resume['name'] . "</a> 面试。"; $this->addstate($state_content, 2); $arr['status'] = 3; $this->MODEL()->member_log("邀请了人才:" . $resume['name'], 4); } } else { if ($row['vip_etime'] > time() || $row['vip_etime'] == "0") { if ($row['rating_type'] == "1") { if ($row['invite_resume'] == 0) { if ($row['integral'] < $this->config['integral_interview'] && $this->config['integral_interview_type'] == "2") { $arr['status'] = 5; $arr['integral'] = $row['integral']; } else { $this->MODEL()->insert_into("userid_msg", $data); if ($this->config['integral_interview_type'] == "1") { $auto = true; } else { $auto = false; } $this->MODEL()->company_invtal($this->uid, $this->config['integral_interview'], $auto, "邀请会员面试", true, 2, 'integral', 14); $this->msg_post($_POST['uid'], $this->uid, $info); $state_content = "我刚邀请了人才 <a href=\"" . Url('resume', array("c" => "show", "id" => $resume['def_job'])) . "\" target=\"_blank\">" . $resume['name'] . "</a> 面试。"; $this->addstate($state_content, 2); $arr['status'] = 3; $this->MODEL()->member_log("邀请了人才:" . $resume['name'], 4); } } else { $this->MODEL()->insert_into("userid_msg", $data); $this->MODEL()->DB_update_all("company_statis", "`invite_resume`=`invite_resume`-1", "uid='" . $this->uid . "'"); $this->msg_post($_POST['uid'], $this->uid, $info); $state_content = "我刚邀请了人才 <a href=\"" . Url('resume', array("c" => "show", "id" => $resume['def_job'])) . "\" target=\"_blank\">" . $resume['name'] . "</a> 面试。"; $this->addstate($state_content, 2); $arr['status'] = 3; $this->MODEL()->member_log("邀请了人才:" . $resume['name'], 4); } } else { $this->MODEL()->insert_into("userid_msg", $data); $this->msg_post($_POST['uid'], $this->uid, $info); $state_content = "我刚邀请了人才 <a href=\"" . Url('resume', array("c" => "show", "id" => $resume['def_job'])) . "\" target=\"_blank\">" . $resume['name'] . "</a> 面试。"; $this->addstate($state_content, 2); $arr['status'] = 3; $this->MODEL()->member_log("邀请了人才:" . $resume['name'], 4); } } else { if ($row['integral'] < $this->config['integral_interview'] && $this->config['integral_interview_type'] == "2") { $arr['status'] = 5; $arr['integral'] = $row['integral']; } else { $this->MODEL()->insert_into("userid_msg", $data); if ($this->config['integral_interview_type'] == "1") { $auto = true; } else { $auto = false; } $this->MODEL()->company_invtal($this->uid, $this->config['integral_interview'], $auto, "邀请会员面试", true, 2, 'integral', 14); $this->msg_post($_POST['uid'], $this->uid, $info); $state_content = "我刚邀请了人才 <a href=\"" . Url('resume', array("c" => "show", "id" => $resume['def_job'])) . "\" target=\"_blank\">" . $resume['name'] . "</a> 面试。"; $this->addstate($state_content, 2); $arr['status'] = 3; $this->MODEL()->member_log("邀请了人才:" . $resume['name'], 4); } } } if ($arr['status'] == '3') { $title = '新面试邀请-' . $this->config['sy_webname']; $description = '面试职位:' . $data['jobname'] . '\\n面试公司:' . $data['fname'] . '\\n面试时间:' . $data['intertime'] . '\\n联系人 :' . $data['linkman'] . '\\n联系电话:' . $data['linktel'] . '\\n面试地址:' . $data['address'] . '\\n' . $data['content'] . '\\n'; $url = $this->config['sy_weburl'] . '/mobile'; $picurl = $this->config['sy_weburl'] . '/' . $this->config['sy_wxlogo']; $this->wx_message($_POST['uid'], $title, $description, $url, $picurl); } } } echo json_encode($arr); }
function SiteCity_action() { unset($_SESSION['cityid']); unset($_SESSION['three_cityid']); unset($_SESSION['cityname']); unset($_SESSION['newsite']); unset($_SESSION['host']); unset($_SESSION['did']); unset($_SESSION['hyclass']); unset($_SESSION['fz_type']); if ($_POST[cityid] == "nat") { if ($this->config['sy_indexdomain']) { $_SESSION['host'] = $this->config['sy_indexdomain']; } else { $_SESSION['host'] = $this->config['sy_weburl']; } echo $_SESSION['host']; die; } if ((int) $_POST['cityid'] > 0) { if (file_exists(PLUS_PATH . "/domain_cache.php")) { include PLUS_PATH . "/domain_cache.php"; if (is_array($site_domain)) { foreach ($site_domain as $key => $value) { if ($value['cityid'] == $_POST['cityid'] || $value['three_cityid'] == $_POST['cityid']) { $_SESSION['host'] = $value['host']; } if ($value['three_cityid'] == $_POST['cityid']) { $_SESSION['three_cityid'] = $value['three_cityid']; } } } } if ($_SESSION['host'] && "http://" . $_SESSION['host'] == $this->config['sy_weburl']) { $_SESSION[newsite] = "new"; } $_SESSION['host'] = $_SESSION['host'] != "" ? "http://" . $_SESSION['host'] : $this->config['sy_weburl']; if (!$_SESSION['three_cityid']) { $_SESSION['cityid'] = $_POST['cityid']; } $_SESSION['cityname'] = yun_iconv("utf-8", "gbk", $_POST['cityname']); echo $_SESSION['host']; die; } else { $this->ACT_layer_msg("传递了非法参数!", 8, $_SERVER['HTTP_REFERER']); } }