PluginProbe
VikBooking Hotel Booking Engine & PMS / trunk
VikBooking Hotel Booking Engine & PMS vtrunk
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 1.7.3 All 36 releases
vikbooking / admin / views / states / tmpl / default.php

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

138 lines 7.5 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 $app = JFactory::getApplication();
14 $pidcountry = $app->getUserStateFromRequest("vbo.states.idcountry", 'idcountry', 0, 'int');
15 $pstatename = $app->getUserStateFromRequest("vbo.states.statename", 'statename', '', 'string');
16
17 $vbo_app = VikBooking::getVboApplication();
18 $vbo_app->loadSelect2();
19
20 JText::script('VBNEWCUSTOMFCOUNTRY');
21
22 ?>
23 <div class="vbo-list-form-filters vbo-btn-toolbar">
24 <form action="index.php?option=com_vikbooking&amp;view=states" method="post" name="statesform">
25 <div style="width: 100%; display: inline-block;" class="btn-toolbar" id="filter-bar">
26 <div class="btn-group pull-left">
27 <select name="idcountry" id="idcountry" onchange="document.statesform.submit();">
28 <option></option>
29 <?php
30 foreach (VikBooking::getCountriesArray($tn = true, $no_id = false) as $country) {
31 ?>
32 <option value="<?php echo $country['id']; ?>"<?php echo $country['id'] == $pidcountry ? ' selected="selected"' : ''; ?>><?php echo $country['country_name']; ?></option>
33 <?php
34 }
35 ?>
36 </select>
37 </div>
38 <div class="btn-group pull-left input-append btn-group-right-el">
39 <input type="text" name="statename" id="statename" value="<?php echo JHtml::fetch('esc_attr', $pstatename); ?>" size="40" placeholder="<?php echo JText::translate('VBPVIEWROOMONE'); ?>"/>
40 <button type="button" class="btn btn-secondary" onclick="document.statesform.submit();"><i class="icon-search"></i></button>
41 </div>
42 <div class="btn-group pull-left">
43 <button type="button" class="btn btn-secondary" onclick="document.getElementById('statename').value='';document.getElementById('idcountry').value='';document.statesform.submit();"><?php echo JText::translate('JSEARCH_FILTER_CLEAR'); ?></button>
44 </div>
45 </div>
46 <input type="hidden" name="task" value="" />
47 <input type="hidden" name="option" value="com_vikbooking" />
48 </form>
49 </div>
50
51 <script>
52 (function($) {
53 'use strict';
54
55 $(function() {
56 $('#idcountry').select2({
57 allowClear: true,
58 placeholder: Joomla.JText._('VBNEWCUSTOMFCOUNTRY'),
59 });
60 });
61 })(jQuery);
62 </script>
63
64 <?php
65 if (empty($this->rows)) {
66 ?>
67 <p class="warn"><?php echo JText::translate('JGLOBAL_NO_MATCHING_RESULTS'); ?></p>
68 <form action="index.php?option=com_vikbooking" method="post" name="adminForm" id="adminForm">
69 <input type="hidden" name="task" value="" />
70 <input type="hidden" name="option" value="com_vikbooking" />
71 </form>
72 <?php
73 } else {
74 ?>
75 <form action="index.php?option=com_vikbooking" method="post" name="adminForm" id="adminForm" class="vbo-list-form">
76 <div class="table-responsive">
77 <table cellpadding="4" cellspacing="0" border="0" width="100%" class="table table-striped vbo-list-table">
78 <thead>
79 <tr>
80 <th width="20">
81 <input type="checkbox" onclick="Joomla.checkAll(this)" value="" name="checkall-toggle">
82 </th>
83 <th class="title left" width="150">
84 <a href="index.php?option=com_vikbooking&amp;view=states&amp;vborderby=state_name&amp;vbordersort=<?php echo ($this->orderby == "state_name" && $this->ordersort == "ASC" ? "DESC" : "ASC"); ?>" class="<?php echo ($this->orderby == "state_name" && $this->ordersort == "ASC" ? "vbo-list-activesort" : ($this->orderby == "state_name" ? "vbo-list-activesort" : "")); ?>">
85 <?php echo JText::translate('VBO_STATE_PROVINCE') . ($this->orderby == "state_name" && $this->ordersort == "ASC" ? '<i class="'.VikBookingIcons::i('sort-asc').'"></i>' : ($this->orderby == "state_name" ? '<i class="'.VikBookingIcons::i('sort-desc').'"></i>' : '<i class="'.VikBookingIcons::i('sort').'"></i>')); ?>
86 </a>
87 </th>
88 <th class="title left" width="150"><?php echo JText::translate( 'VBNEWCUSTOMFCOUNTRY' ); ?></th>
89 <th class="title center" width="100" align="center">
90 <a href="index.php?option=com_vikbooking&amp;view=states&amp;vborderby=state_3_code&amp;vbordersort=<?php echo ($this->orderby == "state_3_code" && $this->ordersort == "ASC" ? "DESC" : "ASC"); ?>" class="<?php echo ($this->orderby == "state_3_code" && $this->ordersort == "ASC" ? "vbo-list-activesort" : ($this->orderby == "state_3_code" ? "vbo-list-activesort" : "")); ?>">
91 <?php echo JText::translate('VBO_3CHAR_CODE').($this->orderby == "state_3_code" && $this->ordersort == "ASC" ? '<i class="'.VikBookingIcons::i('sort-asc').'"></i>' : ($this->orderby == "state_3_code" ? '<i class="'.VikBookingIcons::i('sort-desc').'"></i>' : '<i class="'.VikBookingIcons::i('sort').'"></i>')); ?>
92 </a>
93 </th>
94 <th class="title center" width="100" align="center">
95 <a href="index.php?option=com_vikbooking&amp;view=states&amp;vborderby=state_2_code&amp;vbordersort=<?php echo ($this->orderby == "state_2_code" && $this->ordersort == "ASC" ? "DESC" : "ASC"); ?>" class="<?php echo ($this->orderby == "state_2_code" && $this->ordersort == "ASC" ? "vbo-list-activesort" : ($this->orderby == "state_2_code" ? "vbo-list-activesort" : "")); ?>">
96 <?php echo JText::translate('VBO_2CHAR_CODE').($this->orderby == "state_2_code" && $this->ordersort == "ASC" ? '<i class="'.VikBookingIcons::i('sort-asc').'"></i>' : ($this->orderby == "state_2_code" ? '<i class="'.VikBookingIcons::i('sort-desc').'"></i>' : '<i class="'.VikBookingIcons::i('sort').'"></i>')); ?>
97 </a>
98 </th>
99 <th class="title center" width="50" align="center">
100 <a href="index.php?option=com_vikbooking&amp;view=states&amp;vborderby=published&amp;vbordersort=<?php echo ($this->orderby == "published" && $this->ordersort == "ASC" ? "DESC" : "ASC"); ?>" class="<?php echo ($this->orderby == "published" && $this->ordersort == "ASC" ? "vbo-list-activesort" : ($this->orderby == "published" ? "vbo-list-activesort" : "")); ?>">
101 <?php echo JText::translate('VBPSHOWPAYMENTSFIVE').($this->orderby == "published" && $this->ordersort == "ASC" ? '<i class="'.VikBookingIcons::i('sort-asc').'"></i>' : ($this->orderby == "published" ? '<i class="'.VikBookingIcons::i('sort-desc').'"></i>' : '<i class="'.VikBookingIcons::i('sort').'"></i>')); ?>
102 </a>
103 </th>
104 </tr>
105 </thead>
106 <?php
107 $k = 0;
108 $i = 0;
109 for ($i = 0, $n = count($this->rows); $i < $n; $i++) {
110 $row = $this->rows[$i];
111 ?>
112 <tr class="row<?php echo $k; ?>">
113 <td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row['id']; ?>" onclick="Joomla.isChecked(this.checked);"></td>
114 <td class="vbo-highlighted-td"><a href="index.php?option=com_vikbooking&amp;task=states.edit&amp;cid[]=<?php echo $row['id']; ?>"><?php echo $row['state_name']; ?></a></td>
115 <td><?php echo $row['country_name']; ?></td>
116 <td class="center"><?php echo $row['state_3_code']; ?></td>
117 <td class="center"><?php echo $row['state_2_code']; ?></td>
118 <td class="center"><?php echo ($row['published'] == 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>
119 </tr>
120 <?php
121 $k = 1 - $k;
122 }
123 ?>
124 </table>
125 </div>
126
127 <input type="hidden" name="boxchecked" value="0" />
128 <input type="hidden" name="task" value="" />
129 <input type="hidden" name="view" value="states" />
130 <input type="hidden" name="idcountry" value="<?php echo $pidcountry; ?>" />
131
132 <?php echo JHtml::fetch('form.token'); ?>
133 <?php echo $this->navbut; ?>
134 </form>
135 <?php
136 }
137 ?>
138