<?php 
/**  * Creates fault detail data as JSON  */    
include_once 'db_functions.php';     
$db = new DB_Functions(); 
$ei = $_REQUEST['eid'];  
//// get url
$url = $db->getAttachmentUrl();  
///////////
$users = $db->getfeedback_data($ei);     
$a = array();     
$b = array();    
if ($users != false){         
	while ($row = mysql_fetch_array($users)){
		$b["id"] = $row["id"];
		$b["fb_type"] = $row["feedback_type"];
		$b["fb_subject"] = $row["feedback_subject"];
		$b["fb"] = $row["feedback"];
		$b["update_date"] = $row["update_date"];
		$b["address"] = $row["address"];
		if($row["image"]){
			$b["imgurl"] = $url."feedbackImages/".$row["image"];
		}else{
			$b["imgurl"] = null;
		}
		array_push($a,$b);         
	}   
	echo json_encode($a);     
} 
?>