security1.php 特殊用户页面保护摸板
security2.php 一般用户页面保护摸板
login2.php 用户登陆页面
index.php 一般用户页面保护范例
backend_index.php 特殊用户页面保护范例
This file is security1.php .
<?php
//*****************************************************
// Filename: security1.php
// Author: Macro Zeng
// Version: 1.0
// Date: 2000-05-14
// Description: appoint super user who can enter backend
//******************************************************
session_register("user");
$privilege="root,zhcy-042-00,zhcy-030-00";
$pieces=explode(",",$privilege);
for ($i=0;$i<count($pieces);$i++){
if(strtolower($user)==$pieces[$i]){
$hasPrivilege=1;
break;
}
}
if (!$hasPrivilege){
if ($fileName=="")
$fileName=$PHP_SELF;
$error=urlencode("You have no privilege to view this page !");
header ("Location:login2.php?fileName=$fileName&error=$error&id=$id");
exit();
}
?>
(Application:Book-Online Author:Macro Zeng Homepage:http://wcid4u.yes8.com/) |