Subversion Repositories Applications.projet

Rev

Blame | Last modification | View Log | RSS feed

<?
//le cartouche

$fichier_arbre="appli_arbre_date.php"; //c'est le lien du cartouche...

$req_nb_forum_tela=mysql_query("select NB_MESSAGES,NB_ABONNES,NUM_SEM from $nom_table_tela order by NUM_SEM");

  $nbrestela=mysql_num_rows($req_nb_forum_tela);

  $nb_forum_tela_mess =mysql_result($req_nb_forum_tela,($nbrestela-1),NB_MESSAGES);
  $nb_forum_tela_ab =mysql_result($req_nb_forum_tela,($nbrestela-1),NB_ABONNES);

//$nb_forum_tela_ab=0;
//$nb_forum_tela_mess=0;

  $nb_total_mess=$nb_total_mess+$nb_forum_tela_mess;
  $nb_total_abon=$nb_total_abon+$nb_forum_tela_ab;

  //AFFICHAGE DU CARTOUCHE
  echo"
  <tr>
        <td>
          <center>
            <table border=\"1\" cellspacing=\"0\" cellpadding=\"0\"
            width=\"515\">
              <tr>
                <td width=\"511\" bordercolor=\"#000000\" colspan=\"2\"
                bgcolor=\"#000000\">
                  <p align=\"center\">
                    <b><font face=\"Arial, Helvetica, sans-serif\"
                    color=\"#FFCC00\">$nom_graph</font><BR><font color=#ff0000 size=2>Semaine $num_sem $blabla_thema</font></b>
                  </p>
                </td>
              </tr>
              <tr>
                <td width=\"315\" bordercolor=\"#000000\" valign=
                \"middle\">
                  <p align=\"left\">
                    <font face=\"Arial, Helvetica, sans-serif\"
                    size=\"1\"><b>Couleur de la feuille :</b>
                    Fonction du nombre de messages de la
                    semaine</font>
                  </p>
                  <center>
                    <table border=\"0\" cellspacing=\"0\"
                    cellpadding=\"0\">
                      <tr>
                        <td width=\"10%\" bgcolor=\"#279C27\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#1C6C1C\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#175917\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#114411\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#768000\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#CCCC00\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#FFCC00\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#DD8D22\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#FF6600\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                        <td width=\"10%\" bgcolor=\"#CC3300\">
                          <p align=\"center\">
                                
                          </p>
                        </td>
                      </tr>
                      <tr>
                        <td width=\"50%\" colspan=\"5\" bgcolor=
                        \"#000000\">
                          <p align=\"left\">
                            <font face=
                            \"Arial, Helvetica, sans-serif\" size=
                            \"4\" color=\"#FFFFFF\"><b>-</b></font>
                          </p>
                        </td>
                        <td width=\"50%\" colspan=\"5\" bgcolor=
                        \"#000000\">
                          <p align=\"right\">
                            <font face=
                            \"Arial, Helvetica, sans-serif\" size=
                            \"4\" color=\"#FFFFFF\"><b>+</b></font>
                          </p>
                        </td>
                      </tr>
                    </table>
                  </center>
                  <p align=\"left\">
                    <font face=\"Arial, Helvetica, sans-serif\"
                    size=\"1\"><b>Taille de la branche :</b>
                    Fonction du nombre de messages</font><br>
                     <font face=\"Arial, Helvetica, sans-serif\"
                    size=\"1\"><b>Position sur le tronc :</b>
                    Fonction de la date de
                    cr&eacute;ation</font>
                  </p>
                  <font face=\"Arial, Helvetica, sans-serif\" size=
                  \"1\">LIENS<br>
                   Nom du forum : $texte_lien_branche<br>
                   Nombre : $texte_lien_puce<br>
                   Feuille : $texte_lien_feuille<br>
                  </font>
                </td>
                <td width=\"194\" bordercolor=\"#000000\">
                   
                  <center>
                    <table border=\"0\" cellspacing=\"0\"
                    cellpadding=\"0\" width=\"158\" bgcolor=
                    \"#000000\">
                      <tr>
                        <td width=\"106\">
                          <font face=
                          \"Arial, Helvetica, sans-serif\" color=
                          \"#FFFFFF\"><b><font face=
                          \"Arial, Helvetica, sans-serif\" size=
                          \"2\">T</font><font face=
                          \"Arial, Helvetica, sans-serif\" size=
                          \"2\">otal
                          abonn&eacute;s</font> </b></font>
                        </td>
                        <td width=\"48\">
                          <center>
                            <font face=
                            \"Arial, Helvetica, sans-serif\" size=
                            \"2\" color=
                            \"#FFFFFF\">$nb_total_abon</font>
                          </center>
                        </td>
                      </tr>
                      <tr>
                        <td width=\"106\">
                          <font face=
                          \"Arial, Helvetica, sans-serif\" size=\"2\"
                          color=\"#FFFFFF\"><b>Total
                          messages</b></font>
                        </td>
                        <td width=\"48\">
                          <center>
                            <font face=
                            \"Arial, Helvetica, sans-serif\" size=
                            \"2\" color=
                            \"#FFFFFF\">$nb_total_mess</font>
                          </center>
                        </td>
                      </tr>
                    </table>
                  </center>
                  <p>
                     
                  </p>
                  <center>
                    <table>
                      <tr>
                        <td width=\"113\">
                          <form method=\"POST\" action=
                          \"document.php?project=$project&locale=&doc=".$DOCrow->D_NAME."&set=$set&page=$pageNdx&thema=$thema&fichier_arbre=".$fichier_arbre."\">
                            <p>
                              <select name=\"num_sem\"><option selected value=\"2\">num";

  //requete d'affichage des semaines dans le select
  $req_sem = mysql_query("select NUM_SEM from $nom_table_tela order by NUM_SEM desc");
  $nb_req_sem = mysql_num_rows($req_sem);
  $nb_sem_max = mysql_result($req_sem,0,0);

  for($i=0;$i<$nb_req_sem-1;$i++)
  {
   $num = mysql_result($req_sem,$i,0);
   echo"<option value=\"$num\"";
   if ($num_sem == $num) echo " selected";
   echo ">$num";
  }

  echo"

                                </option>
                              </select>
                            <input type=image src=Local/arbre/valider.gif></p>
                          </form>
";
           //calcul semaine precedente
           $num_sem_prec=$num_sem-1;
           if ($num_sem_prec!=1):
              echo"<a href=document.php?project=$project&locale=&doc=".$DOCrow->D_NAME."&set=$set&page=$pageNdx&fichier_arbre=".$fichier_arbre."&num_sem=$num_sem_prec&thema=$thema><img border=\"0\" src=\"Local/arbre/fleche_gauche.gif\" width=\"20\" height=\"16\"></a>";
           endif;
echo"sem. $num_sem";
       //calcul semaine suivante
       $num_sem_suiv=$num_sem+1;
       if ($num_sem_suiv <= $nb_sem_max):
            echo"<a href=document.php?project=$project&locale=&doc=".$DOCrow->D_NAME."&set=$set&page=$pageNdx&fichier_arbre=".$fichier_arbre."&num_sem=$num_sem_suiv&thema=$thema><img border=\"0\" src=\"Local/arbre/fleche_droite.gif\" width=\"20\" height=\"16\"></a>";
       endif;
       echo"
                        </td>
                      </tr>
                    </table>
                  </center>
                  <table border=\"0\" cellspacing=\"0\" cellpadding=
                  \"0\" width=\"182\">
                    <tr>
                      <td width=\"176\" colspan=\"3\">
                        <p align=\"center\">
                          <font face=
                          \"Arial, Helvetica, sans-serif\" size=
                          \"2\"><b>Evolution de l'arbre</b><br>
                           <font size=\"1\">Choisissez la semaine a
                          laquelle vous voulez voir
                          l'arbre</font></font>
                        </p>
                      </td>
                    </tr>
                    <tr>
                      <td width=\"34\">
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </center>
        </td>
      </tr>";

  mysql_free_result($req_nb_forum_tela);
  mysql_free_result($req_sem);

?>