Exemplo n.º 1
0
<?php

require_once 'includes/header.php';
use Pheal\Pheal;
use Pheal\Core\Config;
Config::getInstance()->cache = new \Pheal\Cache\MemcacheStorage();
Config::getInstance()->access = new \Pheal\Access\StaticCheck();
// Getting the compliance type
if ($request['action'] == 'api') {
    if ($request['value'] == 'refresh') {
        $key = new ApiKey($_POST['keyID'], $_POST['vCode'], $_POST['uid'], $db);
        if ($key->getKeyStatus() == 1 and $key->getAccessMask() & MINIMUM_API) {
            $update = $key->updateApiKey();
            if ($update) {
                foreach ($key->getCharacters() as $character) {
                    $char = new Character($character['characterID'], $key->getKeyID(), $key->getVCode(), $key->getAccessMask(), $db, $user);
                    if ($char->getExistance() or $char->getExistance() == FALSE) {
                        $char->updateCharacterInfo();
                    }
                }
                $refresh = $key->refreshAPIKey();
                setAlert('success', 'API Key Refreshed', 'The API key has been successfully refreshed.');
            }
        } elseif (!($key->getAccessMask() & MINIMUM_API) and $key->getKeyStatus() == 1) {
            setAlert('danger', 'The API Key Does Not Meet Minimum Requirements', 'The required minimum Access Mask for API keys is ' . MINIMUM_API . '. Please create a new key using the Create Key link.');
        }
    }
    // We're doing API compliance
    $compliance_type = "API";
    // Getting a full API-pulled member list
    $pheal = new Pheal($settings->getCorpUserID(), $settings->getCorpVCode(), 'corp');
Exemplo n.º 2
0
							<div class="row box-title-section">
								<h3 class="eve-text" style="text-align: center; font-size: 250%"><?php 
            echo SITE_NAME;
            ?>
</h3>
							</div>
							<div class="row" style="padding-left: 10px; padding-right: 10px">
								<p class="eve-text" style="font-size: 150%; text-align: center">Select the character you would like associated as your Main Character. This will be your TS3 name, Slack name, Forum name, and Auth name, so it is strongly recommended you go back and provide a key for your main character if it does not appear below.</p>
								<div class="row">
									<?php 
            foreach ($key->getCharacters() as $character) {
                ?>
										<div class="col-md-4 col-sm-12" style="text-align: center">
											<form method="post" action="/register/3/">
												<input type="hidden" name="keyID" value="<?php 
                echo $key->getKeyID();
                ?>
">
												<input type="hidden" name="vCode" value="<?php 
                echo $key->getVCode();
                ?>
">
												<input type="hidden" name="characterID" value="<?php 
                echo $character['characterID'];
                ?>
">
												<input type="hidden" name="characterName" value="<?php 
                echo $character['characterName'];
                ?>
">
												<input type="image" src="https://image.eveonline.com/Character/<?php 
Exemplo n.º 3
0
 $stmt = $db->prepare('SELECT * FROM core_cron WHERE cron_updated < ? AND cron_status = 1 ORDER BY cron_updated ASC LIMIT 1');
 $stmt->execute(array($cacheLimit));
 $apiLookup = $stmt->fetch(PDO::FETCH_ASSOC);
 // Checking to see if anything is out of cache
 if (isset($apiLookup['api_keyID'])) {
     // Checking the API key
     $key = new ApiKey($apiLookup['api_keyID'], $apiLookup['api_vCode'], $apiLookup['uid'], $db);
     // Checking to see if the key is valid
     if ($key->getKeyStatus() == 1) {
         // Key is valid, updating it
         $updateKey = $key->updateAPIKey();
         // Checking the access mask for the key
         if ($key->accessMaskCheck()) {
             // Looping through the characters
             foreach ($key->getCharacters() as $character) {
                 $char = new Character($character['characterID'], $key->getKeyID(), $key->getVCode(), $key->getAccessMask(), $db, $apiLookup['uid']);
                 if ($char->getExistance() or $char->getExistance() == FALSE) {
                     $char->updateCharacterInfo();
                     /*
                      * SKILLS UPDATE SECTION
                      */
                     $skills = $char->updateCharacterSkills();
                     // Checking for skills update success
                     if ($skills === "SDE Failure") {
                         echo date('Ymd H:i:s', time()) . " - cron_update.php - FAILURE - Skill detected that does not exist in SDE for charid " . $character['characterID'] . "\n";
                     } elseif ($skills === FALSE) {
                         echo date('Ymd H:i:s', time()) . " - cron_update.php - FAILURE - General processing error for charid " . $character['characterID'] . "\n";
                     }
                     /*
                      * SKILLPLAN UPDATE SECTION
                      */