X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/13e2e31c60052e3572ad1bb091bf81ae62f00aca..8d85f9772ae53ce6a1902a967205f8ff1a290795:/script.php?ds=sidebyside diff --git a/script.php b/script.php index 45ca635..9bf9578 100755 --- a/script.php +++ b/script.php @@ -199,6 +199,15 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0) echo '

' . t('This will return brut text content.') . ' ' . t('First line is a block id the second line the edit/delete code.') . '

'; + echo '

' . t('Get block size') . ':

'; + echo '

'; + 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 '

'; + echo '

' . t('This will return asked data or "Error" string.') . '

'; + echo '

' . t('Read data in a block') . ':

'; echo '

'; echo t('Send a GET query to') . ': ' . $web_root . 'script.php?read_block
'; @@ -574,6 +583,14 @@ elseif (isset ($_GET['init_block']) && $cfg['enable_blocks']) else echo jirafeau_block_init ($_POST['size']); } +/* Get block size. */ +elseif (isset ($_GET['get_block_size']) && $cfg['enable_blocks']) +{ + if (!isset ($_POST['id'])) + echo "Error"; + else + echo jirafeau_block_get_size ($_POST['id']); +} /* Read data in block. */ elseif (isset ($_GET['read_block']) && $cfg['enable_blocks']) {