示例#1
0
 function index_action()
 {
     if ($_POST['submit']) {
         $upload = $this->upload_pic("../data/upload/company/", false, $this->config['com_uppic']);
         $pic = $upload->picture($_FILES['pic']);
         $this->picmsg($pic, $_SERVER['HTTP_REFERER']);
         $data['uid'] = $this->uid;
         $data['pic'] = $pic;
         $this->obj->insert_into("banner", $data);
         $this->obj->member_log("上传企业横幅");
         $this->get_integral_action($this->uid, "integral_banner", "上传企业横幅");
         $this->ACT_layer_msg("设置成功!", 9, "index.php?c=banner");
     }
     if ($_POST['update']) {
         $upload = $this->upload_pic("../data/upload/company/", false, $this->config['com_uppic']);
         $pic = $upload->picture($_FILES['pic']);
         $this->picmsg($pic, $_SERVER['HTTP_REFERER']);
         $row = $this->obj->DB_select_once("banner", "`uid`='" . $this->uid . "'");
         if (is_array($row)) {
             unlink_pic($row['pic']);
         }
         $this->obj->update_once("banner", array("pic" => $pic), array("uid" => $this->uid));
         $this->obj->member_log("编辑企业横幅");
         $this->ACT_layer_msg("设置成功!", 9, "index.php?c=banner");
     }
     $banner = $this->obj->DB_select_once("banner", "`uid`='" . $this->uid . "'");
     $this->yunset("banner", $banner);
     $this->public_action();
     $this->yunset("js_def", 2);
     $this->com_tpl("banner");
 }
示例#2
0
 function savethumb_action()
 {
     $upload_path = $this->uppath();
     $upload_path = ltrim($upload_path, '.');
     if (stripos(trim($_POST['img1']), $upload_path) === false) {
         $this->ACT_layer_msg("非法操作!", 8, $_SERVER['HTTP_REFERER']);
     }
     include LIB_PATH . "sizer.class.php";
     $sizer = new Sizer("../data/upload/company/" . date('Ymd') . '/');
     $t_name = $sizer->sizeIt();
     $company = $this->obj->DB_select_once("company", "`uid`='" . $this->uid . "'", "`logo`");
     if ($company['logo']) {
         if ($company['logo'] != './' . $this->config['sy_unit_icon']) {
             unlink_pic('.' . $company['logo']);
         }
     } else {
         $this->get_integral_action($this->uid, "integral_avatar", "上传头像");
     }
     $ref = $this->obj->update_once("company", array('logo' => str_replace("../data/upload/company/", "./data/upload/company/", $t_name[1])), array('uid' => $this->uid));
     if ($ref) {
         echo 1;
     } else {
         echo 2;
     }
 }
示例#3
0
 function savethumb_action()
 {
     $upload_path = $this->uppath();
     $upload_path = ltrim($upload_path, '.');
     if (stripos(trim($_POST['img1']), $upload_path) === false || stripos(trim($_POST['img2']), $upload_path) === false) {
         $this->ACT_layer_msg("非法操作!", 8, $_SERVER['HTTP_REFERER']);
     }
     include LIB_PATH . "sizer.class.php";
     $sizer = new Sizer("../data/upload/user/" . date('Ymd') . '/');
     $t_name = $sizer->sizeIt();
     $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'", "`photo`,`resume_photo`");
     if ($resume['photo'] != './' . $this->config['sy_member_icon']) {
         unlink_pic('.' . $resume['photo']);
     }
     if ($resume['resume_photo'] != './' . $this->config['sy_member_icon']) {
         unlink_pic('.' . $resume['resume_photo']);
     }
     if ($resume['photo'] == '') {
         $this->get_integral_action($this->uid, "integral_avatar", "上传头像");
     }
     $resume_photo = str_replace("../data/upload/user/", "./data/upload/user/", $t_name[1]);
     $photo = str_replace("../data/upload/user/", "./data/upload/user/", $t_name[2]);
     $ref = $this->obj->update_once("resume", array('resume_photo' => $resume_photo, 'photo' => $photo), array('uid' => $this->uid));
     $this->obj->DB_update_all("resume_expect", "`photo`='" . $photo . "'", "`uid`='" . $this->uid . "'");
     if ($ref) {
         $this->obj->member_log("上传头像");
         echo 1;
     } else {
         echo 2;
     }
 }
示例#4
0
 function del_action()
 {
     $del = (int) $_GET['id'];
     $show = $this->obj->DB_select_all("resume_show", "`eid`='" . $del . "' and `picurl`<>''", "`picurl`");
     if (is_array($show)) {
         foreach ($show as $v) {
             unlink_pic("." . $show['picurl']);
         }
     }
     $del_array = array("resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "resume_show", "down_resume", "userid_job");
     if ($this->obj->DB_delete_all("resume_expect", "`id`='" . $del . "' and `uid`='" . $this->uid . "'")) {
         foreach ($del_array as $v) {
             $this->obj->DB_delete_all($v, "`eid`='" . $del . "'' and `uid`='" . $this->uid . "'", "");
         }
         $def_id = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "' and `def_job`='" . $del . "'");
         if (is_array($def_id)) {
             $row = $this->obj->DB_select_once("resume_expect", "`uid`='" . $this->uid . "'");
             $this->obj->update_once('resume', array('def_job' => $row['id']), array('uid' => $this->uid));
         }
         $this->obj->DB_update_all('member_statis', "`resume_num`=`resume_num`-1", "`uid`='" . $this->uid . "'");
         $this->layer_msg('删除成功!', 9, 0, "index.php?c=resume");
     } else {
         $this->layer_msg('删除失败!', 8, 0, "index.php?c=resume");
     }
 }
示例#5
0
 function save_action()
 {
     $this->comtpl_sava_action($_POST['url']);
     unset($_POST['msgconfig']);
     if ($_POST['id']) {
         if (is_uploaded_file($_FILES['pic']['tmp_name'])) {
             $upload = $this->upload_pic("../data/upload/company/");
             $pictures = $upload->picture($_FILES['pic']);
             $s_thumb = $upload->makeThumb($pictures, 120, 120, '_S_');
             $_POST['pic'] = str_replace("../data/upload/company", "data/upload/company", $s_thumb);
             unlink_pic($pictures);
         }
         $id = $this->obj->update_once("company_tpl", $_POST, array("id" => $_POST['id']));
         $msg = "企业模板(ID:" . $_POST['id'] . ")更新";
     } else {
         $_POST['pic'] = "";
         if (!is_uploaded_file($_FILES['pic']['tmp_name'])) {
             $this->ACT_layer_msg("请上传缩略图!", 8, "index.php?m=comtpl&c=add");
         } else {
             $upload = $this->upload_pic("../data/upload/company/");
             $pictures = $upload->picture($_FILES['pic']);
             $s_thumb = $upload->makeThumb($pictures, 120, 120, '_S_');
             $_POST['pic'] = str_replace("../data/upload/company", "data/upload/company", $s_thumb);
             unlink_pic($pictures);
         }
         $id = $this->obj->insert_into("company_tpl", $_POST);
         $msg = "企业模板(ID:" . $id . ")添加";
     }
     $id ? $this->ACT_layer_msg($msg . "成功!", 9, "index.php?m=comtpl", 2, 1) : $this->ACT_layer_msg($msg . "失败!", 8, "index.php?m=comtpl");
 }
示例#6
0
 function logo_reset($name, $value)
 {
     $logo = $this->obj->DB_select_once("admin_config", "`name`='{$name}'");
     if (is_array($logo)) {
         unlink_pic("../" . $logo['config']);
         $this->obj->DB_update_all("admin_config", "`config`='{$value}'", "`name`='{$name}'");
     } else {
         $this->obj->DB_insert_once("admin_config", "`config`='{$value}',`name`='{$name}'");
     }
 }
示例#7
0
 function save_action()
 {
     if ($_POST['moblie']) {
         $row = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and `check`='" . $_POST['moblie'] . "'");
         if (!empty($row)) {
             if ($row['check2'] != $_POST['code']) {
                 echo 3;
                 die;
             }
             $this->obj->DB_update_all("resume", "`moblie_status`='0'", "`telphone`='" . $row['check'] . "'");
             $this->obj->DB_update_all("company", "`moblie_status`='0'", "`linktel`='" . $row['check'] . "'");
             $this->obj->DB_update_all("member", "`moblie`='" . $row['check'] . "'", "`uid`='" . $this->uid . "'");
             $this->obj->DB_update_all("resume", "`telphone`='" . $row['check'] . "',`moblie_status`='1'", "`uid`='" . $this->uid . "'");
             $this->obj->DB_update_all("company_cert", "`status`='1'", "`uid`='" . $this->uid . "' and `check2`='" . $_POST['code'] . "'");
             $this->obj->member_log("手机绑定");
             $pay = $this->obj->DB_select_once("company_pay", "`pay_remark`='手机绑定' and `com_id`='" . $this->uid . "'");
             if (empty($pay)) {
                 $this->get_integral_action($this->uid, "integral_mobliecert", "手机绑定");
             }
             echo 1;
             die;
         } else {
             echo 2;
             die;
         }
     }
     if ($_POST['upfile']) {
         $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'", "idcard_pic");
         unlink_pic($resume['idcard_pic']);
         $upload = $this->upload_pic("../data/upload/user/", false, $this->config['user_pickb']);
         $pictures = $upload->picture($_FILES['pic']);
         $this->picmsg($pictures, $_SERVER['HTTP_REFERER']);
         if ($this->config['user_idcard_status'] == "1") {
             $status = '0';
         } else {
             $status = '1';
             $this->obj->DB_update_all('friend_info', "`iscert`='" . $status . "'", "`uid`='" . $this->uid . "'");
         }
         if ($resume['idcard_status'] != "1") {
             $this->get_integral_action($this->uid, "integral_identity", "身份认证");
         }
         $id = $this->obj->DB_update_all('resume', "`idcard_pic`='" . $pictures . "',`idcard`='" . $_POST['idcard'] . "',`idcard_status`='" . $status . "',`cert_time`='" . time() . "'", "`uid`='" . $this->uid . "'");
         $this->obj->DB_update_all('resume_expect', "`idcard_status`='" . $status . "'", "`uid`='" . $this->uid . "'");
         if ($id) {
             $this->obj->member_log("上传身份验证图片");
             $this->ACT_layer_msg("上传成功", 9, 1);
         } else {
             $this->ACT_layer_msg("上传失败", 8, 1);
         }
     }
 }
示例#8
0
 function delupload_action()
 {
     if (!$this->uid || !$this->username || $_COOKIE['usertype'] != 2) {
         echo 0;
         die;
     } else {
         $dir = $_POST[str][0];
         $isuser = $this->obj->DB_select_once("company_show", "`picurl`='{$dir}'");
         if ($isuser['uid'] == $this->uid) {
             echo unlink_pic("." . $dir);
         } else {
             echo 0;
             die;
         }
     }
 }
示例#9
0
 function index_action()
 {
     @header("Expires: 0");
     @header("Cache-Control: private, post-check=0, pre-check=0, max-age=0", FALSE);
     @header("Pragma: no-cache");
     $type = isset($_GET['type']) ? trim($_GET['type']) : 'small';
     $pic_id = trim($_GET['photoId']);
     $nameArr = @explode(".", $pic_id);
     $uptypes = array('jpg', 'png', 'jpeg', 'bmp', 'gif');
     if (count($nameArr) != 2) {
         exit;
     }
     if (!is_numeric($nameArr[0])) {
         exit;
     }
     if (!in_array(strtolower($nameArr[1]), $uptypes)) {
         $d['statusText'] = iconv("gbk", "utf-8", '文件类型不符!');
         $msg = json_encode($d);
         echo $msg;
         die;
     }
     $new_avatar_path = 'upload/user/user_' . $type . '/' . $pic_id;
     $len = file_put_contents(APP_PATH . $new_avatar_path, file_get_contents("php://input"));
     $avtar_img = imagecreatefromjpeg(APP_PATH . $new_avatar_path);
     imagejpeg($avtar_img, APP_PATH . $new_avatar_path, 80);
     $d['data']['urls'][0] = "../" . $new_avatar_path;
     $d['status'] = 1;
     $d['statusText'] = iconv("gbk", "utf-8", '上传成功!');
     $resume = $this->obj->DB_select_once("resume", "`uid`='" . $this->uid . "'", "`photo`,`resume_photo`");
     if ($type == "small") {
         if ($resume['photo'] != "") {
             unlink_pic('.' . $resume['photo']);
         } else {
             $this->get_integral_action($this->uid, "integral_avatar", "上传头像");
         }
         $this->obj->update_once('resume', array('photo' => './' . $new_avatar_path), array('uid' => $this->uid));
     } else {
         $this->obj->update_once('resume', array('resume_photo' => './' . $new_avatar_path), array('uid' => $this->uid));
         unlink_pic('.' . $resume['resume_photo']);
         $this->obj->member_log("上传个人头像");
     }
     $msg = json_encode($d);
     echo $msg;
 }
示例#10
0
 function save_action()
 {
     if ($_POST["msgconfig"]) {
         unset($_POST["msgconfig"]);
         unset($_POST["pytoken"]);
         if (is_uploaded_file($_FILES['sy_wx_logo']['tmp_name'])) {
             $upload = $this->upload_pic("../data/logo/");
             $pictures = $upload->picture($_FILES['sy_wx_logo']);
             $pic = str_replace("../data/logo", "data/logo", $pictures);
             $logo = $this->obj->DB_select_once("admin_config", "`name`='sy_wx_logo'");
             if (is_array($logo)) {
                 unlink_pic("../" . $logo['config']);
                 $this->obj->DB_update_all("admin_config", "`config`='" . $pic . "'", "`name`='sy_wx_logo'");
             } else {
                 $this->obj->DB_insert_once("admin_config", "`config`='" . $pic . "',`name`='sy_wx_logo'");
             }
         }
         if (is_uploaded_file($_FILES['sy_wx_qcode']['tmp_name'])) {
             $upload = $this->upload_pic("../data/logo/");
             $pictures = $upload->picture($_FILES['sy_wx_qcode']);
             $pic = str_replace("../data/logo", "data/logo", $pictures);
             $logo = $this->obj->DB_select_once("admin_config", "`name`='sy_wx_qcode'");
             if (is_array($logo)) {
                 unlink_pic("../" . $logo['config']);
                 $this->obj->DB_update_all("admin_config", "`config`='" . $pic . "'", "`name`='sy_wx_qcode'");
             } else {
                 $this->obj->DB_insert_once("admin_config", "`config`='" . $pic . "',`name`='sy_wx_qcode'");
             }
         }
         foreach ($_POST as $key => $v) {
             $config = $this->obj->DB_select_num("admin_config", "`name`='{$key}'");
             if ($config == false) {
                 $this->obj->DB_insert_once("admin_config", "`name`='{$key}',`config`='" . $v . "'");
             } else {
                 $this->obj->DB_update_all("admin_config", "`config`='" . $v . "'", "`name`='{$key}'");
             }
         }
         $this->web_config();
         $this->ACT_layer_msg("微信配置更新成功!", 9, $_SERVER['HTTP_REFERER'], 2, 1);
     }
 }
示例#11
0
 function del_action()
 {
     if ($_GET['del']) {
         $this->check_token();
         $del = $_GET['del'];
         $layer_type = 0;
     } else {
         if (isset($_POST['del']) && is_array($_POST['del'])) {
             $del = @implode(",", $_POST['del']);
             $layer_type = 1;
         }
     }
     $row = $this->obj->DB_select_all("toolbox_class", "`id` in (" . $del . ") and `pic`<>''");
     if (is_array($row)) {
         foreach ($row as $v) {
             unlink_pic("../" . $v['pic']);
         }
     }
     $delid = $this->obj->DB_delete_all("toolbox_class", "`id` in ({$del})", "");
     $this->obj->DB_delete_all("toolbox_doc", "`cid` in ({$del})", "");
     $delid ? $this->layer_msg('HR类别(ID:' . $del . ')删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']) : $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']);
 }
示例#12
0
 function add_action()
 {
     if ($_POST['submit']) {
         if (is_uploaded_file($_FILES['pic']['tmp_name'])) {
             $upload = $this->upload_pic("../data/upload/reward/");
             $pictures = $upload->picture($_FILES['pic']);
             $pic = str_replace("../", "", $pictures);
             $value .= "`pic`='" . $pic . "',";
             if ($_POST['id']) {
                 $row = $this->obj->DB_select_once("reward", "`id`='" . $_POST['id'] . "'");
                 unlink_pic("../" . $row['pic']);
             }
         }
         $value .= "`name`='" . $_POST['name'] . "',";
         $value .= "`nid`='" . $_POST['nid'] . "',";
         $value .= "`integral`='" . $_POST['integral'] . "',";
         $value .= "`restriction`='" . $_POST['restriction'] . "',";
         $value .= "`stock`='" . $_POST['stock'] . "',";
         $value .= "`sort`='" . $_POST['sort'] . "',";
         $content = str_replace("&amp;", "&", html_entity_decode($_POST['content'], ENT_QUOTES, "GB2312"));
         $value .= "`content`='" . $content . "',";
         $value .= "`status`='" . $_POST['status'] . "',";
         $value .= "`sdate`='" . mktime() . "'";
         if ($_POST['id']) {
             $nbid = $this->obj->DB_update_all("reward", $value, "`id`='" . $_POST['id'] . "'");
             isset($nbid) ? $this->ACT_layer_msg("奖品(ID:" . $_POST['id'] . ")更新成功!", 9, "index.php?m=reward", 2, 1) : $this->ACT_layer_msg("更新失败!", 8, "index.php?m=reward");
         } else {
             $nbid = $this->obj->DB_insert_once("reward", $value);
             isset($nbid) ? $this->ACT_layer_msg("奖品(ID:" . $nbid . ")添加成功!", 9, "index.php?m=reward", 2, 1) : $this->ACT_layer_msg("添加失败!", 8, "index.php?m=reward");
         }
     }
     if ($_GET['id']) {
         $info = $this->obj->DB_select_once("reward", "`id`='" . $_GET['id'] . "'");
         $this->yunset("info", $info);
     }
     $class = $this->obj->DB_select_all("reward_class");
     $this->yunset("class", $class);
     $this->yuntpl(array('admin/admin_reward_add'));
 }
示例#13
0
 function delnews_action()
 {
     $this->check_token();
     if ($_GET['del']) {
         $del = $_GET['del'];
         if (is_array($del)) {
             $rows = $this->obj->DB_select_all("news_base", "`id` in(" . @implode(',', $del) . ")");
             foreach ($rows as $v) {
                 unlink_pic('../' . $v['newsphoto']);
                 unlink_pic('../' . $v['s_thumb']);
             }
             $this->obj->DB_delete_all("news_base", "`id` in(" . @implode(',', $del) . ")", "");
             $this->obj->DB_delete_all("news_content", "`nbid` in(" . @implode(',', $del) . ")", "");
             $this->layer_msg('新闻(ID:' . @implode(',', $del) . ')删除成功!', 9, 1, $_SERVER['HTTP_REFERER']);
         } else {
             $this->layer_msg('请选择您要删除的新闻!', 8, 1, $_SERVER['HTTP_REFERER']);
         }
     }
     if (isset($_GET['id'])) {
         $where = "`id`='" . $_GET['id'] . "'";
         $info = $this->obj->DB_select_once("news_base", $where);
         if ($info['newsphoto']) {
             unlink_pic('../' . $_POST['newsphoto']);
             unlink_pic('../' . $_POST['s_thumb']);
         }
         $result = $this->obj->DB_delete_all("news_base", $where);
         $nid = $this->obj->DB_delete_all("news_content", "`nbid`='" . $_GET['id'] . "'");
         isset($nid) ? $this->layer_msg('新闻(ID:' . $_GET['id'] . ')删除成功!', 9) : $this->layer_msg('删除失败!', 8);
     } else {
         $this->ACT_layer_msg("非法操作!", 8, $_SERVER['HTTP_REFERER']);
     }
 }
示例#14
0
 function save_action()
 {
     extract($_POST);
     $upload = $this->upload_pic("../data/upload/link/", "22");
     if ($link_add) {
         if (preg_match("/[^\\d-., ]/", $sorting)) {
             $this->ACT_layer_msg("请正确填写,排序是数字!", 8, $_SERVER['HTTP_REFERER']);
         } else {
             if ($sorting == "") {
                 $sorting = "0";
             }
             if ($phototype == "") {
                 $phototype = "0";
             }
             $value .= "`did`='{$did}',";
             $value .= "`link_name`='" . trim($title) . "',";
             $value .= "`link_url`='{$url}',";
             $value .= "`link_type`='{$type}',";
             $value .= "`tem_type`='{$tem_type}',";
             $value .= "`img_type`='{$phototype}',";
             $value .= "`link_sorting`='{$sorting}',";
             $value .= "`link_state`='1',";
             $value .= "`link_time`='" . mktime() . "'";
             if ($phototype == 1) {
                 $pictures = $upload->picture($_FILES['uplocadpic']);
                 $value .= ",`pic`='" . str_replace("../", "", $pictures) . "'";
             } else {
                 $value .= ",`pic`='" . $uplocadpic . "'";
             }
             $nbid = $this->obj->DB_insert_once("admin_link", $value);
             $this->get_cache();
             isset($nbid) ? $this->ACT_layer_msg("友情连接(ID:" . $nbid . ")添加成功!", 9, "index.php?m=link", 2, 1) : $this->ACT_layer_msg("添加失败!", 8, "index.php?m=link");
         }
     }
     if ($link_update) {
         $value .= "`did`='{$did}',";
         $value .= "`link_name`='" . trim($title) . "',";
         $value .= "`link_url`='{$url}',";
         $value .= "`link_type`='{$type}',";
         $value .= "`tem_type`='{$tem_type}',";
         $value .= "`img_type`='{$phototype}',";
         $value .= "`link_sorting`='{$sorting}',";
         $value .= "`link_state`='1'";
         if ($phototype == 1) {
             if ($_FILES['uplocadpic']['tmp_name'] != "") {
                 $pictures = $upload->picture($_FILES['uplocadpic']);
                 $value .= ",`pic`='" . str_replace("../", "", $pictures) . "'";
                 $row = $this->obj->DB_select_once("admin_link", "`id`='{$id}' and `pic`!=''");
                 if (is_array($row)) {
                     unlink_pic("../" . $row["pic"]);
                 }
             }
         } else {
             $value .= ",`pic`='" . $uplocadpic . "'";
         }
         $nbid = $this->obj->DB_update_all("admin_link", $value, "`id`='{$id}'");
         $lasturl = str_replace("&amp;", "&", $lasturl);
         $this->get_cache();
         isset($nbid) ? $this->ACT_layer_msg("友情连接(ID:" . $id . ")修改成功!", 9, $lasturl, 2, 1) : $this->ACT_layer_msg("修改失败!", 8, $lasturl);
     }
 }
示例#15
0
 function delresume_action()
 {
     $id = $_GET['eid'];
     $result = $this->obj->DB_delete_all("resume_expect", "`id`='" . $id . "'");
     $del_array = array("resume_cert", "resume_edu", "resume_other", "resume_project", "resume_skill", "resume_training", "resume_work", "resume_doc", "user_resume", "resume_show", "down_resume", "userid_job");
     $show = $this->obj->DB_select_all("resume_show", "`eid`='" . $id . "' and `picurl`<>''", "`picurl`");
     if (is_array($show)) {
         foreach ($show as $v) {
             unlink_pic("." . $show['picurl']);
         }
     }
     foreach ($del_array as $v) {
         $this->obj->DB_delete_all($v, "`eid`='" . $id . "'");
     }
     $this->obj->DB_update_all("member_statis", "`resume_num`=`resume_num`-1", "`uid`='" . $_GET['uid'] . "'");
     $this->obj->DB_delete_all("report", "`id`='" . $_GET['id'] . "'");
     $this->layer_msg('简历(ID:' . $id . ')删除成功!', 9, 0, $_SERVER['HTTP_REFERER']);
 }
示例#16
0
 function delhot_action()
 {
     $this->check_token();
     if (isset($_GET['id'])) {
         $hot = $this->obj->DB_select_once("hotjob", "`uid`='" . $_GET['id'] . "'");
         unlink_pic("../" . $hot['hot_pic']);
         $result = $this->obj->DB_delete_all("hotjob", "`uid`='" . $_GET['id'] . "'");
         if ($result) {
             $this->obj->DB_update_all("company", "`hottime`='',`rec`='0'", "`uid`='" . $hot['uid'] . "'");
             $this->layer_msg('名企招聘(ID:' . $_GET['id'] . ')删除成功!', 9, 0, $_SERVER['HTTP_REFERER']);
         } else {
             $this->layer_msg('删除失败!', 8, 0, $_SERVER['HTTP_REFERER']);
         }
     }
 }
示例#17
0
 function pic_action()
 {
     if ($_GET['sid']) {
         $row = $this->obj->DB_select_once("zhaopinhui_pic", "`id`='" . $_GET['sid'] . "'");
         $nbidone = $this->obj->DB_update_all("zhaopinhui_pic", "`is_themb`='0'", "`zid`='" . $row['zid'] . "'");
         $nbid = $this->obj->DB_update_all("zhaopinhui_pic", "`is_themb`='1'", "`id`='" . $_GET['sid'] . "'");
         $nbid2 = $this->obj->DB_update_all("zhaopinhui", "`pic`='" . $row['pic'] . "'", "`id`='" . $row['zid'] . "'");
         isset($nbidone) && isset($nbid) && isset($nbid2) ? $this->layer_msg("招聘会图片(ID:" . $_GET['sid'] . ")设为缩略图成功!", 9, 0, $_SERVER['HTTP_REFERER']) : $this->layer_msg("修改失败!", 8, 0, $_SERVER['HTTP_REFERER']);
     }
     if ($_GET['delid']) {
         $this->check_token();
         $row = $this->obj->DB_select_once("zhaopinhui_pic", "`id`='" . $_GET['delid'] . "'");
         if ($row['is_themb'] == 1) {
             $nbid2 = $this->obj->DB_update_all("zhaopinhui", "`pic`=''", "`id`='" . $row['zid'] . "'");
         }
         $row = $this->obj->DB_select_once("zhaopinhui_pic", "`id`='" . $_GET['delid'] . "'");
         unlink_pic(".." . $row['pic']);
         $delid = $this->obj->DB_delete_all("zhaopinhui_pic", "`id`='" . $_GET['delid'] . "'");
         $delid ? $this->layer_msg("招聘会图片(ID:" . $_GET['delid'] . ")删除成功!", 9, 0, $_SERVER['HTTP_REFERER']) : $this->layer_msg('删除失败!', 8, 0, $_SERVER['HTTP_REFERER']);
     }
 }
示例#18
0
 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;
 }
示例#19
0
 function savethumb_action()
 {
     $upload_path = $this->uppath();
     $upload_path = ltrim($upload_path, '.');
     $M = $this->MODEL('friend');
     if (stripos(trim($_POST['img1']), $upload_path) === false || stripos(trim($_POST['img2']), $upload_path) === false) {
         $this->ACT_layer_msg("非法操作!", 8, $_SERVER['HTTP_REFERER']);
     }
     include LIB_PATH . "sizer.class.php";
     $sizer = new Sizer("../data/upload/friend/" . date('Ymd') . '/');
     $t_name = $sizer->sizeIt();
     $finfo = $M->GetFriendInfo(array("uid" => $this->uid), array("field" => "`pic`,`pic_big`"));
     if ($finfo['pic'] != '../' . $this->config['sy_member_icon']) {
         unlink_pic($finfo['pic']);
     }
     if ($finfo['pic_big'] != '../' . $this->config['sy_member_icon']) {
         unlink_pic($finfo['pic_big']);
     }
     $ref = $M->SaveFriendInfo(array('pic_big' => $t_name[1], 'pic' => $t_name[1]), array('uid' => $this->uid));
     if ($ref) {
         $this->addstate("我刚更换了新头像,快来看看吧。");
         $M->member_log("更换了新头像");
         echo 1;
     } else {
         echo 2;
     }
 }
示例#20
0
 function del_action()
 {
     if (is_array($_POST['del'])) {
         $linkid = @implode(',', $_POST['del']);
         $type = 1;
     } else {
         $this->check_token();
         $linkid = $_GET['uid'];
         $type = 0;
     }
     if ($linkid == "") {
         $this->layer_msg('请选择您要删除的数据!', 8, 1, $_SERVER['HTTP_REFERER']);
     }
     $this->obj->DB_update_all("company", "`yyzz_status`='0'", "`uid` in (" . $linkid . ")");
     $this->obj->DB_update_all("friend_info", "`iscert`='0'", "`uid` in (" . $linkid . ")");
     $cert = $this->obj->DB_select_all("company_cert", "`uid` in (" . $linkid . ") and `type`='3'", "`check`");
     if (is_array($cert)) {
         foreach ($cert as $v) {
             unlink_pic("../" . $v['check']);
         }
     }
     $delid = $this->obj->DB_delete_all("company_cert", "`uid` in (" . $linkid . ")  and `type`='3'", "");
     $delid ? $this->layer_msg('企业认证(UID:' . $linkid . ')删除成功!', 9, $type, $_SERVER['HTTP_REFERER']) : $this->layer_msg('删除失败!', 8, $type, $_SERVER['HTTP_REFERER']);
 }
示例#21
0
 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;
 }
示例#22
0
 function del_action()
 {
     $this->check_token();
     if (is_array($_GET['del'])) {
         $linkid = @implode(',', $_GET['del']);
         $layer_type = 1;
     } else {
         $linkid = $_GET['id'];
         $layer_type = 0;
     }
     if ($linkid == "") {
         $this->layer_msg('请选择您要删除的数据!', 8, 1, $_SERVER['HTTP_REFERER']);
     }
     $cert = $this->obj->DB_select_all("resume", "`uid` in ({$linkid})", "`idcard_pic`");
     if (is_array($cert)) {
         foreach ($cert as $v) {
             unlink_pic($v['idcard_pic']);
         }
     }
     $del = $this->obj->DB_update_all("resume", "`idcard_pic`='',`idcard_status`='0',`cert_time`='',`statusbody`=''", "`uid` in ({$linkid})", "");
     $del ? $this->layer_msg('个人认证审核(ID:' . $linkid . ')删除成功!', 9, $layer_type, $_SERVER['HTTP_REFERER']) : $this->layer_msg('删除失败!', 8, $layer_type, $_SERVER['HTTP_REFERER']);
 }
示例#23
0
 function upshow_action()
 {
     if ($_POST['submitbtn']) {
         $time = time();
         unset($_POST['submitbtn']);
         if (!empty($_FILES['uplocadpic']['tmp_name'])) {
             $upload = $this->upload_pic("../data/upload/show/", false);
             $uplocadpic = $upload->picture($_FILES['uplocadpic']);
             $this->picmsg($uplocadpic, $_SERVER['HTTP_REFERER']);
             $uplocadpic = str_replace("../data/upload/show", "./data/upload/show", $uplocadpic);
             $row = $this->obj->DB_select_once("company_show", "`uid`='" . (int) $_POST['uid'] . "' and `id`='" . intval($_POST['id']) . "'", "`picurl`");
             if (is_array($row)) {
                 unlink_pic("." . $row['picurl']);
             }
         } else {
             $uplocadpic = $_POST['picurl'];
         }
         $nid = $this->obj->DB_update_all("company_show", "`picurl`='" . $uplocadpic . "',`title`='" . $_POST['title'] . "',`sort`='" . $_POST['showsort'] . "',`ctime`='" . $time . "'", "`uid`='" . $this->uid . "'and `id`='" . $_POST['id'] . "'");
         if ($nid) {
             $this->ACT_layer_msg("更新成功!", 9, "index.php?c=show");
         } else {
             $this->ACT_layer_msg("更新失败!", 8, "index.php?c=show");
         }
     }
 }
示例#24
0
 function del_ad_action()
 {
     $this->check_token();
     $this->public_action();
     $adver = new advertise($this->obj);
     if ($_GET['id']) {
         $ad = $this->obj->DB_select_once("ad", "`id`='" . $_GET['id'] . "'");
         if (is_array($ad)) {
             unlink_pic($ad['pic_url']);
             @unlink($ad['flash_url']);
             $this->obj->DB_delete_all("ad", "`id`='" . $_GET['id'] . "'");
         }
     }
     $adver->model_ad_arr_action();
     $this->layer_msg('广告(ID:' . $_GET['id'] . ')删除成功!', 9, 0, "index.php?m=advertise");
 }
示例#25
0
 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;
 }
示例#26
0
 function model_del_ad_action($id)
 {
     if ($id) {
         $ad = $this->obj->DB_select_once("ad", "`id`='{$id}'");
         unlink_pic($ad[pic_url]);
         @unlink($ad[flash_url]);
         $this->obj->DB_delete_all("ad", "`id`='{$id}'");
     }
     $this->model_ad_arr_action();
     $this->layer_msg('删除成功!', 9, 0, "index.php?m=advertise");
 }
示例#27
0
 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");
         }
     }
 }
示例#28
0
 function save_action()
 {
     if ($_POST['moblie']) {
         $row = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and `check`='" . $_POST['moblie'] . "'");
         if (!empty($row)) {
             if ($row['check2'] != $_POST['code']) {
                 echo 3;
                 die;
             }
             $this->obj->DB_update_all("resume", "`moblie_status`='0'", "`telphone`='" . $row['check'] . "'");
             $this->obj->DB_update_all("company", "`moblie_status`='0'", "`linktel`='" . $row['check'] . "'");
             $this->obj->DB_update_all("member", "`moblie`='" . $row['check'] . "'", "`uid`='" . $this->uid . "'");
             $this->obj->DB_update_all("company", "`linktel`='" . $row['check'] . "',`moblie_status`='1'", "`uid`='" . $this->uid . "'");
             $this->obj->DB_update_all("company_cert", "`status`='1'", "`uid`='" . $this->uid . "' and `check2`='" . $_POST['code'] . "'");
             $this->obj->member_log("手机绑定");
             $pay = $this->obj->DB_select_once("company_pay", "`pay_remark`='手机绑定' and `com_id`='" . $this->uid . "'");
             if (empty($pay)) {
                 $this->get_integral_action($this->uid, "integral_mobliecert", "手机绑定");
             }
             echo 1;
             die;
         } else {
             echo 2;
             die;
         }
     }
     if ($_POST['upfile']) {
         if (is_uploaded_file($_FILES['pic']['tmp_name'])) {
             $upload = $this->upload_pic("../data/upload/cert/", false, $this->config['com_uppic']);
             $pictures = $upload->picture($_FILES['pic']);
             $this->picmsg($pictures, $_SERVER['HTTP_REFERER']);
             if ($this->config['com_cert_status'] == "1") {
                 $sql['status'] = 0;
             } else {
                 $sql['status'] = 1;
             }
             $company_name = $_POST['company_name'];
             if (strlen(trim($company_name)) <= 0) {
                 $this->ACT_layer_msg("企业全称不能为空!", 9, 1);
                 die;
             }
             $this->obj->DB_update_all("company", "`name`='{$company_name}',`yyzz_status`='" . $sql['status'] . "'", "`uid`='" . $this->uid . "'");
             $this->obj->DB_update_all("friend_info", "iscert='" . $sql['status'] . "'", "`uid`='" . $this->uid . "'");
             $sql['step'] = 1;
             $sql['check'] = str_replace("../", "/", $pictures);
             $sql['check2'] = "0";
             $sql['ctime'] = mktime();
             $row = $this->obj->DB_select_once("company_cert", "`uid`='" . $this->uid . "' and type='3'");
             if (is_array($row)) {
                 unlink_pic("../" . $row['check']);
                 $where['uid'] = $this->uid;
                 $where['type'] = '3';
                 $this->obj->update_once("company_cert", $sql, $where);
                 $this->obj->member_log("更新营业执照");
             } else {
                 $sql['uid'] = $this->uid;
                 $sql['type'] = 3;
                 $this->obj->insert_into("company_cert", $sql);
                 $this->obj->member_log("上传营业执照");
                 if ($this->config['com_cert_status'] != "1") {
                     $this->get_integral_action($this->uid, "integral_comcert", "认证营业执照");
                 }
             }
             $this->ACT_layer_msg("上传营业执照成功!", 9, 1);
         } else {
             $this->ACT_layer_msg("请上传营业执照!", 8, 1);
         }
     }
 }
示例#29
0
 function del_action()
 {
     if (!$_POST['ids']) {
         $this->return_appadmin_msg(2, "参数出错");
     }
     $row = $this->obj->DB_select_all("admin_link", "`id` in (" . $_POST['ids'] . ") and `pic`<>''");
     if (is_array($row)) {
         foreach ($row as $v) {
             unlink_pic("../" . $v['pic']);
         }
     }
     $delid = $this->obj->DB_delete_all("admin_link", "`id` in (" . $_POST['ids'] . ")", "");
     $this->get_cache();
     $this->write_appadmin_log("友情链接(ID:" . $_POST['ids'] . ")删除成功!");
     $data['error'] = 1;
     echo json_encode($data);
     die;
 }
示例#30
0
 function examupsave_action()
 {
     $examid = (int) $_POST['examid'];
     if ($_POST['submit']) {
         $fromscore = serialize($_POST['fromscore']);
         $toscore = serialize($_POST['toscore']);
         $comment = serialize($_POST['comment']);
         $pic = trim($_POST['uplocadpic']);
         $examtitle = trim($_POST['examtitle']);
         if ($pic == '') {
             $this->ACT_layer_msg("请上传图片!", 8);
         }
         if ($examtitle == '') {
             $this->ACT_layer_msg("请填写测评名称!", 8);
         }
         if ($examid) {
             $info = $this->obj->DB_select_once("evaluate_group", "`id`='" . $examid . "'", "`pic`");
             if ($info['pic'] != $pic) {
                 unlink_pic("../" . $info['pic']);
             }
         }
         $val = "`fromscore`='" . $fromscore . "',";
         $val .= "`toscore`='" . $toscore . "',";
         $val .= "`comment`='" . $comment . "',";
         $val .= "`description`='" . trim($_POST['description']) . "',";
         $val .= "`name`='" . $examtitle . "',";
         $val .= "`pic`='" . $pic . "',";
         $val .= "`top`='" . (int) $_POST['top'] . "',";
         $val .= "`recommend`='" . (int) $_POST['recommend'] . "',";
         $val .= "`hot`='" . (int) $_POST['hot'] . "',";
         $val .= "`sort`='" . (int) $_POST['sort'] . "',";
         $val .= "`keyid`='" . (int) $_POST['selectgroup'] . "'";
         if ($examid) {
             $nid = $examid;
             $scale = $this->obj->DB_update_all("evaluate_group", $val, "`id`='" . $examid . "'");
         } else {
             $val .= ",`ctime`='" . time() . "'";
             $nid = $scale = $this->obj->DB_insert_once("evaluate_group", $val);
         }
         $scale ? $this->ACT_layer_msg("操作成功!", 9, "index.php?m=admin_evaluate&c=examup&id=" . $nid) : $this->ACT_layer_msg("操作失败!", 8, $_SERVER['HTTP_REFERER']);
     }
 }