<?php 
require "../commonincludefiles.php";

 	if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"]))
    {	
 
	$qry = "select user_id, user_name from lms_usermaster ";	
	$result=dbQuery($qry);
	
	$total = dbRows($result);
	$i=0;
	$distictData = array("count" => $total, "rows" => array());
	if	(dbRows($result) > 0) 
		   {
				$temparray = array();
				while($row = dbArray($result)){
					$temparray["user_id"]  = $row["user_id"];
					$temparray["user_name"]  = $row["user_name"];
					
					$distictData["rows"][$i] = $temparray;   
				$i++;
			}										
	}				   		 
 	echo json_encode($distictData);	
	 

}
?>