foreach ($critereLib as $nom => $critere) { echo '<label>', $critere, " : "; htmlSelect("cri_{$nom}", $ref->getEntriesList($nom), $contraintes["cri_{$nom}"], '', false, 'none', '-- tous --'); echo "</label>\n"; } ?> <input type="submit" value="Filtrer" name="filtrer" id="filtrer" /> </fieldset> </form> <?php /* On affiche la liste des articles */ $am = new DocumentManager($db); $infosPages = array(); $listeArticles = $am->getListPage($contraintes, $infosPages); if (count($listeArticles) == 0) { echo '<p>Aucun document ne correspond à ces critères.</p>', "\n"; exit; } // affichage des articles echo '<table class="tableliste">', "\n"; echo '<caption>Liste des documents — page ', $infosPages['pagecour'], '/', $infosPages['totalpage'], '</caption>', "\n"; echo "<thead>\n <tr><th>Numéro</th>\n <th>Document</th>\n <th>Auteur</th>\n <th>Utilisateur</th>\n <th>État</th></tr>\n</thead>\n<tbody>\n"; $i = ($infosPages['pagecour'] - 1) * $am->nbParPage; foreach ($listeArticles as $art) { echo '<tr><td>', ++$i, '</td><td><a href="document_details.php?id=', $art['id'], '">', $art['titre'], '</a></td>'; echo '<td>', $art['doc_auteurs'], '</td>'; echo '<td>', $art['prenom'], ' ', $art['nom'], '</td>'; echo '<td>', $statusLib[intval($art['etat'])], '</td>'; echo '</tr>';
require_once PATH_INC_BACKEND_SERVICE . 'DocumentManager.class.php'; require_once PATH_INC_BACKEND_SERVICE . 'ReferenceManager.class.php'; echo html_liste_actions(); $user = $_SESSION['utilisateur']; echo "<p>Bienvenue ", $user['uti_prenom'], " ", $user['uti_nom'], "</p>\n"; ?> <h2>Tableau de bord</h2> <?php $am = new DocumentManager($db); $ref = new ReferenceManager($db); $statusLib = $ref->getStatusList(); $am->nbLigneParPage = -1; $infosPages = array(); $listeArticles = $am->getListPage(array('uti' => $user['uti_id']), $infosPages); if (count($listeArticles) > 0) { ?> <table class="tableliste"> <caption>Liste de vos documents</caption> <thead> <tr><th>Document</th><th>État</th></tr> </thead> <tbody> <?php foreach ($listeArticles as $art) { echo '<tr><td><a href="document_details.php?id=', $art['id'], '">', $art['titre'], '</a></td><td>', $statusLib[intval($art['etat'])], '</td>'; } ?> </tbody> </table>