$sql_result = $db->query( $sql_select );
while ( $row = $db->get_row( $sql_result ) ) {
$news_found = TRUE;
$attachments[] = $row['id'];
$row['date'] = strtotime( $row['date'] );
if( $config['allow_banner'] AND count( $banners ) ) {
foreach ( $banners as $name => $value ) {
$tpl->copy_template = str_replace( "{banner_" . $name . "}", $value, $tpl->copy_template );
if ( $value ) {
$tpl->copy_template = str_replace ( "[banner_" . $name . "]", "", $tpl->copy_template );
$tpl->copy_template = str_replace ( "[/banner_" . $name . "]", "", $tpl->copy_template );
}
}
}