如谁有详细的SPHERE0.51的脚本开发资料,请与我联系。万分感谢。或者有熟悉限制变速齿轮程序员也行。
QQ:8397412
这个是为纪念我自己的辉煌站而写的帐号注册及自动开通程序
为防止帐号BUG,必须通过管理员审核,支持查询功能,必须有数据库支持,要数据库的请与我联系。
两种方式开通,一种是在UO服务器上设置IIS,即可审核后立即把帐号写入临时帐号文件,或者就是为了安全只在网页服务器上生成,但不立即写到UO服务器,通过手工上传写入。
reg.asp注册页面
--------------------
<!--#include file="conn.asp"-->
<!--#include file="check_si.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>辉煌一站 - 用户帐号注册</title>
<link rel=stylesheet href="zjbase.css">
</head>
<body>
<div align="center">
<center>
<table border="0" width="500">
<tr>
<td width="100%">
<form method="POST" action="add_reg.asp">
<table border="0" width="100%" height="194">
<tr>
<td width="100%" align="right" colspan="2" height="25">
<p align="center">Ultima Online 帐号注册系统</td>
</tr>
<tr>
<td width="33%" align="right" height="25">用户名:</td>
<td width="67%" height="25"><input type="text" name="admin_name" size="20"></td>
</tr>
<tr>
<td width="33%" align="right" height="25">输入密码:</td>
<td width="67%" height="25"><input type="password" name="admin_pwd" size="20"></td>
</tr>
<tr>
<td width="33%" align="right" height="25">再次输入密码:</td>
<td width="67%" height="25"><input type="password" name="admin_pwd1" size="20"></td>
</tr>
<tr>
<td width="33%" align="right" height="25">EMAIL:</td>
<td width="67%" height="25"><input type="text" name="admin_email" size="29"></td>
</tr>
<tr>
<td width="33%" height="27"></td>
<td width="67%" height="27">
<p align="center"><input type="submit" value="立即注册" name="B1"></td>
</tr>
<tr>
<td width="100%" colspan="2" height="14">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" width="500" height="49">
<tr>
<td width="100%" height="27">
<p align="center">查询帐号开通状态</td>
</tr>
<tr>
<td width="100%" height="14">
<form method="POST" action="reg.asp?action=cx">
<table border="0" width="100%">
<tr>
<td width="34%"></td>
<td width="66%"></td>
</tr>
</center>
<tr>
<td width="34%">
<p align="right">请输入您的注册帐号:</td>
<center>
<td width="66%"><input type="text" name="admin_name" size="20"></td>
</tr>
<tr>
<td width="34%"></td>
<td width="66%">
<p align="center"><input type="submit" value="立即查询" name="B1"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
<%
if request("action")="cx" then
admin_name=trim(request("admin_name"))
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from users where admin_name='"&admin_name&"'"
rs.open sql,conn,1,1
%>
<div align="center">
<center>
<table border="0" width="500">
<tr>
<td width="100%"><%if rs.eof then%>您好,帐号:<%=admin_name%>尚未注册,请先注册。<%else%>您好,帐号<%=admin_name%>开通状态为:<%if rs("admin_sh")=true then response.write "已开通" else response.write "未开通" end if%>,注册时间为:<%=rs("admin_time")%><%if rs("admin_sh")=true then%>审核时间为:<%=rs("admin_shtime")%><%end if%><%end if%></td>
</tr>
</table>
</center>
</div>
<%
rs.close
set rs=nothing
end if%>
<div align="center">
<center>
<table border="0" width="500" height="41">
<tr>
<td width="100%" height="37">
<table border="1" width="100%" bordercolorlight="#C0C0C0" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" height="37">
<tr>
<td width="25%" height="18" align="center">注册邮箱</td>
<td width="25%" height="18" align="center">开通状态</td>
<td width="25%" height="18" align="center">注册时间</td>
<td width="25%" height="18" align="center">开通时间</td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select top 20 * from users order by id desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
<tr>
<td width="25%" height="19" align="center"><%=rs("admin_email")%></td>
<td width="25%" height="19" align="center"><%=rs("admin_sh")%></td>
<td width="25%" height="19" align="center"><%=rs("admin_time")%></td>
<td width="25%" height="19" align="center"><%=rs("admin_shtime")%></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
</td>
</tr>
<tr>
<td width="100%" height="37">
<p align="center">技术支持:老苦 QQ:8397412</td>
</tr>
</table>
</center>
</div>
</body>
<%
conn.close
set conn=nothing
%>
</html>
--------------------------
add_reg.asp 注册成功页面
--------------------------
<!--#include file="conn.asp"-->
<!--#include file="check_si.asp"-->
<head>
<title>注册成功</title>
<link rel=stylesheet href="zjbase.css">
<%
dim admin_name,admin_pwd,admin_pwd1,admin_email
admin_name=trim(request("admin_name"))
admin_pwd=trim(request("admin_pwd"))
admin_pwd1=trim(request("admin_pwd1"))
admin_email=trim(request("admin_email"))
if admin_name="" or admin_pwd="" or admin_pwd1="" or admin_email="" then
response.write "所有选项都为必填,请后退重填!"
response.end
end if
if admin_pwd<>admin_pwd1 then
response.write "两次密码不符,请后退重填!"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from users where admin_name='"&admin_name&"'"
rs.open sql,conn,1,3
if not rs.eof then
response.write "用户名已经存在,请重填"
respnose.end
else
rs.addnew
rs("admin_name")=admin_name
rs("admin_pwd")=admin_pwd
rs("admin_email")=admin_email
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "用户已经成功注册!审核通过后即可登录游戏,谢谢您的支持。"
end if
%>
</head>
----------------------
审核开通页面 sh.asp
------------------
<%
admin_name=trim(request("admin_name"))
admin_pwd=trim(request("admin_pwd"))
If not request.Form("admin_name")="" then
Set fso=Server.CreateObject("Scripting.FileSystemobject")
textfile1=server.mapPath("SPHEREacct.scp")
set cnrs=fso.OpenTextFile(textfile1,8)
cnrs.WriteLine("["&Request.Form("admin_name")&"]")
cnrs.WriteLine("PASSWORD="&Request.Form("admin_pwd"))
cnrs.writeline(vbcrlf)
cnrs.Close
end if
%>文档内容更新如下:<%
Set fso=Server.CreateObject("Scripting.FileSystemObject")
textfile1=server.mapPath("SPHEREacct.scp")
set cnrs=fso.OpenTextFile(textfile1,1)
while not cnrs.AtEndOfStream
Response.Write " " & cnrs.ReadLine
wend
cnrs.close%>
------------------------
清除临时帐号文件里信息的页面
------------------------
<%Set fso=Server.CreateObject("Scripting.FileSystemobject")
textfile1=server.mapPath("SPHEREacct.scp")
Set txt = fso.CreateTextFile(textfile1)
txt.close
%>
帐号文件已经清空,可以添加新用户。