'; while($NEWS = mysql_fetch_assoc($result)){ foreach($NEWS AS $k => $v) $NEWSFORMATTED[$k] = htmlspecialchars($v); $i++; $NEWSFORMATTED['url'] = "{$CONFIG['domainPathToAppRoot']}news.php?id={$NEWS['id']}&src=property\""; $NEWSFORMATTED['date'] = date('M Y', $NEWS['articleDateU']); $NEWSFORMATTED['dateMonth'] = date('M', $NEWS['articleDateU']); $NEWSFORMATTED['dateYear'] = date('Y', $NEWS['articleDateU']); $teaserMaxLength = 280; $teaserFull = trim(strip_tags(html_entity_decode($NEWS['content']))); $teaserLength = strlen($teaserFull); if($teaserLength > $teaserMaxLength) $teaserLength = $teaserMaxLength; if($teaserLength > 0) $teaser = '

' . htmlentities(SDIGtrimToWord($teaserFull, $teaserLength)) . ' More »

'; else $teaser = ''; if($_REQUEST['mode'] == 'news') $TEMPLATE['content'] .= '
' . $NEWSFORMATTED['title'] . '

' . $NEWSFORMATTED['title'] . '

' . $teaser . '
'; if($i <= 3) $TEMPLATE['news'] .= '
  • ' . $NEWSFORMATTED['title'] . '

    ' . $NEWSFORMATTED['date'] . '

    ' . $NEWSFORMATTED['name'] . '
  • '; elseif($_REQUEST['mode'] != 'news') break; } if($_REQUEST['mode'] == 'news') $TEMPLATE['content'] .= '