/** * Display button to open popup window. * * @param int $value */ function fetchElement($value) { $customerModel = new BookingModelCustomer(); $customerModel->setId($value); $customer = $customerModel->getObject(); $html = '<div style="float: left; height: 19px; padding-top: 3px;">'; $html .= '<input style="color: #000000;" size="60" type="text" id="customer_name" value="' . BookingHelper::formatName($customer, true) . '" disabled="disabled" />'; $html .= '</div>'; $html .= '<div class="button2-left">'; $html .= '<div class="blank">'; $html .= '<a class="modal" title="' . JText::_('Select a Customer') . '" href="' . ARoute::browse(CONTROLLER_CUSTOMER, true) . '" rel="{handler: \'iframe\', size: {x: 800, y: 600}}">' . JText::_('Select') . '</a>'; $html .= '</div>'; $html .= '</div>'; $html .= '<input type="hidden" id="customer_id" name="customer" value="' . $value . '" />'; return $html; }
protected function getInput() { jimport('joomla.filesystem.folder'); $bar = JToolBar::getInstance('toolbar_image'); $bar->addButtonPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'toolbar'); /* @var $bar JToolBar */ $bar->appendButton('Popup', 'new1', 'Add', ARoute::view(VIEW_IMAGES, null, null, array('tmpl' => 'component', 'type' => '1')), 800, 600); $bar->appendButton('ALink', 'delete', 'Delete', 'javascript:AImages.removeMain()', 'imageMainRemove'); $html[] = $bar->render(); $thumb = AImage::thumb(BookProHelper::getIPath($this->image), null, ADMIN_SET_IMAGES_WIDTH); $html[] = '<img src="' . $thumb . '" alt="" id="imageMainSource" class="thumb' . $thumb ? '' : ' blind' . '" />'; if (!$thumb) { $html[] = ADocument::addDomreadyEvent('AImages.hideRemoveMain()'); } $html[] = '<input type="hidden" name="image" id="imageMainHidden" value="' . $this->escape($this->image) . '" />'; return implode("\n", $html); }
/** * Get control panel button to open standard Joomla! configuration page in lightbox. * * @return string HTML code */ static function getCPanelConfigButton() { $params = array('class' => 'modal', 'rel' => '{handler: \'iframe\', size: {x: 800, y: 600}}'); return AHtml::getCPanelButton(ARoute::config(), 'config', JText::_('Configuration'), false, $params); }
static function startAdminArea($backEnd = true) { $doc = JFactory::getDocument(); $doc->addStyleSheet('components/com_bookpro/assets/css/jbtransport.css'); $uri = (string) JUri::getInstance(); $return = urlencode(base64_encode($uri)); $configRoute['route'] = 'index.php?option=com_config&view=component&component=' . OPTION . '&return=' . $return; $configRoute['params'] = array(); echo '<div id="j-sidebar-container" class="span2">'; JHtmlSidebar::addEntry(JText::_('COM_BOOKPRO_CPANEL'), 'index.php?option=com_bookpro'); echo JHtmlSidebar::render(); echo ' <div class="sidebar-nav">'; echo ' <ul class="nav nav-list" style="margin:0px;">'; echo self::listLink(JText::_('COM_BOOKPRO_BOOKINGS'), JRoute::_(ARoute::view('orders'))); echo self::listLink(JText::_('COM_BOOKPRO_TRANSPORT_ROUTE'), JRoute::_(ARoute::view('transports'))); echo '</ul>'; echo '</div>'; //submenu price echo ' <div class="sidebar-nav">'; echo ' <ul class="nav nav-list" style="margin:0px;">'; echo ' <li class="dropdown-submenu"><a class="" data-toggle="dropdown" href="#">' . JText::_(JText::_('COM_BOOKPRO_TRANSPORT_RATE'), 'index.php?option=com_bookpro&view=prices') . '</a> <ul class="dropdown-menu">'; echo self::listLink(JText::_('COM_BOOKPRO_PRICE_DAY'), 'index.php?option=com_bookpro&view=prices&layout=date'); echo self::listLink(JText::_('COM_BOOKPRO_PRICE_WEEK'), 'index.php?option=com_bookpro&view=prices&layout=week'); echo self::listLink(JText::_('COM_BOOKPRO_PRICE_DAYOFF'), 'index.php?option=com_bookpro&view=prices&layout=dayoff'); echo self::listLink(JText::_('Private ride close'), 'index.php?option=com_bookpro&view=transportdayoffs'); echo '</ul> </li>'; echo ' </ul>'; echo ' </div>'; //end submenu echo ' <div class="sidebar-nav">'; echo ' <ul class="nav nav-list" style="margin:0px;">'; echo self::listLink(JText::_('COM_BOOKPRO_TRANSPORT_REPORT'), JRoute::_(ARoute::view('transportreports'))); echo self::listLink(JText::_('COM_BOOKPRO_CATEGORIES'), JRoute::_(ARoute::view('categories'))); echo self::listLink(JText::_('COM_BOOKPRO_TOURS'), JRoute::_(ARoute::view('tours'))); echo self::listLink(JText::_('COM_BOOKPRO_TOUR_REPORT'), JRoute::_(ARoute::view('passengers'))); echo '</ul>'; echo '</div>'; echo ' <div class="sidebar-nav">'; echo ' <ul class="nav nav-list" style="margin:0px;">'; echo ' <li class="dropdown-submenu"><a class="" data-toggle="dropdown" href="#">' . JText::_(JText::_('Customer/Agent'), 'index.php?option=com_bookpro&view=customers') . '</a> <ul class="dropdown-menu">'; echo self::listLink(JText::_('COM_BOOKPRO_CUSTOMER'), JRoute::_(ARoute::view('customers'))); echo self::listLink(JText::_('COM_BOOKPRO_AGENT'), JRoute::_(ARoute::view('agents'))); echo '</ul> </li>'; echo ' <li class="dropdown-submenu"><a class="" data-toggle="dropdown" href="#">' . JText::_('More >>') . '</a> <ul class="dropdown-menu">'; echo self::listLink(JText::_('COM_BOOKPRO_EMAIL_SETTING'), JRoute::_(ARoute::view('applications'))); echo self::listLink(JText::_('COM_BOOKPRO_VEHICLE'), JRoute::_(ARoute::view('vehicles'))); echo self::listLink(JText::_('COM_BOOKPRO_COUPONS'), JRoute::_(ARoute::view('coupons'))); echo self::listLink(JText::_('COM_BOOKPRO_DESTINATION'), JRoute::_(ARoute::view('airports'))); echo self::listLink(JText::_('COM_BOOKPRO_ADDONS'), ARoute::view('addons')); echo self::listLink(JText::_('Languages'), JRoute::_(ARoute::view('languages'))); echo self::listLink(JText::_('COM_BOOKPRO_COUNTRIES'), JRoute::_('index.php?option=com_bookpro&view=countries', false)); echo '</ul> </li>'; echo ' </ul>'; echo ' </div>'; echo '</div>'; }
<tbody> <?php if (!is_array($this->items)) { ?> <tr><td colspan="<?php echo $colspan; ?> " class="emptyListInfo"><?php echo JText::_('No items found.'); ?> </td></tr> <?php } else { for ($i = 0; $i < $itemsCount; $i++) { $subject =& $this->items[$i]; $link = JRoute::_(ARoute::edit('airport', $subject->id)); if ($subject->level > 1) { $parentsStr = ""; $_currentParentId = $subject->parent_id; $parentsStr = " " . $_currentParentId; for ($i2 = 0; $i2 < $subject->level; $i2++) { foreach ($this->ordering as $k => $v) { $v = implode("-", $v); $v = "-" . $v . "-"; if (strpos($v, "-" . $_currentParentId . "-") !== false) { $parentsStr .= " " . $k; $_currentParentId = $k; break; } } }
/** * Get URL to save payment result * * @param string $type payment method type alias */ function payment($type, $id, $paid) { return ARoute::root() . ARoute::controller(CONTROLLER_RESERVATION) . ARoute::task('payment') . '&type=' . $type . '&paid=' . $paid . '&cid[]=' . $id . '&hash=' . md5(session_id()); }
<tr> <td colspan="10"><?php echo JText::_('COM_BOOKPRO_NO_ITEM'); ?> </td> </tr> <?php } else { ?> <?php for ($i = 0; $i < $itemsCount; $i++) { ?> <?php $subject =& $this->items[$i]; $link = JRoute::_(ARoute::edit(CONTROLLER_COUPON, $subject->id)); ?> <td class="checkboxCell"><?php echo JHTML::_('grid.checkedout', $subject, $i); ?> </td> <td class="center"> <?php echo JHtml::_('jgrid.published', $subject->state, $i, 'coupons.', true, 'cb', null, null); ?> </td>
</td> </tr> </tfoot> <tbody> <?php if (!is_array($this->items) || !$itemsCount && $this->tableTotal) { ?> <tr><td colspan="5" class="emptyListInfo"><?php echo JText::_('No items found.'); ?> </td></tr> <?php } else { for ($i = 0; $i < $itemsCount; $i++) { $subject =& $this->items[$i]; $link = JRoute::_(ARoute::edit(CONTROLLER_ROOM_RATE_LOG, $subject->id)); $js = 'javascript:ListSubjects.select(' . $subject->id . ',\'' . $title . '\',\'' . $this->escape($subject->alias) . '\')'; ?> <tr> <td style="text-align: right; white-space: nowrap;"><?php echo number_format($this->pagination->getRowOffset($i), 0, '', ' '); ?> </td> <?php if (!$this->selectable) { ?> <td class="checkboxCell"><?php echo JHTML::_('grid.checkedout', $subject, $i); ?> </td> <?php
</tr> </tfoot> <tbody> <?php if (!is_array($this->items) || !$itemsCount) { ?> <tr><td colspan="7" class="emptyListInfo"><?php echo JText::_('No items found.'); ?> </td></tr> <?php } else { for ($i = 0; $i < $itemsCount; $i++) { $subject = $this->items[$i]; // echo "<pre>"; print_r($subject); echo "</pre> thangloan".__FILE__.":".__LINE__.'</br>'; $link = JRoute::_(ARoute::edit(CONTROLLER_AIRPORT, $subject->id)); $orderkey = array_search($subject->id, $this->ordering[$subject->parent_id]); if ($subject->level > 1) { $parentsStr = ""; $_currentParentId = $subject->parent_id; $parentsStr = " " . $_currentParentId; for ($i2 = 0; $i2 < $subject->level; $i2++) { foreach ($this->ordering as $k => $v) { $v = implode("-", $v); $v = "-" . $v . "-"; if (strpos($v, "-" . $_currentParentId . "-") !== false) { $parentsStr .= " " . $k; $_currentParentId = $k; break; } }
/** * Get route to create reservation by price ID and start reservation datetime property. * * @param int $id * subject ID * @param tring $from * reservation date (MySQL datetime) * @return string URL */ function getReservationRoute($priceId, $from) { return ARoute::customUrl(array('controller' => CONTROLLER_RESERVATION, 'task' => 'add', 'id' => $priceId, 'from' => $from)); }
echo JText::_('COM_BOOKPRO_MANAGE'); ?> </a> </div> </td> <td> <a href="<?php echo JRoute::_('index.php?option=com_bookpro&view=itineraries&tour_id=' . $subject->id); ?> " class="btn btn-small">Lists</a> <a href="<?php echo JRoute::_(ARoute::view('itinerary', null, null, array('layout' => 'edit', 'tour_id' => $subject->id))); ?> " class="btn btn-small">Add</a> <br/> <?php echo TourHelper::getTourDestination($subject->id); ?> </td> </tr> <?php }
if (empty($this->items)) { ?> <tr> <td colspan="<?php echo $colspan; ?> " class="emptyListInfo"><?php echo JText::_('No items found.'); ?> </td> </tr> <?php } else { for ($i = 0; $i < $itemsCount; $i++) { $subject = $this->items[$i]; $link = JRoute::_(ARoute::edit('CONTROLLER_FLIGHT', $subject->id)); ?> <tr> <td class="checkboxCell"><?php echo $i + 1; ?> </td> <td class="checkboxCell"><?php echo JHTML::_('grid.checkedout', $subject, $i); ?> </td> <td><?php echo JHtml::_('jgrid.published', $subject->state, $i, '', true, 'cb', null, null); ?>