[ 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 // Ce fichier ne sera execute qu'une fois 20 if (defined("_INC_LAYER")) 21 return; 22 23 define("_INC_LAYER", "1"); 24 25 // 26 // Le contenu de cette fonction est a mettre dans inc_version 27 // 28 29 function test_layer () { 30 global $browser_name, $browser_version, $browser_description; 31 32 if ((eregi("msie", 33 $browser_name)AND $browser_version >= 5) || (eregi("mozilla", $browser_name)AND $browser_version >= 5)) 34 return true; 35 } 36 37 function afficher_script_layer () { 38 global $flag_ecrire; 39 40 if (test_layer()) { 41 echo '<script type="text/javascript" src="' . ($flag_ecrire ? "" : "ecrire/"). 'layer.js">'; 42 echo "</script>\n"; 43 } 44 } 45 46 function debut_block_visible ($nom_block) { 47 if (test_layer()) { 48 global $numero_block; 49 global $compteur_block; 50 51 if (!$numero_block["$nom_block"] > 0) { 52 $compteur_block++; 53 $numero_block["$nom_block"] = $compteur_block; 54 } 55 $retour .= "<div id='Layer" . $numero_block["$nom_block"]. "' style='display: block'>"; 56 } 57 58 return $retour; 59 } 60 61 function debut_block_invisible ($nom_block) { 62 if (test_layer()) { 63 global $numero_block; 64 global $compteur_block; 65 66 if (!$numero_block["$nom_block"] > 0) { 67 $compteur_block++; 68 $numero_block["$nom_block"] = $compteur_block; 69 } 70 71 $retour = "\n<script type='text/javascript'><!--\n"; 72 $retour .= "vis['" . $numero_block["$nom_block"]. "'] = 'hide';\n"; 73 $retour 74 .= "document.write('<div id=\"Layer" . $numero_block["$nom_block"]. "\" style=\"display: none; margin-top: 1;\">');\n"; 75 $retour .= "//-->\n"; 76 $retour .= "</script>\n"; 77 78 $retour .= "<noscript><div id='Layer" . $numero_block["$nom_block"]. "' style='display: block;'></noscript>\n"; 79 } 80 81 return $retour; 82 } 83 84 function fin_block () { 85 if (test_layer()) { 86 return "<div style='clear: both;'></div></div>"; 87 } 88 } 89 90 function bouton_block_invisible ($nom_block) { 91 global $numero_block; 92 global $compteur_block; 93 global $spip_lang_rtl; 94 95 $num_triangle = $compteur_block + 1; 96 97 if (test_layer()) { 98 $blocks = explode(",", $nom_block); 99 100 for ($index = 0; $index < count($blocks); $index++) { 101 $nom_block = $blocks[$index]; 102 103 if (!$numero_block["$nom_block"] > 0) { 104 $compteur_block++; 105 $numero_block["$nom_block"] = $compteur_block; 106 } 107 $javasc .= "swap_couche(\\'" . $numero_block[$nom_block]. "\\', \\'$spip_lang_rtl\\');"; 108 } 109 110 $retour = "\n<script type='text/javascript'><!--\n"; 111 $retour 112 .= "document.write('<a href=\"javascript:$javasc\"><img name=\"triangle" . $numero_block["$nom_block"]. "\" src=\"img_pack/deplierhaut$spip_lang_rtl.gif\" alt=\"\" title=\"" . addslashes( 113 _T('info_deplier')). "\" width=\"16\" height=\"14\" border=\"0\"></a> ');\n"; 114 $retour .= "//-->\n"; 115 $retour .= "</script>\n"; 116 117 //$retour .= "<noscript><img name='triangle$num_triangle' src='img_pack/deplierbas$spip_lang_rtl.gif' alt='' width='16' height='14' border='0'></noscript>\n"; 118 return $retour; 119 } 120 } 121 122 function bouton_block_visible ($nom_block) { 123 global $spip_lang_rtl; 124 125 if (test_layer()) { 126 global $numero_block; 127 global $compteur_block; 128 129 if (!$numero_block["$nom_block"] > 0) { 130 $compteur_block++; 131 $numero_block["$nom_block"] = $compteur_block; 132 } 133 return "<a href=\"javascript:swap_couche('" . $numero_block["$nom_block"]. "', '$spip_lang_rtl')\"><img name='triangle" . $numero_block["$nom_block"]. "' src='img_pack/deplierbas$spip_lang_rtl.gif' alt='" . addslashes( 134 _T('info_deplier')). "' width='16' height='14' border='0' /></a> "; 135 } 136 } 137 138 require_once ('inc_version.php'); 139 verif_butineur(); 140 ?>
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 |