[ Index ] |
|
Code source de SPIP 1.9.2c |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2007 * 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('inc/rubriques'); 17 include_spip('inc/config'); 18 19 // http://doc.spip.org/@exec_config_multilang_dist 20 function exec_config_multilang_dist() 21 { 22 global $connect_statut, $connect_toutes_rubriques, $couleur_foncee, $spip_lang_right, $changer_config; 23 24 lire_metas(); 25 26 pipeline('exec_init',array('args'=>array('exec'=>'config_multilang'),'data'=>'')); 27 $commencer_page = charger_fonction('commencer_page', 'inc'); 28 echo $commencer_page(_T('titre_page_config_contenu'), "configuration", "langues"); 29 30 echo "<br /><br /><br />"; 31 gros_titre(_T('info_langues')); 32 33 34 if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) { 35 echo _T('avis_non_acces_page'); 36 echo fin_gauche(), fin_page(); 37 exit; 38 } 39 40 init_config(); 41 if ($changer_config == 'oui') { 42 appliquer_modifs_config(); 43 calculer_langues_rubriques(); 44 } 45 46 47 echo barre_onglets("config_lang", "multi"); 48 49 debut_gauche(); 50 51 52 echo pipeline('affiche_gauche',array('args'=>array('exec'=>'config_multilang'),'data'=>'')); 53 creer_colonne_droite(); 54 echo pipeline('affiche_droite',array('args'=>array('exec'=>'config_multilang'),'data'=>'')); 55 debut_droite(); 56 57 echo generer_url_post_ecrire('config_multilang'); 58 echo "<input type='hidden' name='changer_config' value='oui' />"; 59 60 debut_cadre_couleur("traductions-24.gif", false, "", _T('info_multilinguisme')); 61 echo "<p>"._T('texte_multilinguisme')."</p>"; 62 63 echo "<div>"; 64 echo _T('info_multi_articles'); 65 echo "<div style='text-align: $spip_lang_right;'>"; 66 echo afficher_choix('multi_articles', $GLOBALS['meta']['multi_articles'], 67 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " "); 68 echo "</div>"; 69 echo "</div>"; 70 71 echo "<div>"; 72 echo _T('info_multi_rubriques'); 73 echo "<div style='text-align: $spip_lang_right;'>"; 74 echo afficher_choix('multi_rubriques', $GLOBALS['meta']['multi_rubriques'], 75 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " "); 76 echo "</div>"; 77 echo "</div>"; 78 79 if ($GLOBALS['meta']['multi_rubriques'] == 'oui') { 80 echo "\n<div>"; 81 echo _T('info_multi_secteurs'); 82 echo "<div style='text-align: $spip_lang_right;'>"; 83 echo afficher_choix('multi_secteurs', $GLOBALS['meta']['multi_secteurs'], 84 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " "); 85 echo "</div>"; 86 echo "</div>"; 87 } else 88 echo "<input type='hidden' name='multi_secteurs' value='".$GLOBALS['meta']['multi_secteurs']."' />"; 89 90 if (($GLOBALS['meta']['multi_rubriques'] == 'oui') OR ($GLOBALS['meta']['multi_articles'] == 'oui')) { 91 echo "<hr />"; 92 echo "<p>"._T('texte_multilinguisme_trad')."</p>"; 93 94 echo _T('info_gerer_trad'); 95 echo "<div style='text-align: $spip_lang_right;'>"; 96 echo afficher_choix('gerer_trad', $GLOBALS['meta']['gerer_trad'], 97 array('oui' => _T('item_oui'), 'non' => _T('item_non')), " "); 98 echo "</div>"; 99 } else 100 echo "<input type='hidden' name='gerer_trad' value='".$GLOBALS['meta']['gerer_trad']."' />"; 101 102 103 echo "\n<div style='text-align: $spip_lang_right;'><input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' /></div>"; 104 105 fin_cadre_couleur(); 106 107 108 calculer_langues_utilisees(); 109 110 if ($GLOBALS['meta']['multi_articles'] == "oui" 111 OR $GLOBALS['meta']['multi_rubriques'] == "oui" 112 OR count(explode(',',$GLOBALS['meta']['langues_utilisees'])) > 1) { 113 114 debut_cadre_relief("langues-24.gif"); 115 echo "<p class='verdana2'>"; 116 echo _T('info_multi_langues_choisies'); 117 echo '</p>'; 118 119 include_spip('inc/lang_liste'); 120 $langues = $GLOBALS['codes_langues']; 121 $cesure = floor((count($langues) + 1) / 2); 122 123 $langues_installees = explode(',', $GLOBALS['all_langs']); 124 $langues_autorisees = explode(',', $GLOBALS['meta']['langues_multilingue']); 125 126 while (list(,$l) = each ($langues_installees)) { 127 $langues_trad[$l] = true; 128 } 129 130 while (list(,$l) = each ($langues_autorisees)) { 131 $langues_auth[$l] = true; 132 } 133 134 $l_bloquees_tmp = explode(',',$GLOBALS['meta']['langues_utilisees']); 135 while (list(,$l) = each($l_bloquees_tmp)) { 136 $langues_bloquees[$l] = true; 137 } 138 139 echo "\n<table width='100%' cellspacing='10'><tr><td style='width: 50%' class='verdana1'>"; 140 141 while (list($code_langue) = each($langues_bloquees)) { 142 $i++; 143 echo "\n<div>"; 144 $nom_langue = $langues[$code_langue]; 145 if ($langues_trad[$code_langue]) $nom_langue = "<u>$nom_langue</u>"; 146 $nom_langue = "<span style='color: $couleur_foncee; font-weight: bold'>$nom_langue</span>"; 147 echo "<input type='hidden' name='langues_auth[]' value='$code_langue' id='langue_auth_$code_langue' />"; 148 echo "<input type='checkbox' checked='checked' disabled='disabled' />"; 149 echo "\n$nom_langue\n <span style='color: #777777'>[$code_langue]</span>"; 150 echo "</div>"; 151 152 if ($i == $cesure) echo "\n</td><td style='width: 50%' class='verdana1'>"; 153 } 154 155 echo "\n<div> </div>"; 156 157 while (list($code_langue, $nom_langue) = each($langues)) { 158 if ($langues_bloquees[$code_langue]) continue; 159 $i++; 160 echo "\n<div>"; 161 if ($langues_trad[$code_langue]) $nom_langue = "<u>$nom_langue</u>"; 162 163 if ($langues_auth[$code_langue]) { 164 echo "<input type='checkbox' name='langues_auth[]' value='$code_langue' id='langue_auth_$code_langue' checked='checked' />"; 165 $nom_langue = "<b>$nom_langue</b>"; 166 } 167 else { 168 echo "<input type='checkbox' name='langues_auth[]' value='$code_langue' id='langue_auth_$code_langue' />"; 169 } 170 echo "\n<label for='langue_auth_$code_langue'>$nom_langue</label> <span style='color: #777777'>[$code_langue]</span>"; 171 172 echo "</div>"; 173 174 if ($i == $cesure) echo "</td><td style='width: 50%' class='verdana1'>"; 175 } 176 177 echo "</td></tr>"; 178 echo "<tr><td style='text-align:$spip_lang_right;' colspan='2'>"; 179 echo "<input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo' />"; 180 echo "</td></tr></table>"; 181 182 183 echo "<div class='verdana1'>"._T("info_multi_langues_soulignees")."</div>"; 184 185 fin_cadre_relief(); 186 } 187 188 189 190 echo "</form>"; 191 192 echo fin_gauche(), fin_page(); 193 } 194 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 10:20:27 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |