| 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/customer/ |
Upload File : |
<?php
$country = $this->countryList;
$leadDetail = $this->leadDetail;
$roominfojson = json_decode($leadDetail['RoomInfoJson'],true);
//echo $roominfojson;
$TotalPax=0;
$adultPax =0;
$childPax =0;
$infantPax =0;
//echo "<pre>";print_r($roominfojson);echo "</pre>";die;
if(!empty($roominfojson) > 0){
foreach($roominfojson as $res){
$TotalPax += (int)$res['TotalPax'];
$adultPax += (int)$res['Adult'];
$childPax += (int)$res['Child'];
$infantPax += (int)$res['Infant'];
}
}
$customerId = $this->customerId;
$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);
?>
<style>
.redtxt {
color:red;
}
</style>
<div style="padding-top:20px !important;" id="onWay-tab">
<div id="material">
<!--<form name="PackageSearchForm" id="PackageSearchForm" method="POST" action="/packagesearch/search-result">-->
<div class="col-md-12">
<div class="alert alert-danger" style="display: none;">
<span id="errorMessage">No package found, Try some other criteria or <a onclick="BulidPkg();" style="text-decoration: underline;">Click Here </a> to Build Your Own Package </span>
<span id="errorMessage2" style="display:none;">No package found, Try some other criteria or <a onclick="BulidPkg();" style="text-decoration: underline;cursor:pointer;">Click Here </a> to Build Your Own Package </span>
</div>
</div>
<form name="SightseeingQueryForm" id="SightseeingQueryForm" method="post">
<input type="hidden" name="TPSysId" id="modify_TPSysId" value="<?php echo isset($leadDetail['TPSysId'])?$leadDetail['TPSysId']:''; ?>">
<input type="hidden" name="modify_goingfrom" value="<?php echo @$leadDetail['DestinationPlaces']; ?>" id="modify_goingfrom" />
<input type="hidden" name="modify_specificdate" value="<?php echo (isset($leadDetail['StartDate']) && ($leadDetail['StartDate']->format('d/m/Y')!='01/01/1900'))?$leadDetail['StartDate']->format('d/m/Y'):''; ?>" id="modify_specificdate" />
<input type="hidden" name="modify_totaltravelers" value="<?php echo $TotalPax>0 ? $TotalPax : 2; ?>" id="modify_totaltravelers" />
<div class="col-md-4">
<div class="form-group">
<input name="sightseeingsearch_going_f" id="sightseeingsearch_going_f" class="form-control" type="text" placeholder="" value="<?php echo (isset($leadDetail['DestinationPlaces']) && !empty($leadDetail['DestinationPlaces']))?trim($leadDetail['DestinationPlaces']):''; ?>" onkeyup="get_city_autosuggest_country('sightseeingsearch_going_f','sightseeingsearch_going_from','','ContSysId_ss');" autocomplete="off" >
<label for="sightseeingsearch_going_f" class="form-control-placeholder-selectfilter">Destination</label>
<input type="hidden" id="sightseeingsearch_going_from" name="sightseeingsearch_going_from" value="<?php echo (isset($leadDetail['DestinationPlacesSysId']) && !empty($leadDetail['DestinationPlacesSysId']))?trim($leadDetail['DestinationPlacesSysId']).'__'.trim($leadDetail['DestinationPlaces']):''; ?>"/>
<input type="hidden" id="ContSysId_ss" name="ContSysId" value=""/>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<!--<div class="input-group ls-group-input">-->
<input autocomplete="off" class="form-control" placeholder="dd/mm/yy" type="text" name="sightseeingsearch_specific_date" value="<?php echo (isset($leadDetail['StartDate']) && ($leadDetail['StartDate']->format('d/m/Y')!='01/01/1900'))?$leadDetail['StartDate']->format('d/m/Y'):''; ?>" id="sightseeingsearch_specific_date"/>
<!--<span class="input-group-addon" onclick="runDatePicker('sightseeingsearch_specific_date');"><i class="fa fa-calendar"></i></span>-->
<!--</div>-->
<label for="sightseeingsearch_specific_date" class="form-control-placeholder-selectfilter">Tour Date <span class="redtxt">*</span></label>
<div class="clear"></div></div>
</div>
<div class="col-md-4">
<div class="form-group selectNationalityDropdown">
<select id="selectNationality" name="selectNationality" class="demo-default select-country" placeholder="Select Nationality">
<option value="">Select Nationality</option>
<?php foreach ($country as $val){ ?>
<option value="<?php echo trim($val['ContId']); ?>" <?php if (trim($val['Title']) == 'India' || $val['ContId']==$leadDetail['Countries']) echo 'selected' ; ?>><?php echo $val['Title']; ?></option>
<?php } ?>
</select>
<label for="selectNationality" class="form-control-placeholder-selectfilter">Nationality <span class="redtxt">*</span></label>
<div class="clear"></div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<div class="col-md-4" style="display:none;">
<div class="form-group totaltravelers_sightseeingDropdown">
<select id="totaltravelers_sightseeing" name="totaltravelers_sightseeing" class="demo-default select-country" placeholder="Select">
<?php
for($intI=1;$intI<=20;$intI++){
if($intI == 1 || $intI==$TotalPax){
$selected = 'selected';
}else{
$selected = '';
}
?>
<option value="<?php echo $intI; ?>" <?php echo $selected; ?>><?php echo $intI; ?></option>
<?php } ?>
</select>
<label for="totaltravelers_sightseeing" class="form-control-placeholder-selectfilter">No. of Pax <span class="redtxt">*</span></label>
<div class="clear"></div>
</div>
</div>
<div class="col-md-2">
<div class="form-group totadlt_sightseeingDropdown">
<select id="totadlt_sightseeing" name="totadlt_sightseeing" class="demo-default select-country" onchange="totalTravellerSightseeing();" placeholder="Select">
<?php
for($intA=0;$intA<=25;$intA++){
if($intA == 1 || $intA==$adultPax){
$selected = 'selected';
}else{
$selected = '';
}
?>
<option value="<?php echo $intA; ?>" <?php echo $selected; ?>><?php echo $intA; ?></option>
<?php } ?>
</select>
<label for="totadlt_sightseeing" class="form-control-placeholder-selectfilter">Adults (18+) <span class="redtxt">*</span></label>
<div class="clear"></div></div>
</div>
<div class="col-md-2">
<div class="form-group totchld_sightseeingDropdown">
<select id="totchld_sightseeing" name="totchld_sightseeing" class="demo-default select-country" onchange="totalTravellerSightseeing();" placeholder="Select">
<?php
for($intC=0;$intC<=20;$intC++){
if($intC == 0 || $intC==$childPax){
$selected = 'selected';
}else{
$selected = '';
}
?>
<option value="<?php echo $intC; ?>" <?php echo $selected; ?>><?php echo $intC; ?></option>
<?php } ?>
</select>
<label for="totchld_sightseeing" class="form-control-placeholder-selectfilter">Children (0-12 )</label>
<div class="clear"></div></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>
<div class="col-md-4">
<div class="form-group dropdown <?php echo (isset($leadDetail['leadRemark']) && !empty($leadDetail['leadRemark'])) ? 'active' : '';?>">
<label for="leadRemark" class="form-control-placeholder-selectfilter">Add Remark</label>
<textarea autocomplete="off" name="leadRemark" id="leadRemarkS" class="form-control" type="text" placeholder="Add Remark" value=""><?php echo trim(stripslashes($leadDetail['leadRemark'])); ?></textarea>
</div>
</div>
</div>
</div>
<div class="col-md-4" style="display:none1;">
<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-4" 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>Assign To Ops:</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-2" style="display:none;">
<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-2" style="display:none;">
<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>
</div>
<?php if($leadDetail['RoomInfoJson']==''){
$roomArray=array (
0 =>
array (
'totalRoom' => 1,
),
1 =>
array (
'totalTraveler' => 2,
),
2 =>
array (
'totaladult' => 1,
),
3 =>
array (
'totalchild' => 1,
),
4 =>
array (
'totalinfant' => 0,
),
);
$leadDetail['RoomInfoJson']=json_encode($roomArray);
//$[{"totalRoom" : 1},{"totalTraveler" : 2},{"totaladult" : 1},{"totalchild" : 1},{"totalinfant" : 0}]
}
?>
<div class="clear"></div>
<div class=" publicpagehide" align="right">
<div class="col-md-12 ls-group-input mobile_scrolling">
<input type="hidden" name="roominfojsonsighteeing" id="roominfojsonsighteeing" value='<?php echo ($leadDetail['RoomInfoJson']) ? $leadDetail['RoomInfoJson'] : ''; ?>' />
<input type="hidden" name="CustomerSysId" id="CustomerSysId" value="<?php echo $this->customerId; ?>" />
<input type="hidden" name="editLeadId" id="SightseeingEditLeadId" value="<?php echo isset($leadDetail['TPSysId'])?base64_encode($leadDetail['TPSysId']):''; ?>" />
<span class="alert-danger querySightseeingCreated" style="display:none;">Query created</span>
<?php $displaySaveButton='';
$displayOtherButton='none';
if($this->IsFromModified==true){
$displaySaveButton='none';
$displayOtherButton='';
}
if($this->customerId==''){
$displaySaveButton='none';
$displayOtherButton='';
}if(@$leadDetail['TPSysId']!='') {
?>
<label><input type="checkbox" id="createNewQuery" <?php if(@$leadDetail['StatusType']> 1) { ?> readonly="true" onclick="return false;" <?php } ?> name="createNewQuery" value="<?php echo $leadDetail['TPSysId']; ?>" checked/> <strong>Create a New Query : </strong>
<input type="hidden" name="NewQueryLeadHiddenId" id ="NewQueryLeadHiddenId" value="<?php echo $leadDetail['TPSysId']; ?>" />
</label>
<?php } ?>
<button type="submit" class="btn btn-primary btn-sm" id="saveSightseeingQueryButton" name="saveQuery" value="saveQuery" style="display:<?php //echo $displaySaveButton; ?>;">
<span class="ladda-label"><?php if(@$leadDetail['TPSysId']!='') {?>Modify & Save<?php }else{ ?>Save Query<?php } ?></span></button>
<a href="<?php echo $this->baseUrl('packagesearch/enquirysupplierpackage/tpid/' . base64_encode($leadDetail['TPSysId'])); ?>" target="_blank" class="btn btn btn-danger btn-sm ladda-button sendEnquiryToSupplierButtonSightseeing" style="display:<?php echo $displayOtherButton; ?>;">Contact Suppliers</a>
<a href="<?php echo $this->baseUrl('build-your-own/index/index' . $qidLink . '/code/' . $secureCode); ?>" class="btn btn-primary btn-sm searchSightseeingButton" <?php echo ($this->urlsource == 'whatsapp') ? 'target="_blank"' : ''?> style="display:<?php echo $displayOtherButton; ?>;">Create Quick Proposal</a>
<!-- <a onclick="return operationalSSForm();" class="btn btn btn-default btn-sm ladda-button createOperationSSButton" style="display:<?php echo $displayOtherButton; ?>;">Request Proposal</a>
<button type="submit" class="btn btn-warning btn-sm searchSightseeingButton" name="saveSearchQuery" value="saveSearchQuery" style="display:<?php echo $displayOtherButton; ?>;"><span class="ladda-label">Search & Send Sightseeing Proposal</span></button>-->
<div class="clear"></div>
</div>
</div>
</form>
<div class="clear"></div>
<div class="clear"></div>
</div>
</div>
<script type="text/javascript">
$('.IsOperationalLead').on('click',function(){
var ischecked = $(this).prop('checked');
$('#OpsAgentSysId').val('');
if(ischecked == true){
$('.OpsAgentSysIdHtml').show();
}else{
$('.OpsAgentSysIdHtml').hide();
}
})
function operationalSSForm(){
var TPSysId = $("#SightseeingEditLeadId").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/';
}
}
});
}
$(document).ready(function() {
$("#sightseeingsearch_specific_date").datetimepicker({
format:'d/m/Y',
timepicker: false,
minDate: 0
});
$("#ExpectedClosureDate").datetimepicker({
format:'d/m/Y',
timepicker: false,
minDate: 0
});
});
function totalTravellerSightseeing() {
var totaladult = $("#totadlt_sightseeing").val();
var totalchild = $("#totchld_sightseeing").val();
var totalinfant = '0';
var roomlp = 1;
var totaltraveller = parseInt(totaladult) + parseInt(totalchild) + parseInt(totalinfant);
var roominfojson = '[{"totalRoom" : '+roomlp+'},{"totalTraveler" : '+totaltraveller+'},{"totaladult" : '+totaladult+'},{"totalchild" : '+totalchild+'},{"totalinfant" : '+totalinfant+'}]'
$("#roominfojsonsighteeing").val(roominfojson);
$("#totaltravelers_sightseeing").val(totaltraveller);
var $select = $("#totaltravelers_sightseeing").selectize();
var selectize = $select[0].selectize;
selectize.setValue(totaltraveller);
}
// totalTravellerSightseeing();
</script>