|
@@ -1,8 +1,8 @@ discard block |
|
|
block discarded – undo |
|
1
|
1
|
<?php |
|
2
|
2
|
|
|
3
|
|
-require_once __DIR__ . '/../../../include/cp_header.php'; |
|
4
|
|
-include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
5
|
|
-require_once __DIR__ . '/admin_header.php'; |
|
|
3
|
+require_once __DIR__.'/../../../include/cp_header.php'; |
|
|
4
|
+include __DIR__.'/../../../class/xoopsformloader.php'; |
|
|
5
|
+require_once __DIR__.'/admin_header.php'; |
|
6
|
6
|
|
|
7
|
7
|
function extgalleryLastVersion() |
|
8
|
8
|
{ |
|
@@ -37,7 +37,7 @@ discard block |
|
|
block discarded – undo |
|
37
|
37
|
switch ($fct) { |
|
38
|
38
|
case 'send': |
|
39
|
39
|
if (!$GLOBALS['xoopsSecurity']->check()) { |
|
40
|
|
- redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
|
40
|
+ redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
41
|
41
|
} |
|
42
|
42
|
xoops_cp_header(); |
|
43
|
43
|
adminMenu(1); |
|
@@ -70,7 +70,7 @@ discard block |
|
|
block discarded – undo |
|
70
|
70
|
'EV_TITLE' => $event->getVar('event_title'), |
|
71
|
71
|
'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')), |
|
72
|
72
|
'EV_END' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')), |
|
73
|
|
- 'EV_LINK' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
|
73
|
+ 'EV_LINK' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
74
|
74
|
]; |
|
75
|
75
|
$xoopsMailer->assign($tag); |
|
76
|
76
|
$xoopsMailer->send(true); |
|
@@ -85,7 +85,7 @@ discard block |
|
|
block discarded – undo |
|
85
|
85
|
default: |
|
86
|
86
|
xoops_cp_header(); |
|
87
|
87
|
$fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
|
88
|
|
- $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span> '; |
|
|
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,12 +108,12 @@ discard block |
|
|
block discarded – undo |
|
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); |
|
@@ -143,13 +143,13 @@ discard block |
|
|
block discarded – undo |
|
143
|
143
|
// $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
144
|
144
|
$adminObject = \Xmf\Module\Admin::getInstance(); |
|
145
|
145
|
$adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
146
|
|
- $adminObject->addInfoBoxLine(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'); |
|
|
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
|
149
|
$criteriaCompo = new CriteriaCompo(); |
|
150
|
150
|
$criteriaCompo->add(new Criteria('event_approved', 1)); |
|
151
|
151
|
$criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
152
|
|
- $adminObject->addInfoBoxLine(sprintf( '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
|
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 |
|
|
block discarded – undo |
|
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['cat']['cat_name'] . '</td>'; |
|
190
|
|
- echo '<td>' . $event['event_title'] . '</td>'; |
|
191
|
|
- echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
|
188
|
+ echo '<tr style="text-align:center;" class="'.$class.'">'; |
|
|
189
|
+ echo '<td>'.$event['cat']['cat_name'].'</td>'; |
|
|
190
|
+ echo '<td>'.$event['event_title'].'</td>'; |
|
|
191
|
+ echo '<td>'.$event['formated_event_start'].'</td>'; |
|
192
|
192
|
echo '<td style="width:10%; text-align:center;">'; |
|
193
|
|
- echo '<a href="event.php?op=modify&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
|
} |