<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 { echo "<input type='checkbox' id='plugin_" . $g->get_id() . "' pname='" . $g->get_name() . "' onclick='drawpolicy()' name='plugins[" . $g->get_id() . "]' {$checked}/>";
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; }