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 "
}
else if ($action==reg)
{
usemess("请在下表填写注册信息",'必填','必填','必填','必填','必填','必填','必填');
}
if ($action==add)
{
if ($useni)//如果有信息
{
for ($i=0;$i<10;$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("用户登录");
}
?>
相关推荐
- laravel学习教程之存取器
- laravel学习教程之关联模型
- 简单解析PHP程序的运行流程
- PHP预定义变量9大超全局数组用法详解
- composer.lock文件的作用
- PHP编程入门的基本语法知识点总结
- windows8.1下Apache+Php+MySQL配置步骤
- ASP基础知识Command对象讲解
- PHP网站建设的流程与步骤分享
- PHP易混淆知识整理笔记
- php 函数使用方法与函数定义方法
- php for 循环语句使用方法详细说明
- php 输出双引号"与单引号'的方法
- php 获取select下拉列表框的值
- PHP 面向对象 PHP5 中的常量
- PHP 面向对象 final类与final方法
- php empty函数判断mysql表单是否为空
- php+mysql 实现身份验证代码
- PHP初学者常见问题集合 修正版(21问答)
- PHP中基本符号及使用方法