php-mpos/public/include/classes/api.class.php
Sebastian Grewe 7ec8fa9b95 Moving a lot of settings from config to adminpanel
* Migrated configuration options to admin panel
* Removed configuration options from config file
* Added help text for each configuration option into panel

Addresses #622 and needs extensive testing by pools. A lot has changed
so pool owners might have to adjust their own templates to match this
new system.
2013-08-20 12:02:47 +02:00

25 lines
486 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
/**
* Helper class for our API
**/
class Api extends Base {
function isActive($error=true) {
if (!$this->setting->getValue('disable_api')) {
return true;
} else {
if ($error == true) {
header('HTTP/1.1 501 Not implemented');
die('501 Not implemented');
}
}
}
}
$api = new Api();
$api->setConfig($config);
$api->setSetting($setting);