// do not show the interface
}
$buttons = "";
if (isset($_REQUEST['new'])) {
    $new = true;
} else {
    $new = false;
}
if (isset($_REQUEST['edit']) || $new) {
    $edit = true;
} else {
    $edit = false;
}
$del = isset($_REQUEST['del']);
if (isset($_REQUEST['Rule'])) {
    if (!$del || !delRule($_REQUEST['Rule'])) {
        $Rule = readRule($_REQUEST['Rule']);
    } else {
        $Rule = false;
    }
    // delete was a succes!
} else {
    if ($new) {
        $Rule = new Rule();
    } else {
        $Rule = false;
    }
}
if ($Rule) {
    writeHead("<TITLE>Rule - Atlas - ADL Prototype</TITLE>" . ($edit ? '<SCRIPT type="text/javascript" src="js/edit.js"></SCRIPT>' : '<SCRIPT type="text/javascript" src="js/navigate.js"></SCRIPT>') . "\n");
    if ($edit) {
示例#2
0
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
if (isset($_POST["bdelete"])) {
    $list = getRules("", $src, $dst, $filter);
    $rule = $list[$_POST['id']];
    foreach (getShorewallZones($src) as $zone) {
        delRule($rule[0], $rule[1], $rule[2], $rule[3], $rule[4]);
    }
    if (!isXMLRPCError()) {
        $n = new NotifyWidgetSuccess(_T("The rule has been deleted."));
        handleServicesModule($n, array("shorewall" => _T("Firewall")));
    }
    header("Location: " . urlStrRedirect("shorewall/shorewall/" . $_POST['page']));
    exit;
}
?>

<p><?php 
echo _T("Delete this rule ?");
?>
</p>
<form action="<?php