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

  $count = true;
  $countt = count($results)/16;
  $countt--;
  
  for ($idx = 0; $idx < $countt; $idx++)
  {
  	
  	$temp = parse_mfilterlist($results);
  	
  	if ($temp["MFilter"] == $_GET["MFILTERID"]) $mfilterdata = $temp;	
  	
  	for ($idnn = 0; $idnn < 16; $idnn++)
			array_shift($results);
  }
 
   

?>
<html>
<head>
<title><?php echo $lang['mfilter_management']; ?>: <?php echo $mfilterdata["MFilter"]; ?></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">
    <form method="post" action="mfilteredit_post.php">
      <tr>
        <td class="highlightwhite" align="center"><?php echo $lang['mfilter_management']; ?>: <?php echo $mfilterdata["MFilter"]; ?></td>
      </tr>
      <tr>
        <td bgcolor="white">
          <table border="0" cellspacing="0" cellpadding="4" width="100%">

            <tr>
              <td class="highlight"><?php echo $lang['mfilter_number']; ?>:</td>
 <?php

 	if ($mfilterdata["MFilter"] != "")
 	{
 
 ?>
              
              <td><?php echo $mfilterdata["MFilter"]; ?><input type="hidden" name="mfilter" value="<?php echo $mfilterdata["MFilter"]; ?>"></td>
  <?php

 	}else
 	{
  ?>           
           <td><?php echo $mfilterdata["MFilter"]; ?></td>   
   <?php
 	}
  ?>              
            </tr>


            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_condition']; ?>:</td>
	      <td>
                <select name="condition" size="1">
                  <option value="1"<?php if($mfilterdata["Condition"] == "1") { echo " selected"; } ?>><?php echo 1; ?></option>
		  <option value="2"<?php if($mfilterdata["Condition"] == "2") { echo " selected"; } ?>><?php echo 2; ?></option>
		  <option value="4"<?php if($mfilterdata["Condition"] == "4") { echo " selected"; } ?>><?php echo 4; ?></option>
		  <option value="8"<?php if($mfilterdata["Condition"] == "8") { echo " selected"; } ?>><?php echo 8; ?></option>
		  <option value="16"<?php if($mfilterdata["Condition"] == "16") { echo " selected"; } ?>><?php echo 16; ?></option>
		  <option value="32"<?php if($mfilterdata["Condition"] == "32") { echo " selected"; } ?>><?php echo 32; ?></option>
		  <option value="64"<?php if($mfilterdata["Condition"] == "64") { echo " selected"; } ?>><?php echo 64; ?></option>
		  <option value="128"<?php if($mfilterdata["Condition"] == "128") { echo " selected"; } ?>><?php echo 128; ?></option>
		  <option value="256"<?php if($mfilterdata["Condition"] == "256") { echo " selected"; } ?>><?php echo 256; ?></option>

                </select>
              </td>

            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mfilter_operator']; ?>:</td>
	      <td>
                <select name="operator" size="1">
                  <option value="1"<?php if($mfilterdata["Operator"] == "1") { echo " selected"; } ?>><?php echo 1; ?></option>
		  <option value="2"<?php if($mfilterdata["Operator"] == "2") { echo " selected"; } ?>><?php echo 2; ?></option>
		  <option value="4"<?php if($mfilterdata["Operator"] == "4") { echo " selected"; } ?>><?php echo 4; ?></option>
		  <option value="8"<?php if($mfilterdata["Operator"] == "8") { echo " selected"; } ?>><?php echo 8; ?></option>
		  <option value="16"<?php if($mfilterdata["Operator"] == "16") { echo " selected"; } ?>><?php echo 16; ?></option>
                </select>
              </td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_value']; ?>:</td>
              <td><input type="text" name="value" size="70" class="norm" value="<?php echo htmlentities($mfilterdata["Value"]); ?>" ></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mfilter_action']; ?>:</td>
              <td>
                <select name="mfaction" size="1">
                  <option value="1"<?php if($mfilterdata["Action"] == "1") { echo " selected"; } ?>><?php echo 1; ?></option>
		  <option value="2"<?php if($mfilterdata["Action"] == "2") { echo " selected"; } ?>><?php echo 2; ?></option>
		  <option value="4"<?php if($mfilterdata["Action"] == "4") { echo " selected"; } ?>><?php echo 4; ?></option>
		  <option value="8"<?php if($mfilterdata["Action"] == "8") { echo " selected"; } ?>><?php echo 8; ?></option>
		  <option value="16"<?php if($mfilterdata["Action"] == "16") { echo " selected"; } ?>><?php echo 16; ?></option>
		  <option value="32"<?php if($mfilterdata["Action"] == "32") { echo " selected"; } ?>><?php echo 32; ?></option>

                </select>
              </td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_header']; ?>:</td>
              <td><input type="text" name="header" size="70" class="norm" value="<?php echo $mfilterdata["Header"]; ?>"></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mfilter_header_cond']; ?>:</td>
              <td><input type="text" name="header_cond" size="70" class="norm" value="<?php echo $mfilterdata["Header cond"]; ?>"></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_rewrite']; ?>:</td>
              <td>
                <select name="rewrite" size="1">
                  <option value="0"<?php if($mfilterdata["Rewrite"] == "0") { echo " selected"; } ?>><?php echo 0; ?></option>
		  <option value="1"<?php if($mfilterdata["Rewrite"] == "1") { echo " selected"; } ?>><?php echo 1; ?></option>
		  <option value="2"<?php if($mfilterdata["Rewrite"] == "2") { echo " selected"; } ?>><?php echo 2; ?></option>
                </select>
              </td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mfilter_pipe']; ?>:</td>
              <td><input type="text" name="pipe" size="70" class="norm" value="<?php echo $mfilterdata["Pipe"]; ?>"></td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_data']; ?>:</td>
              <td><input type="text" name="data" size="30" class="norm" value="<?php echo $mfilterdata["Data"]; ?>"></td>
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mfilter_description']; ?>:</td>
              <td><input type="text" name="description" size="70" class="norm" value="<?php echo $mfilterdata["Description"]; ?>"></td>
            </tr>

            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_order']; ?>:</td>
	      <td><input type="text" name="order" size="5" class="norm" value="<?php echo $mfilterdata["Order"]; ?>"></td>
	      
            </tr>
            <tr>
              <td class="highlight"><?php echo $lang['mfilter_options']; ?>:</td>
              <td>
                <select name="options" size="1">
                  <option value="0"<?php if($mfilterdata["Options"] == "0") { echo " selected"; } ?>><?php echo 0; ?></option>
		  <option value="1"<?php if($mfilterdata["Options"] == "1") { echo " selected"; } ?>><?php echo 1; ?></option>
                </select>
              </td>
            </tr>
            <tr bgcolor="#E0E0E0">
              <td class="highlight"><?php echo $lang['mfilter_date']; ?>:</td>
              <td><?php echo date("d/m/Y H:i:s",$mfilterdata["Date"]); ?><input type="hidden" name="date" size="30" class="norm" value="<?php echo $mfilterdata["Date"]; ?>"></td>
            </tr>
	    <tr>
              <td class="highlight"><?php echo $lang['mfilter_status']; ?>:</td>
              <td><?php echo $mfilterdata["Status"]; ?><input type="hidden" name="status" size="5" class="norm" value="<?php echo $mfilterdata["Status"]; ?>"></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td bgcolor="white" align="center">
<?php
  if($mfilterdata["MFilter"] != 0)
  {
?>
          <input type="submit" value="<?php echo $lang['update']; ?>" name="action" class="norm">
          <input type="submit" value="<?php echo $lang['delete']; ?>" name="action" class="norm" onclick="return confirm('<?php echo $lang['really_delete_mfilter']; ?>');">

<?php
  }
  else
  {
?>
          <input type="submit" value="<?php echo $lang['save']; ?>" name="action" class="norm">
<?php
  }
?>
          <input type="reset" value="<?php echo $lang['reset']; ?>" class="norm">
          <input type="button" value="<?php echo $lang['cancel']; ?>" class="norm" onclick="location.href='mfilterview.php';">
        </td>
      </tr>
    </form>
  </table>
</div>

<?php display_info(); ?>

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