📄 department.asp
字号:
<%
response.expires=-1
dim ThisKey
ThisKey = "a"
%>
<!--#include file="../inc/permission.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
ID=cint(trim(request("ID")))
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "select Unit,DaiHao from tblUnit where ID="&ID,conn,1,1
if not rs.eof then
Unit=trim(rs("Unit"))
UnitDaiHao=rs("DaiHao")
end if
rs.close
if trim(request("dele"))="yes" then
rs.open "select DaiHao from tblDepartment where ID="&request("ID2"),conn,1,1
DaiHao=rs("DaiHao")
rs.close
conn.execute("delete from tblDepartment where ID="&request("ID2"))
conn.execute("delete from tblUserLogin where Unit="&UnitDaiHao&" and Dept="&DaiHao)
end if
sql="select ID,Department,UnitDaiHao,DaiHao from tblDepartment where UnitDaiHao="&UnitDaiHao&" order by DaiHao"
rs.open sql,conn,1,1
%>
<html>
<head>
<title>部门管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/main.css">
</head>
<BODY bgColor=#996600>
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><img src="../image/top_2.jpg" width="750" height="80"></td>
</tr>
</table>
<div align="center"></div>
<TABLE align=center bgColor=#ffffff border=0 cellPadding=0 width=750>
<TR>
<TD align=middle
style="BORDER-BOTTOM: #996600 1px solid; BORDER-LEFT: #996600 1px solid; BORDER-RIGHT: #996600 1px solid; BORDER-TOP: #996600 1px solid"
vAlign=top width="100%" bgcolor="#FFCC33" height="368">
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR bgcolor="#FF9900">
<TD align=middle
style="BORDER-BOTTOM:1 solid #996600;"> </TD>
</TR>
</TBODY>
</TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="362">
<tr>
<td width="17%" height="391" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="362">
<tr>
<td width="17%" height="391" valign="top">
<div align="center">
<br>
<!--#include file="../inc/Rights.asp"-->
</div>
</td>
<td width="83%" valign="top" align="center" height="391" style="border-left: 1px solid #996600" bgcolor="#FFFFCC">
<table width="520" border="0" cellspacing="0" cellpadding="0" style="BORDER-BOTTOM: 1px solid #996600">
<tr>
<td valign="bottom"><img src="../image/tit_au.gif" width="111" height="24"></td>
</tr>
</table>
<table width="520" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom" align="left">
<font color=red><%=Unit%>-----<%=UnitDaiHao%></font>
</td>
<td valign="bottom" align="right" width=200>
<img src="../image/sub.gif" width="53" height="19" onclick="OpenWindow('AddDepartment.asp?ID=<%=ID%>','AddDepartment');" style="cursor:hand"> <a href="Unit.asp"><img border=0 src="../image/back.gif" width="53" height="19"></a>
</td>
</tr>
</table>
<table width="520" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#996600">
<tr bgcolor="#FF9900" align=center>
<td style="border-left:1 solid #996600;border-top:1 solid #996600;border-right:1 solid #996600;border-bottom:1 solid #996600;"><font color="#ffffff"><b>部门代号</b></font></td>
<td style="border-top:1 solid #996600;border-right:1 solid #996600;border-bottom:1 solid #996600;" width="25%"><font color=#ffffff><b>部门名称</b></font></td>
<td style="border-top:1 solid #996600;border-right:1 solid #996600;border-bottom:1 solid #996600;" width="25%"><font color=#ffffff><b>修改</b></font></td>
<td style="border-top:1 solid #996600;border-right:1 solid #996600;border-bottom:1 solid #996600;" width="25%"><font color=#ffffff><b>删除</b></font></td>
</tr>
<%
do while not rs.eof
if not rs.eof then
%>
<tr align=center>
<td style="border-left:1 solid #996600;border-right:1 solid #996600;border-bottom:1 solid #996600;" width="13%"><%=rs("DaiHao")%></td>
<td style="border-right:1 solid #996600;border-bottom:1 solid #996600;" width="12%"><a href="../User/User.asp?Unit=<%=ID%>&Department=<%=rs("DaiHao")%>"><%=trim(rs("Department"))%></a></td>
<td style="border-right:1 solid #996600;border-bottom:1 solid #996600;"><a href=# onclick="OpenWindow('UpdateDepartment.asp?ID=<%=ID%>&ID2=<%=rs("ID")%>','UpdateDepartment');">修改</a></td>
<td style="border-right:1 solid #996600;border-bottom:1 solid #996600;"><a href="Department.asp?ID=<%=ID%>&ID2=<%=rs("ID")%>&dele=yes" onclick="return CheckDelete();">删除</a></td>
</tr>
<%
end if
rs.movenext
loop
rs.close
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="520" >
<TR >
<TD>说明:修改、添加部门的时候,要保证部门名称、部门代号<font color="red">不重复</font>;</TD>
</TR>
</table>
</table>
</td>
</tr>
</table>
</div>
</TD>
</TR>
<td bgcolor="#FF9900" height="23">
</TABLE>
<script language=javascript>
function CheckDelete(){
return confirm("确实删除吗?");
}
function OpenWindow(url,windowname){
window.open(url,windowname,'left=200,top=100,height=80,width=350,toolbar=no,menubar=no,scrollbars=no')
}
</script>
</BODY>
</HTML>
<!--#include file="../inc/close.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -