<?php 
/**  * Creates Unsynced rows data as JSON  */    
include_once 'db_functions.php';     
$db = new DB_Functions(); 
$ei = $_REQUEST[eid]; 
$password=$_REQUEST[password];   

$users = $db->getIMEIDetails($ei);     
$a = array();     
$b = array();

 if(mysql_num_rows($users)>0){
  $row=mysql_fetch_array($users);
  $b["response"]=1;
  $b["from_loc"]=$row['from_location'];
  $b["to_loc"]=$row['to_location'];
  $b["owner_code"]=$row['owner_code'];
  $b["prod_code"]=$row['prod_code'];
  $b["doc_no"]=$row['doc_no'];
  $b["imei1"]=$row['imei1'];
  $b["imei2"]=$row['imei2'];
  $b["flag"]=$row['flag'];
 }
 else{
  $b["response"]=0;
 
 }
 
  
array_push($a,$b);
echo json_encode($a);    
?>