📄 auth_modauth1.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( 3 );
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</head>\r\n\r\n<body class=\"NormalPage\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td width=\"250\" > <img src=\"images/bar.gif\"> ";
echo $strAuthModi;
echo "</td>\r\n <td > </td> <td width=\"100\" > </td>\r\n </tr>\r\n </table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\">\r\n <tr valign=\"top\"> \r\n <td height=\"378\"> \r\n <p>\r\n\t \r\n";
$user = $_REQUEST['user'];
$step = $_REQUEST['step'];
if ( $step == "modify" )
{
$msql->query( "delete from {$tbl_admin_rights} where user='{$user}'" );
$msql->query( "select * from {$tbl_admin_auth}" );
while ( $msql->next_record( ) )
{
$auth_auth = $msql->f( "auth" );
$vStr = "a"."{$auth_auth}";
if ( $_POST[$vStr] == "1" )
{
$fsql->query( "insert into {$tbl_admin_rights} values(0,'{$auth_auth}','{$user}')" );
}
}
sayok( $strAuthModifyOk, "auth_modauth.php", "" );
}
else
{
$msql->query( "select * from {$tbl_admin_rights} where user='{$user}'" );
$i = 0;
while ( $msql->next_record( ) )
{
$AuthArr[$i] = $msql->f( "auth" );
$i++;
}
$nums = $i - 1;
echo "</p>\r\n <br>\r\n <table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"22\">\r\n <tr> \r\n <td class=title align=\"left\" height=\"22\" valign=\"top\" width=\"3\"><img src=\"images/menubg16.gif\" width=\"3\" height=\"30\"></td>\r\n \r\n <td class=title align=\"center\" height=\"22\" colspan=\"2\">";
echo $strAuthModi;
echo "</td>\r\n <td class=title align=\"right\" height=\"22\" width=\"3\" valign=\"top\"><img src=\"images/menubg17.gif\" width=\"3\" height=\"30\"></td>\r\n </tr>\r\n </table>\r\n \r\n <table width=\"500\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" align=\"center\">\r\n <tr> \r\n <td width=\"50\" class=title align=\"center\">";
echo $strAuth;
echo "</td>\r\n <td class=title width=\"50\" align=\"center\">";
echo $strNumber;
echo "</td>\r\n <td class=title width=\"150\" align=\"center\">";
echo $strAuthGroup;
echo "</td>\r\n <td class=title align=\"center\">";
echo $strAuthName;
echo "</td>\r\n \r\n </tr>\r\n <form method=\"post\" action=\"auth_modauth1.php\">\r\n";
$msql->query( "select * from {$tbl_admin_auth} order by pid,xuhao" );
while ( $msql->next_record( ) )
{
$auth_auth = $msql->f( "auth" );
$auth_name = $msql->f( "name" );
$auth_intro = $msql->f( "intro" );
$auth_pname = $msql->f( "pname" );
$ifcheck = "";
$n = 0;
for ( ; $n <= $nums; $n++ )
{
if ( $AuthArr[$n] == $auth_auth )
{
$ifcheck = " checked ";
}
}
echo " \r\n <tr> \r\n <td width=\"50\" class=title align=\"center\"> \r\n <input type=\"checkbox\" name=\"a";
echo "{$auth_auth}";
echo "\" value=\"1\" ";
echo $ifcheck;
echo ">\r\n </td>\r\n <td class=con align=\"center\" width=\"50\">";
echo "{$auth_auth}";
echo "</td>\r\n <td class=con width=\"150\" align=\"center\">";
echo "{$auth_pname}";
echo "</td>\r\n <td class=con align=\"center\">";
echo "{$auth_name}";
echo "</td>\r\n \r\n </tr>\r\n ";
}
echo " \r\n <tr> \r\n <td colspan=\"5\" class=title> \r\n <div align=\"center\"> \r\n <input type=\"submit\" name=\"cc\" value=\"";
echo $strModify;
echo "\" class=button>\r\n <input type=\"hidden\" name=\"step\" value=\"modify\">\r\n <input type=\"hidden\" name=\"user\" value=\"";
echo "{$user}";
echo "\">\r\n </div>\r\n </td>\r\n </tr>\r\n </form>\r\n </table>\r\n \r\n <table width=\"498\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"10\" background=\"images/mu1.jpg\">\r\n <tr> \r\n <td align=\"center\" height=\"2\" colspan=\"2\"></td>\r\n </tr>\r\n </table>\r\n ";
}
echo " \r\n \r\n<br>\r\n </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 + -