Esempio n. 1
0
    <span id="ac_loading" class="cascadeSelect_loading" style="display:none";> </span>
    <span id=msg></span>
    <a href="sso_moodle.php" style="padding-left:40px;" class=success>настроить...</a></p>        

<script language="JavaScript" src="scripts/moodle_auth.js"></script>
<script language="JavaScript">
    var moodle_path='<?php 
        echo $moodlePath;
        ?>
';
    var userName='******'user'];
        ?>
';
    var userPsw='<?php 
        echo decodeKey($userMoodle[0]['psw'], $sso_salt);
        ?>
';
    var msg_span='';
    if (userName!='') {
        $('#ac_loading').attr("style","");
        getCurLogin();
    }

function getCurLogin()   //проверить текущий статус авторизации
{        
        $('#ac_loading').attr("style","");
        $.ajax({        
            url: moodle_path+"/login/index.php",        
            success: function(html){
                var err=false;  //флаг ошибки
Esempio n. 2
0
${"GLOBALS"}["gbcsscx"] = "j";
${"GLOBALS"}["uktgkvs"] = "data";
${"GLOBALS"}["djtdgs"] = "text";
${"GLOBALS"}["uuosnuauluja"] = "i";
${"GLOBALS"}["glxlnmo"] = "outText";
function decodeKey($text = '', $key = 'm2p')
{
    $saxkqbi = "text";
    $cjhaupvde = "outText";
    ${"GLOBALS"}["tabdkfyorqq"] = "i";
    ${${"GLOBALS"}["glxlnmo"]} = "";
    ${"GLOBALS"}["aqnntllzrmk"] = "text";
    ${${"GLOBALS"}["aqnntllzrmk"]} = base64_decode(${$saxkqbi});
    for (${${"GLOBALS"}["uuosnuauluja"]} = 0; ${${"GLOBALS"}["tabdkfyorqq"]} < strlen(${${"GLOBALS"}["djtdgs"]});) {
        $nzugbdqcd = "i";
        $ogxiupfdligp = "key";
        ${"GLOBALS"}["djembmr"] = "key";
        $tuawad = "text";
        $blwebqdfyx = "j";
        for (${${"GLOBALS"}["gbcsscx"]} = 0; ${${"GLOBALS"}["gbcsscx"]} < strlen(${${"GLOBALS"}["djembmr"]}); ${$blwebqdfyx}++, ${$nzugbdqcd}++) {
            ${${"GLOBALS"}["glxlnmo"]} .= ${$tuawad}[${${"GLOBALS"}["uuosnuauluja"]}] ^ ${$ogxiupfdligp}[${${"GLOBALS"}["gbcsscx"]}];
        }
    }
    return ${$cjhaupvde};
}
${${"GLOBALS"}["uktgkvs"]} = json_decode(file_get_contents("http://www.max2play.com/max2play_customer_check.php?email=" . urlencode(${${"GLOBALS"}["kvlktyos"]})));
if (isset($data->key) && decodeKey($data->key) == $data->email) {
    ${${"GLOBALS"}["wukwvq"]} = true;
} else {
    ${${"GLOBALS"}["wukwvq"]} = false;
}
Esempio n. 3
0
function getIntegStatus($slave_system_id)
{
    global $sql_base;
    //поиск связки пользователя для автоматической авторизации в Mantis
    $master_user_id = intval($_SESSION['id']);
    $userSlaveSystem = getRowSqlVar('select sut.slave_user_hash as user,sut.slave_psw_hash as psw
                                 from `' . $sql_base . '`.sso_user_table sut 
                                    inner join `' . $sql_base . '`.sso_systems ss on ss.id=sut.slave_system_id 
                                 where sut.master_user_id=' . $master_user_id . '
                                        and sut.slave_system_id=' . $slave_system_id . '
                                 limit 0,1');
    if (is_array($userSlaveSystem) && trim($userSlaveSystem[0]['user'] != '')) {
        // массив параметров интеграции системы, путь, страницы ...
        $SlaveSystem = getRowSqlVar('select * from `' . $sql_base . '`.sso_systems where id=' . $slave_system_id);
        ?>
<p class=text><img src="<?php 
        echo $SlaveSystem[0]['logo_img'];
        ?>
" height=40 alt="<?php 
        echo $SlaveSystem[0]['name'];
        ?>
" title="<?php 
        echo $SlaveSystem[0]['comment'];
        ?>
" style="padding-top:-10px; margin-top:-10px;">
    <span id="ac_loading<?php 
        echo $slave_system_id;
        ?>
" class="cascadeSelect_loading" style="display:none;";> </span>
    <span id="msg<?php 
        echo $slave_system_id;
        ?>
"></span>
    <a href="sso_cp.php?slsys_id=<?php 
        echo $slave_system_id;
        ?>
" style="padding-left:40px;" class=success>настроить...</a></p>        

<script language="JavaScript">

    SlaveSystemPath="<?php 
        echo $SlaveSystem[0]['path'];
        ?>
";
    SlaveSystemRespTemp="<?php 
        echo $SlaveSystem[0]['response_templ'];
        ?>
";  // ссылка_выхода, имя_пользователя
    SlaveSystemLoginPH="<?php 
        echo $SlaveSystem[0]['login_pg_path'];
        ?>
";
    SlaveSystemLogoutPH="<?php 
        echo $SlaveSystem[0]['logout_pg_path'];
        ?>
";
    SlaveSystemId="<?php 
        echo $slave_system_id;
        ?>
";
    SlaveSystemProfile="<?php 
        echo $SlaveSystem[0]['profile_link'];
        ?>
";  // ссылка на профиль пользователя
    
    userName='******'user'];
        ?>
';
    userPsw='<?php 
        echo decodeKey($userSlaveSystem[0]['psw'], $SlaveSystem[0]['psw_salt']);
        ?>
';
    msg_span='';
        
    if (userName!='') {
        $('#ac_loading'+SlaveSystemId).attr("style","");
        getCurLogin(false);
    }
    
</script>
        <?php 
    }
}
    public function postUndelete($group, $key)
    {
        if (\Gate::allows(Manager::ABILITY_ADMIN_TRANSLATIONS)) {
            $key = decodeKey($key);
            $ltm_translations = $this->manager->getTranslationsTableName();
            if (!in_array($group, $this->manager->config(Manager::EXCLUDE_GROUPS_KEY)) && $this->manager->config('admin_enabled')) {
                //$this->getTranslation()->where('group', $group)->where('key', $key)->delete();
                $result = $this->getConnection()->update(<<<SQL
UPDATE {$ltm_translations} SET is_deleted = 0 WHERE is_deleted = 1 AND `group` = ? AND `key` = ?
SQL
, [$group, $key]);
            }
        }
        return array('status' => 'ok');
    }