| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package VikBooking |
| 4 |
* @subpackage com_vikbooking |
| 5 |
* @author Alessio Gaggii - e4j - Extensionsforjoomla.com |
| 6 |
* @copyright Copyright (C) 2018 e4j - Extensionsforjoomla.com. All rights reserved. |
| 7 |
* @license GNU General Public License version 2 or later; see LICENSE |
| 8 |
* @link https://vikwp.com |
| 9 |
*/ |
| 10 |
|
| 11 |
defined('ABSPATH') or die('No script kiddies please!'); |
| 12 |
|
| 13 |
// import Joomla view library |
| 14 |
jimport('joomla.application.component.view'); |
| 15 |
|
| 16 |
class VikBookingViewExportcustomers extends JViewVikBooking { |
| 17 |
|
| 18 |
function display($tpl = null) { |
| 19 |
// Set the toolbar |
| 20 |
$this->addToolBar(); |
| 21 |
|
| 22 |
$cid = VikRequest::getVar('cid', array(0)); |
| 23 |
|
| 24 |
$dbo = JFactory::getDBO(); |
| 25 |
$q = "SELECT * FROM `#__vikbooking_countries` ORDER BY `#__vikbooking_countries`.`country_name` ASC;"; |
| 26 |
$dbo->setQuery($q); |
| 27 |
$countries = $dbo->loadAssocList(); |
| 28 |
|
| 29 |
$this->cid = $cid; |
| 30 |
$this->countries = $countries; |
| 31 |
|
| 32 |
// Display the template |
| 33 |
parent::display($tpl); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Sets the toolbar |
| 38 |
*/ |
| 39 |
protected function addToolBar() { |
| 40 |
JToolBarHelper::title(JText::translate('VBMAINEXPCUSTOMERSTITLE'), 'vikbooking'); |
| 41 |
JToolBarHelper::custom('exportcustomerslaunch', 'download', 'download', JText::translate('VBOCSVEXPCUSTOMERSGET'), false); |
| 42 |
JToolBarHelper::spacer(); |
| 43 |
JToolBarHelper::cancel( 'cancelcustomer', JText::translate('VBBACK')); |
| 44 |
JToolBarHelper::spacer(); |
| 45 |
} |
| 46 |
|
| 47 |
} |
| 48 |
|