@@ -70,7 +70,7 @@ |
||
70 | 70 | { |
71 | 71 | $ret = false; |
72 | 72 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
73 | - $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler'; |
|
73 | + $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler'; |
|
74 | 74 | $ret = new $class($db); |
75 | 75 | return $ret; |
76 | 76 | } |
@@ -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>"; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | && 'extcal' === $GLOBALS['xoopsModule']->getVar('dirname')) { |
77 | 77 | $user = isset($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser'] : null; |
78 | 78 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
79 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
79 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
80 | 80 | if ($catHandler->haveSubmitRight($user)) { |
81 | 81 | $modversion['sub'][0]['name'] = _MI_EXTCAL_SUBMIT_EVENT; |
82 | 82 | $modversion['sub'][0]['url'] = _EXTCAL_FILE_NEW_EVENT; |
@@ -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'; |
@@ -19,11 +19,11 @@ |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
23 | 23 | require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
24 | -require_once __DIR__ . '/../include/constantes.php'; |
|
24 | +require_once __DIR__.'/../include/constantes.php'; |
|
25 | 25 | |
26 | -include __DIR__ . '/../preloads/autoloader.php'; |
|
26 | +include __DIR__.'/../preloads/autoloader.php'; |
|
27 | 27 | |
28 | 28 | $moduleDirName = basename(dirname(__DIR__)); |
29 | 29 |
@@ -87,27 +87,27 @@ |
||
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> '; |
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> '; |
|
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> '; |
|
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); |
@@ -33,8 +33,8 @@ discard block |
||
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 |
||
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(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
147 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount( new \Criteria('event_approved', 1))), '', 'Green'); |
|
148 | - $adminObject->addInfoBoxLine(sprintf('<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(sprintf('<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(), ['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" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
|
172 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
173 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _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 = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
188 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
189 | - echo '<td>' . $event['Category']['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&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
194 | - echo '<a href="event.php?op=delete&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(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
147 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount( new \Criteria('event_approved', 1))), '', 'Green'); |
|
148 | + $adminObject->addInfoBoxLine(sprintf('<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(sprintf('<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(), ['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" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
|
172 | + echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
173 | + echo '<img src=' . $pathIcon16 . '/delete.png> ' . _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 = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
188 | + echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
189 | + echo '<td>' . $event['Category']['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&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
194 | + echo '<a href="event.php?op=delete&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 | } |
@@ -1,8 +1,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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> '; |
|
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> '; |
|
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,22 +108,22 @@ discard block |
||
108 | 108 | . '<br>' |
109 | 109 | . _AM_EXTCAL_MAILTAGS9 |
110 | 110 | . '</span> '; |
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&fct=send', 'post', true); |
120 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_FROM_NAME, 'mail_fromname', 30, 255, $xoopsConfig['sitename']), true); |
|
121 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_FROM_EMAIL, 'mail_fromemail', 30, 255, $fromemail), true); |
|
122 | - $form->addElement( new \XoopsFormText($subjectCaption, 'mail_subject', 50, 255, _AM_EXTCAL_SEND_NOTIFICATION_SUBJECT), true); |
|
123 | - $form->addElement( new \XoopsFormTextArea($bodyCaption, 'mail_body', _AM_EXTCAL_SEND_NOTIFICATION_BODY, 10), true); |
|
120 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_FROM_NAME, 'mail_fromname', 30, 255, $xoopsConfig['sitename']), true); |
|
121 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_FROM_EMAIL, 'mail_fromemail', 30, 255, $fromemail), true); |
|
122 | + $form->addElement(new \XoopsFormText($subjectCaption, 'mail_subject', 50, 255, _AM_EXTCAL_SEND_NOTIFICATION_SUBJECT), true); |
|
123 | + $form->addElement(new \XoopsFormTextArea($bodyCaption, 'mail_body', _AM_EXTCAL_SEND_NOTIFICATION_BODY, 10), true); |
|
124 | 124 | $form->addElement($toCheckBox, true); |
125 | - $form->addElement( new \XoopsFormHidden('event_id', $_GET['event_id']), false); |
|
126 | - $form->addElement( new \XoopsFormButton('', 'mail_submit', _SUBMIT, 'submit')); |
|
125 | + $form->addElement(new \XoopsFormHidden('event_id', $_GET['event_id']), false); |
|
126 | + $form->addElement(new \XoopsFormButton('', 'mail_submit', _SUBMIT, 'submit')); |
|
127 | 127 | $form->display(); |
128 | 128 | echo '</fieldset>'; |
129 | 129 | |
@@ -143,13 +143,13 @@ discard block |
||
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(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
147 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount( new \Criteria('event_approved', 1))), '', 'Green'); |
|
148 | - $adminObject->addInfoBoxLine(sprintf('<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(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
146 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
147 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
148 | + $adminObject->addInfoBoxLine(sprintf('<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(sprintf('<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 |
||
166 | 166 | $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['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" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
172 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
173 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
172 | + echo '<img src='.$pathIcon16.'/edit.png> '._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>'; |
|
173 | + echo '<img src='.$pathIcon16.'/delete.png> '._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 = (0 == ++$i % 2) ? 'even' : 'odd'; |
188 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
189 | - echo '<td>' . $event['Category']['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['Category']['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&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
194 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
193 | + echo '<a href="event.php?op=modify&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a> '; |
|
194 | + echo '<a href="event.php?op=delete&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 | } |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | use Xmf\Request; |
21 | 21 | use XoopsModules\Extcal; |
22 | 22 | |
23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
24 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
25 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
24 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
25 | +require_once __DIR__.'/admin_header.php'; |
|
26 | 26 | //require_once __DIR__ . '/../class/Utility.php'; |
27 | -require_once __DIR__ . '/../include/constantes.php'; |
|
27 | +require_once __DIR__.'/../include/constantes.php'; |
|
28 | 28 | |
29 | 29 | //$gepeto = array_merge($_GET, $_POST); |
30 | 30 | //while (list($key, $value) = each($gepeto)) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // $op = ''; |
37 | 37 | //} |
38 | 38 | $op = 'list'; |
39 | -if(Request::hasVar('op', 'GET' )) { |
|
39 | +if (Request::hasVar('op', 'GET')) { |
|
40 | 40 | $op = Request::getString('op', ''); |
41 | 41 | $cat_id = Request::getInt('cat_id', 0); |
42 | 42 | } |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | //$cat = $catHandler->getCat($cat_id, true); |
92 | 92 | |
93 | 93 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
94 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255), true); |
|
95 | - $form->addElement( new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', ''), false); |
|
96 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
|
97 | - $form->addElement( new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
|
94 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255), true); |
|
95 | + $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', ''), false); |
|
96 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
|
97 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
|
98 | 98 | |
99 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
99 | + $file_path = __DIR__.'/../assets/css/images'; |
|
100 | 100 | $tf = \XoopsLists::getImgListAsArray($file_path); |
101 | 101 | array_unshift($tf, _MD_EXTCAL_NONE); |
102 | 102 | //$xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | $xfIcones->addOptionArray($tf); |
105 | 105 | $form->addElement($xfIcones, false); |
106 | 106 | |
107 | - $form->addElement( new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
107 | + $form->addElement(new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
108 | 108 | |
109 | 109 | $form->display(); |
110 | 110 | |
111 | - require_once __DIR__ . '/admin_footer.php'; |
|
111 | + require_once __DIR__.'/admin_footer.php'; |
|
112 | 112 | break; |
113 | 113 | |
114 | 114 | case 'edit': |
@@ -121,23 +121,23 @@ discard block |
||
121 | 121 | // $cat = $catHandler->getCat($cat_id, true); |
122 | 122 | } |
123 | 123 | |
124 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
124 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
125 | 125 | |
126 | 126 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
127 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
|
128 | - $form->addElement( new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
|
129 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
|
130 | - $form->addElement( new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
127 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
|
128 | + $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
|
129 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
|
130 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
131 | 131 | |
132 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
132 | + $file_path = __DIR__.'/../assets/css/images'; |
|
133 | 133 | $tf = \XoopsLists::getImgListAsArray($file_path); |
134 | 134 | array_unshift($tf, _MD_EXTCAL_NONE); |
135 | 135 | $xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
136 | 136 | $xfIcones->addOptionArray($tf); |
137 | 137 | $form->addElement($xfIcones, false); |
138 | 138 | |
139 | - $form->addElement( new \XoopsFormHidden('cat_id', $cat->getVar('cat_id')), false); |
|
140 | - $form->addElement( new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
139 | + $form->addElement(new \XoopsFormHidden('cat_id', $cat->getVar('cat_id')), false); |
|
140 | + $form->addElement(new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
141 | 141 | $form->display(); |
142 | 142 | |
143 | 143 | echo '</fieldset>'; |
@@ -285,6 +285,6 @@ discard block |
||
285 | 285 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
286 | 286 | |
287 | 287 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
288 | - require_once __DIR__ . '/admin_footer.php'; |
|
288 | + require_once __DIR__.'/admin_footer.php'; |
|
289 | 289 | break; |
290 | 290 | } |
@@ -20,19 +20,19 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | 22 | // Include xoops admin header |
23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
24 | 24 | //require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php'; |
25 | -require_once __DIR__ . '/../../../kernel/module.php'; |
|
26 | -require_once __DIR__ . '/../../../class/xoopsformloader.php'; |
|
27 | -require_once __DIR__ . '/../../../class/tree.php'; |
|
28 | -require_once __DIR__ . '/../../../class/xoopslists.php'; |
|
29 | -require_once __DIR__ . '/../../../class/pagenav.php'; |
|
30 | -require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php'; |
|
31 | -require_once __DIR__ . '/../../../class/uploader.php'; |
|
25 | +require_once __DIR__.'/../../../kernel/module.php'; |
|
26 | +require_once __DIR__.'/../../../class/xoopsformloader.php'; |
|
27 | +require_once __DIR__.'/../../../class/tree.php'; |
|
28 | +require_once __DIR__.'/../../../class/xoopslists.php'; |
|
29 | +require_once __DIR__.'/../../../class/pagenav.php'; |
|
30 | +require_once __DIR__.'/../../../class/xoopsform/grouppermform.php'; |
|
31 | +require_once __DIR__.'/../../../class/uploader.php'; |
|
32 | 32 | //require_once __DIR__ . '/../class/etablissement.php'; |
33 | -require_once __DIR__ . '/../include/constantes.php'; |
|
33 | +require_once __DIR__.'/../include/constantes.php'; |
|
34 | 34 | |
35 | -require_once __DIR__ . '/admin_header.php'; |
|
35 | +require_once __DIR__.'/admin_header.php'; |
|
36 | 36 | |
37 | 37 | //include_once("functions.php"); |
38 | 38 | //include_once("../include/functions.php"); |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | if ($xoopsUser) { |
41 | 41 | $xoopsModule = \XoopsModule::getByDirname('extcal'); |
42 | 42 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
43 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
43 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
44 | 44 | } |
45 | 45 | } else { |
46 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
46 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | // Include language file |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $adminObject->displayNavigation(basename(__FILE__)); |
81 | 81 | //*************************************************************************************** |
82 | 82 | |
83 | - $criteria = new \CriteriaCompo(); |
|
83 | + $criteria = new \CriteriaCompo(); |
|
84 | 84 | if (isset($_REQUEST['limit'])) { |
85 | 85 | $criteria->setLimit($_REQUEST['limit']); |
86 | 86 | $limit = $_REQUEST['limit']; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $etablissement_arr = $etablissementHandler->getObjects($criteria); |
101 | 101 | $numrows = $etablissementHandler->getCount($criteria); |
102 | 102 | if ($numrows > $limit) { |
103 | - $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); |
|
103 | + $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit); |
|
104 | 104 | $pagenav = $pagenav->renderNav(4); |
105 | 105 | } else { |
106 | 106 | $pagenav = ''; |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | if ($numrows > 0) { |
110 | 110 | echo '<table width="100%" cellspacing="1" class="outer">'; |
111 | 111 | echo '<tr>'; |
112 | - echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>'; |
|
113 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>'; |
|
114 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>'; |
|
115 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>'; |
|
116 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>'; |
|
112 | + echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>'; |
|
113 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>'; |
|
114 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>'; |
|
115 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>'; |
|
116 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>'; |
|
117 | 117 | echo '</tr>'; |
118 | 118 | $class = 'odd'; |
119 | 119 | foreach (array_keys($etablissement_arr) as $i) { |
@@ -123,21 +123,21 @@ discard block |
||
123 | 123 | $etablissement_adresse = $etablissement_arr[$i]->getVar('adresse'); |
124 | 124 | $etablissement_city = $etablissement_arr[$i]->getVar('ville'); |
125 | 125 | $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe'); |
126 | - echo '<tr class="' . $class . '">'; |
|
127 | - echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>'; |
|
126 | + echo '<tr class="'.$class.'">'; |
|
127 | + echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>'; |
|
128 | 128 | |
129 | - echo '<td align="center"><b>' . $etablissement_adresse . '</td>'; |
|
130 | - echo '<td align="center"><b>' . $etablissement_city . '</td>'; |
|
131 | - echo '<td align="center"><b>' . $etablissement_telephone . '</td>'; |
|
129 | + echo '<td align="center"><b>'.$etablissement_adresse.'</td>'; |
|
130 | + echo '<td align="center"><b>'.$etablissement_city.'</td>'; |
|
131 | + echo '<td align="center"><b>'.$etablissement_telephone.'</td>'; |
|
132 | 132 | echo '<td align="center" width="15%">'; |
133 | - 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> '; |
|
134 | - 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 | + 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> '; |
|
134 | + 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> '; |
|
135 | 135 | echo '</td>'; |
136 | 136 | } |
137 | 137 | echo '</table><br>'; |
138 | - echo '<br><div align=right>' . $pagenav . '</div><br>'; |
|
138 | + echo '<br><div align=right>'.$pagenav.'</div><br>'; |
|
139 | 139 | } else { |
140 | - echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>'; |
|
140 | + echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>'; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | // Affichage du formulaire |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | 'ok' => 1, |
161 | 161 | 'etablissement_id' => $_REQUEST['etablissement_id'], |
162 | 162 | 'op' => 'delete_etablissement', |
163 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>'); |
|
163 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>'); |
|
164 | 164 | } |
165 | 165 | break; |
166 | 166 | |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | $obj->setVar('map', $_REQUEST['map']); |
203 | 203 | |
204 | 204 | //Logo |
205 | - $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/'; |
|
206 | - $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/'; |
|
205 | + $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'; |
|
206 | + $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/'; |
|
207 | 207 | |
208 | 208 | $delimg = @$_REQUEST['delimg']; |
209 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
209 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
210 | 210 | if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) { |
211 | 211 | $upload = new \XoopsMediaUploader($uploaddir_etablissement, [ |
212 | 212 | 'image/gif', |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | } else { |
231 | 231 | $logo = ''; |
232 | - $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file']; |
|
232 | + $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file']; |
|
233 | 233 | if (is_file($url_etablissement)) { |
234 | 234 | chmod($url_etablissement, 0777); |
235 | 235 | unlink($url_etablissement); |
@@ -249,4 +249,4 @@ discard block |
||
249 | 249 | break; |
250 | 250 | } |
251 | 251 | |
252 | -require_once __DIR__ . '/admin_footer.php'; |
|
252 | +require_once __DIR__.'/admin_footer.php'; |
@@ -72,177 +72,195 @@ discard block |
||
72 | 72 | |
73 | 73 | switch ($op) { |
74 | 74 | |
75 | - case 'enreg': |
|
76 | - |
|
77 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
78 | - $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
|
79 | - // $t = print_r($_POST,true); |
|
80 | - // echo "<pre>{$t}</pre><br>"; |
|
81 | - // exit; |
|
82 | - // If the date format is wrong |
|
83 | - // if ( |
|
84 | - // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
85 | - // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
86 | - // ) { |
|
87 | - // redirect_header( |
|
88 | - // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
89 | - // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
90 | - // ); |
|
91 | - // exit; |
|
92 | - // } |
|
93 | - |
|
94 | - //exit; |
|
95 | - /////////////////////////////////////////////////////////////////////////////// |
|
96 | - Extcal\Utility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
97 | - /////////////////////////////////////////////////////////////////////////////// |
|
98 | - $data = [ |
|
99 | - 'event_title' => $_POST['event_title'], |
|
100 | - 'cat_id' => $_POST['cat_id'], |
|
101 | - 'event_desc' => $_POST['event_desc'], |
|
102 | - 'event_nbmember' => $_POST['event_nbmember'], |
|
103 | - 'event_organisateur' => $_POST['event_organisateur'], |
|
104 | - 'event_contact' => $_POST['event_contact'], |
|
105 | - 'event_url' => $_POST['event_url'], |
|
106 | - 'event_email' => $_POST['event_email'], |
|
107 | - 'event_address' => $_POST['event_address'], |
|
108 | - 'event_approved' => 1, |
|
109 | - 'event_start' => $_POST['event_start'], |
|
110 | - 'have_end' => $_POST['have_end'], |
|
111 | - 'event_end' => $_POST['event_end'], |
|
112 | - 'event_picture1' => @$event_picture1, |
|
113 | - 'event_picture2' => @$event_picture2, |
|
114 | - 'event_price' => @$_POST['event_price'], |
|
115 | - 'event_etablissement' => $_POST['event_etablissement'], |
|
116 | - 'dohtml' => $extcalConfig['allow_html'], |
|
117 | - 'event_icone' => $_POST['event_icone'], |
|
118 | - ]; |
|
119 | - |
|
120 | - // Event edited |
|
121 | - if (isset($_POST['event_id'])) { |
|
122 | - if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
123 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
75 | + case 'enreg': |
|
76 | + |
|
77 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
78 | + $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
|
79 | + // $t = print_r($_POST,true); |
|
80 | + // echo "<pre>{$t}</pre><br>"; |
|
81 | + // exit; |
|
82 | + // If the date format is wrong |
|
83 | + // if ( |
|
84 | + // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
85 | + // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
86 | + // ) { |
|
87 | + // redirect_header( |
|
88 | + // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
89 | + // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
90 | + // ); |
|
91 | + // exit; |
|
92 | + // } |
|
93 | + |
|
94 | + //exit; |
|
95 | + /////////////////////////////////////////////////////////////////////////////// |
|
96 | + Extcal\Utility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
97 | + /////////////////////////////////////////////////////////////////////////////// |
|
98 | + $data = [ |
|
99 | + 'event_title' => $_POST['event_title'], |
|
100 | + 'cat_id' => $_POST['cat_id'], |
|
101 | + 'event_desc' => $_POST['event_desc'], |
|
102 | + 'event_nbmember' => $_POST['event_nbmember'], |
|
103 | + 'event_organisateur' => $_POST['event_organisateur'], |
|
104 | + 'event_contact' => $_POST['event_contact'], |
|
105 | + 'event_url' => $_POST['event_url'], |
|
106 | + 'event_email' => $_POST['event_email'], |
|
107 | + 'event_address' => $_POST['event_address'], |
|
108 | + 'event_approved' => 1, |
|
109 | + 'event_start' => $_POST['event_start'], |
|
110 | + 'have_end' => $_POST['have_end'], |
|
111 | + 'event_end' => $_POST['event_end'], |
|
112 | + 'event_picture1' => @$event_picture1, |
|
113 | + 'event_picture2' => @$event_picture2, |
|
114 | + 'event_price' => @$_POST['event_price'], |
|
115 | + 'event_etablissement' => $_POST['event_etablissement'], |
|
116 | + 'dohtml' => $extcalConfig['allow_html'], |
|
117 | + 'event_icone' => $_POST['event_icone'], |
|
118 | + ]; |
|
119 | + |
|
120 | + // Event edited |
|
121 | + if (isset($_POST['event_id'])) { |
|
122 | + if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
123 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
124 | + } else { |
|
125 | + $fileHandler->createFile((int)$_POST['event_id']); |
|
126 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
127 | + } |
|
128 | + |
|
129 | + // New event |
|
124 | 130 | } else { |
125 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
126 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
131 | + $notificationHandler = xoops_getHandler('notification'); |
|
132 | + /** @var Extcal\CategoryHandler $catHandler */ |
|
133 | + // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
134 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
135 | + |
|
136 | + $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
137 | + $data['event_submitdate'] = time(); |
|
138 | + |
|
139 | + if ($eventHandler->createEvent($data, $_POST)) { |
|
140 | + $fileHandler->createFile($eventHandler->getInsertId()); |
|
141 | + $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
142 | + $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]); |
|
143 | + $notificationHandler->triggerEvent('category', $_POST['cat_id'], 'new_event_cat', [ |
|
144 | + 'EVENT_TITLE' => $_POST['event_title'], |
|
145 | + 'CAT_NAME' => $cat->getVar('cat_name'), |
|
146 | + ]); |
|
147 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
148 | + } else { |
|
149 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
150 | + } |
|
127 | 151 | } |
152 | + break; |
|
128 | 153 | |
129 | - // New event |
|
130 | - } else { |
|
131 | - $notificationHandler = xoops_getHandler('notification'); |
|
132 | - /** @var Extcal\CategoryHandler $catHandler */ |
|
133 | -// $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
134 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
135 | - |
|
136 | - $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
137 | - $data['event_submitdate'] = time(); |
|
138 | - |
|
139 | - if ($eventHandler->createEvent($data, $_POST)) { |
|
140 | - $fileHandler->createFile($eventHandler->getInsertId()); |
|
141 | - $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
142 | - $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]); |
|
143 | - $notificationHandler->triggerEvent('category', $_POST['cat_id'], 'new_event_cat', [ |
|
144 | - 'EVENT_TITLE' => $_POST['event_title'], |
|
145 | - 'CAT_NAME' => $cat->getVar('cat_name'), |
|
146 | - ]); |
|
147 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
148 | - } else { |
|
149 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
154 | + case 'clone': /* sur validation du formulaire */ |
|
155 | + case 'modify': |
|
156 | + $action = (('clone' === $op) ? 'clone' : 'edit'); |
|
157 | + xoops_cp_header(); |
|
158 | + //================================================ |
|
159 | + // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
160 | + // |
|
161 | + // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
162 | + // $dateBirthday = new \XoopsTcCalendar("datez1", true, false); |
|
163 | + // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
164 | + // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
165 | + // //$dateBirthday->rtl=false; |
|
166 | + // $dateBirthday->setAutoHide(false); |
|
167 | + // |
|
168 | + // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
169 | + // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
170 | + // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
171 | + // |
|
172 | + // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
173 | + // $dateBirthday->zindex = 150; //default 1 |
|
174 | + // $dateBirthday->setYearInterval(1995, date('Y')); |
|
175 | + // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
176 | + // //$dateBirthday->autoSubmit(true, "calendar"); |
|
177 | + // $dateBirthday->disabledDay("sat"); |
|
178 | + // $dateBirthday->disabledDay("sun"); |
|
179 | + // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
180 | + // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
181 | + // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
182 | + // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
183 | + // echo $dateBirthday->render(); |
|
184 | + // echo "</td></tr></table>"; |
|
185 | + //echo $dateBirthday->render(); |
|
186 | + //================================================ |
|
187 | + // @author Gregory Mage (Aka Mage) |
|
188 | + //*************************************************************************************** |
|
189 | + // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
190 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
191 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
192 | + //*************************************************************************************** |
|
193 | + |
|
194 | + $eventId = $_GET['event_id']; |
|
195 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
196 | + |
|
197 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
198 | + |
|
199 | + if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
|
200 | + $form->display(); |
|
150 | 201 | } |
151 | - } |
|
152 | - break; |
|
153 | - |
|
154 | - case 'clone': /* sur validation du formulaire */ |
|
155 | - case 'modify': |
|
156 | - $action = (('clone' === $op) ? 'clone' : 'edit'); |
|
157 | - xoops_cp_header(); |
|
158 | - //================================================ |
|
159 | - // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
160 | - // |
|
161 | - // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
162 | - // $dateBirthday = new \XoopsTcCalendar("datez1", true, false); |
|
163 | - // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
164 | - // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
165 | - // //$dateBirthday->rtl=false; |
|
166 | - // $dateBirthday->setAutoHide(false); |
|
167 | - // |
|
168 | - // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
169 | - // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
170 | - // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
171 | - // |
|
172 | - // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
173 | - // $dateBirthday->zindex = 150; //default 1 |
|
174 | - // $dateBirthday->setYearInterval(1995, date('Y')); |
|
175 | - // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
176 | - // //$dateBirthday->autoSubmit(true, "calendar"); |
|
177 | - // $dateBirthday->disabledDay("sat"); |
|
178 | - // $dateBirthday->disabledDay("sun"); |
|
179 | - // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
180 | - // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
181 | - // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
182 | - // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
183 | - // echo $dateBirthday->render(); |
|
184 | - // echo "</td></tr></table>"; |
|
185 | - //echo $dateBirthday->render(); |
|
186 | - //================================================ |
|
187 | - // @author Gregory Mage (Aka Mage) |
|
188 | - //*************************************************************************************** |
|
189 | - // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
190 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
191 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
192 | - //*************************************************************************************** |
|
193 | - |
|
194 | - $eventId = $_GET['event_id']; |
|
195 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
196 | - |
|
197 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
198 | - |
|
199 | - if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
|
200 | - $form->display(); |
|
201 | - } |
|
202 | 202 | |
203 | - echo '</fieldset><br>'; |
|
203 | + echo '</fieldset><br>'; |
|
204 | 204 | |
205 | - xoops_cp_footer(); |
|
205 | + xoops_cp_footer(); |
|
206 | 206 | |
207 | - break; |
|
207 | + break; |
|
208 | 208 | |
209 | - case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
209 | + case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
210 | 210 | |
211 | - //$newEventId = 1; |
|
212 | - $eventId = $_GET['event_id']; |
|
213 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
214 | - $event = $eventHandler->getEvent($eventId); |
|
215 | - $t = $event->getVars(); |
|
216 | - $data = []; |
|
217 | - // while (list($key, $val) = each($t)) { |
|
218 | - foreach ($t as $key => $val) { |
|
219 | - $data[$key] = $val['value']; |
|
220 | - } |
|
211 | + //$newEventId = 1; |
|
212 | + $eventId = $_GET['event_id']; |
|
213 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
214 | + $event = $eventHandler->getEvent($eventId); |
|
215 | + $t = $event->getVars(); |
|
216 | + $data = []; |
|
217 | + // while (list($key, $val) = each($t)) { |
|
218 | + foreach ($t as $key => $val) { |
|
219 | + $data[$key] = $val['value']; |
|
220 | + } |
|
221 | 221 | |
222 | - $data['event_id'] = 0; |
|
223 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
222 | + $data['event_id'] = 0; |
|
223 | + $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
224 | 224 | |
225 | - $newEvent = $eventHandler->create(); |
|
226 | - $newEvent->setVars($data); |
|
227 | - $t = $eventHandler->insert($newEvent, true); |
|
225 | + $newEvent = $eventHandler->create(); |
|
226 | + $newEvent->setVars($data); |
|
227 | + $t = $eventHandler->insert($newEvent, true); |
|
228 | 228 | |
229 | - $newEventId = $newEvent->getVar('event_id'); |
|
230 | - $ts = print_r($newEventId, true); |
|
229 | + $newEventId = $newEvent->getVar('event_id'); |
|
230 | + $ts = print_r($newEventId, true); |
|
231 | 231 | |
232 | - redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
233 | - break; |
|
232 | + redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
233 | + break; |
|
234 | 234 | |
235 | - case 'delete': |
|
235 | + case 'delete': |
|
236 | 236 | |
237 | - if (isset($_POST['confirm'])) { |
|
238 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
239 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
237 | + if (isset($_POST['confirm'])) { |
|
238 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
239 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
240 | + } |
|
241 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
242 | + // $eventHandler->deleteEvent($_POST['event_id']); |
|
243 | + deleteEvents($_POST['event_id']); |
|
244 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
245 | + } else { |
|
246 | + xoops_cp_header(); |
|
247 | + // @author Gregory Mage (Aka Mage) |
|
248 | + //*************************************************************************************** |
|
249 | + //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
250 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
251 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
252 | + //*************************************************************************************** |
|
253 | + |
|
254 | + $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1]; |
|
255 | + xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
256 | + |
|
257 | + xoops_cp_footer(); |
|
240 | 258 | } |
241 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
242 | - // $eventHandler->deleteEvent($_POST['event_id']); |
|
243 | - deleteEvents($_POST['event_id']); |
|
244 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
245 | - } else { |
|
259 | + |
|
260 | + break; |
|
261 | + |
|
262 | + case 'deleteSelection': |
|
263 | + |
|
246 | 264 | xoops_cp_header(); |
247 | 265 | // @author Gregory Mage (Aka Mage) |
248 | 266 | //*************************************************************************************** |
@@ -250,185 +268,167 @@ discard block |
||
250 | 268 | $adminObject = \Xmf\Module\Admin::getInstance(); |
251 | 269 | $adminObject->displayNavigation(basename(__FILE__)); |
252 | 270 | //*************************************************************************************** |
271 | + if (isset($_POST['deleteSelection'][0])) { |
|
272 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
273 | + $ids = array_keys($_POST['deleteAllEvents']); |
|
274 | + } else { |
|
275 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
276 | + $ids = array_keys($_POST['deleteEvents']); |
|
277 | + } |
|
253 | 278 | |
254 | - $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1]; |
|
255 | - xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
279 | + // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
280 | + // $ids = array_keys($_POST['deleteEvents']); |
|
281 | + $ids = implode(',', $ids); |
|
282 | + //echo $ids.'<br>'; |
|
283 | + $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1]; |
|
284 | + //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
285 | + xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
256 | 286 | |
257 | 287 | xoops_cp_footer(); |
258 | - } |
|
259 | 288 | |
260 | - break; |
|
261 | - |
|
262 | - case 'deleteSelection': |
|
263 | - |
|
264 | - xoops_cp_header(); |
|
265 | - // @author Gregory Mage (Aka Mage) |
|
266 | - //*************************************************************************************** |
|
267 | - //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
268 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
269 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
270 | - //*************************************************************************************** |
|
271 | - if (isset($_POST['deleteSelection'][0])) { |
|
272 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
273 | - $ids = array_keys($_POST['deleteAllEvents']); |
|
274 | - } else { |
|
275 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
276 | - $ids = array_keys($_POST['deleteEvents']); |
|
277 | - } |
|
289 | + break; |
|
278 | 290 | |
279 | - // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
280 | - // $ids = array_keys($_POST['deleteEvents']); |
|
281 | - $ids = implode(',', $ids); |
|
282 | - //echo $ids.'<br>'; |
|
283 | - $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1]; |
|
284 | - //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
285 | - xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
286 | - |
|
287 | - xoops_cp_footer(); |
|
288 | - |
|
289 | - break; |
|
290 | - |
|
291 | - case 'deleteSelectionOK': |
|
292 | - //----------------------------------------- |
|
293 | - // $t = print_r($_GET,true); |
|
294 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
295 | - // |
|
296 | - // $t = print_r($_POST,true); |
|
297 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
298 | - // exit; |
|
299 | - //----------------------------------------- |
|
300 | - |
|
301 | - if (isset($_POST['deleteSelection'][0])) { |
|
302 | - } else { |
|
303 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
304 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
305 | - } |
|
291 | + case 'deleteSelectionOK': |
|
292 | + //----------------------------------------- |
|
293 | + // $t = print_r($_GET,true); |
|
294 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
295 | + // |
|
296 | + // $t = print_r($_POST,true); |
|
297 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
298 | + // exit; |
|
299 | + //----------------------------------------- |
|
306 | 300 | |
307 | - deleteEvents($_POST['event_ids']); |
|
301 | + if (isset($_POST['deleteSelection'][0])) { |
|
302 | + } else { |
|
303 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
304 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
305 | + } |
|
308 | 306 | |
309 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
310 | - } |
|
307 | + deleteEvents($_POST['event_ids']); |
|
311 | 308 | |
312 | - break; |
|
309 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
310 | + } |
|
313 | 311 | |
314 | - case 'default': |
|
315 | - default: |
|
312 | + break; |
|
316 | 313 | |
317 | - //global $extcalConfig; |
|
318 | - $extcalConfig = Extcal\Config::getHandler(); |
|
319 | - $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
|
314 | + case 'default': |
|
315 | + default: |
|
320 | 316 | |
321 | - $start = isset($_GET['start']) ? $_GET['start'] : 0; |
|
322 | - $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage']; |
|
317 | + //global $extcalConfig; |
|
318 | + $extcalConfig = Extcal\Config::getHandler(); |
|
319 | + $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
|
323 | 320 | |
324 | - xoops_cp_header(); |
|
325 | - // @author Gregory Mage (Aka Mage) |
|
326 | - //*************************************************************************************** |
|
321 | + $start = isset($_GET['start']) ? $_GET['start'] : 0; |
|
322 | + $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage']; |
|
327 | 323 | |
328 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
329 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
330 | - //*************************************************************************************** |
|
324 | + xoops_cp_header(); |
|
325 | + // @author Gregory Mage (Aka Mage) |
|
326 | + //*************************************************************************************** |
|
331 | 327 | |
332 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
333 | - $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
|
334 | - $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
328 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
329 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
330 | + //*************************************************************************************** |
|
335 | 331 | |
336 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
337 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
338 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
339 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
|
332 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
333 | + $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
|
334 | + $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
340 | 335 | |
341 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
342 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
336 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
337 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
338 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
339 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
|
343 | 340 | |
344 | - echo '</fieldset><br>'; |
|
341 | + echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
342 | + echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
345 | 343 | |
346 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
344 | + echo '</fieldset><br>'; |
|
347 | 345 | |
348 | - echo '<form method="POST" action="event.php">'; |
|
349 | - echo '<input type="hidden" name="op" value="deleteSelection">'; |
|
346 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
350 | 347 | |
351 | - echo '<table class="outer" style="width:100%;">'; |
|
352 | - echo '<tr style="text-align:center;">'; |
|
353 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
354 | - echo '<th>#</th>'; |
|
355 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
356 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
357 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
358 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
348 | + echo '<form method="POST" action="event.php">'; |
|
349 | + echo '<input type="hidden" name="op" value="deleteSelection">'; |
|
362 | 350 | |
363 | - echo '</tr>'; |
|
351 | + echo '<table class="outer" style="width:100%;">'; |
|
352 | + echo '<tr style="text-align:center;">'; |
|
353 | + echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
354 | + echo '<th>#</th>'; |
|
355 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
356 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
357 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
358 | + echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
359 | + echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
360 | + echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
361 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
364 | 362 | |
365 | - if (count($events) > 0) { |
|
366 | - $i = 0; |
|
367 | - foreach ($events as $event) { |
|
368 | - $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
369 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
370 | - echo "<td width='10%' align='center'>"; |
|
371 | - echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
372 | - echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
|
373 | - echo '</td>'; |
|
374 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
375 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
376 | - |
|
377 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
378 | - |
|
379 | - // if ($event['event_isrecur']) { |
|
380 | - // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
381 | - // } else { |
|
382 | - // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
383 | - // } |
|
384 | - |
|
385 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
386 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
387 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
388 | - if (!isset($event['formated_reccur_rule'])) { |
|
389 | - $event['formated_reccur_rule'] = ''; |
|
363 | + echo '</tr>'; |
|
364 | + |
|
365 | + if (count($events) > 0) { |
|
366 | + $i = 0; |
|
367 | + foreach ($events as $event) { |
|
368 | + $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
369 | + echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
370 | + echo "<td width='10%' align='center'>"; |
|
371 | + echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
372 | + echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
|
373 | + echo '</td>'; |
|
374 | + echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
375 | + echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
376 | + |
|
377 | + echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
378 | + |
|
379 | + // if ($event['event_isrecur']) { |
|
380 | + // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
381 | + // } else { |
|
382 | + // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
383 | + // } |
|
384 | + |
|
385 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
386 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
387 | + echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
388 | + if (!isset($event['formated_reccur_rule'])) { |
|
389 | + $event['formated_reccur_rule'] = ''; |
|
390 | + } |
|
391 | + echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
392 | + |
|
393 | + echo '<td style="width:10%; text-align:center;">'; |
|
394 | + echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
395 | + echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
396 | + echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
397 | + echo '</td>'; |
|
398 | + |
|
399 | + echo '</tr>'; |
|
390 | 400 | } |
391 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
401 | + //--------------------------------------------------------- |
|
402 | + $pageNav = new \XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
392 | 403 | |
393 | - echo '<td style="width:10%; text-align:center;">'; |
|
394 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
395 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
396 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
404 | + echo '<tr><td colspan="2" style="text-align: right;">'; |
|
405 | + echo $pageNav->renderNav(2); |
|
397 | 406 | echo '</td>'; |
398 | 407 | |
399 | - echo '</tr>'; |
|
400 | - } |
|
401 | - //--------------------------------------------------------- |
|
402 | - $pageNav = new \XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
408 | + echo '<td colspan="2" style="text-align: right;">'; |
|
403 | 409 | |
404 | - echo '<tr><td colspan="2" style="text-align: right;">'; |
|
405 | - echo $pageNav->renderNav(2); |
|
406 | - echo '</td>'; |
|
410 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
411 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
407 | 412 | |
408 | - echo '<td colspan="2" style="text-align: right;">'; |
|
409 | - |
|
410 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
411 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
412 | - |
|
413 | - echo '</td>'; |
|
414 | - echo '</tr>'; |
|
415 | - } else { |
|
416 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
417 | - } |
|
418 | - echo '</table>'; |
|
419 | - echo '</form>'; |
|
413 | + echo '</td>'; |
|
414 | + echo '</tr>'; |
|
415 | + } else { |
|
416 | + echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
417 | + } |
|
418 | + echo '</table>'; |
|
419 | + echo '</form>'; |
|
420 | 420 | |
421 | - echo '</fieldset>'; |
|
422 | - echo '</fieldset><br><br>'; |
|
423 | - //Fin de la liste des evennement ------------------------------------- |
|
424 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
421 | + echo '</fieldset>'; |
|
422 | + echo '</fieldset><br><br>'; |
|
423 | + //Fin de la liste des evennement ------------------------------------- |
|
424 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
425 | 425 | |
426 | - $form = $eventHandler->getEventForm('admin'); |
|
427 | - $form->display(); |
|
426 | + $form = $eventHandler->getEventForm('admin'); |
|
427 | + $form->display(); |
|
428 | 428 | |
429 | - echo '</fieldset>'; |
|
429 | + echo '</fieldset>'; |
|
430 | 430 | |
431 | - require_once __DIR__ . '/admin_footer.php'; |
|
431 | + require_once __DIR__ . '/admin_footer.php'; |
|
432 | 432 | |
433 | - break; |
|
433 | + break; |
|
434 | 434 | } |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
23 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
24 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
25 | 25 | //require_once __DIR__ . '/../class/form/extcalform.php'; |
26 | -require_once __DIR__ . '/admin_header.php'; |
|
26 | +require_once __DIR__.'/admin_header.php'; |
|
27 | 27 | //require_once __DIR__ . '/../class/Utility.php'; |
28 | 28 | |
29 | 29 | $gepeto = array_merge($_GET, $_POST); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | /** @var EventHandler $eventHandler */ |
46 | 46 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
47 | - $criteria = new \Criteria('event_id', "($ids)", 'IN'); |
|
47 | + $criteria = new \Criteria('event_id', "($ids)", 'IN'); |
|
48 | 48 | |
49 | 49 | //Supression des images |
50 | 50 | $rst = $eventHandler->getAllEvents($criteria); |
@@ -52,15 +52,15 @@ discard block |
||
52 | 52 | // while (list($k, $t) = each($rst)) { |
53 | 53 | foreach ($rst as $k => $t) { |
54 | 54 | if ('' != $t['event_picture1']) { |
55 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
55 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
56 | 56 | unlink($f); |
57 | - echo $f . '<br>'; |
|
57 | + echo $f.'<br>'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if ('' != $t['event_picture2']) { |
61 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
61 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
62 | 62 | unlink($f); |
63 | - echo $f . '<br>'; |
|
63 | + echo $f.'<br>'; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
123 | 123 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
124 | 124 | } else { |
125 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
125 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
126 | 126 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
127 | 127 | } |
128 | 128 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $notificationHandler = xoops_getHandler('notification'); |
132 | 132 | /** @var Extcal\CategoryHandler $catHandler */ |
133 | 133 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
134 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
134 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
135 | 135 | |
136 | 136 | $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
137 | 137 | $data['event_submitdate'] = time(); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $eventId = $_GET['event_id']; |
195 | 195 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
196 | 196 | |
197 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
197 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
198 | 198 | |
199 | 199 | if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
200 | 200 | $form->display(); |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | $data[$key] = $val['value']; |
220 | 220 | } |
221 | 221 | |
222 | - $data['event_id'] = 0; |
|
223 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
222 | + $data['event_id'] = 0; |
|
223 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
224 | 224 | |
225 | 225 | $newEvent = $eventHandler->create(); |
226 | 226 | $newEvent->setVars($data); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | if (isset($_POST['confirm'])) { |
238 | 238 | if (!$GLOBALS['xoopsSecurity']->check()) { |
239 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
239 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
240 | 240 | } |
241 | 241 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
242 | 242 | // $eventHandler->deleteEvent($_POST['event_id']); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | if (isset($_POST['deleteSelection'][0])) { |
302 | 302 | } else { |
303 | 303 | if (!$GLOBALS['xoopsSecurity']->check()) { |
304 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
304 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | deleteEvents($_POST['event_ids']); |
@@ -333,32 +333,32 @@ discard block |
||
333 | 333 | $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
334 | 334 | $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
335 | 335 | |
336 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
337 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
336 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
337 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
338 | 338 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
339 | 339 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
340 | 340 | |
341 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
342 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
341 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
342 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
343 | 343 | |
344 | 344 | echo '</fieldset><br>'; |
345 | 345 | |
346 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
346 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
347 | 347 | |
348 | 348 | echo '<form method="POST" action="event.php">'; |
349 | 349 | echo '<input type="hidden" name="op" value="deleteSelection">'; |
350 | 350 | |
351 | 351 | echo '<table class="outer" style="width:100%;">'; |
352 | 352 | echo '<tr style="text-align:center;">'; |
353 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
353 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
354 | 354 | echo '<th>#</th>'; |
355 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
356 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
357 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
358 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
355 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
356 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
357 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
358 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
359 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
360 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
361 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
362 | 362 | |
363 | 363 | echo '</tr>'; |
364 | 364 | |
@@ -366,15 +366,15 @@ discard block |
||
366 | 366 | $i = 0; |
367 | 367 | foreach ($events as $event) { |
368 | 368 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
369 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
369 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
370 | 370 | echo "<td width='10%' align='center'>"; |
371 | 371 | echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
372 | 372 | echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
373 | 373 | echo '</td>'; |
374 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
375 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
374 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
375 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['Category']['cat_id'].'&form_modify'.'>'.$event['Category']['cat_name'].'</a>'.'</td>'; |
|
376 | 376 | |
377 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
377 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
378 | 378 | |
379 | 379 | // if ($event['event_isrecur']) { |
380 | 380 | // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
@@ -382,18 +382,18 @@ discard block |
||
382 | 382 | // echo '<td>' . $event['formated_event_start'] . '</td>'; |
383 | 383 | // } |
384 | 384 | |
385 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
386 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
387 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
385 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
386 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
387 | + echo '<td align="center">'.((1 == $event['event_isrecur']) ? _YES : _NO).'</td>'; |
|
388 | 388 | if (!isset($event['formated_reccur_rule'])) { |
389 | 389 | $event['formated_reccur_rule'] = ''; |
390 | 390 | } |
391 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
391 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
392 | 392 | |
393 | 393 | echo '<td style="width:10%; text-align:center;">'; |
394 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
395 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
396 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
394 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a> "; |
|
395 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a> "; |
|
396 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>"; |
|
397 | 397 | echo '</td>'; |
398 | 398 | |
399 | 399 | echo '</tr>'; |
@@ -407,13 +407,13 @@ discard block |
||
407 | 407 | |
408 | 408 | echo '<td colspan="2" style="text-align: right;">'; |
409 | 409 | |
410 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
411 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
410 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
411 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
412 | 412 | |
413 | 413 | echo '</td>'; |
414 | 414 | echo '</tr>'; |
415 | 415 | } else { |
416 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
416 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
417 | 417 | } |
418 | 418 | echo '</table>'; |
419 | 419 | echo '</form>'; |
@@ -421,14 +421,14 @@ discard block |
||
421 | 421 | echo '</fieldset>'; |
422 | 422 | echo '</fieldset><br><br>'; |
423 | 423 | //Fin de la liste des evennement ------------------------------------- |
424 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
424 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
425 | 425 | |
426 | 426 | $form = $eventHandler->getEventForm('admin'); |
427 | 427 | $form->display(); |
428 | 428 | |
429 | 429 | echo '</fieldset>'; |
430 | 430 | |
431 | - require_once __DIR__ . '/admin_footer.php'; |
|
431 | + require_once __DIR__.'/admin_footer.php'; |
|
432 | 432 | |
433 | 433 | break; |
434 | 434 | } |
@@ -17,9 +17,9 @@ discard block |
||
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/xoopsform/grouppermform.php'; |
|
22 | -require_once __DIR__ . '/admin_header.php'; |
|
20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
21 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; |
|
22 | +require_once __DIR__.'/admin_header.php'; |
|
23 | 23 | |
24 | 24 | $step = 'default'; |
25 | 25 | if (isset($_POST['step'])) { |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $groupPermissionHandler = xoops_getHandler('groupperm'); |
36 | 36 | |
37 | 37 | // Delete old public mask |
38 | - $criteria = new \CriteriaCompo(); |
|
39 | - $criteria->add( new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
40 | - $criteria->add( new \Criteria('gperm_modid', $moduleId)); |
|
38 | + $criteria = new \CriteriaCompo(); |
|
39 | + $criteria->add(new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
40 | + $criteria->add(new \Criteria('gperm_modid', $moduleId)); |
|
41 | 41 | $groupPermissionHandler->deleteAll($criteria); |
42 | 42 | |
43 | 43 | foreach ($_POST['perms']['extcal_perm_mask']['group'] as $groupId => $perms) { |
@@ -95,35 +95,35 @@ discard block |
||
95 | 95 | echo '<fieldset id="defaultBookmark"><legend><a href="#defaultBookmark" style="font-weight:bold; color:#990000;" onClick="toggle(\'default\'); toggleIcon(\'defaultIcon\');"><img id="defaultIcon" src="../assets/images/icons/minus.gif"> ' |
96 | 96 | . _AM_EXTCAL_PUBLIC_PERM_MASK |
97 | 97 | . '</a></legend><div id="default">'; |
98 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
98 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
99 | 99 | echo _AM_EXTCAL_PUBLIC_PERM_MASK_INFO; |
100 | 100 | echo '</fieldset><br>'; |
101 | 101 | echo '<table class="outer" style="width:100%;">'; |
102 | 102 | echo '<form method="post" action="permissions.php">'; |
103 | 103 | echo '<tr>'; |
104 | - echo '<th colspan="8" style="text-align:center;">' . _AM_EXTCAL_PUBLIC_PERM_MASK . '</th>'; |
|
104 | + echo '<th colspan="8" style="text-align:center;">'._AM_EXTCAL_PUBLIC_PERM_MASK.'</th>'; |
|
105 | 105 | echo '</tr>'; |
106 | 106 | echo '<tr>'; |
107 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_GROUP_NAME . '</td>'; |
|
108 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_VIEW . '</td>'; |
|
109 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_SUBMIT . '</td>'; |
|
110 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_AUTO_APPROVE . '</td>'; |
|
111 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_EDIT . '</td>'; |
|
107 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_GROUP_NAME.'</td>'; |
|
108 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_VIEW.'</td>'; |
|
109 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_SUBMIT.'</td>'; |
|
110 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_AUTO_APPROVE.'</td>'; |
|
111 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_EDIT.'</td>'; |
|
112 | 112 | echo '</tr>'; |
113 | 113 | $i = 0; |
114 | 114 | foreach ($glist as $k => $v) { |
115 | 115 | $style = (0 == ++$i % 2) ? 'odd' : 'even'; |
116 | 116 | echo '<tr>'; |
117 | - echo '<td class="' . $style . '">' . $v . '</td>'; |
|
118 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][1]" type="checkbox"' . getChecked($viewGroup, $k) . '></td>'; |
|
119 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][2]" type="checkbox"' . getChecked($submitGroup, $k) . '></td>'; |
|
120 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][4]" type="checkbox"' . getChecked($autoApproveGroup, $k) . '></td>'; |
|
121 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][8]" type="checkbox"' . getChecked($editGroup, $k) . '></td>'; |
|
117 | + echo '<td class="'.$style.'">'.$v.'</td>'; |
|
118 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][1]" type="checkbox"'.getChecked($viewGroup, $k).'></td>'; |
|
119 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][2]" type="checkbox"'.getChecked($submitGroup, $k).'></td>'; |
|
120 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][4]" type="checkbox"'.getChecked($autoApproveGroup, $k).'></td>'; |
|
121 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][8]" type="checkbox"'.getChecked($editGroup, $k).'></td>'; |
|
122 | 122 | echo '</tr>'; |
123 | 123 | } |
124 | 124 | echo '<input type="hidden" name="type" value="public">'; |
125 | 125 | echo '<input type="hidden" name="step" value="enreg">'; |
126 | - echo '<tr><td colspan="8" style="text-align:center;" class="head"><input type="submit" value="' . _SUBMIT . '"></td></tr></form>'; |
|
126 | + echo '<tr><td colspan="8" style="text-align:center;" class="head"><input type="submit" value="'._SUBMIT.'"></td></tr></form>'; |
|
127 | 127 | echo '</table><br>'; |
128 | 128 | |
129 | 129 | echo '</div></fieldset><br>'; |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | . '</a></legend><div id="' |
159 | 159 | . $permName |
160 | 160 | . '">'; |
161 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
161 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
162 | 162 | echo $permDesc; |
163 | 163 | echo '</fieldset>'; |
164 | 164 | |
165 | 165 | if ($catHandler->getCount()) { |
166 | - echo $form->render() . '<br>'; |
|
166 | + echo $form->render().'<br>'; |
|
167 | 167 | } else { |
168 | 168 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
169 | 169 | } |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | . '</a></legend><div id="' |
197 | 197 | . $permName |
198 | 198 | . '">'; |
199 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
199 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
200 | 200 | echo $permDesc; |
201 | 201 | echo '</fieldset>'; |
202 | 202 | if ($catHandler->getCount()) { |
203 | - echo $form->render() . '<br>'; |
|
203 | + echo $form->render().'<br>'; |
|
204 | 204 | } else { |
205 | 205 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
206 | 206 | } |
@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | . '</a></legend><div id="' |
234 | 234 | . $permName |
235 | 235 | . '">'; |
236 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
236 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
237 | 237 | echo $permDesc; |
238 | 238 | echo '</fieldset>'; |
239 | 239 | if ($catHandler->getCount()) { |
240 | - echo $form->render() . '<br>'; |
|
240 | + echo $form->render().'<br>'; |
|
241 | 241 | } else { |
242 | 242 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
243 | 243 | } |
@@ -270,11 +270,11 @@ discard block |
||
270 | 270 | . '</a></legend><div id="' |
271 | 271 | . $permName |
272 | 272 | . '">'; |
273 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
273 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
274 | 274 | echo $permDesc; |
275 | 275 | echo '</fieldset>'; |
276 | 276 | if ($catHandler->getCount()) { |
277 | - echo $form->render() . '<br>'; |
|
277 | + echo $form->render().'<br>'; |
|
278 | 278 | } else { |
279 | 279 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
280 | 280 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | echo 'toggle(\'extcal_cat_edit\'); toggleIcon (\'extcal_cat_editIcon\');'; |
292 | 292 | echo '</script>'; |
293 | 293 | |
294 | - require_once __DIR__ . '/admin_footer.php'; |
|
294 | + require_once __DIR__.'/admin_footer.php'; |
|
295 | 295 | |
296 | 296 | break; |
297 | 297 |
@@ -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_XOOPSTUBE_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'; |