Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php defined("\x5f\x4a\105\130\x45\x43") or die; jimport("\152\x6f\x6f\x6d\154\141\..

Decoded Output download

<?php 
 
 
defined("_JEXEC") or die; 
jimport("joomla.application.component.controllerform"); 
class Miniorange_samlControllerMyaccount extends JControllerForm 
{ 
    function __construct() 
    { 
        $this->view_list = "myaccounts"; 
        parent::__construct(); 
    } 
    function verifyCustomer() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto ps; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account"); 
        return; 
        ps: 
        if (Mo_Saml_Local_Util::check_empty_or_null($post["email"]) || Mo_Saml_Local_Util::check_empty_or_null($post["password"])) { 
            goto Xz; 
        } 
        $SY = $post["email"]; 
        $CK = $post["password"]; 
        goto A2; 
        Xz: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", "All the fields are required. Please enter valid entries.", "error"); 
        A2: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("email") . " = " . $SW->quote($SY)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        $i3 = new Mo_saml_Local_Customer(); 
        $p1 = $i3->get_customer_key($CK); 
        $lK = json_decode($p1, true); 
        if (strcasecmp($lK["apiKey"], "CURL_ERROR") == 0) { 
            goto EY; 
        } 
        if (json_last_error() == JSON_ERROR_NONE) { 
            goto Se; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", "Invalid username or password. Please try again.", "error"); 
        goto l0; 
        Se: 
        $this->save_success_customer_config($lK["id"], $lK["apiKey"], $lK["token"], $lK["phone"], "Your account has been retrieved successfully."); 
        l0: 
        goto gL; 
        EY: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $lK["token"], "error"); 
        gL: 
    } 
    function save_success_customer_config($ui, $Q4, $BS, $UX, $qJ) 
    { 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("customer_key") . " = " . $SW->quote($ui), $SW->quoteName("api_key") . " = " . $SW->quote($Q4), $SW->quoteName("customer_token") . " = " . $SW->quote($BS), $SW->quoteName("admin_phone") . " = " . $SW->quote($UX), $SW->quoteName("login_status") . " = " . $SW->quote(0), $SW->quoteName("new_registration") . " = " . $SW->quote(0)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        $zz = $SW->getQuery(true); 
        $TY = "Your account has been retrieved successfully."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY); 
    } 
    function generateCustomCertificate() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto je; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=custom_certificate"); 
        return; 
        je: 
        $EX = UtilitiesSAML::getCustomerDetails(); 
        $l7 = $EX["status"]; 
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "true")) { 
            goto WQ; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml", "You have not activated your license yet.", "error"); 
        return; 
        WQ: 
        $OA = UtilitiesSAML::isIDPConfigured(); 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($OA) == 0)) { 
            goto fF; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Please configure Service Provider Setup tab to upload the certificate.", "error"); 
        return; 
        fF: 
        if (!(isset($post["submit"]) && $post["submit"] == "Generate Self-Signed Certs")) { 
            goto Ig; 
        } 
        $vP = $post["mo_saml_country_code_text"]; 
        if (!(strlen($vP) != 2 || ctype_lower($vP))) { 
            goto f4; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=custom_certificate", "Please enter a valid county code.", "error"); 
        return; 
        f4: 
        $sn = isset($post["generate_cust_certificate_option"]) ? $post["generate_cust_certificate_option"] : ''; 
        if (!($sn == "miniorange_saml_generate_custom_certificate")) { 
            goto kQ; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("mo_saml_country_code_text") . " = " . $SW->quote(isset($post["mo_saml_country_code_text"]) ? $post["mo_saml_country_code_text"] : null), $SW->quoteName("mo_saml_certificate_state_name") . " = " . $SW->quote(isset($post["mo_saml_certificate_state_name"]) ? $post["mo_saml_certificate_state_name"] : null), $SW->quoteName("mo_saml_certificate_company_name") . " = " . $SW->quote(isset($post["mo_saml_certificate_company_name"]) ? $post["mo_saml_certificate_company_name"] : null), $SW->quoteName("miniorange_saml_unit_name") . " = " . $SW->quote(isset($post["miniorange_saml_unit_name"]) ? $post["miniorange_saml_unit_name"] : null), $SW->quoteName("mo_saml_certificate_common_name") . " = " . $SW->quote(isset($post["mo_saml_certificate_common_name"]) ? $post["mo_saml_certificate_common_name"] : null), $SW->quoteName("mo_saml_select_digest_algo") . " = " . $SW->quote(isset($post["mo_saml_select_digest_algo"]) ? $post["mo_saml_select_digest_algo"] : 0), $SW->quoteName("mo_saml_select_private_key_bit") . " = " . $SW->quote(isset($post["mo_saml_select_private_key_bit"]) ? $post["mo_saml_select_private_key_bit"] : 0), $SW->quoteName("mo_saml_select_valid_days") . " = " . $SW->quote(isset($post["mo_saml_select_valid_days"]) ? $post["mo_saml_select_valid_days"] : 0)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        $Ko = UtilitiesSAML::getCustomerDetails(); 
        $Ko = $Ko["email"]; 
        $T9 = isset($Ko) ? $Ko : ''; 
        $vP = $post["mo_saml_country_code_text"]; 
        $k_ = $post["mo_saml_certificate_state_name"]; 
        $WL = $post["mo_saml_certificate_company_name"]; 
        $aY = $post["miniorange_saml_unit_name"]; 
        $ay = $post["mo_saml_certificate_common_name"]; 
        $Pe = $post["mo_saml_select_digest_algo"]; 
        $T_ = $post["mo_saml_select_private_key_bit"]; 
        $Xv = $post["mo_saml_select_valid_days"]; 
        $Nt = array("countryName" => $vP, "stateOrProvinceName" => $k_, "organizationName" => $WL, "organizationalUnitName" => $aY, "commonName" => $ay, "emailAddress" => $T9); 
        UtilitiesSAML::generateCertificate($Nt, $Pe, $T_, $Xv); 
        $ru = "Your certificates has been generated successfully. Please update your Identity Provider configuration with new certificate."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=custom_certificate", $ru); 
        kQ: 
        Ig: 
    } 
    function check() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto S3; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account"); 
        return; 
        S3: 
        $La = isset($post["key"]) ? $post["key"] : ''; 
        if ($La) { 
            goto ez; 
        } 
        $TY = "Error activating your license. Please try again or contact<a href="mailto:[email protected]"> [email protected]</a>"; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY, "error"); 
        goto q2; 
        ez: 
        $La = trim(preg_replace("/\s+/", '', $La)); 
        $i3 = new Mo_saml_Local_Customer(); 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $Q4 = isset($EX["api_key"]) ? $EX["api_key"] : ''; 
        $lK = isset($EX["customer_key"]) ? $EX["customer_key"] : ''; 
        $Pd = json_decode($i3->ccl($lK, $Q4), true); 
        $go = 0; 
        $co = 0; 
        $xt = "joomla_saml_sso_enterprise_plan"; 
        $u9 = isset($Pd["trial"]) ? $Pd["trial"] : ''; 
        $u9 = Mo_saml_Local_Util::encrypt_value($u9); 
        $sL = 0; 
        if (!(!isset($Pd["status"]) || empty($Pd["status"]))) { 
            goto GC; 
        } 
        $TY = isset($Pd["message"]) && !empty($Pd["message"]) ? $Pd["message"] : "Your license is not found"; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY, "error"); 
        return; 
        GC: 
        if (!($Pd["status"] != "SUCCESS")) { 
            goto Au; 
        } 
        $TY = isset($Pd["message"]) ? $Pd["message"] : "Invalid license! Please use a valid license key to activate the plugin."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY, "error"); 
        return; 
        Au: 
        if (!($Pd["status"] == "SUCCESS")) { 
            goto V_; 
        } 
        $go = isset($Pd["licenseExpiry"]) ? $Pd["licenseExpiry"] : 0; 
        $co = isset($Pd["supportExpiry"]) ? $Pd["supportExpiry"] : 0; 
        $xt = isset($Pd["licensePlan"]) ? $Pd["licensePlan"] : ''; 
        $sL = isset($Pd["noOfSP"]) ? $Pd["noOfSP"] : 0; 
        V_: 
        $ak = $i3->check($La); 
        if (strcasecmp($ak["status"], "SUCCESS") == 0) { 
            goto E4; 
        } 
        if (strcasecmp($ak["isExpired"], "1") == 0) { 
            goto X6; 
        } 
        $TY = $ak["message"] . "Please try with different key or contact<a href="mailto:[email protected]"> [email protected]</a>."; 
        goto zq; 
        X6: 
        $TY = "Your license key is expired. Please try with different key or contact<a href="mailto:[email protected]"> [email protected] </a>"; 
        zq: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY, "error"); 
        goto vS; 
        E4: 
        $hL = Mo_saml_Local_Util::encrypt($La); 
        $gY = JURI::root() . $hL; 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("status") . " = " . $SW->quote(Mo_saml_Local_Util::encrypt("true")), $SW->quoteName("sml_lk") . " = " . $SW->quote(Mo_saml_Local_Util::encrypt($La)), $SW->quoteName("in_cmp") . " = " . $SW->quote(Mo_saml_Local_Util::encrypt($gY)), $SW->quoteName("licenseExpiry") . " = " . $SW->quote($go), $SW->quoteName("supportExpiry") . " = " . $SW->quote($co), $SW->quoteName("licensePlan") . " = " . $SW->quote($xt), $SW->quoteName("trists") . " = " . $SW->quote($u9), $SW->quoteName("noSP") . " = " . $SW->quote($sL)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        UtilitiesSAML::createAndUpdateUpgardeUrl(); 
        $TY = "Your license has been verified."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY); 
        vS: 
        q2: 
    } 
    function updateLoginFlow() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto hr; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=sso_settings"); 
        return; 
        hr: 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $l7 = isset($EX["status"]) ? $EX["status"] : ''; 
        if (!(!Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "true")) { 
            goto Hc; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml", "Please register and activate your license to save your configurations.", "error"); 
        return; 
        Hc: 
        $qW = isset($post["enable_redirect"]) ? $post["enable_redirect"] : 0; 
        $cY = isset($post["user_login_for_other_domains"]) ? $post["user_login_for_other_domains"] : "BLOCK"; 
        $Dy = isset($post["mo_idp_link_page"]) ? $post["mo_idp_link_page"] : ''; 
        $st = isset($post["mo_idp_list_link_page"]) ? $post["mo_idp_list_link_page"] : ''; 
        $eU = isset($post["ignore_special_characters"]) ? $post["ignore_special_characters"] : 0; 
        $LJ = isset($post["enable_manager_login"]) ? $post["enable_manager_login"] : 0; 
        $Hs = isset($post["enable_admin_redirect"]) ? $post["enable_admin_redirect"] : 0; 
        $XX = isset($post["mo_admin_idp_link_page"]) ? $post["mo_admin_idp_link_page"] : ''; 
        $I1 = isset($post["enable_email"]) ? $post["enable_email"] : FALSE; 
        $kE = isset($post["enable_admin_child_redirect"]) ? $post["enable_admin_child_redirect"] : 0; 
        $FP = isset($post["enable_manager_child_login"]) ? $post["enable_manager_child_login"] : 0; 
        $qU = isset($post["enable_do_not_auto_creation"]) ? $post["enable_do_not_auto_creation"] : 0; 
        if (!($qW && empty($Dy) && filter_var($Dy, FILTER_VALIDATE_URL) === FALSE)) { 
            goto xX; 
        } 
        $ru = "Please enter valid redirect URL."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=sso_settings", $ru, "error"); 
        return; 
        xX: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("enable_redirect") . " = " . $SW->quote($qW), $SW->quoteName("user_login_for_other_domains") . " = " . $SW->quote($cY), $SW->quoteName("idp_link_page") . " = " . $SW->quote($Dy), $SW->quoteName("mo_idp_list_link_page") . " = " . $SW->quote($st), $SW->quoteName("enable_manager_login") . " = " . $SW->quote($LJ), $SW->quoteName("enable_admin_redirect") . " = " . $SW->quote($Hs), $SW->quoteName("mo_admin_idp_list_link_page") . " = " . $SW->quote($XX), $SW->quoteName("ignore_special_characters") . " = " . $SW->quote($eU), $SW->quoteName("enable_email") . " = " . $SW->quote($I1), $SW->quoteName("enable_admin_child_login") . " = " . $SW->quote($kE), $SW->quoteName("enable_manager_child_login") . " = " . $SW->quote($FP), $SW->quoteName("enable_do_not_auto_create_users") . " = " . $SW->quote($qU)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        $ru = "Your configuration has been saved successfully."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=sso_settings", $ru); 
    } 
    function fetchLicense() 
    { 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $lK = isset($EX["customer_key"]) ? $EX["customer_key"] : ''; 
        $Q4 = isset($EX["api_key"]) ? $EX["api_key"] : ''; 
        $i3 = new Mo_saml_Local_Customer(); 
        $Pd = json_decode($i3->ccl($lK, $Q4), true); 
        $L6 = $Pd["licenseExpiry"]; 
        $h9 = $Pd["supportExpiry"]; 
        $HI = Mo_saml_Local_Util::encrypt_value($Pd["trial"]); 
        $X4 = $Pd["noOfSP"]; 
        $z9 = UtilitiesSAML::getExpiryDate(); 
        $oJ = strtotime($z9["licenseExpiry"]); 
        $u4 = strtotime($z9["supportExpiry"]); 
        $n4 = $z9["trists"]; 
        $sL = $z9["noSP"]; 
        $sl = isset($EX["miniorange_lexp_notification_sent"]) ? $EX["miniorange_lexp_notification_sent"] : 0; 
        if (!$sl) { 
            goto cl; 
        } 
        $ua = "#__miniorange_saml_customer_details"; 
        $tv = array("miniorange_fifteen_days_before_lexp" => 0, "miniorange_five_days_before_lexp" => 0, "miniorange_after_lexp" => 0, "miniorange_after_five_days_lexp" => 0, "miniorange_lexp_notification_sent" => 0); 
        UtilitiesSAML::__genDBUpdate($ua, $tv); 
        cl: 
        if (!(strtotime($L6) > $oJ)) { 
            goto g1; 
        } 
        $ua = "#__miniorange_saml_customer_details"; 
        $tv = array("licenseExpiry" => $L6); 
        UtilitiesSAML::__genDBUpdate($ua, $tv); 
        g1: 
        if (!(strtotime($h9) > $u4)) { 
            goto bj; 
        } 
        $ua = "#__miniorange_saml_customer_details"; 
        $tv = array("supportExpiry" => $h9); 
        UtilitiesSAML::__genDBUpdate($ua, $tv); 
        bj: 
        if (!($HI != $n4)) { 
            goto bH; 
        } 
        $ua = "#__miniorange_saml_customer_details"; 
        $tv = array("trists" => $HI); 
        UtilitiesSAML::__genDBUpdate($ua, $tv); 
        bH: 
        if (!($X4 != $sL)) { 
            goto XS; 
        } 
        $ua = "#__miniorange_saml_customer_details"; 
        $tv = array("noSP" => $X4); 
        UtilitiesSAML::__genDBUpdate($ua, $tv); 
        XS: 
        $b4 = JFactory::getApplication(); 
        $b4->enqueueMessage("Successfully fetched the license.", "success"); 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account"); 
    } 
    function addlicensedetails($La) 
    { 
        $hL = Mo_saml_Local_Util::encrypt($La); 
        $gY = JURI::root() . $hL; 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("status") . " = " . $SW->quote(Mo_saml_Local_Util::encrypt("true")), $SW->quoteName("sml_lk") . " = " . $SW->quote(Mo_saml_Local_Util::encrypt($La)), $SW->quoteName("in_cmp") . " = " . $SW->quote(Mo_saml_Local_Util::encrypt($gY)), $SW->quoteName("licenseExpiry") . " = " . $SW->quote($go), $SW->quoteName("supportExpiry") . " = " . $SW->quote($co), $SW->quoteName("licensePlan") . " = " . $SW->quote($xt), $SW->quoteName("trists") . " = " . $SW->quote($u9)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        UtilitiesSAML::createAndUpdateUpgardeUrl(); 
        $TY = "Your license has been verified."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY); 
    } 
    function getGroupMapping() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (isset($post["saml_idp_list"])) { 
            goto T1; 
        } 
        $QQ = "index.php?option=com_miniorange_saml&tab=group_mapping"; 
        $this->setRedirect($QQ); 
        return; 
        goto dr; 
        T1: 
        $QQ = "index.php?option=com_miniorange_saml&tab=group_mapping&current_idp_id=" . $post["saml_idp_list"]; 
        $this->setRedirect($QQ); 
        dr: 
    } 
    function saveCustomCertificate() 
    { 
        $OA = UtilitiesSAML::isIDPConfigured(); 
        if (!(count($OA) == 0)) { 
            goto cC; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Please configure Service Provider Setup tab to upload the certificate.", "error"); 
        return; 
        cC: 
        $EX = UtilitiesSAML::getCustomerDetails(); 
        $post = JFactory::getApplication()->input->post->getArray(); 
        $l7 = $EX["status"]; 
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "true")) { 
            goto Ol; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml", "You have not activated your license yet.", "error"); 
        return; 
        Ol: 
        if (isset($post["submit"]) && $post["submit"] == "Upload") { 
            goto hq; 
        } 
        if (isset($post["submit"]) && $post["submit"] == "Remove") { 
            goto y3; 
        } 
        goto xo; 
        hq: 
        $sn = isset($post["cust_certificate_option"]) ? $post["cust_certificate_option"] : ''; 
        if (!($sn == "miniorange_saml_save_custom_certificate")) { 
            goto zg; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("public_certificate") . " = " . $SW->quote(isset($post["public_certificate"]) ? $post["public_certificate"] : null), $SW->quoteName("private_certificate") . " = " . $SW->quote(isset($post["private_certificate"]) ? $post["private_certificate"] : null)); 
        $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        $ue = UtilitiesSAML::getCustom_CertificatePath("CustomPublicCertificate.crt"); 
        $kN = fopen($ue, "w"); 
        $Bd = $post["public_certificate"]; 
        fwrite($kN, $Bd); 
        $ue = UtilitiesSAML::getCustom_CertificatePath("CustomPrivateCertificate.key"); 
        $kN = fopen($ue, "w"); 
        $Bd = $post["private_certificate"]; 
        fwrite($kN, $Bd); 
        $ru = "Your certificates has been saved successfully."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=custom_certificate", $ru); 
        zg: 
        goto xo; 
        y3: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("public_certificate") . " = " . $SW->quote(''), $SW->quoteName("private_certificate") . " = " . $SW->quote('')); 
        $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        $ru = "Your certificates has been removed successfully."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=custom_certificate", $ru); 
        xo: 
    } 
    function getIdpAttributes() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (isset($post["saml_idp_list"])) { 
            goto Gd; 
        } 
        $QQ = "index.php?option=com_miniorange_saml&tab=attribute_mapping"; 
        $this->setRedirect($QQ); 
        return; 
        goto i6; 
        Gd: 
        $QQ = "index.php?option=com_miniorange_saml&tab=attribute_mapping&idp_name_attr=" . $post["saml_idp_list"]; 
        $this->setRedirect($QQ); 
        i6: 
    } 
    function saveDomainMapping() 
    { 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select("COUNT(*)"); 
        $zz->from($SW->quoteName("#__miniorange_saml_config")); 
        $SW->setQuery($zz); 
        $OS = $SW->loadResult(); 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (isset($OS) && $OS > 0) { 
            goto il; 
        } 
        $ru = "Please add IDP Configuration first."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=domain_mapping", $ru, "error"); 
        goto XJ; 
        il: 
        $W4 = array(); 
        $W4 = $post; 
        $j1 = array(); 
        foreach ($W4 as $N5 => $n4) { 
            $QE = $this->array_has_dupes($W4); 
            if ($QE) { 
                goto de; 
            } 
            $wk = str_replace("saml_domain_mapping_", '', $N5); 
            $zz = $SW->getQuery(true); 
            $lp = array($SW->quoteName("domain_mapping") . " = " . $SW->quote($n4)); 
            $Uh = array($SW->quoteName("idp_name") . " = " . $SW->quote($wk)); 
            $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp)->where($Uh); 
            $SW->setQuery($zz); 
            $SW->execute(); 
            goto W9; 
            de: 
            $ru = "Duplicate entry not allowed."; 
            $this->setRedirect("index.php?option=com_miniorange_saml&tab=domain_mapping", $ru, "error"); 
            return; 
            W9: 
            Nm: 
        } 
        cF: 
        $ru = "Domain Mapping has been saved successfully."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=domain_mapping", $ru); 
        XJ: 
    } 
    function array_has_dupes($p5) 
    { 
        return count($p5) !== count(array_unique($p5)); 
    } 
    function deleteCurrentIdp() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto yi; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp"); 
        return; 
        yi: 
        if (isset($post["idp_id"]) && $post["idp_id"] > 0) { 
            goto Xq; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "IDP Configuration could not be deleted. Please try again."); 
        return; 
        goto OM; 
        Xq: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $Uh = array($SW->quoteName("id") . " = " . $SW->quote($post["idp_id"])); 
        $zz->delete($SW->quoteName("#__miniorange_saml_config")); 
        $zz->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        $zz = $SW->getQuery(true); 
        $Uh = array($SW->quoteName("idp_id") . " = " . $SW->quote($post["idp_id"])); 
        $zz->delete($SW->quoteName("#__miniorange_saml_role_mapping")); 
        $zz->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        if ($OS) { 
            goto uW; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "No IDP found. Please try again."); 
        return; 
        goto we; 
        uW: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "IDP Configuration deleted successfully."); 
        return; 
        we: 
        OM: 
    } 
    function cancelIdpConfig() 
    { 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp"); 
        return; 
    } 
    function addNewIDP() 
    { 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $l7 = $EX["status"]; 
        if (!Mo_Saml_Local_Util::is_customer_registered() || Mo_Saml_Local_Util::check($l7) != "true") { 
            goto H8; 
        } 
        $lK = $EX["customer_key"]; 
        $Q4 = $EX["api_key"]; 
        $this->checkCL($lK, $Q4, 1); 
        goto Ze; 
        H8: 
        $this->setRedirect("index.php?option=com_miniorange_saml", "Please register and activate your license to add IDP.", "error"); 
        return; 
        Ze: 
    } 
    function checkCL($lK, $Q4, $F9) 
    { 
        $i3 = new Mo_saml_Local_Customer(); 
        $ak = json_decode($i3->ccl($lK, $Q4), true); 
        if (isset($ak["status"]) && $ak["status"] == "SUCCESS") { 
            goto zm; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml", "License not found. Please contact at<a href="mailto:[email protected]"> [email protected]</a> to upgrade your license.", "error"); 
        return true; 
        goto ET; 
        zm: 
        if ($ak["noOfSP"] === 0 || empty($ak["noOfSP"])) { 
            goto lU; 
        } 
        $EV = $ak["noOfSP"]; 
        goto BW; 
        lU: 
        $EV = 1; 
        BW: 
        $fB = Mo_Saml_Local_Util::getSAMLCount(); 
        if ($fB < $EV) { 
            goto F9; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "You have purchased the license for " . $EV . " IDPs. Please contact at<a href="mailto:[email protected]"> [email protected]</a> to upgrade the license if you want to add more IDPs.", "error"); 
        return true; 
        goto ca; 
        F9: 
        if ($F9) { 
            goto an; 
        } 
        return false; 
        goto nJ; 
        an: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp&id=0", "Please add new IDP details."); 
        return true; 
        nJ: 
        ca: 
        ET: 
    } 
    function insert_new_idp($post) 
    { 
        $qN = isset($post["saml_x509_certificate"]) ? $post["saml_x509_certificate"] : ''; 
        if (!is_array($qN)) { 
            goto rX; 
        } 
        $V1 = implode(";", $qN); 
        rX: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $TQ = array("idp_name", "idp_entity_id", "single_signon_service_url", "certificate", "binding", "single_logout_url", "default_relay_state", "mo_saml_select_sign_algo", "saml_request_sign", "name_id_format", "miniorange_saml_idp_slo_binding"); 
        $N6 = array($SW->quote($post["idp_name"]), $SW->quote($post["idp_entity_id"]), $SW->quote($post["single_signon_service_url"]), $SW->quote(Mo_Saml_Local_Util::sanitize_certificate($V1)), $SW->quote($post["miniorange_saml_idp_sso_binding"]), $SW->quote($post["single_logout_url"]), $SW->quote($post["mo_saml_select_sign_algo"]), $SW->quote($post["default_relay_state"]), $SW->quote($post["saml_request_sign"]), $SW->quote($post["name_id_format"]), $SW->quote($post["miniorange_saml_idp_slo_binding"])); 
        $zz->insert($SW->quoteName("#__miniorange_saml_config"))->columns($SW->quoteName($TQ))->values(implode(",", $N6)); 
        $SW->setQuery($zz); 
        $SW->execute(); 
    } 
    function update_existing_idp($post) 
    { 
        $qN = isset($post["saml_x509_certificate"]) ? $post["saml_x509_certificate"] : ''; 
        if (!is_array($qN)) { 
            goto HO; 
        } 
        $V1 = implode(";", $qN); 
        HO: 
        if (!(count($post) == 0)) { 
            goto zs; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp"); 
        return; 
        zs: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("idp_name") . " = " . $SW->quote(isset($post["idp_name"]) ? $post["idp_name"] : ''), $SW->quoteName("idp_entity_id") . " = " . $SW->quote(isset($post["idp_entity_id"]) ? $post["idp_entity_id"] : ''), $SW->quoteName("single_signon_service_url") . " = " . $SW->quote(isset($post["single_signon_service_url"]) ? $post["single_signon_service_url"] : ''), $SW->quoteName("certificate") . " = " . $SW->quote($V1), $SW->quoteName("binding") . " = " . $SW->quote(isset($post["miniorange_saml_idp_sso_binding"]) ? $post["miniorange_saml_idp_sso_binding"] : "HTTP-Redirect"), $SW->quoteName("single_logout_url") . " = " . $SW->quote(isset($post["single_logout_url"]) ? $post["single_logout_url"] : ''), $SW->quoteName("default_relay_state") . " = " . $SW->quote(isset($post["default_relay_state"]) ? $post["default_relay_state"] : ''), $SW->quoteName("mo_saml_select_sign_algo") . " = " . $SW->quote(isset($post["mo_saml_select_sign_algo"]) ? $post["mo_saml_select_sign_algo"] : "RSA_SHA256"), $SW->quoteName("saml_request_sign") . " = " . $SW->quote(isset($post["saml_request_sign"]) ? $post["saml_request_sign"] : ''), $SW->quoteName("name_id_format") . " = " . $SW->quote(isset($post["name_id_format"]) ? $post["name_id_format"] : "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"), $SW->quoteName("miniorange_saml_idp_slo_binding") . " = " . $SW->quote(isset($post["miniorange_saml_idp_slo_binding"]) ? $post["miniorange_saml_idp_slo_binding"] : "HTTP-Redirect"), $SW->quoteName("AuthnContextClassRef") . " = " . $SW->quote(isset($post["mo_authn_contex_class"]) ? $post["mo_authn_contex_class"] : "PasswordProtectdTransport")); 
        $Uh = array($SW->quoteName("id") . " = " . $SW->quote($post["idp_id"])); 
        $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
    } 
    function importexport($ca = false) 
    { 
        $OA = UtilitiesSAML::isIDPConfigured(); 
        if (!(count($OA) == 0)) { 
            goto XC; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Please configure atleast Service Provider Setup Tab to download the configuration.", "error"); 
        return; 
        XC: 
        require_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "helpers" . DIRECTORY_SEPARATOR . "export.php"; 
        define("Tab_Class_Names", serialize(array("idp_info" => "mo_idp_info", "role_mapping" => "mo_role_mapping", "attribute_mapping" => "mo_attribute_mapping", "login settings" => "mo_login_setting"))); 
        $ed = unserialize(Tab_Class_Names); 
        $m0 = array(); 
        $pb = 0; 
        Sn: 
        if (!(count($OA) > $pb)) { 
            goto MT; 
        } 
        $m0[$pb] = array("id" => $OA[$pb]->id); 
        foreach ($ed as $N5 => $n4) { 
            $m0[$pb][$N5] = $this->mo_get_configuration_array($n4, $m0[$pb]["id"]); 
            yf: 
        } 
        sh: 
        ro: 
        $pb++; 
        goto Sn; 
        MT: 
        if (!$m0) { 
            goto C3; 
        } 
        $LX = json_encode($m0, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); 
        if (!$ca) { 
            goto W2; 
        } 
        return $LX; 
        W2: 
        header("Content-Disposition: attachment; filename=miniorange-saml-sp-config.json"); 
        echo $LX; 
        exit; 
        C3: 
        return; 
    } 
    function updateOrganizationDetails() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        $C1 = isset($post["organization_name"]) ? $post["organization_name"] : ''; 
        $jx = isset($post["organization_display_name"]) ? $post["organization_display_name"] : ''; 
        $hj = isset($post["organization_url"]) ? $post["organization_url"] : ''; 
        $gp = isset($post["tech_per_name"]) ? $post["tech_per_name"] : ''; 
        $kH = isset($post["tech_email_add"]) ? $post["tech_email_add"] : ''; 
        $Qp = isset($post["support_per_name"]) ? $post["support_per_name"] : ''; 
        $eK = isset($post["support_email_add"]) ? $post["support_email_add"] : ''; 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $Rv = array($SW->quoteName("organization_name") . " = " . $SW->quote($C1), $SW->quoteName("organization_display_name") . " = " . $SW->quote($jx), $SW->quoteName("organization_url") . " = " . $SW->quote($hj), $SW->quoteName("tech_per_name") . " = " . $SW->quote($gp), $SW->quoteName("tech_email_add") . " = " . $SW->quote($kH), $SW->quoteName("support_per_name") . " = " . $SW->quote($Qp), $SW->quoteName("support_email_add") . " = " . $SW->quote($eK)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($Rv)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=description", "Successfully updated oraganization details"); 
    } 
    function mo_get_configuration_array($dd, $JJ) 
    { 
        if (!($dd == "mo_idp_info")) { 
            goto Bf; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select(array("*")); 
        $zz->from($SW->quoteName("#__miniorange_saml_config")); 
        $zz->where($SW->quoteName("id") . " =" . $JJ); 
        $SW->setQuery($zz); 
        $OA = $SW->loadAssoc(); 
        Bf: 
        if (!($dd == "mo_attribute_mapping")) { 
            goto Ir; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select(array("*")); 
        $zz->from($SW->quoteName("#__miniorange_saml_config")); 
        $zz->where($SW->quoteName("id") . " =" . $this->get_idp_id($JJ)); 
        $SW->setQuery($zz); 
        $OA = $SW->loadAssoc(); 
        Ir: 
        if (!($dd == "mo_role_mapping")) { 
            goto rk; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select(array("*")); 
        $zz->from($SW->quoteName("#__miniorange_saml_role_mapping")); 
        $zz->where($SW->quoteName("idp_id") . " =" . $this->get_idp_id($JJ)); 
        $SW->setQuery($zz); 
        $OA = $SW->loadAssoc(); 
        rk: 
        if (!($dd == "mo_login_setting")) { 
            goto Rx; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select(array("*")); 
        $zz->from($SW->quoteName("#__miniorange_saml_customer_details")); 
        $zz->where($SW->quoteName("id") . " =1"); 
        $SW->setQuery($zz); 
        $OA = $SW->loadAssoc(); 
        Rx: 
        $YC = call_user_func($dd . "::getConstants"); 
        $nJ = array(); 
        foreach ($YC as $N5 => $n4) { 
            if (empty($OA)) { 
                goto P1; 
            } 
            if (empty($OA[$n4])) { 
                goto gI; 
            } 
            $nJ[$N5] = $OA[$n4]; 
            gI: 
            P1: 
            F2: 
        } 
        P6: 
        return $nJ; 
    } 
    function get_idp_id($ui) 
    { 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select(array("*")); 
        $zz->from($SW->quoteName("#__miniorange_saml_config")); 
        $zz->where($SW->quoteName("id") . " = " . $ui); 
        $SW->setQuery($zz); 
        $OA = $SW->loadAssoc(); 
        return $OA["id"]; 
    } 
    function import() 
    { 
        $op = @file_get_contents($_FILES["configuration_file"]["tmp_name"]); 
        $lQ = json_decode($op, true); 
        if (!empty($lQ)) { 
            goto Zx; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Please select/choose the .json file to import the Configuration", "error"); 
        return; 
        Zx: 
        $pb = 0; 
        Cp: 
        if (!($pb < count($lQ))) { 
            goto hX; 
        } 
        $Fh = $this->mo_update_configuration_array($lQ[$pb]); 
        zj: 
        $pb++; 
        goto Cp; 
        hX: 
        if (!empty($Fh) || $Fh != NULL) { 
            goto aG; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Sucessfully Updated the configuration"); 
        goto ke; 
        aG: 
        if (!($Fh == false)) { 
            goto QK; 
        } 
        $EV = UtilitiesSAML::nOfSP(); 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "You have purchased the license for " . $EV . " IDPs. Please contact at<a href="mailto:[email protected]"> [email protected]</a> to upgrade the license if you want to add more IDPs.", "error"); 
        QK: 
        ke: 
    } 
    function mo_update_configuration_array($m0) 
    { 
        require_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "helpers" . DIRECTORY_SEPARATOR . "export.php"; 
        define("Tab_Class_Names", serialize(array("idp_info" => "mo_idp_info", "role_mapping" => "mo_role_mapping", "attribute_mapping" => "mo_attribute_mapping", "login settings" => "mo_login_setting"))); 
        $ed = unserialize(Tab_Class_Names); 
        $ui = $m0["id"]; 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select(array("*")); 
        $zz->from($SW->quoteName("#__miniorange_saml_config")); 
        $SW->setQuery($zz); 
        $OA = $SW->loadAssocList(); 
        $Qd = count($OA); 
        $ce = UtilitiesSAML::nOfSP(); 
        if (!($ce === 0)) { 
            goto zW; 
        } 
        $EV = 1; 
        zW: 
        $Wy = mo_idp_info::getConstants(); 
        $g5 = false; 
        $pb = 0; 
        Yn: 
        if (!($pb < count($OA))) { 
            goto hp; 
        } 
        $g5 = true; 
        foreach ($Wy as $N5 => $n4) { 
            if (!($OA[$pb][$N5] != $m0["idp_info"][$N5])) { 
                goto Gm; 
            } 
            $g5 = false; 
            Gm: 
            qV: 
        } 
        g9: 
        if (!$g5) { 
            goto qj; 
        } 
        return; 
        qj: 
        yg: 
        $pb++; 
        goto Yn; 
        hp: 
        if (!(count($OA) > $ce)) { 
            goto T9; 
        } 
        return false; 
        T9: 
        foreach ($ed as $KS => $dd) { 
            $lp = array(); 
            $N6 = array(); 
            $TQ = array(); 
            $Pq = 0; 
            $ui = Mo_saml_Local_Util::get_last_idp_id(); 
            foreach ($m0[$KS] as $N5 => $n4) { 
                $Pq = 1; 
                if (!($N5 == "idp_id" && $n4 != $ui)) { 
                    goto YP; 
                } 
                $n4 = $ui; 
                YP: 
                $lp[] = $SW->quoteName($N5) . " = " . $SW->quote($n4); 
                $N6[] = $SW->quote($n4); 
                array_push($TQ, $N5); 
                v1: 
            } 
            ON: 
            if (!($dd == "mo_idp_info" && $Pq == 1)) { 
                goto op; 
            } 
            $zz = $SW->getQuery(true); 
            $zz->insert($SW->quoteName("#__miniorange_saml_config"))->columns($SW->quoteName($TQ))->values(implode(",", $N6)); 
            $SW->setQuery($zz); 
            $OS = $SW->execute(); 
            op: 
            if (!($dd == "mo_attribute_mapping" && $Pq == 1)) { 
                goto TV; 
            } 
            $SW = JFactory::getDbo(); 
            $zz = $SW->getQuery(true); 
            $q4 = array($SW->quoteName("id") . " = " . $ui); 
            $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp)->where($q4); 
            $SW->setQuery($zz); 
            $OS = $SW->execute(); 
            TV: 
            if (!($dd == "mo_role_mapping" && $Pq == 1)) { 
                goto id; 
            } 
            $SW = JFactory::getDbo(); 
            $zz = $SW->getQuery(true); 
            $zz->insert($SW->quoteName("#__miniorange_saml_role_mapping"))->columns($SW->quoteName($TQ))->values(implode(",", $N6)); 
            $SW->setQuery($zz); 
            $OS = $SW->execute(); 
            id: 
            if (!($dd == "mo_login_setting" && $Pq == 1)) { 
                goto Ke; 
            } 
            $SW = JFactory::getDbo(); 
            $zz = $SW->getQuery(true); 
            $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($SW->quoteName("id") . " = 1"); 
            $SW->setQuery($zz); 
            $OS = $SW->execute(); 
            Ke: 
            U1: 
        } 
        Ct: 
    } 
    function handle_upload_metadata() 
    { 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $l7 = isset($EX["status"]) ? $EX["status"] : ''; 
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "true")) { 
            goto lX; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "You have not activated your license yet.", "error"); 
        return; 
        lX: 
        require_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "helpers" . DIRECTORY_SEPARATOR . "MetadataReader.php"; 
        $post = JFactory::getApplication()->input->post->getArray(); 
        $kN = $_FILES; 
        if (!(isset($kN["metadata_file"]) || isset($post["metadata_url"]))) { 
            goto a0; 
        } 
        if (!empty($kN["metadata_file"]["tmp_name"])) { 
            goto Vb; 
        } 
        $QQ = filter_var($post["metadata_url"], FILTER_SANITIZE_URL); 
        $Rl = array("ssl" => array("verify_peer" => false, "verify_peer_name" => false)); 
        if (empty($QQ)) { 
            goto Ur; 
        } 
        $kN = file_get_contents($QQ, false, stream_context_create($Rl)); 
        goto MF; 
        Ur: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "No Metadata File/URL Provided.", "error"); 
        return; 
        MF: 
        goto H1; 
        Vb: 
        $kN = @file_get_contents($kN["metadata_file"]["tmp_name"]); 
        H1: 
        $this->upload_metadata($kN); 
        a0: 
    } 
    function upload_metadata($kN) 
    { 
        $yH = 0; 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto Qe; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp"); 
        return; 
        Qe: 
        $eV = new DOMDocument(); 
        $eV->loadXML($kN); 
        restore_error_handler(); 
        $OU = $eV->firstChild; 
        if (!empty($OU)) { 
            goto c8; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Please provide valid metadata.", "error"); 
        return; 
        goto Jg; 
        c8: 
        $qt = new IDPMetadataReader($eV); 
        $m3 = $qt->getIdentityProviders(); 
        if (!empty($m3)) { 
            goto iY; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Please provide valid metadata.", "error"); 
        return; 
        iY: 
        foreach ($m3 as $N5 => $cG) { 
            $wk = isset($post["idp_name"]) ? $post["idp_name"] : ''; 
            $V_ = $cG->getLoginURL("HTTP-Redirect"); 
            $gn = $cG->getEntityID(); 
            $V1 = $cG->getSigningCertificate(); 
            $V1 = implode(";", $V1); 
            $xy = $cG->getLogoutUrl("HTTP-Redirect"); 
            $PP = ''; 
            $yC = "RSA_SHA256"; 
            $HK = ''; 
            $Qi = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"; 
            $Pc = "HTTP-Redirect"; 
            $SW = JFactory::getDbo(); 
            $zz = $SW->getQuery(true); 
            $N6 = array($SW->quote($wk), $SW->quote(!empty($gn) ? $gn : ''), $SW->quote(!empty($V_) ? $V_ : ''), $SW->quote("HTTP-Redirect"), $SW->quote(!empty($V1) ? $V1 : ''), $SW->quote(!empty($xy) ? $xy : ''), $SW->quote($PP), $SW->quote($yC), $SW->quote(isset($post["sync_metadata"]) ? $post["sync_metadata"] : "off"), $SW->quote(isset($post["metadata_url"]) ? $post["metadata_url"] : ''), $SW->quote(isset($post["sync_interval"]) ? $post["sync_interval"] : ''), $SW->quote($yH), $SW->quote($HK), $SW->quote($Qi), $SW->quote($Pc)); 
            $SW->setQuery("SELECT * FROM #__miniorange_saml_config"); 
            $QG = $SW->loadObjectList(); 
            $do = array(); 
            foreach ($QG as $ro => $Qm) { 
                $do[] = $Qm->idp_entity_id; 
                Tm: 
            } 
            rn: 
            $lp = array($SW->quoteName("idp_name") . "=" . $SW->quote($wk), $SW->quoteName("idp_entity_id") . " = " . $SW->quote(!empty($gn) ? $gn : ''), $SW->quoteName("single_signon_service_url") . " = " . $SW->quote(!empty($V_) ? $V_ : ''), $SW->quoteName("binding") . " = " . $SW->quote("HTTP-Redirect"), $SW->quoteName("certificate") . " = " . $SW->quote(!empty($V1) ? $V1 : ''), $SW->quoteName("single_logout_url") . "=" . $SW->quote(!empty($xy) ? $xy : ''), $SW->quoteName("default_relay_state") . "=" . $SW->quote(''), $SW->quoteName("mo_saml_select_sign_algo") . "=" . $SW->quote($yC), $SW->quoteName("auto_sync_enable") . " = " . $SW->quote(isset($post["sync_metadata"]) ? $post["sync_metadata"] : "off"), $SW->quoteName("metadata_url") . " = " . $SW->quote(isset($post["metadata_url"]) ? $post["metadata_url"] : ''), $SW->quoteName("mdata_sync_interval") . " = " . $SW->quote(isset($post["sync_interval"]) ? $post["sync_interval"] : ''), $SW->quoteName("metadata_check_timestamp") . " = " . $SW->quote($yH), $SW->quoteName("saml_request_sign") . " = " . $SW->quote($HK), $SW->quoteName("name_id_format") . " = " . $SW->quote($Qi), $SW->quoteName("miniorange_saml_idp_slo_binding") . " = " . $SW->quote($Pc)); 
            $ui = $post["idp_id"]; 
            $Uh = array($SW->quoteName("id") . " =" . $ui); 
            if ($ui == 0) { 
                goto hi; 
            } 
            $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp)->where($Uh); 
            goto Uv; 
            hi: 
            $TQ = array("idp_name", "idp_entity_id", "single_signon_service_url", "binding", "certificate", "single_logout_url", "default_relay_state", "mo_saml_select_sign_algo", "auto_sync_enable", "metadata_url", "mdata_sync_interval", "metadata_check_timestamp", "saml_request_sign", "name_id_format", "miniorange_saml_idp_slo_binding"); 
            $zz->insert($SW->quoteName("#__miniorange_saml_config"))->columns($SW->quoteName($TQ))->values(implode(",", $N6)); 
            Uv: 
            $SW->setQuery($zz); 
            $SW->execute(); 
            goto Eo; 
            dR: 
        } 
        Eo: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "Identity Provider details saved successfully."); 
        return; 
        Jg: 
    } 
    function saveConfig() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto RS; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp"); 
        return; 
        RS: 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $l7 = $EX["status"]; 
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "true")) { 
            goto M6; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", "You have not activated your license yet.", "error"); 
        return; 
        M6: 
        $tF = isset($post["option1"]) ? $post["option1"] : null; 
        if ($tF == "mo_saml_save_config") { 
            goto sO; 
        } 
        if ($tF == "mo_saml_save_attribute") { 
            goto ap; 
        } 
        if (!($tF == "mo_saml_save_custom_sp_config")) { 
            goto Lu; 
        } 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("sp_base_url") . " = " . $SW->quote(isset($post["sp_base_url"]) ? $post["sp_base_url"] : ''), $SW->quoteName("sp_entity_id") . " = " . $SW->quote(isset($post["sp_entity_id"]) ? $post["sp_entity_id"] : '')); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        $ru = "Your configuration has been saved successfully."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=description", $ru); 
        Lu: 
        goto Vo; 
        ap: 
        if (isset($post["saml_idp_name"]) && !empty($post["saml_idp_name"])) { 
            goto Pa; 
        } 
        $ru = "Please select the IDP from the dropdown and click on select button to save the configuration."; 
        $QQ = "index.php?option=com_miniorange_saml&tab=attribute_mapping"; 
        $this->setRedirect($QQ, $ru, "error"); 
        goto Km; 
        Pa: 
        $mz = array_key_exists("user_profile_attr_name", $post) ? $post["user_profile_attr_name"] : array(); 
        $BZ = array_key_exists("user_profile_attr_value", $post) ? $post["user_profile_attr_value"] : array(); 
        $JN = array(); 
        foreach ($mz as $N5 => $n4) { 
            $Y6 = trim($n4); 
            $Y6 = preg_replace("/\s+/", '', $Y6); 
            if (empty($Y6)) { 
                goto Tj; 
            } 
            $wM = $BZ[$N5]; 
            $Zw = trim($wM); 
            if (empty($Zw)) { 
                goto aw; 
            } 
            $M8 = array(); 
            $M8["attr_name"] = $Y6; 
            $M8["attr_value"] = $Zw; 
            array_push($JN, $M8); 
            aw: 
            Tj: 
            ZL: 
        } 
        Wr: 
        $JN = json_encode($JN); 
        $D_ = array_key_exists("user_field_attr_name", $post) ? $post["user_field_attr_name"] : ''; 
        $Gh = array_key_exists("user_field_attr_value", $post) ? $post["user_field_attr_value"] : ''; 
        $ns = array(); 
        if (!($D_ != '' && $Gh != '')) { 
            goto SX; 
        } 
        foreach ($D_ as $N5 => $n4) { 
            $Vc = trim($n4); 
            if (empty($Vc)) { 
                goto a9; 
            } 
            $pm = $Gh[$N5]; 
            $qT = trim($pm); 
            if (empty($qT)) { 
                goto xB; 
            } 
            $GI = array(); 
            $GI["attr_name"] = $Vc; 
            $GI["attr_value"] = $qT; 
            array_push($ns, $GI); 
            xB: 
            a9: 
            p7: 
        } 
        Mz: 
        SX: 
        $ns = json_encode($ns); 
        $R1 = array_key_exists("user_contact_attr_name", $post) ? $post["user_contact_attr_name"] : ''; 
        $zY = array_key_exists("user_contact_attr_value", $post) ? $post["user_contact_attr_value"] : ''; 
        $PC = array(); 
        if (!($R1 != '' && $zY != '')) { 
            goto Po; 
        } 
        foreach ($R1 as $N5 => $n4) { 
            $Vc = trim($n4); 
            if (empty($Vc)) { 
                goto KI; 
            } 
            $pm = trim($zY[$N5]); 
            if (empty($pm)) { 
                goto oD; 
            } 
            $GI = array(); 
            $GI["attr_name"] = $Vc; 
            $GI["attr_value"] = $pm; 
            array_push($PC, $GI); 
            oD: 
            KI: 
            DD: 
        } 
        zV: 
        Po: 
        $PC = json_encode($PC); 
        $J4 = array_key_exists("user_cw_attr_name", $post) ? $post["user_cw_attr_name"] : ''; 
        $zg = array_key_exists("user_cw_attr_value", $post) ? $post["user_cw_attr_value"] : ''; 
        $eJ = array(); 
        if (!($J4 != '' && $zg != '')) { 
            goto pl; 
        } 
        foreach ($J4 as $N5 => $n4) { 
            $Vc = trim($n4); 
            if (empty($Vc)) { 
                goto W1; 
            } 
            $pm = trim($zg[$N5]); 
            if (empty($pm)) { 
                goto bO; 
            } 
            $GI = array(); 
            $GI["attr_name"] = $Vc; 
            $GI["attr_value"] = $pm; 
            array_push($eJ, $GI); 
            bO: 
            W1: 
            O_: 
        } 
        TT: 
        pl: 
        $eJ = json_encode($eJ); 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("username") . " = " . $SW->quote(isset($post["username"]) ? trim($post["username"]) : ''), $SW->quoteName("email") . " = " . $SW->quote(isset($post["email"]) ? trim($post["email"]) : ''), $SW->quoteName("name") . " = " . $SW->quote(isset($post["name"]) ? trim($post["name"]) : ''), $SW->quoteName("first_name") . " = " . $SW->quote(isset($post["first_name"]) ? trim($post["first_name"]) : ''), $SW->quoteName("last_name") . " = " . $SW->quote(isset($post["last_name"]) ? trim($post["last_name"]) : ''), $SW->quoteName("disable_update_existing_customer_attributes") . " = " . $SW->quote(isset($post["disable_update_existing_customer_attributes"]) ? $post["disable_update_existing_customer_attributes"] : 0), $SW->quoteName("user_profile_attributes") . " = " . $SW->quote($JN), $SW->quoteName("user_field_attributes") . " = " . $SW->quote($ns), $SW->quoteName("user_contact_attributes") . " = " . $SW->quote($PC), $SW->quoteName("user_cw_attributes") . " = " . $SW->quote($eJ)); 
        $Uh = array($SW->quoteName("idp_name") . " = " . $SW->quote($post["saml_idp_name"])); 
        $zz->update($SW->quoteName("#__miniorange_saml_config"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        $ru = "Attribute Mapping for IDP " . $post["saml_idp_name"] . " has been saved successfully."; 
        $QQ = "index.php?option=com_miniorange_saml&tab=attribute_mapping&idp_name_attr=" . $post["saml_idp_name"]; 
        $this->setRedirect($QQ, $ru); 
        Km: 
        Vo: 
        goto tU; 
        sO: 
        if (isset($post["idp_id"]) && isset($post["idp_name"]) && isset($post["idp_entity_id"]) && isset($post["single_signon_service_url"])) { 
            goto xw; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp&id=" . $post["idp_id"], "Please provide all the required information.", "error"); 
        return; 
        goto SL; 
        xw: 
        $ui = $post["idp_id"]; 
        if ($ui == 0) { 
            goto yD; 
        } 
        $this->update_existing_idp($post); 
        goto gh; 
        yD: 
        $lK = $EX["customer_key"]; 
        $Q4 = $EX["api_key"]; 
        $vS = $this->checkCL($lK, $Q4, 0); 
        if (!$vS) { 
            goto MA; 
        } 
        return; 
        goto H5; 
        MA: 
        $this->insert_new_idp($post); 
        H5: 
        gh: 
        SL: 
        $ru = "Your configuration has been saved successfully. You can test the idp configurations now."; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp", $ru); 
        tU: 
    } 
    public function saveRolemapping() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto f0; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=idp"); 
        return; 
        f0: 
        $EX = Mo_Saml_Local_Util::getCustomerDetails(); 
        $l7 = isset($EX["status"]) ? $EX["status"] : ''; 
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "true")) { 
            goto YT; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml", "You have not activated your license yet.", "error"); 
        return; 
        YT: 
        if (isset($post["current_idp_id"]) && !empty($post["current_idp_id"])) { 
            goto ve; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=group_mapping", "Please select the IDP for role mapping."); 
        goto xZ; 
        ve: 
        $hs = 0; 
        $Dc = array(); 
        $vw = array_key_exists("mapping_key_", $post) ? $post["mapping_key_"] : array(); 
        $UH = array_key_exists("mapping_value_", $post) ? $post["mapping_value_"] : array(); 
        foreach ($vw as $N5 => $n4) { 
            $Dc[$n4] = $UH[$N5]; 
            $hs++; 
            Ds: 
        } 
        xO: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $zz->select("*"); 
        $zz->from($SW->quoteName("#__miniorange_saml_role_mapping")); 
        $zz->where($SW->quoteName("idp_id") . " = " . $SW->quote($post["current_idp_id"])); 
        $SW->setQuery($zz); 
        $OS = $SW->loadAssoc(); 
        $t2 = isset($post["mapping_value_default"]) ? trim($post["mapping_value_default"]) : ''; 
        $Ze = isset($post["mapping_memberof_attribute"]) ? trim($post["mapping_memberof_attribute"]) : ''; 
        $d0 = isset($post["enable_role_mapping"]) ? $post["enable_role_mapping"] : 0; 
        $ht = isset($post["do_not_auto_create_users"]) ? $post["do_not_auto_create_users"] : 0; 
        $Xc = isset($post["disable_existing_users_role_update"]) ? $post["disable_existing_users_role_update"] : 0; 
        $dA = isset($post["update_existing_users_role_without_removing_current"]) ? $post["update_existing_users_role_without_removing_current"] : 0; 
        $Lg = isset($post["grp"]) ? trim($post["grp"]) : ''; 
        $yk = json_encode($Dc); 
        $e6 = $post["current_idp_id"]; 
        $Xr = UtilitiesSAML::loadUserGroups(); 
        $ad = isset($post["enable_role_based_redirection"]) ? $post["enable_role_based_redirection"] : 0; 
        foreach ($Xr as $K8) { 
            if (!($K8[4] != "Super Users")) { 
                goto VF; 
            } 
            $YL = "role_based_group_attr_values" . $K8[0]; 
            if (!(isset($post[$YL]) && !empty($post[$YL]))) { 
                goto NJ; 
            } 
            $BD[$K8[0]] = $post[$YL]; 
            NJ: 
            VF: 
            vb: 
        } 
        lI: 
        $BD = json_encode($BD); 
        if ($OS) { 
            goto uk; 
        } 
        $zz = $SW->getQuery(true); 
        $TQ = array("mapping_value_default", "mapping_memberof_attribute", "enable_saml_role_mapping", "role_mapping_key_value", "role_mapping_count", "idp_id", "do_not_auto_create_users", "disable_existing_users_role_update", "update_existing_users_role_without_removing_current", "grp", "enable_role_based_redirection", "role_based_redirect_key_value"); 
        $N6 = array($SW->quote($t2), $SW->quote($Ze), $SW->quote($d0), $SW->quote($yk), $SW->quote($hs), $SW->quote($e6), $SW->quote($ht), $SW->quote($Xc), $SW->quote($dA), $SW->quote($Lg), $SW->quote($ad), $SW->quote($BD)); 
        $zz->insert($SW->quoteName("#__miniorange_saml_role_mapping"))->columns($SW->quoteName($TQ))->values(implode(",", $N6)); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        goto zi; 
        uk: 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("mapping_value_default") . " = " . $SW->quote($t2), $SW->quoteName("mapping_memberof_attribute") . " = " . $SW->quote($Ze), $SW->quoteName("enable_saml_role_mapping") . " = " . $SW->quote($d0), $SW->quoteName("role_mapping_key_value") . " = " . $SW->quote($yk), $SW->quoteName("role_mapping_count") . " = " . $SW->quote($hs), $SW->quoteName("do_not_auto_create_users") . " = " . $SW->quote($ht), $SW->quoteName("disable_existing_users_role_update") . " = " . $SW->quote($Xc), $SW->quoteName("update_existing_users_role_without_removing_current") . " = " . $SW->quote($dA), $SW->quoteName("grp") . " = " . $SW->quote($Lg), $SW->quoteName("enable_role_based_redirection") . " = " . $SW->quote($ad), $SW->quoteName("role_based_redirect_key_value") . " = " . $SW->quote($BD)); 
        $Uh = array($SW->quoteName("idp_id") . " = " . $SW->quote($post["current_idp_id"])); 
        $zz->update($SW->quoteName("#__miniorange_saml_role_mapping"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $SW->execute(); 
        zi: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=group_mapping&current_idp_id=" . $post["current_idp_id"], "SAML Group to Joomla role mapping has been updated."); 
        xZ: 
    } 
    function cancelform() 
    { 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("email") . " = " . $SW->quote(''), $SW->quoteName("login_status") . " = " . $SW->quote(1), $SW->quoteName("email_count") . " = " . $SW->quote(0)); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account"); 
    } 
    function freeLicenseKey() 
    { 
        $i3 = new Mo_saml_Local_Customer(); 
        $ak = json_decode($i3->update_status(), true); 
        if (strcasecmp($ak["status"], "SUCCESS") == 0) { 
            goto fW; 
        } 
        $TY = "Error removing your license key. Please try again or contact <a href="mailto:[email protected]"> [email protected]</a>"; 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $TY, "error"); 
        goto V9; 
        fW: 
        $SW = JFactory::getDbo(); 
        $zz = $SW->getQuery(true); 
        $lp = array($SW->quoteName("email") . " = " . $SW->quote(''), $SW->quoteName("admin_phone") . " = " . $SW->quote(''), $SW->quoteName("customer_key") . " = " . $SW->quote(''), $SW->quoteName("customer_token") . " = " . $SW->quote(''), $SW->quoteName("api_key") . " = " . $SW->quote(''), $SW->quoteName("login_status") . " = " . $SW->quote(1), $SW->quoteName("status") . " = " . $SW->quote(''), $SW->quoteName("sml_lk") . " = " . $SW->quote(''), $SW->quoteName("new_registration") . " = " . $SW->quote(0), $SW->quoteName("email_count") . " = " . $SW->quote(0), $SW->quoteName("in_cmp") . " = " . $SW->quote(''), $SW->quoteName("trists") . " = " . $SW->quote(''), $SW->quoteName("usrlmt") . " = " . $SW->quote(0), $SW->quoteName("licenseExpiry") . " = " . $SW->quote("0000-00-00 00:00:00"), $SW->quoteName("supportExpiry") . " = " . $SW->quote("0000-00-00 00:00:00"), $SW->quoteName("noSP") . " = " . $SW->quote(0), $SW->quoteName("auto_send_email_time") . " = " . $SW->quote('')); 
        $Uh = array($SW->quoteName("id") . " = 1"); 
        $zz->update($SW->quoteName("#__miniorange_saml_customer_details"))->set($lp)->where($Uh); 
        $SW->setQuery($zz); 
        $OS = $SW->execute(); 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account"); 
        V9: 
    } 
    function new_line() 
    { 
        echo "\xa"; 
        echo "<hr>"; 
    } 
    function contactUs() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        if (!(count($post) == 0)) { 
            goto qe; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account"); 
        return; 
        qe: 
        $dq = $post["query"]; 
        $SY = $post["query_email"]; 
        $UX = $post["query_phone"]; 
        $bv = isset($post["send_plugin_config"]) ? $post["send_plugin_config"] : 0; 
        $sg = null; 
        if (!($bv == 1 || $bv == true)) { 
            goto uE; 
        } 
        $sg = $this->importexport(true); 
        uE: 
        if (!empty($sg)) { 
            goto md; 
        } 
        $zz = $dq; 
        goto Ie; 
        md: 
        ob_start(); 
        $this->new_line(); 
        $RW = ob_get_clean(); 
        $zz = $dq . $RW . " Plugin Configuration=>" . $sg; 
        Ie: 
        $wJ = new Mo_saml_Local_Customer(); 
        $Xd = json_decode($wJ->submit_contact_us($SY, $UX, $zz), true); 
        if (!(json_last_error() == JSON_ERROR_NONE)) { 
            goto oA; 
        } 
        if (is_array($Xd) && array_key_exists("status", $Xd) && $Xd["status"] == "ERROR") { 
            goto Yv; 
        } 
        if ($Xd == false) { 
            goto SU; 
        } 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", "Thanks for getting in touch! We shall get back to you shortly.", "success"); 
        goto Dw; 
        SU: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", "Your query could not be submitted. Please try again.", "error"); 
        Dw: 
        goto RY; 
        Yv: 
        $this->setRedirect("index.php?option=com_miniorange_saml&tab=account", $Xd["message"], "error"); 
        RY: 
        oA: 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


defined("\x5f\x4a\105\130\x45\x43") or die;
jimport("\152\x6f\x6f\x6d\154\141\56\141\160\160\154\151\143\x61\x74\151\157\x6e\x2e\143\x6f\x6d\x70\x6f\156\x65\x6e\x74\56\143\157\156\x74\162\157\154\x6c\x65\x72\x66\x6f\162\155");
class Miniorange_samlControllerMyaccount extends JControllerForm
{
    function __construct()
    {
        $this->view_list = "\155\171\141\x63\143\157\165\x6e\164\x73";
        parent::__construct();
    }
    function verifyCustomer()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto ps;
        }
        $this->setRedirect("\151\x6e\x64\x65\170\56\x70\x68\x70\x3f\x6f\x70\164\x69\157\156\x3d\x63\157\x6d\x5f\x6d\151\x6e\151\x6f\x72\141\x6e\x67\145\137\163\x61\155\154\46\x74\141\x62\75\141\143\143\157\x75\x6e\x74");
        return;
        ps:
        if (Mo_Saml_Local_Util::check_empty_or_null($post["\145\155\x61\x69\154"]) || Mo_Saml_Local_Util::check_empty_or_null($post["\x70\x61\163\163\x77\x6f\162\144"])) {
            goto Xz;
        }
        $SY = $post["\145\155\141\151\x6c"];
        $CK = $post["\x70\x61\x73\163\167\x6f\x72\144"];
        goto A2;
        Xz:
        $this->setRedirect("\151\156\144\x65\170\56\160\150\160\x3f\157\160\x74\151\157\x6e\75\x63\157\x6d\137\155\151\156\x69\157\x72\x61\156\x67\145\x5f\x73\x61\155\154\x26\x74\141\142\x3d\x61\x63\143\157\165\x6e\164", "\x41\154\154\40\164\150\x65\x20\x66\x69\x65\154\144\163\40\x61\x72\x65\40\x72\x65\x71\165\151\x72\145\144\56\x20\x50\154\145\141\163\145\x20\145\156\164\x65\x72\x20\x76\x61\x6c\x69\x64\40\x65\156\164\x72\151\x65\x73\x2e", "\145\162\x72\x6f\x72");
        A2:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\145\x6d\141\151\154") . "\40\75\40" . $SW->quote($SY));
        $Uh = array($SW->quoteName("\151\x64") . "\40\75\x20\x31");
        $zz->update($SW->quoteName("\x23\x5f\137\x6d\151\156\151\x6f\162\x61\156\x67\x65\137\x73\141\x6d\x6c\137\x63\x75\x73\164\x6f\155\x65\162\x5f\x64\145\x74\x61\x69\154\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        $i3 = new Mo_saml_Local_Customer();
        $p1 = $i3->get_customer_key($CK);
        $lK = json_decode($p1, true);
        if (strcasecmp($lK["\x61\160\x69\113\145\x79"], "\x43\x55\x52\x4c\x5f\105\x52\122\x4f\x52") == 0) {
            goto EY;
        }
        if (json_last_error() == JSON_ERROR_NONE) {
            goto Se;
        }
        $this->setRedirect("\151\x6e\144\145\x78\x2e\160\150\x70\x3f\157\160\164\151\x6f\x6e\x3d\x63\x6f\x6d\137\x6d\151\x6e\151\157\x72\x61\156\x67\x65\137\x73\141\155\x6c\46\164\x61\x62\x3d\141\143\143\x6f\x75\x6e\164", "\x49\x6e\x76\x61\x6c\x69\144\40\x75\163\x65\162\x6e\x61\155\x65\x20\157\162\x20\x70\141\x73\163\x77\x6f\x72\x64\56\x20\120\154\145\x61\163\x65\x20\164\x72\x79\40\141\x67\x61\x69\x6e\x2e", "\145\x72\x72\157\162");
        goto l0;
        Se:
        $this->save_success_customer_config($lK["\x69\144"], $lK["\141\x70\x69\x4b\145\x79"], $lK["\164\157\x6b\145\156"], $lK["\x70\150\x6f\x6e\145"], "\x59\157\165\x72\x20\141\x63\143\x6f\165\156\x74\x20\x68\141\163\x20\x62\x65\x65\x6e\x20\162\145\164\x72\x69\145\x76\x65\144\40\163\165\x63\x63\x65\x73\163\146\x75\154\x6c\171\56");
        l0:
        goto gL;
        EY:
        $this->setRedirect("\x69\x6e\144\145\170\56\160\150\x70\x3f\x6f\160\x74\151\157\156\x3d\x63\157\155\x5f\x6d\151\x6e\x69\157\x72\x61\x6e\x67\x65\x5f\163\x61\155\154\x26\x74\141\x62\75\141\143\143\157\x75\156\164", $lK["\164\x6f\153\145\x6e"], "\145\162\x72\157\x72");
        gL:
    }
    function save_success_customer_config($ui, $Q4, $BS, $UX, $qJ)
    {
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\143\x75\163\164\157\x6d\145\162\137\153\x65\171") . "\40\75\x20" . $SW->quote($ui), $SW->quoteName("\x61\160\151\137\x6b\145\x79") . "\40\x3d\x20" . $SW->quote($Q4), $SW->quoteName("\143\x75\163\x74\157\x6d\x65\162\137\x74\x6f\x6b\145\x6e") . "\40\x3d\x20" . $SW->quote($BS), $SW->quoteName("\x61\x64\155\151\156\x5f\x70\150\157\x6e\145") . "\40\x3d\x20" . $SW->quote($UX), $SW->quoteName("\x6c\157\147\151\156\137\x73\x74\x61\x74\x75\163") . "\40\75\40" . $SW->quote(0), $SW->quoteName("\x6e\x65\167\137\162\145\x67\151\163\x74\162\x61\x74\151\157\x6e") . "\40\75\x20" . $SW->quote(0));
        $Uh = array($SW->quoteName("\151\144") . "\40\75\40\61");
        $zz->update($SW->quoteName("\x23\x5f\x5f\155\x69\x6e\151\x6f\x72\141\156\x67\x65\137\163\x61\155\154\137\x63\165\x73\x74\157\155\x65\162\137\x64\145\x74\141\151\x6c\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        $zz = $SW->getQuery(true);
        $TY = "\x59\x6f\165\x72\x20\141\143\143\157\x75\156\164\40\150\141\x73\40\x62\x65\145\x6e\x20\x72\x65\x74\x72\151\x65\166\145\144\x20\163\165\x63\143\145\163\163\146\x75\x6c\x6c\x79\x2e";
        $this->setRedirect("\151\x6e\x64\x65\170\x2e\160\150\x70\77\x6f\x70\164\x69\x6f\156\x3d\143\157\155\x5f\x6d\x69\156\x69\x6f\x72\x61\156\x67\x65\x5f\x73\141\155\x6c\x26\164\141\142\x3d\x61\x63\x63\x6f\165\x6e\x74", $TY);
    }
    function generateCustomCertificate()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto je;
        }
        $this->setRedirect("\x69\x6e\144\145\x78\x2e\x70\x68\160\77\157\x70\x74\x69\x6f\156\x3d\x63\157\x6d\x5f\155\151\x6e\151\157\x72\x61\156\x67\145\137\163\141\155\x6c\x26\164\x61\x62\75\143\x75\x73\x74\157\x6d\x5f\x63\145\162\x74\151\146\x69\x63\x61\164\145");
        return;
        je:
        $EX = UtilitiesSAML::getCustomerDetails();
        $l7 = $EX["\163\x74\141\x74\165\x73"];
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "\x74\162\165\x65")) {
            goto WQ;
        }
        $this->setRedirect("\x69\156\x64\145\x78\56\x70\x68\160\x3f\157\x70\x74\151\x6f\x6e\x3d\x63\x6f\155\x5f\x6d\151\x6e\x69\x6f\x72\x61\x6e\x67\145\137\x73\x61\155\154", "\x59\157\165\40\150\141\x76\x65\40\x6e\x6f\164\x20\x61\143\x74\151\166\x61\164\145\x64\40\171\x6f\165\x72\x20\x6c\x69\143\145\156\x73\145\40\171\x65\164\56", "\x65\162\x72\x6f\162");
        return;
        WQ:
        $OA = UtilitiesSAML::isIDPConfigured();
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($OA) == 0)) {
            goto fF;
        }
        $this->setRedirect("\151\x6e\x64\x65\170\56\x70\x68\x70\x3f\157\160\x74\x69\157\x6e\x3d\143\x6f\x6d\137\155\151\156\x69\157\x72\141\x6e\147\145\137\x73\x61\x6d\x6c\x26\x74\141\142\75\151\x64\160", "\120\154\145\x61\163\145\x20\x63\157\156\x66\151\147\165\162\145\x20\123\x65\162\166\x69\x63\x65\40\120\162\157\166\151\x64\145\162\x20\123\145\164\x75\160\40\x74\x61\x62\40\164\x6f\x20\165\160\154\157\141\144\40\164\x68\145\x20\x63\x65\x72\164\x69\x66\x69\143\141\164\x65\x2e", "\x65\162\162\x6f\x72");
        return;
        fF:
        if (!(isset($post["\x73\165\142\x6d\151\x74"]) && $post["\163\165\142\x6d\151\x74"] == "\107\x65\156\145\162\x61\x74\x65\x20\123\145\x6c\146\x2d\123\151\x67\156\145\144\x20\x43\145\x72\x74\163")) {
            goto Ig;
        }
        $vP = $post["\155\x6f\x5f\163\141\x6d\x6c\x5f\x63\157\165\156\x74\x72\171\x5f\143\157\144\x65\x5f\164\145\x78\x74"];
        if (!(strlen($vP) != 2 || ctype_lower($vP))) {
            goto f4;
        }
        $this->setRedirect("\151\x6e\x64\145\170\56\160\150\x70\x3f\x6f\x70\164\151\157\156\75\x63\x6f\x6d\x5f\x6d\151\x6e\x69\157\x72\141\x6e\x67\x65\x5f\163\141\155\x6c\46\x74\141\142\75\143\165\x73\164\x6f\155\137\143\x65\x72\x74\151\146\151\143\141\164\x65", "\120\154\x65\x61\163\x65\40\145\156\x74\145\162\40\141\x20\x76\141\154\151\x64\x20\x63\x6f\165\156\x74\x79\x20\143\x6f\x64\145\56", "\145\x72\x72\x6f\162");
        return;
        f4:
        $sn = isset($post["\x67\145\156\145\162\x61\164\145\137\x63\165\x73\x74\137\143\145\162\x74\151\146\x69\x63\141\164\x65\137\x6f\x70\x74\x69\157\156"]) ? $post["\x67\145\156\145\x72\x61\164\x65\x5f\x63\x75\163\x74\137\x63\x65\162\164\x69\x66\151\143\141\164\145\137\157\x70\164\151\x6f\156"] : '';
        if (!($sn == "\155\151\x6e\151\157\162\141\156\147\x65\x5f\x73\x61\155\154\137\x67\x65\x6e\145\162\141\164\145\x5f\143\x75\163\164\x6f\155\137\x63\145\162\164\x69\x66\x69\x63\x61\164\145")) {
            goto kQ;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\x6d\157\x5f\x73\141\155\154\137\143\x6f\x75\156\164\162\x79\137\143\x6f\144\x65\x5f\164\145\x78\x74") . "\40\75\40" . $SW->quote(isset($post["\155\x6f\x5f\163\x61\155\x6c\x5f\x63\x6f\165\156\164\x72\x79\x5f\143\x6f\144\x65\137\164\x65\170\x74"]) ? $post["\x6d\157\x5f\163\x61\x6d\x6c\x5f\x63\x6f\x75\156\164\x72\x79\x5f\143\157\144\x65\x5f\x74\x65\170\x74"] : null), $SW->quoteName("\155\x6f\137\x73\141\x6d\154\x5f\x63\x65\x72\164\151\146\x69\143\141\x74\145\x5f\163\x74\141\x74\x65\137\156\141\155\x65") . "\x20\x3d\x20" . $SW->quote(isset($post["\x6d\x6f\x5f\163\141\155\154\x5f\x63\145\x72\x74\151\146\x69\143\x61\x74\145\137\163\164\141\x74\145\137\156\x61\155\145"]) ? $post["\155\x6f\x5f\163\x61\155\154\137\x63\145\x72\x74\x69\146\151\x63\141\x74\145\x5f\x73\x74\141\x74\145\x5f\156\x61\x6d\x65"] : null), $SW->quoteName("\x6d\x6f\x5f\x73\x61\x6d\154\x5f\143\x65\x72\164\151\x66\x69\x63\141\x74\145\137\143\157\155\160\141\x6e\x79\x5f\x6e\x61\155\x65") . "\x20\x3d\x20" . $SW->quote(isset($post["\155\157\x5f\x73\x61\x6d\x6c\x5f\143\145\162\164\151\146\151\143\141\x74\145\137\143\157\x6d\160\141\x6e\x79\137\x6e\x61\x6d\145"]) ? $post["\155\157\137\x73\x61\x6d\x6c\x5f\143\x65\x72\x74\151\146\151\143\141\164\x65\137\x63\x6f\155\x70\141\x6e\x79\x5f\x6e\x61\155\x65"] : null), $SW->quoteName("\x6d\x69\x6e\x69\157\162\141\156\147\x65\137\x73\141\x6d\x6c\x5f\165\156\151\x74\x5f\x6e\x61\155\x65") . "\40\x3d\x20" . $SW->quote(isset($post["\x6d\151\x6e\151\157\162\141\156\147\x65\137\163\x61\155\x6c\x5f\165\x6e\x69\x74\137\156\141\x6d\x65"]) ? $post["\x6d\x69\156\x69\x6f\162\141\x6e\x67\x65\137\163\x61\x6d\x6c\137\165\x6e\151\x74\x5f\x6e\141\155\145"] : null), $SW->quoteName("\155\x6f\137\x73\141\155\x6c\137\143\x65\x72\164\151\x66\x69\143\141\x74\145\137\143\157\x6d\x6d\x6f\x6e\137\156\x61\155\145") . "\x20\x3d\40" . $SW->quote(isset($post["\x6d\157\x5f\163\141\155\154\x5f\143\145\x72\x74\151\146\x69\143\x61\x74\x65\x5f\x63\x6f\155\x6d\x6f\156\x5f\x6e\x61\155\x65"]) ? $post["\x6d\x6f\x5f\163\141\155\154\137\x63\x65\x72\164\151\146\151\x63\141\164\145\137\x63\x6f\x6d\x6d\157\156\x5f\156\x61\x6d\145"] : null), $SW->quoteName("\x6d\157\x5f\x73\141\x6d\154\x5f\163\x65\x6c\145\x63\x74\137\x64\x69\x67\x65\x73\164\x5f\141\154\147\157") . "\x20\75\40" . $SW->quote(isset($post["\x6d\x6f\x5f\163\141\x6d\x6c\x5f\163\x65\x6c\x65\x63\164\x5f\144\151\147\x65\x73\x74\x5f\x61\x6c\147\x6f"]) ? $post["\155\157\x5f\163\x61\x6d\x6c\137\x73\145\154\x65\143\x74\x5f\144\x69\147\145\x73\164\x5f\141\154\x67\157"] : 0), $SW->quoteName("\155\x6f\x5f\163\141\x6d\154\x5f\163\x65\154\x65\x63\x74\x5f\160\162\151\166\141\x74\145\137\153\145\171\137\142\151\x74") . "\x20\x3d\x20" . $SW->quote(isset($post["\x6d\157\x5f\163\141\x6d\x6c\137\163\x65\154\x65\143\x74\137\160\162\151\x76\x61\164\x65\x5f\x6b\145\171\137\x62\151\x74"]) ? $post["\155\x6f\x5f\x73\141\155\154\137\163\x65\x6c\x65\143\x74\x5f\x70\162\x69\166\x61\x74\145\137\x6b\145\171\x5f\142\x69\x74"] : 0), $SW->quoteName("\155\x6f\x5f\163\x61\155\x6c\x5f\x73\x65\x6c\x65\x63\x74\x5f\166\x61\x6c\151\x64\x5f\x64\x61\171\x73") . "\x20\75\40" . $SW->quote(isset($post["\x6d\x6f\x5f\x73\141\x6d\154\137\163\x65\x6c\145\x63\x74\137\166\x61\x6c\x69\x64\x5f\x64\141\x79\x73"]) ? $post["\x6d\x6f\137\x73\141\x6d\154\137\163\x65\154\x65\143\x74\x5f\x76\141\154\x69\144\137\144\141\x79\163"] : 0));
        $Uh = array($SW->quoteName("\151\144") . "\40\75\x20\x31");
        $zz->update($SW->quoteName("\x23\137\137\x6d\151\x6e\x69\x6f\x72\x61\156\147\145\x5f\163\141\x6d\154\137\x63\x6f\x6e\146\151\x67"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        $Ko = UtilitiesSAML::getCustomerDetails();
        $Ko = $Ko["\x65\x6d\141\151\x6c"];
        $T9 = isset($Ko) ? $Ko : '';
        $vP = $post["\155\x6f\137\163\x61\155\154\x5f\x63\157\165\x6e\164\162\171\137\143\157\x64\145\137\164\145\x78\164"];
        $k_ = $post["\x6d\x6f\x5f\163\141\x6d\154\x5f\x63\145\162\164\151\x66\x69\x63\x61\164\145\x5f\x73\x74\141\164\145\137\156\141\x6d\x65"];
        $WL = $post["\155\157\137\x73\x61\155\154\x5f\143\x65\x72\x74\x69\x66\x69\x63\x61\164\145\x5f\x63\157\155\x70\141\x6e\x79\x5f\x6e\x61\155\145"];
        $aY = $post["\x6d\x69\156\151\x6f\162\141\156\147\x65\x5f\163\x61\155\154\x5f\x75\x6e\151\x74\137\156\141\x6d\145"];
        $ay = $post["\155\157\x5f\x73\141\x6d\154\137\143\145\x72\164\151\x66\x69\143\x61\x74\145\x5f\x63\157\155\x6d\157\156\x5f\x6e\x61\x6d\145"];
        $Pe = $post["\x6d\x6f\137\x73\x61\x6d\154\x5f\163\145\154\x65\x63\x74\x5f\x64\x69\147\x65\163\164\x5f\x61\x6c\x67\157"];
        $T_ = $post["\155\157\x5f\163\x61\x6d\x6c\x5f\163\x65\154\x65\x63\x74\137\x70\x72\x69\166\x61\x74\145\137\x6b\x65\x79\137\x62\151\164"];
        $Xv = $post["\155\x6f\137\x73\x61\x6d\x6c\x5f\x73\x65\154\145\x63\164\137\166\x61\x6c\x69\144\137\x64\141\x79\163"];
        $Nt = array("\x63\x6f\165\156\x74\x72\x79\x4e\x61\x6d\x65" => $vP, "\163\164\x61\164\145\x4f\162\x50\162\x6f\x76\x69\x6e\x63\x65\116\141\155\x65" => $k_, "\x6f\162\147\x61\x6e\x69\x7a\x61\164\x69\157\156\x4e\141\155\x65" => $WL, "\x6f\x72\147\141\x6e\x69\x7a\x61\x74\x69\x6f\156\x61\154\125\x6e\x69\164\x4e\141\x6d\x65" => $aY, "\143\157\155\x6d\157\156\116\x61\x6d\145" => $ay, "\x65\155\141\x69\x6c\x41\x64\144\x72\145\x73\163" => $T9);
        UtilitiesSAML::generateCertificate($Nt, $Pe, $T_, $Xv);
        $ru = "\x59\157\x75\162\40\143\x65\x72\x74\151\146\151\143\x61\164\x65\163\40\x68\141\163\x20\142\x65\145\x6e\40\147\x65\156\145\x72\141\x74\x65\x64\40\x73\165\143\x63\145\x73\163\146\x75\154\x6c\x79\56\x20\x50\154\x65\x61\x73\145\40\165\160\144\141\164\x65\40\x79\157\x75\x72\x20\x49\144\x65\156\x74\151\x74\x79\x20\x50\x72\157\166\151\144\145\162\x20\x63\x6f\x6e\146\151\147\165\162\141\x74\151\x6f\x6e\40\167\151\164\x68\x20\x6e\x65\167\40\x63\145\x72\164\151\x66\151\x63\x61\164\x65\56";
        $this->setRedirect("\x69\x6e\x64\x65\170\x2e\160\x68\x70\77\157\x70\164\x69\x6f\156\75\x63\x6f\x6d\x5f\x6d\151\156\151\157\162\141\x6e\147\145\137\x73\x61\155\x6c\46\164\x61\x62\75\x63\165\x73\x74\x6f\x6d\x5f\143\145\162\164\x69\146\151\x63\x61\164\145", $ru);
        kQ:
        Ig:
    }
    function check()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto S3;
        }
        $this->setRedirect("\151\x6e\144\x65\170\56\160\150\x70\x3f\157\x70\164\151\157\156\75\143\157\155\x5f\155\x69\156\x69\x6f\x72\141\x6e\x67\145\x5f\x73\x61\155\x6c\46\164\x61\142\x3d\x61\x63\x63\157\x75\x6e\x74");
        return;
        S3:
        $La = isset($post["\x6b\145\x79"]) ? $post["\153\x65\x79"] : '';
        if ($La) {
            goto ez;
        }
        $TY = "\105\162\x72\157\162\40\x61\143\164\151\166\141\164\x69\x6e\x67\x20\x79\157\165\162\40\154\x69\143\145\156\x73\x65\56\40\x50\x6c\145\141\163\x65\x20\164\x72\171\x20\141\147\141\x69\156\40\157\x72\x20\143\157\156\164\x61\x63\164\74\141\x20\x68\162\145\146\75\x22\x6d\x61\x69\154\164\157\72\152\157\157\x6d\x6c\141\x73\x75\x70\x70\x6f\x72\x74\100\x78\145\143\x75\162\151\146\171\x2e\x63\157\155\x22\x3e\40\x6a\x6f\157\x6d\x6c\141\x73\x75\x70\160\x6f\162\x74\100\x78\x65\x63\x75\x72\151\146\x79\56\x63\x6f\155\x3c\x2f\141\76";
        $this->setRedirect("\x69\156\x64\x65\x78\x2e\x70\x68\160\x3f\x6f\160\x74\x69\x6f\156\75\x63\157\x6d\x5f\x6d\151\156\151\x6f\162\141\x6e\147\x65\137\x73\x61\x6d\x6c\46\164\141\142\x3d\x61\143\143\157\165\x6e\x74", $TY, "\145\162\x72\157\162");
        goto q2;
        ez:
        $La = trim(preg_replace("\x2f\x5c\163\53\x2f", '', $La));
        $i3 = new Mo_saml_Local_Customer();
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $Q4 = isset($EX["\x61\x70\x69\137\153\145\x79"]) ? $EX["\141\160\x69\x5f\153\x65\x79"] : '';
        $lK = isset($EX["\143\165\163\x74\157\155\145\x72\137\x6b\x65\x79"]) ? $EX["\143\x75\x73\x74\x6f\x6d\x65\162\x5f\x6b\145\171"] : '';
        $Pd = json_decode($i3->ccl($lK, $Q4), true);
        $go = 0;
        $co = 0;
        $xt = "\x6a\x6f\157\x6d\x6c\x61\137\163\141\155\x6c\x5f\x73\163\x6f\137\145\156\x74\145\162\160\162\x69\163\145\137\x70\154\x61\x6e";
        $u9 = isset($Pd["\x74\162\151\141\x6c"]) ? $Pd["\164\x72\x69\141\x6c"] : '';
        $u9 = Mo_saml_Local_Util::encrypt_value($u9);
        $sL = 0;
        if (!(!isset($Pd["\163\x74\x61\164\165\x73"]) || empty($Pd["\x73\x74\141\164\x75\163"]))) {
            goto GC;
        }
        $TY = isset($Pd["\x6d\145\163\163\x61\147\145"]) && !empty($Pd["\155\x65\163\x73\141\147\145"]) ? $Pd["\x6d\x65\163\x73\141\147\x65"] : "\x59\x6f\165\x72\40\x6c\x69\x63\x65\x6e\x73\x65\40\x69\x73\x20\x6e\x6f\164\x20\146\x6f\165\x6e\144";
        $this->setRedirect("\151\x6e\144\145\170\x2e\160\x68\160\x3f\x6f\x70\x74\x69\x6f\156\75\143\157\155\137\x6d\151\x6e\x69\x6f\162\141\x6e\x67\x65\x5f\163\x61\x6d\154\46\164\141\x62\75\141\x63\143\x6f\x75\x6e\164", $TY, "\x65\x72\162\x6f\x72");
        return;
        GC:
        if (!($Pd["\x73\164\x61\x74\165\163"] != "\x53\125\103\103\105\x53\123")) {
            goto Au;
        }
        $TY = isset($Pd["\x6d\x65\163\x73\141\x67\145"]) ? $Pd["\x6d\x65\x73\163\141\147\145"] : "\111\x6e\x76\141\154\x69\144\x20\x6c\151\x63\145\156\163\145\x21\40\120\x6c\145\141\x73\x65\40\x75\x73\145\40\x61\x20\x76\x61\154\x69\144\x20\x6c\151\x63\x65\156\x73\x65\40\x6b\145\x79\x20\x74\x6f\x20\141\x63\164\x69\x76\141\164\145\40\x74\150\x65\x20\x70\x6c\165\147\x69\x6e\x2e";
        $this->setRedirect("\151\156\144\x65\170\x2e\160\x68\x70\x3f\157\160\164\151\157\156\75\143\157\155\137\x6d\151\x6e\151\x6f\162\141\x6e\147\x65\137\x73\141\x6d\x6c\x26\164\141\142\75\x61\x63\143\157\x75\x6e\164", $TY, "\145\x72\x72\x6f\x72");
        return;
        Au:
        if (!($Pd["\163\x74\x61\x74\x75\x73"] == "\x53\x55\x43\x43\105\x53\x53")) {
            goto V_;
        }
        $go = isset($Pd["\154\x69\x63\145\x6e\x73\x65\x45\x78\x70\151\x72\x79"]) ? $Pd["\x6c\x69\143\145\x6e\x73\145\x45\x78\x70\x69\x72\171"] : 0;
        $co = isset($Pd["\x73\165\160\x70\x6f\162\164\105\170\x70\151\162\171"]) ? $Pd["\x73\165\x70\x70\x6f\x72\x74\105\x78\x70\151\162\171"] : 0;
        $xt = isset($Pd["\154\151\143\x65\156\163\145\120\x6c\141\156"]) ? $Pd["\x6c\x69\x63\145\x6e\x73\x65\120\154\141\x6e"] : '';
        $sL = isset($Pd["\156\157\x4f\146\x53\x50"]) ? $Pd["\156\157\117\146\123\x50"] : 0;
        V_:
        $ak = $i3->check($La);
        if (strcasecmp($ak["\163\164\x61\x74\x75\x73"], "\123\125\103\103\x45\123\123") == 0) {
            goto E4;
        }
        if (strcasecmp($ak["\x69\x73\x45\x78\160\151\162\145\144"], "\61") == 0) {
            goto X6;
        }
        $TY = $ak["\x6d\x65\x73\163\141\x67\x65"] . "\x50\154\145\x61\x73\145\40\x74\162\171\x20\167\x69\x74\150\40\144\x69\x66\x66\x65\x72\x65\156\164\x20\x6b\x65\x79\x20\157\162\x20\143\x6f\x6e\164\x61\x63\x74\74\x61\40\x68\162\145\146\75\x22\155\x61\151\x6c\x74\157\x3a\152\157\x6f\155\154\141\163\165\160\160\x6f\x72\x74\x40\170\x65\x63\x75\162\x69\146\171\x2e\x63\x6f\x6d\42\x3e\x20\152\x6f\x6f\x6d\154\141\163\x75\x70\x70\x6f\162\164\100\x78\x65\x63\x75\x72\151\x66\x79\x2e\x63\157\x6d\74\57\141\76\x2e";
        goto zq;
        X6:
        $TY = "\x59\x6f\x75\x72\x20\x6c\151\143\x65\x6e\163\145\x20\x6b\x65\x79\40\151\x73\40\145\170\x70\151\x72\x65\x64\x2e\40\x50\154\145\x61\163\145\x20\164\x72\x79\40\167\x69\x74\x68\x20\144\151\x66\x66\145\162\145\156\x74\40\153\x65\171\40\x6f\x72\40\x63\x6f\156\164\141\x63\x74\x3c\x61\40\150\x72\x65\x66\x3d\42\155\141\x69\154\x74\x6f\72\x6a\157\x6f\x6d\x6c\141\x73\165\160\160\x6f\162\x74\x40\x78\x65\x63\165\162\x69\146\x79\56\143\157\155\42\x3e\x20\152\x6f\157\x6d\154\141\163\165\160\160\157\162\164\x40\x78\145\143\x75\162\151\146\171\56\143\x6f\x6d\40\x3c\x2f\141\x3e";
        zq:
        $this->setRedirect("\151\x6e\144\145\170\56\x70\x68\x70\x3f\x6f\160\164\x69\x6f\156\x3d\143\157\155\137\x6d\x69\x6e\x69\x6f\162\141\156\147\145\x5f\163\x61\155\x6c\x26\x74\x61\142\75\x61\x63\x63\157\165\156\x74", $TY, "\145\162\x72\x6f\162");
        goto vS;
        E4:
        $hL = Mo_saml_Local_Util::encrypt($La);
        $gY = JURI::root() . $hL;
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\163\x74\141\x74\x75\163") . "\40\75\40" . $SW->quote(Mo_saml_Local_Util::encrypt("\164\x72\x75\x65")), $SW->quoteName("\163\155\x6c\137\154\x6b") . "\40\x3d\x20" . $SW->quote(Mo_saml_Local_Util::encrypt($La)), $SW->quoteName("\x69\156\x5f\x63\x6d\x70") . "\x20\75\40" . $SW->quote(Mo_saml_Local_Util::encrypt($gY)), $SW->quoteName("\x6c\151\143\x65\x6e\163\x65\x45\170\x70\x69\x72\x79") . "\40\75\40" . $SW->quote($go), $SW->quoteName("\163\x75\x70\160\157\x72\x74\105\170\x70\151\x72\x79") . "\40\75\x20" . $SW->quote($co), $SW->quoteName("\x6c\x69\143\x65\x6e\x73\x65\120\154\x61\x6e") . "\x20\75\40" . $SW->quote($xt), $SW->quoteName("\164\x72\151\x73\164\163") . "\40\75\40" . $SW->quote($u9), $SW->quoteName("\x6e\x6f\123\x50") . "\x20\x3d\40" . $SW->quote($sL));
        $Uh = array($SW->quoteName("\151\x64") . "\x20\75\40\x31");
        $zz->update($SW->quoteName("\43\x5f\x5f\155\151\x6e\151\157\162\141\156\147\145\137\x73\141\155\154\137\x63\165\x73\164\157\x6d\x65\162\x5f\x64\x65\164\x61\x69\154\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        UtilitiesSAML::createAndUpdateUpgardeUrl();
        $TY = "\131\x6f\165\162\x20\x6c\151\143\145\x6e\163\145\40\150\x61\x73\40\x62\145\145\x6e\x20\x76\145\162\x69\146\x69\145\144\x2e";
        $this->setRedirect("\x69\156\144\145\170\56\160\150\x70\x3f\157\160\x74\x69\x6f\156\x3d\143\157\x6d\x5f\x6d\151\156\151\157\x72\x61\156\x67\x65\x5f\x73\x61\155\x6c\x26\164\141\142\75\141\x63\x63\x6f\x75\156\x74", $TY);
        vS:
        q2:
    }
    function updateLoginFlow()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto hr;
        }
        $this->setRedirect("\151\x6e\144\145\x78\56\160\x68\160\x3f\x6f\160\x74\x69\x6f\x6e\x3d\143\x6f\155\x5f\155\151\x6e\151\x6f\x72\x61\x6e\147\x65\137\x73\141\155\154\46\164\x61\142\75\163\163\x6f\x5f\x73\145\164\164\151\x6e\147\x73");
        return;
        hr:
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $l7 = isset($EX["\x73\x74\x61\164\165\163"]) ? $EX["\x73\164\x61\164\165\x73"] : '';
        if (!(!Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "\164\x72\165\145")) {
            goto Hc;
        }
        $this->setRedirect("\151\x6e\144\x65\170\56\160\x68\x70\x3f\x6f\160\164\x69\157\x6e\75\143\157\x6d\137\x6d\x69\156\151\157\x72\141\156\x67\x65\137\x73\x61\x6d\x6c", "\x50\x6c\145\141\x73\145\40\x72\x65\x67\151\163\x74\x65\162\40\141\156\144\x20\x61\x63\164\x69\166\141\164\145\x20\171\157\x75\162\x20\154\151\143\x65\x6e\x73\x65\x20\164\157\40\x73\141\166\x65\40\x79\157\165\x72\40\143\x6f\x6e\146\151\147\165\162\141\164\x69\157\x6e\x73\56", "\145\162\162\157\x72");
        return;
        Hc:
        $qW = isset($post["\x65\156\141\142\154\x65\x5f\x72\145\x64\151\162\x65\x63\x74"]) ? $post["\145\x6e\141\142\154\x65\137\162\x65\x64\151\x72\145\x63\164"] : 0;
        $cY = isset($post["\165\163\x65\162\x5f\x6c\157\x67\x69\156\137\x66\x6f\x72\137\157\164\150\145\x72\x5f\x64\x6f\155\x61\151\156\x73"]) ? $post["\x75\x73\145\162\137\154\157\147\151\x6e\137\x66\157\x72\x5f\157\164\150\x65\162\137\x64\x6f\x6d\x61\x69\x6e\163"] : "\102\114\117\103\x4b";
        $Dy = isset($post["\x6d\157\x5f\x69\144\x70\137\154\151\156\153\x5f\160\x61\147\x65"]) ? $post["\x6d\x6f\137\x69\144\160\x5f\154\151\156\153\137\x70\x61\147\145"] : '';
        $st = isset($post["\155\157\137\151\144\160\137\x6c\x69\x73\x74\x5f\x6c\x69\156\153\x5f\160\x61\x67\x65"]) ? $post["\155\157\137\x69\144\160\137\154\x69\x73\164\x5f\x6c\151\156\153\137\160\141\147\x65"] : '';
        $eU = isset($post["\151\147\156\157\162\x65\x5f\x73\x70\x65\143\x69\141\154\x5f\143\150\x61\x72\x61\143\164\145\162\x73"]) ? $post["\151\147\156\x6f\162\145\137\x73\x70\145\143\151\141\154\x5f\143\x68\x61\162\141\143\x74\145\x72\x73"] : 0;
        $LJ = isset($post["\145\156\x61\x62\154\145\x5f\155\141\156\141\147\x65\162\137\x6c\157\147\151\156"]) ? $post["\145\x6e\141\x62\154\x65\x5f\x6d\x61\x6e\x61\147\145\x72\137\x6c\x6f\147\x69\x6e"] : 0;
        $Hs = isset($post["\145\x6e\x61\x62\154\x65\137\x61\x64\x6d\151\x6e\137\x72\145\144\x69\x72\x65\x63\164"]) ? $post["\x65\x6e\x61\x62\154\x65\137\x61\x64\x6d\x69\156\137\x72\x65\144\151\x72\x65\x63\x74"] : 0;
        $XX = isset($post["\x6d\157\137\x61\x64\155\151\x6e\137\151\144\x70\137\154\x69\x6e\x6b\137\160\x61\147\x65"]) ? $post["\x6d\x6f\137\x61\144\155\x69\156\137\x69\x64\160\x5f\154\151\156\x6b\137\160\x61\x67\x65"] : '';
        $I1 = isset($post["\x65\156\x61\142\x6c\145\x5f\145\155\141\151\x6c"]) ? $post["\x65\x6e\x61\142\154\x65\x5f\x65\155\141\x69\154"] : FALSE;
        $kE = isset($post["\145\x6e\141\142\x6c\145\137\x61\x64\x6d\151\156\x5f\x63\150\x69\x6c\144\x5f\162\145\144\x69\x72\x65\x63\164"]) ? $post["\145\156\x61\x62\154\x65\x5f\x61\144\x6d\x69\x6e\x5f\143\x68\x69\x6c\144\x5f\x72\145\144\151\162\x65\143\164"] : 0;
        $FP = isset($post["\x65\156\141\x62\x6c\x65\x5f\155\x61\x6e\x61\x67\x65\x72\137\x63\150\x69\154\x64\137\154\x6f\147\151\156"]) ? $post["\145\156\x61\x62\x6c\145\137\x6d\x61\156\141\147\x65\162\137\x63\x68\151\x6c\x64\x5f\x6c\157\147\151\x6e"] : 0;
        $qU = isset($post["\x65\156\141\x62\x6c\145\x5f\x64\157\x5f\156\x6f\164\x5f\141\165\164\x6f\137\143\x72\x65\141\x74\151\x6f\x6e"]) ? $post["\145\x6e\x61\142\154\x65\x5f\x64\157\137\156\157\x74\x5f\x61\x75\x74\157\x5f\x63\162\145\141\x74\x69\x6f\156"] : 0;
        if (!($qW && empty($Dy) && filter_var($Dy, FILTER_VALIDATE_URL) === FALSE)) {
            goto xX;
        }
        $ru = "\120\x6c\145\x61\163\145\40\145\156\x74\x65\x72\40\166\x61\x6c\151\144\40\162\145\x64\151\162\x65\143\164\x20\125\x52\x4c\x2e";
        $this->setRedirect("\151\156\x64\145\x78\56\160\x68\x70\77\157\160\x74\x69\157\x6e\75\143\x6f\155\137\x6d\151\x6e\x69\x6f\x72\x61\x6e\x67\145\137\x73\141\x6d\154\46\164\141\142\75\163\x73\157\x5f\163\145\x74\164\151\x6e\x67\x73", $ru, "\145\x72\x72\157\x72");
        return;
        xX:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\145\156\141\x62\x6c\145\137\162\x65\144\151\x72\145\x63\x74") . "\40\75\40" . $SW->quote($qW), $SW->quoteName("\x75\163\145\162\137\154\157\147\x69\x6e\x5f\146\x6f\162\137\157\164\150\145\162\137\144\157\x6d\x61\x69\x6e\x73") . "\40\x3d\40" . $SW->quote($cY), $SW->quoteName("\151\x64\x70\x5f\x6c\151\x6e\x6b\137\x70\141\x67\x65") . "\40\x3d\x20" . $SW->quote($Dy), $SW->quoteName("\x6d\157\137\x69\x64\160\137\154\151\x73\164\x5f\x6c\151\x6e\x6b\x5f\160\141\x67\x65") . "\40\x3d\x20" . $SW->quote($st), $SW->quoteName("\145\x6e\x61\x62\x6c\145\x5f\x6d\x61\x6e\141\x67\x65\162\137\x6c\x6f\x67\x69\x6e") . "\40\x3d\x20" . $SW->quote($LJ), $SW->quoteName("\x65\x6e\141\142\x6c\145\x5f\141\x64\155\x69\156\x5f\162\x65\x64\151\x72\x65\x63\x74") . "\40\75\40" . $SW->quote($Hs), $SW->quoteName("\x6d\x6f\x5f\141\x64\x6d\151\156\x5f\x69\x64\x70\x5f\154\151\x73\164\x5f\x6c\151\156\x6b\137\x70\141\x67\145") . "\40\x3d\x20" . $SW->quote($XX), $SW->quoteName("\151\x67\x6e\x6f\x72\145\x5f\163\x70\145\x63\x69\141\154\x5f\143\x68\x61\x72\x61\143\x74\x65\x72\x73") . "\40\x3d\40" . $SW->quote($eU), $SW->quoteName("\x65\x6e\141\x62\154\145\x5f\145\155\141\151\x6c") . "\x20\75\x20" . $SW->quote($I1), $SW->quoteName("\145\156\141\x62\x6c\145\137\x61\x64\x6d\151\x6e\137\143\150\151\x6c\x64\137\x6c\x6f\147\151\x6e") . "\40\x3d\x20" . $SW->quote($kE), $SW->quoteName("\145\x6e\x61\x62\154\x65\137\155\141\156\x61\147\145\x72\x5f\143\x68\151\x6c\144\137\x6c\157\147\x69\x6e") . "\x20\x3d\40" . $SW->quote($FP), $SW->quoteName("\x65\156\141\x62\154\x65\x5f\x64\x6f\137\156\x6f\x74\x5f\141\x75\164\x6f\137\x63\162\145\x61\164\x65\137\x75\x73\x65\162\163") . "\40\75\x20" . $SW->quote($qU));
        $Uh = array($SW->quoteName("\151\144") . "\40\75\40\x31");
        $zz->update($SW->quoteName("\x23\137\137\x6d\x69\156\151\157\162\141\156\x67\x65\137\x73\141\x6d\154\137\143\165\x73\x74\157\x6d\145\162\137\144\145\164\141\x69\154\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        $ru = "\131\157\x75\x72\40\x63\157\156\146\151\147\x75\162\141\164\x69\x6f\156\40\150\x61\x73\40\x62\x65\x65\x6e\40\x73\x61\x76\x65\144\x20\x73\x75\143\x63\145\163\x73\x66\165\154\154\x79\x2e";
        $this->setRedirect("\x69\156\144\x65\x78\56\x70\150\160\x3f\157\x70\164\151\x6f\x6e\75\143\x6f\155\137\x6d\151\x6e\151\x6f\x72\x61\x6e\147\145\137\x73\141\x6d\154\46\164\x61\142\75\x73\163\x6f\x5f\x73\145\x74\x74\x69\x6e\x67\163", $ru);
    }
    function fetchLicense()
    {
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $lK = isset($EX["\143\x75\163\164\x6f\x6d\145\162\137\x6b\145\x79"]) ? $EX["\x63\165\x73\x74\x6f\155\145\x72\137\153\145\171"] : '';
        $Q4 = isset($EX["\141\160\x69\137\x6b\x65\x79"]) ? $EX["\x61\160\151\x5f\x6b\x65\171"] : '';
        $i3 = new Mo_saml_Local_Customer();
        $Pd = json_decode($i3->ccl($lK, $Q4), true);
        $L6 = $Pd["\x6c\x69\143\x65\156\x73\145\x45\x78\x70\x69\x72\x79"];
        $h9 = $Pd["\x73\x75\160\160\157\162\164\x45\x78\x70\151\x72\171"];
        $HI = Mo_saml_Local_Util::encrypt_value($Pd["\x74\162\151\141\154"]);
        $X4 = $Pd["\x6e\157\x4f\x66\x53\120"];
        $z9 = UtilitiesSAML::getExpiryDate();
        $oJ = strtotime($z9["\154\151\143\145\x6e\x73\x65\105\170\160\151\x72\x79"]);
        $u4 = strtotime($z9["\x73\x75\x70\160\157\162\x74\105\170\x70\151\162\x79"]);
        $n4 = $z9["\164\x72\x69\163\164\x73"];
        $sL = $z9["\x6e\157\123\120"];
        $sl = isset($EX["\155\x69\156\x69\157\x72\x61\x6e\x67\145\137\154\145\x78\x70\x5f\x6e\x6f\x74\x69\146\x69\143\x61\164\151\x6f\x6e\137\x73\x65\156\x74"]) ? $EX["\x6d\x69\x6e\151\157\x72\x61\x6e\x67\x65\137\x6c\145\170\160\137\156\157\x74\151\146\x69\x63\141\164\151\x6f\156\x5f\163\x65\156\x74"] : 0;
        if (!$sl) {
            goto cl;
        }
        $ua = "\43\x5f\x5f\x6d\151\156\x69\157\162\141\x6e\147\x65\137\163\141\155\x6c\137\x63\165\x73\x74\x6f\x6d\145\x72\137\x64\x65\164\x61\151\154\x73";
        $tv = array("\x6d\x69\x6e\151\157\162\x61\x6e\x67\145\x5f\146\151\x66\x74\145\145\x6e\137\x64\141\x79\x73\x5f\x62\x65\x66\x6f\x72\145\x5f\154\x65\x78\160" => 0, "\155\151\x6e\151\157\162\141\156\x67\145\x5f\146\151\166\x65\137\144\141\x79\163\137\x62\x65\x66\x6f\x72\145\x5f\x6c\145\x78\x70" => 0, "\x6d\x69\x6e\151\x6f\162\x61\156\147\145\x5f\141\x66\x74\x65\x72\x5f\154\145\x78\x70" => 0, "\x6d\151\156\x69\x6f\x72\141\x6e\x67\x65\x5f\x61\x66\x74\145\162\137\x66\x69\166\145\137\x64\141\x79\x73\x5f\x6c\145\x78\160" => 0, "\x6d\151\x6e\151\x6f\x72\141\156\x67\145\137\x6c\145\x78\x70\137\x6e\x6f\164\x69\x66\151\143\x61\164\151\x6f\156\137\x73\145\x6e\x74" => 0);
        UtilitiesSAML::__genDBUpdate($ua, $tv);
        cl:
        if (!(strtotime($L6) > $oJ)) {
            goto g1;
        }
        $ua = "\43\x5f\137\x6d\x69\156\x69\x6f\162\x61\x6e\x67\145\137\x73\x61\155\154\137\143\x75\163\x74\x6f\x6d\145\162\x5f\144\x65\x74\141\151\x6c\x73";
        $tv = array("\x6c\x69\143\145\156\x73\145\105\170\160\x69\x72\x79" => $L6);
        UtilitiesSAML::__genDBUpdate($ua, $tv);
        g1:
        if (!(strtotime($h9) > $u4)) {
            goto bj;
        }
        $ua = "\43\x5f\x5f\155\x69\x6e\151\x6f\x72\141\x6e\x67\145\x5f\163\x61\x6d\154\137\143\x75\163\164\x6f\x6d\145\x72\137\144\145\x74\x61\x69\154\163";
        $tv = array("\163\165\x70\x70\x6f\162\x74\105\170\x70\151\x72\171" => $h9);
        UtilitiesSAML::__genDBUpdate($ua, $tv);
        bj:
        if (!($HI != $n4)) {
            goto bH;
        }
        $ua = "\43\x5f\137\x6d\x69\x6e\151\157\162\x61\156\147\x65\x5f\x73\x61\155\154\137\143\165\x73\164\157\155\x65\x72\137\144\145\164\141\x69\x6c\x73";
        $tv = array("\x74\162\x69\x73\164\163" => $HI);
        UtilitiesSAML::__genDBUpdate($ua, $tv);
        bH:
        if (!($X4 != $sL)) {
            goto XS;
        }
        $ua = "\43\x5f\137\155\x69\x6e\151\x6f\162\141\156\147\x65\137\x73\141\155\x6c\x5f\143\165\163\164\x6f\x6d\145\162\137\144\x65\164\x61\151\x6c\x73";
        $tv = array("\x6e\x6f\123\120" => $X4);
        UtilitiesSAML::__genDBUpdate($ua, $tv);
        XS:
        $b4 = JFactory::getApplication();
        $b4->enqueueMessage("\123\165\x63\143\145\x73\163\x66\165\x6c\154\x79\x20\146\145\x74\143\150\x65\x64\x20\164\x68\145\x20\154\x69\x63\145\x6e\x73\145\x2e", "\163\x75\x63\143\145\163\x73");
        $this->setRedirect("\151\156\x64\145\170\56\x70\150\160\x3f\x6f\x70\x74\151\157\x6e\x3d\x63\157\x6d\x5f\155\151\x6e\151\157\162\141\x6e\x67\x65\x5f\x73\x61\x6d\154\46\164\141\142\x3d\141\143\143\x6f\165\x6e\x74");
    }
    function addlicensedetails($La)
    {
        $hL = Mo_saml_Local_Util::encrypt($La);
        $gY = JURI::root() . $hL;
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\163\x74\x61\164\165\x73") . "\x20\x3d\x20" . $SW->quote(Mo_saml_Local_Util::encrypt("\164\x72\165\145")), $SW->quoteName("\x73\x6d\x6c\x5f\154\x6b") . "\40\75\x20" . $SW->quote(Mo_saml_Local_Util::encrypt($La)), $SW->quoteName("\151\156\x5f\x63\x6d\160") . "\40\x3d\x20" . $SW->quote(Mo_saml_Local_Util::encrypt($gY)), $SW->quoteName("\154\151\x63\145\x6e\x73\145\105\x78\x70\151\162\171") . "\40\x3d\40" . $SW->quote($go), $SW->quoteName("\x73\x75\160\160\x6f\x72\x74\105\x78\160\x69\x72\x79") . "\x20\x3d\40" . $SW->quote($co), $SW->quoteName("\x6c\151\x63\x65\156\163\145\120\154\141\156") . "\40\75\x20" . $SW->quote($xt), $SW->quoteName("\x74\162\151\163\164\163") . "\x20\75\x20" . $SW->quote($u9));
        $Uh = array($SW->quoteName("\151\x64") . "\x20\x3d\40\61");
        $zz->update($SW->quoteName("\43\137\137\155\151\156\151\157\x72\x61\x6e\x67\x65\137\x73\x61\155\154\137\143\x75\163\x74\157\155\x65\162\x5f\144\145\x74\x61\151\x6c\x73"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        UtilitiesSAML::createAndUpdateUpgardeUrl();
        $TY = "\131\157\x75\x72\40\154\151\x63\145\x6e\163\145\40\150\141\163\40\142\x65\145\x6e\40\x76\x65\x72\x69\x66\151\145\144\56";
        $this->setRedirect("\151\x6e\144\x65\170\x2e\160\x68\x70\77\157\x70\164\151\157\156\x3d\x63\157\155\x5f\155\x69\156\x69\x6f\x72\141\x6e\147\x65\x5f\163\x61\155\154\46\164\141\x62\x3d\x61\143\143\157\x75\x6e\164", $TY);
    }
    function getGroupMapping()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (isset($post["\163\141\x6d\154\x5f\151\144\160\137\154\x69\x73\164"])) {
            goto T1;
        }
        $QQ = "\x69\156\144\145\x78\x2e\x70\150\160\x3f\x6f\x70\x74\x69\x6f\156\75\x63\x6f\155\x5f\155\x69\x6e\x69\157\x72\x61\156\147\145\x5f\x73\x61\155\x6c\46\164\141\x62\x3d\x67\162\x6f\x75\x70\x5f\x6d\x61\x70\x70\x69\156\147";
        $this->setRedirect($QQ);
        return;
        goto dr;
        T1:
        $QQ = "\151\x6e\x64\145\x78\x2e\160\x68\x70\x3f\x6f\x70\x74\151\x6f\x6e\75\143\157\x6d\137\x6d\151\x6e\x69\157\x72\141\156\147\145\137\x73\141\155\x6c\x26\164\141\142\x3d\x67\x72\157\x75\x70\x5f\x6d\x61\160\x70\151\x6e\147\46\143\165\x72\x72\x65\156\x74\x5f\x69\144\x70\x5f\151\x64\75" . $post["\163\x61\155\154\137\x69\x64\160\x5f\x6c\151\x73\x74"];
        $this->setRedirect($QQ);
        dr:
    }
    function saveCustomCertificate()
    {
        $OA = UtilitiesSAML::isIDPConfigured();
        if (!(count($OA) == 0)) {
            goto cC;
        }
        $this->setRedirect("\x69\x6e\x64\145\x78\56\160\x68\160\77\157\160\164\151\x6f\156\75\143\x6f\x6d\x5f\155\x69\x6e\151\157\x72\x61\156\x67\x65\x5f\163\141\x6d\x6c\46\x74\141\142\75\151\144\x70", "\120\154\x65\141\x73\x65\x20\x63\x6f\156\x66\x69\147\x75\x72\145\40\123\x65\x72\166\151\x63\145\40\120\162\157\166\x69\x64\145\162\40\123\x65\164\x75\160\40\164\x61\x62\x20\x74\x6f\40\x75\x70\x6c\157\141\144\x20\x74\x68\145\40\143\145\162\164\151\146\151\x63\x61\164\x65\x2e", "\x65\162\162\x6f\x72");
        return;
        cC:
        $EX = UtilitiesSAML::getCustomerDetails();
        $post = JFactory::getApplication()->input->post->getArray();
        $l7 = $EX["\x73\x74\141\164\x75\x73"];
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "\x74\x72\x75\x65")) {
            goto Ol;
        }
        $this->setRedirect("\x69\156\144\x65\x78\56\x70\150\160\x3f\157\x70\x74\151\157\156\75\x63\x6f\155\137\x6d\x69\x6e\151\x6f\x72\x61\x6e\x67\x65\137\x73\141\155\x6c", "\x59\157\165\x20\x68\141\166\x65\x20\156\157\164\x20\141\x63\x74\x69\166\x61\x74\145\x64\x20\171\x6f\165\x72\x20\154\151\143\x65\156\x73\145\40\171\x65\x74\x2e", "\145\x72\162\x6f\x72");
        return;
        Ol:
        if (isset($post["\x73\x75\142\x6d\x69\x74"]) && $post["\x73\x75\142\x6d\x69\164"] == "\125\x70\x6c\x6f\141\x64") {
            goto hq;
        }
        if (isset($post["\x73\165\x62\x6d\151\x74"]) && $post["\163\165\142\155\x69\164"] == "\122\145\155\x6f\166\145") {
            goto y3;
        }
        goto xo;
        hq:
        $sn = isset($post["\143\165\x73\164\x5f\x63\145\x72\x74\x69\146\151\143\x61\164\x65\137\157\x70\x74\x69\157\156"]) ? $post["\143\x75\163\x74\x5f\143\145\x72\164\x69\x66\x69\143\141\x74\x65\x5f\x6f\x70\164\x69\x6f\x6e"] : '';
        if (!($sn == "\x6d\151\x6e\151\x6f\162\x61\156\147\145\137\x73\x61\155\x6c\137\163\141\166\x65\137\143\165\x73\x74\x6f\155\x5f\x63\x65\x72\164\x69\x66\x69\x63\141\164\145")) {
            goto zg;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\160\165\x62\154\151\143\137\x63\145\x72\164\151\146\x69\x63\141\x74\x65") . "\40\75\x20" . $SW->quote(isset($post["\x70\x75\142\154\x69\143\x5f\x63\x65\x72\x74\151\146\x69\x63\x61\164\145"]) ? $post["\x70\x75\x62\154\151\x63\137\143\145\x72\164\x69\x66\x69\x63\x61\x74\145"] : null), $SW->quoteName("\160\162\x69\166\x61\x74\145\x5f\x63\x65\x72\x74\x69\146\x69\143\x61\164\145") . "\40\x3d\40" . $SW->quote(isset($post["\x70\x72\151\x76\x61\x74\145\137\x63\145\162\x74\151\x66\x69\143\x61\x74\x65"]) ? $post["\x70\162\x69\166\141\x74\145\137\x63\145\x72\164\x69\x66\151\143\141\x74\x65"] : null));
        $zz->update($SW->quoteName("\x23\x5f\x5f\155\x69\x6e\x69\157\162\x61\x6e\x67\x65\137\x73\x61\x6d\x6c\137\x63\x6f\156\146\x69\x67"))->set($lp);
        $SW->setQuery($zz);
        $SW->execute();
        $ue = UtilitiesSAML::getCustom_CertificatePath("\103\165\x73\164\x6f\155\x50\165\142\x6c\x69\143\103\145\x72\164\x69\146\x69\x63\x61\164\145\x2e\x63\162\x74");
        $kN = fopen($ue, "\167");
        $Bd = $post["\x70\x75\x62\154\x69\x63\137\143\145\x72\164\x69\x66\x69\143\141\164\x65"];
        fwrite($kN, $Bd);
        $ue = UtilitiesSAML::getCustom_CertificatePath("\103\165\x73\164\x6f\155\x50\x72\x69\166\x61\x74\x65\103\x65\162\x74\x69\x66\x69\x63\x61\x74\x65\x2e\153\x65\x79");
        $kN = fopen($ue, "\x77");
        $Bd = $post["\x70\162\151\x76\x61\x74\x65\x5f\x63\145\162\x74\151\x66\151\x63\141\164\145"];
        fwrite($kN, $Bd);
        $ru = "\131\157\x75\162\x20\143\x65\x72\164\151\146\x69\x63\x61\164\145\x73\x20\x68\x61\163\40\x62\145\145\x6e\x20\x73\x61\x76\145\x64\40\x73\165\143\x63\x65\163\x73\146\165\154\154\x79\x2e";
        $this->setRedirect("\x69\x6e\144\145\170\x2e\160\x68\x70\x3f\157\160\164\x69\157\x6e\75\143\x6f\155\137\155\x69\156\x69\157\162\x61\x6e\x67\x65\137\163\x61\155\154\x26\164\x61\142\x3d\x63\165\163\164\x6f\155\x5f\143\x65\162\x74\151\x66\151\x63\x61\164\145", $ru);
        zg:
        goto xo;
        y3:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\160\165\x62\154\151\x63\x5f\x63\x65\x72\x74\x69\146\151\x63\141\x74\x65") . "\x20\x3d\40" . $SW->quote(''), $SW->quoteName("\x70\162\x69\x76\x61\x74\145\x5f\x63\x65\x72\x74\x69\146\151\x63\141\164\x65") . "\x20\75\x20" . $SW->quote(''));
        $zz->update($SW->quoteName("\43\137\x5f\155\x69\x6e\151\157\x72\141\x6e\x67\145\137\x73\x61\x6d\154\137\143\x6f\156\x66\x69\x67"))->set($lp);
        $SW->setQuery($zz);
        $SW->execute();
        $ru = "\131\x6f\x75\162\40\143\145\x72\x74\x69\146\x69\x63\x61\x74\x65\x73\x20\150\x61\163\x20\142\145\145\x6e\x20\162\145\x6d\157\x76\145\x64\40\163\165\143\143\x65\163\163\x66\x75\154\154\171\56";
        $this->setRedirect("\151\x6e\144\x65\170\x2e\x70\x68\x70\77\x6f\x70\164\x69\157\x6e\75\143\x6f\x6d\x5f\155\151\x6e\151\x6f\162\141\156\147\145\x5f\163\141\155\154\46\x74\x61\x62\x3d\143\x75\x73\164\157\155\137\143\145\x72\x74\151\146\x69\x63\141\164\145", $ru);
        xo:
    }
    function getIdpAttributes()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (isset($post["\163\141\155\x6c\x5f\151\x64\x70\137\154\151\x73\164"])) {
            goto Gd;
        }
        $QQ = "\x69\x6e\x64\145\170\56\160\150\160\x3f\x6f\160\164\x69\157\156\x3d\143\157\155\137\x6d\x69\156\x69\157\162\141\x6e\147\x65\x5f\163\x61\155\x6c\x26\x74\x61\142\x3d\141\x74\x74\162\151\x62\165\164\145\137\x6d\x61\x70\160\151\156\x67";
        $this->setRedirect($QQ);
        return;
        goto i6;
        Gd:
        $QQ = "\151\x6e\144\145\x78\56\160\x68\x70\x3f\x6f\160\x74\x69\157\156\75\x63\157\x6d\x5f\x6d\x69\156\x69\x6f\162\x61\x6e\147\x65\137\x73\141\x6d\x6c\x26\164\141\142\75\x61\164\164\x72\151\x62\x75\x74\145\137\155\x61\x70\x70\x69\x6e\147\x26\151\x64\160\x5f\x6e\141\155\x65\137\141\164\164\x72\75" . $post["\x73\x61\155\154\x5f\151\144\x70\137\x6c\x69\x73\164"];
        $this->setRedirect($QQ);
        i6:
    }
    function saveDomainMapping()
    {
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select("\103\x4f\125\116\124\50\52\51");
        $zz->from($SW->quoteName("\x23\x5f\137\x6d\151\156\151\x6f\x72\141\x6e\x67\x65\137\163\x61\x6d\x6c\137\x63\x6f\156\146\x69\x67"));
        $SW->setQuery($zz);
        $OS = $SW->loadResult();
        $post = JFactory::getApplication()->input->post->getArray();
        if (isset($OS) && $OS > 0) {
            goto il;
        }
        $ru = "\120\x6c\x65\141\x73\145\40\x61\x64\x64\x20\x49\104\120\40\103\157\x6e\x66\151\x67\x75\x72\x61\164\x69\157\156\40\x66\151\162\x73\x74\56";
        $this->setRedirect("\151\x6e\144\145\170\56\x70\x68\x70\77\x6f\x70\164\x69\x6f\x6e\75\143\157\155\x5f\x6d\151\x6e\x69\x6f\x72\141\156\147\145\x5f\163\x61\x6d\x6c\x26\164\141\x62\75\144\157\x6d\x61\x69\x6e\137\x6d\141\x70\x70\151\156\147", $ru, "\145\x72\162\x6f\162");
        goto XJ;
        il:
        $W4 = array();
        $W4 = $post;
        $j1 = array();
        foreach ($W4 as $N5 => $n4) {
            $QE = $this->array_has_dupes($W4);
            if ($QE) {
                goto de;
            }
            $wk = str_replace("\x73\x61\155\x6c\137\x64\x6f\x6d\141\x69\156\x5f\155\x61\x70\160\x69\156\x67\x5f", '', $N5);
            $zz = $SW->getQuery(true);
            $lp = array($SW->quoteName("\144\x6f\x6d\141\151\156\137\155\141\160\x70\x69\156\x67") . "\x20\75\x20" . $SW->quote($n4));
            $Uh = array($SW->quoteName("\151\144\160\137\x6e\x61\155\x65") . "\x20\75\x20" . $SW->quote($wk));
            $zz->update($SW->quoteName("\43\137\x5f\x6d\151\x6e\x69\x6f\x72\x61\x6e\147\145\137\x73\x61\155\x6c\137\143\x6f\x6e\x66\151\147"))->set($lp)->where($Uh);
            $SW->setQuery($zz);
            $SW->execute();
            goto W9;
            de:
            $ru = "\104\165\160\154\x69\x63\x61\164\145\40\x65\x6e\164\162\171\40\x6e\157\164\x20\141\154\154\x6f\167\145\144\x2e";
            $this->setRedirect("\x69\156\x64\x65\170\x2e\160\150\x70\77\157\160\164\151\x6f\156\75\143\x6f\155\137\x6d\151\x6e\151\157\162\x61\x6e\147\145\x5f\163\141\155\x6c\x26\x74\141\142\75\x64\157\155\141\x69\156\137\155\141\160\x70\x69\156\147", $ru, "\x65\162\162\x6f\162");
            return;
            W9:
            Nm:
        }
        cF:
        $ru = "\104\x6f\x6d\141\x69\156\40\115\x61\160\160\151\156\147\40\150\x61\163\x20\x62\x65\145\156\40\x73\x61\166\x65\x64\x20\163\x75\143\x63\145\163\163\146\165\x6c\154\x79\x2e";
        $this->setRedirect("\151\156\144\145\x78\56\160\x68\160\77\x6f\160\164\x69\x6f\156\75\143\157\155\137\x6d\151\156\x69\x6f\162\x61\156\x67\145\137\x73\x61\155\154\46\164\x61\x62\x3d\144\x6f\155\141\151\156\x5f\155\x61\x70\x70\151\x6e\147", $ru);
        XJ:
    }
    function array_has_dupes($p5)
    {
        return count($p5) !== count(array_unique($p5));
    }
    function deleteCurrentIdp()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto yi;
        }
        $this->setRedirect("\151\156\x64\x65\x78\x2e\160\150\160\x3f\x6f\x70\164\151\x6f\x6e\x3d\143\x6f\155\x5f\x6d\x69\x6e\151\157\x72\141\x6e\x67\x65\x5f\x73\x61\155\154\x26\x74\141\142\x3d\x69\144\160");
        return;
        yi:
        if (isset($post["\x69\144\x70\x5f\151\144"]) && $post["\x69\144\160\x5f\151\x64"] > 0) {
            goto Xq;
        }
        $this->setRedirect("\151\156\144\x65\170\56\160\150\x70\x3f\x6f\160\x74\x69\x6f\156\x3d\143\157\155\137\155\151\x6e\x69\157\162\141\156\147\145\137\x73\141\155\x6c\46\x74\x61\142\75\x69\144\160", "\111\x44\120\x20\x43\x6f\x6e\x66\x69\x67\165\162\x61\x74\x69\x6f\156\x20\x63\157\x75\154\144\40\x6e\157\164\x20\142\145\x20\144\145\x6c\x65\164\145\144\56\40\x50\154\x65\141\x73\145\40\x74\162\x79\40\141\x67\x61\x69\156\56");
        return;
        goto OM;
        Xq:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $Uh = array($SW->quoteName("\x69\x64") . "\x20\75\x20" . $SW->quote($post["\x69\144\x70\137\151\144"]));
        $zz->delete($SW->quoteName("\x23\137\137\155\x69\156\x69\x6f\162\141\x6e\x67\x65\x5f\x73\141\x6d\154\x5f\143\x6f\156\x66\151\x67"));
        $zz->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        $zz = $SW->getQuery(true);
        $Uh = array($SW->quoteName("\151\x64\160\x5f\x69\x64") . "\40\x3d\x20" . $SW->quote($post["\x69\x64\160\137\151\x64"]));
        $zz->delete($SW->quoteName("\x23\x5f\137\x6d\151\x6e\x69\157\x72\141\x6e\x67\x65\x5f\163\141\x6d\154\x5f\162\x6f\x6c\x65\137\x6d\141\160\x70\151\x6e\147"));
        $zz->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        if ($OS) {
            goto uW;
        }
        $this->setRedirect("\151\156\x64\145\170\56\160\x68\x70\x3f\x6f\x70\x74\x69\x6f\x6e\x3d\143\x6f\155\137\x6d\x69\x6e\x69\x6f\x72\141\x6e\147\145\137\163\141\155\154\46\164\x61\142\x3d\151\144\x70", "\116\x6f\x20\111\x44\x50\40\146\x6f\165\156\144\56\x20\x50\154\x65\141\163\145\40\164\162\x79\x20\141\x67\141\x69\156\56");
        return;
        goto we;
        uW:
        $this->setRedirect("\x69\156\144\x65\170\56\160\150\x70\x3f\x6f\160\x74\x69\157\156\75\143\157\155\137\155\151\x6e\x69\157\x72\x61\156\147\145\137\x73\x61\x6d\x6c\46\x74\x61\142\75\x69\x64\160", "\x49\104\120\x20\103\x6f\156\146\151\147\165\x72\141\x74\151\157\x6e\40\x64\x65\x6c\x65\164\x65\x64\x20\163\165\x63\x63\x65\163\x73\x66\165\x6c\x6c\171\56");
        return;
        we:
        OM:
    }
    function cancelIdpConfig()
    {
        $this->setRedirect("\x69\x6e\x64\x65\x78\56\x70\150\160\x3f\x6f\160\164\151\x6f\x6e\x3d\x63\157\155\137\x6d\151\x6e\x69\157\162\141\156\147\x65\137\x73\x61\x6d\154\46\x74\x61\142\x3d\151\x64\x70");
        return;
    }
    function addNewIDP()
    {
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $l7 = $EX["\163\164\x61\164\x75\x73"];
        if (!Mo_Saml_Local_Util::is_customer_registered() || Mo_Saml_Local_Util::check($l7) != "\164\x72\165\x65") {
            goto H8;
        }
        $lK = $EX["\143\x75\x73\164\157\155\x65\x72\x5f\153\x65\171"];
        $Q4 = $EX["\x61\160\151\x5f\x6b\x65\171"];
        $this->checkCL($lK, $Q4, 1);
        goto Ze;
        H8:
        $this->setRedirect("\x69\156\x64\x65\170\56\x70\150\x70\x3f\x6f\160\164\151\157\156\75\x63\x6f\155\137\x6d\x69\x6e\x69\x6f\162\141\156\x67\x65\137\163\x61\155\x6c", "\120\154\x65\x61\x73\145\40\x72\145\147\x69\x73\164\x65\162\x20\x61\156\x64\x20\x61\143\x74\151\x76\x61\164\x65\x20\x79\157\165\x72\40\154\x69\x63\x65\156\163\x65\40\164\x6f\40\x61\x64\144\40\x49\104\120\56", "\x65\x72\x72\x6f\x72");
        return;
        Ze:
    }
    function checkCL($lK, $Q4, $F9)
    {
        $i3 = new Mo_saml_Local_Customer();
        $ak = json_decode($i3->ccl($lK, $Q4), true);
        if (isset($ak["\163\164\141\x74\x75\163"]) && $ak["\x73\x74\x61\164\x75\x73"] == "\x53\125\x43\x43\105\x53\x53") {
            goto zm;
        }
        $this->setRedirect("\x69\x6e\144\x65\x78\56\x70\150\160\77\x6f\160\x74\151\x6f\156\x3d\143\157\155\x5f\x6d\151\x6e\151\x6f\162\141\x6e\x67\x65\137\163\141\155\x6c", "\114\x69\143\x65\156\x73\145\x20\x6e\157\164\x20\146\157\x75\x6e\144\56\40\120\x6c\x65\141\x73\x65\40\143\x6f\x6e\x74\141\x63\164\x20\141\164\74\x61\x20\150\x72\x65\x66\75\42\155\141\x69\x6c\164\157\x3a\152\157\157\155\x6c\141\x73\x75\x70\x70\157\162\164\100\170\x65\x63\165\162\151\146\x79\x2e\143\157\155\x22\76\x20\x6a\157\x6f\x6d\154\x61\x73\x75\160\160\x6f\x72\x74\x40\x78\145\x63\x75\162\151\x66\171\56\x63\157\x6d\74\57\x61\x3e\x20\164\157\x20\x75\160\147\x72\141\144\145\x20\x79\157\165\162\40\x6c\151\143\145\x6e\x73\145\56", "\145\x72\162\x6f\162");
        return true;
        goto ET;
        zm:
        if ($ak["\x6e\157\117\x66\x53\x50"] === 0 || empty($ak["\x6e\x6f\x4f\146\x53\x50"])) {
            goto lU;
        }
        $EV = $ak["\156\157\117\x66\x53\120"];
        goto BW;
        lU:
        $EV = 1;
        BW:
        $fB = Mo_Saml_Local_Util::getSAMLCount();
        if ($fB < $EV) {
            goto F9;
        }
        $this->setRedirect("\151\x6e\x64\145\x78\56\160\x68\x70\x3f\157\x70\164\151\157\156\x3d\x63\x6f\155\x5f\x6d\x69\x6e\x69\157\162\141\156\147\145\137\163\x61\x6d\x6c\x26\164\x61\142\75\151\144\160", "\x59\x6f\165\40\x68\141\x76\x65\40\160\x75\162\x63\x68\141\163\x65\144\x20\164\x68\145\40\154\x69\x63\x65\156\x73\x65\x20\146\x6f\x72\40" . $EV . "\x20\111\x44\x50\163\56\40\120\154\145\x61\163\145\x20\x63\x6f\x6e\x74\141\143\x74\x20\x61\x74\x3c\141\x20\x68\162\145\x66\x3d\42\x6d\x61\x69\x6c\164\x6f\72\152\157\157\x6d\x6c\x61\163\x75\x70\x70\x6f\x72\164\100\170\x65\143\x75\162\151\146\171\x2e\x63\157\155\x22\x3e\x20\152\x6f\x6f\155\x6c\x61\163\165\x70\x70\x6f\162\x74\x40\x78\145\143\x75\x72\x69\146\x79\56\143\157\x6d\74\x2f\141\76\40\164\x6f\40\165\x70\x67\162\x61\x64\x65\40\164\x68\145\x20\154\x69\143\145\156\163\x65\40\x69\146\x20\171\157\165\40\167\141\x6e\x74\x20\164\x6f\x20\x61\x64\144\x20\155\157\162\x65\40\x49\104\x50\x73\x2e", "\x65\162\162\x6f\x72");
        return true;
        goto ca;
        F9:
        if ($F9) {
            goto an;
        }
        return false;
        goto nJ;
        an:
        $this->setRedirect("\x69\x6e\144\x65\x78\56\x70\x68\160\x3f\x6f\x70\x74\151\157\156\x3d\143\x6f\x6d\x5f\x6d\x69\156\x69\157\x72\141\156\x67\x65\137\x73\x61\x6d\x6c\x26\164\141\x62\75\x69\144\160\x26\151\144\x3d\60", "\120\154\x65\x61\x73\x65\x20\141\x64\144\x20\x6e\145\167\x20\111\x44\x50\x20\x64\x65\x74\x61\151\x6c\163\56");
        return true;
        nJ:
        ca:
        ET:
    }
    function insert_new_idp($post)
    {
        $qN = isset($post["\163\141\x6d\x6c\137\x78\65\x30\71\x5f\x63\145\162\x74\x69\x66\x69\x63\141\164\x65"]) ? $post["\163\x61\x6d\x6c\x5f\170\x35\60\x39\137\143\x65\162\x74\x69\x66\151\x63\141\x74\145"] : '';
        if (!is_array($qN)) {
            goto rX;
        }
        $V1 = implode("\73", $qN);
        rX:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $TQ = array("\151\x64\x70\137\x6e\141\x6d\145", "\x69\144\x70\137\x65\x6e\164\x69\x74\171\137\x69\144", "\163\x69\156\147\x6c\x65\137\x73\151\147\156\x6f\156\x5f\163\145\162\x76\151\x63\x65\x5f\165\162\154", "\143\145\162\164\x69\146\151\x63\141\164\145", "\x62\x69\x6e\144\x69\x6e\x67", "\x73\x69\x6e\x67\154\145\x5f\154\157\x67\157\165\164\137\165\x72\154", "\144\145\x66\141\165\x6c\x74\137\x72\145\x6c\141\171\x5f\x73\x74\x61\x74\x65", "\155\157\137\163\141\x6d\x6c\x5f\x73\x65\154\x65\x63\164\x5f\x73\x69\147\x6e\x5f\141\x6c\x67\157", "\163\141\155\154\137\162\145\x71\165\145\163\x74\x5f\x73\151\x67\x6e", "\156\x61\155\x65\x5f\x69\144\x5f\x66\x6f\x72\x6d\x61\164", "\155\151\156\x69\x6f\x72\x61\x6e\147\145\x5f\x73\x61\155\154\137\x69\144\160\137\163\154\x6f\137\x62\x69\x6e\x64\151\x6e\x67");
        $N6 = array($SW->quote($post["\x69\x64\x70\x5f\x6e\141\x6d\x65"]), $SW->quote($post["\x69\144\x70\137\145\x6e\164\151\x74\x79\x5f\x69\x64"]), $SW->quote($post["\x73\x69\x6e\147\x6c\x65\137\x73\151\147\x6e\157\156\137\x73\x65\x72\x76\151\x63\145\137\x75\x72\154"]), $SW->quote(Mo_Saml_Local_Util::sanitize_certificate($V1)), $SW->quote($post["\x6d\x69\x6e\151\157\162\141\x6e\x67\145\137\163\x61\155\x6c\x5f\151\144\x70\x5f\163\x73\x6f\x5f\x62\x69\x6e\144\x69\x6e\147"]), $SW->quote($post["\x73\x69\156\x67\x6c\x65\137\154\157\147\157\165\x74\137\165\162\x6c"]), $SW->quote($post["\x6d\x6f\137\163\x61\x6d\x6c\x5f\x73\x65\154\145\143\x74\137\163\x69\147\x6e\137\141\154\x67\157"]), $SW->quote($post["\x64\x65\x66\141\165\x6c\x74\x5f\x72\145\154\141\171\137\163\x74\141\164\x65"]), $SW->quote($post["\x73\141\155\x6c\x5f\x72\145\161\x75\x65\x73\x74\137\163\x69\147\156"]), $SW->quote($post["\x6e\141\155\145\137\151\x64\x5f\146\157\x72\155\x61\x74"]), $SW->quote($post["\x6d\x69\156\x69\157\x72\141\156\147\145\x5f\x73\x61\155\154\x5f\151\x64\160\x5f\163\x6c\x6f\137\x62\x69\156\144\151\x6e\147"]));
        $zz->insert($SW->quoteName("\x23\137\137\155\x69\156\x69\x6f\x72\x61\156\x67\x65\x5f\x73\x61\x6d\154\137\143\x6f\x6e\x66\x69\x67"))->columns($SW->quoteName($TQ))->values(implode("\x2c", $N6));
        $SW->setQuery($zz);
        $SW->execute();
    }
    function update_existing_idp($post)
    {
        $qN = isset($post["\x73\141\x6d\154\x5f\x78\x35\60\71\x5f\143\x65\x72\x74\x69\146\151\x63\x61\164\x65"]) ? $post["\x73\141\155\154\x5f\170\x35\x30\x39\x5f\x63\145\x72\164\151\146\151\x63\x61\164\145"] : '';
        if (!is_array($qN)) {
            goto HO;
        }
        $V1 = implode("\73", $qN);
        HO:
        if (!(count($post) == 0)) {
            goto zs;
        }
        $this->setRedirect("\x69\156\144\x65\170\x2e\x70\x68\160\77\157\x70\x74\x69\x6f\x6e\x3d\x63\157\155\x5f\155\151\156\x69\157\x72\x61\156\147\x65\x5f\x73\x61\x6d\x6c\46\164\x61\142\75\151\x64\160");
        return;
        zs:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\151\144\160\137\x6e\141\155\145") . "\x20\x3d\x20" . $SW->quote(isset($post["\x69\x64\160\137\156\x61\x6d\145"]) ? $post["\x69\x64\160\x5f\156\141\155\145"] : ''), $SW->quoteName("\151\x64\160\137\145\156\164\151\x74\171\x5f\x69\x64") . "\40\75\x20" . $SW->quote(isset($post["\151\x64\160\137\x65\x6e\x74\x69\x74\171\x5f\x69\144"]) ? $post["\151\x64\160\137\x65\x6e\164\x69\164\171\137\151\x64"] : ''), $SW->quoteName("\163\151\156\147\x6c\145\137\163\x69\x67\156\x6f\156\137\x73\145\x72\166\x69\x63\145\x5f\165\162\x6c") . "\x20\x3d\40" . $SW->quote(isset($post["\163\151\156\x67\x6c\x65\137\x73\151\147\156\157\156\137\163\x65\162\166\x69\143\145\x5f\x75\162\154"]) ? $post["\163\151\x6e\x67\x6c\145\x5f\163\151\x67\x6e\157\x6e\x5f\x73\x65\x72\166\x69\x63\x65\x5f\165\162\x6c"] : ''), $SW->quoteName("\x63\145\x72\x74\x69\x66\151\143\141\x74\145") . "\40\75\40" . $SW->quote($V1), $SW->quoteName("\x62\x69\x6e\144\x69\x6e\x67") . "\x20\75\x20" . $SW->quote(isset($post["\155\151\x6e\x69\157\162\x61\x6e\x67\145\x5f\163\141\x6d\x6c\x5f\x69\144\160\x5f\x73\163\x6f\x5f\x62\151\x6e\144\151\156\x67"]) ? $post["\155\151\156\151\x6f\x72\x61\x6e\147\x65\x5f\x73\141\155\x6c\137\151\x64\x70\137\163\163\x6f\137\x62\151\x6e\x64\151\156\147"] : "\110\x54\x54\120\x2d\x52\145\144\151\162\x65\143\x74"), $SW->quoteName("\x73\151\156\147\154\x65\x5f\x6c\x6f\x67\157\165\x74\x5f\165\x72\154") . "\40\75\x20" . $SW->quote(isset($post["\163\x69\156\147\x6c\145\x5f\x6c\x6f\x67\x6f\x75\x74\137\165\162\x6c"]) ? $post["\163\x69\156\x67\x6c\145\x5f\154\x6f\x67\157\x75\164\137\x75\x72\154"] : ''), $SW->quoteName("\x64\x65\146\x61\x75\154\x74\137\162\145\x6c\141\x79\x5f\163\164\x61\164\x65") . "\40\x3d\x20" . $SW->quote(isset($post["\x64\145\x66\141\165\x6c\x74\137\162\x65\154\x61\x79\137\163\164\141\x74\x65"]) ? $post["\x64\x65\146\x61\165\154\164\x5f\x72\x65\154\x61\x79\137\x73\164\x61\x74\x65"] : ''), $SW->quoteName("\155\x6f\137\x73\141\x6d\x6c\x5f\x73\145\154\145\143\164\137\x73\x69\147\x6e\137\141\154\147\157") . "\x20\75\x20" . $SW->quote(isset($post["\155\157\x5f\163\x61\x6d\154\137\163\145\x6c\145\143\164\x5f\163\151\x67\x6e\x5f\141\x6c\x67\x6f"]) ? $post["\155\x6f\x5f\x73\141\155\154\x5f\x73\x65\154\145\143\164\137\x73\151\x67\156\x5f\x61\x6c\147\x6f"] : "\122\123\101\x5f\123\x48\x41\x32\65\66"), $SW->quoteName("\163\x61\155\154\x5f\162\x65\x71\x75\x65\163\x74\x5f\x73\x69\147\x6e") . "\40\x3d\40" . $SW->quote(isset($post["\163\x61\x6d\x6c\137\162\145\x71\165\145\x73\164\137\x73\x69\x67\156"]) ? $post["\163\141\x6d\154\x5f\x72\x65\x71\x75\x65\x73\x74\137\x73\x69\147\156"] : ''), $SW->quoteName("\x6e\141\155\145\x5f\151\x64\x5f\146\x6f\x72\x6d\141\x74") . "\x20\75\40" . $SW->quote(isset($post["\156\x61\x6d\x65\137\151\x64\x5f\146\x6f\162\x6d\x61\x74"]) ? $post["\x6e\x61\x6d\145\137\151\x64\137\146\157\x72\155\x61\164"] : "\165\x72\x6e\72\x6f\x61\x73\x69\x73\72\156\141\x6d\x65\163\x3a\x74\143\72\123\x41\115\x4c\x3a\x31\56\x31\x3a\156\x61\155\145\151\x64\x2d\146\x6f\162\155\141\164\x3a\x75\156\163\160\145\143\x69\146\151\x65\144"), $SW->quoteName("\x6d\x69\156\151\x6f\162\141\156\147\x65\137\x73\x61\x6d\x6c\x5f\151\x64\160\x5f\163\154\x6f\137\142\151\156\x64\x69\x6e\x67") . "\x20\x3d\x20" . $SW->quote(isset($post["\155\x69\156\151\157\162\141\x6e\147\x65\137\163\x61\x6d\x6c\x5f\x69\144\160\137\163\x6c\x6f\137\142\151\x6e\x64\x69\156\x67"]) ? $post["\x6d\x69\156\x69\x6f\162\141\156\x67\x65\137\x73\141\155\154\137\151\144\160\137\x73\x6c\x6f\x5f\x62\x69\156\144\151\x6e\147"] : "\110\x54\x54\120\55\x52\x65\144\151\x72\145\x63\x74"), $SW->quoteName("\x41\x75\x74\150\x6e\x43\x6f\x6e\x74\x65\x78\x74\x43\154\x61\x73\x73\x52\x65\146") . "\x20\75\x20" . $SW->quote(isset($post["\x6d\x6f\x5f\x61\165\164\150\x6e\x5f\x63\x6f\156\x74\x65\x78\x5f\x63\x6c\141\163\163"]) ? $post["\x6d\157\137\141\165\164\150\156\x5f\x63\x6f\x6e\164\145\x78\x5f\x63\x6c\x61\x73\x73"] : "\120\x61\163\163\167\x6f\x72\144\120\162\157\164\145\x63\164\x64\124\x72\141\156\x73\160\x6f\x72\x74"));
        $Uh = array($SW->quoteName("\x69\x64") . "\x20\75\x20" . $SW->quote($post["\151\144\x70\137\x69\x64"]));
        $zz->update($SW->quoteName("\43\137\137\x6d\151\x6e\x69\157\162\141\x6e\147\145\x5f\163\141\x6d\154\137\x63\157\156\146\x69\x67"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
    }
    function importexport($ca = false)
    {
        $OA = UtilitiesSAML::isIDPConfigured();
        if (!(count($OA) == 0)) {
            goto XC;
        }
        $this->setRedirect("\151\156\144\145\x78\56\x70\150\x70\x3f\157\x70\164\151\x6f\x6e\75\143\157\x6d\137\155\151\x6e\x69\x6f\162\141\156\147\145\137\163\x61\155\154\46\x74\x61\142\75\151\144\x70", "\x50\154\145\x61\x73\x65\x20\x63\x6f\x6e\146\x69\x67\165\x72\145\40\141\x74\154\x65\x61\x73\x74\x20\123\x65\x72\x76\151\x63\x65\40\120\x72\x6f\x76\151\144\x65\162\40\123\145\164\x75\160\x20\x54\141\x62\40\164\x6f\x20\144\157\x77\x6e\x6c\x6f\141\144\x20\x74\x68\145\40\143\157\156\x66\x69\x67\x75\x72\x61\164\151\x6f\156\56", "\145\162\162\157\x72");
        return;
        XC:
        require_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "\x68\145\x6c\160\x65\162\163" . DIRECTORY_SEPARATOR . "\145\x78\x70\157\162\164\x2e\x70\150\x70";
        define("\x54\x61\x62\137\x43\154\x61\163\163\x5f\116\x61\x6d\x65\163", serialize(array("\151\144\x70\137\x69\x6e\x66\x6f" => "\155\x6f\x5f\x69\144\160\137\x69\156\146\x6f", "\162\157\154\145\137\155\x61\x70\160\x69\156\147" => "\155\157\137\162\157\154\x65\x5f\155\141\160\x70\x69\x6e\147", "\x61\164\164\162\x69\142\x75\x74\x65\x5f\155\x61\x70\x70\151\x6e\x67" => "\x6d\x6f\x5f\141\x74\x74\x72\x69\142\x75\x74\x65\x5f\155\141\x70\160\x69\x6e\147", "\x6c\x6f\x67\151\156\x20\x73\145\x74\x74\151\x6e\x67\163" => "\x6d\x6f\x5f\154\157\147\x69\156\137\x73\x65\x74\x74\151\x6e\147")));
        $ed = unserialize(Tab_Class_Names);
        $m0 = array();
        $pb = 0;
        Sn:
        if (!(count($OA) > $pb)) {
            goto MT;
        }
        $m0[$pb] = array("\151\144" => $OA[$pb]->id);
        foreach ($ed as $N5 => $n4) {
            $m0[$pb][$N5] = $this->mo_get_configuration_array($n4, $m0[$pb]["\x69\x64"]);
            yf:
        }
        sh:
        ro:
        $pb++;
        goto Sn;
        MT:
        if (!$m0) {
            goto C3;
        }
        $LX = json_encode($m0, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
        if (!$ca) {
            goto W2;
        }
        return $LX;
        W2:
        header("\x43\157\156\x74\x65\x6e\164\55\104\x69\163\160\x6f\x73\151\x74\x69\157\156\x3a\x20\141\164\x74\141\x63\x68\155\x65\156\x74\73\x20\x66\x69\x6c\145\x6e\141\155\x65\x3d\155\151\156\151\157\x72\141\156\147\145\x2d\163\x61\x6d\x6c\55\163\160\55\143\157\x6e\x66\151\x67\56\152\x73\x6f\156");
        echo $LX;
        exit;
        C3:
        return;
    }
    function updateOrganizationDetails()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        $C1 = isset($post["\157\162\147\141\156\151\x7a\141\164\151\x6f\156\x5f\x6e\x61\155\145"]) ? $post["\x6f\162\x67\141\156\x69\172\x61\164\151\x6f\156\x5f\156\x61\x6d\x65"] : '';
        $jx = isset($post["\157\x72\x67\x61\x6e\x69\x7a\x61\164\x69\157\x6e\x5f\x64\151\x73\x70\x6c\141\171\137\156\141\155\145"]) ? $post["\x6f\x72\147\x61\156\151\172\x61\x74\151\x6f\x6e\x5f\x64\x69\163\160\x6c\x61\x79\137\x6e\141\155\145"] : '';
        $hj = isset($post["\x6f\162\147\x61\156\x69\172\x61\164\x69\157\156\137\x75\x72\x6c"]) ? $post["\x6f\162\147\x61\156\x69\172\141\164\x69\x6f\156\x5f\165\162\x6c"] : '';
        $gp = isset($post["\164\145\143\x68\x5f\160\145\162\137\156\x61\x6d\x65"]) ? $post["\x74\x65\143\150\x5f\x70\x65\162\x5f\x6e\141\x6d\x65"] : '';
        $kH = isset($post["\164\145\x63\x68\x5f\145\155\141\151\154\x5f\141\x64\x64"]) ? $post["\164\145\143\150\x5f\145\155\141\x69\x6c\137\141\144\x64"] : '';
        $Qp = isset($post["\163\165\160\160\x6f\x72\x74\137\160\x65\x72\x5f\156\141\155\x65"]) ? $post["\x73\165\160\160\x6f\x72\164\137\160\145\x72\x5f\156\141\155\145"] : '';
        $eK = isset($post["\163\165\160\160\x6f\x72\164\137\x65\155\141\151\x6c\137\x61\144\144"]) ? $post["\x73\165\160\160\157\162\x74\x5f\145\x6d\x61\x69\x6c\x5f\x61\x64\x64"] : '';
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $Rv = array($SW->quoteName("\x6f\162\147\141\x6e\x69\172\x61\x74\x69\157\156\x5f\x6e\x61\155\x65") . "\40\x3d\40" . $SW->quote($C1), $SW->quoteName("\x6f\x72\x67\x61\156\151\172\x61\x74\151\x6f\x6e\137\144\151\x73\160\154\x61\x79\137\156\x61\x6d\x65") . "\40\75\x20" . $SW->quote($jx), $SW->quoteName("\x6f\x72\x67\x61\x6e\x69\x7a\141\x74\151\x6f\156\x5f\x75\162\x6c") . "\x20\75\40" . $SW->quote($hj), $SW->quoteName("\164\145\x63\150\x5f\160\x65\162\x5f\x6e\141\x6d\x65") . "\x20\75\x20" . $SW->quote($gp), $SW->quoteName("\x74\x65\143\x68\x5f\x65\x6d\x61\151\x6c\137\141\144\x64") . "\40\x3d\x20" . $SW->quote($kH), $SW->quoteName("\163\165\x70\x70\157\162\x74\x5f\160\145\162\x5f\156\x61\155\x65") . "\x20\75\x20" . $SW->quote($Qp), $SW->quoteName("\x73\165\x70\160\x6f\162\x74\137\145\155\x61\151\154\137\141\x64\x64") . "\x20\x3d\x20" . $SW->quote($eK));
        $Uh = array($SW->quoteName("\151\144") . "\40\75\x20\x31");
        $zz->update($SW->quoteName("\x23\137\x5f\155\x69\156\x69\x6f\x72\141\x6e\x67\x65\137\x73\x61\155\x6c\x5f\x63\165\x73\164\157\155\x65\162\x5f\144\x65\x74\141\x69\154\163"))->set($Rv)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        $this->setRedirect("\x69\x6e\x64\x65\170\x2e\x70\150\160\77\157\x70\x74\151\157\156\75\x63\x6f\155\137\155\x69\156\151\157\x72\x61\156\x67\145\x5f\163\x61\x6d\154\46\x74\x61\x62\x3d\x64\145\x73\x63\162\x69\x70\x74\151\157\x6e", "\123\165\143\143\x65\163\x73\146\x75\154\x6c\171\x20\x75\160\144\x61\164\x65\x64\40\157\162\x61\147\x61\156\x69\x7a\x61\164\151\x6f\156\40\x64\145\x74\x61\151\154\163");
    }
    function mo_get_configuration_array($dd, $JJ)
    {
        if (!($dd == "\x6d\157\137\151\144\x70\x5f\151\x6e\x66\x6f")) {
            goto Bf;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select(array("\x2a"));
        $zz->from($SW->quoteName("\43\137\137\x6d\x69\x6e\x69\157\x72\x61\156\147\145\137\163\x61\155\x6c\x5f\143\x6f\156\146\x69\147"));
        $zz->where($SW->quoteName("\x69\x64") . "\40\75" . $JJ);
        $SW->setQuery($zz);
        $OA = $SW->loadAssoc();
        Bf:
        if (!($dd == "\155\157\137\141\x74\164\162\151\142\165\x74\145\x5f\155\141\x70\160\x69\156\147")) {
            goto Ir;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select(array("\52"));
        $zz->from($SW->quoteName("\x23\137\137\155\x69\156\x69\x6f\162\141\156\x67\x65\x5f\x73\x61\x6d\x6c\x5f\143\x6f\156\x66\151\147"));
        $zz->where($SW->quoteName("\x69\x64") . "\40\75" . $this->get_idp_id($JJ));
        $SW->setQuery($zz);
        $OA = $SW->loadAssoc();
        Ir:
        if (!($dd == "\x6d\x6f\x5f\162\157\154\x65\137\155\141\x70\160\151\x6e\x67")) {
            goto rk;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select(array("\x2a"));
        $zz->from($SW->quoteName("\43\137\x5f\155\151\x6e\151\157\162\x61\156\147\x65\137\163\141\x6d\154\137\162\x6f\x6c\x65\137\155\x61\x70\x70\151\156\x67"));
        $zz->where($SW->quoteName("\x69\x64\160\137\x69\x64") . "\x20\75" . $this->get_idp_id($JJ));
        $SW->setQuery($zz);
        $OA = $SW->loadAssoc();
        rk:
        if (!($dd == "\x6d\157\x5f\x6c\x6f\x67\151\156\x5f\x73\x65\164\164\151\x6e\x67")) {
            goto Rx;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select(array("\x2a"));
        $zz->from($SW->quoteName("\43\x5f\x5f\x6d\x69\x6e\x69\x6f\162\141\x6e\147\x65\137\163\x61\x6d\x6c\137\x63\165\163\164\x6f\155\x65\x72\x5f\x64\x65\164\x61\151\x6c\163"));
        $zz->where($SW->quoteName("\x69\x64") . "\x20\x3d\x31");
        $SW->setQuery($zz);
        $OA = $SW->loadAssoc();
        Rx:
        $YC = call_user_func($dd . "\72\x3a\x67\145\164\x43\157\x6e\x73\x74\x61\x6e\164\163");
        $nJ = array();
        foreach ($YC as $N5 => $n4) {
            if (empty($OA)) {
                goto P1;
            }
            if (empty($OA[$n4])) {
                goto gI;
            }
            $nJ[$N5] = $OA[$n4];
            gI:
            P1:
            F2:
        }
        P6:
        return $nJ;
    }
    function get_idp_id($ui)
    {
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select(array("\x2a"));
        $zz->from($SW->quoteName("\x23\x5f\137\155\x69\x6e\x69\x6f\x72\x61\x6e\147\145\137\163\141\x6d\x6c\x5f\143\157\156\146\151\x67"));
        $zz->where($SW->quoteName("\x69\x64") . "\x20\75\40" . $ui);
        $SW->setQuery($zz);
        $OA = $SW->loadAssoc();
        return $OA["\151\144"];
    }
    function import()
    {
        $op = @file_get_contents($_FILES["\x63\x6f\x6e\x66\151\147\165\x72\141\164\151\157\156\x5f\146\x69\154\x65"]["\x74\155\x70\x5f\156\x61\x6d\145"]);
        $lQ = json_decode($op, true);
        if (!empty($lQ)) {
            goto Zx;
        }
        $this->setRedirect("\151\156\x64\x65\x78\x2e\160\150\x70\x3f\157\x70\x74\151\x6f\156\75\143\x6f\155\x5f\x6d\x69\x6e\x69\157\x72\141\x6e\147\x65\137\163\x61\x6d\x6c\46\164\x61\x62\x3d\x69\144\160", "\120\x6c\145\x61\x73\145\x20\x73\145\x6c\145\x63\164\x2f\x63\x68\x6f\157\x73\145\x20\164\150\145\x20\x2e\x6a\163\157\x6e\x20\x66\x69\x6c\x65\x20\x74\157\x20\x69\x6d\160\x6f\162\x74\40\x74\x68\145\x20\103\157\x6e\146\x69\147\165\x72\141\x74\151\x6f\x6e", "\145\162\162\x6f\162");
        return;
        Zx:
        $pb = 0;
        Cp:
        if (!($pb < count($lQ))) {
            goto hX;
        }
        $Fh = $this->mo_update_configuration_array($lQ[$pb]);
        zj:
        $pb++;
        goto Cp;
        hX:
        if (!empty($Fh) || $Fh != NULL) {
            goto aG;
        }
        $this->setRedirect("\x69\156\x64\x65\x78\x2e\x70\150\160\77\x6f\x70\164\151\157\x6e\75\x63\157\155\x5f\155\151\156\151\157\x72\x61\156\147\145\x5f\163\x61\155\154\46\164\141\x62\75\151\x64\x70", "\123\165\x63\145\x73\163\x66\x75\x6c\x6c\x79\x20\125\x70\x64\141\164\x65\x64\x20\x74\x68\145\40\x63\x6f\156\146\151\147\165\162\x61\x74\151\x6f\156");
        goto ke;
        aG:
        if (!($Fh == false)) {
            goto QK;
        }
        $EV = UtilitiesSAML::nOfSP();
        $this->setRedirect("\x69\156\144\x65\x78\56\x70\150\x70\x3f\x6f\x70\x74\x69\157\156\75\x63\157\x6d\137\155\x69\156\151\x6f\162\141\x6e\x67\x65\x5f\x73\x61\155\154\46\164\141\142\x3d\151\144\160", "\131\x6f\165\x20\x68\x61\x76\145\x20\160\165\x72\x63\x68\141\x73\145\144\x20\164\x68\x65\x20\x6c\x69\143\145\156\x73\x65\x20\x66\x6f\162\x20" . $EV . "\40\x49\x44\120\163\x2e\40\x50\x6c\x65\x61\163\x65\x20\x63\157\156\x74\x61\x63\x74\40\141\x74\x3c\x61\x20\150\162\x65\x66\x3d\x22\x6d\141\x69\x6c\164\x6f\x3a\152\157\157\155\x6c\141\x73\x75\160\160\x6f\x72\164\x40\x78\145\x63\x75\x72\151\146\x79\56\x63\x6f\x6d\x22\x3e\40\x6a\x6f\157\x6d\154\x61\163\165\x70\160\x6f\x72\x74\x40\x78\x65\143\165\162\151\x66\x79\56\x63\x6f\155\74\57\x61\x3e\40\164\x6f\x20\x75\x70\x67\162\141\144\x65\x20\x74\x68\x65\x20\154\151\x63\145\x6e\x73\145\x20\x69\x66\x20\x79\x6f\165\x20\167\141\156\x74\40\x74\157\40\141\144\144\40\155\157\162\x65\40\x49\x44\x50\163\56", "\145\162\162\x6f\x72");
        QK:
        ke:
    }
    function mo_update_configuration_array($m0)
    {
        require_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "\x68\x65\x6c\160\x65\162\163" . DIRECTORY_SEPARATOR . "\x65\x78\160\157\x72\164\56\x70\x68\x70";
        define("\x54\x61\142\x5f\x43\x6c\141\163\x73\137\x4e\x61\155\x65\163", serialize(array("\151\144\x70\137\x69\x6e\146\x6f" => "\155\x6f\x5f\151\144\x70\137\151\x6e\146\157", "\x72\157\x6c\x65\137\x6d\141\x70\160\151\156\147" => "\x6d\x6f\x5f\x72\157\x6c\x65\x5f\x6d\x61\x70\x70\x69\156\147", "\x61\164\x74\162\151\142\165\164\x65\137\x6d\141\160\160\151\156\147" => "\155\x6f\x5f\x61\x74\x74\x72\x69\142\165\164\x65\137\x6d\x61\x70\x70\151\156\147", "\x6c\157\147\x69\156\40\x73\x65\x74\x74\151\156\x67\163" => "\155\x6f\137\x6c\x6f\147\151\x6e\x5f\x73\145\164\164\x69\156\147")));
        $ed = unserialize(Tab_Class_Names);
        $ui = $m0["\151\x64"];
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select(array("\x2a"));
        $zz->from($SW->quoteName("\43\x5f\x5f\x6d\151\x6e\151\157\162\x61\156\x67\145\x5f\163\141\155\x6c\x5f\x63\157\x6e\x66\151\147"));
        $SW->setQuery($zz);
        $OA = $SW->loadAssocList();
        $Qd = count($OA);
        $ce = UtilitiesSAML::nOfSP();
        if (!($ce === 0)) {
            goto zW;
        }
        $EV = 1;
        zW:
        $Wy = mo_idp_info::getConstants();
        $g5 = false;
        $pb = 0;
        Yn:
        if (!($pb < count($OA))) {
            goto hp;
        }
        $g5 = true;
        foreach ($Wy as $N5 => $n4) {
            if (!($OA[$pb][$N5] != $m0["\151\x64\160\x5f\151\x6e\x66\x6f"][$N5])) {
                goto Gm;
            }
            $g5 = false;
            Gm:
            qV:
        }
        g9:
        if (!$g5) {
            goto qj;
        }
        return;
        qj:
        yg:
        $pb++;
        goto Yn;
        hp:
        if (!(count($OA) > $ce)) {
            goto T9;
        }
        return false;
        T9:
        foreach ($ed as $KS => $dd) {
            $lp = array();
            $N6 = array();
            $TQ = array();
            $Pq = 0;
            $ui = Mo_saml_Local_Util::get_last_idp_id();
            foreach ($m0[$KS] as $N5 => $n4) {
                $Pq = 1;
                if (!($N5 == "\151\144\x70\137\151\144" && $n4 != $ui)) {
                    goto YP;
                }
                $n4 = $ui;
                YP:
                $lp[] = $SW->quoteName($N5) . "\40\75\40" . $SW->quote($n4);
                $N6[] = $SW->quote($n4);
                array_push($TQ, $N5);
                v1:
            }
            ON:
            if (!($dd == "\155\157\137\x69\x64\160\137\x69\x6e\146\157" && $Pq == 1)) {
                goto op;
            }
            $zz = $SW->getQuery(true);
            $zz->insert($SW->quoteName("\x23\x5f\x5f\x6d\151\156\151\x6f\162\x61\156\x67\x65\x5f\x73\x61\x6d\x6c\137\143\x6f\156\x66\x69\x67"))->columns($SW->quoteName($TQ))->values(implode("\54", $N6));
            $SW->setQuery($zz);
            $OS = $SW->execute();
            op:
            if (!($dd == "\x6d\157\137\x61\164\x74\x72\151\x62\165\164\145\137\155\141\160\160\151\x6e\147" && $Pq == 1)) {
                goto TV;
            }
            $SW = JFactory::getDbo();
            $zz = $SW->getQuery(true);
            $q4 = array($SW->quoteName("\151\144") . "\x20\x3d\40" . $ui);
            $zz->update($SW->quoteName("\43\x5f\137\155\151\156\x69\157\x72\141\x6e\x67\145\x5f\x73\141\155\154\137\x63\x6f\156\x66\x69\147"))->set($lp)->where($q4);
            $SW->setQuery($zz);
            $OS = $SW->execute();
            TV:
            if (!($dd == "\155\x6f\137\162\x6f\154\x65\137\x6d\141\x70\x70\151\156\x67" && $Pq == 1)) {
                goto id;
            }
            $SW = JFactory::getDbo();
            $zz = $SW->getQuery(true);
            $zz->insert($SW->quoteName("\x23\137\x5f\x6d\x69\x6e\151\x6f\162\x61\x6e\147\145\137\x73\141\x6d\x6c\137\162\157\x6c\145\137\155\141\x70\x70\x69\156\147"))->columns($SW->quoteName($TQ))->values(implode("\x2c", $N6));
            $SW->setQuery($zz);
            $OS = $SW->execute();
            id:
            if (!($dd == "\x6d\157\x5f\x6c\x6f\147\x69\156\137\163\x65\x74\164\151\x6e\x67" && $Pq == 1)) {
                goto Ke;
            }
            $SW = JFactory::getDbo();
            $zz = $SW->getQuery(true);
            $zz->update($SW->quoteName("\43\x5f\x5f\155\151\x6e\151\157\x72\x61\156\147\145\x5f\163\x61\x6d\x6c\137\x63\165\x73\164\x6f\x6d\145\162\x5f\x64\x65\164\x61\151\x6c\163"))->set($lp)->where($SW->quoteName("\151\x64") . "\40\75\40\61");
            $SW->setQuery($zz);
            $OS = $SW->execute();
            Ke:
            U1:
        }
        Ct:
    }
    function handle_upload_metadata()
    {
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $l7 = isset($EX["\163\x74\141\164\165\x73"]) ? $EX["\163\164\x61\x74\x75\x73"] : '';
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "\x74\x72\165\x65")) {
            goto lX;
        }
        $this->setRedirect("\151\x6e\144\145\170\56\160\x68\x70\x3f\157\160\x74\x69\x6f\x6e\x3d\x63\x6f\x6d\x5f\x6d\x69\x6e\151\157\x72\141\156\x67\x65\137\x73\x61\x6d\x6c\x26\x74\x61\142\75\151\x64\x70", "\x59\x6f\x75\x20\x68\141\x76\x65\x20\x6e\157\164\40\x61\x63\164\x69\166\141\164\145\144\x20\x79\x6f\165\x72\40\154\151\x63\x65\x6e\x73\145\40\x79\x65\x74\x2e", "\x65\x72\x72\x6f\162");
        return;
        lX:
        require_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "\150\145\154\160\145\x72\x73" . DIRECTORY_SEPARATOR . "\115\145\164\141\144\x61\x74\x61\122\145\141\x64\x65\162\x2e\x70\150\x70";
        $post = JFactory::getApplication()->input->post->getArray();
        $kN = $_FILES;
        if (!(isset($kN["\x6d\x65\164\x61\x64\141\164\141\137\x66\151\x6c\x65"]) || isset($post["\x6d\145\x74\x61\x64\141\164\x61\x5f\165\x72\154"]))) {
            goto a0;
        }
        if (!empty($kN["\155\x65\164\x61\144\141\164\x61\137\x66\151\x6c\145"]["\164\x6d\160\x5f\x6e\141\155\x65"])) {
            goto Vb;
        }
        $QQ = filter_var($post["\155\145\164\x61\x64\141\164\x61\137\165\x72\154"], FILTER_SANITIZE_URL);
        $Rl = array("\x73\x73\x6c" => array("\x76\145\x72\x69\146\171\137\x70\x65\x65\162" => false, "\x76\145\162\x69\146\171\x5f\160\145\145\162\x5f\156\x61\x6d\145" => false));
        if (empty($QQ)) {
            goto Ur;
        }
        $kN = file_get_contents($QQ, false, stream_context_create($Rl));
        goto MF;
        Ur:
        $this->setRedirect("\151\x6e\144\145\170\x2e\x70\x68\160\x3f\x6f\160\164\x69\x6f\x6e\75\x63\x6f\155\137\x6d\151\x6e\151\157\x72\x61\156\147\145\x5f\x73\141\x6d\154\46\164\141\142\x3d\x69\144\x70", "\116\x6f\40\x4d\x65\x74\141\144\x61\x74\141\40\106\151\154\145\x2f\125\122\114\40\x50\162\x6f\166\x69\144\x65\144\56", "\145\x72\x72\x6f\x72");
        return;
        MF:
        goto H1;
        Vb:
        $kN = @file_get_contents($kN["\x6d\x65\x74\141\144\x61\164\141\137\146\x69\x6c\x65"]["\x74\155\160\137\x6e\x61\x6d\145"]);
        H1:
        $this->upload_metadata($kN);
        a0:
    }
    function upload_metadata($kN)
    {
        $yH = 0;
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto Qe;
        }
        $this->setRedirect("\151\156\x64\145\x78\56\160\x68\x70\77\x6f\x70\164\x69\x6f\156\x3d\143\157\x6d\137\155\x69\156\x69\x6f\x72\x61\156\x67\145\137\163\141\x6d\154\x26\x74\x61\x62\x3d\151\144\x70");
        return;
        Qe:
        $eV = new DOMDocument();
        $eV->loadXML($kN);
        restore_error_handler();
        $OU = $eV->firstChild;
        if (!empty($OU)) {
            goto c8;
        }
        $this->setRedirect("\151\x6e\144\x65\x78\56\160\x68\x70\x3f\x6f\160\x74\151\157\156\x3d\143\x6f\x6d\x5f\x6d\151\x6e\151\157\x72\141\156\147\145\x5f\163\141\155\154\x26\164\141\142\75\151\x64\x70", "\x50\154\x65\141\163\145\x20\x70\x72\157\x76\151\x64\145\40\166\141\154\151\x64\40\x6d\145\164\x61\144\x61\164\141\x2e", "\x65\x72\162\x6f\x72");
        return;
        goto Jg;
        c8:
        $qt = new IDPMetadataReader($eV);
        $m3 = $qt->getIdentityProviders();
        if (!empty($m3)) {
            goto iY;
        }
        $this->setRedirect("\151\156\144\x65\170\56\160\x68\160\x3f\x6f\x70\x74\151\157\156\x3d\x63\x6f\155\137\155\x69\x6e\x69\x6f\162\x61\x6e\x67\x65\137\x73\141\x6d\x6c\46\x74\141\142\75\151\144\x70", "\x50\x6c\145\x61\x73\x65\x20\160\162\x6f\166\x69\144\x65\x20\166\141\154\151\x64\x20\155\x65\164\141\x64\141\164\x61\x2e", "\x65\x72\x72\x6f\162");
        return;
        iY:
        foreach ($m3 as $N5 => $cG) {
            $wk = isset($post["\151\144\160\137\156\x61\155\x65"]) ? $post["\151\x64\x70\137\156\x61\x6d\x65"] : '';
            $V_ = $cG->getLoginURL("\x48\x54\124\x50\55\x52\x65\144\x69\x72\145\x63\164");
            $gn = $cG->getEntityID();
            $V1 = $cG->getSigningCertificate();
            $V1 = implode("\x3b", $V1);
            $xy = $cG->getLogoutUrl("\x48\x54\x54\x50\x2d\122\145\x64\151\162\145\x63\x74");
            $PP = '';
            $yC = "\x52\123\101\137\123\110\101\x32\x35\x36";
            $HK = '';
            $Qi = "\x75\162\156\x3a\x6f\x61\163\x69\163\72\x6e\141\155\x65\x73\x3a\164\x63\72\x53\x41\x4d\114\72\x31\56\x31\72\x6e\x61\x6d\x65\151\144\55\x66\x6f\162\155\141\x74\72\x75\156\x73\160\145\x63\x69\146\x69\x65\x64";
            $Pc = "\x48\124\124\120\55\x52\145\x64\x69\162\145\x63\164";
            $SW = JFactory::getDbo();
            $zz = $SW->getQuery(true);
            $N6 = array($SW->quote($wk), $SW->quote(!empty($gn) ? $gn : ''), $SW->quote(!empty($V_) ? $V_ : ''), $SW->quote("\x48\124\124\120\x2d\122\x65\144\x69\162\x65\x63\164"), $SW->quote(!empty($V1) ? $V1 : ''), $SW->quote(!empty($xy) ? $xy : ''), $SW->quote($PP), $SW->quote($yC), $SW->quote(isset($post["\163\171\x6e\x63\137\155\x65\164\141\144\141\x74\141"]) ? $post["\x73\x79\156\x63\x5f\155\145\164\141\x64\x61\164\141"] : "\x6f\146\146"), $SW->quote(isset($post["\155\x65\x74\x61\x64\x61\x74\x61\x5f\165\x72\x6c"]) ? $post["\x6d\145\x74\141\x64\141\x74\141\137\165\162\154"] : ''), $SW->quote(isset($post["\163\171\156\143\137\x69\156\164\145\162\166\x61\x6c"]) ? $post["\163\171\x6e\x63\x5f\151\x6e\164\x65\x72\166\x61\154"] : ''), $SW->quote($yH), $SW->quote($HK), $SW->quote($Qi), $SW->quote($Pc));
            $SW->setQuery("\123\x45\114\x45\103\124\x20\x2a\x20\x46\122\x4f\115\40\x23\x5f\x5f\x6d\x69\x6e\x69\157\x72\x61\156\147\x65\137\x73\x61\x6d\x6c\x5f\143\x6f\x6e\x66\151\x67");
            $QG = $SW->loadObjectList();
            $do = array();
            foreach ($QG as $ro => $Qm) {
                $do[] = $Qm->idp_entity_id;
                Tm:
            }
            rn:
            $lp = array($SW->quoteName("\x69\144\160\x5f\156\x61\155\145") . "\75" . $SW->quote($wk), $SW->quoteName("\x69\144\160\x5f\x65\x6e\164\151\164\x79\137\151\144") . "\x20\x3d\40" . $SW->quote(!empty($gn) ? $gn : ''), $SW->quoteName("\163\x69\156\147\154\x65\x5f\163\x69\x67\x6e\x6f\156\x5f\x73\x65\162\x76\151\x63\145\x5f\x75\x72\x6c") . "\x20\75\40" . $SW->quote(!empty($V_) ? $V_ : ''), $SW->quoteName("\x62\151\156\144\151\156\147") . "\x20\75\x20" . $SW->quote("\110\124\x54\x50\x2d\122\145\x64\x69\162\x65\x63\x74"), $SW->quoteName("\x63\x65\162\164\151\x66\151\x63\x61\x74\x65") . "\x20\x3d\40" . $SW->quote(!empty($V1) ? $V1 : ''), $SW->quoteName("\x73\x69\x6e\147\154\145\137\154\157\x67\157\x75\164\x5f\x75\x72\x6c") . "\75" . $SW->quote(!empty($xy) ? $xy : ''), $SW->quoteName("\144\x65\x66\x61\165\154\164\x5f\162\x65\154\141\171\x5f\163\164\141\164\x65") . "\75" . $SW->quote(''), $SW->quoteName("\155\157\x5f\163\141\155\154\137\x73\x65\x6c\145\143\164\x5f\x73\x69\147\x6e\137\141\x6c\x67\157") . "\75" . $SW->quote($yC), $SW->quoteName("\141\165\x74\157\x5f\x73\x79\x6e\143\x5f\x65\156\141\142\x6c\145") . "\x20\75\x20" . $SW->quote(isset($post["\163\x79\x6e\143\x5f\155\x65\x74\x61\x64\x61\x74\141"]) ? $post["\x73\171\156\143\x5f\x6d\x65\x74\141\x64\141\x74\141"] : "\157\x66\146"), $SW->quoteName("\x6d\145\164\x61\144\141\x74\x61\x5f\165\162\x6c") . "\40\75\x20" . $SW->quote(isset($post["\x6d\x65\164\x61\144\x61\164\141\137\x75\x72\x6c"]) ? $post["\155\145\x74\141\144\x61\164\141\137\x75\162\154"] : ''), $SW->quoteName("\x6d\144\x61\x74\141\137\163\171\x6e\x63\x5f\x69\156\164\x65\x72\166\141\x6c") . "\x20\x3d\x20" . $SW->quote(isset($post["\163\x79\x6e\x63\x5f\151\156\x74\145\162\166\141\154"]) ? $post["\x73\x79\x6e\143\x5f\x69\156\x74\145\x72\x76\x61\154"] : ''), $SW->quoteName("\155\145\164\x61\144\x61\x74\x61\137\143\150\x65\x63\x6b\x5f\x74\x69\155\x65\x73\x74\141\x6d\160") . "\x20\x3d\40" . $SW->quote($yH), $SW->quoteName("\163\141\x6d\x6c\137\x72\145\x71\165\x65\x73\164\137\x73\151\x67\156") . "\40\x3d\40" . $SW->quote($HK), $SW->quoteName("\x6e\x61\x6d\145\137\151\144\x5f\146\x6f\162\155\x61\164") . "\40\x3d\x20" . $SW->quote($Qi), $SW->quoteName("\x6d\x69\x6e\x69\157\x72\141\156\147\145\x5f\x73\141\x6d\x6c\137\151\x64\x70\137\x73\154\x6f\x5f\x62\x69\156\x64\x69\156\147") . "\40\75\40" . $SW->quote($Pc));
            $ui = $post["\x69\144\160\137\x69\144"];
            $Uh = array($SW->quoteName("\x69\144") . "\x20\x3d" . $ui);
            if ($ui == 0) {
                goto hi;
            }
            $zz->update($SW->quoteName("\x23\137\x5f\x6d\x69\x6e\151\x6f\162\141\x6e\147\145\x5f\x73\141\155\154\x5f\x63\157\156\x66\151\147"))->set($lp)->where($Uh);
            goto Uv;
            hi:
            $TQ = array("\x69\144\160\x5f\x6e\x61\155\145", "\x69\x64\x70\137\145\156\164\x69\x74\x79\137\151\x64", "\x73\x69\x6e\147\154\x65\x5f\163\151\147\156\157\x6e\137\x73\x65\x72\166\151\143\x65\x5f\165\x72\154", "\x62\x69\x6e\144\x69\x6e\x67", "\x63\x65\162\x74\151\146\151\x63\x61\164\145", "\163\151\156\147\x6c\145\137\x6c\157\147\157\165\x74\x5f\x75\x72\154", "\x64\x65\146\141\x75\154\x74\137\162\145\x6c\x61\171\x5f\x73\164\x61\164\145", "\155\157\x5f\163\x61\x6d\154\137\163\145\154\x65\143\x74\137\163\151\x67\x6e\x5f\x61\154\x67\157", "\x61\165\x74\157\137\x73\x79\x6e\x63\137\145\156\141\142\x6c\x65", "\155\x65\x74\x61\144\141\164\x61\137\x75\162\x6c", "\x6d\x64\141\x74\x61\137\163\171\156\x63\137\151\x6e\164\145\162\x76\x61\x6c", "\155\145\x74\x61\144\141\164\141\137\143\150\x65\143\x6b\x5f\x74\151\155\145\x73\x74\141\155\x70", "\x73\141\155\x6c\x5f\x72\x65\161\x75\145\x73\164\137\163\151\x67\x6e", "\156\141\155\x65\x5f\151\x64\x5f\x66\x6f\x72\155\x61\164", "\x6d\151\156\151\157\162\141\x6e\x67\145\137\x73\x61\x6d\154\x5f\x69\144\160\x5f\163\154\157\137\x62\x69\156\144\x69\156\x67");
            $zz->insert($SW->quoteName("\x23\x5f\137\x6d\151\x6e\151\157\x72\141\x6e\x67\145\x5f\163\x61\x6d\x6c\x5f\143\157\156\x66\151\x67"))->columns($SW->quoteName($TQ))->values(implode("\54", $N6));
            Uv:
            $SW->setQuery($zz);
            $SW->execute();
            goto Eo;
            dR:
        }
        Eo:
        $this->setRedirect("\x69\156\x64\x65\170\56\160\150\x70\x3f\157\x70\164\x69\x6f\156\x3d\x63\x6f\155\137\155\151\x6e\151\x6f\162\141\156\x67\x65\137\x73\141\x6d\154\46\x74\x61\x62\75\x69\x64\160", "\x49\144\x65\156\x74\x69\x74\x79\40\120\x72\x6f\x76\151\x64\145\x72\x20\144\145\x74\141\x69\x6c\x73\x20\x73\141\x76\145\144\40\163\165\143\143\145\163\x73\x66\x75\x6c\x6c\171\56");
        return;
        Jg:
    }
    function saveConfig()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto RS;
        }
        $this->setRedirect("\x69\x6e\144\x65\170\x2e\x70\150\160\x3f\x6f\160\164\x69\x6f\x6e\75\143\x6f\155\x5f\x6d\x69\156\151\157\162\x61\156\x67\145\x5f\x73\141\155\x6c\x26\x74\x61\x62\x3d\x69\x64\160");
        return;
        RS:
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $l7 = $EX["\163\x74\x61\x74\x75\x73"];
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "\x74\x72\x75\x65")) {
            goto M6;
        }
        $this->setRedirect("\151\x6e\x64\145\x78\56\160\x68\x70\x3f\157\x70\164\x69\x6f\x6e\75\x63\x6f\155\x5f\155\151\x6e\151\157\x72\141\156\x67\x65\137\163\x61\x6d\154\46\164\x61\x62\75\x69\144\160", "\x59\157\x75\x20\x68\141\x76\145\x20\156\x6f\164\40\141\143\164\151\x76\141\x74\145\144\x20\171\x6f\165\162\x20\x6c\x69\x63\145\156\163\x65\x20\171\145\164\56", "\x65\162\x72\157\x72");
        return;
        M6:
        $tF = isset($post["\x6f\160\164\x69\x6f\156\x31"]) ? $post["\x6f\160\x74\151\x6f\x6e\x31"] : null;
        if ($tF == "\155\157\137\163\x61\155\x6c\137\x73\141\x76\145\137\143\x6f\x6e\146\x69\147") {
            goto sO;
        }
        if ($tF == "\x6d\x6f\x5f\163\141\155\x6c\x5f\x73\141\x76\145\x5f\141\164\x74\x72\151\142\165\164\145") {
            goto ap;
        }
        if (!($tF == "\x6d\x6f\x5f\x73\x61\155\x6c\x5f\163\x61\166\145\x5f\x63\165\163\164\x6f\x6d\137\163\x70\x5f\143\157\x6e\x66\x69\x67")) {
            goto Lu;
        }
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\x73\160\137\142\141\x73\145\x5f\165\162\x6c") . "\40\x3d\40" . $SW->quote(isset($post["\x73\x70\x5f\x62\141\163\x65\x5f\x75\x72\154"]) ? $post["\x73\160\137\142\x61\x73\145\137\x75\x72\x6c"] : ''), $SW->quoteName("\x73\160\x5f\145\x6e\164\151\164\x79\137\151\x64") . "\40\75\40" . $SW->quote(isset($post["\x73\160\137\145\156\x74\151\164\171\x5f\151\x64"]) ? $post["\163\160\137\145\x6e\x74\151\164\171\x5f\151\x64"] : ''));
        $Uh = array($SW->quoteName("\x69\144") . "\40\75\40\x31");
        $zz->update($SW->quoteName("\x23\x5f\137\x6d\x69\x6e\151\x6f\162\x61\x6e\x67\145\137\x73\x61\155\x6c\137\x63\165\163\x74\157\x6d\145\162\137\x64\x65\164\x61\x69\x6c\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        $ru = "\131\157\165\x72\40\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\164\x69\x6f\x6e\40\150\x61\163\x20\142\x65\x65\x6e\40\x73\x61\166\x65\x64\x20\x73\165\x63\x63\145\x73\163\146\x75\x6c\154\x79\x2e";
        $this->setRedirect("\151\156\144\x65\x78\56\x70\x68\x70\77\157\x70\x74\x69\157\156\x3d\x63\x6f\155\x5f\x6d\151\156\x69\157\x72\x61\156\x67\145\x5f\x73\x61\155\x6c\x26\164\141\x62\x3d\144\145\x73\143\x72\x69\160\164\151\157\x6e", $ru);
        Lu:
        goto Vo;
        ap:
        if (isset($post["\163\141\x6d\154\137\x69\x64\160\x5f\x6e\x61\155\145"]) && !empty($post["\x73\141\155\154\x5f\x69\x64\x70\x5f\156\x61\x6d\145"])) {
            goto Pa;
        }
        $ru = "\120\154\145\x61\x73\x65\40\x73\x65\x6c\145\143\x74\x20\x74\x68\145\x20\x49\x44\120\x20\x66\162\157\155\40\164\150\145\x20\144\x72\x6f\x70\144\x6f\167\x6e\x20\x61\156\x64\40\x63\x6c\x69\143\x6b\40\157\156\x20\163\145\154\x65\x63\164\x20\x62\165\164\x74\x6f\x6e\x20\164\x6f\x20\x73\x61\166\145\40\164\x68\145\x20\x63\x6f\x6e\146\x69\147\165\x72\x61\x74\x69\157\156\x2e";
        $QQ = "\151\156\x64\145\170\x2e\160\150\160\x3f\x6f\x70\164\x69\157\x6e\x3d\x63\x6f\155\x5f\x6d\151\x6e\151\x6f\162\x61\x6e\x67\x65\x5f\x73\x61\155\154\46\164\141\142\75\x61\164\x74\162\x69\142\x75\x74\x65\137\x6d\141\x70\x70\x69\x6e\147";
        $this->setRedirect($QQ, $ru, "\145\162\x72\157\162");
        goto Km;
        Pa:
        $mz = array_key_exists("\165\163\145\162\137\160\162\x6f\x66\x69\x6c\x65\x5f\141\x74\164\x72\137\156\x61\x6d\145", $post) ? $post["\x75\163\x65\162\137\x70\x72\157\x66\x69\154\x65\137\x61\164\164\162\x5f\156\x61\155\145"] : array();
        $BZ = array_key_exists("\165\x73\x65\162\x5f\160\x72\x6f\x66\x69\154\x65\x5f\x61\164\164\162\x5f\x76\x61\x6c\165\x65", $post) ? $post["\x75\x73\x65\x72\x5f\x70\x72\x6f\146\151\154\x65\x5f\x61\164\164\162\137\x76\x61\154\165\145"] : array();
        $JN = array();
        foreach ($mz as $N5 => $n4) {
            $Y6 = trim($n4);
            $Y6 = preg_replace("\x2f\x5c\163\53\x2f", '', $Y6);
            if (empty($Y6)) {
                goto Tj;
            }
            $wM = $BZ[$N5];
            $Zw = trim($wM);
            if (empty($Zw)) {
                goto aw;
            }
            $M8 = array();
            $M8["\x61\164\x74\x72\137\156\x61\x6d\x65"] = $Y6;
            $M8["\x61\164\164\162\137\166\141\x6c\x75\145"] = $Zw;
            array_push($JN, $M8);
            aw:
            Tj:
            ZL:
        }
        Wr:
        $JN = json_encode($JN);
        $D_ = array_key_exists("\165\x73\x65\x72\137\146\151\x65\x6c\x64\x5f\141\x74\x74\x72\x5f\156\141\x6d\145", $post) ? $post["\165\x73\x65\162\137\146\x69\145\x6c\x64\137\x61\164\164\162\x5f\156\141\155\x65"] : '';
        $Gh = array_key_exists("\165\x73\x65\162\137\146\x69\x65\x6c\x64\137\141\164\x74\x72\x5f\x76\141\154\x75\145", $post) ? $post["\165\163\145\162\x5f\146\x69\x65\x6c\144\137\x61\164\164\x72\x5f\166\x61\154\165\x65"] : '';
        $ns = array();
        if (!($D_ != '' && $Gh != '')) {
            goto SX;
        }
        foreach ($D_ as $N5 => $n4) {
            $Vc = trim($n4);
            if (empty($Vc)) {
                goto a9;
            }
            $pm = $Gh[$N5];
            $qT = trim($pm);
            if (empty($qT)) {
                goto xB;
            }
            $GI = array();
            $GI["\141\x74\x74\x72\137\x6e\141\155\x65"] = $Vc;
            $GI["\141\x74\164\162\x5f\166\141\154\x75\145"] = $qT;
            array_push($ns, $GI);
            xB:
            a9:
            p7:
        }
        Mz:
        SX:
        $ns = json_encode($ns);
        $R1 = array_key_exists("\x75\x73\145\162\137\x63\x6f\156\x74\x61\x63\x74\137\141\164\x74\162\x5f\x6e\x61\155\x65", $post) ? $post["\165\163\x65\x72\137\x63\x6f\x6e\164\x61\143\164\x5f\x61\x74\x74\x72\137\156\141\x6d\x65"] : '';
        $zY = array_key_exists("\x75\163\x65\x72\x5f\x63\x6f\156\x74\141\x63\x74\137\141\164\164\162\x5f\x76\141\154\x75\x65", $post) ? $post["\165\x73\145\162\137\143\157\x6e\164\x61\x63\x74\137\141\x74\164\162\137\x76\x61\x6c\165\145"] : '';
        $PC = array();
        if (!($R1 != '' && $zY != '')) {
            goto Po;
        }
        foreach ($R1 as $N5 => $n4) {
            $Vc = trim($n4);
            if (empty($Vc)) {
                goto KI;
            }
            $pm = trim($zY[$N5]);
            if (empty($pm)) {
                goto oD;
            }
            $GI = array();
            $GI["\141\x74\164\x72\137\156\x61\155\145"] = $Vc;
            $GI["\141\164\x74\x72\x5f\166\141\154\x75\x65"] = $pm;
            array_push($PC, $GI);
            oD:
            KI:
            DD:
        }
        zV:
        Po:
        $PC = json_encode($PC);
        $J4 = array_key_exists("\165\x73\x65\162\x5f\x63\x77\x5f\x61\x74\x74\x72\137\x6e\x61\x6d\145", $post) ? $post["\165\x73\x65\162\x5f\x63\x77\x5f\141\164\x74\162\137\x6e\x61\155\145"] : '';
        $zg = array_key_exists("\x75\x73\145\x72\x5f\143\167\x5f\x61\164\x74\x72\137\166\141\x6c\165\x65", $post) ? $post["\x75\x73\145\x72\x5f\x63\167\x5f\x61\164\x74\x72\x5f\166\141\x6c\x75\145"] : '';
        $eJ = array();
        if (!($J4 != '' && $zg != '')) {
            goto pl;
        }
        foreach ($J4 as $N5 => $n4) {
            $Vc = trim($n4);
            if (empty($Vc)) {
                goto W1;
            }
            $pm = trim($zg[$N5]);
            if (empty($pm)) {
                goto bO;
            }
            $GI = array();
            $GI["\141\164\164\162\x5f\x6e\x61\155\145"] = $Vc;
            $GI["\x61\164\164\x72\x5f\x76\141\154\165\x65"] = $pm;
            array_push($eJ, $GI);
            bO:
            W1:
            O_:
        }
        TT:
        pl:
        $eJ = json_encode($eJ);
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\165\x73\x65\162\x6e\x61\x6d\145") . "\x20\75\40" . $SW->quote(isset($post["\x75\163\x65\162\156\141\155\145"]) ? trim($post["\x75\x73\x65\162\156\x61\155\x65"]) : ''), $SW->quoteName("\x65\155\x61\x69\x6c") . "\40\75\x20" . $SW->quote(isset($post["\x65\x6d\141\x69\154"]) ? trim($post["\x65\x6d\141\151\x6c"]) : ''), $SW->quoteName("\156\x61\x6d\x65") . "\40\x3d\40" . $SW->quote(isset($post["\x6e\x61\155\145"]) ? trim($post["\156\x61\155\145"]) : ''), $SW->quoteName("\x66\151\162\163\x74\x5f\156\141\155\x65") . "\x20\x3d\40" . $SW->quote(isset($post["\x66\151\x72\x73\x74\137\156\141\x6d\x65"]) ? trim($post["\146\151\x72\163\164\137\x6e\x61\x6d\x65"]) : ''), $SW->quoteName("\154\141\163\164\x5f\156\141\x6d\x65") . "\x20\x3d\x20" . $SW->quote(isset($post["\154\x61\163\x74\137\156\x61\155\x65"]) ? trim($post["\154\141\x73\164\x5f\x6e\x61\x6d\145"]) : ''), $SW->quoteName("\x64\151\163\141\x62\x6c\145\137\165\x70\144\x61\x74\x65\x5f\x65\170\151\163\x74\x69\156\147\137\143\x75\x73\164\x6f\x6d\145\162\x5f\x61\x74\164\162\x69\142\165\x74\145\163") . "\x20\x3d\x20" . $SW->quote(isset($post["\x64\x69\x73\141\142\154\145\137\x75\160\x64\141\164\145\x5f\x65\x78\x69\x73\164\151\156\147\137\x63\165\163\x74\157\x6d\145\x72\x5f\141\x74\164\162\151\x62\165\x74\x65\x73"]) ? $post["\144\151\163\141\x62\x6c\145\x5f\x75\x70\144\x61\164\145\x5f\x65\170\151\163\164\151\156\147\137\143\x75\163\164\157\x6d\x65\x72\x5f\x61\164\x74\x72\151\142\165\x74\x65\x73"] : 0), $SW->quoteName("\165\163\x65\x72\137\160\162\157\x66\x69\x6c\145\x5f\141\x74\164\162\x69\x62\165\x74\x65\163") . "\x20\x3d\x20" . $SW->quote($JN), $SW->quoteName("\165\x73\x65\x72\x5f\146\151\x65\154\x64\x5f\141\x74\164\162\x69\x62\x75\164\x65\x73") . "\x20\x3d\x20" . $SW->quote($ns), $SW->quoteName("\x75\163\x65\162\137\143\x6f\156\x74\x61\143\164\x5f\x61\x74\164\162\x69\x62\x75\x74\145\x73") . "\x20\75\40" . $SW->quote($PC), $SW->quoteName("\165\x73\145\x72\x5f\x63\167\x5f\141\x74\x74\162\151\x62\x75\x74\x65\163") . "\40\x3d\x20" . $SW->quote($eJ));
        $Uh = array($SW->quoteName("\151\144\160\x5f\156\x61\155\145") . "\x20\75\x20" . $SW->quote($post["\163\141\155\154\x5f\151\144\160\x5f\x6e\141\155\x65"]));
        $zz->update($SW->quoteName("\43\x5f\x5f\155\x69\x6e\151\x6f\x72\141\156\x67\x65\137\x73\x61\x6d\154\137\143\157\156\x66\151\x67"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        $ru = "\x41\164\x74\x72\151\x62\165\164\145\40\115\x61\160\160\x69\x6e\x67\x20\146\157\162\40\111\x44\x50\40" . $post["\163\141\x6d\154\x5f\x69\x64\x70\x5f\156\141\x6d\x65"] . "\x20\150\141\x73\40\142\x65\145\x6e\x20\x73\x61\166\x65\144\x20\163\165\x63\143\x65\x73\163\146\x75\154\154\171\x2e";
        $QQ = "\x69\x6e\144\x65\x78\56\x70\x68\160\77\x6f\x70\164\151\157\156\75\143\x6f\155\x5f\x6d\151\x6e\x69\x6f\162\x61\156\147\x65\137\x73\141\x6d\x6c\46\x74\141\x62\75\141\x74\164\162\x69\x62\165\164\x65\137\155\x61\160\x70\151\156\147\x26\151\x64\x70\137\156\141\155\x65\x5f\x61\164\164\x72\75" . $post["\x73\x61\155\x6c\137\x69\144\x70\137\156\141\x6d\145"];
        $this->setRedirect($QQ, $ru);
        Km:
        Vo:
        goto tU;
        sO:
        if (isset($post["\x69\x64\x70\x5f\151\x64"]) && isset($post["\x69\144\x70\137\x6e\x61\155\145"]) && isset($post["\x69\x64\x70\x5f\145\156\164\151\164\171\x5f\151\x64"]) && isset($post["\x73\151\156\x67\154\145\137\163\x69\x67\156\157\156\137\163\x65\x72\166\x69\x63\x65\x5f\x75\162\154"])) {
            goto xw;
        }
        $this->setRedirect("\x69\156\x64\145\170\56\160\x68\x70\x3f\x6f\160\x74\151\x6f\x6e\75\143\x6f\155\x5f\155\x69\156\151\157\x72\141\x6e\x67\x65\137\x73\x61\155\154\x26\164\141\142\75\x69\x64\160\46\x69\x64\75" . $post["\151\144\x70\x5f\x69\x64"], "\x50\x6c\x65\x61\163\145\x20\160\x72\157\x76\x69\x64\x65\40\141\x6c\x6c\40\x74\150\x65\x20\162\145\x71\x75\151\162\x65\x64\x20\x69\156\x66\157\162\155\141\x74\151\x6f\156\x2e", "\x65\162\x72\157\162");
        return;
        goto SL;
        xw:
        $ui = $post["\151\x64\160\137\151\x64"];
        if ($ui == 0) {
            goto yD;
        }
        $this->update_existing_idp($post);
        goto gh;
        yD:
        $lK = $EX["\143\165\163\164\x6f\x6d\x65\162\137\153\145\x79"];
        $Q4 = $EX["\141\x70\x69\137\x6b\x65\x79"];
        $vS = $this->checkCL($lK, $Q4, 0);
        if (!$vS) {
            goto MA;
        }
        return;
        goto H5;
        MA:
        $this->insert_new_idp($post);
        H5:
        gh:
        SL:
        $ru = "\131\157\165\162\40\143\x6f\x6e\x66\151\147\165\x72\x61\x74\151\157\156\x20\x68\141\163\40\x62\x65\x65\156\x20\x73\x61\x76\x65\x64\x20\163\x75\x63\143\x65\x73\163\146\165\154\x6c\x79\x2e\x20\131\x6f\x75\40\x63\141\156\40\164\145\163\164\40\x74\150\145\x20\151\144\x70\x20\x63\157\x6e\x66\151\x67\165\x72\x61\x74\x69\x6f\156\x73\40\x6e\157\x77\56";
        $this->setRedirect("\x69\156\144\x65\170\56\160\x68\160\77\x6f\160\x74\x69\x6f\x6e\x3d\x63\157\x6d\x5f\x6d\x69\156\151\x6f\162\x61\156\147\x65\137\163\x61\155\x6c\46\164\x61\x62\75\x69\x64\x70", $ru);
        tU:
    }
    public function saveRolemapping()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto f0;
        }
        $this->setRedirect("\151\156\x64\145\170\x2e\160\x68\x70\77\x6f\x70\x74\x69\x6f\x6e\x3d\x63\x6f\x6d\137\x6d\x69\x6e\151\157\162\x61\x6e\147\x65\137\163\141\x6d\154\46\164\141\142\75\x69\144\x70");
        return;
        f0:
        $EX = Mo_Saml_Local_Util::getCustomerDetails();
        $l7 = isset($EX["\163\x74\x61\164\x75\x73"]) ? $EX["\163\164\141\164\165\x73"] : '';
        if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($l7) != "\164\x72\x75\x65")) {
            goto YT;
        }
        $this->setRedirect("\x69\x6e\144\145\x78\x2e\x70\150\160\77\x6f\160\x74\x69\x6f\x6e\75\143\x6f\x6d\137\155\151\x6e\151\x6f\162\141\156\x67\x65\137\x73\141\155\x6c", "\131\x6f\165\x20\x68\x61\166\145\40\x6e\x6f\x74\40\141\x63\x74\x69\x76\141\x74\x65\x64\x20\x79\157\165\162\x20\x6c\x69\x63\145\x6e\x73\x65\40\171\x65\164\56", "\145\162\162\157\162");
        return;
        YT:
        if (isset($post["\x63\x75\162\162\145\156\164\x5f\151\x64\x70\137\x69\x64"]) && !empty($post["\x63\165\162\x72\145\x6e\164\x5f\x69\144\x70\137\x69\144"])) {
            goto ve;
        }
        $this->setRedirect("\151\x6e\144\x65\170\x2e\160\150\160\77\157\x70\164\x69\157\x6e\x3d\143\x6f\x6d\x5f\155\151\156\151\157\162\141\x6e\147\x65\x5f\163\x61\x6d\154\x26\x74\141\142\75\147\162\157\x75\x70\137\x6d\141\160\160\x69\156\147", "\120\154\145\141\163\x65\x20\x73\145\x6c\x65\x63\164\40\x74\x68\x65\40\111\x44\120\x20\146\x6f\162\x20\162\157\154\x65\40\155\x61\x70\x70\151\156\x67\56");
        goto xZ;
        ve:
        $hs = 0;
        $Dc = array();
        $vw = array_key_exists("\155\x61\160\160\151\x6e\x67\137\153\145\171\137", $post) ? $post["\x6d\x61\160\x70\151\x6e\147\137\x6b\145\171\137"] : array();
        $UH = array_key_exists("\x6d\141\160\160\x69\156\x67\x5f\x76\141\x6c\165\x65\x5f", $post) ? $post["\x6d\141\x70\x70\x69\x6e\147\137\166\x61\x6c\x75\x65\137"] : array();
        foreach ($vw as $N5 => $n4) {
            $Dc[$n4] = $UH[$N5];
            $hs++;
            Ds:
        }
        xO:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $zz->select("\52");
        $zz->from($SW->quoteName("\43\x5f\137\x6d\x69\156\x69\157\162\141\156\x67\145\x5f\163\141\x6d\154\137\x72\x6f\154\x65\x5f\x6d\x61\160\x70\151\x6e\147"));
        $zz->where($SW->quoteName("\x69\144\x70\137\151\x64") . "\x20\x3d\x20" . $SW->quote($post["\143\x75\162\x72\145\156\x74\x5f\151\x64\160\137\151\x64"]));
        $SW->setQuery($zz);
        $OS = $SW->loadAssoc();
        $t2 = isset($post["\x6d\x61\160\x70\x69\156\x67\x5f\x76\x61\154\165\145\x5f\x64\145\146\141\165\154\x74"]) ? trim($post["\155\141\x70\160\151\x6e\147\137\x76\x61\154\x75\145\137\x64\145\x66\141\x75\x6c\164"]) : '';
        $Ze = isset($post["\x6d\141\x70\160\x69\156\147\137\x6d\145\x6d\x62\x65\x72\157\146\x5f\x61\164\x74\162\x69\142\165\164\145"]) ? trim($post["\x6d\x61\x70\x70\151\x6e\x67\137\x6d\x65\155\142\x65\x72\157\x66\x5f\x61\164\x74\162\151\142\x75\x74\145"]) : '';
        $d0 = isset($post["\x65\156\141\142\154\145\137\x72\157\154\145\137\155\141\160\x70\x69\x6e\147"]) ? $post["\145\x6e\x61\142\154\x65\137\x72\x6f\154\145\137\155\141\x70\x70\151\x6e\x67"] : 0;
        $ht = isset($post["\x64\x6f\x5f\x6e\157\164\137\141\165\x74\157\137\x63\162\x65\x61\164\x65\x5f\x75\163\145\162\163"]) ? $post["\144\x6f\137\156\x6f\164\137\x61\x75\x74\x6f\137\x63\162\x65\x61\164\x65\x5f\x75\x73\145\162\x73"] : 0;
        $Xc = isset($post["\x64\151\x73\x61\x62\x6c\145\x5f\145\x78\151\x73\x74\151\156\x67\x5f\165\x73\145\x72\163\137\x72\157\154\145\x5f\x75\160\x64\141\x74\x65"]) ? $post["\144\151\163\x61\x62\154\145\x5f\x65\170\151\163\x74\x69\156\147\x5f\x75\163\x65\162\x73\x5f\162\157\154\145\x5f\165\160\144\141\x74\145"] : 0;
        $dA = isset($post["\165\160\144\141\164\x65\137\x65\x78\x69\x73\164\x69\x6e\147\137\x75\163\145\162\x73\137\x72\157\154\145\137\167\151\x74\150\x6f\x75\x74\137\162\x65\x6d\x6f\x76\151\x6e\x67\x5f\x63\165\x72\x72\x65\x6e\x74"]) ? $post["\165\160\144\141\164\145\x5f\145\x78\151\x73\x74\151\156\147\137\x75\163\145\162\163\x5f\162\157\154\x65\137\167\x69\164\x68\157\165\x74\x5f\162\145\155\157\166\x69\156\x67\137\x63\x75\162\x72\145\156\164"] : 0;
        $Lg = isset($post["\x67\162\160"]) ? trim($post["\x67\162\160"]) : '';
        $yk = json_encode($Dc);
        $e6 = $post["\143\x75\x72\x72\x65\156\x74\x5f\x69\x64\160\137\x69\144"];
        $Xr = UtilitiesSAML::loadUserGroups();
        $ad = isset($post["\x65\x6e\x61\142\154\145\x5f\162\157\x6c\145\137\x62\x61\163\145\144\x5f\x72\145\x64\151\x72\x65\143\164\151\x6f\156"]) ? $post["\x65\x6e\x61\142\x6c\145\137\x72\x6f\x6c\145\x5f\142\141\x73\x65\144\x5f\162\x65\x64\151\162\x65\143\x74\x69\157\156"] : 0;
        foreach ($Xr as $K8) {
            if (!($K8[4] != "\x53\165\x70\145\162\x20\x55\163\x65\162\x73")) {
                goto VF;
            }
            $YL = "\162\x6f\154\145\x5f\x62\141\163\x65\x64\x5f\x67\162\x6f\x75\x70\x5f\x61\164\164\x72\137\x76\141\154\165\145\x73" . $K8[0];
            if (!(isset($post[$YL]) && !empty($post[$YL]))) {
                goto NJ;
            }
            $BD[$K8[0]] = $post[$YL];
            NJ:
            VF:
            vb:
        }
        lI:
        $BD = json_encode($BD);
        if ($OS) {
            goto uk;
        }
        $zz = $SW->getQuery(true);
        $TQ = array("\x6d\141\x70\160\151\156\147\137\166\x61\x6c\x75\145\137\x64\145\x66\x61\165\154\x74", "\155\141\x70\x70\x69\x6e\x67\x5f\155\145\x6d\x62\145\x72\157\x66\137\141\x74\x74\x72\151\142\x75\x74\145", "\x65\x6e\x61\142\154\145\x5f\x73\x61\155\x6c\x5f\162\x6f\x6c\145\137\x6d\x61\x70\160\x69\x6e\147", "\162\157\154\x65\x5f\x6d\x61\x70\x70\151\156\x67\x5f\x6b\x65\171\x5f\x76\x61\x6c\165\145", "\x72\x6f\x6c\x65\x5f\x6d\141\160\x70\151\x6e\147\x5f\x63\x6f\x75\156\164", "\x69\144\160\x5f\x69\144", "\144\x6f\x5f\156\157\x74\x5f\x61\165\x74\x6f\137\143\162\x65\141\x74\x65\137\165\x73\x65\x72\x73", "\x64\x69\x73\x61\x62\154\x65\137\x65\x78\x69\x73\x74\x69\x6e\147\x5f\165\163\x65\162\x73\x5f\162\x6f\154\145\137\x75\160\x64\141\x74\145", "\x75\x70\x64\x61\164\x65\x5f\x65\170\x69\x73\x74\151\x6e\147\137\x75\163\145\x72\x73\137\x72\x6f\154\x65\x5f\167\x69\164\x68\x6f\x75\164\137\x72\145\x6d\157\x76\x69\x6e\x67\137\143\165\162\162\x65\x6e\x74", "\147\x72\160", "\x65\x6e\x61\142\x6c\145\137\x72\x6f\x6c\145\137\142\x61\x73\145\x64\x5f\x72\145\144\151\162\145\143\164\x69\x6f\156", "\162\157\154\x65\x5f\x62\x61\x73\x65\144\x5f\162\145\144\151\x72\x65\143\x74\137\x6b\x65\171\137\x76\x61\x6c\x75\x65");
        $N6 = array($SW->quote($t2), $SW->quote($Ze), $SW->quote($d0), $SW->quote($yk), $SW->quote($hs), $SW->quote($e6), $SW->quote($ht), $SW->quote($Xc), $SW->quote($dA), $SW->quote($Lg), $SW->quote($ad), $SW->quote($BD));
        $zz->insert($SW->quoteName("\x23\x5f\137\155\151\x6e\151\x6f\162\141\156\x67\x65\137\163\x61\x6d\x6c\137\162\x6f\x6c\x65\x5f\155\x61\x70\160\151\x6e\147"))->columns($SW->quoteName($TQ))->values(implode("\54", $N6));
        $SW->setQuery($zz);
        $SW->execute();
        goto zi;
        uk:
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\155\141\x70\160\x69\x6e\x67\x5f\x76\x61\x6c\165\145\x5f\x64\x65\146\141\x75\154\164") . "\40\75\40" . $SW->quote($t2), $SW->quoteName("\155\141\x70\160\x69\x6e\x67\137\x6d\145\155\x62\x65\162\157\146\x5f\141\x74\164\162\151\x62\x75\x74\145") . "\40\x3d\x20" . $SW->quote($Ze), $SW->quoteName("\x65\x6e\141\142\x6c\x65\x5f\x73\141\x6d\154\137\x72\157\154\x65\137\155\141\160\160\x69\x6e\147") . "\40\75\x20" . $SW->quote($d0), $SW->quoteName("\162\x6f\x6c\x65\x5f\155\x61\x70\x70\151\x6e\x67\x5f\153\145\x79\x5f\166\x61\154\165\x65") . "\x20\75\40" . $SW->quote($yk), $SW->quoteName("\x72\157\x6c\145\x5f\x6d\141\160\x70\x69\156\147\x5f\x63\x6f\x75\x6e\x74") . "\x20\x3d\x20" . $SW->quote($hs), $SW->quoteName("\144\157\x5f\156\157\164\x5f\x61\x75\164\157\x5f\x63\162\145\x61\164\145\137\165\x73\145\162\x73") . "\x20\75\40" . $SW->quote($ht), $SW->quoteName("\144\151\163\141\x62\154\145\137\x65\x78\151\163\x74\151\x6e\x67\x5f\x75\x73\x65\162\x73\137\x72\x6f\x6c\x65\137\x75\x70\144\141\x74\145") . "\40\75\x20" . $SW->quote($Xc), $SW->quoteName("\x75\x70\x64\x61\164\x65\137\x65\170\x69\x73\x74\151\156\x67\x5f\x75\x73\x65\x72\x73\137\162\157\154\x65\x5f\167\151\x74\150\x6f\x75\164\137\162\x65\x6d\157\x76\x69\156\x67\137\x63\165\162\162\x65\156\x74") . "\x20\75\x20" . $SW->quote($dA), $SW->quoteName("\x67\x72\x70") . "\x20\x3d\x20" . $SW->quote($Lg), $SW->quoteName("\145\x6e\x61\142\154\x65\137\x72\x6f\x6c\145\x5f\142\141\x73\145\144\x5f\162\x65\x64\151\x72\x65\x63\x74\x69\x6f\156") . "\x20\x3d\x20" . $SW->quote($ad), $SW->quoteName("\x72\x6f\154\145\137\142\141\163\145\x64\137\162\x65\x64\151\162\x65\143\x74\137\153\x65\x79\x5f\x76\x61\x6c\x75\x65") . "\40\x3d\x20" . $SW->quote($BD));
        $Uh = array($SW->quoteName("\151\144\x70\x5f\x69\144") . "\40\x3d\x20" . $SW->quote($post["\x63\x75\x72\x72\145\x6e\164\137\x69\x64\160\137\x69\144"]));
        $zz->update($SW->quoteName("\x23\x5f\137\155\x69\156\x69\x6f\x72\141\x6e\x67\x65\137\x73\x61\x6d\154\137\x72\157\x6c\x65\137\x6d\x61\x70\x70\151\156\x67"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $SW->execute();
        zi:
        $this->setRedirect("\x69\x6e\x64\145\170\x2e\160\x68\160\x3f\157\160\x74\x69\x6f\156\x3d\143\x6f\x6d\137\x6d\x69\x6e\x69\157\162\x61\x6e\147\x65\137\x73\141\155\154\x26\x74\x61\x62\75\x67\162\x6f\x75\160\x5f\155\x61\160\x70\151\156\x67\x26\x63\165\162\x72\145\x6e\x74\137\x69\x64\160\x5f\x69\144\x3d" . $post["\143\165\162\x72\145\x6e\x74\x5f\151\x64\x70\x5f\x69\144"], "\x53\x41\x4d\x4c\x20\107\162\x6f\x75\160\x20\164\x6f\x20\112\x6f\x6f\155\x6c\x61\x20\162\157\x6c\145\40\155\141\160\160\x69\x6e\147\40\x68\141\x73\40\x62\x65\145\x6e\40\165\160\144\x61\164\145\x64\56");
        xZ:
    }
    function cancelform()
    {
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\x65\x6d\x61\x69\154") . "\x20\75\40" . $SW->quote(''), $SW->quoteName("\154\157\147\x69\x6e\x5f\x73\164\x61\x74\x75\163") . "\x20\75\x20" . $SW->quote(1), $SW->quoteName("\145\155\x61\x69\154\137\x63\x6f\x75\x6e\x74") . "\40\75\x20" . $SW->quote(0));
        $Uh = array($SW->quoteName("\151\x64") . "\x20\75\x20\61");
        $zz->update($SW->quoteName("\43\x5f\137\155\x69\156\x69\157\162\x61\x6e\147\145\x5f\x73\141\x6d\x6c\x5f\143\165\x73\164\157\155\145\x72\x5f\x64\x65\164\x61\x69\x6c\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        $this->setRedirect("\151\156\x64\145\x78\56\160\150\160\x3f\x6f\160\x74\151\x6f\156\75\143\x6f\x6d\137\155\x69\x6e\151\157\162\141\x6e\x67\x65\x5f\163\x61\155\x6c\46\x74\x61\x62\75\x61\143\143\x6f\x75\156\x74");
    }
    function freeLicenseKey()
    {
        $i3 = new Mo_saml_Local_Customer();
        $ak = json_decode($i3->update_status(), true);
        if (strcasecmp($ak["\x73\x74\141\164\x75\x73"], "\x53\125\103\x43\105\123\123") == 0) {
            goto fW;
        }
        $TY = "\x45\x72\x72\x6f\162\40\x72\x65\x6d\x6f\x76\x69\156\147\x20\171\x6f\165\162\x20\154\x69\x63\145\x6e\163\145\40\153\x65\x79\x2e\x20\x50\154\145\x61\163\145\40\164\162\171\x20\x61\147\141\x69\x6e\40\157\162\40\143\157\156\x74\x61\143\x74\40\x3c\x61\40\x68\x72\x65\146\75\x22\x6d\141\151\154\x74\x6f\x3a\152\x6f\157\155\154\141\163\x75\160\160\157\162\x74\x40\170\x65\143\x75\162\x69\x66\x79\x2e\x63\x6f\x6d\x22\x3e\x20\152\x6f\x6f\x6d\x6c\x61\x73\x75\x70\160\x6f\162\164\100\x78\145\143\165\162\151\146\x79\56\143\x6f\155\x3c\x2f\141\x3e";
        $this->setRedirect("\x69\156\x64\145\x78\x2e\x70\150\160\x3f\x6f\160\164\151\x6f\156\75\143\x6f\155\137\155\x69\x6e\x69\x6f\162\141\156\x67\x65\x5f\x73\x61\155\154\x26\x74\x61\142\x3d\x61\x63\x63\157\165\x6e\164", $TY, "\x65\x72\162\157\162");
        goto V9;
        fW:
        $SW = JFactory::getDbo();
        $zz = $SW->getQuery(true);
        $lp = array($SW->quoteName("\x65\155\141\x69\x6c") . "\x20\75\40" . $SW->quote(''), $SW->quoteName("\141\x64\155\x69\x6e\137\x70\150\157\x6e\145") . "\x20\x3d\x20" . $SW->quote(''), $SW->quoteName("\x63\165\x73\x74\157\x6d\x65\162\137\x6b\x65\x79") . "\x20\75\x20" . $SW->quote(''), $SW->quoteName("\143\x75\163\x74\157\155\x65\162\137\x74\x6f\x6b\145\156") . "\x20\x3d\x20" . $SW->quote(''), $SW->quoteName("\x61\160\x69\137\x6b\145\x79") . "\40\x3d\40" . $SW->quote(''), $SW->quoteName("\x6c\x6f\x67\x69\156\137\x73\164\141\x74\165\x73") . "\x20\x3d\x20" . $SW->quote(1), $SW->quoteName("\x73\x74\x61\164\165\x73") . "\40\x3d\40" . $SW->quote(''), $SW->quoteName("\x73\x6d\x6c\x5f\154\x6b") . "\x20\x3d\40" . $SW->quote(''), $SW->quoteName("\x6e\145\167\x5f\x72\x65\x67\151\163\164\x72\141\x74\x69\157\156") . "\x20\x3d\40" . $SW->quote(0), $SW->quoteName("\x65\x6d\141\x69\x6c\x5f\x63\157\x75\x6e\x74") . "\40\75\x20" . $SW->quote(0), $SW->quoteName("\151\156\137\x63\x6d\160") . "\x20\x3d\x20" . $SW->quote(''), $SW->quoteName("\x74\162\151\x73\164\x73") . "\x20\x3d\40" . $SW->quote(''), $SW->quoteName("\x75\163\x72\154\155\x74") . "\x20\75\40" . $SW->quote(0), $SW->quoteName("\x6c\151\143\145\156\163\x65\x45\170\160\151\162\x79") . "\x20\75\x20" . $SW->quote("\60\60\x30\x30\55\x30\x30\55\60\x30\40\60\x30\72\60\x30\x3a\60\60"), $SW->quoteName("\163\165\160\160\x6f\162\164\105\170\x70\x69\162\x79") . "\x20\x3d\40" . $SW->quote("\x30\60\60\60\x2d\60\60\55\60\x30\40\x30\60\72\x30\60\x3a\60\x30"), $SW->quoteName("\156\x6f\x53\x50") . "\40\75\x20" . $SW->quote(0), $SW->quoteName("\x61\x75\164\157\x5f\163\145\x6e\144\x5f\x65\x6d\141\x69\x6c\137\x74\x69\155\x65") . "\40\x3d\x20" . $SW->quote(''));
        $Uh = array($SW->quoteName("\x69\144") . "\x20\x3d\40\x31");
        $zz->update($SW->quoteName("\43\x5f\137\155\x69\156\151\157\162\x61\156\x67\145\x5f\163\x61\155\x6c\137\143\165\163\x74\x6f\155\145\162\137\x64\145\x74\141\151\x6c\163"))->set($lp)->where($Uh);
        $SW->setQuery($zz);
        $OS = $SW->execute();
        $this->setRedirect("\151\156\x64\x65\x78\x2e\160\x68\160\77\157\x70\164\151\157\x6e\75\x63\x6f\x6d\x5f\155\151\x6e\x69\x6f\162\x61\156\x67\x65\x5f\x73\x61\x6d\154\x26\x74\141\x62\75\141\143\143\157\165\156\x74");
        V9:
    }
    function new_line()
    {
        echo "\xa";
        echo "\74\x68\x72\76";
    }
    function contactUs()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        if (!(count($post) == 0)) {
            goto qe;
        }
        $this->setRedirect("\151\156\x64\145\x78\56\160\x68\160\77\x6f\x70\x74\151\157\156\x3d\143\157\155\x5f\x6d\x69\156\151\157\x72\141\x6e\x67\145\137\x73\141\155\154\46\x74\141\x62\x3d\x61\x63\143\x6f\165\156\164");
        return;
        qe:
        $dq = $post["\x71\x75\145\162\x79"];
        $SY = $post["\161\165\145\162\x79\137\145\x6d\x61\x69\154"];
        $UX = $post["\161\165\145\x72\x79\x5f\x70\150\157\x6e\x65"];
        $bv = isset($post["\x73\x65\x6e\x64\137\160\154\x75\147\151\x6e\137\143\x6f\156\x66\151\x67"]) ? $post["\163\145\156\144\137\x70\154\165\x67\x69\x6e\x5f\143\157\x6e\146\x69\147"] : 0;
        $sg = null;
        if (!($bv == 1 || $bv == true)) {
            goto uE;
        }
        $sg = $this->importexport(true);
        uE:
        if (!empty($sg)) {
            goto md;
        }
        $zz = $dq;
        goto Ie;
        md:
        ob_start();
        $this->new_line();
        $RW = ob_get_clean();
        $zz = $dq . $RW . "\x20\x50\154\x75\147\151\x6e\x20\103\157\x6e\146\x69\147\165\x72\x61\164\x69\x6f\156\x3d\x3e" . $sg;
        Ie:
        $wJ = new Mo_saml_Local_Customer();
        $Xd = json_decode($wJ->submit_contact_us($SY, $UX, $zz), true);
        if (!(json_last_error() == JSON_ERROR_NONE)) {
            goto oA;
        }
        if (is_array($Xd) && array_key_exists("\163\164\141\164\x75\163", $Xd) && $Xd["\x73\164\141\x74\x75\x73"] == "\105\122\x52\117\x52") {
            goto Yv;
        }
        if ($Xd == false) {
            goto SU;
        }
        $this->setRedirect("\x69\156\144\145\x78\56\x70\150\x70\x3f\157\x70\x74\151\157\x6e\x3d\x63\x6f\155\x5f\x6d\151\156\151\157\x72\x61\x6e\x67\x65\137\163\141\x6d\x6c\x26\164\x61\142\x3d\141\x63\x63\x6f\165\156\x74", "\x54\150\x61\x6e\x6b\x73\40\x66\157\x72\x20\147\145\164\x74\151\x6e\147\40\151\156\40\x74\157\x75\x63\150\x21\40\127\x65\x20\x73\x68\141\154\x6c\40\147\x65\x74\x20\x62\141\143\x6b\x20\164\157\40\x79\157\x75\x20\x73\150\x6f\162\x74\x6c\x79\56", "\x73\165\143\x63\145\163\163");
        goto Dw;
        SU:
        $this->setRedirect("\151\x6e\x64\x65\x78\56\160\150\x70\x3f\x6f\x70\x74\x69\x6f\x6e\x3d\143\157\x6d\x5f\155\151\x6e\151\x6f\162\x61\x6e\147\x65\137\163\x61\155\154\x26\x74\x61\x62\75\141\x63\x63\157\165\156\164", "\131\x6f\x75\x72\x20\x71\x75\x65\162\171\x20\143\157\x75\x6c\x64\40\156\x6f\164\x20\x62\145\x20\x73\x75\142\155\151\164\x74\x65\x64\x2e\40\x50\x6c\145\x61\x73\x65\x20\x74\x72\x79\40\141\147\x61\151\156\56", "\x65\x72\x72\x6f\x72");
        Dw:
        goto RY;
        Yv:
        $this->setRedirect("\151\156\x64\x65\170\56\x70\x68\160\x3f\x6f\160\164\x69\157\156\75\x63\157\155\137\x6d\x69\156\x69\x6f\x72\x61\x6e\147\x65\137\x73\141\155\x6c\46\x74\x61\x62\75\141\143\143\157\165\x6e\164", $Xd["\x6d\x65\x73\163\141\147\145"], "\145\162\162\x6f\x72");
        RY:
        oA:
    }
}

Function Calls

None

Variables

None

Stats

MD5 63d28151e1210e03507854b42a6fa25f
Eval Count 0
Decode Time 140 ms