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/dashboard/view.html.php +76 -0 1.6.1 → 1.8.16 View file →
@@ -1,0 +1,76 @@
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 VikBookingViewDashboard extends JViewVikBooking
17 +{
18 + public function display($tpl = null)
19 + {
20 + // Set the toolbar
21 + $this->addToolBar();
22 +
23 + if (VBOPlatformDetection::isWordPress()) {
24 + /**
25 + * @wponly - trigger back up of extendable files
26 + */
27 + VikBookingLoader::import('update.manager');
28 + VikBookingUpdateManager::triggerExtendableClassesBackup('languages', "/^.+\-((?!en_US|it_IT).)+$/");
29 + } else {
30 + /**
31 + * @joomlaonly Extra fields for Joomla XML Updates
32 + */
33 + $jvobj = new JVersion;
34 + $jv = $jvobj->getShortVersion();
35 + if (version_compare($jv, '3.2.0', '>=')) {
36 + // With this method we populate the extra fields for this extension. We need to store the domain name encoded in base64 for the download of commercial updates.
37 + // Without the record stored this way, our Update Servers will reject the download request.
38 + require_once VBO_ADMIN_PATH . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'urihandler.php';
39 +
40 + $domain = JFactory::getApplication()->input->server->getString('HTTP_HOST');
41 +
42 + $update = new UriUpdateHandler('com_vikbooking');
43 + $update->addExtraField('domain', base64_encode($domain));
44 + $ord_num = JFactory::getApplication()->input->getString('order_number');
45 + if (!empty($ord_num)) {
46 + $update->addExtraField('order_number', $ord_num);
47 + }
48 + $update->checkSchema(E4J_SOFTWARE_VERSION);
49 + $update->register();
50 + }
51 + }
52 +
53 + $this->metrics = VikBookingHelper::getFirstSetupMetrics();
54 +
55 + // Display the template
56 + parent::display($tpl);
57 + }
58 +
59 + /**
60 + * Sets the toolbar
61 + */
62 + protected function addToolBar()
63 + {
64 + JToolBarHelper::title(JText::translate('VBMAINDASHBOARDTITLE'), 'vikbooking');
65 + if (JFactory::getUser()->authorise('core.admin', 'com_vikbooking')) {
66 + JToolBarHelper::preferences('com_vikbooking');
67 +
68 + /**
69 + * @wponly add toolbar button for Shortcodes.
70 + */
71 + if (VBOPlatformDetection::isWordPress()) {
72 + JToolBarHelper::shortcodes('com_vikbooking');
73 + }
74 + }
75 + }
76 +}