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

  1. <% @ LANGUAGE="VBScript" lcid="1036" %>
  2. <!--#include file="include.asp"-->
  3. <%
  4.     topicid2 = Request.QueryString("topicid")
  5.     visdt = Request.QueryString("visdt2")
  6.     vish = Request.QueryString("vish2")
  7.     
  8.     strTopicSQL = "SELECT * FROM Topic WHERE topicid=" & topicid2 & " "
  9.     set TopicRes=ConnectionBD.Execute(strTopicSQL)
  10.     
  11.     strPostSQL = "SELECT * FROM Post WHERE posttopic=" & topicid2 & " ORDER BY postdt DESC,posth DESC"
  12.     set PostRes=ConnectionBD.Execute(strPostSQL)
  13.     
  14.     strAdminSQL = "SELECT usrlogin FROM Utilisateur WHERE usrid=" & TopicRes("topicadm") & " "
  15.     set AdminRes=ConnectionBD.Execute(strAdminSQL)
  16.     
  17.     actual=0
  18.     If Request.form("vision")<>"" Then
  19.         vision2=request.form("vision")
  20.         Else
  21.         vision2=Request.Cookies("abb")("vision")
  22.     End If
  23. %>
  24. <html>
  25.  
  26. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  28. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  29. <meta name="ProgId" content="FrontPage.Editor.Document">
  30. <title>ABB</title>
  31. <style type="text/css">
  32. <!--
  33. A:link{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  34. A:visited{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  35. A:active{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  36. A:hover{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  37. -->
  38. </style>
  39. </head>
  40.  
  41. <body bgcolor="<% =EnvironnementRes("envback") %>" text="<% =EnvironnementRes("envtxt") %>" link="<% =EnvironnementRes("envlnk") %>" vlink="<% =EnvironnementRes("envvlnk") %>">
  42. <div align="center">
  43.   <table border="0" cellpadding="0" cellspacing="0" width="95%">
  44.     <tr>
  45.       <td width="50%" align="center"><a href="default.asp"><img border="0" src="<% =EnvironnementRes("envlogo") %>" alt="Retour α la page principale"></a><br>
  46.         <font face="Arial" size="2"><b><% =TopicRes("topicdesc") %><br>
  47.         </b></font><font face="Arial" size="1">(modΘrateur : <% =AdminRes("usrlogin") %>)</font></td>
  48.   <center>
  49.       <td width="50%" align="center">
  50.         <div align="center">
  51.           <table border="0" cellpadding="0" cellspacing="0">
  52.             <tr>
  53.               <td><font face="Arial" size="1"><img border="0" src="<% =EnvironnementRes("envdrawer") %>"> <a href="default.asp"><% =EnvironnementRes("envname") %></a></font>
  54.               </td>
  55.             </tr>
  56.             <tr>
  57.               <td><font face="Arial" size="1"><img border="0" src="<% =EnvironnementRes("envtree1") %>"><img border="0" src="<% =EnvironnementRes("envdrawer") %>"> <% =TopicRes("topicdesc") %></font>
  58.               </td>
  59.             </tr>
  60.           </table>
  61.         </div>
  62.         <p><a href="new.asp?topicid=<% =topicid2 %>"><img border="0" src="<% =EnvironnementRes("envpost") %>" alt="Nouveau message"></a>
  63.         </p>
  64.         <p><font size="1" face="Arial"><a href="profil.asp">profil</a> | <a href="subscribe.asp"> s'enregistrer</a> |
  65.         <a href="pref.asp"> prΘfΘrences</a> | <a href="faq.asp"> faq</a> | <a href="search.asp">
  66.         rechercher</a><br>
  67.         </font><font face="Arial" size="1">Seules les personnes enregistrΘes
  68.         peuvent poster et rΘpondre.</font></p>
  69.       </td>
  70.     </tr>
  71.   </table>
  72.   </center>
  73. </div>
  74.  
  75. <div align="right">
  76. <form method="POST" action="topic.asp?topicid=<% =topicid2 %>&visdt2=<% =visdt %>&vish2=<% =vish %>">
  77.   <font face="Arial" size="2">Voir
  78.   les sujets datant de : <select size="1" name="vision">
  79.     <option value="1" <% If vision2=1 Then %>selected<% End If %>>La derniΦre
  80.     journΘe</option>
  81.     <option value="2" <% If vision2=2 Then %>selected<% End If %>>2 jours</option>
  82.     <option value="5" <% If vision2=5 Then %>selected<% End If %>>5 jours</option>
  83.     <option value="10" <% If vision2=10 Then %>selected<% End If %>>10 jours</option>
  84.     <option value="20" <% If vision2=20 Then %>selected<% End If %>>20 jours</option>
  85.     <option value="30" <% If vision2=30 Then %>selected<% End If %>>30 jours</option>
  86.     <option value="45" <% If vision2=45 Then %>selected<% End If %>>45 jours</option>
  87.     <option value="60" <% If vision2=60 Then %>selected<% End If %>>60 jours</option>
  88.     <option value="10000" <% If vision2=10000 Then %>selected<% End If %>>Voir
  89.     tous les sujets</option>
  90.   </select><input type="submit" value="Go"></font></p>
  91. </form>
  92. </div>
  93. <div align="center">
  94.   <center>
  95.   <table border="0" width="95%" cellspacing="1" cellpadding="3">
  96.     <tr>
  97.       <td align="center" bgcolor="<% =EnvironnementRes("envtop") %>"> </td>
  98.       <td bgcolor="<% =EnvironnementRes("envtop") %>" width="100%"><font face="Arial" size="2"><b>Sujet</b></font></td>
  99.       <td align="center" bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>DΘpart du sujet</b></font></td>
  100.       <td bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>RΘponses</b></font></td>
  101.       <td bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>Dernier envoi</b></font></td>
  102.     </tr>
  103.     <% Do Until PostRes.EOF = True %>
  104.     <% strSubSQL = "SELECT usrlogin FROM Utilisateur WHERE usrid=" & PostRes("postaut") & " "
  105.     set SubRes=ConnectionBD.Execute(strSubSQL)
  106.     If visdt<>"" Then
  107.         If DateDiff("d",visdt,PostRes("postdt"))>0 Then
  108.             actual=1
  109.             Else
  110.             If DateDiff("d",visdt,PostRes("postdt"))=0 Then
  111.                 If DateDiff("s",vish,PostRes("posth"))>=0 Then
  112.                     actual=1
  113.                 End If
  114.             End If
  115.         End If
  116.     End If
  117.     %>
  118.     <% If (DateDiff("d",now,PostRes("postdt"))) > -vision2 Then %>
  119.     <tr>
  120.       <td align="center" bgcolor="<% =EnvironnementRes("envcol2") %>"><img src="<% If PostRes("postfin")=true Then %><% =EnvironnementRes("envclose") %><% Else %><% If actual=0 Then %><% =EnvironnementRes("envoldp") %><% Else %><% =EnvironnementRes("envnewp") %><% End If %><% End If %>"></td>
  121.       <td bgcolor="<% =EnvironnementRes("envcol2") %>" width="100%"><font face="Arial" size="2"><a href="post.asp?postid=<% =PostRes("postid") %>&topicid=<% =topicid2 %>&visdt2=<% =visdt %>&vish2=<% =vish %>"><% =PostRes("posttitle") %></a></font></td>
  122.       <td bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><% =SubRes("usrlogin") %></font></td>
  123.       <td bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><% =PostRes("postans") %></font></td>
  124.       <td bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><% =PostRes("postdt") %>, <% =PostRes("posth") %></font></td>
  125.     </tr>
  126.     <% End If %>
  127.     <% actual=0 %>
  128.     <% PostRes.MoveNext %>
  129.     <% Loop %>
  130.   </table>
  131.   </center>
  132. </div>
  133. <%
  134. strthemeSQL = "SELECT topicid,topicdesc FROM Topic"
  135. set themeRes=ConnectionBD.Execute(strthemeSQL)
  136. %>
  137. <div align="right">
  138. <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
  139. function FrontPage_Form2_Validator(theForm)
  140. {
  141.  
  142.   if (theForm.jump.selectedIndex == 0)
  143.   {
  144.     alert("La premiΦre option \"jump\" n'est pas une sΘlection valide. Choisissez une des autres options.");
  145.     theForm.jump.focus();
  146.     return (false);
  147.   }
  148.   return (true);
  149. }
  150. //--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="jump.asp?visdt2=<% =visdt %>&vish2=<% =vish %>" onsubmit="return FrontPage_Form2_Validator(this)" name="FrontPage_Form2">
  151.   <font face="Arial" size="2">Aller au thΦme : <!--webbot bot="Validation"
  152.   B-Disallow-First-Item="TRUE" --> <select size="1" name="jump">
  153.     <option selected>Choississez un ThΦme</option>
  154.     <% Do Until themeRes.EOF = True %>
  155.     <option value="<% =themeRes("topicid") %>"><% =themeRes("topicdesc") %></option>
  156.     <% themeRes.MoveNext %>
  157.     <% Loop %>
  158.   </select><input type="submit" value="Go"></font>
  159. </form>
  160. </div>
  161.  
  162. <p><font face="Arial" size="2"><img src="<% =EnvironnementRes("envnewp") %>">   Contient de nouveaux envois depuis votre
  163. derniΦre visite.<br>
  164. <img src="<% =EnvironnementRes("envoldp") %>">  Ne contient pas de nouveaux envois depuis votre derniΦre visite.<br>
  165. <img src="<% =EnvironnementRes("envclose") %>"> Sujet fermΘ, aucune nouvelle rΘponse acceptΘe.</font></p>
  166.  
  167. <p align="center"><a href="new.asp?topicid=<% =topicid2 %>"><img border="0" src="<% =EnvironnementRes("envpost") %>" alt="Nouveau message"></a></p>
  168.  
  169. <!--#include file="basdepage.asp"-->
  170. </body>
  171. </html>
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.