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

📄 orderlist_20030324.asp

📁 人民医院眼科全站
💻 ASP
字号:
<!--#include file="../include/bkconn.asp"-->
<!--#include file="checkUser.asp"-->
<%
function selectTreeList(i,deep)
	dim sql
	dim rs
	dim tempi
	dim rsID
	set rs=server.createObject("adodb.recordset")
	sql="select * from productSort where fatherID=39"
	rs.open sql,conn,1,1
	'if rs.eof then
	'	exit function
	'else
		do while not rs.eof 
			rsID=rs("id")
			rsName=rs("name")
			response.write "<option value="&rsID
			if trim(rsID)=trim(productSort) then response.write " selected"	
			response.write ">"
			'response.write "rsid="&rsid&",productsort="&productsort&"---"
			response.write rsName&"</option>"
			rs.movenext
		loop
	'end if
end function

Function selected(firstval,secondval)    
 If firstval=secondval then    
     selected="selected"    
 End if    
End Function
%>
<%
dim rs,sql
dim page,maxPerPage

productSort=trim(request("productSort"))
mykeyword=trim(request("mykeyword"))
selectsearch=trim(request("selectsearch"))
date1=trim(request("date1"))
date2=trim(request("date2"))
searchstr=""
if  request("mysearch")="product"  then
	if  productsort<>"0" then searchstr="  and  productsort=" & productsort & " "
	if mykeyword<>"" then
	searchstr="  and " & selectsearch & " like '%" & mykeyword & "%'  "
	end if
	sql="SELECT *  FROM product,orderdetail,orders where orders.id=orderdetail.orderid and product.id=orderdetail.productid and 1=1 and state=0 " & searchstr
	sql=sql&" order by product.id desc"
else
	if  date1<>"" then 
	searchstr="  and  createdate between #" & date1 & "# "
	else
	searchstr="  and  createdate between #2002-1-1# "
	end if
	if  date2<>"" then 
	searchstr=searchstr & " and #" & date2 & "# "
	else
	searchstr=searchstr & " and #" & now() & "# "
	end if
	sql="select * from orders where state=0 " & searchstr
	sql=sql&" order by id desc"
end if
maxPerPage=10 '每页显示的记录数
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="orderList.asp?true=1"
session("adminOldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
	'response.write sql
	'response.end
rs.open sql,conn,1,1	

rs.pagesize=MaxPerPage
%>
<html>
<head>
<title>订单维护</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../main.css" type="text/css">
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
	this.document.location="<%=thisUrl%>";}
if(i==2){
	this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
	this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
	this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
</head>

<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="0">
  <br>
  
<table width="90%" border="0" cellspacing="0" cellpadding="0" height="16">
  <tr>
      <td>
      <div align="center">订单维护</div>
    </td>
    </tr>
  </table>
 <%if request("mysearch") ="product" then %>
<table width="99%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
  <tr bgcolor="#4296E7"> 
    <form method="post" action="orderlist.asp" name="form1">
      <td height="14" colspan="7"> 
        <div align="center"></div>
        <div align="right"><font color="#FFFFFF">关键词:
          <input type="hidden" name="mysearch" value="product">
          </font> 
          <input type="text" name="myKeyword" size="16" value="<%=myKeyword%>">
          <select name="selectsearch" >
            <option value="productname" <%=selected(selectsearch,"name")%> >产品名称</option>
            <option value="remark" <%=selected(selectsearch,"remark")%> >厂 号</option>
          </select>
          <select name="productSort">
            <option value="0">全部分类</option>
            <%call selectTreeList(0,0)%>
          </select>
          <input type="submit" name="Submit2" value="搜索">
        </div>
      </td>
    </form>
  </tr>
  <tr bgcolor="#4296E7">
     <form method="post" action="orderlist.asp" name="form1">
    <td height="14" colspan="7"> 
        <div align="right"><font color="#FFFFFF">
          <input type="hidden" name="mysearch" value="orderdate">
          日期:</font> <font color="#FFFFFF">从</font> 
          <input type="text" name="date1" size="16" value="<%=date1%>">
        <font color="#FFFFFF">到</font> 
        <input type="text" name="date2" size="16" value="<%=date2%>">
        <input type="submit" name="Submit2" value="搜索">
      </div>
    </td>
	</form>
  </tr>
  <tr bgcolor="#5EA5E6"> 
    <td width="2%" nowrap> 
      <div align="center"><font color="#FFFFFF"> 编号</font></div>
    </td>
	    <td width="20%" nowrap> 
      <div align="center"><font color="#FFFFFF">产品名称</font></div>
    </td>
    <td width="5%" nowrap> 
      <div align="center"><font color="#FFFFFF">客户帐号</font></div>
    </td>
    <td width="16%" nowrap> 
      <div align="center"><font color="#FFFFFF">地址</font></div>
    </td>
    <td width="31%" nowrap> 
      <div align="center"><font color="#FFFFFF">电话</font></div>
    </td>
    <td width="6%" nowrap> 
      <div align="center"><font color="#FFFFFF">Email</font></div>
    </td>
    <td width="6%" nowrap> 
      <div align="center"><font color="#FFFFFF">详细</font></div>
    </td>
  </tr>
  <%
		'dim rsID
		i=1
		if not (rs.eof or err) then rs.move (page-1)*maxPerPage
		do while not (rs.eof or err) 
		rsID=rs("id")
%>
  <tr> 
    <td width="2%"> 
      <div align="center"><%=rs("orderid")%></div>
    </td>
	<td width="16%" nowrap><%=rs("productName")%></td>
    <%if rs("memberID")<>"非会员" then %>
    <td width="5%" title="点击查看会员信息" style="cursor:hand" onClick="Javascript:window.location='memberMod.asp?memberID=<%=rs("memberID")%>'" bgcolor="#0099FF" nowrap><%=rs("memberID")%>&nbsp;</td>
    <%else %>
    <td width="20%">非会员</td>
    <%end if %>
    <td width="31%"><%=rs("address")%></td>
    <td width="6%" nowrap><%=rs("phone")%></td>
    <td width="6%" nowrap><%=rs("email")%></td>
    <td width="14%" title="点击查看订单具体信息" style="cursor:hand" onClick="Javascript:window.location='orderMod.asp?id=<%=rs("id")%>'" bgcolor="#009999" nowrap>处理</td>
  </tr>
  <%
		i=i+1
		if i>maxPerPage then exit do
		rs.moveNext
		loop
%>
  <tr bgcolor="#4296E7"> 
    <td colspan="7"> 
      <div align="right"><font color=#FFFFFF><%=rs.recordCount%> 项 第<%=page%>/<%=rs.pageCount%> 
        页 </font> 
        <%if page>1 then%>
        <input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
        <input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
        <%else%>
        <input type="button" name="Submit3" value="首页" disabled>
        <input type="submit" name="Submit4" value="上页" disabled>
        <%end if
if rs.recordCount>page*maxPerPage then%>
        <input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
        <input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
        <%else%>
        <input type="submit" name="Submit5" value="下页" disabled>
        <input type="submit" name="Submit6" value="末页" disabled>
        <%end if%>
      </div>
    </td>
  </tr>
</table>
<%else%>
<table width="99%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
  <tr bgcolor="#4296E7"> 
    <form method="post" action="orderlist.asp" name="form1">
      <td height="14" colspan="7"> 
        <div align="center"></div>
        <div align="right"><font color="#FFFFFF">关键词:
          <input type="hidden" name="mysearch" value="product">
          </font> 
          <input type="text" name="myKeyword" size="16" value="<%=myKeyword%>">
          <select name="selectsearch" >
            <option value="productname" <%=selected(selectsearch,"name")%> >产品名称</option>
            <option value="remark" <%=selected(selectsearch,"remark")%> >厂 号</option>
          </select>
          <select name="productSort">
            <option value="0">全部分类</option>
            <%call selectTreeList(0,0)%>
          </select>
          <input type="submit" name="Submit2" value="搜索">
        </div>
      </td>
    </form>
  </tr>
  <tr bgcolor="#4296E7">
     <form method="post" action="orderlist.asp" name="form1">
    <td height="14" colspan="7"> 
        <div align="right"><font color="#FFFFFF">
          <input type="hidden" name="mysearch" value="orderdate">
          日期:</font> <font color="#FFFFFF">从</font> 
          <input type="text" name="date1" size="16" value="<%=date1%>">
        <font color="#FFFFFF">到</font> 
        <input type="text" name="date2" size="16" value="<%=date2%>">
        <input type="submit" name="Submit2" value="搜索">
      </div>
    </td>
	</form>
  </tr>
  <tr bgcolor="#5EA5E6"> 
    <td width="6%" nowrap> 
      <div align="center"><font color="#FFFFFF"> 编号</font></div>
    </td>
    <td width="8%" nowrap> 
      <div align="center"><font color="#FFFFFF">客户帐号</font></div>
    </td>
    <td width="7%" nowrap> 
      <div align="center"><font color="#FFFFFF">客户姓名</font></div>
    </td>
    <td width="50%" nowrap> 
      <div align="center"><font color="#FFFFFF">地址</font></div>
    </td>
    <td width="12%" nowrap> 
      <div align="center"><font color="#FFFFFF">电话</font></div>
    </td>
    <td width="12%" nowrap> 
      <div align="center"><font color="#FFFFFF">Email</font></div>
    </td>
    <td width="5%" nowrap> 
      <div align="center"><font color="#FFFFFF">详细</font></div>
    </td>
  </tr>
  <%
		'dim rsID
		i=1
		if not (rs.eof or err) then rs.move (page-1)*maxPerPage
		do while not (rs.eof or err) 
		rsID=rs("id")
%>
  <tr> 
    <td width="6%"> 
      <div align="center"><%=rs("id")%></div>
    </td>
    <%if rs("memberID")<>"非会员" then %>
    <td width="8%" title="点击查看会员信息" style="cursor:hand" onClick="Javascript:window.location='memberMod.asp?memberID=<%=rs("memberID")%>'" bgcolor="#0099FF" nowrap><%=rs("memberID")%>&nbsp;</td>
    <%else %>
    <td width="8%">非会员</td>
    <%end if %>
    <td width="7%" nowrap><%=rs("customerName")%></td>
    <td width="50%"><%=rs("address")%></td>
    <td width="12%" nowrap><%=rs("phone")%></td>
    <td width="12%" nowrap><%=rs("email")%></td>
    <td width="5%" title="点击查看订单具体信息" style="cursor:hand" onClick="Javascript:window.location='orderMod.asp?id=<%=rs("id")%>'" bgcolor="#009999" nowrap>处理</td>
  </tr>
  <%
		i=i+1
		if i>maxPerPage then exit do
		rs.moveNext
		loop
%>
  <tr bgcolor="#4296E7"> 
    <td colspan="7"> 
      <div align="right"><font color=#FFFFFF><%=rs.recordCount%> 项 第<%=page%>/<%=rs.pageCount%> 
        页 </font> 
        <%if page>1 then%>
        <input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
        <input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
        <%else%>
        <input type="button" name="Submit3" value="首页" disabled>
        <input type="submit" name="Submit4" value="上页" disabled>
        <%end if
if rs.recordCount>page*maxPerPage then%>
        <input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
        <input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
        <%else%>
        <input type="submit" name="Submit5" value="下页" disabled>
        <input type="submit" name="Submit6" value="末页" disabled>
        <%end if%>
      </div>
    </td>
  </tr>
</table>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

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