Completed
Push — master ( a21b67...ec1681 )
by Michael
02:43
created
class/pear/Calendar/docs/examples/9.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 if (!@include 'Calendar/Calendar.php') {
6 6
     define('CALENDAR_ROOT', '../../');
7 7
 }
8
-require_once CALENDAR_ROOT . 'Day.php';
8
+require_once CALENDAR_ROOT.'Day.php';
9 9
 
10 10
 $Day = new Calendar_Day(2003, 10, 23);
11 11
 
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/13.php 2 patches
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.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     list($usec, $sec) = explode(' ', microtime());
11 11
 
12
-    return (float)$usec + (float)$sec;
12
+    return (float) $usec + (float) $sec;
13 13
 }
14 14
 
15 15
 // Switch to PEAR::Date engine
@@ -42,27 +42,27 @@  discard block
 block discarded – undo
42 42
     default:
43 43
         $_GET['view'] = 'calendar_year';
44 44
     case 'calendar_year':
45
-        require_once CALENDAR_ROOT . 'Year.php';
45
+        require_once CALENDAR_ROOT.'Year.php';
46 46
         $c = new Calendar_Year($_GET['y']);
47 47
         break;
48 48
     case 'calendar_month':
49
-        require_once CALENDAR_ROOT . 'Month.php';
49
+        require_once CALENDAR_ROOT.'Month.php';
50 50
         $c = new Calendar_Month($_GET['y'], $_GET['m']);
51 51
         break;
52 52
     case 'calendar_day':
53
-        require_once CALENDAR_ROOT . 'Day.php';
53
+        require_once CALENDAR_ROOT.'Day.php';
54 54
         $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']);
55 55
         break;
56 56
     case 'calendar_hour':
57
-        require_once CALENDAR_ROOT . 'Hour.php';
57
+        require_once CALENDAR_ROOT.'Hour.php';
58 58
         $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']);
59 59
         break;
60 60
     case 'calendar_minute':
61
-        require_once CALENDAR_ROOT . 'Minute.php';
61
+        require_once CALENDAR_ROOT.'Minute.php';
62 62
         $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']);
63 63
         break;
64 64
     case 'calendar_second':
65
-        require_once CALENDAR_ROOT . 'Second.php';
65
+        require_once CALENDAR_ROOT.'Second.php';
66 66
         $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']);
67 67
         break;
68 68
 }
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 $date = new Date($c->getTimestamp());
72 72
 
73 73
 echo '<h1>Using PEAR::Date engine</h1>';
74
-echo 'Viewing: ' . @$_GET['view'] . '<br>';
75
-echo 'The time is now: ' . $date->format('%Y %a %e %T') . '<br >';
74
+echo 'Viewing: '.@$_GET['view'].'<br>';
75
+echo 'The time is now: '.$date->format('%Y %a %e %T').'<br >';
76 76
 
77 77
 $i = 1;
78 78
 echo '<h1>First Iteration</h1>';
@@ -82,15 +82,15 @@  discard block
 block discarded – undo
82 82
 $c->build();
83 83
 while ($e = $c->fetch()) {
84 84
     $class  = strtolower(get_class($e));
85
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
86
-    $method = 'this' . str_replace('calendar_', '', $class);
87
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
85
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
86
+    $method = 'this'.str_replace('calendar_', '', $class);
87
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
88 88
     if (($i % 10) == 0) {
89 89
         echo '<br>';
90 90
     }
91 91
     ++$i;
92 92
 }
93
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
93
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
94 94
 
95 95
 $i = 1;
96 96
 echo '<h1>Second Iteration</h1>';
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
 $start = getmicrotime();
100 100
 while ($e = $c->fetch()) {
101 101
     $class  = strtolower(get_class($e));
102
-    $link   = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond();
103
-    $method = 'this' . str_replace('calendar_', '', $class);
104
-    echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : ';
102
+    $link   = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond();
103
+    $method = 'this'.str_replace('calendar_', '', $class);
104
+    echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : ';
105 105
     if (($i % 10) == 0) {
106 106
         echo '<br>';
107 107
     }
108 108
     ++$i;
109 109
 }
110
-echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>';
110
+echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>';
Please login to merge, or discard this patch.
blocks/minical.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
     // Flag current day
145 145
     $selectedDays = array(
146 146
         new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))), date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))),
147
-                         date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))),
147
+                            date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))),
148 148
     );
149 149
 
150 150
     // Build calendar object
Please login to merge, or discard this patch.
blocks/spotlight_events.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/../include/constantes.php';
3
+require_once __DIR__.'/../include/constantes.php';
4 4
 
5 5
 //---------------------------------------------------------------------
6 6
 
Please login to merge, or discard this patch.
admin/admin_footer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
  **/
20 20
 
21 21
 $pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
22
-echo "<div class='adminfooter'>\n" . "  <div style='text-align: center;'>\n" . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
22
+echo "<div class='adminfooter'>\n"."  <div style='text-align: center;'>\n"."    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"."  </div>\n".'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>';
23 23
 
24 24
 xoops_cp_footer();
Please login to merge, or discard this patch.
admin/main.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -87,27 +87,27 @@
 block discarded – undo
87 87
                 $fromemail      = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E');
88 88
                 $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span>&nbsp;&nbsp;&nbsp;';
89 89
                 $bodyCaption    = _AM_EXTCAL_BODY
90
-                                  . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
91
-                                  . _AM_EXTCAL_USEFUL_TAGS
92
-                                  . "</span><br><span style='font-size:x-small;font-weight:normal;'>"
93
-                                  . _AM_EXTCAL_MAILTAGS1
94
-                                  . '<br>'
95
-                                  . _AM_EXTCAL_MAILTAGS2
96
-                                  . '<br>'
97
-                                  . _AM_EXTCAL_MAILTAGS3
98
-                                  . '<br>'
99
-                                  . _AM_EXTCAL_MAILTAGS4
100
-                                  . '<br>'
101
-                                  . _AM_EXTCAL_MAILTAGS5
102
-                                  . '<br>'
103
-                                  . _AM_EXTCAL_MAILTAGS6
104
-                                  . '<br>'
105
-                                  . _AM_EXTCAL_MAILTAGS7
106
-                                  . '<br>'
107
-                                  . _AM_EXTCAL_MAILTAGS8
108
-                                  . '<br>'
109
-                                  . _AM_EXTCAL_MAILTAGS9
110
-                                  . '</span>&nbsp;&nbsp;&nbsp;';
90
+                                    . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
91
+                                    . _AM_EXTCAL_USEFUL_TAGS
92
+                                    . "</span><br><span style='font-size:x-small;font-weight:normal;'>"
93
+                                    . _AM_EXTCAL_MAILTAGS1
94
+                                    . '<br>'
95
+                                    . _AM_EXTCAL_MAILTAGS2
96
+                                    . '<br>'
97
+                                    . _AM_EXTCAL_MAILTAGS3
98
+                                    . '<br>'
99
+                                    . _AM_EXTCAL_MAILTAGS4
100
+                                    . '<br>'
101
+                                    . _AM_EXTCAL_MAILTAGS5
102
+                                    . '<br>'
103
+                                    . _AM_EXTCAL_MAILTAGS6
104
+                                    . '<br>'
105
+                                    . _AM_EXTCAL_MAILTAGS7
106
+                                    . '<br>'
107
+                                    . _AM_EXTCAL_MAILTAGS8
108
+                                    . '<br>'
109
+                                    . _AM_EXTCAL_MAILTAGS9
110
+                                    . '</span>&nbsp;&nbsp;&nbsp;';
111 111
                 $toCheckBbox    = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
112 112
                 $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL);
113 113
                 $toCheckBox->addOption('pm', _AM_EXTCAL_PM);
Please login to merge, or discard this patch.
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 switch ($op) {
36
-    case 'notification':
37
-        switch ($fct) {
36
+        case 'notification':
37
+            switch ($fct) {
38 38
             case 'send':
39 39
                 if (!$GLOBALS['xoopsSecurity']->check()) {
40 40
                     redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
@@ -130,78 +130,78 @@  discard block
 block discarded – undo
130 130
                 xoops_cp_footer();
131 131
 
132 132
                 break;
133
-        }
133
+            }
134 134
         break;
135 135
 
136
-    default:
137
-    case 'default':
138
-        // @author      Gregory Mage (Aka Mage)
139
-        //***************************************************************************************
140
-        xoops_cp_header();
141
-        //        require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
142
-        //        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
143
-        //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
144
-        $adminObject = \Xmf\Module\Admin::getInstance();
145
-        $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
146
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green');
147
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
149
-        $criteriaCompo = new CriteriaCompo();
150
-        $criteriaCompo->add(new Criteria('event_approved', 1));
151
-        $criteriaCompo->add(new Criteria('event_start', time(), '>='));
152
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green');
153
-
154
-        $adminObject->addConfigBoxLine();
155
-        $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
156
-        $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
157
-
158
-        //JJD
159
-        //         $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
160
-
161
-        //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
162
-        //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
163
-        $adminObject->displayNavigation(basename(__FILE__));
164
-        $adminObject->displayIndex();
165
-        //***************************************************************************************
166
-        $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id'));
167
-        $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
168
-
169
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
170
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
171
-        //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
172
-        echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
173
-        echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
174
-        echo '</fieldset><br>';
175
-
176
-        echo '<table class="outer" style="width:100%;">';
177
-        echo '<tr style="text-align:center;">';
178
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
179
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
180
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
181
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
182
-        echo '</tr>';
183
-
184
-        if (count($pendingEvent) > 0) {
185
-            $i = 0;
186
-            foreach ($pendingEvent as $event) {
187
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
188
-                echo '<tr style="text-align:center;" class="' . $class . '">';
189
-                echo '<td>' . $event['cat']['cat_name'] . '</td>';
190
-                echo '<td>' . $event['event_title'] . '</td>';
191
-                echo '<td>' . $event['formated_event_start'] . '</td>';
192
-                echo '<td style="width:10%; text-align:center;">';
193
-                echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
194
-                echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
195
-                echo '</td>';
196
-                echo '</tr>';
136
+        default:
137
+        case 'default':
138
+            // @author      Gregory Mage (Aka Mage)
139
+            //***************************************************************************************
140
+            xoops_cp_header();
141
+            //        require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
142
+            //        $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
143
+            //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
144
+            $adminObject = \Xmf\Module\Admin::getInstance();
145
+            $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
146
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green');
147
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
149
+            $criteriaCompo = new CriteriaCompo();
150
+            $criteriaCompo->add(new Criteria('event_approved', 1));
151
+            $criteriaCompo->add(new Criteria('event_start', time(), '>='));
152
+            $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green');
153
+
154
+            $adminObject->addConfigBoxLine();
155
+            $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
156
+            $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder');
157
+
158
+            //JJD
159
+            //         $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder');
160
+
161
+            //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php');
162
+            //        $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops');
163
+            $adminObject->displayNavigation(basename(__FILE__));
164
+            $adminObject->displayIndex();
165
+            //***************************************************************************************
166
+            $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id'));
167
+            $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
168
+
169
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
170
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
171
+            //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
172
+            echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
173
+            echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
174
+            echo '</fieldset><br>';
175
+
176
+            echo '<table class="outer" style="width:100%;">';
177
+            echo '<tr style="text-align:center;">';
178
+            echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
179
+            echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
180
+            echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
181
+            echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
182
+            echo '</tr>';
183
+
184
+            if (count($pendingEvent) > 0) {
185
+                $i = 0;
186
+                foreach ($pendingEvent as $event) {
187
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
188
+                    echo '<tr style="text-align:center;" class="' . $class . '">';
189
+                    echo '<td>' . $event['cat']['cat_name'] . '</td>';
190
+                    echo '<td>' . $event['event_title'] . '</td>';
191
+                    echo '<td>' . $event['formated_event_start'] . '</td>';
192
+                    echo '<td style="width:10%; text-align:center;">';
193
+                    echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
194
+                    echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
195
+                    echo '</td>';
196
+                    echo '</tr>';
197
+                }
198
+            } else {
199
+                echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
197 200
             }
198
-        } else {
199
-            echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
200
-        }
201 201
 
202
-        echo '</table></fieldset><br>';
202
+            echo '</table></fieldset><br>';
203 203
 
204
-        require_once __DIR__ . '/admin_footer.php';
204
+            require_once __DIR__ . '/admin_footer.php';
205 205
 
206
-        break;
206
+            break;
207 207
 }
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/../../../include/cp_header.php';
4
-include __DIR__ . '/../../../class/xoopsformloader.php';
5
-require_once __DIR__ . '/admin_header.php';
3
+require_once __DIR__.'/../../../include/cp_header.php';
4
+include __DIR__.'/../../../class/xoopsformloader.php';
5
+require_once __DIR__.'/admin_header.php';
6 6
 
7 7
 function extgalleryLastVersion()
8 8
 {
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         switch ($fct) {
38 38
             case 'send':
39 39
                 if (!$GLOBALS['xoopsSecurity']->check()) {
40
-                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
40
+                    redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
41 41
                 }
42 42
                 xoops_cp_header();
43 43
                 adminMenu(1);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     'EV_TITLE' => $event->getVar('event_title'),
71 71
                     'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')),
72 72
                     'EV_END'   => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')),
73
-                    'EV_LINK'  => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'),
73
+                    'EV_LINK'  => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'),
74 74
                 );
75 75
                 $xoopsMailer->assign($tag);
76 76
                 $xoopsMailer->send(true);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             default:
86 86
                 xoops_cp_header();
87 87
                 $fromemail      = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E');
88
-                $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span>&nbsp;&nbsp;&nbsp;';
88
+                $subjectCaption = _AM_EXTCAL_SUBJECT."<br><br><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS2.'</span>&nbsp;&nbsp;&nbsp;';
89 89
                 $bodyCaption    = _AM_EXTCAL_BODY
90 90
                                   . "<br><br><span style='font-size:x-small;font-weight:bold;'>"
91 91
                                   . _AM_EXTCAL_USEFUL_TAGS
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
                                   . '<br>'
109 109
                                   . _AM_EXTCAL_MAILTAGS9
110 110
                                   . '</span>&nbsp;&nbsp;&nbsp;';
111
-                $toCheckBbox    = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
111
+                $toCheckBbox = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail');
112 112
                 $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL);
113 113
                 $toCheckBox->addOption('pm', _AM_EXTCAL_PM);
114 114
 
115
-                echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
116
-                echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
115
+                echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
116
+                echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
117 117
                 echo _AM_EXTCAL_INFO_SEND_NOTIF;
118 118
                 echo '</fieldset><br>';
119 119
                 $form = new XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&amp;fct=send', 'post', true);
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
         //        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
144 144
         $adminObject = \Xmf\Module\Admin::getInstance();
145 145
         $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD);
146
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green');
147
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
146
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount(), 'Green');
147
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green');
148
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red');
149 149
         $criteriaCompo = new CriteriaCompo();
150 150
         $criteriaCompo->add(new Criteria('event_approved', 1));
151 151
         $criteriaCompo->add(new Criteria('event_start', time(), '>='));
152
-        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green');
152
+        $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>', 'Green');
153 153
 
154 154
         $adminObject->addConfigBoxLine();
155 155
         $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH);
@@ -166,42 +166,42 @@  discard block
 block discarded – undo
166 166
         $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id'));
167 167
         $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y');
168 168
 
169
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
170
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
169
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>';
170
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
171 171
         //        echo '<img src="../assets/images/icons/on.png" >&nbsp;&nbsp;'._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>';
172
-        echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
173
-        echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
172
+        echo '<img src='.$pathIcon16.'/edit.png>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>';
173
+        echo '<img src='.$pathIcon16.'/delete.png>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>';
174 174
         echo '</fieldset><br>';
175 175
 
176 176
         echo '<table class="outer" style="width:100%;">';
177 177
         echo '<tr style="text-align:center;">';
178
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
179
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
180
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
181
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
178
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
179
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
180
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
181
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
182 182
         echo '</tr>';
183 183
 
184 184
         if (count($pendingEvent) > 0) {
185 185
             $i = 0;
186 186
             foreach ($pendingEvent as $event) {
187 187
                 $class = (++$i % 2 == 0) ? 'even' : 'odd';
188
-                echo '<tr style="text-align:center;" class="' . $class . '">';
189
-                echo '<td>' . $event['cat']['cat_name'] . '</td>';
190
-                echo '<td>' . $event['event_title'] . '</td>';
191
-                echo '<td>' . $event['formated_event_start'] . '</td>';
188
+                echo '<tr style="text-align:center;" class="'.$class.'">';
189
+                echo '<td>'.$event['cat']['cat_name'].'</td>';
190
+                echo '<td>'.$event['event_title'].'</td>';
191
+                echo '<td>'.$event['formated_event_start'].'</td>';
192 192
                 echo '<td style="width:10%; text-align:center;">';
193
-                echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
194
-                echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
193
+                echo '<a href="event.php?op=modify&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a>&nbsp;&nbsp;';
194
+                echo '<a href="event.php?op=delete&amp;event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>';
195 195
                 echo '</td>';
196 196
                 echo '</tr>';
197 197
             }
198 198
         } else {
199
-            echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
199
+            echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
200 200
         }
201 201
 
202 202
         echo '</table></fieldset><br>';
203 203
 
204
-        require_once __DIR__ . '/admin_footer.php';
204
+        require_once __DIR__.'/admin_footer.php';
205 205
 
206 206
         break;
207 207
 }
Please login to merge, or discard this patch.
admin/etablissement.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,10 +155,10 @@
 block discarded – undo
155 155
             }
156 156
         } else {
157 157
             xoops_confirm(array(
158
-                              'ok'               => 1,
159
-                              'etablissement_id' => $_REQUEST['etablissement_id'],
160
-                              'op'               => 'delete_etablissement',
161
-                          ), $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
158
+                                'ok'               => 1,
159
+                                'etablissement_id' => $_REQUEST['etablissement_id'],
160
+                                'op'               => 'delete_etablissement',
161
+                            ), $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
162 162
         }
163 163
         break;
164 164
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 // Include xoops admin header
21
-require_once __DIR__ . '/../../../include/cp_header.php';
22
-require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php';
23
-require_once __DIR__ . '/../../../kernel/module.php';
24
-require_once __DIR__ . '/../../../class/xoopsformloader.php';
25
-require_once __DIR__ . '/../../../class/tree.php';
26
-require_once __DIR__ . '/../../../class/xoopslists.php';
27
-require_once __DIR__ . '/../../../class/pagenav.php';
28
-require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php';
29
-require_once __DIR__ . '/../../../class/uploader.php';
30
-require_once __DIR__ . '/../class/etablissement.php';
31
-require_once __DIR__ . '/../include/constantes.php';
32
-
33
-require_once __DIR__ . '/admin_header.php';
21
+require_once __DIR__.'/../../../include/cp_header.php';
22
+require_once __DIR__.'/../class/ExtcalPersistableObjectHandler.php';
23
+require_once __DIR__.'/../../../kernel/module.php';
24
+require_once __DIR__.'/../../../class/xoopsformloader.php';
25
+require_once __DIR__.'/../../../class/tree.php';
26
+require_once __DIR__.'/../../../class/xoopslists.php';
27
+require_once __DIR__.'/../../../class/pagenav.php';
28
+require_once __DIR__.'/../../../class/xoopsform/grouppermform.php';
29
+require_once __DIR__.'/../../../class/uploader.php';
30
+require_once __DIR__.'/../class/etablissement.php';
31
+require_once __DIR__.'/../include/constantes.php';
32
+
33
+require_once __DIR__.'/admin_header.php';
34 34
 
35 35
 //include_once("functions.php");
36 36
 //include_once("../include/functions.php");
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 if ($xoopsUser) {
39 39
     $xoopsModule = XoopsModule::getByDirname('extcal');
40 40
     if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
41
-        redirect_header(XOOPS_URL . '/', 3, _NOPERM);
41
+        redirect_header(XOOPS_URL.'/', 3, _NOPERM);
42 42
     }
43 43
 } else {
44
-    redirect_header(XOOPS_URL . '/', 3, _NOPERM);
44
+    redirect_header(XOOPS_URL.'/', 3, _NOPERM);
45 45
 }
46 46
 
47 47
 // Include language file
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $etablissement_arr = $etablissementHandler->getObjects($criteria);
99 99
         $numrows           = $etablissementHandler->getCount($criteria);
100 100
         if ($numrows > $limit) {
101
-            $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit);
101
+            $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit);
102 102
             $pagenav = $pagenav->renderNav(4);
103 103
         } else {
104 104
             $pagenav = '';
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         if ($numrows > 0) {
108 108
             echo '<table width="100%" cellspacing="1" class="outer">';
109 109
             echo '<tr>';
110
-            echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>';
111
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>';
112
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>';
113
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>';
114
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>';
110
+            echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>';
111
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>';
112
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>';
113
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>';
114
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>';
115 115
             echo '</tr>';
116 116
             $class = 'odd';
117 117
             foreach (array_keys($etablissement_arr) as $i) {
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
                 $etablissement_adresse   = $etablissement_arr[$i]->getVar('adresse');
122 122
                 $etablissement_city      = $etablissement_arr[$i]->getVar('ville');
123 123
                 $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe');
124
-                echo '<tr class="' . $class . '">';
125
-                echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>';
124
+                echo '<tr class="'.$class.'">';
125
+                echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>';
126 126
 
127
-                echo '<td align="center"><b>' . $etablissement_adresse . '</td>';
128
-                echo '<td align="center"><b>' . $etablissement_city . '</td>';
129
-                echo '<td align="center"><b>' . $etablissement_telephone . '</td>';
127
+                echo '<td align="center"><b>'.$etablissement_adresse.'</td>';
128
+                echo '<td align="center"><b>'.$etablissement_city.'</td>';
129
+                echo '<td align="center"><b>'.$etablissement_telephone.'</td>';
130 130
                 echo '<td align="center" width="15%">';
131
-                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> ';
132
-                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> ';
131
+                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> ';
132
+                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> ';
133 133
                 echo '</td>';
134 134
             }
135 135
             echo '</table><br>';
136
-            echo '<br><div align=right>' . $pagenav . '</div><br>';
136
+            echo '<br><div align=right>'.$pagenav.'</div><br>';
137 137
         } else {
138
-            echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>';
138
+            echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>';
139 139
         }
140 140
 
141 141
         // Affichage du formulaire
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                               'ok'               => 1,
159 159
                               'etablissement_id' => $_REQUEST['etablissement_id'],
160 160
                               'op'               => 'delete_etablissement',
161
-                          ), $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
161
+                          ), $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>');
162 162
         }
163 163
         break;
164 164
 
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
         $obj->setVar('map', $_REQUEST['map']);
201 201
 
202 202
         //Logo
203
-        $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/';
204
-        $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/';
203
+        $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/';
204
+        $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/';
205 205
 
206 206
         $delimg = @$_REQUEST['delimg'];
207
-        $delimg = isset($delimg) ? (int)$delimg : 0;
207
+        $delimg = isset($delimg) ? (int) $delimg : 0;
208 208
         if ($delimg == 0 && !empty($_REQUEST['xoops_upload_file'][0])) {
209 209
             $upload = new XoopsMediaUploader($uploaddir_etablissement, array(
210 210
                 'image/gif',
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             }
228 228
         } else {
229 229
             $logo              = '';
230
-            $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file'];
230
+            $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file'];
231 231
             if (is_file($url_etablissement)) {
232 232
                 chmod($url_etablissement, 0777);
233 233
                 unlink($url_etablissement);
@@ -247,4 +247,4 @@  discard block
 block discarded – undo
247 247
         break;
248 248
 }
249 249
 
250
-require_once __DIR__ . '/admin_footer.php';
250
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/event.php 2 patches
Switch Indentation   +304 added lines, -304 removed lines patch added patch discarded remove patch
@@ -70,177 +70,195 @@  discard block
 block discarded – undo
70 70
 
71 71
 switch ($op) {
72 72
 
73
-    case 'enreg':
74
-
75
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
76
-        $fileHandler  = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
77
-        // $t = print_r($_POST,true);
78
-        // echo "<pre>{$t}</pre><br>";
79
-        // exit;
80
-        // If the date format is wrong
81
-        //        if (
82
-        //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
83
-        //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
84
-        //        ) {
85
-        //            redirect_header(
86
-        //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
87
-        //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
88
-        //            );
89
-        //            exit;
90
-        //        }
91
-
92
-        //exit;
93
-        ///////////////////////////////////////////////////////////////////////////////
94
-        ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
95
-        ///////////////////////////////////////////////////////////////////////////////
96
-        $data = array(
97
-            'event_title'         => $_POST['event_title'],
98
-            'cat_id'              => $_POST['cat_id'],
99
-            'event_desc'          => $_POST['event_desc'],
100
-            'event_nbmember'      => $_POST['event_nbmember'],
101
-            'event_organisateur'  => $_POST['event_organisateur'],
102
-            'event_contact'       => $_POST['event_contact'],
103
-            'event_url'           => $_POST['event_url'],
104
-            'event_email'         => $_POST['event_email'],
105
-            'event_address'       => $_POST['event_address'],
106
-            'event_approved'      => 1,
107
-            'event_start'         => $_POST['event_start'],
108
-            'have_end'            => $_POST['have_end'],
109
-            'event_end'           => $_POST['event_end'],
110
-            'event_picture1'      => @$event_picture1,
111
-            'event_picture2'      => @$event_picture2,
112
-            'event_price'         => @$_POST['event_price'],
113
-            'event_etablissement' => $_POST['event_etablissement'],
114
-            'dohtml'              => $extcalConfig['allow_html'],
115
-            'event_icone'         => $_POST['event_icone'],
116
-        );
117
-
118
-        // Event edited
119
-        if (isset($_POST['event_id'])) {
120
-            if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
73
+        case 'enreg':
74
+
75
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
76
+            $fileHandler  = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE);
77
+            // $t = print_r($_POST,true);
78
+            // echo "<pre>{$t}</pre><br>";
79
+            // exit;
80
+            // If the date format is wrong
81
+            //        if (
82
+            //            !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date'])
83
+            //                || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date'])
84
+            //        ) {
85
+            //            redirect_header(
86
+            //                'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>"
87
+            //                . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())
88
+            //            );
89
+            //            exit;
90
+            //        }
91
+
92
+            //exit;
93
+            ///////////////////////////////////////////////////////////////////////////////
94
+            ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2);
95
+            ///////////////////////////////////////////////////////////////////////////////
96
+            $data = array(
97
+                'event_title'         => $_POST['event_title'],
98
+                'cat_id'              => $_POST['cat_id'],
99
+                'event_desc'          => $_POST['event_desc'],
100
+                'event_nbmember'      => $_POST['event_nbmember'],
101
+                'event_organisateur'  => $_POST['event_organisateur'],
102
+                'event_contact'       => $_POST['event_contact'],
103
+                'event_url'           => $_POST['event_url'],
104
+                'event_email'         => $_POST['event_email'],
105
+                'event_address'       => $_POST['event_address'],
106
+                'event_approved'      => 1,
107
+                'event_start'         => $_POST['event_start'],
108
+                'have_end'            => $_POST['have_end'],
109
+                'event_end'           => $_POST['event_end'],
110
+                'event_picture1'      => @$event_picture1,
111
+                'event_picture2'      => @$event_picture2,
112
+                'event_price'         => @$_POST['event_price'],
113
+                'event_etablissement' => $_POST['event_etablissement'],
114
+                'dohtml'              => $extcalConfig['allow_html'],
115
+                'event_icone'         => $_POST['event_icone'],
116
+            );
117
+
118
+            // Event edited
119
+            if (isset($_POST['event_id'])) {
120
+                if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
122
+                } else {
123
+                    $fileHandler->createFile((int)$_POST['event_id']);
124
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
125
+                }
126
+
127
+                // New event
122 128
             } else {
123
-                $fileHandler->createFile((int)$_POST['event_id']);
124
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
129
+                $notificationHandler = xoops_getHandler('notification');
130
+                /** @var ExtcalCatHandler $catHandler */
131
+                $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
132
+
133
+                $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
134
+                $data['event_submitdate'] = time();
135
+
136
+                if ($eventHandler->createEvent($data, $_POST)) {
137
+                    $fileHandler->createFile($eventHandler->getInsertId());
138
+                    $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
139
+                    $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
140
+                    $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
141
+                        'EVENT_TITLE' => $_POST['event_title'],
142
+                        'CAT_NAME'    => $cat->getVar('cat_name'),
143
+                    ));
144
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
145
+                } else {
146
+                    redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
147
+                }
125 148
             }
149
+            break;
126 150
 
127
-            // New event
128
-        } else {
129
-            $notificationHandler = xoops_getHandler('notification');
130
-            /** @var ExtcalCatHandler $catHandler */
131
-            $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
132
-
133
-            $data['event_submitter']  = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
134
-            $data['event_submitdate'] = time();
135
-
136
-            if ($eventHandler->createEvent($data, $_POST)) {
137
-                $fileHandler->createFile($eventHandler->getInsertId());
138
-                $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all');
139
-                $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title']));
140
-                $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array(
141
-                    'EVENT_TITLE' => $_POST['event_title'],
142
-                    'CAT_NAME'    => $cat->getVar('cat_name'),
143
-                ));
144
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false);
145
-            } else {
146
-                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false);
151
+        case 'clone': /* sur validation du formulaire */
152
+        case 'modify':
153
+            $action = (($op === 'clone') ? 'clone' : 'edit');
154
+            xoops_cp_header();
155
+            //================================================
156
+            // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
157
+            //
158
+            //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
159
+            //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
160
+            //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
161
+            //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
162
+            //        //$dateBirthday->rtl=false;
163
+            //        $dateBirthday->setAutoHide(false);
164
+            //
165
+            //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
166
+            //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
167
+            //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
168
+            //
169
+            //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
170
+            //        $dateBirthday->zindex = 150; //default 1
171
+            //        $dateBirthday->setYearInterval(1995, date('Y'));
172
+            //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
173
+            //        //$dateBirthday->autoSubmit(true, "calendar");
174
+            //        $dateBirthday->disabledDay("sat");
175
+            //        $dateBirthday->disabledDay("sun");
176
+            //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
177
+            //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
178
+            //        $dateBirthday->setAlignment('right', 'bottom'); //optional
179
+            // echo "<table><tr><td>zzzzz</td><td></td><td>";
180
+            // echo $dateBirthday->render();
181
+            // echo "</td></tr></table>";
182
+            //echo $dateBirthday->render();
183
+            //================================================
184
+            // @author      Gregory Mage (Aka Mage)
185
+            //***************************************************************************************
186
+            //         require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
187
+            $adminObject = \Xmf\Module\Admin::getInstance();
188
+            $adminObject->displayNavigation(basename(__FILE__));
189
+            //***************************************************************************************
190
+
191
+            $eventId      = $_GET['event_id'];
192
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193
+
194
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
195
+
196
+            if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
197
+                $form->display();
147 198
             }
148
-        }
149
-        break;
150
-
151
-    case 'clone': /* sur validation du formulaire */
152
-    case 'modify':
153
-        $action = (($op === 'clone') ? 'clone' : 'edit');
154
-        xoops_cp_header();
155
-        //================================================
156
-        // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php');
157
-        //
158
-        //        // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
159
-        //        $dateBirthday = new XoopsTcCalendar("datez1", true, false);
160
-        //        //$dateBirthday->setIcon("/images/iconCalendar.gif");
161
-        //        $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif");
162
-        //        //$dateBirthday->rtl=false;
163
-        //        $dateBirthday->setAutoHide(false);
164
-        //
165
-        //       //$myCalendar->setDate(date('d'), date('m'), date('Y'));
166
-        //       //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']);
167
-        //        $dateBirthday->setDate(date('d'), date('m'), date('Y'));
168
-        //
169
-        //        $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/");
170
-        //        $dateBirthday->zindex = 150; //default 1
171
-        //        $dateBirthday->setYearInterval(1995, date('Y'));
172
-        //        $dateBirthday->dateAllow('1960-03-01', date('Y-m-d'));
173
-        //        //$dateBirthday->autoSubmit(true, "calendar");
174
-        //        $dateBirthday->disabledDay("sat");
175
-        //        $dateBirthday->disabledDay("sun");
176
-        //        $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
177
-        //        $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year');
178
-        //        $dateBirthday->setAlignment('right', 'bottom'); //optional
179
-        // echo "<table><tr><td>zzzzz</td><td></td><td>";
180
-        // echo $dateBirthday->render();
181
-        // echo "</td></tr></table>";
182
-        //echo $dateBirthday->render();
183
-        //================================================
184
-        // @author      Gregory Mage (Aka Mage)
185
-        //***************************************************************************************
186
-        //         require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
187
-        $adminObject = \Xmf\Module\Admin::getInstance();
188
-        $adminObject->displayNavigation(basename(__FILE__));
189
-        //***************************************************************************************
190
-
191
-        $eventId      = $_GET['event_id'];
192
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193
-
194
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
195
-
196
-        if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
197
-            $form->display();
198
-        }
199 199
 
200
-        echo '</fieldset><br>';
200
+            echo '</fieldset><br>';
201 201
 
202
-        xoops_cp_footer();
202
+            xoops_cp_footer();
203 203
 
204
-        break;
204
+            break;
205 205
 
206
-    case 'clone2': /* sur clique de l'icone du formulaire*/
206
+        case 'clone2': /* sur clique de l'icone du formulaire*/
207 207
 
208
-        //$newEventId = 1;
209
-        $eventId      = $_GET['event_id'];
210
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
211
-        $event        = $eventHandler->getEvent($eventId);
212
-        $t            = $event->getVars();
213
-        $data         = array();
214
-        //        while (list($key, $val) = each($t)) {
215
-        foreach ($t as $key => $val) {
216
-            $data[$key] = $val['value'];
217
-        }
208
+            //$newEventId = 1;
209
+            $eventId      = $_GET['event_id'];
210
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
211
+            $event        = $eventHandler->getEvent($eventId);
212
+            $t            = $event->getVars();
213
+            $data         = array();
214
+            //        while (list($key, $val) = each($t)) {
215
+            foreach ($t as $key => $val) {
216
+                $data[$key] = $val['value'];
217
+            }
218 218
 
219
-        $data['event_id']    = 0;
220
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
219
+            $data['event_id']    = 0;
220
+            $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
221 221
 
222
-        $newEvent = $eventHandler->create();
223
-        $newEvent->setVars($data);
224
-        $t = $eventHandler->insert($newEvent, true);
222
+            $newEvent = $eventHandler->create();
223
+            $newEvent->setVars($data);
224
+            $t = $eventHandler->insert($newEvent, true);
225 225
 
226
-        $newEventId = $newEvent->getVar('event_id');
227
-        $ts         = print_r($newEventId, true);
226
+            $newEventId = $newEvent->getVar('event_id');
227
+            $ts         = print_r($newEventId, true);
228 228
 
229
-        redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
230
-        break;
229
+            redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false);
230
+            break;
231 231
 
232
-    case 'delete':
232
+        case 'delete':
233 233
 
234
-        if (isset($_POST['confirm'])) {
235
-            if (!$GLOBALS['xoopsSecurity']->check()) {
236
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237
-                exit;
234
+            if (isset($_POST['confirm'])) {
235
+                if (!$GLOBALS['xoopsSecurity']->check()) {
236
+                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237
+                    exit;
238
+                }
239
+                //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
240
+                //             $eventHandler->deleteEvent($_POST['event_id']);
241
+                deleteEvents($_POST['event_id']);
242
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
243
+            } else {
244
+                xoops_cp_header();
245
+                // @author      Gregory Mage (Aka Mage)
246
+                //***************************************************************************************
247
+                //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
248
+                $adminObject = \Xmf\Module\Admin::getInstance();
249
+                $adminObject->displayNavigation(basename(__FILE__));
250
+                //***************************************************************************************
251
+
252
+                $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
253
+                xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
254
+
255
+                xoops_cp_footer();
238 256
             }
239
-            //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
240
-            //             $eventHandler->deleteEvent($_POST['event_id']);
241
-            deleteEvents($_POST['event_id']);
242
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false);
243
-        } else {
257
+
258
+            break;
259
+
260
+        case 'deleteSelection':
261
+
244 262
             xoops_cp_header();
245 263
             // @author      Gregory Mage (Aka Mage)
246 264
             //***************************************************************************************
@@ -248,186 +266,168 @@  discard block
 block discarded – undo
248 266
             $adminObject = \Xmf\Module\Admin::getInstance();
249 267
             $adminObject->displayNavigation(basename(__FILE__));
250 268
             //***************************************************************************************
269
+            if (isset($_POST['deleteSelection'][0])) {
270
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
271
+                $ids = array_keys($_POST['deleteAllEvents']);
272
+            } else {
273
+                $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
274
+                $ids = array_keys($_POST['deleteEvents']);
275
+            }
251 276
 
252
-            $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1);
253
-            xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php');
277
+            //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
278
+            //           $ids = array_keys($_POST['deleteEvents']);
279
+            $ids = implode(',', $ids);
280
+            //echo $ids.'<br>';
281
+            $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
282
+            //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
283
+            xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
254 284
 
255 285
             xoops_cp_footer();
256
-        }
257 286
 
258
-        break;
259
-
260
-    case 'deleteSelection':
261
-
262
-        xoops_cp_header();
263
-        // @author      Gregory Mage (Aka Mage)
264
-        //***************************************************************************************
265
-        //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php";
266
-        $adminObject = \Xmf\Module\Admin::getInstance();
267
-        $adminObject->displayNavigation(basename(__FILE__));
268
-        //***************************************************************************************
269
-        if (isset($_POST['deleteSelection'][0])) {
270
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL;
271
-            $ids = array_keys($_POST['deleteAllEvents']);
272
-        } else {
273
-            $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION;
274
-            $ids = array_keys($_POST['deleteEvents']);
275
-        }
287
+            break;
276 288
 
277
-        //           $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION);
278
-        //           $ids = array_keys($_POST['deleteEvents']);
279
-        $ids = implode(',', $ids);
280
-        //echo $ids.'<br>';
281
-        $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1);
282
-        //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1);
283
-        xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php');
284
-
285
-        xoops_cp_footer();
286
-
287
-        break;
288
-
289
-    case 'deleteSelectionOK':
290
-        //-----------------------------------------
291
-        // $t = print_r($_GET,true);
292
-        // echo "<hr><pre>{$t}</pre><hr>";
293
-        //
294
-        // $t = print_r($_POST,true);
295
-        // echo "<hr><pre>{$t}</pre><hr>";
296
-        // exit;
297
-        //-----------------------------------------
298
-
299
-        if (isset($_POST['deleteSelection'][0])) {
300
-        } else {
301
-            if (!$GLOBALS['xoopsSecurity']->check()) {
302
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
303
-                exit;
304
-            }
289
+        case 'deleteSelectionOK':
290
+            //-----------------------------------------
291
+            // $t = print_r($_GET,true);
292
+            // echo "<hr><pre>{$t}</pre><hr>";
293
+            //
294
+            // $t = print_r($_POST,true);
295
+            // echo "<hr><pre>{$t}</pre><hr>";
296
+            // exit;
297
+            //-----------------------------------------
305 298
 
306
-            deleteEvents($_POST['event_ids']);
299
+            if (isset($_POST['deleteSelection'][0])) {
300
+            } else {
301
+                if (!$GLOBALS['xoopsSecurity']->check()) {
302
+                    redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
303
+                    exit;
304
+                }
307 305
 
308
-            redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
309
-        }
306
+                deleteEvents($_POST['event_ids']);
310 307
 
311
-        break;
308
+                redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false);
309
+            }
312 310
 
313
-    case 'default':
314
-    default:
311
+            break;
315 312
 
316
-        //global $extcalConfig;
317
-        $extcalConfig      = ExtcalConfig::getHandler();
318
-        $xoopsModuleConfig = $extcalConfig->getModuleConfig();
313
+        case 'default':
314
+        default:
319 315
 
320
-        $start          = isset($_GET['start']) ? $_GET['start'] : 0;
321
-        $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
316
+            //global $extcalConfig;
317
+            $extcalConfig      = ExtcalConfig::getHandler();
318
+            $xoopsModuleConfig = $extcalConfig->getModuleConfig();
322 319
 
323
-        xoops_cp_header();
324
-        // @author      Gregory Mage (Aka Mage)
325
-        //***************************************************************************************
320
+            $start          = isset($_GET['start']) ? $_GET['start'] : 0;
321
+            $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage'];
326 322
 
327
-        $adminObject = \Xmf\Module\Admin::getInstance();
328
-        $adminObject->displayNavigation(basename(__FILE__));
329
-        //***************************************************************************************
323
+            xoops_cp_header();
324
+            // @author      Gregory Mage (Aka Mage)
325
+            //***************************************************************************************
330 326
 
331
-        $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
332
-        $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
333
-        $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
327
+            $adminObject = \Xmf\Module\Admin::getInstance();
328
+            $adminObject->displayNavigation(basename(__FILE__));
329
+            //***************************************************************************************
334 330
 
335
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
336
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
337
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
338
-        //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
331
+            $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
332
+            $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
333
+            $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
339 334
 
340
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
341
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
335
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
336
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
337
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
338
+            //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
342 339
 
343
-        echo '</fieldset><br>';
340
+            echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
341
+            echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
344 342
 
345
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
343
+            echo '</fieldset><br>';
346 344
 
347
-        echo '<form method="POST" action="event.php">';
348
-        echo '<input type="hidden" name="op" value="deleteSelection">';
345
+            echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
349 346
 
350
-        echo '<table class="outer" style="width:100%;">';
351
-        echo '<tr style="text-align:center;">';
352
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
353
-        echo '<th>#</th>';
354
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
355
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
359
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
360
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
347
+            echo '<form method="POST" action="event.php">';
348
+            echo '<input type="hidden" name="op" value="deleteSelection">';
361 349
 
362
-        echo '</tr>';
350
+            echo '<table class="outer" style="width:100%;">';
351
+            echo '<tr style="text-align:center;">';
352
+            echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
353
+            echo '<th>#</th>';
354
+            echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
355
+            echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
356
+            echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
357
+            echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
358
+            echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
359
+            echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
360
+            echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
363 361
 
364
-        if (count($events) > 0) {
365
-            $i = 0;
366
-            foreach ($events as $event) {
367
-                $class = (++$i % 2 == 0) ? 'even' : 'odd';
368
-                echo '<tr style="text-align:left;" class="' . $class . '">';
369
-                echo "<td width='10%' align='center'>";
370
-                echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
371
-                echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
372
-                echo '</td>';
373
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
374
-                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>';
375
-
376
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
377
-
378
-                //                 if ($event['event_isrecur']) {
379
-                //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
380
-                //                 } else {
381
-                //                     echo '<td>' . $event['formated_event_start'] . '</td>';
382
-                //                 }
383
-
384
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
385
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
386
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
387
-                if (!isset($event['formated_reccur_rule'])) {
388
-                    $event['formated_reccur_rule'] = '';
362
+            echo '</tr>';
363
+
364
+            if (count($events) > 0) {
365
+                $i = 0;
366
+                foreach ($events as $event) {
367
+                    $class = (++$i % 2 == 0) ? 'even' : 'odd';
368
+                    echo '<tr style="text-align:left;" class="' . $class . '">';
369
+                    echo "<td width='10%' align='center'>";
370
+                    echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
371
+                    echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
372
+                    echo '</td>';
373
+                    echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
374
+                    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>';
375
+
376
+                    echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
377
+
378
+                    //                 if ($event['event_isrecur']) {
379
+                    //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
380
+                    //                 } else {
381
+                    //                     echo '<td>' . $event['formated_event_start'] . '</td>';
382
+                    //                 }
383
+
384
+                    echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
385
+                    echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
386
+                    echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
387
+                    if (!isset($event['formated_reccur_rule'])) {
388
+                        $event['formated_reccur_rule'] = '';
389
+                    }
390
+                    echo '<td>' . $event['formated_reccur_rule'] . '</td>';
391
+
392
+                    echo '<td style="width:10%; text-align:center;">';
393
+                    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;";
394
+                    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;";
395
+                    echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
396
+                    echo '</td>';
397
+
398
+                    echo '</tr>';
389 399
                 }
390
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
400
+                //---------------------------------------------------------
401
+                $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
391 402
 
392
-                echo '<td style="width:10%; text-align:center;">';
393
-                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;";
394
-                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;";
395
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
403
+                echo '<tr><td colspan="2" style="text-align: right;">';
404
+                echo $pageNav->renderNav(2);
396 405
                 echo '</td>';
397 406
 
398
-                echo '</tr>';
399
-            }
400
-            //---------------------------------------------------------
401
-            $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start);
407
+                echo '<td colspan="2" style="text-align: right;">';
402 408
 
403
-            echo '<tr><td colspan="2" style="text-align: right;">';
404
-            echo $pageNav->renderNav(2);
405
-            echo '</td>';
409
+                echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
410
+                echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
406 411
 
407
-            echo '<td colspan="2" style="text-align: right;">';
408
-
409
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
410
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
411
-
412
-            echo '</td>';
413
-            echo '</tr>';
414
-        } else {
415
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
416
-        }
417
-        echo '</table>';
418
-        echo '</form>';
412
+                echo '</td>';
413
+                echo '</tr>';
414
+            } else {
415
+                echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
416
+            }
417
+            echo '</table>';
418
+            echo '</form>';
419 419
 
420
-        echo '</fieldset>';
421
-        echo '</fieldset><br><br>';
422
-        //Fin de la liste des evennement -------------------------------------
423
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
420
+            echo '</fieldset>';
421
+            echo '</fieldset><br><br>';
422
+            //Fin de la liste des evennement -------------------------------------
423
+            echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
424 424
 
425
-        $form = $eventHandler->getEventForm('admin');
426
-        $form->display();
425
+            $form = $eventHandler->getEventForm('admin');
426
+            $form->display();
427 427
 
428
-        echo '</fieldset>';
428
+            echo '</fieldset>';
429 429
 
430
-        require_once __DIR__ . '/admin_footer.php';
430
+            require_once __DIR__ . '/admin_footer.php';
431 431
 
432
-        break;
432
+            break;
433 433
 }
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team,
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
22
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
23
-require_once __DIR__ . '/../class/form/extcalform.php';
24
-require_once __DIR__ . '/admin_header.php';
25
-require_once __DIR__ . '/../class/utility.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
22
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
23
+require_once __DIR__.'/../class/form/extcalform.php';
24
+require_once __DIR__.'/admin_header.php';
25
+require_once __DIR__.'/../class/utility.php';
26 26
 
27 27
 $gepeto = array_merge($_GET, $_POST);
28 28
 //while (list($k, $v) = each($gepeto)) {
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
     //    while (list($k, $t) = each($rst)) {
51 51
     foreach ($rst as $k => $t) {
52 52
         if ($t['event_picture1'] != '') {
53
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
53
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
54 54
             unlink($f);
55
-            echo $f . '<br>';
55
+            echo $f.'<br>';
56 56
         }
57 57
 
58 58
         if ($t['event_picture2'] != '') {
59
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
59
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
60 60
             unlink($f);
61
-            echo $f . '<br>';
61
+            echo $f.'<br>';
62 62
         }
63 63
     }
64 64
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
121 121
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
122 122
             } else {
123
-                $fileHandler->createFile((int)$_POST['event_id']);
123
+                $fileHandler->createFile((int) $_POST['event_id']);
124 124
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
125 125
             }
126 126
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $eventId      = $_GET['event_id'];
192 192
         $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
193 193
 
194
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
194
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
195 195
 
196 196
         if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) {
197 197
             $form->display();
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
             $data[$key] = $val['value'];
217 217
         }
218 218
 
219
-        $data['event_id']    = 0;
220
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
219
+        $data['event_id'] = 0;
220
+        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
221 221
 
222 222
         $newEvent = $eventHandler->create();
223 223
         $newEvent->setVars($data);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
         if (isset($_POST['confirm'])) {
235 235
             if (!$GLOBALS['xoopsSecurity']->check()) {
236
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
236
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
237 237
                 exit;
238 238
             }
239 239
             //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         if (isset($_POST['deleteSelection'][0])) {
300 300
         } else {
301 301
             if (!$GLOBALS['xoopsSecurity']->check()) {
302
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
302
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
303 303
                 exit;
304 304
             }
305 305
 
@@ -332,32 +332,32 @@  discard block
 block discarded – undo
332 332
         $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id'));
333 333
         $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
334 334
 
335
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
336
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
335
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
336
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
337 337
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
338 338
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
339 339
 
340
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
341
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
340
+        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
341
+        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
342 342
 
343 343
         echo '</fieldset><br>';
344 344
 
345
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
345
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
346 346
 
347 347
         echo '<form method="POST" action="event.php">';
348 348
         echo '<input type="hidden" name="op" value="deleteSelection">';
349 349
 
350 350
         echo '<table class="outer" style="width:100%;">';
351 351
         echo '<tr style="text-align:center;">';
352
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
352
+        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
353 353
         echo '<th>#</th>';
354
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
355
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
359
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
360
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
354
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
355
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
356
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
357
+        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
358
+        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
359
+        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
360
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
361 361
 
362 362
         echo '</tr>';
363 363
 
@@ -365,15 +365,15 @@  discard block
 block discarded – undo
365 365
             $i = 0;
366 366
             foreach ($events as $event) {
367 367
                 $class = (++$i % 2 == 0) ? 'even' : 'odd';
368
-                echo '<tr style="text-align:left;" class="' . $class . '">';
368
+                echo '<tr style="text-align:left;" class="'.$class.'">';
369 369
                 echo "<td width='10%' align='center'>";
370 370
                 echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
371 371
                 echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
372 372
                 echo '</td>';
373
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
374
-                echo "<td  width='10%'>" . '<a href=cat.php?op=modify&amp;cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>';
373
+                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
374
+                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>';
375 375
 
376
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
376
+                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
377 377
 
378 378
                 //                 if ($event['event_isrecur']) {
379 379
                 //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
@@ -381,18 +381,18 @@  discard block
 block discarded – undo
381 381
                 //                     echo '<td>' . $event['formated_event_start'] . '</td>';
382 382
                 //                 }
383 383
 
384
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
385
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
386
-                echo '<td align="center">' . (($event['event_isrecur'] == 1) ? _YES : _NO) . '</td>';
384
+                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
385
+                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
386
+                echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>';
387 387
                 if (!isset($event['formated_reccur_rule'])) {
388 388
                     $event['formated_reccur_rule'] = '';
389 389
                 }
390
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
390
+                echo '<td>'.$event['formated_reccur_rule'].'</td>';
391 391
 
392 392
                 echo '<td style="width:10%; text-align:center;">';
393
-                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;";
394
-                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;";
395
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
393
+                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;";
394
+                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;";
395
+                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>";
396 396
                 echo '</td>';
397 397
 
398 398
                 echo '</tr>';
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 
407 407
             echo '<td colspan="2" style="text-align: right;">';
408 408
 
409
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
410
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
409
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
410
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
411 411
 
412 412
             echo '</td>';
413 413
             echo '</tr>';
414 414
         } else {
415
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
415
+            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
416 416
         }
417 417
         echo '</table>';
418 418
         echo '</form>';
@@ -420,14 +420,14 @@  discard block
 block discarded – undo
420 420
         echo '</fieldset>';
421 421
         echo '</fieldset><br><br>';
422 422
         //Fin de la liste des evennement -------------------------------------
423
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
423
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
424 424
 
425 425
         $form = $eventHandler->getEventForm('admin');
426 426
         $form->display();
427 427
 
428 428
         echo '</fieldset>';
429 429
 
430
-        require_once __DIR__ . '/admin_footer.php';
430
+        require_once __DIR__.'/admin_footer.php';
431 431
 
432 432
         break;
433 433
 }
Please login to merge, or discard this patch.
include/constantes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 define('_EXTCAL_NAV_NEW_EVENT', 'new-event');
108 108
 
109 109
 define('_EXTCAL_NAV_LIST',
110
-       _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
110
+        _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
111 111
 
112 112
 define('_EXTCAL_PREFIX_VIEW', 'view_');
113 113
 define('_EXTCAL_SUFFIX_VIEW', '.php');
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 define('_EXTCAL_CLN_EVENT', 'ExtcalEvent');
42 42
 
43 43
 //-------------------------------------------------------------------
44
-define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__ . '/../class/pear');
44
+define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__.'/../class/pear');
45 45
 //define('_EXTCAL_PEAR_ROOT', 'F:/wamp/www/xfr254b/xoops_lib/Frameworks/pear' );
46 46
 
47 47
 $pear_path = _EXTCAL_PEAR_ROOT_DEFAULT;
@@ -76,22 +76,22 @@  discard block
 block discarded – undo
76 76
 //}
77 77
 define('_EXTCAL_PEAR_ROOT', $pear_path);
78 78
 
79
-define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT . '/Calendar');
80
-define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT . '/');
79
+define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT.'/Calendar');
80
+define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT.'/');
81 81
 
82 82
 //-------------------------------------------------------------------
83 83
 define('_EXTCAL_SHOW_NO_PICTURE', false);
84 84
 
85 85
 define('_EXTCAL_PATH_HORLOGES', '/modules/extcal/assets/images/horloges/');
86
-define('_EXTCAL_PATH_ICONS16', XOOPS_URL . '/Frameworks/moduleclasses/icons/16/');
87
-define('_EXTCAL_PATH_ICONS32', XOOPS_URL . '/Frameworks/moduleclasses/icons/32/');
88
-define('_EXTCAL_PATH_FO', XOOPS_URL . '/modules/extcal/');
89
-define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO . 'admin/');
90
-define('_EXTCAL_PATH_LG', XOOPS_URL . '/modules/extcal/languages/');
86
+define('_EXTCAL_PATH_ICONS16', XOOPS_URL.'/Frameworks/moduleclasses/icons/16/');
87
+define('_EXTCAL_PATH_ICONS32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32/');
88
+define('_EXTCAL_PATH_FO', XOOPS_URL.'/modules/extcal/');
89
+define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO.'admin/');
90
+define('_EXTCAL_PATH_LG', XOOPS_URL.'/modules/extcal/languages/');
91 91
 
92 92
 define('_EXTCAL_IMG_INTERVAL', 'interval04.png');
93
-define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16 . _EXTCAL_IMG_INTERVAL);
94
-define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32 . _EXTCAL_IMG_INTERVAL);
93
+define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16._EXTCAL_IMG_INTERVAL);
94
+define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32._EXTCAL_IMG_INTERVAL);
95 95
 
96 96
 //define('_EXTCAL_DIRNAME',    $xoopsModule->getVar('dirname'));
97 97
 
@@ -107,21 +107,21 @@  discard block
 block discarded – undo
107 107
 define('_EXTCAL_NAV_NEW_EVENT', 'new-event');
108 108
 
109 109
 define('_EXTCAL_NAV_LIST',
110
-       _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT);
110
+       _EXTCAL_NAV_CALMONTH."\n"._EXTCAL_NAV_CALWEEK."\n"._EXTCAL_NAV_YEAR."\n"._EXTCAL_NAV_MONTH."\n"._EXTCAL_NAV_WEEK."\n"._EXTCAL_NAV_DAY."\n"._EXTCAL_NAV_AGENDA_WEEK."\n"._EXTCAL_NAV_AGENDA_DAY."\n"._EXTCAL_NAV_SEARCH."\n"._EXTCAL_NAV_NEW_EVENT);
111 111
 
112 112
 define('_EXTCAL_PREFIX_VIEW', 'view_');
113 113
 define('_EXTCAL_SUFFIX_VIEW', '.php');
114 114
 
115
-define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALMONTH . _EXTCAL_SUFFIX_VIEW);
116
-define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALWEEK . _EXTCAL_SUFFIX_VIEW);
117
-define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_YEAR . _EXTCAL_SUFFIX_VIEW);
118
-define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_MONTH . _EXTCAL_SUFFIX_VIEW);
119
-define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_WEEK . _EXTCAL_SUFFIX_VIEW);
120
-define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_DAY . _EXTCAL_SUFFIX_VIEW);
121
-define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_WEEK . _EXTCAL_SUFFIX_VIEW);
122
-define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_DAY . _EXTCAL_SUFFIX_VIEW);
123
-define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_SEARCH . _EXTCAL_SUFFIX_VIEW);
124
-define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_NEW_EVENT . _EXTCAL_SUFFIX_VIEW);
115
+define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALMONTH._EXTCAL_SUFFIX_VIEW);
116
+define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALWEEK._EXTCAL_SUFFIX_VIEW);
117
+define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_YEAR._EXTCAL_SUFFIX_VIEW);
118
+define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_MONTH._EXTCAL_SUFFIX_VIEW);
119
+define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_WEEK._EXTCAL_SUFFIX_VIEW);
120
+define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_DAY._EXTCAL_SUFFIX_VIEW);
121
+define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_WEEK._EXTCAL_SUFFIX_VIEW);
122
+define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_DAY._EXTCAL_SUFFIX_VIEW);
123
+define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_SEARCH._EXTCAL_SUFFIX_VIEW);
124
+define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_NEW_EVENT._EXTCAL_SUFFIX_VIEW);
125 125
 
126 126
 define('_EXTCAL_MULTILOADER', '/class/xoopsform/multiuploads/formmultiuploads.php');
127 127
 
Please login to merge, or discard this patch.