[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* PHP-NUKE: Web Portal System */ 5 /* =========================== */ 6 /* */ 7 /* Copyright (c) 2005 by Francisco Burzi */ 8 /* http://phpnuke.org */ 9 /* */ 10 /* This program is free software. You can redistribute it and/or modify */ 11 /* it under the terms of the GNU General Public License as published by */ 12 /* the Free Software Foundation; either version 2 of the License. */ 13 /************************************************************************/ 14 15 if ( !defined('BLOCK_FILE') ) { 16 Header("Location: ../index.php"); 17 die(); 18 } 19 20 global $useflags, $currentlang; 21 22 if ($useflags == 1) { 23 $content = "<div align=\"center\"><span class=\"content\">"._SELECTGUILANG."<br><br>"; 24 $langdir = dir("language"); 25 while($func=$langdir->read()) { 26 if(substr($func, 0, 5) == "lang-") { 27 $menulist .= "$func "; 28 } 29 } 30 closedir($langdir->handle); 31 $menulist = explode(" ", $menulist); 32 sort($menulist); 33 for ($i=0; $i < sizeof($menulist); $i++) { 34 if(!empty($menulist[$i])) { 35 $tl = str_replace("lang-","",$menulist[$i]); 36 $tl = str_replace(".php","",$tl); 37 $altlang = ucfirst($tl); 38 $content .= "<a href=\"index.php?newlang=$tl\"><img src=\"images/language/flag-$tl.png\" border=\"0\" alt=\"$altlang\" title=\"$altlang\" hspace=\"3\" vspace=\"3\"></a> "; 39 } 40 } 41 $content .= "</span></div>"; 42 } else { 43 $content = "<div align=\"center\"><span class=\"content\">"._SELECTGUILANG."<br><br></span>"; 44 $content .= "<form onsubmit=\"this.submit.disabled='true'\" action=\"index.php\" method=\"get\"><select name=\"newlanguage\" onchange=\"top.location.href=this.options[this.selectedIndex].value\">"; 45 $handle = opendir('language'); 46 while ($file = readdir($handle)) { 47 if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) { 48 $langFound = $matches[1]; 49 $languageslist .= "$langFound "; 50 } 51 } 52 closedir($handle); 53 $languageslist = explode(" ", $languageslist); 54 sort($languageslist); 55 for ($i=0; $i < sizeof($languageslist); $i++) { 56 if($languageslist[$i]!="") { 57 $content .= "<option value=\"index.php?newlang=".$languageslist[$i]."\" "; 58 if($languageslist[$i]==$currentlang) $content .= " selected"; 59 $content .= ">".ucfirst($languageslist[$i])."</option>\n"; 60 } 61 } 62 $content .= "</select></form></div>"; 63 } 64 65 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |