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

📄 list.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<%
Dim ObjDB,StrSQL,ObjRS
Dim IntPageCount,IntPageNo,IntPageSize
Dim C,ArrList,i,j,IntRows,IntCols
Dim StrWhere
Dim IntShowMode

if session("AccountID")="" then
%>
<script language=javascript>
 	alert("因登录时间过长,会话失效,请退出重新登陆!")
</script>
<%  
 	Response.End
end if
IntPageNo   = Request.QueryString("PageNo")
StrWhere    = Request.QueryString("W")
IntShowMode = Request.QueryString("ShowMode")

If IntShowMode = "0" Then
  IntShowMode = 0
  IntPageSize = 16
Else
  IntShowMode = 1
  IntPageSize = 12
End If

If StrWhere = "" Then
  StrSQL = "Select ID,CustomerName,CompanyName,CompanyPhone,MobilePhone,Email From t_OA_Private_AddressBook Where AccountID = " & Session("AccountID")
Else
  StrSQL = "Select ID,CustomerName,CompanyName,CompanyPhone,MobilePhone,Email From t_OA_Private_AddressBook Where AccountID = " & Session("AccountID") & StrWhere
End If

Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB objDB

Set ObjRS = ObjDB.Execute(StrSQL)
If ObjRS.EOF Then
  Response.Write "<body background='../../../images/bg.gif'><table border=0 height='100%' width='100%'><tr><td valign=middle align=center>目前没有任何名片<td></tr></table></body>"
  'Response.End
End if

Set C = Server.CreateObject ("CMS2003.DBhandle")
C.Init(ObjDB)
ArrList = C.List(IntPageNo,IntPageSize,StrSQL)  '使用List()函数获得列表数组
IntPageCount = C.GetPageCount()                 '使用GetPageCount()函数获得总页码
IntRows = C.GetRows()                           '使用GetRows()获得总返回的行数
IntCols = C.GetCols()                           '使用GetCols()获得总返回的列数

ObjDB.Close
Set ObjDB = Nothing

Sub Main
  If IntShowMode = 0 Then
%>
<table class=Ltable cellspacing=1 cellpadding=3>
  <tr class=LHtr>
    <td width=1%><input type=checkbox id=0 name=ITEM></td>
    <td width=1%></td>
    <td width=12%>姓名</td>
    <td width=20%>公司名称</td>
    <td width=10%>办公电话</td>
    <td width=10%>移动电话</td>
    <td width=15%>电子信箱</td>
  </tr>
<%
  	If IntRows <> "" Then
  		For i = 0 To IntRows
%>
 <tr class=Ltr name=ITEMTR id=<%=ArrList(0,i)%>>
<td><input type=checkbox name=ITEM  id=<%=ArrList(0,i)%>></td>
<td><img src='../../../images/oa/private/addressbook/icon.gif'></td>
<%
      	For j = 1 To IntCols
%>
<td><%=ArrList(j,i)%></td>
<%
        Next
%>
</tr>
<%
      Next
%>
  </table>
<%
    End If
%>
</table>
<table border=0 cellpadding=0 cellspacing=0 width='100%'><tr><td align=left></td><td align=right>
<input type=button class=button value="按照列表方式显示" disabled id=button1 name=button1><input type=button class=button onclick="parent.location='Index.asp?ShowMode=1'" value="按照名片方式显示" id=button2 name=button2>
</td></tr></table>
<%
  Else
%>
<table class=Ltable cellspacing=1 cellpadding=3>
  <tr class=LHtr>
  <td colspan=3><input type=checkbox name=ITEM  id=0>名片列表 ( 鼠标双击名片可查看或修改 )</td>
  </tr>
<%
  	If IntRows <> "" Then
    	For i = 0 To IntRows
      	If i Mod 3 = 0 Then Response.Write "<tr>"
%>  
<td width='33%'>
<table class=Ltable2 width=100% cellspacing=1 cellpadding=3>
<tr class=Ltr name=ITEMTR id=<%=ArrList(0,i)%>>
<td align=left>
<input type=checkbox name=ITEM  id=<%=ArrList(0,i)%>><img src="../../../images/oa/private/addressbook/view.gif"><%=ArrList(1,i)%>
<br> 公司名称:<%=ArrList(2,i)%>
<br> 办公电话:<%=ArrList(3,i)%>
<br> 移动电话:<%=ArrList(4,i)%>
<br> 电子邮件:<%=ArrList(5,i)%>
</td>
</tr>
</table>
</td>
<%
      	If i Mod 3 = 2 Then Response.Write "</tr>"
    	Next
%>
  </table>
<%
  	End If
%>
</table>
<table border=0 cellpadding=0 cellspacing=0 width='100%'><tr><td align=left></td><td align=right>
<input type=button class=button value="按照列表方式显示" onclick="parent.location='Index.asp?ShowMode=0'" id=button1 name=button1><input type=button class=button disabled value="按照名片方式显示" id=button2 name=button2>
</td></tr></table>
<%
  End If

  PageFooter IntPageCount,"PageNo"
End Sub
%>
<!-- #include virtual="Templet/Templet.asp" -->

⌨️ 快捷键说明

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