Exemplo n.º 1
0
function plugin_monitoring_MassiveActionsDisplay($options = array())
{
    global $LANG, $CFG_GLPI;
    switch ($options['itemtype']) {
        case "Computer":
            switch ($options['action']) {
                case "plugin_monitoring_activatehosts":
                    $pmHost = new PluginMonitoringHost();
                    $a_list = $pmHost->find("`is_template`='1'");
                    $a_elements = array();
                    foreach ($a_list as $data) {
                        $a_elements[$data['id']] = $data['template_name'];
                    }
                    $rand = Dropdown::showFromArray("template_id", $a_elements);
                    echo "<img alt='' title=\"" . $LANG['buttons'][8] . "\" src='" . $CFG_GLPI["root_doc"] . "/pics/add_dropdown.png' style='cursor:pointer; margin-left:2px;'\n                     onClick=\"var w = window.open('" . $pmHost->getFormURL() . "?withtemplate=1&popup=1&amp;rand=" . $rand . "' ,'glpipopup', 'height=400, " . "width=1000, top=100, left=100, scrollbars=yes' );w.focus();\">";
                    echo "<input name='add' value='Post' class='submit' type='submit'>";
                    break;
            }
            break;
    }
    return "";
}