思路

用户注册后就有该条用户记录,你对用户表设一个“审核状态”字段,默认值设为“未审核”,然后你写几句审核代码做成一个功能,按照你们的意愿若审核通过你把审核状态改为“已审核”就行了。用户想进行各种操作时,你先判断一下审核状态字段,若未审核则阻止并给出一些提示信息,否则放行。

注册页面

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.a
{
top:100px;
height:400px;
width:%;
left:%;
position:absolute;
border:2px solid #F00;
}
.b
{
margin-top:10px;
width:%;
height:20px;
left:%; }
.btn1
{
width:60px;
height:30px;
margin-right:10px; }
.btn2
{
width:60px;
height:30px;
margin-left:10px;
}
</style>
</head> <body> <div class="a"><form action="zhucechuli.php" method="post" enctype="multipart/form-data">
<span<h1>注册</h1></span>
<div class="b">用户名<input type="text" id="uid"/></div>
<div class="b">密&nbsp;码<input type="text" name="pwd"/></div>
<div class="b">姓&nbsp;名<input type="text" name="name"/></div>
<div class="b">性&nbsp;别<input type="text" name="sex"/></div>
<div class="b">生&nbsp;日<input type="text" name="birthday"/></div>
<div class="b">头&nbsp;像<input type="file" name="file"/></div>
<div class="b" align="left"><input type="submit" class="btn1" value="注册" /><input type="button" class="btn2" value="取消"/></div>
</form>
</div>
</body>
</html>

注册处理页面

<?php
include ("../DBDA.class.php");
$db=new DBDA();
//控制上传文件大小和格式
if(($_FILES["file"]["type"]=="image/jpeg"||$_FILES["file"]["type"]=="image/png")&& $_FILES["file"]["size"]<=)
{
//处理文件名
$filename="./img/".time().$_FILES["file"]["name"];
//转编码格式
$filename=iconv("UTF-8","gb2312",$filename);
//判断文件是否存在
if(!file_exists($filename))
{ //上传保存
move_uploaded_file($_FILE["file"]["tmp"],$filename);
}
}
$uid=$_POST["uid"];
$pwd=$_POST["pwd"];
$name=$_POST["name"];
$sex=$_POST["sex"];
$birthday=$_POST["birthday"];
$isok=;
$url="/lianxi/zhuceyanzheng/".$filename;
$sql="insert user values('','{$uid}','{$pwd}','{$name}','{$sex}','{$birthday}','{$url}'),'{$isok}'";
$result=$db->Query($sql);
if($result)
{
header("location:denglu.php");
}
else
{
echo "注册失败";
}

注册审核页面

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head> <body> <table align="center" border="" >
<tr>
<td>用户名</td>
<td>密码</td>
<td>姓名</td>
<td>性别</td>
<td>生日</td>
<td>头像</td>
<td>操作</td>
<?php
session_start();
if(empty($_SESSION["uid"]))
{
header("location:denglu.php");
exit();
}
include("../DBDA.class.php");
$db=new DBDA();
$sql="select * from user ";
$attr=$db->Query($sql);
foreach ($attr as $v)
{
//处理性别
if($v[]==)
{
$a="男";
}
else if ($v[]==)
{
$a="女";
}
//处理操作
$str="";
if($v[]==)
{
$str="<a href='shenhechuli.php?id={$v[0]}'>审核</a>";
}
else if($v[]==)
{
$str="<span><font color='#00FFFF'>已通过</font></span> ";
}
echo "<tr>
<td>{$v[]}</td>
<td>{$v{}}</td>
<td>{$v[]}</td>
<td>{$a}</td>
<td>{$v[]}</td>
<td>{$v[]}</td>
<td>{$str}</td>
</tr>";
} ?>
</tr>
</table>
</body>
</html>

审核处理

<?php
$id=$_GET["id"];
include ("../DBDA.class.php");
$db=new DBDA();
$sql="update user set isok='2' where id='{$id}'";
$result=$db->Query($sql,);
if($result)
{
header("location:denglushenhe.php");
}

登录页面

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.a
{
top:100px;
height:400px;
width:%;
left:%;
position:absolute;
border:2px solid #F00;
}
.b
{
margin-top:10px;
width:%;
height:20px;
left:%; }
.btn1
{
width:60px;
height:30px;
margin-right:10px; }
.btn2
{
width:60px;
height:30px;
margin-left:10px;
}
</style>
</head> <body> <div class="a"><form action="dengluchuli.php" method="post" >
<span<h1>登录</h1></span>
<div class="b">用户名<input type="text" name="uid"/></div>
<div class="b">密&nbsp;码<input type="text" name="pwd"/></div>
<div class="b" align="left"><input type="submit" class="btn1" value="登录" /><input type="button" class="btn2" value="取消"/></div>
</form>
</div>
</body>
</html>

登录处理

<?php
$uid=$_POST["uid"];
$pwd=$_POST["pwd"];
include ("../DBDA.class.php");
$db=new DBDA();
$sql="select pwd from user where uid='{$uid}'";
$atrr=$db->Query($sql);
$mima=$atrr[][];
$sql1="select isok from user where uid='{$uid}'";
$atrr1=$db->Query($sql1);
$isok=$atrr1[][];
if($uid!=""&&$pwd!="")
{
if ($uid==$mima &&($isok==||$isok==))
{
$_SESSION["uid"]=$uid;
header("location:index");
}
else
{
echo "审核未通过或密码错误";
}
}

php注册审查的更多相关文章

  1. [转]Windows系统注册表知识完全揭密

    来源:http://www.jb51.net/article/3328.htm Windows注册表是帮助Windows控制硬件.软件.用户环境和Windows界面的一套数据文件,注册表包含在Wind ...

  2. IE浏览器审查密码的清除

    上周去188工业区,总装厂的喷油部的电脑上被谁设置了IE的审查密码,后来通过电话沟通,运维岗给出了具体的解决方法: 进入注册表HKEY_LOCAL_MACHINE\Software\Microsoft ...

  3. 黑客常用的windows注册表大全

    目录 使系统没有"运行"选项                        1让操作系统无"关闭系统" 选项                    2让操作系统 ...

  4. 【转】如何打开注册表编辑器中存储用户信息的SAM文件?

    sam文件怎么打开 (Security Accounts Manager安全帐户管理器)负责SAM数据库的控制和维护.SAM数据库位于注册表HKLM\SAM\SAM下,受到ACL保护,可以使用rege ...

  5. 常用的windows注册表大全

    目录 使系统没有“运行”选项                        1让操作系统无“关闭系统” 选项                    2让操作系统无“注销”选项              ...

  6. DiskGenius注册算法简析

    初次接触DiskGenius已经成为遥远的记忆,那个时候还只有DOS版本.后来到Windows版,用它来处理过几个找回丢失分区的案例,方便实用.到现在它的功能越来越强大,成为喜好启动技术和桌面支持人员 ...

  7. 巧用网页开发者工具F12 审查、修改元素、去除广告、屏蔽遮罩

    巧用网页开发者工具F12 审查.修改元素.去除广告.屏蔽遮罩 每当打开一个网页的时候,是否为页面有很多广告而烦恼:是否为要操作页面(例如观看超清视频),请先注册登录等等事情而麻烦:是否对网页加锁的视频 ...

  8. Upsource——对已签入的代码进行分享、讨论和审查代码

    Upsource 一.Upsource简介 Upsource ,这是一个专门为软件开发团队所设计的源代码协作工具.Upsource能够与多种版本控制工具进行集成,包括Git.Mercurial.Sub ...

  9. OWASP SSL 高级审查工具

    http://www.linuxidc.com/Linux/2016-03/129164.htm InfoWorld 在部署.运营和保障网络安全领域精选出了年度开源工具获奖者. 最佳开源网络和安全软件 ...

随机推荐

  1. 【BZOJ】1636: [Usaco2007 Jan]Balanced Lineup(rmq+树状数组)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1636 (我是不会说我看不懂题的) 裸的rmq.. #include <cstdio> # ...

  2. hdu 1233 还是畅通project

    本题链接:点击打开链接 本题大意: 有n个村庄,n*(n-1)/2条路,输入每条路所连接是哪两个村庄及长度,求使全部村庄均连通(并不是都两两连通) 所铺公路的最短路程. 解题思路: 使用并查集基础及K ...

  3. ERROR: openstack Error finding address for http://10.16.37.215:9292/v1/images: [Errno 32] Broken pipe

    Try to set: no_proxy=10.16.37.215 this should help 转自: http://askubuntu.com/questions/575938/error-i ...

  4. char[]与TCHAR[]互相转换引发的一个问题!

      软件的一个驱动由于开发的年代比较久一些,使用的是非Unicode编码,而当前新的软件使用的是Unicode编码,于是将非Unicode驱动用于Unicode软件上时,就出现了问题! 问题就出现在非 ...

  5. Sql创建约束

    add constraint pk_studentno primary key(StudentNo) //主键 add constraint fk_student_grade_gradeid fore ...

  6. centos6安装系统时选包

    date: 2018-06-05   11:44:06 1,系统:minimal   2,包组:     Base System :  Base.Compatibility libraries.Deb ...

  7. LeetCode-Water and Jug Problem

    You are given two jugs with capacities x and y litres. There is an infinite amount of water supply a ...

  8. LeetCode 笔记系列16.2 Minimum Window Substring [从O(N*M), O(NlogM)到O(N),人生就是一场不停的战斗]

    题目:Given a string S and a string T, find the minimum window in S which will contain all the characte ...

  9. Java--运算符的优先级表

    Java运算符的优先级表:

  10. _init_() got an unexpected keyword argument ‘shape’

    按照<TensorFlow:实战Google深度学习框架>一书学习的tensorflow,书中使用的是0.9.0版本,而我安装的是1.11.0 如果按照书上的例子来,因为这本书使用tens ...