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

📄 down_con.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( 23 );

$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='down_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='down_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='down_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='down_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_down_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_down_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_down_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_down_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_down_con} where id='{$ids}'" );
		if ( $msql->next_record( ) )
		{
			$delcatpath = $msql->f( "catpath" );
			$src = $msql->f( "src" );
		}
		mincatnums( $tbl_down_cat, $delcatpath );
		if ( file_exists( "../".$src ) && $src != "" )
		{
			unlink( "../".$src );
		}
		$msql->query( "delete from {$tbl_down_con} where id='{$ids}'" );
		$fold = menufold( $menuid );
		@unlink( "../".$fold."/html/".$ids.".html" );
	}
}
if ( $step == "del" )
{
	$msql->query( "select catpath,src from {$tbl_down_con} where id='{$id}'" );
	if ( $msql->next_record( ) )
	{
		$delcatpath = $msql->f( "catpath" );
		$src = $msql->f( "src" );
	}
	mincatnums( $tbl_down_cat, $delcatpath );
	if ( file_exists( "../".$src ) && $src != "" )
	{
		unlink( "../".$src );
	}
	$msql->query( "delete from {$tbl_down_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_down_con, "id", $scl );
$pages = new pages( );
$pages->setvar( array(
	"menuid" => $menuid,
	"shownum" => $shownum,
	"pid" => $pid,
	"sc" => $sc,
	"ord" => $ord,
	"showtj" => $showtj,
	"showfb" => $showfb,
	"key" => $key
) );
$pages->set( $shownum, $totalnums );
$pagelimit = $pages->limit( );
if ( $pid == "0" )
{
	$dis = " disabled";
}
else
{
	$tsql->query( "select catid from {$tbl_down_cat} where pid='{$pid}'" );
	if ( $tsql->next_record( ) )
	{
		$dis = " disabled";
	}
	else
	{
		$dis = " ";
	}
}
$foldname = menufold( $menuid );
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=\"down_con.php\" target=\"con\">\r\n                  \r\n      <td class=title height=\"30\"> \r\n        <input type=\"text\" name=\"key\" size=\"23\" class=input value=\"";
echo $key;
echo "\">\r\n        ";
echo "<s";
echo "elect name=\"showtj\">\r\n          <option value=\"all\" >";
echo $strDownSelTj;
echo "</option>\r\n          <option value=\"1\"  ";
echo seld( $showtj, "1" );
echo ">";
echo $strDownSelTjYes;
echo "</option>\r\n          <option value=\"0\" ";
echo seld( $showtj, "0" );
echo ">";
echo $strDownSelTjNo;
echo "</option>\r\n        </select>\r\n";
echo "<s";
echo "elect name=\"showfb\">\r\n          <option value=\"all\" >";
echo $strDownSelFb;
echo "</option>\r\n          <option value=\"1\"  ";
echo seld( $showfb, "1" );
echo ">";
echo $strDownSelFbYes;
echo "</option>\r\n          <option value=\"0\" ";
echo seld( $showfb, "0" );
echo ">";
echo $strDownSelFbNo;
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 $strDownSelNum10;
echo "</option>\r\n          <option value=\"20\" ";
echo seld( $shownum, "20" );
echo ">";
echo $strDownSelNum20;
echo "</option>\r\n          <option value=\"30\" ";
echo seld( $shownum, "30" );
echo ">";
echo $strDownSelNum30;
echo "</option>\r\n          <option value=\"50\" ";
echo seld( $shownum, "50" );
echo ">";
echo $strDownSelNum50;
echo "</option>\r\n        </select>\r\n        <font color=\"#000000\">\r\n        <input type=\"hidden\" name=\"menuid\" value=\"";
echo $menuid;
echo "\">\r\n        </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\"> \r\n      <input type=\"text\" name=\"sssss\" size=\"48\" class=titleinput value=\"&nbsp;&nbsp;";
echo catid2cat( $pid, $tbl_down_cat );
echo "\" readonly>\r\n      <input type=\"button\" name=\"Button\" value=\"";
echo $strDownAddButton;
echo "\" class=button onClick=\"self.location='down_conadd.php?menuid=";
echo $menuid;
echo "&pid=";
echo $pid;
echo "'\" ";
echo $dis;
echo ">\r\n    </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=\"3\" align=\"center\">\r\n  <tr class=list> \r\n    <td width=\"30\" align=\"center\"  class=\"title\"  style=\"cursor:hand\" onClick=\"ord('id','";
echo $sc;
echo "')\">";
echo $strSel;
echo "</td>\r\n    <td width=\"48\" align=\"center\"  class=\"title\"  style=\"cursor:hand\" onClick=\"ord('id','";
echo $sc;
echo "')\"><font color=\"#FFFFFF\">";
echo $strDownList2;
ordsc( $ord, "id", $sc );
echo "</font></td>\r\n    <td  class=\"title\"><font color=\"#FFFFFF\">";
echo $strDownList4;
ordsc( $ord, "title", $sc );
echo " \r\n      </font> </td>\r\n    <td height=\"28\" class=\"title\"  width=\"80\" align=\"center\">";
echo $strDownAddSize;
echo " \r\n    </td>\r\n    <td height=\"28\" width=\"48\"  class=\"title\" align=\"center\"  style=\"cursor:hand\" onClick=\"ord('cl','";
echo $sc;
echo "')\">";
echo $strDownList5;
echo "<font color=\"#FFFFFF\">";
ordsc( $ord, "cl", $sc );
echo "</font></td>\r\n    <td height=\"28\" width=\"48\"  class=\"title\" align=\"center\"><font color=\"#FFFFFF\">";
echo $strDownList14;
echo "</font></td>\r\n    <td height=\"28\" width=\"48\"  class=\"title\" align=\"center\">";
echo $strDownList6;
echo " \r\n    </td>\r\n    <td width=\"48\" align=\"center\"  class=\"title\"  >";
echo $strSecure;
echo "</td>\r\n    <td width=\"48\" align=\"center\"  class=\"title\">";
echo $strLook;
echo "</td>\r\n    <td height=\"28\" width=\"48\"  class=\"title\"> \r\n      <div align=\"center\"><font color=\"#FFFFFF\">";
echo $strDownList9;
echo "</font></div>\r\n    </td>\r\n    <td height=\"28\" width=\"48\"  class=\"title\"> \r\n      <div align=\"center\"><font color=\"#FFFFFF\">";
echo $strDownList11;
echo "</font></div>\r\n    </td>\r\n  </tr>\r\n  <form name=\"delfm\" method=\"post\" action=\"down_con.php\">\r\n    ";
$msql->query( "select * from {$tbl_down_con} where {$scl}  order by {$ord} {$sc}  limit {$pagelimit}" );
while ( $msql->next_record( ) )
{
	$id = $msql->f( "id" );
	$catid = $msql->f( "catid" );
	$title = $msql->f( "title" );
	$xuhao = $msql->f( "xuhao" );
	$cl = $msql->f( "cl" );
	$tj = $msql->f( "tj" );
	$filesize = $msql->f( "filesize" );
	$url = $msql->f( "url" );
	$iffb = $msql->f( "iffb" );
	$src = $msql->f( "src" );
	$type = $msql->f( "type" );
	$secure = $msql->f( "secure" );
	$browseurl = "../".$foldname."/html/?".$id.".html";
	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=\"48\" align=\"center\" height=\"26\"> ";
	echo "{$id}";
	echo " </td>\r\n      <td><font color=\"#000000\">";
	echo "{$title}";
	echo "</font> </td>\r\n      <td width=\"80\" align=\"center\"><font color=\"#000000\">";
	echo $filesize;
	echo " \r\n        </font></td>\r\n      <td width=\"48\" align=\"center\">";
	echo $cl;
	echo "</td>\r\n      <td width=\"48\" align=\"center\"> ";
	showyn( $iffb );
	echo "</td>\r\n      <td width=\"48\" align=\"center\"> ";
	showyn( $tj );
	echo " </td>\r\n      <td width=\"48\" align=\"center\"> ";
	echo $secure;
	echo "</td>\r\n      <td width=\"48\" align=\"center\"><a href=\"";
	echo $browseurl;
	echo "\" target=\"_blank\"><img src=\"images/toolbar_look_up.gif\" width=\"22\" height=\"20\" border=\"0\"></a></td>\r\n      <td width=\"48\"> \r\n        <div align=\"center\"> <img src=\"images/toolbar_edit_up.gif\" style=\"cursor:hand\" width=\"22\" height=\"20\" onClick=\"window.location='down_conmod.php?id=";
	echo $id;
	echo "&oldmenuid=";
	echo $menuid;
	echo "&pid=";
	echo $pid;
	echo "&page=";
	echo $page;
	echo "'\"> \r\n        </div>\r\n      </td>\r\n      <td width=\"48\" align=\"center\"> <img src=\"images/toolbar_delete_up.gif\"  style=\"cursor:hand\" width=\"22\" height=\"20\" onClick=\"cm('";
	echo "{$id}";
	echo "')\"> \r\n      </td>\r\n    </tr>\r\n    ";
}
echo " \r\n    <tr> \r\n      <td height=\"30\" colspan=\"11\" class=title style=\"padding-left:6px\"> \r\n        <input type=\"checkbox\" name=\"SELALL\" value=\"1\" onClick=\"SelAll(this.form)\">\r\n        ";
echo $strSelAll;
echo "&nbsp; \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 $strDownFb;
echo " \r\n        <input type=\"radio\" name=\"step\" value=\"notfball\">\r\n        ";
echo $strDownNotFb;
echo " \r\n        <input type=\"radio\" name=\"step\" value=\"tjall\">\r\n        ";
echo $strDownTj;
echo " \r\n        <input type=\"radio\" name=\"step\" value=\"nottjall\">\r\n        ";
echo $strDownNotTj;
echo " &nbsp;&nbsp;<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=\"pid\" value=\"";
echo "{$pid}";
echo "\">\r\n        <input type=\"hidden\" name=\"shownum\" value=\"";
echo $shownum;
echo "\">\r\n        <input type=\"hidden\" name=\"menuid\" value=\"";
echo $menuid;
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 + -