下面的程序是阿喔動感管理通用程序,,非常簡單不用解釋了吧!
if username="admin" and password="admin" then
請記得修改兩個admin分別用戶名和密碼!
login.ASP <HTML> <head> <title>管理者登陸</title> <link href=../../"DOWNLOAD.CSS"> </head> <body> <div><center> <table cellspacing="1"> <tr> <td> <form method="post" action="chklogin.ASP"> <table cellspacing="0" cellpadding="1" bordercolordark="#ecf5ff" bordercolorlight="#6699cc"> <tr> <td><table cellspacing="1" cellpadding="1"> <tr> <td>用戶名:</td> <td><input maxlength="20" size="20"> </td> </tr> <tr> <td>密 碼:</td> <td><input type="password" maxlength="16" size=& quot;20"> </td> </tr> <tr> <td colspan="2"></td> </tr> </table> </td> </tr> <tr> <td> <input type="submit" value="確 定"> <input type="reset" value="重 寫"> </td> </tr> </table> </form> <p> </td> </tr> </table> </center></div> </body> </HTML> __________________________________________________________________ chklogin.ASP <% dim sql dim rs dim seekerrs dim founduser dim username dim companyid dim password dim errmsg dim founderr founderr=false FoundUser=false username=request.form("username") password=request.Form("password") if username="" then response.redirect "index.ASP" end if if password="" then response.redirect "index.ASP" end if if username="admin" and password="admin" then response.cookies("adminok")=true response.redirect "manage.ASP" else response.redirect "index.ASP" end if %>