|
主题:[求助]太深奥了,求助! [收藏主题] | 转到: |
谁能帮我一下。前台点击按扭后,判断一下如果inputer不等于返回的inputer则弹出一警告窗口。谢谢
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% DBPath = "/KS_Data/KesionCMS7.mdb" ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DBPath) Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnStr if Session("ProductList")="" then Session("ProductList")=0 end if ProductList=Session("ProductList") id=Request("id") goodsid=Request("goodsid") inputer=Request("inputer") if(id<>"" and id<>0) then ProductList=replace(ProductList,id,0) Session("ProductList")=ProductList end if if(goodsid<>"" and goodsid<>0) then Session("ProductList")=Session("ProductList")&","&goodsid end if strsql="select I.ID,I.Title,I.ProductType,I.Inputer,I.Price_Original,I.Price,I.Price_Member,I.Discount,I.TotalNum,I.GroupPrice,I.PhotoUrl,I.Unit,I.IsLimitBuy,I.LimitBuyPrice,I.LimitBuyAmount,L.LimitBuyBeginTime,L.LimitBuyEndTime from KS_Product I Left Join KS_ShopLimitBuy L On I.LimitBuyTaskID=L.Id where I.ID in ("&Session("ProductList")&") order by I.IsChangedBuy,I.ID" set RS=server.CreateObject("adodb.recordset") i=0 sumprice=0 RS.open strsql,conn,1,3 if not(RS.bof or RS.eof) then Response.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>") while not(RS.bof or RS.eof) i=i+1 Title=RS("Title") Inputer=RS("Inputer") id=RS("id") strTitle=Title Title=left(Title,6) price=FormatNumber(RS("Price_Member"),2,-1) sumprice=sumprice+price Response.write("<tr>") Response.write("<td><span title='"&strTitle&"'>"&Title&"</span></td>") Response.write("<td>¥"&price&"</td>") Response.write("<td>"&Inputer&"</td>") ' Response.write("<td><input type='text' size='2' value='1'></td>") Response.write("<td><span style='cursor:pointer;' onclick='postdata(0,"&id&")'>删除</span></td>") Response.write("</tr>") RS.movenext wend Response.write("</table>") ' response.Write "<span style='cursor:pointer;' onclick='postdata(0,-1)'>全部删除</span>" Response.Write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>") Response.Write("<tr>") Response.Write("<td width='54%'>总数:"&i&"<br />") Response.Write("总金额:"&sumprice&"元") Response.Write("</td>") Response.Write("<td width='46%'><a href='../shop/shoppingcart.asp'><img src='/tj.jpg' border='0' /></a></td>") Response.Write("</tr>") Response.Write("</table>") end if rs.close set rs=nothing %> |
|
支持(1) | 反对(1) 顶端 底部 |
支持(1) | 反对(1) 顶端 底部 |
支持(1) | 反对(1) 顶端 底部 |
<上一主题 | 下一主题 > |