Completed
Push — master ( d79f0a...abdca8 )
by Michael
06:29
created
admin/event.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../../../include/cp_header.php';
4
-include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
5
-include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
6
-include_once __DIR__ . '/../class/form/extcalform.php';
7
-include_once __DIR__ . '/admin_header.php';
8
-include_once __DIR__ . '/../class/utilities.php';
3
+include_once __DIR__.'/../../../include/cp_header.php';
4
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
5
+include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
6
+include_once __DIR__.'/../class/form/extcalform.php';
7
+include_once __DIR__.'/admin_header.php';
8
+include_once __DIR__.'/../class/utilities.php';
9 9
 
10 10
 $gepeto = array_merge($_GET, $_POST);
11 11
 while (list($k, $v) = each($gepeto)) {
@@ -31,15 +31,15 @@  discard block
 block discarded – undo
31 31
 
32 32
     while (list($k, $t) = each($rst)) {
33 33
         if ($t['event_picture1'] != '') {
34
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
34
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
35 35
             unlink($f);
36
-            echo $f . '<br>';
36
+            echo $f.'<br>';
37 37
         }
38 38
 
39 39
         if ($t['event_picture2'] != '') {
40
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
40
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
41 41
             unlink($f);
42
-            echo $f . '<br>';
42
+            echo $f.'<br>';
43 43
         }
44 44
     }
45 45
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
102 102
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
103 103
             } else {
104
-                $fileHandler->createFile((int)$_POST['event_id']);
104
+                $fileHandler->createFile((int) $_POST['event_id']);
105 105
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
106 106
             }
107 107
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $eventId      = $_GET['event_id'];
173 173
         $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
174 174
 
175
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
175
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
176 176
 
177 177
         if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
178 178
             $form->display();
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         }
198 198
 
199 199
         $data['event_id'] = 0;
200
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
200
+        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
201 201
 
202 202
         $newEvent = $eventHandler->create();
203 203
         $newEvent->setVars($data);
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
         if (isset($_POST['confirm'])) {
215 215
             if (!$GLOBALS['xoopsSecurity']->check()) {
216
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
216
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
217 217
                 exit;
218 218
             }
219 219
             //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         if (isset($_POST['deleteSelection'][0])) {
280 280
         } else {
281 281
             if (!$GLOBALS['xoopsSecurity']->check()) {
282
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
282
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
283 283
                 exit;
284 284
             }
285 285
 
@@ -312,32 +312,32 @@  discard block
 block discarded – undo
312 312
         $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
313 313
         $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
314 314
 
315
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
316
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
315
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
316
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
317 317
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
318 318
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
319 319
 
320
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
321
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
320
+        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
321
+        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
322 322
 
323 323
         echo '</fieldset><br>';
324 324
 
325
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
325
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
326 326
 
327 327
         echo '<form method="POST" action="event.php">';
328 328
         echo '<input type="hidden" name="op" value="deleteSelection" />';
329 329
 
330 330
         echo '<table class="outer" style="width:100%;">';
331 331
         echo '<tr style="text-align:center;">';
332
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
332
+        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
333 333
         echo '<th>#</th>';
334
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
335
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
336
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
337
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
338
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
339
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
340
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
334
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
335
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
336
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
337
+        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
338
+        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
339
+        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
340
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
341 341
 
342 342
         echo '</tr>';
343 343
 
@@ -345,15 +345,15 @@  discard block
 block discarded – undo
345 345
             $i = 0;
346 346
             foreach ($events as $event) {
347 347
                 $class = (++$i % 2 == 0) ? 'even' : 'odd';
348
-                echo '<tr style="text-align:left;" class="' . $class . '">';
348
+                echo '<tr style="text-align:left;" class="'.$class.'">';
349 349
                 echo "<td width='10%' align='center'>";
350 350
                 echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
351 351
                 echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />";
352 352
                 echo '</td>';
353
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
354
-                echo "<td  width='10%'>" . '<a href=cat.php?op=modify&amp;cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>';
353
+                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
354
+                echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>';
355 355
 
356
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
356
+                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
357 357
 
358 358
                 //                 if ($event['event_isrecur']) {
359 359
                 //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
@@ -361,18 +361,18 @@  discard block
 block discarded – undo
361 361
                 //                     echo '<td>' . $event['formated_event_start'] . '</td>';
362 362
                 //                 }
363 363
 
364
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
365
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
366
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
364
+                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
365
+                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
366
+                echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
367 367
                 if (!isset($event['formated_reccur_rule'])) {
368 368
                     $event['formated_reccur_rule'] = '';
369 369
                 }
370
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
370
+                echo '<td>'.$event['formated_reccur_rule'].'</td>';
371 371
 
372 372
                 echo '<td style="width:10%; text-align:center;">';
373
-                echo '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "' /></a>&nbsp;&nbsp;";
374
-                echo '<a href=event.php?op=delete&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "' /></a>&nbsp;&nbsp;";
375
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "' /></a>";
373
+                echo '<a href=event.php?op=modify&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."' /></a>&nbsp;&nbsp;";
374
+                echo '<a href=event.php?op=delete&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."' /></a>&nbsp;&nbsp;";
375
+                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>";
376 376
                 echo '</td>';
377 377
 
378 378
                 echo '</tr>';
@@ -386,13 +386,13 @@  discard block
 block discarded – undo
386 386
 
387 387
             echo '<td colspan="2" style="text-align: right;">';
388 388
 
389
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
390
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
389
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
390
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
391 391
 
392 392
             echo '</td>';
393 393
             echo '</tr>';
394 394
         } else {
395
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
395
+            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
396 396
         }
397 397
         echo '</table>';
398 398
         echo '</form>';
@@ -400,14 +400,14 @@  discard block
 block discarded – undo
400 400
         echo '</fieldset>';
401 401
         echo '</fieldset><br><br>';
402 402
         //Fin de la liste des evennement -------------------------------------
403
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
403
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
404 404
 
405 405
         $form = $eventHandler->getEventForm('admin');
406 406
         $form->display();
407 407
 
408 408
         echo '</fieldset>';
409 409
 
410
-        include_once __DIR__ . '/admin_footer.php';
410
+        include_once __DIR__.'/admin_footer.php';
411 411
 
412 412
         break;
413 413
 }
Please login to merge, or discard this patch.
view_week.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
4
-include_once __DIR__ . '/include/constantes.php';
3
+include __DIR__.'/../../mainfile.php';
4
+include_once __DIR__.'/include/constantes.php';
5 5
 $params                                  = array('view' => _EXTCAL_NAV_WEEK, 'file' => _EXTCAL_FILE_WEEK);
6 6
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
7
-include_once __DIR__ . '/header.php';
7
+include_once __DIR__.'/header.php';
8 8
 
9 9
 /* ========================================================================== */
10
-$year  = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
11
-$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n');
12
-$day   = isset($_GET['day']) ? (int)$_GET['day'] : date('j');
13
-$cat   = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
10
+$year  = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
11
+$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n');
12
+$day   = isset($_GET['day']) ? (int) $_GET['day'] : date('j');
13
+$cat   = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
14 14
 /* ========================================================================== */
15 15
 
16 16
 // Validate the date (day, month and year)
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     'cat'          => $cat,
46 46
     'externalKeys' => 'cat_id',
47 47
 );
48
-$events   = $eventHandler->getEventsOnPeriode($criteres);
48
+$events = $eventHandler->getEventsOnPeriode($criteres);
49 49
 /**********************************************************************/
50 50
 $eventsArray = $events;
51 51
 // Formating date
@@ -86,21 +86,21 @@  discard block
 block discarded – undo
86 86
 $nWeekCalObj = $weekCalObj->nextWeek('object');
87 87
 $navig       = array(
88 88
     'prev' => array(
89
-        'uri'  => 'year=' . $pWeekCalObj->thisYear() . '&amp;month=' . $pWeekCalObj->thisMonth() . '&amp;day=' . $pWeekCalObj->thisDay(),
89
+        'uri'  => 'year='.$pWeekCalObj->thisYear().'&amp;month='.$pWeekCalObj->thisMonth().'&amp;day='.$pWeekCalObj->thisDay(),
90 90
         'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $pWeekCalObj->getTimestamp()),
91 91
     ),
92 92
     'this' => array(
93
-        'uri'  => 'year=' . $weekCalObj->thisYear() . '&amp;month=' . $weekCalObj->thisMonth() . '&amp;day=' . $weekCalObj->thisDay(),
93
+        'uri'  => 'year='.$weekCalObj->thisYear().'&amp;month='.$weekCalObj->thisMonth().'&amp;day='.$weekCalObj->thisDay(),
94 94
         'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $weekCalObj->getTimestamp()),
95 95
     ),
96 96
     'next' => array(
97
-        'uri'  => 'year=' . $nWeekCalObj->thisYear() . '&amp;month=' . $nWeekCalObj->thisMonth() . '&amp;day=' . $nWeekCalObj->thisDay(),
97
+        'uri'  => 'year='.$nWeekCalObj->thisYear().'&amp;month='.$nWeekCalObj->thisMonth().'&amp;day='.$nWeekCalObj->thisDay(),
98 98
         'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_week'], $nWeekCalObj->getTimestamp()),
99 99
     ),
100 100
 );
101 101
 
102 102
 // Title of the page
103
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
103
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
104 104
 
105 105
 // Assigning navig data to the template
106 106
 $xoopsTpl->assign('navig', $navig);
@@ -160,4 +160,4 @@  discard block
 block discarded – undo
160 160
 $xoopsTpl->assign('lang', $lang);
161 161
 $xoopsTpl->assign('view', 'week');
162 162
 
163
-include XOOPS_ROOT_PATH . '/footer.php';
163
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
view_search.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
4
-include_once __DIR__ . '/include/constantes.php';
5
-$params                                  = array(
3
+include __DIR__.'/../../mainfile.php';
4
+include_once __DIR__.'/include/constantes.php';
5
+$params = array(
6 6
     'view' => _EXTCAL_NAV_SEARCH,
7 7
     'file' => _EXTCAL_FILE_SEARCH,
8 8
 );
9 9
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
10
-include_once __DIR__ . '/header.php';
10
+include_once __DIR__.'/header.php';
11 11
 
12 12
 $recurEventsArray = array();
13 13
 //needed to save the state of the form, so we don't show on the first time the list of available events
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 /***************************************************************/
20 20
 $searchExp = isset($_POST['searchExp']) ? $_POST['searchExp'] : '';
21 21
 $andor     = isset($_POST['andor']) ? $_POST['andor'] : '';
22
-$year      = isset($_POST['year']) ? (int)$_POST['year'] : date('Y');
23
-$month     = isset($_POST['month']) ? (int)$_POST['month'] : date('n');
24
-$day       = isset($_POST['day']) ? (int)$_POST['day'] : 0;
25
-$cat       = isset($_POST['cat']) ? (int)$_POST['cat'] : 0;
22
+$year      = isset($_POST['year']) ? (int) $_POST['year'] : date('Y');
23
+$month     = isset($_POST['month']) ? (int) $_POST['month'] : date('n');
24
+$day       = isset($_POST['day']) ? (int) $_POST['day'] : 0;
25
+$cat       = isset($_POST['cat']) ? (int) $_POST['cat'] : 0;
26 26
 $orderby1  = isset($_POST['orderby1']) ? $_POST['orderby1'] : 'cat_name ASC';
27 27
 $orderby2  = isset($_POST['orderby2']) ? $_POST['orderby2'] : 'event_title ASC';
28 28
 $orderby3  = isset($_POST['orderby3']) ? $_POST['orderby3'] : '';
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     }
144 144
 }
145 145
 
146
-$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray);
146
+$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray);
147 147
 
148 148
 // Sort event array by event start
149 149
 //usort($eventsArray, "orderEvents");
@@ -234,4 +234,4 @@  discard block
 block discarded – undo
234 234
 $xoopsTpl->assign('lang', $lang);
235 235
 $xoopsTpl->assign('view', 'search');
236 236
 
237
-include XOOPS_ROOT_PATH . '/footer.php';
237
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
new_event.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
4
-include_once __DIR__ . '/include/constantes.php';
5
-include_once __DIR__ . '/header.php';
3
+include __DIR__.'/../../mainfile.php';
4
+include_once __DIR__.'/include/constantes.php';
5
+include_once __DIR__.'/header.php';
6 6
 
7 7
 // Getting eXtCal object's handler
8 8
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 $permHandler = ExtcalPerm::getHandler();
11 11
 $xoopsUser   = $xoopsUser ?: null;
12 12
 if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) {
13
-    include XOOPS_ROOT_PATH . '/header.php';
13
+    include XOOPS_ROOT_PATH.'/header.php';
14 14
 
15 15
     // Title of the page
16 16
     $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     //$form->display();
22 22
 
23
-    include XOOPS_ROOT_PATH . '/footer.php';
23
+    include XOOPS_ROOT_PATH.'/footer.php';
24 24
 } else {
25 25
     redirect_header('index.php', 3);
26 26
 }
Please login to merge, or discard this patch.
etablissement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../../mainfile.php';
4
-include_once __DIR__ . '/include/constantes.php';
3
+include_once __DIR__.'/../../mainfile.php';
4
+include_once __DIR__.'/include/constantes.php';
5 5
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_etablissement.tpl';
6
-include_once __DIR__ . '/header.php';
6
+include_once __DIR__.'/header.php';
7 7
 
8 8
 //include_once XOOPS_ROOT_PATH."/modules/extcal/class/etablissement.php";
9 9
 $etablissementHandler = xoops_getModuleHandler(_EXTCAL_CLS_ETABLISSEMENT, _EXTCAL_MODULE);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $etablissement_exist = $etablissementHandler->getCount($criteria);
20 20
 
21 21
 if ($etablissement_exist == 0) {
22
-    redirect_header(XOOPS_URL . '/modules/extcal/index.php', 3, _NOPERM);
22
+    redirect_header(XOOPS_URL.'/modules/extcal/index.php', 3, _NOPERM);
23 23
 }
24 24
 
25 25
 $view_etablissement = $etablissementHandler->getEtablissement($etablissement_id, true);
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 /* todo a deplacer dans le template JJD */
34 34
 $uid = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
35 35
 global $xoopsModule;
36
-$pathIcon16 =& $xoopsModule->getInfo('icons16');
36
+$pathIcon16 = & $xoopsModule->getInfo('icons16');
37 37
 
38 38
 $edit_delete = '';
39 39
 if (is_object($xoopsUser) && $isAdmin) {
40
-    $edit_delete = '<a href="' . XOOPS_URL . '/modules/extcal/admin/etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src="' . $pathIcon16 . '/edit.png" width="16px" height="16px" border="0" title="'
41
-                   . _MD_EXTCAL_ETABLISSEMENT_EDIT . '"/></a><a href="' . XOOPS_URL . '/modules/extcal/admin/etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src="' . $pathIcon16
42
-                   . '/delete.png" width="16px" height="16px" border="0" title="' . _MD_EXTCAL_ETABLISSEMENT_DELETE . '"/></a>';
40
+    $edit_delete = '<a href="'.XOOPS_URL.'/modules/extcal/admin/etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src="'.$pathIcon16.'/edit.png" width="16px" height="16px" border="0" title="'
41
+                   . _MD_EXTCAL_ETABLISSEMENT_EDIT.'"/></a><a href="'.XOOPS_URL.'/modules/extcal/admin/etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src="'.$pathIcon16
42
+                   . '/delete.png" width="16px" height="16px" border="0" title="'._MD_EXTCAL_ETABLISSEMENT_DELETE.'"/></a>';
43 43
 }
44 44
 $xoopsTpl->assign('edit_delete', $edit_delete);
45 45
 
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 
48 48
 $date = mktime(0, 0, 0, date('m'), date('d'), date('y'));
49 49
 
50
-$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM ' . $xoopsDB->prefix('extcal_event') . " WHERE event_etablissement='" . $etablissement_id . "' AND event_start >='" . $date . "'");
50
+$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM '.$xoopsDB->prefix('extcal_event')." WHERE event_etablissement='".$etablissement_id."' AND event_start >='".$date."'");
51 51
 while ($donnees = $xoopsDB->fetchArray($requete)) {
52 52
     if ($donnees['event_desc'] > 210) {
53 53
         $event_desc = $donnees['event_desc'];
54 54
     } else {
55
-        $event_desc = substr($donnees['event_desc'], 0, 210) . '...';
55
+        $event_desc = substr($donnees['event_desc'], 0, 210).'...';
56 56
     }
57 57
     $xoopsTpl->append('events', array(
58 58
         'event_picture1' => $donnees['event_picture1'],
@@ -64,4 +64,4 @@  discard block
 block discarded – undo
64 64
 }
65 65
 $xoTheme->addScript('browse.php?modules/extcal/assets/js/highslide.js');
66 66
 $xoTheme->addStylesheet('browse.php?modules/extcal/assets/js/highslide.css');
67
-include_once XOOPS_ROOT_PATH . '/footer.php';
67
+include_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
include/config.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,18 +17,18 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../mainfile.php';
20
+require_once __DIR__.'/../../../mainfile.php';
21 21
 $moduleDirName = basename(dirname(__DIR__));
22 22
 
23 23
 if (!defined('EXTCAL_DIRNAME')) {
24 24
     define('EXTCAL_DIRNAME', $moduleDirName);
25
-    define('EXTCAL_PATH', XOOPS_ROOT_PATH . '/modules/' . EXTCAL_DIRNAME);
26
-    define('EXTCAL_URL', XOOPS_URL . '/modules/' . EXTCAL_DIRNAME);
27
-    define('EXTCAL_ADMIN', EXTCAL_URL . '/admin/index.php');
28
-    define('EXTCAL_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . EXTCAL_DIRNAME);
29
-    define('EXTCAL_AUTHOR_LOGOIMG', EXTCAL_URL . '/assets/images/logoModule.png');
30
-    define('EXTCAL_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . EXTCAL_DIRNAME); // WITHOUT Trailing slash
31
-    define('EXTCAL_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . EXTCAL_DIRNAME); // WITHOUT Trailing slash
25
+    define('EXTCAL_PATH', XOOPS_ROOT_PATH.'/modules/'.EXTCAL_DIRNAME);
26
+    define('EXTCAL_URL', XOOPS_URL.'/modules/'.EXTCAL_DIRNAME);
27
+    define('EXTCAL_ADMIN', EXTCAL_URL.'/admin/index.php');
28
+    define('EXTCAL_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.EXTCAL_DIRNAME);
29
+    define('EXTCAL_AUTHOR_LOGOIMG', EXTCAL_URL.'/assets/images/logoModule.png');
30
+    define('EXTCAL_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.EXTCAL_DIRNAME); // WITHOUT Trailing slash
31
+    define('EXTCAL_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.EXTCAL_DIRNAME); // WITHOUT Trailing slash
32 32
 
33 33
 }
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     'name'          => 'Module Configurator',
38 38
     'uploadFolders' => array(
39 39
         EXTCAL_UPLOAD_PATH,
40
-        EXTCAL_UPLOAD_PATH . '/etablissement'
40
+        EXTCAL_UPLOAD_PATH.'/etablissement'
41 41
     ),
42 42
 //    'copyFiles'     => array(
43 43
 //        EXTCAL_UPLOAD_PATH,
@@ -58,4 +58,4 @@  discard block
 block discarded – undo
58 58
 
59 59
 // module information
60 60
 $mod_copyright = "<a href='http://xoops.org' title='XOOPS Project' target='_blank'>
61
-                     <img src='" . EXTCAL_AUTHOR_LOGOIMG . "' alt='XOOPS Project' /></a>";
61
+                     <img src='" . EXTCAL_AUTHOR_LOGOIMG."' alt='XOOPS Project' /></a>";
Please login to merge, or discard this patch.
include/constantes.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 define('_EXTCAL_CLN_EVENT', 'ExtcalEvent');
38 38
 
39 39
 //-------------------------------------------------------------------
40
-define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__ . '/../class/pear');
40
+define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__.'/../class/pear');
41 41
 //define('_EXTCAL_PEAR_ROOT', 'F:/wamp/www/xfr254b/xoops_lib/Frameworks/pear' );
42 42
 
43 43
 $pear_path = _EXTCAL_PEAR_ROOT_DEFAULT;
@@ -72,22 +72,22 @@  discard block
 block discarded – undo
72 72
 //}
73 73
 define('_EXTCAL_PEAR_ROOT', $pear_path);
74 74
 
75
-define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT . '/Calendar');
76
-define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT . '/');
75
+define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT.'/Calendar');
76
+define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT.'/');
77 77
 
78 78
 //-------------------------------------------------------------------
79 79
 define('_EXTCAL_SHOW_NO_PICTURE', false);
80 80
 
81 81
 define('_EXTCAL_PATH_HORLOGES', '/modules/extcal/assets/images/horloges/');
82
-define('_EXTCAL_PATH_ICONS16', XOOPS_URL . '/Frameworks/moduleclasses/icons/16/');
83
-define('_EXTCAL_PATH_ICONS32', XOOPS_URL . '/Frameworks/moduleclasses/icons/32/');
84
-define('_EXTCAL_PATH_FO', XOOPS_URL . '/modules/extcal/');
85
-define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO . 'admin/');
86
-define('_EXTCAL_PATH_LG', XOOPS_URL . '/modules/extcal/languages/');
82
+define('_EXTCAL_PATH_ICONS16', XOOPS_URL.'/Frameworks/moduleclasses/icons/16/');
83
+define('_EXTCAL_PATH_ICONS32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32/');
84
+define('_EXTCAL_PATH_FO', XOOPS_URL.'/modules/extcal/');
85
+define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO.'admin/');
86
+define('_EXTCAL_PATH_LG', XOOPS_URL.'/modules/extcal/languages/');
87 87
 
88 88
 define('_EXTCAL_IMG_INTERVAL', 'interval04.png');
89
-define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16 . _EXTCAL_IMG_INTERVAL);
90
-define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32 . _EXTCAL_IMG_INTERVAL);
89
+define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16._EXTCAL_IMG_INTERVAL);
90
+define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32._EXTCAL_IMG_INTERVAL);
91 91
 
92 92
 //define('_EXTCAL_DIRNAME',    $xoopsModule->getVar('dirname'));
93 93
 
@@ -103,22 +103,22 @@  discard block
 block discarded – undo
103 103
 define('_EXTCAL_NAV_NEW_EVENT', 'new-event');
104 104
 
105 105
 define('_EXTCAL_NAV_LIST',
106
-       _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n"
107
-       . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
106
+       _EXTCAL_NAV_CALMONTH."\n"._EXTCAL_NAV_CALWEEK."\n"._EXTCAL_NAV_YEAR."\n"._EXTCAL_NAV_MONTH."\n"._EXTCAL_NAV_WEEK."\n"._EXTCAL_NAV_DAY."\n"._EXTCAL_NAV_AGENDA_WEEK."\n"._EXTCAL_NAV_AGENDA_DAY."\n"
107
+       . _EXTCAL_NAV_SEARCH."\n"._EXTCAL_NAV_NEW_EVENT);
108 108
 
109 109
 define('_EXTCAL_PREFIX_VIEW', 'view_');
110 110
 define('_EXTCAL_SUFFIX_VIEW', '.php');
111 111
 
112
-define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALMONTH . _EXTCAL_SUFFIX_VIEW);
113
-define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALWEEK . _EXTCAL_SUFFIX_VIEW);
114
-define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_YEAR . _EXTCAL_SUFFIX_VIEW);
115
-define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_MONTH . _EXTCAL_SUFFIX_VIEW);
116
-define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_WEEK . _EXTCAL_SUFFIX_VIEW);
117
-define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_DAY . _EXTCAL_SUFFIX_VIEW);
118
-define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_WEEK . _EXTCAL_SUFFIX_VIEW);
119
-define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_DAY . _EXTCAL_SUFFIX_VIEW);
120
-define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_SEARCH . _EXTCAL_SUFFIX_VIEW);
121
-define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_NEW_EVENT . _EXTCAL_SUFFIX_VIEW);
112
+define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALMONTH._EXTCAL_SUFFIX_VIEW);
113
+define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALWEEK._EXTCAL_SUFFIX_VIEW);
114
+define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_YEAR._EXTCAL_SUFFIX_VIEW);
115
+define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_MONTH._EXTCAL_SUFFIX_VIEW);
116
+define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_WEEK._EXTCAL_SUFFIX_VIEW);
117
+define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_DAY._EXTCAL_SUFFIX_VIEW);
118
+define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_WEEK._EXTCAL_SUFFIX_VIEW);
119
+define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_DAY._EXTCAL_SUFFIX_VIEW);
120
+define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_SEARCH._EXTCAL_SUFFIX_VIEW);
121
+define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_NEW_EVENT._EXTCAL_SUFFIX_VIEW);
122 122
 
123 123
 define('_EXTCAL_MULTILOADER', '/class/xoopsform/multiuploads/formmultiuploads.php');
124 124
 
Please login to merge, or discard this patch.
edit_event.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
3
+include __DIR__.'/../../mainfile.php';
4 4
 
5
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
6
-include __DIR__ . '/class/form/extcalform.php';
7
-include __DIR__ . '/class/perm.php';
8
-include_once __DIR__ . '/include/constantes.php';
5
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
6
+include __DIR__.'/class/form/extcalform.php';
7
+include __DIR__.'/class/perm.php';
8
+include_once __DIR__.'/include/constantes.php';
9 9
 
10 10
 $permHandler = ExtcalPerm::getHandler();
11 11
 $xoopsUser   = $xoopsUser ?: null;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 $params                                  = array('view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT);
21 21
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
22
-include XOOPS_ROOT_PATH . '/header.php';
22
+include XOOPS_ROOT_PATH.'/header.php';
23 23
 /* ========================================================================== */
24 24
 
25 25
 // Tooltips include
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 if (!isset($_GET['event'])) {
30 30
     $eventId = 0;
31 31
 } else {
32
-    $eventId = (int)$_GET['event'];
32
+    $eventId = (int) $_GET['event'];
33 33
 }
34 34
 if (!isset($_GET['action'])) {
35 35
     $action = 'edit';
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 // Getting eXtCal object's handler
41 41
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
42 42
 
43
-include XOOPS_ROOT_PATH . '/header.php';
43
+include XOOPS_ROOT_PATH.'/header.php';
44 44
 
45 45
 // Title of the page
46 46
 $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
@@ -49,4 +49,4 @@  discard block
 block discarded – undo
49 49
 $form = $eventHandler->getEventForm('user', $action, array('event_id' => $eventId));
50 50
 $form->display();
51 51
 
52
-include XOOPS_ROOT_PATH . '/footer.php';
52
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
event.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
4
-include_once __DIR__ . '/include/constantes.php';
3
+include __DIR__.'/../../mainfile.php';
4
+include_once __DIR__.'/include/constantes.php';
5 5
 $params                                  = array('view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT);
6 6
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_event.tpl';
7
-include_once __DIR__ . '/header.php';
7
+include_once __DIR__.'/header.php';
8 8
 
9 9
 //exit;
10 10
 
11
-include XOOPS_ROOT_PATH . '/include/comment_view.php';
11
+include XOOPS_ROOT_PATH.'/include/comment_view.php';
12 12
 
13 13
 if (!isset($_GET['event'])) {
14 14
     $eventId = 0;
15 15
 } else {
16
-    $eventId = (int)$_GET['event'];
16
+    $eventId = (int) $_GET['event'];
17 17
 }
18 18
 $eventHandler          = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
19 19
 $fileHandler           = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
20 20
 $eventMemberHandler    = xoops_getModuleHandler(_EXTCAL_CLS_MEMBER, _EXTCAL_MODULE);
21 21
 $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE);
22 22
 $permHandler           = ExtcalPerm::getHandler();
23
-include_once __DIR__ . '/class/etablissement.php';
24
-include_once __DIR__ . '/class/utilities.php';
23
+include_once __DIR__.'/class/etablissement.php';
24
+include_once __DIR__.'/class/utilities.php';
25 25
 $myts = MyTextSanitizer::getInstance(); // MyTextSanitizer object
26 26
 
27 27
 if (!function_exists('clear_unicodeslashes')) {
@@ -211,4 +211,4 @@  discard block
 block discarded – undo
211 211
 
212 212
 //function XoopsFormDhtmlTextArea($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = array());
213 213
 
214
-include XOOPS_ROOT_PATH . '/footer.php';
214
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.