?? admin_reg.asp
字號:
<%Admin="UserAdmin"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<%
'==========================================
'程序名稱:聽雪資源網管理系統
'主頁地址:http://www.26q.net
'最后修改時間:2005-07-20
'==========================================
if request("type")="save" then
server_vv=len(Request.ServerVariables("SERVER_NAME"))
server_v1=left(Cstr(Request.ServerVariables("HTTP_REFERER")),server_vv)
server_v2=left(Cstr("http://"&Request.ServerVariables("SERVER_NAME")),server_vv)
if server_v1<>server_v2 and server_v1<>"" and server_v2<>"" then
response.write("<script>alert('錯誤:禁止從站點外部提交數據!.')</script>")
response.end
end if
if request.form("admin_name")="" or request.form("admin_password1")="" or request.form("admin_password2")="" then
response.write("<script>alert('錯誤:帶*號的不能為空!');history.go(-1)</script>")
response.end
end if
if request.form("admin_password1")<>request.form("admin_password2") then
response.write("<script>alert('錯誤:兩次輸入密碼不相同!');history.go(-1)</script>")
response.end
end if
%>
<!--#include file="mdb.asp"-->
<!--#include file="char.inc"-->
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from admin where admin_name='"&request("admin_name")&"'",conn,1,1
if not rs.eof then
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<script>alert('錯誤:用戶名已存在,請改名!');history.go(-1)</script>")
response.end
end if
rs.close
%>
<!--#include file="inc/MD5.asp"-->
<%
passwd1=md5(trim(checkStr(request.form("admin_password1"))))
rs.open "select * from admin where (admin_id is null)",conn,1,3
rs.addnew
rs("admin_name")=request("admin_name")
rs("admin_password")=passwd1
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<script>alert('成功:注冊帳號完成,請點擊進入帳號權限設置!("&mgs&")');location.href='admin_list.asp'</script>")
response.end
end if
%>
<html>
<head>
<title>用戶注冊</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/admin.css" type="text/css">
</head>
<body topmargin="0" leftmargin="0">
<form action="admin_reg.asp" method="post">
<input type="hidden" name="type" value="save">
<div align="center">
<br>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
<tr class=lanyuss>
<td width="100%" height="23">
<b>注冊管理員帳號</b></td>
</tr>
<tr>
<td width="100%">
用戶名:<input name="admin_name" size="15" style="border-style: solid; border-width: 1">
<font color="#FF0000">*</font><font color="#808080"> 不能有空格,只能有字母/數字或 - _</font></td>
</tr>
<tr>
<td width="100%">
登陸密碼:<input name="admin_password1" size="15" style="border-style: solid; border-width: 1" type="password">
<font color="#FF0000">*</font><font color="#808080">
同上</font></td>
</tr>
<tr>
<td width="100%">
確認密碼:<input name="admin_password2" size="15" style="border-style: solid; border-width: 1" type="password"><font color="#808080"> </font>
<font color="#FF0000">*</font><font color="#808080">
同上</font></td>
</tr>
<tr>
<td height="23">
<p align="center">
<input name="b1" type="submit" value="提交">
<input name="b2" type="reset" value="清空"></p>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -