von !.x.Jack.x.! am 27.08.2007, 07:53
- Code: Alles auswählen
<?php
// Ein schönes Script für die Newsvorschau, aber auch nicht feddisch :-P
//function parse_template( $vars, $template ) {
// eval( 'print( "'.addcslashes( $template, '"\\' ).'");' );
//}
include_once( "inc/bbc.php" );
$archiv = 0; $lines = array();
$nres = mysql_query( "SELECT * FROM ".$prefix."news WHERE archiv = '0' ORDER BY date DESC LIMIT 3", $link );
while( $news = mysql_fetch_assoc( $nres ) ) {
if( $substr ) $news['text'] = nl2br( htmlspecialchars(substr(rmbbc( $news['text'] ),0, $substr)))."...";
else $news['text'] = bbcode( nl2br( htmlspecialchars( $news['text'] )));
$news['date'] = date( $options['timeform'], $news['date'] );
$lines[] = '<br><img src="http://habbo-zone.de/uploads/news/n$vars[id].png" align="left" alt="" width="50" height="50" border="0">'.$news['thema'].'<br>
<a href="index.php?panel='.$news['panel'].'">
['.$news['date'].'] Read More >></a>';
}
echo implode( "<br><br>", $lines );
?>
Zuletzt geändert von !.x.Jack.x.! am 28.08.2007, 19:53, insgesamt 1-mal geändert.