📄 admin_reg.asp
字号:
<!--#include file="mdb.asp"-->
<%Admin="UserAdmin"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/MD5.asp"-->
<%
'****************************************************
' Hxcms 7.5 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
response.end
end if
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
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
passwd1=md5(trim(replace(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>Hxcms管理系统——管理员注册管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=stylesheet>
</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=Hxcmsbk style="border-collapse: collapse">
<tr class=Hxcmsss>
<td width="100%" height="23">
<b>注册管理员帐号</b></td>
</tr>
<tr class=Hxcmsds>
<td>
用户名:<input name="admin_name" size="15" style="border-style: solid; border-width: 1">
<font color="#FF0000">*</font><font color="#808080"> 不能有空格,只能有字母/数字或 - _</font></td>
</tr>
<tr class=Hxcmsds>
<td>
登陆密码:<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 class=Hxcmsds>
<td>
确认密码:<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 class=Hxcmsqs>
<td height="23">
<p align="center">
<input name="b1" type="submit" value="提交">
<input name="b2" type="reset" value="清空"></p>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -