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

📄 ordersearch.asp

📁 java的一个网上商店的源码,后台是Access数据库.功能还可以.界面比较简单,但是基本的功能都有.
💻 ASP
字号:
<% Option Explicit %>
<!--#include file="../../_ccwlib/_lib.asp"-->
<!--#include file="../../_config/config.asp"-->
<!--#include file="_ccwlib/orderform_lib.asp"-->
<%
Dim RS,Sql,sAdminid,sunGrage
Dim sorderpass,sordersend,sorderid,speriod
Dim sStartPage,sPageNum,sRecordNum,i
DB_Connect(strconn)
sAdminid=Session("admid") 
 Call IsValidUser(sAdminid,3,1,"../error.htm",oConn)
 sunGrage=OrderPowerGrade(sAdminid,sOrder_Level,oConn)
 sOrderPass=getForm("sltorderpass")
 sOrdersend=getForm("sltordersend")
 sOrderid=getForm("txtorderid")
 speriod=getForm("sltperiod")
 Select Case sunGrage
	  Case 1 Sql="select * from order_detail_view "
	  Case 2  Sql="select * from order_detail_view where Odr_ispass='y' order by Odr_time desc"
 End Select
 Select Case sOrderPass
    Case "0" sql=Sql&" where Odr_ispass='%'"
	Case "y" sql=Sql&" where Odr_ispass='y'"
	Case "n" sql=Sql&" where Odr_ispass='n'"
	Case else sql=Sql&" where Odr_ispass='y'"
 End Select
 Select Case sOrdersend
    Case "0" sql=Sql
	Case "y" sql=Sql&" and  Odr_issent='y'"
	Case "n" sql=Sql&" and  Odr_issent='n'"
	Case else sql=Sql&"  and  Odr_issent='y'"
 End Select
 
 If sOrderid<>"" then
   Sql=Sql&"  and Odr_no like '%"&sOrderid&"%' "
 End If
' Select Case speriod
'    Case 0 sql=Sql
'	Case 3 sql=Sql&" and dateadd(day,-3,getdate())"
'	Case 7 sql=Sql&" and dateadd(day,-7,getdate())"
'	Case 14 sql=Sql&" and dateadd(day,-14,getdate())"
'	Case 30 sql=Sql&" and dateadd(day,-30,getdate())"
'	Case 90 sql=Sql&" and dateadd(day,-90,getdate())"
'	Case 180 sql=Sql&" and dateadd(day,-180,getdate())"
'	Case else sql
' End Select
  Sql=Sql&" order by Odr_time desc"
%>
<html>
<head>
<TITLE>Nokia E-order System</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL="stylesheet" HREF="../../inc/css/pub.css" TYPE="TEXT/CSS">
</head>
<body bgcolor="#FFFFFF" text="#000000">

<p>|订单管理|订单统计|</p>
<form name="form1" method="post" action="ordersearch.asp">
  <div align="center">
    <table width="63%" border="0" cellspacing="0" cellpadding="3" bordercolordark="#ffffff" bordercolorlight="#666666">
      <tr> 
        <td width="13%" nowrap> 订单确定
          <select name="sltorderpass">
         <%If sunGrage=1 Then%>
            <option    value=0>选择所有</option>
            <option value="n">未确定</option>
		<%End If%>
			 <option value="y">已确定</option>
          </select>
        </td>
        <td width="17%" nowrap> 订单发送
<select name="sltordersend">
            <option value="0">选择所有</option>
            <option value="y">完成发送</option>
            <option value="n">未完成发送</option>
          </select>
        </td>
        <td width="14%" nowrap> 订单号
<input type="text" name="txtorderid" size="15">
        </td>
        <td width="15%" nowrap> 时间<select name="sltperiod">
            <option value="0">所有的</option>
            <option value="3">近三天的</option>
            <option value="7">近一周的</option>
            <option value="14">近两星期的</option>
            <option value="30">近一个月的</option>
            <option value="90">近三个月的</option>
            <option value="180">近六个月的</option>
          </select>
        </td>
        <td width="41%"> 
          <input type="submit" name="Submit" value="查询">
        </td>
      </tr>
    </table>
  </div>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <th align="center"><b>订单管理</b></th>
  </tr>
</table>
<hr size="2" width="100%">
<br>
<form name="frmorderlist" method="post" action="">
  <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolordark="#ffffff" bordercolorlight="#666666">
    <tr align="center" bgcolor="#999999"> 
      <td width="8%" height="20" align="center"><font color="#FFFFFF">序号</font></td>
      <td width="12%" height="20"><font color="#FFFFFF">订购人</font></td>
      <td width="25%" height="20"><font color="#FFFFFF">订购人单位</font></td>
      <td width="12%" height="20" align="center"><font color="#FFFFFF">订购状态</font></td>
      <td width="12%" height="20" align="center"><font color="#FFFFFF">发送状态</font></td>
      <td width="12%" height="20"><font color="#FFFFFF">订购号</font></td>
      <td width="12%" height="20"><font color="#FFFFFF">订购日期</font></td>
      <td width="8%" height="20"><font color="#FFFFFF">删除</font></td>
    </tr>
	<% 
	Set RS=Server.CreateObject("ADODB.RecordSet")
	    RS.PageSize=10
	  sStartPage=request("stp")
	  if sStartPage="" or  not(IsNumeric(sStartPage)) then
	     sStartpage=1
	  End if
	  response.write sql
	  RS.open sql,oConn,1
  If Not RS.Eof And Not RS.Bof Then
      sRecordNum=RS.Recordcount
      sPageNum=RS.pagecount
    If sPageNum+1>sStartpage then
      RS.AbsolutePage=sStartPage
      i=0
	  Do while not RS.eof and i<10
	%>
    <tr> 
      <td height="8" width="8%" align="center"><%response.write (sStartPage-1)*10+i%></td>
      <td height="10" width="12%"><a  href="userifno.asp?uid=<% response.write RS("Usr_id")%>"><%response.write RS("Usr_name")%></a></td>
      <td height="25" width="25%"><%response.write RS("Usr_company")%></td>
      <td height="25" width="12%" align="center">
	    <% If sunGrade=1 Then %>
          <% 
		     If RS("Odr_ispass")="y" then 
		       Response.write "已确定"
		     Else
		      %>
         <input type="checkbox" name="ckbpass" value="<%response.write RS("Odr_id")%>">确定
		   <%End If%>
		<% 
		  Else 
		    Response.write "已确定"
		  End If
		%>
		</td>
      <td height="25" width="12%" align="center">
	    <%
		  If RS("Odr_issent")="y" Then
		    Response.write "已发送"
		  else
		  %>
        <input type="checkbox" name="ckbsend" value="<%response.write RS("Odr_id")%>">
        发送
		<% End If%>
		</td>
      <td height="12" width="12%"><a href="orderdetail.asp?orderid=<%response.write RS("Odr_id")%>"><%response.write RS("Odr_no")%></a></td>
      <td height="12" width="12%" align="center"><%response.write year(RS("Odr_time"))&"-"&month(RS("Odr_time"))&"-"&day(RS("Odr_time")) %></td>
      <td height="8" width="10%">
	    <%if SunGrade=1 Then%>
        <input type="checkbox" name="ckbdel" value="checkbox">
		<% 
		 Else
		  response.write "NO"
		%>		  
		<% End If%>
      </td>
    </tr>
	  <%
	    Rs.movenext 
		i=i+1
		loop
	 Else%>
    <tr> 
      <td height="8" colspan=8 align="center">没有此页面
      </td>
    </tr>
	<%	 
	 End If
	Else
	%>
    <tr> 
      <td height="8" colspan=8 align="center">还没有订购单
      </td>
    </tr>
   <% 
    End If
    DB_RSConnect(RS)
   %>

    <tr> 
      <td height="8" width="8%" align="center">3</td>
      <td height="10" width="12%">orderman3</td>
      <td height="25" width="25%">orderman company1 name</td>
      <td height="25" width="12%" align="center">
        <input type="checkbox" name="checkbox2" value="checkbox">
        确定</td>
      <td height="25" width="12%" align="center">
<input type="checkbox" name="checkbox5" value="checkbox">
        发送</td>
      <td height="12" width="12%"><a href="orderdetail.asp">20020805123</a></td>
      <td height="12" width="12%" align="center">2002-7-8</td>
      <td height="8" width="8%"> 
        <input type="checkbox" name="checkbox" value="checkbox">
      </td>
    </tr>
    <tr> 
      <td height="8" width="8%" align="center">4</td>
      <td height="10" width="12%">orderman4</td>
      <td height="25" width="25%">orderman company1 name</td>
      <td height="25" width="12%" align="center">已确定</td>
      <td height="25" width="12%" align="center">已发送</td>
      <td height="12" width="12%"><a href="orderdetail.asp">20020805123</a></td>
      <td height="12" width="12%" align="center">2002-7-8</td>
      <td height="8" width="8%"> 
        <input type="checkbox" name="checkbox" value="checkbox">
      </td>
    </tr>
    <tr> 
      <td height="8" width="8%" align="center">5</td>
      <td height="10" width="12%">orderman5</td>
      <td height="25" width="25%">orderman company1 name</td>
      <td height="25" width="12%" align="center">已确定</td>
      <td height="25" width="12%" align="center">已发送</td>
      <td height="12" width="12%"><a href="orderdetail.asp">20020805123</a></td>
      <td height="12" width="12%" align="center">2002-7-8</td>
      <td height="8" width="8%"> 
        <input type="checkbox" name="checkbox" value="checkbox">
      </td>
    </tr>
    <tr> 
      <td height="8" colspan="8" align="center"> 
        <input type="submit" name="btnorderAction" value="订购状态确认">
        <input type="submit" name="btnorderAction" value="订单发送确认">
        <input type="submit" name="btnorderAction" value="订单删除">
      </td>
    </tr>
  </table>
  </form>
 <%if sPageNum=0 or sPageNum="" then sPageNum=1%>
<form name="frmjump" method="post" action="index.asp" onsubmit="javascript:jumpto(document.frmjump.stp.value)">
  <table width="100%" border="0" cellspacing="0" cellpadding="3">
    <tr> 
      <td>|共<%response.write sPageNum%>页|第<%response.write sStartpage%>页|</td>
      <td> 
        <div align="right">去第 
          <input type="text" name="stp" size="3">
          <input type="submit" name="sbtjump" value="go">
        </div>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<SCRIPT LANGUAGE=javascript>
<!--
function jumpto(a){
   //a=document.frmjump.stp.value;
  if(isNaN(a) || parseInt(a) != a || a<=0){
    document.frmjump.stp.value="";
    alert("请输入1到"+<%=sPageNum%>+"之间的正整数!");
    return false;
  }  
  if (a><%=sPageNum%>){
    document.frmjump.stp.value="";
    alert("您只能输入1到"+<%=sPageNum%>+"之间的正整数!");
 	return false;
  }
}
//-->
</SCRIPT>

⌨️ 快捷键说明

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