[30] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /***************************************************************************\ |
---|
| 4 | * SPIP, Systeme de publication pour l'internet * |
---|
| 5 | * * |
---|
| 6 | * Copyright (c) 2001-2006 * |
---|
| 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 | include_spip('inc/presentation'); |
---|
| 16 | include_spip('base/agenda_evenements'); // si le plugin existe |
---|
| 17 | include_spip('base/pim_agenda'); // si le plugin existe |
---|
| 18 | |
---|
| 19 | function exec_mots_type_dist() |
---|
| 20 | { |
---|
| 21 | global $connect_statut, $descriptif, $id_groupe, $new, $options, $texte, $titre; |
---|
| 22 | global $tables_principales; |
---|
| 23 | |
---|
| 24 | $id_groupe= intval($id_groupe); |
---|
| 25 | |
---|
| 26 | if ($connect_statut == '0minirezo' AND $new == "oui") { |
---|
| 27 | $id_groupe = ''; |
---|
| 28 | $type = filtrer_entites(_T('titre_nouveau_groupe')); |
---|
| 29 | $onfocus = " onfocus=\"if(!antifocus){this.value='';antifocus=true;}\""; |
---|
| 30 | $ancien_type = ''; |
---|
| 31 | $unseul = 'non'; |
---|
| 32 | $obligatoire = 'non'; |
---|
| 33 | $articles = 'oui'; |
---|
| 34 | $breves = 'oui'; |
---|
| 35 | $rubriques = 'non'; |
---|
| 36 | $syndic = 'oui'; |
---|
| 37 | $evenements = 'non'; |
---|
| 38 | $pim_agenda = 'non'; |
---|
| 39 | $acces_minirezo = 'oui'; |
---|
| 40 | $acces_comite = 'oui'; |
---|
| 41 | $acces_forum = 'non'; |
---|
| 42 | } else { |
---|
| 43 | $result_groupes = spip_query("SELECT * FROM spip_groupes_mots WHERE id_groupe=$id_groupe"); |
---|
| 44 | |
---|
| 45 | while($row = spip_fetch_array($result_groupes)) { |
---|
| 46 | $id_groupe = $row['id_groupe']; |
---|
| 47 | $type = $row['titre']; |
---|
| 48 | $titre = typo($type); |
---|
| 49 | $descriptif = $row['descriptif']; |
---|
| 50 | $texte = $row['texte']; |
---|
| 51 | $unseul = $row['unseul']; |
---|
| 52 | $obligatoire = $row['obligatoire']; |
---|
| 53 | $articles = $row['articles']; |
---|
| 54 | $breves = $row['breves']; |
---|
| 55 | $rubriques = $row['rubriques']; |
---|
| 56 | $syndic = $row['syndic']; |
---|
| 57 | if (isset($row['evenements'])) |
---|
| 58 | $evenements = $row['evenements']; |
---|
| 59 | if (isset($row['pim_agenda'])) |
---|
| 60 | $pim_agenda = $row['pim_agenda']; |
---|
| 61 | $acces_minirezo = $row['minirezo']; |
---|
| 62 | $acces_comite = $row['comite']; |
---|
| 63 | $acces_forum = $row['forum']; |
---|
| 64 | $onfocus =""; |
---|
| 65 | $new = ''; |
---|
| 66 | } |
---|
| 67 | } |
---|
| 68 | |
---|
| 69 | debut_page("« $titre »", "documents", "mots"); |
---|
| 70 | |
---|
| 71 | debut_gauche(); |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | debut_droite(); |
---|
| 76 | |
---|
| 77 | debut_cadre_relief("groupe-mot-24.gif"); |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>"; |
---|
| 82 | echo "<tr width='100%'>"; |
---|
| 83 | |
---|
| 84 | echo "<td align='right' valign='top'>"; |
---|
| 85 | icone(_T('icone_retour'), generer_url_ecrire("mots_tous",""), "mot-cle-24.gif", "rien.gif"); |
---|
| 86 | echo "</td>"; |
---|
| 87 | echo "<td>". http_img_pack('rien.gif', " ", "width='5'") . "</td>\n"; |
---|
| 88 | |
---|
| 89 | echo "<td width='100%' valign='top'>"; |
---|
| 90 | echo "<font face='Verdana,Arial,Sans,sans-serif' size=1><b>"._T('titre_groupe_mots')."</b><br></font>"; |
---|
| 91 | gros_titre($titre); |
---|
| 92 | echo aide("motsgroupes"); |
---|
| 93 | |
---|
| 94 | if ($connect_statut =="0minirezo"){ |
---|
| 95 | $type=entites_html(rawurldecode($type)); |
---|
| 96 | echo "<p><font face='Verdana,Arial,Sans,sans-serif'>"; |
---|
| 97 | echo generer_url_post_ecrire("mots_tous", "id_groupe=$id_groupe"); |
---|
| 98 | echo "<input type='hidden' name='modifier_groupe' value='oui' />\n"; |
---|
| 99 | echo "<input type='hidden' name='new' value='$new' />\n"; |
---|
| 100 | debut_cadre_formulaire(); |
---|
| 101 | echo "<b>"._T('info_changer_nom_groupe')."</b><br />\n"; |
---|
| 102 | echo "<INPUT TYPE='Text' SIZE=40 CLASS='formo' NAME='change_type' VALUE=\"$type\" $onfocus />\n"; |
---|
| 103 | |
---|
| 104 | if ($options == 'avancees' OR $descriptif) { |
---|
| 105 | echo "<B>"._T('texte_descriptif_rapide')."</B><BR>"; |
---|
| 106 | echo "<TEXTAREA NAME='descriptif' CLASS='forml' ROWS='4' COLS='40' wrap=soft>"; |
---|
| 107 | echo entites_html($descriptif); |
---|
| 108 | echo "</TEXTAREA><P>\n"; |
---|
| 109 | } |
---|
| 110 | else |
---|
| 111 | echo "<INPUT TYPE='hidden' NAME='descriptif' VALUE=\"$descriptif\">"; |
---|
| 112 | |
---|
| 113 | if ($options == 'avancees' OR $texte) { |
---|
| 114 | echo "<B>"._T('info_texte_explicatif')."</B><BR>"; |
---|
| 115 | echo "<TEXTAREA NAME='texte' ROWS='8' CLASS='forml' COLS='40' wrap=soft>"; |
---|
| 116 | echo entites_html($texte); |
---|
| 117 | echo "</TEXTAREA><P>\n"; |
---|
| 118 | } |
---|
| 119 | else |
---|
| 120 | echo "<INPUT TYPE='hidden' NAME='texte' VALUE=\"$texte\">"; |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | echo "<p><div align='right'><INPUT TYPE='submit' CLASS='fondo' NAME='Valider' VALUE='"._T('bouton_valider')."'></div>"; |
---|
| 124 | fin_cadre_formulaire(); |
---|
| 125 | } |
---|
| 126 | |
---|
| 127 | |
---|
| 128 | echo "</td></tr></table>"; |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | fin_cadre_relief(); |
---|
| 133 | |
---|
| 134 | if ($connect_statut =="0minirezo"){ |
---|
| 135 | echo "<p>"; |
---|
| 136 | debut_cadre_formulaire(); |
---|
| 137 | echo "<div style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #dddddd;'>"; |
---|
| 138 | echo "<b>"._T('info_mots_cles_association')."</b>"; |
---|
| 139 | echo "<ul>"; |
---|
| 140 | |
---|
| 141 | if ($articles == "oui") $checked = "checked"; |
---|
| 142 | else $checked = ""; |
---|
| 143 | echo "<input type='checkbox' name='articles' value='oui' $checked id='articles'> <label for='articles'>"._T('item_mots_cles_association_articles')."</label><br>"; |
---|
| 144 | $activer_breves = $GLOBALS['meta']["activer_breves"]; |
---|
| 145 | if ($activer_breves != "non"){ |
---|
| 146 | if ($breves == "oui") $checked = "checked"; |
---|
| 147 | else $checked = ""; |
---|
| 148 | echo "<input type='checkbox' name='breves' value='oui' $checked id='breves'> <label for='breves'>"._T('item_mots_cles_association_breves')."</label><br>"; |
---|
| 149 | } else { |
---|
| 150 | echo "<input type='hidden' name='breves' value='non'>"; |
---|
| 151 | } |
---|
| 152 | if ($rubriques == "oui") $checked = "checked"; |
---|
| 153 | else $checked = ""; |
---|
| 154 | echo "<input type='checkbox' name='rubriques' value='oui' $checked id='rubriques'> <label for='rubriques'>"._T('item_mots_cles_association_rubriques')."</label><br>"; |
---|
| 155 | if ($syndic == "oui") $checked = "checked"; |
---|
| 156 | else $checked = ""; |
---|
| 157 | echo "<input type='checkbox' name='syndic' value='oui' $checked id='syndic'> <label for='syndic'>"._T('item_mots_cles_association_sites')."</label>"; |
---|
| 158 | |
---|
| 159 | if (isset($tables_principales['spip_evenements'])){ |
---|
| 160 | echo "<br>"; |
---|
| 161 | if ($evenements == "oui") $checked = "checked"; |
---|
| 162 | else $checked = ""; |
---|
| 163 | echo "<input type='checkbox' name='evenements' value='oui' $checked id='evenements'> <label for='evenements'>"._T('agenda:item_mots_cles_association_evenements')."</label>"; |
---|
| 164 | } |
---|
| 165 | if (isset($tables_principales['spip_pim_agenda'])){ |
---|
| 166 | echo "<br>"; |
---|
| 167 | if ($pim_agenda == "oui") $checked = "checked"; |
---|
| 168 | else $checked = ""; |
---|
| 169 | echo "<input type='checkbox' name='pim_agenda' value='oui' $checked id='pim_agenda'> <label for='pim_agenda'>"._T('pimagenda:item_mots_cles_association_evenements')."</label>"; |
---|
| 170 | } |
---|
| 171 | |
---|
| 172 | echo "</ul>"; |
---|
| 173 | echo "</div>"; |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | $config_precise_groupes = $GLOBALS['meta']["config_precise_groupes"]; |
---|
| 177 | if ($config_precise_groupes == "oui" OR $unseul == "oui" OR $obligatoire == "oui"){ |
---|
| 178 | echo "<p><div style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #dddddd;'>"; |
---|
| 179 | |
---|
| 180 | if ($unseul == "oui") |
---|
| 181 | $checked = "checked"; |
---|
| 182 | else |
---|
| 183 | $checked = ""; |
---|
| 184 | echo "<input type='checkbox' name='unseul' value='oui' $checked id='unseul'> <label for='unseul'>"._T('info_selection_un_seul_mot_cle')."</label>"; |
---|
| 185 | echo "<br>"; |
---|
| 186 | |
---|
| 187 | if ($obligatoire == "oui") |
---|
| 188 | $checked = "checked"; |
---|
| 189 | else $checked = ""; |
---|
| 190 | echo "<input type='checkbox' name='obligatoire' value='oui' $checked id='obligatoire'> <label for='obligatoire'>"._T('avis_conseil_selection_mot_cle')."</label>"; |
---|
| 191 | |
---|
| 192 | echo "</div>"; |
---|
| 193 | } else { |
---|
| 194 | echo "<input type='hidden' name='unseul' value='non'>"; |
---|
| 195 | echo "<input type='hidden' name='obligatoire' value='non'>"; |
---|
| 196 | } |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | echo "<p>"; |
---|
| 201 | echo "<div style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #dddddd;'>"; |
---|
| 202 | echo "<b>"._T('info_qui_attribue_mot_cle')."</b>"; |
---|
| 203 | echo "<ul>"; |
---|
| 204 | |
---|
| 205 | if ($acces_minirezo == "oui") $checked = "checked"; |
---|
| 206 | else $checked = ""; |
---|
| 207 | echo "<input type='checkbox' name='acces_minirezo' value='oui' $checked id='administrateurs'> <label for='administrateurs'>"._T('bouton_checkbox_qui_attribue_mot_cle_administrateurs')."</label><br>"; |
---|
| 208 | if ($acces_comite == "oui") $checked = "checked"; |
---|
| 209 | else $checked = ""; |
---|
| 210 | echo "<input type='checkbox' name='acces_comite' value='oui' $checked id='comite'> <label for='comite'>"._T('bouton_checkbox_qui_attribue_mot_cle_redacteurs')."</label><br>"; |
---|
| 211 | |
---|
| 212 | $mots_cles_forums = $GLOBALS['meta']["mots_cles_forums"]; |
---|
| 213 | $forums_publics=$GLOBALS['meta']["forums_publics"]; |
---|
| 214 | |
---|
| 215 | if (($mots_cles_forums == "oui" OR $acces_forum == "oui") AND $forums_publics != "non"){ |
---|
| 216 | if ($acces_forum == "oui") $checked = "checked"; |
---|
| 217 | else $checked = ""; |
---|
| 218 | echo "<input type='checkbox' name='acces_forum' value='oui' $checked id='forum'> <label for='forum'>"._T('bouton_checkbox_qui_attribue_mot_cle_visiteurs')."</label>"; |
---|
| 219 | } |
---|
| 220 | else { |
---|
| 221 | echo "<input type='hidden' name='acces_forum' value='non'>"; |
---|
| 222 | } |
---|
| 223 | |
---|
| 224 | echo "</ul>"; |
---|
| 225 | echo "</div>"; |
---|
| 226 | |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | echo "<p><div align='right'><INPUT TYPE='submit' CLASS='fondo' NAME='Valider' VALUE='"._T('bouton_valider')."'></div>"; |
---|
| 231 | echo "</FORM><P>"; |
---|
| 232 | fin_cadre_formulaire(); |
---|
| 233 | echo "</font>"; |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | }else{ |
---|
| 237 | |
---|
| 238 | echo "<H3>"._T('avis_non_acces_page')."</H3>"; |
---|
| 239 | |
---|
| 240 | } |
---|
| 241 | |
---|
| 242 | |
---|
| 243 | fin_page(); |
---|
| 244 | } |
---|
| 245 | |
---|
| 246 | ?> |
---|