info.inc.phpÖ÷Òª×oÐ(C)ÅжϺÍÐÅÏ¢´¦Ài
<?php
function update($reginfo)
{
switch ($reginfo[4])
{
case ($reginfo[4]==1):
$reginfo[4]="ÄÐ";
break;
default:
$reginfo[4]="Å®";
break;
}
switch ($reginfo[11])
{
case ($reginfo[11]==1):
$reginfo[11]="»aÔ±";
break;
case ($reginfo[11]==2):
$reginfo[11]="°aeÖ÷";
break;
case ($reginfo[11]==3):
$reginfo[11]="¹ÜÀiÔ±";
break;
case ($reginfo[11]==4):
$reginfo[11]="Õ¾³¤";
break;
default:
$reginfo[11]="ÓοÍ";
break;
}
switch ($reginfo[6])
{
case ($reginfo[6]==5):
$reginfo[6]="ÎÒÊÇѧÉu";
break;
case ($reginfo[6]==1):
$reginfo[6]="¹«ÎñÔ±";
break;
case ($reginfo[6]==2):
$reginfo[6]="¹«Ë¾¹ÍÔ±";
break;
case ($reginfo[6]==3):
$reginfo[6]="×ÔÓÉÖ°Òµ";
break;
case ($reginfo[6]==4):
$reginfo[6]="ÎÞËuÊÂÊÂ";
break;
default:
$reginfo[6]="²»¸aeËßÄa";
break;
}
if ($reginfo[12]==1) $reginfo[12]="ÊÇ";
else $reginfo[12]=="*ñ";
if ($reginfo[18]==1) $reginfo[18]="ÊÇ";
else $reginfo[18]="*ñ";
if ($reginfo[12]==2)
{$reginfo[4]=$reginfo[4]." [±£ÃÜ]";
$reginfo[5]=$reginfo[5]." [±£ÃÜ]";
$reginfo[6]=$reginfo[6]." [±£ÃÜ]";
$reginfo[7]=$reginfo[7]." [±£ÃÜ]";
$reginfo[8]=$reginfo[8]." [±£ÃÜ]";
return $reginfo;
}
else
return $reginfo;
}
function uinfo($useinfo,$t)
{
if ($t==name) return eregi("^[a-zA-Z0-9][-~a-zA-Z0-9]{2,8}$",$useinfo); //ÅжÏÓû§Ãu
else if($t==oicq) return eregi("^[0-9]{1,10}$",$useinfo); //oicq
else if($t==pass) return eregi("^[a-zA-Z0-9]{1,8}$",$useinfo); //pass
else if($t==web) //web
{
$n=strstr($useinfo,'.');
if ($n&&strlen;($useinfo)>10)
{
$x[1]=substr($n,0,1);
$n=strstr(substr($n,1),'.');
$x[2]=substr($n,0,1);
if ($x[1]==$x[2]) return OK;
}
}
else return eregi("^[.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$useinfo); //ÓÊÏa
}
function err($mess)
{
echo "
function cuser($cookiem,$action)
{
if ($cookiem) //¼i²eÊÇñÓдËÓû§
{
$useinfo=$cookiem; //´o¿ªCOOKIE
$query="select from useinfo where usename='".$useinfo."'";
$req=mysql_query($query);
if ($req)
{
$user=mysql_fetch_array($req);
if ($useinfo==$user[0])
{
$useinfo=$user;
return $useinfo;
}
else
{
$useinfo[0]="";
$useinfo[2]="ÓοÍ";
return $useinfo;
}
}
else
{
$useinfo[0]="";
$useinfo[2]="ÓοÍ";
return $useinfo;
}
}
else if($action) //Èç¹u²»ÊÇ£¬Ôo¿´ÊÇñÓÐÐÅÏ¢´«Èe
{
$user=$action;
$query="select from useinfo where usename='".$user."'";
$req=mysql_query($query);
if ($req)
{
$user=mysql_fetch_array($req); //ÕÒµ½
if ($user[0]==$useinfo)
{
$useinfo==$user;
return $useinfo;
}
else
{
$useinfo[0]="";
$useinfo[2]="ÓοÍ";
return $useinfo;
}
}
else
{
$useinfo[0]="";
$useinfo[2]="ÓοÍ";
return $useinfo;
}
}
else
{
$useinfo[0]="";
$useinfo[2]="ÓοÍ";
return $useinfo;
} //¶¼Ã»ÓÐ
}
function err_info($mess)
{
echo "";
}
?>