d10f85e1a79c30e4412f2c46a267c30291d1e8e5
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');
16 include_spip('inc/acces'); // pour low_sec (iCal)
18 // http://doc.spip.org/@afficher_liens_calendrier
19 function afficher_liens_calendrier($lien, $icone, $texte) {
22 $charge = icone_horizontale_display(_T('ical_methode_http'), $lien, "calendrier-24.gif","", false);
23 $abonne = icone_horizontale_display (_T('ical_methode_webcal'), preg_replace("@https?://@", "webcal://", $lien), "calendrier-24.gif", "", false);
25 echo debut_cadre_enfonce($icone, true);
27 if ($spip_display == 4)
30 echo "<table style='width: 100%;'><tr><td style='width: 200px;'>";
33 echo "<td> </td>";
34 echo "<td style='width: 200px;'>";
36 echo "</td></tr></table>";
38 echo fin_cadre_enfonce(true);
41 // http://doc.spip.org/@exec_synchro_dist
42 function exec_synchro_dist()
44 ///// debut de la page
45 $commencer_page = charger_fonction('commencer_page', 'inc');
46 echo $commencer_page(_T("icone_suivi_activite"), "accueil", "synchro");
49 echo gros_titre(_T("icone_suivi_activite"),'', false);
51 echo debut_gauche('', true);
53 echo debut_boite_info(true);
55 echo "<div class='verdana2'>";
57 echo _T('ical_info1').'<br /><br />';
59 echo _T('ical_info2', array('spipnet' => $GLOBALS['home_server']
60 . '/' . $GLOBALS['spip_lang']
65 echo fin_boite_info(true);
67 $adresse_suivi_inscription=$GLOBALS['meta']["adresse_suivi_inscription"];
69 echo debut_droite('', true);
73 /// Suivi par mailing-list
76 if ($GLOBALS['meta']["suivi_edito"] == "oui" AND strlen($GLOBALS['meta']["adresse_suivi"]) > 3 AND strlen($adresse_suivi_inscription) > 3) {
77 echo debut_cadre_enfonce("racine-site-24.gif", true, "", _T('ical_titre_mailing'));
78 echo _T('info_config_suivi_explication'),
79 propre("<b style='text-align: center'>[->$adresse_suivi_inscription]</b>");
80 echo fin_cadre_enfonce(true);
85 /// Suivi par agenda iCal (taches + rendez-vous)
88 echo debut_cadre_relief("agenda-24.gif", true, "", _T('icone_calendrier'));
90 echo _T('calendrier_synchro');
91 echo '<p>'._T('ical_info_calendrier').'</p>';
93 $id_auteur = $GLOBALS['visiteur_session']['id_auteur'];
95 afficher_liens_calendrier(generer_url_public('ical'),'', _T('ical_texte_public'));
97 afficher_liens_calendrier(generer_url_public("ical_prive", "id_auteur=$id_auteur&arg=".afficher_low_sec($id_auteur,'ical')),'cadenas-24.gif', _T('ical_texte_prive'));
99 echo fin_cadre_relief(true);
105 echo debut_cadre_relief("site-24.gif", true, "", _T('ical_titre_rss'));
107 echo _T('ical_texte_rss');
109 echo "<p>"._T("ical_texte_rss_articles")."</p>";
111 echo propre("<cadre>" . generer_url_public('backend') . "</cadre>");
113 echo "<p>"._T("ical_texte_rss_articles2")."</p>";
115 $bouton = http_img_pack( 'feed.png', 'RSS', '');
117 $result = sql_allfetsel("id_rubrique, titre", "spip_rubriques", 'id_parent=0','', '0+titre,titre');
120 foreach($result as $row){
121 $h = generer_url_public('backend', "id_rubrique=" . $row['id_rubrique']);
122 $titre_rubrique = typo($row['titre']);
123 $titre = htmlspecialchars($titre_rubrique);
125 $res .= "\n<li><a href='$h' title=\"$titre\">$bouton $titre_rubrique</a></li>";
128 if ($res) echo "\n<ul>", $res, "\n</ul>";
130 if ($GLOBALS['meta']['activer_breves'] == "oui") {
132 echo "<p>"._T("ical_texte_rss_breves")."</p>";
133 echo "<ul><li><a href='",
134 generer_url_public('backend-breves', ""),
136 _T('ical_lien_rss_breves'),
139 ' ' . _T('ical_lien_rss_breves'),
144 echo fin_cadre_relief(true);
147 /// Suivi par Javascript
150 echo debut_cadre_relief("doc-24.gif", true, "", _T('ical_titre_js'));
152 echo _T('ical_texte_js').'<br />';
156 type="text/javascript"
157 src="'.generer_url_public('distrib').'">
161 echo fin_cadre_relief(true);
164 echo fin_gauche(), fin_page();