Esempio n. 1
0
foreach ($tab as $key => $plug) {
    $mod = $plug == 'reports' ? $key : $plug . '_' . $key;
    if (!isset($plugname[$plug])) {
        // Retrieve the plugin name
        $function = "plugin_version_{$plug}";
        $tmp = $function();
        $plugname[$plug] = $tmp['name'];
    }
    $section = isStat($mod) ? sprintf(__('%1$s - %2$s'), __('Assistance'), __('Statistics')) : sprintf(__('%1$s - %2$s'), __('Tools'), __('Report', 'Reports', 2));
    $rap[$plug][$section][$mod] = $LANG["plugin_{$plug}"][$key];
}
$tab = "     ";
foreach ($rap as $plug => $tmp1) {
    echo '<optgroup label="' . sprintf(__('%1$s - %2$s'), __('Plugins'), $plugname[$plug]) . '">';
    foreach ($tmp1 as $section => $tmp2) {
        echo '<optgroup label="' . $tab . "&raquo;&nbsp;" . $section . '">';
        foreach ($tmp2 as $mod => $name) {
            echo "<option value='{$mod}' " . ($report == "{$mod}" ? "selected" : "") . ">{$tab}{$tab}{$name}</option>\n";
        }
        echo "</optgroup>\n";
    }
    echo "</optgroup>\n";
}
echo "</select>";
echo "<td><input type='submit' value='" . _sx('button', 'Post') . "' class='submit' ></td></tr>";
echo "</table>";
Html::closeForm();
if ($report) {
    PluginReportsProfile::showForReport($report);
}
Html::footer();