Completed
Branch master (610f90)
by Michael
07:23 queued 02:42
created
admin/index.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,11 +92,11 @@
 block discarded – undo
92 92
 
93 93
                 $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E');
94 94
                 $subjectCaption = _AM_EXTCAL_SUBJECT."<br><br><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS
95
-                                  ."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS2.'</span>&nbsp;&nbsp;&nbsp;';
95
+                                    ."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS2.'</span>&nbsp;&nbsp;&nbsp;';
96 96
                 $bodyCaption = _AM_EXTCAL_BODY."<br><br><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS
97
-                                  ."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS1.'<br>'._AM_EXTCAL_MAILTAGS2.'<br>'._AM_EXTCAL_MAILTAGS3.'<br>'
98
-                                  ._AM_EXTCAL_MAILTAGS4.'<br>'._AM_EXTCAL_MAILTAGS5.'<br>'._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS7.'<br>'._AM_EXTCAL_MAILTAGS8.'<br>'
99
-                                  ._AM_EXTCAL_MAILTAGS9.'</span>&nbsp;&nbsp;&nbsp;';
97
+                                    ."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS1.'<br>'._AM_EXTCAL_MAILTAGS2.'<br>'._AM_EXTCAL_MAILTAGS3.'<br>'
98
+                                    ._AM_EXTCAL_MAILTAGS4.'<br>'._AM_EXTCAL_MAILTAGS5.'<br>'._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS7.'<br>'._AM_EXTCAL_MAILTAGS8.'<br>'
99
+                                    ._AM_EXTCAL_MAILTAGS9.'</span>&nbsp;&nbsp;&nbsp;';
100 100
                 $toCheckBbox = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
101 101
                 $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL);
102 102
                 $toCheckBox->addOption('pm', _AM_EXTCAL_PM);
Please login to merge, or discard this patch.
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 switch ($op) {
36 36
 
37
-    case 'notification':
37
+        case 'notification':
38 38
 
39
-        switch ($fct) {
39
+            switch ($fct) {
40 40
 
41 41
             case 'send':
42 42
 
@@ -120,79 +120,79 @@  discard block
 block discarded – undo
120 120
 
121 121
                 break;
122 122
 
123
-        }
123
+            }
124 124
 
125 125
         break;
126 126
 
127
-    default:
128
-    case 'default':
129
-        // @author      Gregory Mage (Aka Mage)
130
-        //***************************************************************************************
131
-        xoops_cp_header();
132
-        //        include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
133
-        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
134
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
135
-        $indexAdmin = new ModuleAdmin();
136
-        $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD);
137
-        $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount(), 'Green');
138
-        $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
139
-        $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
140
-        $criteriaCompo = new CriteriaCompo();
141
-        $criteriaCompo->add(new Criteria('event_approved', 1));
142
-        $criteriaCompo->add(new Criteria('event_start', time(), '>='));
143
-        $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>', 'Green');
144
-
145
-        $indexAdmin->addConfigBoxLine();
146
-        $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
147
-        $indexAdmin->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
148
-
149
-        //JJD
150
-        //         $indexAdmin->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
151
-
152
-        //        $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
153
-        //        $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
154
-        echo $indexAdmin->addNavigation(basename(__FILE__));
155
-        echo $indexAdmin->renderIndex();
156
-        //***************************************************************************************
157
-        $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id'));
158
-        $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
159
-
160
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>';
161
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
162
-        //        echo '<img src="../assets/images/icons/on.png"  />&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
163
-        echo '<img src='.$pathIcon16.'/edit.png />&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>';
164
-        echo '<img src='.$pathIcon16.'/delete.png />&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>';
165
-        echo '</fieldset><br>';
166
-
167
-        echo '<table class="outer" style="width:100%;">';
168
-        echo '<tr style="text-align:center;">';
169
-        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
170
-        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
171
-        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
172
-        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
173
-        echo '</tr>';
174
-
175
-        if (count($pendingEvent) > 0) {
176
-            $i = 0;
177
-            foreach ($pendingEvent as $event) {
178
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
179
-                echo '<tr style="text-align:center;" class="'.$class.'">';
180
-                echo '<td>'.$event['cat']['cat_name'].'</td>';
181
-                echo '<td>'.$event['event_title'].'</td>';
182
-                echo '<td>'.$event['formated_event_start'].'</td>';
183
-                echo '<td style="width:10%; text-align:center;">';
184
-                echo '<a href="event.php?op=modify&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png /></a>&nbsp;&nbsp;';
185
-                echo '<a href="event.php?op=delete&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png /></a>';
186
-                echo '</td>';
187
-                echo '</tr>';
127
+        default:
128
+        case 'default':
129
+            // @author      Gregory Mage (Aka Mage)
130
+            //***************************************************************************************
131
+            xoops_cp_header();
132
+            //        include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
133
+            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
134
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
135
+            $indexAdmin = new ModuleAdmin();
136
+            $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD);
137
+            $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount(), 'Green');
138
+            $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
139
+            $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
140
+            $criteriaCompo = new CriteriaCompo();
141
+            $criteriaCompo->add(new Criteria('event_approved', 1));
142
+            $criteriaCompo->add(new Criteria('event_start', time(), '>='));
143
+            $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>', 'Green');
144
+
145
+            $indexAdmin->addConfigBoxLine();
146
+            $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
147
+            $indexAdmin->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
148
+
149
+            //JJD
150
+            //         $indexAdmin->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
151
+
152
+            //        $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
153
+            //        $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
154
+            echo $indexAdmin->addNavigation(basename(__FILE__));
155
+            echo $indexAdmin->renderIndex();
156
+            //***************************************************************************************
157
+            $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id'));
158
+            $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
159
+
160
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>';
161
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
162
+            //        echo '<img src="../assets/images/icons/on.png"  />&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
163
+            echo '<img src='.$pathIcon16.'/edit.png />&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>';
164
+            echo '<img src='.$pathIcon16.'/delete.png />&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>';
165
+            echo '</fieldset><br>';
166
+
167
+            echo '<table class="outer" style="width:100%;">';
168
+            echo '<tr style="text-align:center;">';
169
+            echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
170
+            echo '<th>'._AM_EXTCAL_TITLE.'</th>';
171
+            echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
172
+            echo '<th>'._AM_EXTCAL_ACTION.'</th>';
173
+            echo '</tr>';
174
+
175
+            if (count($pendingEvent) > 0) {
176
+                $i = 0;
177
+                foreach ($pendingEvent as $event) {
178
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
179
+                    echo '<tr style="text-align:center;" class="'.$class.'">';
180
+                    echo '<td>'.$event['cat']['cat_name'].'</td>';
181
+                    echo '<td>'.$event['event_title'].'</td>';
182
+                    echo '<td>'.$event['formated_event_start'].'</td>';
183
+                    echo '<td style="width:10%; text-align:center;">';
184
+                    echo '<a href="event.php?op=modify&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png /></a>&nbsp;&nbsp;';
185
+                    echo '<a href="event.php?op=delete&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png /></a>';
186
+                    echo '</td>';
187
+                    echo '</tr>';
188
+                }
189
+            } else {
190
+                echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
188 191
             }
189
-        } else {
190
-            echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
191
-        }
192 192
 
193
-        echo '</table></fieldset><br>';
193
+            echo '</table></fieldset><br>';
194 194
 
195
-        include_once __DIR__.'/admin_footer.php';
195
+            include_once __DIR__.'/admin_footer.php';
196 196
 
197
-        break;
197
+            break;
198 198
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                 adminMenu(1);
48 48
 
49 49
                 $myts = MyTextSanitizer::getInstance();
50
-                $xoopsMailer =& getMailer();
50
+                $xoopsMailer = & getMailer();
51 51
                 $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
52 52
                 $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
53 53
                 $eventMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_MEMBER, _EXTCAL_MODULE);
Please login to merge, or discard this patch.
admin/event.php 1 patch
Switch Indentation   +302 added lines, -302 removed lines patch added patch discarded remove patch
@@ -50,175 +50,193 @@  discard block
 block discarded – undo
50 50
 
51 51
 switch ($op) {
52 52
 
53
-    case 'enreg':
54
-
55
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
56
-        $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
57
-        // $t = print_r($_POST,true);
58
-        // echo "<pre>{$t}</pre><br>";
59
-        // exit;
60
-        // If the date format is wrong
61
-        //        if (
62
-        //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
63
-        //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
64
-        //        ) {
65
-        //            redirect_header(
66
-        //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
67
-        //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
68
-        //            );
69
-        //            exit;
70
-        //        }
71
-
72
-        //exit;
73
-        ///////////////////////////////////////////////////////////////////////////////
74
-        extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
75
-        ///////////////////////////////////////////////////////////////////////////////
76
-        $data = array(
77
-            'event_title' => $_POST['event_title'],
78
-            'cat_id' => $_POST['cat_id'],
79
-            'event_desc' => $_POST['event_desc'],
80
-            'event_nbmember' => $_POST['event_nbmember'],
81
-            'event_organisateur' => $_POST['event_organisateur'],
82
-            'event_contact' => $_POST['event_contact'],
83
-            'event_url' => $_POST['event_url'],
84
-            'event_email' => $_POST['event_email'],
85
-            'event_address' => $_POST['event_address'],
86
-            'event_approved' => 1,
87
-            'event_start' => $_POST['event_start'],
88
-            'have_end' => $_POST['have_end'],
89
-            'event_end' => $_POST['event_end'],
90
-            'event_picture1' => @$event_picture1,
91
-            'event_picture2' => @$event_picture2,
92
-            'event_price' => @$_POST['event_price'],
93
-            'event_etablissement' => $_POST['event_etablissement'],
94
-            'dohtml' => $extcalConfig['allow_html'],
95
-            'event_icone' => $_POST['event_icone'],
96
-        );
97
-
98
-        // Event edited
99
-        if (isset($_POST['event_id'])) {
100
-            if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
101
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
53
+        case 'enreg':
54
+
55
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
56
+            $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
57
+            // $t = print_r($_POST,true);
58
+            // echo "<pre>{$t}</pre><br>";
59
+            // exit;
60
+            // If the date format is wrong
61
+            //        if (
62
+            //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
63
+            //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
64
+            //        ) {
65
+            //            redirect_header(
66
+            //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
67
+            //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
68
+            //            );
69
+            //            exit;
70
+            //        }
71
+
72
+            //exit;
73
+            ///////////////////////////////////////////////////////////////////////////////
74
+            extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
75
+            ///////////////////////////////////////////////////////////////////////////////
76
+            $data = array(
77
+                'event_title' => $_POST['event_title'],
78
+                'cat_id' => $_POST['cat_id'],
79
+                'event_desc' => $_POST['event_desc'],
80
+                'event_nbmember' => $_POST['event_nbmember'],
81
+                'event_organisateur' => $_POST['event_organisateur'],
82
+                'event_contact' => $_POST['event_contact'],
83
+                'event_url' => $_POST['event_url'],
84
+                'event_email' => $_POST['event_email'],
85
+                'event_address' => $_POST['event_address'],
86
+                'event_approved' => 1,
87
+                'event_start' => $_POST['event_start'],
88
+                'have_end' => $_POST['have_end'],
89
+                'event_end' => $_POST['event_end'],
90
+                'event_picture1' => @$event_picture1,
91
+                'event_picture2' => @$event_picture2,
92
+                'event_price' => @$_POST['event_price'],
93
+                'event_etablissement' => $_POST['event_etablissement'],
94
+                'dohtml' => $extcalConfig['allow_html'],
95
+                'event_icone' => $_POST['event_icone'],
96
+            );
97
+
98
+            // Event edited
99
+            if (isset($_POST['event_id'])) {
100
+                if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
101
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
102
+                } else {
103
+                    $fileHandler->createFile((int) $_POST['event_id']);
104
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
105
+                }
106
+
107
+                // New event
102 108
             } else {
103
-                $fileHandler->createFile((int) $_POST['event_id']);
104
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
109
+                $notificationHandler = xoops_getHandler('notification');
110
+                $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
111
+
112
+                $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
113
+                $data['event_submitdate'] = time();
114
+
115
+                if ($eventHandler->createEvent($data, $_POST)) {
116
+                    $fileHandler->createFile($eventHandler->getInsertId());
117
+                    $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
118
+                    $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
119
+                    $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
120
+                        'EVENT_TITLE' => $_POST['event_title'],
121
+                        'CAT_NAME' => $cat->getVar('cat_name'),
122
+                    ));
123
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
124
+                } else {
125
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
126
+                }
105 127
             }
128
+            break;
106 129
 
107
-            // New event
108
-        } else {
109
-            $notificationHandler = xoops_getHandler('notification');
110
-            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
111
-
112
-            $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
113
-            $data['event_submitdate'] = time();
114
-
115
-            if ($eventHandler->createEvent($data, $_POST)) {
116
-                $fileHandler->createFile($eventHandler->getInsertId());
117
-                $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
118
-                $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
119
-                $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
120
-                    'EVENT_TITLE' => $_POST['event_title'],
121
-                    'CAT_NAME' => $cat->getVar('cat_name'),
122
-                ));
123
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
124
-            } else {
125
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
130
+        case 'clone': /* sur validation du formulaire */
131
+        case 'modify':
132
+            $action = (($op === 'clone') ? 'clone' : 'edit');
133
+            xoops_cp_header();
134
+            //================================================
135
+            // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
136
+            //
137
+            //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
138
+            //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
139
+            //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
140
+            //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
141
+            //        //$dateBirthday->rtl=false;
142
+            //        $dateBirthday->setAutoHide(false);
143
+            //
144
+            //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
145
+            //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
146
+            //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
147
+            //
148
+            //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
149
+            //        $dateBirthday->zindex = 150; //default 1
150
+            //        $dateBirthday->setYearInterval(1995, date('Y'));
151
+            //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
152
+            //        //$dateBirthday->autoSubmit(true, "calendar");
153
+            //        $dateBirthday->disabledDay("sat");
154
+            //        $dateBirthday->disabledDay("sun");
155
+            //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
156
+            //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
157
+            //        $dateBirthday->setAlignment('right', 'bottom'); //optional
158
+            // echo "<table><tr><td>zzzzz</td><td></td><td>";
159
+            // echo $dateBirthday->render();
160
+            // echo "</td></tr></table>";
161
+            //echo $dateBirthday->render();
162
+            //================================================
163
+            // @author      Gregory Mage (Aka Mage)
164
+            //***************************************************************************************
165
+            //         include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
166
+            $eventAdmin = new ModuleAdmin();
167
+            echo $eventAdmin->addNavigation(basename(__FILE__));
168
+            //***************************************************************************************
169
+
170
+            $eventId = $_GET['event_id'];
171
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
172
+
173
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
174
+
175
+            if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
176
+                $form->display();
126 177
             }
127
-        }
128
-        break;
129
-
130
-    case 'clone': /* sur validation du formulaire */
131
-    case 'modify':
132
-        $action = (($op === 'clone') ? 'clone' : 'edit');
133
-        xoops_cp_header();
134
-        //================================================
135
-        // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
136
-        //
137
-        //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
138
-        //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
139
-        //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
140
-        //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
141
-        //        //$dateBirthday->rtl=false;
142
-        //        $dateBirthday->setAutoHide(false);
143
-        //
144
-        //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
145
-        //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
146
-        //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
147
-        //
148
-        //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
149
-        //        $dateBirthday->zindex = 150; //default 1
150
-        //        $dateBirthday->setYearInterval(1995, date('Y'));
151
-        //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
152
-        //        //$dateBirthday->autoSubmit(true, "calendar");
153
-        //        $dateBirthday->disabledDay("sat");
154
-        //        $dateBirthday->disabledDay("sun");
155
-        //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
156
-        //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
157
-        //        $dateBirthday->setAlignment('right', 'bottom'); //optional
158
-        // echo "<table><tr><td>zzzzz</td><td></td><td>";
159
-        // echo $dateBirthday->render();
160
-        // echo "</td></tr></table>";
161
-        //echo $dateBirthday->render();
162
-        //================================================
163
-        // @author      Gregory Mage (Aka Mage)
164
-        //***************************************************************************************
165
-        //         include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
166
-        $eventAdmin = new ModuleAdmin();
167
-        echo $eventAdmin->addNavigation(basename(__FILE__));
168
-        //***************************************************************************************
169
-
170
-        $eventId = $_GET['event_id'];
171
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
172
-
173
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
174
-
175
-        if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
176
-            $form->display();
177
-        }
178 178
 
179
-        echo '</fieldset><br>';
179
+            echo '</fieldset><br>';
180 180
 
181
-        xoops_cp_footer();
181
+            xoops_cp_footer();
182 182
 
183
-        break;
183
+            break;
184 184
 
185
-    case 'clone2': /* sur clique de l'icone du formulaire*/
185
+        case 'clone2': /* sur clique de l'icone du formulaire*/
186 186
 
187
-        //$newEventId = 1;
188
-        $eventId = $_GET['event_id'];
189
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
190
-        $event = $eventHandler->getEvent($eventId);
191
-        $t = $event->getVars();
192
-        $data = array();
193
-        while (list($key, $val) = each($t)) {
194
-            $data[$key] = $val['value'];
195
-        }
187
+            //$newEventId = 1;
188
+            $eventId = $_GET['event_id'];
189
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
190
+            $event = $eventHandler->getEvent($eventId);
191
+            $t = $event->getVars();
192
+            $data = array();
193
+            while (list($key, $val) = each($t)) {
194
+                $data[$key] = $val['value'];
195
+            }
196 196
 
197
-        $data['event_id'] = 0;
198
-        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
197
+            $data['event_id'] = 0;
198
+            $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
199 199
 
200
-        $newEvent = $eventHandler->create();
201
-        $newEvent->setVars($data);
202
-        $t = $eventHandler->insert($newEvent, true);
200
+            $newEvent = $eventHandler->create();
201
+            $newEvent->setVars($data);
202
+            $t = $eventHandler->insert($newEvent, true);
203 203
 
204
-        $newEventId = $newEvent->getVar('event_id');
205
-        $ts = print_r($newEventId, true);
204
+            $newEventId = $newEvent->getVar('event_id');
205
+            $ts = print_r($newEventId, true);
206 206
 
207
-        redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
208
-        break;
207
+            redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
208
+            break;
209 209
 
210
-    case 'delete':
210
+        case 'delete':
211 211
 
212
-        if (isset($_POST['confirm'])) {
213
-            if (!$GLOBALS['xoopsSecurity']->check()) {
214
-                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
215
-                exit;
212
+            if (isset($_POST['confirm'])) {
213
+                if (!$GLOBALS['xoopsSecurity']->check()) {
214
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
215
+                    exit;
216
+                }
217
+                //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
218
+                //             $eventHandler->deleteEvent($_POST['event_id']);
219
+                deleteEvents($_POST['event_id']);
220
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
221
+            } else {
222
+                xoops_cp_header();
223
+                // @author      Gregory Mage (Aka Mage)
224
+                //***************************************************************************************
225
+                //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
226
+                $eventAdmin = new ModuleAdmin();
227
+                echo $eventAdmin->addNavigation(basename(__FILE__));
228
+                //***************************************************************************************
229
+
230
+                $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
231
+                xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
232
+
233
+                xoops_cp_footer();
216 234
             }
217
-            //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
218
-            //             $eventHandler->deleteEvent($_POST['event_id']);
219
-            deleteEvents($_POST['event_id']);
220
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
221
-        } else {
235
+
236
+            break;
237
+
238
+        case 'deleteSelection':
239
+
222 240
             xoops_cp_header();
223 241
             // @author      Gregory Mage (Aka Mage)
224 242
             //***************************************************************************************
@@ -226,186 +244,168 @@  discard block
 block discarded – undo
226 244
             $eventAdmin = new ModuleAdmin();
227 245
             echo $eventAdmin->addNavigation(basename(__FILE__));
228 246
             //***************************************************************************************
247
+            if (isset($_POST['deleteSelection'][0])) {
248
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
249
+                $ids = array_keys($_POST['deleteAllEvents']);
250
+            } else {
251
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
252
+                $ids = array_keys($_POST['deleteEvents']);
253
+            }
229 254
 
230
-            $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
231
-            xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
255
+            //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
256
+            //           $ids = array_keys($_POST['deleteEvents']);
257
+            $ids = implode(',', $ids);
258
+            //echo $ids.'<br>';
259
+            $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
260
+            //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
261
+            xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
232 262
 
233 263
             xoops_cp_footer();
234
-        }
235 264
 
236
-        break;
237
-
238
-    case 'deleteSelection':
239
-
240
-        xoops_cp_header();
241
-        // @author      Gregory Mage (Aka Mage)
242
-        //***************************************************************************************
243
-        //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
244
-        $eventAdmin = new ModuleAdmin();
245
-        echo $eventAdmin->addNavigation(basename(__FILE__));
246
-        //***************************************************************************************
247
-        if (isset($_POST['deleteSelection'][0])) {
248
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
249
-            $ids = array_keys($_POST['deleteAllEvents']);
250
-        } else {
251
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
252
-            $ids = array_keys($_POST['deleteEvents']);
253
-        }
265
+            break;
254 266
 
255
-        //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
256
-        //           $ids = array_keys($_POST['deleteEvents']);
257
-        $ids = implode(',', $ids);
258
-        //echo $ids.'<br>';
259
-        $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
260
-        //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
261
-        xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
262
-
263
-        xoops_cp_footer();
264
-
265
-        break;
266
-
267
-    case 'deleteSelectionOK':
268
-        //-----------------------------------------
269
-        // $t = print_r($_GET,true);
270
-        // echo "<hr><pre>{$t}</pre><hr>";
271
-        //
272
-        // $t = print_r($_POST,true);
273
-        // echo "<hr><pre>{$t}</pre><hr>";
274
-        // exit;
275
-        //-----------------------------------------
276
-
277
-        if (isset($_POST['deleteSelection'][0])) {
278
-        } else {
279
-            if (!$GLOBALS['xoopsSecurity']->check()) {
280
-                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
281
-                exit;
282
-            }
267
+        case 'deleteSelectionOK':
268
+            //-----------------------------------------
269
+            // $t = print_r($_GET,true);
270
+            // echo "<hr><pre>{$t}</pre><hr>";
271
+            //
272
+            // $t = print_r($_POST,true);
273
+            // echo "<hr><pre>{$t}</pre><hr>";
274
+            // exit;
275
+            //-----------------------------------------
283 276
 
284
-            deleteEvents($_POST['event_ids']);
277
+            if (isset($_POST['deleteSelection'][0])) {
278
+            } else {
279
+                if (!$GLOBALS['xoopsSecurity']->check()) {
280
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
281
+                    exit;
282
+                }
285 283
 
286
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
287
-        }
284
+                deleteEvents($_POST['event_ids']);
288 285
 
289
-        break;
286
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
287
+            }
290 288
 
291
-    case 'default':
292
-    default:
289
+            break;
293 290
 
294
-        //global $extcalConfig;
295
-        $extcalConfig = ExtcalConfig::getHandler();
296
-        $xoopsModuleConfig = $extcalConfig->getModuleConfig();
291
+        case 'default':
292
+        default:
297 293
 
298
-        $start = isset($_GET['start']) ? $_GET['start'] : 0;
299
-        $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
294
+            //global $extcalConfig;
295
+            $extcalConfig = ExtcalConfig::getHandler();
296
+            $xoopsModuleConfig = $extcalConfig->getModuleConfig();
300 297
 
301
-        xoops_cp_header();
302
-        // @author      Gregory Mage (Aka Mage)
303
-        //***************************************************************************************
298
+            $start = isset($_GET['start']) ? $_GET['start'] : 0;
299
+            $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
304 300
 
305
-        $eventAdmin = new ModuleAdmin();
306
-        echo $eventAdmin->addNavigation(basename(__FILE__));
307
-        //***************************************************************************************
301
+            xoops_cp_header();
302
+            // @author      Gregory Mage (Aka Mage)
303
+            //***************************************************************************************
308 304
 
309
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
310
-        $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
311
-        $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
305
+            $eventAdmin = new ModuleAdmin();
306
+            echo $eventAdmin->addNavigation(basename(__FILE__));
307
+            //***************************************************************************************
312 308
 
313
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
314
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
315
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
316
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
309
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
310
+            $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
311
+            $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
317 312
 
318
-        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
319
-        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
313
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
314
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
315
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
316
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
320 317
 
321
-        echo '</fieldset><br>';
318
+            echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
319
+            echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
322 320
 
323
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
321
+            echo '</fieldset><br>';
324 322
 
325
-        echo '<form method="POST" action="event.php">';
326
-        echo '<input type="hidden" name="op" value="deleteSelection" />';
323
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
327 324
 
328
-        echo '<table class="outer" style="width:100%;">';
329
-        echo '<tr style="text-align:center;">';
330
-        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
331
-        echo '<th>#</th>';
332
-        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
333
-        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
334
-        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
335
-        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
336
-        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
337
-        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
338
-        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
325
+            echo '<form method="POST" action="event.php">';
326
+            echo '<input type="hidden" name="op" value="deleteSelection" />';
339 327
 
340
-        echo '</tr>';
328
+            echo '<table class="outer" style="width:100%;">';
329
+            echo '<tr style="text-align:center;">';
330
+            echo '<th>'._AM_EXTCAL_DELETE.'</th>';
331
+            echo '<th>#</th>';
332
+            echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
333
+            echo '<th>'._AM_EXTCAL_TITLE.'</th>';
334
+            echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
335
+            echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
336
+            echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
337
+            echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
338
+            echo '<th>'._AM_EXTCAL_ACTION.'</th>';
341 339
 
342
-        if (count($events) > 0) {
343
-            $i = 0;
344
-            foreach ($events as $event) {
345
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
346
-                echo '<tr style="text-align:left;" class="'.$class.'">';
347
-                echo "<td width='10%' align='center'>";
348
-                echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
349
-                echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />";
350
-                echo '</td>';
351
-                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
352
-                echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>';
353
-
354
-                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
355
-
356
-                //                 if ($event['event_isrecur']) {
357
-                //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
358
-                //                 } else {
359
-                //                     echo '<td>' . $event['formated_event_start'] . '</td>';
360
-                //                 }
361
-
362
-                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
363
-                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
364
-                echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
365
-                if (!isset($event['formated_reccur_rule'])) {
366
-                    $event['formated_reccur_rule'] = '';
340
+            echo '</tr>';
341
+
342
+            if (count($events) > 0) {
343
+                $i = 0;
344
+                foreach ($events as $event) {
345
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
346
+                    echo '<tr style="text-align:left;" class="'.$class.'">';
347
+                    echo "<td width='10%' align='center'>";
348
+                    echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
349
+                    echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />";
350
+                    echo '</td>';
351
+                    echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
352
+                    echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>';
353
+
354
+                    echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
355
+
356
+                    //                 if ($event['event_isrecur']) {
357
+                    //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
358
+                    //                 } else {
359
+                    //                     echo '<td>' . $event['formated_event_start'] . '</td>';
360
+                    //                 }
361
+
362
+                    echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
363
+                    echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
364
+                    echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
365
+                    if (!isset($event['formated_reccur_rule'])) {
366
+                        $event['formated_reccur_rule'] = '';
367
+                    }
368
+                    echo '<td>'.$event['formated_reccur_rule'].'</td>';
369
+
370
+                    echo '<td style="width:10%; text-align:center;">';
371
+                    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;";
372
+                    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;";
373
+                    echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>";
374
+                    echo '</td>';
375
+
376
+                    echo '</tr>';
367 377
                 }
368
-                echo '<td>'.$event['formated_reccur_rule'].'</td>';
378
+                //---------------------------------------------------------
379
+                $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
369 380
 
370
-                echo '<td style="width:10%; text-align:center;">';
371
-                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;";
372
-                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;";
373
-                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>";
381
+                echo '<tr><td colspan="2" style="text-align: right;">';
382
+                echo $pageNav->renderNav(2);
374 383
                 echo '</td>';
375 384
 
376
-                echo '</tr>';
377
-            }
378
-            //---------------------------------------------------------
379
-            $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
385
+                echo '<td colspan="2" style="text-align: right;">';
380 386
 
381
-            echo '<tr><td colspan="2" style="text-align: right;">';
382
-            echo $pageNav->renderNav(2);
383
-            echo '</td>';
387
+                echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
388
+                echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
384 389
 
385
-            echo '<td colspan="2" style="text-align: right;">';
386
-
387
-            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
388
-            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
389
-
390
-            echo '</td>';
391
-            echo '</tr>';
392
-        } else {
393
-            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
394
-        }
395
-        echo '</table>';
396
-        echo '</form>';
390
+                echo '</td>';
391
+                echo '</tr>';
392
+            } else {
393
+                echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
394
+            }
395
+            echo '</table>';
396
+            echo '</form>';
397 397
 
398
-        echo '</fieldset>';
399
-        echo '</fieldset><br><br>';
400
-        //Fin de la liste des evennement -------------------------------------
401
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
398
+            echo '</fieldset>';
399
+            echo '</fieldset><br><br>';
400
+            //Fin de la liste des evennement -------------------------------------
401
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
402 402
 
403
-        $form = $eventHandler->getEventForm('admin');
404
-        $form->display();
403
+            $form = $eventHandler->getEventForm('admin');
404
+            $form->display();
405 405
 
406
-        echo '</fieldset>';
406
+            echo '</fieldset>';
407 407
 
408
-        include_once __DIR__.'/admin_footer.php';
408
+            include_once __DIR__.'/admin_footer.php';
409 409
 
410
-        break;
410
+            break;
411 411
 }
Please login to merge, or discard this patch.
class/pcltar.lib.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2309,7 +2309,7 @@  discard block
 block discarded – undo
2309 2309
         $p_tar_mode
2310 2310
     ) {
2311 2311
         TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractByIndexList',
2312
-                   "archive='$p_tarname', index_string='$p_index_string', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
2312
+                    "archive='$p_tarname', index_string='$p_index_string', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
2313 2313
         $v_result = 1;
2314 2314
         $v_nb = 0;
2315 2315
 
@@ -2420,7 +2420,7 @@  discard block
 block discarded – undo
2420 2420
         $p_tar_mode
2421 2421
     ) {
2422 2422
         TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractByIndex',
2423
-                   "archive_descr='$p_tar', index_current=$p_index_current, index_start='$p_index_start', index_stop='$p_index_stop', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
2423
+                    "archive_descr='$p_tar', index_current=$p_index_current, index_start='$p_index_start', index_stop='$p_index_stop', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
2424 2424
         $v_result = 1;
2425 2425
         $v_nb = 0;
2426 2426
 
@@ -2623,8 +2623,8 @@  discard block
 block discarded – undo
2623 2623
                 else {
2624 2624
                     if (filemtime($v_header['filename']) > $v_header['mtime']) {
2625 2625
                         TrFctMessage(__FILE__, __LINE__, 2,
2626
-                                     'Existing file '.$v_header['filename'].' is newer ('.date('l dS of F Y h:i:s A', filemtime($v_header['filename'])).') than the extracted file ('
2627
-                                     .date('l dS of F Y h:i:s A', $v_header['mtime']).')');
2626
+                                        'Existing file '.$v_header['filename'].' is newer ('.date('l dS of F Y h:i:s A', filemtime($v_header['filename'])).') than the extracted file ('
2627
+                                        .date('l dS of F Y h:i:s A', $v_header['mtime']).')');
2628 2628
 
2629 2629
                         // ----- Change the file status
2630 2630
                         $v_header['status'] = 'newer_exist';
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/6.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                     echo "<td></td>\n";
86 86
                 } elseif ($Day->isSelected()) {
87 87
                     echo '<td><anchor><strong><u>'.$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='
88
-                             .$Day->thisMonth().'&amp;d='.$Day->thisDay()."&amp;mime=wml\" />\n</anchor></td>\n";
88
+                                .$Day->thisMonth().'&amp;d='.$Day->thisDay()."&amp;mime=wml\" />\n</anchor></td>\n";
89 89
                 } else {
90 90
                     echo '<td><anchor>'.$Day->thisDay()."\n<go href=\"?viewday=true&amp;y=".$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay()
91
-                             ."&amp;mime=wml\" /></anchor></td>\n";
91
+                                ."&amp;mime=wml\" /></anchor></td>\n";
92 92
                 }
93 93
                 if ($Day->isLast()) {
94 94
                     echo "</tr>\n";
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
                 echo "<td></td>\n";
182 182
             } elseif ($Day->isSelected()) {
183 183
                 echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'&amp;wml"><strong><u>'
184
-                         .$Day->thisDay()."</u></strong></a></td>\n";
184
+                            .$Day->thisDay()."</u></strong></a></td>\n";
185 185
             } else {
186 186
                 echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'">'.$Day->thisDay()
187
-                         ."</a></td>\n";
187
+                            ."</a></td>\n";
188 188
             }
189 189
             if ($Day->isLast()) {
190 190
                 echo "</tr>\n";
Please login to merge, or discard this patch.
class/pear/Calendar/tests/year_test.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
     public function testPrevMonth_Array()
43 43
     {
44 44
         $this->assertEqual(array(
45
-                               'year' => 2002,
46
-                               'month' => 12,
47
-                               'day' => 1,
48
-                               'hour' => 0,
49
-                               'minute' => 0,
50
-                               'second' => 0,
51
-                           ), $this->cal->prevMonth('array'));
45
+                                'year' => 2002,
46
+                                'month' => 12,
47
+                                'day' => 1,
48
+                                'hour' => 0,
49
+                                'minute' => 0,
50
+                                'second' => 0,
51
+                            ), $this->cal->prevMonth('array'));
52 52
     }
53 53
 
54 54
     public function testThisMonth()
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
     public function testPrevDay_Array()
70 70
     {
71 71
         $this->assertEqual(array(
72
-                               'year' => 2002,
73
-                               'month' => 12,
74
-                               'day' => 31,
75
-                               'hour' => 0,
76
-                               'minute' => 0,
77
-                               'second' => 0,
78
-                           ), $this->cal->prevDay('array'));
72
+                                'year' => 2002,
73
+                                'month' => 12,
74
+                                'day' => 31,
75
+                                'hour' => 0,
76
+                                'minute' => 0,
77
+                                'second' => 0,
78
+                            ), $this->cal->prevDay('array'));
79 79
     }
80 80
 
81 81
     public function testThisDay()
Please login to merge, or discard this patch.
class/pear/Calendar/tests/week_test.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@
 block discarded – undo
71 71
     public function testPrevDay_Array()
72 72
     {
73 73
         $this->assertEqual(array(
74
-                               'year' => 2003,
75
-                               'month' => 10,
76
-                               'day' => 8,
77
-                               'hour' => 0,
78
-                               'minute' => 0,
79
-                               'second' => 0,
80
-                           ), $this->cal->prevDay('array'));
74
+                                'year' => 2003,
75
+                                'month' => 10,
76
+                                'day' => 8,
77
+                                'hour' => 0,
78
+                                'minute' => 0,
79
+                                'second' => 0,
80
+                            ), $this->cal->prevDay('array'));
81 81
     }
82 82
 
83 83
     public function testThisDay()
Please login to merge, or discard this patch.
class/pear/Calendar/tests/calendar_test.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
     public function testPrevYear_Array()
38 38
     {
39 39
         $this->assertEqual(array(
40
-                               'year' => 2002,
41
-                               'month' => 1,
42
-                               'day' => 1,
43
-                               'hour' => 0,
44
-                               'minute' => 0,
45
-                               'second' => 0,
46
-                           ), $this->cal->prevYear('array'));
40
+                                'year' => 2002,
41
+                                'month' => 1,
42
+                                'day' => 1,
43
+                                'hour' => 0,
44
+                                'minute' => 0,
45
+                                'second' => 0,
46
+                            ), $this->cal->prevYear('array'));
47 47
     }
48 48
 
49 49
     public function testThisYear()
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
     public function testPrevMonth_Array()
65 65
     {
66 66
         $this->assertEqual(array(
67
-                               'year' => 2003,
68
-                               'month' => 9,
69
-                               'day' => 1,
70
-                               'hour' => 0,
71
-                               'minute' => 0,
72
-                               'second' => 0,
73
-                           ), $this->cal->prevMonth('array'));
67
+                                'year' => 2003,
68
+                                'month' => 9,
69
+                                'day' => 1,
70
+                                'hour' => 0,
71
+                                'minute' => 0,
72
+                                'second' => 0,
73
+                            ), $this->cal->prevMonth('array'));
74 74
     }
75 75
 
76 76
     public function testThisMonth()
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
     public function testPrevDay_Array()
92 92
     {
93 93
         $this->assertEqual(array(
94
-                               'year' => 2003,
95
-                               'month' => 10,
96
-                               'day' => 24,
97
-                               'hour' => 0,
98
-                               'minute' => 0,
99
-                               'second' => 0,
100
-                           ), $this->cal->prevDay('array'));
94
+                                'year' => 2003,
95
+                                'month' => 10,
96
+                                'day' => 24,
97
+                                'hour' => 0,
98
+                                'minute' => 0,
99
+                                'second' => 0,
100
+                            ), $this->cal->prevDay('array'));
101 101
     }
102 102
 
103 103
     public function testThisDay()
Please login to merge, or discard this patch.
class/pear/Calendar/tests/month_weekdays_test.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
     public function testPrevDay_Array()
33 33
     {
34 34
         $this->assertEqual(array(
35
-                               'year' => 2003,
36
-                               'month' => 9,
37
-                               'day' => 30,
38
-                               'hour' => 0,
39
-                               'minute' => 0,
40
-                               'second' => 0,
41
-                           ), $this->cal->prevDay('array'));
35
+                                'year' => 2003,
36
+                                'month' => 9,
37
+                                'day' => 30,
38
+                                'hour' => 0,
39
+                                'minute' => 0,
40
+                                'second' => 0,
41
+                            ), $this->cal->prevDay('array'));
42 42
     }
43 43
 
44 44
     public function testThisDay()
Please login to merge, or discard this patch.