<?php
/**
 * @package Flatnux_controlcenter
 * @author Alessandro Vernassa <speleoalex@gmail.com>
 * @copyright Copyright (c) 2003-2005
 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License
 *
 */
defined('_FNEXEC') or die('Restricted access');
$clang = FN_GetParam("editlang", $_GET, "html");
$opt = FN_GetParam("opt", $_GET, "html");
if ($clang == "")
{
    $clang = $_FN['lang'];
}
$params = array("link" => "editlang=$clang&opt=$opt");
echo "<h2>".FN_Translate("languages")."</h2>";
echo "<div style=\"\">";
foreach ($_FN['listlanguages'] as $l)
{
    if ($l == $clang)
        echo " <span style=\"border:1px outset;margin-right:2px;background-color:#ffffff;border-bottom:0px;font-weight:bold\">";
    else 
        echo " <span style=\"border:1px outset;margin-right:1px;background-color:transparent;border-bottom:0px\">";
    echo "&nbsp;&nbsp;<a href=\"?opt=$opt&amp;editlang=$l\">";
    if (file_exists("languages/$l/icon.png"))
        echo "<img style=\"vertical-align:middle\" src=\"languages/$l/icon.png\" alt=\"$l\"/> ";
    echo "$l</a>&nbsp;&nbsp;";
    echo "</span> ";
}
echo "</div>";
if (file_exists("languages/$clang/icon.png"))
{
//    echo "<img src=\"languages/$clang/icon.png\" alt=\"\"/>";
}
echo "<div style=\"border:1px outset;padding:10px;width:600px;\">";
FN_xmltableeditor("fn_i18n_{$clang}", $params);
echo "</div>";
?>