Changeset 8226 for extensions/PHP_Optimisateur/files
- Timestamp:
- Dec 22, 2010, 1:01:25 PM (13 years ago)
- Location:
- extensions/PHP_Optimisateur/files
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/files/display_config.php
r8195 r8226 109 109 <tr> 110 110 <td><b>'.l10n('copyCOLOR').' :</b></td> 111 <td> rgb('.$copyCOLOR.') <span style="vertical-align:middle;border:1px solid #7f7f7f;width:1.5em;height:0.8em;display:inline-block;background:rgb('.str_replace(' ',',',$copyCOLOR).');"> </span></td>111 <td>'.$copyCOLOR.' <span style="vertical-align:middle;border:1px solid #7f7f7f;width:1.5em;height:0.8em;display:inline-block;background:'.$copyCOLOR.';"> </span></td> 112 112 </tr> 113 113 <tr> -
extensions/PHP_Optimisateur/files/functions.php
r8195 r8226 5 5 \***************************************/ 6 6 7 // Affiche les textes 7 // Affiche les textes localisés 8 8 function l10n($code){ 9 9 global $Lang; … … 21 21 } 22 22 23 // Trouve la langue 23 // Trouve la langue, retourne la langue de l'utilisateur et les langues installées 24 24 function GetLanguage(){ 25 25 // tableau avec les langues installées … … 64 64 } else { 65 65 return true; 66 67 66 } 68 67 } … … 70 69 // Supprime un repertoire non-vide 71 70 function rrmdir($dir) { 71 $dir = rtrim($dir, '/'); 72 72 if (is_dir($dir)) { 73 73 $objects = scandir($dir); … … 159 159 } else if (preg_match('#^([0-9]*)$#', $value)) { 160 160 settype($array[$key], 'int'); 161 } else if (preg_match('#^([0-9]*)( .|,)([0-9]*)$#', $value)) {161 } else if (preg_match('#^([0-9]*)(\.|,)([0-9]*)$#', $value)) { 162 162 settype($array[$key], 'float'); 163 163 } … … 171 171 function bool_to_string($bool, $just_echo=0) { 172 172 global $Lang; 173 # $just_echo pour pouvoir afficher un booléen tel quel 173 # $just_echo pour pouvoir afficher un booléen tel quel (echo true; n'affiche rien) 174 174 if (is_bool($bool)) { 175 175 if ($bool) { … … 184 184 } 185 185 } 186 187 // Converti une chaine de config et tableau associatif 188 function ExplodeString($string, $sep1=';', $sep2=':') { 189 $result = array(); 190 $a = explode($sep1, $string); 191 foreach ($a as $s) { 192 $v = explode($sep2, $s); 193 $result[$v[0]] = $v[1]; 194 } 195 return $result; 196 } 197 198 // Converti une couleur HEX et RGB 199 function hex2RGB($hexStr, $returnAsString = false, $seperator = ',') { 200 $hexStr = preg_replace("/[^0-9A-Fa-f]/", '', $hexStr); // Gets a proper hex string 201 $rgbArray = array(); 202 203 if (strlen($hexStr) == 6) { //If a proper hex code, convert using bitwise operation. No overhead... faster 204 $colorVal = hexdec($hexStr); 205 $rgbArray['r'] = 0xFF & ($colorVal >> 0x10); 206 $rgbArray['g'] = 0xFF & ($colorVal >> 0x8); 207 $rgbArray['b'] = 0xFF & $colorVal; 208 } elseif (strlen($hexStr) == 3) { //if shorthand notation, need some string manipulations 209 $rgbArray['r'] = hexdec(str_repeat(substr($hexStr, 0, 1), 2)); 210 $rgbArray['g'] = hexdec(str_repeat(substr($hexStr, 1, 1), 2)); 211 $rgbArray['b'] = hexdec(str_repeat(substr($hexStr, 2, 1), 2)); 212 } else { 213 return false; //Invalid hex color code 214 } 215 216 return $returnAsString ? implode($seperator, $rgbArray) : $rgbArray; // returns the rgb string or the associative array 217 } 186 218 ?> -
extensions/PHP_Optimisateur/files/index.php
r7988 r8226 1 1 <?php 2 2 $url = '../index.php'; 3 header( 'Request-URI: '.$url);4 header( 'Content-Location: '.$url);5 header( 'Location: '.$url);3 header('Request-URI: '.$url); 4 header('Content-Location: '.$url); 5 header('Location: '.$url); 6 6 exit(); 7 7 ?> -
extensions/PHP_Optimisateur/files/style.css
r8195 r8226 62 62 font-size:1.2em; 63 63 font-style:italic; 64 font-family:"Consolas"; 64 65 } 65 66 a:hover {
Note: See TracChangeset
for help on using the changeset viewer.