예제 #1
0
파일: logs.php 프로젝트: neoclust/mmc
function log_list() {
    $ajax = new AjaxFilter("modules/imaging/imaging/ajaxLogs.php", "container", getParams());
    //$ajax->setRefresh(10000);
    $ajax->display();
    echo '<br/><br/><br/>';
    $ajax->displayDivToUpdate();
}
예제 #2
0
파일: services.php 프로젝트: neoclust/mmc
    function service_list($type, $target_uuid, $target_name) {
        $params = getParams();
        $params['target_uuid'] = $target_uuid;
        $params['target_type'] = $type;
        $params['target_name'] = $target_name;

        $ajax = new AjaxFilter("modules/imaging/imaging/ajaxServices.php", "Level2", $params, "Level2");
        //$ajax->setRefresh(10000);
        $ajax->display();
        echo '<br/><br/><br/>';
        $ajax->displayDivToUpdate();
    }
예제 #3
0
    if (startsWith($policy[0], $src) && startsWith($policy[1], $dst)) {
        $label = sprintf("%s (%s) → %s (%s)", getZoneType($policy[0]), $policy[0], getZoneType($policy[1]), $policy[1]);
        $decisionTpl = new SelectItem($policy[0] . "_" . $policy[1] . "_policy");
        $decisionTpl->setElements(array(_T("Accept"), _T("Drop")));
        $decisionTpl->setElementsVal(array("ACCEPT", "DROP"));
        $decisionTpl->setSelected($policy[2]);
        $f->add(new TrFormElement($label, $decisionTpl));
    }
}
$f->pop();
$f->addButton("bpolicy", _T("Save"));
$f->display();
print '<br />';
// Rules list display
$ajax = new AjaxFilter(urlStrRedirect("shorewall/shorewall/ajax_" . $page));
$ajax->display();
$t = new TitleElement(_T("Port forwarding rules"), 2);
$t->display();
$ajax->displayDivToUpdate();
// Add rule form
print '<script type="text/javascript" src="modules/shorewall/includes/functions.js"></script><br />';
$t = new TitleElement(_T("Add port forwarding rule"), 2);
$t->display();
$f = new ValidatingForm(array("id" => "rule"));
$f->push(new Table());
$macros = getServices();
$services = array("", _T("Custom...")) + $macros;
$servicesVals = array("", "custom") + $macros;
$serviceTpl = new SelectItem("service", "toggleCustom");
$serviceTpl->setElements($services);
$serviceTpl->setElementsVal($servicesVals);
예제 #4
0
파일: images.php 프로젝트: neoclust/mmc
function image_list($type, $title, $actions=true) {
    $params = getParams();
    $params['target_uuid'] = $_GET['target_uuid'];
    if (!$actions) {
        $params['master'] = True;
    }

    // show title
    if($title) {
        $t = new TitleElement($title);
        $t->display();
    }

    $ajax = new AjaxFilter("modules/imaging/imaging/ajaxImages.php", "container".($actions?'image':'master'), $params, "form".($actions?'image':'master'));
    //$ajax->setRefresh(10000);
    $ajax->display();
    echo '<br/><br/><br/>';
    $ajax->displayDivToUpdate();
}