Completed
Push — master ( c921ab...02e62b )
by Michael
109:02 queued 101:11
created
versions/extcal_2_04.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         global $xoopsDB;
31 31
 
32
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;";
32
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` ADD `event_nbmember` tinyint(4) NOT NULL default '0' AFTER `event_submitdate` ;";
33 33
         $xoopsDB->query($sql);
34 34
     }
35 35
 
Please login to merge, or discard this patch.
class/tableForm.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function insertBreak($extra = '', $class = '')
58 58
     {
59
-        $class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : '';
59
+        $class = ($class != '') ? " class='".preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class)."'" : '';
60 60
         // Fix for $extra tag not showing
61 61
         if ($extra) {
62
-            $extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>';
62
+            $extra = '<tr><td colspan="2" '.$class.'>'.$extra.'</td></tr>';
63 63
             $this->addElement($extra);
64 64
         } else {
65
-            $extra = '<tr><td colspan="2" ' . $class . '>&nbsp;</td></tr>';
65
+            $extra = '<tr><td colspan="2" '.$class.'>&nbsp;</td></tr>';
66 66
             $this->addElement($extra);
67 67
         }
68 68
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         }
93 93
 
94 94
         if ($title <> '') {
95
-            $ret .= '<tr><th colspan="2">' . $title . '</th></tr>';
95
+            $ret .= '<tr><th colspan="2">'.$title.'</th></tr>';
96 96
         }
97 97
 
98 98
         $hidden = '';
@@ -104,24 +104,24 @@  discard block
 block discarded – undo
104 104
                 if (!$ele->getNocolspan()) {
105 105
                     $ret .= '<tr valign="top" align="left"><td class="head">';
106 106
                     if (($caption = $ele->getCaption()) != '') {
107
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
108
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
107
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
108
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
109 109
                         $ret .= '<span class="caption-marker">*</span>';
110 110
                         $ret .= '</div>';
111 111
                     }
112 112
                     if (($desc = $ele->getDescription()) != '') {
113
-                        $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>';
113
+                        $ret .= '<div class="xoops-form-element-help">'.$desc.'</div>';
114 114
                     }
115
-                    $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE;
115
+                    $ret .= '</td><td class="'.$class.'">'.$ele->render().'</td></tr>'.NWLINE;
116 116
                 } else {
117 117
                     $ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
118 118
                     if (($caption = $ele->getCaption()) != '') {
119
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
120
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
119
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
120
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
121 121
                         $ret .= '<span class="caption-marker">*</span>';
122 122
                         $ret .= '</div>';
123 123
                     }
124
-                    $ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>';
124
+                    $ret .= '</td></tr><tr valign="top" align="left"><td class="'.$class.'" colspan="2">'.$ele->render().'</td></tr>';
125 125
                 }
126 126
             } else {
127 127
                 $hidden .= $ele->render();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             $ret .= '</table>';
133 133
         }
134 134
 
135
-        $ret .= NWLINE . ' ' . $hidden . NWLINE;
135
+        $ret .= NWLINE.' '.$hidden.NWLINE;
136 136
 
137 137
         return $ret;
138 138
     }
Please login to merge, or discard this patch.
class/colorTools.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,9 +159,9 @@
 block discarded – undo
159 159
         $tHex = array('', '', '', '');
160 160
 
161 161
         $tHex[0] = $aColors[0];
162
-        $tHex[1] = substr('00' . dechex($aColors[1]), -2);
163
-        $tHex[2] = substr('00' . dechex($aColors[2]), -2);
164
-        $tHex[3] = substr('00' . dechex($aColors[3]), -2);
162
+        $tHex[1] = substr('00'.dechex($aColors[1]), -2);
163
+        $tHex[2] = substr('00'.dechex($aColors[2]), -2);
164
+        $tHex[3] = substr('00'.dechex($aColors[3]), -2);
165 165
 
166 166
         $colorHexa = implode('', $tHex);
167 167
 
Please login to merge, or discard this patch.
class/form/spin/formspin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function setMin($min)
205 205
     {
206
-        $this->_min = (int)$min;
206
+        $this->_min = (int) $min;
207 207
     }
208 208
     /*-----------------------------------------------------------------*/
209 209
     /**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public function setMax($max)
223 223
     {
224
-        $this->_max = (int)$max;
224
+        $this->_max = (int) $max;
225 225
     }
226 226
 
227 227
     /*-----------------------------------------------------------------*/
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      */
243 243
     public function setSmallIncrement($smallIncrement)
244 244
     {
245
-        $this->_smallIncrement = (int)$smallIncrement;
245
+        $this->_smallIncrement = (int) $smallIncrement;
246 246
         if ($this->_smallIncrement == 0) {
247 247
             $this->_smallIncrement = 1;
248 248
         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
      */
265 265
     public function setLargeIncrement($largeIncrement)
266 266
     {
267
-        $this->_largeIncrement = (int)$largeIncrement;
267
+        $this->_largeIncrement = (int) $largeIncrement;
268 268
         if ($this->_largeIncrement == 0) {
269 269
             $this->_largeIncrement = 10;
270 270
         }
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         $sFolderImg  = "{$sSpinFolder}/images/{$this->getImgFolder()}/";
406 406
 
407 407
         $prefixe  = $this->getName();
408
-        $prefixe2 = 'spin' . $prefixe;
408
+        $prefixe2 = 'spin'.$prefixe;
409 409
 
410 410
         $smallIncrement = $this->getSmallIncrement();
411 411
         $largeIncrement = $this->getLargeIncrement();
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         $t = array();
425 425
 
426 426
         if ($this->_loadJS) {
427
-            $js  = $sSpinFolder . '/js/spin.js';
427
+            $js  = $sSpinFolder.'/js/spin.js';
428 428
             $t[] = "<script src='{$js}' type='text/javascript'></script>";
429 429
         }
430 430
 
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
         //-------------------------------------------------------
470 470
 
471 471
         $t[] = '  </tr>';
472
-        $t[] = '</table>' . "\n";
472
+        $t[] = '</table>'."\n";
473 473
         $t[] = '</div>';
474 474
         //-------------------------------------------
475 475
         $html = implode("\n", $t);
Please login to merge, or discard this patch.
include/notification.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
22 22
         $event        = $eventHandler->getEvent($itemId, 0, true);
23 23
         $item['name'] = $event->getVar('event_title');
24
-        $item['url']  = XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id');
24
+        $item['url']  = XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id');
25 25
 
26 26
         return $item;
27 27
     }
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/13.php 1 patch
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -39,32 +39,32 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 switch (@$_GET['view']) {
42
-    default:
43
-        $_GET['view'] = 'calendar_year';
44
-    case 'calendar_year':
45
-        require_once CALENDAR_ROOT.'Year.php';
46
-        $c = new Calendar_Year($_GET['y']);
47
-        break;
48
-    case 'calendar_month':
49
-        require_once CALENDAR_ROOT.'Month.php';
50
-        $c = new Calendar_Month($_GET['y'], $_GET['m']);
51
-        break;
52
-    case 'calendar_day':
53
-        require_once CALENDAR_ROOT.'Day.php';
54
-        $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
55
-        break;
56
-    case 'calendar_hour':
57
-        require_once CALENDAR_ROOT.'Hour.php';
58
-        $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
59
-        break;
60
-    case 'calendar_minute':
61
-        require_once CALENDAR_ROOT.'Minute.php';
62
-        $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
63
-        break;
64
-    case 'calendar_second':
65
-        require_once CALENDAR_ROOT.'Second.php';
66
-        $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
67
-        break;
42
+        default:
43
+            $_GET['view'] = 'calendar_year';
44
+        case 'calendar_year':
45
+            require_once CALENDAR_ROOT.'Year.php';
46
+            $c = new Calendar_Year($_GET['y']);
47
+            break;
48
+        case 'calendar_month':
49
+            require_once CALENDAR_ROOT.'Month.php';
50
+            $c = new Calendar_Month($_GET['y'], $_GET['m']);
51
+            break;
52
+        case 'calendar_day':
53
+            require_once CALENDAR_ROOT.'Day.php';
54
+            $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
55
+            break;
56
+        case 'calendar_hour':
57
+            require_once CALENDAR_ROOT.'Hour.php';
58
+            $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
59
+            break;
60
+        case 'calendar_minute':
61
+            require_once CALENDAR_ROOT.'Minute.php';
62
+            $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
63
+            break;
64
+        case 'calendar_second':
65
+            require_once CALENDAR_ROOT.'Second.php';
66
+            $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
67
+            break;
68 68
 }
69 69
 
70 70
 // Convert timestamp to human readable date
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/1.php 1 patch
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -39,32 +39,32 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 switch (@$_GET['view']) {
42
-    default:
43
-        $_GET['view'] = 'calendar_year';
44
-    case 'calendar_year':
45
-        require_once CALENDAR_ROOT.'Year.php';
46
-        $c = new Calendar_Year($_GET['y']);
47
-        break;
48
-    case 'calendar_month':
49
-        require_once CALENDAR_ROOT.'Month.php';
50
-        $c = new Calendar_Month($_GET['y'], $_GET['m']);
51
-        break;
52
-    case 'calendar_day':
53
-        require_once CALENDAR_ROOT.'Day.php';
54
-        $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
55
-        break;
56
-    case 'calendar_hour':
57
-        require_once CALENDAR_ROOT.'Hour.php';
58
-        $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
59
-        break;
60
-    case 'calendar_minute':
61
-        require_once CALENDAR_ROOT.'Minute.php';
62
-        $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
63
-        break;
64
-    case 'calendar_second':
65
-        require_once CALENDAR_ROOT.'Second.php';
66
-        $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
67
-        break;
42
+        default:
43
+            $_GET['view'] = 'calendar_year';
44
+        case 'calendar_year':
45
+            require_once CALENDAR_ROOT.'Year.php';
46
+            $c = new Calendar_Year($_GET['y']);
47
+            break;
48
+        case 'calendar_month':
49
+            require_once CALENDAR_ROOT.'Month.php';
50
+            $c = new Calendar_Month($_GET['y'], $_GET['m']);
51
+            break;
52
+        case 'calendar_day':
53
+            require_once CALENDAR_ROOT.'Day.php';
54
+            $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
55
+            break;
56
+        case 'calendar_hour':
57
+            require_once CALENDAR_ROOT.'Hour.php';
58
+            $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
59
+            break;
60
+        case 'calendar_minute':
61
+            require_once CALENDAR_ROOT.'Minute.php';
62
+            $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
63
+            break;
64
+        case 'calendar_second':
65
+            require_once CALENDAR_ROOT.'Second.php';
66
+            $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
67
+            break;
68 68
 }
69 69
 
70 70
 // Convert timestamp to human readable date
Please login to merge, or discard this patch.
admin/event.php 1 patch
Switch Indentation   +303 added lines, -303 removed lines patch added patch discarded remove patch
@@ -51,176 +51,194 @@  discard block
 block discarded – undo
51 51
 
52 52
 switch ($op) {
53 53
 
54
-    case 'enreg':
55
-
56
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
57
-        $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
58
-        // $t = print_r($_POST,true);
59
-        // echo "<pre>{$t}</pre><br>";
60
-        // exit;
61
-        // If the date format is wrong
62
-        //        if (
63
-        //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
64
-        //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
65
-        //        ) {
66
-        //            redirect_header(
67
-        //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
68
-        //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
69
-        //            );
70
-        //            exit;
71
-        //        }
72
-
73
-        //exit;
74
-        ///////////////////////////////////////////////////////////////////////////////
75
-        ExtcalUtilities::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
76
-        ///////////////////////////////////////////////////////////////////////////////
77
-        $data = array(
78
-            'event_title' => $_POST['event_title'],
79
-            'cat_id' => $_POST['cat_id'],
80
-            'event_desc' => $_POST['event_desc'],
81
-            'event_nbmember' => $_POST['event_nbmember'],
82
-            'event_organisateur' => $_POST['event_organisateur'],
83
-            'event_contact' => $_POST['event_contact'],
84
-            'event_url' => $_POST['event_url'],
85
-            'event_email' => $_POST['event_email'],
86
-            'event_address' => $_POST['event_address'],
87
-            'event_approved' => 1,
88
-            'event_start' => $_POST['event_start'],
89
-            'have_end' => $_POST['have_end'],
90
-            'event_end' => $_POST['event_end'],
91
-            'event_picture1' => @$event_picture1,
92
-            'event_picture2' => @$event_picture2,
93
-            'event_price' => @$_POST['event_price'],
94
-            'event_etablissement' => $_POST['event_etablissement'],
95
-            'dohtml' => $extcalConfig['allow_html'],
96
-            'event_icone' => $_POST['event_icone'],
97
-        );
98
-
99
-        // Event edited
100
-        if (isset($_POST['event_id'])) {
101
-            if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
102
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
54
+        case 'enreg':
55
+
56
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
57
+            $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
58
+            // $t = print_r($_POST,true);
59
+            // echo "<pre>{$t}</pre><br>";
60
+            // exit;
61
+            // If the date format is wrong
62
+            //        if (
63
+            //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
64
+            //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
65
+            //        ) {
66
+            //            redirect_header(
67
+            //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
68
+            //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
69
+            //            );
70
+            //            exit;
71
+            //        }
72
+
73
+            //exit;
74
+            ///////////////////////////////////////////////////////////////////////////////
75
+            ExtcalUtilities::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
76
+            ///////////////////////////////////////////////////////////////////////////////
77
+            $data = array(
78
+                'event_title' => $_POST['event_title'],
79
+                'cat_id' => $_POST['cat_id'],
80
+                'event_desc' => $_POST['event_desc'],
81
+                'event_nbmember' => $_POST['event_nbmember'],
82
+                'event_organisateur' => $_POST['event_organisateur'],
83
+                'event_contact' => $_POST['event_contact'],
84
+                'event_url' => $_POST['event_url'],
85
+                'event_email' => $_POST['event_email'],
86
+                'event_address' => $_POST['event_address'],
87
+                'event_approved' => 1,
88
+                'event_start' => $_POST['event_start'],
89
+                'have_end' => $_POST['have_end'],
90
+                'event_end' => $_POST['event_end'],
91
+                'event_picture1' => @$event_picture1,
92
+                'event_picture2' => @$event_picture2,
93
+                'event_price' => @$_POST['event_price'],
94
+                'event_etablissement' => $_POST['event_etablissement'],
95
+                'dohtml' => $extcalConfig['allow_html'],
96
+                'event_icone' => $_POST['event_icone'],
97
+            );
98
+
99
+            // Event edited
100
+            if (isset($_POST['event_id'])) {
101
+                if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
102
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
103
+                } else {
104
+                    $fileHandler->createFile((int) $_POST['event_id']);
105
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
106
+                }
107
+
108
+                // New event
103 109
             } else {
104
-                $fileHandler->createFile((int) $_POST['event_id']);
105
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
110
+                $notificationHandler = xoops_getHandler('notification');
111
+                /** @var ExtcalCatHandler $catHandler */
112
+                $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
113
+
114
+                $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
115
+                $data['event_submitdate'] = time();
116
+
117
+                if ($eventHandler->createEvent($data, $_POST)) {
118
+                    $fileHandler->createFile($eventHandler->getInsertId());
119
+                    $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
120
+                    $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
121
+                    $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
122
+                        'EVENT_TITLE' => $_POST['event_title'],
123
+                        'CAT_NAME' => $cat->getVar('cat_name'),
124
+                    ));
125
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
126
+                } else {
127
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
128
+                }
106 129
             }
130
+            break;
107 131
 
108
-            // New event
109
-        } else {
110
-            $notificationHandler = xoops_getHandler('notification');
111
-            /** @var ExtcalCatHandler $catHandler */
112
-            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
113
-
114
-            $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
115
-            $data['event_submitdate'] = time();
116
-
117
-            if ($eventHandler->createEvent($data, $_POST)) {
118
-                $fileHandler->createFile($eventHandler->getInsertId());
119
-                $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
120
-                $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
121
-                $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
122
-                    'EVENT_TITLE' => $_POST['event_title'],
123
-                    'CAT_NAME' => $cat->getVar('cat_name'),
124
-                ));
125
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
126
-            } else {
127
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
132
+        case 'clone': /* sur validation du formulaire */
133
+        case 'modify':
134
+            $action = (($op === 'clone') ? 'clone' : 'edit');
135
+            xoops_cp_header();
136
+            //================================================
137
+            // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
138
+            //
139
+            //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
140
+            //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
141
+            //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
142
+            //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
143
+            //        //$dateBirthday->rtl=false;
144
+            //        $dateBirthday->setAutoHide(false);
145
+            //
146
+            //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
147
+            //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
148
+            //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
149
+            //
150
+            //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
151
+            //        $dateBirthday->zindex = 150; //default 1
152
+            //        $dateBirthday->setYearInterval(1995, date('Y'));
153
+            //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
154
+            //        //$dateBirthday->autoSubmit(true, "calendar");
155
+            //        $dateBirthday->disabledDay("sat");
156
+            //        $dateBirthday->disabledDay("sun");
157
+            //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
158
+            //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
159
+            //        $dateBirthday->setAlignment('right', 'bottom'); //optional
160
+            // echo "<table><tr><td>zzzzz</td><td></td><td>";
161
+            // echo $dateBirthday->render();
162
+            // echo "</td></tr></table>";
163
+            //echo $dateBirthday->render();
164
+            //================================================
165
+            // @author      Gregory Mage (Aka Mage)
166
+            //***************************************************************************************
167
+            //         include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
168
+            $eventAdmin = new ModuleAdmin();
169
+            echo $eventAdmin->addNavigation(basename(__FILE__));
170
+            //***************************************************************************************
171
+
172
+            $eventId = $_GET['event_id'];
173
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
174
+
175
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
176
+
177
+            if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
178
+                $form->display();
128 179
             }
129
-        }
130
-        break;
131
-
132
-    case 'clone': /* sur validation du formulaire */
133
-    case 'modify':
134
-        $action = (($op === 'clone') ? 'clone' : 'edit');
135
-        xoops_cp_header();
136
-        //================================================
137
-        // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
138
-        //
139
-        //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
140
-        //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
141
-        //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
142
-        //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
143
-        //        //$dateBirthday->rtl=false;
144
-        //        $dateBirthday->setAutoHide(false);
145
-        //
146
-        //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
147
-        //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
148
-        //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
149
-        //
150
-        //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
151
-        //        $dateBirthday->zindex = 150; //default 1
152
-        //        $dateBirthday->setYearInterval(1995, date('Y'));
153
-        //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
154
-        //        //$dateBirthday->autoSubmit(true, "calendar");
155
-        //        $dateBirthday->disabledDay("sat");
156
-        //        $dateBirthday->disabledDay("sun");
157
-        //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
158
-        //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
159
-        //        $dateBirthday->setAlignment('right', 'bottom'); //optional
160
-        // echo "<table><tr><td>zzzzz</td><td></td><td>";
161
-        // echo $dateBirthday->render();
162
-        // echo "</td></tr></table>";
163
-        //echo $dateBirthday->render();
164
-        //================================================
165
-        // @author      Gregory Mage (Aka Mage)
166
-        //***************************************************************************************
167
-        //         include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
168
-        $eventAdmin = new ModuleAdmin();
169
-        echo $eventAdmin->addNavigation(basename(__FILE__));
170
-        //***************************************************************************************
171
-
172
-        $eventId = $_GET['event_id'];
173
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
174
-
175
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
176
-
177
-        if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
178
-            $form->display();
179
-        }
180 180
 
181
-        echo '</fieldset><br>';
181
+            echo '</fieldset><br>';
182 182
 
183
-        xoops_cp_footer();
183
+            xoops_cp_footer();
184 184
 
185
-        break;
185
+            break;
186 186
 
187
-    case 'clone2': /* sur clique de l'icone du formulaire*/
187
+        case 'clone2': /* sur clique de l'icone du formulaire*/
188 188
 
189
-        //$newEventId = 1;
190
-        $eventId = $_GET['event_id'];
191
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
192
-        $event = $eventHandler->getEvent($eventId);
193
-        $t = $event->getVars();
194
-        $data = array();
195
-        while (list($key, $val) = each($t)) {
196
-            $data[$key] = $val['value'];
197
-        }
189
+            //$newEventId = 1;
190
+            $eventId = $_GET['event_id'];
191
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
192
+            $event = $eventHandler->getEvent($eventId);
193
+            $t = $event->getVars();
194
+            $data = array();
195
+            while (list($key, $val) = each($t)) {
196
+                $data[$key] = $val['value'];
197
+            }
198 198
 
199
-        $data['event_id'] = 0;
200
-        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
199
+            $data['event_id'] = 0;
200
+            $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
201 201
 
202
-        $newEvent = $eventHandler->create();
203
-        $newEvent->setVars($data);
204
-        $t = $eventHandler->insert($newEvent, true);
202
+            $newEvent = $eventHandler->create();
203
+            $newEvent->setVars($data);
204
+            $t = $eventHandler->insert($newEvent, true);
205 205
 
206
-        $newEventId = $newEvent->getVar('event_id');
207
-        $ts = print_r($newEventId, true);
206
+            $newEventId = $newEvent->getVar('event_id');
207
+            $ts = print_r($newEventId, true);
208 208
 
209
-        redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
210
-        break;
209
+            redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
210
+            break;
211 211
 
212
-    case 'delete':
212
+        case 'delete':
213 213
 
214
-        if (isset($_POST['confirm'])) {
215
-            if (!$GLOBALS['xoopsSecurity']->check()) {
216
-                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
217
-                exit;
214
+            if (isset($_POST['confirm'])) {
215
+                if (!$GLOBALS['xoopsSecurity']->check()) {
216
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
217
+                    exit;
218
+                }
219
+                //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
220
+                //             $eventHandler->deleteEvent($_POST['event_id']);
221
+                deleteEvents($_POST['event_id']);
222
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
223
+            } else {
224
+                xoops_cp_header();
225
+                // @author      Gregory Mage (Aka Mage)
226
+                //***************************************************************************************
227
+                //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
228
+                $eventAdmin = new ModuleAdmin();
229
+                echo $eventAdmin->addNavigation(basename(__FILE__));
230
+                //***************************************************************************************
231
+
232
+                $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
233
+                xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
234
+
235
+                xoops_cp_footer();
218 236
             }
219
-            //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
220
-            //             $eventHandler->deleteEvent($_POST['event_id']);
221
-            deleteEvents($_POST['event_id']);
222
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
223
-        } else {
237
+
238
+            break;
239
+
240
+        case 'deleteSelection':
241
+
224 242
             xoops_cp_header();
225 243
             // @author      Gregory Mage (Aka Mage)
226 244
             //***************************************************************************************
@@ -228,186 +246,168 @@  discard block
 block discarded – undo
228 246
             $eventAdmin = new ModuleAdmin();
229 247
             echo $eventAdmin->addNavigation(basename(__FILE__));
230 248
             //***************************************************************************************
249
+            if (isset($_POST['deleteSelection'][0])) {
250
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
251
+                $ids = array_keys($_POST['deleteAllEvents']);
252
+            } else {
253
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
254
+                $ids = array_keys($_POST['deleteEvents']);
255
+            }
231 256
 
232
-            $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
233
-            xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
257
+            //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
258
+            //           $ids = array_keys($_POST['deleteEvents']);
259
+            $ids = implode(',', $ids);
260
+            //echo $ids.'<br>';
261
+            $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
262
+            //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
263
+            xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
234 264
 
235 265
             xoops_cp_footer();
236
-        }
237 266
 
238
-        break;
239
-
240
-    case 'deleteSelection':
241
-
242
-        xoops_cp_header();
243
-        // @author      Gregory Mage (Aka Mage)
244
-        //***************************************************************************************
245
-        //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
246
-        $eventAdmin = new ModuleAdmin();
247
-        echo $eventAdmin->addNavigation(basename(__FILE__));
248
-        //***************************************************************************************
249
-        if (isset($_POST['deleteSelection'][0])) {
250
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
251
-            $ids = array_keys($_POST['deleteAllEvents']);
252
-        } else {
253
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
254
-            $ids = array_keys($_POST['deleteEvents']);
255
-        }
267
+            break;
256 268
 
257
-        //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
258
-        //           $ids = array_keys($_POST['deleteEvents']);
259
-        $ids = implode(',', $ids);
260
-        //echo $ids.'<br>';
261
-        $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
262
-        //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
263
-        xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
264
-
265
-        xoops_cp_footer();
266
-
267
-        break;
268
-
269
-    case 'deleteSelectionOK':
270
-        //-----------------------------------------
271
-        // $t = print_r($_GET,true);
272
-        // echo "<hr><pre>{$t}</pre><hr>";
273
-        //
274
-        // $t = print_r($_POST,true);
275
-        // echo "<hr><pre>{$t}</pre><hr>";
276
-        // exit;
277
-        //-----------------------------------------
278
-
279
-        if (isset($_POST['deleteSelection'][0])) {
280
-        } else {
281
-            if (!$GLOBALS['xoopsSecurity']->check()) {
282
-                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
283
-                exit;
284
-            }
269
+        case 'deleteSelectionOK':
270
+            //-----------------------------------------
271
+            // $t = print_r($_GET,true);
272
+            // echo "<hr><pre>{$t}</pre><hr>";
273
+            //
274
+            // $t = print_r($_POST,true);
275
+            // echo "<hr><pre>{$t}</pre><hr>";
276
+            // exit;
277
+            //-----------------------------------------
285 278
 
286
-            deleteEvents($_POST['event_ids']);
279
+            if (isset($_POST['deleteSelection'][0])) {
280
+            } else {
281
+                if (!$GLOBALS['xoopsSecurity']->check()) {
282
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
283
+                    exit;
284
+                }
287 285
 
288
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
289
-        }
286
+                deleteEvents($_POST['event_ids']);
290 287
 
291
-        break;
288
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
289
+            }
292 290
 
293
-    case 'default':
294
-    default:
291
+            break;
295 292
 
296
-        //global $extcalConfig;
297
-        $extcalConfig = ExtcalConfig::getHandler();
298
-        $xoopsModuleConfig = $extcalConfig->getModuleConfig();
293
+        case 'default':
294
+        default:
299 295
 
300
-        $start = isset($_GET['start']) ? $_GET['start'] : 0;
301
-        $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
296
+            //global $extcalConfig;
297
+            $extcalConfig = ExtcalConfig::getHandler();
298
+            $xoopsModuleConfig = $extcalConfig->getModuleConfig();
302 299
 
303
-        xoops_cp_header();
304
-        // @author      Gregory Mage (Aka Mage)
305
-        //***************************************************************************************
300
+            $start = isset($_GET['start']) ? $_GET['start'] : 0;
301
+            $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
306 302
 
307
-        $eventAdmin = new ModuleAdmin();
308
-        echo $eventAdmin->addNavigation(basename(__FILE__));
309
-        //***************************************************************************************
303
+            xoops_cp_header();
304
+            // @author      Gregory Mage (Aka Mage)
305
+            //***************************************************************************************
310 306
 
311
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
312
-        $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
313
-        $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
307
+            $eventAdmin = new ModuleAdmin();
308
+            echo $eventAdmin->addNavigation(basename(__FILE__));
309
+            //***************************************************************************************
314 310
 
315
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
316
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
317
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
318
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
311
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
312
+            $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
313
+            $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
319 314
 
320
-        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
321
-        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
315
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
316
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
317
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
318
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
322 319
 
323
-        echo '</fieldset><br>';
320
+            echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
321
+            echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
324 322
 
325
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
323
+            echo '</fieldset><br>';
326 324
 
327
-        echo '<form method="POST" action="event.php">';
328
-        echo '<input type="hidden" name="op" value="deleteSelection" />';
325
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
329 326
 
330
-        echo '<table class="outer" style="width:100%;">';
331
-        echo '<tr style="text-align:center;">';
332
-        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
333
-        echo '<th>#</th>';
334
-        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
335
-        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
336
-        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
337
-        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
338
-        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
339
-        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
340
-        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
327
+            echo '<form method="POST" action="event.php">';
328
+            echo '<input type="hidden" name="op" value="deleteSelection" />';
341 329
 
342
-        echo '</tr>';
330
+            echo '<table class="outer" style="width:100%;">';
331
+            echo '<tr style="text-align:center;">';
332
+            echo '<th>'._AM_EXTCAL_DELETE.'</th>';
333
+            echo '<th>#</th>';
334
+            echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
335
+            echo '<th>'._AM_EXTCAL_TITLE.'</th>';
336
+            echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
337
+            echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
338
+            echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
339
+            echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
340
+            echo '<th>'._AM_EXTCAL_ACTION.'</th>';
343 341
 
344
-        if (count($events) > 0) {
345
-            $i = 0;
346
-            foreach ($events as $event) {
347
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
348
-                echo '<tr style="text-align:left;" class="'.$class.'">';
349
-                echo "<td width='10%' align='center'>";
350
-                echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
351
-                echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />";
352
-                echo '</td>';
353
-                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
354
-                echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>';
355
-
356
-                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
357
-
358
-                //                 if ($event['event_isrecur']) {
359
-                //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
360
-                //                 } else {
361
-                //                     echo '<td>' . $event['formated_event_start'] . '</td>';
362
-                //                 }
363
-
364
-                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
365
-                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
366
-                echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
367
-                if (!isset($event['formated_reccur_rule'])) {
368
-                    $event['formated_reccur_rule'] = '';
342
+            echo '</tr>';
343
+
344
+            if (count($events) > 0) {
345
+                $i = 0;
346
+                foreach ($events as $event) {
347
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
348
+                    echo '<tr style="text-align:left;" class="'.$class.'">';
349
+                    echo "<td width='10%' align='center'>";
350
+                    echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
351
+                    echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />";
352
+                    echo '</td>';
353
+                    echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
354
+                    echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>';
355
+
356
+                    echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
357
+
358
+                    //                 if ($event['event_isrecur']) {
359
+                    //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
360
+                    //                 } else {
361
+                    //                     echo '<td>' . $event['formated_event_start'] . '</td>';
362
+                    //                 }
363
+
364
+                    echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
365
+                    echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
366
+                    echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
367
+                    if (!isset($event['formated_reccur_rule'])) {
368
+                        $event['formated_reccur_rule'] = '';
369
+                    }
370
+                    echo '<td>'.$event['formated_reccur_rule'].'</td>';
371
+
372
+                    echo '<td style="width:10%; text-align:center;">';
373
+                    echo '<a href=event.php?op=modify&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."' /></a>&nbsp;&nbsp;";
374
+                    echo '<a href=event.php?op=delete&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."' /></a>&nbsp;&nbsp;";
375
+                    echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>";
376
+                    echo '</td>';
377
+
378
+                    echo '</tr>';
369 379
                 }
370
-                echo '<td>'.$event['formated_reccur_rule'].'</td>';
380
+                //---------------------------------------------------------
381
+                $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
371 382
 
372
-                echo '<td style="width:10%; text-align:center;">';
373
-                echo '<a href=event.php?op=modify&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."' /></a>&nbsp;&nbsp;";
374
-                echo '<a href=event.php?op=delete&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."' /></a>&nbsp;&nbsp;";
375
-                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>";
383
+                echo '<tr><td colspan="2" style="text-align: right;">';
384
+                echo $pageNav->renderNav(2);
376 385
                 echo '</td>';
377 386
 
378
-                echo '</tr>';
379
-            }
380
-            //---------------------------------------------------------
381
-            $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
387
+                echo '<td colspan="2" style="text-align: right;">';
382 388
 
383
-            echo '<tr><td colspan="2" style="text-align: right;">';
384
-            echo $pageNav->renderNav(2);
385
-            echo '</td>';
389
+                echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
390
+                echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
386 391
 
387
-            echo '<td colspan="2" style="text-align: right;">';
388
-
389
-            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
390
-            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
391
-
392
-            echo '</td>';
393
-            echo '</tr>';
394
-        } else {
395
-            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
396
-        }
397
-        echo '</table>';
398
-        echo '</form>';
392
+                echo '</td>';
393
+                echo '</tr>';
394
+            } else {
395
+                echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
396
+            }
397
+            echo '</table>';
398
+            echo '</form>';
399 399
 
400
-        echo '</fieldset>';
401
-        echo '</fieldset><br><br>';
402
-        //Fin de la liste des evennement -------------------------------------
403
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
400
+            echo '</fieldset>';
401
+            echo '</fieldset><br><br>';
402
+            //Fin de la liste des evennement -------------------------------------
403
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
404 404
 
405
-        $form = $eventHandler->getEventForm('admin');
406
-        $form->display();
405
+            $form = $eventHandler->getEventForm('admin');
406
+            $form->display();
407 407
 
408
-        echo '</fieldset>';
408
+            echo '</fieldset>';
409 409
 
410
-        include_once __DIR__.'/admin_footer.php';
410
+            include_once __DIR__.'/admin_footer.php';
411 411
 
412
-        break;
412
+            break;
413 413
 }
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-include_once __DIR__ . '/../../include/constantes.php';
3
+include_once __DIR__.'/../../include/constantes.php';
4 4
 define('_MI_EXTCAL_NAME', 'eXtCal');
5 5
 define('_MI_EXTCAL_ABOUT', 'About');
6 6
 define('_MI_EXTCAL_AFTER', 'After');
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 define('_MI_EXTCAL_START_PAGE', 'Module home page');
136 136
 define('_MI_EXTCAL_SUBMIT_EVENT', 'Submit Event');
137 137
 define('_MI_EXTCAL_TABS_WEIGHT', 'Order of the Tabs');
138
-define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>' . "<span style='color:#0000FF;'>" . _EXTCAL_NAV_LIST . '</span>' . ' <br>Separator: new line');
138
+define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>'."<span style='color:#0000FF;'>"._EXTCAL_NAV_LIST.'</span>'.' <br>Separator: new line');
139 139
 define('_MI_EXTCAL_VISIBLE_TAB_DESC', 'Define the visible view.');
140 140
 define('_MI_EXTCAL_VISIBLE_TABS', 'Visible tab');
141 141
 define('_MI_EXTCAL_WEEK_START_DAY', 'Week start Day');
Please login to merge, or discard this patch.