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