📄 do.php
字号:
<?php
include_once( "inc/auth.php" );
$NEWS_ID = $_REQUEST['NEWS_ID'];
$NEWS_TYPE_ID = $_REQUEST['NEWS_TYPE_ID'];
$NEWS_TYPE_NAME = $_REQUEST['NEWS_TYPE_NAME'];
$SEARCH = $_REQUEST['SEARCH'];
$connection = openconnection( );
switch ( $_REQUEST['is_show'] )
{
case "0" :
$sql = "\r\n\t\t\t\t\t\t\tUPDATE news SET PUBLIC = ".$_REQUEST['is_show']."\r\n\t\t\t\t\t\t\tWHERE NEWS_ID = ".$_REQUEST['news_id']."\r\n\t\t\t\t\t\t";
exequery( $connection, $sql );
header( "location:".$_SERVER['HTTP_REFERER'] );
break;
case "1" :
$sql = "\r\n\t\t\t\t\t\t\tUPDATE news SET PUBLIC = ".$_REQUEST['is_show']."\r\n\t\t\t\t\t\t\tWHERE NEWS_ID = ".$_REQUEST['news_id']."\r\n\t\t\t\t\t\t";
exequery( $connection, $sql );
header( "location:".$_SERVER['HTTP_REFERER'] );
}
switch ( $_REQUEST['operate'] )
{
case "delete" :
$del_news = explode( ",", $_REQUEST['id_str'] );
$i = 0;
for ( ; $i < count( $del_news ); ++$i )
{
if ( 0 < $del_news[$i] )
{
$sql = "\r\n\t\t\t\t\t\t\t\t\tDELETE FROM news\r\n\t\t\t\t\t\t\t\t\tWHERE NEWS_ID = ".$del_news[$i]."\r\n\t\t\t\t\t\t\t\t";
exequery( $connection, $sql );
$sql = "\r\n\t\t\t\t\t\t\t\t\tDELETE FROM news_comment\r\n\t\t\t\t\t\t\t\t\tWHERE NEWS_ID = ".$del_news[$i]."\r\n\t\t\t\t\t\t\t\t";
exequery( $connection, $sql );
}
}
header( "location:newspublic.php?cur_page=".$_REQUEST['cur_page'] );
break;
case "update" :
$sql = "\r\n\t\t\t\t\t\t\tUPDATE news\r\n\t\t\t\t\t\t\tSET PUTIP = 1\r\n\t\t\t\t\t\t\tWHERE NEWS_ID = '{$NEWS_ID}'\r\n\t\t\t\t\t\t";
exequery( $connection, $sql );
header( "location:newspublic.php?cur_page=".$_REQUEST['cur_page']."&NEWS_TYPE_ID=".$NEWS_TYPE_ID."&NEWS_TYPE_NAME=".$NEWS_TYPE_NAME."&search=".$SEARCH );
break;
case "remove" :
$sql = "\r\n\t\t\t\t\t\t\tUPDATE news\r\n\t\t\t\t\t\t\tSET PUTIP = 0\r\n\t\t\t\t\t\t\tWHERE NEWS_ID = '{$NEWS_ID}'\r\n\t\t\t\t\t\t";
exequery( $connection, $sql );
header( "location:newspublic.php?cur_page=".$_REQUEST['cur_page']."&NEWS_TYPE_ID=".$NEWS_TYPE_ID."&NEWS_TYPE_NAME=".$NEWS_TYPE_NAME."&search=".$SEARCH );
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -