X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/2a71cdda5bacf89790a214a38174e5ced3ad07c0..18c82ef56dce9c9eb30b0f2318024d320d878a47:/script.php?ds=sidebyside diff --git a/script.php b/script.php index eda2cc9..1d11050 100755 --- a/script.php +++ b/script.php @@ -30,19 +30,15 @@ require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); -if (file_exists (JIRAFEAU_ROOT . 'install.php')) -{ - header('Content-Type: text; charset=utf-8'); - echo "Error"; - exit; -} - global $script_langages; $script_langages = array ('bash' => 'Bash'); if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0) { require (JIRAFEAU_ROOT . 'lib/template/header.php'); + check_errors (); + if (has_error ()) + show_errors (); echo '
'; @@ -50,6 +46,19 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0) ' ' . t('The instructions above show how to query this interface.'); echo '
'; + echo '';
+ echo t('Send a GET query to') . ': ' . $web_root . 'script.php
';
+ echo '
';
+ echo t('Parameters') . ':
';
+ echo "get_version=1 (" . t('Required') . ")
";
+ echo '
' . t('This will return brut text content.') . ' ' .
+ t('First line is the version number.') . '
'; + echo t('Example') . ": " . $web_root . "script.php?get_version=1 "; + echo '
'; + echo '';
echo t('Send a GET query to') . ': ' . $web_root . 'script.php
';
@@ -240,6 +249,10 @@ elseif (isset ($_GET['get_capacity']))
echo min (jirafeau_ini_to_bytes (ini_get ('post_max_size')),
jirafeau_ini_to_bytes (ini_get ('upload_max_filesize')));
}
+elseif (isset ($_GET['get_version']))
+{
+ echo JIRAFEAU_VERSION;
+}
elseif (isset ($_GET['lang']))
{
$l=$_GET['lang'];