📄 control_review.php
字号:
<?php
function messagesucc( $TITLE, $CONTENT, $reurl = "", $isS = "true" )
{
echo "\t\t<div align=\"center\" title=\"提示信息框\">\r\n\t\t<table border=\"0\" width=\"";
if ( strlen( $CONTENT ) <= 12 )
{
echo "180";
}
else if ( strlen( $CONTENT ) <= 20 )
{
echo "180";
}
else
{
echo "300";
}
echo "\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t\t<tr><td height=\"5\" colspan=\"2\"></td></tr>\r\n\t\t<tr><td background=\"/images/messagebg.gif\" width=\"20%\" align=\"center\"><img src=\"/images/message.gif\"></td>\r\n\t\t<td background=\"/images/messagebg.gif\" width=\"80%\" align=\"center\">\r\n\r\n\t\t";
if ( $TITLE != "" )
{
if ( $isS )
{
$co = "#009900";
}
else
{
$c0 = "#FF0000";
}
echo "\t\t<font color=\"";
echo $co;
echo "\"><img src=\"/images/attention.gif\" height=\"20\"> <b>";
echo $TITLE;
echo "</b></font><hr>\r\n\t\t";
}
echo "\t\t";
echo $CONTENT;
echo "\t\t</td>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t\t<table border=\"0\" width=\"";
if ( strlen( $CONTENT ) <= 12 )
{
echo "180";
}
else if ( strlen( $CONTENT ) <= 20 )
{
echo "180";
}
else
{
echo "300";
}
echo "\" cellspacing=\"0\" cellpadding=\"10\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td align=\"center\" background=\"/images/messagebg.gif\" width=\"80%\" align=\"center\">\r\n\t\t\t\t<a href='";
echo $reurl;
echo "'>点击这里返回</a>\r\n\t\t\t\t</td >\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t\t<META HTTP-EQUIV=REFRESH CONTENT='7;URL=";
echo $reurl;
echo "'>\r\n\t\t";
exit( );
}
include_once( "inc/auth.php" );
if ( empty( $_REQUEST['f'] ) )
{
message( "warning", "非法操作" );
exit( );
}
$f = $_REQUEST['f'];
$connection = openconnection( );
switch ( $f )
{
case "add" :
$datetime = date( "Y-m-d H:i:s" );
$sql = "\r\n\t INSERT INTO diary_review \r\n\t (DIA_ID,USER_ID,DIA_RE_CONTENT,DIA_RE_DATE,DIA_RE_PARENT_ID) \r\n\t\t\t\t VALUES \r\n\t\t\t\t (".$_POST['dia_id'].",'".$_SESSION['LOGIN_USER_ID']."','".$_POST['re_content']."',\r\n\t\t\t\t\t'".$datetime."',0)\r\n\t\t\t ";
exequery( $connection, $sql );
messagesucc( "您的回复发布成功", "", "read.php?USER_NAME=".$_REQUEST['username']."&DIA_ID=".$_REQUEST['dia_id'], "true" );
exit( );
case "del" :
$sql = "DELETE FROM diary_review WHERE DIA_RE_ID=".$_REQUEST['diareid'];
exequery( $connection, $sql );
messagesucc( "您的回复已成功删除", "", "read.php?USER_NAME=".$_REQUEST['username']."&DIA_ID=".$_REQUEST['dia_id'], "true" );
exit( );
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -