Example #1
0
function get_stats_info(array $numf, array $size)
{
    global $local_text;
    $total_found = count($numf);
    $total_size = letter_size(array_sum($size));
    $ln_text = $local_text['consuming'];
    return sprintf(msyslang::STATS_INFO, $total_found, $ln_text, $total_size);
}
Example #2
0
            } else {
                $file_class = "file_bg2";
            }
            echo '<tr class="' . $file_class . '">
		<td width="' . $width_of_files_column . '">';
            echo '<div style="float:left;width:' . ($width_of_files_column - 40) . 'px">';
            if ($file_icons == 1) {
                echo '<img src="dirLIST_files/icons/' . $files_icons_array[$key] . '">';
            }
            $file_link = $limit_download_speed == 1 || $listing_mode == 1 ? 'dirLIST_files/download.php?file=' . base64_encode($files['link'][$key]) : $files['link'][$key];
            echo ' <a href="' . $file_link . '">' . $files['name'][$key] . '</a></div>';
            if ($_SESSION['logged_in']) {
                echo '<div style="float:right"><img border="0" src="dirLIST_files/edit_files/edit.png" onclick="show_div(1, \'' . $count . '\');" style="cursor:pointer"></div>';
            }
            echo '</td>';
            echo '<td width="' . $width_of_sizes_column . '">' . letter_size($files['size'][$key]) . '</td>
		<td width="' . $width_of_dates_column . '">' . $files['date'][$key] . '</td></tr>';
            $count++;
            echo '';
        }
        echo '</table>';
    }
    //Palce the content into a table -done
}
//Output if the directory is empty
if (empty($folders['name']) && empty($files['name'])) {
    echo display_error_message('No files or folders in this directory: <span class="path_font"><b>' . $url_folder . '</b></span>');
}
//Output if the directory is empty -done
//Display load time
if ($load_time == 1) {
Example #3
0
//dirLIST v0.3.0 gallery file
error_reporting(0);
require 'functions.php';
require 'config.php';
$folder = '../' . $dir_to_browse . base64_decode($_GET['folder']);
if (!is_dir($folder)) {
    die("<b>Error:</b> Folder specified does not exist. This could be because you manually entered the folder name in the URL or you don't have permission to access this folder");
}
$content = get_dir_content($folder);
foreach ($content['files']['name'] as $key => $val) {
    if (in_array(strtolower(strrchr($val, '.')), array('.jpg', '.jpeg', '.png', '.gif'))) {
        $path = $folder . '/' . $val;
        $images_paths[] = $path;
        @($js_images_names .= '\'' . $val . '\', ');
        @($js_images_file_sizes .= '\'' . letter_size(filesize($path)) . '\', ');
        $dimensions = getimagesize($path);
        $images_widths[] = $dimensions[0];
        $images_heights[] = $dimensions[1];
        @($js_images_heights .= '\'' . $dimensions[1] . '\', ');
        @($js_images_widths .= '\'' . $dimensions[0] . '\', ');
        @($js_images_download_link .= '\'' . base64_encode($dir_to_browse . base64_decode($_GET['folder']) . '/' . $val) . '\', ');
    }
}
$js_images_names = substr($js_images_names, 0, -2);
$js_images_file_sizes = substr($js_images_file_sizes, 0, -2);
$js_images_heights = substr($js_images_heights, 0, -2);
$js_images_widths = substr($js_images_widths, 0, -2);
$js_images_download_link = substr($js_images_download_link, 0, -2);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">