403Webshell
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/buyhotel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/buyhotel/ajax-html.phtml
<?php
	$vars = $this->getVars(); 
	
	if(isset($vars['data']) && !empty($vars['data']) && count($vars['data']) > 0 && $vars['type'] == 'hotelSendEmailForm'){
		?>
        <table class="table tablestyle">
            <tbody>
                
                <tr class="alert alert-graylight">
                    <th><strong>Hotel</strong></th>
                    <th><strong>Supplier</strong></th>
                    <th><strong>Price (Inc. GST)</strong></th>
                    <th><strong>Markup</strong></th>
                    <th><strong>Net Price (Inc. GST)</strong></th>
                    <th><strong>Extra Markup</strong></th>
                    <th><strong>GST on<br/> Extra MarkUp</strong></th>
                    <th><strong>Final Price</strong></th>
                    <th width="12%" class="rType" style="display:none;"><strong>Room Type</strong></th>
                    <th width="12%" class="mpType" style="display:none;"><strong>MP Type</strong></th>
                    <th>Action</th>
                </tr>
            
	  <?php
		$s=1;
		$data=$vars['data'];
                
		if(!empty($data) ){
                    
                    $objSupplier = new Travel_Model_TblSupplier();
                    
		for($i=0;$i<count($data);$i++){
			$result = json_decode(base64_decode($data[$i]));
                        //echo "<pre>";print_r($result);exit;
                         $result->GTXMarkUp = 0;
                        $EconomyTypeTitle   = isset($result->EconomyTypeTitle)?$result->EconomyTypeTitle:'';
                        $MealPlanTypeTitle  = isset($result->MealPlanTypeTitle)?$result->MealPlanTypeTitle:'';
                        $SupplierSysId  = (!empty($result->SupplierSysId) && $result->intICSourceSysId == 'Inv')?$result->SupplierSysId:'0';
                        
                        $InvnItemSysId  = isset($result->InvnItemSysId)?$result->InvnItemSysId:'0';
                       
                        
                        $objSupplier->SupplierSysId = $SupplierSysId;
                        $arrSupplier = $objSupplier->getSuppliersDetailsBySupplierSysId();
                        
                        $SupplierName  = isset($arrSupplier['SupplierName'])?$arrSupplier['SupplierName']:'';
                        
			//$finalPrice=($result->netPrice)+($result->commission)+($result->addMarkup)+($result->AgencyMarkUp)+($result->GTXMarkUp)+($result->TotalTaxes);
			$finalPrice=($result->netPrice)+($result->commission)+($result->AgencyMarkUp)+($result->GTXMarkUp)+($result->TotalTaxes);
			//$taxType=($result->SupplierSysId==3)?8:9;
                        $taxType = 10;

			//service tax for base fare
			$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($result->netPrice,"H",$taxType);
			$netPriceArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;
			
			//service tax for GTX MarkUp
			$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($result->GTXMarkUp,"H",$taxType);
			$GTXMarkupArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;

			//service tax for Agency MarkUp
			$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($result->AgencyMarkUp,"H",$taxType);
			$AgencyMarkupArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;

			$taxdetailforagency = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax('',"H",$taxType);
			$vars['Tax']=(trim($taxdetailforagency['ServiceTaxPercentage'])>0)?trim(floatval($taxdetailforagency['ServiceTaxPercentage'])):0;

  	?>
            <tr>
                <input type="hidden" name="rateType[]" class="rateType_<?php echo $i; ?>" id="rateType_<?php echo $i; ?>" value="default" />
                <td>
                    <h4><?php echo stripslashes($result->hotelName); ?></h4>
                    <span class="graytxt"><?php echo $result->title; ?></span>
                </td>
                
                <!--Supplier Column -->
                <td class="default_rates_<?php echo $i; ?>"><?php echo ($result->intICSourceSysId==4 || $result->intICSourceSysId==3)?'API':'INV'; ?></td>
                <td class="custom_rates_<?php echo $i; ?>" style="display:none;">
                    <input type="text" name="supplier_name" seq="<?php echo $i; ?>" id="supplier_name" class="form-control whbg supplierName custom-rates-calc" value="<?php echo $SupplierName; ?>" >
                    <input type="hidden" name="hidden_selected_supplier_sys_id[]" id="hidden_selected_supplier_sys_id_<?php echo $i; ?>" value="<?php echo $SupplierSysId; ?>">
                </td>
                <!--Supplier Column Ends-->
                
                
                <!--Net Price Column -->
                <td class="default_rates_<?php echo $i; ?>">
                    <?php echo number_format($result->netPrice+$netPriceArrayServiceTax+$result->GTXMarkUp+$GTXMarkupArrayServiceTax,2); ?>
                    (<?php echo number_format($result->netPrice+$netPriceArrayServiceTax+$result->GTXMarkUp,2); ?>+<?php echo number_format($GTXMarkupArrayServiceTax,2); ?>)
                </td>
                <td class="custom_rates_<?php echo $i; ?>" style="display:none;">
                    <input class="form-control whbg custom-rates-calc customizeRate_<?php echo $i; ?>" maxlength="6" seq="<?php echo $i; ?>" type="text" onKeyPress="return kp_numeric(event);" name="customizeRate[]" id="customizeRate_<?php echo $i; ?>" value="0" />
                </td>
                <!--Net Price Column Ends -->
                
                <!--Markup On NetPrice Column -->
                <td class="default_rates_<?php echo $i; ?>"><?php echo number_format($result->AgencyMarkUp+$AgencyMarkupArrayServiceTax,2); ?></td>
                <td class="custom_rates_<?php echo $i; ?>" style="display:none;">
                    <input class="form-control whbg custom-rates-calc customizeRateMarkUp_<?php echo $i; ?>" maxlength="6" seq="<?php echo $i; ?>" type="text" onKeyPress="return kp_numeric(event);" name="customizeRateMarkUp[]" id="customizeRateMarkUp_<?php echo $i; ?>" value="0" />
                    <input class="GSTOncustomMarkup_<?php echo $i; ?>" type="hidden" name="GSTOncustomMarkup[]" value="0"/>
                </td>
                <!--Markup On Net Price Column Ends-->
                
                <!--Price With MarkUp Column -->
                <td class="default_rates_<?php echo $i; ?>">
                    <?php echo number_format($result->netPrice+$netPriceArrayServiceTax+$result->GTXMarkUp+$GTXMarkupArrayServiceTax+$result->AgencyMarkUp+$AgencyMarkupArrayServiceTax,2); ?>
                </td>
                <td class="custom_rates_<?php echo $i; ?> customrateandmarkupHTML_<?php echo $i; ?>" style="display:none;">0</td>
                <input class="customrateandmarkup_<?php echo $i; ?>" type="hidden" name="customrateandmarkup[]" value="0"/>
                <input class="customrateandmarkupVal_<?php echo $i; ?>" type="hidden" name="customrateandmarkupVal[]" value="0"/>
                <!--Price With MarkUp Column -->
                
                <!--Add Extra MarkUp Column -->
                <td class="default_rates_<?php echo $i; ?>">
                    <input type="hidden" class="form-control whbg netprice<?php echo $s; ?>" name="netPrice[]" value="<?php echo $result->netPrice; ?>">
                    <input type="hidden" class="form-control whbg netpriceWithStax<?php echo $s; ?>" name="netPriceWithStax[]" value="<?php echo $result->netPrice+$netPriceArrayServiceTax; ?>">
                    <input type="hidden" class="form-control whbg agencymarkup<?php echo $s; ?>" name="AgencyMarkUp[]" value="<?php echo $result->AgencyMarkUp; ?>">
                    <input type="hidden" class="form-control whbg agencymarkupWithStax<?php echo $s; ?>" name="AgencyMarkUpWithStax[]" value="<?php echo $result->AgencyMarkUp+$AgencyMarkupArrayServiceTax; ?>">
                    <input type="hidden" class="form-control whbg totaltaxes<?php echo $s; ?>" name="TotalTaxes[]" value="<?php echo $result->TotalTaxes; ?>">
                    <input type="hidden" class="form-control whbg gtxmarkup<?php echo $s; ?>" name="GTXMarkUp[]" value="<?php echo $result->GTXMarkUp; ?>">
                    <input type="hidden" class="form-control whbg gtxmarkupWithStax<?php echo $s; ?>" name="GTXMarkUpWithStax[]" value="<?php echo $result->GTXMarkUp+$GTXMarkupArrayServiceTax; ?>">
                    <input type="text" name="addMarkup[]" onKeyPress="return kp_numeric(event);" maxlength="5" onkeyup="sumOfTwoFields('netpriceWithStax<?php echo $s; ?>','markup<?php echo $s; ?>','agencymarkupWithStax<?php echo $s; ?>','gtxmarkupWithStax<?php echo $s; ?>','totaltaxes<?php echo $s; ?>','displayCalValue<?php echo $s; ?>','displayTaxValue<?php echo $s; ?>','finalPrice<?php echo $s; ?>','<?php echo $vars['Tax']; ?>');" class="form-control whbg markup<?php echo $s; ?>" value="<?php echo 0; ?>">
                    <input type="hidden" name="finalPrice[]" class="finalPrice<?php echo $s; ?>" value="<?php echo $finalPrice; ?>" />
                    <input type="hidden" name="finalPriceWithStax[]" class="finalPriceWithStax<?php echo $s; ?>" value="<?php echo ($result->netPrice)+$netPriceArrayServiceTax+($result->commission)+($result->AgencyMarkUp)+$AgencyMarkupArrayServiceTax+($result->GTXMarkUp)+$GTXMarkupArrayServiceTax+($result->TotalTaxes); ?>" />
                </td>
                <td class="custom_rates_<?php echo $i; ?>" style="display:none;">
                    <input type="text" name="customAddMarkup[]" id="custom-extra-markup-calc-<?php echo $i; ?>" seq="<?php echo $i; ?>" onKeyPress="return kp_numeric(event);" maxlength="5"  class="form-control whbg custom-extra-markup-calc" value="0">
                    <!--<input class="GSTonmarkup_<?php echo $i; ?>" type="hidden" name="customAddMarkupGST[]" value="0"/>-->
                </td>
                <!--Add Extra MarkUp Column Ends-->
                
                <!--GST On Extra MarkUp Column -->
                <td class="displayTaxValue<?php echo $s; ?> default_rates_<?php echo $i; ?>"><?php echo ($result->TotalTaxes); ?></td>
                <td class="custom_rates_<?php echo $i; ?> custom_addmarkup_gst_<?php echo $i; ?>" style="display:none;">0</td>
                <input class="GSTonExtramarkup_<?php echo $i; ?>" type="hidden" name="customAddExtraMarkupGST[]" value="0"/>
                <!--GST On Extra MarkUp Column Ends-->

                <!--Final Price All Include Column-->
                <td class="displayCalValue<?php echo $s; ?> default_rates_<?php echo $i; ?>"><?php echo number_format(($result->netPrice)+$netPriceArrayServiceTax+($result->commission)+($result->AgencyMarkUp)+$AgencyMarkupArrayServiceTax+($result->GTXMarkUp)+$GTXMarkupArrayServiceTax+($result->TotalTaxes),2); ?></td>
                <td class="finalAllIncHTML_<?php echo $i; ?> custom_rates_<?php echo $i; ?>" style="display:none;">0</td>
                <input class="finalAllInc_<?php echo $i; ?>" type="hidden" name="customFinalPrice[]" value=""/>
                <!--Final Price All Include Column Ends-->

                <td class="rType" style="display:none;">
                    <input type="text" name="roomtype[]" class="form-control whbg custom_rates_<?php echo $i; ?>" value="<?php echo $EconomyTypeTitle; ?>" style="display:none;" />
                </td>
                <td class="mpType" style="display:none;">
                    <select name="mptype[]" class="form-control whbg custom_rates_<?php echo $i; ?>" style="display:none;">
                        <?php
                            if(count($this->arrMPType)){
                                foreach ($this->arrMPType as $MPVal){
                                    if(trim($MealPlanTypeTitle) == trim($MPVal['MPType']))
                                    {
                                        $selected = "selected";
                                    }else{
                                        $selected = ""; 
                                    }
                        ?>
                        <option value="<?php echo $MPVal['MealTypeId']; ?>" <?php echo $selected; ?>><?php echo $MPVal['MPType']; ?></option>
                            <?php } } ?>
                    </select>
                </td>

                <td>
                    <a href="javascript:void(0);" class="fa fa-edit" title="Customize Rates" onclick="toggleRates('custom','<?php echo $i; ?>');"></a>&nbsp;
                    <a href="javascript:void(0);" style="display:none;" class="fa fa-undo custom_rates_<?php echo $i; ?>"  title="Default Rates" onclick="toggleRates('default','<?php echo $i; ?>');"></a>&nbsp;
                    <?php if($result->intICSourceSysId == 'Inv'){ ?>
                    <br/>
                    <input type="checkbox" name="allowbooking[]" id="allowbooking" value="" title="Allow Booking">&nbsp;Allow Booking
                    <?php }else{ ?>
                    <span class="custom_rates_<?php echo $i; ?>" style="display:none;">
                        <input type="checkbox" name="allowbooking[]" id="allowbooking" value="" title="Allow Booking">&nbsp;Allow Booking    
                    </span>
                    <?php } ?>
                </td>
            </tr>
   
    <?php $s++; } } else { ?>
    		<tr><td colspan="6"> No result found</td></tr>
     <?php }  ?>
               </tbody>
        </table>



<script>
        $(document).ready(function(){
                $('.supplierName').typeahead({
                   items: 'all',
                   source: function (query, process) {
                       //$('.passenger_city').val('');
                       return $.ajax({
                           url: '/flight/get-supplier-auto-search',
                           type: 'post',
                           data: {query: query},
                           dataType: 'json',
                           success: function (result) {
                               var resultList = result.map(function (item) {
                                   var aItem = {SupplierSysId: item.SupplierSysId, label: item.label};
                                   return JSON.stringify(aItem);
                               });
                               return process(resultList);
                           }
                       });
                   },
                   sorter: function (items) {
                       var beginswith = [], caseSensitive = [], caseInsensitive = [], item;
                       while (aItem = items.shift()) {
                           var item = JSON.parse(aItem);
                           if (!item.label.toLowerCase().indexOf(this.query.toLowerCase()))
                               beginswith.push(JSON.stringify(item));
                           else if (~item.label.indexOf(this.query))
                               caseSensitive.push(JSON.stringify(item));
                           else
                               caseInsensitive.push(JSON.stringify(item));
                       }
                       return beginswith.concat(caseSensitive, caseInsensitive)

                   },
                   highlighter: function (obj) {
                       var item = JSON.parse(obj);
                       var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
                       return item.label.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
                           return '<strong>' + match + '</strong>'
                       })
                   },
                   updater: function (item) {
                       var item = JSON.parse(item);
                       var idIndex = this.$element.attr('seq');
                       $('#hidden_selected_supplier_sys_id_'+idIndex).val(item.SupplierSysId);
                       return item.label;
                   },
                   minLength: 2
                           // displayField: 'label',
               });
               
               
               
            $(".custom-rates-calc").on('keyup blur',function(){
            
                var idIndex = $(this).attr('seq');
                var CustomizeBaseRate = ($("#customizeRate_"+idIndex).val()!= '')?$("#customizeRate_"+idIndex).val():0;
                var markUpOnCustomizeBaseRate = ($("#customizeRateMarkUp_"+idIndex).val()!= '')?$("#customizeRateMarkUp_"+idIndex).val():0;
                var CustomizeBaseRateWidMarkup = parseInt(CustomizeBaseRate) + parseInt(markUpOnCustomizeBaseRate);
                var GSTOnBase   = (parseFloat(CustomizeBaseRate)*parseFloat(18)/100);
                var GSTOnMarkup = (parseFloat(markUpOnCustomizeBaseRate)*parseFloat(18)/100);
                var CustomizeBaseRateWidMarkupGST = (parseFloat(CustomizeBaseRateWidMarkup) + parseFloat(GSTOnBase) + parseFloat(GSTOnMarkup)).toFixed(2);
                
                
                
                var CustomExtraMarkUp = ($("#custom-extra-markup-calc-"+idIndex).val()!= '')?parseFloat($("#custom-extra-markup-calc-"+idIndex).val()):0;
                var CustomExtraMarkUpGST = (parseFloat(CustomExtraMarkUp)*parseFloat(18)/100);
                var CustomizeExtraMarkupGST = (parseFloat(CustomExtraMarkUp) + parseFloat(CustomExtraMarkUpGST)).toFixed(2);
                
                
                
                
                $(".customrateandmarkupHTML_"+idIndex).html(CustomizeBaseRateWidMarkupGST);
                $(".customrateandmarkupVal_"+idIndex).val(CustomizeBaseRateWidMarkupGST);
                $(".customrateandmarkup_"+idIndex).val(GSTOnBase);
                
                $(".GSTOncustomMarkup_"+idIndex).val(GSTOnMarkup);
                
                var CustomizeExtraMarkupGST = (parseFloat(CustomizeBaseRateWidMarkupGST) + parseFloat(CustomizeExtraMarkupGST)).toFixed(2);
                
                $(".finalAllIncHTML_"+idIndex).html(CustomizeExtraMarkupGST);
                $(".finalAllInc_"+idIndex).val(CustomizeExtraMarkupGST);
                
                
            });
            
            
           /*$(".custom-rates-calc").on('keyup blur',function(){
            
                var idIndex = $(this).attr('seq');
                var CustomizeBaseRate = ($("#customizeRate_"+idIndex).val()!= '')?$("#customizeRate_"+idIndex).val():0;
                var markUpOnCustomizeBaseRate = ($("#customizeRateMarkUp_"+idIndex).val()!= '')?$("#customizeRateMarkUp_"+idIndex).val():0;
                var CustomizeBaseRateWidMarkup = parseInt(CustomizeBaseRate) + parseInt(markUpOnCustomizeBaseRate);
                var GST = (parseFloat(CustomizeBaseRateWidMarkup)*parseFloat(18)/100);
                var CustomizeBaseRateWidMarkupGST = (parseFloat(CustomizeBaseRateWidMarkup) + parseFloat(GST)).toFixed(2);
                
                
                $(".customrateandmarkupHTML_"+idIndex).html(CustomizeBaseRateWidMarkupGST);
                $(".customrateandmarkup_"+idIndex).val(CustomizeBaseRateWidMarkupGST);
                
                $(".finalAllIncHTML_"+idIndex).html(CustomizeBaseRateWidMarkupGST);
                $(".finalAllInc_"+idIndex).val(CustomizeBaseRateWidMarkupGST);
                
                
            });*/
            
            
            
            $(".custom-extra-markup-calc").on('keyup blur',function(){
            
                var idIndex = $(this).attr('seq');
                var CustomizeBaseRateWidMarkup = ($(".customrateandmarkupVal_"+idIndex).val()!= '')?$(".customrateandmarkupVal_"+idIndex).val():0;
                var CustomExtraMarkUp = ($(this).val()!= '')?parseFloat($(this).val()):0;
                var CustomExtraMarkUpGST = (parseFloat(CustomExtraMarkUp)*parseFloat(18)/100);
                var CustomizeExtraMarkupGST = (parseFloat(CustomExtraMarkUp) + parseFloat(CustomExtraMarkUpGST)).toFixed(2);
                var CustomFinalPrice = (parseFloat(CustomizeBaseRateWidMarkup) + parseFloat(CustomizeExtraMarkupGST)).toFixed(2);
                
                $(".custom_addmarkup_gst_"+idIndex).html(CustomExtraMarkUpGST);
                $(".GSTonExtramarkup_"+idIndex).val(CustomExtraMarkUpGST);
                
                $(".finalAllIncHTML_"+idIndex).html(CustomFinalPrice);
                $(".finalAllInc_"+idIndex).val(CustomFinalPrice);
                
                
            });
            
               
               
            
        });
        
        </script>




<?php 
	}
	if($vars['type'] == 'hotelPreviewForm'){
		
		
		$customerDetails = $vars['customerDetails'];
		$agentDetails = $vars['agentDetails'];
		$agencyDetails = $vars['agencyDetails'];
                $data = $vars['data'];
		$roommeminfo = json_decode(base64_decode($data[0]));
		$roomMemInfoJson = $roommeminfo->sessionhotelDirectSearchData->memberDetails;
		//$sessionhotelDirectSearchData=
		//echo "<pre>";print_r($agencyDetails);
		?>
                <div class="col-md-12 no-padding" style="margin-top:15px;">
                	<div class="form-group form-group1 no-margin">
                    	
                        <div class="col-md-4 col-sm-4">
                          <div class="col-md-12 no-padding">
                            <div class="panel panel-default">
                              <div class="panel-body text-center whbg"> 
                                  <a href="javascript:void(0);">
                                      <img  height="58" alt="logo" src="<?php echo $agencyDetails['Logo']?$this->baseUrl('public/upload/media/agency/'.$agencyDetails['AgencySysId'].'/'.$agencyDetails['Logo'].''):$this->baseUrl('public/images/tripsbanklogo.png'); ?>">
                                  </a> 
                              </div>                              
                            </div>
                          </div>
                        </div>
                        
                        <?php if(isset($agentDetails['AgentName']) && !empty($agentDetails['AgentName'])){ ?>
                        
                        <div class="col-md-8 col-sm-8">
                          <div class="col-md-12 no-padding">
                            <div class="panel panel-default">                              
                              <div class="panel-body text-right">
                              	Agency Name : <span class="customername"><?php echo stripslashes(trim($agencyDetails['PrimaryContactName'])); ?></span><br />
                              	Agent Name : <span class="customername"><?php echo stripslashes($agentDetails['AgentName']); ?></span><br />
                                Agent Contact : <span class="customername"><?php echo $agentDetails['AgentContact']?stripslashes($agentDetails['AgentContact']):'NA'; ?></span><br />
                              </div>
                            </div>
                          </div>
                        </div>
                        <?php } ?>
                        
                    <div class="clearfix"></div></div>

                </div>
                
                <div class="col-md-12 panel-body">
                        <?php if(isset($customerDetails['FirstName']) && !empty($customerDetails['FirstName'])){
							
							 ?>
                  Dear <span class="customername"><?php echo stripslashes($customerDetails['FirstName']); ?></span><br /><br />
                  <?php } $res=json_decode(base64_decode($vars['data'][0]));?>
                  As per your request, we are forwarding itineraries from <?php echo stripslashes($res->cityName); ?> on <?php echo date('l, d F Y',strtotime(str_replace("/","-",$res->checkInDate))); ?>
                </div>  
            <div class="alert alert-info col-md-12">
                
                <div class="col-md-6 col-sm-6 no-padding">
                <?php if(isset($vars['leadId']) && !empty($vars['leadId'])){ ?><strong>Query Id: <?php echo base64_decode($vars['leadId']); ?></strong><br /><?php } ?>
                  <?php echo stripslashes($res->cityName); ?>
                </div>
                
                <div class="col-md-6 col-sm-6 no-padding text-right black-color">
                <?php $h=1;
				for($g=0;$g<count($roomMemInfoJson);$g++){
					if($roomMemInfoJson[$g]->AdultPax > 0){
						$childpax=' ,'.$roomMemInfoJson[$g]->ChildPax.' Child(Ren)';
					}
					echo "Room ".$h.': '.$roomMemInfoJson[$g]->AdultPax.' Adult(S)'.$childpax."<br/>"; 
					$h++;
				}
				?>
				
                </div>
                
           <div class="clear"></div></div>
		 <?php
            $s=1;
            if(!empty($data) ){
            for($i=0;$i<count($data);$i++){
                $result= json_decode(base64_decode($data[$i]));
				//echo "<pre>"; print_r($result);
				$intICSourceSysId=$result->intICSourceSysId;
                                
                                
                                $markUp=$vars['markUp'][$i];
                                $taxType = 0;
                                if($result->intICSourceSysId==3){
						$taxType=8;
					}
					if($result->intICSourceSysId==4){
						$taxType=9;
					}
                                        if($result->intICSourceSysId=="Inv"){
						$taxType=10;
					} 
                                        
//				$taxType=($result->SupplierSysId==3)?8:9;
				$taxdetailforagency = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($markUp,"H",$taxType);
				$vars['Tax']=($taxdetailforagency['serviceTaxAmount'] > 0)?$taxdetailforagency['serviceTaxAmount']:0;
				$agentMarkup=$markUp+$vars['Tax'];
				//$finalPrice=$vars['netPrice'][$i]+$vars['AgencyMarkUp'][$i]+$vars['GTXmarkUp'][$i]+$agentMarkup;


					//service tax for base fare
					$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($vars['netPrice'][$i],"H",$taxType);
					$netPriceArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;
					//service tax for GTX MarkUp
					$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($vars['GTXmarkUp'][$i],"H",$taxType);
					$GTXMarkupArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;
					//service tax for Agency MarkUp
					$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($vars['AgencyMarkUp'][$i],"H",$taxType);
					$AgencyMarkupArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;
					//service tax for Agent MarkUp
					$arrServiceTaxOnNetPayable = Zend_Controller_Action_HelperBroker::getStaticHelper('Hotel')->getApiServiceTax($vars['markUp'][$i],"H",$taxType);
					$MarkupArrayServiceTax = !empty($arrServiceTaxOnNetPayable['serviceTaxAmount'])?$arrServiceTaxOnNetPayable['serviceTaxAmount']:0;
					//end of service tax 
					//echo $netPriceArrayServiceTax."/".$GTXMarkupArrayServiceTax."/".$AgencyMarkupArrayServiceTax."/".$MarkupArrayServiceTax;
					$Taxes=0;
					$finalPrice=round($vars['netPrice'][$i]+$vars['markUp'][$i]+$vars['GTXmarkUp'][$i]+$vars['AgencyMarkUp'][$i]+$Taxes+$netPriceArrayServiceTax+$GTXMarkupArrayServiceTax+$AgencyMarkupArrayServiceTax+$MarkupArrayServiceTax);
					$travelPlanObj=new Travel_Model_CRM_CustomerTravelPlan();
					$currencyTypeArr = $travelPlanObj->GetCurrencyByCurrencyType($result->CurrencyType);
					$CurrSymbol = $currencyTypeArr['Symbol'];
                                        
                                        
                                        
                                        $rateType = $vars['rateType'][$i];
                                        if($rateType == 'custom'){
                                            $finalPrice = $vars['CustomFinalPrice'][$i];
                                        }
                                        
                                        
                                        

    	?>
            <div class="col-md-12 overflowflight">
           <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="col-md-6 col-sm-6 no-padding panel-title"><?php echo stripslashes($result->hotelName); ?> <span class="small"><?php echo $result->title; ?></span></h3>
                    <h3 class="col-md-6 col-sm-6 no-padding text-right panel-title">Fare : <?php echo $CurrSymbol.' '.round($finalPrice); ?></h3>                                           
                <div class="clear"></div></div>
                <div class="panel-body">                                            
                    <div class="alert alert-info" style="margin-bottom:0px;">
                    <div class="col-md-6">
                      <table style="margin-bottom:0;" data-sortable="" class="table">
                        <tbody>
                          <tr>
                            
                            <td style="border-top:none;"><h5 class="text-danger"><?php echo stripslashes($result->hotelName); ?>
                                    <span style="font-size:12px;">(<?php echo ($result->intICSourceSysId==4 || $result->intICSourceSysId==3)?'API':'Inv'; ?>)</span>
                                </h5>
                             <?php echo trim(stripslashes(str_replace(array(', ,',', , ,'),",",$result->address))); ?><br>
                             <?php echo $this->starRating($result->stars); ?>
				        </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
            
              <div class="col-md-6">
              
 
              <table style="margin-bottom:0; text-align:right;" data-sortable="" class="table">
                <tbody>
                  <tr>
                    <td style="border-top:none;"><strong class="text-danger"> Check In</strong> :<?php echo date('d M Y',strtotime(str_replace("/","-",$result->checkInDate))); ?></td>
                  </tr>
                  
                   <tr>
                    <td style="border-top:none;"><strong class="text-danger"> Check Out </strong> :<?php echo date('d M Y',strtotime(str_replace("/","-",$result->checkOutdate))); ?></td>
                  </tr>
                   <tr>
                    <td style="border-top:none;"><strong class="text-danger"> Nights </strong> :<?php echo ($result->nights > 0)?$result->nights:0; ?></td>
                  </tr>
                </tbody>
              </table>
            </div>
           <div class="clear"></div></div>
                    <div class="clear">&nbsp;</div>
                    <div class="col-md-12 no-padding text-right graytxt">
                     <?php if($intICSourceSysId == '4'){ ?>
<!--                    <a style="cursor:pointer;" data-dismiss="modal" data-target="#myModa1vewDetail" data-toggle="modal" onclick="getHotelRoomInfo('<?php echo trim($result->hotelId);?>','<?php echo $intICSourceSysId; ?>','<?php echo trim($result->hotelTraceId);?>','<?php echo trim($result->hotelCode); ?>','#roomrates');$('#myModa1Emailpreview').modal();" target="_blank">Book Now</a>  
                    <a style="display:none;" href="<?php echo $this->baseUrl('/proposal/preview-hotel-result/pid/'.base64_encode($this->customerDetail['CRMCustSysId'])); ?>" target="_blank">Enquire</a>-->
					<?php }else if($intICSourceSysId == '3'){ ?>                    
<!--                    <a style="cursor:pointer;" data-dismiss="modal" data-target="#myModa1vewDetail" data-toggle="modal" onclick="getSearchAccomoIdFromAPI('<?php echo trim($result->hotelResultIndex);?>','<?php echo trim($result->hotelCode);?>','<?php echo trim($result->hotelStrUserIp); ?>','<?php echo trim($result->hotelTokenId); ?>','<?php echo trim($result->hotelTraceId);?>','<?php echo $vars['finalPrice'][$i]; ?>','1','<?php echo $result->markupType; ?>','<?php echo round($result->addMarkup); ?>','<?php echo $vars['finalPrice'][$i]; ?>','#roomrates');$('#myModa1Emailpreview').modal();" target="_blank">Book Now</a>  
                    <a style="display:none;" href="<?php echo $this->baseUrl('/proposal/preview-hotel-result/pid/'.base64_encode($this->customerDetail['CRMCustSysId'])); ?>" target="_blank">Enquire</a>-->
					<?php } ?>
                    </div>
                </div>
            </div>
            
          </div>
           <?php }
			} else {
			?>
            <div class="col-md-12 overflowflight">
           <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="col-md-6 col-sm-6 no-padding panel-title">No result found .Please try after some time.</h3>
                <div class="clear"></div></div>
            </div>
            </div>
            <?php	
			}
	}
	if(isset($vars['data']) && !empty($vars['data']) && count($vars['data']) > 0 && $vars['type'] == 'hotelSupplierSendEmailForm'){
		$supplierDetails=$vars['supplierDetails'];
		//echo "<pre>";print_r($vars['data']);
		?>
                    <div class="modal-body">
                    
                       
                       <div class="col-md-12 no-padding table-responsive">
                            <table class="table table-bordered">
                                <tbody>
                                    <tr class="alert alert-graylight">
                                        <th><strong>Supplier Name</strong></th>
                                        <th><strong>Location</strong></th>
                                        <th><strong>Type</strong></th>
                                        <th><strong>Contact No</strong></th>
                                        <th><strong>Email ID</strong></th>
                                    </tr>
                                   
                                <tr>
                                 <?php if(!empty($supplierDetails) ){ ?>
                                    <td><?php echo (trim($supplierDetails['SupplierName'])!='')?stripslashes($supplierDetails['SupplierName']):'NA'; ?></td>
                                    <td><?php echo (!empty($supplierDetails['Address']))?stripslashes($supplierDetails['Address']):stripslashes($supplierDetails['CountryName'])."&nbsp;".stripslashes($supplierDetails['CityName']); ?></td>
                                    <td>Hotel</td>
                                    <td><?php echo (trim($supplierDetails['ContactNo'])!='')?stripslashes($supplierDetails['ContactNo']):'NA'; ?></td>
                                    <td><?php echo (trim($supplierDetails['EmailId'])!='')?stripslashes($supplierDetails['EmailId']):'NA'; ?>
                                    <input type="hidden" name="suppemailID" id="suppemailID" value="<?php echo (trim($supplierDetails['EmailId'])!='')?stripslashes($supplierDetails['EmailId']):'NA'; ?>" />
                                    <input type="hidden" name="suppID" id="suppID" value="<?php echo (trim($supplierDetails['SupplierSysId'])!='')?trim($supplierDetails['SupplierSysId']):'NA'; ?>" />
                                    </td>
                                    <?php } else { ?>
                                    <td colspan="5" align="center"><strong>No record found</strong></td>
                                    <?php } ?>
                                </tr>
                                </tbody>
                            </table>
                       </div>
                    <div class="clear"></div></div>
                    <div class="modal-header">
                        <h4 class="modal-title" id="myModalLabel">Query Details</h4>
                    </div>
                    <div class="modal-body">
                        <div class="col-md-12 no-padding table-responsive ">
                        
                        <div style="clear:both;"></div>
                        <table class="table table-bordered">
                                    <tbody>
                                        <tr class="alert alert-graylight">
                                            <th><strong>Type </strong></th>
                                            <th><strong>Name</strong></th>
                                            <th><strong>Total Pax</strong></th>
                                            <th><strong>Rooms</strong></th>
                                            <th><strong>Night</strong></th>
                                            <th><strong>Date</strong></th>
                                        </tr>
                                    <tr>
                                        <td>Hotel</td>
                                        <td>
                                            <?php echo (trim($vars['data']['hotelName'])!='')?stripslashes($vars['data']['hotelName']):'NA'; ?><br/>
                                            <?php echo trim($vars['data']['EconomyTypeTitle']); ?> <?php echo (trim($vars['data']['MealPlanTypeTitle'])!="")?"(".trim($vars['data']['MealPlanTypeTitle']).")":''; ?> 
                                        </td>
                                        <td><?php echo $vars['data']['sessionhotelDirectSearchData']['totalMemberCount']['AdultPax']+$vars['data']['sessionhotelDirectSearchData']['totalMemberCount']['ChildPax'];?> (<?php echo $vars['data']['sessionhotelDirectSearchData']['totalMemberCount']['AdultPax']>0?$vars['data']['sessionhotelDirectSearchData']['totalMemberCount']['AdultPax']:0; ?> Adults <?php echo $vars['data']['sessionhotelDirectSearchData']['totalMemberCount']['ChildPax']>0?$vars['data']['sessionhotelDirectSearchData']['totalMemberCount']['ChildPax']."Child":'';  ?>) </td>
                                        <td><?php echo $vars['data']['sessionhotelDirectSearchData']['hotelTotalRooms'];?> (<?php echo trim($vars['data']['InvHotelRoomType'])?$vars['data']['InvHotelRoomType']:'NA';?>)</td>
                                        <td><?php echo (trim($vars['data']['nights'])!='')?stripslashes($vars['data']['nights']):0; ?></td>
                                        <td><?php echo $vars['data']['sessionhotelDirectSearchData']['hotelFromDateSession']." - ".$vars['data']['sessionhotelDirectSearchData']['hotelToDateSession']; ?></td>
                                    <input type="hidden" name="hotelArray" id="hotelArray" value="<?php echo base64_encode(json_encode($vars['data'])); ?>" />

                                    </tr>
                                    </tbody>
                                </table>
                           </div>
                        <div style="clear:both;"></div>
                    </div>
	<script>$(document).ready(function(){
    $('.createQueryCustomer').on('ifChecked ifUnchecked', function(event){
        //$(".sendmail").show();
        var checkedVals = $('.createQueryCustomer:checkbox:checked').length;
        if(checkedVals > 0){
            $(".sendmail-customer,.supppleaseWait").show();
        }else{
            $(".sendmail-customer,.supppleaseWait").hide();
        }
    });
    
    });
    </script>
	<?php 
	} 	
	if($vars['type'] == 'customerMembersList'){ 
		$result=$vars['data'];
		//echo "<pre>";print_r($result);
		if(!empty($result) ){
		   $arrMemberRelation = unserialize(ARR_CUSTOMER_RELATION);
	   		$ARR_SALUTION=unserialize(ARR_SALUTION);
			//for self 
			if(!empty($result['SELF']) ){				
					   $membersDetails['CustomerSysId']=trim($result['SELF']['CustomerSysId']);
					   $membersDetails['Title']=isset($result['SELF']['Title'])?trim($result['SELF']['Title']):1;
					   $membersDetails['FirstName']=trim($result['SELF']['FirstName']);
					   $membersDetails['LastName']=trim($result['SELF']['LastName']);
					   $membersDetails['Relation']=trim($result['SELF']['Relation'])?trim($result['SELF']['Relation']):0;
					   $membersDetails['Address']=trim(@$result['SELF']['Address']);
					   $membersDetails['Contacts']=trim($result['SELF']['Contacts']);
					   $membersDetails['EmailId']=trim($result['SELF']['EmailId']);
					   $membersDetails['DOB']=!empty($result['SELF']['DOB'])?trim($result['SELF']['DOB']->format('d-M-y')):'';
				?>
						<li class="memberrow_0">
							<label id="custMemberLabel_0" class="checkbox no-margin custMemberLabel" onclick="getSelectedCustMember('AmembersDetails_<?php echo $result['SELF']['CustomerSysId']; ?>',0)" >
							<input class="icheck-black custMember" name="buyhotelchk" onclick="getSelectedCustMember('AmembersDetails_<?php echo $result['SELF']['CustomerSysId']; ?>')" type="checkbox" id="custMember_0" value="<?php echo $result['SELF']['CustomerSysId']; ?>">
                            <input type="hidden" name="membersDetails" id="AmembersDetails_<?php echo $result['SELF']['CustomerSysId']; ?>" value="<?php echo urlencode(json_encode($membersDetails)); ?>" />
							<input type="hidden" name="MemberSysId" id="MemberSysId" value="<?php echo @$result['SELF']['CustomerSysId']; ?>">
							<input type="hidden" name="MemberSysId" id="Mrelation_<?php echo @$result['SELF']['CustomerSysId']; ?>" value="<?php echo @$arrMemberRelation[$result['SELF']['Relation']];?>">
							<input type="hidden" name="MemberSysId" id="Mtitle_<?php echo @$result['SELF']['CustomerSysId']; ?>" value="<?php echo @$ARR_SALUTION[$result['SELF']['Title']];?>">
							<input type="hidden" name="MemberSysId" id="Mfirstname_<?php echo $result['SELF']['CustomerSysId']; ?>" value="<?php echo $result['SELF']['FirstName'];?>">
							<input type="hidden" name="MemberSysId" id="Mlastname_<?php echo $result['SELF']['CustomerSysId']; ?>" value="<?php echo $result['SELF']['LastName']; ?>">
							<?php echo $result['SELF']['FirstName'].' '.$result['SELF']['LastName'].' '.'( '.$arrMemberRelation[$membersDetails['Relation']].' ) .'; ?>
							</label>
						</li>
						<?php }			
			// end of for self
	 		for($i=0;$i<count($result['MEMBERS']);$i++){
                       $intMemberSysId = trim($result['MEMBERS'][$i]['MemberSysId']);
                       $intMCustomerSysId = trim($result['MEMBERS'][$i]['CustomerSysId']);
                       $intMTitle = trim($result['MEMBERS'][$i]['Title']);
                       $strMFirstName = trim($result['MEMBERS'][$i]['FirstName']);
                       $strMLastName = trim($result['MEMBERS'][$i]['LastName']);
                       $intMemberRel = trim($result['MEMBERS'][$i]['Relation']);
					   
					   $membersDetails['MemberSysId']=trim($result['MEMBERS'][$i]['MemberSysId']);
					   $membersDetails['CustomerSysId']=trim($result['MEMBERS'][$i]['CustomerSysId']);
					   $membersDetails['Title']=trim($result['MEMBERS'][$i]['Title']);
					   $membersDetails['FirstName']=trim($result['MEMBERS'][$i]['FirstName']);
					   $membersDetails['LastName']=trim($result['MEMBERS'][$i]['LastName']);
					   $membersDetails['Relation']=trim($result['MEMBERS'][$i]['Relation']);
					   $membersDetails['Address']=trim($result['MEMBERS'][$i]['Address']);
					   $membersDetails['Contacts']=trim($result['MEMBERS'][$i]['Contacts']);
					   $membersDetails['EmailId']=trim($result['MEMBERS'][$i]['EmailId']);
					   $membersDetails['DOB']=trim($result['MEMBERS'][$i]['DOB']->format('d-M-y'));
                       if(!empty($intMemberRel)){
                           $strMemberRelation = "(".$arrMemberRelation[$intMemberRel].")";
                       }else{
                           $strMemberRelation = "";
                       }
                       if(!empty($strMFirstName)){
                           ?>
                           	<li class="memberrow_<?php echo $intMemberSysId; ?>">
                                <label class="checkbox no-margin custMemberLabel" onclick="getSelectedCustMember('membersDetails_<?php echo $intMemberSysId; ?>',<?php echo $intMemberSysId; ?>)" type="checkbox" id="custMemberLabel_<?php echo $intMemberSysId; ?>" value="<?php echo $intMemberSysId; ?>">
                                <input name="buyhotelchk" class="icheck-black custMember" onclick="getSelectedCustMember('membersDetails_<?php echo $intMemberSysId; ?>')" type="checkbox" id="custMember_<?php echo $intMemberSysId; ?>" value="<?php echo $intMemberSysId; ?>">
                                <input type="hidden" name="membersDetails" id="membersDetails_<?php echo $intMemberSysId; ?>" value="<?php echo urlencode(json_encode($membersDetails)); ?>" />
                                <input type="hidden" name="MemberSysId" id="MemberSysId" value="<?php echo $intMemberSysId; ?>">
                                <input type="hidden" name="Mrelation" id="Mrelation_<?php echo $intMemberSysId; ?>" value="<?php echo $intMemberRel;?>">
                                <input type="hidden" name="Mtitle" id="Mtitle_<?php echo $intMemberSysId; ?>" value="<?php echo $ARR_SALUTION[$intMTitle];?>">
                                <input type="hidden" name="Mfirstname" id="Mfirstname_<?php echo $intMemberSysId; ?>" value="<?php echo $strMFirstName;?>">
                                <input type="hidden" name="Mlastname" id="Mlastname_<?php echo $intMemberSysId; ?>" value="<?php echo $strMLastName; ?>">
                                <?php echo $strMFirstName.' '.@$strMLastName.' '.$strMemberRelation; ?>
                                </label>
                            </li>
                           <?php 
                       }
                       
                   }
				
		}else{
			echo '<li><label class="checkbox no-margin">No Details Available!</label></li>';
		}
		?>
		<script src="<?php echo $this->baseUrl('public/assets/js/pages/checkboxRadio.js'); ?>"></script>
        <script src="<?php echo $this->baseUrl('public/assets/js/icheck.min.js'); ?>"></script>
        <script>
        $(document).ready(function(){
			 $('.iCheck-helper').click(function () {
				var parent = $(this).parent().parent().attr('id');
					$('#'+parent).trigger('click');
				
			});

		});
                
                
                
                
        </script>
        <?php
	}

	
?>

        
        

Youez - 2016 - github.com/yon3zu
LinuXploit