Example #1
0
function GetSFileList($dir, $content, $re = 0)
{
    global $filedata, $j, $nowpath, $writabledb;
    !$j && ($j = 1);
    if ($dh = opendir($dir)) {
        while ($file = readdir($dh)) {
            $ext = getextension($file);
            $f = str_replace('//', '/', $dir . '/' . $file);
            if ($file != '.' && $file != '..' && is_dir($f)) {
                GetSFileList($f, $content, $re = 0);
            } elseif ($file != '.' && $file != '..' && is_file($f) && in_array($ext, explode(',', $writabledb))) {
                $find = 0;
                if ($re) {
                    if (preg_match('@' . $content . '@', $file) || preg_match('@' . $content . '@', @file_get_contents($f))) {
                        $find = 1;
                    }
                } else {
                    if (strstr($file, $content) || strstr(@file_get_contents($f), $content)) {
                        $find = 1;
                    }
                }
                if ($find) {
                    $filedata[$j]['filename'] = str_replace($nowpath, '', $f);
                    $filedata[$j]['size'] = sizecount(@filesize($f));
                    $filedata[$j]['mtime'] = @date('Y-m-d H:i:s', filemtime($f));
                    $filedata[$j]['filechmod'] = getChmod($f);
                    $filedata[$j]['fileperm'] = getPerms($f);
                    $filedata[$j]['fileowner'] = getUser($f);
                    $filedata[$j]['dirlink'] = $dir;
                    $filedata[$j]['server_link'] = $f;
                    $filedata[$j]['client_link'] = ue($f);
                    $j++;
                }
            }
        }
        closedir($dh);
        clearstatcache();
        return $filedata;
    } else {
        return array();
    }
}
function GetWFileList($dir)
{
    global $filedata, $j, $nowpath;
    !$j && ($j = 1);
    if ($dh = opendir($dir)) {
        while ($file = readdir($dh)) {
            $ext = getextension($file);
            $f = str_replace('//', '/', $dir . '/' . $file);
            if ($file != '.' && $file != '..' && is_dir($f)) {
                GetWFileList($f);
            } elseif ($file != '.' && $file != '..' && is_file($f)) {
                if (is_writable($f)) {
                    $filedata[$j]['filename'] = str_replace($nowpath, '', $f);
                    $filedata[$j]['size'] = sizecount(@filesize($f));
                    $filedata[$j]['mtime'] = @date('Y-m-d H:i:s', filemtime($f));
                    $filedata[$j]['filechmod'] = getChmod($f);
                    $filedata[$j]['fileperm'] = getPerms($f);
                    $filedata[$j]['fileowner'] = getUser($f);
                    $filedata[$j]['dirlink'] = $dir;
                    $filedata[$j]['server_link'] = $f;
                    $filedata[$j]['client_link'] = ue($f);
                    $j++;
                }
            }
        }
        closedir($dh);
        clearstatcache();
        return $filedata;
    } else {
        return array();
    }
}
Example #3
0
function GetList($dir)
{
    global $dirdata, $j, $nowpath;
    !$j && ($j = 1);
    if ($dh = opendir($dir)) {
        while ($file = readdir($dh)) {
            $f = str_replace('//', '/', $dir . '/' . $file);
            if ($file != '.' && $file != '..' && is_dir($f)) {
                if (is_writable($f)) {
                    $dirdata[$j]['filename'] = str_replace($nowpath, '', $f);
                    $dirdata[$j]['mtime'] = @date('Y-m-d H:i:s', filemtime($f));
                    $dirdata[$j]['dirchmod'] = getChmod($f);
                    $dirdata[$j]['dirperm'] = getPerms($f);
                    $dirdata[$j]['dirlink'] = ue($dir);
                    $dirdata[$j]['server_link'] = $f;
                    $dirdata[$j]['client_link'] = ue($f);
                    $j++;
                }
                GetList($f);
            }
        }
        closedir($dh);
        clearstatcache();
        return $dirdata;
    } else {
        return array();
    }
}
Example #4
0
$CONF['ftp_path'] = ue('');
$CONF['ftp_passwd'] = ue('');
$CONF['sql_passwd'] = ue('');
$PMBP_SYS_VAR['last_scheduled'] = ue('');
$PMBP_SYS_VAR['this_login'] = ue('29.03.2016 18:18 Uhr (IP: 127.0.0.1)');
$PMBP_SYS_VAR['last_login'] = ue('28.03.2016 18:46 Uhr (IP: 127.0.0.1)');
$PMBP_SYS_VAR['dir_lists'] = ue('1');
$PMBP_SYS_VAR['memory_limit'] = ue('4000000');
$PMBP_SYS_VAR['except_tables'] = ue('');
$PMBP_SYS_VAR['scheduled_debug'] = ue('0');
$PMBP_SYS_VAR['schedule_all_dbs'] = ue('0');
$PMBP_SYS_VAR['ftp_timeout'] = ue('10');
$PMBP_SYS_VAR['dir_email_backup'] = ue('0');
$PMBP_SYS_VAR['C_disable_config'] = ue('0');
$PMBP_SYS_VAR['C_disable_sqlquery'] = ue('0');
$PMBP_SYS_VAR['B_backup_chmod'] = ue('0700');
$PMBP_SYS_VAR['F_dbs'] = ue('lugrawibe');
$PMBP_SYS_VAR['F_comment'] = ue('wilder dice hola comentando by wil');
$PMBP_SYS_VAR['F_tables'] = ue('on');
$PMBP_SYS_VAR['F_data'] = ue('on');
$PMBP_SYS_VAR['F_drop'] = ue('on');
$PMBP_SYS_VAR['F_compression'] = ue('');
$PMBP_SYS_VAR['F_ftp_dirs'] = ue('');
$PMBP_SYS_VAR['F_ftp_dirs_2'] = ue('');
$PMBP_SYS_VAR['F_packed'] = ue('');
$PMBP_SYS_VAR['F_updates'] = ue('1');
$PMBP_SYS_VAR['F_ffadd'] = ue('1');
$PMBP_SYS_VAR['EXS_scheduled_file'] = ue('???.php');
$PMBP_SYS_VAR['EXS_scheduled_dir'] = ue('0');
$PMBP_SYS_VAR['EXS_period'] = ue('');