PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
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
← All changes | admin/views/carat/view.html.php +66 -0 1.6.1 → 1.8.16 View file →
@@ -1,0 +1,66 @@
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 +// import Joomla view library
14 +jimport('joomla.application.component.view');
15 +
16 +class VikBookingViewCarat extends JViewVikBooking {
17 +
18 + function display($tpl = null) {
19 + // Set the toolbar
20 + $this->addToolBar();
21 +
22 + $rows = "";
23 + $navbut = "";
24 + $dbo = JFactory::getDBO();
25 + $mainframe = JFactory::getApplication();
26 + $lim = $mainframe->getUserStateFromRequest("com_vikbooking.limit", 'limit', $mainframe->get('list_limit'), 'int');
27 + $lim0 = VikRequest::getVar('limitstart', 0, '', 'int');
28 + $q = "SELECT SQL_CALC_FOUND_ROWS * FROM `#__vikbooking_characteristics` ORDER BY `#__vikbooking_characteristics`.`ordering` ASC";
29 + $dbo->setQuery($q, $lim0, $lim);
30 + $dbo->execute();
31 + if ($dbo->getNumRows() > 0) {
32 + $rows = $dbo->loadAssocList();
33 + $dbo->setQuery('SELECT FOUND_ROWS();');
34 + jimport('joomla.html.pagination');
35 + $pageNav = new JPagination( $dbo->loadResult(), $lim0, $lim );
36 + $navbut = "<table align=\"center\"><tr><td>".$pageNav->getListFooter()."</td></tr></table>";
37 + }
38 +
39 + $this->rows = $rows;
40 + $this->lim0 = $lim0;
41 + $this->navbut = $navbut;
42 +
43 + // Display the template
44 + parent::display($tpl);
45 + }
46 +
47 + /**
48 + * Sets the toolbar
49 + */
50 + protected function addToolBar() {
51 + JToolBarHelper::title(JText::translate('VBMAINCARATTITLE'), 'vikbooking');
52 + if (JFactory::getUser()->authorise('core.create', 'com_vikbooking')) {
53 + JToolBarHelper::addNew('newcarat', JText::translate('VBMAINCARATNEW'));
54 + JToolBarHelper::spacer();
55 + }
56 + if (JFactory::getUser()->authorise('core.edit', 'com_vikbooking')) {
57 + JToolBarHelper::editList('editcarat', JText::translate('VBMAINCARATEDIT'));
58 + JToolBarHelper::spacer();
59 + }
60 + if (JFactory::getUser()->authorise('core.delete', 'com_vikbooking')) {
61 + JToolBarHelper::deleteList(JText::translate('VBDELCONFIRM'), 'removecarat', JText::translate('VBMAINCARATDEL'));
62 + JToolBarHelper::spacer();
63 + }
64 + }
65 +
66 +}