mirror of
https://github.com/fenetikm/falcon.git
synced 2024-11-09 12:27:50 +03:00
37 lines
578 B
PHP
37 lines
578 B
PHP
<?php
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
function main() {
|
|
global $_REQUEST;
|
|
try {
|
|
ini_set('memory_limit', '64M');
|
|
ini_set('display_errors', 'on');
|
|
if (isset($_REQUEST['dev'])) {
|
|
require_once 'config_dev.php';
|
|
}
|
|
else {
|
|
require_once 'config.php';
|
|
}
|
|
define('TESTING', FALSE);
|
|
|
|
if (empty($_REQUEST['api_key'])) {
|
|
error('Invalid API key specified');
|
|
}
|
|
|
|
$thing = FALSE;
|
|
|
|
// Check API credentials.
|
|
$sql = <<<EOSQL
|
|
SELECT *
|
|
FROM users
|
|
WHERE
|
|
api_key = :api_key AND
|
|
active = 1
|
|
EOSQL;
|
|
|
|
$q = $_pdo->prepare($sql);
|
|
}
|
|
}
|