home *** CD-ROM | disk | FTP | other *** search
/ Freelog 9 / Freelog009.iso / BAS / Internet / Abb / dosearch.asp < prev    next >
Text File  |  2000-03-02  |  4KB  |  87 lines

  1. <% @ LANGUAGE="VBScript" lcid="1036" %>
  2. <!--#include file="include.asp"-->
  3. <%
  4. search2=Replace(request.form("search"), "'", "''")
  5. ou2=Replace(request.form("ou"), "'", "''")
  6. If search2<>"" Then    
  7.     If ou2="titres" Then
  8.         strPostSQL = "SELECT * FROM Post WHERE posttitle LIKE '%" & search2 & "%' ORDER BY posttopic,postdt DESC,posth DESC"
  9.         set PostRes=ConnectionBD.Execute(strPostSQL)
  10.     Else
  11.         If ou2="messages" Then
  12.             strPostSQL = "SELECT DISTINCT postid,postaut,posttopic,postfin,posttitle,postans,postdt,posth FROM Post,Postcn WHERE postcncn LIKE '%" & search2 & "%' AND postid=postcnpo ORDER BY posttopic,postdt DESC,posth DESC"
  13.             set PostRes=ConnectionBD.Execute(strPostSQL)
  14.         End If
  15.     End If
  16. End If
  17. %>
  18. <html>
  19.  
  20. <head>
  21. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  22. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  23. <meta name="ProgId" content="FrontPage.Editor.Document">
  24. <title>ABB</title>
  25. <style type="text/css">
  26. <!--
  27. A:link{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  28. A:visited{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  29. A:active{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  30. A:hover{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  31. -->
  32. </style>
  33. </head>
  34.  
  35. <body bgcolor="<% =EnvironnementRes("envback") %>" text="<% =EnvironnementRes("envtxt") %>" link="<% =EnvironnementRes("envlnk") %>" vlink="<% =EnvironnementRes("envvlnk") %>">
  36. <p align="center"><font face="Arial">
  37. <a href="default.asp"><img border="0" src="<% =EnvironnementRes("envlogo") %>" alt="Retour α la page principale"></a>
  38.  
  39.  <b>RΘsultat de la recherche</b></font>
  40. <% If search2<>"" Then %>
  41. <% If PostRes.EOF = True Then %>
  42. <p align="center"><font face="Arial" size="2"><b>
  43. Pas de rΘponse correspondant α votre recherche.</b></font>
  44. <% Else %>
  45. <div align="center">
  46.   <center>
  47.   <table border="0" width="95%" cellspacing="1" cellpadding="3">
  48.     <tr>
  49.       <td align="center" bgcolor="<% =EnvironnementRes("envtop") %>"> </td>
  50.       <td bgcolor="<% =EnvironnementRes("envtop") %>" width="100%"><font face="Arial" size="2"><b>Sujet</b></font></td>
  51.       <td bgcolor="<% =EnvironnementRes("envtop") %>" align="center"><font face="Arial" size="2"><b>ThΦme</b></font></td>
  52.       <td align="center" bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>DΘpart du sujet</b></font></td>
  53.       <td bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>RΘponses</b></font></td>
  54.       <td bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>Dernier envoi</b></font></td>
  55.     </tr>
  56.     <% Do Until PostRes.EOF = True %>
  57.     <%
  58.     strSubSQL = "SELECT usrlogin FROM Utilisateur WHERE usrid=" & PostRes("postaut") & " "
  59.     set SubRes=ConnectionBD.Execute(strSubSQL)
  60.     strTopicSQL = "SELECT topicdesc FROM Topic WHERE topicid=" & PostRes("posttopic") & " "
  61.     set TopicRes=ConnectionBD.Execute(strTopicSQL)
  62.     %>
  63.     <tr>
  64.       <td align="center" bgcolor="<% =EnvironnementRes("envcol2") %>"><img src="<% If PostRes("postfin")=true Then %><% =EnvironnementRes("envclose") %><% Else %><% =EnvironnementRes("envoldp") %><% End If %>"></td>
  65.       <td bgcolor="<% =EnvironnementRes("envcol2") %>" width="100%"><font face="Arial" size="2"><a href="post.asp?postid=<% =PostRes("postid") %>&topicid=<% =PostRes("posttopic") %>"><% =PostRes("posttitle") %></a></font></td>
  66.       <td bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><% topic=TopicRes("topicdesc") %><% =Replace(topic," "," ") %></font></td>
  67.       <td bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><% =SubRes("usrlogin") %></font></td>
  68.       <td bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><% =PostRes("postans") %></font></td>
  69.       <td bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><% =PostRes("postdt") %>, <% =PostRes("posth") %></font></td>
  70.     </tr>
  71.     <% PostRes.MoveNext %>
  72.     <% Loop %>
  73.   </table>
  74.   </center>
  75. </div>
  76. <p align="center">
  77. <% End If %>
  78. <% Else %>
  79.  <font face="Arial" size="2"><b>
  80. <center><br>Entrez quelque chose α chercher...</center>
  81. <% End If %>
  82.  </b></font>
  83. <p align="center">
  84. <font face="Arial" size="2"><a href="search.asp"><b>Nouvelle recherche</b></a></font>
  85. <!--#include file="basdepage.asp"-->
  86. </body>
  87. </html>