Subversion Repositories SvarDOS

Rev

Rev 1231 | Rev 1242 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1231 Rev 1233
Line 502... Line 502...
502
}
502
}
503
 
503
 
504
// wyświetl archiwum
504
// wyświetl archiwum
505
if ($archiveyear > 0) {
505
if ($archiveyear > 0) {
506
  echo '<div class="minibb-toolbar" id="title"><a href="' . selfurl() . '">' . $STR[$LANG]['backtocur'] . '</a></div>' . "\n";
506
  echo '<div class="minibb-toolbar" id="title"><a href="' . selfurl() . '">' . $STR[$LANG]['backtocur'] . '</a></div>' . "\n";
507
  echo "<h1>" . $STR[$LANG]['archives'] . " {$archiveyear}</h1>\n";
507
  echo '<h2 class="minibb-threadtitle">' . $STR[$LANG]['archives'] . " {$archiveyear}</h2>\n";
508
  $threads = scandir($DATADIR . 'threads/', SCANDIR_SORT_ASCENDING);
508
  $threads = scandir($DATADIR . 'threads/', SCANDIR_SORT_ASCENDING);
509
  foreach ($threads as $t) {
509
  foreach ($threads as $t) {
510
    if (!preg_match('/^[0-9][0-9]*$/', $t)) continue; // skip anything that is not a thread id
510
    if (!preg_match('/^[0-9][0-9]*$/', $t)) continue; // skip anything that is not a thread id
511
    if (intval(gmdate('Y', $t)) != $archiveyear) continue; // skip threads out of the targeted year
511
    if (intval(gmdate('Y', $t)) != $archiveyear) continue; // skip threads out of the targeted year
512
    $title = file_get_contents($DATADIR . 'threads/' . $t . '/title.txt');
512
    $title = file_get_contents($DATADIR . 'threads/' . $t . '/title.txt');