@@ -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,11 +39,11 @@ 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 | |
44 | - $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
|
44 | + $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
|
45 | 45 | |
46 | - $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add'); |
|
46 | + $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add'); |
|
47 | 47 | |
48 | 48 | // $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA'), '__DIR__ . /../../testdata/index.php?op=exportschema', 'add'); |
49 | 49 | |
@@ -57,4 +57,4 @@ discard block |
||
57 | 57 | echo $utility::getServerStats(); |
58 | 58 | |
59 | 59 | //codeDump(__FILE__); |
60 | -require_once __DIR__ . '/admin_footer.php'; |
|
60 | +require_once __DIR__.'/admin_footer.php'; |
@@ -4,9 +4,9 @@ discard block |
||
4 | 4 | /** @var Extcal\Helper $helper */ |
5 | 5 | $helper = Extcal\Helper::getInstance(); |
6 | 6 | |
7 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
8 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
9 | -require_once __DIR__ . '/admin_header.php'; |
|
7 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
8 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
9 | +require_once __DIR__.'/admin_header.php'; |
|
10 | 10 | |
11 | 11 | function extgalleryLastVersion() |
12 | 12 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | switch ($fct) { |
42 | 42 | case 'send': |
43 | 43 | if (!$GLOBALS['xoopsSecurity']->check()) { |
44 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
44 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
45 | 45 | } |
46 | 46 | xoops_cp_header(); |
47 | 47 | adminMenu(1); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | 'EV_TITLE' => $event->getVar('event_title'), |
74 | 74 | 'EV_START' => $extcalTime->getFormatedDate($helper->getConfig('date_long'), $event->getVar('event_start')), |
75 | 75 | 'EV_END' => $extcalTime->getFormatedDate($helper->getConfig('date_long'), $event->getVar('event_end')), |
76 | - 'EV_LINK' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
76 | + 'EV_LINK' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
77 | 77 | ]; |
78 | 78 | $xoopsMailer->assign($tag); |
79 | 79 | $xoopsMailer->send(true); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | default: |
89 | 89 | xoops_cp_header(); |
90 | 90 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
91 | - $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span> '; |
|
91 | + $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> '; |
|
92 | 92 | $bodyCaption = _AM_EXTCAL_BODY |
93 | 93 | . "<br><br><span style='font-size:x-small;font-weight:bold;'>" |
94 | 94 | . _AM_EXTCAL_USEFUL_TAGS |
@@ -111,12 +111,12 @@ discard block |
||
111 | 111 | . '<br>' |
112 | 112 | . _AM_EXTCAL_MAILTAGS9 |
113 | 113 | . '</span> '; |
114 | - $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
114 | + $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
115 | 115 | $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL); |
116 | 116 | $toCheckBox->addOption('pm', _AM_EXTCAL_PM); |
117 | 117 | |
118 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
119 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
118 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
119 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
120 | 120 | echo _AM_EXTCAL_INFO_SEND_NOTIF; |
121 | 121 | echo '</fieldset><br>'; |
122 | 122 | $form = new \XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&fct=send', 'post', true); |
@@ -146,13 +146,13 @@ discard block |
||
146 | 146 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
147 | 147 | $adminObject = \Xmf\Module\Admin::getInstance(); |
148 | 148 | $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
149 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
150 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
151 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
149 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
150 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
151 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
152 | 152 | $criteriaCompo = new \CriteriaCompo(); |
153 | 153 | $criteriaCompo->add(new \Criteria('event_approved', 1)); |
154 | 154 | $criteriaCompo->add(new \Criteria('event_start', time(), '>=')); |
155 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
155 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>'), '', 'Green'); |
|
156 | 156 | |
157 | 157 | $adminObject->addConfigBoxLine(); |
158 | 158 | $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
@@ -169,42 +169,42 @@ discard block |
||
169 | 169 | $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
170 | 170 | $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
171 | 171 | |
172 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
173 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
172 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>'; |
|
173 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
174 | 174 | // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
175 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
176 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
175 | + echo '<img src='.$pathIcon16.'/edit.png> '._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>'; |
|
176 | + echo '<img src='.$pathIcon16.'/delete.png> '._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>'; |
|
177 | 177 | echo '</fieldset><br>'; |
178 | 178 | |
179 | 179 | echo '<table class="outer" style="width:100%;">'; |
180 | 180 | echo '<tr style="text-align:center;">'; |
181 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
182 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
183 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
184 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
181 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
182 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
183 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
184 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
185 | 185 | echo '</tr>'; |
186 | 186 | |
187 | 187 | if (count($pendingEvent) > 0) { |
188 | 188 | $i = 0; |
189 | 189 | foreach ($pendingEvent as $event) { |
190 | 190 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
191 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
192 | - echo '<td>' . $event['Category']['cat_name'] . '</td>'; |
|
193 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
194 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
191 | + echo '<tr style="text-align:center;" class="'.$class.'">'; |
|
192 | + echo '<td>'.$event['Category']['cat_name'].'</td>'; |
|
193 | + echo '<td>'.$event['event_title'].'</td>'; |
|
194 | + echo '<td>'.$event['formated_event_start'].'</td>'; |
|
195 | 195 | echo '<td style="width:10%; text-align:center;">'; |
196 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
197 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
196 | + echo '<a href="event.php?op=modify&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a> '; |
|
197 | + echo '<a href="event.php?op=delete&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>'; |
|
198 | 198 | echo '</td>'; |
199 | 199 | echo '</tr>'; |
200 | 200 | } |
201 | 201 | } else { |
202 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
202 | + echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | echo '</table></fieldset><br>'; |
206 | 206 | |
207 | - require_once __DIR__ . '/admin_footer.php'; |
|
207 | + require_once __DIR__.'/admin_footer.php'; |
|
208 | 208 | |
209 | 209 | break; |
210 | 210 | } |
@@ -74,177 +74,195 @@ discard block |
||
74 | 74 | |
75 | 75 | switch ($op) { |
76 | 76 | |
77 | - case 'enreg': |
|
78 | - |
|
79 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
80 | - $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
|
81 | - // $t = print_r($_POST,true); |
|
82 | - // echo "<pre>{$t}</pre><br>"; |
|
83 | - // exit; |
|
84 | - // If the date format is wrong |
|
85 | - // if ( |
|
86 | - // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
87 | - // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
88 | - // ) { |
|
89 | - // redirect_header( |
|
90 | - // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
91 | - // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
92 | - // ); |
|
93 | - // exit; |
|
94 | - // } |
|
95 | - |
|
96 | - //exit; |
|
97 | - /////////////////////////////////////////////////////////////////////////////// |
|
98 | - Extcal\Utility::loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
99 | - /////////////////////////////////////////////////////////////////////////////// |
|
100 | - $data = [ |
|
101 | - 'event_title' => $_POST['event_title'], |
|
102 | - 'cat_id' => $_POST['cat_id'], |
|
103 | - 'event_desc' => $_POST['event_desc'], |
|
104 | - 'event_nbmember' => $_POST['event_nbmember'], |
|
105 | - 'event_organisateur' => $_POST['event_organisateur'], |
|
106 | - 'event_contact' => $_POST['event_contact'], |
|
107 | - 'event_url' => $_POST['event_url'], |
|
108 | - 'event_email' => $_POST['event_email'], |
|
109 | - 'event_address' => $_POST['event_address'], |
|
110 | - 'event_approved' => 1, |
|
111 | - 'event_start' => $_POST['event_start'], |
|
112 | - 'have_end' => $_POST['have_end'], |
|
113 | - 'event_end' => $_POST['event_end'], |
|
114 | - 'event_picture1' => @$event_picture1, |
|
115 | - 'event_picture2' => @$event_picture2, |
|
116 | - 'event_price' => @$_POST['event_price'], |
|
117 | - 'event_etablissement' => $_POST['event_etablissement'], |
|
118 | - 'dohtml' => $extcalConfig['allow_html'], |
|
119 | - 'event_icone' => $_POST['event_icone'], |
|
120 | - ]; |
|
121 | - |
|
122 | - // Event edited |
|
123 | - if (isset($_POST['event_id'])) { |
|
124 | - if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
125 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
77 | + case 'enreg': |
|
78 | + |
|
79 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
80 | + $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
|
81 | + // $t = print_r($_POST,true); |
|
82 | + // echo "<pre>{$t}</pre><br>"; |
|
83 | + // exit; |
|
84 | + // If the date format is wrong |
|
85 | + // if ( |
|
86 | + // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
87 | + // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
88 | + // ) { |
|
89 | + // redirect_header( |
|
90 | + // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
91 | + // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
92 | + // ); |
|
93 | + // exit; |
|
94 | + // } |
|
95 | + |
|
96 | + //exit; |
|
97 | + /////////////////////////////////////////////////////////////////////////////// |
|
98 | + Extcal\Utility::loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
99 | + /////////////////////////////////////////////////////////////////////////////// |
|
100 | + $data = [ |
|
101 | + 'event_title' => $_POST['event_title'], |
|
102 | + 'cat_id' => $_POST['cat_id'], |
|
103 | + 'event_desc' => $_POST['event_desc'], |
|
104 | + 'event_nbmember' => $_POST['event_nbmember'], |
|
105 | + 'event_organisateur' => $_POST['event_organisateur'], |
|
106 | + 'event_contact' => $_POST['event_contact'], |
|
107 | + 'event_url' => $_POST['event_url'], |
|
108 | + 'event_email' => $_POST['event_email'], |
|
109 | + 'event_address' => $_POST['event_address'], |
|
110 | + 'event_approved' => 1, |
|
111 | + 'event_start' => $_POST['event_start'], |
|
112 | + 'have_end' => $_POST['have_end'], |
|
113 | + 'event_end' => $_POST['event_end'], |
|
114 | + 'event_picture1' => @$event_picture1, |
|
115 | + 'event_picture2' => @$event_picture2, |
|
116 | + 'event_price' => @$_POST['event_price'], |
|
117 | + 'event_etablissement' => $_POST['event_etablissement'], |
|
118 | + 'dohtml' => $extcalConfig['allow_html'], |
|
119 | + 'event_icone' => $_POST['event_icone'], |
|
120 | + ]; |
|
121 | + |
|
122 | + // Event edited |
|
123 | + if (isset($_POST['event_id'])) { |
|
124 | + if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
125 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
126 | + } else { |
|
127 | + $fileHandler->createFile((int)$_POST['event_id']); |
|
128 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
129 | + } |
|
130 | + |
|
131 | + // New event |
|
126 | 132 | } else { |
127 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
128 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
133 | + $notificationHandler = xoops_getHandler('notification'); |
|
134 | + /** @var Extcal\CategoryHandler $catHandler */ |
|
135 | + // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
136 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
137 | + |
|
138 | + $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
139 | + $data['event_submitdate'] = time(); |
|
140 | + |
|
141 | + if ($eventHandler->createEvent($data, $_POST)) { |
|
142 | + $fileHandler->createFile($eventHandler->getInsertId()); |
|
143 | + $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
144 | + $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]); |
|
145 | + $notificationHandler->triggerEvent('category', $_POST['cat_id'], 'new_event_cat', [ |
|
146 | + 'EVENT_TITLE' => $_POST['event_title'], |
|
147 | + 'CAT_NAME' => $cat->getVar('cat_name'), |
|
148 | + ]); |
|
149 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
150 | + } else { |
|
151 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
152 | + } |
|
129 | 153 | } |
154 | + break; |
|
130 | 155 | |
131 | - // New event |
|
132 | - } else { |
|
133 | - $notificationHandler = xoops_getHandler('notification'); |
|
134 | - /** @var Extcal\CategoryHandler $catHandler */ |
|
135 | - // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
136 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
137 | - |
|
138 | - $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
139 | - $data['event_submitdate'] = time(); |
|
140 | - |
|
141 | - if ($eventHandler->createEvent($data, $_POST)) { |
|
142 | - $fileHandler->createFile($eventHandler->getInsertId()); |
|
143 | - $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
144 | - $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]); |
|
145 | - $notificationHandler->triggerEvent('category', $_POST['cat_id'], 'new_event_cat', [ |
|
146 | - 'EVENT_TITLE' => $_POST['event_title'], |
|
147 | - 'CAT_NAME' => $cat->getVar('cat_name'), |
|
148 | - ]); |
|
149 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
150 | - } else { |
|
151 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
156 | + case 'clone': /* sur validation du formulaire */ |
|
157 | + case 'modify': |
|
158 | + $action = (('clone' === $op) ? 'clone' : 'edit'); |
|
159 | + xoops_cp_header(); |
|
160 | + //================================================ |
|
161 | + // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
162 | + // |
|
163 | + // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
164 | + // $dateBirthday = new \XoopsTcCalendar("datez1", true, false); |
|
165 | + // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
166 | + // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
167 | + // //$dateBirthday->rtl=false; |
|
168 | + // $dateBirthday->setAutoHide(false); |
|
169 | + // |
|
170 | + // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
171 | + // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
172 | + // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
173 | + // |
|
174 | + // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
175 | + // $dateBirthday->zindex = 150; //default 1 |
|
176 | + // $dateBirthday->setYearInterval(1995, date('Y')); |
|
177 | + // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
178 | + // //$dateBirthday->autoSubmit(true, "calendar"); |
|
179 | + // $dateBirthday->disabledDay("sat"); |
|
180 | + // $dateBirthday->disabledDay("sun"); |
|
181 | + // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
182 | + // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
183 | + // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
184 | + // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
185 | + // echo $dateBirthday->render(); |
|
186 | + // echo "</td></tr></table>"; |
|
187 | + //echo $dateBirthday->render(); |
|
188 | + //================================================ |
|
189 | + // @author Gregory Mage (Aka Mage) |
|
190 | + //*************************************************************************************** |
|
191 | + // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
192 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
193 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
194 | + //*************************************************************************************** |
|
195 | + |
|
196 | + $eventId = $_GET['event_id']; |
|
197 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
198 | + |
|
199 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
200 | + |
|
201 | + if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
|
202 | + $form->display(); |
|
152 | 203 | } |
153 | - } |
|
154 | - break; |
|
155 | - |
|
156 | - case 'clone': /* sur validation du formulaire */ |
|
157 | - case 'modify': |
|
158 | - $action = (('clone' === $op) ? 'clone' : 'edit'); |
|
159 | - xoops_cp_header(); |
|
160 | - //================================================ |
|
161 | - // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
162 | - // |
|
163 | - // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
164 | - // $dateBirthday = new \XoopsTcCalendar("datez1", true, false); |
|
165 | - // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
166 | - // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
167 | - // //$dateBirthday->rtl=false; |
|
168 | - // $dateBirthday->setAutoHide(false); |
|
169 | - // |
|
170 | - // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
171 | - // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
172 | - // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
173 | - // |
|
174 | - // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
175 | - // $dateBirthday->zindex = 150; //default 1 |
|
176 | - // $dateBirthday->setYearInterval(1995, date('Y')); |
|
177 | - // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
178 | - // //$dateBirthday->autoSubmit(true, "calendar"); |
|
179 | - // $dateBirthday->disabledDay("sat"); |
|
180 | - // $dateBirthday->disabledDay("sun"); |
|
181 | - // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
182 | - // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
183 | - // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
184 | - // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
185 | - // echo $dateBirthday->render(); |
|
186 | - // echo "</td></tr></table>"; |
|
187 | - //echo $dateBirthday->render(); |
|
188 | - //================================================ |
|
189 | - // @author Gregory Mage (Aka Mage) |
|
190 | - //*************************************************************************************** |
|
191 | - // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
192 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
193 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
194 | - //*************************************************************************************** |
|
195 | - |
|
196 | - $eventId = $_GET['event_id']; |
|
197 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
198 | - |
|
199 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
200 | - |
|
201 | - if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
|
202 | - $form->display(); |
|
203 | - } |
|
204 | 204 | |
205 | - echo '</fieldset><br>'; |
|
205 | + echo '</fieldset><br>'; |
|
206 | 206 | |
207 | - xoops_cp_footer(); |
|
207 | + xoops_cp_footer(); |
|
208 | 208 | |
209 | - break; |
|
209 | + break; |
|
210 | 210 | |
211 | - case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
211 | + case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
212 | 212 | |
213 | - //$newEventId = 1; |
|
214 | - $eventId = $_GET['event_id']; |
|
215 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
216 | - $event = $eventHandler->getEvent($eventId); |
|
217 | - $t = $event->getVars(); |
|
218 | - $data = []; |
|
219 | - // while (list($key, $val) = each($t)) { |
|
220 | - foreach ($t as $key => $val) { |
|
221 | - $data[$key] = $val['value']; |
|
222 | - } |
|
213 | + //$newEventId = 1; |
|
214 | + $eventId = $_GET['event_id']; |
|
215 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
216 | + $event = $eventHandler->getEvent($eventId); |
|
217 | + $t = $event->getVars(); |
|
218 | + $data = []; |
|
219 | + // while (list($key, $val) = each($t)) { |
|
220 | + foreach ($t as $key => $val) { |
|
221 | + $data[$key] = $val['value']; |
|
222 | + } |
|
223 | 223 | |
224 | - $data['event_id'] = 0; |
|
225 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
224 | + $data['event_id'] = 0; |
|
225 | + $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
226 | 226 | |
227 | - $newEvent = $eventHandler->create(); |
|
228 | - $newEvent->setVars($data); |
|
229 | - $t = $eventHandler->insert($newEvent, true); |
|
227 | + $newEvent = $eventHandler->create(); |
|
228 | + $newEvent->setVars($data); |
|
229 | + $t = $eventHandler->insert($newEvent, true); |
|
230 | 230 | |
231 | - $newEventId = $newEvent->getVar('event_id'); |
|
232 | - $ts = print_r($newEventId, true); |
|
231 | + $newEventId = $newEvent->getVar('event_id'); |
|
232 | + $ts = print_r($newEventId, true); |
|
233 | 233 | |
234 | - redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
235 | - break; |
|
234 | + redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
235 | + break; |
|
236 | 236 | |
237 | - case 'delete': |
|
237 | + case 'delete': |
|
238 | 238 | |
239 | - if (isset($_POST['confirm'])) { |
|
240 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
241 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
239 | + if (isset($_POST['confirm'])) { |
|
240 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
241 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
242 | + } |
|
243 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
244 | + // $eventHandler->deleteEvent($_POST['event_id']); |
|
245 | + deleteEvents($_POST['event_id']); |
|
246 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
247 | + } else { |
|
248 | + xoops_cp_header(); |
|
249 | + // @author Gregory Mage (Aka Mage) |
|
250 | + //*************************************************************************************** |
|
251 | + //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
252 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
253 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
254 | + //*************************************************************************************** |
|
255 | + |
|
256 | + $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1]; |
|
257 | + xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
258 | + |
|
259 | + xoops_cp_footer(); |
|
242 | 260 | } |
243 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
244 | - // $eventHandler->deleteEvent($_POST['event_id']); |
|
245 | - deleteEvents($_POST['event_id']); |
|
246 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
247 | - } else { |
|
261 | + |
|
262 | + break; |
|
263 | + |
|
264 | + case 'deleteSelection': |
|
265 | + |
|
248 | 266 | xoops_cp_header(); |
249 | 267 | // @author Gregory Mage (Aka Mage) |
250 | 268 | //*************************************************************************************** |
@@ -252,184 +270,166 @@ discard block |
||
252 | 270 | $adminObject = \Xmf\Module\Admin::getInstance(); |
253 | 271 | $adminObject->displayNavigation(basename(__FILE__)); |
254 | 272 | //*************************************************************************************** |
273 | + if (isset($_POST['deleteSelection'][0])) { |
|
274 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
275 | + $ids = array_keys($_POST['deleteAllEvents']); |
|
276 | + } else { |
|
277 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
278 | + $ids = array_keys($_POST['deleteEvents']); |
|
279 | + } |
|
255 | 280 | |
256 | - $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1]; |
|
257 | - xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
281 | + // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
282 | + // $ids = array_keys($_POST['deleteEvents']); |
|
283 | + $ids = implode(',', $ids); |
|
284 | + //echo $ids.'<br>'; |
|
285 | + $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1]; |
|
286 | + //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
287 | + xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
258 | 288 | |
259 | 289 | xoops_cp_footer(); |
260 | - } |
|
261 | 290 | |
262 | - break; |
|
263 | - |
|
264 | - case 'deleteSelection': |
|
265 | - |
|
266 | - xoops_cp_header(); |
|
267 | - // @author Gregory Mage (Aka Mage) |
|
268 | - //*************************************************************************************** |
|
269 | - //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
270 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
271 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
272 | - //*************************************************************************************** |
|
273 | - if (isset($_POST['deleteSelection'][0])) { |
|
274 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
275 | - $ids = array_keys($_POST['deleteAllEvents']); |
|
276 | - } else { |
|
277 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
278 | - $ids = array_keys($_POST['deleteEvents']); |
|
279 | - } |
|
291 | + break; |
|
280 | 292 | |
281 | - // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
282 | - // $ids = array_keys($_POST['deleteEvents']); |
|
283 | - $ids = implode(',', $ids); |
|
284 | - //echo $ids.'<br>'; |
|
285 | - $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1]; |
|
286 | - //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
287 | - xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
288 | - |
|
289 | - xoops_cp_footer(); |
|
290 | - |
|
291 | - break; |
|
292 | - |
|
293 | - case 'deleteSelectionOK': |
|
294 | - //----------------------------------------- |
|
295 | - // $t = print_r($_GET,true); |
|
296 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
297 | - // |
|
298 | - // $t = print_r($_POST,true); |
|
299 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
300 | - // exit; |
|
301 | - //----------------------------------------- |
|
302 | - |
|
303 | - if (isset($_POST['deleteSelection'][0])) { |
|
304 | - } else { |
|
305 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
306 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
307 | - } |
|
293 | + case 'deleteSelectionOK': |
|
294 | + //----------------------------------------- |
|
295 | + // $t = print_r($_GET,true); |
|
296 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
297 | + // |
|
298 | + // $t = print_r($_POST,true); |
|
299 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
300 | + // exit; |
|
301 | + //----------------------------------------- |
|
308 | 302 | |
309 | - deleteEvents($_POST['event_ids']); |
|
303 | + if (isset($_POST['deleteSelection'][0])) { |
|
304 | + } else { |
|
305 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
306 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
307 | + } |
|
310 | 308 | |
311 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
312 | - } |
|
309 | + deleteEvents($_POST['event_ids']); |
|
313 | 310 | |
314 | - break; |
|
311 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
312 | + } |
|
315 | 313 | |
316 | - case 'default': |
|
317 | - default: |
|
314 | + break; |
|
318 | 315 | |
319 | - //global $extcalConfig; |
|
320 | - $extcalConfig = Extcal\Config::getHandler(); |
|
316 | + case 'default': |
|
317 | + default: |
|
321 | 318 | |
322 | - $start = \Xmf\Request::getInt('start', 0, 'GET'); |
|
323 | - $nbEventsByPage = $helper->getConfig('nbEventsByPage'); |
|
319 | + //global $extcalConfig; |
|
320 | + $extcalConfig = Extcal\Config::getHandler(); |
|
324 | 321 | |
325 | - xoops_cp_header(); |
|
326 | - // @author Gregory Mage (Aka Mage) |
|
327 | - //*************************************************************************************** |
|
322 | + $start = \Xmf\Request::getInt('start', 0, 'GET'); |
|
323 | + $nbEventsByPage = $helper->getConfig('nbEventsByPage'); |
|
328 | 324 | |
329 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
330 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
331 | - //*************************************************************************************** |
|
325 | + xoops_cp_header(); |
|
326 | + // @author Gregory Mage (Aka Mage) |
|
327 | + //*************************************************************************************** |
|
332 | 328 | |
333 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
334 | - $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
|
335 | - $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
329 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
330 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
331 | + //*************************************************************************************** |
|
336 | 332 | |
337 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
338 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
339 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
340 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
|
333 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
334 | + $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
|
335 | + $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
341 | 336 | |
342 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
343 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
337 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
338 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
339 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
340 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
|
344 | 341 | |
345 | - echo '</fieldset><br>'; |
|
342 | + echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
343 | + echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
346 | 344 | |
347 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
345 | + echo '</fieldset><br>'; |
|
348 | 346 | |
349 | - echo '<form method="POST" action="event.php">'; |
|
350 | - echo '<input type="hidden" name="op" value="deleteSelection">'; |
|
347 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
351 | 348 | |
352 | - echo '<table class="outer" style="width:100%;">'; |
|
353 | - echo '<tr style="text-align:center;">'; |
|
354 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
355 | - echo '<th>#</th>'; |
|
356 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
357 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
358 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
362 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
349 | + echo '<form method="POST" action="event.php">'; |
|
350 | + echo '<input type="hidden" name="op" value="deleteSelection">'; |
|
363 | 351 | |
364 | - echo '</tr>'; |
|
352 | + echo '<table class="outer" style="width:100%;">'; |
|
353 | + echo '<tr style="text-align:center;">'; |
|
354 | + echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
355 | + echo '<th>#</th>'; |
|
356 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
357 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
358 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
359 | + echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
360 | + echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
361 | + echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
362 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
365 | 363 | |
366 | - if (count($events) > 0) { |
|
367 | - $i = 0; |
|
368 | - foreach ($events as $event) { |
|
369 | - $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
370 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
371 | - echo "<td width='10%' align='center'>"; |
|
372 | - echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
373 | - echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
|
374 | - echo '</td>'; |
|
375 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
376 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
377 | - |
|
378 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
379 | - |
|
380 | - // if ($event['event_isrecur']) { |
|
381 | - // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
382 | - // } else { |
|
383 | - // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
384 | - // } |
|
385 | - |
|
386 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
387 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
388 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
389 | - if (!isset($event['formated_reccur_rule'])) { |
|
390 | - $event['formated_reccur_rule'] = ''; |
|
364 | + echo '</tr>'; |
|
365 | + |
|
366 | + if (count($events) > 0) { |
|
367 | + $i = 0; |
|
368 | + foreach ($events as $event) { |
|
369 | + $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
370 | + echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
371 | + echo "<td width='10%' align='center'>"; |
|
372 | + echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
373 | + echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
|
374 | + echo '</td>'; |
|
375 | + echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
376 | + echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
377 | + |
|
378 | + echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
379 | + |
|
380 | + // if ($event['event_isrecur']) { |
|
381 | + // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
382 | + // } else { |
|
383 | + // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
384 | + // } |
|
385 | + |
|
386 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
387 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
388 | + echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
389 | + if (!isset($event['formated_reccur_rule'])) { |
|
390 | + $event['formated_reccur_rule'] = ''; |
|
391 | + } |
|
392 | + echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
393 | + |
|
394 | + echo '<td style="width:10%; text-align:center;">'; |
|
395 | + echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
396 | + echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
397 | + echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
398 | + echo '</td>'; |
|
399 | + |
|
400 | + echo '</tr>'; |
|
391 | 401 | } |
392 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
402 | + //--------------------------------------------------------- |
|
403 | + $pageNav = new \XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
393 | 404 | |
394 | - echo '<td style="width:10%; text-align:center;">'; |
|
395 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
396 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
397 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
405 | + echo '<tr><td colspan="2" style="text-align: right;">'; |
|
406 | + echo $pageNav->renderNav(2); |
|
398 | 407 | echo '</td>'; |
399 | 408 | |
400 | - echo '</tr>'; |
|
401 | - } |
|
402 | - //--------------------------------------------------------- |
|
403 | - $pageNav = new \XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
409 | + echo '<td colspan="2" style="text-align: right;">'; |
|
404 | 410 | |
405 | - echo '<tr><td colspan="2" style="text-align: right;">'; |
|
406 | - echo $pageNav->renderNav(2); |
|
407 | - echo '</td>'; |
|
411 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
412 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
408 | 413 | |
409 | - echo '<td colspan="2" style="text-align: right;">'; |
|
410 | - |
|
411 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
412 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
413 | - |
|
414 | - echo '</td>'; |
|
415 | - echo '</tr>'; |
|
416 | - } else { |
|
417 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
418 | - } |
|
419 | - echo '</table>'; |
|
420 | - echo '</form>'; |
|
414 | + echo '</td>'; |
|
415 | + echo '</tr>'; |
|
416 | + } else { |
|
417 | + echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
418 | + } |
|
419 | + echo '</table>'; |
|
420 | + echo '</form>'; |
|
421 | 421 | |
422 | - echo '</fieldset>'; |
|
423 | - echo '</fieldset><br><br>'; |
|
424 | - //Fin de la liste des evennement ------------------------------------- |
|
425 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
422 | + echo '</fieldset>'; |
|
423 | + echo '</fieldset><br><br>'; |
|
424 | + //Fin de la liste des evennement ------------------------------------- |
|
425 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
426 | 426 | |
427 | - $form = $eventHandler->getEventForm('admin'); |
|
428 | - $form->display(); |
|
427 | + $form = $eventHandler->getEventForm('admin'); |
|
428 | + $form->display(); |
|
429 | 429 | |
430 | - echo '</fieldset>'; |
|
430 | + echo '</fieldset>'; |
|
431 | 431 | |
432 | - require_once __DIR__ . '/admin_footer.php'; |
|
432 | + require_once __DIR__ . '/admin_footer.php'; |
|
433 | 433 | |
434 | - break; |
|
434 | + break; |
|
435 | 435 | } |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | /** @var Extcal\Helper $helper */ |
22 | 22 | $helper = Extcal\Helper::getInstance(); |
23 | 23 | |
24 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
25 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
26 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
24 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
25 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
26 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
27 | 27 | // require_once __DIR__ . '/../class/form/extcalform.php'; |
28 | -require_once __DIR__ . '/admin_header.php'; |
|
28 | +require_once __DIR__.'/admin_header.php'; |
|
29 | 29 | // require_once __DIR__ . '/../class/Utility.php'; |
30 | 30 | |
31 | 31 | $gepeto = array_merge($_GET, $_POST); |
@@ -54,15 +54,15 @@ discard block |
||
54 | 54 | // while (list($k, $t) = each($rst)) { |
55 | 55 | foreach ($rst as $k => $t) { |
56 | 56 | if ('' != $t['event_picture1']) { |
57 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
57 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
58 | 58 | unlink($f); |
59 | - echo $f . '<br>'; |
|
59 | + echo $f.'<br>'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | if ('' != $t['event_picture2']) { |
63 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
63 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
64 | 64 | unlink($f); |
65 | - echo $f . '<br>'; |
|
65 | + echo $f.'<br>'; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
125 | 125 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
126 | 126 | } else { |
127 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
127 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
128 | 128 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
129 | 129 | } |
130 | 130 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $eventId = $_GET['event_id']; |
197 | 197 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
198 | 198 | |
199 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
199 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
200 | 200 | |
201 | 201 | if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
202 | 202 | $form->display(); |
@@ -221,8 +221,8 @@ discard block |
||
221 | 221 | $data[$key] = $val['value']; |
222 | 222 | } |
223 | 223 | |
224 | - $data['event_id'] = 0; |
|
225 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
224 | + $data['event_id'] = 0; |
|
225 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
226 | 226 | |
227 | 227 | $newEvent = $eventHandler->create(); |
228 | 228 | $newEvent->setVars($data); |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | if (isset($_POST['confirm'])) { |
240 | 240 | if (!$GLOBALS['xoopsSecurity']->check()) { |
241 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
241 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
242 | 242 | } |
243 | 243 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
244 | 244 | // $eventHandler->deleteEvent($_POST['event_id']); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | if (isset($_POST['deleteSelection'][0])) { |
304 | 304 | } else { |
305 | 305 | if (!$GLOBALS['xoopsSecurity']->check()) { |
306 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
306 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | deleteEvents($_POST['event_ids']); |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | default: |
318 | 318 | |
319 | 319 | //global $extcalConfig; |
320 | - $extcalConfig = Extcal\Config::getHandler(); |
|
320 | + $extcalConfig = Extcal\Config::getHandler(); |
|
321 | 321 | |
322 | 322 | $start = \Xmf\Request::getInt('start', 0, 'GET'); |
323 | 323 | $nbEventsByPage = $helper->getConfig('nbEventsByPage'); |
@@ -334,32 +334,32 @@ discard block |
||
334 | 334 | $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
335 | 335 | $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
336 | 336 | |
337 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
338 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
337 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
338 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
339 | 339 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
340 | 340 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
341 | 341 | |
342 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
343 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
342 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
343 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
344 | 344 | |
345 | 345 | echo '</fieldset><br>'; |
346 | 346 | |
347 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
347 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
348 | 348 | |
349 | 349 | echo '<form method="POST" action="event.php">'; |
350 | 350 | echo '<input type="hidden" name="op" value="deleteSelection">'; |
351 | 351 | |
352 | 352 | echo '<table class="outer" style="width:100%;">'; |
353 | 353 | echo '<tr style="text-align:center;">'; |
354 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
354 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
355 | 355 | echo '<th>#</th>'; |
356 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
357 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
358 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
362 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
356 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
357 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
358 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
359 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
360 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
361 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
362 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
363 | 363 | |
364 | 364 | echo '</tr>'; |
365 | 365 | |
@@ -367,15 +367,15 @@ discard block |
||
367 | 367 | $i = 0; |
368 | 368 | foreach ($events as $event) { |
369 | 369 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
370 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
370 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
371 | 371 | echo "<td width='10%' align='center'>"; |
372 | 372 | echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
373 | 373 | echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
374 | 374 | echo '</td>'; |
375 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
376 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
375 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
376 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['Category']['cat_id'].'&form_modify'.'>'.$event['Category']['cat_name'].'</a>'.'</td>'; |
|
377 | 377 | |
378 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
378 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
379 | 379 | |
380 | 380 | // if ($event['event_isrecur']) { |
381 | 381 | // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
@@ -383,18 +383,18 @@ discard block |
||
383 | 383 | // echo '<td>' . $event['formated_event_start'] . '</td>'; |
384 | 384 | // } |
385 | 385 | |
386 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
387 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
388 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
386 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
387 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
388 | + echo '<td align="center">'.((1 == $event['event_isrecur']) ? _YES : _NO).'</td>'; |
|
389 | 389 | if (!isset($event['formated_reccur_rule'])) { |
390 | 390 | $event['formated_reccur_rule'] = ''; |
391 | 391 | } |
392 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
392 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
393 | 393 | |
394 | 394 | echo '<td style="width:10%; text-align:center;">'; |
395 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
396 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
397 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
395 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a> "; |
|
396 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a> "; |
|
397 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>"; |
|
398 | 398 | echo '</td>'; |
399 | 399 | |
400 | 400 | echo '</tr>'; |
@@ -408,13 +408,13 @@ discard block |
||
408 | 408 | |
409 | 409 | echo '<td colspan="2" style="text-align: right;">'; |
410 | 410 | |
411 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
412 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
411 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
412 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
413 | 413 | |
414 | 414 | echo '</td>'; |
415 | 415 | echo '</tr>'; |
416 | 416 | } else { |
417 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
417 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
418 | 418 | } |
419 | 419 | echo '</table>'; |
420 | 420 | echo '</form>'; |
@@ -422,14 +422,14 @@ discard block |
||
422 | 422 | echo '</fieldset>'; |
423 | 423 | echo '</fieldset><br><br>'; |
424 | 424 | //Fin de la liste des evennement ------------------------------------- |
425 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
425 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
426 | 426 | |
427 | 427 | $form = $eventHandler->getEventForm('admin'); |
428 | 428 | $form->display(); |
429 | 429 | |
430 | 430 | echo '</fieldset>'; |
431 | 431 | |
432 | - require_once __DIR__ . '/admin_footer.php'; |
|
432 | + require_once __DIR__.'/admin_footer.php'; |
|
433 | 433 | |
434 | 434 | break; |
435 | 435 | } |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | /** @var Extcal\Helper $helper */ |
22 | 22 | $helper = Extcal\Helper::getInstance(); |
23 | 23 | |
24 | -include __DIR__ . '/../../mainfile.php'; |
|
25 | -require_once __DIR__ . '/include/constantes.php'; |
|
24 | +include __DIR__.'/../../mainfile.php'; |
|
25 | +require_once __DIR__.'/include/constantes.php'; |
|
26 | 26 | |
27 | -require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php'; |
|
27 | +require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/calendar.php'; |
|
28 | 28 | |
29 | 29 | if (!isset($_GET['event'])) { |
30 | 30 | $eventId = 0; |
31 | 31 | } else { |
32 | - $eventId = (int)$_GET['event']; |
|
32 | + $eventId = (int) $_GET['event']; |
|
33 | 33 | } |
34 | 34 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
35 | 35 | $event = $eventHandler->objectToArray($eventHandler->getEvent($eventId), ['cat_id']); |
@@ -44,136 +44,136 @@ discard block |
||
44 | 44 | // Adding formated date for start and end event |
45 | 45 | $eventHandler->formatEventDate($event, $helper->getConfig('event_date_event')); |
46 | 46 | |
47 | -echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; |
|
48 | -echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; |
|
49 | -echo '<head>' . "\n"; |
|
50 | -echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n"; |
|
51 | -echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n"; |
|
52 | -echo '</head>' . "\n"; |
|
53 | -echo '<body onload="window.print()">' . "\n"; |
|
54 | -echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n"; |
|
55 | -echo '<tr>' . "\n"; |
|
56 | -echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n"; |
|
57 | -echo $event['event_title'] . "\n"; |
|
58 | -echo '</td>' . "\n"; |
|
59 | -echo '</tr>' . "\n"; |
|
60 | -echo '<tr>' . "\n"; |
|
61 | -echo '<td style="width:50%; border:1px solid black;">' . "\n"; |
|
62 | -echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n"; |
|
63 | -echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n"; |
|
64 | -echo '</td>' . "\n"; |
|
65 | -echo '<td style="border:1px solid black;">' . "\n"; |
|
47 | +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n"; |
|
48 | +echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n"; |
|
49 | +echo '<head>'."\n"; |
|
50 | +echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'">'."\n"; |
|
51 | +echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n"; |
|
52 | +echo '</head>'."\n"; |
|
53 | +echo '<body onload="window.print()">'."\n"; |
|
54 | +echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n"; |
|
55 | +echo '<tr>'."\n"; |
|
56 | +echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n"; |
|
57 | +echo $event['event_title']."\n"; |
|
58 | +echo '</td>'."\n"; |
|
59 | +echo '</tr>'."\n"; |
|
60 | +echo '<tr>'."\n"; |
|
61 | +echo '<td style="width:50%; border:1px solid black;">'."\n"; |
|
62 | +echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n"; |
|
63 | +echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n"; |
|
64 | +echo '</td>'."\n"; |
|
65 | +echo '<td style="border:1px solid black;">'."\n"; |
|
66 | 66 | if (!$event['event_isrecur']) { |
67 | - echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n"; |
|
68 | - echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n"; |
|
67 | + echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n"; |
|
68 | + echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n"; |
|
69 | 69 | } else { |
70 | - echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n"; |
|
70 | + echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n"; |
|
71 | 71 | } |
72 | -echo '</td>' . "\n"; |
|
73 | -echo '</tr>' . "\n"; |
|
72 | +echo '</td>'."\n"; |
|
73 | +echo '</tr>'."\n"; |
|
74 | 74 | |
75 | -echo '<tr>' . "\n"; |
|
75 | +echo '<tr>'."\n"; |
|
76 | 76 | if ('' != $event['event_desc']) { |
77 | - echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n"; |
|
77 | + echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n"; |
|
78 | 78 | } |
79 | 79 | if ('' != $event['event_price']) { |
80 | - echo '<td style="border:1px solid black;">' . _MD_EXTCAL_ETABLISSEMENT_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n"; |
|
80 | + echo '<td style="border:1px solid black;">'._MD_EXTCAL_ETABLISSEMENT_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n"; |
|
81 | 81 | } |
82 | -echo '</tr>' . "\n"; |
|
82 | +echo '</tr>'."\n"; |
|
83 | 83 | |
84 | 84 | //show contact info |
85 | 85 | if ('' != $event['event_contact']) { |
86 | - echo '<tr>' . "\n"; |
|
87 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
88 | - echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n"; |
|
89 | - echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n"; |
|
90 | - echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n"; |
|
91 | - echo $event['event_address'] . '</span>' . "\n"; |
|
92 | - echo '</td>' . "\n"; |
|
93 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
94 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n"; |
|
95 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n"; |
|
96 | - echo '</td>' . "\n"; |
|
97 | - echo '</tr>' . "\n"; |
|
86 | + echo '<tr>'."\n"; |
|
87 | + echo '<td style="border:1px solid black;">'."\n"; |
|
88 | + echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n"; |
|
89 | + echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n"; |
|
90 | + echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n"; |
|
91 | + echo $event['event_address'].'</span>'."\n"; |
|
92 | + echo '</td>'."\n"; |
|
93 | + echo '<td style="border:1px solid black;">'."\n"; |
|
94 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n"; |
|
95 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n"; |
|
96 | + echo '</td>'."\n"; |
|
97 | + echo '</tr>'."\n"; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | //show location |
101 | 101 | if ($event['event_etablissement'] = 0) { |
102 | - echo '<tr>' . "\n"; |
|
102 | + echo '<tr>'."\n"; |
|
103 | 103 | |
104 | 104 | // echo($location['nom']); |
105 | 105 | // var_dump($location); |
106 | 106 | // var_dump($event); |
107 | 107 | |
108 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
109 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT . '</b>' . "\n"; |
|
108 | + echo '<td style="border:1px solid black;">'."\n"; |
|
109 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT.'</b>'."\n"; |
|
110 | 110 | if ('' != $location['categorie']) { |
111 | - echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n"; |
|
111 | + echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n"; |
|
112 | 112 | } |
113 | 113 | if ('' != $location['logo']) { |
114 | - echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/etablissement/' . $location['logo'] . ' height="75px">' . '' . "\n"; |
|
114 | + echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/etablissement/'.$location['logo'].' height="75px">'.''."\n"; |
|
115 | 115 | } |
116 | 116 | |
117 | - echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n"; |
|
118 | - echo $location['description'] . '<br>' . "\n"; |
|
119 | - echo $location['adresse'] . '</span> <br>' . "\n"; |
|
117 | + echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n"; |
|
118 | + echo $location['description'].'<br>'."\n"; |
|
119 | + echo $location['adresse'].'</span> <br>'."\n"; |
|
120 | 120 | if ('' != $location['adresse2']) { |
121 | - echo $location['adresse2'] . '</span> <br>' . "\n"; |
|
121 | + echo $location['adresse2'].'</span> <br>'."\n"; |
|
122 | 122 | } |
123 | - echo $location['ville'] . "\n"; |
|
124 | - echo $location['cp'] . '<br>' . "\n"; |
|
123 | + echo $location['ville']."\n"; |
|
124 | + echo $location['cp'].'<br>'."\n"; |
|
125 | 125 | |
126 | 126 | if ('' != $location['horaires']) { |
127 | - echo $location['horaires'] . '</span> <br>' . "\n"; |
|
127 | + echo $location['horaires'].'</span> <br>'."\n"; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | if ('' != $location['divers']) { |
131 | - echo $location['divers'] . '</span> <br>' . "\n"; |
|
131 | + echo $location['divers'].'</span> <br>'."\n"; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | if ('' != $location['tarifs']) { |
135 | - echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n"; |
|
135 | + echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n"; |
|
136 | 136 | } |
137 | 137 | |
138 | - echo '</td>' . "\n"; |
|
139 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
138 | + echo '</td>'."\n"; |
|
139 | + echo '<td style="border:1px solid black;">'."\n"; |
|
140 | 140 | |
141 | 141 | if ('' != $location['tel_fixe']) { |
142 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n"; |
|
142 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n"; |
|
143 | 143 | } |
144 | 144 | if ('' != $location['tel_portable']) { |
145 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n"; |
|
145 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n"; |
|
146 | 146 | } |
147 | 147 | |
148 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n"; |
|
149 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n"; |
|
150 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_ETABLISSEMENT_MAP2 . '</a>' . "\n"; |
|
148 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n"; |
|
149 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n"; |
|
150 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_ETABLISSEMENT_MAP2.'</a>'."\n"; |
|
151 | 151 | |
152 | - echo '</td>' . "\n"; |
|
153 | - echo '</tr>' . "\n"; |
|
152 | + echo '</td>'."\n"; |
|
153 | + echo '</tr>'."\n"; |
|
154 | 154 | } |
155 | 155 | //show images |
156 | 156 | |
157 | 157 | if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) { |
158 | - echo '<tr>' . "\n"; |
|
158 | + echo '<tr>'."\n"; |
|
159 | 159 | if ('' != $event['event_picture1']) { |
160 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
161 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n"; |
|
162 | - echo '</td>' . "\n"; |
|
160 | + echo '<td style="border:1px solid black;">'."\n"; |
|
161 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px">'.''."\n"; |
|
162 | + echo '</td>'."\n"; |
|
163 | 163 | } |
164 | 164 | if ('' != $event['event_picture2']) { |
165 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
166 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n"; |
|
167 | - echo '</td>' . "\n"; |
|
165 | + echo '<td style="border:1px solid black;">'."\n"; |
|
166 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px">'.''."\n"; |
|
167 | + echo '</td>'."\n"; |
|
168 | 168 | } |
169 | - echo '</tr>' . "\n"; |
|
169 | + echo '</tr>'."\n"; |
|
170 | 170 | } |
171 | 171 | //-------------------- |
172 | 172 | |
173 | -echo '</table><br>' . "\n"; |
|
173 | +echo '</table><br>'."\n"; |
|
174 | 174 | echo '<div style="text-align:center; width:640px;">'; |
175 | -echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>'; |
|
176 | -echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>'; |
|
175 | +echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>'; |
|
176 | +echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>'; |
|
177 | 177 | echo '</div>'; |
178 | -echo '</body>' . "\n"; |
|
179 | -echo '</html>' . "\n"; |
|
178 | +echo '</body>'."\n"; |
|
179 | +echo '</html>'."\n"; |
@@ -4,17 +4,17 @@ discard block |
||
4 | 4 | /** @var Extcal\Helper $helper */ |
5 | 5 | $helper = Extcal\Helper::getInstance(); |
6 | 6 | |
7 | -include __DIR__ . '/../../mainfile.php'; |
|
8 | -require_once __DIR__ . '/include/constantes.php'; |
|
9 | -require_once __DIR__ . '/header.php'; |
|
7 | +include __DIR__.'/../../mainfile.php'; |
|
8 | +require_once __DIR__.'/include/constantes.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
11 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
12 | 12 | /** @var Extcal\EventHandler $eventHandler */ |
13 | 13 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
14 | 14 | if (!isset($_GET['cat'])) { |
15 | 15 | $cat = 0; |
16 | 16 | } else { |
17 | - $cat = (int)$_GET['cat']; |
|
17 | + $cat = (int) $_GET['cat']; |
|
18 | 18 | } |
19 | 19 | if (function_exists('mb_http_output')) { |
20 | 20 | mb_http_output('pass'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $events = $eventHandler->getUpcommingEvent($helper->getConfig('rss_nb_event'), $cat); |
28 | 28 | if (is_array($events)) { |
29 | 29 | $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); |
30 | - $tpl->assign('channel_link', XOOPS_URL . '/'); |
|
30 | + $tpl->assign('channel_link', XOOPS_URL.'/'); |
|
31 | 31 | $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))); |
32 | 32 | $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss')); |
33 | 33 | $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']); |
@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | $tpl->assign('channel_category', 'Event'); |
36 | 36 | $tpl->assign('channel_generator', 'XOOPS'); |
37 | 37 | $tpl->assign('channel_language', _LANGCODE); |
38 | - $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png'); |
|
38 | + $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png'); |
|
39 | 39 | $tpl->assign('image_width', 92); |
40 | 40 | $tpl->assign('image_height', 52); |
41 | 41 | foreach ($events as $event) { |
42 | 42 | $tpl->append('items', [ |
43 | 43 | 'title' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)), |
44 | - 'link' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
45 | - 'guid' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
44 | + 'link' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
45 | + 'guid' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
46 | 46 | 'pubdate' => formatTimestamp($event->getVar('event_start'), 'rss'), |
47 | 47 | 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)), |
48 | 48 | ]); |
@@ -4,14 +4,14 @@ discard block |
||
4 | 4 | /** @var Extcal\Helper $helper */ |
5 | 5 | $helper = Extcal\Helper::getInstance(); |
6 | 6 | |
7 | -include __DIR__ . '/../../mainfile.php'; |
|
8 | -require_once __DIR__ . '/include/constantes.php'; |
|
9 | -$params = [ |
|
7 | +include __DIR__.'/../../mainfile.php'; |
|
8 | +require_once __DIR__.'/include/constantes.php'; |
|
9 | +$params = [ |
|
10 | 10 | 'view' => _EXTCAL_NAV_SEARCH, |
11 | 11 | 'file' => _EXTCAL_FILE_SEARCH, |
12 | 12 | ]; |
13 | 13 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
14 | -require_once __DIR__ . '/header.php'; |
|
14 | +require_once __DIR__.'/header.php'; |
|
15 | 15 | |
16 | 16 | $recurEventsArray = []; |
17 | 17 | //needed to save the state of the form, so we don't show on the first time the list of available events |
@@ -239,4 +239,4 @@ discard block |
||
239 | 239 | $xoopsTpl->assign('lang', $lang); |
240 | 240 | $xoopsTpl->assign('view', 'search'); |
241 | 241 | |
242 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
242 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | /** @var Extcal\Helper $helper */ |
5 | 5 | $helper = Extcal\Helper::getInstance(); |
6 | 6 | |
7 | -include __DIR__ . '/../../mainfile.php'; |
|
8 | -require_once __DIR__ . '/include/constantes.php'; |
|
7 | +include __DIR__.'/../../mainfile.php'; |
|
8 | +require_once __DIR__.'/include/constantes.php'; |
|
9 | 9 | $params = ['view' => _EXTCAL_NAV_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY]; |
10 | 10 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | /* ========================================================================== */ |
14 | 14 | //recupe des variables get |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | 'nbJours' => $nbJours, |
49 | 49 | 'externalKeys' => 'cat_id', |
50 | 50 | ]; |
51 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
51 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
52 | 52 | /**********************************************************************/ |
53 | 53 | $eventsArray = $events; |
54 | 54 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -103,21 +103,21 @@ discard block |
||
103 | 103 | |
104 | 104 | $navig = [ |
105 | 105 | 'prev' => [ |
106 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
106 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
107 | 107 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $pDayCalObj->getTimestamp()), |
108 | 108 | ], |
109 | 109 | 'this' => [ |
110 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
110 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
111 | 111 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $dayCalObj->getTimestamp()), |
112 | 112 | ], |
113 | 113 | 'next' => [ |
114 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
114 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
115 | 115 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $nDayCalObj->getTimestamp()), |
116 | 116 | ], |
117 | 117 | ]; |
118 | 118 | |
119 | 119 | // Title of the page |
120 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
120 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
121 | 121 | |
122 | 122 | // Assigning navig data to the template |
123 | 123 | $xoopsTpl->assign('navig', $navig); |
@@ -158,4 +158,4 @@ discard block |
||
158 | 158 | $xoopsTpl->assign('lang', $lang); |
159 | 159 | $xoopsTpl->assign('view', 'agendaday'); |
160 | 160 | |
161 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
161 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | /** @var Extcal\Helper $helper */ |
5 | 5 | $helper = Extcal\Helper::getInstance(); |
6 | 6 | |
7 | -include __DIR__ . '/../../mainfile.php'; |
|
8 | -require_once __DIR__ . '/include/constantes.php'; |
|
7 | +include __DIR__.'/../../mainfile.php'; |
|
8 | +require_once __DIR__.'/include/constantes.php'; |
|
9 | 9 | $params = ['view' => _EXTCAL_NAV_CALWEEK, 'file' => _EXTCAL_FILE_CALWEEK]; |
10 | 10 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | /* ========================================================================== */ |
14 | 14 | $year = \Xmf\Request::getInt('year', date('Y'), 'GET'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
22 | 22 | //$offset = date('w', $dayTS) - $helper->getConfig('week_start_day'); |
23 | 23 | $offset = date('w', $dayTS) + 7 - $helper->getConfig('week_start_day') < 7 ? date('w', $dayTS) + 7 - $helper->getConfig('week_start_day') : 0; |
24 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
24 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
25 | 25 | $year = date('Y', $dayTS); |
26 | 26 | $month = date('n', $dayTS); |
27 | 27 | $day = date('j', $dayTS); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'cat' => $cat, |
52 | 52 | 'externalKeys' => 'cat_id', |
53 | 53 | ]; |
54 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
54 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
55 | 55 | /**********************************************************************/ |
56 | 56 | //$eventsArray = $events; |
57 | 57 | |
@@ -140,21 +140,21 @@ discard block |
||
140 | 140 | // Making navig data |
141 | 141 | $navig = [ |
142 | 142 | 'prev' => [ |
143 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
143 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
144 | 144 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_week'), $pWeekCalObj->getTimestamp()), |
145 | 145 | ], |
146 | 146 | 'this' => [ |
147 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
147 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
148 | 148 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_week'), $weekCalObj->getTimestamp()), |
149 | 149 | ], |
150 | 150 | 'next' => [ |
151 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
151 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
152 | 152 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_week'), $nWeekCalObj->getTimestamp()), |
153 | 153 | ], |
154 | 154 | ]; |
155 | 155 | |
156 | 156 | // Title of the page |
157 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
157 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
158 | 158 | |
159 | 159 | // Assigning navig data to the template |
160 | 160 | $xoopsTpl->assign('navig', $navig); |
@@ -194,4 +194,4 @@ discard block |
||
194 | 194 | $xoopsTpl->assign('lang', $lang); |
195 | 195 | $xoopsTpl->assign('view', 'calweek'); |
196 | 196 | |
197 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
197 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -21,12 +21,12 @@ 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 | 26 | $moduleDirName = basename(__DIR__); |
27 | 27 | |
28 | -require_once __DIR__ . '/include/constantes.php'; |
|
29 | -require_once __DIR__ . '/include/agenda_fnc.php'; |
|
28 | +require_once __DIR__.'/include/constantes.php'; |
|
29 | +require_once __DIR__.'/include/agenda_fnc.php'; |
|
30 | 30 | //require_once __DIR__ . '/class/Config.php'; |
31 | 31 | //$loc_de = setlocale (LC_ALL, 'french'); |
32 | 32 | |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | |
100 | 100 | // Tables created by sql file (without prefix!) |
101 | 101 | $modversion['tables'] = [ |
102 | - $moduleDirName . '_' . 'cat', |
|
103 | - $moduleDirName . '_' . 'event', |
|
104 | - $moduleDirName . '_' . 'eventmember', |
|
105 | - $moduleDirName . '_' . 'eventnotmember', |
|
106 | - $moduleDirName . '_' . 'file', |
|
107 | - $moduleDirName . '_' . 'etablissement' |
|
102 | + $moduleDirName.'_'.'cat', |
|
103 | + $moduleDirName.'_'.'event', |
|
104 | + $moduleDirName.'_'.'eventmember', |
|
105 | + $moduleDirName.'_'.'eventnotmember', |
|
106 | + $moduleDirName.'_'.'file', |
|
107 | + $moduleDirName.'_'.'etablissement' |
|
108 | 108 | ]; |
109 | 109 | |
110 | 110 | // SQL |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | $modversion['config'][$i]['default'] = 5; |
517 | 517 | |
518 | 518 | ++$i; |
519 | -$modversion['config'][$i]['name'] = 'break' . $i; |
|
519 | +$modversion['config'][$i]['name'] = 'break'.$i; |
|
520 | 520 | $modversion['config'][$i]['title'] = '_MI_EXTCAL_SHOW_OTHEROPTIONS'; |
521 | 521 | $modversion['config'][$i]['description'] = ''; |
522 | 522 | $modversion['config'][$i]['formtype'] = 'line_break'; |