<?php 
require "../commonincludefiles.php";
	
	$qry = "SELECT news_id,news_title FROM com_news where news_active='1' order by news_title ";	
	$result=dbQuery($qry);
	$total  = dbRows($result);
	$i=0;
	$sectionData = array("count" => $total, "rows" => array());
	if	(dbRows($result) > 0) 
	{
			$temparray = array();
			while($row = dbArray($result)){
				$temparray["news_id"]  = $row["news_id"];
				$temparray["news_title"]   = $row["news_title"];
				$sectionData["rows"][$i] = $temparray;   
				$i++;
			}	
				   										
	}				   		 
 	echo json_encode($sectionData);	
?>