<?php
header("Access-Control-Allow-Origin: *");
include_once ('includes/variables.php');

	DEFINE ('DB_HOST', $host);
	DEFINE ('DB_USER', $user);	 
	DEFINE ('DB_PASSWORD', $pass);
	DEFINE ('DB_NAME', $database);
	 
	$mysqli = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL');
	@mysql_select_db (DB_NAME) OR die ('Could not select the database');
	mysql_query("SET SESSION sql_mode=''");
 	//$response = array("error" => FALSE);
 	//mysql_query("SET NAMES 'utf8'"); 
	
	 /**
     * Get user by Mobile and password
     */
	//CONCAT('#',LPAD(CONV(ROUND(RAND()*16777215),10,16),6,0)) AS color,
	
	$query="SELECT * FROM `about_us`
	WHERE `status` = '1' LIMIT 0,1";
	
	$resouter = mysql_query($query);

    	//$response = array();
		$total_records = mysql_num_rows($resouter);
		$i=0;
    if($total_records >= 1){

      while ($results = mysql_fetch_array($resouter, MYSQL_ASSOC)){
		$response['about'][]= $results;
	  }
	  echo json_encode($response);
	  }
	  else
	  {
		$response[] = array();
		echo json_encode($response, JSON_FORCE_OBJECT);
	  }
	


	
     
    // echo $val= str_replace('\\/', '/', json_encode($set)); 	 
	 
  
	 
?>