<?php 
/**  * Creates fault detail data as JSON  */    
include_once 'db_functions.php';
$uid = $_REQUEST["eid"];
$db = new DB_Functions();     
//// get url
$url = $db->getAttachmentUrl();
//////
$users = $db->getUserDetails($uid);     
$a = array();     
$b = array();    
if ($users != false){         
	$row = mysql_fetch_array($users);
	$res = $db->getUserType($row["utype"]); 
	$usertype = mysql_fetch_array($res);                   
	$b["userId"] = $row["username"];
	$b["userPwd"] = $row["password"];
	$b["userName"] = $row["name"];
	$b["userType"] = $usertype["typename"];
	$b["userPhone"] = $row["phone"];
	$b["userEmail"] = $row["emailid"];
	$b["userCity"] = $row["city"];
	$b["userState"] = $row["state"];
	$b["userProfileImg"] = str_replace("API/","",$url)."".$row["profile_img_path"];
       
	array_push($a,$b);         
	
	echo json_encode($a);     
} 
?>