default.php
138 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 | $rows = $this->rows; |
| 15 | |
| 16 | $filters = $this->filters; |
| 17 | |
| 18 | $vik = VAPApplication::getInstance(); |
| 19 | |
| 20 | $canEdit = JFactory::getUser()->authorise('core.edit', 'com_vikappointments'); |
| 21 | |
| 22 | ?> |
| 23 | |
| 24 | <form action="index.php?option=com_vikappointments" method="post" name="adminForm" id="adminForm"> |
| 25 | |
| 26 | <?php |
| 27 | if (count($rows) == 0) |
| 28 | { |
| 29 | echo $vik->alert(JText::translate('JGLOBAL_NO_MATCHING_RESULTS')); |
| 30 | } |
| 31 | else |
| 32 | { |
| 33 | ?> |
| 34 | <table cellpadding="4" cellspacing="0" border="0" width="100%" class="<?php echo $vik->getAdminTableClass(); ?>"> |
| 35 | <?php echo $vik->openTableHead(); ?> |
| 36 | <tr> |
| 37 | |
| 38 | <th width="1%"> |
| 39 | <?php echo $vik->getAdminToggle(count($rows)); ?> |
| 40 | </th> |
| 41 | |
| 42 | <!-- ID --> |
| 43 | |
| 44 | <th class="<?php echo $vik->getAdminThClass('left hidden-phone nowrap'); ?>" width="1%" style="text-align: left;"> |
| 45 | <?php echo JText::translate('VAPMANAGEPACKGROUP1');?> |
| 46 | </th> |
| 47 | |
| 48 | <!-- ALT --> |
| 49 | |
| 50 | <th class="<?php echo $vik->getAdminThClass('left'); ?>" width="15%" style="text-align: left;"> |
| 51 | <?php echo JText::translate('VAPMANAGEMEDIA20');?> |
| 52 | </th> |
| 53 | |
| 54 | <!-- TITLE --> |
| 55 | |
| 56 | <th class="<?php echo $vik->getAdminThClass('left'); ?>" width="15%" style="text-align: left;"> |
| 57 | <?php echo JText::translate('VAPMANAGEMEDIA21');?> |
| 58 | </th> |
| 59 | |
| 60 | <!-- CAPTION --> |
| 61 | |
| 62 | <th class="<?php echo $vik->getAdminThClass('left hidden-phone'); ?>" width="25%" style="text-align: left;"> |
| 63 | <?php echo JText::translate('VAPMANAGEMEDIA22');?> |
| 64 | </th> |
| 65 | |
| 66 | <!-- LANGUAGE --> |
| 67 | |
| 68 | <th class="<?php echo $vik->getAdminThClass(); ?>" width="5%" style="text-align: center;"> |
| 69 | <?php echo JText::translate('VAPLANGUAGE');?> |
| 70 | </th> |
| 71 | |
| 72 | </tr> |
| 73 | <?php echo $vik->closeTableHead(); ?> |
| 74 | |
| 75 | <?php |
| 76 | for ($i = 0; $i < count($rows); $i++) |
| 77 | { |
| 78 | $row = $rows[$i]; |
| 79 | |
| 80 | $alt = $row['alt'] ? $row['alt'] : JText::translate('JOPTION_USE_DEFAULT'); |
| 81 | $title = $row['title'] ? $row['title'] : JText::translate('JOPTION_USE_DEFAULT'); |
| 82 | $caption = $row['caption'] ? $row['caption'] : JText::translate('JOPTION_USE_DEFAULT'); |
| 83 | ?> |
| 84 | <tr class="row<?php echo $i % 2; ?>"> |
| 85 | |
| 86 | <td> |
| 87 | <input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row['id']; ?>" onClick="<?php echo $vik->checkboxOnClick(); ?>"> |
| 88 | </td> |
| 89 | |
| 90 | <td class="hidden-phone"><?php echo $row['id']; ?></td> |
| 91 | |
| 92 | <td> |
| 93 | <?php |
| 94 | if ($canEdit) |
| 95 | { |
| 96 | ?> |
| 97 | <a href="index.php?option=com_vikappointments&task=langmedia.edit&cid[]=<?php echo $row['id']; ?>"> |
| 98 | <?php echo $alt; ?> |
| 99 | </a> |
| 100 | <?php |
| 101 | } |
| 102 | else |
| 103 | { |
| 104 | echo $alt; |
| 105 | } |
| 106 | ?> |
| 107 | </td> |
| 108 | |
| 109 | <td> |
| 110 | <?php echo $title; ?> |
| 111 | </td> |
| 112 | |
| 113 | <td class="hidden-phone"> |
| 114 | <?php echo $caption; ?> |
| 115 | </td> |
| 116 | |
| 117 | <td style="text-align: center;"> |
| 118 | <?php echo JHtml::fetch('vaphtml.site.flag', $row['tag']); ?> |
| 119 | </td> |
| 120 | |
| 121 | </tr> |
| 122 | <?php |
| 123 | } |
| 124 | ?> |
| 125 | </table> |
| 126 | <?php |
| 127 | } |
| 128 | ?> |
| 129 | |
| 130 | <input type="hidden" name="boxchecked" value="0" /> |
| 131 | <input type="hidden" name="task" value="" /> |
| 132 | <input type="hidden" name="view" value="langmedia" /> |
| 133 | <input type="hidden" name="image" value="<?php echo $this->escape($filters['image']); ?>" /> |
| 134 | |
| 135 | <?php echo JHtml::fetch('form.token'); ?> |
| 136 | <?php echo $this->navbut; ?> |
| 137 | </form> |
| 138 |