Subversion Repositories SvarDOS

Rev

Rev 1999 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1999 Rev 2000
Line 519... Line 519...
519
}
519
}
520
 
520
 
521
 
521
 
522
function mateuszbb_tytulwatku($id) {
522
function mateuszbb_tytulwatku($id) {
523
  global $DATADIR;
523
  global $DATADIR;
524
  return file_get_contents($DATADIR . 'threads/' . $id . '/title.txt');
524
  return(trim(file_get_contents($DATADIR . 'threads/' . $id . '/title.txt')));
525
}
525
}
526
 
526
 
527
 
527
 
528
// returns an array of last n threads with most recent activity that had activity
528
// returns an array of last n threads with most recent activity that had activity
529
// in last maxinact days. returns false on error or empty set.
529
// in last maxinact days. returns false on error or empty set.
Line 701... Line 701...
701
  echo '<h2 class="minibb-threadtitle">' . $STR[$LANG]['archives'] . " {$archiveyear}</h2>\n";
701
  echo '<h2 class="minibb-threadtitle">' . $STR[$LANG]['archives'] . " {$archiveyear}</h2>\n";
702
  $threads = scandir($DATADIR . 'threads/', SCANDIR_SORT_ASCENDING);
702
  $threads = scandir($DATADIR . 'threads/', SCANDIR_SORT_ASCENDING);
703
  foreach ($threads as $t) {
703
  foreach ($threads as $t) {
704
    if (!preg_match('/^[0-9][0-9]*$/', $t)) continue; // skip anything that is not a thread id
704
    if (!preg_match('/^[0-9][0-9]*$/', $t)) continue; // skip anything that is not a thread id
705
    if (intval(gmdate('Y', $t)) != $archiveyear) continue; // skip threads out of the targeted year
705
    if (intval(gmdate('Y', $t)) != $archiveyear) continue; // skip threads out of the targeted year
706
    $title = file_get_contents($DATADIR . 'threads/' . $t . '/title.txt');
706
    $title = mateuszbb_tytulwatku($t);
707
    $link = $t;
707
    $link = $t;
708
    if (! $NICE_URLS) $link = selfurl("thread={$t}");
708
    if (! $NICE_URLS) $link = selfurl("thread={$t}");
709
    echo '<span style="font-family: monospace;">[' . gmdate("Y-m-d", $t) . "]</span> <a href=\"{$link}\">{$title}</a><br>\n";
709
    echo '<span style="font-family: monospace;">[' . gmdate("Y-m-d", $t) . "]</span> <a href=\"{$link}\">". htmlspecialchars($title) . "</a><br>\n";
710
  }
710
  }
711
  goto DONE;
711
  goto DONE;
712
}
712
}
713
 
713
 
714
// zobacz wątek
714
// zobacz wątek