<?php  
	//session_start(); 
	include("../connect.php");

	// mobile password 
	
	
	
	date_default_timezone_set("Asia/Singapore");
	$mdate= date('Y/m/d H:i:s');
	$mdate2= date('Y-m-d H:i:s');
	$mdate1= date('d-m-Y');
	
	
	
	

				
				 $eve1 = "select * from res_company_master where companytype='Hotel'";
				
				 $re1 = mysqli_query($conn, $eve1);
				 if(mysqli_num_rows($re1) > 0)
				   {
						 while($rt1 = mysqli_fetch_assoc($re1))
						 {
							 
							 $hprefix = $rt1['companyprefix'];
							 if (strpos($hprefix, '-') === false) 
							 {
								$hprefix = $hprefix . '-';
							 }
							 $result="1";
							$posts[] = array('result'=> $result,'message'=> 'Success','hprefix'=>  $hprefix,);
						 }
						  
				  
		 
		$response['posts'] = $posts;
		echo stripslashes(json_encode( array('item' => $posts)));
		//echo stripslashes(json_encode( $posts));
				   }
				  
		
   
   else
   {
		$result="0";
		$msg="Invalid Error";
		
		$posts[] = array('result'=> $result,'message'=> $msg);
	
		$response['posts'] = $posts;
		echo stripslashes(json_encode( array('item' => $posts)));
   }
   
	mysqli_close($conn);
	
	
?>