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


PHP AImporter::helper方法代码示例

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


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

示例1: exportPDF

 function exportPDF()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     AImporter::helper('pdf', 'date');
     AImporter::model('transportreports');
     $model = new BookproModelTransportReports();
     $depart_date = DateHelper::createFromFormatYmd($input->get('filter_depart_date'));
     $state = $model->getState();
     $state->set('list.limit', NULL);
     $state->set('list.start', 0);
     $state->set('list.ordering', 'pickup');
     $state->set('list.direction', 'ASC');
     if ($app->isAdmin()) {
         $ticket_view = $this->getView('Transportreports', 'html', 'BookProView');
     } else {
         $ticket_view = $this->getView('AgentTransportreports', 'html', 'BookProView');
         $ticket_view->is_admin = 1;
     }
     $ticket_view->setModel($model, true);
     $ticket_view->setLayout('report');
     ob_start();
     $ticket_view->display();
     $pdf = ob_get_contents();
     ob_end_clean();
     //get flight name
     $order = new JObject();
     $order->name = "transport_report" . $input->get('filter_depart_date') . '_' . JHtml::_('date', 'now', 'YmdHis');
     $order->fontsize = 9;
     PrintPdfHelper::printTicket($pdf, $order, 'P');
     return;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:32,代码来源:transportreports.php

示例2: populateState

 protected function populateState($ordering = null, $direction = null)
 {
     AImporter::helper('date');
     parent::populateState();
     $app = JFactory::getApplication();
     $id = JRequest::getVar('id', 0, '', 'int');
     $this->setState('passengerlist.id', $id);
     // Load the filter state.
     $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
     $this->setState('filter.search', $search);
     $order_id = $this->getUserStateFromRequest($this->context . '.filter.order_id', 'filter_order_id', null, 'int');
     $this->setState('filter.order_id', $order_id);
     $tour_id = $this->getUserStateFromRequest($this->context . '.filter.tour_id', 'filter_tour_id', null, 'int');
     $this->setState('filter.tour_id', $tour_id);
     $depart_date = $this->getUserStateFromRequest($this->context . '.filter.depart_date', 'filter_depart_date', null);
     $depart_date = DateHelper::createFromFormatYmd($depart_date);
     $this->setState('filter.depart_date', $depart_date);
     $order_status = $this->getUserStateFromRequest($this->context . '.filter.order_status', 'filter_order_status', null, 'string');
     $this->setState('filter.order_status', $order_status);
     $value = $app->getUserStateFromRequest($this->context . '.ordercol', 'filter_order', $ordering);
     $this->setState('list.ordering', $value);
     $value = $app->getUserStateFromRequest($this->context . '.orderdirn', 'filter_order_Dir', $direction);
     $this->setState('list.direction', $value);
     $fromdate = $this->getUserStateFromRequest($this->context . '.filter.from_date', 'filter_from_date', null, 'string');
     $fromdate = DateHelper::createFromFormatYmd($fromdate);
     $this->setState('filter.from_date', $fromdate);
     $todate = $this->getUserStateFromRequest($this->context . '.filter.to_date', 'filter_to_date', null, 'string');
     $todate = DateHelper::createFromFormatYmd($todate);
     $this->setState('filter.to_date', $todate);
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:30,代码来源:passengers.php

示例3: book

 public function book()
 {
     AImporter::classes('order/order', 'order/tour');
     AImporter::helper('tour', 'currency', 'math');
     $this->cart = $this->getCart();
     $app = JFactory::getApplication();
     $input = $app->input;
     $tour = new BookproTourOrder();
     $tour->rate_id = $input->getInt('tour');
     $tour->setTourRate();
     if (!$tour->setTour()) {
         JError::raiseError(4012, JText::_('COM_BOOKPRO_SESSION_EXPIRED'));
     }
     $tour->cart = $this->cart;
     $tour->data['tax'] = $this->cart->tax;
     $this->cart->total = $tour->setPrice();
     $this->cart->subtotal = MathHelper::removeVat($this->cart->total, $this->cart->tax);
     $this->cart->rate = $tour->rate;
     $this->cart->tour = $tour->tour;
     $this->cart->saveToSession();
     $session = JFactory::getSession();
     $session->set('tour_order', $tour);
     $view = $this->getView('TourBook', 'html', 'BookProView');
     $view->assign('cart', $this->cart);
     $view->assign('tour', $tour);
     $view->display();
     return;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:28,代码来源:tour.php

示例4: exportpdf

 /**
  * Print passenger manifest to pdf
  */
 function exportpdf()
 {
     AImporter::model('passengers');
     $app = JFactory::getApplication();
     $input = $app->input;
     AImporter::helper('pdf', 'date');
     $model = new BookproModelpassengers(array('ignore_request' => 0));
     if ($app->isAdmin()) {
         $ticket_view = $this->getView('passengers', 'html', 'BookProView');
     } else {
         $ticket_view = $this->getView('AgentPassengers', 'html', 'BookProView');
         $ticket_view->is_admin = 1;
     }
     $ticket_view->setModel($model, true);
     $ticket_view->setLayout('report');
     ob_start();
     $ticket_view->display();
     $pdf = ob_get_contents();
     ob_end_clean();
     $order = new JObject();
     $order->name = 'Tour_report' . '_export_time_' . JHtml::date('now', 'Y-m-d-H-i-s');
     $order->fontsize = 7;
     PrintPdfHelper::printTicket($pdf, $order, 'P');
     return;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:28,代码来源:passengers.php

示例5: getType

 public function getType()
 {
     AImporter::helper('transport');
     $type = TransportHelper::getType();
     $options = array();
     $options[] = JHTML::_('select.option', '', JText::_('COM_BOOKPRO_TYPE'), 'value', 'text');
     $options = array_merge($options, $type);
     return JHTML::_('select.genericlist', $options, 'filter_type', ' class="inputbox" ', 'value', 'text', $this->state->get('filter.type'), 'filter_type');
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:9,代码来源:view.html.php

示例6: saveOrderInfo

 protected function saveOrderInfo()
 {
     //save order info
     AImporter::table('orderinfo');
     AImporter::helper('date');
     $this->orderinfo['params']['start'] = DateHelper::createFromFormatYmd($this->orderinfo['params']['start']);
     $this->orderinfo['params']['end'] = DateHelper::createFromFormatYmd($this->orderinfo['params']['end']);
     $orderinfo = $this->orderinfo;
     $orderinfo['order_id'] = $this->table->id;
     $orderinfo['params'] = json_encode($this->orderinfo['params']);
     $orderinfo['start'] = $this->orderinfo['params']['start'];
     $TableOrderinfo = new TableOrderInfo($this->_db);
     return $TableOrderinfo->save($orderinfo);
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:14,代码来源:custom.php

示例7: getDayWeek

 static function getDayWeek($name)
 {
     AImporter::helper('date');
     $days = DateHelper::dayofweek();
     $daysweek = array();
     foreach ($days as $key => $value) {
         $object = new stdClass();
         $object->key = $key;
         $object->value = $value;
         $daysweek[] = $object;
     }
     $selected = array_keys($days);
     return AHtml::checkBoxList($daysweek, $name, '', $selected, 'key', 'value');
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:14,代码来源:view.html.php

示例8: getOptions

 protected function getOptions()
 {
     AImporter::helper('vehicle');
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query->select('id AS value, title AS text');
     $query->from('#__bookpro_vehicle');
     $query->where('state = 1');
     $db->setQuery($query);
     $options = array();
     $options = $db->loadObjectList();
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:14,代码来源:vehicle.php

示例9: save

 public function save()
 {
     try {
         $this->_db->transactionStart();
         //save customer
         $customer_id = $this->saveCustomer();
         if (!$customer_id) {
             $this->writeLog('Save customer failed');
             return false;
         }
         //save order
         AImporter::helper('orderstatus');
         OrderStatus::init();
         $order_status = OrderStatus::$PENDING->getValue();
         $this->data = array('type' => 'TOUR', 'user_id' => $customer_id, 'pay_method' => '', 'promo_code' => $this->customer['promo_code'], 'order_status' => $order_status, 'pay_status' => 'PENDING', 'notes' => $this->customer['notes'], 'tax' => $this->cart->tax, 'service_fee' => $this->cart->service_fee);
         $this->setPrice();
         $this->addCoupon();
         if (!$this->store()) {
             $this->writeLog('Save order failed');
             return false;
         }
         if (!$this->saveOrderInfo()) {
             $this->writeLog('Save orderinfo failed');
             return false;
         }
         if (!$this->saveAddon()) {
             $this->writeLog('Save addon failed');
             return false;
         }
         if (!$this->savePassenger()) {
             $this->writeLog('Save passenger failed');
             return false;
         }
         $this->table->order_number = 'TR' . $this->table->order_number;
         $this->table->store();
         $this->_db->transactionCommit();
     } catch (Exception $e) {
         $this->writeLog($e->getMessage());
         $this->_db->transactionRollback();
         return false;
     }
     return true;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:43,代码来源:tour.php

示例10: postRequest

 public function postRequest()
 {
     $token = JSession::checkToken();
     if (!$token) {
         die('Invail request');
     }
     $app = jfactory::getApplication();
     AImporter::helper('email');
     AImporter::classes('order/custom');
     $order = new BookproCustomOrder();
     $order->orderinfo = $this->input->get('orderinfo', array(), 'array');
     $order->customer = $_POST;
     $db = JFactory::getDbo();
     if ($order->save()) {
         $mail = new EmailHelper($order->table->id);
         $mail->sendMail();
         $app->enqueueMessage(JText::_('COM_BOOKPRO_CUSTOM_THANKS_FOR_BOOKING'));
     }
     $app->redirect('index.php?option=com_bookpro&view=customservice');
     return;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:21,代码来源:charter.php

示例11: __construct

 public function __construct($id = false, $typeChart = false, $option = false, $title = false)
 {
     if (!class_exists('BookProHelper')) {
         AImporter::helper('bookpro');
     }
     //Check is backend or frontend
     if (JFactory::getApplication()->isAdmin()) {
         $this->isBackend = true;
     } else {
         $this->isBackend = false;
     }
     $this->isAgent = BookProHelper::isAgent();
     if ($id) {
         $this->id = $id;
     }
     if ($typeChart) {
         $this->typeChart = $typeChart;
     } else {
         $this->typeChart = 'LineChart';
     }
     $this->optionChart = $option;
     $this->titleChart = $title;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:23,代码来源:chart.php

示例12: getPlugins

 private function getPlugins()
 {
     $dispatcher = JDispatcher::getInstance();
     AImporter::helper('plugin');
     $payment_plugins = PluginHelper::getPluginsWithEvent('onBookproGetPaymentPlugins');
     $plugins = array();
     if ($payment_plugins) {
         foreach ($payment_plugins as $plugin) {
             $results = $dispatcher->trigger("onBookproGetPaymentOptions", array($plugin->element, ''));
             if (in_array(true, $results, true)) {
                 $plugins[] = $plugin;
             }
         }
     }
     if (count($plugins) == 1) {
         $plugins[0]->checked = true;
         ob_start();
         $this->getPaymentForm($plugins[0]->element);
         $html = json_decode(ob_get_contents());
         ob_end_clean();
         $this->assign('payment_form_div', $html->msg);
     }
     $this->assign('plugins', $plugins);
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:24,代码来源:view.html.php

示例13: addLanguage

 public function addLanguage()
 {
     AImporter::helper('xml', 'params');
     $clone_lang = JFactory::getApplication()->input->getString('lang');
     $config = ParamesHelper::getLanguageConfig();
     //		$en_admin_list = preg_filter('/^/', $config['main_lang'].'.', $adminArray);
     //		$en_site_list = preg_filter('/^/', $config['main_lang'].'.', $siteArray);
     //
     //		$clone_admin_list = preg_filter('/^/', $clone_lang.'.', $adminArray);
     //		$clone_site_list = preg_filter('/^/', $clone_lang.'.', $siteArray);
     //copy file
     $addmin_path_main = $config['folder_admin'] . DS . $config['main_lang'] . DS . $config['main_lang'];
     $addmin_path_clone = $config['folder_admin'] . DS . $clone_lang . DS . $clone_lang;
     foreach ($config['file_admin'] as $value) {
         $check = JFile::copy($addmin_path_main . '.' . $value, $addmin_path_clone . '.' . $value);
     }
     $site_path_main = $config['folder_site'] . DS . $config['main_lang'] . DS . $config['main_lang'];
     $site_path_clone = $config['folder_site'] . DS . $clone_lang . DS . $clone_lang;
     foreach ($config['file_site'] as $value) {
         $check = JFile::copy($site_path_main . '.' . $value, $site_path_clone . '.' . $value);
     }
     $this->setRedirect('index.php?option=com_bookpro&view=languages&layout=list&language=' . $clone_lang, $check ? 'Add language success' : 'Add language false', $check ? null : 'error');
     return;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:24,代码来源:language.php

示例14: defined

<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: view.html.php 32 2012-07-10 16:53:30Z quannv $
 **/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
AImporter::helper('image');
AImporter::model('tours');
class BookProViewDestinations extends JViewLegacy
{
    // Overwriting JView display method
    var $pagination;
    var $lists;
    protected $tour_itemid = null;
    function display($tpl = null)
    {
        $app = JFactory::getApplication();
        $document = JFactory::getDocument();
        $menu =& JSite::getMenu();
        $active = $menu->getActive();
        if ($active) {
            $this->products_per_row = $active->params->get('products_per_row', 2);
            $this->count = $active->params->get('count', 4);
            $this->width = $active->params->get('des_width', 130);
            $this->height = $active->params->get('des_height', 90);
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:view.html.php

示例15: defined

<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id$
 **/
defined('_JEXEC') or die('Restricted access');
AImporter::model('passengers', 'order');
AImporter::helper('date', 'currency', 'flight', 'paystatus');
$config = JComponentHelper::getParams('com_bookpro');
$company_name = $config->get('company_name');
$logo = $config->get('company_logo');
$address = $config->get('company_address');
JToolBarHelper::cancel();
?>
<div>
<div style="width:768px;border: 1px solid #ccc;margin: 0 auto;">

<?php 
if (JRequest::getCmd('task') != 'exportpdf') {
    ?>

	<a style="float:left; margin:5px 0 0 10px;"
		href="<?php 
    echo JUri::root() . 'index.php?option=com_bookpro&controller=order&task=exportpdf&layout=ticket&order_number=' . $this->order->order_number;
    ?>
"
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:default.php


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