-if (has_error ())
- show_errors ();
-
-if (!has_error () && $writable)
-{
- ?><div id = "upload">
- <form enctype = "multipart/form-data" action = "
- <?php echo $cfg['web_root']; ?>" method =
- "post"> <div><input type = "hidden" name = "jirafeau" value = "
- <?php echo JIRAFEAU_VERSION; ?>" /></div> <fieldset>
- <legend><?php echo t('Upload a file');
- ?></legend> <p><input type = "file" name = "file" size =
- "30" /></p> <p class =
- "config"><?php printf ('%s: %dMB', t('Maximum file size'),
- jirafeau_get_max_upload_size () / (1024 *
- 1024));
- ?></p> <p><input type = "submit" value =
- "<?php echo t('Send'); ?>" /></p>
- <hr /><div id = "moreoptions"> <p><label><input type =
- "checkbox" name =
- "one_time_download" /><?php echo t('One time download');
- ?></label></p><br/><p><label for = "input_key"
- ><?php echo t('Password') . ':';
- ?></label><input type = "text" name = "key" id = "input_key" /></p>
- <p><label for = "select_time"
- ><?php echo t('Time limit') . ':';
- ?></label>
- <select name = "time" id = "select_time">
- <option value = "none"><?php echo t('None');
- ?></option> <option value = "minute"><?php echo t('One minute');
- ?></option> <option value = "hour"><?php echo t('One hour');
- ?></option> <option value = "day"><?php echo t('One day');
- ?></option> <option value = "week"><?php echo t('One week');
- ?></option> <option value = "month"><?php echo t('One month');
- ?></option>
- </select> </p> </div> </fieldset> </form> </div> <?php
+ <?php
+if ($cfg['maximal_upload_size'] >= 1024) {
+ echo '<p class="config">' . t('FILE_LIM');
+ echo " " . number_format($cfg['maximal_upload_size'] / 1024, 2) . " GB.</p>";
+} elseif ($cfg['maximal_upload_size'] > 0) {
+ echo '<p class="config">' . t('FILE_LIM');
+ echo " " . $cfg['maximal_upload_size'] . " MB.</p>";
+} else {
+ echo '<p class="config"></p>';