⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 writexunlutype.asp

📁 本oa系统内部短信.手机短信.文件传输.公文收发.邮件服务.共享下载.内部论坛等功能
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%
Dim Recordset2__b
Recordset2__b = "1"
If (request("bumen") <> "") Then 
  Recordset2__b = request("bumen")
End If
%>
<%'on error resume next
' *** 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
%>
<!--#include file="../../Connections/ifr/ifrasp.asp" -->
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT *  FROM 通讯录  WHERE 部门='" + Replace(Recordset2__b, "'", "''") + "' and 用户临时提交否='否'  ORDER BY 部门排序,用户排序"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset1__MMColParam = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT 手机, emails, 电话, 地址, 邮政编码  FROM usertertggbng  WHERE usersdsfg56 = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Recordset3
Dim Recordset3_numRows

Set Recordset3 = Server.CreateObject("ADODB.Recordset")
Recordset3.ActiveConnection = MM_oavbsconn_STRING
Recordset3.Source = "SELECT *  FROM sms部门表  WHERE 部门<>'对所有人群发' and 开关='开'  ORDER BY 排序 ASC"
Recordset3.CursorType = 0
Recordset3.CursorLocation = 2
Recordset3.LockType = 1
Recordset3.Open()

Recordset3_numRows = 0
%>
<%
Dim r__MMColParam
r__MMColParam = "1"
If (session("userssdfgfhtrh") <> "") Then 
  r__MMColParam = session("userssdfgfhtrh")
End If
%>
<%
Dim r
Dim r_numRows

Set r = Server.CreateObject("ADODB.Recordset")
r.ActiveConnection = MM_oavbsconn_STRING
r.Source = "SELECT id  FROM 通讯录  WHERE 个人帐号 = '" + Replace(r__MMColParam, "'", "''") + "'"
r.CursorType = 0
r.CursorLocation = 2
r.LockType = 1
r.Open()

r_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
Recordset3_numRows = Recordset3_numRows + Repeat2__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim Recordset2_total
Dim Recordset2_first
Dim Recordset2_last

' set the record count
Recordset2_total = Recordset2.RecordCount

' set the number of rows displayed on this page
If (Recordset2_numRows < 0) Then
  Recordset2_numRows = Recordset2_total
Elseif (Recordset2_numRows = 0) Then
  Recordset2_numRows = 1
End If

' set the first and last displayed record
Recordset2_first = 1
Recordset2_last  = Recordset2_first + Recordset2_numRows - 1

' if we have the correct record count, check the other stats
If (Recordset2_total <> -1) Then
  If (Recordset2_first > Recordset2_total) Then
    Recordset2_first = Recordset2_total
  End If
  If (Recordset2_last > Recordset2_total) Then
    Recordset2_last = Recordset2_total
  End If
  If (Recordset2_numRows > Recordset2_total) Then
    Recordset2_numRows = Recordset2_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (Recordset2_total = -1) Then

  ' count the total records by iterating through the recordset
  Recordset2_total=0
  While (Not Recordset2.EOF)
    Recordset2_total = Recordset2_total + 1
    Recordset2.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (Recordset2.CursorType > 0) Then
    Recordset2.MoveFirst
  Else
    Recordset2.Requery
  End If

  ' set the number of rows displayed on this page
  If (Recordset2_numRows < 0 Or Recordset2_numRows > Recordset2_total) Then
    Recordset2_numRows = Recordset2_total
  End If

  ' set the first and last displayed record
  Recordset2_first = 1
  Recordset2_last = Recordset2_first + Recordset2_numRows - 1
  
  If (Recordset2_first > Recordset2_total) Then
    Recordset2_first = Recordset2_total
  End If
  If (Recordset2_last > Recordset2_total) Then
    Recordset2_last = Recordset2_total
  End If

End If
%>
<%
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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="/css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style4 {color: #FFFFFF}
.style5 {color: #000000}
.style6 {color: #000000; font-weight: bold; }
body {
	margin-top: 0px;
}
.style7 {font-size: 12px}
.style8 {color: #999999}
.style11 {color: #5AAE18; font-weight: bold; }
-->
</style>
</head>
<body>
<div align="center">
  <table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="50%"><div align="right"><img src="../../img/txl/28.gif" width="16" height="16"></div></td>
      <td width="8%"><div align="center"><a href="mytongxunlu.asp">我的通讯录</a></div></td>
      <td width="2%"><div align="center"><img src="../../img/txl/15.gif" width="16" height="16"></div></td>
      <td width="9%"><div align="center"><a href="addselfinfo.asp">添加联系人</a></div></td>
      <td width="2%"><div align="center"><img src="../../img/txl/26.gif" width="16" height="16"></div></td>
      <td width="7%"><div align="center"><a href="addgroup.asp">组别管理</a></div></td>
      <td width="2%"><div align="right"><img src="../../img/txl/From.gif" width="16" height="16"></div></td>
      <td width="12%">
        <div align="center">
          <%if  r.eof and r.bof then%>
              <a href="addentertongxunlu.asp">提交办公通讯录</a>
          <%else%>
              <a href="adminmyselfforen.asp">管理办公通讯录</a>
          <%end if%>
        </div></td>
      <td width="2%"><div align="right"><img src="../../img/txl/hn2_sunny.gif" width="19" height="19"></div></td>
      <td width="6%"><div align="center"><a href="../bbs/updatimgpath.asp">上传头像</a></div></td>
    </tr>
  </table>
  <div align="center">
    <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 width="936" bgcolor="#5AAE18"><div align="center"><span class="style4"><span class="style1">通 讯 录 系 统</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 bgcolor="#FFFFFF">
        <td height="21" colspan="10"><% 
While ((Repeat2__numRows <> 0) AND (NOT Recordset3.EOF)) 
%>
            <a href="writexunlutype.asp?bumen=<%=(Recordset3.Fields.Item("部门").Value)%>"><%=(Recordset3.Fields.Item("部门").Value)%>&nbsp;</a>
            <% 
  Repeat2__index=Repeat2__index+1
  Repeat2__numRows=Repeat2__numRows-1
  Recordset3.MoveNext()
Wend
%>
<a href="writexunlu.asp">列出所有通讯录</a></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td width="10%" height="21"><div align="center" class="style1 style5">姓 名</div></td>
        <td width="9%"><div align="center" class="style6">单 位</div></td>
        <td width="8%"><div align="center" class="style6">部 门</div></td>
        <td width="11%"><div align="center" class="style6">手 机</div></td>
        <td width="11%"><div align="center" class="style6">办公电话</div></td>
        <td width="7%"><div align="center" class="style6">分 机</div></td>
        <td width="7%"><div align="center"><strong>集群号</strong></div></td>
        <td width="14%"><div align="center" class="style6">直拨电话</div></td>
        <td width="17%"><div align="center" class="style6">地 址</div></td>
        <td width="6%"><div align="center" class="style6">操 作</div></td>
      </tr>
      <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF)) 
%>
      <tr bgcolor="#FFFFFF" onMouseOver = "this.style.backgroundColor = '#EEEEEE'" onMouseOut = "this.style.backgroundColor = ''">
        <td height="21"><div align="center"><a href="entxldetail.asp?id=<%=(Recordset2.Fields.Item("ID").Value)%>"><%=(Recordset2.Fields.Item("姓名").Value)%></a></div></td>
        <td><div align="center"><%=(Recordset2.Fields.Item("单位").Value)%></div></td>
        <td><div align="center"><%=(Recordset2.Fields.Item("部门").Value)%></div></td>
        <td><div align="center"><%=(Recordset2.Fields.Item("手机1").Value)%></div></td>
        <td><div align="center"><%=(Recordset2.Fields.Item("办公电话").Value)%></div></td>
        <td><div align="center"><%=(Recordset2.Fields.Item("分机").Value)%></div></td>
        <td><%=(Recordset2.Fields.Item("集群号").Value)%></td>
        <td><div align="center"><%=(Recordset2.Fields.Item("直拨电话").Value)%></div></td>
        <td><div align="center">
            <%dim bz
		  bz=Recordset2("地址1")%>
            <%if len(bz)>8  then%>
            <%=left(bz,8)%>..
            <%else%>
            <%=bz%>
            <%end if%>
        </div></td>
        <td><div align="center">
            <div align="center">
              <div align="center"><a href="../gw/out/outforenid.asp?id=<%=(Recordset2.Fields.Item("ID").Value)%>&n=<%=(Recordset2.Fields.Item("姓名").Value)%>">导出</a></div>
            </div>
        </div></td>
      </tr>
      <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset2.MoveNext()
  
Wend
%>
    </table>
    <span class="style7"> (<span class="style11"><%=request("bumen")%></span> <span class="style11"><%=(Recordset2_total)%></span>条记录)</span><br>
  </div>
  <div align="center">
    <p>&nbsp;      </p>
  </div>
</div>
<div align="center">
  <p><br>
    <br>
    <br>
  </p>
</div>
</body>
</html>

<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
r.Close()
Set r = Nothing
%>

⌨️ 快捷键说明

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