public static function manage_site_registration() { global $nelioab_admin_controller; if (isset($_POST['nelioab_registration_action'])) { $action = $_POST['nelioab_registration_action']; try { switch ($action) { case 'register': $type = 'unknown'; if (isset($_POST['nelioab_registration_type'])) { $type = $_POST['nelioab_registration_type']; } $sector = 'unknown'; if (isset($_POST['nelioab_registration_sector'])) { $sector = $_POST['nelioab_registration_sector']; } NelioABAccountSettings::register_this_site($type, $sector); $nelioab_admin_controller->message = __('This site has been successfully activated in your account.', 'nelioab'); break; case 'deregister': NelioABAccountSettings::deregister_this_site(); $nelioab_admin_controller->message = __('This site is no longer active in your account.', 'nelioab'); case 'unlink': NelioABAccountSettings::unlink_this_site(); $nelioab_admin_controller->message = __('The site is no longer linked to any of your other active sites. If you have free slots, you may now activate it as a completely different and new site.', 'nelioab'); } } catch (Exception $e) { require_once NELIOAB_ADMIN_DIR . '/error-controller.php'; NelioABErrorController::build($e); } } }