📄 bbs.php
字号:
<?php
include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 62 );
$page = $_REQUEST['page'];
$step = $_REQUEST['step'];
$id = $_REQUEST['id'];
$title = $_REQUEST['title'];
$xuhao = $_REQUEST['xuhao'];
$tj = $_REQUEST['tj'];
$iffb = $_REQUEST['iffb'];
$key = $_REQUEST['key'];
$secure = $_REQUEST['secure'];
$showtj = $_REQUEST['showtj'];
$showfb = $_REQUEST['showfb'];
$showpid = $_REQUEST['showpid'];
$shownum = $_REQUEST['shownum'];
$sc = $_REQUEST['sc'];
$ord = $_REQUEST['ord'];
if ( !isset( $shownum ) || $shownum < 10 )
{
$shownum = 10;
}
if ( !isset( $showpid ) )
{
$showpid = "0";
}
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n\r\n ";
echo "<S";
echo "CRIPT>\r\n\r\n\r\nfunction Dpop(url,w,h){\r\n\tres = showModalDialog(url, null, 'dialogWidth: '+w+'px; dialogHeight: '+h+'px; center: yes; resizable: no; scroll: no; status: no;');\r\n \tif(res==\"ok\"){window.location.reload();}\r\n \r\n}\r\nfunction ord(nn,sc){\r\nif(nn!='";
echo "{$ord}";
echo "'){\r\n\twindow.location='bbs.php?page=";
echo $page;
echo "&sc=";
echo $sc;
echo "&showpid=";
echo $showpid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n}else{\r\n\tif(sc=='asc' || sc==''){\r\n\twindow.location='bbs.php?page=";
echo "{$page}";
echo "&sc=desc&showpid=";
echo $showpid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n\t}else{\r\n\twindow.location='bbs.php?page=";
echo "{$page}";
echo "&sc=asc&showpid=";
echo $showpid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n\t}\r\n\r\n}\r\n\r\n\r\n}\r\n\r\nfunction SelAll(theForm){\r\n\t\tfor ( i = 0 ; i < theForm.elements.length ; i ++ )\r\n\t\t{\r\n\t\t\tif ( theForm.elements[i].type == \"checkbox\" && theForm.elements[i].name != \"SELALL\" )\r\n\t\t\t{\r\n\t\t\t\ttheForm.elements[i].checked = ! theForm.elements[i].checked ;\r\n\t\t\t}\r\n\t\t}\r\n}\r\n\r\n</SCRIPT>\r\n</head>\r\n\r\n<body class=\"NormalPage\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"";
echo "0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td > <img src=\"images/bar.gif\" > ";
echo $strComment;
echo "</td>\r\n <td width=\"100\" > </td>\r\n </tr>\r\n</table>\r\n";
if ( $step == "fball" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_comment} set fabu='1' where id='{$ids}'" );
}
}
if ( $step == "notfball" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_comment} set fabu='0' where id='{$ids}'" );
}
}
if ( $step == "tjall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_comment} set tuijian='1' where id='{$ids}'" );
}
}
if ( $step == "nottjall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_comment} set tuijian='0' where id='{$ids}'" );
}
}
if ( $step == "delall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "select * from {$tbl_comment} where id='{$ids}'" );
if ( $msql->next_record( ) )
{
$picsrc = $msql->f( "picsrc" );
if ( file_exists( "../".$picsrc ) && 10 < strlen( $picsrc ) && !strstr( $picsrc, "../" ) )
{
unlink( "../".$picsrc );
}
}
$msql->query( "delete from {$tbl_comment} where id='{$ids}'" );
if ( $ids != "0" )
{
$msql->query( "select * from {$tbl_comment} where pid='{$ids}'" );
while ( $msql->next_record( ) )
{
$picsrc = $msql->f( "picsrc" );
if ( file_exists( "../".$picsrc ) && 10 < strlen( $picsrc ) && !strstr( $picsrc, "../" ) )
{
unlink( "../".$picsrc );
}
}
$msql->query( "delete from {$tbl_comment} where pid='{$ids}'" );
}
}
}
echo "\r\n";
if ( !isset( $ord ) || $ord == "" )
{
$ord = "uptime";
}
if ( !isset( $sc ) || $sc == "" )
{
$sc = "desc";
}
$scl = " id!='0' ";
if ( $key != "" )
{
$scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
}
if ( $showtj != "" && $showtj != "all" )
{
$scl .= " and tuijian='{$showtj}' ";
}
if ( $showfb != "" && $showfb != "all" )
{
$scl .= " and fabu='{$showfb}' ";
}
if ( $showpid != "" && $showpid != "all" )
{
if ( $showpid == "0" )
{
$scl .= " and pid='0' ";
}
else
{
$scl .= " and pid!='0' ";
}
}
$totalnums = tblcount( $tbl_comment, "id", $scl );
$pages = new pages( );
$pages->setvar( array(
"shownum" => $shownum,
"showpid" => $showpid,
"sc" => $sc,
"ord" => $ord,
"showtj" => $showtj,
"showfb" => $showfb,
"key" => $key
) );
$pages->set( $shownum, $totalnums );
$pagelimit = $pages->limit( );
echo " \r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bgcolor=\"#FFFFFF\" align=\"center\" height=\"30\">\r\n <tr> \r\n <form method=\"get\" action=\"bbs.php\" >\r\n \r\n <td class=title height=\"30\"> \r\n ";
echo "<s";
echo "elect name=\"showpid\">\r\n <option value=\"all\" >";
echo $strCommentShowAll;
echo "</option>\r\n <option value=\"0\" ";
echo seld( $showpid, "0" );
echo ">";
echo $strCommentShowMain;
echo "</option>\r\n <option value=\"1\" ";
echo seld( $showpid, "1" );
echo ">";
echo $strCommentShowBack;
echo "</option>\r\n </select>\r\n ";
echo "<s";
echo "elect name=\"showtj\">\r\n <option value=\"all\" >";
echo $strNewsSelTj;
echo "</option>\r\n <option value=\"1\" ";
echo seld( $showtj, "1" );
echo ">";
echo $strNewsSelTjYes;
echo "</option>\r\n <option value=\"0\" ";
echo seld( $showtj, "0" );
echo ">";
echo $strNewsSelTjNo;
echo "</option>\r\n </select>\r\n";
echo "<s";
echo "elect name=\"showfb\">\r\n <option value=\"all\" >";
echo $strNewsSelFb;
echo "</option>\r\n <option value=\"1\" ";
echo seld( $showfb, "1" );
echo ">";
echo $strNewsSelFbYes;
echo "</option>\r\n <option value=\"0\" ";
echo seld( $showfb, "0" );
echo ">";
echo $strNewsSelFbNo;
echo "</option>\r\n </select>\r\n";
echo "<s";
echo "elect name=\"shownum\">\r\n\r\n <option value=\"10\" ";
echo seld( $shownum, "10" );
echo ">";
echo $strNewsSelNum10;
echo "</option>\r\n <option value=\"20\" ";
echo seld( $shownum, "20" );
echo ">";
echo $strNewsSelNum20;
echo "</option>\r\n <option value=\"30\" ";
echo seld( $shownum, "30" );
echo ">";
echo $strNewsSelNum30;
echo "</option>\r\n <option value=\"50\" ";
echo seld( $shownum, "50" );
echo ">";
echo $strNewsSelNum50;
echo "</option>\r\n </select>\r\n<input type=\"text\" name=\"key\" size=\"23\" class=input value=\"";
echo $key;
echo "\">\r\n <font color=\"#000000\"> </font> \r\n <input type=\"submit\" name=\"Submit\" value=\"";
echo $strSearchTitle;
echo "\" class=button>\r\n \r\n </td>\r\n </form>\r\n \r\n <td class=title colspan=\"2\" align=\"right\"> </td>\r\n </tr>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"images/mu1.jpg\" height=\"5\">\r\n <tr> \r\n <td></td>\r\n </tr>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" align=\"center\">\r\n <tr class=list> \r\n <td w";
echo "idth=\"30\" align=\"center\" class=\"title\" style=\"cursor:hand\" onClick=\"ord('id','";
echo $sc;
echo "')\">";
echo $strSel;
echo "</td>\r\n <td width=\"50\" align=\"center\" class=\"title\" style=\"cursor:hand\" onClick=\"ord('id','";
echo $sc;
echo "')\"><font color=\"#FFFFFF\">";
echo $strNewsList2;
ordsc( $ord, "id", $sc );
echo "</font></td>\r\n <td height=\"28\" width=\"60\" class=\"title\" align=\"center\" >";
echo $strCommentType;
echo "</td>\r\n <td height=\"28\" class=\"title\" style=\"cursor:hand\" onClick=\"ord('title','";
echo $sc;
echo "')\"><font color=\"#FFFFFF\">";
echo $strNewsList4;
ordsc( $ord, "title", $sc );
echo "</font></td>\r\n <td height=\"28\" width=\"130\" class=\"title\" align=\"center\" style=\"cursor:hand\" onClick=\"ord('uptime','";
echo $sc;
echo "')\">";
echo $strUptime;
echo "<font color=\"#FFFFFF\">";
ordsc( $ord, "uptime", $sc );
echo "</font></td>\r\n <td height=\"28\" width=\"50\" class=\"title\" align=\"center\" style=\"cursor:hand\" onClick=\"ord('cl','";
echo $sc;
echo "')\">";
echo $strNewsList5;
echo "<font color=\"#FFFFFF\">";
ordsc( $ord, "cl", $sc );
echo "</font></td>\r\n <td height=\"28\" width=\"50\" class=\"title\" align=\"center\" >";
echo $strCommentType2;
echo "</td>\r\n <td height=\"28\" width=\"39\" class=\"title\" align=\"center\"><font color=\"#FFFFFF\">";
echo $strNewsList14;
echo "</font></td>\r\n <td height=\"28\" width=\"39\" class=\"title\" align=\"center\">";
echo $strNewsList6;
echo " \r\n </td>\r\n <td height=\"28\" width=\"39\" class=\"title\"> \r\n <div align=\"center\"><font color=\"#FFFFFF\">";
echo $strLook;
echo "</font></div>\r\n </td>\r\n </tr>\r\n <form name=\"delfm\" method=\"post\" action=\"bbs.php\">\r\n ";
$msql->query( "select * from {$tbl_comment} where {$scl} order by {$ord} {$sc} limit {$pagelimit}" );
while ( $msql->next_record( ) )
{
$id = $msql->f( "id" );
$pid = $msql->f( "pid" );
$title = $msql->f( "title" );
$xuhao = $msql->f( "xuhao" );
$cl = $msql->f( "cl" );
$tj = $msql->f( "tuijian" );
$iffb = $msql->f( "fabu" );
$uptime = $msql->f( "uptime" );
$body = $msql->f( "body" );
$uptime = date( "Y-m-d H:i:s", $uptime );
if ( $pid == 0 )
{
$look = "../comment_detail.php?commentid={$id}";
$type = $strCommentType1;
}
else
{
$look = "../comment_detail.php?commentid={$pid}";
$type = $strCommentType2;
}
$fsql->query( "select count(id) from {$tbl_comment} where pid='{$id}'" );
if ( $fsql->next_record( ) )
{
$count = $fsql->f( "count(id)" );
}
echo " \r\n <tr class=list> \r\n <td width=\"30\" align=\"center\" height=\"26\"> \r\n <input type=\"checkbox\" name=\"dall[]\" value=\"";
echo $id;
echo "\">\r\n </td>\r\n <td width=\"50\" align=\"center\" height=\"26\"> ";
echo $id;
echo " </td>\r\n <td width=\"60\" align=\"center\">";
echo $type;
echo "</td>\r\n <td>\r\n <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\r\n <tr>\r\n <td><font color=\"#000000\">";
echo $title;
echo "</font></td>\r\n </tr>\r\n ";
if ( $iffb != "1" )
{
echo " <tr>\r\n <td height=\"19\"><font color=\"#000000\">\r\n <textarea name=\"text\" cols=\"55\" rows=\"3\" id=\"text\" style=\"border:1px #d5d5d5 solid\" readonly>";
echo $body;
echo "</textarea>\r\n </font></td>\r\n </tr>\r\n ";
}
echo " </table>\r\n </td>\r\n <td width=\"130\" align=\"center\">";
echo $uptime;
echo "</td>\r\n <td width=\"50\" align=\"center\">";
echo $cl;
echo "</td>\r\n <td width=\"50\" align=\"center\">";
echo $count;
echo "</td>\r\n <td width=\"39\" align=\"center\"> ";
showyn( $iffb );
echo "</td>\r\n <td width=\"39\" align=\"center\"> ";
showyn( $tj );
echo " </td>\r\n <td width=\"39\"> \r\n <div align=\"center\"> <img src=\"images/toolbar_look_up.gif\" style=\"cursor:hand\" width=\"22\" height=\"20\" onClick=\"window.open('";
echo $look;
echo "','_blank')\"> \r\n </div>\r\n </td>\r\n </tr>\r\n ";
}
echo " \r\n <tr> \r\n <td class=title style=\"padding-left:6px\" height=\"30\" colspan=\"10\"> \r\n <input type=\"checkbox\" name=\"SELALL\" value=\"1\" onClick=\"SelAll(this.form)\">\r\n ";
echo $strSelAll;
echo " \r\n <input type=\"radio\" name=\"step\" value=\"delall\">\r\n ";
echo $strDelete;
echo " \r\n <input type=\"radio\" name=\"step\" value=\"fball\" checked>\r\n ";
echo $strNewsFb;
echo " \r\n <input type=\"radio\" name=\"step\" value=\"notfball\">\r\n ";
echo $strNewsNotFb;
echo " \r\n <input type=\"radio\" name=\"step\" value=\"tjall\">\r\n ";
echo $strNewsTj;
echo " \r\n <input type=\"radio\" name=\"step\" value=\"nottjall\">\r\n ";
echo $strNewsNotTj;
echo " <a style=\"cursor:hand;color:#ffffff;font-weight:bold\" onClick=\"delfm.submit()\">[ \r\n ";
echo $strSubmit;
echo " ]</a> \r\n <input type=\"hidden\" name=\"page\" size=\"3\" value=\"";
echo $page;
echo "\">\r\n <input type=\"hidden\" name=\"ord\" size=\"3\" value=\"";
echo $ord;
echo "\">\r\n <input type=\"hidden\" name=\"sc\" size=\"3\" value=\"";
echo $sc;
echo "\">\r\n <input type=\"hidden\" name=\"key\" size=\"3\" value=\"";
echo $key;
echo "\">\r\n <font color=\"#000000\"> \r\n <input type=\"hidden\" name=\"showtj\" value=\"";
echo $showtj;
echo "\">\r\n <input type=\"hidden\" name=\"showfb\" value=\"";
echo $showfb;
echo "\">\r\n <input type=\"hidden\" name=\"shownum\" value=\"";
echo $shownum;
echo "\">\r\n <input type=\"hidden\" name=\"showpid\" value=\"";
echo $showpid;
echo "\">\r\n </font> </td>\r\n </tr>\r\n </form>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"6\" bgcolor=\"#FFFFFF\" align=\"center\" background=\"images/mu1.jpg\" height=\"29\">\r\n <tr> \r\n <td class=pages>";
$pages->shownow( );
echo " </td>\r\n <td class=pages width=\"300\" align=\"right\">";
$pages->output( $ShowPageList );
echo "</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -