add_remove_priv.php

来自「通达网络办公 - Office Anywhere 2008 增强版100%源码(」· PHP 代码 · 共 56 行

PHP
56
字号
<?php

include_once( "inc/auth.php" );
include_once( "inc/check_type.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</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$FUNC_STR = str_replace( "undefined,", "", $FUNC_ID_STR );
$USER_PRIV_ARRAY = explode( ",", $USER_PRIV_STR );
$I = 0;
for ( ;	$I < count( $USER_PRIV_ARRAY );	++$I	)
{
	if ( !( $USER_PRIV_ARRAY[$I] == "" ) )
	{
		$query = "select * from USER_PRIV where USER_PRIV='".$USER_PRIV_ARRAY[$I]."'";
		$cursor = exequery( $connection, $query );
		if ( $ROW = mysql_fetch_array( $cursor ) )
		{
			$FUNC_ID_STR = $ROW['FUNC_ID_STR'];
		}
		if ( $OPERATION == "0" )
		{
			$FUNC_ID_STR .= check_id( $FUNC_ID_STR, $FUNC_STR, FALSE );
		}
		else
		{
			$FUNC_ARRAY = explode( ",", $FUNC_ID_STR );
			$FUNC_ID_STR = "";
			$J = 0;
			for ( ;	$J < count( $FUNC_ARRAY );	++$J	)
			{
				if ( !( $FUNC_ARRAY[$J] == "" ) )
				{
					if ( $FUNC_ARRAY[$J] == "" )
					{
						break;
					}
				}
				else
				{
					continue;
				}
				$FUNC_ID_STR .= $FUNC_ARRAY[$J].",";
			}
		}
		$query = "update USER_PRIV set FUNC_ID_STR='".$FUNC_ID_STR."' where USER_PRIV='".$USER_PRIV_ARRAY[$I]."'";
		exequery( $connection, $query );
		if ( $LOGIN_USER_PRIV == $USER_PRIV_ARRAY[$I] )
		{
			session_start( );
			$LOGIN_FUNC_STR = $FUNC_ID_STR;
		}
	}
}
header( "location: manage.php" );
echo "</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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