Completed
Push — master ( ec1681...68c045 )
by Michael
02:41
created
admin/event.php 2 patches
Switch Indentation   +302 added lines, -302 removed lines patch added patch discarded remove patch
@@ -70,176 +70,194 @@  discard block
 block discarded – undo
70 70
 
71 71
 switch ($op) {
72 72
 
73
-    case 'enreg':
74
-
75
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
76
-        $fileHandler  = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
77
-        // $t = print_r($_POST,true);
78
-        // echo "<pre>{$t}</pre><br>";
79
-        // exit;
80
-        // If the date format is wrong
81
-        //        if (
82
-        //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
83
-        //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
84
-        //        ) {
85
-        //            redirect_header(
86
-        //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
87
-        //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
88
-        //            );
89
-        //            exit;
90
-        //        }
91
-
92
-        //exit;
93
-        ///////////////////////////////////////////////////////////////////////////////
94
-        ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
95
-        ///////////////////////////////////////////////////////////////////////////////
96
-        $data = [
97
-            'event_title'         => $_POST['event_title'],
98
-            'cat_id'              => $_POST['cat_id'],
99
-            'event_desc'          => $_POST['event_desc'],
100
-            'event_nbmember'      => $_POST['event_nbmember'],
101
-            'event_organisateur'  => $_POST['event_organisateur'],
102
-            'event_contact'       => $_POST['event_contact'],
103
-            'event_url'           => $_POST['event_url'],
104
-            'event_email'         => $_POST['event_email'],
105
-            'event_address'       => $_POST['event_address'],
106
-            'event_approved'      => 1,
107
-            'event_start'         => $_POST['event_start'],
108
-            'have_end'            => $_POST['have_end'],
109
-            'event_end'           => $_POST['event_end'],
110
-            'event_picture1'      => @$event_picture1,
111
-            'event_picture2'      => @$event_picture2,
112
-            'event_price'         => @$_POST['event_price'],
113
-            'event_etablissement' => $_POST['event_etablissement'],
114
-            'dohtml'              => $extcalConfig['allow_html'],
115
-            'event_icone'         => $_POST['event_icone'],
116
-        ];
117
-
118
-        // Event edited
119
-        if (isset($_POST['event_id'])) {
120
-            if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
73
+        case 'enreg':
74
+
75
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
76
+            $fileHandler  = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
77
+            // $t = print_r($_POST,true);
78
+            // echo "<pre>{$t}</pre><br>";
79
+            // exit;
80
+            // If the date format is wrong
81
+            //        if (
82
+            //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
83
+            //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
84
+            //        ) {
85
+            //            redirect_header(
86
+            //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
87
+            //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
88
+            //            );
89
+            //            exit;
90
+            //        }
91
+
92
+            //exit;
93
+            ///////////////////////////////////////////////////////////////////////////////
94
+            ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
95
+            ///////////////////////////////////////////////////////////////////////////////
96
+            $data = [
97
+                'event_title'         => $_POST['event_title'],
98
+                'cat_id'              => $_POST['cat_id'],
99
+                'event_desc'          => $_POST['event_desc'],
100
+                'event_nbmember'      => $_POST['event_nbmember'],
101
+                'event_organisateur'  => $_POST['event_organisateur'],
102
+                'event_contact'       => $_POST['event_contact'],
103
+                'event_url'           => $_POST['event_url'],
104
+                'event_email'         => $_POST['event_email'],
105
+                'event_address'       => $_POST['event_address'],
106
+                'event_approved'      => 1,
107
+                'event_start'         => $_POST['event_start'],
108
+                'have_end'            => $_POST['have_end'],
109
+                'event_end'           => $_POST['event_end'],
110
+                'event_picture1'      => @$event_picture1,
111
+                'event_picture2'      => @$event_picture2,
112
+                'event_price'         => @$_POST['event_price'],
113
+                'event_etablissement' => $_POST['event_etablissement'],
114
+                'dohtml'              => $extcalConfig['allow_html'],
115
+                'event_icone'         => $_POST['event_icone'],
116
+            ];
117
+
118
+            // Event edited
119
+            if (isset($_POST['event_id'])) {
120
+                if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
122
+                } else {
123
+                    $fileHandler->createFile((int)$_POST['event_id']);
124
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
125
+                }
126
+
127
+                // New event
122 128
             } else {
123
-                $fileHandler->createFile((int)$_POST['event_id']);
124
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
129
+                $notificationHandler = xoops_getHandler('notification');
130
+                /** @var ExtcalCatHandler $catHandler */
131
+                $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
132
+
133
+                $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
134
+                $data['event_submitdate'] = time();
135
+
136
+                if ($eventHandler->createEvent($data, $_POST)) {
137
+                    $fileHandler->createFile($eventHandler->getInsertId());
138
+                    $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
139
+                    $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]);
140
+                    $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', [
141
+                        'EVENT_TITLE' => $_POST['event_title'],
142
+                        'CAT_NAME'    => $cat->getVar('cat_name'),
143
+                    ]);
144
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
145
+                } else {
146
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
147
+                }
125 148
             }
149
+            break;
126 150
 
127
-            // New event
128
-        } else {
129
-            $notificationHandler = xoops_getHandler('notification');
130
-            /** @var ExtcalCatHandler $catHandler */
131
-            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
132
-
133
-            $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
134
-            $data['event_submitdate'] = time();
135
-
136
-            if ($eventHandler->createEvent($data, $_POST)) {
137
-                $fileHandler->createFile($eventHandler->getInsertId());
138
-                $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
139
-                $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]);
140
-                $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', [
141
-                    'EVENT_TITLE' => $_POST['event_title'],
142
-                    'CAT_NAME'    => $cat->getVar('cat_name'),
143
-                ]);
144
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
145
-            } else {
146
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
151
+        case 'clone': /* sur validation du formulaire */
152
+        case 'modify':
153
+            $action = (($op === 'clone') ? 'clone' : 'edit');
154
+            xoops_cp_header();
155
+            //================================================
156
+            // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
157
+            //
158
+            //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
159
+            //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
160
+            //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
161
+            //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
162
+            //        //$dateBirthday->rtl=false;
163
+            //        $dateBirthday->setAutoHide(false);
164
+            //
165
+            //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
166
+            //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
167
+            //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
168
+            //
169
+            //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
170
+            //        $dateBirthday->zindex = 150; //default 1
171
+            //        $dateBirthday->setYearInterval(1995, date('Y'));
172
+            //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
173
+            //        //$dateBirthday->autoSubmit(true, "calendar");
174
+            //        $dateBirthday->disabledDay("sat");
175
+            //        $dateBirthday->disabledDay("sun");
176
+            //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
177
+            //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
178
+            //        $dateBirthday->setAlignment('right', 'bottom'); //optional
179
+            // echo "<table><tr><td>zzzzz</td><td></td><td>";
180
+            // echo $dateBirthday->render();
181
+            // echo "</td></tr></table>";
182
+            //echo $dateBirthday->render();
183
+            //================================================
184
+            // @author      Gregory Mage (Aka Mage)
185
+            //***************************************************************************************
186
+            //         require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
187
+            $adminObject = \Xmf\Module\Admin::getInstance();
188
+            $adminObject->displayNavigation(basename(__FILE__));
189
+            //***************************************************************************************
190
+
191
+            $eventId      = $_GET['event_id'];
192
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193
+
194
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
195
+
196
+            if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) {
197
+                $form->display();
147 198
             }
148
-        }
149
-        break;
150
-
151
-    case 'clone': /* sur validation du formulaire */
152
-    case 'modify':
153
-        $action = (($op === 'clone') ? 'clone' : 'edit');
154
-        xoops_cp_header();
155
-        //================================================
156
-        // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
157
-        //
158
-        //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
159
-        //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
160
-        //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
161
-        //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
162
-        //        //$dateBirthday->rtl=false;
163
-        //        $dateBirthday->setAutoHide(false);
164
-        //
165
-        //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
166
-        //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
167
-        //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
168
-        //
169
-        //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
170
-        //        $dateBirthday->zindex = 150; //default 1
171
-        //        $dateBirthday->setYearInterval(1995, date('Y'));
172
-        //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
173
-        //        //$dateBirthday->autoSubmit(true, "calendar");
174
-        //        $dateBirthday->disabledDay("sat");
175
-        //        $dateBirthday->disabledDay("sun");
176
-        //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
177
-        //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
178
-        //        $dateBirthday->setAlignment('right', 'bottom'); //optional
179
-        // echo "<table><tr><td>zzzzz</td><td></td><td>";
180
-        // echo $dateBirthday->render();
181
-        // echo "</td></tr></table>";
182
-        //echo $dateBirthday->render();
183
-        //================================================
184
-        // @author      Gregory Mage (Aka Mage)
185
-        //***************************************************************************************
186
-        //         require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
187
-        $adminObject = \Xmf\Module\Admin::getInstance();
188
-        $adminObject->displayNavigation(basename(__FILE__));
189
-        //***************************************************************************************
190
-
191
-        $eventId      = $_GET['event_id'];
192
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193
-
194
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
195
-
196
-        if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) {
197
-            $form->display();
198
-        }
199 199
 
200
-        echo '</fieldset><br>';
200
+            echo '</fieldset><br>';
201 201
 
202
-        xoops_cp_footer();
202
+            xoops_cp_footer();
203 203
 
204
-        break;
204
+            break;
205 205
 
206
-    case 'clone2': /* sur clique de l'icone du formulaire*/
206
+        case 'clone2': /* sur clique de l'icone du formulaire*/
207 207
 
208
-        //$newEventId = 1;
209
-        $eventId      = $_GET['event_id'];
210
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
211
-        $event        = $eventHandler->getEvent($eventId);
212
-        $t            = $event->getVars();
213
-        $data         = [];
214
-        //        while (list($key, $val) = each($t)) {
215
-        foreach ($t as $key => $val) {
216
-            $data[$key] = $val['value'];
217
-        }
208
+            //$newEventId = 1;
209
+            $eventId      = $_GET['event_id'];
210
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
211
+            $event        = $eventHandler->getEvent($eventId);
212
+            $t            = $event->getVars();
213
+            $data         = [];
214
+            //        while (list($key, $val) = each($t)) {
215
+            foreach ($t as $key => $val) {
216
+                $data[$key] = $val['value'];
217
+            }
218 218
 
219
-        $data['event_id']    = 0;
220
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
219
+            $data['event_id']    = 0;
220
+            $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
221 221
 
222
-        $newEvent = $eventHandler->create();
223
-        $newEvent->setVars($data);
224
-        $t = $eventHandler->insert($newEvent, true);
222
+            $newEvent = $eventHandler->create();
223
+            $newEvent->setVars($data);
224
+            $t = $eventHandler->insert($newEvent, true);
225 225
 
226
-        $newEventId = $newEvent->getVar('event_id');
227
-        $ts         = print_r($newEventId, true);
226
+            $newEventId = $newEvent->getVar('event_id');
227
+            $ts         = print_r($newEventId, true);
228 228
 
229
-        redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
230
-        break;
229
+            redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
230
+            break;
231 231
 
232
-    case 'delete':
232
+        case 'delete':
233 233
 
234
-        if (isset($_POST['confirm'])) {
235
-            if (!$GLOBALS['xoopsSecurity']->check()) {
236
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
234
+            if (isset($_POST['confirm'])) {
235
+                if (!$GLOBALS['xoopsSecurity']->check()) {
236
+                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237
+                }
238
+                //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
239
+                //             $eventHandler->deleteEvent($_POST['event_id']);
240
+                deleteEvents($_POST['event_id']);
241
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
242
+            } else {
243
+                xoops_cp_header();
244
+                // @author      Gregory Mage (Aka Mage)
245
+                //***************************************************************************************
246
+                //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
247
+                $adminObject = \Xmf\Module\Admin::getInstance();
248
+                $adminObject->displayNavigation(basename(__FILE__));
249
+                //***************************************************************************************
250
+
251
+                $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1];
252
+                xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
253
+
254
+                xoops_cp_footer();
237 255
             }
238
-            //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
239
-            //             $eventHandler->deleteEvent($_POST['event_id']);
240
-            deleteEvents($_POST['event_id']);
241
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
242
-        } else {
256
+
257
+            break;
258
+
259
+        case 'deleteSelection':
260
+
243 261
             xoops_cp_header();
244 262
             // @author      Gregory Mage (Aka Mage)
245 263
             //***************************************************************************************
@@ -247,185 +265,167 @@  discard block
 block discarded – undo
247 265
             $adminObject = \Xmf\Module\Admin::getInstance();
248 266
             $adminObject->displayNavigation(basename(__FILE__));
249 267
             //***************************************************************************************
268
+            if (isset($_POST['deleteSelection'][0])) {
269
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
270
+                $ids = array_keys($_POST['deleteAllEvents']);
271
+            } else {
272
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
273
+                $ids = array_keys($_POST['deleteEvents']);
274
+            }
250 275
 
251
-            $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1];
252
-            xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
276
+            //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
277
+            //           $ids = array_keys($_POST['deleteEvents']);
278
+            $ids = implode(',', $ids);
279
+            //echo $ids.'<br>';
280
+            $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1];
281
+            //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
282
+            xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
253 283
 
254 284
             xoops_cp_footer();
255
-        }
256 285
 
257
-        break;
258
-
259
-    case 'deleteSelection':
260
-
261
-        xoops_cp_header();
262
-        // @author      Gregory Mage (Aka Mage)
263
-        //***************************************************************************************
264
-        //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
265
-        $adminObject = \Xmf\Module\Admin::getInstance();
266
-        $adminObject->displayNavigation(basename(__FILE__));
267
-        //***************************************************************************************
268
-        if (isset($_POST['deleteSelection'][0])) {
269
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
270
-            $ids = array_keys($_POST['deleteAllEvents']);
271
-        } else {
272
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
273
-            $ids = array_keys($_POST['deleteEvents']);
274
-        }
286
+            break;
275 287
 
276
-        //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
277
-        //           $ids = array_keys($_POST['deleteEvents']);
278
-        $ids = implode(',', $ids);
279
-        //echo $ids.'<br>';
280
-        $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1];
281
-        //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
282
-        xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
283
-
284
-        xoops_cp_footer();
285
-
286
-        break;
287
-
288
-    case 'deleteSelectionOK':
289
-        //-----------------------------------------
290
-        // $t = print_r($_GET,true);
291
-        // echo "<hr><pre>{$t}</pre><hr>";
292
-        //
293
-        // $t = print_r($_POST,true);
294
-        // echo "<hr><pre>{$t}</pre><hr>";
295
-        // exit;
296
-        //-----------------------------------------
297
-
298
-        if (isset($_POST['deleteSelection'][0])) {
299
-        } else {
300
-            if (!$GLOBALS['xoopsSecurity']->check()) {
301
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
302
-            }
288
+        case 'deleteSelectionOK':
289
+            //-----------------------------------------
290
+            // $t = print_r($_GET,true);
291
+            // echo "<hr><pre>{$t}</pre><hr>";
292
+            //
293
+            // $t = print_r($_POST,true);
294
+            // echo "<hr><pre>{$t}</pre><hr>";
295
+            // exit;
296
+            //-----------------------------------------
303 297
 
304
-            deleteEvents($_POST['event_ids']);
298
+            if (isset($_POST['deleteSelection'][0])) {
299
+            } else {
300
+                if (!$GLOBALS['xoopsSecurity']->check()) {
301
+                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
302
+                }
305 303
 
306
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
307
-        }
304
+                deleteEvents($_POST['event_ids']);
308 305
 
309
-        break;
306
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
307
+            }
310 308
 
311
-    case 'default':
312
-    default:
309
+            break;
313 310
 
314
-        //global $extcalConfig;
315
-        $extcalConfig      = ExtcalConfig::getHandler();
316
-        $xoopsModuleConfig = $extcalConfig->getModuleConfig();
311
+        case 'default':
312
+        default:
317 313
 
318
-        $start          = isset($_GET['start']) ? $_GET['start'] : 0;
319
-        $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
314
+            //global $extcalConfig;
315
+            $extcalConfig      = ExtcalConfig::getHandler();
316
+            $xoopsModuleConfig = $extcalConfig->getModuleConfig();
320 317
 
321
-        xoops_cp_header();
322
-        // @author      Gregory Mage (Aka Mage)
323
-        //***************************************************************************************
318
+            $start          = isset($_GET['start']) ? $_GET['start'] : 0;
319
+            $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
324 320
 
325
-        $adminObject = \Xmf\Module\Admin::getInstance();
326
-        $adminObject->displayNavigation(basename(__FILE__));
327
-        //***************************************************************************************
321
+            xoops_cp_header();
322
+            // @author      Gregory Mage (Aka Mage)
323
+            //***************************************************************************************
328 324
 
329
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
330
-        $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']);
331
-        $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
325
+            $adminObject = \Xmf\Module\Admin::getInstance();
326
+            $adminObject->displayNavigation(basename(__FILE__));
327
+            //***************************************************************************************
332 328
 
333
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
334
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
335
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
336
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
329
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
330
+            $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']);
331
+            $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
337 332
 
338
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
339
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
333
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
334
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
335
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
336
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
340 337
 
341
-        echo '</fieldset><br>';
338
+            echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
339
+            echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
342 340
 
343
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
341
+            echo '</fieldset><br>';
344 342
 
345
-        echo '<form method="POST" action="event.php">';
346
-        echo '<input type="hidden" name="op" value="deleteSelection">';
343
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
347 344
 
348
-        echo '<table class="outer" style="width:100%;">';
349
-        echo '<tr style="text-align:center;">';
350
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
351
-        echo '<th>#</th>';
352
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
353
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
354
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
355
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
345
+            echo '<form method="POST" action="event.php">';
346
+            echo '<input type="hidden" name="op" value="deleteSelection">';
359 347
 
360
-        echo '</tr>';
348
+            echo '<table class="outer" style="width:100%;">';
349
+            echo '<tr style="text-align:center;">';
350
+            echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
351
+            echo '<th>#</th>';
352
+            echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
353
+            echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
354
+            echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
355
+            echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
356
+            echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
357
+            echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
358
+            echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
361 359
 
362
-        if (count($events) > 0) {
363
-            $i = 0;
364
-            foreach ($events as $event) {
365
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
366
-                echo '<tr style="text-align:left;" class="' . $class . '">';
367
-                echo "<td width='10%' align='center'>";
368
-                echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
369
-                echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
370
-                echo '</td>';
371
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
372
-                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>';
373
-
374
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
375
-
376
-                //                 if ($event['event_isrecur']) {
377
-                //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
378
-                //                 } else {
379
-                //                     echo '<td>' . $event['formated_event_start'] . '</td>';
380
-                //                 }
381
-
382
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
383
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
384
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
385
-                if (!isset($event['formated_reccur_rule'])) {
386
-                    $event['formated_reccur_rule'] = '';
360
+            echo '</tr>';
361
+
362
+            if (count($events) > 0) {
363
+                $i = 0;
364
+                foreach ($events as $event) {
365
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
366
+                    echo '<tr style="text-align:left;" class="' . $class . '">';
367
+                    echo "<td width='10%' align='center'>";
368
+                    echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
369
+                    echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
370
+                    echo '</td>';
371
+                    echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
372
+                    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>';
373
+
374
+                    echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
375
+
376
+                    //                 if ($event['event_isrecur']) {
377
+                    //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
378
+                    //                 } else {
379
+                    //                     echo '<td>' . $event['formated_event_start'] . '</td>';
380
+                    //                 }
381
+
382
+                    echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
383
+                    echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
384
+                    echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
385
+                    if (!isset($event['formated_reccur_rule'])) {
386
+                        $event['formated_reccur_rule'] = '';
387
+                    }
388
+                    echo '<td>' . $event['formated_reccur_rule'] . '</td>';
389
+
390
+                    echo '<td style="width:10%; text-align:center;">';
391
+                    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;";
392
+                    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;";
393
+                    echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
394
+                    echo '</td>';
395
+
396
+                    echo '</tr>';
387 397
                 }
388
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
398
+                //---------------------------------------------------------
399
+                $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
389 400
 
390
-                echo '<td style="width:10%; text-align:center;">';
391
-                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;";
392
-                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;";
393
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
401
+                echo '<tr><td colspan="2" style="text-align: right;">';
402
+                echo $pageNav->renderNav(2);
394 403
                 echo '</td>';
395 404
 
396
-                echo '</tr>';
397
-            }
398
-            //---------------------------------------------------------
399
-            $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
405
+                echo '<td colspan="2" style="text-align: right;">';
400 406
 
401
-            echo '<tr><td colspan="2" style="text-align: right;">';
402
-            echo $pageNav->renderNav(2);
403
-            echo '</td>';
407
+                echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
408
+                echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
404 409
 
405
-            echo '<td colspan="2" style="text-align: right;">';
406
-
407
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
408
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
409
-
410
-            echo '</td>';
411
-            echo '</tr>';
412
-        } else {
413
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
414
-        }
415
-        echo '</table>';
416
-        echo '</form>';
410
+                echo '</td>';
411
+                echo '</tr>';
412
+            } else {
413
+                echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
414
+            }
415
+            echo '</table>';
416
+            echo '</form>';
417 417
 
418
-        echo '</fieldset>';
419
-        echo '</fieldset><br><br>';
420
-        //Fin de la liste des evennement -------------------------------------
421
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
418
+            echo '</fieldset>';
419
+            echo '</fieldset><br><br>';
420
+            //Fin de la liste des evennement -------------------------------------
421
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
422 422
 
423
-        $form = $eventHandler->getEventForm('admin');
424
-        $form->display();
423
+            $form = $eventHandler->getEventForm('admin');
424
+            $form->display();
425 425
 
426
-        echo '</fieldset>';
426
+            echo '</fieldset>';
427 427
 
428
-        require_once __DIR__ . '/admin_footer.php';
428
+            require_once __DIR__ . '/admin_footer.php';
429 429
 
430
-        break;
430
+            break;
431 431
 }
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
22
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
23
-require_once __DIR__ . '/../class/form/extcalform.php';
24
-require_once __DIR__ . '/admin_header.php';
25
-require_once __DIR__ . '/../class/utility.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
22
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
23
+require_once __DIR__.'/../class/form/extcalform.php';
24
+require_once __DIR__.'/admin_header.php';
25
+require_once __DIR__.'/../class/utility.php';
26 26
 
27 27
 $gepeto = array_merge($_GET, $_POST);
28 28
 //while (list($k, $v) = each($gepeto)) {
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
     //    while (list($k, $t) = each($rst)) {
51 51
     foreach ($rst as $k => $t) {
52 52
         if ($t['event_picture1'] != '') {
53
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
53
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
54 54
             unlink($f);
55
-            echo $f . '<br>';
55
+            echo $f.'<br>';
56 56
         }
57 57
 
58 58
         if ($t['event_picture2'] != '') {
59
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
59
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
60 60
             unlink($f);
61
-            echo $f . '<br>';
61
+            echo $f.'<br>';
62 62
         }
63 63
     }
64 64
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121 121
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
122 122
             } else {
123
-                $fileHandler->createFile((int)$_POST['event_id']);
123
+                $fileHandler->createFile((int) $_POST['event_id']);
124 124
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
125 125
             }
126 126
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $eventId      = $_GET['event_id'];
192 192
         $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193 193
 
194
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
194
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
195 195
 
196 196
         if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) {
197 197
             $form->display();
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
             $data[$key] = $val['value'];
217 217
         }
218 218
 
219
-        $data['event_id']    = 0;
220
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
219
+        $data['event_id'] = 0;
220
+        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
221 221
 
222 222
         $newEvent = $eventHandler->create();
223 223
         $newEvent->setVars($data);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
         if (isset($_POST['confirm'])) {
235 235
             if (!$GLOBALS['xoopsSecurity']->check()) {
236
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
236
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237 237
             }
238 238
             //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
239 239
             //             $eventHandler->deleteEvent($_POST['event_id']);
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         if (isset($_POST['deleteSelection'][0])) {
299 299
         } else {
300 300
             if (!$GLOBALS['xoopsSecurity']->check()) {
301
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
301
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
302 302
             }
303 303
 
304 304
             deleteEvents($_POST['event_ids']);
@@ -330,32 +330,32 @@  discard block
 block discarded – undo
330 330
         $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']);
331 331
         $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
332 332
 
333
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
334
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
333
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
334
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
335 335
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
336 336
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
337 337
 
338
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
339
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
338
+        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
339
+        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
340 340
 
341 341
         echo '</fieldset><br>';
342 342
 
343
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
343
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
344 344
 
345 345
         echo '<form method="POST" action="event.php">';
346 346
         echo '<input type="hidden" name="op" value="deleteSelection">';
347 347
 
348 348
         echo '<table class="outer" style="width:100%;">';
349 349
         echo '<tr style="text-align:center;">';
350
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
350
+        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
351 351
         echo '<th>#</th>';
352
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
353
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
354
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
355
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
352
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
353
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
354
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
355
+        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
356
+        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
357
+        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
358
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
359 359
 
360 360
         echo '</tr>';
361 361
 
@@ -363,15 +363,15 @@  discard block
 block discarded – undo
363 363
             $i = 0;
364 364
             foreach ($events as $event) {
365 365
                 $class = (++$i % 2 == 0) ? 'even' : 'odd';
366
-                echo '<tr style="text-align:left;" class="' . $class . '">';
366
+                echo '<tr style="text-align:left;" class="'.$class.'">';
367 367
                 echo "<td width='10%' align='center'>";
368 368
                 echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
369 369
                 echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
370 370
                 echo '</td>';
371
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
372
-                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>';
371
+                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
372
+                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>';
373 373
 
374
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
374
+                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
375 375
 
376 376
                 //                 if ($event['event_isrecur']) {
377 377
                 //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
@@ -379,18 +379,18 @@  discard block
 block discarded – undo
379 379
                 //                     echo '<td>' . $event['formated_event_start'] . '</td>';
380 380
                 //                 }
381 381
 
382
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
383
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
384
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
382
+                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
383
+                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
384
+                echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
385 385
                 if (!isset($event['formated_reccur_rule'])) {
386 386
                     $event['formated_reccur_rule'] = '';
387 387
                 }
388
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
388
+                echo '<td>'.$event['formated_reccur_rule'].'</td>';
389 389
 
390 390
                 echo '<td style="width:10%; text-align:center;">';
391
-                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;";
392
-                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;";
393
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
391
+                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;";
392
+                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;";
393
+                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>";
394 394
                 echo '</td>';
395 395
 
396 396
                 echo '</tr>';
@@ -404,13 +404,13 @@  discard block
 block discarded – undo
404 404
 
405 405
             echo '<td colspan="2" style="text-align: right;">';
406 406
 
407
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
408
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
407
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
408
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
409 409
 
410 410
             echo '</td>';
411 411
             echo '</tr>';
412 412
         } else {
413
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
413
+            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
414 414
         }
415 415
         echo '</table>';
416 416
         echo '</form>';
@@ -418,14 +418,14 @@  discard block
 block discarded – undo
418 418
         echo '</fieldset>';
419 419
         echo '</fieldset><br><br>';
420 420
         //Fin de la liste des evennement -------------------------------------
421
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
421
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
422 422
 
423 423
         $form = $eventHandler->getEventForm('admin');
424 424
         $form->display();
425 425
 
426 426
         echo '</fieldset>';
427 427
 
428
-        require_once __DIR__ . '/admin_footer.php';
428
+        require_once __DIR__.'/admin_footer.php';
429 429
 
430 430
         break;
431 431
 }
Please login to merge, or discard this patch.
admin/menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,33 +35,33 @@
 block discarded – undo
35 35
 $adminmenu[] = [
36 36
     'title' => _AM_MODULEADMIN_HOME,
37 37
     'link'  => 'admin/index.php',
38
-    'icon'  => $pathIcon32 . '/home.png'
38
+    'icon'  => $pathIcon32.'/home.png'
39 39
 ];
40 40
 
41 41
 $adminmenu[] = [
42 42
     'title' => _MI_EXTCAL_CATEGORY,
43 43
     'link'  => 'admin/cat.php',
44
-    'icon'  => $pathIcon32 . '/category.png'
44
+    'icon'  => $pathIcon32.'/category.png'
45 45
 ];
46 46
 
47 47
 $adminmenu[] = [
48 48
     'title' => _MI_EXTCAL_EVENT,
49 49
     'link'  => 'admin/event.php',
50
-    'icon'  => $pathIcon32 . '/event.png'
50
+    'icon'  => $pathIcon32.'/event.png'
51 51
 ];
52 52
 $adminmenu[] = [
53 53
     'title' => _MI_EXTCAL_ETABLISSEMENTS,
54 54
     'link'  => 'admin/etablissement.php',
55
-    'icon'  => $pathModIcon32 . '/etablissement.png'
55
+    'icon'  => $pathModIcon32.'/etablissement.png'
56 56
 ];
57 57
 $adminmenu[] = [
58 58
     'title' => _MI_EXTCAL_PERMISSIONS,
59 59
     'link'  => 'admin/permissions.php',
60
-    'icon'  => $pathIcon32 . '/permissions.png'
60
+    'icon'  => $pathIcon32.'/permissions.png'
61 61
 ];
62 62
 
63 63
 $adminmenu[] = [
64 64
     'title' => _AM_MODULEADMIN_ABOUT,
65 65
     'link'  => 'admin/about.php',
66
-    'icon'  => $pathIcon32 . '/about.png'
66
+    'icon'  => $pathIcon32.'/about.png'
67 67
 ];
Please login to merge, or discard this patch.
admin/upgrade.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
     $step = $_POST['step'];
6 6
 }
7 7
 
8
-require_once __DIR__ . '/../../../include/cp_header.php';
9
-include __DIR__ . '/function.php';
8
+require_once __DIR__.'/../../../include/cp_header.php';
9
+include __DIR__.'/function.php';
10 10
 
11 11
 // Change this variable if you use a cloned version of eXtGallery
12 12
 $localModuleDir = 'extcal';
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 $downloadServer = 'http://downloads.sourceforge.net/zoullou/';
17 17
 
18 18
 $lastVersion       = @file_get_contents($versionFile);
19
-$lastVersionString = substr($lastVersion, 0, 1) . '.' . substr($lastVersion, 1, 1) . '.' . substr($lastVersion, 2, 1);
20
-$moduleFileName    = $moduleName . '-' . $lastVersionString . '.tar.gz';
21
-$langFileName      = $moduleName . '-lang-' . $lastVersionString . '_' . $xoopsConfig['language'] . '.tar.gz';
19
+$lastVersionString = substr($lastVersion, 0, 1).'.'.substr($lastVersion, 1, 1).'.'.substr($lastVersion, 2, 1);
20
+$moduleFileName    = $moduleName.'-'.$lastVersionString.'.tar.gz';
21
+$langFileName      = $moduleName.'-lang-'.$lastVersionString.'_'.$xoopsConfig['language'].'.tar.gz';
22 22
 
23 23
 switch ($step) {
24 24
     case 'download':
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
             break;
31 31
         }
32 32
 
33
-        if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) {
33
+        if (!$handle = @fopen($downloadServer.$moduleFileName, 'r')) {
34 34
             printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName);
35 35
             xoops_cp_footer();
36 36
             break;
37 37
         }
38
-        $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+');
38
+        $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, 'w+');
39 39
 
40 40
         // Downlad module archive
41 41
         if ($handle) {
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
         // English file are included on module package
51 51
         if ($xoopsConfig['language'] !== 'english') {
52
-            if (!$handle = @fopen($downloadServer . $langFileName, 'r')) {
52
+            if (!$handle = @fopen($downloadServer.$langFileName, 'r')) {
53 53
                 printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName);
54 54
             } else {
55
-                $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+');
55
+                $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, 'w+');
56 56
                 // Download language archive
57 57
                 if ($handle) {
58 58
                     while (!feof($handle)) {
@@ -75,35 +75,35 @@  discard block
 block discarded – undo
75 75
         xoops_cp_header();
76 76
         adminMenu();
77 77
 
78
-        if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) {
78
+        if (!file_exists(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName)) {
79 79
             echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT;
80 80
             xoops_cp_footer();
81 81
 
82 82
             break;
83 83
         }
84 84
 
85
-        $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class';
86
-        include __DIR__ . '/../class/pcltar.lib.php';
85
+        $gPcltarLibDir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class';
86
+        include __DIR__.'/../class/pcltar.lib.php';
87 87
 
88 88
         //TrOn(5);
89 89
 
90 90
         // Extract module files
91
-        PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/');
91
+        PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/');
92 92
         // Delete downloaded module's files
93
-        unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName);
93
+        unlink(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName);
94 94
 
95
-        if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) {
95
+        if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$langFileName)) {
96 96
             // Extract language files
97
-            PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/');
97
+            PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/');
98 98
             // Delete downloaded module's files
99
-            unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName);
99
+            unlink(XOOPS_ROOT_PATH.'/uploads/'.$langFileName);
100 100
         }
101 101
 
102 102
         // Delete template_c file
103
-        if ($handle = opendir(XOOPS_ROOT_PATH . '/templates_c')) {
103
+        if ($handle = opendir(XOOPS_ROOT_PATH.'/templates_c')) {
104 104
             while (false !== ($file = readdir($handle))) {
105 105
                 if ($file !== '.' && $file !== '..' && $file !== 'index.html') {
106
-                    unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file);
106
+                    unlink(XOOPS_ROOT_PATH.'/templates_c/'.$file);
107 107
                 }
108 108
             }
109 109
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         }
112 112
         //TrDisplay();
113 113
 
114
-        xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE);
114
+        xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL.'/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE);
115 115
 
116 116
         xoops_cp_footer();
117 117
 
Please login to merge, or discard this patch.
admin/main.php 2 patches
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 switch ($op) {
36
-    case 'notification':
37
-        switch ($fct) {
36
+        case 'notification':
37
+            switch ($fct) {
38 38
             case 'send':
39 39
                 if (!$GLOBALS['xoopsSecurity']->check()) {
40 40
                     redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
@@ -130,78 +130,78 @@  discard block
 block discarded – undo
130 130
                 xoops_cp_footer();
131 131
 
132 132
                 break;
133
-        }
133
+            }
134 134
         break;
135 135
 
136
-    default:
137
-    case 'default':
138
-        // @author      Gregory Mage (Aka Mage)
139
-        //***************************************************************************************
140
-        xoops_cp_header();
141
-        //        require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
142
-        //        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
143
-        //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
144
-        $adminObject = \Xmf\Module\Admin::getInstance();
145
-        $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
146
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green');
147
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
149
-        $criteriaCompo = new CriteriaCompo();
150
-        $criteriaCompo->add(new Criteria('event_approved', 1));
151
-        $criteriaCompo->add(new Criteria('event_start', time(), '>='));
152
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green');
153
-
154
-        $adminObject->addConfigBoxLine();
155
-        $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
156
-        $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
157
-
158
-        //JJD
159
-        //         $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
160
-
161
-        //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
162
-        //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
163
-        $adminObject->displayNavigation(basename(__FILE__));
164
-        $adminObject->displayIndex();
165
-        //***************************************************************************************
166
-        $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
167
-        $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
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>';
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>';
174
-        echo '</fieldset><br>';
175
-
176
-        echo '<table class="outer" style="width:100%;">';
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>';
182
-        echo '</tr>';
183
-
184
-        if (count($pendingEvent) > 0) {
185
-            $i = 0;
186
-            foreach ($pendingEvent as $event) {
187
-                $class = (++$i % 2 == 0) ? '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>';
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>';
195
-                echo '</td>';
196
-                echo '</tr>';
136
+        default:
137
+        case 'default':
138
+            // @author      Gregory Mage (Aka Mage)
139
+            //***************************************************************************************
140
+            xoops_cp_header();
141
+            //        require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
142
+            //        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
143
+            //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
144
+            $adminObject = \Xmf\Module\Admin::getInstance();
145
+            $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
146
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green');
147
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
149
+            $criteriaCompo = new CriteriaCompo();
150
+            $criteriaCompo->add(new Criteria('event_approved', 1));
151
+            $criteriaCompo->add(new Criteria('event_start', time(), '>='));
152
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green');
153
+
154
+            $adminObject->addConfigBoxLine();
155
+            $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
156
+            $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
157
+
158
+            //JJD
159
+            //         $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
160
+
161
+            //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
162
+            //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
163
+            $adminObject->displayNavigation(basename(__FILE__));
164
+            $adminObject->displayIndex();
165
+            //***************************************************************************************
166
+            $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
167
+            $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
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>';
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>';
174
+            echo '</fieldset><br>';
175
+
176
+            echo '<table class="outer" style="width:100%;">';
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>';
182
+            echo '</tr>';
183
+
184
+            if (count($pendingEvent) > 0) {
185
+                $i = 0;
186
+                foreach ($pendingEvent as $event) {
187
+                    $class = (++$i % 2 == 0) ? '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>';
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>';
195
+                    echo '</td>';
196
+                    echo '</tr>';
197
+                }
198
+            } else {
199
+                echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
197 200
             }
198
-        } else {
199
-            echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
200
-        }
201 201
 
202
-        echo '</table></fieldset><br>';
202
+            echo '</table></fieldset><br>';
203 203
 
204
-        require_once __DIR__ . '/admin_footer.php';
204
+            require_once __DIR__ . '/admin_footer.php';
205 205
 
206
-        break;
206
+            break;
207 207
 }
Please login to merge, or discard this 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(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green');
147
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
146
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount(), 'Green');
147
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<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(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green');
152
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<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 = (++$i % 2 == 0) ? '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.
admin/etablissement.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,10 +155,10 @@
 block discarded – undo
155 155
             }
156 156
         } else {
157 157
             xoops_confirm([
158
-                              'ok'               => 1,
159
-                              'etablissement_id' => $_REQUEST['etablissement_id'],
160
-                              'op'               => 'delete_etablissement',
161
-                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
158
+                                'ok'               => 1,
159
+                                'etablissement_id' => $_REQUEST['etablissement_id'],
160
+                                'op'               => 'delete_etablissement',
161
+                            ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
162 162
         }
163 163
         break;
164 164
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // Include xoops admin header
21
-require_once __DIR__ . '/../../../include/cp_header.php';
22
-require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/../../../kernel/module.php';
24
-require_once __DIR__ . '/../../../class/xoopsformloader.php';
25
-require_once __DIR__ . '/../../../class/tree.php';
26
-require_once __DIR__ . '/../../../class/xoopslists.php';
27
-require_once __DIR__ . '/../../../class/pagenav.php';
28
-require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php';
29
-require_once __DIR__ . '/../../../class/uploader.php';
30
-require_once __DIR__ . '/../class/etablissement.php';
31
-require_once __DIR__ . '/../include/constantes.php';
32
-
33
-require_once __DIR__ . '/admin_header.php';
21
+require_once __DIR__.'/../../../include/cp_header.php';
22
+require_once __DIR__.'/../class/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/../../../kernel/module.php';
24
+require_once __DIR__.'/../../../class/xoopsformloader.php';
25
+require_once __DIR__.'/../../../class/tree.php';
26
+require_once __DIR__.'/../../../class/xoopslists.php';
27
+require_once __DIR__.'/../../../class/pagenav.php';
28
+require_once __DIR__.'/../../../class/xoopsform/grouppermform.php';
29
+require_once __DIR__.'/../../../class/uploader.php';
30
+require_once __DIR__.'/../class/etablissement.php';
31
+require_once __DIR__.'/../include/constantes.php';
32
+
33
+require_once __DIR__.'/admin_header.php';
34 34
 
35 35
 //include_once("functions.php");
36 36
 //include_once("../include/functions.php");
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 if ($xoopsUser) {
39 39
     $xoopsModule = XoopsModule::getByDirname('extcal');
40 40
     if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
41
-        redirect_header(XOOPS_URL . '/', 3, _NOPERM);
41
+        redirect_header(XOOPS_URL.'/', 3, _NOPERM);
42 42
     }
43 43
 } else {
44
-    redirect_header(XOOPS_URL . '/', 3, _NOPERM);
44
+    redirect_header(XOOPS_URL.'/', 3, _NOPERM);
45 45
 }
46 46
 
47 47
 // Include language file
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $etablissement_arr = $etablissementHandler->getObjects($criteria);
99 99
         $numrows           = $etablissementHandler->getCount($criteria);
100 100
         if ($numrows > $limit) {
101
-            $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit);
101
+            $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit);
102 102
             $pagenav = $pagenav->renderNav(4);
103 103
         } else {
104 104
             $pagenav = '';
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         if ($numrows > 0) {
108 108
             echo '<table width="100%" cellspacing="1" class="outer">';
109 109
             echo '<tr>';
110
-            echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>';
111
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>';
112
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>';
113
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>';
114
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>';
110
+            echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>';
111
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>';
112
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>';
113
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>';
114
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>';
115 115
             echo '</tr>';
116 116
             $class = 'odd';
117 117
             foreach (array_keys($etablissement_arr) as $i) {
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
                 $etablissement_adresse   = $etablissement_arr[$i]->getVar('adresse');
122 122
                 $etablissement_city      = $etablissement_arr[$i]->getVar('ville');
123 123
                 $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe');
124
-                echo '<tr class="' . $class . '">';
125
-                echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>';
124
+                echo '<tr class="'.$class.'">';
125
+                echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>';
126 126
 
127
-                echo '<td align="center"><b>' . $etablissement_adresse . '</td>';
128
-                echo '<td align="center"><b>' . $etablissement_city . '</td>';
129
-                echo '<td align="center"><b>' . $etablissement_telephone . '</td>';
127
+                echo '<td align="center"><b>'.$etablissement_adresse.'</td>';
128
+                echo '<td align="center"><b>'.$etablissement_city.'</td>';
129
+                echo '<td align="center"><b>'.$etablissement_telephone.'</td>';
130 130
                 echo '<td align="center" width="15%">';
131
-                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> ';
132
-                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> ';
131
+                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> ';
132
+                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> ';
133 133
                 echo '</td>';
134 134
             }
135 135
             echo '</table><br>';
136
-            echo '<br><div align=right>' . $pagenav . '</div><br>';
136
+            echo '<br><div align=right>'.$pagenav.'</div><br>';
137 137
         } else {
138
-            echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>';
138
+            echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>';
139 139
         }
140 140
 
141 141
         // Affichage du formulaire
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                               'ok'               => 1,
159 159
                               'etablissement_id' => $_REQUEST['etablissement_id'],
160 160
                               'op'               => 'delete_etablissement',
161
-                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
161
+                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>');
162 162
         }
163 163
         break;
164 164
 
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
         $obj->setVar('map', $_REQUEST['map']);
201 201
 
202 202
         //Logo
203
-        $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/';
204
-        $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/';
203
+        $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/';
204
+        $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/';
205 205
 
206 206
         $delimg = @$_REQUEST['delimg'];
207
-        $delimg = isset($delimg) ? (int)$delimg : 0;
207
+        $delimg = isset($delimg) ? (int) $delimg : 0;
208 208
         if ($delimg == 0 && !empty($_REQUEST['xoops_upload_file'][0])) {
209 209
             $upload = new XoopsMediaUploader($uploaddir_etablissement, [
210 210
                 'image/gif',
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             }
228 228
         } else {
229 229
             $logo              = '';
230
-            $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file'];
230
+            $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file'];
231 231
             if (is_file($url_etablissement)) {
232 232
                 chmod($url_etablissement, 0777);
233 233
                 unlink($url_etablissement);
@@ -247,4 +247,4 @@  discard block
 block discarded – undo
247 247
         break;
248 248
 }
249 249
 
250
-require_once __DIR__ . '/admin_footer.php';
250
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
view_year.php 1 patch
Spacing   +11 added lines, -11 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
 $params                                  = ['view' => _EXTCAL_NAV_YEAR, 'file' => _EXTCAL_FILE_YEAR];
23 23
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
24
-require_once __DIR__ . '/header.php';
24
+require_once __DIR__.'/header.php';
25 25
 
26 26
 /* ========================================================================== */
27
-$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
28
-$cat  = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
27
+$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
28
+$cat  = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
29 29
 
30 30
 // Getting eXtCal object's handler
31 31
 $catHandler   = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     'cat'          => $cat,
55 55
     'externalKeys' => 'cat_id',
56 56
 ];
57
-$events   = $eventHandler->getEventsOnPeriode($criteres);
57
+$events = $eventHandler->getEventsOnPeriode($criteres);
58 58
 /**********************************************************************/
59 59
 $eventsArray = $events;
60 60
 // Formating date
@@ -98,21 +98,21 @@  discard block
 block discarded – undo
98 98
 // Making navig data
99 99
 $navig = [
100 100
     'prev' => [
101
-        'uri'  => 'year=' . $prevYear,
101
+        'uri'  => 'year='.$prevYear,
102 102
         'name' => $prevYear,
103 103
     ],
104 104
     'this' => [
105
-        'uri'  => 'year=' . $year,
105
+        'uri'  => 'year='.$year,
106 106
         'name' => $year,
107 107
     ],
108 108
     'next' => [
109
-        'uri'  => 'year=' . $nexYear,
109
+        'uri'  => 'year='.$nexYear,
110 110
         'name' => $nexYear,
111 111
     ],
112 112
 ];
113 113
 
114 114
 // Title of the page
115
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
115
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
116 116
 
117 117
 // Assigning navig data to the template
118 118
 $xoopsTpl->assign('navig', $navig);
@@ -166,4 +166,4 @@  discard block
 block discarded – undo
166 166
 $xoopsTpl->assign('lang', $lang);
167 167
 $xoopsTpl->assign('view', 'year');
168 168
 
169
-include XOOPS_ROOT_PATH . '/footer.php';
169
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined');
21
-require_once __DIR__ . '/include/constantes.php';
22
-require_once __DIR__ . '/include/agenda_fnc.php';
23
-require_once __DIR__ . '/class/config.php';
21
+require_once __DIR__.'/include/constantes.php';
22
+require_once __DIR__.'/include/agenda_fnc.php';
23
+require_once __DIR__.'/class/config.php';
24 24
 //$loc_de = setlocale (LC_ALL, 'french');
25 25
 
26 26
 //echo "local :" .  setlocale(LC_TIME, $xoopsConfig['language'])."</ br>";
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 
93 93
 // Tables created by sql file (without prefix!)
94 94
 $modversion['tables'] = [
95
-    $moduleDirName . '_' . 'cat',
96
-    $moduleDirName . '_' . 'event',
97
-    $moduleDirName . '_' . 'eventmember',
98
-    $moduleDirName . '_' . 'eventnotmember',
99
-    $moduleDirName . '_' . 'file',
100
-    $moduleDirName . '_' . 'etablissement'
95
+    $moduleDirName.'_'.'cat',
96
+    $moduleDirName.'_'.'event',
97
+    $moduleDirName.'_'.'eventmember',
98
+    $moduleDirName.'_'.'eventnotmember',
99
+    $moduleDirName.'_'.'file',
100
+    $moduleDirName.'_'.'etablissement'
101 101
 ];
102 102
 
103 103
 // SQL
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 $modversion['config'][$i]['default']     = 5;
510 510
 
511 511
 ++$i;
512
-$modversion['config'][$i]['name']        = 'break' . $i;
512
+$modversion['config'][$i]['name']        = 'break'.$i;
513 513
 $modversion['config'][$i]['title']       = '_MI_EXTCAL_SHOW_OTHEROPTIONS';
514 514
 $modversion['config'][$i]['description'] = '';
515 515
 $modversion['config'][$i]['formtype']    = 'line_break';
Please login to merge, or discard this patch.
view_day.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -17,17 +17,17 @@  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
 $params                                  = ['view' => _EXTCAL_NAV_DAY, 'file' => _EXTCAL_FILE_DAY];
23 23
 $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
24
-require_once __DIR__ . '/header.php';
24
+require_once __DIR__.'/header.php';
25 25
 
26 26
 /* ========================================================================== */
27
-$year  = isset($_GET['year']) ? (int)$_GET['year'] : date('Y');
28
-$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n');
29
-$day   = isset($_GET['day']) ? (int)$_GET['day'] : date('j');
30
-$cat   = isset($_GET['cat']) ? (int)$_GET['cat'] : 0;
27
+$year  = isset($_GET['year']) ? (int) $_GET['year'] : date('Y');
28
+$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n');
29
+$day   = isset($_GET['day']) ? (int) $_GET['day'] : date('j');
30
+$cat   = isset($_GET['cat']) ? (int) $_GET['cat'] : 0;
31 31
 /* ========================================================================== */
32 32
 
33 33
 $form = new XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get');
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     'cat'          => $cat,
52 52
     'externalKeys' => 'cat_id',
53 53
 ];
54
-$events   = $eventHandler->getEventsOnPeriode($criteres);
54
+$events = $eventHandler->getEventsOnPeriode($criteres);
55 55
 /**********************************************************************/
56 56
 $eventsArray = $events;
57 57
 
@@ -97,21 +97,21 @@  discard block
 block discarded – undo
97 97
 
98 98
 $navig = [
99 99
     'prev' => [
100
-        'uri'  => 'year=' . $pDayCalObj->thisYear() . '&amp;month=' . $pDayCalObj->thisMonth() . '&amp;day=' . $pDayCalObj->thisDay(),
100
+        'uri'  => 'year='.$pDayCalObj->thisYear().'&amp;month='.$pDayCalObj->thisMonth().'&amp;day='.$pDayCalObj->thisDay(),
101 101
         'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()),
102 102
     ],
103 103
     'this' => [
104
-        'uri'  => 'year=' . $dayCalObj->thisYear() . '&amp;month=' . $dayCalObj->thisMonth() . '&amp;day=' . $dayCalObj->thisDay(),
104
+        'uri'  => 'year='.$dayCalObj->thisYear().'&amp;month='.$dayCalObj->thisMonth().'&amp;day='.$dayCalObj->thisDay(),
105 105
         'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()),
106 106
     ],
107 107
     'next' => [
108
-        'uri'  => 'year=' . $nDayCalObj->thisYear() . '&amp;month=' . $nDayCalObj->thisMonth() . '&amp;day=' . $nDayCalObj->thisDay(),
108
+        'uri'  => 'year='.$nDayCalObj->thisYear().'&amp;month='.$nDayCalObj->thisMonth().'&amp;day='.$nDayCalObj->thisDay(),
109 109
         'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()),
110 110
     ],
111 111
 ];
112 112
 
113 113
 // Title of the page
114
-$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']);
114
+$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']);
115 115
 
116 116
 // Assigning navig data to the template
117 117
 $xoopsTpl->assign('navig', $navig);
@@ -170,4 +170,4 @@  discard block
 block discarded – undo
170 170
 $xoopsTpl->assign('lang', $lang);
171 171
 $xoopsTpl->assign('view', 'day');
172 172
 
173
-include XOOPS_ROOT_PATH . '/footer.php';
173
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
rss.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
4
-require_once __DIR__ . '/include/constantes.php';
5
-require_once __DIR__ . '/header.php';
3
+include __DIR__.'/../../mainfile.php';
4
+require_once __DIR__.'/include/constantes.php';
5
+require_once __DIR__.'/header.php';
6 6
 
7
-require_once XOOPS_ROOT_PATH . '/class/template.php';
7
+require_once XOOPS_ROOT_PATH.'/class/template.php';
8 8
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
9 9
 if (!isset($_GET['cat'])) {
10 10
     $cat = 0;
11 11
 } else {
12
-    $cat = (int)$_GET['cat'];
12
+    $cat = (int) $_GET['cat'];
13 13
 }
14 14
 if (function_exists('mb_http_output')) {
15 15
     mb_http_output('pass');
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     $events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat);
23 23
     if (is_array($events)) {
24 24
         $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
25
-        $tpl->assign('channel_link', XOOPS_URL . '/');
25
+        $tpl->assign('channel_link', XOOPS_URL.'/');
26 26
         $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
27 27
         $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
28 28
         $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
         $tpl->assign('channel_category', 'Event');
31 31
         $tpl->assign('channel_generator', 'XOOPS');
32 32
         $tpl->assign('channel_language', _LANGCODE);
33
-        $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png');
33
+        $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png');
34 34
         $tpl->assign('image_width', 92);
35 35
         $tpl->assign('image_height', 52);
36 36
         foreach ($events as $event) {
37 37
             $tpl->append('items', [
38 38
                 'title'       => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)),
39
-                'link'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
40
-                'guid'        => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
39
+                'link'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
40
+                'guid'        => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
41 41
                 'pubdate'     => formatTimestamp($event->getVar('event_start'), 'rss'),
42 42
                 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)),
43 43
             ]);
Please login to merge, or discard this patch.