<% couponid=request("id") if request("action")="getcoupon" then If request.cookies("timesshop")("username")="" Then dim url 'url=url&request.ServerVariables("SCRIPT_NAME") 'if(len(trim(request.ServerVariables("QUERY_STRING")))>0) then 'url=url & "?" & request.ServerVariables("QUERY_STRING") 'end if url="/user/acoupon.asp" response.Redirect "/user/login.asp?url='"&url&"'" 'response.write url 'response.end end if code=request.form("code") if code="" then '如果是从按钮提交过来的就执行,若是登录后自动转入的,则 set objtemp=server.CreateObject("adodb.recordset") objtemp.open "select * from acoupon where id="&couponid,conn,1,3 if objtemp.eof then response.end code=objtemp("code") kind=objtemp("kind") content=objtemp("content") deadline=objtemp("deadline") max=objtemp("max") objtemp.close set objtemp=nothing else kind=request.form("kind") content=request.form("content") deadline=request.form("deadline") max=request.form("max") end if set rs=server.CreateObject("adodb.recordset") rs.open "select * from coupon where owner='"&request.cookies("timesshop")("username")&"' and code='"& code &"' order by id desc",conn,1,3 xc=rs.recordcount- max if xc<0 then rs.addnew rs("code")=code rs("owner")=request.cookies("timesshop")("username") rs("kind")=kind rs("content")=content rs("gettime")=now() rs("getfrom")="cars51" rs("state")=0 rs("deadline")=deadline 'response.write "到这里正常 " 'response.end rs.update response.write " " else response.write " " end if rs.close set rs=nothing end if %> <% Call SetConn () intTotalNum = 0 intPageSize = 15 intTotalPageCount = 0 intCurrentPage = 0 %> <%=webname%>  ----  礼券详情
 
您的当前位置: 首页>> 可以领取的礼券列表


品牌精品
<% call Writeproductpp()%>
商品类目
 
礼券详情
<% set rs=server.CreateObject("adodb.recordset") if couponid<>"" then rs.open "select * from acoupon where id=" & couponid &" order by id desc",conn,1,1 else rs.open "select * from acoupon where code='" & request("code") &"' order by id desc",conn,1,1 end if if rs.eof then response.write " " end if %> <% if rs("state")=1 then '如果是有效礼券 %>
 
礼券编号: <%=rs("code")%>
礼券名称: <% select case rs("kind") case 1 response.write "比例现金抵用券" case 2 response.write "订单折扣券" case 3 response.write "免费商品券" case 4 response.write "全额现金抵用券" end select %>
礼券内容:  <%if rs("kind")=1 then %> <%=rs("content")%> 元 <% elseif rs("kind")=2 then %> <%=rs("content")%> 折 <% elseif rs("kind")=3 then %> " target=_blank ><%=rs("content")%> 商品 <% elseif rs("kind")=4 then %> <%=rs("content")%> 元 <% end if %>
礼券作用: <% select case rs("kind") case 1 response.write "对订单进行折扣,最多可减免商品金额(除开特价商品和运费)的 10% 。
若商品金额的 10% 大于 "& rs("content") & "元,则直接减免 "& rs("content") & "元;
若商品金额的 10% 小于或等于 "& rs("content") & "元,则可减免 10% 的商品金额,相当于给订单打 9 折。" case 2 response.write "对订单金额进行相应的打折。使用了这张礼券后,您只需付原订单 "& rs("content")*10 &"% 的金额。(特价商品和运费不计算在内)" case 3 response.write "拥有这张礼券,您可以免费领取编号为 "& rs("content") & " 的商品一件。(注:凭这张礼券领取的商品不单独送货,须与订单内其他商品或其他订单一起才能送货)" case 4 response.write "直接对订单进行折扣。
若商品金额(除开特价商品和运费)小于或等于 "& rs("content") & "元,则您只需付特价商品的金额和运费;
若商品金额大于 "& rs("content") & "元,则直接将商品金额减免 "& rs("content") & "元。" end select %>
最多拥有: <%=rs("max")%>
 
使用方法:您可以在确认订单以后选择使用该券!系统将自动计算折扣。
 
点击以下按钮取得该礼券!
 
<% else response.write "" end if %>
> > > > >
这张礼券已停止派送!