File: /var/www/samok164/data/www2/obryadi.ru/rzgn/r4_download_links.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");
if (isset($_GET['start'])) {
$start = strtotime($_GET['start']);
}
else {
$start = 0;
}
$len = strlen($r4_cfg_root);
$filenames = get_filenames($r4_cfg_root, '*.rzg');
foreach ($filenames as $filename) {
$relative_filename = substr($filename, $len);
$contents = file_get_contents($filename);
$regs = array();
if (preg_match("/#!r4\s+(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})/", $contents, $regs)) {
$time = strtotime($regs[1]);
if ($time > $start) {
printf ("====== %s ======\n%s\n", $relative_filename, $contents);
}
}
}
?>