?? admin_admin_err.asp
字號:
<!--#include file="Const.Asp"-->
<%CheckAdmin3%>
<%
founderr=false
username=request.form("username")
password=request.form("password")
oskey=request.form("oskey")
if username="" or password="" then
errmsg=errmsg+"<br>"+"<li>管理員名稱和密碼都不能為空!"
founderr=true
call error()
Response.End
end if
set rs=server.CreateObject("ADODB.RecordSet")
if request("act")="edit" and request.QueryString("id")<>"" then
id=request("id")
sql="select * from admin where id="& request.QueryString("id")
rs.open sql,conn,3,2
if not rs.eof then
rs("oskey")=oskey
rs("Username")=username
if Request.Form("password")<> Rs("password") then
Rs("password") = md5(Request.Form("password"))
end if
rs.update
end if
rs.close
elseif request("act")="add" then
sql="select * from admin where username='"&username&"'"
rs.open sql,conn,3,2
if (rs.eof and rs.bof) then
rs.addnew
rs("oskey")=oskey
rs("Username")=UserName
Rs("password") = md5(Request.Form("password"))
rs.update
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
response.redirect "Admin_Admin.Asp"
%>
<html></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -