📄 jifenchange.asp
字号:
<!--#include file="top.asp"-->
<%
session.codepage=65001
response.charset="utf-8"
Dim count
strwebtitle=www56770com_word215
response.write c_skin_56770(c_skin_word(skin_head))
If session(""&cookiesname&"user_id")="" Then
response.write"<meta http-equiv=refresh content=3;url=javascript:window.close()>"
tl=sitename
mes="路"&www56770com_word675&"<br><br>路"&www56770com_word477&""
mes=mes&"<br><br>"&loading&""
call sendinfo(tl,mes)
Else
Select Case request("action")
Case "clear" : clear()
Case "buy" : buy()
Case "userinfo" : userinfo()
Case "view" : view()
Case "save" : save()
Case Else
main()
End Select
Sub clear
conn.execute("delete from [56770_lsbuy] where sessionid="&session.sessionid&" and hg=1")
response.redirect "vip_product.asp"
End Sub
Sub buy
id=request("id")
product_name=Trim(request("product_name"))
If request("count")="" And IsNumeric(request("count"))=False Then
count=1
Else
count=request("count")
End If
If request("id")="" then
response.write"<SCRIPT language=JavaScript>alert('"&www56770com_word223&"');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
Else
Dim strcount
Set rs=conn.execute("select kucun from [56770_vipproduct] where id="&id&"")
strcount=rs("kucun")
If CLng(request("count"))>strcount Then
www56770com_stockerror()
Else
set rs = conn.execute("select * from [56770_lsbuy] where cpid="&id&" and sessionid="&session.sessionid&"")
If rs.eof Then
conn.execute("Insert into [56770_lsbuy](cpid,product_name,price,sessionid,basket_date,basket_count,hg)values("&id&",'"&product_name&"',"&request("jifen")&","&session.sessionid&","&sqlnowstring&","&count&",1)")
Dim rss
set rss = conn.execute("select * from [56770_lshy] where sessionid="&session.sessionid&"")
If rss.eof then
conn.execute("Insert into [56770_lshy](sessionid,basket_date)values("&session.sessionid&","&sqlnowstring&")")
else
conn.execute("Update [56770_lshy] set basket_date="&sqlnowstring&" where sessionid="&session.sessionid&"")
End if
rss.close:Set rss=nothing
else
conn.execute("Update [56770_lsbuy] set basket_date="&sqlnowstring&",basket_count="&count&" where cpid="&id&" and sessionid="&session.sessionid&"")
conn.execute("Update [56770_lshy] set basket_date="&sqlnowstring&" where sessionid="&session.sessionid&"")
End if
conn.execute("Delete FROM [56770_lsbuy] where ("&sqlnowstring&"-basket_date)>1")
conn.execute("Delete FROM [56770_lshy] where ("&sqlnowstring&"-basket_date)>1")
rs.close:set rs=Nothing
response.redirect"?id="&id
End If
End If
End Sub
Sub main %>
<table width="450" border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
<tr bgcolor=#ffffff>
<td width="60%" height="25"> <%=www56770com_word26%></td>
<td width="15%" height="20" align="center"><%=www56770com_word197%></td>
<td width="10%" height="20" align="center"><%=www56770com_word216%></td>
<td width="15%" height="20" align="center"><%=www56770com_word198%></td>
</tr>
<%
sql="select * from [56770_lsbuy] where sessionid="&session.sessionid&" and hg=1"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
%>
<tr bgcolor=#ffffff>
<td height="25" colspan="4" align="center"><%=www56770com_word217%></td>
</tr>
<%
else
do while not rs.eof
%>
<tr bgcolor=#ffffff>
<td height="25"> <%=rs("product_name")%></td>
<td height="25" align="center"><%=rs("price")%> <%=www56770com_word33%></td>
<td height="25" align="center"><%=rs("basket_count")%></td>
<td height="25" align="center"><%=rs("basket_count")*rs("price")%> <%=www56770com_word33%></td>
</tr>
<%
Dim totalcash
totalcash=totalcash+(rs("basket_count")*rs("price"))
rs.movenext
loop
end if
rs.close:set rs=Nothing
%>
<tr>
<td height="25" colspan="4" bgcolor=#ffffff align="right"><%=www56770com_word131%>锛
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -