Exemplo n.º 1
0
function main_components()
{
    $retranslator = new retranslator();
    $array = $retranslator->master_array;
    reset($retranslator->MyRetranslateComponentsList);
    $components = $retranslator->MyRetranslateComponentsList;
    $html = "<H5>{components}</h5>";
    $table = "<table style='width:100%'>";
    while (list($num, $ligne) = each($array)) {
        $button = button("{add}", "AddCompon('{$num}');");
        if ($retranslator->TestsRetranslations($ligne["COMPONENTS"])) {
            $img = "fleche-20.png";
            $button = null;
        } else {
            $img = "fleche-20-black.png";
        }
        $table = $table . "<tr " . CellRollOver() . ">\n\t\t<td style='font-size:12px' nowrap valign='top' width=1%><img src='img/{$img}'></td>\t\n\t\t<td style='font-size:12px' nowrap>{$num}</td>\n\t\t<td style='font-size:12px' nowrap>{$button}</td>\n\t\t\t\n\t\t\t\n\t\t</tr>\n\t\t\n\t\t";
    }
    $table = $table . "</table>";
    $comp = "<table style='width:100%'>";
    while (list($num, $ligne) = each($components)) {
        $comp = $comp . "<tr " . CellRollOver() . ">\n\t\t<td style='font-size:12px' nowrap valign='top' width=1%><img src='img/fw_bold.gif'></td>\t\n\t\t<td style='font-size:12px' nowrap>{$num}</td>\n\t\t<td style='font-size:12px' nowrap>" . imgtootltip('ed_delete.gif', '{delete}', "DeleteComp('{$num}')") . "</td>\n\t\t</tr>";
    }
    $comp = $comp . "</table>";
    $html = $html . "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=50% style='padding:3px;border:1px solid #CCCCCC'>\n\t\t<H3>{available_products_to_be_updated}</H3>\n\t\t{$table}</td>\n\t\t<td valign='top' width=50% style='padding:3px;border:1px solid #CCCCCC'>\n\t\t<H3>{available_components}</H3>\n\t\t{$comp}</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}