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


PHP AImporter类代码示例

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


在下文中一共展示了AImporter类的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

 /**
  * 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

示例3: save

 /**
  * Save subject.
  *
  * @param boolean $apply true state on edit page, false return to browse list
  */
 function save($apply = false)
 {
     $task = $this->getTask();
     JRequest::checkToken() or jexit('Invalid Token');
     $mainframe = JFactory::getApplication();
     $input = $mainframe->input;
     $post = JRequest::get('post');
     $post['desc'] = JRequest::getVar('desc', '', 'post', 'string', JREQUEST_ALLOWRAW);
     $post['jform']['meal'] = implode(';', $post['jform']['meal']);
     //debug($post['jform']); die;
     $db = JFactory::getDbo();
     AImporter::table('itinerary');
     $Table = new TableItinerary($db);
     $Table->bind($post['jform']);
     $Table->store();
     $id = $Table->id;
     if ($id !== false) {
         $mainframe->enqueueMessage(JText::_('Successfully saved'), 'message');
     } else {
         $mainframe->enqueueMessage(JText::_('Save failed'), 'error');
     }
     if ($task != 'save') {
         $mainframe->redirect('index.php?option=com_bookpro&view=itinerary&layout=edit&id=' . $id);
     } else {
         $mainframe->redirect('index.php?option=com_bookpro&view=itineraries');
     }
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:32,代码来源:itinerary.php

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

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

示例6: __construct

 function __construct()
 {
     parent::__construct();
     if (!class_exists('TablePackagerate')) {
         AImporter::table('packagerate');
     }
     $this->_table = $this->getTable('packagerate');
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:8,代码来源:adpackagerate.php

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

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

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

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

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

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

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

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

示例15: delete

 public function delete()
 {
     JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
     $cid = JFactory::getApplication()->input->getInt('cid');
     if (!$cid) {
         $this->setMessage('Delete failed!');
     } else {
         AImporter::table('vehicletype');
         $db = JFactory::getDbo();
         $table = new TableVehicleType($db);
         $table->load($cid);
         $result = $table->delete();
     }
     if ($result) {
         $this->setMessage('Delete successfull!');
     } else {
         $this->setMessage('Delete failed!');
     }
     $this->directView();
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:20,代码来源:vehicletype.php


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