| 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 //echo '<pre>'; print_r($this->leadDetail);
if (isset($this->leadDetail['searchType']) && !empty($this->leadDetail['searchType']) && $this->leadDetail['searchType'] == 'DIRECTHOTELSEARCH') {
$displayhotel = 'block';
$searchType = 'DIRECTHOTELSEARCH';
$hotelFromDate = $this->leadDetail['hotelFromDateSession'] ? $this->leadDetail['hotelFromDateSession'] : '';
$hotelToDate = $this->leadDetail['hotelToDateSession'] ? $this->leadDetail['hotelToDateSession'] : '';
$customerId = $this->leadDetail['customerId'];
} else {
$displayhotel = 'none';
$searchType = 'CRMHOTELSEARCH';
$hotelFromDateSession = $this->leadDetail['hotelFromDateSession'] ? $this->leadDetail['hotelFromDateSession'] : '';
$hotelToDateSession = $this->leadDetail['hotelToDateSession'] ? $this->leadDetail['hotelToDateSession'] : '';
$hotelFromDate = isset($this->leadDetail['StartDate']) ? $this->leadDetail['StartDate']->format('d/m/Y') : $hotelFromDateSession;
$hotelToDate = isset($this->leadDetail['ValidTill']) ? $this->leadDetail['ValidTill']->format('d/m/Y') : $hotelToDateSession;
$customerId = $this->leadDetail['customerId'];
}
//echo "<pre>";print_r($this->leadDetail['CustomerRemark']);
$leadDetail = $this->leadDetail;
$qidLink = isset($leadDetail['TPSysId']) ? "/qid/" . base64_encode($leadDetail['TPSysId']) : '';
$sidLink = !empty($leadDetail['EnqSupplierSysId']) ? "/sid/" . $leadDetail['EnqSupplierSysId'] : '';
// echo "<pre>";
// print_r($leadDetail);
// echo "</pre>";
$secureCode = Zend_Controller_Action_HelperBroker::getStaticHelper('SecureCode')->secureCode(trim(base64_encode($leadDetail['TPSysId'])), 1);
$DestinationPlacesExp = isset($this->leadDetail['DestinationPlaces']) ? explode('(', $this->leadDetail['DestinationPlaces']) : '';
$DestinationPlaces = isset($DestinationPlacesExp[0]) ? trim($DestinationPlacesExp[0]) : '';
$DestinationPlacesCountry = isset($DestinationPlacesExp[1]) ? explode(')', $DestinationPlacesExp[1]) : '';
$DestinationPlacesCountryName = isset($DestinationPlacesCountry[0]) ? trim($DestinationPlacesCountry[0]) : '';
?>
<div class="col-md-12 no-padding" style="display:none; margin-top:15px;" id="modhoteldetail">
<form method="post" name="hoterlsearch" id="hoterlsearchModify">
<input type="hidden" name="updateHotelFrom" id="updateHotelFrom" value="<?php echo isset($this->leadDetail['hotelXrefCityId']) ? $this->leadDetail['hotelXrefCityId'] : ''; ?>" />
<input type="hidden" name="updateHotelCheckIn" id="updateHotelCheckIn" value="<?php echo $hotelFromDate; ?>" />
<input type="hidden" name="updateHotelCheckOut" id="updateHotelCheckOut" value="<?php echo $hotelToDate; ?>" />
<input type="hidden" name="updateHotelNights" id="updateHotelNights" value="<?php echo $this->leadDetail['hotelTotalNights'] ? $this->leadDetail['hotelTotalNights'] : 0; ?>" />
<input type="hidden" name="updateHotelNationality" id="updateHotelNationality" value="<?php echo isset($this->leadDetail['selectNationality']) ? trim($this->leadDetail['selectNationality']) : 'IN'; ?>" />
<input type="hidden" name="updateHotelStarRating" id="updateHotelStarRating" value="<?php echo isset($this->leadDetail['hotelStarRating']) ? trim($this->leadDetail['hotelStarRating']) : ''; ?>" />
<input type="hidden" name="updateHotelRoom" id="updateHotelRoom" value="<?php echo trim($this->leadDetail['hotelTotalRooms']); ?>" />
<input type="hidden" name="updateHotelAdult" id="updateHotelAdult" value="<?php echo isset($this->leadDetail['totalMemberCount']['AdultPax']) ? trim($this->leadDetail['totalMemberCount']['AdultPax']) : 1; ?>" />
<input type="hidden" name="updateHotelChild" id="updateHotelChild" value="<?php echo isset($this->leadDetail['totalMemberCount']['ChildPax']) ? trim($this->leadDetail['totalMemberCount']['ChildPax']) : 0; ?>" />
<div class="leadeBorder2" style="padding:15px 0;">
<div class="col-md-12 no-padding">
<div class="col-md-6">
<div class="form-group dropdown <?php echo ($this->leadDetail['hotelCityTitle'] != '') ? 'active' : ''; ?>">
<label><strong>Destination </strong><span class="red">*</span></label>
<input autocomplete="off" name="Hotel_name_city" id="selectDestination" class="form-control" type="text" placeholder="City Name" value="<?php echo (isset($this->leadDetail['hotelCityTitle'])) ? $this->leadDetail['hotelCityTitle'] : trim($this->leadDetail['DestinationPlaces']); ?>">
<input type="hidden" id="hidden_selected_hotel_cityid" name="hidden_selected_hotel_cityid" value="<?php echo isset($this->leadDetail['hotelXrefCityId']) ? $this->leadDetail['hotelXrefCityId'] : (int)$this->leadDetail['DestinationPlacesSysId']; ?>" />
<input type="hidden" id="hidden_selected_hotel_id" name="hidden_selected_hotel_id" value="<?php echo isset($this->leadDetail['hidden_selected_hotel_id']) ? $this->leadDetail['hidden_selected_hotel_id'] : (int)$this->leadDetail['SourcePlaceSysId']; ?>">
<input type="hidden" id="CityName" name="CityName" value="<?php echo isset($this->leadDetail['CityName']) ? $this->leadDetail['CityName'] : $DestinationPlaces; ?>">
<input type="hidden" id="countryTitle" name="countryTitle" value="<?php echo isset($this->leadDetail['countryTitle']) ? $this->leadDetail['countryTitle'] : $DestinationPlacesCountryName; ?>">
<input type="hidden" id="hidden_selected_hotel_contid" name="ContSysId" value="<?php echo (isset($this->leadDetail['countrySysId']) && !empty($this->leadDetail['countrySysId'])) ? $this->leadDetail['countrySysId'] : ''; ?>" />
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown <?php echo ($hotelFromDate != '') ? 'active' : ''; ?>">
<label>Check In <span class="red">*</span></label>
<input autocomplete="off" class="form-control datePickerOnly" type="text" name="chekInDate" id="chekInDate" value="<?php echo $hotelFromDate; ?>" />
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown <?php echo ($hotelToDate != '') ? 'active' : ''; ?>">
<label>Check Out <span class="red">*</span></label>
<input autocomplete="off" class="form-control datePickerOnly" type="text" name="chekOutDate" id="chekOutDate" value="<?php echo $hotelToDate; ?>" />
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown <?php echo (!empty($this->leadDetail['hotelTotalNights'])) ? 'active' : ''; ?>">
<label>Nights <span class="red">*</span></label>
<input autocomplete="off" type="number" value="<?php echo $this->leadDetail['hotelTotalNights'] ? $this->leadDetail['hotelTotalNights'] : (int)$this->leadDetail['NoofNight']; ?>" placeholder="1" class="form-control whbg" name="nights" id="nights" maxlength="3" onchange="addCheckOutDate(this.value);">
</div>
</div>
<div class="col-md-3">
<div class="form-group selectNationalityDropdown dropdown active">
<?php
$objCountry = new Travel_Model_TblCountry();
$country = $objCountry->getCountryList();
//echo "<pre>";print_r($country);exit;
?>
<label>Nationality </label>
<!-- <select id="selectNationality" name="selectNationality" class="demo-default select-country" placeholder="Select Nationality">
<?php foreach ($country as $val) {
//print_r($this->leadDetail['selectNationality']);die;
$Code = 'IN';
if (isset($this->leadDetail['selectNationality']) && !empty($this->leadDetail['selectNationality'])) {
$Code = $this->leadDetail['selectNationality'];
}
?>
<option <?php if (trim($val['Code']) == $Code) echo 'selected'; ?> value="<?php echo trim($val['TBBContId']); ?>" ><?php echo $val['Title']; ?></option>
<?php } ?>
</select> -->
<select id="selectNationality" name="selectNationality" class="demo-default select-country" placeholder="Select Nationality">
<option value="">Select Nationality</option>
<?php $selectedContId = trim($leadDetail['Countries']) ? trim($leadDetail['Countries']) : 101;
foreach ($country as $val) {
$Code = 'IN';
if (isset($this->leadDetail['selectNationality']) && !empty($this->leadDetail['selectNationality'])) {
$Code = $this->leadDetail['selectNationality'];
}
?>
<option value="<?php echo trim($val['TBBContId']); ?>" <?php if (trim($val['Code']) == $Code) echo 'selected'; ?>><?php echo trim($val['Title']); ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown travelerboxMainDropdown">
<label for="travelers" class="form-control-placeholder-selectfilter"><strong>Travelers</strong></label>
<?php echo $this->partial('package/travelers_form.phtml', array('flexiPackageList' => $leadDetail, 'searchPage' => true, 'isHotelPage' => 1)); ?>
<input type="hidden" name="roominfojson" id="roominfojsonHotel" value="">
</div>
</div>
<div class="col-md-3">
<div class="form-group dropdown">
<label>Star Rating <?php $hotelStarRating = !empty(trim($this->leadDetail['hotelStarRating'])) ? trim($this->leadDetail['hotelStarRating']) : '6.00' ?></label>
<?php $starRatingArray = array(1 => 1.00, 2 => 2.00, 3 => 3.00, 4 => 4.00, 5 => 5.00, 'Any' => 6.00); ?>
<select id="selectStarRating" name="selectStarRating" class="demo-default select-country" placeholder="Select">
<?php foreach ($starRatingArray as $key => $value) { ?>
<option value="<?php echo $value; ?>" <?php if ($hotelStarRating == $value) {
echo "selected";
} ?>><?php echo $key; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group dropdown lead_sourceDropdown active <?php echo (isset($leadDetail['lead_source']) && !empty($leadDetail['lead_source'])) ? 'active' : ''; ?>">
<label for="lead_source" class="form-control-placeholder-selectfilter">Lead Source</label>
<select id="lead_source" name="lead_source" class="demo-default select-country">
<option value="">Change Source</option>
<?php
if (count($this->getleadSource)) {
foreach ($this->getleadSource as $sourcekey => $sourcevalue) {
$selected = (($leadDetail['lead_source'] == $sourcevalue['LeadSourceSysId']) || ($sourcevalue['LeadSourceSysId'] == $this->lead_source)) ? 'selected' : '';
?>
<option value="<?php echo $sourcevalue['LeadSourceSysId'] ?>" <?php echo $selected; ?>><?php echo $sourcevalue['Title'] ?></option>
<?php }
}
?>
</select>
</div>
</div>
<?php if (isset($this->customerId) && !empty($this->customerId)) { ?>
<div class="col-md-8">
<div class="form-group dropdown">
<label>Add Remarks </label>
<input name="leadRemark" type="text" class="form-control whbg" autocomplete="off" id="leadRemark" placeholder="Enter Remarks" title="Spaces are not allowed" value="<?php echo isset($this->leadDetail['CustomerRemark']) ? $this->leadDetail['CustomerRemark'] : ''; ?>" />
</div>
</div>
<?php } ?>
</div>
<div class="publicpagehide col-md-3" align="right">
<div class="form-group dropdown currentOwnerSysIdDropdown active">
<label for="currentOwnerSysId" class="form-control-placeholder-selectfilter">Assign To Sales</label>
<select id="currentOwnerSysId" name="currentOwnerSysId" class="demo-default select-country">
<option value="0">Self</option>
<?php
if (!empty($this->getActiveStaff)) {
foreach ($this->getActiveStaff as $stkey => $stvalue) {
$selected = (($leadDetail['currentOwnerSysId'] == $stvalue['UserSysId'])) ? 'selected' : '';
?>
<option value="<?php echo $stvalue['UserSysId'] ?>" <?php echo $selected; ?>><?php echo trim($stvalue['FirstName']) . ' ' . trim($stvalue['LastName']) ?></option>
<?php }
}
?>
</select>
</div>
</div>
<div class="col-md-3" style="display:none1;">
<div class="hotelreference_checkboxalign">
<div class="form-group1 col-md-5 no-padding" style="bottom: 15px;">
<!--<label for="IsOperationalLead" class="form-control-placeholder-selectfilter">Assign To Ops</label>-->
<label><strong>Assign To Ops:</strong></label>
<div class="cl"></div>
<label class="checkbox_popup checkbox_popupwidth"> <input type="checkbox" name="IsOperationalLead" value="1" class="IsOperationalLead" <?php echo ($leadDetail['IsOperationalLead'] == 1) ? 'checked' : ''; ?> /><span class="checkmark"></span></label>
</div>
<div class="form-group1 col-md-7 no-padding-right OpsAgentSysIdHtml" style="<?php echo ($leadDetail['IsOperationalLead'] == 1) ? '' : 'display:none;'; ?>">
<select id="OpsAgentSysId" name="OpsAgentSysId" class="demo-default select-country">
<option value="">Select</option>
<?php
if (!empty($this->agencyOpsUser)) {
foreach ($this->agencyOpsUser as $stkey1 => $stvalue1) {
$selected = (($leadDetail['OpsAgentSysId'] == $stvalue1['UserSysId'])) ? 'selected' : '';
?>
<option value="<?php echo $stvalue1['UserSysId'] ?>" <?php echo $selected; ?>><?php echo trim($stvalue1['FirstName']) . ' ' . trim($stvalue1['LastName']) ?></option>
<?php }
}
?>
</select>
</div>
</div>
</div>
<div class="col-md-3" style="display:none1;">
<div class="form-group no-margin dropdown active">
<label for="ExpectedClosureDate" class="form-control-placeholder-selectfilter">Expected Closure Date </label>
<input autocomplete="off" class="form-control" placeholder="dd/mm/yy" type="text" name="ExpectedClosureDate" value="<?php echo (isset($leadDetail['ExpectedClosureDate']) && $leadDetail['ExpectedClosureDate'] != '' && ($leadDetail['ExpectedClosureDate']->format('d/m/Y') != '01/01/1900')) ? $leadDetail['ExpectedClosureDate']->format('d/m/Y') : ''; ?>" id="ExpectedClosureDate" />
</div>
</div>
<div class="col-md-3" style="display:none1;">
<div class="form-group no-margin dropdown active">
<label for="ExpectedValue" class="form-control-placeholder-selectfilter">Expected Closure Amount </label>
<input autocomplete="off" class="form-control" placeholder="" type="text" name="ExpectedValue" value="<?php echo (isset($leadDetail['ExpectedValue']) && ($leadDetail['ExpectedValue'] != '')) ? $leadDetail['ExpectedValue'] : ''; ?>" id="ExpectedValue" />
</div>
</div>
<input type="hidden" name="customerId" id="customerId" value="<?php echo base64_encode($this->customerId ? $this->customerId : $customerId); ?>" />
<input type="hidden" name="ajaxdropdown_css" class="ajaxdropdown_css" value="<?php echo 0; ?>" />
<input type="hidden" id="editLeadId" value="<?php echo isset($this->leadDetail['TPSysId']) ? base64_encode($this->leadDetail['TPSysId']) : ''; ?>" name="editLeadId" />
<input type="hidden" id="editTravelItenaryId" value="<?php echo isset($this->leadDetail['TPIntSysId']) ? base64_encode($this->leadDetail['TPIntSysId']) : ''; ?>" name="editTravelItenaryId" />
<input type="hidden" name="searchType" id="searchType" value="<?php echo base64_encode($searchType); ?>" />
<input type="hidden" name="additionalRequirement" id="additionalRequirement" value="" />
<input type="hidden" name="countryCode" value="<?php echo isset($this->leadDetail['Countries']) ? $this->leadDetail['Countries'] : $this->leadDetail['countryCode']; ?>" id="countryCode" />
<div class="col-md-12" style="display:none1;">
<div class="mobile_scrolling text-right">
<?php if ($this->leadDetail['TPSysId'] != "") { ?>
<label class=" checkbox_popup checkbox_popupwidth">
<input type="checkbox" id="createNewQuery" <?php if (@$this->leadDetail['StatusType'] > 1) { ?> readonly="true" onclick="return false;" <?php } ?> name="createNewQuery" value="<?php echo @$this->leadDetail['TPSysId'] ? $this->leadDetail['TPSysId'] : ''; ?>" /> Create a New Query
<span class="checkmark"></span>
</label>
<input type="hidden" name="NewQueryLeadHiddenId" id="NewQueryLeadHiddenId" value="<?php echo @$this->leadDetail['TPSysId'] ? $this->leadDetail['TPSysId'] : ''; ?>" />
<button type="submit" class="btn btn-primarygray btn-sm pull-left" id="saveQueryButton" name="saveQuery" value="saveQuery"><span class="ladda-label">Modify &Save </span></button>
<?php } ?>
<?php
$controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
$actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
?>
<?php if ($controllerName != "proposal") { ?>
<a href="<?php echo $this->baseUrl('packagesearch/enquirysupplierpackage/tpid/' . base64_encode($this->leadDetail['TPSysId'])); ?>" target="_blank" class="btn btn btn-danger btn-sm ladda-button buildYourOwnButton sendEnquiryToSupplierButtonHotel">Contact Suppliers</a>
<a onclick="return operationalHotelForm();" class="btn btn btn-danger btn-sm ladda-button createOperationHotelButton">Request Proposal</a>
<?php }
if ($controllerName == "leaddetail" || $controllerName == 'buyhotel') { ?>
<a href="<?php echo $this->baseUrl('packagesearch/buildquickpackage' . $qidLink . '/code/' . $secureCode); ?>" target="_blank" class="btn btn btn-danger btn-sm ladda-button createQuickHotelButton" style="display:<?php echo $buttonDisplay; ?>;">Create Quick Hotel</a>
<a href="<?php echo $this->baseUrl('packagesearch/quick-package-listing' . $qidLink . '/code/' . $secureCode); ?>" id="testActionQuickHotelListing" target="_blank" class="btn btn btn-danger btn-sm ladda-button fixsearchQuickHotelbtn" style="display:<?php echo $buttonDisplay; ?>;">Search Quick Hotel</a>
<button type="submit" class="btn btn btn-primary btn-sm " name="modifyQuery" id="modifyQuery" value="modifyQuery"><span class="ladda-label">Search & Send Hotel Proposal</span></button>
<?php } ?>
</div>
</div>
</div>
<div class="clear"></div>
</form>
</div>
<script>
$().ready(function() {
$('#ExpectedClosureDate').datetimepicker({
format: 'd/m/Y',
timepicker: false,
minDate: 0,
});
});
</script>
<script>
function operationalHotelForm() {
var TPSysId = $("#editLeadId").val();
$.ajax({
url: '/operation/update-travelplan-for-operational',
// data: {search_going_to:search_going_to,search_price_range:search_price_range,search_inclusions:search_inclusions,search_theme:search_theme,number_of_traveler:number_of_traveler,customerID:customerID,search_specific_date:search_specific_date,TPSysId:TPSysId,itenaryID:itenaryID,roominfojson:roominfojson},
data: {
'TPSysId': TPSysId
},
method: 'POST',
dataType: 'json',
error: function(err) {
// alert(err);
},
beforeSend: function() {
$(".createOperationSSButton").attr('disabled', true);
},
success: function(response) {
if (response.status == 'success') {
$(".createOperationSSButton").removeAttr('disabled');
window.location = '/operation/package-required/';
}
}
});
}
$(".travelerboxHotel").click(function() {
$(".roomBoxMainHotel").toggle();
$('.travelerboxMainHotelDropdown').addClass('active full');
});
$('.IsOperationalLead').on('click', function() {
var ischecked = $(this).prop('checked');
$('#OpsAgentSysId').val('');
if (ischecked == true) {
$('.OpsAgentSysIdHtml').show();
} else {
$('.OpsAgentSysIdHtml').hide();
}
})
</script>