[SPIP] ~v3.0.20-->v3.0.25
[lhc/web/clavette_www.git] / www / ecrire / balise / url_logout.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2016 *
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 // http://doc.spip.org/@balise_URL_LOGOUT
16 function balise_URL_LOGOUT ($p) {return calculer_balise_dynamique($p,'URL_LOGOUT', array());
17 }
18
19 // $args[0] = url destination apres logout [(#URL_LOGOUT{url})]
20 // http://doc.spip.org/@balise_URL_LOGOUT_stat
21 function balise_URL_LOGOUT_stat ($args, $context_compil) {
22 $url = isset($args[0]) ? $args[0] : '';
23 return array($url);
24 }
25
26 // http://doc.spip.org/@balise_URL_LOGOUT_dyn
27 function balise_URL_LOGOUT_dyn($cible) {
28
29 if (!$GLOBALS['visiteur_session']['login'] AND !$GLOBALS['visiteur_session']['statut']) return '';
30
31 return generer_url_action('logout',"logout=public&url=" . rawurlencode($cible ? $cible : self('&')));
32 }
33 ?>