我的论坛源代码八
程序员文章站
2022-04-29 17:08:54
...
reguse.php用户注册与登录页面
if ($action==dl&&$uname)
{
$uinfo=$uname."|".$upass;
setcookie("FlyFoxNet",$uinfo,time()+3600);
}
?>
用户注册
include "linkfox.inc.php";
include "info.inc.php";
include "reguse.inc.php";
function dlokey($user) //登录成功显示
{
echo "";
echo "";
";
}
?>
if ($action==xy)
{
echo "
";
echo "
if ($action==dl&&$uname)
{
$uinfo=$uname."|".$upass;
setcookie("FlyFoxNet",$uinfo,time()+3600);
}
?>
include "linkfox.inc.php";
include "info.inc.php";
include "reguse.inc.php";
function dlokey($user) //登录成功显示
{
echo "";
echo "
|
}
?>
| ||||
| | | ||
当前位置:狐网─>狐网论坛─>会员注册
| | | |
if ($action==xy)
{
echo "
"; echo "
echo " |
echo "
";
echo "
echo "
";
}
else if ($action==reg)
{
usemess("请在下表填写注册信息",'必填','必填','必填','必填','必填','必填','必填');
}
if ($action==add)
{
if ($useni) //如果有信息
{
for ($i=0;$i {
if ($bq[$i]) $usebq=$bq[$i];
}
$reginfo=reg($usename,$usepass,$usemail,$useweb,$useni,$useoicq,$usesex,$useage,$usezy,$useaddr,$useinf,$usety,$usebq,$useqm);
switch ($reginfo)
{
case ($reginfo==1):
usemess("错误!用户名超长",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==2):
usemess("错误!密码超长",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==3):
usemess("错误!oicq号非法",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==4):
usemess("错误!用户密码含有非法字符",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==5):
usemess("错误!用户名含有非法字符",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==6):
usemess("错误!非法OICQ号",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==7):
usemess("错误!非法EMAIL地址",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==8):
usemess("非常报歉!这个用户已经存在,请重新选择",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==9):
usemess("未知错误!",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==10):
usemess("写入数据库错误,请与黑暗居士联系",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
default:
$reginfo=update($reginfo);
regok("注册成功,以下是你的个人信息",$reginfo);
break;
}
}
else usemess("请填写好你的信息",'必填','必填','必填','必填','必填','必填','必填');
}
if ($action==dl) //登录函数
{
if ($uname)
{
$query="select usepass,usename,enddate,useni from useinfo where usename='".$uname."'"; //检查是否存在用户
$req=@mysql_query($query);
if ($req)
{
$user=@mysql_fetch_array($req);
if ($user[0]==$upass) //检查口令是否正确
{
$time=date(Y年n月j日G时i分);
$query="update useinfo set enddate='$time' where usename='".$uname."'";
$req=@mysql_query($query);
if ($req) dlokey($user);
else dlmes("数据登录错误!");
}
else dlmes("用户密码不正确,请校验!");
}
else dlmes("不能找到用户信息,请确认!如果还未注册,请点击这里");
}
else dlmes("用户登录");
}
?>
}
else if ($action==reg)
{
usemess("请在下表填写注册信息",'必填','必填','必填','必填','必填','必填','必填');
}
if ($action==add)
{
if ($useni) //如果有信息
{
for ($i=0;$i {
if ($bq[$i]) $usebq=$bq[$i];
}
$reginfo=reg($usename,$usepass,$usemail,$useweb,$useni,$useoicq,$usesex,$useage,$usezy,$useaddr,$useinf,$usety,$usebq,$useqm);
switch ($reginfo)
{
case ($reginfo==1):
usemess("错误!用户名超长",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==2):
usemess("错误!密码超长",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==3):
usemess("错误!oicq号非法",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==4):
usemess("错误!用户密码含有非法字符",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==5):
usemess("错误!用户名含有非法字符",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==6):
usemess("错误!非法OICQ号",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==7):
usemess("错误!非法EMAIL地址",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==8):
usemess("非常报歉!这个用户已经存在,请重新选择",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==9):
usemess("未知错误!",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==10):
usemess("写入数据库错误,请与黑暗居士联系",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
default:
$reginfo=update($reginfo);
regok("注册成功,以下是你的个人信息",$reginfo);
break;
}
}
else usemess("请填写好你的信息",'必填','必填','必填','必填','必填','必填','必填');
}
if ($action==dl) //登录函数
{
if ($uname)
{
$query="select usepass,usename,enddate,useni from useinfo where usename='".$uname."'"; //检查是否存在用户
$req=@mysql_query($query);
if ($req)
{
$user=@mysql_fetch_array($req);
if ($user[0]==$upass) //检查口令是否正确
{
$time=date(Y年n月j日G时i分);
$query="update useinfo set enddate='$time' where usename='".$uname."'";
$req=@mysql_query($query);
if ($req) dlokey($user);
else dlmes("数据登录错误!");
}
else dlmes("用户密码不正确,请校验!");
}
else dlmes("不能找到用户信息,请确认!如果还未注册,请点击这里");
}
else dlmes("用户登录");
}
?>
以上就介绍了 我的论坛源代码八,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
上一篇: 什么是js的栈堆
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论