?? product_manage.asp
字號:
<!-- #include file="admin_protect.inc" -->
<!-- #include file="../opendb.inc" -->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta Name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta Name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; chaRset=gb2312">
<title>配送商管理頁面</title>
</head>
<body>
<script language="JavaScript">
<!--
function check()
{
if (isnan(go2to.page.value))
alert("請正確填寫轉(zhuǎn)到頁數(shù)!");
else if (go2to.page.value=="")
{
alert("請輸入轉(zhuǎn)到頁數(shù)!");
}
else
go2to.submit();
}
//-->
</script>
<%
'--------------------------------------
%>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open(sqlOpenDB) '打開數(shù)據(jù)庫
Set Rs=Server.CreateObject("ADODB.RecordSet")
Key=Request("Findproduct")
If Key="" Then
Sql="Select * From Product"
Else
Sql="Select * From Product Where Name Like '"&Key&"' "
End If
Rs.Open Sql,Conn,1,3
If Rs.Eof And Rs.Bof Then
Response.Write"<Br>"
Response.Write"=== 暫無 ==="
%>
<p align="center"><b><font color="#008000"> <a href="addproduct.asp">添加新的商品</a></b></font></p>
<%
Response.Write"<Br><Br>"
%>
<p align="center"><span lang="zh-cn"><b><a href="product_manage.asp">返回</a></b></span></p>
<%
Response.End
End If
%>
<%
Rs.PageSize=10
If Not IsEmpty(Request("Page")) Then
PageCount=Cint(Request("Page"))
Else
PageCount=1
End If
If PageCount>Rs.PageCount Or PageCount<=0 Then
PageCount=1
End If
Rs.AbsolutePage=PageCount %>
<table border="0" cellpadding="0" cellspacing="0" width="902" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" class=ver>
<tr>
<% If Rs.pagecount=1 Then %>
<td height="25" colspan="4" class="ver" width="902">
<div align="center"><font class=ver>共有[<font color="#ff0000"><%=Rs.recordcount%></font>]<span lang="zh-cn">商品</span>
以下是[<font color="red">1~<%=Rs.recordcount%></font>]個 </font></div>
</td>
</tr>
<tr>
<td height="7" colspan="4" width="902" ></td>
</tr><%else%>
<tr>
<td height="25" colspan="4" width="902" >
<div align="center"><font class=ver>
<%
Page_Start=(PageCount-1)*Rs.PageSize
If PageCount=1 Then Page_Start=1
Page_End=Rs.PageSize*PageCount
If PageCount*Rs.PageSize=>Rs.Recordcount Then Page_End=Rs.Recordcount End If%>
共有[<font color="#ff0000"><%=Rs.recordcount%></font>]<span lang="zh-cn">商品</span>
以下是[<font color="red"><%=page_start%>~<%=page_end%></font>]</font></div>
</td>
</tr>
<tr>
<td height="25" colspan="4" width="902" > <% Response.Write"<Form Name=Go2To Form Method=Post Action='product_Manage.Asp?Key="+Key+"'>"
Response.Write "<Font Color=Ffffff>◆ </font>"
If PageCount=1 Then
Response.Write "<Font Class=Ver>首頁 上一頁</Font> "
Else
Response.Write "<A Href=Product_Manage.Asp?Page=1&Key="+Key+"><Font Class=Ver>首頁</font></a> "
Response.Write "<A Href=Product_Manage.Asp?Page="+Cstr(PageCount-1)+"&Key="+Key+"><Font Color='0000Be'>上一頁</Font></A> "
End If
If Rs.PageCount-PageCount<1 Then
Response.Write "<Font Class=Ver>下一頁 末頁</Font>"
Else
Response.Write "<A Href=Product_Manage.Asp?Page="+Cstr(PageCount+1)+"&Key="+Key+"><Font Class=Ver>下一頁</Font></A> "
Response.Write "<A Href=Product_Manage.Asp?Page="+Cstr(Rs.PageCount)+"&Key="+Key+"><Font Class=Ver>末頁</Font></A>"
End If
Response.Write "<Font Class=Ver> 頁次:<Font Class=Ver>"&PageCount&"</Font>/"&Rs.PageCount&"頁</Font>"
Response.Write "<Font Class=Ver> 轉(zhuǎn)到第<Input Type='text' Name='page' Size=2 Maxlength=3 Style='font-Size: 9Pt; Color:#00006A; Position: Relative; Height: 18' Value="&PageCount&">頁</Font> "
Response.Write "<Input Class=Button1 Type='button' Value='確 定' onclick=check() style='font-family: 宋體; font-size: 9pt; color: #000073; position: relative; height: 19'>"
%>
</td>
</tr>
<%End If%>
</table>
<p align="center"><b><span lang="zh-cn"><a href="product_find.asp">查詢商品</a></span></b><font color="#008000"><b><span lang="zh-cn">
<a href="addproduct.asp">添加新的商品</a></span></b></font></p>
<table border="1" cellspacing="1" width="100%" id="AutoNumber1">
<tr bgcolor="#CCCCCC">
<td width="9%" nowrap>
<div align="center"><b><font face="Impact">貨物代號</font></b></div>
</td>
<td width="9%" nowrap>
<div align="center"><b><font face="Impact">貨物名稱</font></b></div>
</td>
<td width="9%" nowrap>
<div align="center"><b><font face="Impact">quantity</font></b></div>
</td>
<td width="9%" nowrap>
<div align="center"><b><font face="Impact">單位</font></b></div>
</td>
<td width="9%" nowrap>
<div align="center"><b><span lang="zh-cn"><font face="Impact">單價</font></span></b></div>
</td>
<td width="9%" nowrap>
<div align="center"><b><font face="Impact">庫存</font></b></div>
</td>
<td width="9%" nowrap>
<div align="center"><b><font face="Impact">已訂數(shù)量</font></b></div>
</td>
<td width="10%" nowrap>
<div align="center"><b><span lang="zh-cn">編輯/刪除</span></b></div>
</td>
<td width="10%" nowrap>
<div align="center"><span lang="zh-cn"><b>購買</b></span></div>
</td>
</tr>
<% do while not Rs.eof %>
<tr>
<td width="9%" nowrap height="26"><%=Rs("productid")%>
<div align="center"></div>
</td>
<td width="9%" nowrap height="26"><%=Rs("Name")%>
<div align="center"></div>
</td>
<td width="9%" nowrap height="26"><%=Rs("quantityperunit")%>
<div align="center"></div>
</td>
<td width="9%" nowrap height="26"><%=Rs("unit")%>
<div align="center"></div>
</td>
<td width="9%" nowrap height="26"><%=Rs("unitprice")%>
<div align="center"></div>
</td>
<td width="9%" nowrap height="26"><%=Rs("unitsinstock")%>
<div align="center"></div>
</td>
<td width="9%" nowrap height="26"><%=Rs("unitsonorder")%>
<div align="center"></div>
</td>
<td width="10%" nowrap height="26">
<div align="center"><span lang="zh-cn">【<a href="product_edit.asp?SearchProduct=<%=Rs("Name")%>">編輯】【刪除】</a></span></div>
</td>
<td width="10%" nowrap height="26">
<div align="center"><span lang="zh-cn"> <a href="pro_detail_admin.asp?proID=<%=Rs("productid")%>">買入</a></span></div>
</td>
</tr>
<% i=i+1
Rs.MoveNext
If i>=Rs.PageSize Then Exit Do
Loop
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>
</table>
<p align="right"> </p>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -