用PHP3作树型目录

用PHP3作树型目录

require("/commonfuncs.PHP3");

require("home/websrc/userfuncs.php3");

function makeloginform(){

???echo"Please login first

";

???echo"

echo $GLOBALS["PHP_SELF"];

if(!$HTTP_COOKKIE_VARS["UserID"]){

???if(!$UserName){

????makeloginform();

????exit;

???}

??if(!$userinfo=getuserbyname($UserName))){

???echo "Login Name Error!";

???exit;

}

???if($userinfo->password!=$Password){

?????echo "Login Password Error!";

?????exit;

}

??$conn=DBConnect();

??$sql="insert into useronline(uid,logintime,username)values(";

??$sql=$sql.$userinfo->name;

??$sql=$sql."')";

??MySQL_query($sql,$conn);

??DBClose($conn);

??if(!(setcookie("UserID",$userinfo->id,"","/"))){

???echo"Set Cookie Error!!";

???exit;

???}

???$strHeader="Location:".$PHP_SELF;

???header($strHeader);

???exit;

???}

???>