| 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 |
$rows = $this->rows; |
| 14 |
$lim0 = $this->lim0; |
| 15 |
$navbut = $this->navbut; |
| 16 |
|
| 17 |
if (empty($rows)) { |
| 18 |
?> |
| 19 |
<p class="warn"><?php echo JText::translate('VBNOCARATFOUND'); ?></p> |
| 20 |
<form action="index.php?option=com_vikbooking" method="post" name="adminForm" id="adminForm"> |
| 21 |
<input type="hidden" name="task" value="" /> |
| 22 |
<input type="hidden" name="option" value="com_vikbooking" /> |
| 23 |
</form> |
| 24 |
<?php |
| 25 |
} else { |
| 26 |
?> |
| 27 |
<form action="index.php?option=com_vikbooking" method="post" name="adminForm" id="adminForm" class="vbo-list-form"> |
| 28 |
<div class="table-responsive"> |
| 29 |
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="table table-striped vbo-list-table"> |
| 30 |
<thead> |
| 31 |
<tr> |
| 32 |
<th width="20"> |
| 33 |
<input type="checkbox" onclick="Joomla.checkAll(this)" value="" name="checkall-toggle"> |
| 34 |
</th> |
| 35 |
<th class="title left" width="150"><?php echo JText::translate( 'VBPVIEWCARATONE' ); ?></th> |
| 36 |
<th class="title left" width="150"><?php echo JText::translate( 'VBPVIEWCARATTWO' ); ?></th> |
| 37 |
<th class="title left" width="250"><?php echo JText::translate( 'VBPVIEWCARATTHREE' ); ?></th> |
| 38 |
<th class="title center" align="center" width="100"><?php echo JText::translate( 'VBPVIEWOPTIONALSORDERING' ); ?></th> |
| 39 |
</tr> |
| 40 |
</thead> |
| 41 |
<?php |
| 42 |
$k = 0; |
| 43 |
$i = 0; |
| 44 |
for ($i = 0, $n = count($rows); $i < $n; $i++) { |
| 45 |
$row = $rows[$i]; |
| 46 |
?> |
| 47 |
<tr class="row<?php echo $k; ?>"> |
| 48 |
<td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row['id']; ?>" onclick="Joomla.isChecked(this.checked);"></td> |
| 49 |
<td class="vbo-highlighted-td"><a href="index.php?option=com_vikbooking&task=editcarat&cid[]=<?php echo $row['id']; ?>"><?php echo $row['name']; ?></a></td> |
| 50 |
<td> |
| 51 |
<?php |
| 52 |
echo (is_file(VBO_SITE_PATH.DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.$row['icon'] && !empty($row['icon'])) ? "<span>".$row['icon']." <img align=\"middle\" src=\"".VBO_SITE_URI."resources/uploads/".$row['icon']."\"/></span>" : $row['icon']); |
| 53 |
?> |
| 54 |
</td> |
| 55 |
<td><?php echo $row['textimg']; ?></td> |
| 56 |
<td class="center"> |
| 57 |
<a href="<?php echo VBOFactory::getPlatform()->getUri()->addCSRF('index.php?option=com_vikbooking&task=sortcarat&cid[]=' . $row['id'] . '&mode=up', true); ?>"><?php VikBookingIcons::e('arrow-up', 'vbo-icn-img'); ?></a> |
| 58 |
<a href="<?php echo VBOFactory::getPlatform()->getUri()->addCSRF('index.php?option=com_vikbooking&task=sortcarat&cid[]=' . $row['id'] . '&mode=down', true); ?>"><?php VikBookingIcons::e('arrow-down', 'vbo-icn-img'); ?></a> |
| 59 |
</td> |
| 60 |
</tr> |
| 61 |
<?php |
| 62 |
$k = 1 - $k; |
| 63 |
} |
| 64 |
?> |
| 65 |
</table> |
| 66 |
</div> |
| 67 |
<input type="hidden" name="option" value="com_vikbooking" /> |
| 68 |
<input type="hidden" name="task" value="carat" /> |
| 69 |
<input type="hidden" name="boxchecked" value="0" /> |
| 70 |
<?php echo JHtml::fetch('form.token'); ?> |
| 71 |
<?php echo $navbut; ?> |
| 72 |
</form> |
| 73 |
<?php |
| 74 |
} |
| 75 |
|