| @@ -1,0 +1,57 @@ | ||
| 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 | +/** | |
| 14 | + * @wponly this View is only for WP | |
| 15 | + */ | |
| 16 | + | |
| 17 | +// import Joomla view library | |
| 18 | +jimport('joomla.application.component.view'); | |
| 19 | + | |
| 20 | +class VikBookingViewGotopro extends JViewVikBooking | |
| 21 | +{ | |
| 22 | + public function display($tpl = null) | |
| 23 | + { | |
| 24 | + // Set the toolbar | |
| 25 | + $this->addToolBar(); | |
| 26 | + | |
| 27 | + VikBookingLoader::import('update.license'); | |
| 28 | + | |
| 29 | + $hidead = VikRequest::getInt('hidead', 0, 'request'); | |
| 30 | + if ($hidead > 0) { | |
| 31 | + VikBookingLicense::setVcmAd(false); | |
| 32 | + } | |
| 33 | + | |
| 34 | + $lic_key = VikBookingLicense::getKey(); | |
| 35 | + $lic_date = VikBookingLicense::getExpirationDate(); | |
| 36 | + $is_pro = VikBookingLicense::isPro(); | |
| 37 | + | |
| 38 | + if ($is_pro > 0) { | |
| 39 | + $tpl = 'pro'; | |
| 40 | + } | |
| 41 | + | |
| 42 | + $this->lic_key = $lic_key; | |
| 43 | + $this->lic_date = $lic_date; | |
| 44 | + $this->is_pro = $is_pro; | |
| 45 | + | |
| 46 | + // Display the template | |
| 47 | + parent::display($tpl); | |
| 48 | + } | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * Sets the toolbar | |
| 52 | + */ | |
| 53 | + protected function addToolBar() | |
| 54 | + { | |
| 55 | + JToolBarHelper::title(JText::translate('VBMAINGOTOPROTITLE'), 'vikbooking'); | |
| 56 | + } | |
| 57 | +} | |