?? addjj.asp
字號:
<%@ language="vbscript" %>
正在處理……
<%idname=trim(request("id"))
if idname="" then
response.write "操作錯誤"
response.end
else
id=Cint(idname)
end if
set conn=server.createobject("ADODB.connection")
conn.open "DBQ=" & server.MapPath("datebase.mdb") & ";DRIVER={Microsoft Access Driver (*.mdb)}"
set rs=conn.execute("select * from goodslist where id=" & id)
set ur=conn.execute("select * from onsell where 商品id='" & idname & "' order by 叫價 desc")
if not ur.eof then
if session("username")=ur("叫價用戶") then%>
<script>
alert("最高價已經是您叫的,您難道還要叫嗎?");
history.go(-1);
</script>
<%
response.end
end if
end if
price=Clng(request("price"))
proxy=trim(request("proxy"))
if proxy="yes" then
p="是"
pp=Clng(request("pp"))
else
p="否"
pp=0
end if
message=request("mess")
if ur.eof then
if price<rs("底價") then%>
<script>
alert("您的叫價錯誤,叫價小于底價!");
history.go(-1);
</script>
<%
response.end
end if
else
if price-ur("叫價")<rs("叫價單位") then%>
<script>
alert("您的叫價錯誤,沒有按照叫價單位叫價!");
history.go(-1);
</script>
<%
respone.end
end if
end if
if p="是" and pp-price<rs("叫價單位") then%>
<Script>
alert("您的代理叫價錯誤!");
history.go(-1);
</script>
<%
response.end
end if
set com=createobject("adodb.command")
com.activeconnection=conn
com.commandtext="INSERT INTO onsell (商品id,叫價用戶,叫價,代理,代理叫價,叫價日期,留言) VALUES (?,?,?,?,?,?,?)"
com.Parameters.Append com.CreateParameter("t1",200, ,255 )
com.Parameters.Append com.CreateParameter("t2",200, ,255 )
com.Parameters.Append com.CreateParameter("t3",200, ,255 )
com.Parameters.Append com.CreateParameter("t4",200, ,255 )
com.Parameters.Append com.CreateParameter("t5",200, ,255 )
com.Parameters.Append com.CreateParameter("t6",200, ,255 )
com.Parameters.Append com.CreateParameter("t7",200, ,255 )
com("t1")=idname
com("t2")=session("username")
com("t3")=price
com("t4")=p
com("t5")=pp
com("t6")=date()
com("t7")=replace(replace(message,"<","〈"),">","〉")
com.execute%>
<script>
window.location="proxy.asp?id=<%=idname%>"
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
增大字號
Ctrl + =
減小字號
Ctrl + -