log_write("error", "page_output", "The supplied IPv4 address ID is not valid");
            return 0;
        }
    }
    // verify valid IP subnet
    // TODO: write me
    /*
    	Check for any errors
    */
    if (error_check()) {
        $_SESSION["error"]["form"]["service_ipv4_edit"] = "failed";
        header("Location: ../index.php?page=customers/service-ipv4-edit.php&id_customer=" . $obj_customer->id . "&id_service_customer=" . $obj_customer->id_service_customer . "&id_ipv4=" . $obj_ipv4->id);
        exit(0);
    } else {
        /*
        	Update/Create IPv4 address
        */
        $obj_ipv4->action_update();
        /*
        	Complete
        */
        header("Location: ../index.php?page=customers/service-ipv4.php&id_customer=" . $obj_customer->id . "&id_service_customer=" . $obj_customer->id_service_customer . "");
        exit(0);
    }
    /////////////////////////
} else {
    // user does not have perms to view this page/isn't logged on
    error_render_noperms();
    header("Location: ../index.php?page=message.php");
    exit(0);
}