📄 kucun.asp
字号:
<%xian=session("xian")
ljl_xian=mid(xian,33,1)
if ljl_xian<>1 then%>
<script language=vbscript>
MsgBox "错误:您无权使用本功能模块,如果确实需要操作本模块的权限,请与管理员联系!"
location.href = "../config/txt.asp"
</script>
<%end if%>
<!--#include file="bkconn.asp"-->
<HTML><HEAD><TITLE>OA--仓库</TITLE>
<META content=zh-cn http-equiv=Content-Language>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="Microsoft FrontPage 5.0" name=GENERATOR>
<link rel="stylesheet" type="text/css" href="normal.css">
<script language="javascript">
function popwin2(id,path)
{ window.open("listnew.asp?id="+id+"&ppath="+path,"","height=380,width=500,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<% const MaxPerPage=15
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim fenqu
dim typename
dim keyword
'fenqu=Session("ljl_add")
keyword=request("guestname")
typename="客户域名信息管理系统"
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<BODY leftMargin=0 topMargin=0>
<DIV align=center>
<CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="56%">
<TBODY>
<TR>
<TD vAlign=top width="100%">
<TABLE border=0 cellPadding=0 cellSpacing=0 width="99%" height="68">
<TBODY>
<TR>
<TD vAlign=top width="22%" height="68">
</TD>
<TD vAlign=top width="75%" height="68">
<DIV align=center>
<CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=579>
<TBODY>
<TR>
<TD height=30
width=4 rowspan="2"><span lang="en-us"> <td width="575">
<!------查询start-------------------->
<% 'if session("ljl_grad")=1 then
'fenqu="可用"
'sql="select * from 入库 where 材料名称 like '%"&keyword&"%' and 可用='可用' order by id desc"
'else
sql="select * from 库存 where 材料名称 like '%"&keyword&"%' order by id desc"
'end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有或没有找到任何数据</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"kucun.asp"
showContent
showpage totalput,MaxPerPage,"kucun.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"kucun.asp"
showContent
showpage totalput,MaxPerPage,"kucun.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"kucun.asp"
showContent
showpage totalput,MaxPerPage,"kucun.asp"
end if
end if
rs.close
end if
set rs=nothing
sub showContent
dim i
i=0
%>
<div align="center">
<table border="1" cellspacing="0" width="494" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
<tr>
<td width="51" align="center" bgcolor="#F7FFFF" height="20"><strong>序号</strong></td>
<td width="177" align="center" bgcolor="#F7FFFF"><strong>材料名称</strong></td>
<td width="45" align="center" bgcolor="#F7FFFF"><strong>规格</strong></td>
<td width="36" align="center" bgcolor="#F7FFFF"><strong>单位</strong></td>
<td width="51" align="center" bgcolor="#F7FFFF">库存数量</td>
</tr>
<%do while not rs.eof
if rs("数量")=0 then%>
<tr>
<td height="23" width="51" bgcolor="#F7FFFF"><p align="center"><%=rs("id")%></td>
<td width="177" bgcolor="#F7FFFF"><p align="left"><span lang="en-us"> </span><font color="#0000FF"><%=rs("材料名称")%></font></td>
<td width="45" bgcolor="#F7FFFF">
<p align="left"><font color="#FF0000">
<%=rs("规格型号")%></font></td>
<td width="36" bgcolor="#F7FFFF">
<p align="center"><font color="#000080"><%=rs("单位")%></font></td>
<td width="51" bgcolor="#F7FFFF">
<p align="center"><%=rs("数量")%></td>
</tr>
<%else
if rs("数量")<0 then%>
<tr>
<td height="23" width="51" bgcolor="#FFF0E1"><p align="center"><%=rs("id")%></td>
<td width="177" bgcolor="#FFF0E1"><p align="left"><span lang="en-us"> </span><font color="#0000FF"><a title="单击可以查看更详细的情况" href="javascript:popwin2(<%=rs("id")%>)"><%=rs("材料名称")%></a></font></td>
<td width="45" bgcolor="#FFF0E1">
<p align="left"><font color="#FF0000">
<%=rs("规格型号")%></font></td>
<td width="36" bgcolor="#FFF0E1">
<p align="center"><font color="#000080"><%=rs("单位")%></font></td>
<td width="51" bgcolor="#FFF0E1">
<p align="center"><%=rs("数量")%></td>
</tr>
<%else%>
<tr>
<td height="23" width="51" bgcolor="#E4E4E4"><p align="center"><%=rs("id")%></td>
<td width="177" bgcolor="#E4E4E4"><p align="left"><span lang="en-us"> </span><font color="#0000FF"><a title="单击可以查看更详细的情况" href="javascript:popwin2(<%=rs("id")%>)"><%=rs("材料名称")%></a></font></td>
<td width="45" bgcolor="#E4E4E4">
<p align="left"><font color="#FF0000">
<%=rs("规格型号")%></font></td>
<td width="36" bgcolor="#E4E4E4">
<p align="center"><font color="#000080"><%=rs("单位")%></font></td>
<td width="51" bgcolor="#E4E4E4">
<p align="center"><%=rs("数量")%></td>
</tr>
<%end if%>
<%end if%>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</div>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&"?guestname="&keyword&">"
' response.write "<p align='center'><font color='red'>"&typename&"</font> "
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1&guestname="&keyword&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&guestname="&keyword&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&guestname="&keyword&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&guestname="&keyword&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>条记录 <b>"&maxperpage&"</b>条记录/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput type='text' name='txtitle' value="¤tpage&">"
response.write "<input class=buttonface type='submit' value=' 确定 ' name='cndok'></span></p></form>"
end function
%>
<form name="searchtitle" method="POST" action="kucun.asp">
<p align=center>按材料名称查询:<input class=smallInput type="text" name="guestname" size="13">
<input class=buttonface type="submit" value="搜 索" name="title"> <span lang="en-us">
<%if session("ljl_grad")=3 then%><img border="0" src="PIC/hand.gif"></span><a href="luru1.asp"><font color="#FF0000">录入信息</font></a><%end if%></p>
</form>
<!---查询-------end----------------->
</td>
</span></TD></TR>
<tr>
<td width="575">
<p align="center"> </td>
</tr>
</TBODY></TABLE></CENTER></DIV>
</TD></TR></TBODY></TABLE>
</TD></TR></TBODY></TABLE></CENTER></DIV>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -