function index_action() { $row = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'"); $this->yunset("row", $row); if ($_POST['submitBtn']) { $_POST = $this->post_trim($_POST); $is_exist_email = $this->obj->DB_select_num("member", "`uid`<>'" . $this->uid . "' and `email`='" . $_POST['email'] . "'", "`uid`"); if ($is_exist_email) { $this->ACT_layer_msg("邮箱已存在!", 2); } $is_exist_mobile = $this->obj->DB_select_once("member", "`uid`<>'" . $this->uid . "' and `moblie`='" . $_POST['telphone'] . "'", "`uid`"); if ($is_exist_mobile) { $this->ACT_layer_msg("手机已存在!", 2); } if ($_POST['name'] == "") { $this->ACT_layer_msg("姓名不能为空!", 2); } if ($_POST['sex'] == "") { $this->ACT_layer_msg("性别不能为空!", 2); } if ($_POST['living'] == "") { $this->ACT_layer_msg("现居住地不能为空!", 2); } unset($_POST['submitBtn']); delfiledir("../data/upload/tel/" . $this->uid); $where['uid'] = $this->uid; $nid = $this->obj->update_once('resume', $_POST, $where); $this->obj->update_once("resume_expect", array("edu" => $_POST['edu'], "exp" => $_POST['exp'], "uname" => $_POST['name'], "sex" => $_POST['sex'], "birthday" => $_POST['birthday']), $where); $this->obj->update_once('member', array('email' => $_POST['email'], 'moblie' => $_POST['telphone']), $where); $member_statis = $this->obj->DB_select_once("member_statis", "`uid`='" . $this->uid . "'", "`resume_num`"); if ($member_statis['resume_num'] < 1) { $url = "index.php?c=expect&add=" . $this->uid; } else { $url = $_SERVER['HTTP_REFERER']; } if ($nid) { $this->obj->member_log("修改基本信息", 7); if ($row['name'] == "" || $row['living'] == "") { $this->company_invtal($this->uid, $this->config['integral_userinfo'], true, "首次填写基本资料", true, 2, 'integral', 25); } $this->ACT_layer_msg("信息更新成功!", 9, $url); } else { $this->ACT_layer_msg("信息更新失败!", 8, $url); } } $this->public_action(); $this->city_cache(); $this->user_cache(); $this->user_tpl('info'); }
function add_action() { if ($_POST['submit']) { $num = $this->obj->DB_select_num("resume_expect", "`uid`='" . $this->uid . "'"); if ($num >= $this->config['user_number']) { $this->ACT_layer_msg("简历数量超限!", 2); } if ($_POST['name'] == "") { $this->ACT_layer_msg("请填写简历名称!", 2); } if ($_POST['hy'] == "") { $this->ACT_layer_msg("请选择从事行业!", 2); } if ($_POST['job_class'] == "") { $this->ACT_layer_msg("请选择期望职位!", 2); } if ($_POST['salary'] == "") { $this->ACT_layer_msg("请选择期望薪资!", 2); } if ($_POST['provinceid'] == "") { $this->ACT_layer_msg("请选择期望城市!", 2); } if ($_POST['report'] == "") { $this->ACT_layer_msg("请选择到岗时间!", 2); } if ($_POST['type'] == "") { $this->ACT_layer_msg("请选择工作性质!", 2); } if ($_POST['jobstatus'] == "") { $this->ACT_layer_msg("请选择求职状态!", 2); } $_POST = $this->post_trim($_POST); if ($_POST['uname'] == "") { $this->ACT_layer_msg("请填写真实姓名!", 2); } if ($_POST['sex'] == "") { $this->ACT_layer_msg("请选择性别!", 2); } if ($_POST['birthday'] == "") { $this->ACT_layer_msg("请选择出生年月!", 2); } if ($_POST['edu'] == "") { $this->ACT_layer_msg("请选择最高学历!", 2); } if ($_POST['exp'] == "") { $this->ACT_layer_msg("请选择工作经验!", 2); } if ($_POST['telphone'] == "") { $this->ACT_layer_msg("请填写联系电话!", 2); } else { $is_exist_mobile = $this->obj->DB_select_num("member", "`uid`<>'" . $this->uid . "' and `moblie`='" . $_POST['telphone'] . "'", "`uid`"); if ($is_exist_mobile) { $this->ACT_layer_msg("手机已存在!", 2); } } if ($_POST['email'] == "") { $this->ACT_layer_msg("请填写联系邮箱!", 2); } else { $is_exist_email = $this->obj->DB_select_num("member", "`uid`<>'" . $this->uid . "' and `email`='" . $_POST['email'] . "'", "`uid`"); if ($is_exist_email) { $this->ACT_layer_msg("邮箱已存在!", 2); } } if ($_POST['living'] == "") { $this->ACT_layer_msg("现居住地不能为空!", 2); } unset($_POST['submit']); delfiledir("../data/upload/tel/" . $this->uid); $where['uid'] = $this->uid; $infoDate = array("name" => $_POST['uname'], "sex" => $_POST['sex'], "birthday" => $_POST['birthday'], "edu" => $_POST['edu'], "exp" => $_POST['exp'], "telphone" => $_POST['telphone'], "email" => $_POST['email'], "living" => $_POST['living']); $this->obj->update_once('resume', $infoDate, $where); $this->obj->update_once('member', array('email' => $_POST['email'], 'moblie' => $_POST['telphone']), $where); unset($where); $where['uid'] = $this->uid; $_POST['height_status'] = "0"; if (!preg_match("/^[0-9,]+\$/", $_POST['classid'])) { unset($_POST['classid']); } $_POST['uid'] = $this->uid; $_POST['ctime'] = time(); $_POST['defaults'] = $num <= 0 ? 1 : 0; $expectDate = array("lastupdate" => time(), "height_status" => 0, "uid" => $this->uid, "defaults" => $num <= 0 ? 1 : 0, "ctime" => time(), "name" => $_POST['name'], "hy" => $_POST['hy'], "job_classid" => $_POST['job_class'], "salary" => $_POST['salary'], "provinceid" => $_POST['provinceid'], "cityid" => $_POST['citysid'], "three_cityid" => $_POST['three_cityid'], "type" => $_POST['type'], "report" => $_POST['report'], "jobstatus" => $_POST['jobstatus'], "integrity" => 55); $nid = $this->obj->insert_into("resume_expect", $expectDate); 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; $data['expect'] = '1'; $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"); } $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'", "`name`,`edu`,`exp`,`sex`,`birthday`,`idcard_status`,`status`,`r_status`"); $this->obj->update_once("resume_expect", array("edu" => $resume['edu'], "exp" => $resume['exp'], "uname" => $resume['name'], "sex" => $resume['sex'], "birthday" => $resume['birthday'], "idcard_status" => $resume['idcard_status'], "status" => $resume['status'], "r_status" => $resume['r_status'], "photo" => $resume['photo']), $where); $this->ACT_layer_msg("简历创建成功,继续完善!", 9, 'index.php?c=expect&act=success&e=' . $nid); } }
function save_action() { if ($_POST['submitbtn']) { $_POST = $this->post_trim($_POST); if ($_POST['name'] == "") { $this->ACT_layer_msg("企业全称不能为空!", 8, "index.php?c=info"); } if ($_POST['hy'] == "") { $this->ACT_layer_msg("从事行业不能为空!", 8, "index.php?c=info"); } if ($_POST['pr'] == "") { $this->ACT_layer_msg("企业性质不能为空!", 8, "index.php?c=info"); } if ($_POST['provinceid'] == "") { $this->ACT_layer_msg("所在地不能为空!", 8, "index.php?c=info"); } if ($_POST['mun'] == "") { $this->ACT_layer_msg("企业规模不能为空!", 8, "index.php?c=info"); } if ($_POST['address'] == "") { $this->ACT_layer_msg("公司地址不能为空!", 8, "index.php?c=info"); } if ($_POST['linkmail'] == "") { $this->ACT_layer_msg("联系邮件不能为空!", 8, "index.php?c=info"); } if ($_POST['linktel'] == "" && $_POST['linkphone'] == "") { $this->ACT_layer_msg("联系手机和固定电话任填一项!", 8, "index.php?c=info"); } if ($_POST['content'] == "") { $this->ACT_layer_msg("企业简介不能为空!", 8, "index.php?c=info"); } delfiledir("../data/upload/tel/" . $this->uid); unset($_POST['submitbtn']); if ($_FILES['uplocadpic']['tmp_name']) { $upload = $this->upload_pic("../data/upload/company/", false, $this->config['com_pickb']); $pictures = $upload->picture($_FILES['uplocadpic']); $this->picmsg($pictures, $_SERVER['HTTP_REFERER']); $s_thumb = $upload->makeThumb($pictures, 185, 75, '_S_'); unlink_pic($pictures); $_POST['logo'] = str_replace("../data/upload/company", "./data/upload/company", $s_thumb); $row = $this->obj->DB_select_once("company", "`uid`='" . $this->uid . "' and `logo`<>''"); if (is_array($row)) { unlink_pic("." . $row['logo']); } } if ($_FILES['firmpic']['tmp_name']) { $upload = $this->upload_pic("../data/upload/company/", false, $this->config['com_uppic']); $firmpic = $upload->picture($_FILES['firmpic']); $this->picmsg($firmpic, $_SERVER['HTTP_REFERER']); $_POST['firmpic'] = str_replace("../data/upload/company", "./data/upload/company", $firmpic); $rows = $this->obj->DB_select_once("company", "`uid`='" . $this->uid . "' and `firmpic`<>''"); if (is_array($rows)) { unlink_pic("." . $rows['firmpic']); } } $cert_email = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and `type`='1'"); if (is_array($cert_email)) { if ($cert_email['check'] != $_POST['linkmail']) { $_POST['email_status'] = "0"; $this->obj->DB_delete_all("company_cert", "`id`='" . $cert_email['id'] . "'"); } } $cert_tel = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and `type`='2'"); if (is_array($cert_tel)) { if ($cert_tel['check'] != $_POST['linktel']) { $_POST['moblie_status'] = "0"; $this->obj->DB_delete_all("company_cert", "`id`='" . $cert_tel['id'] . "'"); } } $where['uid'] = $this->uid; $_POST['content'] = strip_tags(html_entity_decode($_POST['content'], ENT_QUOTES, "GB2312"), "<br> <p> <span>"); $_POST['lastupdate'] = mktime(); $company = $this->obj->DB_select_once("company", "`uid`='" . $this->uid . "'", "`yyzz_status`,`address`,`name`"); if ($company['yyzz_status'] == '1') { unset($_POST['name']); } else { $data['com_name'] = $_POST['name']; } $nid = $this->obj->update_once("company", $_POST, $where); $data['pr'] = $_POST['pr']; $data['mun'] = $_POST['mun']; $data['com_provinceid'] = $_POST['provinceid']; $this->obj->update_once("company_job", $data, array("uid" => $this->uid)); $this->obj->update_once("member", array("email" => $_POST['linkmail'], "moblie" => $_POST['linktel']), array("uid" => $this->uid)); if ($_POST['name'] != "") { $this->obj->update_once("userid_job", array("com_name" => $_POST['name']), array("com_id" => $this->uid)); $this->obj->update_once("fav_job", array("com_name" => $_POST['name']), array("com_id" => $this->uid)); $this->obj->update_once("report", array("r_name" => $_POST['name']), array("c_uid" => $this->uid)); $this->obj->update_once("blacklist", array("com_name" => $_POST['name']), array("c_uid" => $this->uid)); $this->obj->update_once("msg", array("com_name" => $_POST['name']), array("job_uid" => $this->uid)); } if ($nid) { $this->obj->member_log("修改企业信息", 7); if ($company['name'] == "") { if ($this->config['integral_userinfo_type'] == "1") { $auto = true; } else { $auto = false; } $this->company_invtal($this->uid, $this->config['integral_userinfo'], $auto, "首次填写基本资料", true, 2, 'integral', 25); } $this->ACT_layer_msg("更新成功!", 9, "index.php?c=info"); } else { $this->ACT_layer_msg("更新失败!", 8, "index.php?c=info"); } } }
function delfiledir($delfiles) { $delfiles = stripslashes($delfiles); $delfiles = str_replace("../", "", $delfiles); $delfiles = str_replace("./", "", $delfiles); $delfiles = "../" . $delfiles; $p_delfiles = path_tidy($delfiles); if ($p_delfiles != $delfiles) { die; } if (is_file($delfiles)) { @unlink($delfiles); } else { $dh = @opendir($delfiles); while ($file = @readdir($dh)) { if ($file != "." && $file != "..") { $fullpath = $delfiles . "/" . $file; if (@is_dir($fullpath)) { delfiledir($fullpath); } else { @unlink($fullpath); } } } @closedir($dh); if (@rmdir($delfiles)) { return true; } else { return false; } } }
function info_action() { $this->rightinfo(); if ($_POST['submit']) { $_POST = $this->post_trim($_POST); if ($_POST['name'] == "") { $data['msg'] = '企业全称不能为空!'; } elseif ($_POST['hy'] == "") { $data['msg'] = '从事行业不能为空!'; } elseif ($_POST['pr'] == "") { $data['msg'] = '企业性质不能为空!'; } elseif ($_POST['provinceid'] == "") { $data['msg'] = '所在地不能为空!'; } elseif ($_POST['mun'] == "") { $data['msg'] = '企业规模不能为空!'; } else { if ($_POST['address'] == "") { $data['msg'] = '公司地址不能为空!'; } else { if ($_POST['linkphone'] == "") { $data['msg'] = '固定电话不能为空!'; } else { if ($_POST['linkmail'] == "") { $data['msg'] = '联系邮件不能为空!'; } elseif ($_POST['content'] == "") { $data['msg'] = '企业简介不能为空!'; } } } } if ($data['msg'] == '') { delfiledir("../data/upload/tel/" . $this->uid); unset($_POST['submitbtn']); $cert_email = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and `type`='1'"); if (is_array($cert_email)) { if ($cert_email['check'] != $_POST['linkmail']) { $row['cert'] = str_replace(",1", "", $row['cert']); $this->obj->DB_delete_all("company_cert", "`id`='" . $cert_email['id'] . "'"); } } $cert_tel = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and `type`='2'"); if (is_array($cert_tel)) { if ($cert_tel['check'] != $_POST['linktel']) { $row['cert'] = str_replace(",2", "", $row['cert']); $this->obj->DB_delete_all("company_cert", "`id`='" . $cert_tel['id'] . "'"); } } unset($_POST['submit']); $where['uid'] = $this->uid; $_POST['lastupdate'] = time(); $nid = $this->obj->update_once("company", $_POST, $where); if ($nid) { $data['com_name'] = $_POST['name']; $data['pr'] = $_POST['pr']; $data['mun'] = $_POST['mun']; $data['com_provinceid'] = $_POST['provinceid']; $this->obj->update_once("company_job", $data, array("uid" => $this->uid)); $this->obj->update_once("userid_job", array("com_name" => $_POST['name']), array("com_id" => $this->uid)); $this->obj->update_once("fav_job", array("com_name" => $_POST['name']), array("com_id" => $this->uid)); $this->obj->update_once("report", array("r_name" => $_POST['name']), array("c_uid" => $this->uid)); $this->obj->update_once("blacklist", array("com_name" => $_POST['name']), array("c_uid" => $this->uid)); $this->obj->update_once("msg", array("com_name" => $_POST['name']), array("job_uid" => $this->uid)); $this->member_log("修改企业资料"); $data['msg'] = '更新成功!'; } else { $data['msg'] = '更新失败!'; } } $data['url'] = 'index.php?c=info'; $this->yunset("layer", $data); } $row = $this->obj->DB_select_once("company", "`uid`='" . $this->uid . "'"); $this->yunset($this->MODEL('cache')->GetCache(array('city', 'com', 'hy'))); $this->yunset("row", $row); $this->waptpl('info'); }
function companydel_action() { if (!$_POST['uids']) { $this->return_appadmin_msg(2, "参数出错"); } $uids = $_POST['uids']; $del = @explode(",", $_POST['uids']); foreach ($del as $k => $v) { delfiledir("../data/upload/tel/" . intval($v)); } $company = $this->obj->DB_select_all("company", "`uid` in (" . $uids . ") and `logo`<>''", "logo,firmpic"); if (is_array($company)) { foreach ($company as $v) { unlink_pic("." . $v['logo']); unlink_pic("." . $v['firmpic']); } } $cert = $this->obj->DB_select_all("company_cert", "`uid` in (" . $uids . ") and `type`='3'", "check"); if (is_array($cert)) { foreach ($cert as $v) { unlink_pic("../" . $v['check']); } } $product = $this->obj->DB_select_all("company_product", "`uid` in (" . $uids . ")", "pic"); if (is_array($product)) { foreach ($product as $val) { unlink_pic("../" . $val['pic']); } } $show = $this->obj->DB_select_all("company_show", "`uid` in (" . $uids . ")", "picurl"); if (is_array($show)) { foreach ($show as $val) { unlink_pic("../" . $val['picurl']); } } $uhotjob = $this->obj->DB_select_all("hotjob", "`uid` in (" . $uids . ")", "hot_pic"); if (is_array($uhotjob)) { foreach ($uhotjob as $val) { unlink_pic("../" . $val['hot_pic']); } } $banner = $this->obj->DB_select_all("banner", "`uid` in (" . $uids . ")", "pic"); if (is_array($banner)) { foreach ($banner as $val) { unlink_pic($val['pic']); } } $friend_pic = $this->obj->DB_select_all("friend_info", "`uid` in (" . $uids . ") and `pic`!=''", "pic,pic_big"); if (is_array($friend_pic)) { foreach ($friend_pic as $val) { unlink_pic($val['pic']); unlink_pic($val['pic_big']); } } $del_array = array("member", "company", "company_job", "company_cert", "company_news", "company_order", "company_product", "company_show", "banner", "company_statis", "friend_info", "friend_state", "question", "attention", "hotjob"); foreach ($del_array as $value) { $this->obj->DB_delete_all($value, "`uid` in (" . $uids . ")", ""); } $this->obj->DB_delete_all("company_pay", "`com_id` in (" . $uids . ")", " "); $this->obj->DB_delete_all("atn", "`uid` in (" . $uids . ") or `scid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("look_resume", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("fav_job", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("userid_msg", "`fid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("userid_job", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("message", "`fa_uid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend_reply", "`fid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend", "`uid` in (" . $uids . ") or `nid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend_foot", "`uid` in (" . $uids . ") or `fid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend_message", "`uid`='" . $del . "' or `fid`='" . $del . "'", ""); $this->obj->DB_delete_all("msg", "`job_uid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("blacklist", "`c_uid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("rebates", "`job_uid` in (" . $uids . ") or `uid` in (" . $uids . ")", " "); $this->obj->DB_delete_all("report", "`p_uid` in ({$uids}) or `c_uid` in ({$uids})", ""); $this->write_appadmin_log("删除企业(UID:" . $_POST['uids'] . ")"); $data['error'] = 1; echo json_encode($data); die; }
function del_action() { $this->check_token(); if ($_GET['del']) { $del = $_GET['del']; if ($del) { if (is_array($del)) { $layer_type = 1; $uids = @implode(",", $del); foreach ($del as $k => $v) { delfiledir("../data/upload/tel/" . intval($v)); } $company = $this->obj->DB_select_all("company", "`uid` in (" . $uids . ") and `logo`!=''", "logo,firmpic"); if (is_array($company)) { foreach ($company as $v) { unlink_pic("." . $v['logo']); unlink_pic("." . $v['firmpic']); } } $cert = $this->obj->DB_select_all("company_cert", "`uid` in (" . $uids . ") and `type`='3'", "check"); if (is_array($cert)) { foreach ($cert as $v) { unlink_pic("../" . $v['check']); } } $product = $this->obj->DB_select_all("company_product", "`uid` in (" . $uids . ")", "pic"); if (is_array($product)) { foreach ($product as $val) { unlink_pic("../" . $val['pic']); } } $show = $this->obj->DB_select_all("company_show", "`uid` in (" . $uids . ")", "picurl"); if (is_array($show)) { foreach ($show as $val) { unlink_pic("../" . $val['picurl']); } } $uhotjob = $this->obj->DB_select_all("hotjob", "`uid` in (" . $uids . ")", "hot_pic"); if (is_array($uhotjob)) { foreach ($uhotjob as $val) { unlink_pic("../" . $val['hot_pic']); } } $banner = $this->obj->DB_select_all("banner", "`uid` in (" . $uids . ")", "pic"); if (is_array($banner)) { foreach ($banner as $val) { unlink_pic($val['pic']); } } $friend_pic = $this->obj->DB_select_all("friend_info", "`uid` in (" . $uids . ") and `pic`!=''", "pic,pic_big"); if (is_array($friend_pic)) { foreach ($friend_pic as $val) { unlink_pic($val['pic']); unlink_pic($val['pic_big']); } } $del_array = array("member", "company", "company_job", "company_cert", "company_news", "company_order", "company_product", "company_show", "banner", "company_statis", "friend_info", "friend_state", "question", "attention", "lt_job", "hotjob", "invoice_record", "px_zixun", "px_subject_collect"); foreach ($del_array as $value) { $this->obj->DB_delete_all($value, "`uid` in (" . $uids . ")", ""); } $this->obj->DB_delete_all("company_pay", "`com_id` in (" . $uids . ")", " "); $this->obj->DB_delete_all("atn", "`uid` in (" . $uids . ") or `scid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("look_resume", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("fav_job", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("userid_msg", "`fid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("userid_job", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("look_job", "`com_id` in (" . $uids . ")", ""); $this->obj->DB_delete_all("message", "`fa_uid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend_reply", "`fid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend", "`uid` in (" . $uids . ") or `nid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend_foot", "`uid` in (" . $uids . ") or `fid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("friend_message", "`uid`='" . $del . "' or `fid`='" . $del . "'", ""); $this->obj->DB_delete_all("msg", "`job_uid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("blacklist", "`c_uid` in (" . $uids . ")", ""); $this->obj->DB_delete_all("rebates", "`job_uid` in (" . $uids . ") or `uid` in (" . $uids . ")", " "); $this->obj->DB_delete_all("report", "`p_uid` in ({$uids}) or `c_uid` in ({$uids})", ""); } else { $layer_type = 0; $uids = $del = intval($del); $uids = $del; $friend_pic = $this->obj->DB_select_once("friend_info", "`uid`='" . $del . "' and `pic`!=''", "pic,pic_big"); if (is_array($friend_pic)) { unlink_pic($friend_pic['pic']); unlink_pic($friend_pic['pic_big']); } delfiledir("../data/upload/tel/" . $del); $company = $this->obj->DB_select_once("company", "`uid`='" . $del . "' and `logo`!=''", "logo,firmpic"); unlink_pic("." . $company['logo']); unlink_pic("." . $company['firmpic']); $cert = $this->obj->DB_select_once("company_cert", "`uid`='" . $del . "' and `type`='3'", "check"); unlink_pic("../" . $cert['check']); $product = $this->obj->DB_select_all("company_product", "`uid`='" . $del . "'", "pic"); if (is_array($product)) { foreach ($product as $v) { unlink_pic("../" . $v['pic']); } } $show = $this->obj->DB_select_all("company_show", "`uid`='" . $del . "'", "picurl"); if (is_array($show)) { foreach ($show as $v) { unlink_pic("../" . $v['picurl']); } } $uhotjob = $this->obj->DB_select_all("hotjob", "`uid`='" . $del . "'", "hot_pic"); if (is_array($uhotjob)) { foreach ($uhotjob as $val) { unlink_pic("../" . $val['hot_pic']); } } $banner = $this->obj->DB_select_once("banner", "`uid`='" . $del . "'", "pic"); unlink_pic($banner['pic']); $del_array = array("member", "company", "company_job", "company_cert", "company_news", "company_order", "company_product", "company_show", "banner", "company_statis", "friend_info", "friend_state", "question", "attention", "lt_job", "hotjob", "invoice_record", "px_zixun", "px_subject_collect"); foreach ($del_array as $value) { $this->obj->DB_delete_all($value, "`uid`='" . $del . "'", ""); } $this->obj->DB_delete_all("company_pay", "`com_id`='" . $del . "'", " "); $this->obj->DB_delete_all("atn", "`uid`='" . $del . "' or `scid`='" . $del . "'", ""); $this->obj->DB_delete_all("look_resume", "`com_id`='" . $del . "'", ""); $this->obj->DB_delete_all("look_job", "`com_id`='" . $del . "'", ""); $this->obj->DB_delete_all("fav_job", "`com_id`='" . $del . "'", ""); $this->obj->DB_delete_all("userid_msg", "`fid`='" . $del . "'", ""); $this->obj->DB_delete_all("userid_job", "`com_id`='" . $del . "'", ""); $this->obj->DB_delete_all("message", "`fa_uid`='" . $del . "'", ""); $this->obj->DB_delete_all("friend", "`uid`='" . $del . "' or `nid`='" . $del . "'", ""); $this->obj->DB_delete_all("friend_foot", "`uid`='" . $del . "' or `fid`='" . $del . "'", ""); $this->obj->DB_delete_all("friend_message", "`uid`='" . $del . "' or `fid`='" . $del . "'", ""); $this->obj->DB_delete_all("friend_reply", "`fid`='" . $del . "'", ""); $this->obj->DB_delete_all("msg", "`job_uid`='" . $del . "'", ""); $this->obj->DB_delete_all("blacklist", "`c_uid`='" . $del . "'", ""); $this->obj->DB_delete_all("rebates", "`job_uid`='" . $del . "' or `uid` ='" . $del . "'", " "); $this->obj->DB_delete_all("report", "`p_uid`='" . $del . "' or `c_uid`='" . $del . "'"); } $this->layer_msg("公司(ID:" . $uids . ")删除成功!", 9, $layer_type, $_SERVER['HTTP_REFERER']); } else { $this->layer_msg("请选择您要删除的公司!", 8, 1); } } }
function userdel_action() { if (!$_POST['uids']) { $this->return_appadmin_msg(2, "参数出错"); } $uids = $_POST['uids']; $del = @explode(",", $_POST['uids']); foreach ($del as $k => $v) { delfiledir("../data/upload/tel/" . intval($v)); } $uids = pylode(",", $del); $resume = $this->obj->DB_select_all("resume", "`uid` in ({$uids}) and `photo`<>''", "`photo`,`resume_photo`"); if (is_array($resume)) { foreach ($resume as $val) { unlink_pic("." . $val['photo']); unlink_pic("." . $val['resume_photo']); } } $friend_pic = $this->obj->DB_select_all("friend_info", "`uid` in ({$uids}) and `pic`<>''", "`pic`,`pic_big`"); if (is_array($friend_pic)) { foreach ($friend_pic as $val) { unlink_pic($val['pic']); unlink_pic($val['pic_big']); } } $del_array = array("member", "resume", "member_statis", "look_resume", "userid_msg", "userid_job", "resume_expect", "resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "friend_info", "friend_message", "friend_state", "question", "msg", "attention", "rebates", "company_msg"); foreach ($del_array as $value) { $this->obj->DB_delete_all($value, "`uid` in ({$uids})", ""); } $this->obj->DB_delete_all("atn", "`uid` in ({$uids}) or `scid` in ({$uids})", ""); $this->obj->DB_delete_all("message", "`fa_uid` in ({$uids})", ""); $this->obj->DB_delete_all("friend_reply", "`fid` in ({$uids})", ""); $this->obj->DB_delete_all("friend_foot", "`uid` in ({$uids}) or `fid` in ({$uids})", ""); $this->obj->DB_delete_all("blacklist", "`p_uid` in ({$uids})", ""); $this->obj->DB_delete_all("friend", "`uid` in ({$uids}) or `nid` in ({$uids})", ""); $this->obj->DB_delete_all("report", "`p_uid` in ({$uids}) or `c_uid` in ({$uids})", ""); $this->write_appadmin_log("删除个人用户(UID:" . $_POST['ids'] . ")"); $data['error'] = 1; echo json_encode($data); die; }
function DeleteMember($UIDS = array(), $Options = array()) { if (is_array($UIDS)) { foreach ($UIDS as $k => $v) { delfiledir("../data/data/upload/tel/" . intval($v)); } $uids = @implode(",", $UIDS); $resume = $this->DB_select_all("resume", "`uid` in ({$uids}) and `photo`<>''", "`photo`,`resume_photo`"); if (is_array($resume)) { foreach ($resume as $val) { unlink_pic("." . $val['photo']); unlink_pic("." . $val['resume_photo']); } } $friend_pic = $this->DB_select_all("friend_info", "`uid` in ({$uids}) and `pic`<>''", "`pic`,`pic_big`"); if (is_array($friend_pic)) { foreach ($friend_pic as $val) { unlink_pic($val['pic']); unlink_pic($val['pic_big']); } } $show = $this->DB_select_all("resume_show", "`uid` in ({$uids}) and `picurl`<>''", "`picurl`"); if (is_array($show)) { foreach ($show as $val) { unlink_pic("." . $val['picurl']); } } $del_array = array("member", "resume", "member_statis", "look_resume", "look_job", "resume_show", "userid_msg", "userid_job", "resume_expect", "resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "resume_show", "down_resume", "userid_job", "friend_info", "friend_message", "friend_state", "question", "msg", "attention", "rebates", "company_msg", "down_reume"); foreach ($del_array as $value) { $this->DB_delete_all($value, "`uid` in ({$uids})", ""); } $this->DB_delete_all("atn", "`uid` in ({$uids}) or `scid` in ({$uids})", ""); $this->DB_delete_all("message", "`fa_uid` in ({$uids})", ""); $this->DB_delete_all("friend_reply", "`fid` in ({$uids})", ""); $this->DB_delete_all("friend_foot", "`uid` in ({$uids}) or `fid` in ({$uids})", ""); $this->DB_delete_all("blacklist", "`p_uid` in ({$uids})", ""); $this->DB_delete_all("friend", "`uid` in ({$uids}) or `nid` in ({$uids})", ""); $this->DB_delete_all("report", "`p_uid` in ({$uids}) or `c_uid` in ({$uids})", ""); $layer_type = 1; } else { $del = intval($UIDS); $uids = intval($UIDS); delfiledir("../data/upload/tel/" . $del); $resume = $this->DB_select_once("resume", "`uid`='" . $del . "' and `photo`<>''"); if (is_array($resume)) { unlink_pic('.' . $resume['photo']); unlink_pic("." . $resume['resume_photo']); } $friend_pic = $this->DB_select_once("friend_info", "`uid`='{$del}' and `pic`<>''"); if (is_array($friend_pic)) { unlink_pic($friend_pic['pic']); unlink_pic($friend_pic['pic_big']); } $show = $this->DB_select_all("resume_show", "`uid`='" . $del . "' and `picurl`<>''", "`picurl`"); unlink_pic("." . $show['picurl']); $del_array = array("member", "resume", "member_statis", "look_resume", "look_job", "resume_show", "userid_msg", "userid_job", "resume_expect", "resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "resume_show", "down_resume", "userid_job", "friend_info", "friend_message", "friend_state", "question", "msg", "attention", "rebates", "company_msg", "down_reume"); foreach ($del_array as $value) { $this->DB_delete_all($value, "`uid`='" . $del . "'", ""); } $this->DB_delete_all("friend_foot", "`uid`='{$del}' or `fid`='{$del}'", ""); $this->DB_delete_all("atn", "`uid`='{$del}' or `scid`='{$del}'", ""); $this->DB_delete_all("message", "`fa_uid`='" . $del . "'", ""); $this->DB_delete_all("friend", "`uid`='{$del}' or `nid`='{$del}'"); $this->DB_delete_all("friend_reply", "`fid`='{$del}'", ""); $this->DB_delete_all("blacklist", "`p_uid`='{$del}'", ""); $this->DB_delete_all("report", "`p_uid`='{$del}' or `c_uid`='{$del}'"); $layer_type = 0; } return true; }
function info_action() { $this->rightinfo(); if ($_POST['submit']) { $email = $this->obj->DB_select_num("member", "`uid`<>'" . $this->uid . "' and `email`='" . $_POST['email'] . "'", "`uid`"); if ($email) { $data['msg'] = '邮箱已存在!'; } $mobile = $this->obj->DB_select_once("member", "`uid`<>'" . $this->uid . "' and `moblie`='" . $_POST['telphone'] . "'", "`uid`"); if ($mobile && $data['msg'] == "") { $data['msg'] = '手机已存在!'; } if ($_POST['name'] == "" && $data['msg'] == "") { $data['msg'] = '姓名不能为空!'; } if ($_POST['birthday'] == "" && $data['msg'] == "") { $data['msg'] = '出生年月不能为空!'; } if ($_POST['living'] == "" && $data['msg'] == "") { $data['msg'] = '现居住地不能为空!'; } if ($data['msg'] == "") { unset($_POST['submit']); delfiledir("../data/upload/tel/" . $this->uid); $where['uid'] = $this->uid; $nid = $this->obj->update_once("resume", $_POST, $where); if ($nid) { $this->obj->update_once("member", array('email' => $_POST['email'], 'moblie' => $_POST['telphone']), $where); $this->member_log("保存基本信息"); $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'"); if ($resume['name'] == "" || $resume['living'] == "") { $this->MODEL('userinfo')->company_invtal($this->uid, $this->config['integral_userinfo'], true, "首次填写基本资料", true, 2, 'integral', 25); } else { $this->obj->update_once("resume_expect", array("edu" => $_POST['edu'], "exp" => $_POST['exp'], "uname" => $_POST['name'], "sex" => $_POST['sex'], "birthday" => $_POST['birthday']), $where); } $data['msg'] = '保存成功!'; } else { $data['msg'] = '保存失败!'; } if ($_POST['eid']) { $data['url'] = "index.php?c=modify&eid=" . $_POST['eid']; } else { $data['url'] = "index.php?c=info"; } } $this->yunset("layer", $data); } $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'"); $this->yunset("resume", $resume); $this->yunset($this->MODEL('cache')->GetCache(array('user'))); $this->waptpl('info'); }
function del_action() { $this->check_token(); if ($_GET['del'] && !$_GET['send_email'] && !$_GET['send_msg']) { $del = $_GET['del']; if ($del) { if (is_array($del)) { foreach ($del as $k => $v) { delfiledir("../data/data/upload/tel/" . intval($v)); } $uids = @implode(",", $del); $resume = $this->obj->DB_select_all("resume", "`uid` in ({$uids}) and `photo`<>''", "`photo`,`resume_photo`"); if (is_array($resume)) { foreach ($resume as $val) { unlink_pic("." . $val['photo']); unlink_pic("." . $val['resume_photo']); } } $friend_pic = $this->obj->DB_select_all("friend_info", "`uid` in ({$uids}) and `pic`<>''", "`pic`,`pic_big`"); if (is_array($friend_pic)) { foreach ($friend_pic as $val) { unlink_pic($val['pic']); unlink_pic($val['pic_big']); } } $show = $this->obj->DB_select_all("resume_show", "`uid` in ({$uids}) and `picurl`<>''", "`picurl`"); if (is_array($show)) { foreach ($show as $val) { unlink_pic("." . $val['picurl']); } } $del_array = array("member", "resume", "member_statis", "look_resume", "look_job", "resume_show", "userid_msg", "userid_job", "resume_expect", "resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "resume_show", "down_resume", "userid_job", "friend_info", "friend_message", "friend_state", "question", "msg", "attention", "rebates", "company_msg", "down_reume"); foreach ($del_array as $value) { $this->obj->DB_delete_all($value, "`uid` in ({$uids})", ""); } $this->obj->DB_delete_all("atn", "`uid` in ({$uids}) or `scid` in ({$uids})", ""); $this->obj->DB_delete_all("message", "`fa_uid` in ({$uids})", ""); $this->obj->DB_delete_all("friend_reply", "`fid` in ({$uids})", ""); $this->obj->DB_delete_all("friend_foot", "`uid` in ({$uids}) or `fid` in ({$uids})", ""); $this->obj->DB_delete_all("blacklist", "`p_uid` in ({$uids})", ""); $this->obj->DB_delete_all("friend", "`uid` in ({$uids}) or `nid` in ({$uids})", ""); $this->obj->DB_delete_all("report", "`p_uid` in ({$uids}) or `c_uid` in ({$uids})", ""); $layer_type = 1; } else { $del = intval($del); $uids = intval($del); delfiledir("../data/upload/tel/" . $del); $resume = $this->obj->DB_select_once("resume", "`uid`='" . $del . "' and `photo`<>''"); if (is_array($resume)) { unlink_pic('.' . $resume['photo']); unlink_pic("." . $resume['resume_photo']); } $friend_pic = $this->obj->DB_select_once("friend_info", "`uid`='{$del}' and `pic`<>''"); if (is_array($friend_pic)) { unlink_pic($friend_pic['pic']); unlink_pic($friend_pic['pic_big']); } $show = $this->obj->DB_select_all("resume_show", "`uid`='" . $del . "' and `picurl`<>''", "`picurl`"); unlink_pic("." . $show['picurl']); $del_array = array("member", "resume", "member_statis", "look_resume", "look_job", "resume_show", "userid_msg", "userid_job", "resume_expect", "resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "resume_show", "down_resume", "userid_job", "friend_info", "friend_message", "friend_state", "question", "msg", "attention", "rebates", "company_msg", "down_reume"); foreach ($del_array as $value) { $this->obj->DB_delete_all($value, "`uid`='" . $del . "'", ""); } $this->obj->DB_delete_all("friend_foot", "`uid`='{$del}' or `fid`='{$del}'", ""); $this->obj->DB_delete_all("atn", "`uid`='{$del}' or `scid`='{$del}'", ""); $this->obj->DB_delete_all("message", "`fa_uid`='" . $del . "'", ""); $this->obj->DB_delete_all("friend", "`uid`='{$del}' or `nid`='{$del}'"); $this->obj->DB_delete_all("friend_reply", "`fid`='{$del}'", ""); $this->obj->DB_delete_all("blacklist", "`p_uid`='{$del}'", ""); $this->obj->DB_delete_all("report", "`p_uid`='{$del}' or `c_uid`='{$del}'"); $layer_type = 0; } $this->layer_msg("个人会员(ID:" . $uids . ")删除成功!", 9, $layer_type, $_SERVER['HTTP_REFERER']); } else { $this->layer_msg('请选择您要删除的会员!', 8, 0, $_SERVER['HTTP_REFERER']); } } }