/** * INCLUDES */ require_once "config.php"; require_once "classes/class.filemanager.php"; $FM = new esyFileManager(); $user = get_current_user(); //sleep(5); $used = $FM->dirSize(FILES_FOLDER); $quota = exec("cat /tmp/quotas | grep {$user} | awk '{print \$2}'"); $quota = $quota * 1024; if ($quota == "user") { $quota_n = disk_total_space($_SERVER['DOCUMENT_ROOT']); $disp_n = disk_free_space($_SERVER['DOCUMENT_ROOT']); $used_n = $quota_n - $disp_n; $quota_to_print = $FM->bytesToSize($quota_n); $used_to_print = $FM->bytesToSize($used_n); $disp_to_print = $FM->bytesToSize($disp_n); } else { $quota_to_print = $FM->bytesToSize($quota); $used_to_print = $FM->bytesToSize($used); $disp_to_print = $FM->bytesToSize($quota - $used); } ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="UTF-8">
</select> <?php break; case 'fileinfo': $path = pathinfo($_POST['path']); echo "<div>"; if (is_dir($_POST['path'])) { $size = $FM->dirSize($_POST['path']); echo "{$text['cartella']}: "; echo $path['basename']; } else { echo "File: "; echo "<a href='download.php?file={$_POST['path']}'>" . $path['basename'] . "</a>"; echo "<br>"; echo "{$text['tipo']}: "; echo $path['extension']; } echo "<br>"; if (file_exists($_POST['path'])) { $size = filesize($_POST['path']); echo "{$text['dimensioni']}: "; echo $FM->bytesToSize($size); if (isset($path['extension']) && ($path['extension'] == "jpeg" || $path['extension'] == "jpg" || $path['extension'] == "gif" || $path['extension'] == "png" || $path['extension'] == "JPG")) { echo "<img src='thumb.php?path={$_POST['path']}' width='100%' />"; } } else { echo "<br><br><center><a id='reload' rel='" . FILES_FOLDER . "'><img src='images/refresh_48.png' /></a></center>"; } echo "</div>"; break; }