guidangadmin.asp
来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 280 行
ASP
280 行
<%@LANGUAGE="VBSCRIPT"%>
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
MM_authorizedUsers=""
MM_authFailedURL="../../adminlogin666.asp"
MM_grantAccess=false
If Session("MM_Usernamesyslogin") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="../../../Connections/oavbsconn.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT * FROM bbsbankuai ORDER BY 排序 ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
If (Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset1_total = -1) Then
' count the total records by iterating through the recordset
Recordset1_total=0
While (Not Recordset1.EOF)
Recordset1_total = Recordset1_total + 1
Recordset1.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
' set the number of rows displayed on this page
If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
End If
%>
<script language="JavaScript">
<!--
function isNumber(string) {
if (string =="") string = "0";
valid = '0123456789x';
for (var i=0; i< string.length; i++) {
if (valid.indexOf(string.charAt(i)) == -1) {
return false;
}
}
return true;
}
function check() {
if (document.form1.c.value=="") {
window.alert ("请您输入bbsbankuai !")
document.form1.c.focus()
return false
}
if (document.form1.p.value=="") {
window.alert ("请您输入归档序号!")
document.form1.p.focus()
return false
}
if(isNumber(document.form1.p.value) == false){
alert("友情提醒:排序需为数字");
document.form1.p.focus();
return (false);
}
return true
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style5 {font-size: 12px}
-->
</style>
<link href="../../../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style13 {font-weight: bold}
-->
</style>
<div align="center">
<table width="54%" border="0" cellpadding="0" cellspacing="0" bgcolor="#5AAE18">
<tr>
<td width="6" height="21"><img src="../../../img/bbs/leftlin1.gif" width="6" height="21"></td>
<td width="936" bgcolor="#5AAE18"><div align="center"><span class="style1"><span class="style13 style5 style6"><span class="style6 style3"><strong> <span class="style1 style7"><strong>添 加 论 坛 版 块</strong></span></strong></span></span></span></div></td>
<td width="6" height="21"> </td>
</tr>
</table>
</div>
<div align="center">
<table width="54%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
<tr>
<td bgcolor="#FFFFFF"><form name="form1" method="post" action="addpost.asp" onsubmit="return check()">
<div align="center">
<table width="99%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="25%" height="18"><div align="right">版块:</div></td>
<td width="75%"><div align="left">
<input name="c" type="text" id="c">
</div></td>
</tr>
<tr>
<td><div align="right">排序:</div></td>
<td><div align="left">
<input name="p" type="text" id="p" size="10" maxlength="8">
</div></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><div align="left"></div></td>
<td><p align="left">
<input name="提交" type=submit style="FONT-SIZE: 12px; HEIGHT: 27px" value= " 提 交 " >
<input name="重置" type=reset style="FONT-SIZE: 12px; HEIGHT: 27px" value= " 重 填 " >
</tr>
</table>
</div>
</form></td>
</tr>
</table>
</div>
<form name="form2" method="post" action="pliangdelbumendsfvsfg.asp" onsubmit="return check1()">
<div align="center"><span class="style1 style7"><strong>添 加 新 部 门</strong></span>
<table width="54%" border="0" cellpadding="0" cellspacing="0" bgcolor="#5AAE18">
<tr>
<td width="6" height="21"><img src="../../../img/bbs/leftlin1.gif" width="6" height="21"></td>
<td width="936" bgcolor="#5AAE18"><div align="center"><span class="style1"><span class="style13 style5 style6"><span class="style6 style3"><strong> </strong></span></span></span>
<span class="style1"><span class="style13 style5 style6"><span class="style6 style3"><strong><span class="style1 style7"><strong><strong>论 坛 <strong><strong>版</strong></strong> 块</strong></strong></span></strong></span></span></span><span class="style1"><span class="style13 style5 style6"><span class="style6 style3"><strong><span class="style1 style7"></span></strong></span></span></span></div></td>
<td width="6" height="21"> </td>
</tr>
</table>
<table width="54%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
<tr>
<td bgcolor="#FFFFFF"><div align="center">
<table width="99%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="19%"><div align="center"><strong>论坛版块
</strong></div>
<div align="center"></div></td>
<td width="14%"><div align="center"><strong>排 序</strong></div></td>
<td width="14%"><div align="center"><strong>开 关</strong></div></td>
<td width="53%"><strong> 操 作</strong></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
dim kg
kg=Recordset1("开关")
%>
<tr bgcolor="#FFFFFF" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''">
<td class="style5"><div align="center"><%=(Recordset1.Fields.Item("版块").Value)%></div></td>
<td class="style5"><div align="center"><%=(Recordset1.Fields.Item("排序").Value)%></div></td>
<td class="style5"><div align="center"><%if kg="是" then%>
<img src="../../../toall/workreport/img/cs-1.gif" width="25" height="16">
<%else%>
<img src="../../../toall/workreport/img/cs-3.gif" width="25" height="16">
<%end if%></div></td>
<td class="style5"><span class="style5"><%if kg="否" then%> <a href="open.asp?id=<%=(Recordset1.Fields.Item("ID").Value)%>">开通</a><%else%> <a href="close.asp?id=<%=(Recordset1.Fields.Item("ID").Value)%>">关闭</a> <%end if%> <%if Recordset1.Fields.Item("版块").Value<>"其它" then%> <a href="update.asp?id=<%=(Recordset1.Fields.Item("ID").Value)%>">修改</a> <a href="del.asp?id=<%=(Recordset1.Fields.Item("ID").Value)%>&p=<%=(Recordset1.Fields.Item("排序").Value)%>&c=<%=(Recordset1.Fields.Item("版块").Value)%>" onClick="return confirm('您确定要删除吗?系统将把该版块的所有帖子转移到 其它 类别')">删除</a> <%end if%><a href="updatepaixu.asp?id=<%=(Recordset1.Fields.Item("ID").Value)%>">修改排序</a></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
<tr>
<td colspan="4" class="style5"> </td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
</form>
<div align="center"><a href="../../adcencetyerdfghf.asp">返回 </a>
</div>
<p></p>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?