X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/0a5462c3311b4541a858b8e719ae8548877c7a62..38069302c9544b4fcc1eb2492138dbcbe83d7bd7:/script.php
diff --git a/script.php b/script.php
old mode 100755
new mode 100644
index 7d5e25c..bb44562
--- a/script.php
+++ b/script.php
@@ -25,7 +25,7 @@
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');
-require (JIRAFEAU_ROOT . 'lib/config.php');
+require (JIRAFEAU_ROOT . 'lib/config.original.php');
require (JIRAFEAU_ROOT . 'lib/settings.php');
require (JIRAFEAU_ROOT . 'lib/functions.php');
require (JIRAFEAU_ROOT . 'lib/lang.php');
@@ -36,12 +36,14 @@ require (JIRAFEAU_ROOT . 'lib/lang.php');
/* Operations may take a long time.
* Be sure PHP's safe mode is off.
*/
- set_time_limit(0);
+@set_time_limit(0);
+/* Remove errors. */
+@error_reporting(0);
if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
{
require (JIRAFEAU_ROOT . 'lib/template/header.php');
- check_errors ();
+ check_errors ($cfg);
if (has_error ())
{
show_errors ();
@@ -90,6 +92,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
echo "time=[minute|hour|day|week|month|none] (" . t('Optional') . ', '. t('default: none') . ")
";
echo "password=your_password (" . t('Optional') . ")
";
echo "one_time_download=1 (" . t('Optional') . ")
";
+ echo "upload_password=your_upload_password (" . t('Optional') . ")
";
echo '
' . t('This will return brut text content.') . ' ' .
t('First line is the download reference and the second line the delete code.') . '
';
echo t('The goal is to permit to transfert big file, chunk by chunk.') . ' ';
echo t('Chunks of data must be sent in order.');
@@ -155,6 +158,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)
echo "time=[minute|hour|day|week|month|none] (" . t('Optional') . ', '. t('default: none') . ")
";
echo "password=your_password (" . t('Optional') . ")
";
echo "one_time_download=1 (" . t('Optional') . ")
";
+ echo "upload_password=your_upload_password (" . t('Optional') . ")
";
echo '
' . t('This will return brut text content.') . ' ' .
t('First line is the asynchronous transfert reference and the second line the code to use in the next operation.') . '
' . t('This will return brut text content.') . ' ' .
t('First line is the download reference and the second line the delete code.') . '
'; - echo t('This interface permits to create a block of data filled with zeros.') . - ' ' . t('You can read selected parts, write (using a code) and delete the block.') . - ' ' . t('Blocks may be removed after a month of non usage.'); - echo '
'; - echo '';
- echo t('Send a GET query to') . ': ' . $web_root . 'script.php?init_block
';
- echo '
';
- echo t('Parameters') . ':
';
- echo "size=size_in_bytes (" . t('Required') . ")
";
- echo '
' . t('This will return brut text content.') . ' ' .
- t('First line is a block id the second line the edit/delete code.') . '
';
- echo t('Send a GET query to') . ': ' . $web_root . 'script.php?get_block_size
';
- echo '
';
- echo t('Parameters') . ':
';
- echo "id=block_id (" . t('Required') . ")
";
- echo '
' . t('This will return asked data or "Error" string.') . '
';
- echo t('Send a GET query to') . ': ' . $web_root . 'script.php?read_block
';
- echo '
';
- echo t('Parameters') . ':
';
- echo "id=block_id (" . t('Required') . ")
";
- echo "start=byte_position_starting_from_zero (" . t('Required') . ")
";
- echo "length=length_to_read_in_bytes (" . t('Required') . ")
";
- echo '
' . t('This will return asked data or "Error" string.') . '
';
- echo t('Send a GET query to') . ': ' . $web_root . 'script.php?write_block
';
- echo '
';
- echo t('Parameters') . ':
';
- echo "id=block_id (" . t('Required') . ")
";
- echo "code=block_code (" . t('Required') . ")
";
- echo "start=byte_position_starting_from_zero (" . t('Required') . ")
";
- echo "data=data_to_write (" . t('Required') . ")
";
- echo '
' . t('This will return "Ok" or "Error" string.') . '
';
- echo t('Send a GET query to') . ': ' . $web_root . 'script.php?delete_block
';
- echo '
';
- echo t('Parameters') . ':
';
- echo "id=block_id (" . t('Required') . ")
";
- echo "code=block_code (" . t('Required') . ")
";
- echo '
' . t('This will return "Ok" or "Error" string.') . '