Completed
Push — master ( 26b490...31307f )
by Michael
03:13
created
post.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,20 +17,20 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
20
+include __DIR__.'/../../mainfile.php';
21 21
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl';
22 22
 
23
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
24
-include __DIR__ . '/class/form/extcalform.php';
25
-include __DIR__ . '/class/perm.php';
23
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
24
+include __DIR__.'/class/form/extcalform.php';
25
+include __DIR__.'/class/perm.php';
26 26
 
27
-require_once __DIR__ . '/class/utility.php';
28
-require_once __DIR__ . '/include/constantes.php';
27
+require_once __DIR__.'/class/utility.php';
28
+require_once __DIR__.'/include/constantes.php';
29 29
 
30 30
 $permHandler = ExtcalPerm::getHandler();
31 31
 $xoopsUser   = $xoopsUser ?: null;
32 32
 
33
-if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) {
33
+if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) {
34 34
     redirect_header('index.php', 3);
35 35
 }
36 36
 
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
39 39
 
40 40
 if (isset($_POST['form_preview'])) {
41
-    include XOOPS_ROOT_PATH . '/header.php';
41
+    include XOOPS_ROOT_PATH.'/header.php';
42 42
 
43 43
     // Title of the page
44 44
     $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
45 45
 
46 46
     $data = [
47 47
         'event_title'        => $_POST['event_title'],
48
-        'cat_id'             => (int)$_POST['cat_id'],
48
+        'cat_id'             => (int) $_POST['cat_id'],
49 49
         'event_desc'         => $_POST['event_desc'],
50
-        'event_nbmember'     => (int)$_POST['event_nbmember'],
50
+        'event_nbmember'     => (int) $_POST['event_nbmember'],
51 51
         'event_contact'      => $_POST['event_contact'],
52 52
         'event_url'          => $_POST['event_url'],
53 53
         'event_email'        => $_POST['event_email'],
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
         'event_start'        => $_POST['event_start'],
57 57
         'have_end'           => $_POST['have_end'],
58 58
         'event_end'          => $_POST['event_end'],
59
-        'dohtml'             => (int)$xoopsModuleConfig['allow_html'],
59
+        'dohtml'             => (int) $xoopsModuleConfig['allow_html'],
60 60
         'event_price'        => $_POST['event_price'],
61 61
         'event_organisateur' => $_POST['event_organisateur'],
62 62
         'event_icone'        => $_POST['event_icone'],
63 63
     ];
64 64
 
65 65
     if (isset($_POST['event_id'])) {
66
-        $data['event_id'] = (int)$_POST['event_id'];
66
+        $data['event_id'] = (int) $_POST['event_id'];
67 67
     }
68 68
 
69 69
     // Creating tempory event object to apply Object data filtering
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     //     // Assigning language data to the template
83 83
     //     $xoopsTpl->assign('lang', $lang);
84 84
 
85
-    $event['cat_id']   = (int)$_POST['cat_id'];
85
+    $event['cat_id']   = (int) $_POST['cat_id'];
86 86
     $event['have_end'] = $_POST['have_end'];
87 87
 
88 88
     // Display the submit form
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     $xoopsTpl->assign('preview', true);
92 92
     $xoopsTpl->assign('formBody', $formBody);
93 93
 
94
-    include XOOPS_ROOT_PATH . '/footer.php';
94
+    include XOOPS_ROOT_PATH.'/footer.php';
95 95
 } elseif (isset($_POST['form_submit'])) {
96 96
     if (!isset($_POST['rrule_weekly_interval'])) {
97 97
         $_POST['rrule_weekly_interval'] = 0;
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
     ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
116 116
     ///////////////////////////////////////////////////////////////////////////////
117 117
 
118
-    require_once __DIR__ . '/class/perm.php';
118
+    require_once __DIR__.'/class/perm.php';
119 119
 
120 120
     $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
121 121
     $permHandler = ExtcalPerm::getHandler();
122
-    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']);
122
+    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']);
123 123
 
124 124
     $data = [
125 125
         'event_title'         => $_POST['event_title'],
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
     ];
146 146
 
147 147
     if (isset($_POST['event_id'])) {
148
-        $eventHandler->modifyEvent((int)$_POST['event_id'], $data);
149
-        $fileHandler->updateEventFile((int)$_POST['event_id']);
150
-        $fileHandler->createFile((int)$_POST['event_id']);
148
+        $eventHandler->modifyEvent((int) $_POST['event_id'], $data);
149
+        $fileHandler->updateEventFile((int) $_POST['event_id']);
150
+        $fileHandler->createFile((int) $_POST['event_id']);
151 151
 
152
-        redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
152
+        redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
153 153
     } else {
154 154
         $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
155 155
         $data['event_submitdate'] = time();
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
         $notificationHandler->triggerEvent('global', 0, $notifyEvent, ['EVENT_TITLE' => $_POST['event_title']]);
167 167
         if (1 == $approve) {
168 168
             $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
169
-            $cat        = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all');
170
-            $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [
169
+            $cat        = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all');
170
+            $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [
171 171
                 'EVENT_TITLE' => $_POST['event_title'],
172 172
                 'CAT_NAME'    => $cat->getVar('cat_name'),
173 173
             ]);
Please login to merge, or discard this patch.
etablissement.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../mainfile.php';
21
-require_once __DIR__ . '/include/constantes.php';
20
+require_once __DIR__.'/../../mainfile.php';
21
+require_once __DIR__.'/include/constantes.php';
22 22
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_etablissement.tpl';
23
-require_once __DIR__ . '/header.php';
23
+require_once __DIR__.'/header.php';
24 24
 
25 25
 //require_once XOOPS_ROOT_PATH."/modules/extcal/class/etablissement.php";
26 26
 $etablissementHandler = xoops_getModuleHandler(_EXTCAL_CLS_ETABLISSEMENT, _EXTCAL_MODULE);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $etablissement_exist = $etablissementHandler->getCount($criteria);
37 37
 
38 38
 if (0 == $etablissement_exist) {
39
-    redirect_header(XOOPS_URL . '/modules/extcal/index.php', 3, _NOPERM);
39
+    redirect_header(XOOPS_URL.'/modules/extcal/index.php', 3, _NOPERM);
40 40
 }
41 41
 
42 42
 $view_etablissement = $etablissementHandler->getEtablissement($etablissement_id, true);
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 
79 79
 $date = mktime(0, 0, 0, date('m'), date('d'), date('y'));
80 80
 
81
-$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 . "'");
81
+$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."'");
82 82
 while ($donnees = $xoopsDB->fetchArray($requete)) {
83 83
     if ($donnees['event_desc'] > 210) {
84 84
         $event_desc = $donnees['event_desc'];
85 85
     } else {
86
-        $event_desc = substr($donnees['event_desc'], 0, 210) . '...';
86
+        $event_desc = substr($donnees['event_desc'], 0, 210).'...';
87 87
     }
88 88
     $xoopsTpl->append('events', [
89 89
         'event_picture1' => $donnees['event_picture1'],
@@ -96,4 +96,4 @@  discard block
 block discarded – undo
96 96
 /** @var xos_opal_Theme $xoTheme */
97 97
 $xoTheme->addScript('browse.php?modules/extcal/assets/js/highslide.js');
98 98
 $xoTheme->addStylesheet('browse.php?modules/extcal/assets/js/highslide.css');
99
-require_once XOOPS_ROOT_PATH . '/footer.php';
99
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
event_member.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
3
+include __DIR__.'/../../mainfile.php';
4 4
 
5
-require_once __DIR__ . '/include/constantes.php';
6
-require_once __DIR__ . '/include/mail_fnc.php';
7
-require_once __DIR__ . '/class/utility.php';
5
+require_once __DIR__.'/include/constantes.php';
6
+require_once __DIR__.'/include/mail_fnc.php';
7
+require_once __DIR__.'/class/utility.php';
8 8
 
9 9
 // $member_uid = 1;
10 10
 // $event_id = 393;
@@ -39,26 +39,26 @@  discard block
 block discarded – undo
39 39
 //echo "<hr>";
40 40
 
41 41
 if (!$GLOBALS['xoopsSecurity']->check()) {
42
-    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
42
+    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
43 43
 }
44 44
 
45 45
 if ($xoopsUser && $xoopsModuleConfig['whos_going']) {
46 46
     // If param are right
47
-    if ((int)$_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) {
47
+    if ((int) $_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) {
48 48
         $eventHandler       = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
49 49
         $eventMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_MEMBER, _EXTCAL_MODULE);
50 50
 
51 51
         // If the user have to be added
52 52
         if ('add' === $_POST['mode']) {
53
-            $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser);
53
+            $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser);
54 54
 
55 55
             if ($event->getVar('event_nbmember') > 0
56
-                && $eventMemberHandler->getNbMember((int)$_POST['event']) >= $event->getVar('event_nbmember')) {
56
+                && $eventMemberHandler->getNbMember((int) $_POST['event']) >= $event->getVar('event_nbmember')) {
57 57
                 sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_0, _MD_EXTCAL_MSG_0);
58 58
                 $rediredtMessage = _MD_EXTCAL_MAX_MEMBER_REACHED;
59 59
             } else {
60 60
                 $eventMemberHandler->createEventmember([
61
-                                                           'event_id' => (int)$_POST['event'],
61
+                                                           'event_id' => (int) $_POST['event'],
62 62
                                                            'uid'      => $xoopsUser->getVar('uid'),
63 63
                                                        ]);
64 64
                 sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_1, _MD_EXTCAL_MSG_1);
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
             // If the user have to be remove
68 68
         } else {
69 69
             if ('remove' === $_POST['mode']) {
70
-                $eventMemberHandler->deleteEventmember([(int)$_POST['event'], $xoopsUser->getVar('uid')]);
70
+                $eventMemberHandler->deleteEventmember([(int) $_POST['event'], $xoopsUser->getVar('uid')]);
71 71
                 sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_2, _MD_EXTCAL_MSG_2);
72 72
                 $rediredtMessage = _MD_EXTCAL_WHOS_GOING_REMOVED_TO_EVENT;
73 73
             }
74 74
         }
75
-        redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false);
75
+        redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false);
76 76
     } else {
77 77
         redirect_header('index.php', 3, _NOPERM, false);
78 78
     }
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
21
-require_once __DIR__ . '/include/constantes.php';
20
+include __DIR__.'/../../mainfile.php';
21
+require_once __DIR__.'/include/constantes.php';
22 22
 
23
-require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php';
23
+require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/calendar.php';
24 24
 
25 25
 if (!isset($_GET['event'])) {
26 26
     $eventId = 0;
27 27
 } else {
28
-    $eventId = (int)$_GET['event'];
28
+    $eventId = (int) $_GET['event'];
29 29
 }
30 30
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
31 31
 $event        = $eventHandler->objectToArray($eventHandler->getEvent($eventId), ['cat_id']);
@@ -40,136 +40,136 @@  discard block
 block discarded – undo
40 40
 // Adding formated date for start and end event
41 41
 $eventHandler->formatEventDate($event, $xoopsModuleConfig['event_date_event']);
42 42
 
43
-echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
44
-echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
45
-echo '<head>' . "\n";
46
-echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n";
47
-echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n";
48
-echo '</head>' . "\n";
49
-echo '<body onload="window.print()">' . "\n";
50
-echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n";
51
-echo '<tr>' . "\n";
52
-echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n";
53
-echo $event['event_title'] . "\n";
54
-echo '</td>' . "\n";
55
-echo '</tr>' . "\n";
56
-echo '<tr>' . "\n";
57
-echo '<td style="width:50%; border:1px solid black;">' . "\n";
58
-echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n";
59
-echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n";
60
-echo '</td>' . "\n";
61
-echo '<td style="border:1px solid black;">' . "\n";
43
+echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
44
+echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
45
+echo '<head>'."\n";
46
+echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'">'."\n";
47
+echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n";
48
+echo '</head>'."\n";
49
+echo '<body onload="window.print()">'."\n";
50
+echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n";
51
+echo '<tr>'."\n";
52
+echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n";
53
+echo $event['event_title']."\n";
54
+echo '</td>'."\n";
55
+echo '</tr>'."\n";
56
+echo '<tr>'."\n";
57
+echo '<td style="width:50%; border:1px solid black;">'."\n";
58
+echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n";
59
+echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n";
60
+echo '</td>'."\n";
61
+echo '<td style="border:1px solid black;">'."\n";
62 62
 if (!$event['event_isrecur']) {
63
-    echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n";
64
-    echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n";
63
+    echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n";
64
+    echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n";
65 65
 } else {
66
-    echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n";
66
+    echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n";
67 67
 }
68
-echo '</td>' . "\n";
69
-echo '</tr>' . "\n";
68
+echo '</td>'."\n";
69
+echo '</tr>'."\n";
70 70
 
71
-echo '<tr>' . "\n";
71
+echo '<tr>'."\n";
72 72
 if ('' != $event['event_desc']) {
73
-    echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n";
73
+    echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n";
74 74
 }
75 75
 if ('' != $event['event_price']) {
76
-    echo '<td style="border:1px solid black;">' . _MD_EXTCAL_ETABLISSEMENT_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n";
76
+    echo '<td style="border:1px solid black;">'._MD_EXTCAL_ETABLISSEMENT_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n";
77 77
 }
78
-echo '</tr>' . "\n";
78
+echo '</tr>'."\n";
79 79
 
80 80
 //show contact info
81 81
 if ('' != $event['event_contact']) {
82
-    echo '<tr>' . "\n";
83
-    echo '<td style="border:1px solid black;">' . "\n";
84
-    echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n";
85
-    echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n";
86
-    echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n";
87
-    echo $event['event_address'] . '</span>' . "\n";
88
-    echo '</td>' . "\n";
89
-    echo '<td style="border:1px solid black;">' . "\n";
90
-    echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n";
91
-    echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n";
92
-    echo '</td>' . "\n";
93
-    echo '</tr>' . "\n";
82
+    echo '<tr>'."\n";
83
+    echo '<td style="border:1px solid black;">'."\n";
84
+    echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n";
85
+    echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n";
86
+    echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n";
87
+    echo $event['event_address'].'</span>'."\n";
88
+    echo '</td>'."\n";
89
+    echo '<td style="border:1px solid black;">'."\n";
90
+    echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n";
91
+    echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n";
92
+    echo '</td>'."\n";
93
+    echo '</tr>'."\n";
94 94
 }
95 95
 
96 96
 //show location
97 97
 if ($event['event_etablissement'] = 0) {
98
-    echo '<tr>' . "\n";
98
+    echo '<tr>'."\n";
99 99
 
100 100
     //    echo($location['nom']);
101 101
     //    var_dump($location);
102 102
     //    var_dump($event);
103 103
 
104
-    echo '<td style="border:1px solid black;">' . "\n";
105
-    echo '<b>' . _MD_EXTCAL_ETABLISSEMENT . '</b>' . "\n";
104
+    echo '<td style="border:1px solid black;">'."\n";
105
+    echo '<b>'._MD_EXTCAL_ETABLISSEMENT.'</b>'."\n";
106 106
     if ('' != $location['categorie']) {
107
-        echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n";
107
+        echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n";
108 108
     }
109 109
     if ('' != $location['logo']) {
110
-        echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/etablissement/' . $location['logo'] . ' height="75px">' . '' . "\n";
110
+        echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/etablissement/'.$location['logo'].' height="75px">'.''."\n";
111 111
     }
112 112
 
113
-    echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n";
114
-    echo $location['description'] . '<br>' . "\n";
115
-    echo $location['adresse'] . '</span> <br>' . "\n";
113
+    echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n";
114
+    echo $location['description'].'<br>'."\n";
115
+    echo $location['adresse'].'</span> <br>'."\n";
116 116
     if ('' != $location['adresse2']) {
117
-        echo $location['adresse2'] . '</span> <br>' . "\n";
117
+        echo $location['adresse2'].'</span> <br>'."\n";
118 118
     }
119
-    echo $location['ville'] . "\n";
120
-    echo $location['cp'] . '<br>' . "\n";
119
+    echo $location['ville']."\n";
120
+    echo $location['cp'].'<br>'."\n";
121 121
 
122 122
     if ('' != $location['horaires']) {
123
-        echo $location['horaires'] . '</span> <br>' . "\n";
123
+        echo $location['horaires'].'</span> <br>'."\n";
124 124
     }
125 125
 
126 126
     if ('' != $location['divers']) {
127
-        echo $location['divers'] . '</span> <br>' . "\n";
127
+        echo $location['divers'].'</span> <br>'."\n";
128 128
     }
129 129
 
130 130
     if ('' != $location['tarifs']) {
131
-        echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n";
131
+        echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n";
132 132
     }
133 133
 
134
-    echo '</td>' . "\n";
135
-    echo '<td style="border:1px solid black;">' . "\n";
134
+    echo '</td>'."\n";
135
+    echo '<td style="border:1px solid black;">'."\n";
136 136
 
137 137
     if ('' != $location['tel_fixe']) {
138
-        echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n";
138
+        echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n";
139 139
     }
140 140
     if ('' != $location['tel_portable']) {
141
-        echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n";
141
+        echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n";
142 142
     }
143 143
 
144
-    echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n";
145
-    echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n";
146
-    echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_ETABLISSEMENT_MAP2 . '</a>' . "\n";
144
+    echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n";
145
+    echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n";
146
+    echo '<b>'._MD_EXTCAL_ETABLISSEMENT_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_ETABLISSEMENT_MAP2.'</a>'."\n";
147 147
 
148
-    echo '</td>' . "\n";
149
-    echo '</tr>' . "\n";
148
+    echo '</td>'."\n";
149
+    echo '</tr>'."\n";
150 150
 }
151 151
 //show images
152 152
 
153 153
 if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) {
154
-    echo '<tr>' . "\n";
154
+    echo '<tr>'."\n";
155 155
     if ('' != $event['event_picture1']) {
156
-        echo '<td style="border:1px solid black;">' . "\n";
157
-        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n";
158
-        echo '</td>' . "\n";
156
+        echo '<td style="border:1px solid black;">'."\n";
157
+        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px">'.''."\n";
158
+        echo '</td>'."\n";
159 159
     }
160 160
     if ('' != $event['event_picture2']) {
161
-        echo '<td style="border:1px solid black;">' . "\n";
162
-        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n";
163
-        echo '</td>' . "\n";
161
+        echo '<td style="border:1px solid black;">'."\n";
162
+        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px">'.''."\n";
163
+        echo '</td>'."\n";
164 164
     }
165
-    echo '</tr>' . "\n";
165
+    echo '</tr>'."\n";
166 166
 }
167 167
 //--------------------
168 168
 
169
-echo '</table><br>' . "\n";
169
+echo '</table><br>'."\n";
170 170
 echo '<div style="text-align:center; width:640px;">';
171
-echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>';
172
-echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>';
171
+echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>';
172
+echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>';
173 173
 echo '</div>';
174
-echo '</body>' . "\n";
175
-echo '</html>' . "\n";
174
+echo '</body>'."\n";
175
+echo '</html>'."\n";
Please login to merge, or discard this patch.
admin/main.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/../../../include/cp_header.php';
4
-include __DIR__ . '/../../../class/xoopsformloader.php';
5
-require_once __DIR__ . '/admin_header.php';
3
+require_once __DIR__.'/../../../include/cp_header.php';
4
+include __DIR__.'/../../../class/xoopsformloader.php';
5
+require_once __DIR__.'/admin_header.php';
6 6
 
7 7
 function extgalleryLastVersion()
8 8
 {
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         switch ($fct) {
38 38
             case 'send':
39 39
                 if (!$GLOBALS['xoopsSecurity']->check()) {
40
-                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
40
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
41 41
                 }
42 42
                 xoops_cp_header();
43 43
                 adminMenu(1);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     'EV_TITLE' => $event->getVar('event_title'),
71 71
                     'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')),
72 72
                     'EV_END'   => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')),
73
-                    'EV_LINK'  => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
73
+                    'EV_LINK'  => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
74 74
                 ];
75 75
                 $xoopsMailer->assign($tag);
76 76
                 $xoopsMailer->send(true);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             default:
86 86
                 xoops_cp_header();
87 87
                 $fromemail      = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E');
88
-                $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span>&nbsp;&nbsp;&nbsp;';
88
+                $subjectCaption = _AM_EXTCAL_SUBJECT."<br><br><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS2.'</span>&nbsp;&nbsp;&nbsp;';
89 89
                 $bodyCaption    = _AM_EXTCAL_BODY
90 90
                                   . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
91 91
                                   . _AM_EXTCAL_USEFUL_TAGS
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
                                   . '<br>'
109 109
                                   . _AM_EXTCAL_MAILTAGS9
110 110
                                   . '</span>&nbsp;&nbsp;&nbsp;';
111
-                $toCheckBbox    = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
111
+                $toCheckBbox = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
112 112
                 $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL);
113 113
                 $toCheckBox->addOption('pm', _AM_EXTCAL_PM);
114 114
 
115
-                echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
116
-                echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
115
+                echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
116
+                echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
117 117
                 echo _AM_EXTCAL_INFO_SEND_NOTIF;
118 118
                 echo '</fieldset><br>';
119 119
                 $form = new XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&amp;fct=send', 'post', true);
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
         //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
144 144
         $adminObject = \Xmf\Module\Admin::getInstance();
145 145
         $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
146
-        $adminObject->addInfoBoxLine(sprintf( '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green');
147
-        $adminObject->addInfoBoxLine(sprintf( '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1))), '', 'Green');
148
-        $adminObject->addInfoBoxLine(sprintf( '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0))), '', 'Red');
146
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount()), '', 'Green');
147
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1))), '', 'Green');
148
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0))), '', 'Red');
149 149
         $criteriaCompo = new CriteriaCompo();
150 150
         $criteriaCompo->add(new Criteria('event_approved', 1));
151 151
         $criteriaCompo->add(new Criteria('event_start', time(), '>='));
152
-        $adminObject->addInfoBoxLine(sprintf( '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green');
152
+        $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>'), '', 'Green');
153 153
 
154 154
         $adminObject->addConfigBoxLine();
155 155
         $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
@@ -166,42 +166,42 @@  discard block
 block discarded – undo
166 166
         $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
167 167
         $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
168 168
 
169
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
170
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
169
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>';
170
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
171 171
         //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
172
-        echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
173
-        echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
172
+        echo '<img src='.$pathIcon16.'/edit.png>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>';
173
+        echo '<img src='.$pathIcon16.'/delete.png>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>';
174 174
         echo '</fieldset><br>';
175 175
 
176 176
         echo '<table class="outer" style="width:100%;">';
177 177
         echo '<tr style="text-align:center;">';
178
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
179
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
180
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
181
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
178
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
179
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
180
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
181
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
182 182
         echo '</tr>';
183 183
 
184 184
         if (count($pendingEvent) > 0) {
185 185
             $i = 0;
186 186
             foreach ($pendingEvent as $event) {
187 187
                 $class = (0 == ++$i % 2) ? 'even' : 'odd';
188
-                echo '<tr style="text-align:center;" class="' . $class . '">';
189
-                echo '<td>' . $event['cat']['cat_name'] . '</td>';
190
-                echo '<td>' . $event['event_title'] . '</td>';
191
-                echo '<td>' . $event['formated_event_start'] . '</td>';
188
+                echo '<tr style="text-align:center;" class="'.$class.'">';
189
+                echo '<td>'.$event['cat']['cat_name'].'</td>';
190
+                echo '<td>'.$event['event_title'].'</td>';
191
+                echo '<td>'.$event['formated_event_start'].'</td>';
192 192
                 echo '<td style="width:10%; text-align:center;">';
193
-                echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
194
-                echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
193
+                echo '<a href="event.php?op=modify&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a>&nbsp;&nbsp;';
194
+                echo '<a href="event.php?op=delete&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>';
195 195
                 echo '</td>';
196 196
                 echo '</tr>';
197 197
             }
198 198
         } else {
199
-            echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
199
+            echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
200 200
         }
201 201
 
202 202
         echo '</table></fieldset><br>';
203 203
 
204
-        require_once __DIR__ . '/admin_footer.php';
204
+        require_once __DIR__.'/admin_footer.php';
205 205
 
206 206
         break;
207 207
 }
Please login to merge, or discard this patch.
class/event.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-require_once __DIR__ . '/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/perm.php';
24
-require_once __DIR__ . '/time.php';
25
-require_once __DIR__ . '/config.php';
26
-require_once __DIR__ . '/extDateTime.php';
27
-require_once __DIR__ . '/utility.php';
28
-require_once __DIR__ . '/../include/constantes.php';
22
+require_once __DIR__.'/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/perm.php';
24
+require_once __DIR__.'/time.php';
25
+require_once __DIR__.'/config.php';
26
+require_once __DIR__.'/extDateTime.php';
27
+require_once __DIR__.'/utility.php';
28
+require_once __DIR__.'/../include/constantes.php';
29 29
 
30 30
 /**
31 31
  * Class ExtcalEvent.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false);
67 67
         $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false);
68 68
 
69
-        $this->externalKey['cat_id']          = [
69
+        $this->externalKey['cat_id'] = [
70 70
             'className'      => 'cat',
71 71
             'getMethodeName' => 'getCat',
72 72
             'keyName'        => 'cat',
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 
403 403
         //        while (list($k, $v) = each($events)) {
404 404
         foreach ($events as $k => $v) {
405
-            $ordre[] = (int)$v['event_start'];
405
+            $ordre[] = (int) $v['event_start'];
406 406
             $this->formatEventDate($v, $extcalConfig['event_date_week']);
407 407
             //$v['cat']['cat_light_color'] = $v['cat']['cat_color'];
408 408
             $v['cat']['cat_light_color'] = ExtcalUtility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX);
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 
607 607
         reset($period);
608 608
         foreach ($period as $dt) {
609
-            echo $dt->format("l d-m-Y H:i:s\n") . '<br>';
609
+            echo $dt->format("l d-m-Y H:i:s\n").'<br>';
610 610
         }
611 611
     }
612 612
 
@@ -939,10 +939,10 @@  discard block
 block discarded – undo
939 939
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
940 940
         $count                = count($authorizedAccessCats);
941 941
         if ($count > 0) {
942
-            $in = '(' . $authorizedAccessCats[0];
942
+            $in = '('.$authorizedAccessCats[0];
943 943
             array_shift($authorizedAccessCats);
944 944
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
945
-                $in .= ',' . $authorizedAccessCat;
945
+                $in .= ','.$authorizedAccessCat;
946 946
             }
947 947
             $in .= ')';
948 948
             $criteria->add(new Criteria('cat_id', $in, 'IN'));
@@ -962,10 +962,10 @@  discard block
 block discarded – undo
962 962
         }
963 963
         if (is_array($cats)) {
964 964
             if (false === array_search(0, $cats)) {
965
-                $in = '(' . current($cats);
965
+                $in = '('.current($cats);
966 966
                 array_shift($cats);
967 967
                 foreach ($cats as $cat) {
968
-                    $in .= ',' . $cat;
968
+                    $in .= ','.$cat;
969 969
                 }
970 970
                 $in .= ')';
971 971
                 $criteria->add(new Criteria('cat_id', $in, 'IN'));
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
         $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
989 989
 
990 990
         /***************************************************/
991
-        require_once __DIR__ . '/etablissement.php';
991
+        require_once __DIR__.'/etablissement.php';
992 992
         if ('admin' === $siteSide) {
993 993
             $action = 'event.php?op=enreg';
994 994
             $cats   = $catHandler->getAllCat($GLOBALS['xoopsUser'], 'all');
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
             if ('clone' === $mode) {
1007 1007
                 $data['event_id'] = 0;
1008 1008
                 $event->setVar('event_id', 0);
1009
-                $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')';
1009
+                $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')';
1010 1010
                 $event->setVar('event_title', $newTitle);
1011 1011
             }
1012 1012
 
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
         $form->addElement($catSelect, true);
1191 1191
         //-----------------------------------------------------------
1192 1192
 
1193
-        $file_path = __DIR__ . '/../assets/css/images';
1193
+        $file_path = __DIR__.'/../assets/css/images';
1194 1194
         $tf        = XoopsLists::getImgListAsArray($file_path);
1195 1195
         array_unshift($tf, _MD_EXTCAL_NONE);
1196 1196
         $xfIcones = new XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, '');
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
         if (count($files) > 0) {
1296 1296
             $eventFiles = new ExtcalFormFileCheckBox('', 'filetokeep');
1297 1297
             foreach ($files as $file) {
1298
-                $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size'];
1298
+                $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size'];
1299 1299
                 $eventFiles->addOption($file['file_id'], $name);
1300 1300
             }
1301 1301
             $fileElmtTray->addElement($eventFiles);
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
         //Picture1
1312 1312
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), '');
1313 1313
         if (!empty($event_picture1)) {
1314
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>"));
1314
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>"));
1315 1315
             $check_del_img = new XoopsFormCheckBox('', 'delimg_1');
1316 1316
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1317 1317
             $file_tray->addElement($check_del_img);
@@ -1322,8 +1322,8 @@  discard block
 block discarded – undo
1322 1322
         }
1323 1323
         $file_img->setExtra("size ='40'");
1324 1324
         $file_tray->addElement($file_img);
1325
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1326
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
1325
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1326
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
1327 1327
         $file_tray->addElement($file_label);
1328 1328
         $form->addElement($file_tray);
1329 1329
         $form->addElement(new XoopsFormHidden('file1', $event_picture1));
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
         //Picture2
1332 1332
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
1333 1333
         if (!empty($event_picture2)) {
1334
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>"));
1334
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>"));
1335 1335
             $check_del_img = new XoopsFormCheckBox('', 'delimg_2');
1336 1336
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
1337 1337
             $file_tray->addElement($check_del_img);
@@ -1342,8 +1342,8 @@  discard block
 block discarded – undo
1342 1342
         }
1343 1343
         $file_img->setExtra("size ='40'");
1344 1344
         $file_tray->addElement($file_img);
1345
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500);
1346
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
1345
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500);
1346
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
1347 1347
         $file_tray->addElement($file_label);
1348 1348
         $form->addElement($file_tray);
1349 1349
         $form->addElement(new XoopsFormHidden('file2', $event_picture2));
@@ -1410,7 +1410,7 @@  discard block
 block discarded – undo
1410 1410
                 $recurRules = 'weekly|';
1411 1411
                 $recurRules .= $parm['rrule_weekly_interval'];
1412 1412
                 foreach ($parm['rrule_weekly_bydays'] as $day) {
1413
-                    $recurRules .= '|' . $day;
1413
+                    $recurRules .= '|'.$day;
1414 1414
                 }
1415 1415
 
1416 1416
                 break;
@@ -1420,11 +1420,11 @@  discard block
 block discarded – undo
1420 1420
                     $parm['rrule_monthly_interval'] = 0;
1421 1421
                 }
1422 1422
                 $recurRules = 'monthly|';
1423
-                $recurRules .= $parm['rrule_monthly_interval'] . '|';
1423
+                $recurRules .= $parm['rrule_monthly_interval'].'|';
1424 1424
                 if ('' != $parm['rrule_monthly_byday']) {
1425 1425
                     $recurRules .= $parm['rrule_monthly_byday'];
1426 1426
                 } else {
1427
-                    $recurRules .= 'MD' . $parm['rrule_bymonthday'];
1427
+                    $recurRules .= 'MD'.$parm['rrule_bymonthday'];
1428 1428
                 }
1429 1429
 
1430 1430
                 break;
@@ -1458,9 +1458,9 @@  discard block
 block discarded – undo
1458 1458
 
1459 1459
                 $recurRules = 'yearly|';
1460 1460
                 $recurRules .= $parm['rrule_yearly_interval'];
1461
-                $recurRules .= '|' . $parm['rrule_yearly_byday'];
1461
+                $recurRules .= '|'.$parm['rrule_yearly_byday'];
1462 1462
                 foreach ($parm['rrule_yearly_bymonths'] as $month) {
1463
-                    $recurRules .= '|' . $month;
1463
+                    $recurRules .= '|'.$month;
1464 1464
                 }
1465 1465
 
1466 1466
                 break;
@@ -2390,10 +2390,10 @@  discard block
 block discarded – undo
2390 2390
         global $xoopsDB;
2391 2391
 
2392 2392
         //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}";
2393
-        $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te';
2394
-        $tCat   = $xoopsDB->prefix('extcal_cat') . ' AS tc';
2393
+        $tEvent = $xoopsDB->prefix('extcal_event').' AS te';
2394
+        $tCat   = $xoopsDB->prefix('extcal_cat').' AS tc';
2395 2395
 
2396
-        $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}";
2396
+        $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}";
2397 2397
         //---------------------------------------------------
2398 2398
         $tw   = [];
2399 2399
         $tw[] = 'te.cat_id = tc.cat_id';
@@ -2402,7 +2402,7 @@  discard block
 block discarded – undo
2402 2402
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2403 2403
         $inCat                = 'te.cat_id IN (0)';
2404 2404
         if (count($authorizedAccessCats) > 0) {
2405
-            $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')';
2405
+            $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')';
2406 2406
         }
2407 2407
         //echo $tw[count($tw)-1];
2408 2408
 
@@ -2438,12 +2438,12 @@  discard block
 block discarded – undo
2438 2438
                 'te.event_address',
2439 2439
                 'tc.cat_name',
2440 2440
             ];
2441
-            $t       = [];
2441
+            $t = [];
2442 2442
             for ($i = 0, $count = count($queryarray); $i < $count; ++$i) {
2443 2443
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2444 2444
             }
2445 2445
 
2446
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2446
+            $flt = '('.implode(" {$andor} ", $t1).')';
2447 2447
 
2448 2448
             $t = [];
2449 2449
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2452,10 +2452,10 @@  discard block
 block discarded – undo
2452 2452
 
2453 2453
             $filtre = implode(' OR ', $t);
2454 2454
             $filtre = str_replace('#', '%', $filtre);
2455
-            $tw[]   = '(' . $filtre . ')';
2455
+            $tw[]   = '('.$filtre.')';
2456 2456
         }
2457 2457
 
2458
-        $sql .= ' WHERE ' . implode(' AND ', $tw);
2458
+        $sql .= ' WHERE '.implode(' AND ', $tw);
2459 2459
         //------------------------------------------------------------
2460 2460
         if (count($orderBy) > 0) {
2461 2461
             $t = [];
@@ -2465,7 +2465,7 @@  discard block
 block discarded – undo
2465 2465
                 }
2466 2466
             }
2467 2467
             if (count($t) > 0) {
2468
-                $sql .= ' ORDER BY ' . implode(',', $t);
2468
+                $sql .= ' ORDER BY '.implode(',', $t);
2469 2469
             }
2470 2470
         }
2471 2471
 
@@ -2498,7 +2498,7 @@  discard block
 block discarded – undo
2498 2498
         $i = 0;
2499 2499
         while ($myrow = $xoopsDB->fetchArray($result)) {
2500 2500
             $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2501
-            $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2501
+            $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2502 2502
             $ret[$i]['title'] = $myrow['event_title'];
2503 2503
             $ret[$i]['time']  = $myrow['event_submitdate'];
2504 2504
             $ret[$i]['uid']   = $myrow['event_submitter'];
@@ -2538,23 +2538,23 @@  discard block
 block discarded – undo
2538 2538
         //        }
2539 2539
         $tEvent = $xoopsDB->prefix('extcal_event');
2540 2540
         $tCat   = $xoopsDB->prefix('extcal_cat');
2541
-        $sql    = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color " . " FROM {$tEvent}, {$tCat}" . " WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'";
2541
+        $sql    = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color "." FROM {$tEvent}, {$tCat}"." WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'";
2542 2542
 
2543 2543
         $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view');
2544 2544
         $count                = count($authorizedAccessCats);
2545 2545
         if ($count > 0) {
2546
-            $in = '(' . $authorizedAccessCats[0];
2546
+            $in = '('.$authorizedAccessCats[0];
2547 2547
             array_shift($authorizedAccessCats);
2548 2548
             foreach ($authorizedAccessCats as $authorizedAccessCat) {
2549
-                $in .= ',' . $authorizedAccessCat;
2549
+                $in .= ','.$authorizedAccessCat;
2550 2550
             }
2551 2551
             $in .= ')';
2552 2552
         } else {
2553 2553
             $in = '(0)';
2554 2554
         }
2555
-        $sql .= " AND {$tEvent}.cat_id IN " . $in . '';
2555
+        $sql .= " AND {$tEvent}.cat_id IN ".$in.'';
2556 2556
         if (0 != $userId) {
2557
-            $sql .= " AND event_submitter = '" . $userId . "'";
2557
+            $sql .= " AND event_submitter = '".$userId."'";
2558 2558
         }
2559 2559
 
2560 2560
         //echoArray($queryarray,false);
@@ -2574,7 +2574,7 @@  discard block
 block discarded – undo
2574 2574
                 $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' ";
2575 2575
             }
2576 2576
 
2577
-            $flt = '(' . implode(" {$andor} ", $t1) . ')';
2577
+            $flt = '('.implode(" {$andor} ", $t1).')';
2578 2578
 
2579 2579
             $t = [];
2580 2580
             for ($h = 0, $count = count($tFields); $h < $count; ++$h) {
@@ -2583,11 +2583,11 @@  discard block
 block discarded – undo
2583 2583
 
2584 2584
             $filtre = implode(' OR ', $t);
2585 2585
             $filtre = str_replace('#', '%', $filtre);
2586
-            $sql    .= " AND ($filtre)";
2586
+            $sql .= " AND ($filtre)";
2587 2587
         }
2588 2588
 
2589 2589
         if ('' != $criteresPlus) {
2590
-            $sql .= ' AND ' . $criteresPlus;
2590
+            $sql .= ' AND '.$criteresPlus;
2591 2591
         }
2592 2592
         $sql .= ' ORDER BY event_id DESC';
2593 2593
 
@@ -2597,7 +2597,7 @@  discard block
 block discarded – undo
2597 2597
         if ($xoopsSearch) {
2598 2598
             while ($myrow = $xoopsDB->fetchArray($result)) {
2599 2599
                 $ret[$i]['image'] = 'assets/images/icons/extcal.gif';
2600
-                $ret[$i]['link']  = 'event.php?event=' . $myrow['event_id'];
2600
+                $ret[$i]['link']  = 'event.php?event='.$myrow['event_id'];
2601 2601
                 $ret[$i]['title'] = $myrow['event_title'];
2602 2602
                 $ret[$i]['time']  = $myrow['event_submitdate'];
2603 2603
                 $ret[$i]['uid']   = $myrow['event_submitter'];
Please login to merge, or discard this patch.