zoukankan      html  css  js  c++  java
  • 注册审核例题

    1.登录页面

    <!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>
        
       <form action="loginchuli.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>

    2.登录处理页面

    <?php
    $uid = $_POST["uid"];
    $pwd = $_POST["pwd"];
    
    include("../DBDA.class.php");
    $db = new DBDA();
    
    $sql = "select pwd from users where uid='{$uid}'";
    
    $mm = $db->StrQuery($sql);
    
    if($pwd != "" && $pwd==$mm)
    {
        $ssh = "select isok from users where uid='{$uid}'";
        $n = $db->StrQuery($ssh);
        if($n==1)
        {
            header("location:main.php");
        }
        else
        {
            echo "该账号还未经过审核";
        }
    }
    else
    {
        echo "用户名或密码错误";
    }

    3.主页面

    <!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%" border="1" cellpadding="0" cellspacing="0">
        <tr>
            <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]==1)
            {
                $zt = "<span style='color:green'>已通过</span>";
            }
            else
            {
                $zt = "<a href='shenhe.php?u={$v[0]}'>审核</a>";
            }
            
            echo "<tr><td>{$v[0]}</td><td>{$v[2]}</td><td>{$zt}</td></tr>";
        }
        ?>
        
    </table>
    
    </body>
    </html>

    4.审核页面

    <?php
    include("../DBDA.class.php");
    $db = new DBDA();
    
    $uid = $_GET["u"];
    
    $sql = "update users set isok=1 where uid='{$uid}'";
    
    $db->Query($sql,0);
    
    header("location:main.php");
  • 相关阅读:
    pdfobject (前台展示PDF插件)
    ERROR 19608 --- [ost-startStop-1] c.atomikos.persistence.imp.LogFileLock : ERROR: the specified log seems to be in use already: tmlog in D: ools omcatapache-tomcat-8.5.51in ransaction-logs
    文件上传下载(四) 读 txt 文本 ajaxfileupload
    1129
    centos服务器上部署项目(二) -tomcat
    Guns 打包
    centos服务器上部署项目(一) -jdk,mysql
    layui 学习笔记(四) 复杂表头前台Excel导出
    SpringCloud项目搭建(四) zuul
    sql的基本查询语句
  • 原文地址:https://www.cnblogs.com/zxl89/p/6048249.html
Copyright © 2011-2022 走看看