<?php

require_once "inc/config.php";
require_once "inc/security.php";
require_once "inc/validator.php";
require_once "inc/GitHubConnector.php";
require_once "inc/RewardManager.php";
require_once "inc/Debug.php";
$referrer = "github";
$connector = new GitHubConnector();
// Results: valid, alreadyclaimed, sessionerror, error
$result = "STATE_ERROR";
// Temp storage for debug args
$debugtmp = "";
// Session and state valid?
if ($connector->validateSession()) {
    // Authentication successful?
    if ($connector->authenticate()) {
        $user = $connector->getUserDetails();
        $repos = $connector->getRepos();
        // Request successful and user exists?
        if ($user) {
            $username = $user["login"];
            $identifier = $user["id"];
            // Debug info
            $debugtmp .= ", NAME: " . $username . ", ID: " . $identifier;
            // Is user qualified for a reward?
            if ($checkQualification == false || isQualifiedGitHub($user, $repos)) {
                // Check, if Cookie check is enabled
                if ($checkCookie == false || cookieExists() == false) {
                    $rewardmanager = new RewardManager();
<?php

include "header.php";
?>

<!-- GitHub intro -->

<?php 
require_once "inc/config.php";
require_once "inc/security.php";
require_once "inc/balance.php";
require_once "inc/GitHubConnector.php";
$uid = generateUid();
registerUid($uid);
$connector = new GitHubConnector();
$url = $connector->getAuthUrl($uid);
?>

  <h3>Nice, you chose GitHub as authentication method!</h3>
  <br />
  
  <div class="description">
    <p>You can receive <strong><?php 
echo getAmountLabelLong("github");
?>
</strong> as reward with this method.</p>
    
    <p>To <strong>redeem</strong> this reward, you need either at least <strong>three public repositories</strong> 
    and your account must be <strong>older than August 1, 2013</strong> or an project of yours is listed as one of the 
    <a href="http://wiki.mastercoin.org/index.php/Github_Repositories" target="_blank" 
    title="A collection of Mastercoin related GitHub repositories on the Mastercoin wiki"><strong>Mastercoin GitHub 
Esempio n. 3
0
<?php

function nactiTridu($trida)
{
    require "tridy/{$trida}.php";
}
spl_autoload_register("nactiTridu");
Databaze::pripojeni();
$stranka = new Strankovnik('Vyhledávání repozitářů');
$gitKonektor = new GitHubConnector();
$stranka->printHead();
$stranka->printMenu();
$gitKonektor->handleGet();
$gitKonektor->setSearchForm();
$stranka->printFooter();