Location: PHPKode > projects > Webextreme > webextreme/mfilteredit_post.php
<?php
  require("functions.php");
  if(!check_login())
  {
    header("Location: index.php");
  }

  if($_POST['action'] == $lang['save'])
    $command = "mfilter add ";
  elseif($_POST['action'] == $lang['update'])
    $command = "mfilter mod mfilter=" . $_POST['mfilter'];
  elseif($_POST['action'] == $lang['delete'])
    $command = "mfilter del mfilter=" . $_POST['mfilter'];
  else
  {
    $error['title'] = $lang['error'];
    $error['message'] = $lang['error_reaching_page'];
    $error['back'] = 1;
    require("error.php");
    exit;
  }

  if($_POST['action'] != $lang['delete'])
  {
  	 if(trim($_POST['condition']) != "")
      $command.=" condition=" . $_POST['condition'];
    if(trim($_POST['operator']) != "")
      $command.=" operator=" . $_POST['operator'];
    if(trim($_POST['value']) != "")
      $command.=" value=\"" . $_POST['value'] . "\"";
    if(trim($_POST['mfaction']) != "")
      $command.=" action=" . $_POST['mfaction'];
    if(trim($_POST['header']) != "")
      $command.=" header=\"" . $_POST['header'] . "\"";
    if(trim($_POST['header_cond']) != "")
      $command.=" header_cond=\"" . $_POST['header_cond'] . "\"";
    if(trim($_POST['rewrite']) != "")
      $command.=" rewrite=" . $_POST['rewrite'];
    if(trim($_POST['pipe']) != "")
      $command.=" pipe=" . $_POST['pipe'];
    if(trim($_POST['data']) != "")
      $command.=" data=" . $_POST['data'];
    if(trim($_POST['description']) != "")
      $command.=" description=\"" . $_POST['description'] . "\"";
    if(trim($_POST['order']) != "")
      $command.=" order=" . $_POST['order'];
    if(trim($_POST['options']) != "")
      $command.=" options=" . $_POST['options'];
      trim($_POST['date']);
      trim($_POST['status']);

  }

  $result = command($command);
  $message = $result[0];

?>
<html>
<head>
<title><?php echo $lang['mfilter_edit']; ?></title>
<link rel="stylesheet"                  href="style.css">
<meta http-equiv="pragma"               content="no-cache">
<meta http-equiv="content-type"         content="text/html; charset=iso-8859-1">
</head>

<body>

<div align="center">
  <table border="0" bgcolor="black" cellpadding="2" cellspacing="1" width="300">
    <tr>
      <td align="center" bgcolor="white" class="highlight"><?php echo $message; ?></td>
    </tr>
    <tr>
      <td bgcolor="white" align="center"><a href="mfilterview.php" target="_top"><?php echo $lang['back_to_edit']; ?></a></td>
    </tr>
    
  </table>
</div>

</body>
</html>
Return current item: Webextreme