Exemplo n.º 1
0
		$result = $db_object->get_rsltset($select);
		$pattern = "/<{record_loopstart}>(.*?)<{record_loopend}>/s";
		preg_match($pattern,$file,$arr);
		$match = $arr[1];

		for($i=0;$i<count($result);$i++)
		{
			$uid = $result[$i]['user_id'];
			$u_name = $common->name_display($db_object,$uid);
			$date = $result[$i]['s_date'];
			$str .= preg_replace("/<{(.*?)}>/e","$$1",$match);
		}

		if($str=="")			
			{

				$file = preg_replace("/<{ifnoloop_start}>(.*?)<{ifnoloop_end}>/s","$err[cEmptyrecords]",$file);
			}
		$file = preg_replace($pattern,$str,$file);

		$file = preg_replace("/<{(.*?)}>/e","",$file);
		$file = $common->direct_replace($db_object,$file,$val);
		echo $file;
	}//end function
}//end class
	$ob = new employee;
	$ob->view_form($db_object,$common,$user_id,$default,$error_msg,$gbl_date_format);
include_once("footer.php");
?>