<h2>Scripting interface</h2>
<p>This interface permits to script your uploads and downloads.</p>
<p>See <a href="https://gitlab.com/mojo42/Jirafeau/blob/master/script.php">source code</a> of this interface to get available calls :)</p>
+ <p>Alternatively, go to <a href="<?php echo $cfg['web_root'] . 'script.php?lang=bash'; ?>">this page</a> to download a bash script.</p>
</div>
<br />
<?php
isset ($_POST['one_time_download']),
$key, $time, get_ip_address($cfg),
$cfg['enable_crypt'], $cfg['link_name_length']);
-
+
if (empty($res) || $res['error']['has_error'])
{
echo 'Error';
$d = '';
if (isset ($_GET['d']))
$d = $_GET['d'];
-
+
if (!preg_match ('/[0-9a-zA-Z_-]+$/', $link_name))
{
echo 'Error';
exit;
}
-
+
$link = jirafeau_get_link ($link_name);
if (count ($link) == 0)
{
?>
#!/bin/bash
-# This script has been auto-generated by Jirafeau but you can still edit
+# This script has been auto-generated by Jirafeau but you can still edit
# options below.
# Config
$type = '';
if (isset ($_POST['type']))
$type = $_POST['type'];
-
+
$key = '';
if (isset ($_POST['key']))
$key = $_POST['key'];