• 注册审核


    <!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>
    <h3>注册</h3>
    <form action="zcchuli.php" method="post">
    <div>用户名<input type="text" name="uid" /></div>
    <div>密码<input type="text" name="pwd" /></div>
    <div>姓名<input type="text" name="name" /></div>
    <div>性别<input type="text" name="sex" /></div>
    <div>生日<input type="text" name="birthday" /></div>
    <div><input type="submit" value="注册"/></div>
    </form>
    
    
    
    
    </body>
    </html>
    注册

    <?php
    $uid=$_POST["uid"];
    $pwd=$_POST["pwd"];
    $name=$_POST["name"];
    $sex=$_POST["sex"];
    $birthday=$_POST["birthday"];
    $sex=$sex=="男"?true:false;
    
    include("../DBDA.class.php");
    $db=new DBDA();
    $sql="insert into users values('{$uid}','{$pwd}','{$name}','{$sex}','{$birthday}',false)";
    if($db->Query($sql,0))
    {
        header("location:denglu.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>
    <h3>登陆</h3>
    <form action="dlchuli.php" method="post">
    <div>用户名<input type="text" name="uid" /></div>
    <div>密码<input type="text" name="pwd" /></div>
    <div><input type="submit" value="登陆"/></div>
    </form>
    
    
    
    </body>
    </html>
    
    
    <?php
    
    session_start();
    $uid=$_POST["uid"];
    $pwd=$_POST["pwd"];
    include("../DBDA.class.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:zhuye.php");
        
        }
    else{
        header("location:denglu.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>
    <h3>审核</h3>
    <table width="100%" border="1" cellpadding="0" cellspacing="0">
               <tr>
               <td>姓名</td>
               <td>性别</td>
               <td>生日</td>
               <td>状态</td>
               </tr>
    <?php
    include("../DBDA.class.php");
    $db=new DBDA();
    $sql="select * from users";
    $attr=$db->Query($sql);
    foreach($attr as $v)
    {
        $zt="";
        if($v[5])
        {
            $zt="<span>已通过</span><a href='chexiao.php?uid=$v[0]'>撤销</a>";
            }
        else{
            $zt="<a href='shenhe.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>
    主页面
    <?php
    $uid=$_GET["uid"];
    include("../DBDA.class.php");
    $db = new DBDA();
    $sql="update users set isok=true where uid='{$uid}'";
    if($db->Query($sql,0))
    {
        header("location:zhuye.php");
        
        }
    else{
        echo"审核失败!";
        
        }
    
    
    
    
    ?>
    审核
    <?php
    $uid=$_GET["uid"];
    include("../DBDA.class.php");
    $db = new DBDA();
    $sql="update users set isok=false where uid='{$uid}'";
    if($db->Query($sql,0))
    {
        header("location:zhuye.php");
        
        }
    else{
        echo"撤销失败!";
        
        }
    
    
    
    
    ?>
    撤销审核

  • 相关阅读:
    Kinect关于PlayerIndex和SkeletonId之间的关系。
    记一次“应用程序之间的通信”过程(1/2)
    C# p-Inovke C++动态链接库
    我写了本破书-swift语言实战晋级
    swift语言实战晋级-第9章 游戏实战-跑酷熊猫-9-10 移除平台与视差滚动
    swift语言实战晋级-第9章 游戏实战-跑酷熊猫-7-8 移动平台的算法
    Swift语言实战晋级-第9章 游戏实战-跑酷熊猫-5-6 踩踏平台是怎么炼成的
    Swift语言实战晋级-第9章 游戏实战-跑酷熊猫-4 熊猫的跳和打滚
    Swift语言实战晋级-第9章 游戏实战-跑酷熊猫-3 显示一个动态的熊猫
    Swift语言实战晋级-第9章 游戏实战-跑酷熊猫-2 创建熊猫类
  • 原文地址:https://www.cnblogs.com/yuchao19950412/p/5539401.html
Copyright © 2020-2023  润新知