X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/5d7c0d3ce08074fff55e7731490fe786cd6101e6..e2496f2e6885bd52fffa050e9c53c90951fc6b68:/admin.php?ds=inline diff --git a/admin.php b/admin.php index 44a0134..a42b20f 100644 --- a/admin.php +++ b/admin.php @@ -1,7 +1,7 @@ <?php /* * Jirafeau, your web file repository - * Copyright (C) 2015 Jerome Jutteau <j.jutteau@gmail.com> + * Copyright (C) 2015 Jerome Jutteau <jerome@jutteau.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -160,6 +160,19 @@ if (php_sapi_name() == "cli") { </td> </tr> </form> + <form method="post"> + <tr> + <input type = "hidden" name = "action" value = "size"/> + <?php echo jirafeau_admin_csrf_field() ?> + <td class = "info"> + <?php echo t('SIZE_DATA'); ?> + </td> + <td></td> + <td> + <input type = "submit" value = "<?php echo t('SIZE'); ?>" /> + </td> + </tr> + </form> <form method="post"> <tr> <input type = "hidden" name = "action" value = "search_by_name"/> @@ -228,6 +241,12 @@ if (php_sapi_name() == "cli") { echo '<p>'; echo t('CLEANED_FILES_CNT') . ' : ' . $total; echo '</p></div>'; + } elseif (strcmp($_POST['action'], 'size') == 0) { + $size = jirafeau_dir_size($cfg['var_root']); + $human_size = jirafeau_human_size($size); + echo '<div class="message">' . NL; + echo '<p>' . t('SIZE_DATA') . ': ' . $human_size .'</p>'; + echo '</div>'; } elseif (strcmp($_POST['action'], 'list') == 0) { jirafeau_admin_list("", "", ""); } elseif (strcmp($_POST['action'], 'search_by_name') == 0) {