This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
1 | <?php |
||||||
2 | /* |
||||||
3 | * You may not change or alter any portion of this comment or credits |
||||||
4 | * of supporting developers from this source code or any supporting source code |
||||||
5 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||||||
6 | * |
||||||
7 | * This program is distributed in the hope that it will be useful, |
||||||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||||
10 | */ |
||||||
11 | |||||||
12 | /** |
||||||
13 | * @copyright {@link https://xoops.org/ XOOPS Project} |
||||||
14 | * @license {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later} |
||||||
15 | * @package extcal |
||||||
16 | * @since |
||||||
17 | * @author XOOPS Development Team, |
||||||
18 | */ |
||||||
19 | |||||||
20 | use XoopsModules\Extcal\{Helper, |
||||||
21 | LocationHandler, |
||||||
22 | EventHandler |
||||||
23 | }; |
||||||
24 | use Xmf\Request; |
||||||
25 | |||||||
26 | require_once __DIR__ . '/header.php'; |
||||||
27 | require_once __DIR__ . '/include/constantes.php'; |
||||||
28 | |||||||
29 | global $xoopsConfig; |
||||||
30 | |||||||
31 | require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php'; |
||||||
32 | |||||||
33 | /** @var Helper $helper */ |
||||||
34 | $helper = Helper::getInstance(); |
||||||
35 | |||||||
36 | $eventId = Request::getInt('event', 0, 'GET'); |
||||||
37 | |||||||
38 | $eventHandler = Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
||||||
39 | $event = $eventHandler->objectToArray($eventHandler->getEvent($eventId), ['cat_id']); |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() The method
getEvent() does not exist on XoopsObjectHandler . It seems like you code against a sub-type of XoopsObjectHandler such as XoopsPersistableObjectHandler .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
40 | |||||||
41 | //adding location |
||||||
42 | /** @var LocationHandler $locationHandler */ |
||||||
43 | $locationHandler = Helper::getInstance()->getHandler('Location'); |
||||||
44 | if ($event['event_location'] > 0) { |
||||||
45 | $location = $locationHandler->objectToArray($locationHandler->getLocation($event['event_location'], true)); |
||||||
46 | } |
||||||
47 | |||||||
48 | // Adding formated date for start and end event |
||||||
49 | $eventHandler->formatEventDate($event, $helper->getConfig('event_date_event')); |
||||||
0 ignored issues
–
show
The method
formatEventDate() does not exist on XoopsObjectHandler . It seems like you code against a sub-type of XoopsObjectHandler such as XoopsPersistableObjectHandler .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
50 | |||||||
51 | echo '<!DOCTYPE html>' . "\n"; |
||||||
52 | echo '<html>' . "\n"; |
||||||
53 | echo '<head>' . "\n"; |
||||||
54 | echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n"; |
||||||
55 | echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n"; |
||||||
56 | echo '</head>' . "\n"; |
||||||
57 | echo '<body onload="window.print()">' . "\n"; |
||||||
58 | echo '<table style="border:1px solid #000000; width:640px;" cellspacing="0" cellspadding="0">' . "\n"; |
||||||
59 | echo '<tr>' . "\n"; |
||||||
60 | echo '<td colspan="2" style="font-size:1.2em; border:1px solid #000000;">' . "\n"; |
||||||
61 | echo $event['event_title'] . "\n"; |
||||||
62 | echo '</td>' . "\n"; |
||||||
63 | echo '</tr>' . "\n"; |
||||||
64 | echo '<tr>' . "\n"; |
||||||
65 | echo '<td style="width:50%; border:1px solid #000000;">' . "\n"; |
||||||
66 | echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n"; |
||||||
67 | echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n"; |
||||||
68 | echo '</td>' . "\n"; |
||||||
69 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
70 | if (!$event['event_isrecur']) { |
||||||
71 | echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n"; |
||||||
72 | echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n"; |
||||||
73 | } else { |
||||||
74 | echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n"; |
||||||
75 | } |
||||||
76 | echo '</td>' . "\n"; |
||||||
77 | echo '</tr>' . "\n"; |
||||||
78 | |||||||
79 | echo '<tr>' . "\n"; |
||||||
80 | if ('' != $event['event_desc']) { |
||||||
81 | echo '<td style="border:1px solid #000000;">' . $event['event_desc'] . '</td>' . "\n"; |
||||||
82 | } |
||||||
83 | if ('' != $event['event_price']) { |
||||||
84 | echo '<td style="border:1px solid #000000;">' . _MD_EXTCAL_LOCATION_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n"; |
||||||
85 | } |
||||||
86 | echo '</tr>' . "\n"; |
||||||
87 | |||||||
88 | //show contact info |
||||||
89 | if ('' != $event['event_contact']) { |
||||||
90 | echo '<tr>' . "\n"; |
||||||
91 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
92 | echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n"; |
||||||
93 | echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n"; |
||||||
94 | echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n"; |
||||||
95 | echo $event['event_address'] . '</span>' . "\n"; |
||||||
96 | echo '</td>' . "\n"; |
||||||
97 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
98 | echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n"; |
||||||
99 | echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n"; |
||||||
100 | echo '</td>' . "\n"; |
||||||
101 | echo '</tr>' . "\n"; |
||||||
102 | } |
||||||
103 | |||||||
104 | //show location |
||||||
105 | if ($event['event_location'] = 0) { |
||||||
106 | echo '<tr>' . "\n"; |
||||||
107 | |||||||
108 | // echo($location['nom']); |
||||||
109 | // var_dump($location); |
||||||
110 | // var_dump($event); |
||||||
111 | |||||||
112 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
113 | echo '<b>' . _MD_EXTCAL_LOCATION . '</b>' . "\n"; |
||||||
114 | if ('' != $location['categorie']) { |
||||||
115 | echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n"; |
||||||
116 | } |
||||||
117 | if ('' != $location['logo']) { |
||||||
118 | echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/location/' . $location['logo'] . ' height="75px">' . '' . "\n"; |
||||||
119 | } |
||||||
120 | |||||||
121 | echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n"; |
||||||
122 | echo $location['description'] . '<br>' . "\n"; |
||||||
123 | echo $location['adresse'] . '</span> <br>' . "\n"; |
||||||
124 | if ('' != $location['adresse2']) { |
||||||
125 | echo $location['adresse2'] . '</span> <br>' . "\n"; |
||||||
126 | } |
||||||
127 | echo $location['ville'] . "\n"; |
||||||
128 | echo $location['cp'] . '<br>' . "\n"; |
||||||
129 | |||||||
130 | if ('' != $location['horaires']) { |
||||||
131 | echo $location['horaires'] . '</span> <br>' . "\n"; |
||||||
132 | } |
||||||
133 | |||||||
134 | if ('' != $location['divers']) { |
||||||
135 | echo $location['divers'] . '</span> <br>' . "\n"; |
||||||
136 | } |
||||||
137 | |||||||
138 | if ('' != $location['tarifs']) { |
||||||
139 | echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n"; |
||||||
140 | } |
||||||
141 | |||||||
142 | echo '</td>' . "\n"; |
||||||
143 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
144 | |||||||
145 | if ('' != $location['tel_fixe']) { |
||||||
146 | echo '<b>' . _MD_EXTCAL_LOCATION_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n"; |
||||||
147 | } |
||||||
148 | if ('' != $location['tel_portable']) { |
||||||
149 | echo '<b>' . _MD_EXTCAL_LOCATION_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n"; |
||||||
150 | } |
||||||
151 | |||||||
152 | echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n"; |
||||||
153 | echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n"; |
||||||
154 | echo '<b>' . _MD_EXTCAL_LOCATION_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_LOCATION_MAP2 . '</a>' . "\n"; |
||||||
155 | |||||||
156 | echo '</td>' . "\n"; |
||||||
157 | echo '</tr>' . "\n"; |
||||||
158 | } |
||||||
159 | //show images |
||||||
160 | |||||||
161 | if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) { |
||||||
162 | echo '<tr>' . "\n"; |
||||||
163 | if ('' != $event['event_picture1']) { |
||||||
164 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
165 | echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n"; |
||||||
166 | echo '</td>' . "\n"; |
||||||
167 | } |
||||||
168 | if ('' != $event['event_picture2']) { |
||||||
169 | echo '<td style="border:1px solid #000000;">' . "\n"; |
||||||
170 | echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n"; |
||||||
171 | echo '</td>' . "\n"; |
||||||
172 | } |
||||||
173 | echo '</tr>' . "\n"; |
||||||
174 | } |
||||||
175 | //-------------------- |
||||||
176 | |||||||
177 | echo '</table><br>' . "\n"; |
||||||
178 | echo '<div style="text-align:center; width:640px;">'; |
||||||
179 | echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>'; |
||||||
180 | echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>'; |
||||||
181 | echo '</div>'; |
||||||
182 | echo '</body>' . "\n"; |
||||||
183 | echo '</html>' . "\n"; |
||||||
184 |