e04c1e55ec503c16b42703b0c3b05886c306b038
[velocampus/web/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-2011 *
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 return array($args[0]);
23 }
24
25 // http://doc.spip.org/@balise_URL_LOGOUT_dyn
26 function balise_URL_LOGOUT_dyn($cible) {
27
28 if (!$GLOBALS['visiteur_session']['login']) return '';
29
30 return generer_url_action('logout',"logout=public&url=" . rawurlencode($cible ? $cible : self('&')));
31 }
32 ?>