3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
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 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 include_spip('inc/presentation');
17 // http://doc.spip.org/@exec_sites_tous_dist
18 function exec_sites_tous_dist()
20 global $connect_statut,$spip_lang_right;
22 pipeline('exec_init',array('args'=>array('exec'=>'sites_tous'),'data'=>''));
23 $commencer_page = charger_fonction('commencer_page', 'inc');
24 echo $commencer_page(_T('titre_page_sites_tous'),"naviguer","sites");
25 echo debut_gauche('', true);
26 echo pipeline('affiche_gauche',array('args'=>array('exec'=>'sites_tous'),'data'=>''));
27 echo creer_colonne_droite('', true);
28 echo pipeline('affiche_droite',array('args'=>array('exec'=>'sites_tous'),'data'=>''));
29 echo debut_droite('', true);
31 echo afficher_objets('site','<b>' . _T('titre_sites_tous') . '</b>', array("FROM" => 'spip_syndic', 'WHERE' => "syndication='non' AND statut='publie'", 'ORDER BY'=> "nom_site"));
33 echo afficher_objets('site','<b>' . _T('titre_sites_syndiques') . '</b>', array('FROM' => 'spip_syndic', 'WHERE' => "(syndication='oui' OR syndication='sus') AND statut='publie'", 'ORDER BY' => "nom_site"));
35 echo afficher_objets('site','<b>' . _T('titre_sites_proposes') . '</b>', array("FROM" => 'spip_syndic', 'WHERE' => "statut='prop'", 'ORDER BY' => "nom_site"));
37 if ($connect_statut == '0minirezo' OR $GLOBALS['meta']["proposer_sites"] > 0) {
38 echo "<div style='float:$spip_lang_right'>",
39 icone_inline(_T('icone_referencer_nouveau_site'), generer_url_ecrire('sites_edit'), "site-24.gif", "creer.gif", 'right'),
40 "</div><div class='nettoyeur'></div>";
43 echo pipeline('affiche_milieu',array('args'=>array('exec'=>'sites_tous'),'data'=>''));
46 echo afficher_objets('site','<b>' . _T('avis_sites_probleme_syndication') . '</b>', array("FROM" => 'spip_syndic', 'WHERE' => "syndication='off' AND statut='publie'", 'ORDER BY' => "nom_site"));
48 if ($connect_statut == '0minirezo') {
49 echo afficher_objets('site','<b>' . _T('info_sites_refuses') . '</b>', array("FROM" => 'spip_syndic', 'WHERE' => "statut='refuse'", 'ORDER BY' => "nom_site"));
52 echo afficher_objets('syndic_article','<b>' . _T('titre_dernier_article_syndique') . '</b>', array('FROM' => 'spip_syndic_articles', 'ORDER BY' => "date DESC"));
54 echo fin_gauche(), fin_page();