Exemplo n.º 1
0
// +----------------------------------------------------------------------+
// + Description:
// +----------------------------------------------------------------------+
// + Changes:
// +----------------------------------------------------------------------+
// + ToDo:
// +----------------------------------------------------------------------+
if (!defined('CMS_CONFIGFILE_INCLUDED')) {
    die('NO CONFIGFILE FOUND');
}
/******************************************************************************
 1. Benötigte Funktionen und Klassen includieren
******************************************************************************/
include 'inc/fnc.scan.php';
include 'inc/class.filemanager.php';
$fm = new filemanager();
$scanned_dirs_complete = false;
$scanned_files_complete = false;
$scanned_thumbs_complete = false;
$scan_active = 0;
$scanned_completed = 0;
$found_dirs = 0;
$scanned_dirs = 0;
$found_files = 0;
$scanned_files = 0;
$found_thumbs = 0;
$scanned_thumbs = 0;
$max_dirs = $cfg_client['max_count_scandir'];
$max_files = $cfg_client['max_count_scanfile'];
$max_thumbs = $cfg_client['max_count_scanthumb'];
$extend_time = $cfg_client['extend_time_scandir'];
Exemplo n.º 2
0
// +----------------------------------------------------------------------+
// + Description:
// +----------------------------------------------------------------------+
// + Changes:
// +----------------------------------------------------------------------+
// + ToDo:
// +----------------------------------------------------------------------+
if (!defined('CMS_CONFIGFILE_INCLUDED')) {
    die('NO CONFIGFILE FOUND');
}
/******************************************************************************
 1. Benötigte Funktionen und Klassen includieren
******************************************************************************/
include 'inc/fnc.css.php';
include 'inc/class.filemanager.php';
$fm = new filemanager();
/******************************************************************************
 2. Eventuelle Actions/ Funktionen abarbeiten
******************************************************************************/
$perm->check('area_css');
if ($idclient != 0 && $idclient != (int) $client || !isset($idclient)) {
    $idclient = (int) $client;
}
// if $action is named prepare a function call
if ($action && preg_match('/^\\d/', $action) == 0) {
    eval('$errno = css_' . $action . '();');
    // Event
    $errlog = $errno != '1112' && $errno != '1113' && $errno != '1117' && $errno != '1116' && $errno ? ', Fehler:' . $errno : '';
    $errrule = preg_match('/(file)/i', $action) > 0 ? '' : ', Rule: ' . $idcss;
    fire_event('css_' . $action, array('idcss' => $idcssfile, 'errrule' => $errrule, 'errlog' => $errlog));
}
Exemplo n.º 3
0
 protected function imageThumbRemove($f)
 {
     $p = path::info($f);
     $thumb = sprintf($this->thumb_tp, '', $p['base'], '%s');
     foreach ($this->thumb_sizes as $suffix => $s) {
         try {
             parent::removeFile(sprintf($thumb, $suffix));
         } catch (Exception $e) {
         }
     }
 }
Exemplo n.º 4
0
// +----------------------------------------------------------------------+
// + Description:
// +----------------------------------------------------------------------+
// + Changes:
// +----------------------------------------------------------------------+
// + ToDo:
// +----------------------------------------------------------------------+
if (!defined('CMS_CONFIGFILE_INCLUDED')) {
    die('NO CONFIGFILE FOUND');
}
/******************************************************************************
 1. Benötigte Funktionen und Klassen includieren
******************************************************************************/
include 'inc/fnc.upl.php';
include 'inc/class.filemanager.php';
$fm = new filemanager();
/******************************************************************************
 2. Eventuelle Actions/ Funktionen abarbeiten
******************************************************************************/
$perm->check('area_upl');
if ($idclient != 0 && $idclient != (int) $client || !isset($idclient)) {
    $idclient = (int) $client;
}
// if $action is named prepare a function call
if (!empty($action) && preg_match('/^\\d/', $action) == 0) {
    eval('$errno = upl_' . $action . '();');
    // Event
    $errlog = $errno ? 'Fehler:' . $errno : '';
    fire_event('upl' . $action, array('idupl' => $idupl, 'errlog' => $errlog));
    if (!empty($errno)) {
        switch ($action) {
Exemplo n.º 5
0
 public function imageThumbRemove($f)
 {
     $p = path::info($f);
     $alpha = $p['extension'] == 'png' || $p['extension'] == 'PNG';
     $thumb = sprintf($alpha ? $this->thumb_tp_alpha : $this->thumb_tp, '', $p['base'], '%s');
     foreach ($this->thumb_sizes as $suffix => $s) {
         try {
             parent::removeFile(sprintf($thumb, $suffix));
         } catch (Exception $e) {
         }
     }
 }
Exemplo n.º 6
0
        // Call DB Connector
        $callDB = new PGSdb();
        $callDB->connDB();
        $fileDetailsPrep = $callDB->db->prepare("DELETE FROM file_uploads WHERE folder = :folder AND filename = :filename");
        return $fileDetailsPrep->execute(array('folder' => $folder_name, 'filename' => $file_name));
    }
    public function worker($a)
    {
        // $a = Action
        // // Get user info before start
        $this->user = user::get(@$_SESSION['user_id'])->data;
        // User rank
        if ($this->user['SiteRank'] >= 5) {
            $options = array('del_file', 'get_file', 'get_root', 'get_folder');
            if (in_array($a, $options)) {
                $result = $this->{$a}();
            } else {
                $result = false;
            }
        } else {
            self::errorHTML('You don\'t have access to this part of the site!');
        }
    }
}
if (isset($_POST['action'])) {
    // filemanager::worker($_POST['action']);
    $filemanager = new filemanager();
    $filemanager->worker($_POST['action']);
} else {
    echo 'error!';
}