update.asp

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

ASP
208
字号
<%@LANGUAGE="VBSCRIPT"%>
<%Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" 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
%><%dim re
re= Request.ServerVariables("http_referer")
if re = "" then %>
<script language="javascript">
alert("非法访问!");history.go(-1)
</script>
<%response.end()
end if%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<!--#include file="../fengge/config.asp" -->
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT 版块  FROM bbsbankuai  WHERE 开关 = '是' order by 排序 asc"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<%
Dim Recordset1__varid
Recordset1__varid = "21"
If (request("id")   <> "") Then 
  Recordset1__varid = request("id")  
End If
%>
<%
Dim Recordset1__varu
Recordset1__varu = "1"
If (Session("userssdfgfhtrh")  <> "") Then 
  Recordset1__varu = Session("userssdfgfhtrh") 
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT 内容,id,标题,版块,帖子属性  FROM bssdsghgdjne6tynjhdnhfsthe65  WHERE id=" + Replace(Recordset1__varid, "'", "''") + " and 提交帐号='" + Replace(Recordset1__varu, "'", "''") + "'  ORDER BY ID ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim webtiles
Dim webtiles_numRows

Set webtiles = Server.CreateObject("ADODB.Recordset")
webtiles.ActiveConnection = MM_oavbsconn_STRING
webtiles.Source = "SELECT 页面名称  FROM webtitles  WHERE 模块名称 = '论坛' and 描述='更新帖子'"
webtiles.CursorType = 0
webtiles.CursorLocation = 2
webtiles.LockType = 1
webtiles.Open()

webtiles_numRows = 0
%>
<%if not Recordset1.eof or not Recordset1.bof then %>
<html>
<head>
<style type="text/css">
<!--
.style6 {font-size: 12px}
-->
</style>
<link href="../../css/input.css" rel="stylesheet" type="text/css">
<link href="../../css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style7 {
	color: #FFFFFF;
	font-weight: bold;
}
.style8 {
	color: #054B0D;
	font-weight: bold;
}
-->
</style>
<body>
<div align="center">
<div align="center">
<div class="RoundedCorner"> 
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <span class="style1"><%=(webtiles.Fields.Item("页面名称").Value)%></span>
</div>
  
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="<%=secaiid%>">
    <tr>
      <td bgcolor="#FFFFFF"><form name="form1" method="post" action="uppost.asp">
        <table width="99%" border="0" cellpadding="2" cellspacing="0">
          <tr bgcolor="#FFFFFF">
            <td colspan="2"></td>
            </tr>
          <tr bgcolor="#FFFFFF">
            <td height="11" colspan="2"></td>
            </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">版 块:</div></td>
            <td bgcolor="#FFFFFF">
              <%if Recordset1("帖子属性")="原始帖" then%><select name="接收部门" id="接收部门">
                <%
While (NOT Recordset2.EOF)
%>
                <option value="<%=(Recordset2.Fields.Item("版块").Value)%>" <%If (Not isNull((Recordset1.Fields.Item("版块").Value))) Then If (CStr(Recordset2.Fields.Item("版块").Value) = CStr((Recordset1.Fields.Item("版块").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(Recordset2.Fields.Item("版块").Value)%></option>
                <%
  Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
  Recordset2.MoveFirst
Else
  Recordset2.Requery
End If

%>  
              </select><%else%>
              <input name="接收部门" type="hidden" id="接收部门" value="<%=(Recordset1.Fields.Item("版块").Value)%>">
              <%=(Recordset1.Fields.Item("版块").Value)%><%end if%></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td><div align="right">主 题:</div></td>
            <td bgcolor="#FFFFFF"><div align="left">
                <%if Recordset1("帖子属性")="原始帖" then%><input name="bt" type="text" id="bt" value="<%=(Recordset1.Fields.Item("标题").Value)%>" size="50" maxlength="40" ><%else%>
                <input name="bt" type="text" id="bt" value="<%=(Recordset1.Fields.Item("标题").Value)%>" size="50" maxlength="40" readonly="true"><%end if%>
            </div></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="11" colspan="2"><div align="right"></div></td>
            </tr>
          <tr bgcolor="#FFFFFF">
            <td width="68"><div align="right"><br>
                  更 新:</div></td>
            <td width="682" bgcolor="#FFFFFF"><div align="left">
                <input name="content" type="hidden" id="content" value="<% = Server.HtmlEncode(Recordset1("内容")) %>">
                  <iframe ID="content" src="../htmledit/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="600" HEIGHT="380"></iframe>
            </div></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="12" colspan="2"></td>
            </tr>
          <tr bgcolor="#FFFFFF">
            <td><input name="id" type="hidden" id="id" value="<%=(Recordset1.Fields.Item("id").Value)%>">
              <input name="id1" type="hidden" id="id1" value="<%=request("id1")%>">
              <input name="c" type="hidden" id="c" value="<%=request("c")%>"></td>
            <td bgcolor="#FFFFFF">
                <input name="提交" type=submit style="FONT-SIZE: 12px; HEIGHT: 27px"  value= " 更 新 " >  
                <input name="重置" type=reset style="FONT-SIZE: 12px; HEIGHT: 27px"  value= " 还  原" >
                 
                <input name="按钮" type=button style="FONT-SIZE: 12px; HEIGHT: 27px"   onClick="javascript:history.go(-1)" value= " 取 消 " >
          </tr>
        </table>
      </form></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
webtiles.Close()
Set webtiles = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%else%>
<script language="javascript">
{
alert("无数据或无权限!");history.go(-1)
}
</script>
<%response.end()
end if%>

⌨️ 快捷键说明

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