Parašė Vaidotas-· 2007 Vas. 14 18:02:51
#1
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
function makeList($dir, $name, $var_lang_name) {
$files = array();
$res = "";
$handle = opendir($dir);
while($file = readdir($handle)) {
if($file != "." && $file != ".." && is_dir($dir."/".$file)) {
$files[] = $file;
}
}
closedir($handle);
natsort($files); // Tri du tableau
$res .= '<select name="'.$name.'" class="textbox"><option value=""></option>';
foreach($files as $v) {
if ($var_lang_name == $v) {
$res .= "<option value='".$v."' selected>".$v."</option>\n";
} else $res .= "<option value='".$v."'>".$v."</option>\n";
}
$res .= '</select>';
return $res;
}
if ($_POST['lang']) {
setcookie("lang",$_POST['lang']);
redirect(FUSION_SELF);
}
openside("Choose language:");
echo "<div align='center'><form method='post' action='".FUSION_SELF."' enctype='multipart/form-data'>";
echo makeList(BASEDIR."locale","lang",$_COOKIE['lang'])." <input type='submit' value='Ok' class='button'/>";
echo "</form></div>";
closeside();
?>
Kaip reikia padaryti, kad jis su tuo supistu IE veiktu???
Redagavo jomalo· 2007 Vas. 14 18:02:59