搜索
 找回密码
 加入

骑士商城架设问题

1248747588 2011-2-17 19:17:57 2259
网页能打开, 提示输入帐号,
输入帐号后提示
错误类型:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
列名 'CashPoint' 无效。
/pus/index.asp, 第 139 行

以下是全部代码
      ↓
      ↓
<!--#include file="config.asp" -->
<%
'登陆必用参数
strAccountID=trim(checkstr(request.querystring("strAccountID")))
if strAccountID<>"" then
        strAccountID=left(strAccountID,13)
        set rs=conn.execute("select strAccountID from TB_USER where strAccountID='"&strAccountID&"'")
        if not rs.eof then
                set rs1=conn.execute("select strAccountID,strCharID1 from ACCOUNT_CHAR where strAccountID in (select strAccountID from TB_USER where strAccountID='"&strAccountID&"')")
                if not rs1.eof then
                        strUserID=trim(rs1("strCharID1"))
                else
                        rs1.close:closeconn()
                        response.write("<html><title></title><head><style>body{background:#110000;margin:50px;padding:0;font-size:15px;font-family:arial;color:#E7DBDB;}</style></head><body>该账号还未创建角色,不能进行购物!</body></html>")
                        response.end
                end if
                rs1.close:set rs1=nothing
        else
                rs.close:closeconn()
                response.write("<html><title></title><head><style>body{background:#110000;margin:50px;padding:0;font-size:16px;font-family:arial;color:#E7DBDB;}</style></head><body><a href='###' style='font-weight:bold;font-size:14px;color:red;text-decoration:none;' onclick='javascript:history.go(-1);'>账号不存在或还未建立游戏角色,点击返回!</a></body></html>")
                response.end
        end if
        rs.close:set rs=nothing
else
        closeconn()
        response.write("<html><title></title><head><style>body{background:#110000;margin:50px;padding:0;font-size:14px;font-family:arial;color:#E7DBDB;}#strAccountID{width:150px;height:22px;line-height:22px;font-size:12px;font-family:arial;background:#423131;border:1px #a56d10 solid;color:#fff;}#submit{height:22px;line-height:22px;width:60px;background:#a56d10;text-decoration:none;color:#fff;border:0;}</style></head><body>")
        response.write("<form method='GET' action='index.asp'>")
        response.write("请输入你的游戏账号(即ID):<input type='text' name='strAccountID' id='strAccountID' style='border:1px #fff solid;width:200px;' />")
        response.write("<input type='submit' id='submit' value='确定' />")
        response.write("</form>")
        response.write("</body></html>")
        response.end
end if

action=trim(request.querystring("action"))
'购物必用参数
itemid=trim(request.form("itemid"))
itemnum=trim(request.form("itemnum"))

if action<>"" then
        if not IsSelfRefer then
                response.write("<html><title></title><head><style>body{background:#110000;margin:50px;padding:0;font-size:16px;font-family:arial;color:#E7DBDB;}</style></head><body>请使用IE浏览!</body></html>")               
        end if
end if

'加入购物车
if action="addcart" then
        if itemid<>"" and isnumeric(itemid) then
                if itemnum="" or not isnumeric(itemnum) then itemnum=1
                if itemid=389015000 then itemnum=100
                set cs=conn.execute("select ItemID from S_PowerUP where ItemID="&itemid)
                if not cs.eof then
                        conn.execute("Insert Into S_PowerUPLog(strAccountID,strUserID,ItemCount,ItemID,IsPayed) Values('"&strAccountID&"','"&strUserID&"',"&itemnum&","&itemid&",0)")
                        cartNum=myCartNum(strAccountID)
                        closeconn()
                        response.write("<script>parent.document.getElementById('cartNum').innerHTML='"&cartNum&"';</script>")
                        response.write("<script>alert('已成功将该物品加入到你的购物车!');</script>")
                        response.end
                else
                        closeconn()
                        response.write("<script>alert('未找到指定的物品,操作失败!');</script>")
                        response.end
                end if
        else
                closeconn()
                response.write("<script>alert('无效的参数,操作失败!');</script>")
                response.end
        end if
end if

'从购物车中移除
if action="removecart" then
        if itemid<>"" and isnumeric(itemid) then
                set cs=conn.execute("select id,strAccountID from S_PowerUpLog where strAccountID='"&strAccountID&"' and id="&itemid)
                if not cs.eof then
                        conn.execute("delete from S_PowerUpLog where id="&itemid)
                        'response.write("<script>parent.document.getElementById('cartNum').innerHTML='"&myCartNum(strAccountID)&"';</script>")
                        closeconn()
                        response.write("<script>parent.document.getElementById('cart_"&itemid&"').style.display='none';</script>")
                        response.write("<script>alert('已成功将该物品从你的购物车中移除!');</script>")
                        response.end
                else
                        closeconn()
                        response.write("<script>alert('未找到指定的物品,操作失败!');</script>")
                        response.end
                end if
        else
                closeconn()
                response.write("<script>alert('无效的参数,操作失败!');</script>")
                response.end
        end if
end if

'开始付款
if action="payall" then
        strPassWD=trim(checkstr(request.form("strPassWD")))
        strPassWD=left(strPassWD,13)
        set checkrs=conn.execute("select strPassWD,strAccountID from TB_USER where strAccountID='"&strAccountID&"' and strPassWD='"&strPassWD&"'")
        if not checkrs.eof then
                cnt=0
                totalCash=myCashPoint(strAccountID)
                set rs=conn.execute("select S_PowerUpLog.id,S_PowerUpLog.ItemID,ItemCount,strAccountID,strUserID,IsPayed,ItemPoint from S_PowerUpLog,S_PowerUp where strAccountID='"&strAccountID&"' and strUserID='"&strUserID&"' and IsPayed=0 and S_PowerUpLog.ItemID=S_PowerUp.ItemID")
                do while not rs.eof
                        'if totalCach>=(rs("ItemPoint")*rs("ItemCount")) then
                                conn.execute("Insert Into WEB_ITEMMALL(strAccountID,strCharID,ServerNO,ItemID,ItemCount) Values('"&strAccountID&"','"&strUserID&"',15001,"&rs("ItemID")&","&rs("ItemCount")&")")
                                conn.execute("Update TB_User set CashPoint=CashPoint-"&rs("ItemPoint")*rs("ItemCount")&" where strAccountID='"&strAccountID&"'")
                                conn.execute("update S_PowerUpLog set IsPayed=1 where id="&rs("id"))
                                totalCash=totalCash-rs("ItemPoint")*rs("ItemCount")
                                cnt=cnt+1
                        'end if
                        rs.movenext
                loop
                rs.close:set rs=nothing
                checkrs.close:closeconn()
                response.write("<script>alert('成功发送["&cnt&"]件物品,请立即关闭商城查收物品!');</script>")
                response.write("<script>parent.location.href='index.asp?straccountid="&strAccountID&"';</script>")
                response.end
        else
                checkrs.close:closeconn()
                response.write("<script>alert('密码不符,请重新输入!');")
                response.write("parent.document.getElementById('doBuy').disabled=false;")
                response.write("parent.document.getElementById('doBuy').innerHTML='确定购买';</script>")
                response.end
        end if               
end if

'取得购物车中未支付的物品数量
function myCartNum(strAccountID)
        myCartNum=0
        set mcs=conn.execute("select sum(ItemCount) as b from S_PowerUpLog where strAccountID='"&strAccountID&"' and IsPayed=0")
        if not mcs.eof then
                myCartNum=mcs("b")
        end if
        mcs.close:set mcs=nothing
end function
'取得用户点卡值
function myCashPoint(strAccountID)
        myCashPoint=0
        set mcp=conn.execute("select CashPoint from TB_USER where strAccountID='"&strAccountID&"'")
        if not mcp.eof then
                myCashPoint=mcp("CashPoint")
                if myCashPoint < 0 then
                conn.execute("Update TB_User set CashPoint=0 where strAccountID='"&strAccountID&"'")
                conn.execute("Update TB_User set idays=0 where strAccountID='"&strAccountID&"'")
                myCashPoint  = 0
                end if
        end if
        mcp.close:set mcp=nothing
end function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PowerUP</title>
<style type="text/css">
body{background:#110000;margin:0;padding:0;font-size:12px;font-family:arial;color:#E7DBDB;}
.note{text-align:left;line-height:165%;padding:0 33px;}
.listTbl{border-top:1px #a56d10 solid;border-left:1px #a56d10 solid;margin:10px;}
.listTbl th,
.listTbl td{border-bottom:1px #a56d10 solid;border-right:1px #a56d10 solid;padding:3px 5px;}
.listTbl th{font-weight:bold;background:#a56d10;}
p{text-align:left;margin:10px;line-height:160%;}
p span{color:green;font-weight:bold;}
p em{color:red;font-weight:bold;}
.btn-buy{padding:4px 0px;width:60px;background:#a56d10;display:block;text-decoration:none;color:#fff;}

.myInfo{margin:10px}
.myInfo .info{text-align:left;margin:10px;line-height:160%;}
.myInfo .info span{color:green;font-weight:bold;}
.myInfo .info em{color:red;font-weight:bold;}
.myInfo #btn-cart{
        height:30px;
        line-height:30px;
        width:150px;
        text-align:center;
        font-size:14px;
        font-weight:bold;
        background:#a56d10;
        display:block;
        text-decoration:none;
        color:#fff;
        border: 4px solid #FF0000;
}
</style>
<script language="JavaScript">
<!--
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")

function addCart(itemid){
        if(itemid){
                if(confirm('确定要将该物品加入到你的购物车吗?')){
                        document.getElementById('itemid').value=itemid;
                        document.getElementById('ajaxForm').action='index.asp?straccountid=<%=strAccountID%>&action=addcart';
                        document.getElementById('ajaxForm').submit();
                }
        }
}
function removeCart(logid){
        if(logid){
                if(confirm('确定要将该物品从你的购物车中移除吗?')){
                        document.getElementById('itemid').value=logid;
                        document.getElementById('ajaxForm').action='index.asp?straccountid=<%=strAccountID%>&action=removecart';
                        document.getElementById('ajaxForm').submit();
                }
        }
}
function doPay(needPoint,totalPoint){
        if(needPoint==''||needPoint==0){
        }else{
                if(needPoint<=totalPoint){
                        var strPassWD=prompt('请输入你的密码以继续操作:','');
                        if(strPassWD!=''&&strPassWD.length>=3){
                                document.getElementById('doBuy').disabled=true;
                                document.getElementById('strPassWD').value=strPassWD;
                                document.getElementById('doBuy').innerHTML='正在支付...';
                                document.getElementById('ajaxForm').action='index.asp?straccountid=<%=strAccountID%>&action=payall';
                                document.getElementById('ajaxForm').submit();
                        }else{
                                alert('请输入正确的密码!');
                                return false;
                        }
                }else{
                        alert('你的购物车中物品累计点数['+needPoint+']超出了你当前的点数值['+totalPoint+'],请适当调整!');
                        return false;
                }
        }
}
-->
</script>
</head>
<body>
<div style="text-align:center;margin:10px;">
        <table width="98%" border="0" cellspacing="0" cellpadding="0" class="myInfo">
                <tr>
                        <td class="info">
                                <strong>欢迎<em>[<%=strUserID%>]</em>登陆商城,您当前的点值为<em>[<span id="cashPoint"><%=myCashPoint(strAccountID)%></span>]</em>点。</strong><br />
                                <span>说明:购买物品时,请一定要先保证自己身上有足够的空格子,不然会产生得不到购买物品的情况,GM对此将不负责!</span>                        </td>
                        <td class="info"><a href="cypoints.asp" id="btn-cart">进入积分系统</a></td>
                        <td class="info">&nbsp;</td>
                        <td align="right">
                        <%if action<>"mycart" then%>
                        <%end if%>
                                <%if action<>"mycart" then%><a href="index.asp?straccountid=<%=strAccountID%>&action=mycart" id="btn-cart">打开我的购物车(<em id="cartNum"><%=myCartNum(strAccountID)%></em>)</a><%end if%>
                                <%if action<>"" then%><a href="index.asp?straccountid=<%=strAccountID%>&" id="btn-cart">返回商城物品列表</a><%end if%>                        </td>
                </tr>
        </table>
        <%if action="mycart" then%>
        <table width="98%" border="0" cellspacing="0" cellpadding="0" class="listTbl">
                <tr>
                        <th width="80" height="20">物品名称</th>
                        <th width="50">图样</th>
                        <th align="left">说明</th>
                        <th width="100">价格</th>
                        <th width="140">购买时间</th>
                        <th width="60">操作</th>
                </tr>
                <%
                        itemCnt=0:totalPoint=0
                        set rs=conn.execute("select S_PowerUPLog.id,S_PowerUPLog.strAccountID,S_PowerUPLog.ItemCount,S_PowerUPLog.ItemID,S_PowerUPLog.BuyTime,S_PowerUPLog.IsPayed,S_PowerUP.ItemName,S_PowerUP.ItemNote,S_PowerUP.ItemUnit,S_PowerUP.ItemPoint from S_PowerUPLog,S_PowerUP where IsPayed=0 and S_PowerUP.ItemID=S_PowerUPLog.ItemID and strAccountID='"&strAccountID&"' order by S_PowerUPLog.id desc")
                        do while not rs.eof
                %>
                <tr id="cart_<%=rs("id")%>">
                        <td><%=rs("ItemName")%></td>
                        <td><img src="images/item/<%=rs("ItemID")%>.jpg" /></td>
                        <td align="left"><%=rs("ItemNote")%></td>
                        <td><%=rs("ItemPoint")%>点/<%=rs("ItemUnit")%></td>
                        <td><%=rs("BuyTime")%></td>
                        <td><a class="btn-buy" onclick="removeCart('<%=rs("id")%>')" href="###">移除</a></td>
                </tr>
                <%
                        itemCnt=itemCnt+rs("ItemCount")
                        totalPoint=totalPoint+rs("ItemCount")*rs("ItemPoint")
                        rs.movenext
                loop
                %>
                <tr>
                        <td colspan="6" height="40" align="left"><p>累计物品数量:<%=itemCnt%>,累计所需点数:<%=totalPoint%></p><a class="btn-buy" href="###" id="doBuy" onclick="doPay(<%=totalPoint%>,<%=myCashPoint(strAccountID)%>)" style="width:100px;font-size:14px;margin:0 0 5px 10px;text-align:center;">确定购买</a></td>
                </tr>
        </table>
        <%elseif action="dopay" then%>
        <%else%>
        <table width="98%" border="0" cellspacing="0" cellpadding="0" class="listTbl">
                <tr>
                        <th width="80"  height="20" align="center">物品名称</th>
                        <th width="50" align="center">图样</th>
                        <th align="left" width="200">相关说明</th>
                        <th width="80" align="center">兑换</th>
                        <th width="50" align="center">购买</th>
                        <th width="80" align="center">物品名称</th>
                        <th width="50" align="center">图样</th>
                        <th width="80" align="center">相关说明</th>
                        <th width="80" align="center">兑换</th>
                        <th width="80" align="center">购买</th>
                </tr>
                <%
                set rs=conn.execute("select ItemID,ItemName,ItemNum,ItemImg,ItemNote,ItemPoint,ItemUnit from S_PowerUP")
                do while not rs.eof
                %>
                <tr>
                        <td align="center" height="20" class="b"><%=rs("ItemName")%></td>
                        <td align="center"><img src="images/item/<%=rs("ItemID")%>.jpg" /></td>
                        <td align="left"><%=rs("ItemNote")%></td>
                        <td align="center"><%=rs("ItemPoint")%>点/<%=rs("ItemUnit")%></td>
                        <td align="center"><a class="btn-buy" href="###" onclick="addCart('<%=rs("ItemID")%>')">购买</a></td>
                        <%
                                if not rs.eof then
                                        rs.movenext
                        %>
                        <td align="center"><span class="b"><%=rs("ItemName")%></span></td>
                        <td align="center"><img src="images/item/<%=rs("ItemID")%>.jpg" /></td>
                        <td align="center"><%=rs("ItemNote")%></td>
                        <td align="center"><%=rs("ItemPoint")%>点/<%=rs("ItemUnit")%></td>
                        <td align="center"><a class="btn-buy" href="###" onclick="addCart('<%=rs("ItemID")%>')">购买</a></td>
                </tr>
                <%
                                else
                                        response.write("<tr><td colspan=5>&nbsp;</td></tr>")
                                end if
                                if not rs.eof then rs.movenext
                loop
                rs.close:set rs=nothing
                %>
        </table>
        <p><strong style="color:red;">备注:请到网站上进行冲值与捐赠操作,如发现异常现象,请到论坛通知管理员。</stong><p /></p>
        <%end if%>
</div>
<form name="ajaxForm" id="ajaxForm" action="#" method="post" target="postFrm">
        <input type="hidden" name="itemid" id="itemid" value="">
        <input type="hidden" name="strPassWD" id="strPassWD" value="">
</form>
<iframe id="postFrm" name="postFrm" height="0" width="0" scrolling="no" frameborder="0" src="about:blank"></iframe>
</body>
</html>
<%closeconn()%>

帮我看看,谢谢!

16 回复

evaydd
2010-11-9 17:47:30
点击查看详情
不懂!!!!!
骑士ko2
2010-11-15 11:41:45
迷茫!
malihuei66
2011-2-11 20:45:10
谁有商城源码发一下啊
bing88868
2011-2-13 17:34:39
提示: 作者被禁止或删除 内容自动屏蔽
ko119
2011-2-14 21:38:09
不懂!!!!!
insoft
2011-2-15 10:47:31
用网页工具修改一下pus.asp的登录帐号和密码试试!
hl8882
2011-2-15 10:53:22
什么东西
malihuei66
2011-2-15 11:42:29
有人共享套商城工具么~谢谢了我 邮箱  [email protected]
bing88868
2011-2-17 19:17:57
提示: 作者被禁止或删除 内容自动屏蔽
12下一页
高级模式
游客