<!--#include file="./base.inc"-->
<%
'---- CursorTypeEnum Values ----
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
'---- LockTypeEnum Values ----
Const adLockReadOnly = 1
Const adLockPessimistic = 2
Const adLockOptimistic = 3
Const adLockBatchOptimistic = 4
Const rblPageSize = 15
Dim conn
Open_Conn(sPath)
If Request("Page") > "" Then
PageNo = Request("Page")
PageNo = PageNo + 0
Else
PageNo = 1
End If
sql = "select A.* from User A"
xC = Request.Form("_c")
If xC > "" Then
xV = Request.Form("_v")
xO1 = Request.Form("_o")
xO2 = "'"
If xO1 = "l1" then
xO1 = "like '%"
xO2 = "%'"
End If
If xO1 = "l2" then
xO1 = "like '"
xO2 = "%'"
End If
sql = sql & " Where A." & xC & " " & xO1 & xV & xO2
End If
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open sql, Conn, adOpenKeyset,adLockReadOnly
RS.PageSize = rblPageSize ' Number of rows per page
If RS.recordcount > 0 Then
RS.AbsolutePage = PageNo
End If
%>
<HTML>
<HEAD><TITLE> Liste des contacts</TITLE>
</HEAD>
<BODY BGCOLOR=#66FF99>
<HR>
<DIV class="std">
<font size="4" face="Arial" color="#800000"> annuaire téléphonique</font><TABLE WIDTH="100%" class="tool1"><TR><TD ALIGN=LEFT><B>Page <%=PageNo%> / <%=RS.PageCount%></B></TD>
<TD><% xP = RS.PageCount
if xP > 1 Then
Response.write "Page : "
If PageNo > 1 Then
iP = PageNo - 1
Response.write "<A HREF=""./user_liste.asp?id=" & uId & "&page=" & iP & """>Prev.</A>, "
End If
iP = 0
Do While xP > iP
iP = iP + 1
If iP = PageNo Then
Response.write iP & ", "
Else
Response.write "<A HREF=""./user_liste.asp?id=" & uId & "&page=" & iP & """>" & iP & "</A>, "
End If
Loop
iP = PageNo + 1
If PageNo < xP Then
Response.write "<A HREF=""./user_liste.asp?id=" & uId & "&page=" & iP & """>Next</A>"
End If
End If
%>
</TD>
</TR></TABLE>
<P>
<FORM METHOD=POST ACTION="./user_liste.asp">
<TABLE><T R>
<TD><SELECT NAME="_c">
<OPTION VALUE="sNom" SELECTED>Nom
<OPTION VALUE="sPrenom">Prenom
<OPTION VALUE="sSite">Telephone
<OPTION VALUE="sMail">Adresse Mail
<OPTION VALUE="sURL">Portable
</SELECT>
<S ELECT NAME="_o">
<OPTION VALUE="l1">Contient
<OPTION VALUE="l2">Commence par
<OPTION VALUE="like '%">Se termine par
<OPTION VALUE="= '">Egal
<OPTION VALUE="< '">Inferieur
<OPTION VALUE="> '">Superieur
<OPTION VALUE="not = '">Different
</SELECT>
</TD>
<TD><INPUT TYPE=TEXT NAME="_v" SIZE=14 VALUE=""></TD>
<TD><INPUT TYPE=SUBMIT VALUE="Chercher"></TD>
</TR></ TABLE>
</FORM>
<TABLE WIDTH="90%" class="std">
<%
RowCount = rs.PageSize
Do While Not RS.EOF and rowcount > 0
%>
<TR BGCOLOR=1010FF>
<TD><A class="tool2" HREF="<% =RS("sURL") %>"><% =RS("sSite") %></A></TD>
<TD ALIGN=RIGHT class="tool2"><% If RS("sMail") > "" Then
Response.Write "<A class=""tool2"" HREF=""mailto:" & RS("sMail") & """>" & RS("sNom") & "," & RS("sPrenom") & "</A>"
Else
Response.Write RS("sNom") & "," & RS("sPrenom")
End If %>
</TD></TR>
<TR>
<TD ALIGN=RIGHT><% =RS("dDtCreat")%></TD></TR>
<T R><TD COLSPAN=2><% =RS(7) %><BR>
<B>e-mail : </B><A HREF="<% =RS("sMail") %>"><% =RS("sMail") %></A>
</TD></TR>
<%
RowCount = RowCount - 1
RS.MoveNext
Loop
%>
</TABLE>
<P>
<%
Conn.Close
set rs = nothing
set Conn = nothing
%>
</TABLE>
<P><P>
</DIV>
</BODY>
</HTML>
< %
Function Open_Conn(sBase)
Set conn = Server.CreateObject("ADODB.Connection")
conn.ope n sBase,"",""
End Function
%>