[LinksOS CVS Commit]website/include news.php,NONE,1.1
Status: Inactive
Brought to you by:
terencevs
|
From: <ke...@us...> - 2002-12-27 19:40:03
|
Update of /cvsroot/linksos/website/include
In directory sc8-pr-cvs1:/tmp/cvs-serv10184/include
Added Files:
news.php
Log Message:
News class and display function.
--- NEW FILE: news.php ---
<?
class news {
function show($num_art) {
$news_result = mysql_query('SELECT UNIX_TIMESTAMP(linksos_news.date),linksos_news.title,linksos_news.body,linksos_people.uid,linksos_people.fullname FROM linksos_news,linksos_people WHERE linksos_news.poster = linksos_people.uid ORDER BY linksos_news.news_id DESC');
if (mysql_num_rows($news_result)) {
$art_step = 0;
while ( $article = mysql_fetch_row($news_result) ) {
if ($num_art) if ( $art_step == $num_art ) {
if (mysql_num_rows($news_result))
echo makelink('news', '', 'Older News');
break;
}
$art_step++;
echo '<table width="100%" style="background-repeat: repeat-x; font-family: Arial; margin: 0px 0px 10px 0px; font-size: 12px; padding: 0; border: 0" cellspacing="0" cellpadding="0"><tr><td valign="top" height="12" width="50%"><b>';
echo date('l j F Y', $article[0]);
echo ' by ' . $article[4];
echo '</b></td><td valign="top" style="font-weight: bold; color: #ff0000;">' . $article[1] . '</td></tr>' .
'<tr><td height="7" colspan="2" background="image/line_off5.png"></td></tr>' .
'<tr><td colspan="3">' . $article[2] . '</td></tr>' .
'</tr></table>';
}
}
}
}
?>
|