<% 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 response.write url response.Redirect "/shop/user/login.asp?url='"&url&"'" end if%> <%=webname%>  ----  会员中心- 我的礼券
<%=request.cookies("timesshop")("username")%>的礼券

说明:
注:A、礼券为一次性使用; B、以下所指的订单的全部金额不包括该订单的运费。
1、全额现金抵用券:用礼券的全部金额对订单的总金额进行抵扣,若礼券金额小于或等于订单金额,则礼券可全额抵扣;若大于订单金额,多余部分则视做放弃。
2、比例现金抵用券:对订单金额的10%进行抵扣,若礼券金额小于或等于订单金额的10%,则礼券可全额抵扣;若大于订单金额的10%,多余部分则视做放弃。
3、订单折扣券:对订单金额进行相应的打折。
4、免费商品券:免费领取相应的商品。
 
<%set rs=server.CreateObject("adodb.recordset") rs.open "select coupon.* from coupon where owner='"&request.cookies("timesshop")("username")&"' order by id desc",conn,1,1 'rs.open "select coupon.id,coupon.code,coupon.owner,coupon.content,coupon.gettime,coupon.getfrom,coupon.state,coupon.orderid,coupon.usedtime,acoupon.deadline from coupon,acoupon where coupon.id=acoupon.id and coupon.owner='"&request.cookies("timesshop")("username")&"' order by id desc",conn,1,1 intTotalNum = rs.RecordCount dim i i=0 do while not rs.eof if (i mod 2)=0 then response.write "" else response.write "" end if %> <%i=i+1 rs.movenext loop rs.close set rs=nothing %>
礼券号 性质 内容 取得时间 状态 相关订单 使用时间 有效期至
"><%=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 %> <%=trim(rs("gettime"))%> <%if rs("state")=0 then if datediff("d",now(),rs("deadline")) < 0 then %> 已经过期 <% elseif datediff("d",now(),rs("deadline")) =< 10 then '提前15天告示 %> 有效-即将过期 <% else %> 有效 <% end if %> <%elseif rs("state") =1 then %> 已使用 <%end if%> " > <% =rs("orderid")%> <% if isnull(rs("usedtime")) then %> <% else %> <%=rs("usedtime") %> <% end if %> <% if isnull(rs("deadline")) then %>无<% else %> <%=rs("deadline") %> <% end if %>
共有 <%=intTotalNum%> 张礼券