require (JIRAFEAU_ROOT . 'lib/functions.php');\r
require (JIRAFEAU_ROOT . 'lib/lang.php');\r
\r
-if (file_exists (JIRAFEAU_ROOT . 'install.php'))\r
-{\r
- header('Content-Type: text; charset=utf-8');\r
- echo "Error";\r
- exit;\r
-}\r
-\r
global $script_langages;\r
$script_langages = array ('bash' => 'Bash');\r
\r
if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)\r
{\r
require (JIRAFEAU_ROOT . 'lib/template/header.php');\r
+ check_errors ();\r
+ if (has_error ())\r
+ show_errors ();\r
echo '<div class="info">';\r
echo '<h2>' . t('Welcome to Jirafeau\'s query interface') . '</h2>';\r
echo '<p>';\r
' ' . t('The instructions above show how to query this interface.');\r
echo '</p>';\r
\r
+ echo '<h3>' . t('Get Jirafeau\'s version') . ':</h3>';\r
+ echo '<p>';\r
+ echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php</i><br />';\r
+ echo '<br />';\r
+ echo t('Parameters') . ':<br />';\r
+ echo "<b>get_version=</b>1<i> (" . t('Required') . ")</i> <br />";\r
+ echo '</p>';\r
+ echo '<p>' . t('This will return brut text content.') . ' ' .\r
+ t('First line is the version number.') . '<br /></p>';\r
+ echo '<p>';\r
+ echo t('Example') . ": <a href=\"" . $web_root . "script.php?get_version=1\">" . $web_root . "script.php?get_version=1</a> ";\r
+ echo '</p>';\r
+\r
echo '<h3>' . t('Get server capacity') . ':</h3>';\r
echo '<p>';\r
echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php</i><br />';\r
echo min (jirafeau_ini_to_bytes (ini_get ('post_max_size')),\r
jirafeau_ini_to_bytes (ini_get ('upload_max_filesize')));\r
}\r
+elseif (isset ($_GET['get_version']))\r
+{\r
+ echo JIRAFEAU_VERSION;\r
+}\r
elseif (isset ($_GET['lang']))\r
{\r
$l=$_GET['lang'];\r