@@ -101,11 +101,11 @@ |
||
101 | 101 | |
102 | 102 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E"); |
103 | 103 | $subjectCaption |
104 | - = |
|
104 | + = |
|
105 | 105 | _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;'>" |
106 | 106 | . _AM_EXTCAL_MAILTAGS6 . "<br />" . _AM_EXTCAL_MAILTAGS2 . "</span> "; |
107 | 107 | $bodyCaption |
108 | - = |
|
108 | + = |
|
109 | 109 | _AM_EXTCAL_BODY . "<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;'>" |
110 | 110 | . _AM_EXTCAL_MAILTAGS1 . "<br />" . _AM_EXTCAL_MAILTAGS2 . "<br />" . _AM_EXTCAL_MAILTAGS3 . "<br />" . _AM_EXTCAL_MAILTAGS4 . "<br />" . _AM_EXTCAL_MAILTAGS5 . "<br />" |
111 | 111 | . _AM_EXTCAL_MAILTAGS6 . "<br />" . _AM_EXTCAL_MAILTAGS7 . "<br />" . _AM_EXTCAL_MAILTAGS8 . "<br />" . _AM_EXTCAL_MAILTAGS9 . "</span> "; |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | |
37 | 37 | switch ($op) { |
38 | 38 | |
39 | - case 'notification': |
|
39 | + case 'notification': |
|
40 | 40 | |
41 | - switch ($fct) { |
|
41 | + switch ($fct) { |
|
42 | 42 | |
43 | 43 | case 'send': |
44 | 44 | |
@@ -132,81 +132,81 @@ discard block |
||
132 | 132 | |
133 | 133 | break; |
134 | 134 | |
135 | - } |
|
135 | + } |
|
136 | 136 | |
137 | 137 | break; |
138 | 138 | |
139 | - default: |
|
140 | - case 'default': |
|
141 | - // @author Gregory Mage (Aka Mage) |
|
142 | - //*************************************************************************************** |
|
143 | - xoops_cp_header(); |
|
144 | -// include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
145 | - $catHandler = xoops_getmodulehandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
146 | - $eventHandler = xoops_getmodulehandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
147 | - $indexAdmin = new ModuleAdmin(); |
|
148 | - $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
149 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_CATEGORIES . "</infolabel>", $catHandler->getCount(), 'Green'); |
|
150 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_EVENT . "</infolabel>", $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
151 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_PENDING . "</infolabel>", $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
152 | - $criteriaCompo = new CriteriaCompo(); |
|
153 | - $criteriaCompo->add(new Criteria('event_approved', 1)); |
|
154 | - $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
155 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_APPROVED . "</infolabel><infotext>", $eventHandler->getCount($criteriaCompo) . "</infotext>", 'Green'); |
|
156 | - |
|
157 | - $indexAdmin->addConfigBoxLine(); |
|
158 | - $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
159 | - $indexAdmin->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
160 | - |
|
161 | -//JJD |
|
162 | -// $indexAdmin->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
163 | - |
|
164 | -// $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
165 | -// $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
166 | - echo $indexAdmin->addNavigation('index.php'); |
|
167 | - echo $indexAdmin->renderIndex(); |
|
168 | - //*************************************************************************************** |
|
169 | - $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id')); |
|
170 | - $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
171 | - |
|
172 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
173 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
174 | -// echo '<img src="../assets/images/icons/on.png" /> '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br />'; |
|
175 | - echo '<img src=' . $pathIcon16 . '/edit.png /> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br />'; |
|
176 | - echo '<img src=' . $pathIcon16 . '/delete.png /> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br />'; |
|
177 | - echo '</fieldset><br />'; |
|
178 | - |
|
179 | - echo '<table class="outer" style="width:100%;">'; |
|
180 | - echo '<tr style="text-align:center;">'; |
|
181 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
182 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
183 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
184 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
185 | - echo '</tr>'; |
|
186 | - |
|
187 | - if (count($pendingEvent) > 0) { |
|
188 | - $i = 0; |
|
189 | - foreach ( |
|
190 | - $pendingEvent as $event |
|
191 | - ) { |
|
192 | - $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
193 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
194 | - echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
195 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
196 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
197 | - echo '<td style="width:10%; text-align:center;">'; |
|
198 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png /></a> '; |
|
199 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png /></a>'; |
|
200 | - echo '</td>'; |
|
201 | - echo '</tr>'; |
|
139 | + default: |
|
140 | + case 'default': |
|
141 | + // @author Gregory Mage (Aka Mage) |
|
142 | + //*************************************************************************************** |
|
143 | + xoops_cp_header(); |
|
144 | + // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
145 | + $catHandler = xoops_getmodulehandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
146 | + $eventHandler = xoops_getmodulehandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
147 | + $indexAdmin = new ModuleAdmin(); |
|
148 | + $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
149 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_CATEGORIES . "</infolabel>", $catHandler->getCount(), 'Green'); |
|
150 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_EVENT . "</infolabel>", $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
151 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_PENDING . "</infolabel>", $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
152 | + $criteriaCompo = new CriteriaCompo(); |
|
153 | + $criteriaCompo->add(new Criteria('event_approved', 1)); |
|
154 | + $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
155 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, "<infolabel>" . _AM_EXTCAL_INDEX_APPROVED . "</infolabel><infotext>", $eventHandler->getCount($criteriaCompo) . "</infotext>", 'Green'); |
|
156 | + |
|
157 | + $indexAdmin->addConfigBoxLine(); |
|
158 | + $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
159 | + $indexAdmin->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
160 | + |
|
161 | + //JJD |
|
162 | + // $indexAdmin->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
163 | + |
|
164 | + // $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
165 | + // $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
166 | + echo $indexAdmin->addNavigation('index.php'); |
|
167 | + echo $indexAdmin->renderIndex(); |
|
168 | + //*************************************************************************************** |
|
169 | + $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id')); |
|
170 | + $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
171 | + |
|
172 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
173 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
174 | + // echo '<img src="../assets/images/icons/on.png" /> '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br />'; |
|
175 | + echo '<img src=' . $pathIcon16 . '/edit.png /> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br />'; |
|
176 | + echo '<img src=' . $pathIcon16 . '/delete.png /> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br />'; |
|
177 | + echo '</fieldset><br />'; |
|
178 | + |
|
179 | + echo '<table class="outer" style="width:100%;">'; |
|
180 | + echo '<tr style="text-align:center;">'; |
|
181 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
182 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
183 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
184 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
185 | + echo '</tr>'; |
|
186 | + |
|
187 | + if (count($pendingEvent) > 0) { |
|
188 | + $i = 0; |
|
189 | + foreach ( |
|
190 | + $pendingEvent as $event |
|
191 | + ) { |
|
192 | + $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
193 | + echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
194 | + echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
195 | + echo '<td>' . $event['event_title'] . '</td>'; |
|
196 | + echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
197 | + echo '<td style="width:10%; text-align:center;">'; |
|
198 | + echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png /></a> '; |
|
199 | + echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png /></a>'; |
|
200 | + echo '</td>'; |
|
201 | + echo '</tr>'; |
|
202 | + } |
|
203 | + } else { |
|
204 | + echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
202 | 205 | } |
203 | - } else { |
|
204 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
205 | - } |
|
206 | 206 | |
207 | - echo '</table></fieldset><br />'; |
|
207 | + echo '</table></fieldset><br />'; |
|
208 | 208 | |
209 | - include_once __DIR__ . '/admin_footer.php'; |
|
209 | + include_once __DIR__ . '/admin_footer.php'; |
|
210 | 210 | |
211 | - break; |
|
211 | + break; |
|
212 | 212 | } |
@@ -53,13 +53,13 @@ |
||
53 | 53 | xoops_cp_header(); |
54 | 54 | adminMenu(1); |
55 | 55 | |
56 | - $myts =& MyTextSanitizer::getInstance(); |
|
57 | - $xoopsMailer =& getMailer(); |
|
56 | + $myts = & MyTextSanitizer::getInstance(); |
|
57 | + $xoopsMailer = & getMailer(); |
|
58 | 58 | $catHandler = xoops_getmodulehandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
59 | 59 | $eventHandler = xoops_getmodulehandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
60 | 60 | $eventMemberHandler = xoops_getmodulehandler(_EXTCAL_CLS_MEMBER, _EXTCAL_MODULE); |
61 | 61 | $extcalTime = ExtcalTime::getHandler(); |
62 | - $extcalConfig =& ExtcalConfig::getHandler(); |
|
62 | + $extcalConfig = & ExtcalConfig::getHandler(); |
|
63 | 63 | $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
64 | 64 | |
65 | 65 | $event = $eventHandler->getEvent($_POST['event_id'], $xoopsUser, true); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | include dirname(dirname(__DIR__)) . '/mainfile.php'; |
4 | 4 | include_once __DIR__ . '/include/constantes.php'; |
5 | -$params = array( |
|
5 | +$params = array( |
|
6 | 6 | 'view' => _EXTCAL_NAV_SEARCH, |
7 | 7 | 'file' => _EXTCAL_FILE_SEARCH |
8 | 8 | ); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | } |
145 | 145 | |
146 | -$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray); |
|
146 | +$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray); |
|
147 | 147 | |
148 | 148 | // Sort event array by event start |
149 | 149 | //usort($eventsArray, "orderEvents"); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | 'nbJours' => $nbJours, |
45 | 45 | 'externalKeys' => 'cat_id' |
46 | 46 | ); |
47 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
47 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
48 | 48 | /**********************************************************************/ |
49 | 49 | $eventsArray = $events; |
50 | 50 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | 'cat' => $cat, |
32 | 32 | 'externalKeys' => 'cat_id' |
33 | 33 | ); |
34 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
34 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
35 | 35 | /**********************************************************************/ |
36 | 36 | |
37 | 37 | // Calculating timestamp for the begin and the end of the month |