📄 wuzi_magic.asp
字号:
<!--#include file = "Startup.asp"-->
<!-- #include file="Function.asp" -->
<%
call adminer()
Call ComeUrl()
page=request("page")
if instr(page,",")<>0 then
page=left(page,instr(page,",")-1)
end if
'response.write "page="&page
ssbm=replace(trim(request("所属部门")),",","")
jifang=replace(trim(request("机房编号")),",","")
xiaoqu=replace(trim(request("所属校区")),",","")
office=replace(trim(request("所属办公室")),",","")
utype=replace(trim(request("utype")),",","")
select case utype
case "1"
sql="select * from cangku where 所属校区='"&xiaoqu&"' and 所属机房='"&jifang&"' order by id desc"
case "2"
sql="select * from cangku where 所属校区='"&xiaoqu&"' and 所属部门='"&ssbm&"' order by id desc"
case "3"
sql="select * from cangku where 所属校区='"&xiaoqu&"' and 所属办公室='"&office&"' order by id desc"
case "4"
sql="select * from cangku where 所属校区='"&xiaoqu&"' order by id desc"
case else
sql="select * from cangku"
end select
set rs=server.createobject("adodb.recordset")
rs.open sql,oconn,1,2
if rs.eof then
response.Write("<br><br><center><font size=3>暂无数据!<a href=add_wuzi.asp?机房编号="&jifang&"&所属校区="&xiaoqu&">点这里开始添加</a></font></center>")
else
rs.PageSize =15 '每页记录
totalput = rs.RecordCount '总记录数
pgnum=rs.Pagecount '总页数
if page="" then page=1
if page-pgnum>0 then page=pgnum
rs.AbsolutePage=page
n=0
%>
<script language="JavaScript">
function openwin(id){
window.open('wuzi_info.asp?id='+id,'','menubar=0,statusbar=0,locationbar=0,scrollbars=0,width=510,height=510 top=100,left=200')
}
</script>
<script language="JavaScript">
function openwin2(id){
window.open('peizhi.asp?id='+id,'','menubar=0,statusbar=0,locationbar=0,scrollbars=0,width=510,height=500 top=100,left=200')
}
</script>
<SCRIPT LANGUAGE=javascript>
<!--
function SelectAll() {
for (var i=0;i<document.selform.checked.length;i++) {
var e=document.selform.checked[i];
e.checked=!e.checked;
}
}
//-->
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="common.css" type="text/css" rel="stylesheet">
<title>无标题文档</title>
</head>
<body leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0">
<tr>
<td align="center" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> 现在物资 共计<font color=#ff0000><b><%=rs.RecordCount%></b></font> 件 </td>
</tr>
</table>
<form action="del_all.asp" method="post" name="selform" >
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC" >
<tr align="center" bgcolor="#E0E0E0">
<td height="20"><strong><font color="#FF0000">选择</font> </strong></td>
<td><strong><font color="#FF0000">物资编号</font></strong></td>
<td height="20"><strong> <font color="#FF0000">名称</font></strong></td>
<td><strong><font color="#FF0000">配置</font></strong></td>
<td><strong><font color="#FF0000">添加时间</font></strong></td>
<td><strong><font color="#FF0000">状态</font></strong></td>
<%if session("userclass")<>0 then%>
<td><strong><font color="#FF0000">操作</font></strong></td>
<%end if %>
</tr>
<%
do while not rs.eof and n<rs.pagesize
n=n+1
id=rs("id")
s=rs("编号")
z=rs("名称")
response.write "<tr align=left bgcolor=#ffffff>"
response.write "<td bgcolor=#ffffff align=center><input type=checkbox name=checked value="&id&"></a></td>"
response.write "<td bgcolor=#ffffff align=center><a href=javascript:openwin("& id &") title='点击查看详细资料'>"& rs("编号")&"</a></td>"
response.write "<td bgcolor=#ffffff align=center><a href=javascript:openwin("& id &") title='点击查看详细资料'>"& rs("名称")&"</a></td>"
response.write"<td bgcolor=#ffffff align=center><a href=javascript:openwin2("& id &") title='点击查看详细配置'><font color=#999933>配置</font></a></td>"
response.write"<td bgcolor=#ffffff align=center>"& rs("最后更新时间")&"</td>"
response.write"<td bgcolor=#ffffff align=center><font color=#006699>"& rs("状态")&"</font></td>"
if session("userclass")<>0 then
response.write"<td bgcolor=#ffffff align=center><a href=add_wuzi.asp?机房编号="&jifang&"&所属校区="&xiaoqu&">添加新记录</a> <a href=# onclick=window.open('baosun.asp?id="&id&"&utpye=报修','物资报修','width=50,height=30')>报修</a> <a href=# onclick=window.open('baosun.asp?id="&id&"&utpye=报损','物资报损','width=50,height=30')>报损</a> <a href=# onclick=window.open('wuzi_move.asp?id="&id&"','物资转移','width=250,height=200')>转移</a> <a href=wuzi_edit.asp?id="&id&"&机房编号="&jifang&"&所属校区="&xiaoqu&">修改</a> <a href=wuzi_del.asp?id="&id&">删除</a> <a href=# onclick=window.open('rizhi.asp?id="&id&"&wuzhi="&rs("名称")&"','物资日志','width=400,height=300')>查看日志</a>"
response.write "</td>"
end if
response.write "</tr>"
rs.movenext
loop
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>选择/反选
<input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()">
<input onClick="{if(confirm('确定删除选定的物资吗?')){this.document.selform.submit();return true;}return false;}" type=submit value=删除 name=action></td>
</tr>
</table>
</form>
<%
end if
%>
<table align=center width="80%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align=center>
<%
if page>1 then
sstr=request.servervariables("query_string")
sstr=right(sstr,len(sstr)-instr(sstr,"&"))
'sstr=replace(sstr,restr,"")
else
sstr=request.servervariables("query_string")
end if
if totalput>rs.pagesize then %>
[<%=rs.pagesize%>条/页 共<%=totalput%>条]
<%
if page=1 then%>
[首 页] [上一页]
<% else %>
[<a href="?page=1&<%=sstr%>">首 页</a>] [<a href="?page=<%=page-1%>&<%=sstr%>">上一页</a>]
<%end if%>
<%if rs.pagecount-page=0 then%>
[下一页] [尾 页]
<%else%>
[<a href="?page=<%=page+1%>&<%=sstr%>">下一页</a>] [<a href="?page=<%=rs.pagecount%>&<%=sstr%>">尾
页</a>]
<%
end if
else
end if
rs.close
%>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -