Ejemplo n.º 1
0
	!IsModuleInstalled("controller")
	&& $_SERVER["REQUEST_METHOD"] == "POST"
	&& (strlen($controller_remove) > 0 && strlen($controller_save_proxy) <= 0)
	&& $USER->IsAdmin()
	&& check_freetrix_sessid()
	&& COption::GetOptionString("main", "controller_member", "N") == "Y"
)
{
	$controller_url = COption::GetOptionString("main", "controller_url", "");
	if(strlen($controller_login)<=0 || strlen($controller_password)<=0)
	{
		LocalRedirect($controller_url."/freetrix/admin/controller_member_edit.php?lang=".LANGUAGE_ID.'&act=unregister&member_id='.urlencode(COption::GetOptionString("main", "controller_member_id", "")).'&back_url='.urlencode(($APPLICATION->IsHTTPS()?"https://":"http://").$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']));
	}
	else
	{
		if(!CControllerClient::RemoveFromController($controller_login, $controller_password))
		{
			if($_REQUEST['remove_anywhere'] == 'Y')
			{
				CControllerClient::Unlink();
			}
			else
			{
				$bControllerRemoveError = true;
				if ($e = $APPLICATION->GetException())
					$message = new CAdminMessage(GetMessage("MAIN_ERROR_SAVING"), $e);
			}
		}
	}
}
if($message)
Ejemplo n.º 2
0
                if ($e = $APPLICATION->GetException()) {
                    $message = new CAdminMessage(GetMessage("MAIN_ERROR_SAVING"), $e);
                }
            }
        }
    } else {
        $message = new CAdminMessage(GetMessage("main_options_url_error"));
    }
}
$bControllerRemoveError = false;
if (!IsModuleInstalled("controller") && $_SERVER["REQUEST_METHOD"] == "POST" && ($_POST["controller_remove"] != '' && $_POST["controller_save_proxy"] == '') && $USER->IsAdmin() && check_bitrix_sessid() && COption::GetOptionString("main", "controller_member", "N") == "Y") {
    $controller_url = COption::GetOptionString("main", "controller_url", "");
    if ($_POST["controller_login"] == '' || $_POST["controller_password"] == '') {
        LocalRedirect($controller_url . "/bitrix/admin/controller_member_edit.php?lang=" . LANGUAGE_ID . '&act=unregister&member_id=' . urlencode(COption::GetOptionString("main", "controller_member_id", "")) . '&back_url=' . urlencode(($APPLICATION->IsHTTPS() ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
    } else {
        if (!CControllerClient::RemoveFromController($_POST["controller_login"], $_POST["controller_password"])) {
            if ($_REQUEST['remove_anywhere'] == 'Y') {
                CControllerClient::Unlink();
            } else {
                $bControllerRemoveError = true;
                if ($e = $APPLICATION->GetException()) {
                    $message = new CAdminMessage(GetMessage("MAIN_ERROR_SAVING"), $e);
                }
            }
        }
    }
}
if ($message) {
    echo $message->Show();
}
?>