Completed
Push — master ( 26b490...31307f )
by Michael
03:13
created
class/etablissement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 //Kraven 30
21 21
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
22 22
 
23
-require_once XOOPS_ROOT_PATH . '/kernel/object.php';
23
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
24 24
 
25 25
 //class ExtcalEvent extends XoopsObject
26 26
 //class extcal_etablissement extends XoopsObject
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $title = $this->isNew() ? sprintf(_MD_EXTCAL_ETABLISSEMENT_ADD) : sprintf(_MD_EXTCAL_ETABLISSEMENT_EDIT);
72 72
 
73
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
73
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
74 74
 
75 75
         $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
76 76
         $form->setExtra('enctype="multipart/form-data"');
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40));
90 90
         $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40));
91 91
         //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_TARIFS, 'tarifs', $this->getVar("tarifs"), 5, 40));
92
-        $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS . ' ( ' . _MD_EXTCAL_DEVISE2 . ' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false);
92
+        $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS.' ( '._MD_EXTCAL_DEVISE2.' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false);
93 93
 
94 94
         //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', $this->getVar("map"), 5, 40));
95 95
         $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         //Logo
98 98
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
99 99
         if ('' != $this->getVar('logo')) {
100
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/etablissement/' . $this->getVar('logo') . "' name='image' id='image' alt=''><br><br>"));
100
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/etablissement/'.$this->getVar('logo')."' name='image' id='image' alt=''><br><br>"));
101 101
             $check_del_img = new XoopsFormCheckBox('', 'delimg');
102 102
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
103 103
             $file_tray->addElement($check_del_img);
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
         }
109 109
         $file_img->setExtra("size ='40'");
110 110
         $file_tray->addElement($file_img);
111
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(3145728 / 1000), 500, 500);
112
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
111
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (3145728 / 1000), 500, 500);
112
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
113 113
         $file_tray->addElement($file_label);
114 114
         $form->addElement($file_tray);
115 115
         $form->addElement(new XoopsFormHidden('file', $this->getVar('logo')));
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/8.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 $basePath = explode('/', $_SERVER['SCRIPT_NAME']);
16 16
 array_pop($basePath);
17 17
 $basePath = implode('/', $basePath);
18
-$url      = 'http://' . $_SERVER['SERVER_NAME'] . $basePath . '/7.php?wsdl';
18
+$url      = 'http://'.$_SERVER['SERVER_NAME'].$basePath.'/7.php?wsdl';
19 19
 
20 20
 if (!isset($_GET['y'])) {
21 21
     $_GET['y'] = date('Y');
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 
27 27
 $wsdl = new SOAP_WSDL($url);
28 28
 
29
-echo '<pre>' . $wsdl->generateProxyCode() . '</pre>';
29
+echo '<pre>'.$wsdl->generateProxyCode().'</pre>';
30 30
 
31 31
 $calendarClient = $wsdl->getProxy();
32 32
 
33
-$month = $calendarClient->getMonth((int)$_GET['y'], (int)$_GET['m']);
33
+$month = $calendarClient->getMonth((int) $_GET['y'], (int) $_GET['m']);
34 34
 
35 35
 if (PEAR::isError($month)) {
36 36
     die($month->toString());
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         if (1 === $day->isEmpty) {
63 63
             echo '<td></td>';
64 64
         } else {
65
-            echo '<td>' . $day->day . '</td>';
65
+            echo '<td>'.$day->day.'</td>';
66 66
         }
67 67
         if (1 === $day->isLast) {
68 68
             echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/Calendar.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         }
98 98
         if (!$engine) {
99 99
             if (!class_exists($class)) {
100
-                require_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php';
100
+                require_once CALENDAR_ROOT.'Engine'.'/'.CALENDAR_ENGINE.'.php';
101 101
             }
102 102
             $engine = new $class();
103 103
         }
@@ -209,13 +209,13 @@  discard block
 block discarded – undo
209 209
         if (!isset($cE)) {
210 210
             $cE = Calendar_Engine_Factory::getEngine();
211 211
         }
212
-        $this->cE     =& $cE;
213
-        $this->year   = (int)$y;
214
-        $this->month  = (int)$m;
215
-        $this->day    = (int)$d;
216
-        $this->hour   = (int)$h;
217
-        $this->minute = (int)$i;
218
-        $this->second = (int)$s;
212
+        $this->cE     = & $cE;
213
+        $this->year   = (int) $y;
214
+        $this->month  = (int) $m;
215
+        $this->day    = (int) $d;
216
+        $this->hour   = (int) $h;
217
+        $this->minute = (int) $i;
218
+        $this->second = (int) $s;
219 219
     }
220 220
 
221 221
     /**
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                 return $this->toArray($stamp);
332 332
                 break;
333 333
             case 'object':
334
-                require_once CALENDAR_ROOT . 'Factory.php';
334
+                require_once CALENDAR_ROOT.'Factory.php';
335 335
 
336 336
                 return Calendar_Factory::createByTimestamp($returnType, $stamp);
337 337
                 break;
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
      */
354 354
     public function build($sDates = [])
355 355
     {
356
-        require_once __DIR__ . '/PEAR.php';
356
+        require_once __DIR__.'/PEAR.php';
357 357
         PEAR::raiseError('Calendar::build is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::build()');
358 358
 
359 359
         return false;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
      */
370 370
     public function setSelection($sDates)
371 371
     {
372
-        require_once __DIR__ . '/PEAR.php';
372
+        require_once __DIR__.'/PEAR.php';
373 373
         PEAR::raiseError('Calendar::setSelection is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::setSelection()');
374 374
 
375 375
         return false;
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     public function &getValidator()
437 437
     {
438 438
         if (!isset($this->validator)) {
439
-            require_once CALENDAR_ROOT . 'Validator.php';
439
+            require_once CALENDAR_ROOT.'Validator.php';
440 440
             $this->validator = new Calendar_Validator($this);
441 441
         }
442 442
 
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     {
471 471
         if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) {
472 472
             if ((CALENDAR_FIRST_DAY_OF_WEEK != $firstDay) && !is_null($firstDay)) {
473
-                $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.' . ' The $firstDay parameter will be ignored.';
473
+                $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'.' The $firstDay parameter will be ignored.';
474 474
                 trigger_error($msg, E_USER_WARNING);
475 475
             }
476 476
 
Please login to merge, or discard this patch.
event_notmember.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
         if ('add' === $_POST['mode']) {
35 35
             $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser);
36 36
             $eventNotMemberHandler->createEventNotMember([
37
-                                                             'event_id' => (int)$_POST['event'],
38
-                                                             'uid'      => $xoopsUser->getVar('uid'),
39
-                                                         ]);
37
+                                                                'event_id' => (int)$_POST['event'],
38
+                                                                'uid'      => $xoopsUser->getVar('uid'),
39
+                                                            ]);
40 40
             sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3);
41 41
             $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_ADDED_TO_EVENT;
42 42
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include __DIR__ . '/../../mainfile.php';
3
+include __DIR__.'/../../mainfile.php';
4 4
 
5
-require_once __DIR__ . '/include/constantes.php';
6
-require_once __DIR__ . '/include/mail_fnc.php';
7
-require_once __DIR__ . '/class/utility.php';
5
+require_once __DIR__.'/include/constantes.php';
6
+require_once __DIR__.'/include/mail_fnc.php';
7
+require_once __DIR__.'/class/utility.php';
8 8
 
9 9
 /*
10 10
 ext_echoArray($_POST);
@@ -21,20 +21,20 @@  discard block
 block discarded – undo
21 21
 $member_uid = $xoopsUser->getVar('uid');
22 22
 
23 23
 if (!$GLOBALS['xoopsSecurity']->check()) {
24
-    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
24
+    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
25 25
 }
26 26
 
27 27
 if ($xoopsUser && $xoopsModuleConfig['whosnot_going']) {
28 28
     // If param are right
29
-    if ((int)$_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) {
29
+    if ((int) $_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) {
30 30
         $eventHandler          = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
31 31
         $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE);
32 32
 
33 33
         // If the user have to be added
34 34
         if ('add' === $_POST['mode']) {
35
-            $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser);
35
+            $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser);
36 36
             $eventNotMemberHandler->createEventNotMember([
37
-                                                             'event_id' => (int)$_POST['event'],
37
+                                                             'event_id' => (int) $_POST['event'],
38 38
                                                              'uid'      => $xoopsUser->getVar('uid'),
39 39
                                                          ]);
40 40
             sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
             // If the user have to be remove
44 44
         } else {
45 45
             if ('remove' === $_POST['mode']) {
46
-                $eventNotMemberHandler->deleteEventNotMember([(int)$_POST['event'], $xoopsUser->getVar('uid')]);
46
+                $eventNotMemberHandler->deleteEventNotMember([(int) $_POST['event'], $xoopsUser->getVar('uid')]);
47 47
                 sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_4, _MD_EXTCAL_MSG_4);
48 48
                 $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_REMOVED_TO_EVENT;
49 49
             }
50 50
         }
51
-        redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false);
51
+        redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false);
52 52
     } else {
53 53
         redirect_header('index.php', 3, _NOPERM, false);
54 54
     }
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 ('english' !== $xoopsConfig['language']) {
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 && 'index.html' !== $file) {
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/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 = (('clone' === $op) ? '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 = (('clone' === $op) ? '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 = (0 == ++$i % 2) ? '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">' . ((1 == $event['event_isrecur']) ? _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 = (0 == ++$i % 2) ? '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">' . ((1 == $event['event_isrecur']) ? _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 = (0 == ++$i % 2) ? '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">' . ((1 == $event['event_isrecur']) ? _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">'.((1 == $event['event_isrecur']) ? _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.
post.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,20 +17,20 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
20
+include __DIR__.'/../../mainfile.php';
21 21
 $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl';
22 22
 
23
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
24
-include __DIR__ . '/class/form/extcalform.php';
25
-include __DIR__ . '/class/perm.php';
23
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
24
+include __DIR__.'/class/form/extcalform.php';
25
+include __DIR__.'/class/perm.php';
26 26
 
27
-require_once __DIR__ . '/class/utility.php';
28
-require_once __DIR__ . '/include/constantes.php';
27
+require_once __DIR__.'/class/utility.php';
28
+require_once __DIR__.'/include/constantes.php';
29 29
 
30 30
 $permHandler = ExtcalPerm::getHandler();
31 31
 $xoopsUser   = $xoopsUser ?: null;
32 32
 
33
-if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) {
33
+if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) {
34 34
     redirect_header('index.php', 3);
35 35
 }
36 36
 
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
39 39
 
40 40
 if (isset($_POST['form_preview'])) {
41
-    include XOOPS_ROOT_PATH . '/header.php';
41
+    include XOOPS_ROOT_PATH.'/header.php';
42 42
 
43 43
     // Title of the page
44 44
     $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT);
45 45
 
46 46
     $data = [
47 47
         'event_title'        => $_POST['event_title'],
48
-        'cat_id'             => (int)$_POST['cat_id'],
48
+        'cat_id'             => (int) $_POST['cat_id'],
49 49
         'event_desc'         => $_POST['event_desc'],
50
-        'event_nbmember'     => (int)$_POST['event_nbmember'],
50
+        'event_nbmember'     => (int) $_POST['event_nbmember'],
51 51
         'event_contact'      => $_POST['event_contact'],
52 52
         'event_url'          => $_POST['event_url'],
53 53
         'event_email'        => $_POST['event_email'],
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
         'event_start'        => $_POST['event_start'],
57 57
         'have_end'           => $_POST['have_end'],
58 58
         'event_end'          => $_POST['event_end'],
59
-        'dohtml'             => (int)$xoopsModuleConfig['allow_html'],
59
+        'dohtml'             => (int) $xoopsModuleConfig['allow_html'],
60 60
         'event_price'        => $_POST['event_price'],
61 61
         'event_organisateur' => $_POST['event_organisateur'],
62 62
         'event_icone'        => $_POST['event_icone'],
63 63
     ];
64 64
 
65 65
     if (isset($_POST['event_id'])) {
66
-        $data['event_id'] = (int)$_POST['event_id'];
66
+        $data['event_id'] = (int) $_POST['event_id'];
67 67
     }
68 68
 
69 69
     // Creating tempory event object to apply Object data filtering
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     //     // Assigning language data to the template
83 83
     //     $xoopsTpl->assign('lang', $lang);
84 84
 
85
-    $event['cat_id']   = (int)$_POST['cat_id'];
85
+    $event['cat_id']   = (int) $_POST['cat_id'];
86 86
     $event['have_end'] = $_POST['have_end'];
87 87
 
88 88
     // Display the submit form
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     $xoopsTpl->assign('preview', true);
92 92
     $xoopsTpl->assign('formBody', $formBody);
93 93
 
94
-    include XOOPS_ROOT_PATH . '/footer.php';
94
+    include XOOPS_ROOT_PATH.'/footer.php';
95 95
 } elseif (isset($_POST['form_submit'])) {
96 96
     if (!isset($_POST['rrule_weekly_interval'])) {
97 97
         $_POST['rrule_weekly_interval'] = 0;
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
     ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
116 116
     ///////////////////////////////////////////////////////////////////////////////
117 117
 
118
-    require_once __DIR__ . '/class/perm.php';
118
+    require_once __DIR__.'/class/perm.php';
119 119
 
120 120
     $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
121 121
     $permHandler = ExtcalPerm::getHandler();
122
-    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']);
122
+    $approve     = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']);
123 123
 
124 124
     $data = [
125 125
         'event_title'         => $_POST['event_title'],
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
     ];
146 146
 
147 147
     if (isset($_POST['event_id'])) {
148
-        $eventHandler->modifyEvent((int)$_POST['event_id'], $data);
149
-        $fileHandler->updateEventFile((int)$_POST['event_id']);
150
-        $fileHandler->createFile((int)$_POST['event_id']);
148
+        $eventHandler->modifyEvent((int) $_POST['event_id'], $data);
149
+        $fileHandler->updateEventFile((int) $_POST['event_id']);
150
+        $fileHandler->createFile((int) $_POST['event_id']);
151 151
 
152
-        redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
152
+        redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false);
153 153
     } else {
154 154
         $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
155 155
         $data['event_submitdate'] = time();
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
         $notificationHandler->triggerEvent('global', 0, $notifyEvent, ['EVENT_TITLE' => $_POST['event_title']]);
167 167
         if (1 == $approve) {
168 168
             $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
169
-            $cat        = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all');
170
-            $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [
169
+            $cat        = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all');
170
+            $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [
171 171
                 'EVENT_TITLE' => $_POST['event_title'],
172 172
                 'CAT_NAME'    => $cat->getVar('cat_name'),
173 173
             ]);
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-include __DIR__ . '/../../mainfile.php';
21
-require_once __DIR__ . '/include/constantes.php';
20
+include __DIR__.'/../../mainfile.php';
21
+require_once __DIR__.'/include/constantes.php';
22 22
 
23
-require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php';
23
+require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/calendar.php';
24 24
 
25 25
 if (!isset($_GET['event'])) {
26 26
     $eventId = 0;
27 27
 } else {
28
-    $eventId = (int)$_GET['event'];
28
+    $eventId = (int) $_GET['event'];
29 29
 }
30 30
 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
31 31
 $event        = $eventHandler->objectToArray($eventHandler->getEvent($eventId), ['cat_id']);
@@ -40,136 +40,136 @@  discard block
 block discarded – undo
40 40
 // Adding formated date for start and end event
41 41
 $eventHandler->formatEventDate($event, $xoopsModuleConfig['event_date_event']);
42 42
 
43
-echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
44
-echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
45
-echo '<head>' . "\n";
46
-echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n";
47
-echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n";
48
-echo '</head>' . "\n";
49
-echo '<body onload="window.print()">' . "\n";
50
-echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n";
51
-echo '<tr>' . "\n";
52
-echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n";
53
-echo $event['event_title'] . "\n";
54
-echo '</td>' . "\n";
55
-echo '</tr>' . "\n";
56
-echo '<tr>' . "\n";
57
-echo '<td style="width:50%; border:1px solid black;">' . "\n";
58
-echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n";
59
-echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n";
60
-echo '</td>' . "\n";
61
-echo '<td style="border:1px solid black;">' . "\n";
43
+echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
44
+echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
45
+echo '<head>'."\n";
46
+echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'">'."\n";
47
+echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n";
48
+echo '</head>'."\n";
49
+echo '<body onload="window.print()">'."\n";
50
+echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n";
51
+echo '<tr>'."\n";
52
+echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n";
53
+echo $event['event_title']."\n";
54
+echo '</td>'."\n";
55
+echo '</tr>'."\n";
56
+echo '<tr>'."\n";
57
+echo '<td style="width:50%; border:1px solid black;">'."\n";
58
+echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n";
59
+echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n";
60
+echo '</td>'."\n";
61
+echo '<td style="border:1px solid black;">'."\n";
62 62
 if (!$event['event_isrecur']) {
63
-    echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n";
64
-    echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n";
63
+    echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n";
64
+    echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n";
65 65
 } else {
66
-    echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n";
66
+    echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n";
67 67
 }
68
-echo '</td>' . "\n";
69
-echo '</tr>' . "\n";
68
+echo '</td>'."\n";
69
+echo '</tr>'."\n";
70 70
 
71
-echo '<tr>' . "\n";
71
+echo '<tr>'."\n";
72 72
 if ('' != $event['event_desc']) {
73
-    echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n";
73
+    echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n";
74 74
 }
75 75
 if ('' != $event['event_price']) {
76
-    echo '<td style="border:1px solid black;">' . _MD_EXTCAL_ETABLISSEMENT_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n";
76
+    echo '<td style="border:1px solid black;">'._MD_EXTCAL_ETABLISSEMENT_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n";
77 77
 }
78
-echo '</tr>' . "\n";
78
+echo '</tr>'."\n";
79 79
 
80 80
 //show contact info
81 81
 if ('' != $event['event_contact']) {
82
-    echo '<tr>' . "\n";
83
-    echo '<td style="border:1px solid black;">' . "\n";
84
-    echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n";
85
-    echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n";
86
-    echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n";
87
-    echo $event['event_address'] . '</span>' . "\n";
88
-    echo '</td>' . "\n";
89
-    echo '<td style="border:1px solid black;">' . "\n";
90
-    echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n";
91
-    echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n";
92
-    echo '</td>' . "\n";
93
-    echo '</tr>' . "\n";
82
+    echo '<tr>'."\n";
83
+    echo '<td style="border:1px solid black;">'."\n";
84
+    echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n";
85
+    echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n";
86
+    echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n";
87
+    echo $event['event_address'].'</span>'."\n";
88
+    echo '</td>'."\n";
89
+    echo '<td style="border:1px solid black;">'."\n";
90
+    echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n";
91
+    echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n";
92
+    echo '</td>'."\n";
93
+    echo '</tr>'."\n";
94 94
 }
95 95
 
96 96
 //show location
97 97
 if ($event['event_etablissement'] = 0) {
98
-    echo '<tr>' . "\n";
98
+    echo '<tr>'."\n";
99 99
 
100 100
     //    echo($location['nom']);
101 101
     //    var_dump($location);
102 102
     //    var_dump($event);
103 103
 
104
-    echo '<td style="border:1px solid black;">' . "\n";
105
-    echo '<b>' . _MD_EXTCAL_ETABLISSEMENT . '</b>' . "\n";
104
+    echo '<td style="border:1px solid black;">'."\n";
105
+    echo '<b>'._MD_EXTCAL_ETABLISSEMENT.'</b>'."\n";
106 106
     if ('' != $location['categorie']) {
107
-        echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n";
107
+        echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n";
108 108
     }
109 109
     if ('' != $location['logo']) {
110
-        echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/etablissement/' . $location['logo'] . ' height="75px">' . '' . "\n";
110
+        echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/etablissement/'.$location['logo'].' height="75px">'.''."\n";
111 111
     }
112 112
 
113
-    echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n";
114
-    echo $location['description'] . '<br>' . "\n";
115
-    echo $location['adresse'] . '</span> <br>' . "\n";
113
+    echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n";
114
+    echo $location['description'].'<br>'."\n";
115
+    echo $location['adresse'].'</span> <br>'."\n";
116 116
     if ('' != $location['adresse2']) {
117
-        echo $location['adresse2'] . '</span> <br>' . "\n";
117
+        echo $location['adresse2'].'</span> <br>'."\n";
118 118
     }
119
-    echo $location['ville'] . "\n";
120
-    echo $location['cp'] . '<br>' . "\n";
119
+    echo $location['ville']."\n";
120
+    echo $location['cp'].'<br>'."\n";
121 121
 
122 122
     if ('' != $location['horaires']) {
123
-        echo $location['horaires'] . '</span> <br>' . "\n";
123
+        echo $location['horaires'].'</span> <br>'."\n";
124 124
     }
125 125
 
126 126
     if ('' != $location['divers']) {
127
-        echo $location['divers'] . '</span> <br>' . "\n";
127
+        echo $location['divers'].'</span> <br>'."\n";
128 128
     }
129 129
 
130 130
     if ('' != $location['tarifs']) {
131
-        echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n";
131
+        echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n";
132 132
     }
133 133
 
134
-    echo '</td>' . "\n";
135
-    echo '<td style="border:1px solid black;">' . "\n";
134
+    echo '</td>'."\n";
135
+    echo '<td style="border:1px solid black;">'."\n";
136 136
 
137 137
     if ('' != $location['tel_fixe']) {
138
-        echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n";
138
+        echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n";
139 139
     }
140 140
     if ('' != $location['tel_portable']) {
141
-        echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n";
141
+        echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n";
142 142
     }
143 143
 
144
-    echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n";
145
-    echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n";
146
-    echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_ETABLISSEMENT_MAP2 . '</a>' . "\n";
144
+    echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n";
145
+    echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n";
146
+    echo '<b>'._MD_EXTCAL_ETABLISSEMENT_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_ETABLISSEMENT_MAP2.'</a>'."\n";
147 147
 
148
-    echo '</td>' . "\n";
149
-    echo '</tr>' . "\n";
148
+    echo '</td>'."\n";
149
+    echo '</tr>'."\n";
150 150
 }
151 151
 //show images
152 152
 
153 153
 if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) {
154
-    echo '<tr>' . "\n";
154
+    echo '<tr>'."\n";
155 155
     if ('' != $event['event_picture1']) {
156
-        echo '<td style="border:1px solid black;">' . "\n";
157
-        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n";
158
-        echo '</td>' . "\n";
156
+        echo '<td style="border:1px solid black;">'."\n";
157
+        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px">'.''."\n";
158
+        echo '</td>'."\n";
159 159
     }
160 160
     if ('' != $event['event_picture2']) {
161
-        echo '<td style="border:1px solid black;">' . "\n";
162
-        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n";
163
-        echo '</td>' . "\n";
161
+        echo '<td style="border:1px solid black;">'."\n";
162
+        echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px">'.''."\n";
163
+        echo '</td>'."\n";
164 164
     }
165
-    echo '</tr>' . "\n";
165
+    echo '</tr>'."\n";
166 166
 }
167 167
 //--------------------
168 168
 
169
-echo '</table><br>' . "\n";
169
+echo '</table><br>'."\n";
170 170
 echo '<div style="text-align:center; width:640px;">';
171
-echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>';
172
-echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>';
171
+echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>';
172
+echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>';
173 173
 echo '</div>';
174
-echo '</body>' . "\n";
175
-echo '</html>' . "\n";
174
+echo '</body>'."\n";
175
+echo '</html>'."\n";
Please login to merge, or discard this patch.