1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
| <%set conn=server.createobject("adodb.connection")
DSN = "DBQ=" & Server.Mappath("../database/basefrmt.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};Driverld=25"
conn.open DSN
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
set cate2=server.createobject("adodb.recordset")
set arb=server.createobject("adodb.recordset")
sqls="select * from categorie order by id_cat"
cate2.open sqls, conn,3,3
if request.Form("cate")<>"858585" then
session("cates")=request.Form("cate")
else
session("cates")=""
end if
sqla="select * from arbitre"
if request.Form("hide")="2" then
if session("cates")<>"" then
sqla=sqla & " where id_cat='"&session("cates")&"'"
end if
end if
arb.open sqla,conn,3,3
nbelement=10
arb.pagesize=nbelement
IF request("page")=""then
page=1
else
if isnumeric(request("page"))then
page=cdbl(request("page"))
if page>arb.pagecount then
response.write("une erreur s'est produite")
arb.close
set titre=nothing
conn.close
set con=nothing
response.write("erreur est survenue")
response.flush
response.end
response.buffer=true
end if
else
response.write("erreur")
arb.close
set an=nothing
con.close
response.flush
response.end
end if
end if
if not(arb.bof and arb.eof) then
arb.AbsolutePage=page
end if
%>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="151" align="left" valign="top"><table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="32"><form name="form1" method="post" action="">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<select name="cate" id="cate" onChange="hide.value='2';target='_self';form1.action='liste4.asp';submit()">
<option value="858585" >Choisir une catégorie </option>
<% while not cate2.eof %>
<option value="<%=cate2("id_cat")%>" <% if cdbl(request.form("cate"))=cdbl(cate2("id_cat")) then
response.write(" selected")
end if
%> >
<% if not cate2.eof then %><%=cate2("cat")%><% end if %>
</option><%cate2.movenext
wend
%>
</select><input type="hidden" name="hide" value="0">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<p> </p>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" colspan="3" align="left" valign="top"> </td>
</tr>
<tr>
<td height="19" align="left" valign="top">Nom</td>
<td align="left" valign="top">Prenom</td>
<td align="left" valign="top">Club</td>
</tr>
<%
if not arb.eof then
for i=1 to arb.pagesize
%>
<tr>
<td height="19" align="left" valign="top"><%=arb("nom")%></td>
<td height="19" align="left" valign="top"><%=arb("prenom")%></td>
<td height="19" align="left" valign="top"><%=arb("club")%></td>
</tr>
<%
arb.movenext
if arb.eof then exit for
next
end if%>
</table>
<%if arb.recordcount>10 then%>
<table class="texte1" width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"> </td>
<td align="left" valign="top"> </td>
<td align="center" valign="top"> </td>
<td align="right" valign="top"> </td>
<td align="center"></td>
</tr>
<tr>
<td width="3%" align="center"> </td>
<td width="33%" align="left" valign="top"><%
if page>1 then
reff="liste4.asp?page="&page-1
%>
<div align="left"><a class="lien" href="<%=reff%>">Précédente</a> </div>
<%end if%>
</td>
<td width="33%" align="center" valign="top">Page <%=page%> sur <%=arb.pagecount%></td>
<td width="33%" align="right" valign="top"><%
if page< arb.pagecount then
ref="liste4.asp?page="&page+1
%>
<div align="right"><a class="lien" href="<%=ref%>">Suivante </a></div>
<%end if%>
</td>
<td width="3%" align="center"></td>
</tr>
</table>
<%
end if%></td>
</tr>
</table>
</body>
</html> |
Partager