示例#1
0
<hr />

<table id="table_action" class="form hsort">
  <thead>
    <tr>
      <th>Date début</th>
      <th>Date fin</th>
      <th>Destinataires</th>
      <th>Contenu</th>
      <th class="nu"><q class="ajouter" title="Ajouter un message."></q></th>
    </tr>
  </thead>
  <tbody>
    <?php
    // Lister les messages dont le user est l'auteur
    $DB_TAB = DB_STRUCTURE_MESSAGE::DB_lister_messages_for_user_auteur($_SESSION['USER_ID']);
    if(!empty($DB_TAB))
    {
      Layout::add( 'js_inline_before' , '// <![CDATA[' );
      foreach($DB_TAB as $DB_ROW)
      {
        $date_debut_affich = convert_date_mysql_to_french($DB_ROW['message_debut_date']);
        $date_fin_affich   = convert_date_mysql_to_french($DB_ROW['message_fin_date']);
        $destinataires_nombre = ($DB_ROW['destinataires_nombre']>1) ? $DB_ROW['destinataires_nombre'].' sélections' : $DB_ROW['destinataires_nombre'].' sélection' ;
        echo'<tr id="id_'.$DB_ROW['message_id'].'">';
        echo  '<td>'.$date_debut_affich.'</td>';
        echo  '<td>'.$date_fin_affich.'</td>';
        echo  '<td>'.$destinataires_nombre.'</td>';
        echo  '<td>'.html(afficher_texte_tronque($DB_ROW['message_contenu'],60)).'</td>';
        echo  '<td class="nu">';
        echo    '<q class="modifier" title="Modifier ce message."></q>';