update.asp

来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 183 行

ASP
183
字号
<%  
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__MMColParam
Recordset1__MMColParam = "1"
If (Request("ID") <> "") Then 
  Recordset1__MMColParam = Request("ID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM 归档类别  WHERE ID = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT *  FROM 归档类别  order by 排序 asc"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat1__numRows
%>
<script language="JavaScript">
<!--

function check() {

if (document.form1.c.value.length=="") {
window.alert ("请您输入归档名称!")
document.form1.c.focus()
return false
}
return true
}
//-->
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {font-size: 12px}
-->
</style>
<link href="../../../css/link.css" rel="stylesheet" type="text/css">
</head>

<body>
<div align="center">
  <table width="54%" height="21" border="0" cellpadding="0" cellspacing="1" background="../../../f/asp/filesupadmin/img/1.jpg">
    <tr>
      <td><div align="center" class="style1"><strong>修 改 归 档 类 别 名 称</strong></div></td>
    </tr>
  </table>
  <table width="54%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5AAE18">
    <tr>
      <td bgcolor="#FFFFFF"><form name="form1" method="post" action="updatepost.asp" onsubmit="return check()">
          <div align="center">
            <table width="99%" border="0" cellpadding="3" cellspacing="1">
              <tr>
                <td width="20%" height="18"><div align="right" class="style2">归档名称:</div></td>
                <td width="80%"><div align="left" class="style2">
                    <input name="c" type="text" id="c" value="<%=(Recordset1.Fields.Item("归档名称").Value)%>">
                </div></td>
              </tr>
              <tr>
                <td><div align="right">
                    开关:
                        <input name="id" type="hidden" id="id" value="<%=(Recordset1.Fields.Item("ID").Value)%>">
                </div></td>
                <td><div align="left"><%=(Recordset1.Fields.Item("开关").Value)%></div></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=button style="FONT-SIZE: 12px; HEIGHT: 27px"  value= " 取 消 " onclick="javascript:history.go(-1)">
                </p></td>
              </tr>
            </table>
          </div>
      </form></td>
    </tr>
  </table>
  <br>
  <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></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">&nbsp;</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"><span class="style13 style5 style6"><span class="style6 style3"><strong><span class="style7 style12"><strong>归 档 类 </strong></span></strong></span></span><span class="style1"><span class="style13 style5 style6"><span class="style6 style3"><strong></strong></span></span></span><span class="style13 style5 style6"><span class="style6 style3"><strong><span class="style7 style12"><strong>别</strong></span></strong></span></span><span class="style1"><span class="style13 style5 style6"><span class="style6 style3"><strong></strong></span></span></span></div></td>
              <td width="14%"><div align="center"><strong>排 序</strong></div></td>
              <td width="14%"><div align="center"><strong>开 关</strong></div></td>
            </tr>
            <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) 
%>
            <tr bgcolor="#FFFFFF" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''">
              <td class="style2"><div align="center"><%=(Recordset2.Fields.Item("归档名称").Value)%></div></td>
              <td class="style2"><div align="center"><%=(Recordset2.Fields.Item("排序").Value)%></div></td>
              <td class="style2"><div align="center">
                  <%if Recordset2("开关")="是" 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>
            </tr>
            <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset2.MoveNext()
Wend
%>
            <tr>
              <td colspan="3" class="style2">&nbsp;</td>
            </tr>
          </table>
      </div></td>
    </tr>
  </table>
  <p><a href="guidangadmin.asp">返回 </a></p>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?