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

📄 index.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/function_page_01.php" );
if ( $_REQUEST['cur_page'] == "" )
{
	$cur_page = 1;
}
else
{
	$cur_page = $_REQUEST['cur_page'];
}
echo "\r\n<html>\r\n<head>\r\n<title>类别管理</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "cript>\r\nfunction createsort(){\r\n\turl\t= \"add.php\";\r\n\tlocation = url;\r\n}\r\n\r\nfunction del(sort_id){\r\n\tvar msg\t= '确认要删除此类别吗!';\r\n\tif(window.confirm(msg)){\r\n\t\turl\t= \"update.php?handle=delete&sort_id=\"+sort_id;\r\n\t\tlocation = url;\r\n\t}\r\n}\r\n\r\nfunction edt(sort_id){\r\n\turl\t= \"edit.php?sort_id=\"+sort_id;\r\n\tlocation = url;\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" ";
echo "width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n\t<tr class=\"tablehead1\">\r\n\t\t<td><img src=\"/images/manage/news.gif\" align=\"absmiddle\">类别管理</td>\r\n\t</tr>\r\n\t<tr class=\"tablehead2\">\r\n\t\t<td><BUTTON class=btn onClick=\"createsort();\"><table><tr valign=top ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">新建类别</span></td></tr></table></BUTTON></td>\r\n\t</tr>\r\n</table>\r\n<br>\r\n";
$connection = openconnection( );
$query = "SELECT * FROM officeitem_sort WHERE 1";
switch ( $_REQUEST['order'] )
{
case "mark" :
	$query .= " order by MARK";
	break;
case "sort" :
	$query .= " order by SORT";
	break;
case "number" :
	$query .= " order by SORT_NUMBER";
	break;
default :
	$query .= " order by MARK";
	break;
}
$query .= $_REQUEST['sens'] ? " DESC" : " ASC";
$query = page( $query, 12 );
$cursor = exequery( $connection, $query );
$count = 0;
echo "<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"1\" class=\"small\">\r\n";
while ( $row = mysql_fetch_array( $cursor ) )
{
	++$count;
	$sort_id = $row['SORT_ID'];
	$sort = $row['SORT'];
	$describes = $row['DESCRIBES'];
	$mark = $row['MARK'];
	$number = $row['SORT_NUMBER'];
	$sqlop = "SELECT COUNT(SORT_ID) AS cnt FROM officeitem_appellation WHERE SORT_ID='".$sort_id."'";
	$rsop = exequery( $connection, $sqlop );
	$rowop = mysql_fetch_array( $rsop );
	$delFlag = 1;
	if ( 0 < $rowop['cnt'] )
	{
		$delFlag = 0;
	}
	if ( !get_magic_quotes_gpc( ) )
	{
		$describes = stripslashes( $describes );
	}
	if ( $count % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	$len = 85;
	echo "<tr class=\"";
	echo $TableLine;
	echo "\">\r\n\t\t<td nowrap>";
	echo $mark;
	echo "</td>\r\n\t\t<td nowrap>";
	echo $number;
	echo "</td>\r\n\t\t<td nowrap>";
	echo $sort;
	echo "</td>\r\n\t\t<td nowrap>";
	echo strlen( $describes ) <= $len ? $describes : substr( $describes, 0, $len ).chr( 0 )."...";
	echo "</td>\r\n\t\t<td nowrap><a href=\"#\" onclick=\"edt(";
	echo $sort_id;
	echo ")\">编辑</a> ";
	if ( $delFlag )
	{
		echo "<a href=\"#\" onclick=\"del(";
		echo $sort_id;
		echo ");\">删除</a>";
	}
	else
	{
		echo "&nbsp;";
	}
	echo "</td>\r\n\t</tr>";
}
echo "<center>";
if ( $count == 0 )
{
	message( "提示", "暂无记录" );
	exit( );
}
echo "</center>";
$sens = $_REQUEST['sens'] ? 0 : 1;
$sensimg = $_REQUEST['sens'] ? "arrow_up.gif" : "arrow_down.gif";
$sensimg = "/images/".$sensimg;
$sufurl = $_SERVER['PHP_SELF']."?sens=".$sens;
echo "\t<thead class=\"TableHeader\">\r\n\t\t<td nowrap><a href=\"";
echo $sufurl;
echo "&order=mark\">序号";
if ( $_REQUEST['order'] == "mark" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td nowrap><a href=\"";
echo $sufurl;
echo "&order=number\">编号";
if ( $_REQUEST['order'] == "number" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td nowrap><a href=\"";
echo $sufurl;
echo "&order=sort\">办公用品类别";
if ( $_REQUEST['order'] == "sort" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td nowrap>描述</td>\r\n\t\t<td nowrap>操作</td>\r\n\t</thead>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n\t<tr>\r\n\t\t<td class=\"TableLine1\" nowrap align=\"right\">";
disp( "sens=".$_REQUEST['sens']."&order=".$_REQUEST['order'] );
echo "</td>\r\n\t</tr>\r\n</table>\r\n";
if ( 0 < ( $n = $_REQUEST['cur_page'] - $total_page_nums ) )
{
	$cur_page = $_REQUEST['cur_page'] - $n;
	header( "location:".$_SERVER['PHP_SELF']."?&order=".$_REQUEST['order']."&sens=".$_REQUEST['sens']."&cur_page=".$cur_page );
}
echo "</body>\r\n</html>";
?>

⌨️ 快捷键说明

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