| 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 |
jimport('joomla.application.component.view'); |
| 14 |
|
| 15 |
class VikbookingViewOperators extends JViewVikBooking { |
| 16 |
function display($tpl = null) { |
| 17 |
VikBooking::prepareViewContent(); |
| 18 |
|
| 19 |
$operator = VikBooking::getOperatorInstance()->getOperatorAccount(); |
| 20 |
|
| 21 |
if ($operator === false) { |
| 22 |
// operator needs to log in (default_login.php) |
| 23 |
$tpl = 'login'; |
| 24 |
} else { |
| 25 |
// operator is logged in (default_dashboard.php) |
| 26 |
$tpl = 'dashboard'; |
| 27 |
} |
| 28 |
|
| 29 |
$this->operator = $operator; |
| 30 |
|
| 31 |
parent::display($tpl); |
| 32 |
} |
| 33 |
} |
| 34 |
|