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

📄 manage.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/td_core.php" );
include_once( "inc/auth.php" );
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<script>\r\nfunction delete_priv(USER_PRIV)\r\n{\r\n msg=\"确认要删除该角色么?\";\r\n if(window.confirm(msg))\r\n {\r\n  URL=\"delete.php?USER_PRIV=\"+USER_PRIV;\r\n  window.location=URL;\r\n }\r\n}\r\n\r\nfunction detail(USER_PRIV)\r\n{\r\n  URL=\"show_users.php?USER_PRIV=\"+USER_PRIV;\r\n  myleft=(screen.availWidth-800)/2;\r\n  window.open(URL,\"\",\"height=500,width=800,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=\"+myleft+\",resizable=yes\");\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/notify_open.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\"><span class=\"big3\"> 管理角色</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n\r\n<br>\r\n<div align=\"center\">\r\n\r\n";
$query = "SELECT * from USER_PRIV order by PRIV_NO";
$cursor = exequery( $connection, $query );
$PRIV_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$PRIV_COUNT;
	$USER_PRIV = $ROW['USER_PRIV'];
	$PRIV_NO = $ROW['PRIV_NO'];
	$PRIV_NAME = $ROW['PRIV_NAME'];
	$USER_COUNT1 = 0;
	$USER_COUNT2 = 0;
	$query = "SELECT count(*) from USER where USER_PRIV='".$USER_PRIV."'";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
	{
		$USER_COUNT1 = $ROW1[0];
	}
	$query = "SELECT count(*) from USER where USER_PRIV='".$USER_PRIV."' and NOT_LOGIN='1'";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
	{
		$USER_COUNT2 = $ROW1[0];
	}
	$query = "SELECT count(*) from USER where FIND_IN_SET('".$USER_PRIV."',USER_PRIV_OTHER)";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
	{
		$USER_COUNT3 = $ROW1[0];
	}
	if ( $PRIV_COUNT == 1 )
	{
		echo "<table class=\"TableList\" width=\"450\">\r\n";
	}
	echo "    <tr class=\"TableData\">\r\n      <td nowrap align=\"center\" width=\"60\">";
	echo $PRIV_NO;
	echo "</td>\r\n      <td nowrap align=\"center\">";
	if ( $USER_PRIV == 1 )
	{
		echo "<font color=red>";
	}
	echo $PRIV_NAME;
	echo "</td>\r\n      <td nowrap align=\"center\">";
	echo $USER_COUNT1;
	echo "/";
	echo $USER_COUNT2;
	echo "/";
	echo $USER_COUNT3;
	echo "      &nbsp;&nbsp;<a href=\"javascript:detail('";
	echo $USER_PRIV;
	echo "')\"> 查看详情</a>\r\n      </td>\r\n      <td nowrap>&nbsp;&nbsp;\r\n        <a href=\"edit.php?USER_PRIV=";
	echo $USER_PRIV;
	echo "\"> 编辑</a>&nbsp;&nbsp;\r\n        <a href=\"edit_priv.php?USER_PRIV=";
	echo $USER_PRIV;
	echo "\"> 设置权限</a>&nbsp;&nbsp;\r\n        <a href=\"clone?USER_PRIV=";
	echo $USER_PRIV;
	echo "\">克隆</a>&nbsp;&nbsp;\r\n";
	if ( $USER_PRIV != 1 )
	{
		echo "        <a href=\"javascript:delete_priv('";
		echo $USER_PRIV;
		echo "')\"> 删除</a>\r\n";
	}
	echo "      </td>\r\n    </tr>\r\n";
}
if ( 0 < $PRIV_COUNT )
{
	echo "    <thead class=\"TableHeader\">\r\n      <td nowrap align=\"center\">角色排序号</td>\r\n      <td nowrap align=\"center\">角色名称</td>\r\n      <td nowrap align=\"center\">总用户数/禁止登录数/辅助角色数</td>\r\n      <td nowrap align=\"center\">操作</td>\r\n    </thead>\r\n    </table>\r\n";
}
else
{
	message( "", "尚未定义" );
}
echo "\r\n</div>\r\n\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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