标题:求助,大家都进来帮忙修改下程序asp
只看楼主
huxinyu
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-4-15
 问题点数:0 回复次数:0 
求助,大家都进来帮忙修改下程序asp
asp程序,,手机网站,大家帮下帮,,写了两次了,,郁闷,,就是有两个程序,一个是第一版,,一个是第二版,,两个错的不多,,差别是,第一个acc的数据库,不能用电脑访问,第二个mssql数据库,可以wap1.2和wap2.0自动切换,可以用IE直接浏览,,下面部分源码,大家看看,,acc和
mssql对比的,,功能一样~~~~
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %><% Response.ContentType="text/vnd.wap.wml; charset=utf-8" %><?xml version="1.0" encoding="utf-8"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.
<!--#INCLUDE VIRTUAL="/lfwap/xtsb/dqsf.asp"-->
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0"/>
<meta http-equiv="Expires" content="hk, 1 Jan 1990 00:00:00 GMT"/>
</head>
<card id="card1" title="系统赌场"><p>
=大小游戏=<br/>
<%
if Session("zh")="abcyi" then
        response.redirect"/lfwap/kf/yksf.asp?abcyi=" & abcyi & "&sb="&sb&"&pkurl="&Request.ServerVariables("PATH_INFO")&"?"
    End if
Server.ScriptTimeout=999
iduse=Session("useid")

hk=Request("hk")
if hk="" then
dim objgbrs
  set objgbrs=Server.CreateObject("ADODB.Recordset")
  ssql="select usejf from usereg where id=" & iduse & ""
  objgbrs.open ssql,conn
Response.write "你现在有:"&objgbrs("usejf") &"" & Money(0) & ""
objgbrs.close
 set objgbrs=nothing
Response.write "<br/>投注额(最高1000" & Money(0) & "):<br/><input name='num' value='10' format='*N' maxlength='4'/><br/>选择大小:<br/><select name='dx' value='1'><option value='1'>大</option><option value='0'>小</option></select><br/><anchor>我猜我猜<go method='post' href='daxiao.asp?hk=dx&amp;abcyi=" & abcyi & "&amp;sb=" & sb & "'><postfield name='num' value='$(num)'/><postfield name='dx' value='$(dx)'/></go></anchor><br/>------------<br/>*说明:大小游戏总和为18点,9点以下为小(包括9点),以上为大,押多少赔多少<br/>*赌大小获胜的机率为1/2<br/>*小赌可逸情.大赌伤感情"
end if
if hk="dx" then
num=CLng(Request("num"))
dx=CLng(Request("dx"))
if num="" or dx="" then
Response.write "各项必填<br/>"
else
dim srs
 set srs=Server.CreateObject("ADODB.Recordset")
  sql="select usejf from usereg where id=" & iduse & ""
  srs.open sql,conn
   if num>srs("usejf") then
      Response.write "你的" & Money(0) & "不足"&num&"<br/>"
else
srs.close
    set srs=nothing
   if num<5 then
     Response.write "最少下注5" & Money(0) & "<br/>"
else
   if num>1000 then
      Response.write "小赌怡情,最高下注1000" & Money(0) & "<br/>"
  else
  if dx>1 or dx<0 then
  Response.write "数据非法<br/>"
     else
randomize
m=int(6*rnd+1)
if m>3 then
if dx=1 then
   Randomize
     m1 = Int(6 * Rnd + 1)
   Randomize
     m3 = Int(6 * Rnd + 1)
   Randomize
     m2 = Int(5 * Rnd + 1)
else
   Randomize
     m1 = Int(6 * Rnd + 1)
   Randomize
     m3 = Int(6 * Rnd + 1)
   Randomize
     m2 = Int(7 * Rnd + 1)
if m2>6 then m3=6 end if
end if
else
   Randomize
     m1 = Int(6 * Rnd + 1)
   Randomize
     m3 = Int(6 * Rnd + 1)
   Randomize
     m2 = Int(6 * Rnd + 1)
end if
if dx=1 then
 if m1+m2+m3>9 then
    mm=int(6*rnd+1)
    if mm=1 or mm=2 or mm=3 or mm=4 then
       do while m1+m2+m3>=10
          m1 = Int(6 * Rnd + 1)
         m3 = Int(6 * Rnd + 1)
          m2 = Int(6 * Rnd + 1)
       loop
    end if
  end if
else
 if m1+m2+m3<9 then
    mm=int(6*rnd+1)
    if mm=1 or mm=2 or mm=3 or mm=4 then
       do while m1+m2+m3<9
          m1 = Int(6 * Rnd + 1)
         m3 = Int(6 * Rnd + 1)
          m2 = Int(6 * Rnd + 1)
       loop
    end if
  end if
end if
if (m1+m2+m3)>9 then
    response.write "开奖结果:" & (m1+m2+m3) & "点"
  if dx=0 then
    response.write "<br/>你买了小,很遗憾,你输了" & num & "" & Money(0) & "<br/>"
     sql="update usereg set usejf=usejf-" & num & " where Cstr(id)='"& iduse &"'"
    conn.Execute(sql)
   else
    response.write "<br/>恭喜,你赢了" & num & "" & Money(0) & "<br/>"
     sql="update usereg set usejf=usejf+" & num & " where Cstr(id)='"& iduse &"'"
    conn.Execute(sql)
   end if
 else
    response.write "开奖结果:" & (m1+m2+m3) & "点"
  if dx=1 then
      response.write "<br/>你买了大,很遗憾,你输了" & num & "" & Money(0) & "<br/>"
     sql="update usereg set usejf=usejf-" & num & " where Cstr(id)='"& iduse &"'"
    conn.Execute(sql)
   else
    response.write "<br/>恭喜,你赢了" & num & "" & Money(0) & "<br/>"
     sql="update usereg set usejf=usejf+" & num & " where Cstr(id)='"& iduse &"'"
    conn.Execute(sql)
   end if
end if
end if
end if
end if
end if
end if
response.write "<br/><a href='DaXiao.asp?abcyi=" & abcyi & "&amp;sb=" & sb & "'>返回大小游戏</a>"

end if
response.write "<br/><a href='index.asp?abcyi=" & abcyi & "&amp;sb=" & sb & "'>返回赌场</a><br/>"%>
<!--#INCLUDE VIRTUAL="/lfwap/qtzh/fhwj/qtfh.inc"-->
</p></card></wml>
<!--#include file="../../conn.asp"-->
<%
if lfwap_sbs(3)=2 then
Call wapHead2_0("猜大小")
else
Call wapHead1_2("猜大小")
end if
response.write"<p>"&chr(13)
Call Hylogin()
yi=Request("yi")
if yi="" then
dim objgbrs
  set objgbrs=Server.CreateObject("ADODB.Recordset")
  objgbrs.open "select usejf from usereg where id=" & uid,conn,1,1
Response.write "你现在有:"&objgbrs("usejf") &"" & Money(0)
objgbrs.close
set objgbrs=nothing
Response.write "<br/>投注额(最高1000" & Money(0) & "):<br/>"
if lfwap_sbs(3)=2 then
response.write "<form action=""daxiao.asp?yi=dx&amp;abcyi=" & abcyi & "&amp;sb=" & sb & """ method=""post"">"
Response.write "<input name='num' value='10' format='*N' maxlength='4'/><br/>"
Response.write "选择大小:<br/><select name='dx' value='1'><option value='1'>大</option><option value='0'>小</option></select><br/>"
response.write "<input type=""submit"" name=""submit"" value=""我猜我猜""/></form>"
else
Response.write "<input name='num' value='10' format='*N' maxlength='4'/><br/>"
Response.write "选择大小:<br/><select name='dx' value='1'><option value='1'>大</option><option value='0'>小</option></select><br/>"
Response.write "<anchor>我猜我猜<go method='post' href='daxiao.asp?yi=dx&amp;abcyi=" & abcyi & "&amp;sb=" & sb & "'>"
Response.write "<postfield name='num' value='$(num)'/>"
Response.write "<postfield name='dx' value='$(dx)'/>"
Response.write "</go></anchor><br/>"
end if
Response.write "------------<br/>*说明:大小游戏总和为18点,9点以下为小(包括9点),以上为大,押多少赔多少<br/>*赌大小获胜的机率为1/2<br/>*小赌可逸情.大赌伤感情"
end if
if yi="dx" then
num=CLng(Request("num"))
dx=CLng(Request("dx"))
if num="" or dx="" then
Response.write "各项必填<br/>"
else
dim srs
 set srs=Server.CreateObject("ADODB.Recordset")
 srs.open "select usejf from usereg where id=" & uid,conn,1,1
   if num>srs("usejf") then
      Response.write "你的" & Money(0) & "不足"&num&"<br/>"
srs.close
set srs=nothing
else
srs.close
set srs=nothing
   if num<5 then
     Response.write "最少下注5" & Money(0) & "<br/>"
else
   if num>1000 then
      Response.write "小赌怡情,最高下注1000" & Money(0) & "<br/>"
  else
  if dx>1 or dx<0 then
  Response.write "数据非法.<br/>"
     else
randomize
m=int(6*rnd+1)
if m>3 then
if dx=1 then
   Randomize
     m1 = Int(6 * Rnd + 1)
   Randomize
     m3 = Int(6 * Rnd + 1)
   Randomize
     m2 = Int(5 * Rnd + 1)
else
   Randomize
     m1 = Int(6 * Rnd + 1)
   Randomize
     m3 = Int(6 * Rnd + 1)
   Randomize
     m2 = Int(7 * Rnd + 1)
if m2>6 then m3=6 end if
end if
else
   Randomize
     m1 = Int(6 * Rnd + 1)
   Randomize
     m3 = Int(6 * Rnd + 1)
   Randomize
     m2 = Int(6 * Rnd + 1)
end if
if dx=1 then
 if m1+m2+m3>9 then
    mm=int(6*rnd+1)
    if mm=1 or mm=2 or mm=3 or mm=4 then
       do while m1+m2+m3>=10
          m1 = Int(6 * Rnd + 1)
         m3 = Int(6 * Rnd + 1)
          m2 = Int(6 * Rnd + 1)
       loop
    end if
  end if
else
 if m1+m2+m3<9 then
    mm=int(6*rnd+1)
    if mm=1 or mm=2 or mm=3 or mm=4 then
       do while m1+m2+m3<9
          m1 = Int(6 * Rnd + 1)
         m3 = Int(6 * Rnd + 1)
          m2 = Int(6 * Rnd + 1)
       loop
    end if
  end if
end if
if (m1+m2+m3)>9 then
    response.write "开奖结果:" & (m1+m2+m3) & "点"
  if dx=0 then
    response.write "<br/>你买了小,很遗憾,你输了" & num & "" & Money(0) & "<br/>"
     conn.Execute("update usereg set usejf=usejf-" & num & " where id="& uid)
   else
    response.write "<br/>恭喜,你赢了" & num & "" & Money(0) & "<br/>"
     conn.Execute("update usereg set usejf=usejf+" & num & " where id="& uid)
   end if
 else
    response.write "开奖结果:" & (m1+m2+m3) & "点"
  if dx=1 then
      response.write "<br/>你买了大,很遗憾,你输了" & num & "" & Money(0) & "<br/>"
     conn.Execute("update usereg set usejf=usejf-" & num & " where id="& uid)
   else
    response.write "<br/>恭喜,你赢了" & num & "" & Money(0) & "<br/>"
    conn.Execute("update usereg set usejf=usejf+" & num & " where id="& uid)
   end if
end if
end if
end if
end if
end if
end if
response.write "<br/><a href='DaXiao.asp?abcyi=" & abcyi & "&amp;sb=" & sb & "'>返回大小游戏</a>"
end if
response.write "<br/><a href='index.asp?abcyi=" & abcyi & "&amp;sb=" & sb & "'>返回娱乐中心</a><br/>"%>
<!--#include file="../../qtfh.asp"-->
<%
if lfwap_sbs(3)=2 then
Call wapOver2_0()
else
Call wapOver1_2()
end if
%>


就这两个,



大家看看能把这个文件修改成上面那个mssql版的不??我急用,谢谢了
搜索更多相关主题的帖子: asp 
2010-04-15 11:39



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-303068-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.094102 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved