?? company.inc.php
字號:
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
if ( !defined( "IN_UCHOME" ) )
{
exit( "Access Denied" );
}
$uid = $_SGLOBAL['supe_uid'];
$list = sqlforlist( "job_company", "uid=".$uid );
$list = $list[0];
if ( $_POST )
{
foreach ( $GLOBALS['_POST'] as $key => $value )
{
$GLOBALS['_POST'][$key] = trim( $value );
}
if ( $_POST['do'] == "add" )
{
unset( $_POST['do'] );
$GLOBALS['_POST']['corpdescription'] = checkhtml( $_POST['corpdescription'] );
$GLOBALS['_POST']['corpdescription'] = getstr( $_POST['corpdescription'], 0, 1, 0, 1, 0, 1 );
$GLOBALS['_POST']['corpdescription'] = preg_replace( "/\\<div\\>\\<\\/div\\>/i", "", $_POST['corpdescription'] );
$GLOBALS['_POST']['corpintro'] = shtmlspecialchars( $_POST['corpintro'] );
if ( !empty( $_POST['corptitle'] ) || !empty( $_POST['corpprovince'] ) || !empty( $_POST['corpcity'] ) || !empty( $_POST['corptype'] ) || !empty( $_POST['corpphone'] ) || !empty( $_POST['corpreguser'] ) || !empty( $_POST['corpdescription'] ) )
{
inserttable( "job_company", $_POST );
showmessage( "公司信息添加成功!", "job.php?ac=newjob" );
}
}
else if ( $_POST['do'] == "edit" )
{
unset( $_POST['do'] );
$GLOBALS['_POST']['corpdescription'] = checkhtml( $_POST['corpdescription'] );
$GLOBALS['_POST']['corpdescription'] = getstr( $_POST['corpdescription'], 0, 1, 0, 1, 0, 1 );
$GLOBALS['_POST']['corpdescription'] = preg_replace( "/\\<div\\>\\<\\/div\\>/i", "", $_POST['corpdescription'] );
$GLOBALS['_POST']['corpintro'] = shtmlspecialchars( $_POST['corpintro'] );
if ( !empty( $_POST['corptitle'] ) || !empty( $_POST['corpprovince'] ) || !empty( $_POST['corpcity'] ) || !empty( $_POST['corptype'] ) || !empty( $_POST['corpphone'] ) || !empty( $_POST['corpreguser'] ) || !empty( $_POST['corpdescription'] ) )
{
updatetable( "job_company", $_POST, array(
"id" => $_POST['id']
) );
showmessage( "公司信息編輯成功!", "job.php?ac=newjob" );
}
}
}
$corptypehtml = "";
$corptypes = array( "無", "外資(歐美)", "外資(非歐美)", "合資(歐美)", "合資(非歐美)", "國企/上市公司", "民營/私營公司", "外企代表處", "其它性質" );
foreach ( $corptypes as $key => $value )
{
$selectstr = $key == $list['corptype'] ? " selected" : "";
$corptypehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$corpsizehtml = "";
$corpsizes = array( "1-49人", "50-99人", "100-499人", "500-999人", "1000人以上" );
foreach ( $corpsizes as $key => $value )
{
$selectstr = $key == $list['corpsize'] ? " selected" : "";
$corpsizehtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$corpregareahtml = "";
$corpregareas = array( "其他", "中國大陸", "中國香港", "中國臺灣", "中國澳門", "東南亞", "歐洲", "南美", "非洲", "西亞", "北美", "美國", "英國", "法國", "德國", "日本", "韓國", "新加坡", "加拿大" );
foreach ( $corpregareas as $key => $value )
{
$selectstr = $key == $list['corpregarea'] ? " selected" : "";
$corpregareahtml .= "<option value=\"".$key."\"{$selectstr}>{$value}</option>";
}
$corpregyearhtml = "";
$nowy = sgmdate( "Y" );
$i = 0;
for ( ; $i < 80; ++$i )
{
$they = $nowy - $i;
$selectstr = $they == $list['corpregyear'] ? " selected" : "";
$corpregyearhtml .= "<option value=\"".$they."\"{$selectstr}>{$they}</option>";
}
$corpregmonthhtml = "";
$i = 1;
for ( ; $i < 13; ++$i )
{
$selectstr = $i == $list['corpregmonth'] ? " selected" : "";
$corpregmonthhtml .= "<option value=\"".$i."\"{$selectstr}>{$i}</option>";
}
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -