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