3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2014 *
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');
17 // http://doc.spip.org/@exec_mots_type_dist
18 function exec_mots_type_dist()
20 $id_groupe= intval(_request('id_groupe'));
23 $type = $titre = filtrer_entites(_T('titre_nouveau_groupe'));
26 $row = sql_fetsel("id_groupe,titre", "spip_groupes_mots", "id_groupe=$id_groupe");
28 $id_groupe = $row['id_groupe'];
29 $type = $row['titre'];
34 if (($id_groupe AND !$row) OR
35 !autoriser($id_groupe?
'modifier' : 'creer', 'groupemots', $id_groupe)) {
36 include_spip('inc/minipres');
40 pipeline('exec_init',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>''));
41 $commencer_page = charger_fonction('commencer_page', 'inc');
42 echo $commencer_page("« $titre »", "naviguer", "mots");
44 echo debut_gauche('', true);
46 echo pipeline('affiche_gauche',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>''));
47 echo creer_colonne_droite('', true);
48 echo pipeline('affiche_droite',array('args'=>array('exec'=>'mots_type','id_groupe'=>$id_groupe),'data'=>''));
49 echo debut_droite('', true);
52 'icone_retour'=>icone_inline(_T('icone_retour'), generer_url_ecrire("mots_tous") . "#mots_tous-$id_groupe", "groupe-mot-24.gif", "rien.gif",$GLOBALS['spip_lang_left']),
54 'redirect'=>generer_url_ecrire("mots_tous",""),
55 'new'=>_request('new') == "oui"?
"oui":$id_groupe,
56 'config_fonc'=>'groupes_mots_edit_config',
59 echo recuperer_fond("prive/editer/groupe_mot", $contexte);
61 echo pipeline('affiche_milieu',
62 array('args' => array(
63 'exec' => 'mots_type',
64 'id_groupe' => $id_groupe