码迷,mamicode.com
首页 > 其他好文 > 详细

5月23 注册审核

时间:2016-05-23 14:34:09      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:

注册数据显示页面zhuce.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>
</head>

<body>
<h1>注册</h1>
<form action="zhucechuli.php" method="post">
<div>用户名:<input type="text" name="uid" /></div><br />

<div>密码:&nbsp;&nbsp;<input type="text" name="pwd" /></div><br />

<div>姓名:&nbsp;&nbsp;<input type="text" name="name" /></div><br />

<div>性别:&nbsp;&nbsp;<input type="text" name="sex" /></div><br />

<div>生日:&nbsp;&nbsp;<input type="text" name="birthday" /></div><br />

<div><input type="submit" value="注册" />&nbsp;&nbsp;&nbsp;&nbsp;
<a href="main.php"><input type="button" value="查看" /></a>
</div>

</form>
</body>
</html>
View Code

 

注册数据处理页面zhucechuli.php

技术分享
<?php

$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
$name = $_POST["name"];
$sex = $_POST["sex"];
$birthday = $_POST["birthday"];
//处理性别
$s = 1;
if($sex=="女")
{
    $s = 0;    
}

include("../DBDA.php");
$db = new DBDA();

$sql = "insert into users values(‘{$uid}‘,‘{$pwd}‘,‘{$name}‘,{$s},‘{$birthday}‘,‘‘,false)";
//echo $sql;

if($db->Query($sql,1))
{
    header("location:zhuce.php");    
}
View Code

 页面显示效果

技术分享

登录数据显示页面login.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>
</head>

<body>
<h1>登录</h1>
<form action="loginchuli.php" method="post">
<div>用户名:<input type="text" name="uid" /></div><br />

<div>密&nbsp;&nbsp;码:<input type="text" name="pwd" /></div><br />

<div><input type="submit" value="登录" />&nbsp;&nbsp;&nbsp;&nbsp;
<a href="main.php"><input type="button" value="前去审核" /><a></div>
</form>
</body>
</html>
View Code

 

登录数据处理页面loginchuli.php

技术分享
<?php
session_start();
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];

include("../DBDA.php");
$db = new DBDA();

$sql = "select count(*) from users where Uid = ‘{$uid}‘ and Pwd = ‘{$pwd}‘ and Isok =true";
$r = $db->StrQuery($sql);

if($r==1)
{
    $_SESSION["uid"] = $uid;
    header("location:main.php");
}
else
{
    header("location:login.php");
}
View Code

 页面显示效果

技术分享

审核数据显示页面main.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>
</head>

<body>
<h1>审核</h1>
<table width="100%" cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td>姓名</td>
        <td>性别</td>
        <td>生日</td>
        <td>操作</td>
    </tr>
<?php
  
include("../DBDA.php");
$db = new DBDA();

$sql = "select * from users";    
$attr = $db->Query($sql);

foreach($attr as $v)
{
    //审查的状态
    $zt = "";
    if($v[6])
    {
        $zt = "<span style=‘color:red‘>已通过审核&nbsp;&nbsp;<a href=‘chexiao.php?uid={$v[0]}‘>撤销</a></span>";
    }
    else
    {
        $zt = "<a href=‘mainchuli.php?uid={$v[0]}‘>审核</a>";
    }
    echo "<tr>
            <td>{$v[2]}</td>
            <td>{$v[3]}</td>
            <td>{$v[4]}</td>
            <td>{$zt}</td>
        </tr>";    
}


?> 
</table>
</body>
</html>
View Code

 

审核数量处理页面mainchuli.php

技术分享
<?php

$uid = $_GET["uid"];

include("../DBDA.php");
$db = new DBDA();

$sql = "update users set Isok = true where Uid = ‘{$uid}‘";
if($db->Query($sql,1))
{
    header("location:main.php");    
}
else
{
    echo "审核未通过";    
}
View Code

 

撤销审核处理页面chexiao.php

技术分享
<?php

$uid = $_GET["uid"];

include("../DBDA.php");
$db = new DBDA();

$sql = "update users set Isok = false where Uid = ‘{$uid}‘";
if($db->Query($sql,1))
{
    header("location:main.php");    
}
else
{
    echo "撤销失败";    
}
View Code

 页面显示效果

技术分享

5月23 注册审核

标签:

原文地址:http://www.cnblogs.com/Duriyya/p/5519441.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!