jerooski

prices

Nov 7th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 16.23 KB | None | 0 0
  1. <?php
  2.  
  3. define('DEV_SERVER', false);
  4.  
  5.  
  6. if(isset($_POST['rdoTipo']) && !empty($_POST['rdoTipo'])){
  7.     $Tipo = $_POST['rdoTipo'];
  8. }else{
  9.     $Tipo = 'A';
  10. }
  11.  
  12. if(isset($_POST['NombreH']) && !empty($_POST['NombreH'])){
  13.     $NombreH = $_POST['NombreH'];
  14. }else{
  15.     $NombreH = '';
  16. }
  17.  
  18. if(isset($_POST['IdCajaA']) && is_numeric($_POST['IdCajaA']) && intval($_POST['IdCajaA'])>0){
  19.     $IdCajaA = $_POST['IdCajaA'];
  20. }else{
  21.     $IdCajaA = 1;
  22. }
  23.  
  24. if(isset($_POST['IdHotel']) && is_numeric($_POST['IdHotel']) && intval($_POST['IdHotel'])>0){
  25.     $IdCajaH = $_POST['IdHotel'];
  26. }else{
  27.     $IdCajaH = 0;
  28. }
  29.  
  30. if(isset($_POST['iPasajeros']) && is_numeric($_POST['iPasajeros']) && intval($_POST['iPasajeros'])>0){
  31.     $iPasajeros = $_POST['iPasajeros'];
  32. }else{
  33.     $iPasajeros = 0;
  34. }
  35.  
  36. if($iPasajeros>=16 || $Tipo=='S'){
  37.     $url = "specialg.php?iPa=".base64_encode($iPasajeros)."&sTy=".base64_encode('S');
  38.    
  39.     if($NombreH!=''){
  40.         $url.="&na=".base64_encode(base64_encode($NombreH))."&t=".base64_encode(base64_encode($Tipo));
  41.     }
  42.     header("Location: ".$url);
  43. }
  44. ?>
  45. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  46. <html lang="en">
  47. <head>
  48. <meta charset="UTF-8">
  49. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  50. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  51. <title>Shuttle Reservation NiceRideCabo</title>
  52.  
  53. <!-- Main css -->
  54. <link rel="stylesheet" href="css/style_prices.css">
  55.  
  56. <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
  57. <script src="js/cufon-yui.js" type="text/javascript"></script>
  58. <script src="js/cufon-replace.js" type="text/javascript"></script>
  59. <script src="js/Swis721_Lt_BT_400.font.js" type="text/javascript"></script>
  60. <script type="text/javascript" src="js/jquery.ui.core.min.js"></script>
  61. <script type="text/javascript" src="js/jquery.ui.widget.min.js"></script>
  62. <script type="text/javascript" src="js/jquery.ui.position.min.js"></script>
  63. <script type="text/javascript">
  64. $(document).ready(function(){
  65.    
  66.     document.frmPrices.rdoTipo[0].focus();
  67.  
  68.     $('.rdoTipo').click(function(){
  69.         TipoFocus();
  70.        
  71.         $("#iPasajeros").val(0);
  72.        
  73.         var tipo = $(this).val();
  74.  
  75.         $('#NombreH').attr("disabled","");
  76.        
  77.         switch(tipo){
  78.             case 'A':
  79.                 if($("#IdHotel").val()==''){
  80.                     $('#NombreH').click();
  81.                 }else{
  82.                     $('#iPasajeros').focus();
  83.                 }
  84.                 $("#lyrMsgHotel").html('Please write down the name of the<br />place where you will be staying at.');
  85.                 break;
  86.             case 'D':
  87.                 if($("#IdHotel").val()==''){
  88.                     $('#NombreH').click();
  89.                 }else{
  90.                     $('#iPasajeros').focus();
  91.                 }
  92.                 $("#lyrMsgHotel").html('Location where we will pick<br />you up to take you to the airport.');
  93.                 break;
  94.             case 'S':
  95.                 $('#NombreH').val('');
  96.                 $("#IdHotel").val('');
  97.                 $('#NombreH').attr("disabled","disabled");
  98.                 $('#iPasajeros').focus();
  99.                 break;
  100.         }
  101.     });
  102.    
  103.     $('#NombreH').click(function(){
  104.         $("#NombreH").select();
  105.         HotelFocus();
  106.     });
  107.    
  108.     $('#btnReset').click(function(){
  109.         for(i=0;i<document.frmPrices.rdoTipo.length;i++){
  110.             document.frmPrices.rdoTipo[i].checked=false;
  111.         }
  112.         $('#NombreH').val('');
  113.         $('#IdHotel').val('');
  114.        
  115.         $("#bordeFocus").animate({ left:"-15px"},250);
  116.         $('#lyrMsgRadios').show('slow');
  117.         TipoFocus();
  118.     });
  119.    
  120.     $('#iPasajeros').focus(function(){
  121.         PasajerosFocus();
  122.     });
  123.    
  124.     $("#iPasajeros").change(function(){
  125.         var tipo = '';
  126.         for(i=0;i<document.frmPrices.rdoTipo.length;i++){
  127.             if(document.frmPrices.rdoTipo[i].checked==true){
  128.                 tipo = document.frmPrices.rdoTipo[i].value;
  129.             }
  130.         }
  131.        
  132.         if(tipo==''){
  133.             $(this).val(0);
  134.             $("#bordeFocus").animate({ left:"-15px"},250);
  135.             $('#lyrMsgRadios').show('slow');
  136.             TipoFocus();
  137.  
  138.             return;
  139.         }
  140.        
  141.         if(tipo!='S' && $("#IdHotel").val()==''){
  142.             $(this).val(0);
  143.             HotelFocus();
  144.             return;
  145.         }
  146.        
  147.         $('#frmPrices').submit();
  148.     });
  149.    
  150. });
  151.  
  152. function TipoFocus(){
  153.     //$("#bordeFocus").animate({ left:"-15px"},250);
  154.    
  155.     //$('#lyrMsgRadios').show('slow');
  156.    
  157.     $('#lyrMsgHotel').hide('slow');
  158.    
  159.     $('#lyrMsgPasajeros').hide('slow');
  160.  
  161.     document.frmPrices.rdoTipo[0].focus();
  162. }
  163.  
  164. function HotelFocus(){
  165.     $("#bordeFocus").animate({ left:"185px"},1000);
  166.  
  167.     $('#lyrMsgRadios').hide('slow');
  168.  
  169.     $('#lyrMsgHotel').show('slow');
  170.    
  171.     $('#lyrMsgPasajeros').hide('slow');
  172.    
  173.     $("#iPasajeros").val(0);
  174. }
  175.  
  176. function PasajerosFocus(){
  177.     $("#bordeFocus").animate({ left:"371px"},1000);
  178.    
  179.     $('#lyrMsgRadios').hide('slow');
  180.  
  181.     $('#lyrMsgHotel').hide('slow');
  182.    
  183.     $('#lyrMsgPasajeros').show('slow');
  184. }
  185.  
  186. function actualizaMapa(){
  187.     $('#Mapa').attr("src","imagenes/img/zona"+$('#IdZonaH').val()+".jpg");
  188. }
  189.  
  190. function fancyClick(id){
  191.     $('#'+id).click();
  192. }
  193. </script>
  194. <script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
  195. <script type="text/javascript" src="fancybox/jquery.fancybox-1.3.1.js"></script>
  196. <link type="text/css" href="styles/jquery.ui.core.css" rel="stylesheet" />
  197. <link type="text/css" href="styles/jquery.ui.theme.css" rel="stylesheet" />
  198. <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.1.css" media="screen" />
  199. <style type="text/css">
  200. .text2reser:hover {
  201.     font-family: "Gill Sans MT";
  202.     font-size: 18px;
  203.     color: #FFF;
  204.     text-align: center;
  205. }
  206. a:link {
  207.     color: #52421D;
  208.     text-decoration: none;
  209. }
  210. a:hover {
  211.     color: #52421D;
  212.     text-decoration: none;
  213. }
  214. body,td,th {
  215.     color: #52421D;
  216. }
  217.  
  218. a:visited {
  219.     color: #52421D;
  220.     text-decoration: none;
  221. }
  222. a:active {
  223.     color: #52421D;
  224.     font-size: 18px;
  225.     text-decoration: none;
  226. }
  227. #apDiv1 {
  228.     position:absolute;
  229.     left:55px;
  230.     top:264px;
  231.     width:125px;
  232.     height:105px;
  233.     z-index:1;
  234.     background-image: url(imagenes/img/sello.png);
  235.     background-repeat: no-repeat;
  236. }
  237. </style>
  238. <script src="js/jquery.tooltip.min.js" type="text/javascript"></script>
  239. <script type="text/javascript">
  240. $(function() {
  241.     var cache = {};
  242.     $( "#NombreH" ).autocomplete({
  243.         minLength: 1,
  244.         source: function(request, response) {
  245.             if ( request.term in cache ) {
  246.                 response( cache[ request.term ] );
  247.                 return;
  248.             }
  249.            
  250.             $.ajax({
  251.                 url: "ajax_hoteles.php",
  252.                 dataType: "json",
  253.                 data: request,
  254.                 success: function( data ) {
  255.                     cache[ request.term ] = data;
  256.                     response( data );
  257.                 }
  258.             });
  259.         },
  260.         select: function(event, ui) {
  261.             $("#IdHotel").val(ui.item.id);
  262.             $('#iPasajeros').focus();
  263.             return;
  264.         }
  265.     });
  266. });
  267.  
  268. $(document).ready(function() {
  269.     $("a#thearch").fancybox({
  270.         'titlePosition' : 'over'
  271.     });
  272.     $("a#TheMarinaatPuertoLosCabos").fancybox({
  273.         'titlePosition' : 'over'
  274.     });
  275.     $("a#todossantos").fancybox({
  276.         'titlePosition' : 'over'
  277.     });
  278.     $("a#MarinaCaboSanLucas").fancybox({
  279.         'titlePosition' : 'over'
  280.     });
  281.     $("a#airport").fancybox({
  282.         'titlePosition' : 'over'
  283.     });
  284. });
  285.    
  286. $(function() {
  287.     //$("map > area").tooltip({ positionLeft: false });
  288.     $("#AreaTodosSantos").tooltip({ positionLeft: false,top:-40});
  289.     $("#AreaArco").tooltip({ positionLeft: false,top:-40});
  290.     $("#AreaAirport").tooltip({ positionLeft: false,top:-40});
  291.     $("#AreaMarinaCabos").tooltip({ positionLeft: false,top:-40});
  292.     $("#AreaMarinaPuerto").tooltip({ positionLeft: false,top:-40});
  293.  
  294.     $("#AreaWalmart").tooltip({ positionLeft: false,top:-40});
  295.     $("#AreaCosco").tooltip({ positionLeft: false,top:-40});
  296.     $("#AreaMega").tooltip({ positionLeft: false,top:-40});
  297. });
  298.  
  299. function MM_preloadImages() { //v3.0
  300.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  301.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  302.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  303. }
  304. function MM_swapImgRestore() { //v3.0
  305.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  306. }
  307. function MM_findObj(n, d) { //v4.01
  308.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  309.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  310.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  311.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  312.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  313. }
  314.  
  315. function MM_swapImage() { //v3.0
  316.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  317.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  318. }
  319. </script>
  320.   </head>
  321.  
  322.   <!--Inicio Contenido -->  
  323.  
  324. <body>
  325.     <div class="main">
  326.         <div class="container">
  327.             <div class="signup-content">
  328.                 <div class="signup-img">
  329.                     <img src="images/form-img.jpg" alt="">
  330.                     <div class="signup-img-content">
  331.                     </div>
  332.                 </div>
  333.                 <div class="signup-form">
  334.                     <form method="POST" class="register-form" id="register-form">
  335.                         <div class="form-row">
  336.                             <div class="form-group">
  337.                                <h1 style="text-align: center;">Private</h1>
  338.                                
  339.    
  340.  
  341.  <?php
  342.    
  343.     if($IdCajaA>0 && $IdCajaH>0 && $iPasajeros>0){
  344.         //$_SERVER['DOCUMENT_ROOT'] = " /home/juancar0/public_html";
  345.                  require_once($_SERVER['DOCUMENT_ROOT'].'/Clases/Tablas/cat_DeTarifas.php');
  346.         $cat_DeTarifas = new cat_DeTarifas();
  347.  
  348.         $cat_DeTarifas->setIdOrigen($IdCajaA);
  349.         $cat_DeTarifas->setIdDestino($IdCajaH);
  350.         $aTarifas = $cat_DeTarifas->getLst();
  351.  
  352.         //$_SERVER['DOCUMENT_ROOT'] = " /home/juancar0/public_html";
  353.                  require_once($_SERVER['DOCUMENT_ROOT'].'/Clases/Registro/reg_lugares.php');
  354.         //$_SERVER['DOCUMENT_ROOT'] = " /home/juancar0/public_html";
  355.                  require_once($_SERVER['DOCUMENT_ROOT'].'/Clases/Registro/reg_paquetes.php');
  356.         //$_SERVER['DOCUMENT_ROOT'] = " /home/juancar0/public_html";
  357.                  require_once($_SERVER['DOCUMENT_ROOT'].'/Clases/Registro/reg_traslados.php');
  358.         //$_SERVER['DOCUMENT_ROOT'] = " /home/juancar0/public_html";
  359.                  require_once($_SERVER['DOCUMENT_ROOT'].'/Clases/Registro/reg_autos.php');
  360.        
  361.         $ObjHotel = new reg_Lugares($IdCajaH);
  362.        
  363.         if(count($aTarifas)>0){
  364.         ?>
  365.         <center>
  366.           <tr>
  367.             <?php
  368.             $arrAutoPaquete = array();
  369.             $arrAutoPaqueteTraslado = array();
  370.             $i2=0;
  371.             foreach($aTarifas as $ta1){
  372.                 foreach($aTarifas as $ta2){
  373.                     if($ta2->getId_auto()==$ta1->getId_auto()){
  374.                         if(!in_array($ta1->getId_auto()."-".$ta2->getId_paquete(),$arrAutoPaquete)){
  375.                             $arrAutoPaquete[]=$ta1->getId_auto()."-".$ta2->getId_paquete();
  376.                             $oPaq = new reg_Paquetes($ta2->getId_paquete());
  377.                             if($ta2->getId_auto()==0 || ($ta2->getId_auto()==1 && ($iPasajeros>=1 && $iPasajeros<=6)) || ($ta2->getId_auto()==2 && ($iPasajeros>=7 && $iPasajeros<=15))){
  378.                                 if($i2>0){
  379.                             ?>
  380.                             </div>
  381.                             <div class="form-group">
  382.                             <h1 style="text-align: center;">Shuttle</h1>
  383.                             <td width="20px"></td>
  384.                             <?php
  385.                                 }#if($i2>0)
  386.                                
  387.                                 ?>
  388.                                 <td valign="top">
  389.                                     <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center">
  390.                                       <tr>
  391.                                         <td colspan="3" align="center"><img src="imagenes/img/auto<?php echo $ta2->getId_auto();?>.png" alt="" height="122" width="256" /></td>
  392.                                       </tr>
  393.                                       <tr>
  394.                                         <td colspan="3" height="20px"></td>
  395.                                       </tr>
  396.                                     <!--  <tr height="35px">
  397.                                         <td width="45px" align="right"><img src="imagenes/img/izq_<?php echo $ObjHotel->getId_zona();?>.png" height="35" alt="" /></td>
  398.                                         <td width="100%" background="imagenes/img/centro_<?php echo $ObjHotel->getId_zona();?>.png" align="center" class="titulos" valign="middle"><font color="#625C1D" face="Georgia, Times New Roman, Times, serif"><?php echo $oPaq->getDescripcion();?></font></td>
  399.                                         <td width="45px" align="left"><img src="imagenes/img/der_<?php echo $ObjHotel->getId_zona();?>.png" height="35" alt="" /></td>
  400.                                       </tr>-->
  401.                                       <tr>
  402.                                         <td colspan="3" height="15px"></td>
  403.                                       </tr>
  404.                                       <?php
  405.                                       $i3=0;
  406.                                       foreach($aTarifas as $ta3){
  407.                                           #if($Tipo=='A'){
  408.                                           if($ta3->getId_paquete()==$ta2->getId_paquete() && $ta3->getId_auto()==$ta2->getId_auto()){
  409.                                               if(!in_array($ta1->getId_auto()."-".$ta2->getId_paquete()."-".$ta3->getId_traslado(),$arrAutoPaqueteTraslado)){
  410.                                                   $arrAutoPaqueteTraslado[] = $ta1->getId_auto()."-".$ta2->getId_paquete()."-".$ta3->getId_traslado();
  411.                                                   $oTras = new reg_Traslados($ta3->getId_traslado());
  412.                                                   if($Tipo=='A' || ($Tipo=='D' && $oTras->getId()==1 )){
  413.                                                   if($i3>0){
  414.                                                   ?>
  415.                                                   <tr>
  416.                                                     <td colspan="3" height="10px"></td>
  417.                                                   </tr>  
  418.                                                   <tr>
  419.                                                     <td colspan="3" bgcolor="#CFB53B" height="1px"></td>
  420.                                                   </tr>
  421.                                                   <tr>
  422.                                                     <td colspan="3"height="10px"></td>
  423.                                                   </tr>
  424.                                                   <?php
  425.                                                   }#if($i3>0)
  426.                                                   if (($iPasajeros<2)&&($ta3->getId_auto()==0)){
  427.                                                       if($oTras->getDescripcion()=='Round Trip'){}
  428.                                                       else{?>
  429.                                                   <tr>
  430.                                                     <td colspan="3" align="center"></td>
  431.                                                   </tr>
  432.                                                   <tr>
  433.                                                   <td <? if ($Tipo=='D'){?> height="100"<? }?>colspan="3" align="center" valign="middle">
  434.                                                   <br />
  435.                                                     <b>We have a minimum <br />of 2 passengers for our <br />shuttle transportation.</b>
  436.                                                     <br /></td>
  437.                                                   </tr>
  438.                                                   <tr>
  439.                                                     <td colspan="3"height="10px"></td>
  440.                                                   </tr>
  441.                                                   <tr>
  442.                                                     <td colspan="3" align="center" ></td>
  443.                                                   </tr>
  444.                                                   <?
  445.                                                       }
  446.                                                   }
  447.                                                   else{
  448.                                                   ?>
  449.                                                   <tr>
  450.                                                     <td colspan="3" align="center"><?php echo $oTras->getDescripcion();?> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ <?php echo number_format($ta3->getCosto(),2);?> USD</td>
  451.                                                   </tr>
  452.                                                   <tr>
  453.                                                     <td colspan="3" align="center"><?php if($ta3->getId_auto()==0){?>Total (X<?php echo $iPasajeros;?>) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ <?php echo number_format($iPasajeros*$ta3->getCosto(),2);?> USD<?php }else{?>&nbsp;<?php }?></td>
  454.                                                   </tr>
  455.                                                   <tr>
  456.                                                     <td colspan="3"height="10px"></td>
  457.                                                   </tr>
  458.                                                   <tr>
  459.                                                     <td colspan="3" class="backbuton" align="center" ><a href="reserve.php?id=<?php echo base64_encode($ta3->getId_tarifa());?>&amp;iPasajeros=<?php echo base64_encode($iPasajeros);?>&amp;Tipo=<?php echo base64_encode($Tipo);?>&amp;car=<?php echo base64_encode($oPaq->getDescripcion());?>">Reserve now</a></td>
  460.                                                   </tr>
  461.                                                   <?php
  462.                                                   }
  463.                                                   $i3++;
  464.                                                   }
  465.                                               }//if(!in_array($ta1->getId_auto()."-".$ta2->getId_paquete()."-".$ta3->getId_traslado(),$arrAutoPaqueteTraslado))
  466.                                           }//if($ta3->getId_paquete()==$ta2->getId_paquete() && $ta3->getId_auto()==$ta2->getId_auto())
  467.                                           #}
  468.                                       }#foreach($aTarifas as $ta3)
  469.                                       ?>
  470.                                     </table>
  471.                                 </td>
  472.                                 <?php
  473.                                 $i2++;
  474.                             }//if($iPasajeros==0 || ($ta2->getId_auto()==1 && ($iPasajeros>=1 && $iPasajeros<=6)) || ($ta2->getId_auto()==2 && ($iPasajeros>=7 && $iPasajeros<=15)))
  475.                         }#if(!in_array($ta1->getId_auto(),$arrAuto)){
  476.                     }#if($ta2->getId_auto()==$ta1->getId_auto()){
  477.                 }#foreach($aTarifas as $ta2)
  478.             }#foreach($aTarifas as $ta1)
  479.             ?>
  480.           </tr>
  481.         </table>
  482.         </center>
  483.         </div>
  484.         </div>
  485.         <?php
  486.         }#if(count($aTarifas)>0)
  487.     }#if($IdLugarO>0 && $IdLugarD>0 && $iPasajeros>0){
  488.     ?>
  489. <br>
  490. <br>
  491.     <div align="center">
  492.     <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-left: 0px;margin-right: 0px;">
  493.       <tr height="35px">
  494.         <h1 align="center" class="titulos" style="margin-top: 0px;margin-bottom: 0px;"><font color="#52421D" font size="5px" font weight="500" face="Poppins, sans-serif">Zone <?php echo $ObjHotel->getId_zona();?></font></h1>
  495.       </tr>
  496.       <tr>
  497.         <td colspan="3" align="center" class="zonaimg"><img src="imagenes/img/zona<?php echo $ObjHotel->getId_zona();?>_.png" alt="" /></td>
  498.       </tr>
  499.     </table>
  500.  
  501.     </div>
  502.    
  503.     </div>
  504. <!--Fin de Contenido -->
  505.   </div>
  506. </body>
  507. </html>
Add Comment
Please, Sign In to add comment