[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / exec / sites_tous.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2014 *
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_sites_tous_dist
18 function exec_sites_tous_dist()
19 {
20 global $connect_statut,$spip_lang_right;
21
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);
30
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"));
32
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"));
34
35 echo afficher_objets('site','<b>' . _T('titre_sites_proposes') . '</b>', array("FROM" => 'spip_syndic', 'WHERE' => "statut='prop'", 'ORDER BY' => "nom_site"));
36
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>";
41 }
42
43 echo pipeline('affiche_milieu',array('args'=>array('exec'=>'sites_tous'),'data'=>''));
44
45
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"));
47
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"));
50 }
51
52 echo afficher_objets('syndic_article','<b>' . _T('titre_dernier_article_syndique') . '</b>', array('FROM' => 'spip_syndic_articles', 'ORDER BY' => "date DESC"));
53
54 echo fin_gauche(), fin_page();
55 }
56
57 ?>