Example #1
0
function get_ad_one($val)
{
    global $db;
    $sql = "select * from " . table('ad_app') . " where id=" . intval($val) . " LIMIT 1";
    $arr = $db->getone($sql);
    $arr['starttime'] = $arr['starttime'] == "0" ? '' : convert_datefm($arr['starttime'], 1);
    $arr['deadline'] = $arr['deadline'] == "0" ? '' : convert_datefm($arr['deadline'], 1);
    return $arr;
}
Example #2
0
    }
} elseif ($act == 'pidel_syslog') {
    get_token();
    $smarty->assign('pageheader', "删除系统错误日志");
    $smarty->display('syslog/admin_syslog_del.htm');
} elseif ($act == 'pidel_syslog_del') {
    check_token();
    $l_type = $_POST['l_type'];
    if (empty($l_type)) {
        adminmsg('请选择错误类型!', 1);
    }
    $starttime = intval(convert_datefm($_POST['starttime'], 2));
    if (empty($starttime)) {
        adminmsg('请填写开始时间!', 1);
    }
    $endtime = intval(convert_datefm($_POST['endtime'], 2));
    if (empty($endtime)) {
        adminmsg('请填写结束时间!', 1);
    }
    if ($starttime > $endtime) {
        adminmsg('开始时间不能大于结束时间!', 1);
    }
    $link[0]['text'] = "返回日志列表";
    $link[0]['href'] = '?act=list';
    $link[1]['text'] = "继续删除";
    $link[1]['href'] = '?act=pidel_syslog';
    $dnum = pidel_syslog($l_type, $starttime, $endtime);
    if ($dnum > 0) {
        write_log("删除系统日志,共删除" . $dnum . "行", $_SESSION['admin_name'], 3);
        adminmsg("删除成功!共删除" . $dnum . "行", 2, $link);
    } else {
Example #3
0
 $setsqlarr['interview_ordinary'] = $_POST['interview_ordinary'];
 $setsqlarr['interview_senior'] = $_POST['interview_senior'];
 $setsqlarr['talent_pool'] = $_POST['talent_pool'];
 $setsqlarr['recommend_num'] = intval($_POST['recommend_num']);
 $setsqlarr['recommend_days'] = intval($_POST['recommend_days']);
 $setsqlarr['stick_num'] = intval($_POST['stick_num']);
 $setsqlarr['stick_days'] = intval($_POST['stick_days']);
 $setsqlarr['emergency_num'] = intval($_POST['emergency_num']);
 $setsqlarr['emergency_days'] = intval($_POST['emergency_days']);
 $setsqlarr['highlight_num'] = intval($_POST['highlight_num']);
 $setsqlarr['highlight_days'] = intval($_POST['highlight_days']);
 $setsqlarr['change_templates'] = intval($_POST['change_templates']);
 $setsqlarr['map_open'] = intval($_POST['map_open']);
 $setsqlarr['added'] = $_POST['added'];
 if ($_POST['setendtime'] != "") {
     $setendtime = convert_datefm($_POST['setendtime'], 2);
     if ($setendtime == '') {
         adminmsg('日期格式错误!', 0);
     } else {
         $setsqlarr['endtime'] = $setendtime;
     }
 } else {
     $setsqlarr['endtime'] = 0;
 }
 if ($_POST['days'] != "") {
     if (intval($_POST['days']) != 0) {
         $oldendtime = intval($_POST['oldendtime']);
         $setsqlarr['endtime'] = strtotime("" . intval($_POST['days']) . " days", $oldendtime == 0 ? time() : $oldendtime);
     }
     if (intval($_POST['days']) == "0") {
         $setsqlarr['endtime'] = 0;
Example #4
0
    $setsqlarr['display'] = intval($_POST['display']);
    $setsqlarr['order'] = intval($_POST['order']);
    $setsqlarr['introduction'] = !empty($_POST['introduction']) ? $_POST['introduction'] : adminmsg('请填写招聘会简介', 1);
    $setsqlarr['predetermined_status'] = intval($_POST['predetermined_status']);
    $setsqlarr['predetermined_web'] = intval($_POST['predetermined_web']);
    $setsqlarr['predetermined_tel'] = intval($_POST['predetermined_tel']);
    $setsqlarr['predetermined_point'] = intval($_POST['predetermined_point']);
    if ($_POST['predetermined_start'] == "") {
        $setsqlarr['predetermined_start'] = 0;
    } else {
        $setsqlarr['predetermined_start'] = intval(convert_datefm($_POST['predetermined_start'], 2));
    }
    if ($_POST['predetermined_end'] == "") {
        $setsqlarr['predetermined_end'] = 0;
    } else {
        $setsqlarr['predetermined_end'] = intval(convert_datefm($_POST['predetermined_end'], 2));
    }
    $setsqlarr['addtime'] = time();
    $link[0]['text'] = "返回列表";
    $link[0]['href'] = '?act=';
    $link[1]['text'] = "查看修改结果";
    $link[1]['href'] = "?act=jobfair_edit&id=" . $id;
    $db->updatetable(table('jobfair_exhibitors'), array('jobfair_title' => $setsqlarr['title']), " jobfairid=" . $id . "");
    write_log("修改招聘会id为" . $id . "的招聘会信息", $_SESSION['admin_name'], 3);
    !$db->updatetable(table('jobfair'), $setsqlarr, " id=" . $id . "") ? adminmsg("修改失败!", 0) : adminmsg("修改成功!", 2, $link);
} elseif ($act == 'exhibitors') {
    check_permissions($_SESSION['admin_purview'], "jobfair_exhibitors");
    require_once QISHI_ROOT_PATH . 'include/page.class.php';
    $key = isset($_GET['key']) ? trim($_GET['key']) : "";
    $key_type = isset($_GET['key_type']) ? intval($_GET['key_type']) : "";
    $oederbysql = " order BY id DESC";
Example #5
0
 $setsqlarr['uid'] = intval($_SESSION['uid']);
 $setsqlarr['trainname'] = $train_profile['trainname'];
 $setsqlarr['train_id'] = $train_profile['id'];
 $setsqlarr['course_name'] = !empty($_POST['course_name']) ? trim($_POST['course_name']) : showmsg('您没有填写课程名称!', 1);
 check_word($_CFG['filter'], $_POST['course_name']) ? showmsg($_CFG['filter_tips'], 0) : '';
 $setsqlarr['category'] = !empty($_POST['category']) ? intval($_POST['category']) : showmsg('请选择课程类别!', 1);
 $setsqlarr['category_cn'] = trim($_POST['category_cn']);
 $setsqlarr['subsite_id'] = !empty($_POST['subsite_id']) ? intval($_POST['subsite_id']) : showmsg('请选择工作地区!', 1);
 $setsqlarr['district'] = intval($_POST['district']);
 $setsqlarr['sdistrict'] = intval($_POST['sdistrict']);
 $setsqlarr['district_cn'] = empty($_POST['district_cn']) ? trim($_POST['subsite_name']) : trim($_POST['subsite_name']) . '/' . trim($_POST['district_cn']);
 $setsqlarr['classtype'] = !empty($_POST['classtype']) ? intval($_POST['classtype']) : showmsg('请选择上课班制!', 1);
 $setsqlarr['classtype_cn'] = trim($_POST['classtype_cn']);
 $setsqlarr['teacher_id'] = !empty($_POST['teacher_id']) ? intval($_POST['teacher_id']) : showmsg('请选择主讲人!', 1);
 $setsqlarr['teacher_cn'] = trim($_POST['teacher_cn']);
 $setsqlarr['starttime'] = intval(convert_datefm($_POST['starttime'], 2));
 if (empty($setsqlarr['starttime'])) {
     showmsg('请填写开课时间!时间格式:YYYY-MM-DD', 1);
 }
 $setsqlarr['train_object'] = !empty($_POST['train_object']) ? trim($_POST['train_object']) : showmsg('您没有填写授课对象!', 1);
 check_word($_CFG['filter'], $_POST['train_object']) ? showmsg($_CFG['filter_tips'], 0) : '';
 $setsqlarr['train_certificate'] = !empty($_POST['train_certificate']) ? trim($_POST['train_certificate']) : '';
 check_word($_CFG['filter'], $_POST['train_certificate']) ? showmsg($_CFG['filter_tips'], 0) : '';
 $setsqlarr['classhour'] = !empty($_POST['classhour']) ? intval($_POST['classhour']) : showmsg('您没有填写授课学时!', 1);
 $setsqlarr['train_expenses'] = !empty($_POST['train_expenses']) ? intval($_POST['train_expenses']) : showmsg('您没有填写培训费用!', 1);
 $setsqlarr['favour_expenses'] = !empty($_POST['favour_expenses']) ? intval($_POST['favour_expenses']) : showmsg('您没有填写优惠价格!', 1);
 $setsqlarr['contents'] = !empty($_POST['contents']) ? trim($_POST['contents']) : showmsg('您没有填写课程描述!', 1);
 check_word($_CFG['filter'], $_POST['contents']) ? showmsg($_CFG['filter_tips'], 0) : '';
 if ($days > 0) {
     if (intval($_POST['olddeadline']) >= time()) {
         $setsqlarr['deadline'] = intval($_POST['olddeadline']) + $days * (60 * 60 * 24);
Example #6
0
 $setsqlarr['title'] = trim($_POST['title']) ? trim($_POST['title']) : adminmsg('您没有填写标题!', 1);
 $setsqlarr['is_display'] = trim($_POST['is_display']) ? trim($_POST['is_display']) : 0;
 $setsqlarr['category_id'] = trim($_POST['category_id']) ? trim($_POST['category_id']) : adminmsg('您没有填写广告分类!', 1);
 $setsqlarr['type_id'] = trim($_POST['type_id']) ? trim($_POST['type_id']) : adminmsg('您没有填写广告类型!', 1);
 $setsqlarr['alias'] = trim($_POST['alias']) ? trim($_POST['alias']) : adminmsg('参数错误,调用ID不存在!', 1);
 $setsqlarr['show_order'] = intval($_POST['show_order']);
 $setsqlarr['note'] = trim($_POST['note']);
 if ($_POST['starttime'] == "") {
     $setsqlarr['starttime'] = 0;
 } else {
     $setsqlarr['starttime'] = intval(convert_datefm($_POST['starttime'], 2));
 }
 if ($_POST['deadline'] == "") {
     $setsqlarr['deadline'] = 0;
 } else {
     $setsqlarr['deadline'] = intval(convert_datefm($_POST['deadline'], 2));
 }
 //图片
 if ($setsqlarr['type_id'] == "2") {
     if (empty($_FILES['img_file']['name']) && empty($_POST['img_path'])) {
         adminmsg('请上传图片或者填写图片路径!', 1);
     }
     if ($_FILES['img_file']['name']) {
         $ads_updir = $ads_updir . date("Y/m/d/");
         make_dir($ads_updir);
         $setsqlarr['img_path'] = _asUpFiles($ads_updir, "img_file", 1000, 'gif/jpg/bmp/png', true);
         if (empty($setsqlarr['img_path'])) {
             adminmsg('上传文件失败!', 1);
         }
         $setsqlarr['img_path'] = $ads_dir . date("Y/m/d/") . $setsqlarr['img_path'];
     } else {
Example #7
0
 $id = intval($_POST['id']);
 $setsqlarr['t_name'] = !empty($_POST['t_name']) ? trim($_POST['t_name']) : adminmsg('请填写分类名称!', 1);
 $setsqlarr['t_starttime'] = trim($_POST['t_starttime']);
 if ($setsqlarr['t_starttime'] != "0") {
     if (!preg_match("/^[0-9]{4}(\\-)[0-9]{1,2}(\\1)[0-9]{1,2}(|\\s+[0-9]{1,2}(|:[0-9]{1,2}(|:[0-9]{1,2})))\$/", $setsqlarr['t_starttime'])) {
         adminmsg("开始时间格式错误!", 0);
     } else {
         $setsqlarr['t_starttime'] = intval(convert_datefm($_POST['t_starttime'], 2));
     }
 }
 $setsqlarr['t_endtime'] = trim($_POST['t_endtime']);
 if ($setsqlarr['t_endtime'] != "0") {
     if (!preg_match("/^[0-9]{4}(\\-)[0-9]{1,2}(\\1)[0-9]{1,2}(|\\s+[0-9]{1,2}(|:[0-9]{1,2}(|:[0-9]{1,2})))\$/", $setsqlarr['t_endtime'])) {
         adminmsg("结束时间格式错误!", 0);
     } else {
         $setsqlarr['t_endtime'] = intval(convert_datefm($_POST['t_endtime'], 2));
     }
 }
 $setsqlarr['t_repeat'] = intval($_POST['t_repeat']);
 $setsqlarr['t_effective'] = intval($_POST['t_effective']);
 $setsqlarr['t_amount'] = intval($_POST['t_amount']) > 0 ? intval($_POST['t_amount']) : adminmsg('请正确填写积分!', 1);
 $setsqlarr['t_pre'] = !empty($_POST['t_pre']) ? trim($_POST['t_pre']) : adminmsg('请填写分类前缀!', 1);
 $info = $db->getone("select * from " . table('gifts_type') . " where t_pre='{$setsqlarr['t_pre']}' LIMIT 1");
 if (!empty($info) && $info['t_id'] != $id) {
     adminmsg("分类前缀 {$setsqlarr['t_pre']} 已经存在!", 1);
 }
 $link[0]['text'] = "查看修改结果";
 $link[0]['href'] = '?act=edit_category&id=' . $id;
 $link[1]['text'] = "返回分类管理";
 $link[1]['href'] = '?act=category';
 !$db->updatetable(table('gifts_type'), $setsqlarr, " t_id=" . $id . "") ? adminmsg("修改失败!", 0) : adminmsg("修改成功!", 2, $link);
Example #8
0
    if (empty($id)) {
        adminmsg("请选择项目!", 1);
    }
    $n = del_pms_sys($id);
    if ($n) {
        write_log("删除消息,共删除 {$n} 行!", $_SESSION['admin_name'], 3);
        adminmsg("删除成功 共删除 {$n} 行!", 2);
    } else {
        adminmsg("删除失败!", 0);
    }
} elseif ($act == 'pms_edit') {
    get_token();
    $id = intval($_GET['id']);
    $sql = "select * from " . table('pms_sys') . " where spmid='{$id}' LIMIT 1";
    $pms = $db->getone($sql);
    $pms['starttime'] = convert_datefm($pms['starttime'], 1);
    $smarty->assign('pms', $pms);
    $smarty->display('pms/admin_pms_sys_edit.htm');
} elseif ($act == 'pms_editsave') {
    check_token();
    $id = intval($_POST['id']);
    $setsqlarr['spms_usertype'] = intval($_POST['spms_usertype']);
    $setsqlarr['spms_type'] = intval($_POST['spms_type']);
    $setsqlarr['message'] = trim($_POST['message']);
    $link[0]['text'] = "继续添加";
    $link[0]['href'] = '?act=add_pms_sys';
    $link[1]['text'] = "查看修改结果";
    $link[1]['href'] = "?act=pms_edit&id=" . $id;
    write_log("修改id为" . $id . "的消息", $_SESSION['admin_name'], 3);
    !$db->updatetable(table('pms_sys'), $setsqlarr, " spmid=" . $id . "") ? adminmsg("修改失败!", 0) : adminmsg("修改成功!", 2, $link);
}
Example #9
0
require_once dirname(__FILE__) . '/train_common.php';
$smarty->assign('leftmenu', "info");
if ($act == 'train_profile') {
    $smarty->assign('title', '机构资料管理 - 培训会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('train_profile', $train_profile);
    // 新注册会员 邮箱调取注册邮箱
    $smarty->assign('user', $user);
    $smarty->display('member_train/train_profile.htm');
} elseif ($act == 'train_profile_save') {
    $uid = intval($_SESSION['uid']);
    $setsqlarr['uid'] = intval($_SESSION['uid']);
    $setsqlarr['trainname'] = trim($_POST['trainname']) ? trim($_POST['trainname']) : showmsg('您没有输入机构名称!', 1);
    check_word($_CFG['filter'], $_POST['trainname']) ? showmsg($_CFG['filter_tips'], 0) : '';
    $setsqlarr['nature'] = trim($_POST['nature']) ? intval($_POST['nature']) : showmsg('请选择机构性质!', 1);
    $setsqlarr['nature_cn'] = trim($_POST['nature_cn']);
    $setsqlarr['founddate'] = intval(convert_datefm($_POST['founddate'], 2));
    if (empty($setsqlarr['founddate'])) {
        showmsg('请填写成立时间!时间格式:YYYY-MM-DD', 1);
    }
    if ($setsqlarr['founddate'] >= time()) {
        showmsg('成立时间不能大于今天', 1);
    }
    $setsqlarr['district'] = intval($_POST['district']) > 0 ? intval($_POST['district']) : showmsg('请选择所属地区!', 1);
    $setsqlarr['sdistrict'] = intval($_POST['sdistrict']);
    $setsqlarr['district_cn'] = trim($_POST['district_cn']);
    $setsqlarr['address'] = trim($_POST['address']) ? trim($_POST['address']) : showmsg('请填写通讯地址!', 1);
    check_word($_CFG['filter'], $_POST['address']) ? showmsg($_CFG['filter_tips'], 0) : '';
    $setsqlarr['contact'] = trim($_POST['contact']) ? trim($_POST['contact']) : showmsg('请填写联系人!', 1);
    check_word($_CFG['filter'], $_POST['contact']) ? showmsg($_CFG['filter_tips'], 0) : '';
    $setsqlarr['telephone'] = trim($_POST['telephone']) ? trim($_POST['telephone']) : showmsg('请填写联系电话!', 1);
    check_word($_CFG['filter'], $_POST['telephone']) ? showmsg($_CFG['filter_tips'], 0) : '';