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

📄 news_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( 21 );
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</head>\r\n\r\n<body  class=\"NormalPage\">\r\n";
$menuid = $_REQUEST['menuid'];
$pid = $_REQUEST['pid'];
$step = $_REQUEST['step'];
$cc = $_REQUEST['cc'];
$secure = $_REQUEST['secure'];
if ( !isset( $pid ) || $pid == "" )
{
	$pid = 0;
}
if ( !isset( $secure ) || $secure == "" )
{
	$secure = 0;
}
if ( $step == "add" && $_REQUEST['cat'] != "" && $_REQUEST['cat'] != " " )
{
	$cat = $_REQUEST['cat'];
	$cat = htmlspecialchars( $cat );
	if ( $pid != "0" )
	{
		$msql->query( "select catpath from {$tbl_news_cat} where catid='{$pid}'" );
		if ( $msql->next_record( ) )
		{
			$pcatpath = $msql->f( "catpath" );
		}
	}
	$msql->query( "select max(xuhao) from {$tbl_news_cat} where pid='{$pid}'" );
	if ( $msql->next_record( ) )
	{
		$maxxuhao = $msql->f( "max(xuhao)" );
		$nowxuhao = $maxxuhao + 1;
	}
	$msql->query( "insert into {$tbl_news_cat} values (0,'{$pid}','{$menuid}','{$cat}','{$nowxuhao}','{$catpath}','0','{$secure}','0')" );
	$nowcatid = $msql->instid( );
	$nowpath = fmpath( $nowcatid );
	$catpath = $pcatpath.$nowpath.":";
	$msql->query( "update {$tbl_news_cat} set catpath='{$catpath}' where catid='{$nowcatid}'" );
	$fold = menufold( $menuid );
	echo "<script>top.buildhtml.location='../".$fold."/class/?".$nowcatid.".html'</script>";
	echo "<script>parent.location='news_cat_frame.php?menuid={$menuid}&pid={$pid}'</script>";
}
if ( $step == "del" )
{
	$catid = $_GET['catid'];
	$pid = $_GET['pid'];
	$menuid = $_GET['menuid'];
	$msql->query( "select id from {$tbl_news_con} where catid='{$catid}' " );
	if ( $msql->next_record( ) )
	{
		err( $strNewsNotice1, "", "" );
	}
	$msql->query( "select catid from {$tbl_news_cat} where pid='{$catid}'" );
	if ( $msql->next_record( ) )
	{
		err( $strNewsNotice2, "", "" );
	}
	$msql->query( "delete from {$tbl_news_cat} where catid='{$catid}'" );
	$fold = menufold( $menuid );
	@unlink( "../".$fold."/class/".$catid.".html" );
	echo "<script>parent.location='news_cat_frame.php?menuid={$menuid}&pid={$pid}'</script>";
}
if ( $step == "modi" )
{
	$cat = $_GET['cat'];
	$catid = $_GET['catid'];
	$pid = $_GET['pid'];
	$xuhao = $_GET['xuhao'];
	$menuid = $_GET['menuid'];
	$tj = $_GET['tj'];
	$cat = htmlspecialchars( $cat );
	$msql->query( "update {$tbl_news_cat} set cat='{$cat}',xuhao='{$xuhao}' where catid='{$catid}' " );
	$msql->query( "update {$tbl_news_cat} set secure='{$secure}',tj='{$tj}' where catpath regexp '".fmpath( $catid )."' " );
	$fold = menufold( $menuid );
	echo "<script>top.buildhtml.location='../".$fold."/class/?".$catid.".html'</script>";
	echo "<script>parent.location='news_cat_frame.php?menuid={$menuid}&pid={$pid}'</script>";
}
echo " \r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#FFFFFF\" align=\"center\" height=\"30\">\r\n  <tr align=\"right\"> \r\n    <form method=\"get\" action=\"news_cat.php\">\r\n      <td class=title >\r\n        <input type=\"hidden\" name=\"step\" value=\"add\">\r\n      \r\n        <input type=\"hidden\" name=\"pid\" value=\"";
echo "{$pid}";
echo "\">\r\n        <input type=\"hidden\" name=\"menuid\" value=\"";
echo $menuid;
echo "\">\r\n        <input type=\"text\" name=\"sssss\" size=\"48\" class=titleinput value=\"&nbsp;&nbsp;";
echo catid2cat( $pid, $tbl_news_cat );
echo "\" readonly>\r\n        <input type=\"text\" name=\"cat\" class=input size=\"20\">\r\n        <input type=\"submit\" name=\"Submit\" value=\"";
echo $strCatAdd;
echo "\" class=button>\r\n    </td> </form>\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=\"3\" align=\"center\">\r\n  <tr> \r\n    <td width=\"50\" class=\"title\"><font color=\"#FFFFFF\">";
echo $strNewsList2;
echo "</font></td>\r\n    <td width=\"100\"  class=\"title\"><font color=\"#FFFFFF\">";
echo $strXuhao;
echo "</font></td>\r\n    <td  class=\"title\"><font color=\"#FFFFFF\">";
echo $strCat;
echo " </font></td>\r\n    <td  class=\"title\" width=\"39\" align=\"center\">";
echo $strNewsList6;
echo "</td>\r\n    <td  class=\"title\" width=\"39\" align=\"center\">";
echo $strSecure;
echo "</td>\r\n    <td width=\"38\"  class=\"title\" align=\"center\">";
echo $strModify;
echo "</td>\r\n    <td width=\"38\" align=\"center\"  class=\"title\">";
echo $strDelete;
echo "</td>\r\n  </tr>\r\n  ";
$msql->query( "select * from {$tbl_news_cat} where  menuid='{$menuid}' and pid='{$pid}' order by xuhao" );
while ( $msql->next_record( ) )
{
	$catid = $msql->f( "catid" );
	$cat = $msql->f( "cat" );
	$xuhao = $msql->f( "xuhao" );
	$pid = $msql->f( "pid" );
	$tj = $msql->f( "tj" );
	$catpath = $msql->f( "catpath" );
	$secure = $msql->f( "secure" );
	echo " \r\n  <tr class=\"list\"> \r\n    <form method=\"get\" action=\"news_cat.php\">\r\n      <td width=\"50\">";
	echo "{$catid}";
	echo " </td>\r\n      <td width=\"100\"  > \r\n        <input type=\"text\" name=\"xuhao\" size=\"4\" value=\"";
	echo "{$xuhao}";
	echo "\" class=input>\r\n      </td>\r\n      <td  > \r\n        <input type=\"text\" name=\"cat\" size=\"35\" value=\"";
	echo "{$cat}";
	echo "\" class=input>\r\n        <input type=\"hidden\" name=\"catid\" value=\"";
	echo "{$catid}";
	echo "\">\r\n        <input type=\"hidden\" name=\"step\" value=\"modi\">\r\n        <input type=\"hidden\" name=\"pid\" value=\"";
	echo "{$pid}";
	echo "\">\r\n        <input type=\"hidden\" name=\"menuid\" value=\"";
	echo $menuid;
	echo "\">\r\n      </td>\r\n      <td width=\"39\" align=\"center\"  >\r\n        <input type=\"checkbox\" name=\"tj\" value=\"1\" ";
	echo checked( $tj, "1" );
	echo ">\r\n      </td>\r\n      <td width=\"39\" align=\"center\"  > \r\n        <input type=\"text\" name=\"secure\" style=\"width:25px\" value=\"";
	echo $secure;
	echo "\" class=input maxlength=\"1\">\r\n      </td>\r\n      <td width=\"38\"  align=\"center\"> \r\n        <div align=\"CENTER\"> \r\n          <input type=\"image\" border=\"0\" name=\"imageField\" src=\"images/toolbar_modi_up.gif\" width=\"22\" height=\"20\">\r\n        </div>\r\n      </td>\r\n      <td width=\"38\" align=\"center\"  > <img src=\"images/toolbar_delete_up.gif\"  style=\"cursor:hand\" width=\"22\" height=\"20\"  border=0 onClick=\"self.l";
	echo "ocation='news_cat.php?step=del&catid=";
	echo "{$catid}";
	echo "&menuid=";
	echo $menuid;
	echo "&pid=";
	echo "{$pid}";
	echo "'\"></td>\r\n    </form>\r\n  </tr>\r\n  ";
}
echo " \r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"10\" 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 + -