Exemplo n.º 1
0
        }
    }
    $target = ICL_API_ENDPOINT . '/websites/' . $this->settings['site_id'] . '/website_translation_offers/' . $lang_pair_id . '?accesskey=' . $this->settings['access_key'] . '&compact=1';
}
$support_mode = isset($_GET['support']) ? $_GET['support'] : '';
/*
if ($support_mode == '1') {
    $iclq = new ICanLocalizeQuery($this->settings['support_site_id'], $this->settings['support_access_key']);
} else {
    $iclq = new ICanLocalizeQuery($this->settings['site_id'], $this->settings['access_key']);
}
$session_id = $iclq->get_current_session(true, $support_mode == '1');
*/
if (isset($this->settings['site_id']) && isset($this->settings['access_key'])) {
    $iclq = new ICanLocalizeQuery($this->settings['site_id'], $this->settings['access_key']);
    $session_id = $iclq->get_current_session(true, $support_mode == '1');
} else {
    $session_id = '';
}
$admin_lang = $this->get_admin_language();
if (isset($_GET['code'])) {
    $add = '&code=' . urlencode($_GET['code']);
} else {
    $add = '';
}
if (strpos($target, '?') === false) {
    $target .= '?';
} else {
    $target .= '&';
}
$target .= "session=" . $session_id . "&lc=" . $admin_lang . $add;