Пример #1
0
<script>
(function($){
	var autoHeight = function() {
		var innH = jQuery("#ifm-xelfinder-vendorup").contents().find('body').outerHeight(true);
		var boxH = jQuery("#ifm-xelfinder-vendorup").height();
		if (boxH < innH) {
			jQuery("#ifm-xelfinder-vendorup").height(innH + 50);
		}
		setTimeout(autoHeight, 500);
	};
	autoHeight();
	$('#xelfinder_vendorup_f').on('submit', function(e) {
		setTimeout(function() {
			$('#xelfinder_vendorup_s').replaceWith($('<p>').html("<?php 
    echo xelfinderAdminLang('COMPOSER_UPDATE_STARTED');
    ?>
"));
		}, 100);
	})
	.find('input[type=radio]').on('change', function(e) {
		$('#xelfinder_vendorup_f').find('input[type=text]').val($(this).val());
	});
})(jQuery);
</script>

<?php 
} else {
    ?>
<p>vendor update needs for PHP >= 5.4 . Your PHP version is <?php 
    echo PHP_VERSION;
Пример #2
0
        $client->setClientId($_SESSION[$sessClientKey]['ClientId']);
        $client->setClientSecret($_SESSION[$sessClientKey]['ClientSecret']);
        $client->setRedirectUri($selfURL);
        $service = new \Google_Service_Drive($client);
        if (isset($_GET['code'])) {
            $client->authenticate($_GET['code']);
            $_SESSION[$sessTokenKey] = $client->getAccessToken();
        }
        if (isset($_SESSION[$sessTokenKey]) && isset($_SESSION[$sessTokenKey]['access_token'])) {
            $client->setAccessToken($_SESSION[$sessTokenKey]);
        }
    }
}
xoops_cp_header();
include dirname(__FILE__) . '/mymenu.php';
echo '<h3>' . xelfinderAdminLang('GOOGLEDRIVE_GET_TOKEN') . '</h3>';
if ($php54up) {
    $form = true;
    if ($client) {
        if (empty($_POST) && $client->getAccessToken()) {
            try {
                $aToken = $client->getAccessToken();
                $token = array('client_id' => $client->getClientId(), 'client_secret' => $client->getClientSecret(), 'access_token' => $aToken['access_token']);
                if (isset($aToken['refresh_token'])) {
                    unset($token['access_token']);
                    $token['refresh_token'] = $aToken['refresh_token'];
                }
                $ext_token = json_encode($token);
                echo '<h3>Google Drive API Token</h3>';
                echo '<div><textarea class="allselect" style="width:70%;height:5em;" spellcheck="false">' . $ext_token . '</textarea></div>';
                echo '<h3>Example to Volume Driver Setting</h3>';
Пример #3
0
include dirname(__FILE__) . '/mymenu.php';
echo '<h3>' . xelfinderAdminLang('DROPBOX_GET_TOKEN') . '</h3>';
switch ($state) {
    case 1:
        echo '<h4>' . xelfinderAdminLang('DROPBOX_STEP2') . '</h4>';
        echo '<p>' . xelfinderAdminLang('DROPBOX_GOTO_CONFIRM') . '</p>';
        echo "<p><a href='{$url}'>" . xelfinderAdminLang('DROPBOX_CONFIRM_LINK') . "</a></p>";
        $_SESSION[$state_key] = 2;
        $_SESSION[$state_key . '_tokens'] = $tokens;
        break;
    case 2:
        echo '<h4>' . xelfinderAdminLang('DROPBOX_STEP3') . '</h4>';
        $_SESSION[$state_key] = 3;
        $_SESSION[$state_key . '_tokens'] = $tokens;
    case 3:
        $token_cap = xelfinderAdminLang('DROPBOX_ACC_TOKEN');
        $token_secret_cap = xelfinderAdminLang('DROPBOX_ACC_SECKEY');
        echo '<p>' . xelfinderAdminLang('DROPBOX_SET_PREF') . '</p>';
        $token = $_SESSION[$state_key . '_tokens']['token'];
        $token_secret = $_SESSION[$state_key . '_tokens']['token_secret'];
        echo "\n<table class=\"outer\">\n\t<tr>\n\t\t<td class=\"head\">{$token_cap}</td>\n\t\t<td class=\"even\">{$token}</td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"head\">{$token_secret_cap}</td>\n\t\t<td class=\"even\">{$token_secret}</td>\n\t</tr>\n</table>";
        break;
    case 0:
    default:
        unset($_SESSION[$state_key]);
        $cap = xelfinderAdminLang('DROPBOX_STEP1');
        $desc = sprintf(xelfinderAdminLang('DROPBOX_GOTO_APP'), xelfinderAdminLang('DROPBOX_TOKEN'), xelfinderAdminLang('DROPBOX_SECKEY'));
        echo "\n<h4>{$cap}</h4>\n<p>{$desc}</p>\n<p><a href=\"https://www.dropbox.com/developers/apps\" target=\"_blank\">App Console - Dropbox</a></p>";
        break;
}
xoops_cp_footer();