@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | switch ($op) { |
| 38 | - case 'notification': |
|
| 39 | - switch ($fct) { |
|
| 38 | + case 'notification': |
|
| 39 | + switch ($fct) { |
|
| 40 | 40 | case 'send': |
| 41 | 41 | if (!$GLOBALS['xoopsSecurity']->check()) { |
| 42 | 42 | redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
@@ -132,78 +132,78 @@ discard block |
||
| 132 | 132 | xoops_cp_footer(); |
| 133 | 133 | |
| 134 | 134 | break; |
| 135 | - } |
|
| 135 | + } |
|
| 136 | 136 | break; |
| 137 | 137 | |
| 138 | - default: |
|
| 139 | - case 'default': |
|
| 140 | - // @author Gregory Mage (Aka Mage) |
|
| 141 | - //*************************************************************************************** |
|
| 142 | - xoops_cp_header(); |
|
| 143 | - // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
| 144 | - // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
| 145 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
| 146 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 147 | - $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
| 148 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
| 149 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
| 150 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
| 151 | - $criteriaCompo = new \CriteriaCompo(); |
|
| 152 | - $criteriaCompo->add(new \Criteria('event_approved', 1)); |
|
| 153 | - $criteriaCompo->add(new \Criteria('event_start', time(), '>=')); |
|
| 154 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
| 155 | - |
|
| 156 | - $adminObject->addConfigBoxLine(); |
|
| 157 | - $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
| 158 | - $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
| 159 | - |
|
| 160 | - //JJD |
|
| 161 | - // $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
| 162 | - |
|
| 163 | - // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
| 164 | - // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
| 165 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
| 166 | - $adminObject->displayIndex(); |
|
| 167 | - //*************************************************************************************** |
|
| 168 | - $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
|
| 169 | - $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
| 170 | - |
|
| 171 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
| 172 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 173 | - // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
|
| 174 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
| 175 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
| 176 | - echo '</fieldset><br>'; |
|
| 177 | - |
|
| 178 | - echo '<table class="outer" style="width:100%;">'; |
|
| 179 | - echo '<tr style="text-align:center;">'; |
|
| 180 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
| 181 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
| 182 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
| 183 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
| 184 | - echo '</tr>'; |
|
| 185 | - |
|
| 186 | - if (count($pendingEvent) > 0) { |
|
| 187 | - $i = 0; |
|
| 188 | - foreach ($pendingEvent as $event) { |
|
| 189 | - $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
| 190 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
| 191 | - echo '<td>' . $event['Category']['cat_name'] . '</td>'; |
|
| 192 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
| 193 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
| 194 | - echo '<td style="width:10%; text-align:center;">'; |
|
| 195 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
| 196 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
| 197 | - echo '</td>'; |
|
| 198 | - echo '</tr>'; |
|
| 138 | + default: |
|
| 139 | + case 'default': |
|
| 140 | + // @author Gregory Mage (Aka Mage) |
|
| 141 | + //*************************************************************************************** |
|
| 142 | + xoops_cp_header(); |
|
| 143 | + // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
| 144 | + // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
| 145 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
| 146 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
| 147 | + $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
| 148 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
| 149 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
| 150 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
| 151 | + $criteriaCompo = new \CriteriaCompo(); |
|
| 152 | + $criteriaCompo->add(new \Criteria('event_approved', 1)); |
|
| 153 | + $criteriaCompo->add(new \Criteria('event_start', time(), '>=')); |
|
| 154 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
| 155 | + |
|
| 156 | + $adminObject->addConfigBoxLine(); |
|
| 157 | + $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
| 158 | + $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
| 159 | + |
|
| 160 | + //JJD |
|
| 161 | + // $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
| 162 | + |
|
| 163 | + // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
| 164 | + // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
| 165 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
| 166 | + $adminObject->displayIndex(); |
|
| 167 | + //*************************************************************************************** |
|
| 168 | + $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
|
| 169 | + $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
| 170 | + |
|
| 171 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
| 172 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 173 | + // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
|
| 174 | + echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
| 175 | + echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
| 176 | + echo '</fieldset><br>'; |
|
| 177 | + |
|
| 178 | + echo '<table class="outer" style="width:100%;">'; |
|
| 179 | + echo '<tr style="text-align:center;">'; |
|
| 180 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
| 181 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
| 182 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
| 183 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
| 184 | + echo '</tr>'; |
|
| 185 | + |
|
| 186 | + if (count($pendingEvent) > 0) { |
|
| 187 | + $i = 0; |
|
| 188 | + foreach ($pendingEvent as $event) { |
|
| 189 | + $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
| 190 | + echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
| 191 | + echo '<td>' . $event['Category']['cat_name'] . '</td>'; |
|
| 192 | + echo '<td>' . $event['event_title'] . '</td>'; |
|
| 193 | + echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
| 194 | + echo '<td style="width:10%; text-align:center;">'; |
|
| 195 | + echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
| 196 | + echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
| 197 | + echo '</td>'; |
|
| 198 | + echo '</tr>'; |
|
| 199 | + } |
|
| 200 | + } else { |
|
| 201 | + echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
| 199 | 202 | } |
| 200 | - } else { |
|
| 201 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
| 202 | - } |
|
| 203 | 203 | |
| 204 | - echo '</table></fieldset><br>'; |
|
| 204 | + echo '</table></fieldset><br>'; |
|
| 205 | 205 | |
| 206 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 206 | + require_once __DIR__ . '/admin_footer.php'; |
|
| 207 | 207 | |
| 208 | - break; |
|
| 208 | + break; |
|
| 209 | 209 | } |
@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 6 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
| 7 | -require_once __DIR__ . '/admin_header.php'; |
|
| 5 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 6 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
| 7 | +require_once __DIR__.'/admin_header.php'; |
|
| 8 | 8 | |
| 9 | 9 | function extgalleryLastVersion() |
| 10 | 10 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | switch ($fct) { |
| 40 | 40 | case 'send': |
| 41 | 41 | if (!$GLOBALS['xoopsSecurity']->check()) { |
| 42 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 42 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 43 | 43 | } |
| 44 | 44 | xoops_cp_header(); |
| 45 | 45 | adminMenu(1); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'EV_TITLE' => $event->getVar('event_title'), |
| 73 | 73 | 'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')), |
| 74 | 74 | 'EV_END' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')), |
| 75 | - 'EV_LINK' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
| 75 | + 'EV_LINK' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
| 76 | 76 | ]; |
| 77 | 77 | $xoopsMailer->assign($tag); |
| 78 | 78 | $xoopsMailer->send(true); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | default: |
| 88 | 88 | xoops_cp_header(); |
| 89 | 89 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
| 90 | - $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> '; |
|
| 90 | + $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> '; |
|
| 91 | 91 | $bodyCaption = _AM_EXTCAL_BODY |
| 92 | 92 | . "<br><br><span style='font-size:x-small;font-weight:bold;'>" |
| 93 | 93 | . _AM_EXTCAL_USEFUL_TAGS |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | . '<br>' |
| 111 | 111 | . _AM_EXTCAL_MAILTAGS9 |
| 112 | 112 | . '</span> '; |
| 113 | - $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
| 113 | + $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
| 114 | 114 | $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL); |
| 115 | 115 | $toCheckBox->addOption('pm', _AM_EXTCAL_PM); |
| 116 | 116 | |
| 117 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
| 118 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 117 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
| 118 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
| 119 | 119 | echo _AM_EXTCAL_INFO_SEND_NOTIF; |
| 120 | 120 | echo '</fieldset><br>'; |
| 121 | 121 | $form = new \XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&fct=send', 'post', true); |
@@ -145,13 +145,13 @@ discard block |
||
| 145 | 145 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
| 146 | 146 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 147 | 147 | $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
| 148 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
| 149 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
| 150 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
| 148 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
| 149 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
| 150 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
| 151 | 151 | $criteriaCompo = new \CriteriaCompo(); |
| 152 | 152 | $criteriaCompo->add(new \Criteria('event_approved', 1)); |
| 153 | 153 | $criteriaCompo->add(new \Criteria('event_start', time(), '>=')); |
| 154 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
| 154 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>'), '', 'Green'); |
|
| 155 | 155 | |
| 156 | 156 | $adminObject->addConfigBoxLine(); |
| 157 | 157 | $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
@@ -168,42 +168,42 @@ discard block |
||
| 168 | 168 | $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
| 169 | 169 | $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
| 170 | 170 | |
| 171 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
| 172 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 171 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>'; |
|
| 172 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
| 173 | 173 | // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
| 174 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
| 175 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
| 174 | + echo '<img src='.$pathIcon16.'/edit.png> '._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>'; |
|
| 175 | + echo '<img src='.$pathIcon16.'/delete.png> '._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>'; |
|
| 176 | 176 | echo '</fieldset><br>'; |
| 177 | 177 | |
| 178 | 178 | echo '<table class="outer" style="width:100%;">'; |
| 179 | 179 | echo '<tr style="text-align:center;">'; |
| 180 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
| 181 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
| 182 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
| 183 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
| 180 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
| 181 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
| 182 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
| 183 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
| 184 | 184 | echo '</tr>'; |
| 185 | 185 | |
| 186 | 186 | if (count($pendingEvent) > 0) { |
| 187 | 187 | $i = 0; |
| 188 | 188 | foreach ($pendingEvent as $event) { |
| 189 | 189 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
| 190 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
| 191 | - echo '<td>' . $event['Category']['cat_name'] . '</td>'; |
|
| 192 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
| 193 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
| 190 | + echo '<tr style="text-align:center;" class="'.$class.'">'; |
|
| 191 | + echo '<td>'.$event['Category']['cat_name'].'</td>'; |
|
| 192 | + echo '<td>'.$event['event_title'].'</td>'; |
|
| 193 | + echo '<td>'.$event['formated_event_start'].'</td>'; |
|
| 194 | 194 | echo '<td style="width:10%; text-align:center;">'; |
| 195 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
| 196 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
| 195 | + echo '<a href="event.php?op=modify&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a> '; |
|
| 196 | + echo '<a href="event.php?op=delete&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>'; |
|
| 197 | 197 | echo '</td>'; |
| 198 | 198 | echo '</tr>'; |
| 199 | 199 | } |
| 200 | 200 | } else { |
| 201 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
| 201 | + echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | echo '</table></fieldset><br>'; |
| 205 | 205 | |
| 206 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 206 | + require_once __DIR__.'/admin_footer.php'; |
|
| 207 | 207 | |
| 208 | 208 | break; |
| 209 | 209 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | use XoopsModules\Extcal\Common; |
| 22 | 22 | |
| 23 | -require_once __DIR__ . '/admin_header.php'; |
|
| 23 | +require_once __DIR__.'/admin_header.php'; |
|
| 24 | 24 | // Display Admin header |
| 25 | 25 | xoops_cp_header(); |
| 26 | 26 | /** @var Extcal\Utility $utilityClass */ |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | if ($helper->getConfig('displaySampleButton')) { |
| 41 | 41 | xoops_loadLanguage('admin/modulesadmin', 'system'); |
| 42 | - require_once __DIR__ . '/../testdata/index.php'; |
|
| 42 | + require_once __DIR__.'/../testdata/index.php'; |
|
| 43 | 43 | $adminObject->addItemButton(_AM_SYSTEM_MODULES_INSTALL_TESTDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
| 44 | 44 | $adminObject->displayButton('left', ''); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | -require_once __DIR__ . '/../testdata/index.php'; |
|
| 47 | +require_once __DIR__.'/../testdata/index.php'; |
|
| 48 | 48 | $adminObject->addItemButton(AM_EXTCAL_ADD_SAMPLEDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
| 49 | 49 | $adminObject->displayButton('left', ''); |
| 50 | 50 | |
@@ -55,4 +55,4 @@ discard block |
||
| 55 | 55 | echo $utility::getServerStats(); |
| 56 | 56 | |
| 57 | 57 | //codeDump(__FILE__); |
| 58 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 58 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -2,18 +2,18 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | 7 | $params = ['view' => _EXTCAL_NAV_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY]; |
| 8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 9 | -require_once __DIR__ . '/header.php'; |
|
| 9 | +require_once __DIR__.'/header.php'; |
|
| 10 | 10 | |
| 11 | 11 | /* ========================================================================== */ |
| 12 | 12 | //recupe des variables get |
| 13 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 14 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 15 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 16 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 13 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 14 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 15 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 16 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 17 | 17 | /* ========================================================================== */ |
| 18 | 18 | |
| 19 | 19 | //echo "{$params['view']}-{$year}-{$month}-{$day}<hr>extcal_{$params['view']}.html<br>"; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | 'nbJours' => $nbJours, |
| 47 | 47 | 'externalKeys' => 'cat_id', |
| 48 | 48 | ]; |
| 49 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 49 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 50 | 50 | /**********************************************************************/ |
| 51 | 51 | $eventsArray = $events; |
| 52 | 52 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -101,21 +101,21 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $navig = [ |
| 103 | 103 | 'prev' => [ |
| 104 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
| 104 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
| 105 | 105 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()), |
| 106 | 106 | ], |
| 107 | 107 | 'this' => [ |
| 108 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
| 108 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
| 109 | 109 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()), |
| 110 | 110 | ], |
| 111 | 111 | 'next' => [ |
| 112 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
| 112 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
| 113 | 113 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()), |
| 114 | 114 | ], |
| 115 | 115 | ]; |
| 116 | 116 | |
| 117 | 117 | // Title of the page |
| 118 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 118 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 119 | 119 | |
| 120 | 120 | // Assigning navig data to the template |
| 121 | 121 | $xoopsTpl->assign('navig', $navig); |
@@ -156,4 +156,4 @@ discard block |
||
| 156 | 156 | $xoopsTpl->assign('lang', $lang); |
| 157 | 157 | $xoopsTpl->assign('view', 'agendaday'); |
| 158 | 158 | |
| 159 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 159 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -2,24 +2,24 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | 7 | $params = ['view' => _EXTCAL_NAV_CALWEEK, 'file' => _EXTCAL_FILE_CALWEEK]; |
| 8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 9 | -require_once __DIR__ . '/header.php'; |
|
| 9 | +require_once __DIR__.'/header.php'; |
|
| 10 | 10 | |
| 11 | 11 | /* ========================================================================== */ |
| 12 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 13 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 14 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 15 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 12 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 13 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 14 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 15 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 16 | 16 | /* ========================================================================== */ |
| 17 | 17 | |
| 18 | 18 | // Validate the date (day, month and year) |
| 19 | 19 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
| 20 | 20 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
| 21 | 21 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
| 22 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 22 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 23 | 23 | $year = date('Y', $dayTS); |
| 24 | 24 | $month = date('n', $dayTS); |
| 25 | 25 | $day = date('j', $dayTS); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | 'cat' => $cat, |
| 50 | 50 | 'externalKeys' => 'cat_id', |
| 51 | 51 | ]; |
| 52 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 52 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 53 | 53 | /**********************************************************************/ |
| 54 | 54 | //$eventsArray = $events; |
| 55 | 55 | |
@@ -138,21 +138,21 @@ discard block |
||
| 138 | 138 | // Making navig data |
| 139 | 139 | $navig = [ |
| 140 | 140 | 'prev' => [ |
| 141 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
| 141 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
| 142 | 142 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
| 143 | 143 | ], |
| 144 | 144 | 'this' => [ |
| 145 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
| 145 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
| 146 | 146 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
| 147 | 147 | ], |
| 148 | 148 | 'next' => [ |
| 149 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
| 149 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
| 150 | 150 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
| 151 | 151 | ], |
| 152 | 152 | ]; |
| 153 | 153 | |
| 154 | 154 | // Title of the page |
| 155 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 155 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 156 | 156 | |
| 157 | 157 | // Assigning navig data to the template |
| 158 | 158 | $xoopsTpl->assign('navig', $navig); |
@@ -192,4 +192,4 @@ discard block |
||
| 192 | 192 | $xoopsTpl->assign('lang', $lang); |
| 193 | 193 | $xoopsTpl->assign('view', 'calweek'); |
| 194 | 194 | |
| 195 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 195 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,20 +19,20 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -include __DIR__ . '/../../mainfile.php'; |
|
| 22 | +include __DIR__.'/../../mainfile.php'; |
|
| 23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl'; |
| 24 | 24 | |
| 25 | -include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 25 | +include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 26 | 26 | //include __DIR__ . '/class/form/extcalform.php'; |
| 27 | 27 | //include __DIR__ . '/class/perm.php'; |
| 28 | 28 | |
| 29 | -require_once __DIR__ . '/class/Utility.php'; |
|
| 30 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 29 | +require_once __DIR__.'/class/Utility.php'; |
|
| 30 | +require_once __DIR__.'/include/constantes.php'; |
|
| 31 | 31 | |
| 32 | 32 | $permHandler = Extcal\Perm::getHandler(); |
| 33 | 33 | $xoopsUser = $xoopsUser ?: null; |
| 34 | 34 | |
| 35 | -if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) { |
|
| 35 | +if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) { |
|
| 36 | 36 | redirect_header('index.php', 3); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -41,16 +41,16 @@ discard block |
||
| 41 | 41 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 42 | 42 | |
| 43 | 43 | if (isset($_POST['form_preview'])) { |
| 44 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 44 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 45 | 45 | |
| 46 | 46 | // Title of the page |
| 47 | 47 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
| 48 | 48 | |
| 49 | 49 | $data = [ |
| 50 | 50 | 'event_title' => $_POST['event_title'], |
| 51 | - 'cat_id' => (int)$_POST['cat_id'], |
|
| 51 | + 'cat_id' => (int) $_POST['cat_id'], |
|
| 52 | 52 | 'event_desc' => $_POST['event_desc'], |
| 53 | - 'event_nbmember' => (int)$_POST['event_nbmember'], |
|
| 53 | + 'event_nbmember' => (int) $_POST['event_nbmember'], |
|
| 54 | 54 | 'event_contact' => $_POST['event_contact'], |
| 55 | 55 | 'event_url' => $_POST['event_url'], |
| 56 | 56 | 'event_email' => $_POST['event_email'], |
@@ -59,14 +59,14 @@ discard block |
||
| 59 | 59 | 'event_start' => $_POST['event_start'], |
| 60 | 60 | 'have_end' => $_POST['have_end'], |
| 61 | 61 | 'event_end' => $_POST['event_end'], |
| 62 | - 'dohtml' => (int)$xoopsModuleConfig['allow_html'], |
|
| 62 | + 'dohtml' => (int) $xoopsModuleConfig['allow_html'], |
|
| 63 | 63 | 'event_price' => $_POST['event_price'], |
| 64 | 64 | 'event_organisateur' => $_POST['event_organisateur'], |
| 65 | 65 | 'event_icone' => $_POST['event_icone'], |
| 66 | 66 | ]; |
| 67 | 67 | |
| 68 | 68 | if (isset($_POST['event_id'])) { |
| 69 | - $data['event_id'] = (int)$_POST['event_id']; |
|
| 69 | + $data['event_id'] = (int) $_POST['event_id']; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // Creating tempory event object to apply Object data filtering |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | // // Assigning language data to the template |
| 86 | 86 | // $xoopsTpl->assign('lang', $lang); |
| 87 | 87 | |
| 88 | - $event['cat_id'] = (int)$_POST['cat_id']; |
|
| 88 | + $event['cat_id'] = (int) $_POST['cat_id']; |
|
| 89 | 89 | $event['have_end'] = $_POST['have_end']; |
| 90 | 90 | |
| 91 | 91 | // Display the submit form |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $xoopsTpl->assign('preview', true); |
| 96 | 96 | $xoopsTpl->assign('formBody', $formBody); |
| 97 | 97 | |
| 98 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 98 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 99 | 99 | } elseif (isset($_POST['form_submit'])) { |
| 100 | 100 | if (!isset($_POST['rrule_weekly_interval'])) { |
| 101 | 101 | $_POST['rrule_weekly_interval'] = 0; |
@@ -119,12 +119,12 @@ discard block |
||
| 119 | 119 | Extcal\Utility::loadImg($_REQUEST, $event_picture1, $event_picture2); |
| 120 | 120 | /////////////////////////////////////////////////////////////////////////////// |
| 121 | 121 | |
| 122 | - require_once __DIR__ . '/class/perm.php'; |
|
| 122 | + require_once __DIR__.'/class/perm.php'; |
|
| 123 | 123 | |
| 124 | 124 | /** @var Extcal\FileHandler $fileHandler */ |
| 125 | 125 | $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
| 126 | 126 | $permHandler = Extcal\Perm::getHandler(); |
| 127 | - $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']); |
|
| 127 | + $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']); |
|
| 128 | 128 | |
| 129 | 129 | $data = [ |
| 130 | 130 | 'event_title' => $_POST['event_title'], |
@@ -150,11 +150,11 @@ discard block |
||
| 150 | 150 | ]; |
| 151 | 151 | |
| 152 | 152 | if (isset($_POST['event_id'])) { |
| 153 | - $eventHandler->modifyEvent((int)$_POST['event_id'], $data); |
|
| 154 | - $fileHandler->updateEventFile((int)$_POST['event_id']); |
|
| 155 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
| 153 | + $eventHandler->modifyEvent((int) $_POST['event_id'], $data); |
|
| 154 | + $fileHandler->updateEventFile((int) $_POST['event_id']); |
|
| 155 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
| 156 | 156 | |
| 157 | - redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
| 157 | + redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
| 158 | 158 | } else { |
| 159 | 159 | $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
| 160 | 160 | $data['event_submitdate'] = time(); |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | if (1 == $approve) { |
| 174 | 174 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
| 175 | 175 | $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
| 176 | - $cat = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all'); |
|
| 177 | - $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [ |
|
| 176 | + $cat = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all'); |
|
| 177 | + $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [ |
|
| 178 | 178 | 'EVENT_TITLE' => $_POST['event_title'], |
| 179 | 179 | 'CAT_NAME' => $cat->getVar('cat_name'), |
| 180 | 180 | ]); |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | // defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); |
| 23 | 23 | |
| 24 | -include __DIR__ . '/preloads/autoloader.php'; |
|
| 24 | +include __DIR__.'/preloads/autoloader.php'; |
|
| 25 | 25 | |
| 26 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 27 | -require_once __DIR__ . '/include/agenda_fnc.php'; |
|
| 28 | -require_once __DIR__ . '/class/config.php'; |
|
| 26 | +require_once __DIR__.'/include/constantes.php'; |
|
| 27 | +require_once __DIR__.'/include/agenda_fnc.php'; |
|
| 28 | +require_once __DIR__.'/class/config.php'; |
|
| 29 | 29 | //$loc_de = setlocale (LC_ALL, 'french'); |
| 30 | 30 | |
| 31 | 31 | //echo "local :" . setlocale(LC_TIME, $xoopsConfig['language'])."</ br>"; |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | // Tables created by sql file (without prefix!) |
| 99 | 99 | $modversion['tables'] = [ |
| 100 | - $moduleDirName . '_' . 'cat', |
|
| 101 | - $moduleDirName . '_' . 'event', |
|
| 102 | - $moduleDirName . '_' . 'eventmember', |
|
| 103 | - $moduleDirName . '_' . 'eventnotmember', |
|
| 104 | - $moduleDirName . '_' . 'file', |
|
| 105 | - $moduleDirName . '_' . 'etablissement' |
|
| 100 | + $moduleDirName.'_'.'cat', |
|
| 101 | + $moduleDirName.'_'.'event', |
|
| 102 | + $moduleDirName.'_'.'eventmember', |
|
| 103 | + $moduleDirName.'_'.'eventnotmember', |
|
| 104 | + $moduleDirName.'_'.'file', |
|
| 105 | + $moduleDirName.'_'.'etablissement' |
|
| 106 | 106 | ]; |
| 107 | 107 | |
| 108 | 108 | // SQL |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $modversion['config'][$i]['default'] = 5; |
| 515 | 515 | |
| 516 | 516 | ++$i; |
| 517 | -$modversion['config'][$i]['name'] = 'break' . $i; |
|
| 517 | +$modversion['config'][$i]['name'] = 'break'.$i; |
|
| 518 | 518 | $modversion['config'][$i]['title'] = '_MI_EXTCAL_SHOW_OTHEROPTIONS'; |
| 519 | 519 | $modversion['config'][$i]['description'] = ''; |
| 520 | 520 | $modversion['config'][$i]['formtype'] = 'line_break'; |
@@ -2,23 +2,23 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | 7 | $params = ['view' => _EXTCAL_NAV_AGENDA_WEEK, 'file' => _EXTCAL_FILE_AGENDA_WEEK]; |
| 8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 9 | -require_once __DIR__ . '/header.php'; |
|
| 9 | +require_once __DIR__.'/header.php'; |
|
| 10 | 10 | |
| 11 | 11 | /* ========================================================================== */ |
| 12 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 13 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 14 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 15 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 12 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 13 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 14 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 15 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 16 | 16 | |
| 17 | 17 | // Validate the date (day, month and year) |
| 18 | 18 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
| 19 | 19 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
| 20 | 20 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
| 21 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 21 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 22 | 22 | $year = date('Y', $dayTS); |
| 23 | 23 | $month = date('n', $dayTS); |
| 24 | 24 | $day = date('j', $dayTS); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | 'nbJours' => $nbJours, |
| 52 | 52 | 'externalKeys' => 'cat_id', |
| 53 | 53 | ]; |
| 54 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 54 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 55 | 55 | /**********************************************************************/ |
| 56 | 56 | $eventsArray = $events; |
| 57 | 57 | // Formating date |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | //------------------------------------------------------------------- |
| 84 | 84 | |
| 85 | 85 | //$params['colJourWidth'] = (int)((((500-50)/$nbJours)/500*100)+.5); |
| 86 | -$params['colJourWidth'] = (int)((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
| 86 | +$params['colJourWidth'] = (int) ((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
| 87 | 87 | // echo "agenda_week : {$dayTS}<br>"; |
| 88 | 88 | $tAgenda = agenda_getEvents($eventsArray, $dayTS, $hStart, $hEnd, $mTranche, $nbJours); |
| 89 | 89 | //$exp = print_r($eventsArray, true); |
@@ -105,21 +105,21 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $navig = [ |
| 107 | 107 | 'prev' => [ |
| 108 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
| 108 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
| 109 | 109 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
| 110 | 110 | ], |
| 111 | 111 | 'this' => [ |
| 112 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
| 112 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
| 113 | 113 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
| 114 | 114 | ], |
| 115 | 115 | 'next' => [ |
| 116 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
| 116 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
| 117 | 117 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
| 118 | 118 | ], |
| 119 | 119 | ]; |
| 120 | 120 | |
| 121 | 121 | // Title of the page |
| 122 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 122 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 123 | 123 | |
| 124 | 124 | // Assigning navig data to the template |
| 125 | 125 | $xoopsTpl->assign('navig', $navig); |
@@ -160,4 +160,4 @@ discard block |
||
| 160 | 160 | $xoopsTpl->assign('lang', $lang); |
| 161 | 161 | $xoopsTpl->assign('view', 'agendaweek'); |
| 162 | 162 | |
| 163 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 163 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | //mb $events = $eventHandler->objectToArray($eventHandler->getUpcommingEvent($nbEvent, $options)); |
| 54 | 54 | |
| 55 | 55 | /* ========================================================================== */ |
| 56 | - $year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 57 | - $month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 58 | - $day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 59 | - $cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 56 | + $year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 57 | + $month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 58 | + $day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 59 | + $cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 60 | 60 | /* ========================================================================== */ |
| 61 | 61 | |
| 62 | 62 | // Validate the date (day, month and year) |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | 'nbEvent' => $nbEvent, |
| 90 | 90 | 'nbDays' => $nbDays, |
| 91 | 91 | ]; |
| 92 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 92 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 93 | 93 | |
| 94 | 94 | //---------------------------- |
| 95 | 95 | |
@@ -116,27 +116,27 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 118 | 118 | |
| 119 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 120 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 121 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 119 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 120 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 121 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 122 | 122 | |
| 123 | - $form .= _MB_EXTCAL_UPCOMING_DAYS . ' : <input name="options[2]" size="5" maxlength="255" value="' . $options[2] . '" type="text"><br>'; |
|
| 123 | + $form .= _MB_EXTCAL_UPCOMING_DAYS.' : <input name="options[2]" size="5" maxlength="255" value="'.$options[2].'" type="text"><br>'; |
|
| 124 | 124 | |
| 125 | 125 | array_shift($options); |
| 126 | 126 | array_shift($options); |
| 127 | 127 | array_shift($options); |
| 128 | 128 | |
| 129 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 129 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 130 | 130 | if (false === array_search(0, $options)) { |
| 131 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 131 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 132 | 132 | } else { |
| 133 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 133 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 134 | 134 | } |
| 135 | 135 | foreach ($cats as $cat) { |
| 136 | 136 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 137 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 137 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 138 | 138 | } else { |
| 139 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 139 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | $form .= '</select>'; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -69,23 +69,23 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 71 | 71 | |
| 72 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 73 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 74 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 72 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 73 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 74 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 75 | 75 | array_shift($options); |
| 76 | 76 | array_shift($options); |
| 77 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 77 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 78 | 78 | if (false === array_search(0, $options)) { |
| 79 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 79 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 80 | 80 | } else { |
| 81 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 81 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 82 | 82 | } |
| 83 | 83 | /** @var Extcal\Category $cat */ |
| 84 | 84 | foreach ($cats as $cat) { |
| 85 | 85 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 86 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 86 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 87 | 87 | } else { |
| 88 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 88 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | $form .= '</select>'; |