⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbs_cat.php

📁 学校网站源码http://您的网址/admin/admin_login.asp 默认登录用户:admin 默认登录密码:admin
💻 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( 16 );
$step = $_REQUEST['step'];
$id = $_REQUEST['id'];
$cat = $_REQUEST['cat'];
$catid = $_REQUEST['catid'];
$coltype = $_REQUEST['coltype'];
$xuhao = $_REQUEST['xuhao'];
$bcat = $_REQUEST['bcat'];
$bxuhao = $_REQUEST['bxuhao'];
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\nfunction cm(nn){\r\n\tqus=confirm(\"";
echo $strDeleteConfirm;
echo "\")\r\n\tif(qus!=0){\r\n\twindow.location='bbs_cat.php?step=del&catid='+nn;\r\n\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=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n  <tr> \r\n    <td width=\"350\" >&nbsp;&nbsp;<img src=\"images/bar.gif\">&nbsp;&nbsp;";
echo $strCommentCat;
echo "</td>\r\n    <td >&nbsp;</td>    <td width=\"100\" >&nbsp;</td>\r\n  </tr>\r\n  </table>\r\n<br>\r\n\r\n";
if ( $step == "mod" )
{
	$fsql->query( "update {$tbl_comment_cat} set cat='{$cat}',xuhao='{$xuhao}' where  catid='{$catid}'" );
	echo "<script>window.location='bbs_cat.php'</script>";
}
if ( $step == "del" )
{
	$fsql->query( "select * from {$tbl_comment_cat} where catid='{$catid}'" );
	if ( $fsql->next_record( ) )
	{
		$coltype = $fsql->f( "coltype" );
	}
	$fsql->query( "select * from {$tbl_comment} where coltype='{$coltype}'" );
	if ( $fsql->next_record( ) )
	{
		err( $strCommentNTC1, "bbs_cat.php", "" );
	}
	$fsql->query( "delete from {$tbl_comment_cat} where catid='{$catid}'" );
	echo "<script>window.location='bbs_cat.php'</script>";
}
if ( $step == "add" )
{
	if ( $bcat == "" )
	{
		err( $strCommentNTC2, "bbs_cat.php", "" );
	}
	$msql->query( "insert into {$tbl_comment_cat} values (\r\n\t0,\r\n\t'{$bcat}',\r\n\t'',\r\n\t'{$bxuhao}',\r\n\t'1'\r\n\r\n\t)" );
	$catid = $msql->instid( );
	$msql->query( "update {$tbl_comment_cat} set coltype='{$catid}' where catid='{$catid}'" );
	echo "<script>window.location='bbs_cat.php'</script>";
}
echo "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"22\">\r\n  <tr> \r\n    <td class=title align=\"left\" height=\"22\" valign=\"top\" width=\"3\"><img src=\"images/menubg16.gif\" width=\"3\" height=\"30\"></td>\r\n    <td class=title align=\"center\" height=\"22\" colspan=\"2\">";
echo $strCommentCat;
echo "</td>\r\n    <td class=title align=\"right\" height=\"22\" width=\"3\" valign=\"top\"><img src=\"images/menubg17.gif\" width=\"3\" height=\"30\"></td>\r\n  </tr>\r\n</table>\r\n<table width=\"500\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" align=\"center\">\r\n  <tr> \r\n    <td  class=title height=\"28\" align=\"center\" width=\"50\">";
echo $strCommentCatXuhao;
echo "</td>\r\n    <td  class=title height=\"28\">";
echo $strCommentCatName;
echo " </td>\r\n    <td  class=title height=\"28\" width=\"50\" align=\"center\">";
echo $strDelete;
echo "</td>\r\n  </tr>\r\n  ";
$msql->query( "select * from {$tbl_comment_cat} order by xuhao " );
while ( $msql->next_record( ) )
{
	$catid = $msql->f( "catid" );
	$cat = $msql->f( "cat" );
	$xuhao = $msql->f( "xuhao" );
	$moveable = $msql->f( "moveable" );
	$coltype = $msql->f( "coltype" );
	echo " \r\n  <tr> \r\n    <form method=post action=\"bbs_cat.php\">\r\n      <td  class=con height=\"26\" valign=\"top\" align=\"center\"> \r\n        <input type=\"text\" name=\"xuhao\" size=\"3\"  class=input value=\"";
	echo $xuhao;
	echo "\">\r\n      </td>\r\n      <td  class=con height=\"26\" valign=\"top\"> \r\n        <input type=\"text\" name=\"cat\" size=\"28\"  class=input value=\"";
	echo $cat;
	echo "\" maxlength=\"16\">\r\n        <input type=\"image\" border=\"0\" name=\"imageField\" src=\"images/toolbar_modi_up.gif\" width=\"22\" height=\"20\">\r\n      </td>\r\n      <td  class=con height=\"26\" valign=\"top\" width=\"50\" align=\"center\"> ";
	if ( $moveable == "1" )
	{
		echo " <img src=\"images/toolbar_delete_up.gif\"  style=\"cursor:hand\" width=\"22\" height=\"20\" onClick=\"cm('";
		echo "{$catid}";
		echo "')\"> \r\n        ";
	}
	else
	{
		echo "-";
	}
	echo " \r\n        <input type=\"hidden\" name=\"step\" value=\"mod\">\r\n        <input type=\"hidden\" name=\"catid\" value=\"";
	echo $catid;
	echo "\">\r\n      </td>\r\n    </form>\r\n  </tr>\r\n  ";
}
$bxuhao = $xuhao + 1;
echo " \r\n  <tr> \r\n    <form name=\"form1\" action=bbs_cat.php>\r\n      <td   class=title height=\"26\" valign=\"top\" align=\"center\"> \r\n        <input type=\"text\" name=\"bxuhao\" size=\"3\"  class=input value=\"";
echo $bxuhao;
echo "\">\r\n      </td>\r\n      <td  class=title height=\"26\" valign=\"top\" colspan=\"2\" > \r\n        <input type=\"text\" name=\"bcat\" size=\"28\"  class=input maxlength=\"16\">\r\n        <input type=\"submit\" name=\"Submit22\" class=button value=\"";
echo $strCommentCatAdd;
echo "\">\r\n        <input type=\"hidden\" name=\"step\" value=\"add\">\r\n      </td>\r\n    </form>\r\n  </tr>\r\n</table>\r\n<table width=\"498\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"5\" background=\"images/mu1.jpg\">\r\n  <tr> \r\n    <td  align=\"center\" height=\"2\" colspan=\"2\"></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 + -