Beispiel #1
0
/**
 *
 *
 * @author AndreaG | andrea@smartgap.it
 * @version 0.0.1
 * @copyright SmartGaP s.r.l.
 * @package esyFileManager
 * @site http://www.smartgap.it | http://esyfilemanager.smartgap.it
 */
/**
 * 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);
Beispiel #2
0
 *
 * @author AndreaG | andrea@smartgap.it
 * @version 0.0.1
 * @copyright SmartGaP s.r.l.
 * @package esyFileManager
 * @site http://www.smartgap.it | http://esyfilemanager.smartgap.it
 */
/**
 * Ajax Calls Actions
 */
/**
 * Instanzio le classi di base e faccio il take della action
 */
require 'config.php';
require 'classes/class.filemanager.php';
$FM = new esyFileManager();
$getAction = $FM->take('action');
/**
 * In posto le azioni da eseguire in base alla action ricevuta
 */
switch ($getAction) {
    /**
     * In caso di upload
     */
    case 'upload':
        $folder = $FM->take('folder');
        // list of valid extensions, ex. array("jpeg", "xml", "bmp")
        $allowedExtensions = array();
        // max file size in bytes
        $sizeLimit = 10 * 1024 * 1024;
        require 'classes/class.qqfileuploader.php';