-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 _('Upload a file');
- ?></legend> <p><input type = "file" name = "file" size =
- "30" /></p> <p class =
- "config"><?php printf ('%s: %dMB', _('Maximum file size'),
- jirafeau_get_max_upload_size () / (1024 *
- 1024));
- ?></p> <p><input type = "submit" value =
- "<?php echo _('Send'); ?>" /></p>
- <hr /><div id = "moreoptions"> <p><label><input type =
- "checkbox" name =
- "one_time_download" /><?php echo _('One time download');
- ?></label></p> <p><label for = "input_key"
- ><?php echo _('Password') . ':';
- ?></label> <input type = "text" name = "key" id = "input_key" /></p>
- <p><label for = "select_time"
- ><?php echo _('Time limit') . ':';
- ?></label>
- <select name = "time" id = "select_time">
- <option value = "none"><?php echo _('None');
- ?></option> <option value = "minute"><?php echo _('One minute');
- ?></option> <option value = "hour"><?php echo _('One hour');
- ?></option> <option value = "day"><?php echo _('One day');
- ?></option> <option value = "week"><?php echo _('One week');
- ?></option> <option value = "month"><?php echo _('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>';