mirror of https://github.com/BOINC/boinc.git
28 lines
547 B
PHP
28 lines
547 B
PHP
<?php
|
|
|
|
function news_item($date, $text, $title) {
|
|
echo '<h3>'.$date.' '.$title.'</h3>
|
|
<p>'.$text.'</p>
|
|
';
|
|
}
|
|
|
|
function show_news($items, $n) {
|
|
if ($n > count($items)) {
|
|
$n = count($items);
|
|
}
|
|
for ($i=0; $i<$n; $i++) {
|
|
news_item($items[$i][0], $items[$i][1], $items[$i][2]);
|
|
}
|
|
}
|
|
|
|
function show_old_news($items, $n) {
|
|
$tot = count($items);
|
|
for ($i=$n; $i<count($items); $i++) {
|
|
$j = $tot-$i;
|
|
echo "<a name=$j></a>\n";
|
|
news_item($items[$i][0], $items[$i][1]);
|
|
}
|
|
}
|
|
|
|
?>
|