| 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 |
$operator = $this->operator; |
| 14 |
|
| 15 |
$operator['perms'] = !empty($operator['perms']) ? json_decode($operator['perms'], true) : array(); |
| 16 |
$operator['perms'] = is_array($operator['perms']) ? $operator['perms'] : array(); |
| 17 |
|
| 18 |
$pitemid = VikRequest::getInt('Itemid', '', 'request'); |
| 19 |
|
| 20 |
?> |
| 21 |
<div class="vbo-operator-dashboard"> |
| 22 |
<h3><?php echo $operator['first_name'] . ' ' . $operator['last_name']; ?></h3> |
| 23 |
<div class="vbo-operator-dashboard-logout"> |
| 24 |
<form action="<?php echo JRoute::rewrite('index.php?option=com_vikbooking&task=operatorlogout&Itemid=' . $pitemid); ?>" method="post"> |
| 25 |
<input type="submit" name="logout" value="<?php echo JText::translate('VBOLOGOUT'); ?>" class="vbo-logout vbo-pref-color-btn-secondary" /> |
| 26 |
<input type="hidden" name="option" value="com_vikbooking" /> |
| 27 |
<input type="hidden" name="task" value="operatorlogout" /> |
| 28 |
<?php |
| 29 |
if (!empty($pitemid)) { |
| 30 |
?> |
| 31 |
<input type="hidden" name="Itemid" value="<?php echo $pitemid; ?>" /> |
| 32 |
<?php |
| 33 |
} |
| 34 |
?> |
| 35 |
</form> |
| 36 |
</div> |
| 37 |
<div class="vbo-operator-dashboard-links"> |
| 38 |
<ul> |
| 39 |
<?php |
| 40 |
foreach ($operator['perms'] as $perm) { |
| 41 |
?> |
| 42 |
<li> |
| 43 |
<div class="vbo-operator-dashboard-link-left"> |
| 44 |
<a href="<?php echo JRoute::rewrite('index.php?option=com_vikbooking&view='.$perm['type'].(!empty($pitemid) ? '&Itemid='.$pitemid : '')); ?>"><?php echo JText::translate('VBOOPERPG'.strtoupper($perm['type'])); ?></a> |
| 45 |
</div> |
| 46 |
<div class="vbo-operator-dashboard-link-right"> |
| 47 |
<a class="btn vbo-pref-color-btn" href="<?php echo JRoute::rewrite('index.php?option=com_vikbooking&view='.$perm['type'].(!empty($pitemid) ? '&Itemid='.$pitemid : '')); ?>"><?php echo JText::translate('VBOOPERVIEWPG'); ?></a> |
| 48 |
</div> |
| 49 |
</li> |
| 50 |
<?php |
| 51 |
} |
| 52 |
?> |
| 53 |
</ul> |
| 54 |
</div> |
| 55 |
</div> |