if (!$activate_iprule && $deactivate_iprule) { //When rule is going to be deactivated we will no check for IP $noExclIPS = false; $selfBlock = false; } else { //Otherwise check if ANY input supplied $noExclIPS = true; foreach ($_POST["EXCL_IPS"] as $ip) { if (strlen(trim($ip)) > 0) { $noExclIPS = false; break; } } //AND it is not selfblocking rule $INCL_IPS = array("0.0.0.1-255.255.255.255"); $selfBlock = $ob->CheckIP($INCL_IPS, $_POST["EXCL_IPS"]); } if ($noExclIPS) { $message = new CAdminMessage(GetMessage("SEC_IPRULE_ADMIN_NO_IP")); $bVarsFromForm = true; } elseif ($selfBlock && COption::GetOptionString("security", "ipcheck_allow_self_block") !== "Y") { if ($e = $APPLICATION->GetException()) { $message = new CAdminMessage(GetMessage("SEC_IPRULE_ADMIN_SAVE_ERROR"), $e); } $bVarsFromForm = true; } elseif ($selfBlock && $_POST["USE_THE_FORCE_LUK"] !== "Y") { if ($e = $APPLICATION->GetException()) { $message = new CAdminMessage(GetMessage("SEC_IPRULE_ADMIN_SAVE_ERROR"), $e); } $bVarsFromForm = true; $bShowForce = true;