예제 #1
0
<table id="table_notifications" class="form hsort">
  <thead>
    <tr>
      <th>Date</th>
      <th>Statut</th>
      <th>Objet</th>
      <th>Contenu</th>
      <th class="nu"></th>
    </tr>
  </thead>
  <tbody>
    <?php
    // Javascript
    Layout::add( 'js_inline_before' , 'var tab_notif_contenu  = new Array();' );
    // Lister les notifications qu'un utilisateur peut consulter
    $DB_TAB = DB_STRUCTURE_NOTIFICATION::DB_lister_notifications_consultables_for_user( $_SESSION['USER_ID'] );
    if(!empty($DB_TAB))
    {
      Layout::add( 'js_inline_before' , '// <![CDATA[' );
      foreach($DB_TAB as $DB_ROW)
      {
        $class = ($DB_ROW['notification_statut']=='consultable') ? ' class="new"' : '' ;
        $datetime_affich = convert_datetime_mysql_to_french($DB_ROW['notification_date']);
        // Afficher une ligne du tableau
        echo'<tr id="id_'.$DB_ROW['notification_id'].'"'.$class.'>';
        echo  '<td>'.$datetime_affich.'</td>';
        echo  '<td>'.$DB_ROW['notification_statut'].'</td>';
        echo  '<td>'.$DB_ROW['abonnement_objet'].'</td>';
        echo  '<td class="i">'.html(afficher_texte_tronque($DB_ROW['notification_contenu'],60)).'</td>';
        echo  '<td class="nu">';
        echo    '<q class="voir" title="Consulter la notification complète."></q>';