[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / sites / puce_statut / site.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")) {
14 return;
15 }
16
17
18 // https://code.spip.net/@puce_statut_site_dist
19 function puce_statut_site_dist($id, $statut, $id_rubrique, $type, $ajax = '', $menu_rapide = _ACTIVER_PUCE_RAPIDE) {
20
21 $t = sql_getfetsel("syndication", "spip_syndic", "id_syndic=" . intval($id));
22
23 // cas particulier des sites en panne de syndic :
24 // on envoi une puce speciale, et pas de menu de changement rapide
25 if ($t == 'off' or $t == 'sus') {
26 switch ($statut) {
27 case 'publie':
28 $puce = 'puce-verte-anim.gif';
29 $title = _T('sites:info_site_reference');
30 break;
31 case 'prop':
32 $puce = 'puce-orange-anim.gif';
33 $title = _T('sites:info_site_attente');
34 break;
35 case 'refuse':
36 default:
37 $puce = 'puce-poubelle-anim.gif';
38 $title = _T('sites:info_site_refuse');
39 break;
40 }
41
42 return http_img_pack($puce, $title);
43 } else {
44 return puce_statut_changement_rapide($id, $statut, $id_rubrique, $type, $ajax, $menu_rapide);
45 }
46 }