Exemplo n.º 1
0
                    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');
    $response = $pheal->MemberTracking(array("extended" => 1));
    $memberList = array();
    foreach ($response->members as $member) {
        $memberList[$member->name]['name'] = $member->name;
        $memberList[$member->name]['id'] = $member->characterID;
    }
    ksort($memberList, SORT_NATURAL | SORT_FLAG_CASE);
    // Working through the member list
    $stmt = $db->prepare('SELECT * FROM characters WHERE charid = ?');
    $stmt_api = $db->prepare('SELECT * FROM user_apikeys WHERE userid = ?');
} elseif ($request['action'] == 'doctrine') {
    $compliance_type = 'Doctrine';
    // Getting all of the doctrines for the group
    $stmt = $db->prepare('SELECT * FROM doctrines WHERE gid = ? ORDER BY doctrine_name ASC');
    $stmt->execute(array($user->getGroup()));
    $doctrineList = $stmt->fetchAll(PDO::FETCH_ASSOC);