コード例 #1
0
function make_operation_box_footer($hostids, $form_name)
{
    $box = new CComboBox("script");
    $hostScripts = API::Script()->getScriptsByHosts($hostids);
    $scripts = array();
    foreach ($hostScripts as $hostid => $hscripts) {
        foreach ($hscripts as $script) {
            if (!in_array($script, $scripts) && check_script($form_name, $script['name'])) {
                array_push($scripts, $script);
            }
        }
    }
    foreach ($scripts as $script) {
        $option = new CComboItem($script['scriptid'], $script['name']);
        $box->addItem($option);
    }
    $button = new CButton('execute', _('Execute'), "return executeScriptOnMultipleHosts('{$form_name}', 'script', 'hostids[]', 'Execute');");
    $button->setAttribute('id', 'executeButton');
    return array($box, $button);
}
コード例 #2
0
/**
 * This is really just a controller function that calls a bunch of other functions. This function is called by ob_start().
 * @uses check_head()
 * @uses check_meta()
 * @uses check_body()
 * @uses check_sidebar()
 * @uses check_breadcrumb()
 * @param string $buffer
 * @return string buffer
 */
function on_checkout($buffer)
{
    $buffer = check_ie($buffer);
    $buffer = check_head($buffer);
    $buffer = check_jquery($buffer);
    $buffer = check_meta($buffer);
    $buffer = check_body($buffer);
    $buffer = check_sidebar($buffer);
    $buffer = check_breadcrumb($buffer);
    $buffer = check_script($buffer);
    return $buffer;
}