$viewyear = getrequestvar('viewyear', '');
$viewmonth = getrequestvar('viewmonth', '');
$files = array();
$files = listFiles('./', 'txt');
#print_r ($files);
$entries = array();
$months = array('Jan'=>1,'Feb'=>2,'Mar'=>3,'Apr'=>4,'May'=>5,'Jun'=>6,'Jul'=>7,'Aug'=>8,'Sep'=>9,'Oct'=>10,'Nov'=>11,'Dec'=>12);
foreach ($files as $x) {
$date = substr($x, 0, strlen($x)-7);
# print urldecode($date) . ':';
list ($day, $mon, $date, $time, $zone, $year) = split(" +", urldecode($date));
if ($date < 10) { $date = "0".$date; }
# print $x . ':' . $year.','.$months[$mon].','.$date.','.$time .'
';
if ($year == $viewyear && $months[$mon] == $viewmonth) {
$entries[$year.$months[$mon].$date.$time] = $x;
}
}
krsort($entries);
foreach ($entries as $x) {
$name = substr($x, 0, strlen($x)-4);
print '
';
print '' . urldecode($name) . '
';
readfile($x);
print '
Semi-permalink';
print '
';
}
?>