function index_action() { $urlarr = array("c" => "pl", "page" => "{{page}}"); $pageurl = Url('member', $urlarr); $rows = $this->get_page("company_msg", "`cuid`='" . $this->uid . "'", $pageurl, "10"); if (is_array($rows)) { foreach ($rows as $k => $v) { $uid[] = $v['uid']; } $uid = pylode(",", $uid); $user = $this->obj->DB_select_all("resume", "`uid` in ({$uid})", "`uid`,`name`"); foreach ($rows as $k => $v) { foreach ($user as $val) { if ($v['uid'] == $val['uid']) { $rows[$k]['name'] = $val['name']; } } } } $this->yunset("rows", $rows); $com = $this->obj->DB_select_once("company", "`uid`='" . $this->uid . "'"); if ($com['pl_time'] && $com['pl_time'] > time()) { $this->yunset("pl_time", '1'); } $this->obj->update_once("company_msg", array("status" => (int) $_POST['status']), array("id" => (int) $_POST['id'])); $this->yunset("com", $com); $this->public_action(); $this->yunset("js_def", 7); $this->com_tpl('pl'); }
function index_action() { $this->yunset($this->MODEL('cache')->GetCache(array('city', 'com'))); $this->public_action(); $this->member_satic(); $urlarr = array("c" => "favorite", "page" => "{{page}}"); $StateNameList = array('0' => '等待审核', '1' => '招聘中', '2' => '已结束', '3' => '未通过'); $pageurl = Url('member', $urlarr); $rows = $this->get_page("fav_job", "`uid`='" . $this->uid . "' order by id desc", $pageurl, "20"); $fnum = $this->obj->DB_select_num("fav_job", "`uid`='" . $this->uid . "'", "`id`"); if ($rows && is_array($rows)) { foreach ($rows as $val) { $jobids[] = $val['job_id']; } $company_job = $this->obj->DB_select_all("company_job", "`id` in(" . pylode(',', $jobids) . ")", "`id`,`salary`,`provinceid`,`cityid`,`state`"); foreach ($rows as $key => $val) { $rows[$key]['statename'] = '已关闭'; foreach ($company_job as $v) { if ($val['job_id'] == $v['id']) { $rows[$key]['salary'] = $v['salary']; $rows[$key]['provinceid'] = $v['provinceid']; $rows[$key]['cityid'] = $v['cityid']; $rows[$key]['statename'] = $StateNameList[$v['state']]; } } } } $num = $this->obj->DB_select_num("fav_job", "`uid`='" . $this->uid . "'"); $this->obj->DB_update_all("member_statis", "fav_jobnum='" . $num . "'", "`uid`='" . $this->uid . "'"); $this->yunset(array("rows" => $rows, "fnum" => $fnum)); $this->yunset(); $this->user_tpl('favorite'); }
function index_action() { $this->public_action(); $urlarr["c"] = "search"; $where = "`uid`='" . $this->uid . "'"; if ($_GET['keyword']) { $where .= " and name like '%" . $_GET['keyword'] . "%'"; $urlarr['keyword'] = $_GET['keyword']; } $urlarr["page"] = "{{page}}"; $pageurl = Url('member', $urlarr); $rows = $this->get_page("company_job", $where, $pageurl, "10", "`id`,`name`,`state`,`sdate`,`edate`,`lastupdate`,`jobhits`"); if (is_array($rows) && !empty($rows)) { foreach ($rows as $v) { $jobid[] = $v['id']; } $jobrows = $this->obj->DB_select_all("userid_job", "`job_id` in (" . pylode(',', $jobid) . ")"); if (is_array($jobrows)) { foreach ($jobrows as $v) { $jobnum[$v['job_id']]++; } } } $this->company_satic(); $this->yunset("jobnum", $jobnum); $this->yunset("js_def", 3); $this->com_tpl('search'); }
function myfoot($id = "", $M) { $id = $id ? $id : $this->uid; $myfoot = $M->GetFriendFoot(array("fid" => $id), array("orderby" => "ctime desc", "limit" => "4")); $uids = array(); if (is_array($myfoot) && $myfoot) { foreach ($myfoot as $val) { $uids[] = $val['uid']; } $info = $M->GetFriendAll(array("`uid` in (" . pylode(',', $uids) . ")"), array("field" => "`uid`,`nickname`,`pic`")); if (is_array($info)) { foreach ($myfoot as $k => $v) { foreach ($info as $key => $val) { if ($v['uid'] == $val['uid']) { $myfoot[$k]['nickname'] = $val['nickname']; $myfoot[$k]['pic'] = str_replace("..", $this->config['sy_weburl'], $val['pic']); if ($myfoot[$k]['pic'] == '') { $myfoot[$k]['pic'] = $this->config['sy_friend_icon']; } } } } } } $this->yunset("myfoot", $myfoot); return $myfoot; }
function index_action() { $where .= "`uid`='" . $this->uid . "' or (`fid`='" . $this->uid . "' and `status`<>'1') order by ctime desc"; $urlarr["c"] = $_GET["c"]; $urlarr["page"] = "{{page}}"; $pageurl = Url('member', $urlarr); $rows = $this->get_page("friend_message", $where, $pageurl, "20"); if (is_array($rows)) { foreach ($rows as $v) { $uids[] = $v['uid']; $uids[] = $v['fid']; } $statis = $this->obj->DB_select_all("friend_info", "`uid` in (" . pylode(",", $uids) . ")", "uid,nickname"); foreach ($rows as $key => $value) { $rows[$key]['ctime'] = date("Y-m-d H:i", $value['ctime']); foreach ($statis as $k => $v) { if ($value['uid'] == $v['uid']) { $rows[$key]['nickname'] = $v['nickname']; } if ($value['fid'] == $v['uid']) { $rows[$key]['name'] = $v['nickname']; } } } } $this->yunset("rows", $rows); $this->public_action(); $this->obj->DB_update_all("friend_message", "`remind_status`='1'", "`fid`='" . $this->uid . "' and `remind_status`='0'"); $this->unset_remind("friend_message1", "1"); $this->user_tpl('xin'); }
function index_action() { $this->get_user(); $num = $this->obj->DB_select_num("resume_expect", "`uid`='" . $this->uid . "'"); if ($num >= $this->config['user_number'] && $_GET['e'] == '') { $this->ACT_msg("index.php?c=resume", "你的简历数已经超过系统设置的简历数了"); } $row = $this->obj->DB_select_alls("resume_expect", "resume_doc", "a.`uid`='" . $this->uid . "' and a.`id`='" . (int) $_GET['e'] . "' and a.`id`=b.eid"); $this->yunset("row", $row[0]); if ($row[0]['job_classid']) { include PLUS_PATH . "/job.cache.php"; $job_classid = @explode(",", $row[0]['job_classid']); if (is_array($job_classid)) { foreach ($job_classid as $key) { $job_classname[] = $job_name[$key]; } $this->yunset("job_classname", pylode('+', $job_classname)); } $this->yunset("job_classid", $job_classid); } $this->yunset($this->MODEL('cache')->GetCache(array('city', 'hy'))); $this->user_cache(); $this->yunset("js_def", 2); $this->user_tpl('expectq'); }
function index_action() { $where = "`name` like '%" . $_GET['keyword'] . "%'"; $urlarr = array("c" => "searchcom", "page" => "{{page}}"); $pageurl = Url('member', $urlarr); $rows = $this->get_page("company", $where, $pageurl, "10"); if (is_array($rows)) { include PLUS_PATH . "/city.cache.php"; foreach ($rows as $v) { $c_uid[] = $v['uid']; } $black = $this->obj->DB_select_all("blacklist", "`p_uid`='" . $this->uid . "' and `c_uid` in (" . pylode(",", $c_uid) . ")"); foreach ($rows as $k => $v) { $rows[$k]['provinceid'] = $city_name[$v['provinceid']]; $rows[$k]['cityid'] = $city_name[$v['cityid']]; foreach ($black as $val) { if ($v['uid'] == $val['c_uid']) { $rows[$k]['status'] = "1"; } } } } $this->yunset("rows", $rows); $this->public_action(); $this->user_tpl('searchcom'); }
function index_action() { $this->public_action(); $urlarr["c"] = "zhaopinhui"; $urlarr["page"] = "{{page}}"; $pageurl = Url('member', $urlarr); $where = "`uid`='" . $this->uid . "'"; $rows = $this->get_page("zhaopinhui_com", $where, $pageurl, "10"); if (is_array($rows)) { foreach ($rows as $key => $v) { $zphid[] = $v['zid']; } $zphrows = $this->obj->DB_select_all("zhaopinhui", "`id` in (" . pylode(',', $zphid) . ")", "`id`,`title`,`address`"); foreach ($rows as $k => $v) { foreach ($zphrows as $val) { if ($v['zid'] == $val['id']) { $rows[$k]['title'] = $val['title']; $rows[$k]['address'] = $val['address']; } } } } $this->yunset("rows", $rows); $this->yunset("js_def", 2); $this->com_tpl("zhaopinhui"); }
function index_action() { $this->public_action(); $M = $this->MODEL("redeem"); $row = $M->GetRewardClass(array('1'), array("orderby" => "id asc", "field" => "id,name")); $this->yunset("row", $row); $rows = $M->GetReward(array('status' => 1), array("field" => "id,nid,pic,name,integral,stock")); $this->yunset("rows", $rows); $lipin = $M->GetChange(array('1'), array("orderby" => "id desc", "field" => "uid,username,name,ctime,integral,gid", "limit" => "10")); if (is_array($lipin)) { foreach ($lipin as $k => $v) { foreach ($rows as $val) { if ($v['gid'] == $val['id']) { $lipin[$k]['pic'] = $val['pic']; } } $time = time() - $v['ctime']; if ($time > 86400 && $time < 604800) { $lipin[$k]['time'] = ceil($time / 86400) . "天前"; } elseif ($time > 3600 && $time < 86400) { $lipin[$k]['time'] = ceil($time / 3600) . "小时前"; } elseif ($time > 60 && $time < 3600) { $lipin[$k]['time'] = ceil($time / 60) . "分钟前"; } elseif ($time < 60) { $lipin[$k]['time'] = "刚刚"; } else { $lipin[$k]['time'] = date("Y-m-d", $v['ctime']); } $uid[] = $v['uid']; } include PLUS_PATH . "/city.cache.php"; $uid = pylode(",", $uid); $Resume = $this->MODEL('resume'); $Member = $this->MODEL('userinfo'); $city1 = $Resume->GetResumeExpectOne(array("`uid` in (" . $uid . ")"), array("field" => "uid,provinceid,cityid")); $city2 = $Member->GetUserinfoOne(array("`uid` in (" . $uid . ")"), array("usertype" => "2", "field" => "uid,provinceid,cityid")); $city = array_merge($city1, $city2); foreach ($lipin as $k => $v) { foreach ($city as $val) { if ($v['uid'] == $val['uid']) { $lipin[$k]['provinceid'] = $city_name[$val['provinceid']]; $lipin[$k]['cityid'] = $city_name[$val['cityid']]; } } } $this->yunset("lipin", $lipin); } $paihang = $M->GetReward(array("status" => "1"), array("orderby" => "`num` desc", "limit" => "3", "field" => "name,id,pic")); $this->yunset("paihang", $paihang); $this->seo("redeem"); $this->yun_tpl(array('index')); }
function del_action() { if ($_GET['id'] || $_GET['del']) { if (is_array($_GET['del'])) { $del = pylode(",", $_GET['del']); $layer_type = 1; } else { $del = (int) $_GET['id']; $layer_type = 0; } $this->obj->DB_update_all("look_resume", "`status`='1'", "`id` in (" . $del . ") and `uid`='" . $this->uid . "'"); $this->obj->member_log("删除简历浏览记录(ID:" . $del . ")"); $this->layer_msg('删除成功!', 9, $layer_type, "index.php?c=look"); } }
function del_action() { if ($_POST['del']) { $layer_type = '1'; $id = pylode(',', $_POST['del']); } else { if ($_GET['id']) { $this->check_token(); $id = $_GET['id']; $layer_type = '0'; } } $nid = $this->obj->DB_delete_all("company_rating", "`id` in(" . $id . ")", ""); $this->cache_rating(); $nid ? $this->layer_msg('企业会员等级(ID:(ID:' . $id . ')成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']) : $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']); }
function saveshow_action() { if ($_POST['submitbtn']) { $pid = pylode(',', $_POST['id']); $company_show = $this->obj->DB_select_all("company_show", "`id` in (" . $pid . ") and `uid`='" . $this->uid . "'", "`id`"); if ($company_show && is_array($company_show)) { foreach ($company_show as $val) { $title = $_POST['title_' . $val['id']]; $this->obj->update_once("company_show", array("title" => trim($title)), array("id" => (int) $val['id'])); } $this->obj->member_log("添加环境展示"); $this->ACT_layer_msg("保存成功!", 9, "index.php?c=show"); } else { $this->ACT_layer_msg("非法操作!", 3, "index.php"); } } else { $this->ACT_msg("index.php", "非法操作!"); } }
function del_action() { if ($_POST['delid'] || $_GET['id']) { if (is_array($_POST['delid'])) { $id = pylode(",", $_POST['delid']); $layer_type = '1'; } else { $id = (int) $_GET['id']; $layer_type = '0'; } $nid = $this->obj->DB_delete_all("blacklist", "`id` in (" . $id . ") and `c_uid`='" . $this->uid . "'", " "); if ($nid) { $this->obj->member_log("删除黑名单"); $this->layer_msg('删除成功!', 9, $layer_type, "index.php?c=blacklist"); } else { $this->layer_msg('删除失败!', 8, $layer_type, "index.php?c=blacklist"); } } }
function del_action() { if ($_POST['delid'] || $_GET['id']) { if ($_GET['id']) { $id = (int) $_GET['id']; $layer_type = '0'; } else { $id = pylode(",", $_POST['delid']); $layer_type = '1'; } $nid = $this->obj->DB_delete_all("down_resume", "`comid`='" . $this->uid . "' and `id` in (" . $id . ")", " "); if ($nid) { $this->obj->member_log("删除已下载简历人才", 3, 3); $this->layer_msg('删除成功!', 9, $layer_type, "index.php?c=down"); } else { $this->layer_msg('删除失败!', 8, $layer_type, "index.php?c=down"); } } }
function del_action() { if ($_POST['delid'] || $_GET['id']) { if (is_array($_POST['delid'])) { $delid = pylode(",", $_POST['delid']); $layer_type = '1'; } else { $delid = (int) $_GET['id']; $layer_type = '0'; } $nid = $this->obj->DB_update_all("look_resume", "`com_status`='1'", "`id` in (" . $delid . ") and `com_id`='" . $this->uid . "'"); if ($nid) { $this->obj->member_log("删除已浏览简历记录(ID:" . $delid . ")"); $this->layer_msg('删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']); } else { $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']); } } }
function del_action() { if ($_POST['delid'] || $_GET['id']) { if ($_GET['id']) { $id = (int) $_GET['id']; $layer_type = '0'; } else { $id = pylode(",", $_POST['delid']); $layer_type = '1'; } $nid = $this->obj->DB_delete_all("userid_msg", "`id` in (" . $id . ") and `fid`='" . $this->uid . "'", " "); if ($nid) { $this->obj->member_log("删除已邀请面试的人才", 4, 3); $this->layer_msg('删除成功!', 9, $layer_type, "index.php?c=invite"); } else { $this->layer_msg('删除失败!', 8, $layer_type, "index.php?c=invite"); } } }
function del_action() { if ($_POST['delid'] || $_GET['id']) { if (is_array($_POST['delid'])) { $delid = pylode(",", $_POST['delid']); $layer_type = '1'; } else { $delid = (int) $_GET['id']; $layer_type = '0'; } $oid = $this->obj->DB_delete_all("company_news", "`id` in (" . $delid . ") and `uid`='" . $this->uid . "'", ""); if ($oid) { $this->obj->member_log("删除企业新闻"); $this->layer_msg('删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']); } else { $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']); } } else { $this->ACT_layer_msg("请选择您要删除的新闻!", 8, $_SERVER['HTTP_REFERER']); } }
function searchcom_action() { $blacklist = $this->obj->DB_select_all("blacklist", "`c_uid`='" . $this->uid . "'", "`p_uid`"); if ($blacklist && is_array($blacklist)) { $uids = array(); foreach ($blacklist as $val) { $uids[] = $val['p_uid']; } $where = " and `uid` not in(" . pylode(',', $uids) . ")"; } $company = $this->obj->DB_select_all("company", "`name` like '%" . $this->stringfilter(trim($_POST['name'])) . "%' " . $where, "`uid`,`name`"); $html = ""; if ($company && is_array($company)) { foreach ($company as $val) { $html .= "<li class=\"cur\"><input class=\"re-company\" type=\"checkbox\" value=\"" . $val['uid'] . "\" name=\"buid[]\"><a href=\"" . Url('company', array('c' => 'show', "id" => $val['uid'])) . "\" target=\"_blank\">" . $val['name'] . "</a></li>"; } } else { $html = "暂无符合条件企业"; } echo $html; die; }
function del_action() { if ($_POST['del'] || $_GET['id']) { if (is_array($_POST['del'])) { $ids = pylode(',', $_POST['del']); $layer_type = '1'; } else { if ($_GET['id']) { $ids = (int) $_GET['id']; $layer_type = '0'; } } $nid = $this->obj->DB_delete_all("sysmsg", "`id` in(" . $ids . ") AND `fa_uid`='" . $this->uid . "'", " "); if ($nid) { $this->unset_remind("sysmsg2", '2'); $this->obj->member_log("删除系统消息"); $this->layer_msg('删除成功!', 9, $layer_type, "index.php?c=sysnews"); } else { $this->layer_msg('删除失败!', 8, $layer_type, "index.php?c=sysnews"); } } }
function index_action() { $urlarr = array("c" => "atn", "page" => "{{page}}"); $pageurl = Url('member', $urlarr); $rows = $this->get_page("atn", "`uid`='" . $this->uid . "' and `sc_usertype`='2' order by `id` desc", $pageurl, "10"); if ($rows && is_array($rows)) { foreach ($rows as $val) { $uids[] = $val['sc_uid']; } $job = $this->obj->DB_select_all("company_job", "`uid` in(" . pylode(',', $uids) . ")", "`uid`,`name`,`id`"); $company = $this->obj->DB_select_all("company", "`uid` in(" . pylode(',', $uids) . ")", "`uid`,`name`"); foreach ($job as $v) { $url = Url('job', array("c" => "comapply", "id" => $v['id'])); $jobname[$v['uid']][] = "<a href='" . $url . "'>" . $v['name'] . "</a>"; } foreach ($rows as $key => $val) { foreach ($company as $v) { if ($val['sc_uid'] == $v['uid']) { $rows[$key]['com_name'] = $v['name']; } } foreach ($jobname as $k => $v) { if ($val['sc_uid'] == $k) { $rows[$key]['jobnum'] = count($v); $i = 0; foreach ($v as $value) { if ($i < 2) { $joblist[$key][] = $value; } $i++; } $rows[$key]['jobname'] = @implode(",", $joblist[$key]); } } } } $this->yunset("rows", $rows); $this->user_tpl('atn'); }
function index_action() { $this->yunset($this->MODEL('cache')->GetCache(array('city', 'com'))); $this->public_action(); $this->member_satic(); $urlarr = array("c" => "job", "page" => "{{page}}"); $pageurl = Url('member', $urlarr); $rows = $this->get_page("userid_job", "`uid`='" . $this->uid . "' order by id desc", $pageurl, "10"); if ($rows && is_array($rows)) { foreach ($rows as $val) { $jobids[] = $val['job_id']; $EidList[] = $val['eid']; } $company_job = $this->obj->DB_select_all("company_job", "`id` in(" . pylode(',', $jobids) . ")", "`id`,`salary`,`provinceid`,`cityid`"); $ResumeList = $this->obj->DB_select_all("resume_expect", "`id` in(" . pylode(',', $EidList) . ")", "`id`,`name`"); foreach ($rows as $key => $val) { foreach ($company_job as $v) { if ($val['job_id'] == $v['id']) { $rows[$key]['salary'] = $v['salary']; $rows[$key]['provinceid'] = $v['provinceid']; $rows[$key]['cityid'] = $v['cityid']; } } foreach ($ResumeList as $v) { if ($val['eid'] == $v['id']) { $rows[$key]['resume_name'] = $v['name']; } } } } $StateList = array('', '未查看', '已查看', '等待通知', '条件不符', '无法联系'); $this->yunset("StateList", $StateList); $num = $this->obj->DB_select_num("userid_job", "`uid`='" . $this->uid . "'"); $this->obj->DB_update_all("member_statis", "sq_jobnum='" . $num . "'", "`uid`='" . $this->uid . "'"); $this->yunset("rows", $rows); $this->yunset("js_def", 3); $this->user_tpl('job'); }
function del_action() { if (is_array($_GET['delid'])) { $ids = pylode(',', $_GET['delid']); $layer_type = 1; } else { $ids = (int) $_GET['id']; $layer_type = 0; } $row = $this->obj->DB_select_all("company_product", "`id` in (" . $ids . ") and `uid`='" . $this->uid . "'", "`pic`"); if (is_array($row)) { foreach ($row as $k => $v) { unlink_pic(".." . $v['pic']); } } $oid = $this->obj->DB_delete_all("company_product", "`id` in (" . $ids . ") and `uid`='" . $this->uid . "'", ""); if ($oid) { $this->obj->member_log("删除企业产品"); $this->layer_msg('删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']); } else { $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']); } }
function set_action() { if ($_POST['status'] != '' && $_POST['type']) { if ($_POST['type'] == 'msg_dy' || $_POST['type'] == 'email_dy') { if ($this->config['sy_email_userdy'] == '2' && $_POST['type'] == 'email_dy') { $this->layer_msg('邮件订阅功能已关闭,请等待管理员开通提示!', 8, 0, "index.php?c=subscribe"); die; } else { if ($this->config['sy_msg_userdy'] == '2' && $_POST['type'] == 'msg_dy') { $this->layer_msg('短信订阅功能已关闭,请等待管理员开通提示!', 8, 0, "index.php?c=subscribe"); die; } else { $this->obj->member_log("设置订阅状态"); $nid = $this->obj->DB_update_all("resume", "`{$_POST['type']}`='" . (int) $_POST['status'] . "'", "`uid`='" . $this->uid . "'"); $nid ? $this->layer_msg('设置成功!', 9, 0, "index.php?c=subscribe") : $this->layer_msg('设置失败!', 9, 0, "index.php?c=subscribe"); } } } } if ($_POST['hyid']) { $this->obj->member_log("设置订阅行业类别"); $nid = $this->obj->DB_update_all("resume", "`hy_dy`='" . intval($_POST['hyid']) . "'", "`uid`='" . $this->uid . "'"); $nid ? $this->layer_msg('设置成功!', 9, 0, "index.php?c=subscribe") : $this->layer_msg('设置失败!', 9, 0, "index.php?c=subscribe"); } if ($_POST['unsetid']) { $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'", "hylist"); foreach ($resume['hylist'] as $v) { if ($v != $_POST['unsetid']) { $hy[] = $v; } $hyid = pylode(",", $hy); } $this->obj->member_log("设置订阅行业类别"); $nid = $this->obj->DB_update_all("resume", "`hy_dy`='" . intval($hyid) . "'", "`uid`='" . $this->uid . "'"); $nid ? $this->layer_msg('设置成功!', 9, 0, "index.php?c=subscribe") : $this->layer_msg('设置失败!', 9, 0, "index.php?c=subscribe"); } }
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 list_action() { $where = "1"; $page = $_POST['page']; $limit = $_POST['limit']; $order = $_POST['order']; $keyword = $this->stringfilter($_POST['keyword']); if ($keyword) { $where .= " and (`order_id` LIKE '%" . $keyword . "%' or `order_remark` LIKE '%" . $keyword . "%')"; } if ($_POST['status']) { if ($_POST['status'] == "4") { $where .= " and `order_state`='0'"; } else { $where .= " and `order_state` in('" . (int) $_POST['status'] . "')"; } } if ($order) { //排序 $where .= " order by " . $order; } else { $where .= " order by id desc"; } $limit = !$limit ? 10 : $limit; if ($page) { //分页 $pagenav = ($page - 1) * $limit; $where .= " limit {$pagenav},{$limit}"; } else { $where .= " limit {$limit}"; } $rows = $this->obj->DB_select_all("company_order", $where); if (!empty($rows)) { include APP_PATH . "/config/db.data.php"; foreach ($rows as $k => $v) { $uid[] = $v['uid']; $company = $this->obj->DB_select_all("company", "`uid` in (" . pylode(",", $uid) . ")", "`uid`,`name`"); $member = $this->obj->DB_select_all("member", "`uid` in (" . pylode(",", $uid) . ")", "`uid`,`username`"); foreach ($rows as $key => $val) { foreach ($member as $value) { if ($val['uid'] == $value['uid']) { $list[$k]['name'] = iconv("gbk", "UTF-8", $value['username']); } } foreach ($company as $value) { if ($val['uid'] == $value['uid']) { $list[$k]['name'] = iconv("gbk", "UTF-8", $value['name']); } } } $list[$k]['order_state'] = $v['order_state']; $list[$k]['status'] = $v['order_state']; $list[$k]['order_type'] = iconv("gbk", "UTF-8", $arr_data['pay'][$v['order_type']]); $list[$k]['id'] = $v['id']; $list[$k]['order_id'] = $v['order_id']; $list[$k]['type'] = $v['type']; $list[$k]['order_time'] = $v['order_time']; $list[$k]['order_price'] = $v['order_price']; } $data['error'] = 1; foreach ($list as $k => $v) { if (is_array($v)) { foreach ($v as $key => $val) { $list[$k][$key] = isset($val) ? $val : ''; } } else { $list[$k] = isset($v) ? $v : ''; } } $data['list'] = $list; echo json_encode($data); die; } else { $this->return_appadmin_msg(2, "没有获得信息"); } }
function del_action() { if ($_POST['delid'] || $_GET['id']) { if ($_GET['id']) { $id = (int) $_GET['id']; $layer_type = '0'; } else { $id = pylode(",", $_POST['delid']); $layer_type = '1'; } $nid = $this->obj->DB_delete_all("talent_pool", "`id` in (" . $id . ") and `cuid`='" . $this->uid . "'", " "); if ($nid) { $this->obj->member_log("删除收藏简历人才", 3, 3); $this->layer_msg('删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']); } else { $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']); } } }
function gradeshow_action() { $M = $this->MODEL('evaluate'); $FriendM = $this->MODEL('friend'); $id = (int) $_GET['id']; if ($this->uid && $this->username) { $uid = $this->uid; $info = $M->GetGradeOne(array("id" => $id, "uid" => $uid)); } else { $uid = $_COOKIE['nuid']; $info = $M->GetGradeOne(array("id" => $id, "nuid" => $uid)); } if ($info['id'] == '') { $this->ACT_msg($this->config['sy_weburl'], "非法操作!"); } $exambase = $M->GetExamBaseInfo(array('id' => $info['examid'])); $comment = $this->getComment($exambase, $info['grade']); $recom = $M->GetExamList(array('keyid!=0', 'recommend' => 1), array('limit' => '8')); $examinee = $M->GetGrade(array("examid" => $info['examid'], "`uid`<>''"), array('orderby' => 'ctime desc', 'limit' => '12')); $page_url = array("c" => $_GET['c'], "a" => $_GET['a'], "id" => $_GET['id']); $page_url['page'] = "{{page}}"; $pageurl = Url('evaluate', $page_url); $rows = $M->get_page("evaluate_leave_message", "`examid`='" . $info['examid'] . "' order by `id` desc", $pageurl, "6"); $uid = array(); foreach ($rows['rows'] as $key => $val) { if (in_array($val['uid'], $uid) == false && $val['usertype']) { $uid[] = $val['uid']; } $rows['rows'][$key]['pic'] = $this->config['sy_weburl'] . '/' . $this->config['sy_friend_icon']; } $friend = $FriendM->GetFriendAll(array("`uid` in(" . pylode(',', $uid) . ")"), array("field" => "`uid`,`pic`,`nickname`")); foreach ($rows['rows'] as $key => $val) { foreach ($friend as $v) { if ($val['uid'] == $v['uid']) { if ($v['pic']) { $rows['rows'][$key]['pic'] = $v['pic']; } $rows['rows'][$key]['name'] = $v['nickname']; } } } if ($this->uid) { $list = $M->GetGrade(array("uid" => $this->uid), array("orderby" => "`id` desc", "limit" => 8)); } else { if ($_COOKIE['nuid']) { $list = $M->GetGrade(array("nuid" => $_COOKIE['nuid']), array("orderby" => "`id` desc", "limit" => 8)); } } if (count($list) && $list) { $examid = array(); foreach ($list as $val) { $examid[] = $val['examid']; } $groups = $M->GetExamList(array("`id` in (" . pylode(',', $examid) . ")"), array("field" => "`id`,`name`")); foreach ($list as $key => $val) { foreach ($groups as $v) { if ($val['examid'] == $v['id']) { $list[$key]['name'] = $v['name']; } } } } $data['exampaper'] = $exambase['name']; $this->data = $data; $this->seo('gradeshow'); $this->yunset($rows); $this->yunset('list', $list); $this->yunset('exambase', $exambase); $this->yunset('examinee', $examinee); $this->yunset('recom', $recom); $this->yunset('comment', $comment); $this->yunset('info', $info); $this->evaluate_tpl('gradeshare'); }
function messagelist_action() { $M = $this->MODEL('friend'); $this->public_action($M); $this->myfoot($this->uid, $M); $this->seo("fri_messagelist"); $this->leftinfo_action($M, $this->uid); $page_url['c'] = $_GET['c']; $page_url['page'] = "{{page}}"; $pageurl = Url('friend', $page_url); $rows = $M->get_page("friend_message", "(`uid`='" . $this->uid . "' or `fid`='" . $this->uid . "') and `pid`='0' order by ctime desc", $pageurl, "10", '*', 'mlist'); if ($rows['total']) { if (is_array($rows['mlist']) && $rows['mlist']) { $ruid = $userinfo = array(); foreach ($rows['mlist'] as $v) { $msgid[] = $v['id']; if (in_array($v['uid'], $ruid) == false) { $ruid[] = $v['uid']; } if (in_array($v['fid'], $ruid) == false) { $ruid[] = $v['fid']; } } $msgids = pylode(',', $msgid); $reply = $M->GetMessageList(array("`pid` in (" . $msgids . ")"), array("orderby" => "`id` asc", "field" => "ctime,uid,fid,`pid`,`content`,`id`")); if (is_array($reply)) { foreach ($reply as $val) { if (in_array($val['uid'], $ruid) == false) { $ruid[] = $val['uid']; } if (in_array($val['fid'], $ruid) == false) { $ruid[] = $val['fid']; } } } $info = $M->GetFriendAll(array("`uid` in (" . pylode(',', $ruid) . ")"), array("field" => "`uid`,`nickname`,`pic`")); if ($info && is_array($info)) { foreach ($info as $val) { $userinfo[$val['uid']]['nickname'] = $val['nickname']; $val['pic'] ? $userinfo[$val['uid']]['pic'] = $val['pic'] : ($userinfo[$val['uid']]['pic'] = $this->config['sy_friend_icon']); } } if (is_array($reply)) { foreach ($reply as $k => $v) { $reply[$k]['id'] = $v['id']; $reply[$k]['u_name'] = $userinfo[$v['uid']]['nickname']; $reply[$k]['f_name'] = $userinfo[$v['fid']]['nickname']; $reply[$k]['pic'] = str_replace("..", $this->config['sy_weburl'], $userinfo[$v['uid']]['pic']); $reply[$k]['r_ctime'] = date("Y-m-d H:i:s", $v['ctime']); $reply[$k]['r_url'] = url("ask", array("c" => "friend", "uid" => $v['uid'])); } } foreach ($rows['mlist'] as $k => $v) { $rows['mlist'][$k]['fname'] = $userinfo[$v['fid']]['nickname']; $rows['mlist'][$k]['fpic'] = str_replace("..", $this->config['sy_weburl'], $userinfo[$v['fid']]['pic']); $rows['mlist'][$k]['ctime'] = date("Y-m-d H:i:s", $v['ctime']); $rows['mlist'][$k]['nickname'] = $userinfo[$v['uid']]['nickname']; $rows['mlist'][$k]['pic'] = str_replace("..", $this->config['sy_weburl'], $userinfo[$v['uid']]['pic']); if (is_array($reply)) { $num = '0'; foreach ($reply as $val) { if ($v['id'] == $val['pid']) { $rows['mlist'][$k]['reply'][] = $val; $num += 1; $rows['mlist'][$k]['num'] = $num; } } } } } } $row = $M->GetFriendInfo(array('uid' => $this->uid)); $this->himan($M); $this->yunset('rom', $row); $this->yunset($rows); $this->friend_tpl('messagelist'); }
function saveexpect_action() { if ($_POST['submit']) { $eid = (int) $_POST['eid']; unset($_POST['submit']); unset($_POST['eid']); unset($_POST['urlid']); $_POST['name'] = $this->stringfilter($_POST['name']); if (!$this->CheckRegUser($_POST['name'])) { unset($_POST['name']); } $where['id'] = $eid; $where['uid'] = $this->uid; $_POST['lastupdate'] = time(); $_POST['height_status'] = "0"; if (!preg_match("/^[0-9,]+\$/", $_POST['classid'])) { unset($_POST['classid']); } if ($eid == "") { $num = $this->obj->DB_select_num("resume_expect", "`uid`='" . $this->uid . "'"); if ($num >= $this->config['user_number']) { echo 1; die; } $_POST['uid'] = $this->uid; $_POST['ctime'] = time(); $_POST['defaults'] = $num <= 0 ? 1 : 0; $nid = $this->obj->insert_into("resume_expect", $_POST); if ($nid) { if ($num == 0) { $this->obj->update_once('resume', array('def_job' => $nid), array('uid' => $this->uid)); } $data['uid'] = $this->uid; $data['eid'] = $nid; $this->obj->insert_into("user_resume", $data); $this->obj->DB_update_all('member_statis', "`resume_num`=`resume_num`+1", "`uid`='" . $this->uid . "'"); $state_content = "发布了 <a href=\"" . Url('resume', array("c" => 'show', "id" => $nid)) . "\" target=\"_blank\">新简历</a>。"; $fdata['uid'] = $this->uid; $fdata['content'] = $state_content; $fdata['ctime'] = time(); $fdata['type'] = 2; $this->obj->insert_into("friend_state", $fdata); $this->obj->member_log("创建一份简历", 2, 1); $this->get_integral_action($this->uid, "integral_add_resume", "发布简历"); $this->warning("3"); } $eid = $nid; } else { $nid = $this->obj->update_once("resume_expect", $_POST, $where); $this->obj->member_log("修改简历", 2, 2); } $this->obj->update_once('user_resume', array('expect' => 1), array('eid' => $eid, 'uid' => $this->uid)); if ($nid) { $resume_row = $this->obj->DB_select_once("user_resume", "`eid`='" . $eid . "'"); $numresume = $this->complete($resume_row); $resume = $this->obj->DB_select_once("resume_expect", "`id`='" . $eid . "'"); $resume['numresume'] = $numresume; include PLUS_PATH . "/user.cache.php"; include PLUS_PATH . "/job.cache.php"; include PLUS_PATH . "/city.cache.php"; include PLUS_PATH . "/industry.cache.php"; $resume['report'] = $userclass_name[$resume['report']]; $resume['hy'] = $industry_name[$resume['hy']]; $resume['city'] = $city_name[$resume['provinceid']] . " " . $city_name[$resume['cityid']] . " " . $city_name[$resume['three_cityid']]; $resume['salary'] = $userclass_name[$resume['salary']]; $resume['type'] = $userclass_name[$resume['type']]; $resume['jobstatus'] = $userclass_name[$resume['jobstatus']]; if ($resume['job_classid'] != "") { $job_classid = @explode(",", $resume['job_classid']); foreach ($job_classid as $v) { $job_classname[] = $job_name[$v]; } $resume['job_classname'] = pylode(" ", $job_classname); } $resume['three_cityid'] = $city_name[$resume['three_cityid']]; if (is_array($resume)) { foreach ($resume as $k => $v) { $arr[$k] = iconv("gbk", "utf-8", $v); } } echo json_encode($arr); die; } else { echo 0; die; } } }
function save_action() { if ($_POST['submitBtn']) { $id = intval($_POST['id']); $state = intval($_POST['state']); unset($_POST['submitBtn']); unset($_POST['id']); unset($_POST['state']); $_POST['uid'] = $this->uid; $_POST['lastupdate'] = mktime(); $_POST['state'] = $this->config['com_job_status']; $_POST['description'] = str_replace(array("&", "background-color:#ffffff", "background-color:#fff", "white-space:nowrap;"), array("&", 'background-color:', 'background-color:', 'white-space:'), html_entity_decode($_POST['description'], ENT_QUOTES, "GB2312")); if ($this->config['com_job_status'] == "0") { $msg = "等待审核!"; } if ($_POST['job_post']) { $row1 = $this->obj->DB_select_once("job_class", "`id`='" . intval($_POST['job_post']) . "'", "`keyid`"); $row2 = $this->obj->DB_select_once("job_class", "`id`='" . $row1['keyid'] . "'", "`keyid`"); $_POST['job1_son'] = $row1['keyid']; $_POST['job1'] = $row2['keyid']; } if (!empty($_POST['lang'])) { $_POST['lang'] = pylode(",", $_POST['lang']); } else { $_POST['lang'] = ""; } if (!empty($_POST['welfare'])) { $_POST['welfare'] = pylode(",", $_POST['welfare']); } else { $_POST['welfare'] = ""; } if (trim($_POST['days']) && $_POST['days_type'] == '') { $sdate = time() + (int) trim($_POST['days']) * 86400; $_POST['edate'] = date('Y-m-d', $sdate); unset($_POST['days']); } else { if ($_POST['days_type']) { unset($_POST['days_type']); unset($_POST['days']); } } if ($_POST['edate']) { $_POST['edate'] = strtotime($_POST['edate']); if ($_POST['edate'] < time()) { $this->ACT_layer_msg("结束时间小于当前日期,提交失败!", 8, $_SERVER['HTTP_REFERER']); } } $satic = $this->company_satic(); $company = $this->get_user(); $_POST['com_name'] = $company['name']; $_POST['com_logo'] = $company['logo']; $_POST['com_provinceid'] = $company['provinceid']; $_POST['pr'] = $company['pr']; $_POST['mun'] = $company['mun']; $_POST['rating'] = $satic['rating']; $is_link = (int) $_POST['is_link']; $link_type = (int) $_POST['link_type']; $is_email = (int) $_POST['is_email']; $email_type = (int) $_POST['email_type']; $link_moblie = $_POST['link_moblie']; $email = $_POST['email']; $link_man = $_POST['link_man']; unset($_POST['is_email']); unset($_POST['link_moblie']); unset($_POST['email_type']); unset($_POST['link_man']); unset($_POST['email']); $where['id'] = $id; $where['uid'] = $this->uid; if (!$id || intval($_POST['jobcopy']) == $id) { $_POST['sdate'] = mktime(); $this->get_com(1, $satic); $nid = $this->obj->insert_into("company_job", $_POST); $name = "添加职位"; $type = '1'; if ($nid) { $this->obj->DB_update_all("company", "`jobtime`='" . $_POST['lastupdate'] . "'", "`uid`='" . $this->uid . "'"); $state_content = "发布了新职位 <a href=\"" . $this->config['sy_weburl'] . "/index.php?m=job&c=comapply&id={$nid}\" target=\"_blank\">" . $_POST['name'] . "</a>。"; $this->addstate($state_content, 2); } } else { $row = $this->obj->DB_select_once("company_job", "`id`='" . $id . "' and `uid`='" . $this->uid . "'", "`state`"); if ($row['state'] == '1' || $row['state'] == '2') { $this->get_com(2, $satic); } $nid = $this->obj->update_once("company_job", $_POST, $where); $name = "更新职位"; $type = '2'; if ($nid) { $this->obj->DB_update_all("company", "`jobtime`='" . $_POST['lastupdate'] . "'", "`uid`='" . $this->uid . "'"); } } if ($is_link == '1') { if ($link_type == '2') { $linkman = trim($link_man); $linktel = trim($link_moblie); } else { $linkman = $company['linkman']; $linktel = $company['linktel']; } } if ($is_email && $email_type == 2) { $linkmail = trim($email); } else { $linkmail = $company['linkmail']; } $job_link = ""; if ($is_link == "1" && $link_type == 2) { $job_link .= "`link_man`='" . $linkman . "',"; $job_link .= "`link_moblie`='" . $linktel . "',"; } $job_link .= "`email_type`='" . $email_type . "',"; $job_link .= "`is_email`='" . $is_email . "',"; $job_link .= "`email`='" . $linkmail . "'"; if ($id) { $linkid = $this->obj->DB_select_once("company_job_link", "`uid`='" . $this->uid . "' and `jobid`='" . $id . "'", "id"); if ($linkid['id']) { $this->obj->DB_update_all("company_job_link", $job_link, "`id`='" . $linkid['id'] . "'"); } else { $job_link .= ",`uid`='" . $this->uid . "',`jobid`='" . (int) $id . "'"; $this->obj->DB_insert_once("company_job_link", $job_link); } } else { if ($nid > 0) { $job_link .= ",`uid`='" . $this->uid . "',`jobid`='" . (int) $nid . "'"; $this->obj->DB_insert_once("company_job_link", $job_link); } } if ($nid) { $this->obj->member_log($name . "《" . $_POST['name'] . "》", 1, $type); $this->ACT_layer_msg($name . "成功!", 9, "index.php?c=job&w=1"); } else { $this->ACT_layer_msg($name . "失败!", 8, $_SERVER['HTTP_REFERER']); } } }