[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 include ("inc.php"); 20 /* 21 -------------Ajout Clever Age abstraction BD--------- 22 */ 23 require_once (dirname(__FILE__). "/include/bd/inc_groupe_mot_factory.php"); 24 /* 25 ----------------fin zone d'ajout--------------------- 26 */ 27 28 //-----------MODIFICATION CLEVER AGE elebescond@clever-age.com---------- 29 $authorization = &recuperer_instance_authorization('creerGroupeMot', $GLOBALS['connect_id_auteur']); 30 31 if ($new == 'oui') { 32 if ($authorization->isAuthorizedAction()) { 33 $id_groupe = ''; 34 $type = filtrer_entites(_T('titre_nouveau_groupe')); 35 $ancien_type = ''; 36 $unseul = 'non'; 37 $obligatoire = 'non'; 38 $articles = 'oui'; 39 $breves = 'oui'; 40 $rubriques = 'non'; 41 $syndic = 'oui'; 42 $auteurs = 'non'; 43 //---------- modification elebescond@clever-age.com ------------------ 44 $acces_administrateur = 'oui'; 45 $acces_webmestre = 'oui'; 46 $acces_redacteur_en_chef = 'oui'; 47 $acces_redacteur = 'oui'; 48 /* 49 $acces_minirezo = 'oui'; 50 $acces_comite = 'oui'; 51 */ 52 //---------- Fin modification elebescond@clever-age.com -------------- 53 $acces_forum = 'non'; 54 } 55 else { 56 echo _T('avis_acces_interdit'); 57 exit; 58 } 59 } 60 else { 61 $authorization = &recuperer_instance_authorization('modifierGroupeMot', $GLOBALS['connect_id_auteur']); 62 if ($authorization->isAuthorizedAction()) { 63 $groupeMotMetier = &recuperer_instance_groupe_mot(); 64 $loadOK = $groupeMotMetier->load($id_groupe); 65 if (PEAR::isError($loadOK)) { 66 die ($loadOK->getMessage()); 67 } 68 else { 69 $id_groupe = $groupeMotMetier->getGroupeId(); 70 $type = entites_html($groupeMotMetier->getTitre()); 71 $ancien_type = $type; 72 $unseul = $groupeMotMetier->getUnSeul(); 73 $obligatoire = $groupeMotMetier->getObligatoire(); 74 $articles = $groupeMotMetier->getArticles(); 75 $breves = $groupeMotMetier->getBreves(); 76 $rubriques = $groupeMotMetier->getRubriques(); 77 $syndic = $groupeMotMetier->getSyndic(); 78 $auteurs = $groupeMotMetier->getAuteurs(); 79 //---------- modification elebescond@clever-age.com ------------------ 80 $profilMetier = &recuperer_instance_profil(); 81 $monProfil = $profilMetier->getProfilForIntitule('item_administrateur'); 82 83 if ($groupeMotMetier->isManagedByProfil($monProfil->getPoids())) { 84 $acces_administrateur = 'oui'; 85 } 86 87 $monProfil = $profilMetier->getProfilForIntitule('item_webmestre'); 88 89 if ($groupeMotMetier->isManagedByProfil($monProfil->getPoids())) { 90 $acces_webmestre = 'oui'; 91 } 92 93 $monProfil = $profilMetier->getProfilForIntitule('item_redacteur_en_chef'); 94 95 if ($groupeMotMetier->isManagedByProfil($monProfil->getPoids())) { 96 $acces_redacteur_en_chef = 'oui'; 97 } 98 99 $monProfil = $profilMetier->getProfilForIntitule('item_redacteur'); 100 101 if ($groupeMotMetier->isManagedByProfil($monProfil->getPoids())) { 102 $acces_redacteur = 'oui'; 103 } 104 105 $monProfil = $profilMetier->getProfilForIntitule('item_non_abonne'); 106 107 if ($groupeMotMetier->isManagedByProfil($monProfil->getPoids())) { 108 $acces_non_abonne = 'oui'; 109 } 110 $acces_forum = $groupeMotMetier->getForum(); 111 } 112 } 113 else { 114 echo _T('avis_acces_interdit'); 115 exit; 116 } 117 } 118 119 debut_page("« $type »", "documents", "mots"); 120 121 debut_gauche(); 122 123 debut_droite(); 124 125 debut_cadre_relief ("groupe-mot-24.gif"); 126 127 echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>"; 128 echo "<tr width='100%'>"; 129 130 echo "<td align='right' valign='top'>"; 131 icone(_T('icone_retour'), "mots_tous.php", "mot-cle-24.gif", "rien.gif"); 132 echo "</td>"; 133 echo "<td><img src='img_pack/rien.gif' width=5></td>\n"; 134 135 echo "<td width='100%' valign='top'>"; 136 echo "<font face='Verdana,Arial,Sans,sans-serif' size=1><b>" . _T('titre_groupe_mots'). "</b><br></font>"; 137 gros_titre ($type); 138 echo aide("motsgroupes"); 139 140 //-----------MODIFICATION CLEVER AGE elebescond@clever-age.com---------- 141 $authorization = &recuperer_instance_authorization('modifierGroupeMot', $GLOBALS['connect_id_auteur']); 142 143 if ($authorization->isAuthorizedAction()) { 144 /* 145 if ($connect_statut =="minirezo"){ 146 */ 147 //-----------FIN MODIFICATION CLEVER AGE elebescond@clever-age.com---------- 148 149 $type = entites_html(urldecode($type)); 150 echo "<p><font face='Verdana,Arial,Sans,sans-serif'>"; 151 echo "<FORM ACTION='mots_tous.php' METHOD='post'>\n"; 152 echo "<INPUT TYPE='Hidden' NAME='modifier_groupe' VALUE=\"oui\">\n"; 153 echo "<INPUT TYPE='Hidden' NAME='id_groupe' VALUE=\"$id_groupe\">\n"; 154 echo "<INPUT TYPE='Hidden' NAME='ancien_type' VALUE=\"$ancien_type\">\n"; 155 debut_cadre_formulaire(); 156 echo "<b>" . _T('info_changer_nom_groupe'). "</b><br>\n"; 157 echo "<INPUT TYPE='Text' SIZE=40 CLASS='formo' NAME='change_type' VALUE=\"$type\">\n"; 158 echo "<p><div align='right'><INPUT TYPE='submit' CLASS='fondo' NAME='Valider' VALUE='" . _T('bouton_valider'). "'></div>"; 159 fin_cadre_formulaire(); 160 } 161 162 echo "</td></tr></table>"; 163 164 fin_cadre_relief(); 165 //-----------MODIFICATION CLEVER AGE elebescond@clever-age.com---------- 166 $authorization = &recuperer_instance_authorization('modifierGroupeMot', $GLOBALS['connect_id_auteur']); 167 168 if ($authorization->isAuthorizedAction()) { 169 /* 170 if ($connect_statut =="minirezo"){ 171 */ 172 //-----------FIN MODIFICATION CLEVER AGE elebescond@clever-age.com---------- 173 echo "<p>"; 174 debut_cadre_formulaire(); 175 echo "<div style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #dddddd;'>"; 176 echo "<b>" . _T('info_mots_cles_association'). "</b>"; 177 echo "<ul>"; 178 179 if ($articles == "oui") 180 $checked = "checked"; 181 else 182 $checked = ""; 183 184 echo "<input type='checkbox' name='articles' value='oui' $checked id='articles'> <label for='articles'>" . _T('item_mots_cles_association_articles'). "</label><br>"; 185 $activer_breves = lire_meta("activer_breves"); 186 187 if ($activer_breves != "non") { 188 if ($breves == "oui") 189 $checked = "checked"; 190 else 191 $checked = ""; 192 echo "<input type='checkbox' name='breves' value='oui' $checked id='breves'> <label for='breves'>" . _T('item_mots_cles_association_breves'). "</label><br>"; 193 } 194 else { 195 echo "<input type='hidden' name='breves' value='non'>"; 196 } 197 198 if ($rubriques == "oui") 199 $checked = "checked"; 200 else 201 $checked = ""; 202 203 echo "<input type='checkbox' name='rubriques' value='oui' $checked id='rubriques'> <label for='rubriques'>" . _T('item_mots_cles_association_rubriques'). "</label><br>"; 204 205 if ($syndic == "oui") 206 $checked = "checked"; 207 else 208 $checked = ""; 209 210 echo "<input type='checkbox' name='syndic' value='oui' $checked id='syndic'> <label for='syndic'>" . _T('item_mots_cles_association_sites'). "</label><br>"; 211 212 if ($auteurs == "oui") 213 $checked = "checked"; 214 else 215 $checked = ""; 216 217 echo "<input type='checkbox' name='auteurs' value='oui' $checked id='auteurs'> <label for='auteurs'>" . _T('item_mots_cles_association_auteurs'). "</label>"; 218 219 echo "</ul>"; 220 echo "</div>"; 221 222 $config_precise_groupes = lire_meta("config_precise_groupes"); 223 224 if ($config_precise_groupes == "oui" OR $unseul == "oui" OR $obligatoire == "oui") { 225 echo "<p><div style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #dddddd;'>"; 226 227 if ($unseul == "oui") 228 $checked = "checked"; 229 else 230 $checked = ""; 231 232 echo "<input type='checkbox' name='unseul' value='oui' $checked id='unseul'> <label for='unseul'>" . _T('info_selection_un_seul_mot_cle'). "</label>"; 233 echo "<br>"; 234 235 if ($obligatoire == "oui") 236 $checked = "checked"; 237 else 238 $checked = ""; 239 240 echo "<input type='checkbox' name='obligatoire' value='oui' $checked id='obligatoire'> <label for='obligatoire'>" . _T('avis_conseil_selection_mot_cle'). "</label>"; 241 242 echo "</div>"; 243 } 244 else { 245 echo "<input type='hidden' name='unseul' value='non'>"; 246 echo "<input type='hidden' name='obligatoire' value='non'>"; 247 } 248 249 //------------ Modification elebescond@clever-age.com 250 echo "<p>"; 251 echo "<div style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #dddddd;'>"; 252 echo "<b>" . _T('info_qui_attribue_mot_cle'). "</b>"; 253 echo "<ul>"; 254 255 $profilMetier = &recuperer_instance_profil(); 256 $monProfil = $profilMetier->getProfilForIntitule('item_administrateur'); 257 258 //echo $groupeMotMetier->isManagedByProfil($monProfil->getPoids()); 259 if ($acces_administrateur == 'oui') 260 $checked = "checked"; 261 else 262 $checked = ""; 263 264 echo "<input type='checkbox' name='acces_administrateur' value='oui' $checked id='administrateurs'> <label for='administrateurs'>" . _T('bouton_checkbox_qui_attribue_mot_cle_administrateurs'). "</label><br>"; 265 266 $monProfil = $profilMetier->getProfilForIntitule('item_webmestre'); 267 268 //echo $groupeMotMetier->isManagedByProfil($monProfil->getPoids()); 269 if ($acces_webmestre == 'oui') 270 $checked = "checked"; 271 else 272 $checked = ""; 273 274 echo "<input type='checkbox' name='acces_webmestre' value='oui' $checked id='webmestre'> <label for='webmestre'>" . _T('bouton_checkbox_qui_attribue_mot_cle_webmestres'). "</label><br>"; 275 276 $monProfil = $profilMetier->getProfilForIntitule('item_redacteur_en_chef'); 277 278 if ($acces_redacteur_en_chef == 'oui') 279 $checked = "checked"; 280 else 281 $checked = ""; 282 283 echo "<input type='checkbox' name='acces_redacteur_en_chef' value='oui' $checked id='redacteur_en_chef'> <label for='redacteur_en_chef'>" . _T('bouton_checkbox_qui_attribue_mot_cle_redacteurs_en_chef'). "</label><br>"; 284 285 $monProfil = $profilMetier->getProfilForIntitule('item_redacteur'); 286 287 if ($acces_redacteur == 'oui') 288 $checked = "checked"; 289 else 290 $checked = ""; 291 292 echo "<input type='checkbox' name='acces_redacteur' value='oui' $checked id='redacteur'> <label for='redacteur'>" . _T('bouton_checkbox_qui_attribue_mot_cle_redacteurs'). "</label><br>"; 293 294 $monProfil = $profilMetier->getProfilForIntitule('item_non_abonne'); 295 296 if ($acces_non_abonne == 'oui') 297 $checked = "checked"; 298 else 299 $checked = ""; 300 301 echo "<input type='checkbox' name='acces_non_abonne' value='oui' $checked id='non_abonne'> <label for='non_abonne'>" . _T('bouton_checkbox_qui_attribue_mot_cle_non_abonne'). "</label><br>"; 302 303 $mots_cles_forums = lire_meta("mots_cles_forums"); 304 $forums_publics = lire_meta("forums_publics"); 305 306 if (($mots_cles_forums == "oui" OR $acces_forum == "oui")AND $forums_publics != "non") { 307 if ($acces_forum == "oui") 308 $checked = "checked"; 309 else 310 $checked = ""; 311 echo "<input type='checkbox' name='acces_forum' value='oui' $checked id='forum'> <label for='forum'>" . _T('bouton_checkbox_qui_attribue_mot_cle_visiteurs'). "</label>"; 312 } 313 else { 314 echo "<input type='hidden' name='acces_forum' value='non'>"; 315 } 316 317 echo "</ul>"; 318 echo "</div>"; 319 echo "<p><div align='right'><INPUT TYPE='submit' CLASS='fondo' NAME='Valider' VALUE='" . _T('bouton_valider'). "'></div>"; 320 echo "</FORM><P>"; 321 fin_cadre_formulaire(); 322 echo "</font>"; 323 } 324 else { 325 echo "<H3>" . _T('avis_non_acces_page'). "</H3>"; 326 } 327 328 fin_page(); 329 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |