• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AImporter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了AImporter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: deleteRateDate

 function deleteRateDate()
 {
     $id = JRequest::getInt('id', 0);
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     if ($id) {
         $query->delete('#__bookpro_tourrate');
         $query->where('id=' . $id);
         $db->setQuery($query);
         $db->query();
     }
     $calendar_attributes = array('min_select_year' => JFactory::getDate('-1 years')->format('Y'), 'max_select_year' => JFactory::getDate('+1 years')->format('Y'));
     if (isset($_REQUEST['action']) and $_REQUEST['action'] == 'pn_get_month_cal') {
         require_once JPATH_COMPONENT_ADMINISTRATOR . '/classes/calendar.php';
         AImporter::css('calendar');
         $calendar = new PN_Calendar($calendar_attributes);
         echo $calendar->draw(array(), $_REQUEST['year'], $_REQUEST['month']);
         exit;
     }
 }
开发者ID:hixbotay,项目名称:executivetransport,代码行数:20,代码来源:tour.php


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


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


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


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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AJXP_Controller类代码示例发布时间:2022-05-23
下一篇:
PHP AIR2_Record类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap