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

  1. <% @ LANGUAGE="VBScript" lcid="1036" %>
  2. <!--#include file="include.asp"-->
  3. <%
  4.     strTopicSQL = "SELECT * FROM Topic"
  5.     set TopicRes=ConnectionBD.Execute(strTopicSQL)
  6.     
  7.     vision=Request.Cookies("abb")("vision")
  8.     If vision="" Then
  9.         Response.Cookies("abb")("vision") = "10"
  10.     End If
  11.     visdt=Request.Cookies("abb")("date")
  12.     vish=Request.Cookies("abb")("heure")
  13.     
  14.     lheure = Hour(now)+EnvironnementRes("envdecal")
  15.     If Hour(now)+EnvironnementRes("envdecal")<0 Then
  16.         lheure = Hour(now)+EnvironnementRes("envdecal")+24
  17.     End If
  18.     
  19.     lheure = lheure & ":" & Minute(now) & ":" & Second(now)
  20.     Response.Cookies("abb")("date") = date
  21.     Response.Cookies("abb")("heure") = lheure
  22.     Response.Cookies("abb").Expires = Now() + 365
  23.     
  24.     actual=0
  25.     
  26.     strUserSQL = "SELECT COUNT(usrlogin) FROM Utilisateur"
  27.     set UserRes=ConnectionBD.Execute(strUserSQL)
  28. %>
  29. <html>
  30.  
  31. <head>
  32. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  33. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  34. <meta name="ProgId" content="FrontPage.Editor.Document">
  35. <title>ABB</title>
  36. <style type="text/css">
  37. <!--
  38. A:link{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  39. A:visited{text-decoration: none; color: <% =EnvironnementRes("envlnk") %>;}
  40. A:active{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  41. A:hover{text-decoration: underline; color: <% =EnvironnementRes("envvlnk") %>;}
  42. -->
  43. </style>
  44. </head>
  45.  
  46. <body bgcolor="<% =EnvironnementRes("envback") %>" text="<% =EnvironnementRes("envtxt") %>" link="<% =EnvironnementRes("envlnk") %>" vlink="<% =EnvironnementRes("envvlnk") %>">
  47. <div align="center">
  48.   <center>
  49.   <table border="0" cellpadding="0" cellspacing="0" width="95%">
  50.     <tr>
  51.       <td width="50%" align="center"><a href="default.asp"><img border="0" src="<% =EnvironnementRes("envlogo") %>" alt="Retour α la page principale"></a></td>
  52.       <td width="50%" align="center"><font face="Arial"><b><% =EnvironnementRes("envname") %><br>
  53.         <br>
  54.         </b><font size="1"><a href="profil.asp">profil</a> | <a href="subscribe.asp"> s'enregistrer</a> |
  55.         <a href="pref.asp"> prΘfΘrences</a> | <a href="faq.asp"> faq</a> | <a href="search.asp">
  56.         rechercher</a><br>
  57.         <font face="Arial" size="1">Seule les personnes enregistrΘes peuvent
  58.         poster et rΘpondre.</font></font></font></td>
  59.     </tr>
  60.   </table>
  61.   </center>
  62. </div>
  63.  
  64. <p> </p>
  65. <div align="center">
  66.   <center>
  67.   <table border="0" width="95%" cellspacing="1" cellpadding="3">
  68.     <tr>
  69.       <td colspan="3"><font face="Arial" size="2">Date de votre derniΦre visite : <% =Day(visdt) & "/" & Month(visdt) & "/" & Year(visdt) %>, <% =vish %></font></td>
  70.       <td colspan="3" align="right"><font face="Arial" size="2">Nombre
  71.         d'utilisateurs inscrits : <% =UserRes(0)-1 %></font></td>
  72.     </tr>
  73.     <tr>
  74.       <td align="center" bgcolor="<% =EnvironnementRes("envtop") %>"> </td>
  75.       <td bgcolor="<% =EnvironnementRes("envtop") %>" width="100%"><font face="Arial" size="2"><b>ThΦmes</b></font></td>
  76.       <td align="center" bgcolor="<% =EnvironnementRes("envtop") %>" colspan="2"><font face="Arial" size="2"><b>Envois</b></font></td>
  77.       <td bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>Dernier envoi</b></font></td>
  78.       <td bgcolor="<% =EnvironnementRes("envtop") %>"><font face="Arial" size="2"><b>ModΘrateur</b></font></td>
  79.     </tr>
  80.     <% Do Until TopicRes.EOF = True %>
  81.     <% strAdminSQL = "SELECT usrlogin FROM Utilisateur WHERE usrid=" & TopicRes("topicadm") & " "
  82.     set AdminRes=ConnectionBD.Execute(strAdminSQL) 
  83.     If TopicRes("topicpost")>0 Then
  84.         strPostSQL = "SELECT postdt,posth FROM Post WHERE posttopic=" & TopicRes("topicid") & " ORDER BY postdt DESC,posth DESC"
  85.         set PostRes=ConnectionBD.Execute(strPostSQL)
  86.         If DateDiff("d",visdt,PostRes("postdt"))>0 Then
  87.             actual=1
  88.             Else
  89.             If DateDiff("d",visdt,PostRes("postdt"))=0 Then
  90.                 If DateDiff("s",vish,PostRes("posth"))>=0 Then
  91.                     actual=1
  92.                 End If
  93.             End If
  94.         End If
  95.     End If
  96.     %>
  97.     <tr>
  98.       <td align="center" bgcolor="<% =EnvironnementRes("envcol2") %>"><img src="<% If actual=0 Then %><% =EnvironnementRes("envold") %><% Else %><% =EnvironnementRes("envnew") %><% End If %>"></td>
  99.       <td bgcolor="<% =EnvironnementRes("envcol2") %>" width="100%"><font face="Arial" size="2"><a href="topic.asp?topicid=<% =TopicRes("topicid") %>&visdt2=<% =visdt %>&vish2=<% =vish %>"><b><% =TopicRes("topicdesc") %></a></b><br><% =TopicRes("topicinfo") %></font></td>
  100.       <td align="center" bgcolor="<% =EnvironnementRes("envcol1") %>" colspan="2"><font face="Arial" size="2"><% =TopicRes("topicpost") %></font></td>
  101.       <td bgcolor="<% =EnvironnementRes("envcol2") %>"><font face="Arial" size="2"><% If TopicRes("topicpost")>0 Then %><% =PostRes("postdt") %>, <% =PostRes("posth") %><% End If %></font></td>
  102.       <td bgcolor="<% =EnvironnementRes("envcol1") %>"><font face="Arial" size="2"><% =AdminRes("usrlogin") %></font></td>
  103.     </tr>
  104.     <% actual=0 %>
  105.     <% TopicRes.MoveNext %>
  106.     <% Loop %>
  107.   </table>
  108.   </center>
  109. </div>
  110. <p><font face="Arial" size="2"><img src="<% =EnvironnementRes("envnew") %>"> Nouveaux messages depuis votre derniΦre visite.<br>
  111. <img src="<% =EnvironnementRes("envold") %>"> Aucun nouveau message depuis votre derniΦre visite.</font></p>
  112. <!--#include file="basdepage.asp"-->
  113. </body>
  114. </html>