<?php
$MXTOTREC = 0;
$MXPGINFO["PK"] = "pageID";
$MXPGINFO["TBL"] = "page";
function getImages($pageID){
	global $DB;
	$sql = "SELECT Ph.* FROM ".$DB->pre."page AS P LEFT JOIN ".$DB->pre."page_photo AS Ph on P.pageID = Ph.pageID WHERE  P.status=1 AND P.pageID='".$pageID."'";
	//echo $sql;
	$data = $DB->dbRows($sql);
	$str = "";
	foreach($data as $v){
		$str .= '<li><img src="'.SITEURL.'/uploads/page/'.$v['pageImg'].'"/></li>';
	}
	return $str;
}
function getLeftData($pageID){
	global $DB;
	$sql = 'SELECT * FROM '.$DB->pre.'page WHERE status="1" AND pageID="'.$pageID.'"';
	$data = $DB->dbRow($sql);
	return $data['synopsis'];
}

function getData($PageID){
	global $DB;
	$sql = "SELECT * FROM ".$DB->pre."page WHERE  status=1 AND pageID='".$PageID."'";
	
	$data = $DB->dbRow($sql);
	$str = "";
	$img = '';
	
		$str .= '<h1 id="mainhedding2">'.$data['pageTitle'].'</h1>
                                <h2 id="subhedding2">'.$data['subTitle'].'</h2>
                                <p id="text">'.($data['pageContent']).'</p>';
						
	if($data['pageImage'])
	$str .= '<img src="'.SITEURL.'/uploads/page/'.$data['pageImage'].'"/ style="width:300px;height:200px;" alt="">';
	return ($str);
}


?>