deldeltzasdfgsg.asp

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

ASP
252
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../Connections/oavbsconn.asp" -->

<%
Dim files__varid
files__varid = "1"
If (request.querystring("id") <> "") Then 
  files__varid = request.querystring("id")
End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset1__MMColParam = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1__varid
Recordset1__varid = "1"
If (request.querystring("ID") <> "") Then 
  Recordset1__varid = request.querystring("ID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM infoall  WHERE 发送人帐号 = '" + Replace(Recordset1__MMColParam, "'", "''") + "' AND 信息属性='通知' and id=" + Replace(Recordset1__varid, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim files__MMColParam1
files__MMColParam1 = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  files__MMColParam1 = Session("userssdfgfhtrh")
End If
%>
<%
dim s_filename
Dim files
Dim files_numRows
dim varfnames'下载部分使用
Set files = Server.CreateObject("ADODB.Recordset")
files.ActiveConnection = MM_oavbsconn_STRING
files.Source = "SELECT distinct infoall.id as infoid,infoall.标题,infoall.内容,infoall.发送人姓名,infoall.入库日期,文件信息info.文件名,文件信息info.文件路径,文件信息info.文件大小,文件信息info.文件大小,文件信息info.文件上传时间,文件信息info.邮件编号,文件信息info.id  FROM infoall inner join 文件信息info on 文件信息info.邮件编号=infoall.id  WHERE infoall.信息属性 = '通知' and 文件信息info.发送人帐号='" + Replace(files__MMColParam1, "'", "''") + "' and 文件信息info.邮件编号=" + Replace(files__varid, "'", "''") + " and 信息属性来源='通知'  ORDER BY infoall.ID DESC"
files.CursorType = 0
files.CursorLocation = 2
files.LockType = 1
files.Open()
files_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
files_numRows = files_numRows + Repeat1__numRows
%>
<%
Dim MM_paramName 
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>删除通知</title>
<link href="/css/link.css" rel="stylesheet" type="text/css">
<link href="/css/input.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {font-size: 12px}
.style3 {color: #000000}
.style5 {color: #000000; font-weight: bold; }
.style6 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>

<body>
<div align="center">
  <table width="598" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="666"><form name="form1" method="post" action="filesupadmin/deltztext.asp">
          <table width="593" border="0" cellspacing="1" bgcolor="#C6EBDE">
            <tr bgcolor="#FFFFFF">
              <td colspan="2" bgcolor="#C6EBDE"><div align="center"><span class="style6">删除通知</span></div></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td width="89"><div align="left">标题:</div></td>
              <td width="493"><div align="left">
                <input name="标题" type="text" id="标题" value="<%=(Recordset1.Fields.Item("标题").Value)%>">
              </div></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td><div align="left">通知内容: </div></td>
              <td><div align="left">
                <textarea name="消息内容" cols="60" rows="15" id="消息内容"><%=(Recordset1.Fields.Item("内容").Value)%></textarea>
              </div></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td><div align="left">
                  <input name="信息属性" type="hidden" id="信息属性" value="通知">
                  <input name="发送人帐号" type="hidden" id="发送人帐号" value="<%= Session("userssdfgfhtrh") %>">
                  <input name="发送人姓名" type="hidden" id="发送人姓名" value="<%= Session("names") %>">
                  <input name="datas" type="hidden" id="datas" value="<%=date%>">
                  <input name="id" type="hidden" id="id" value="<%=(Recordset1.Fields.Item("ID").Value)%>">
              </div></td><%session("modifyid")=(Recordset1.Fields.Item("ID").Value)%>
              <td><div align="left">
                <input type="submit" name="Submit" value="删 除">
              
               
            <span class="style2">
            <input type="button" name="Submit" value="取 消" onClick="javascript:history.go(-1)">
            </span>              </div></td>
            </tr>
          </table>
      </form></td>
    </tr>
  </table>
  <% If Not files.EOF Or Not files.BOF Then %>
  <form name="form2" method="post" action="">
    <table width="598" border="0" cellpadding="2" cellspacing="1" bgcolor="#C6EBDE">
      <tr>
        <td colspan="4"><div align="center" class="style6 style1">通知附件</div></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td width="42%"><div align="center"><span class="style3">文件名</span></div></td>
        <td width="14%"><div align="center"><span class="style5">文件大小</span></div></td>
        <td width="29%"><div align="center"><span class="style3">上传时间</span></div></td>
        <td width="15%"><div align="center">删除</div></td>
      </tr>
      <% 
While ((Repeat1__numRows <> 0) AND (NOT files.EOF)) 
%>
      <tr bgcolor="#FFFFFF">
        <td><div align="center"><span class="style3"><a href="/totall/tz/filesupadmin/<%=(files.Fields.Item("文件路径").Value)%>" target="_blank"> <%=(files.Fields.Item("文件名").Value)%>
                    <%Session("s_filename")=files.Fields.Item("文件名").Value%>
        </a>
              <input name="fid" type="hidden" id="fid" value="<%=(files.Fields.Item("infoid").Value)%>">
              <input name="id" type="hidden" id="id" value="<%=(files.Fields.Item("infoid").Value)%>">
        </span></div></td>
        <td><div align="center"><span class="style3"><%=(files.Fields.Item("文件大小").Value)%>
                  <%varfnames =files("文件名")%>
                  <% Session("filesmapth")=files.Fields.Item("文件路径").Value%>
        </span></div></td>
        <td><div align="center"><span class="style3"><%=(files.Fields.Item("文件上传时间").Value)%></span></div></td>
        <td><div align="center"><a href="filesupadmin/deldetail.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & files.Fields.Item("id").Value %>">删除</a></div></td>
      </tr>
      <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  files.MoveNext()
Wend
%>
      <tr bgcolor="#FFFFFF">
        <td colspan="4">注意:删除本通知前,请务必先将通知附件一同删除..</td>
      </tr>
    </table>
  </form>
  <% End If ' end Not files.EOF Or NOT files.BOF %>
</div>
<div align="center"> </div>


<p align="center">&nbsp;</p>


<p align="center">&nbsp;</p>
<div align="center"> <br>
<a href="/toall/tz/adminfiles/index.asp">所有通知附件</a></div>
<p>&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
files.Close()
Set files = Nothing
%>

⌨️ 快捷键说明

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