tzlisttrgytry356fortextquery.asp

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

ASP
651
字号

' 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
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links

Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev

Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If

' set the strings for the move to links
If (MM_keepMove <> "") Then 
  MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If

MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="

MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<div align="center">
  <style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style2 {color: #FFFFFF}
-->
</style>
  

  <link href="../../css/link.css" rel="stylesheet" type="text/css">
  <style type="text/css">
<!--
.style1 {color: #000000}
.style2 {font-weight: bold}
-->
  </style>
  <style type="text/css">
<!--
.style2 {font-weight: bold}
-->
  </style>
  <style type="text/css">
<!--
.style2 {color: #FF0000}
.style3 {
	color: #000000;
	font-size: 12px;
}
.style4 {font-size: 12px}
-->
  </style>
  <style type="text/css">
<!--
body {
	margin-top: 2px;
}
-->
</style>
<style type="text/css">
<!--
.style4 {font-weight: bold}
.style5 {color: #FFFFFF}
-->
</style>
<style type="text/css">
<!--
.style1 {color: #999999}
.style2 {color: #FFFFFF}
.style3 {color: #5AAE18}
.style4 {font-size: 13px}
.style5 {font-weight: bold}
.style6 {color: #5AAE18;  }
-->
</style>
<style type="text/css">
<!--
.style6 {color: #999999}
-->
</style>
<style type="text/css">
<!--
.style7 {color: #5AAE18}
.style8 {color: #999999}
.style10 {color: #5AAE18; font-weight: bold; }
.style11 {color: #000000}
-->
</style>
<style type="text/css">
<!--
.style11 {font-size: 12px}
-->
</style>
<style type="text/css">
<!--
.style11 {color: #5AAE18}
.style13 {color: #5AAE18; font-weight: bold; }
-->
</style>
<style type="text/css">
<!--
.style8 {color: #FF0000}
-->
</style>
<body>
<div align="center">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><form name="form1" method="post" action="">
          <table width="96%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="32%" valign="middle">&nbsp;</td>
              <td width="47%" valign="middle"><div align="right">
                  <input name="q" type="text" id="q" value="<%=request("q")%>">
                  <span class="bg"><span class="bg style2"><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff>
                  <input name="submit" type=submit id="submit" style="FONT-SIZE: 12px; HEIGHT: 24px" value=" 查 询 ">
              </font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></span></span> </div></td>
              <td width="4%"><div align="right"><span class="style4"><img src="../../img/txl/16.gif" width="16" height="16"></span></div></td>
              <td width="7%"><a href="writetz.asp" >发布通知</a></td>
              <td width="2%"><img src="../../img/txl/12.gif" width="16" height="16"></td>
              <td width="8%"><div align="center" ><a href="admintzlistdfghwerth.asp">通知管理</a> </div></td>
            </tr>
          </table>
        </form></td>
      </tr>
    </table>
    <table width="100%" 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 bgcolor="#5AAE18"><div align="center"><span class="style1"><span class="style7 style5 style2 style4"><strong> 接 收 通 知</strong></span></span></div></td>
        <td width="6" height="21">&nbsp;</td>
      </tr>
    </table>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#5AAE18">
      <tr>
        <td height="24" colspan="5" bgcolor="#FFFFFF"><% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) 
%>
&nbsp;<A HREF="tzlisttrgytry356forquery.asp?t=<%=(Recordset1.Fields.Item("部门").Value)%>"><%=(Recordset1.Fields.Item("部门").Value)%></A>          <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%><%if request("t")="" then%>
          <span class="style8">(共</span><span class="style13"><%=(r_total)%></span><span class="style8">条通知)</span>          <%end if%></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td width="54%" height="21"><div align="left"><strong>&nbsp;标 题 </strong></div></td>
        <td width="9%"><div align="center"><strong>发布人</strong></div></td>
        <td width="9%"><div align="center"><strong>部 门</strong></div></td>
        <td width="16%"><div align="center"><strong>时 间</strong></div></td>
        <td width="12%"><div align="center"><strong>浏览</strong></div></td>
      </tr>
      <% 
While ((Repeat2__numRows <> 0) AND (NOT r.EOF)) 
dim d
d=r("id")

%>
      <tr bgcolor="#FFFFFF" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''">
        <td>&nbsp;<img src="img/icon1.gif" width="8" height="10"><a href="tzcontentdrfgwdfgrt.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & r.Fields.Item("id").Value %>">
        <% if len(r("标题"))>25 then%>
        <%=(left(r("标题"),25)&"..")%>
        <%else%>
        <%=(r("标题"))%>
        <%end if%>
        </a>
          <%if r("最后更新日期")="2006-10-1" then  %>
          <%
				if DateDiff("d",r("入库日期"),now())<5 then %>
          <%response.Write("<img src=../../img/newgif.gif>")%>
&nbsp; <%=(r.Fields.Item("入库日期").Value)%>
<%end if%>
<%end if%>
<%if r("最后更新日期")="2006-10-1" then %>
<%if DateDiff("d",r("入库日期"),now())>5 then %>
<%=(r.Fields.Item("入库日期").Value)%>
<%end if%>
<%end if%>
<%if r("最后更新日期")<>"2006-10-1" then %>
<%if DateDiff("d",r("最后更新日期"),now())<5 then %>
<span class="style8"><%=(r.Fields.Item("最后更新日期").Value)%>[更新]</span>
<%end if%>
<%end if%>
<%if r("最后更新日期")<>"2006-10-1" then %>
<%if DateDiff("d",r("最后更新日期"),now())>5 then %>
<%=(r.Fields.Item("最后更新日期").Value)%>
<%end if%>
<%end if%></td>
        <td><div align="center"><%=(r.Fields.Item("发送人姓名").Value)%></div></td>
        <td><div align="center"><%=(r.Fields.Item("发送人部门").Value)%></div></td>
        <td><div align="center">
          <div align="center">
            <%if r("最后更新日期")="2006-10-1" then%>
            <%=(r.Fields.Item("入库时间").Value)%>
            <%else%>
            <span class="style6"><%=(r.Fields.Item("最后更新时间").Value)%></span>
            <%end if%>
          </div>
        </div></td>
        <td><div align="center"><%=(r.Fields.Item("通知点击").Value)%>人,<%=(r.Fields.Item("通知阅读人次").Value)%>次</div></td>
      </tr>
      <% 
  Repeat2__index=Repeat2__index+1
  Repeat2__numRows=Repeat2__numRows-1
  r.MoveNext()
Wend
%>

  </table>
    <br>

  
  <% If Not r.EOF Or Not r.BOF Then %>
  <table width="71%"  border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="58%"><div align="right">共 <%=(r_total)%> 条通知 </div></td>
      <td height="31" align="center">&nbsp;</td>
    </tr>
    <tr>
      <td height="31" colspan="2"><table border="0" width="40%" align="center">
        <tr>
          <td width="23%" align="center"><% If MM_offset <> 0 Then %>
              <a href="<%=MM_moveFirst%>">首页</a>
              <% End If ' end MM_offset <> 0 %>
          </td>
          <td width="31%" align="center"><% If MM_offset <> 0 Then %>
              <a href="<%=MM_movePrev%>">前页</a>
              <% End If ' end MM_offset <> 0 %>
          </td>
          <td width="23%" align="center"><% If Not MM_atTotal Then %>
              <a href="<%=MM_moveNext%>">下页</a>
              <% End If ' end Not MM_atTotal %>
          </td>
          <td width="23%" align="center"><% If Not MM_atTotal Then %>
              <a href="<%=MM_moveLast%>">末页</a>
              <% End If ' end Not MM_atTotal %>
          </td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td height="31" colspan="2"><div align="center"><img src="../../img/up.gif" width="17" height="12"><a href="javascript:history.go(-1)">返回上页</a></div></td>
    </tr>
  </table>
  
  
  
  
  <% End If ' end Not r.EOF Or NOT r.BOF %>
  <p>
    <%if r.EOF and r.BOF then %>
  </p>
</div>
  <p align="center" class="style2 style11">暂无通知..<br>
<img src="../../img/up.gif" width="17" height="12"><a href="javascript:history.go(-1)">返回上页</a> </p>
<div align="center">
    <%end if%>
</div>
</body>
</html>
<%
r.Close()
Set r = Nothing
%>
    <%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

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