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

📄 cp_con.php

📁 学校网站源码http://您的网址/admin/admin_login.asp 默认登录用户:admin 默认登录密码:admin
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?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( 22 );

$menuid = $_REQUEST['menuid'];
$pid = $_REQUEST['pid'];
$page = $_REQUEST['page'];
$step = $_REQUEST['step'];
$id = $_REQUEST['id'];
$title = $_REQUEST['title'];
$xuhao = $_REQUEST['xuhao'];
$tj = $_REQUEST['tj'];
$iffb = $_REQUEST['iffb'];
$ifbold = $_REQUEST['ifbold'];
$ifred = $_REQUEST['ifred'];
$key = $_REQUEST['key'];
$secure = $_REQUEST['secure'];
$showtj = $_REQUEST['showtj'];
$showfb = $_REQUEST['showfb'];
$shownum = $_REQUEST['shownum'];
$sc = $_REQUEST['sc'];
$ord = $_REQUEST['ord'];
if ( !isset( $pid ) || $pid == "" )
{
	$pid = 0;
	$cname = $strConTopCat;
	$dis = " disabled";
}
if ( !isset( $shownum ) || $shownum < 10 )
{
	$shownum = 10;
}
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\t\twindow.location='cp_con.php?step=del&id='+nn+'&menuid=";
echo $menuid;
echo "&pid=";
echo $pid;
echo "&page=";
echo $page;
echo "&sc=";
echo $sc;
echo "&ord=";
echo $ord;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "';\r\n\t}\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='cp_con.php?page=";
echo $page;
echo "&menuid=";
echo $menuid;
echo "&sc=";
echo $sc;
echo "&pid=";
echo $pid;
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='cp_con.php?page=";
echo "{$page}";
echo "&menuid=";
echo $menuid;
echo "&sc=desc&pid=";
echo $pid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n\t}else{\r\n\twindow.location='cp_con.php?page=";
echo "{$page}";
echo "&menuid=";
echo $menuid;
echo "&sc=asc&pid=";
echo $pid;
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";
if ( $step == "fball" )
{
	$dall = $_POST['dall'];
	$nums = sizeof( $dall );
	$i = 0;
	for ( ;	$i < $nums;	$i++	)
	{
		$ids = $dall[$i];
		$msql->query( "update {$tbl_cp_con} set iffb='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_cp_con} set iffb='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_cp_con} set tj='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_cp_con} set tj='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 catpath,src from {$tbl_cp_con} where id='{$ids}'" );
		if ( $msql->next_record( ) )
		{
			$delcatpath = $msql->f( "catpath" );
			$src = $msql->f( "src" );
		}
		mincatnums( $tbl_cp_cat, $delcatpath );
		if ( file_exists( "../".$src ) && $src != "" )
		{
			unlink( "../".$src );
		}
		$msql->query( "delete from {$tbl_cp_con} where id='{$ids}'" );
		$fold = menufold( $menuid );
		@unlink( "../".$fold."/html/".$ids.".html" );
	}
}
if ( $step == "del" )
{
	$msql->query( "select catpath,src from {$tbl_cp_con} where id='{$id}'" );
	if ( $msql->next_record( ) )
	{
		$delcatpath = $msql->f( "catpath" );
		$src = $msql->f( "src" );
	}
	mincatnums( $tbl_cp_cat, $delcatpath );
	if ( file_exists( "../".$src ) && $src != "" )
	{
		unlink( "../".$src );
	}
	$msql->query( "delete from {$tbl_cp_con} where id='{$id}'" );
	$fold = menufold( $menuid );
	@unlink( "../".$fold."/html/".$id.".html" );
}
echo "\r\n";
if ( !isset( $ord ) || $ord == "" )
{
	$ord = "id";
}
if ( !isset( $sc ) || $sc == "" )
{
	$sc = "desc";
}
$scl = "  menuid='{$menuid}' ";
if ( $key != "" )
{
	$scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
}
if ( $showtj != "" && $showtj != "all" )
{
	$scl .= " and tj='{$showtj}' ";
}
if ( $showfb != "" && $showfb != "all" )
{
	$scl .= " and iffb='{$showfb}' ";
}
if ( $pid != "0" && $pid != "" )
{
	$fmdpath = fmpath( $pid );
	$scl .= " and catpath regexp '{$fmdpath}' ";
}
$totalnums = tblcount( $tbl_cp_con, "id", $scl );
$pages = new pages( );
$pages->setvar( array(
	"menuid" => $menuid,
	"shownum" => $shownum,
	"pid" => $pid,
	"sc" => $sc,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -