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


PHP AImporter::model方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     $this->config = JBFactory::getConfig();
     $input = JFactory::getApplication()->input;
     AImporter::model('tour');
     $cart = JModelLegacy::getInstance('TourCart', 'bookpro');
     $cart->load();
     $cart->clear();
     $model = new BookProModelTour();
     $id = $input->getInt('id');
     $this->tour = $model->getComplexItem($id);
     $this->itineraries = TourHelper::buildItinerary($id);
     //$this->packages	= $packages;
     $date = TourHelper::getDateFirstInPackagerateFromTourid($this->tour->id);
     $this->date = JFactory::getDate($date)->format(DateHelper::getConvertDateFormat('P'));
     $this->tour->rdate = $this->date;
     $dispatcher = JDispatcher::getInstance();
     //$this->_prepareDocument();
     //		$dispatcher		= JDispatcher::getInstance();
     //		$this->event 	= new stdClass();
     //		JPluginHelper::importPlugin('bookpro');
     //		$results 		= $dispatcher->trigger('onBookproProductAfterTitle', array ($this->tour));
     //		$this->event->afterDisplayTitle=isset($results[0])?$results[0]:null;
     parent::display($tpl);
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:25,代码来源:view.html.php

示例2: 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

示例3: 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

示例4: getItems

 static function getItems($ids = null, $model = false)
 {
     if (empty($model)) {
         AImporter::model('vehicles');
         $model = new BookproModelVehicles();
     }
     return $model->getItemByIds($ids);
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:8,代码来源:vehicle.php

示例5: getCustomerSelectBox

 function getCustomerSelectBox($select)
 {
     AImporter::model('customers');
     $model = new BookProModelCustomers();
     $state = $model->getState();
     $state->set('list.start', 0);
     $state->set('list.limit', 0);
     $fullList = $model->getItems();
     //getData();
     return AHtml::getFilterSelect('user_id', 'Select Customer', $fullList, $select, false, '', 'id', 'firstname');
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:11,代码来源:view.html.php

示例6: display

 public function display($tpl = null)
 {
     AImporter::model('vehicles');
     $model = new BookproModelVehicles();
     $this->items = $model->getTypes();
     if (count($error = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:12,代码来源:view.html.php

示例7: getCitySelectBox

 function getCitySelectBox($select)
 {
     AImporter::model('airports');
     $model = new BookProModelAirports();
     $state = $model->getState();
     $state->set('list.start', 0);
     $state->set('list.limit', 0);
     $state->set('list.state', 1);
     $state->set('list.province', 1);
     $state->set('list.parent_id', 1);
     $fullList = $model->getItems();
     return JHTML::_('select.genericlist', $fullList, 'jform[city]', ' class="inputbox" ', 'id', 'title', $select, 'jform[city]');
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:13,代码来源:view.html.php

示例8: getObjectByID

 function getObjectByID($id)
 {
     AImporter::model('orderinfos', 'customer');
     $query = 'SELECT `obj`.*, c.mobile,c.firstname,c.email FROM `' . $this->_table->getTableName() . '` AS `obj` ';
     $query .= 'LEFT JOIN `#__bookpro_customer` AS `c` ON `c`.`id` = `obj`.`user_id` ';
     $query .= 'WHERE `obj`.`id` = ' . (int) $id;
     $this->_db->setQuery($query);
     $obj =& $this->_db->loadObject();
     //load orderinfo
     $infosmode = new BookProModelOrderinfos();
     $infolists = array('order_id' => $id);
     $infosmode->init($infolists);
     $infos = $infosmode->getData();
     $obj->infos = $infos;
     //load customer
     $customerModel = new BookProModelCustomer();
     //$customerModel->setId($obj->user_id);
     $customer = $customerModel->getItem($obj->user_id);
     //getObject();
     $obj->customer = $customer;
     return $obj;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:22,代码来源:agentorder.php

示例9: saveOrderInfoStop

 protected function saveOrderInfoStop()
 {
     AImporter::model('transports');
     AImporter::table('orderinfostop');
     $model_transport = new BookProModelTransports();
     foreach ($this->orderinfo as $orderinfo) {
         $stop_dest_list = $model_transport->getStopBetween($orderinfo->route_id, $orderinfo->destfrom, $orderinfo->destto);
         $ordering = 0;
         foreach ($stop_dest_list as $stop) {
             $table = new TableOrderInfoStop($this->_db);
             $data = array('ordering' => $ordering, 'orderinfo_id' => $orderinfo->id, 'dest' => $stop);
             if (!$table->save($data)) {
                 die('save order info stop error');
             }
             $ordering++;
         }
     }
     return true;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:19,代码来源:transport.php

示例10: getcity

 function getcity()
 {
     $country_id = JRequest::getInt('country_id', 0);
     AImporter::model('airports');
     $model = new BookProModelAirports();
     $state = $model->getState();
     $state->set('list.start', 0);
     $state->set('list.limit', 0);
     $state->set('filter.order_Dir', 'ASC');
     $state->set('filter.country_id', $country_id);
     $fullList = $model->getItems();
     echo AHtml::getFilterSelect('city', JText::_('COM_BOOKPRO_SELECT_CITY'), $fullList, $select, false, 'id="city"', 'id', 'title');
     return;
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:14,代码来源:customer.php

示例11: Copyright

<?php

/*------------------------------------------------------------------------
# view.html.php - bookpro Component
# ------------------------------------------------------------------------
# author    Ngo Van Quan
# copyright Copyright (C) 2015. All Rights Reserved
# license   GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
# website   joombooking.com
-------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
AImporter::helper('date', 'math', 'transport', 'currency', 'orderstatus', 'html');
AImporter::model('transports', 'transportreports');
class BookproViewAgentTransportReports extends JViewLegacy
{
    var $is_admin;
    function display($tpl = null)
    {
        if (!$this->is_admin) {
            $model = new BookproModeltransportreports();
            $this->setModel($model, true);
        }
        $this->state = $this->get('State');
        $from_date = $this->state->get('filter.from_date');
        if (empty($from_date)) {
            $this->state->set('filter.from_date', JHtml::date('now', 'Y-m-d'));
        }
        $to_date = $this->state->get('filter.to_date');
        if (empty($to_date)) {
            $this->state->set('filter.to_date', JHtml::date('now', 'Y-m-d'));
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:view.html.php

示例12: 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');
jimport('joomla.application.component.view');
AImporter::model('airports', 'customer', 'orders');
AImporter::helper('date', 'bookpro', 'currency');
class BookproViewMyPage extends JViewLegacy
{
    //Check user is agent
    protected $isAgent;
    //back link
    protected $route_return;
    function display($tpl = null)
    {
        //Add bootstrap
        JHtml::_('bootstrap.tooltip');
        JHtml::_('behavior.multiselect');
        JHtml::_('formbehavior.chosen', 'select');
        $mainframe = JFactory::getApplication();
        $document = JFactory::getDocument();
        $this->user = JBFactory::getAccount();
        //debug($this->customer); die;
        $document->setTitle('My page');
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:view.html.php

示例13: defined

<?php

defined('_JEXEC') or die('Restricted access');
AImporter::model('addons');
AImporter::helper('bookpro');
$service_depart = json_decode($this->trips['depart']->params);
$check = false;
foreach ($service_depart as $service) {
    if (!empty($service)) {
        $check = true;
    }
}
if ($this->cart->filter['roundtrip']) {
    $service_return = json_decode($this->trips['return']->params);
    foreach ($service_return as $service) {
        if (!empty($service)) {
            $check = true;
        }
    }
}
if (!$check) {
    return;
}
$model = new BookProModeladdons();
?>
<script type="text/javascript">

jQuery(document).ready(function($){	
    jQuery(".addonClick").click(function(){
           var addon= new Array();
           	  $('.addonClick').each(function(){
开发者ID:hixbotay,项目名称:executivetransport,代码行数:31,代码来源:default_addon.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: bookpro.php 80 2012-08-10 09:25:35Z quannv $
 **/
defined('_JEXEC') or die;
AImporter::model('tourrate', 'tour');
class BookproViewRatedetail extends JViewLegacy
{
    public function display($tpl = null)
    {
        $app = JFactory::getApplication();
        $input = $app->input;
        $this->tour_id = $input->get('tour_id', 0);
        $this->date = $input->get('date', null);
        $model = new BookProModelTourRate();
        $this->rates = $model->getRateTour($this->tour_id, $this->date);
        $tour_model = new BookProModelTour();
        $this->tour = $tour_model->getItem($this->tour_id);
        parent::display($tpl);
    }
}
开发者ID:hixbotay,项目名称:executivetransport,代码行数:27,代码来源:view.html.php

示例15: exportmonthpdf

 function exportmonthpdf()
 {
     $datefrom = JFactory::$application->input->get('datefrom');
     $dateto = JFactory::$application->input->get('dateto');
     AImporter::helper('pdf', 'order');
     AImporter::model('customer');
     $customerModel = new BookProModelCustomer();
     $customer = $customerModel->getItemByUser();
     $user_id = $customer->id;
     AImporter::model('orders');
     $model = new BookProModelOrders();
     $state = $model->getState();
     $state->set('list.start', 0);
     $state->set('list.limit', 0);
     $state->set('filter.datefrom', $datefrom);
     $state->set('filter.dateto', $dateto);
     $state->set('filter.user_id', $user_id);
     $orders = $model->getItems();
     $object = new JObject();
     $object->orders = $orders;
     $object->customer = $customer;
     $object->order_number = time();
     $object->date = JText::sprintf('COM_BOOKPRO_BILL_FROM_TO', $datefrom, $dateto);
     $ticket_view = $this->getView('ordersagent', 'html', 'BookProView');
     if ($user_id) {
         $ticket_view->ordersComplex = $object;
         ob_start();
         $ticket_view->display();
         $pdf = ob_get_contents();
         ob_clean();
         PrintPdfHelper::printTicket($pdf, $object);
     } else {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_BOOKPRO_CAN_NO_FIND_ORDERS_FOR_PRINTING'));
         $this->setRedirect(JURI::base() . 'controller=order&task=ordersdetailmonth');
     }
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:36,代码来源:order.php


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