Text Formatted Code
function phpblock_nextSeven()
{
global $_TABLES, $_CONF;
$result = DB_query("SELECT sid,title FROM {$_TABLES['stories']}
WHERE (draft_flag = 0) AND (date <= NOW()) AND (frontpage='1')"
. COM_getPermSQL ('AND') . " ORDER BY date desc LIMIT 10");
$nrows = DB_numRows($result);
if( $nrows > 0 ){
$string = '';
$seven = array();
for( $i = 0; $i < $nrows; $i++ ){
$A = DB_fetchArray( $result );
if ($i >= 3){
$string .= $seven . '<br>';
$seven[] = '<a href="' . COM_buildUrl( $_CONF['site_url']
. '/article.php?story=' . $A['sid'] ) . '">' . $A['title']
. '</a>';
}
}
if( !empty( $seven )){
$sevenlist = COM_makeList( $seven, 'list-next7-stories' );
}
}
return $sevenlist;
}
this returns the next 7 stories after the most recent 3.