📄 add.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/utility_sms1.php" );
include_once( "inc/utility_sms2.php" );
echo "\r\n<html>\r\n<head>\r\n<title>发布新闻</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$CUR_TIME = date( "Y-m-d H:i:s", time( ) );
if ( $ATTACHMENT_NAME != "" )
{
$ATTACHMENT_ID = upload( $ATTACHMENT, $ATTACHMENT_NAME );
$ATTACHMENT_ID = $ATTACHMENT_ID.",";
$ATTACHMENT_NAME = $ATTACHMENT_NAME."*";
}
if ( $FORMAT == "1" )
{
$CONTENT = "";
}
if ( $ANONYMITY_YN == "on" )
{
$ANONYMITY_YN = "1";
}
else
{
$ANONYMITY_YN = "0";
}
$query = "insert into NEWS(SUBJECT,CONTENT,PROVIDER,NEWS_TIME,ATTACHMENT_ID,ATTACHMENT_NAME,ANONYMITY_YN,FORMAT,TYPE_ID) values ('{$SUBJECT}','{$CONTENT}','{$LOGIN_USER_ID}','{$CUR_TIME}','{$ATTACHMENT_ID}','{$ATTACHMENT_NAME}','{$ANONYMITY_YN}','{$FORMAT}','{$TYPE_ID}')";
exequery( $connection, $query );
$query = "select * from NEWS where SUBJECT='{$SUBJECT}' and CONTENT='{$CONTENT}' and PROVIDER='{$LOGIN_USER_ID}' and NEWS_TIME='{$CUR_TIME}' and ATTACHMENT_ID='{$ATTACHMENT_ID}' and ATTACHMENT_NAME='{$ATTACHMENT_NAME}' and ANONYMITY_YN='{$ANONYMITY_YN}' and FORMAT='{$FORMAT}' and TYPE_ID='{$TYPE_ID}'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$NEWS_ID = $ROW['NEWS_ID'];
}
if ( $SMS_REMIND == "on" || $SMS2_REMIND == "on" )
{
$query_name = "select * from USER where USER_ID='{$LOGIN_USER_ID}'";
$cursor_name = exequery( $connection, $query_name );
if ( $ROW = mysql_fetch_array( $cursor_name ) )
{
$USER_NAME = $ROW['USER_NAME'];
}
$query = "select * from USER where NOT_LOGIN!='1'";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_ID_STR .= $ROW['USER_ID'].",";
}
}
if ( $SMS_REMIND == "on" )
{
$SMS_CONTENT = "请查看新闻!\n标题:".csubstr( $SUBJECT, 0, 80 );
send_sms( $SEND_TIME, $LOGIN_USER_ID, $USER_ID_STR, 14, $SMS_CONTENT );
}
if ( $SMS2_REMIND == "on" )
{
$SMS_CONTENT = "OA新闻,来自".$USER_NAME.":".$SUBJECT;
send_mobile_sms_user( $SEND_TIME, $LOGIN_USER_ID, $USER_ID_STR, $SMS_CONTENT, 12 );
}
if ( $OP == 0 )
{
header( "location:modify.php?NEWS_ID={$NEWS_ID}" );
}
else
{
message( "", "新闻发布成功!" );
button_back( );
}
echo "\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -