| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/views/scripts/leaddetail/ |
Upload File : |
<?php
$sourceCity = $this->sourceCity;
$customerId = $this->customerId;
$plantype = $this->planType;
$leadDetail = $this->leadDetail;
$leadID = $this->leadID;
$tpintsysID = $this->tpintsysID;
$flightCabinClass = $leadDetail['FlightCabinClass'] ? $leadDetail['FlightCabinClass'] : '';
$sourceAirportCode = $leadDetail['SourceAirportCode'] ? preg_replace('/\s+/', '', $leadDetail['SourceAirportCode']) : '';
$destinationAirportCode = $leadDetail['DestAirportCode'] ? preg_replace('/\s+/', '', $leadDetail['DestAirportCode']) : '';
$AdultPax = $leadDetail['AdultPax'] ? preg_replace('/\s+/', '', $leadDetail['AdultPax']) : '';
$ChildPax = $leadDetail['ChildPax'] ? preg_replace('/\s+/', '', $leadDetail['ChildPax']) : '';
$InfentPax = $leadDetail['InfentPax'] ? preg_replace('/\s+/', '', $leadDetail['InfentPax']) : '';
$Departuredate = $leadDetail['Departuredate'] ? $leadDetail['Departuredate'] : '';
$travelreturndate = $leadDetail['returnDate'] ? $leadDetail['returnDate'] : '';
if($travelreturndate){
$return_date = $travelreturndate->format('d-M-y');
}
?>
<div class="col-md-12 no-padding" style="display:block; margin-top:15px;" id="modsrchdetail">
<div class="alert alert-danger" style="display:none">
<span id="error-message-box"></span>
</div>
<form name="frmSearchFlightSearch" id="frmSearchFlightSearch" method="POST" action="/flight/get-search-result">
<input type = "hidden" name = "leadID" id = "leadID" value = "<?php echo $leadID;?>">
<input type = "hidden" name = "customerID" id = "customerID" value = "<?php echo $customerId;?>">
<input type = "hidden" name = "planType" id = "planType" value = <?php echo $plantype;?>>
<input type = "hidden" name = "tpintsysID" id = "tpintsysID" value = "<?php echo $tpintsysID;?>">
<input type = "hidden" name = "is_return_date" id = "is_return_date" value = "<?php echo $return_date;?>">
<input type="hidden" name="flightSearchType" id="flightSearchType" value="1" />
<div class="col-md-12 leadeBorder alert" style="margin-bottom:0;">
<label class="radio inlinebl oneway" id="onWay"><input class="icheck-red oneway" type="radio" name="flightway" id="oneway" value="option5" <?php if(isset($return_date) && $return_date == '01/01/1900') { ?> checked="checked" <?php } ?>> <strong>One Way</strong></label>
<label class="radio inlinebl roundtrip" id="roundTrip"><input class="icheck-red roundtrip" type="radio" name="flightway" id="roundtrip" value="option6" <?php if(isset($return_date) && $return_date != '01/01/1900') { ?> checked="checked" <?php } ?>> <strong>Round Trip</strong></label>
<label class="radio inlinebl multicity" id="multiCity" onclick="alert('Work In Progress...')"><input class="icheck-red" type="radio" name="flightway" value="option5"> <strong>Multi City</strong></label>
</div>
<?php $onewayTrip="none";$twowayTrip="none"; if(isset($return_date) && $return_date == '01/01/1900'){ $onewayTrip="block"; } else{ $twowayTrip="block"; }?>
<div class="col-md-12 no-padding leadeBorder" style="padding-top:10px !important; padding-bottom:10px !important; display:<?php echo $onewayTrip; ?>" id="onWay-tab">
<div class="col-md-6">
<div class="form-group">
<label><strong>From</strong></label>
<select id="oneway_from" name="oneway_from" class="demo-default select-country oneway_from" placeholder="Select Source City..">
<option value=""></option>
<?php
//$sourceCityAirportCode = isset($sessionFlightSearchParams->params['sourceCityAirportCode']) ? $sessionFlightSearchParams->params['sourceCityAirportCode'] : '';
if(!empty($sourceCity) ) {
foreach($sourceCity as $city) {?>
<option value="<?php echo $city['AirportCode']; ?>" <?php if($city['AirportCode'] == $sourceAirportCode) { ?>selected = "selected" <?php } ?>><?php echo $city['AirportTitle'] .', '. $city['CityName'] ; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><strong>To</strong></label>
<select id="oneway_to" name="oneway_to" class="demo-default select-country oneway_to" placeholder="Select Destination City...">
<option value=""></option>
<?php
//$destinationCityAirportCode = isset($sessionFlightSearchParams->params['destinationCityAirportCode']) ? $sessionFlightSearchParams->params['destinationCityAirportCode'] : '' ;
if(!empty($sourceCity) ) {
foreach($sourceCity as $city) {?>
<option value="<?php echo $city['AirportCode']; ?>" <?php if($city['AirportCode'] == $destinationAirportCode) { ?> selected = "selected" <?php } ?>><?php echo $city['AirportTitle'] .', '. $city['CityName'] ; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><strong>Departure Date</strong></label>
<div class="input-group ls-group-input">
<input class="form-control " type="text" id="oneway_departure_date" name="oneway_departure_date" value = "<?php if($Departuredate) { echo $Departuredate->format('d-M-y'); }?>" style="width: 412px;" />
</div>
<div class="clear"></div></div>
</div>
<div class="col-md-6">
<div class="form-group" style="width:32%; display:inline-table;">
<label class="small">Adults <span class="graytxt small">(+12 YRS)</span></label>
<select id="oneway_adults" name="oneway_adults" class="demo-default select-country" placeholder="Select">
<?php
for($i = 1 ; $i <= FLIGHT_PASSENGERS_COUNT ; $i++ ) { ?>
<option value="<?php echo $i; ?>"<?php if($i == $AdultPax){?> selected = "selected" <?php } ?> ><?php echo $i; ?></option>
<?php }
?>
</select>
</div>
<div class="form-group" style="width:32%; display:inline-table;">
<label class="small">Child <span class="graytxt small">(2-11 YRS)</span></label>
<select id="oneway_child" name="oneway_child" class="demo-default select-country" placeholder="Select">
<?php
for($i = 0 ; $i <= FLIGHT_PASSENGERS_COUNT ; $i++ ) { ?>
<option value="<?php echo $i; ?>" <?php if($i == $ChildPax) {?> selected = "selected" <?php } ?> ><?php echo $i; ?></option>
<?php }
?>
</select>
</div>
<div class="form-group" style="width:32%; display:inline-table;">
<label class="small">Infant <span class="graytxt small">(0-2 YRS)</span></label>
<select id="oneway_infant" name="oneway_infant" class="demo-default select-country" placeholder="Select">
<?php
for($i = 0 ; $i <= FLIGHT_PASSENGERS_COUNT ; $i++ ) { ?>
<option value="<?php echo $i; ?>" <?php if($i == $InfentPax) {?> selected = "selected" <?php } ?>><?php echo $i; ?></option>
<?php }
?>
</select>
</div>
</div>
<div class="clear"></div>
<div class="col-md-6">
<?php
$arrFlightClass = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getFlightClasses();
?>
<div class="form-group" style="width:100%; display:inline-table;">
<label><strong>Class</strong></label>
<select id="oneway_class" name="oneway_class" class="demo-default select-country" placeholder="Select">
<?php
while( list($key, $value) = each($arrFlightClass) ) { ?>
<option value="<?php echo $key; ?>" <?php if($key == $flightCabinClass) {?> selected = "selected" <?php } ?>><?php echo $value; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="col-md-12">
<div class="ls-group-input">
<a href="javascript:void(0);" id="one-way-search-flight" class="btn btn btn-warning btn-sm ladda-button pull-right" onclick="searchFlights('oneway')">
<span class="ladda-label"> Search Flights</span></a>
<img id="one-way-search-flight-loader" style="display:none" src="<?php echo $this->baseUrl('public/assets/images/loader.gif'); ?>">
</div>
</div>
</div>
<!-- for round trip// -->
<div class="col-md-12 no-padding leadeBorder" style="padding-top:10px !important; padding-bottom:10px !important; display:<?php echo $twowayTrip; ?>;" id="onWay-tab1">
<div class="col-md-6">
<div class="form-group">
<label><strong>From</strong></label>
<select id="twoway_from" name="twoway_from" class="demo-default select-country twoway_from">
<option value=""></option>
<?php
//$sourceCityAirportCode = isset($sessionFlightSearchParams->params['sourceCityAirportCode']) ? $sessionFlightSearchParams->params['sourceCityAirportCode'] : '';
if(!empty($sourceCity) ) {
foreach($sourceCity as $city) {?>
<option value="<?php echo $city['AirportCode']; ?>" <?php if($city['AirportCode'] == $sourceAirportCode) { ?>selected = "selected" <?php } ?>><?php echo $city['AirportTitle'] .', '. $city['CityName'] ; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><strong>To</strong></label>
<select id="twoway_to" name="twoway_to" class="demo-default select-country twoway_to">
<option value=""></option>
<?php
//$sourceCityAirportCode = isset($sessionFlightSearchParams->params['sourceCityAirportCode']) ? $sessionFlightSearchParams->params['sourceCityAirportCode'] : '';
if(!empty($sourceCity) ) {
foreach($sourceCity as $city) {?>
<option value="<?php echo $city['AirportCode']; ?>" <?php if($city['AirportCode'] == $destinationAirportCode) { ?> selected = "selected" <?php } ?>><?php echo $city['AirportTitle'] .', '. $city['CityName'] ; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><strong>Departure Date</strong></label>
<div class="input-group ls-group-input">
<input class="form-control datePickerOnly" type="text" id="twoway_departure_date" name="twoway_departure_date" value = "<?php if($Departuredate) { echo $Departuredate->format('d-M-y'); }?>" />
<span class="input-group-addon dateTimePickerCustom1"><i class="fa fa-calendar"></i></span>
</div>
<div class="clear"></div></div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><strong>Return Date</strong></label>
<div class="input-group ls-group-input">
<input class="form-control datePickerOnly" type="text" id="twoway_return_date" name="twoway_return_date" value="<?php if($travelreturndate) { echo $travelreturndate->format('d-M-y'); }?>" />
<span class="input-group-addon dateTimePickerCustom1"><i class="fa fa-calendar"></i></span>
</div>
<div class="clear"></div></div>
</div>
<div class="col-md-6">
<div class="form-group" style="width:32%; display:inline-table;">
<label class="small">Adults <span class="graytxt small">(+12 YRS)</span></label>
<select id="twoway_adults" name="twoway_adults" class="demo-default select-country" placeholder="Select">
<?php
for($i = 1 ; $i <= FLIGHT_PASSENGERS_COUNT ; $i++ ) { ?>
<option value="<?php echo $i; ?>" <?php if($i == $AdultPax){?> selected = "selected" <?php } ?>><?php echo $i; ?></option>
<?php }
?>
</select>
</div>
<div class="form-group" style="width:32%; display:inline-table;">
<label class="small">Child <span class="graytxt small">(2-11 YRS)</span></label>
<select id="twoway_child" name="twoway_child" class="demo-default select-country" placeholder="Select">
<?php
for($i = 0 ; $i <= FLIGHT_PASSENGERS_COUNT ; $i++ ) { ?>
<option value="<?php echo $i; ?> " <?php if($i == $ChildPax){?> selected = "selected" <?php } ?>><?php echo $i; ?></option>
<?php }
?>
</select>
</div>
<div class="form-group" style="width:32%; display:inline-table;">
<label class="small">Infant <span class="graytxt small">(0-2 YRS)</span></label>
<select id="twoway_infant" name="twoway_infant" class="demo-default select-country" placeholder="Select">
<?php
for($i = 0 ; $i <= FLIGHT_PASSENGERS_COUNT ; $i++ ) { ?>
<option value="<?php echo $i; ?>" <?php if($i == $InfentPax){?> selected = "selected" <?php } ?>><?php echo $i; ?></option>
<?php }
?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group" style="width:100%; display:inline-table;">
<label><strong>Class</strong></label>
<?php
$arrFlightClass = Zend_Controller_Action_HelperBroker::getStaticHelper('Flight')->getFlightClasses();
?>
<select id="twoway_class" name="twoway_class" class="demo-default select-country" placeholder="Select">
<?php
while( list($key, $value) = each($arrFlightClass) ) { ?>
<option value="<?php echo $key; ?>" <?php if($key == $flightCabinClass){?> selected = "selected" <?php } ?>><?php echo $value; ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="col-md-12">
<div class="ls-group-input">
<a href="javascript:void(0);" id="two-way-search-flight" class="btn btn btn-warning btn-sm ladda-button pull-right" onclick="searchFlights('twoway')"><span class="ladda-label"> Search Flights</span></a>
<img id="two-way-search-flight-loader" style="display:none" src="<?php echo $this->baseUrl('public/assets/images/loader.gif'); ?>">
</div>
</div>
</div>
</form>
<div class="panel-body" id="onWay-tab2" style="display:none;">
</div>
</div>
<script type="text/javascript">
$(".hotelshow").click(function(){
$("#modsrchdetail").hide();
$("#modhoteldetail").show();
$("#modhotelflightdetail").hide();
$("#modpackagedetail").hide();
});
$(document).ready(function() {
$("#oneway_departure_date").datetimepicker({
format:'d/m/Y',
timepicker: false,
minDate: 0
});
$("#twoway_departure_date").datetimepicker({
format:'d/m/Y',
timepicker: false,
minDate: 0
});
$("#twoway_return_date").datetimepicker({
format:'d/m/Y',
timepicker: false,
minDate: 0
});
var planType = $("#planType").val();
if(planType == 1){
$("#modsrchdetail").show();
}
$(document).ready(function(){
$('.iCheck-helper').click(function () {
var parent = $(this).parent().parent();
if(parent.hasClass('oneway')){
$('.oneway').trigger('click');
}
if(parent.hasClass('roundtrip')){
$('.roundtrip').trigger('click');
}
if(parent.hasClass('multicity')){
$('.multicity').trigger('click');
}
});
});
$(document).ready(function(){
$('.iCheck-helper').click(function () {
var parent = $(this).parent().parent();
if(parent.hasClass('flightshow')){
$('.flightshow').trigger('click');
}
if(parent.hasClass('hotelshow')){
$('.hotelshow').trigger('click');
}
if(parent.hasClass('hotelflightshow')){
$('.hotelflightshow').trigger('click');
}
if(parent.hasClass('packageshow')){
$('.packageshow').trigger('click');
}
});
});
});
function searchFlights(path) {
var from = '';
var to = '';
var departure_dates = '';
var adults = '';
var child = '';
var infant = '';
var flight_class = '';
var return_dates = '';
// var from = [];
// var to = [];
// var oneway_origin_text = [];
// var oneway_destination_text = [];
var from = '';
var to = '';
var oneway_origin_text = '';
var oneway_destination_text = '';
var page = '';
var is_visa = $("#checkRed1").prop("checked");
var is_forex = $("#checkRed2").prop("checked");
var is_insurance = $("#checkRed3").prop("checked");
if(is_visa == true){
var visaval = '1';
}
else{
var visaval = '0';
}
if(is_forex == true){
var forexval = '1';
}
else{
var forexval = '0';
}
if(is_insurance == true){
var insureval = '1';
}
else {
var insureval = '0';
}
var addrequirement = visaval+forexval+insureval;
if( path == 'oneway') {
from = $('select[name="oneway_from"]').val();
to = $('select[name="oneway_to"]').val();
oneway_origin_text = $('select[name="oneway_from"]').val();
oneway_destination_text = $('select[name="oneway_to"]').val();
departure_dates = $('input[name="oneway_departure_date"]').val();
adults = $('select[name="oneway_adults"]').val();
child = $('select[name="oneway_child"]').val();
infant = $('select[name="oneway_infant"]').val();
flight_class = $('select[name="oneway_class"]').val();
return_dates = '';
route = '1';
} else {
from = $('select[name="twoway_from"]').val();
to = $('select[name="twoway_to"]').val();
oneway_origin_text = $('select[name="twoway_from"]').val();
oneway_destination_text = $('select[name="twoway_to"]').val();
departure_dates = $('input[name="twoway_departure_date"]').val();
adults = $('select[name="twoway_adults"]').val();
child = $('select[name="twoway_child"]').val();
infant = $('select[name="twoway_infant"]').val();
flight_class = $('select[name="twoway_class"]').val();
return_dates = $('input[name="twoway_return_date"]').val();
route = '2';
}
var customerID = $("#customerID").val();
var tpintsysID = $("#tpintsysID").val();
var leadID = $("#leadID").val();
$.ajax({
url : '/customer/savequery',
data : { route : route, from : from, to : to, departure_dates : departure_dates, return_dates : return_dates,
adults : adults, child : child, infant : infant, flight_class : flight_class,
oneway_origin_text : oneway_origin_text, oneway_destination_text : oneway_destination_text,customerID : customerID , addrequirement:addrequirement , leadID:leadID , tpintsysID:tpintsysID
},
type : 'POST',
dataType : 'json',
error : function() {},
beforeSend : function() {
},
success : function ( response ) {
$.ajax({
url : '/flight/get-search-result',
data : { route : route, from : from, to : to, departure_dates : departure_dates, return_dates : return_dates,
adults : adults, child : child, infant : infant, flight_class : flight_class,
oneway_origin_text : oneway_origin_text, oneway_destination_text : oneway_destination_text
},
type : 'POST',
dataType : 'json',
error : function() {},
beforeSend : function() {
$(".alert-danger").css("display","none");
if( route == 'oneway') {
$("#one-way-search-flight").css("display","none");
$("#one-way-search-flight-loader").css("display","inline-block");
}else {
$("#two-way-search-flight").css("display","none");
$("#two-way-search-flight-loader").css("display","inline-block");
}
},
success : function ( response ) {
$("#one-way-search-flight").css("display","inline-block");
$("#two-way-search-flight").css("display","inline-block");
$("#one-way-search-flight-loader").css("display","none");
$("#two-way-search-flight-loader").css("display","none");
if(!response.success) {
$(".alert-danger").css("display","block");
$("#error-message-box").html(response.msg);
} else {
window.location = '/flight/search-result';
}
}
});
}
});
window.location = '/flight/search-result';
}
</script>