⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_inc.asp

📁 一个ASP做的购物车
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
'//////////////////////////订单查讯
sub myorder()
if request.cookies("cnhww")("username")="" then
response.Redirect "user.asp"
response.End
end if
%> 
<table width="370" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr> 
    <td align="center">
        <select name="zhuangtai" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
          <option value="user.asp?action=myorder&zhuangtai=0" selected>--请选择查讯状态--</option>
          <option value="user.asp?action=myorder&zhuangtai=0" >全部订单状态</option>
          <option value="user.asp?action=myorder&zhuangtai=1" >未作任何处理</option>
          <option value="user.asp?action=myorder&zhuangtai=2" >用户已经划出款</option>
          <option value="user.asp?action=myorder&zhuangtai=3" >服务商已经收到款</option>
          <option value="user.asp?action=myorder&zhuangtai=4" >服务商已经发货</option>
          <option value="user.asp?action=myorder&zhuangtai=5" >用户已经收到货</option>
        </select>
      </td>
  </tr>
</table>
<br><br>                
<table width="570" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFCC00">
  <tr> 
    <td bgcolor="#FFECA2"> 
      <div align="center"><font color="#666666">订单号</font></div>
    </td>
    <td bgcolor="#FFECA2"> 
      <div align="center"><font color="#666666">货款</font></div>
    </td>
    <td bgcolor="#FFECA2"> 
      <div align="center"><font color="#666666">费用</font></div>
    <td bgcolor="#FFECA2"> 
      <div align="center"><font color="#666666">订单状态</font></div>
    </td>
  </tr>
  <%set rs=server.CreateObject("adodb.recordset")
  dim zhuangtai
  zhuangtai=request.QueryString("zhuangtai")
  if zhuangtai=0 or zhuangtai="" then
  select case zhuangtai
  case "0"
  rs.open "select distinct(dingdan),userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,zhuangtai from wq_action where username='"&request.cookies("cnhww")("username")&"' and zhuangtai<6 order by actiondate desc",conn,1,1
  case ""
  rs.open "select distinct(dingdan),userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,zhuangtai from wq_action where username='"&request.cookies("cnhww")("username")&"' and zhuangtai<5 order by actiondate desc",conn,1,1
  end select
  else
  rs.open "select distinct(dingdan),userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,zhuangtai from wq_action where username='"&request.cookies("cnhww")("username")&"' and zhuangtai="&zhuangtai&" order by actiondate",conn,1,1
  end if

  do while not rs.eof
   %>
  <tr> 
    <td bgcolor="#FFFFEE"> 
      <div align="center"><a href="javascript:;" onClick="javascript:window.open('orderform.asp?dan=<%=trim(rs("dingdan"))%>','','width=770,height=420,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><%=trim(rs("dingdan"))%></a></div>
    </td>
    <td bgcolor="#FFFFEE"> 
      <div align="center"> 
        <%dim cnhww,rs2
	'////
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select sum(zonger) as zonger from wq_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
	response.write "<font color=#FF6600>"&cnhww("zonger")&"元</font>"
	cnhww.close
	set cnhww=nothing%>
      </div>
    </td>
    <td bgcolor="#FFFFEE"> 
      <div align="center"> 
        <%
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select feiyong from wq_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
	response.write "<font color=#FF6600>"&cnhww("feiyong")&"元</font>"
	cnhww.close
	set cnhww=nothing%>
      </div>
    </td>
    <td bgcolor="#FFFFEE"> 
      <div align="center"> 
        <%select case rs("zhuangtai")
	case "1"
	response.write "未作任何处理"
	case "2"
	response.write "用户已经划出款"
	case "3"
	response.write "服务商已经收到款"
	case "4"
	response.write "服务商已经发货"
	case "5"
	response.write "用户已经收到货"
	end select%>
      </div>
    </td>
  </tr>
  <%
   rs.movenext
  loop
  rs.close
  set rs=nothing%>
</table>
<%
end sub

sub myinfo()
%>
<table width=570 border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFCC00>
  <tr align="center" bgcolor="#FFFFEE"> 
    <td colspan="2" height="23"> <font color=#FF0000><b>统计信息</b></font></td>
  </tr>
  <%
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select * from [wq_user] where username='"&request.cookies("cnhww")("username")&"' ",conn,1,1
	ky_point=cnhww("point")
	%>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22">用户类型:</td>
    <td height="22" align="center"><font color=red> 
      <%if request.cookies("cnhww")("reglx")=2 then%>
      VIP用户 
      <%else%>
      普通会员 
      <%end if%>
      </font> <%if request.cookies("cnhww")("reglx")=2 then%>
      期限:<%=cnhww("vipdate")%> <%end if%> </td>
  </tr>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22"> 登录次数:</td>
    <td height="22" align="center"><%=cnhww("logins")%></td>
  </tr>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22"> 累计积分:</td>
    <td height="22" align="center"><%=cnhww("point")%></td>
  </tr>
  <%
	set cnhww1=server.CreateObject("adodb.recordset")
	cnhww1.open "select sum(zonger) as sum_jine from wq_action where username='"&request.cookies("cnhww")("username")&"' and zhuangtai<=5",conn,1,1
	%>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22"> 购物金额:</td>
    <td height="22" align="center"><%=cnhww1("sum_jine")%></td>
  </tr>
  <%cnhww1.close
	set cnhww1=nothing%>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22"> 预存金额:</td>
    <td height="22" align="center"><%=cnhww("yucun")%></td>
  </tr>
  <%if request.cookies("cnhww")("reglx")=2 then%>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22"> VIP 期限:</td>
    <td height="22" align="center"><%=cnhww("vipdate")%></td>
  </tr>
  <%end if%>
  <%
	set cnhww1=server.CreateObject("adodb.recordset")
	cnhww1.open "select count(*) as rec_count from wq_action where username='"&request.cookies("cnhww")("username")&"' and zhuangtai=6",conn,1,1
	%>
  <tr bgcolor="#FFFFEE"> 
    <td width="121" align="center" height="22"> 收藏商品数:</td>
    <td height="22" align="center"><%=cnhww1("rec_count")%></td>
  </tr>
  <%cnhww1.close
	set cnhww1=nothing%>
  <%cnhww.close
	set cnhww=nothing%>
</table>
<%
end sub

sub point()
if request.cookies("cnhww")("username")="" then
response.Redirect "user.asp"
response.End
end if
%>
<table width=570 border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFCC00>
  <tr> 
    <td bgcolor=#FFFFEE height="22"> 
      <div align=center><font color=#FF0000>积分情况</font></div>
    </td>
  </tr>
        <%
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select point from [wq_user] where username='"&request.cookies("cnhww")("username")&"' ",conn,1,1
	ky_point=cnhww("point")
	cnhww.close
	set cnhww=nothing%>
  <tr> 
    <td height="22" align="center" bgcolor=#FFFFEE>&nbsp;&nbsp; 可用积分:<font color=#FF0000><%=ky_point%></font>
        <%
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select sum(zonger) as sum_jine from wq_action where username='"&request.cookies("cnhww")("username")&"' and zhuangtai<=5",conn,1,1
	ky_point2=cnhww("sum_jine")
	cnhww.close
	set cnhww=nothing%>&nbsp;&nbsp;累计购物金额(不含费用):<font color=#FF0000><%=ky_point2%></font>元</td>
  </tr>
   <tr> 
    <td height=22 bgcolor=#FFFFEE align=center>奖品清单</td>
  </tr>
  <tr> 
    <td height=28 bgcolor=#FFFFEE> 
      <table width="100%" border="0">
        <tr align="center"> 
          <td height="22">奖品名称</td>
          <td height="22">需要积分</td>
          <td height="22">操作</td>
        </tr>
        <%
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select * from wq_award where xianshi=1",conn,1,1
	while not cnhww.eof%>
        <tr>
          <td height="22"><a href="list_award.asp?id=<%=cnhww("bookid")%>" ><%=cnhww("bookname")%></a></td>
          <td align="center" height="22"><%=cnhww("point")%></td>
          <td align="center" height="22"><a href="score.asp?id=<%=cnhww("bookid")%>&action=add">选择此项</a></td>
        </tr>
        <%
	cnhww.movenext
	wend
	cnhww.close
	set cnhww=nothing%>
      </table>
    </td>
  </tr>
  <%
	set cnhww=server.CreateObject("adodb.recordset")
	cnhww.open "select * from wq_action_jp where username='"&request.cookies("cnhww")("username")&"' and zhuangtai=7",conn,1,1
	if cnhww.recordcount>0 then%>
  <tr> 
    <td height=22 bgcolor=#FFFFEE align=center>您已选择的奖品清单</td>
  </tr>
  <tr> 
    <td height=28 bgcolor=#FFFFEE> 
      <table width="100%" border="0">
        <tr align="center"> 
          <td height="22">奖品名称</td>
          <td height="22">使用积分</td>
          <td height="22">操作</td>
        </tr>
        <%
	while not cnhww.eof%>
        <tr>
          <td height="22">
            <%
	set cnhww1=server.CreateObject("adodb.recordset")
	cnhww1.open "select * from wq_award where bookid="&cnhww("bookid"),conn,1,1
	if cnhww1.recordcount=1 then
	response.write "<a href='list_award.asp?id="&cnhww("bookid")&"' >"&cnhww1("bookname")&"</a>"
	end if
	cnhww1.close
	set cnhww1=nothing%>
          </td>
          <td align="center" height="22"><%=cnhww("point")%></td>
          <td align="center" height="22"><a href="score.asp?actionid=<%=cnhww("actionid")%>&action=del">删除此项</a></td>
        </tr>
        <%
	cnhww.movenext
	wend%>
      </table>
    </td>
  </tr>
  <%end if
	cnhww.close
	set cnhww=nothing%>
  <tr> 
    <td bgcolor=#FFFFEE height="22"> 
      <div align=center><font color=#FF0000>积分兑换奖品说明</font></div>
    </td>
  </tr>
  <tr> 
    <td bgcolor=#FFFFEE> 
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td>
            <%set rs=server.createobject("adodb.recordset")
                              rs.open "select jfhj from wq_config ",conn,1,1
                              response.write rs("jfhj")
                              rs.close
                              set rs=nothing
                              %>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%
end sub

sub sqvip()
if request.cookies("cnhww")("username")="" then
response.Redirect "user.asp?"
elseif request.cookies("cnhww")("reglx")=2 then
response.write"<SCRIPT language=JavaScript>alert('您已经是VIP用户!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.End
end if
%>
<table width=570 border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFCC00>
  <tr> 
    <td height=22 bgcolor=#FFFFEE> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -