1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title>无标题文档</title> 6 </head> 7 8 <body> 9 <h1>注册审核</h1> 10 11 <table border="1" width="100%" cellpadding="0" cellspacing="0"> 12 <tr> 13 <td>用户名</td> 14 <td>姓名</td> 15 <td>生日</td> 16 <td>序号</td> 17 <td>状态</td> 18 </tr> 19 <?php 20 21 include("haoyou.php"); 22 $db = new haoyou(); 23 24 $sql = "select * from Users"; 25 26 $attr = $db->Query($sql); 27 28 for($i=0; $i<count($attr);$i++) 29 { 30 31 echo "<tr> 32 <td>{$attr[$i][0]}</td> 33 <td>{$attr[$i][2]}</td> 34 <td>{$attr[$i][3]}</td> 35 <td>{$attr[$i][4]}</td>"; 36 37 if($attr[$i][5]) 38 { 39 echo "<td><span style='background-color:green'>已通过</span></td>"; 40 } 41 else 42 { 43 echo "<td><a href='sh.php?uid={$attr[$i][0]}'>审核</a></td>"; 44 } 45 46 echo "</tr>"; 47 } 48 49 ?> 50 </table> 51 52 </body> 53 </html> 54 55 //审核页 56 57 <?php 58 59 $uid = $_GET["uid"]; 60 61 include("haoyou.php"); 62 63 $db = new haoyou(); 64 65 $sql = "update Users set IsOk = true where Uid = '{$uid}'"; 66 67 $db->Query($sql,0); 68 69 header("Location:shenhe.php");
注册审核
| 用户名 | 姓名 | 生日 | 序号 | 状态 |
| lch | 张三 | 1988-02-03 | p001 | 已通过 |
| lisi | 李四 | 1988-02-03 | p002 | 已通过 |
| maqi | 马奇 | 1988-05-06 | p003 | 已通过 |
| wangyu | 王五 | 1978-04-05 | p004 | 已通过 |
| zhaoliu | 赵六 | 1990-04-05 | p005 | 已通过 |