PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / admin / views / reportsser / view.html.php
vikappointments / admin / views / reportsser Last commit date
tmpl 2 days ago index.html 2 days ago view.html.php 2 days ago
view.html.php
73 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 /**
15 * VikAppointments services reports view.
16 *
17 * @since 1.3
18 */
19 class VikAppointmentsViewreportsser extends JViewVAP
20 {
21 /**
22 * VikAppointments view display method.
23 *
24 * @return void
25 */
26 function display($tpl = null)
27 {
28 $input = JFactory::getApplication()->input;
29
30 // set the toolbar
31 $this->addToolbar();
32
33 // get services
34 $cid = $input->get('cid', array(), 'uint');
35
36 // load view model
37 $model = JModelVAP::getInstance('reportsser');
38
39 // extract view filters
40 $this->filters = $model->getFiltersFromRequest();
41
42 // build form data
43 $this->services = $model->getFormData($cid, $this->filters);
44
45 // display the template (default.php)
46 parent::display($tpl);
47 }
48
49 /**
50 * Setting the toolbar.
51 *
52 * @return void
53 */
54 protected function addToolBar()
55 {
56 // add menu title and some buttons to the page
57 JToolBarHelper::title(JText::translate('VAPREPORTSSERTITLE'), 'vikappointments');
58
59 JToolBarHelper::custom('reportsser.download', 'download', 'download', JText::translate('VAPDOWNLOAD'), false);
60
61 $from = JFactory::getApplication()->input->get('from', 'service');
62
63 if ($from == 'calendar')
64 {
65 JToolBarHelper::cancel('calendar.cancel', 'JTOOLBAR_CLOSE');
66 }
67 else
68 {
69 JToolBarHelper::cancel('service.cancel', 'JTOOLBAR_CLOSE');
70 }
71 }
72 }
73