# vikbooking/1.8.15/site/views/operators/view.html.php

VikBooking Hotel Booking Engine &amp; PMS, version 1.8.15. 60 lines.

- Page: https://pluginprobe.com/plugins/vikbooking/1.8.15/code/site/views/operators/view.html.php
- Raw: https://pluginprobe.com/plugins/vikbooking/1.8.15/raw/site/views/operators/view.html.php
- Modified: 2026-09-14T11:37:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/vikbooking/1.8.15/code/site/views/operators/view.html.php#L10-L20`.

```php
<?php
/**
 * @package     VikBooking
 * @subpackage  com_vikbooking
 * @author      Alessio Gaggii - e4j - Extensionsforjoomla.com
 * @copyright   Copyright (C) 2018 e4j - Extensionsforjoomla.com. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 * @link        https://vikwp.com
 */

defined('ABSPATH') or die('No script kiddies please!');

jimport('joomla.application.component.view');

class VikbookingViewOperators extends JViewVikBooking
{
	public function display($tpl = null)
	{
		VikBooking::prepareViewContent();

		$app = JFactory::getApplication();

		// access the global operators object
		$oper_obj = VikBooking::getOperatorInstance();

		// attempt to get the current operator
		$operator = $oper_obj->getOperatorAccount();

		// check request value for a custom tool
		$tool = $app->input->getString('tool', '');

		if ($operator === false) {
			// operator needs to log in (default_login.php)
			$tpl = 'login';
		} elseif ($tool) {
			/**
			 * Change layout from default to "tool" (tool.php).
			 * 
			 * @since 	1.16.9 (J) - 1.6.9 (WP)
			 */
			$this->setLayout('tool');
		} else {
			// operator is logged in (default_dashboard.php)
			$tpl = 'dashboard';
		}

		// convert the JSON strings into array values
		if ($operator) {
			$operator['perms'] = !empty($operator['perms']) ? (is_scalar($operator['perms']) ? (array) json_decode($operator['perms'], true) : $operator['perms']) : [];
			$operator['work_days_week'] = !empty($operator['work_days_week']) ? (is_scalar($operator['work_days_week']) ? (array) json_decode($operator['work_days_week'], true) : $operator['work_days_week']) : [];
			$operator['work_days_exceptions'] = !empty($operator['work_days_exceptions']) ? (is_scalar($operator['work_days_exceptions']) ? (array) json_decode($operator['work_days_exceptions'], true) : $operator['work_days_exceptions']) : [];
		}

		$this->operator = $operator;
		$this->tool = $tool;

		parent::display($tpl);
	}
}

```
