📄 all.asp
字号:
<%@language=vbscript%>
<% response.buffer=true %>
<%'On Error Resume Next%>
<%const title="查看库存"%>
<html>
<head>
<title><%=title%></title>
<meta http-equiv="refresh" content="15">
<link rel=stylesheet type=text/css href=forum.css>
</head>
<body topmargin="0">
<!--#include file=myprg.asp-->
<!--#include file=Opendb.inc-->
<%
'response.write "guest="&request.cookies("guestok")
if request.cookies("guestok")="" then
response.redirect "relogin.asp"
end if
showtitle(title)
sql="select * from storage order by storage_name"
rs.open sql,conn,1,1
dim cangku_list
cangku_list="[ <a href=all.asp>所有仓库</a> "
if not rs.eof then
do while not rs.eof
cangku_list=cangku_list+" | <a href=all.asp?storage_id="&rs("storage_id")&"&type_id="&request("type_id")&">"&rs("storage_name")&"</a>"
rs.movenext
loop
else
cangku_list=cangku_list+" | <font color=red>无仓库分类</font>"
end if
cangku_list=cangku_list+" ]"
rs.close
response.write "<b>仓库分类:</b>"+cangku_list&"<hr size=1>"
if request("storage_id")="" then
sql="select * from type order by type_name"
else
sql="select * from type where in_storage="&request("storage_id")&" order by type_name"
end if
rs.open sql,conn,1,1
cangku_list="[ <a href=all.asp?storage_id="&request("storage_id")&">所有类别</a> "
if not rs.eof then
do while not rs.eof
cangku_list=cangku_list+" | <a href=all.asp?type_id="&rs("type_id")&"&storage_id="&request("storage_id")&" >"&rs("type_name")&"</a>"
rs.movenext
loop
else
cangku_list=cangku_list+" | <font color=red>无物品分类</font>"
end if
cangku_list=cangku_list+" ]"
rs.close
response.write "<b>物品分类:</b>"+cangku_list
%>
<hr size=1>
<font color=blue>
<%
response.write session("username")&"</font>"
if request("storage_id")="" then
response.write " 查看仓库: [ <font color=red>所有仓库</font> ]"
else
sql="select * from storage where storage_id="&Request("storage_id")
rs.open sql,conn,3,2
if not rs.eof then
response.write " 查看仓库: [ <font color=red>"&rs("storage_name")&"</font> ]"
else
response.write " 查看仓库: [ <font color=red>未知仓库</font> ]"
end if
rs.close
end if
if Request("type_id")="" then
response.write " 查看类别: [ <font color=red>所有类别</font> ]"
else
if request.querystring("storage_id")="" then
sql="select * from type where type_id="&Request.querystring("type_id")
else
sql="select * from type where type_id="&Request.querystring("type_id")&" and in_storage="&request.querystring("storage_id")
end if
rs.open sql,conn,3,2
if not rs.eof then
response.write " 查看类别: [ <font color=red>"&rs("type_name")&"</font> ]"
else
response.write " 查看类别: [ <font color=red>未知类别</font> ]"
end if
rs.close
end if
%>
<% const MaxPerPage=50 '分页显示的纪录个数
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim detail
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
'response.write "currentpage="¤tpage
%>
<%
session("key")=replace(request.form("keyword"),"<","<")
session("key")=replace(session("key"),">",">")
%>
<form method=Post action=all.asp>
<table border=0 align=center>
<tr>
<td nowrap>关键字:<input class=smallinput size=10 type=textbox name=keyword value=<%=session("key")%>></td>
<td nowrap><input class=buttonface type=submit name=ok value=查找>
[ <a href=logout.asp>退出</a> ]
</td>
</tr>
</table>
<br>
<table align=center border='1' width=100% cellspacing='0' bordercolordark='#FFFFFF' bordercolorlight='#DADBFC' bordercolor='#00000'>
<%ShowContent%>
</table>
</form>
<%ShowPages%>
<!--#include file=copyright.asp-->
</body>
</html>
<%
sub ShowContent()
keyword=request.form("keyword")
if keyword<>"" then
searchsql=" and name like'%" &keyword &"%' or memo like'%" &keyword &"%'"
else
searchsql=""
end if
if Request.querystring("type_id")="" then
if Request.querystring("storage_id")="" then
sql="select * from stock where true " '所有仓库所有类别
else
sql="select * from stock where storage_id="&request.querystring("storage_id") '某仓库的所有类别
end if
else
if Request.querystring("storage_id")="" then
sql="select * from stock where type_id="&request.querystring("type_id")
else
sql="select * from stock where storage_id="&request.querystring("storage_id") &" and type_id="&Request.querystring("type_id")
end if
end if
sql=sql+searchsql+" order by name"
rs.open sql,conn,3,2
i=0
if not rs.eof then
response.write " <tr bgcolor='#0000A0'>"
response.write " <td nowrap align=center ><font color=white>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -