📄 weix_gl.asp
字号:
<%'if session("yonghm")<>"" then%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>维修信息</title>
<link rel="stylesheet" type="text/css" href="Admin_Style.css">
<base target="_self">
<!--#include file="global.asp"-->
<!--#include file="function.asp"-->
<SCRIPT language=javascript>
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled!=true)
e.checked = form.chkAll.checked;
}
}
function ConfirmDel()
{
if(document.myform.Action.value=="Del")
{
if(confirm("确定要删除选中的维修信息吗?"))
return true;
else
return false;
}
}
function openhelp()
{
var Win =window.open("editor_ubbhelp.asp","face","width=550,height=400,resizable=1,scrollbars=1");
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background-color: #555555">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr>
<td height="22" colspan="2" align="center" class="title" style="background-image: url('images/topBar_bg.gif')"><strong>维 修 信 息 管 理</strong></td>
</tr>
<tr class="tdbg">
<td width="70" height="30"><strong>管理导航:</strong></td>
<td height="30"><a href="yewtzluru.asp">添加新维修信息</a> </td>
</tr>
</table>
<%Action=Trim(Request("Action"))
const MaxPerPage=20
Channel=Trim(Request("Channel"))
if Channel="" then
Channel=0
else
Channel=CLng(Channel)
end if
strFileName="admin_annonce_gl.asp?Channel="&Channel
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
'response.write(action)
if Action="Del" then
call DelAnnounce()
end if
if Action="SetNew" then
call SetNew()
end if
if Action="CancelNew" then
call CancelNew()
end if
%>
<%
sql="select * from weixb "
'set rs=server.createobject("adodb.recordset")
'rs.open sql,conn,1,1
%>
<%
'sql="select * from xiangmwj "
if LinkType<>"" then
LinkType=CInt(LinkType)
if LinkType=1 then
sql=sql & " where LinkType=1 "
elseif LinkType=2 then
sql=sql & " where LinkType=2 "
end if
end if
sql=sql & "order by 序号 desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<table class=border border=0 cellspacing=1 width=100% cellpadding=0><tr valign=middle class=tdbg><td>"
response.write "目前共有 0 个维修信息"
response.write "</td></tr></table>"
else
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
showContent
response.write "<table class=border border=0 cellspacing=1 width=100% cellpadding=0><tr valign=middle class=tdbg><td>"
showpage strFileName,totalput,MaxPerPage,true,true,"个维修信息"
response.write "</td></tr></table>"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
response.write "<table class=border border=0 cellspacing=1 width=100% cellpadding=0><tr valign=middle class=tdbg><td>"
showpage strFileName,totalput,MaxPerPage,true,true,"个维修信息"
response.write "</td></tr></table>"
else
currentPage=1
showContent
response.write "<table class=border border=0 cellspacing=1 width=100% cellpadding=0><tr valign=middle class=tdbg><td>"
showpage strFileName,totalput,MaxPerPage,true,true,"个维修信息"
response.write "</td></tr></table>"
end if
end if
end if
rs.close
set rs=nothing
sub showContent
dim i
i=0
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" Class="border">
<form name="myform" method="POST" action=<%=strFileName%> onsubmit="return ConfirmDel();">
<tr class="title" >
<td width="20" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>选择</strong></td>
<td width="30" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>序号</strong></td>
<td width="90" height="22" align="center" style="background-image: url('images/topBar_bg.gif')" ><strong>房号</strong></td>
<td width="100" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>报修时间</strong></td>
<td width="160" height="22" align="center" style="background-image: url('images/topBar_bg.gif')">
<strong>报修内容</strong></td>
<td width="120" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>维修人员</strong></td>
<td width="70" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>完成时间</strong></td>
<td width="70" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>接待人</strong></td>
<td width="60" height="22" align="center" style="background-image: url('images/topBar_bg.gif')"><strong>操作</strong></td>
</tr>
<%
'response.write(rs.recordcount)
'response.end
if not(rs.bof and rs.eof) then
do while not rs.eof
%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#cccccc'" style="padding: 0px 2px;">
<td align="center" background="images/topBar_bg.gif">
<input type="checkbox" value=<%=rs("序号")%> name="AnnounceID" style="border: 0px;background-color: #eeeeee;">
</td>
<td align="center"> <%=rs("序号")%> </td>
<td><a href="<%=strFileName%>&Action=Modify&ID=<%=rs("序号")%>" title="55"><%=rs("房号")%></a></td>
<td align="center" >
<%=rs("报修时间")%> </td>
<td align="center" >
<%=rs("报修内容")%> </td>
<td align="center"><%=rs("维修人员")%></td>
<td align="center"><%=rs("完成时间")%></td>
<td align="center"><%=rs("接待人")%></td>
<td align="center">
<a href="weixxg.asp?id=<%=rs("序号")%>">修改</a>
<%response.write "<a href='" & strFileName & "&Action=Del&AnnounceID=" & rs("序号") & "' onClick=""return confirm('确定要删除此维修信息吗?');"">删除</a>"
%>
</td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<%
'rs.movenext
'loop
end if%>
<tr class="tdbg">
<td colspan=9 height="30" background="images/topBar_bg.gif">
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox" style="border: 0px;background-color: #eeeeee;">
选中所有维修信息
<input name="Action" type="hidden" id="Action" value="del">
</td>
</tr>
<tr class="tdbg">
<td colspan=9 height="30"> 将选定的维修信息:
<input type="submit" value=" 删 除 " name="submit" onClick="document.myform.Action.value='Del'" style="cursor: hand;background-color: #cccccc;">
</td>
</tr>
</form>
</table>
<p class="border">
<%end sub
sub DelAnnounce()
dim ID
ID=Trim(Request("AnnounceID"))
if ID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定要删除的维修信息ID!</li>"
exit sub
end if
if Instr(ID,",")>0 then
dim arrID,i
arrID=split(ID,",")
for i=0 to Ubound(arrID)
conn.execute "delete from weixb where 序号=" & CLng(arrID(i))
next
else
conn.execute "delete from weixb where 序号=" & CLng(ID)
end if
end sub
sub SetNew()
dim ID
ID=Trim(Request("AnnounceID"))
if ID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定维修信息ID</li>"
exit sub
end if
if Instr(ID,",")>0 then
dim arrID,i
arrID=split(ID,",")
for i=0 to Ubound(arrID)
conn.execute "Update Announce set IsSelected=True Where ID=" & CLng(arrID(i))
next
else
conn.execute "Update Announce set IsSelected=True Where ID=" & CLng(ID)
end if
end sub
sub CancelNew()
dim ID
ID=Trim(Request("AnnounceID"))
if ID="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定公告ID</li>"
exit sub
end if
if Instr(ID,",")>0 then
dim arrID,i
arrID=split(ID,",")
for i=0 to Ubound(arrID)
conn.execute "Update Announce set IsSelected=False Where ID=" & CLng(arrID(i))
next
else
conn.execute "Update Announce set IsSelected=False Where ID=" & CLng(ID)
end if
end sub
%>
<% 'else %>
<P><a href="Admin_Login.asp" target="_top">请登录</a> </p>
<%'end if %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -