PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.11
VikBooking Hotel Booking Engine & PMS v1.8.11
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
vikbooking / admin / views / prices / tmpl / default.php

default.php in VikBooking Hotel Booking Engine & PMS 1.8.11, at admin/views/prices/tmpl/default.php

109 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 <div class="vbo-admin-wizard-container">
20 <div class="vbo-admin-wizard-inner">
21 <a class="btn vbo-wizard-btn" href="javascript: void(0);" onclick="showVboWizard();"><?php VikBookingIcons::e('magic'); ?> <?php echo JText::translate('VBOTOGGLEWIZARD'); ?></a>
22 </div>
23 </div>
24 <p class="warn"><?php echo JText::translate('VBNOPRICESFOUND'); ?></p>
25 <form action="index.php?option=com_vikbooking" method="post" name="adminForm" id="adminForm">
26 <input type="hidden" name="task" value="" />
27 <input type="hidden" name="option" value="com_vikbooking" />
28 </form>
29 <?php
30 // load wizard template
31 echo $this->loadTemplate('wizard');
32 } else {
33 $rplan_assoc = [];
34 foreach ($rows as $row) {
35 $rplan_assoc[$row['id']] = $row['name'];
36 }
37 ?>
38 <form action="index.php?option=com_vikbooking" method="post" name="adminForm" id="adminForm" class="vbo-list-form">
39 <div class="table-responsive">
40 <table cellpadding="4" cellspacing="0" border="0" width="100%" class="table table-striped vbo-list-table">
41 <thead>
42 <tr>
43 <th width="20">
44 <input type="checkbox" onclick="Joomla.checkAll(this)" value="" name="checkall-toggle">
45 </th>
46 <th class="title left" width="200"><?php echo JText::translate( 'VBPVIEWPRICESONE' ); ?></th>
47 <th class="title center" width="100"><?php echo JText::translate( 'VBO_MODIFICATION_MODE' ); ?></th>
48 <th class="title center" width="100"><?php echo JText::translate( 'VBPVIEWPRICESTHREE' ); ?></th>
49 <th class="title left" width="150"><?php echo JText::translate( 'VBOPRICETYPESRESTR' ); ?></th>
50 <th class="title center" width="100"><?php echo JText::translate( 'VBNEWPRICEBREAKFAST' ); ?></th>
51 <th class="title center" width="100"><?php echo JText::translate( 'VBNEWPRICEFREECANC' ); ?></th>
52 </tr>
53 </thead>
54 <?php
55 $k = 0;
56 $i = 0;
57 for ($i = 0, $n = count($rows); $i < $n; $i++) {
58 $row = $rows[$i];
59 $restr = array();
60 if ($row['minlos'] > 1) {
61 $restr[] = JText::translate('VBOPRICETYPEMINLOS').': '.$row['minlos'];
62 }
63 if ($row['minhadv'] > 0) {
64 $restr[] = JText::translate('VBOPRICETYPEMINHADV').': '.$row['minhadv'];
65 }
66 $aliq = VikBooking::getAliq($row['idiva']);
67 ?>
68 <tr class="row<?php echo $k; ?>">
69 <td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row['id']; ?>" onclick="Joomla.isChecked(this.checked);"></td>
70 <td class="vbo-highlighted-td"><a href="index.php?option=com_vikbooking&amp;task=editprice&cid[]=<?php echo $row['id']; ?>"><?php echo $row['name']; ?></a></td>
71 <td class="center"><?php
72 if ($row['derived_id'] && $row['derived_data']) {
73 $row['derived_data'] = json_decode($row['derived_data'], true);
74 $row['derived_data'] = is_array($row['derived_data']) ? $row['derived_data'] : [];
75 // build derived info string
76 $derived_info_str = ($rplan_assoc[$row['derived_id']] ?? '') . ' ';
77 $derived_info_str .= ($row['derived_data']['type'] ?? 'percent') == 'absolute' ? VikBooking::getCurrencySymb() . ' ' : '';
78 $derived_info_str .= ($row['derived_data']['mode'] ?? 'discount') == 'discount' ? '-' : '+';
79 $derived_info_str .= $row['derived_data']['value'] ?? 0;
80 $derived_info_str .= ($row['derived_data']['type'] ?? 'percent') == 'percent' ? ' %' : '';
81 ?>
82 <span class="vbo-tooltip vbo-tooltip-top" data-tooltiptext="<?php echo $this->escape($derived_info_str); ?>"><?php VikBookingIcons::e('link'); ?> <?php echo JText::translate('VBO_IS_DERIVED_RATE'); ?></span>
83 <?php
84 } else {
85 ?>
86 <span><?php VikBookingIcons::e('check'); ?> <?php echo JText::translate('VBO_PARENT_RATE'); ?></span>
87 <?php
88 }
89 ?></td>
90 <td class="center"><?php echo !empty($aliq) ? $aliq.'%' : '----'; ?></td>
91 <td><?php echo implode(', ', $restr); ?></td>
92 <td class="center"><?php echo (intval($row['breakfast_included'])==1 ? "<i class=\"".VikBookingIcons::i('check', 'vbo-icn-img')."\" style=\"color: #099909;\"></i>" : "<i class=\"".VikBookingIcons::i('times-circle', 'vbo-icn-img')."\" style=\"color: #ff0000;\"></i>"); ?></td>
93 <td class="center"><?php echo (intval($row['free_cancellation'])==1 ? "<i class=\"".VikBookingIcons::i('check', 'vbo-icn-img')."\" style=\"color: #099909;\" title=\"".JText::sprintf('VBNEWPRICEFREECANCDLINETIP', $row['canc_deadline'])."\"></i>" : "<i class=\"".VikBookingIcons::i('times-circle', 'vbo-icn-img')."\" style=\"color: #ff0000;\"></i>"); ?></td>
94 </tr>
95 <?php
96 $k = 1 - $k;
97 }
98 ?>
99 </table>
100 </div>
101 <input type="hidden" name="option" value="com_vikbooking" />
102 <input type="hidden" name="task" value="prices" />
103 <input type="hidden" name="boxchecked" value="0" />
104 <?php echo JHtml::fetch('form.token'); ?>
105 <?php echo $navbut; ?>
106 </form>
107 <?php
108 }
109