예제 #1
0
<?php

require_once 'Gdata_OAuth_Helper.php';
session_start();
// App Name goes here.
$APP_NAME = 'Gamut';
$APP_URL = getAppURL();
echo $APP_URL;
// Scope defines the services to which access is required.
$scopes = array('https://mail.google.com/');
// Setup OAuth consumer. Thes values should be replaced with your registered
// app's consumer key/secret.
$CONSUMER_KEY = 'anonymous';
$CONSUMER_SECRET = 'anonymous';
$consumer = new Gdata_OAuth_Helper($CONSUMER_KEY, $CONSUMER_SECRET);
// Main controller logic.
switch (@$_REQUEST['action']) {
    case 'logout':
        logout($APP_URL);
        break;
    case 'request_token':
        echo 'In Request Token';
        $_SESSION['REQUEST_TOKEN'] = serialize($consumer->fetchRequestToken(implode(' ', $scopes), $APP_URL . '?action=authorize_token'));
        echo $_SERVER['ACCESS_TOKEN'];
        echo 'Done Request Token';
        $consumer->authorizeRequestToken();
        break;
    case 'authorize_token':
        $consumer->authorizeRequestToken();
        break;
    case 'access_token':
예제 #2
0
?>
" class="card-title" style="color: #fff">Telegram Pur</a></h2>
                    <div style="height: 1px;"></div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="card" style="background-color: #179cde">
                    <h2><a target="_blank" href="<?php 
echo getAppURL('tgSmalltalk');
?>
" class="card-title" style="color: #fff">Telegram Smalltalk</a></h2>
                    <div style="height: 1px;"></div>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="card" style="background-color: #179cde">
                    <h2><a target="_blank" href="<?php 
echo getAppURL('tgGaming');
?>
" class="card-title" style="color: #fff">Telegram Gaming</a></h2>
                    <div style="height: 1px;"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="./bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
예제 #3
0
                           id="telegramPur"
                           target="_blank" href="<?php 
echo getAppURL('tgPur');
?>
">Pur</a>
                        <a class="button" id="telegramGaming" target="_blank" href="<?php 
echo getAppURL('tgGaming');
?>
">Gaming</a>
                    </div>
                    <div class="description">Telegram Links</div>
                </div>
                <div class="app">
                    <div class="content clickable">
                        <a target="_blank" href="<?php 
echo getAppURL('team');
?>
">
                            <img src="./assets/image/team_pic.png" />
                        </a>
                    </div>
                    <div class="description">Übersicht unseres Teams</div>
                </div>
                <div class="app">
                    <div class="content" id="news">
                        Wir haben ein neues Forum und so einiges anderes Schönes! Schaut mal rein :)
                    </div>
                    <div class="description">Aktuelles</div>
                </div>
            </div>
        </center>
예제 #4
0
/**
 * Gets the effective URL based on the availability of token.
 *
 * @return string
 **/
function getRedirectUrl($action = null)
{
    $redirUrl = getAppURL();
    $actionStr = getActionString($action);
    if ($actionStr) {
        $redirUrl = $redirUrl . '?action=' . getActionString($action);
    } else {
        if (!isset($_SESSION['ACCESS_TOKEN'])) {
            $redirUrl = $redirUrl . '?action=' . getActionString('access');
        } else {
            $redirUrl = $redirUrl . '?action=' . getActionString('logout');
        }
    }
    return $redirUrl;
}