if ($myLatitude_raw != "") { $myLatitude = raw2lat_dez($myLatitude_raw); } } if (isset($_GET['latitude'])) { $myLatitude = $_GET['latitude']; if ($myLatitude == "") { exit; } } if (isset($_GET['time'])) { $myTime = $_GET['time']; } else { $date = date("Ymd"); $time = date("His.000"); $myTime = parse_date_time($date, $time); } if (isset($_GET['speed'])) { $mySpeed = $_GET['speed']; } else { $mySpeed = "0"; } if (isset($_GET['alt'])) { $myAltitude = $_GET['alt']; } else { $myAltitude = "0"; } if (isset($_GET['dir'])) { $myDirection = $_GET['dir']; } else { $myDirection = "0.0";
public function ajaxVerificareHoteluri(Request $request) { $array = []; foreach ($request->formData as $value) { $array[$value['name']] = $value['value']; } $hotel = Hoteluri::where('AidaID', $array['HotelID'])->first(); $DateRange = ['DateStart' => parse_date_time($array['DataStart'], 'Y-m-d'), 'DateEnd' => parse_date_time($array['DataEnd'], 'Y-m-d')]; $Config_Camere = []; $nrCamere = $array['Camere']; for ($i = 1; $i <= $nrCamere; $i++) { $Ocupare = []; if ($array['Copii_Cam' . $i] >= 1) { for ($j = 1; $j <= $array['Copii_Cam' . $i]; $j++) { array_push($Ocupare, ['AgeQualifyingCode' => 'c', 'Count' => 1, 'Age' => $array['varstaCopil' . $j . '_Cam' . $i]]); } array_unshift($Ocupare, ['AgeQualifyingCode' => 'a', 'Count' => $array['Adulti_Cam' . $i]]); } else { if ($array['Copii_Cam' . $i] == 0) { array_push($Ocupare, ['AgeQualifyingCode' => 'a', 'Count' => $array['Adulti_Cam' . $i]]); } } array_push($Config_Camere, ['IndexNumber' => $i, 'GuestsCount' => ['GuestCount' => $Ocupare]]); } $raspuns = Soap::AccSearchV2($hotel->Operator, $DateRange, $Config_Camere, $hotel->Name, $hotel->Stars, $hotel->City); $services = $raspuns->AccUnits->AccUnit->AccServices->AccService; //dd($services); return (string) view('frontend.ajax.raspuns-hoteluri-oferte')->with('services', $services)->with('data_sejur', $DateRange)->with('config_camere', $Config_Camere); }