当前位置: 首页>>代码示例>>PHP>>正文


PHP JHotelUtil::convertToFormat方法代码示例

本文整理汇总了PHP中JHotelUtil::convertToFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP JHotelUtil::convertToFormat方法的具体用法?PHP JHotelUtil::convertToFormat怎么用?PHP JHotelUtil::convertToFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JHotelUtil的用法示例。


在下文中一共展示了JHotelUtil::convertToFormat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: date

</td>
		<td class='title_room_number' align="center">#</td>
		<?php 
$startDate = $this->state->get('filter.start_date');
$endDate = $this->state->get('filter.end_date');
for ($d = strtotime($startDate); $d <= strtotime($endDate);) {
    $dayString = date('d-m-Y', $d);
    ?>
		<td align=center colspan='2' 
			class='<?php 
    echo date('d-m-Y') == $dayString ? "td_crt_data" : "td_data";
    ?>
'
		>
			&nbsp;<?php 
    echo JHotelUtil::convertToFormat($dayString);
    ?>
&nbsp;
		</td>
		<?php 
    $d = strtotime(date('d-m-Y', $d) . ' + 1 day ');
}
?>
		
	
	</tr>
	<tr>
		<?php 
for ($d = strtotime($startDate); $d <= strtotime($endDate);) {
    $dayString = date('d-m-Y', $d);
    ?>
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:report-advanced.php

示例2: getItems

 /**
  * Overrides the getItems method to attach additional metrics to the list.
  *
  * @return  mixed  An array of data items on success, false on failure.
  *
  * @since   1.6.1
  */
 public function getItems()
 {
     // Get a storage key.
     $store = $this->getStoreId('getItems');
     // Try to load the data from internal storage.
     //if (!empty($this->cache[$store]))
     //{
     //	return $this->cache[$store];
     //}
     // Load the list items.
     $items = parent::getItems();
     // If emtpy or an error, just return.
     $month = $this->getState('filter.month');
     $year = $month < date("n") ? date("Y") + 1 : date("Y");
     $startDate = date("Y-m-d", mktime(0, 0, 0, $month, 1, $year));
     $endDate = date("Y-m-d", mktime(0, 0, 0, $month + 1, 0, $year));
     $app = JFactory::getApplication('administrator');
     $hotelId = $app->getUserState('com_jhotelreservation.excursions.filter.hotel_id');
     $excursionId = $app->getUserState('com_jhotelreservation.edit.excursion.id');
     if (empty($excursionId)) {
         $excursionId = JRequest::getVar("excursion_id");
     }
     $excursionId = $excursionId[0];
     if (empty($items)) {
         $items = $this->getDefaultRates($month, $year);
         $this->setState('filter.newRates', true);
     }
     $this->setState('filter.start_date', JHotelUtil::convertToFormat($startDate));
     $this->setState('filter.end_date', JHotelUtil::convertToFormat($endDate));
     JRequest::setVar("filter_start_date", $startDate);
     JRequest::setVar("filter_end_date", $endDate);
     JRequest::setVar("filter_excursion_type", $endDate);
     JRequest::setVar("hotel_id", $hotelId);
     foreach ($items as $item) {
         //dmp($item->date);
         $item->booked = 0;
         $item->available = 0;
     }
     // Add the items to the internal cache.
     $this->cache[$store] = $items;
     return $this->cache[$store];
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:49,代码来源:excursionrateprices.php

示例3: array

							<?php 
$startDate = JHotelUtil::convertToFormat($this->item->reservationData->userData->start_date);
?>
							<?php 
echo JHTML::_('calendar', $startDate == $this->appSettings->defaultDateValue ? '' : $startDate, 'start_date', 'start_date_i', $this->appSettings->calendarFormat, array('class' => 'inputbox', 'size' => '10', 'maxlength' => '10'));
?>
						</td>
					</tr>
					<tr>
						<td width=10% nowrap class="key"><?php 
echo JText::_('LNG_DEPARTURE', true);
?>
 </td>
						<td>
							<?php 
$endDate = JHotelUtil::convertToFormat($this->item->reservationData->userData->end_date);
?>
							<?php 
echo JHTML::_('calendar', $endDate == $this->appSettings->defaultDateValue ? '' : $endDate, 'end_date', 'end_date_i', $this->appSettings->calendarFormat, array('class' => 'inputbox', 'size' => '10', 'maxlength' => '10'));
?>
						</td>
					</tr>
					<tr>
					<tr>
						<td colspan="2">
							<?php 
echo JText::_('LNG_PRICE_CHOOSE', true);
?>
						</td>
					</tr>
					<tr>
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:edit.php

示例4: explode


//.........这里部分代码省略.........
                                                }
                                                $this->_data->room_intervals_numbers[$key_new]->nre = $value;
                                            } else {
                                                if (strpos($key, "is_ignore_duplicate") !== false) {
                                                    $key_new = str_replace("is_ignore_duplicate_", "", $key);
                                                    if (!isset($this->_data->room_intervals_numbers[$key_new])) {
                                                        $nr = new stdClass();
                                                        $nr->room_interval_number_id = '';
                                                        $nr->room_id = '';
                                                        $nr->nrs = '';
                                                        $nr->nre = '';
                                                        $nr->datas = '';
                                                        $nr->datae = '';
                                                        $nr->datai = '';
                                                        $nr->is_ignore_duplicate = true;
                                                        $this->_data->room_intervals_numbers[$key_new] = $nr;
                                                    }
                                                    $this->_data->room_intervals_numbers[$key_new]->is_ignore_duplicate = $value;
                                                } else {
                                                    if (strpos($key, "room_number_datas") !== false) {
                                                        $key_new = str_replace("room_number_datas_", "", $key);
                                                        if (!isset($this->_data->room_intervals_numbers[$key_new])) {
                                                            $nr = new stdClass();
                                                            $nr->room_interval_number_id = '';
                                                            $nr->room_id = '';
                                                            $nr->nrs = '';
                                                            $nr->nre = '';
                                                            $nr->datas = '';
                                                            $nr->datae = '';
                                                            $nr->datai = '';
                                                            $nr->is_ignore_duplicate = true;
                                                            $this->_data->room_intervals_numbers[$key_new] = $nr;
                                                        }
                                                        $this->_data->room_intervals_numbers[$key_new]->datas = JHotelUtil::convertToFormat($value);
                                                    } else {
                                                        if (strpos($key, "room_number_datae") !== false) {
                                                            $key_new = str_replace("room_number_datae_", "", $key);
                                                            if (!isset($this->_data->room_intervals_numbers[$key_new])) {
                                                                $nr = new stdClass();
                                                                $nr->room_interval_number_id = '';
                                                                $nr->room_id = '';
                                                                $nr->nrs = '';
                                                                $nr->nre = '';
                                                                $nr->datas = '';
                                                                $nr->datae = '';
                                                                $nr->datai = '';
                                                                $nr->is_ignore_duplicate = true;
                                                                $this->_data->room_intervals_numbers[$key_new] = $nr;
                                                            }
                                                            //convert date format
                                                            $this->_data->room_intervals_numbers[$key_new]->datae = JHotelUtil::convertToFormat($value);
                                                        } else {
                                                            if (strpos($key, "room_number_datai") !== false) {
                                                                $key_new = str_replace("room_number_datai_", "", $key);
                                                                if (!isset($this->_data->room_intervals_numbers[$key_new])) {
                                                                    $nr = new stdClass();
                                                                    $nr->room_interval_number_id = '';
                                                                    $nr->room_id = '';
                                                                    $nr->nrs = '';
                                                                    $nr->nre = '';
                                                                    $nr->datas = '';
                                                                    $nr->datae = '';
                                                                    $nr->datai = '';
                                                                    $nr->is_ignore_duplicate = true;
                                                                    $this->_data->room_intervals_numbers[$key_new] = $nr;
                                                                }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:67,代码来源:managerooms.php

示例5: sendGuestList

 function sendGuestList()
 {
     $reservationService = new ReservationService();
     $startDate = date('Y-m-d', strtotime(date('Y-m-d') . ' + 1 day'));
     $endDate = date('Y-m-d', strtotime($startDate . ' + 1 day'));
     $confirmationTable = $this->getTable('Confirmations');
     $reservations = $confirmationTable->getReservationList($startDate, $startDate);
     $guestDetailsList = "<tr style='text-align: left;'><th>" . JText::_("LNG_NAME") . "</th><th>" . JText::_("LNG_ARRIVAL") . "</th><th>" . JText::_("LNG_DEPARTURE") . "</th><th>" . JText::_("LNG_ADULTS") . "&nbsp;&nbsp;&nbsp;</th><th>" . JText::_("LNG_ROOMS") . "&nbsp;&nbsp;&nbsp;</th><th>" . JText::_("LNG_OFFERS") . "</th></tr>";
     if (count($reservations) > 0) {
         $hotelId = $reservations[0]->hotel_id;
         $guestDetailsList .= "<tr>";
         $guestDetailsList .= "<td>" . $reservations[0]->last_name . ' ' . $reservations[0]->first_name . "&nbsp;&nbsp;&nbsp;</td><td nowrap='nowrap'>" . JHotelUtil::convertToFormat($reservations[0]->start_date) . " &nbsp;&nbsp;&nbsp;</td><td  nowrap='nowrap'>" . JHotelUtil::convertToFormat($reservations[0]->end_date) . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservations[0]->adults . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservations[0]->number_rooms . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservations[0]->offer_names . "&nbsp;&nbsp;&nbsp;</td>";
         $guestDetailsList .= "</tr>";
         foreach ($reservations as $reservation) {
             if ($hotelId != $reservation->hotel_id || next($reservations) === false) {
                 $guestDetailsList .= "<tr>";
                 $guestDetailsList .= "<td>" . $reservation->last_name . ' ' . $reservation->first_name . "&nbsp;&nbsp;&nbsp;</td><td  nowrap='nowrap'>" . JHotelUtil::convertToFormat($reservation->start_date) . "&nbsp;&nbsp;&nbsp;</td><td  nowrap='nowrap'>" . JHotelUtil::convertToFormat($reservation->end_date) . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservation->adults . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservation->number_rooms . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservation->offer_names . "&nbsp;&nbsp;&nbsp;</td>";
                 $guestDetailsList .= "</tr>";
                 $guestDetailsList = "<table style=text-align:left'>" . $guestDetailsList . "</table>";
                 EmailService::sendGuestListEmail($reservation->hotel_id, $reservation->hotel_name, $reservation->hotel_email, $guestDetailsList, $startDate);
                 $guestDetailsList = "<tr style='text-align: left;'><th>" . JText::_("LNG_NAME") . "</th><th>" . JText::_("LNG_ARRIVAL") . "</th><th>" . JText::_("LNG_DEPARTURE") . "</th><th>" . JText::_("LNG_ADULTS") . "&nbsp;&nbsp;&nbsp;</th><th>" . JText::_("LNG_ROOMS") . "&nbsp;&nbsp;&nbsp;</th><th>" . JText::_("LNG_OFFERS") . "</th></tr>";
                 $hotelId = $reservation->hotel_id;
                 break;
             }
             $guestDetailsList .= "<tr>";
             $guestDetailsList .= "<td>" . $reservation->last_name . ' ' . $reservation->first_name . "&nbsp;&nbsp;&nbsp;</td><td  nowrap='nowrap'>" . JHotelUtil::convertToFormat($reservation->start_date) . "&nbsp;&nbsp;&nbsp;</td><td  nowrap='nowrap'>" . JHotelUtil::convertToFormat($reservation->end_date) . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservation->adults . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservation->number_rooms . "&nbsp;&nbsp;&nbsp;</td><td>" . $reservation->offer_names . "&nbsp;&nbsp;&nbsp;</td>";
             $guestDetailsList .= "</tr>";
         }
     }
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:30,代码来源:confirmation(original).php

示例6: date

<?php

$hotel = $this->hotel;
//create dates & default values
$startDate = $this->userData->start_date;
$endDate = $this->userData->end_date;
$startDate = JHotelUtil::convertToFormat($startDate);
$endDate = JHotelUtil::convertToFormat($endDate);
$log = Logger::getInstance(JPATH_COMPONENT . "/logs/site-log-" . date("d-m-Y") . '.log', 1);
$log->LogDebug("Archivo \\components\\com_jhotelreservation\views\\hotel\tmpl\\hoteloverview.php");
$log->LogDebug("Accedió");
$habit = $this->userData->rooms;
?>
<!--////////////////////////////////////////////////////////////////-->
<!--MICOD
Aqui importo el archivo JS donde se encuentra el código AJAX para enviar datos por POST-->
<!--<script type="text/javascript" src="ajax_filtro.js"></script>-->
<!--////////////////////////////////////////////////////////////////-->
<?php 
if ($this->appSettings->enable_hotel_tabs == 1) {
    ?>
	
	<div class="hotel-image-gallery">
		<div class="image-preview-cnt">
			<img id="image-preview" alt="<?php 
    if (isset($hotel->pictures[0])) {
        echo isset($hotel->pictures[0]->hotel_picture_info) ? $hotel->pictures[0]->hotel_picture_info : '';
    }
    ?>
" src='<?php 
    if (isset($hotel->pictures[0])) {
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:hoteloverview.php

示例7: generateBookingsListHTML

 function generateBookingsListHTML($invoice)
 {
     //if invoice details are defined only invoice details are sent
     $bookingsList = '';
     $style = "\"border:1px solid  #333\"";
     //dmp($invoice->invoiceDetails);
     if (isset($invoice->invoiceDetails)) {
         foreach ($invoice->invoiceDetails as $detail) {
             $bookingsList = $bookingsList . "<TR>\r\n\t\t\t\t\t\t\t\t\t\t\t<TD style={$style}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t" . $detail->reservationId . "\r\n\t\t\t\t\t\t\t\t\t\t\t</TD>\r\n\t\t\t\t\t\t\t\t\t\t\t<TD style={$style}>" . $detail->name . "</TD>\r\n\t\t\t\t\t\t\t\t\t\t\t<TD style={$style}>" . JHotelUtil::convertToFormat($detail->arrival) . "</TD>\r\n\t\t\t\t\t\t\t\t\t\t\t<TD style={$style}>" . JHotelUtil::convertToFormat($detail->departure) . "</TD>\r\n\t\t\t\t\t\t\t\t\t\t\t<TD style={$style} nowrap='nowrap'> &#8364; " . $detail->amount . " </TD>\r\n\t\t\t\t\t\t\t\t\t\t\t<TD style={$style} nowrap='nowrap'> &#8364; " . $detail->commissionAmount . "</TD>\r\n\t\t\t\t\t\t\t\t\t\t</TR>\r\n\t\t\t\t\t\t\t\t\t\t";
         }
         $bookingsList = "<TABLE width=\"100%\" cellspacing=\"0\" cellpadding=\"6\" class=\"adminlist\" align=center border=0>\r\n\t\t\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t\t\t<th style={$style} width='10%' align=center><B>" . ucfirst(JText::_('LNG_RESERVATION_NUMBER', true)) . "</B></th>\r\n\t\t\t\t\t\t\t\t\t\t\t<th style={$style} width='30%' align=center ><B>" . ucfirst(JText::_('LNG_NAME', true)) . "</B></th>\r\n\t\t\t\t\t\t\t\t\t\t\t<th style={$style} width='20%' align=center><B>" . ucfirst(JText::_('LNG_ARRIVAL', true)) . "</B></th>\r\n\t\t\t\t\t\t\t\t\t\t\t<th style={$style} width='20%' align=center><B>" . ucfirst(JText::_('LNG_DEPARTURE', true)) . "</B></th>\r\n\t\t\t\t\t\t\t\t\t\t\t<th style={$style} width='10%' align=center><B>" . ucfirst(JText::_('LNG_AMOUNT', true)) . "</B></th>\r\n\t\t\t\t\t\t\t\t\t\t\t<th style={$style} width='10%' align=center><B>" . ucfirst(JText::_('LNG_COMMISSION', true)) . "</B></th>\r\n\t\t\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t\t\t<tbody>" . $bookingsList . "\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"3\">&nbsp;</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td  nowrap='nowrap' align=\"right\"><strong>" . JText::_('LNG_TOTAL', true) . ": </strong></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td  nowrap='nowrap' id=\"total-amount\" style=\"border-top:1px solid #333\"> &#8364; " . $invoice->reservationAmount . "</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td  nowrap='nowrap' id=\"total-commission\"style=\"border-top:1px solid #333\"> &#8364; " . $invoice->commissionAmount . "</td>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t</TABLE>\r\n\t\t\t\t\t";
     }
     dmp($bookingsList);
     return $bookingsList;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:15,代码来源:manageinvoices.php

示例8: getItems

 /**
  * Overrides the getItems method to attach additional metrics to the list.
  *
  * @return  mixed  An array of data items on success, false on failure.
  *
  * @since   1.6.1
  */
 public function getItems()
 {
     // Get a storage key.
     $store = $this->getStoreId('getItems');
     // Try to load the data from internal storage.
     //if (!empty($this->cache[$store]))
     //{
     //	return $this->cache[$store];
     //}
     // Load the list items.
     $items = parent::getItems();
     // Getting the following metric by joins is WAY TOO SLOW.
     // Faster to do three queries for very large menu trees.
     // If emtpy or an error, just return.
     $month = $this->getState('filter.month');
     $year = $month < date("n") ? date("Y") + 1 : date("Y");
     if (empty($items)) {
         return $this->getDefaultRates($month, $year);
     } else {
         foreach ($items as $item) {
             $item->booked = 0;
             $item->available = 0;
         }
     }
     $startDate = date("Y-m-d", mktime(0, 0, 0, $month, 1, $year));
     $endDate = date("Y-m-d", mktime(0, 0, 0, $month + 1, 0, $year));
     $this->setState('filter.start_date', JHotelUtil::convertToFormat($startDate));
     $this->setState('filter.end_date', JHotelUtil::convertToFormat($endDate));
     // Add the items to the internal cache.
     $this->cache[$store] = $items;
     return $this->cache[$store];
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:39,代码来源:offerrateprices.php

示例9: getItems

 /**
  * Overrides the getItems method to attach additional metrics to the list.
  *
  * @return  mixed  An array of data items on success, false on failure.
  *
  * @since   1.6.1
  */
 public function getItems()
 {
     // Get a storage key.
     $store = $this->getStoreId('getItems');
     // Try to load the data from internal storage.
     //if (!empty($this->cache[$store]))
     //{
     //	return $this->cache[$store];
     //}
     // Load the list items.
     $items = parent::getItems();
     // If emtpy or an error, just return.
     $month = $this->getState('filter.month');
     $year = $month < date("n") ? date("Y") + 1 : date("Y");
     $startDate = date("Y-m-d", mktime(0, 0, 0, $month, 1, $year));
     $endDate = date("Y-m-d", mktime(0, 0, 0, $month + 1, 0, $year));
     $app = JFactory::getApplication('administrator');
     $hotelId = $app->getUserState('com_jhotelreservation.rooms.filter.hotel_id');
     $roomId = $app->getUserState('com_jhotelreservation.edit.room.room_id');
     $rId = JRequest::getVar("room_id", null);
     if (!empty($rId)) {
         $roomId = $rId;
         $app->setUserState('com_jhotelreservation.edit.room.room_id', $roomId);
     }
     if (empty($items)) {
         $items = $this->getDefaultRates($month, $year);
         $this->setState('filter.newRates', true);
     }
     $this->setState('filter.start_date', JHotelUtil::convertToFormat($startDate));
     $this->setState('filter.end_date', JHotelUtil::convertToFormat($endDate));
     JRequest::setVar("filter_start_date", $startDate);
     JRequest::setVar("filter_end_date", $endDate);
     JRequest::setVar("filter_room_type", $endDate);
     JRequest::setVar("hotel_id", $hotelId);
     JRequest::setVar("filter_room_type", $roomId);
     $hotelAvailability = HotelService::getHotelAvailabilyPerDay($hotelId, $startDate, $endDate);
     //dmp($roomId);
     $report = new JHotelReservationModelReports();
     $availabilty = $report->getAvailabilityReport();
     //dmp($availabilty);
     //dmp($roomId);
     foreach ($items as $item) {
         //dmp($item->date);
         if (isset($availabilty[$item->date][$roomId])) {
             $item->booked = $availabilty[$item->date][$roomId][1];
         } else {
             $item->booked = 0;
         }
         //dmp($item->booked);
         if (isset($availabilty[$item->date][$roomId])) {
             $item->available = intval($item->availability) - intval($availabilty[$item->date][$roomId][1]);
         } else {
             $item->available = $item->availability;
         }
         $item->isHotelAvailable = $hotelAvailability[$item->date];
     }
     // Add the items to the internal cache.
     $this->cache[$store] = $items;
     return $this->cache[$store];
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:67,代码来源:roomrateprices.php

示例10: getItem

 /**
  * Method to get a menu item.
  *
  * @param	integer	The id of the menu item to get.
  *
  * @return	mixed	Menu item data object on success, false on failure.
  */
 public function getItem($itemId = null)
 {
     // Initialise variables.
     $itemId = !empty($itemId) ? $itemId : (int) $this->getState('offer.offer_id');
     $false = false;
     // Get a menu item row instance.
     $table = $this->getTable('ManageOffers', 'Table');
     // Attempt to load the row.
     $return = $table->load($itemId);
     // Check for a table object error.
     if ($return === false && $table->getError()) {
         $this->setError($table->getError());
         return $false;
     }
     if (!empty($table->offer_id)) {
         $this->setState('offer.hotel_id', $table->hotel_id);
     }
     $properties = $table->getProperties(1);
     $value = JArrayHelper::toObject($properties, 'JObject');
     $value->itemRooms = $this->getOfferRooms();
     $value->itemExcursions = $this->getOfferExcursions($this->getState('offer.offer_id'));
     $query = ' 	SELECT * FROM #__hotelreservation_offers_themes ORDER BY name';
     $value->themes = $this->_getList($query);
     $query = ' 	SELECT * FROM #__hotelreservation_offers_themes_relation where offerId=' . $this->getState('offer.offer_id');
     $value->selectedThemes = $this->_getList($query);
     $query = " SELECT * FROM #__hotelreservation_offers_vouchers where offerId = " . $this->getState('offer.offer_id') . " ORDER BY voucher";
     $value->vouchers = $this->_getList($query);
     $value->offer_datas = JHotelUtil::convertToFormat($value->offer_datas);
     $value->offer_datae = JHotelUtil::convertToFormat($value->offer_datae);
     $value->offer_datasf = JHotelUtil::convertToFormat($value->offer_datasf);
     $value->offer_dataef = JHotelUtil::convertToFormat($value->offer_dataef);
     return $value;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:40,代码来源:offer.php

示例11: initFilterParams

 function initFilterParams()
 {
     $post = JRequest::get('post');
     if (isset($post['filter_datas'])) {
         $post['filter_datas'] = JHotelUtil::convertToMysqlFormat($post['filter_datas']);
     }
     if (isset($post['filter_datae'])) {
         $post['filter_datae'] = JHotelUtil::convertToMysqlFormat($post['filter_datae']);
     }
     if (isset($post['hotel_id'])) {
         $this->hotel_id = $post['hotel_id'];
     } else {
         $this->hotel_id = $post['hotel_id'] = 0;
     }
     if (isset($post['filter_room_types'])) {
         $this->filter_room_types = $post['filter_room_types'];
     } else {
         $this->filter_room_types = $post['filter_room_types'] = 0;
     }
     if (isset($post['filter_datas'])) {
         $this->filter_datas = $post['filter_datas'];
     } else {
         $this->filter_datas = $post['filter_datas'] = date('Y-m-01');
     }
     if (isset($post['filter_datae'])) {
         $this->filter_datae = $post['filter_datae'];
     } else {
         $this->filter_datae = $post['filter_datae'] = date('Y-m-t');
     }
     if (isset($post['filter_report_type'])) {
         $this->filter_report_type = $post['filter_report_type'];
     } else {
         $this->filter_report_type = "MONTH";
     }
     $this->filter_datas = JHotelUtil::convertToFormat($this->filter_datas);
     $this->filter_datae = JHotelUtil::convertToFormat($this->filter_datae);
     $hotels = $this->get('Hotels');
     $hotels = checkHotels(JFactory::getUser()->id, $hotels);
     $this->hotels = $hotels;
     return $post;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:41,代码来源:view.html.php

示例12: sendNoAvailabilityEmail

 public static function sendNoAvailabilityEmail($hotelId, $startDate, $endDate)
 {
     $log = Logger::getInstance();
     $log->LogDebug("No availabaility " . $hotelId . " " . $startDate . " " . $endDate);
     $hotel = HotelService::getHotel($hotelId);
     $appSettings = JHotelUtil::getInstance()->getApplicationSettings();
     $datas = JHotelUtil::convertToFormat($startDate);
     $datae = JHotelUtil::convertToFormat($endDate);
     $mode = 1;
     //html
     $emailContent = JText::_('LNG_NO_AVAILABILITY_EMAIL', true);
     $emailContent = str_replace("<<hotel>>", $hotel->hotel_name, $emailContent);
     $emailContent = str_replace("<<start_date>>", $datas, $emailContent);
     $emailContent = str_replace("<<end_date>>", $datae, $emailContent);
     $email_subject = JText::_('LNG_NO_AVAILABILITY_EMAIL_SUBJECT', true);
     $email_subject = str_replace("<<hotel>>", $hotel->hotel_name, $email_subject);
     return self::sendEmail($appSettings->company_email, $appSettings->company_name, null, $appSettings->company_email, null, null, $email_subject, $emailContent, $mode);
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:18,代码来源:EmailService(original).php

示例13:

 /**
  * Method to get a menu item.
  *
  * @param   integer	The id of the menu item to get.
  *
  * @return  mixed  Menu item data object on success, false on failure.
  */
 public function &getItem($itemId = null)
 {
     $itemId = !empty($itemId) ? $itemId : (int) $this->getState('extraoption.id');
     $intialId = $itemId;
     if ($this->getState('source.id')) {
         $itemId = $this->getState('source.id');
     }
     $false = false;
     // Get a menu item row instance.
     $table = $this->getTable();
     // Attempt to load the row.
     $return = $table->load($itemId);
     // Check for a table object error.
     if ($return === false && $table->getError()) {
         $this->setError($table->getError());
         return $false;
     }
     $properties = $table->getProperties(1);
     $value = JArrayHelper::toObject($properties, 'JObject');
     $value->id = $intialId;
     $value->start_date = JHotelUtil::convertToFormat($value->start_date);
     $value->end_date = JHotelUtil::convertToFormat($value->end_date);
     $value->rooms = $this->getRooms();
     $value->offers = $this->getOffers($value->offer_ids);
     return $value;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:33,代码来源:extraoption.php

示例14: date

    } else {
        if (isset($endDate) && strlen($endDate) > 0) {
            $jhotelreservation_datae = $params->get('end-date');
            if (strtotime($jhotelreservation_datae) < strtotime(date("Y-m-d"))) {
                $jhotelreservation_datae = date("Y-m-d");
            }
        } else {
            if (isset($userData->end_date)) {
                $jhotelreservation_datae = $userData->end_date;
            } else {
                $jhotelreservation_datae = date('Y-m-d', strtotime(' + 1 day '));
            }
        }
    }
}
$jhotelreservation_datae = JHotelUtil::convertToFormat($jhotelreservation_datae);
$jhotelreservation_rooms = JRequest::getVar('jhotelreservation_rooms');
$jhotelreservation_guest_adult = JRequest::getVar('jhotelreservation_guest_adult');
$jhotelreservation_guest_child = JRequest::getVar('jhotelreservation_guest_child');
$jhotelreservation_hotel_id = JRequest::getVar('jhotelreservation_hotel_id');
//$getHotelItems= JRequest::getVar('getHotelItems');
// var_dump($getHotelItems);
if (strlen($jhotelreservation_rooms) == 0) {
    if (JRequest::getVar('rooms') != '') {
        $jhotelreservation_rooms = JRequest::getVar('rooms');
    } else {
        $jhotelreservation_rooms = 1;
    }
}
if (strlen($jhotelreservation_guest_adult) == 0) {
    if (JRequest::getVar('guest_adult') != '') {
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:mod_jhotelreservation.php

示例15: array

 /**
  * Method to get applicationsettings
  * @return object with data
  */
 function &getData()
 {
     // Load the data
     if (empty($this->_data)) {
         $query = ' SELECT * FROM #__hotelreservation_hotels' . ' WHERE hotel_id = ' . $this->_hotel_id;
         $this->_db->setQuery($query);
         $this->_data = $this->_db->loadObject();
         //dmp($this->_data);
     }
     if (!$this->_data) {
         $row = $this->getTable('hotels');
         $properties = $row->getProperties(1);
         $this->_data = JArrayHelper::toObject($properties, 'JObject');
         //~check temporary files
         $this->_data->pictures = array();
         $this->_data->facilities = array();
         $this->_data->selectedFacilities = array();
         $this->_data->types = array();
         $this->_data->selectedTypes = array();
         $this->_data->accommodationTypes = array();
         $this->_data->selectedAccommodationTypes = array();
         $this->_data->environments = array();
         $this->_data->selectedEnvironments = array();
         $this->_data->regions = array();
         $this->_data->selectedRegions = array();
         $this->_data->selectedPaymentOptions = null;
     } else {
         //get pictures
         $query = "SELECT *\n\t\t\t\t\tFROM #__hotelreservation_hotel_pictures\n\t\t\t\t\tWHERE hotel_id =" . $this->_data->hotel_id . "\n\t\t\t\t\tORDER BY hotel_picture_id ";
         // dmp($query);
         //$this->_db->setQuery( $query );
         $files = $this->_getList($query);
         $this->_data->pictures = array();
         foreach ($files as $value) {
             $this->_data->pictures[] = array('hotel_picture_info' => $value->hotel_picture_info, 'hotel_picture_path' => $value->hotel_picture_path, 'hotel_picture_enable' => $value->hotel_picture_enable);
         }
     }
     //convert date format
     $this->_data->start_date = JHotelUtil::convertToFormat($this->_data->start_date);
     $this->_data->end_date = JHotelUtil::convertToFormat($this->_data->end_date);
     $query = 'SELECT * FROM #__hotelreservation_countries  ORDER BY country_name';
     $this->_data->countries = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_facilities ORDER BY name';
     $this->_data->facilities = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_facility_relation where hotelId = ' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $this->_data->selectedFacilities = $this->_getList($query);
     }
     $query = 'SELECT * FROM #__hotelreservation_hotel_types ORDER BY name';
     $this->_data->types = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_type_relation where hotelId =' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $this->_data->selectedTypes = $this->_getList($query);
     }
     $query = 'SELECT * FROM #__hotelreservation_hotel_accommodation_types ORDER BY name';
     $this->_data->accommodationTypes = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_accommodation_type_relation where hotelId =' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $this->_data->selectedAccommodationTypes = $this->_getList($query);
     }
     $query = 'SELECT * FROM #__hotelreservation_hotel_environments ORDER BY name';
     $this->_data->environments = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_environment_relation where hotelId=' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $this->_data->selectedEnvironments = $this->_getList($query);
     }
     $query = 'SELECT * FROM #__hotelreservation_hotel_regions ORDER BY name';
     $this->_data->regions = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_region_relation where hotelId=' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $this->_data->selectedRegions = $this->_getList($query);
     }
     $query = 'SELECT * FROM #__hotelreservation_hotel_payment_options ORDER BY name';
     $this->_data->paymentOptions = $this->_getList($query);
     $query = 'SELECT * FROM #__hotelreservation_hotel_payment_option_relation where hotelId=' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $this->_data->selectedPaymentOptions = $this->_getList($query);
     }
     $query = 'SELECT * FROM #__hotelreservation_hotel_channel_manager where hotel_id = ' . $this->_data->hotel_id;
     if (isset($this->_data->hotel_id)) {
         $channelManagers = $this->_getList($query);
     }
     $channelManagersArray = array();
     if (isset($channelManagers) && count($channelManagers) > 0) {
         foreach ($channelManagers as $channelManager) {
             $channelManagersArray[$channelManager->service] = $channelManager;
         }
     }
     $this->_data->channelManagers = $channelManagersArray;
     $query = ' SELECT currency_id, description FROM #__hotelreservation_currencies';
     $this->_data->currencies = $this->_getList($query);
     $informationsTable = $this->getTable('ManageHotelInformations');
     $properties = $informationsTable->getProperties(1);
     $this->_data->informations = JArrayHelper::toObject($properties, 'JObject');
     if (isset($this->_data->hotel_id)) {
         $this->_data->informations = $informationsTable->getHotelInformations($this->_data->hotel_id);
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:101,代码来源:hotel.php


注:本文中的JHotelUtil::convertToFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。