X-Git-Url: https://git.cweiske.de/phancap.git/blobdiff_plain/ec669a7e73283fbd0e34483221e2db16fd4e339a..09ad15fd2ed08bbfb4ed4d70ff21f774387aa204:/www/index.php?ds=sidebyside diff --git a/www/index.php b/www/index.php index 27deb63..d2580be 100644 --- a/www/index.php +++ b/www/index.php @@ -1,8 +1,17 @@ + * @copyright 2014 Christian Weiske + * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3 + * @link http://cweiske.de/phancap.htm */ +namespace phancap; header('HTTP/1.0 500 Internal Server Error'); if (file_exists(__DIR__ . '/../src/phancap/Autoloader.php')) { @@ -12,6 +21,14 @@ if (file_exists(__DIR__ . '/../src/phancap/Autoloader.php')) { include_once 'phancap/Autoloader.php'; } header('HTTP/1.0 200 OK'); + +$options = new Options(); +$config = new Config(); +try { + $config->load(); + $options->setConfig($config); +} catch (\Exception $e) { +} ?> @@ -46,6 +63,11 @@ header('HTTP/1.0 200 OK');
Create screenshot
+ access === false) { ?> +
API is disabled
+ access !== true) { ?> +
API requires authentication
+
@@ -78,7 +100,9 @@ header('HTTP/1.0 200 OK');

-
Available URL parameters
+
+ Available URL parameters +
@@ -90,13 +114,6 @@ header('HTTP/1.0 200 OK'); load(); - $options->setConfig($config); -} catch (\Exception $e) {} - foreach ($options->options as $name => $option) { echo '' . '' @@ -128,5 +145,13 @@ foreach ($options->options as $name => $option) { + + +
' . $name . '