// If strict types are enabled i.e. declare(strict_types=1);
$dt = file_get_contents('../assets/usa/date.txt', true);
// Otherwise
$dt = file_get_contents('../assets/usa/date.txt', FILE_USE_INCLUDE_PATH);
$dd = 'page.php?id=1&edition=usa&dt='.$dt;
header("Refresh:1800; url='$dd");
?>
include('_inc/func.php');
include('_inc/js.php');
//arhives source start
$someArray = $editions;
$otherArray = array_flip($someArray);
if (isset($otherArray[$_GET['edition']])) {
$dir="../assets/usa/";
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
if($filename != "." && $filename != ".." && is_dir($dir)){
$files[] = $filename;
}
}
function date_file_sort($a, $b) {
// Extract the date from the filenames (assuming format: filename_m-d-y.ext)
preg_match('/(\d{1,2})-(\d{1,2})-(\d{4})/', $a, $dateA);
preg_match('/(\d{1,2})-(\d{1,2})-(\d{4})/', $b, $dateB);
if ($dateA && $dateB) {
// Convert to timestamps for comparison
$timeA = strtotime("{$dateA[3]}-{$dateA[1]}-{$dateA[2]}");
$timeB = strtotime("{$dateB[3]}-{$dateB[1]}-{$dateB[2]}");
return $timeB - $timeA; // Reverse sorting (newest first)
}
return 0;
}
usort($files, 'date_file_sort');
}
else
{
redirect('index.php');
}
//arhives source end
//get map information start
$checkfile = '../assets/'.$_GET['edition'].'/'.$_GET['dt'].'/assets/'.$_GET['id'].'.txt';
if(file_exists($checkfile)) {
$mapfile=('../assets/'.$_GET['edition'].'/'.$_GET['dt'].'/assets/'.$_GET['id'].'.txt');//we include it
$fhandle = fopen($mapfile,'r');
$mapinfo = fread($fhandle,filesize($mapfile));
fclose($fhandle);
}
//get map information end
?>
echo $newspaper; echo $_GET['edition']; ?>
| |
|
|
| |
|
Wednesday, May 6th, 2026 |
|
|
Archives:
| | |