<?
/* @@ Test De La Clase sauth 'oI |[xP]| mArKitos]| ) )) ))) */
require ('./sauthclass.php');
if (isset ($StateSession)){
unset ($StateSession);
}
if (isset ($StartSession)){
$TSAuth = new sauth ('localhost', 'sauth', 'sauth', 'sauth');
if ($IsParanoikal){
$IsParanoikal = $REMOTE_ADDR;
}
$SessionId = $TSAuth->StartSession ("$UserName", "$PassName", "$IsParanoikal");
if (!$SessionId){
$AuthError = 1;
} else {
if (!isset ($ur)){
$ur = 'menu.php'; #: Default Url to onload event
}
$StateSession = 'ok';
$JumpUri = $ur;
}
unset ($STAuth);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test De La Clase sauth</title>
</head>
<body<?if ($StateSession=='ok'){unset ($StateSession);?> onload="window.location='<?echo $JumpUri,"?sid=$SessionId";?>'"<?}?>>
<h1 align="left"><font color="green">Test Clase sauth</font><font color="black"> mArKitos]| ) )) )))</font></h1>
<h3 align="left">demo1/demo1<br>demo2/demo2</h3><br>
<form action="<?echo $PHP_SELF;?>" method="POST">
Username: <input type="text" name="UserName"><br>
Password: <input type="password" name ="PassName"><br><br>
Paranoial Mode: <select name="IsParanoikal">
<option value="">No</option>
<option value="1" selected>Si</option>
</select><br><br>
<input type="hidden" name="StartSession" value="1">
<?if (eregi(".+\.php", $ur)){?>
<input type="hidden" name="ur" value="<?echo $ur;?>">
<?}?>
<input type="submit" value="login">
</form>
</body>
</html>
<??>
|