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

  check("domain", $_REQUEST['domain'], 1);

  if($_POST['action'] == $lang['save'])
    $command = "domain add name=" . $_REQUEST['domain'];
  elseif($_POST['action'] == $lang['update'])
    $command = "domain mod name=" . $_REQUEST['domain'];
  elseif($_POST['action'] == $lang['delete'])
    $command = "domain del name=" . $_REQUEST['domain'];
  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['defmailbox']) != "")
      $command.=" defmailbox=" . $_POST['defmailbox'];
    if(trim($_POST['maxinmailsize']) != "")
      $command.=" maxinmailsize=" . $_POST['maxinmailsize'];
    if(trim($_POST['maxoutmailsize']) != "")
      $command.=" maxoutmailsize=" . $_POST['maxoutmailsize'];
    if(trim($_POST['diskquota']) != "")
      $command.=" diskquota=" . $_POST['diskquota'];
    if(trim($_POST['defmaxinmailsize']) != "")
      $command.=" defmaxinmailsize=" . $_POST['defmaxinmailsize'];
    if(trim($_POST['defmaxoutmailsize']) != "")
      $command.=" defmaxoutmailsize=" . $_POST['defmaxoutmailsize'];
    if(trim($_POST['defdiskquota']) != "")
      $command.=" defdiskquota=" . $_POST['defdiskquota'];
    if(trim($_POST['maxnousers']) != "")
      $command.=" maxnumusers=" . $_POST['maxnousers'];
    if(trim($_POST['maxnoalias']) != "")
      $command.=" maxnumuseralias=" . $_POST['maxnoalias'];
    if(trim($_POST['maxnomlist']) != "")
      $command.=" maxnummlist=" . $_POST['maxnomlist'];
    if(trim($_POST['showfooter']) != "")
    {
      $command.=" showfooter=" . $_POST['showfooter'];
      switch ($_POST['showfooter'])
      {
      	
      	case '0':
      			$command.=" mailinfooter= ";
      			$command.=" mailoutfooter= ";
      			break;
      			
      	case '1':
      	    	if(trim($_POST['incomingmailfooter']) != "")
     			 	$command.=" mailinfooter=" . $_POST['incomingmailfooter'];
      			break;
      		
      	case '2':
       			if(trim($_POST['outgoingmailfooter']) != "")
      				$command.=" mailoutfooter=" . $_POST['outgoingmailfooter'];        	
      			break;
      			
      	case '3':
      			if(trim($_POST['outgoingmailfooter']) != "")
      				$command.=" mailoutfooter=" . $_POST['outgoingmailfooter'];
      	      	if(trim($_POST['incomingmailfooter']) != "")
     			 	$command.=" mailinfooter=" . $_POST['incomingmailfooter'];
      			break;
      	
      }
    }
  }

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

?>
<html>
<head>
<title><?php echo $lang['domain_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="domainedit.php?domain=<?php echo $_REQUEST['domain']; ?>" target="_top"><?php echo $lang['back_to_edit']; ?></a></td>
    </tr>
  </table>
</div>

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