📄 department.asp
字号:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="forbidon.asp" -->
<!--#include file="conn.asp" -->
<%
var rs = Server.CreateObject("ADODB.Recordset");
rs.ActiveConnection = MM_conn_STRING;
rs.Source = "SELECT * FROM department ORDER BY departmentid ASC";
rs.CursorType = 0;
rs.CursorLocation = 2;
rs.LockType = 1;
rs.Open();
var rs_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
rs_numRows += Repeat1__numRows;
%>
<% var MM_paramName = ""; %>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "") MM_removeList += "&" + MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_keepNone="";
// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepURL += "&" + items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
}
}
// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd(); items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepForm += "&" + items.item() + "=" + Server.URLencode(Request.Form(items.item()));
}
}
// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length > 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="../imag/cs.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="top.asp" -->
<table width="80%" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="atable">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="9%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">部门号</div></td>
<td width="21%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">部门名称</div></td>
<td width="15%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">负责人(正)</div></td>
<td width="17%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">负责人密码(正)</div></td>
<td width="14%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">负责人(副)</div></td>
<td width="13%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">负责人密码(副)</div></td>
<td width="11%" bgcolor="#FFABAB" class="unnamedhei"><div align="center">操作 <a href="department_add.asp"><strong><font color="#0033FF">添加部门</font></strong></a></div></td>
</tr>
<% if (!rs.EOF || !rs.BOF) { %>
<% while ((Repeat1__numRows-- != 0) && (!rs.EOF)) { %>
<tr>
<td bgcolor="#FAFAFA"><div align="center"><%=(rs.Fields.Item("departmentid").Value)%></div></td>
<td bgcolor="#FAFAFA"><div align="center"><%=(rs.Fields.Item("departmentname").Value)%></div></td>
<td bgcolor="#FAFAFA"><div align="center"><%=(rs.Fields.Item("admin1").Value)%></div></td>
<td bgcolor="#FAFAFA"><div align="center"><%=(rs.Fields.Item("pw1").Value)%></div></td>
<td bgcolor="#FAFAFA"><div align="center"><%=(rs.Fields.Item("admin2").Value)%></div></td>
<td bgcolor="#FAFAFA"><div align="center"><%=(rs.Fields.Item("pw2").Value)%></div></td>
<td bgcolor="#FAFAFA"><div align="center"><A HREF="department_update.asp?<%= Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") + "id=" + rs.Fields.Item("departmentid").Value %>">修改</A> <A HREF="department_del.asp?<%= Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") + "id=" + rs.Fields.Item("departmentid").Value %>">删除</A> </div></td>
</tr>
<%
Repeat1__index++;
rs.MoveNext();
}
%>
<% } // end !rs.EOF || !rs.BOF %>
<tr>
<% if (rs.EOF && rs.BOF) { %>
<td bgcolor="#FAFAFA"><div align="center"></div></td>
<td bgcolor="#FAFAFA"><div align="center"></div></td>
<td bgcolor="#FAFAFA"><div align="center">目前没有部门记录</div></td>
<td bgcolor="#FAFAFA"><div align="left"></div></td>
<td bgcolor="#FAFAFA"><div align="center"></div></td>
<td bgcolor="#FAFAFA"><div align="center"></div></td>
<td bgcolor="#FAFAFA"><div align="center"></div></td>
<% } // end rs.EOF && rs.BOF %>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
rs.Close();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -