📄 newjob.inc.php
字号:
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
if ( !defined( "IN_UCHOME" ) )
{
exit( "Access Denied" );
}
$uid = $_SGLOBAL['supe_uid'];
$company = sqlforlist( "job_company", "uid=".$uid );
if ( empty( $company ) )
{
showmessage( "添加公司资料", "job.php?ac=company" );
}
$company = $company[0];
$id = empty( $_GET['id'] ) ? 0 : intval( $_GET['id'] );
if ( $_GET['op'] == "post" && $_POST )
{
foreach ( $GLOBALS['_POST'] as $key => $value )
{
if ( !is_array( $value ) )
{
$GLOBALS['_POST'][$key] = trim( $value );
}
}
if ( $_POST['do'] == "add" )
{
if ( empty( $_POST['title'] ) )
{
showmessage( "招聘名称为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['department'] ) )
{
showmessage( "招聘部门为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobtype'] ) )
{
showmessage( "工作类型为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['pcount'] ) )
{
showmessage( "招聘人数为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobprovince'] ) )
{
showmessage( "工作地点(省)为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobcity'] ) )
{
showmessage( "工作地点(市)为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['emolumenttype'] ) )
{
showmessage( "薪资币种为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobintro'] ) )
{
showmessage( "职位介绍为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['seniority'] ) )
{
showmessage( "工作经验为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobcontact'] ) )
{
showmessage( "联系人为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobphone'] ) )
{
showmessage( "联系电话为空,(带下划线的是必填选项)请返回。" );
}
else if ( empty( $_POST['jobaddress'] ) )
{
showmessage( "地址为空,(带下划线的是必填选项)请返回。" );
}
else
{
unset( $_POST['do'] );
$GLOBALS['_POST']['dateline'] = $_SGLOBAL['timestamp'];
$GLOBALS['_POST']['uid'] = $_SGLOBAL[supe_uid];
$GLOBALS['_POST']['resumefilter'] = implode( ",", $_POST['resumefilter'] );
$GLOBALS['_POST']['jobintro'] = checkhtml( $_POST['jobintro'] );
$GLOBALS['_POST']['jobintro'] = getstr( $_POST['jobintro'], 0, 1, 0, 1, 0, 1 );
$GLOBALS['_POST']['jobintro'] = preg_replace( "/\\<div\\>\\<\\/div\\>/i", "", $_POST['jobintro'] );
$GLOBALS['_POST']['verify'] = 0;
inserttable( "job_newjobs", $_POST );
include_once( S_ROOT."./source/function_cp.php" );
$icon = "jobs";
$title_template = "{actor} 发布了一条招聘 <b>".$_POST['title']."</b> 的信息";
feed_add( $icon, $title_template );
showmessage( "招聘信息添加成功!", "job.php" );
}
}
else if ( $_POST['do'] == "del" )
{
unset( $_POST['do'] );
sqldel( "job_newjobs", "id=".$_POST[id] );
}
}
$jobtypehtml = "";
foreach ( array( "无", "全职", "兼职", "临时", "实习" ) as $key => $value )
{
$selectstr = $key == $list['jobtype'] ? " selected" : "";
$jobtypehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$dayshtml = "";
foreach ( array( 1 => "一天", 3 => "三天", 7 => "一周", 15 => "半个月", 30 => "一个月", 90 => "三个月" ) as $key => $value )
{
$selectstr = $value == $list['days'] ? " selected" : "";
$dayshtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$emolumenttypehtml = "";
foreach ( array( "无", "人民币", "港元", "美元", "日元", "欧元", "其他" ) as $key => $value )
{
$selectstr = $key == $list['emolumenttype'] ? " selected" : "";
$emolumenttypehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$emolumenthtml = "";
foreach ( array( "面议", "2万以下/年", "2-3万/年", "3-4万/年", "4-5万/年", "5-6万/年", "8-10万/年", "10-15万/年", "15-30万/年", "30-50万/年", "50-100万/年", "100万以上/年" ) as $key => $value )
{
$selectstr = $key == $list['emolument'] ? " selected" : "";
$emolumenthtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$seniorityhtml = "";
foreach ( array( "无", "在校学生", "应届毕业生", "一年以上", "二年以上", "三年以上", "五年以上", "八年以上", "十年以上" ) as $key => $value )
{
$selectstr = $key == $list['seniority'] ? " selected" : "";
$seniorityhtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$entrytypehtml = "";
foreach ( array( "面议", "三天内", "一周内", "一个月内", "三个月内" ) as $key => $value )
{
$selectstr = $key == $list['entrytype'] ? " selected" : "";
$entrytypehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$edudegreehtml = "";
foreach ( array( "无", "小学", "初中", "高中", "中技", "中专", "大专", "本科", "硕士", "MBA", "博士", "其他" ) as $key => $value )
{
$selectstr = $key == $list['edudegree'] ? " selected" : "";
$edudegreehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$languagehtml = "";
foreach ( array( "无", "汉语", "英语", "日语", "法语", "俄语", "德语", "西班牙语", "朝鲜语", "阿拉伯语", "其他" ) as $key => $value )
{
$selectstr = $key == $list['language'] ? " selected" : "";
$languagehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$languagelevelhtml = "";
foreach ( array( "不限", "一般", "良好", "精通" ) as $key => $value )
{
$selectstr = $key == $list['languagelevel'] ? " selected" : "";
$languagelevelhtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$jobstatushtml = "";
$jobstatus = array( "完全保密", "完全公开", "仅注册用户浏览", "仅好友浏览" );
foreach ( $jobstatus as $key => $value )
{
$selectstr = $key == $list['jobstatus'] ? " selected" : "";
$jobstatushtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$resumefilterhtml = "";
$list['resumefilter'] = explode( ",", $list['resumefilter'] );
foreach ( array( "接收全部应聘简历(若被勾选上,其他功能将自动失效)", "仅接收好友的简历", "仅接收符合工作类型的简历(类型:指全职、兼职、实习等)", "仅接收符合招聘地区的简历", "仅接收符合招聘行业的简历", "仅接收符合职位职能的简历", "仅接收符合薪资要求的简历", "仅接收符合工作经验的简历", "仅接收符合到岗时间的简历", "仅接收符合学历要求的简历", "仅接收符合语言要求的简历" ) as $key => $value )
{
$selectstr = in_array( $key, $list['resumefilter'] ) ? " checked=\\\"checked\\\"" : "";
$resumefilterhtml .= "<input type=\"checkbox\" name=\"resumefilter[]\" value=\"".$key."\"{$selectstr} />{$value}<br />";
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -