Rhinestones News
'; $id = $row ["id"]; $image = $row ["image"]; $image_width = $row ["image_width"]; //if IMAGE is smaller then 200px wide then just use the original Image if ($image_width<200) {$imgDir=$imgDirOrig;} $image_caption = $row ["image_caption"]; $author = $row ["author"]; if ($author!="") {$author="by ".$author."";} if (strlen($row ["pdf"])>5) { $pdf_display = "
".$pdficon." ".nl2br($row ["pdf_display"])." |
"; } else {$pdf_display="";} $headline = "
".nl2br(stripslashes($row ["headline"]))."
\n"; if($row['url'] != ''){ $url = "".nl2br(stripslashes($row["url_caption"]))."
\n"; }else{ $url = ""; } $date = "".date('F j, Y', $row['dateUnix'])."
\n"; $body = "".nl2br(stripslashes($row ["body"]))."\n"; if (strlen($image)+0>5) {$image=$imgDir.$image;$image_caption = "".nl2br(stripslashes($image_caption))."";} else {$image=$blankImg;$image_caption="";} $imageHTML = "
\n | \n | \n |
".$image_caption." |
".$url.$pdf_display.$date.$author.$imageHTML.$body."
« Go Back |
|
At Wilson Farms, it's important to us to play an active role in making our community a better place to live. That's why each month we provide charitable organizations across New York State with the support they need to serve our communities.
";*/ echo ''.ucwords($section).'
'; //get Product Numbers from Db //return as Option Tags $dsn = array( 'phptype' => 'mysql', 'username' => $st_db_user, 'password' => $st_db_pass, 'hostspec' => $st_db_host, 'database' => $st_db_name ); $db =& DB::connect($dsn); if (PEAR::isError($db)) { die($db->getMessage()); } // Proceed with a query... $sql_query = "SELECT id, headline, UNIX_TIMESTAMP(date) as uDate FROM `".$st_db_newstable."` WHERE hide!=1 && section LIKE '%".mysql_escape_string($section)."%' ORDER BY `uDate` DESC "; //$sql_query = "SELECT id, headline, url_id, UNIX_TIMESTAMP(date) as uDate FROM `".$st_db_newstable."` WHERE hide!=1 && alertType LIKE '%transport%' ORDER BY `uDate` DESC "; $db_sql = "SELECT * FROM `".$st_db_prefsTable."` WHERE `id` =1"; $db_result = fn_dbQuery($db_sql); while($row=mysql_fetch_array($db_result)){ $headlinesPerPage=$row["headlinesPerPage"]; $maxCurrentWords=$row["maxCurrentWords"]; $maxCurrent=$row["maxCurrent"]; } $headlinesPerPage = ($headlinesPerPage>0)?$headlinesPerPage:10; require_once $_SERVER['DOCUMENT_ROOT'].'/news/Pager_Wrapper.php'; //this file $pagerOptions = array( 'mode' => 'Sliding', 'delta' => 5, 'perPage' => $headlinesPerPage, 'linkClass' => 'pager', 'curPageLinkClassName' => 'current_pager', 'urlVar' => 'page' ); $paged_data = Pager_Wrapper_DB($db, $sql_query, $pagerOptions); //fn_DUMP($paged_data); if(is_array($paged_data['data']) && count($paged_data['data'])>0 ){ echo "".$paged_data['links']."
";
foreach($paged_data['data'] as $item){
/*if( !empty($item['url_id']) ){
$articleHref = fn_url_lookup($item['url_id']);
}else{*/
$articleHref = $st_fileDirNews."?id=".$item['id'];
//}
echo "
".date("m/d/y", $item['uDate'])." - ".$item['headline']."
"; } echo "
";
}else{
echo "
No Articles Found for ".ucwords($section)."!
"; } } /* //echo "show all\n"; $db_sql = "SELECT * FROM `".$st_db_prefsTable."` WHERE `id` =1"; $db_result = fn_dbQuery($db_sql); while($row=mysql_fetch_array($db_result)){ $headlinesPerPage=$row["headlinesPerPage"]; $maxCurrentWords=$row["maxCurrentWords"]; $maxCurrent=$row["maxCurrent"]; } $db_sql = "SELECT * FROM `".$st_db_newstable."` WHERE ActionAlert='0' ORDER BY `date` DESC"; $db_result = fn_dbQuery($db_sql); $lvl=substr(basename($PHP_SELF),-5,1); // read which archive page we are on, by looking at the filename. //out put table start echo 'Rhinestones News
Archive (page ".$lvl.") | |
".$m."/".$d."/".$y2." | "; $articleHref= $currNewsDir.$st_fileDirNews."?id=$id"; $headline="|
".$prev.$next." | |