HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/hMailServer/PHPWebAdmin/background_incomingrelay_save.php
<?php
   if (!defined('IN_WEBADMIN'))
      exit();

   if (hmailGetAdminLevel() != ADMIN_SERVER)
   	hmailHackingAttemp(); // The user is not server administrator.
   
   $action	            = hmailGetVar("action","");
   $relayid	   = hmailGetVar("relayid",0);
   
   if ($action == "edit")
      $obIncomingRelay     = $obBaseApp->Settings->IncomingRelays->ItemByDBID($relayid);
   elseif ($action == "add")
      $obIncomingRelay     = $obBaseApp->Settings->IncomingRelays->Add();
   elseif ($action == "delete")
   {
      $obBaseApp->Settings->IncomingRelays->DeleteByDBID($relayid);
      header("Location: index.php?page=incomingrelays");
   }
      
   // Fetch form
   $relayname		         = hmailGetVar("relayname","0");
   $relaylowerip	         = hmailGetVar("relaylowerip","0");
   $relayupperip	         = hmailGetVar("relayupperip","0");

   // Save the changes
   $obIncomingRelay->Name = $relayname;
   $obIncomingRelay->LowerIP = $relaylowerip;
   $obIncomingRelay->UpperIP = $relayupperip;

   $obIncomingRelay->Save();
   
   $relayid = $obIncomingRelay->ID;
   
   header("Location: index.php?page=incomingrelay&action=edit&relayid=$relayid");
?>