コード例 #1
0
													<tr>
														<td  class='noborder' id="plugins" style="text-align:left;padding-top:5px;">
															<div style='height:<?php 
echo $is_engine ? '200px' : '140px';
?>
;overflow:auto'>
																<table width="100%" class="transparent" cellspacing="0" cellpadding="0">
																	<tr>
																		<?php 
$iplugin = 1;
/* ===== plugin groups ==== */
if ($is_engine) {
    $pgroups = Plugin_group::get_groups_by_plugin($conn, 1505);
    $excluded = array();
} else {
    $pgroups = Plugin_group::get_list($conn, "", "name");
    $excluded = Plugin_group::get_groups_by_plugin($conn, 1505);
}
foreach ($pgroups as $g) {
    if (isset($excluded[$g->get_id()])) {
        continue;
    }
    echo "<td class='nobborder' style='text-align:left;padding-right:10px'>";
    $checked = in_array($g->get_id(), $plugingroups) ? "checked='checked'" : "";
    $mixed = $is_engine ? FALSE : $g->contains_directive_plugin($conn);
    if ($mixed) {
        $tip = _('This plugin group cannot be applied because contains the plugin 1505');
        echo "<input type='checkbox' class='disabled' disabled='disabled' id='plugin_" . $g->get_id() . "' pname='" . $g->get_name() . "'>";
        echo "<a href='modifyplugingroupsform.php?action=edit&id=" . $g->get_id() . "' class='greybox gray italic ' title='" . _('View DS Group') . "'>" . $g->get_name() . "</a>";
        echo " <img src='/ossim/pixmaps/warnin_icon.png' id='dg_locked' class='tiptip_dg' title='" . $tip . "'/>";
    } else {
コード例 #2
0
if ($nump == 0) {
    $nump = 500;
}
if (GET('action') == 'edit') {
    $group_id = GET('id');
    $delete_id = GET('delete');
    ossim_valid($group_id, OSS_HEX, 'illegal:ID');
    ossim_valid($delete_id, OSS_DIGIT, OSS_NULLABLE, 'illegal:delete');
    if (ossim_error()) {
        die(ossim_error());
    }
    if ($delete_id != "") {
        Plugin_group::delete_plugin_id($conn, $group_id, $delete_id);
    }
    $where = "plugin_group.group_id=unhex('{$group_id}')";
    $list = Plugin_group::get_list($conn, $where);
    if (count($list) != 1) {
        die(ossim_error(_("Empty DS Group ID")));
    }
    $plug_ed = $list[0];
    $name = $plug_ed->get_name();
    $descr = $plug_ed->get_description();
    $plugs = $plug_ed->get_plugins();
} else {
    $group_id = $name = $descr = null;
    $name = GET('pname');
    $descr = GET('pdesc');
    ossim_valid($name, OSS_ALPHA, OSS_PUNC, OSS_SPACE, OSS_NULLABLE, 'illegal:Name');
    ossim_valid($descr, OSS_ALL, OSS_NULLABLE, 'illegal:Description');
    if (ossim_error()) {
        die(ossim_error());
コード例 #3
0
ファイル: insertsid.php プロジェクト: jackpf/ossim-arc
        $sids = array($plugin_sid);
    }
    $close = TRUE;
    for ($i = 0; $i < count($ids); $i++) {
        $pid = $ids[$i];
        $psid = $sids[$i];
        $error_code = Plugin_group::insert_plugin_id_sid($conn, $group_id, $pid, $psid);
        if ($error_code == 1) {
            $msg .= _("Skip: ({$pid} {$psid}) is already into selected DS Group") . "<br>";
        }
    }
    if ($msg != "") {
        $close = FALSE;
    }
}
$groups = Plugin_group::get_list($conn);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title> <?php 
echo gettext("OSSIM Framework");
?>
 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
コード例 #4
0
function get_plugin_groups($conn, $data)
{
    $id = $data['id'];
    $ctx = $data['ctx'];
    ossim_valid($id, OSS_HEX, OSS_NULLABLE, 'illegal:' . _("Policy ID"));
    ossim_valid($ctx, OSS_HEX, 'illegal:' . _("CTX"));
    if (ossim_error()) {
        $info_error = "Error: " . ossim_get_error();
        ossim_clean_error();
        $return['error'] = TRUE;
        $return['msg'] = $info_error;
        return $return;
    }
    $is_engine = is_ctx_engine($conn, $ctx);
    $result = '';
    $result .= "\n\t\t<div style='height:150px;overflow:auto'>\n\t\t<table width='100%' class='transparent' cellspacing='0' cellpadding='0'>\n\t\t\t<tr>";
    $iplugin = 1;
    /* ===== plugin groups ==== */
    if ($is_engine) {
        $pgroups = Plugin_group::get_groups_by_plugin($conn, 1505);
        $excluded = array();
    } else {
        $pgroups = Plugin_group::get_list($conn, "", "name");
        $excluded = Plugin_group::get_groups_by_plugin($conn, 1505);
    }
    foreach ($pgroups as $g) {
        if (isset($excluded[$g->get_id()])) {
            continue;
        }
        $result .= "<td class='nobborder' style='text-align:left;padding-right:10px'>";
        $checked = in_array($g->get_id(), $pgroups) ? "checked='checked'" : "";
        $mixed = $is_engine ? FALSE : $g->contains_directive_plugin($conn);
        if ($mixed) {
            $tip = _('This plugin group cannot be applied because contains the plugin 1505');
            $result .= "<input type='checkbox' class='disabled' disabled='disabled' id='plugin_" . $g->get_id() . "' pname='" . $g->get_name() . "'>";
            $result .= "<a href='modifyplugingroupsform.php?action=edit&id=" . $g->get_id() . "' class='greybox gray italic tiptip' title='" . _('View DS Group') . "'>" . $g->get_name() . "</a>";
            $result .= " <img src='/ossim/pixmaps/warnin_icon.png' id='dg_locked' class='tiptip_dg' title='" . $tip . "'/>";
        } else {
            $result .= "<input type='checkbox' id='plugin_" . $g->get_id() . "' pname='" . $g->get_name() . "' onclick='drawpolicy()' name='plugins[" . $g->get_id() . "]' {$checked}/>";
            $result .= "<a href='modifyplugingroupsform.php?action=edit&id=" . $g->get_id() . "' class='greybox' title='" . _('View DS Group') . "'>" . $g->get_name() . "</a>";
        }
        if ($iplugin++ % 4 == 0) {
            $result .= "<tr></tr>";
        }
    }
    $result .= "\n\t\t\t</tr>\n\t\t</table></div>";
    $return['error'] = FALSE;
    $return['data'] = $result;
    return $return;
}