时间: 2021-07-31 作者:daque
3、简略分子del.php3 <? require("common.php3"); $id=chop($id); if(!isset($id))error("请输出要简略的用户id !"); elseif($pwd<>$adminpass)error("处置员暗号缺点!"); else{ $data=dbmopen("class","w"); dbmdelete($data,$id); dbmclose($data); $data=dbmopen("password","w"); dbmdelete($data,$id); dbmclose($data); header("location:index.php3"); } ?> 4、公用文献common.php3 <? $adminpass="test"; function error($msg){ ?> <html><head><meta http-equiv="content-type" content="text/html; charset=utf8"> <link rel="stylesheet" href="style.css"><title>同窗录 堕落</title></head><body bgcolor="#ffffff"> <html><head></head><body bgcolor="#ffffff"><center><table border="0" width="80%" height="80%" cellspacing="0" cellpadding="0"> <tr><td width="100%"><table border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0"> <tr><td width="100%"><table border="0" cellspacing="1" width="100%" align=left height="320"> <tr><td width="100%" bgcolor="#ffb500" align=center height="31"><font color="#804000"><span style="font-size: 11pt">同窗录 堕落</span></font></td> </tr><tr><td width="100%" align=left height="247" bgcolor="#f7f7f7"><span style="font-size: 11pt"><p align="center"> 堕落因为:<font color="#ff0000"><? echo $msg;?></font></p><p align="center"><a href="javascript:history.go(-1);"><font color="#000000">请点这边归来上一页查看你的输出能否有误</font></a></p> <p align="center">[ <a href="javascript:history.go(-1);">归来上一页</a> ]</p></span></td></tr><tr><td width="100%" bgcolor="#ffb500" height="30"><p align="right"><span style="font-size: 9pt"><font color="#804000">copyright 200x y10k </font><font face="arial" color="#804000">.allrights reserved.</font></span></td> </tr></table></td></tr></table></td></tr></table></center></body></html> <? } ?> 5、登岸文献login.php3 <? require("common.php3"); if($submit){ $id=chop($id); if($id=="")error("请输出您的用户称呼!"); else{ $dbm=dbmopen("password","r"); if(!dbmexists($dbm,$id))error("没有这个用户称呼!"); else{ $pass=dbmfetch($dbm,$id); if($pass==$password){ setcookie("login",$id,time()+31536000); header("location:index.php3"); }else error("您的暗号不对!即使忘怀暗号,请运用忘怀暗号功效!"); } dbmclose($dbm); } }else{ ?> <html> <head> <title>深圳国学2000届高级中学(12)班同窗录:::版权一切:辛湜@深圳国学2000届高级中学(12)班</title> <meta http-equiv="content-type" content="text/html; charset=utf8"> <style type="text/css"> <!-- body {background: buttonface; border: 0;} #titlebar {text-align: left; width: 300; height: 20px; border: 0px solid navy; background: navy; color: white; font-family: verdana; font-size: 12px; font-weight: bold; padding: 3; padding-left: 15; z-index: 2;} #box {width: 300; border: 15px solid navy; border-top: 0; background: white; color: black; font-family: verdana; font-size: 12px; padding: 5; z-index: 1;} table {width: 240; margin: 10px; margin-top: 20px;} td {color: black; font-family: verdana; font-size: 12px;} .textinput {background: white; color: black; width: 160px; border-top: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee; } .button {font-family: verdana; font-size: 12px; background: navy; color: white; border-width: 1px;} .pos {width: 100%; height: 100%; text-align: center;} --> </style> </head> <body bgcolor="#ffffff" scroll="no"> <table class="pos"> <tr> <td> <div id="titlebar">深圳国学2000届高级中学(12)班同窗录</div> <div id="box"> <form action="login.php3"> <table width="348"> <tr> <td colspan="2"><label for="userinp" accesskey="u"><u>u</u>sername:</label> <input type="text" name="id" class="textinput" id="userinp"> </td> </tr> <tr> <td colspan="2"><label for="pwdinp" accesskey="p"><u>p</u>assword:</label> <input type="password" name="password" class="textinput" id="pwdinp"> </td> </tr> <tr> <td style="text-align: right"> <div align="left">>><a href="forgetpwd.php3">忘怀暗号点击这边</a><<</div> </td> <td style="text-align: right"> <input type="submit" value="登岸" class="button" name="submit"> <input type="button" value="备案" class="button" onclick="window.open('reg.php3')" name="button2"> </td> </tr> </table> </form> </div> </td> </tr> </table> </body> </html> <? } ?>