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:/web/mailadmin/background_iphome_save.php
<?php
   if (!defined('IN_WEBADMIN'))
      exit();

   if (hmailGetAdminLevel() != 2)
   	hmailHackingAttemp(); // Only server admins can change this.

   $iphomeid 	= hmailGetVar("iphomeid",0);
   $iphomeaddress	= hmailGetVar("iphomeaddress",0);
   $action	   = hmailGetVar("action","");
   
   $obSettings	= $obBaseApp->Settings();
   $obIPHomes  = $obSettings->IPHomes;

   if ($action == "edit")
      $obIPHome = $obIPHomes->ItemByDBID($iphomeid);
   elseif ($action == "add")
      $obIPHome = $obIPHomes->Add();
   elseif ($action == "delete")
   {
      $obIPHomes->DeleteByDBID($iphomeid);
      header("Location: index.php?page=multihoming");
      exit();
   }

   $obIPHome->IPAddress = $iphomeaddress;
   $obIPHome->Save();
   
   $iphomeid = $obIPHome->ID;
   
   header("Location: index.php?page=iphome&action=edit&iphomeid=$iphomeid");

?>