继上次发的探探风声:红 宝 网 络 打 字 系 统 V9. ..后,论坛中很多朋友都很有兴趣,特别是zhbds修正的免费打字-agan完善版最后更新(ag),非常好用,现在我也用上了。让学生在这系统中练习,有中足够的积分时可玩带的FLASH游戏,我在金山打字中利用到了打字系统中的积分,积分到达一定时才能运行金山打字。
自己再写了个文件:
<%
Set hbwl=Server.CreateObject("hbwlAspDll.dbClass")
if err<>0 then
response.Write("对不起!<br /><br />请先在你服务器的这个位置"&server.MapPath("./")&"<br /><br />双击“<font color=red>注册组件.bat</font>”这个文件进行hbwlAspDll组件注册。<br /><br />谢谢!")
response.end
end if
hbwl.dbType="ACCESS" '数据库类型,可设置SQL或ACCESS
select case UCase(hbwl.dbType)
case "ACCESS":
'是ACCESS数据库时需设置的数据库路径及名称
hbwl.database="database\#dazi.mdb" '数据库路径及数据库名
case "SQL":
'是SQL数据库时需设置的内容
hbwl.sqlservername=".\sqlexpress"
hbwl.database="dazi"
hbwl.sqluid="sa"
hbwl.sqlpwd="sa123456"
end select
hbwl.connOpen '打开数据库
caozuo=request.QueryString("caozuo")
username=request.QueryString("username")
userpass=request.QueryString("userpass")
fenshu=request.QueryString("fenshu")
select case caozuo
case "select":
sql="select 积分 from 用户 where 登录账号='"&username&"' and 登录密码='"&userpass&"'"
response.Write(hbwl.dbShsl(sql))
'response.Write(sql)
case "update":
hbwl.conn.execute("update 用户 set 积分=积分-300 where 登录账号='"&username&"' and 登录密码='"&userpass&"'")
response.Write("True")
case "":
response.Write("<script>parent.location.href='index.asp';</script>")
end select
%>
让金山打字游戏启动前读取积分(readfs.asp?caozuo=select&username=***&userpass=***),扣除积分(readfs.asp?caozuo=update&username=***&userpass=***)
因为采用了不同的数据库,在整合方面不方便,用户多同时操作还可能卡死。于是想到了另外做一个打字程序,可以进行打字练习获取积分,得到积分后再允许运行不同的程序。

目前还只是初稿