\n"; $content .= ""; $content .= "News » "; if ($year == '' && $month == '' && $day == '' && $title == '') $content .= 'Latest News'; else if ($year != '' && $month == '' && $day == '' && $title == '') $content .= $year; else if ($year != '' && $month != '' && $day == '' && $title == '') $content .= "$year » ".date('F',strtotime("2000-$month-01")); else if ($year != '' && $month != '' && $day != '' && $title == '') $content .= "$year » ".date('F',strtotime("$year/$month/$day"))." » ".date('l \t\h\e jS',strtotime("$year/$month/$day")); else if ($year != '' && $month != '' && $day != '' && $title != '') $content .= "$year » ".date('F',strtotime("$year/$month/$day"))." » ".date('l \t\h\e jS',strtotime("$year/$month/$day")).' » News Item'; $content .= "\n"; $content .= "\n"; $ad = ''; $ad = getAd('content-top'); if ($ad) $content .= '
'.$ad.'
'; $content .= "
\n"; // depending on what we have, do the correct sql statement if ($year == '' && $month == '' && $day == '' && $title == '') { // show the latest 15 $page_title = "Latest Breaking News"; //$sql = "SELECT date_display, title, body FROM news WHERE cid=$cid AND is_active=1 ORDER BY date_display DESC LIMIT 0,15"; $news = getNewsItems('', '', '', '', $article_limit, $pagination_page); $total = getNewsItemsCount(); $options = array('style'=>'background-color:#E6E3CA;text-align:right;font-size:12px;'); $content .= "
".pagination($pagination_page, $total, $article_limit, $dir, $options); while ($item = mysql_fetch_object($news)) { $date_url = date('Y/m/d',strtotime($item->date_display)); $content .= "
".$item->title."\n"; $content .= "
Posted on ".date('F j, Y', strtotime($item->date_display))." @ ".date('h:i a',strtotime($item->date_display))."
\n"; $content .= "
".$item->summary." read more »

\n\n"; } $content .= pagination($pagination_page, $total, $article_limit, $dir, $options); } else if ($year != '' && $month == '' && $day == '' && $title == '') { // show the news for the year - separated by the month $page_title = "$year News Archive"; //$sql = "SELECT date_display, title, body FROM news WHERE cid=$cid AND is_active=1 AND YEAR(date_display)='$year' ORDER BY date_display DESC"; $news = getNewsItems($year); $old_current_date = ''; while ($item = mysql_fetch_object($news)) { // get the current date $current_date = date('F Y', strtotime($item->date_display)); if ($current_date != $old_current_date) { $content .= "

".$current_date."

\n"; $old_current_date = $current_date; } $date_url = date('Y/m/d',strtotime($item->date_display)); $content .= "".$item->title."\n"; $content .= "

Posted on ".date('F j, Y', strtotime($item->date_display))." @ ".date('h:i a',strtotime($item->date_display))."

\n"; // if body ends with   or
or
or
remove it $content .= "
".$item->body."
\n\n"; } } else if ($year != '' && $month != '' && $day == '' && $title == '') { // show the news for the month, separated by day $page_title = date('F Y', strtotime("$year/$month/01"))." News Archive"; //$sql = "SELECT date_display, title, body FROM news WHERE cid=$cid AND is_active=1 AND YEAR(date_display)='$year' AND MONTH(date_display)='$month' ORDER BY date_display DESC LIMIT 0,15"; $news = getNewsItems($year,$month); $old_current_date = ''; while ($item = mysql_fetch_object($news)) { // get the current date $current_date = date('F j, Y', strtotime($item->date_display)); if ($current_date != $old_current_date) { $content .= "

$current_date

\n"; $old_current_date = $current_date; } $date_url = date('Y/m/d',strtotime($item->date_display)); $content .= "

".$item->title."

\n"; $content .= "

Posted on ".date('F j, Y', strtotime($item->date_display))." @ ".date('h:i a',strtotime($item->date_display))."

\n"; // if body ends with   or
or
or
remove it $content .= "
".$item->body."
\n\n"; } } else if ($year != '' && $month != '' && $day != '' && $title == '') { // show the news for that year/month/day - no separator $page_title = date('F j, Y', strtotime("$year/$month/$day"))." News Archive"; //$sql = "SELECT date_display, title, body FROM news WHERE cid=$cid AND is_active=1 AND YEAR(date_display)='$year' AND MONTH(date_display)='$month' AND DAY(date_display)='$day' ORDER BY date_display DESC LIMIT 0,15"; $news = getNewsItems($year,$month,$day); while ($item = mysql_fetch_object($news)) { $date_url = date('Y/m/d',strtotime($item->date_display)); $content .= "

".$item->title."

\n"; $content .= "

Posted on ".date('F j, Y', strtotime($item->date_display))." @ ".date('h:i a',strtotime($item->date_display))."

\n"; // if body ends with   or
or
or
remove it $content .= "
".$item->body."
\n\n"; } } else if ($year != '' && $month != '' && $day != '' && $title != '') { // show the specific news story $news = getNewsItems($year,$month,$day,$title); while ($item = mysql_fetch_object($news)) { $page_title = $item->title; $meta_description = $item->summary; $meta_keywords = getKeywords('news', $item->nid); $content .= "

".shareThis()."
".$item->title."

\n"; $content .= "

Posted on ".date('F j, Y', strtotime($item->date_display))." @ ".date('h:i a',strtotime($item->date_display))."

\n"; // if body ends with   or
or
or
remove it $content .= "
".$item->body."
\n\n"; } } $content .= "
\n"; include($_SERVER['DOCUMENT_ROOT'].'/includes/php/header.php'); echo $content; include($_SERVER['DOCUMENT_ROOT'].'/includes/php/footer.php'); ?>