示例#1
0
                        $data['TRIP_TYPE'] = 'R';
                        $data['B_LOCATION_1'] = $flight->origin;
                        $data['E_LOCATION_1'] = $flight->destiny;
                        $data['B_DATE_1'] = $dateArrival;
                        //Asigno la fecha inicial, sea fija o periódica
                        $data['B_DATE_2'] = $ffinal;
                        //Asigno lafecha final, sea fija o periódica
                        $data['TRAVELLER_TYPE_ADT'] = '1';
                        $data['TRAVELLER_TYPE_CHD'] = '0';
                        $data['TRAVELLER_TYPE_INF'] = '0';
                        $data['TRAVELLER_TYPE_YCD'] = '0';
                        $data['CABIN'] = 'Economy';
                        $data['AIRLINE'] = '';
                        $data['MAX_CONNECTIONS'] = '';
                        $data['ajax'] = '0';
                        $action = JRoute::_(AawsHelperRoute::getFlowRoute('air.availability'), false);
                        /*-----------------------------------------------------------------------------------------------------------------------------------------*/
                        $html = '<form action="' . $action . '" method="post" >';
                        foreach ($data as $key => $value) {
                            $html .= '<input type="hidden" name="wsform[' . $key . ']" value="' . $value . '" />';
                        }
                        $html .= '</form>';
                        echo $html;
                        ?>
                      <div class="cities" id="ciudades" style="max-width:210px;">
                           <?php 
                        echo $flight->originname;
                        ?>
 - <?php 
                        echo $flight->destinyname;
                        ?>
示例#2
0
 protected function _setVariablesTo(&$xslt, $template)
 {
     switch ($template) {
         case 'Availability':
             $action = 'air.passenger';
             break;
         case 'Detail':
             // Se envia el año, para seleccionar en la fecha de nacimiento
             $xslt->setParameter('', 'year', date('Y'));
             $user = JFactory::getUser();
             if ($user->id != 0) {
                 $phone = explode('~', $user->get('profile.phone', ''));
                 if (count($phone) != 3) {
                     $phone = array('', '', '');
                 }
                 $xslt->setParameter('', 'username', $user->get('name', ''));
                 $xslt->setParameter('', 'email', $user->get('email', ''));
                 $xslt->setParameter('', 'documenttype', $user->get('profile.documenttype', ''));
                 $xslt->setParameter('', 'documentid', $user->get('profile.documentnumber', ''));
                 $xslt->setParameter('', 'phcountry', $phone[0]);
                 $xslt->setParameter('', 'phcode', $phone[1]);
                 $xslt->setParameter('', 'phnumber', $phone[2]);
             }
             $action = 'air.booking';
             break;
     }
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'route.php';
     $xslt->setParameter('', 'action', JRoute::_(AawsHelperRoute::getFlowRoute($action)));
 }