?? kuguan.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=data/conn.asp-->
<!--#include file=connfig.asp-->
<!--#include file=inc/yan.asp-->
<%
call case8
if request("del")<>"" then
call del
end if
function del
sql3="delete from kucun where id="&request("del")
conn.Execute(sql3)
end function
%>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from kucun order by time desc"
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
<style type="text/css">
<!--
.style1 {
font-size: 16px;
color: #0000FF;
font-weight: bold;
}
body,td,th {
font-size: 12px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #CCCCCC;
}
a:active {
text-decoration: none;
}
body {
background-color: #ffffff;
}
.style2 {color: #000000}
.style3 {color: #FFFFFF}
-->
</style>
</head>
<body>
<p> </p>
<table width="570" height="195" border="0" align="center" cellspacing="1" bgcolor="#336699">
<tr bgcolor="#FF9900">
<td height="61" colspan="7"><div align="center" class="style1 style3">庫存盤點表</div></td>
</tr>
<tr>
<td width="99" height="32" background="images/tile_sub.gif"><div align="center" class="style2">產品名稱</div></td>
<td width="87" background="images/tile_sub.gif"><div align="center" class="style2">發出</div></td>
<td width="95" background="images/tile_sub.gif"><div align="center" class="style2">入庫</div></td>
<td width="90" background="images/tile_sub.gif"><div align="center" class="style2">庫存</div></td>
<td width="96" background="images/tile_sub.gif"><div align="center" class="style2">日期</div></td>
<td colspan="2" background="images/tile_sub.gif"><div align="center" class="style2">管理</div></td>
</tr>
<%
if not rs.eof then
zong=rs.recordcount
shownum=15
rs.pagesize=shownum
maxpage=rs.pagecount
requestpage=clng(request("p"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if requestpage<>1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.eof
%>
<tr>
<td height="24" bgcolor="#FFFFFF"><div align="center"><%=rs("xinghao")%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%= rs("fa") %></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%= rs("ru") %></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%= rs("ru")-rs("fa") %></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%= rs("time") %></div></td>
<td width="39" bgcolor="#FFFFFF"><div align="center"><a href="kucunup.asp?id=<%=rs("id")%>">修改</a></div></td>
<% If ps("chaoji")=1 Then %>
<td width="42" bgcolor="#FFFFFF"><div align="center"><a href="kuguan.asp?del=<%=rs("id")%>&p=<%=requestpage%>">刪除</a></div></td>
<% End If %>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
else
response.Write("暫無信息")
end if
%>
<tr>
<td height="28" bgcolor="#D7D7D7"><div align="center">合計</div></td>
<td bgcolor="#D7D7D7"><div align="center">
<%
set rs1=server.CreateObject("adodb.recordset")
sql1="select sum(fa) as ff from kucun"
rs1.open sql1,conn,1,1
%>
<%= rs1("ff") %></div></td>
<td bgcolor="#D7D7D7"><div align="center">
<%
set rs2=server.CreateObject("adodb.recordset")
sql2="select sum(ru) as rr from kucun"
rs2.open sql2,conn,1,1
%>
<%= rs2("rr") %></div></td>
<td bgcolor="#D7D7D7">
<div align="center"><%= rs2("rr")-rs1("ff") %></div></td>
<td colspan="3" bgcolor="#D7D7D7"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="32" colspan="7"><table width="100%" border="0">
<tr>
<td width="38%">【<a href=javascript:window.print();>打印</a>】 </td>
<td width="62%"><div align="right">【<a href=kuguan.asp?p=1>第一頁</a>】 【<a href=kuguan.asp?p=<%=requestpage-1%>>上一頁</a>】 【<a href=kuguan.asp?p=<%=requestpage+1%>>下一頁</a>】 【<a href=kuguan.asp?p=<%=maxpage%>>最后一頁</a>】</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -