You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
0 Members and 1 Guest are viewing this topic.
yes, u were right, Jan, I changed "get" to "post" and now it works perfectly with drop down form!here is full working code:Code: [Select]$query_string = '';if (!empty($HTTP_GET_VARS)) { foreach ($HTTP_GET_VARS as $key => $val) { if ($key != "l") { $query_string .= ($query_string != '' ? '&' : '?').$key."=".$val; } }}// We add the session id with "&" not "&"$lang_url = $site_sess->url($PHP_SELF.$query_string, '&');// Now we can better remove the "l" parameter$lang_url = preg_replace("/[?|&]l=[^?|&]*/", "", $lang_url);// We replace "&" with "&" to make it valid XHTML$lang_url = str_replace("&", "&", $lang_url);$lang_select = "<form action=\"".$lang_url."\" method=\"post\">\n";$lang_select .= "<select class=\"select\" name=\"l\" onChange=\"submit()\">\n";// Now we open the "lang" folder, read out all available languages// and add it as options to the dropdown.$handle = opendir(ROOT_PATH."lang");while ($folder = @readdir($handle)) { if (@is_dir(ROOT_PATH."lang/".$folder) && $folder != "." && $folder != "..") { $lang_select .= "<option value=\"".$folder."\""; // If the folder name matches the current language, // show the option as selected if ($folder == $config['language_dir']) { $lang_select .= " selected=\"selected\""; } $lang_select .= ">".$folder."</option>\n"; }}$lang_select .= "</select>\n</form>";// Register the dropdown code for the template engine$site_template->register_vars("lang_select", $lang_select);
$query_string = '';if (!empty($HTTP_GET_VARS)) { foreach ($HTTP_GET_VARS as $key => $val) { if ($key != "l") { $query_string .= ($query_string != '' ? '&' : '?').$key."=".$val; } }}// We add the session id with "&" not "&"$lang_url = $site_sess->url($PHP_SELF.$query_string, '&');// Now we can better remove the "l" parameter$lang_url = preg_replace("/[?|&]l=[^?|&]*/", "", $lang_url);// We replace "&" with "&" to make it valid XHTML$lang_url = str_replace("&", "&", $lang_url);$lang_select = "<form action=\"".$lang_url."\" method=\"post\">\n";$lang_select .= "<select class=\"select\" name=\"l\" onChange=\"submit()\">\n";// Now we open the "lang" folder, read out all available languages// and add it as options to the dropdown.$handle = opendir(ROOT_PATH."lang");while ($folder = @readdir($handle)) { if (@is_dir(ROOT_PATH."lang/".$folder) && $folder != "." && $folder != "..") { $lang_select .= "<option value=\"".$folder."\""; // If the folder name matches the current language, // show the option as selected if ($folder == $config['language_dir']) { $lang_select .= " selected=\"selected\""; } $lang_select .= ">".$folder."</option>\n"; }}$lang_select .= "</select>\n</form>";// Register the dropdown code for the template engine$site_template->register_vars("lang_select", $lang_select);