| [ Index ] |
|
Code source de SPIP 1.9.2c |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2007 * 7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * 8 * * 9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * 10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * 11 \***************************************************************************/ 12 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 15 include_spip('inc/presentation'); 16 17 // http://doc.spip.org/@exec_documents_liste_dist 18 function exec_documents_liste_dist() 19 { 20 21 // 22 // Recupere les donnees 23 // 24 25 $commencer_page = charger_fonction('commencer_page', 'inc'); 26 echo $commencer_page(_T('titre_page_documents_liste'), "naviguer", "documents"); 27 debut_gauche(); 28 29 30 ////////////////////////////////////////////////////// 31 // Boite "voir en ligne" 32 // 33 34 debut_boite_info(); 35 36 echo propre(_T('texte_recapitiule_liste_documents')); 37 38 fin_boite_info(); 39 40 41 42 debut_droite(); 43 44 // recupere les types 45 $res = spip_query("SELECT * FROM spip_types_documents"); 46 while ($row = spip_fetch_array($res)) 47 $types[$row['id_type']] = $row; 48 49 $result = spip_query("SELECT docs.id_document AS id_doc, docs.id_type AS type, docs.fichier AS fichier, docs.date AS date, docs.titre AS titre, docs.descriptif AS descriptif, lien.id_rubrique AS id_rub, rubrique.titre AS titre_rub FROM spip_documents AS docs, spip_documents_rubriques AS lien, spip_rubriques AS rubrique WHERE docs.id_document = lien.id_document AND rubrique.id_rubrique = lien.id_rubrique AND docs.mode = 'document' ORDER BY docs.date DESC"); 50 51 while($row=spip_fetch_array($result)){ 52 $titre=$row['titre']; 53 $descriptif=$row['descriptif']; 54 $date=$row['date']; 55 $id_document=$row['id_doc']; 56 $id_rubrique=$row['id_rub']; 57 $titre_rub = typo($row['titre_rub']); 58 $fichier = $row['fichier']; 59 60 if (!$titre) $titre = _T('info_document').' '.$id_document; 61 62 debut_cadre_relief("doc-24.gif"); 63 echo "<b>$titre</b> (" . $types[$row['type']]['titre'] . ', ' . affdate($date) . ")"; 64 if ($descriptif) 65 echo "<p>".propre($descriptif) . '</p>'; 66 else 67 echo "<p><tt>$fichier</tt>" . '</p>'; 68 69 echo "<p>"._T('info_dans_rubrique')." <a href='" . generer_url_ecrire("naviguer","id_rubrique=$id_rubrique") . "'>$titre_rub</a></p>"; 70 71 fin_cadre_relief(); 72 } 73 74 75 echo fin_gauche(), fin_page(); 76 } 77 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Wed Nov 21 10:20:27 2007 | par Balluche grâce à PHPXref 0.7 |
|