@@ -156,10 +156,10 @@ |
||
156 | 156 | } |
157 | 157 | } else { |
158 | 158 | xoops_confirm([ |
159 | - 'ok' => 1, |
|
160 | - 'location_id' => $_REQUEST['location_id'], |
|
161 | - 'op' => 'delete_location', |
|
162 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL . '<br>'); |
|
159 | + 'ok' => 1, |
|
160 | + 'location_id' => $_REQUEST['location_id'], |
|
161 | + 'op' => 'delete_location', |
|
162 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL . '<br>'); |
|
163 | 163 | } |
164 | 164 | break; |
165 | 165 |
@@ -20,18 +20,18 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | 22 | // Include xoops admin header |
23 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
23 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
24 | 24 | // require_once dirname(__DIR__) . '/class/ExtcalPersistableObjectHandler.php'; |
25 | -require_once dirname(dirname(dirname(__DIR__))) . '/kernel/module.php'; |
|
26 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopsformloader.php'; |
|
27 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/tree.php'; |
|
28 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopslists.php'; |
|
29 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/pagenav.php'; |
|
30 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopsform/grouppermform.php'; |
|
31 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/uploader.php'; |
|
32 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
25 | +require_once dirname(dirname(dirname(__DIR__))).'/kernel/module.php'; |
|
26 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopsformloader.php'; |
|
27 | +require_once dirname(dirname(dirname(__DIR__))).'/class/tree.php'; |
|
28 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopslists.php'; |
|
29 | +require_once dirname(dirname(dirname(__DIR__))).'/class/pagenav.php'; |
|
30 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopsform/grouppermform.php'; |
|
31 | +require_once dirname(dirname(dirname(__DIR__))).'/class/uploader.php'; |
|
32 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
33 | 33 | |
34 | -require_once __DIR__ . '/admin_header.php'; |
|
34 | +require_once __DIR__.'/admin_header.php'; |
|
35 | 35 | |
36 | 36 | //require("functions.php"); |
37 | 37 | //require("../include/functions.php"); |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | if ($xoopsUser) { |
40 | 40 | $xoopsModule = \XoopsModule::getByDirname('extcal'); |
41 | 41 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
42 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
42 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
43 | 43 | } |
44 | 44 | } else { |
45 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
45 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // Include language file |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | $criteria->setSort('nom'); |
98 | 98 | $criteria->setOrder('ASC'); |
99 | 99 | $location_arr = $locationHandler->getObjects($criteria); |
100 | - $numrows = $locationHandler->getCount($criteria); |
|
100 | + $numrows = $locationHandler->getCount($criteria); |
|
101 | 101 | if ($numrows > $limit) { |
102 | - $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); |
|
102 | + $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit); |
|
103 | 103 | $pagenav = $pagenav->renderNav(4); |
104 | 104 | } else { |
105 | 105 | $pagenav = ''; |
@@ -108,35 +108,35 @@ discard block |
||
108 | 108 | if ($numrows > 0) { |
109 | 109 | echo '<table width="100%" cellspacing="1" class="outer">'; |
110 | 110 | echo '<tr>'; |
111 | - echo '<th align="center">' . _AM_EXTCAL_LOCATION_FORM_NOM . '</th>'; |
|
112 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_LOCATION_FORM_ADRESSE . '</th>'; |
|
113 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_LOCATION_FORM_CITY . '</th>'; |
|
114 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_LOCATION_FORM_TELEPHONE . '</th>'; |
|
115 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_LOCATION_FORM_ACTION . '</th>'; |
|
111 | + echo '<th align="center">'._AM_EXTCAL_LOCATION_FORM_NOM.'</th>'; |
|
112 | + echo '<th align="center" width="20%">'._AM_EXTCAL_LOCATION_FORM_ADRESSE.'</th>'; |
|
113 | + echo '<th align="center" width="20%">'._AM_EXTCAL_LOCATION_FORM_CITY.'</th>'; |
|
114 | + echo '<th align="center" width="15%">'._AM_EXTCAL_LOCATION_FORM_TELEPHONE.'</th>'; |
|
115 | + echo '<th align="center" width="15%">'._AM_EXTCAL_LOCATION_FORM_ACTION.'</th>'; |
|
116 | 116 | echo '</tr>'; |
117 | 117 | $class = 'odd'; |
118 | 118 | foreach (array_keys($location_arr) as $i) { |
119 | - $class = ('even' === $class) ? 'odd' : 'even'; |
|
119 | + $class = ('even' === $class) ? 'odd' : 'even'; |
|
120 | 120 | $location_id = $location_arr[$i]->getVar('id'); |
121 | 121 | $location_nom = $location_arr[$i]->getVar('nom'); |
122 | 122 | $location_adresse = $location_arr[$i]->getVar('adresse'); |
123 | 123 | $location_city = $location_arr[$i]->getVar('ville'); |
124 | 124 | $location_telephone = $location_arr[$i]->getVar('tel_fixe'); |
125 | - echo '<tr class="' . $class . '">'; |
|
126 | - echo '<td align="left">' . '<a href="Location.php?op=edit_location&location_id=' . $location_id . '">' . $location_nom . '</a>' . '</td>'; |
|
125 | + echo '<tr class="'.$class.'">'; |
|
126 | + echo '<td align="left">'.'<a href="Location.php?op=edit_location&location_id='.$location_id.'">'.$location_nom.'</a>'.'</td>'; |
|
127 | 127 | |
128 | - echo '<td align="center"><b>' . $location_adresse . '</td>'; |
|
129 | - echo '<td align="center"><b>' . $location_city . '</td>'; |
|
130 | - echo '<td align="center"><b>' . $location_telephone . '</td>'; |
|
128 | + echo '<td align="center"><b>'.$location_adresse.'</td>'; |
|
129 | + echo '<td align="center"><b>'.$location_city.'</td>'; |
|
130 | + echo '<td align="center"><b>'.$location_telephone.'</td>'; |
|
131 | 131 | echo '<td align="center" width="15%">'; |
132 | - echo '<a href="Location.php?op=edit_location&location_id=' . $location_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_LOCATION_FORM_EDIT . '" title="' . _AM_EXTCAL_LOCATION_FORM_EDIT . '"></a> '; |
|
133 | - echo '<a href="Location.php?op=delete_location&location_id=' . $location_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_LOCATION_FORM_DELETE . '" title="' . _AM_EXTCAL_LOCATION_FORM_DELETE . '"></a> '; |
|
132 | + echo '<a href="Location.php?op=edit_location&location_id='.$location_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_LOCATION_FORM_EDIT.'" title="'._AM_EXTCAL_LOCATION_FORM_EDIT.'"></a> '; |
|
133 | + echo '<a href="Location.php?op=delete_location&location_id='.$location_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_LOCATION_FORM_DELETE.'" title="'._AM_EXTCAL_LOCATION_FORM_DELETE.'"></a> '; |
|
134 | 134 | echo '</td>'; |
135 | 135 | } |
136 | 136 | echo '</table><br>'; |
137 | - echo '<br><div align=right>' . $pagenav . '</div><br>'; |
|
137 | + echo '<br><div align=right>'.$pagenav.'</div><br>'; |
|
138 | 138 | } else { |
139 | - echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_LOCATION . '</div>'; |
|
139 | + echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_LOCATION.'</div>'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | // Affichage du formulaire |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'ok' => 1, |
160 | 160 | 'location_id' => $_REQUEST['location_id'], |
161 | 161 | 'op' => 'delete_location', |
162 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL . '<br>'); |
|
162 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL.'<br>'); |
|
163 | 163 | } |
164 | 164 | break; |
165 | 165 | |
@@ -201,11 +201,11 @@ discard block |
||
201 | 201 | $obj->setVar('map', $_REQUEST['map']); |
202 | 202 | |
203 | 203 | //Logo |
204 | - $uploaddir_location = XOOPS_ROOT_PATH . '/uploads/extcal/location/'; |
|
205 | - $uploadurl_location = XOOPS_URL . '/uploads/extcal/location/'; |
|
204 | + $uploaddir_location = XOOPS_ROOT_PATH.'/uploads/extcal/location/'; |
|
205 | + $uploadurl_location = XOOPS_URL.'/uploads/extcal/location/'; |
|
206 | 206 | |
207 | 207 | $delimg = @$_REQUEST['delimg']; |
208 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
208 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
209 | 209 | if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) { |
210 | 210 | $upload = new \XoopsMediaUploader($uploaddir_location, [ |
211 | 211 | 'image/gif', |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | $logo = $_REQUEST['file']; |
228 | 228 | } |
229 | 229 | } else { |
230 | - $logo = ''; |
|
231 | - $url_location = XOOPS_ROOT_PATH . '/uploads/extcal/location/' . $_REQUEST['file']; |
|
230 | + $logo = ''; |
|
231 | + $url_location = XOOPS_ROOT_PATH.'/uploads/extcal/location/'.$_REQUEST['file']; |
|
232 | 232 | if (is_file($url_location)) { |
233 | 233 | chmod($url_location, 0777); |
234 | 234 | unlink($url_location); |
@@ -248,4 +248,4 @@ discard block |
||
248 | 248 | break; |
249 | 249 | } |
250 | 250 | |
251 | -require_once __DIR__ . '/admin_footer.php'; |
|
251 | +require_once __DIR__.'/admin_footer.php'; |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | use Xmf\Request; |
21 | 21 | use XoopsModules\Extcal; |
22 | 22 | |
23 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
24 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopsformloader.php'; |
|
25 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
24 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopsformloader.php'; |
|
25 | +require_once __DIR__.'/admin_header.php'; |
|
26 | 26 | // require_once dirname(__DIR__) . '/class/Utility.php'; |
27 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
27 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
28 | 28 | |
29 | 29 | //$gepeto = array_merge($_GET, $_POST); |
30 | 30 | //while (list($key, $value) = each($gepeto)) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
96 | 96 | $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
97 | 97 | |
98 | - $file_path = dirname(__DIR__) . '/assets/css/images'; |
|
98 | + $file_path = dirname(__DIR__).'/assets/css/images'; |
|
99 | 99 | $tf = \XoopsLists::getImgListAsArray($file_path); |
100 | 100 | array_unshift($tf, _MD_EXTCAL_NONE); |
101 | 101 | //$xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $form->display(); |
109 | 109 | |
110 | - require_once __DIR__ . '/admin_footer.php'; |
|
110 | + require_once __DIR__.'/admin_footer.php'; |
|
111 | 111 | break; |
112 | 112 | |
113 | 113 | case 'edit': |
@@ -120,15 +120,15 @@ discard block |
||
120 | 120 | // $cat = $catHandler->getCat($cat_id, true); |
121 | 121 | } |
122 | 122 | |
123 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
123 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
124 | 124 | |
125 | 125 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
126 | 126 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
127 | 127 | $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
128 | 128 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
129 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
129 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
130 | 130 | |
131 | - $file_path = dirname(__DIR__) . '/assets/css/images'; |
|
131 | + $file_path = dirname(__DIR__).'/assets/css/images'; |
|
132 | 132 | $tf = \XoopsLists::getImgListAsArray($file_path); |
133 | 133 | array_unshift($tf, _MD_EXTCAL_NONE); |
134 | 134 | $xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
@@ -284,6 +284,6 @@ discard block |
||
284 | 284 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
285 | 285 | |
286 | 286 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
287 | - require_once __DIR__ . '/admin_footer.php'; |
|
287 | + require_once __DIR__.'/admin_footer.php'; |
|
288 | 288 | break; |
289 | 289 | } |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
23 | 23 | require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
24 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
24 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
25 | 25 | |
26 | -require_once dirname(__DIR__) . '/preloads/autoloader.php'; |
|
26 | +require_once dirname(__DIR__).'/preloads/autoloader.php'; |
|
27 | 27 | |
28 | 28 | $moduleDirName = basename(dirname(__DIR__)); |
29 | 29 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $utility = new Extcal\Utility(); |
35 | 35 | |
36 | 36 | // require_once dirname(__DIR__) . '/class/Utility.php'; |
37 | -require_once dirname(__DIR__) . '/include/common.php'; |
|
37 | +require_once dirname(__DIR__).'/include/common.php'; |
|
38 | 38 | |
39 | 39 | $adminObject = \Xmf\Module\Admin::getInstance(); |
40 | 40 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | use XoopsModules\Extcal\Common; |
22 | 22 | |
23 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once __DIR__.'/admin_header.php'; |
|
24 | 24 | // Display Admin header |
25 | 25 | xoops_cp_header(); |
26 | 26 | /** @var Extcal\Utility $utility */ |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | |
40 | 40 | if ($helper->getConfig('displaySampleButton')) { |
41 | 41 | xoops_loadLanguage('admin/modulesadmin', 'system'); |
42 | - require_once dirname(__DIR__) . '/testdata/index.php'; |
|
42 | + require_once dirname(__DIR__).'/testdata/index.php'; |
|
43 | 43 | |
44 | - $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
|
44 | + $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
|
45 | 45 | |
46 | - $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add'); |
|
46 | + $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add'); |
|
47 | 47 | |
48 | 48 | // $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA'), '__DIR__ . /../../testdata/index.php?op=exportschema', 'add'); |
49 | 49 | |
@@ -57,4 +57,4 @@ discard block |
||
57 | 57 | echo $utility::getServerStats(); |
58 | 58 | |
59 | 59 | //codeDump(__FILE__); |
60 | -require_once __DIR__ . '/admin_footer.php'; |
|
60 | +require_once __DIR__.'/admin_footer.php'; |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | // require_once dirname(__DIR__) . '/class/Helper.php'; |
23 | 23 | //require_once dirname(__DIR__) . '/include/common.php'; |
24 | 24 | |
25 | -require_once dirname(__DIR__) . '/preloads/autoloader.php'; |
|
25 | +require_once dirname(__DIR__).'/preloads/autoloader.php'; |
|
26 | 26 | |
27 | 27 | $helper = Extcal\Helper::getInstance(); |
28 | 28 | |
29 | -$pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
|
29 | +$pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); |
|
30 | 30 | if (is_object($helper->getModule())) { |
31 | 31 | $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
32 | 32 | } |
@@ -34,33 +34,33 @@ discard block |
||
34 | 34 | $adminmenu[] = [ |
35 | 35 | 'title' => _MI_EXTCAL_INDEX, |
36 | 36 | 'link' => 'admin/index.php', |
37 | - 'icon' => $pathIcon32 . '/home.png' |
|
37 | + 'icon' => $pathIcon32.'/home.png' |
|
38 | 38 | ]; |
39 | 39 | |
40 | 40 | $adminmenu[] = [ |
41 | 41 | 'title' => _MI_EXTCAL_CATEGORY, |
42 | 42 | 'link' => 'admin/cat.php', |
43 | - 'icon' => $pathIcon32 . '/category.png' |
|
43 | + 'icon' => $pathIcon32.'/category.png' |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $adminmenu[] = [ |
47 | 47 | 'title' => _MI_EXTCAL_EVENT, |
48 | 48 | 'link' => 'admin/event.php', |
49 | - 'icon' => $pathIcon32 . '/event.png' |
|
49 | + 'icon' => $pathIcon32.'/event.png' |
|
50 | 50 | ]; |
51 | 51 | $adminmenu[] = [ |
52 | 52 | 'title' => _MI_EXTCAL_LOCATIONS, |
53 | 53 | 'link' => 'admin/location.php', |
54 | - 'icon' => $pathModIcon32 . '/location.png' |
|
54 | + 'icon' => $pathModIcon32.'/location.png' |
|
55 | 55 | ]; |
56 | 56 | $adminmenu[] = [ |
57 | 57 | 'title' => _MI_EXTCAL_PERMISSIONS, |
58 | 58 | 'link' => 'admin/permissions.php', |
59 | - 'icon' => $pathIcon32 . '/permissions.png' |
|
59 | + 'icon' => $pathIcon32.'/permissions.png' |
|
60 | 60 | ]; |
61 | 61 | |
62 | 62 | $adminmenu[] = [ |
63 | 63 | 'title' => _MI_EXTCAL_ABOUT, |
64 | 64 | 'link' => 'admin/about.php', |
65 | - 'icon' => $pathIcon32 . '/about.png' |
|
65 | + 'icon' => $pathIcon32.'/about.png' |
|
66 | 66 | ]; |
@@ -75,178 +75,196 @@ discard block |
||
75 | 75 | |
76 | 76 | switch ($op) { |
77 | 77 | |
78 | - case 'enreg': |
|
79 | - |
|
80 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
81 | - $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
|
82 | - // $t = print_r($_POST,true); |
|
83 | - // echo "<pre>{$t}</pre><br>"; |
|
84 | - // exit; |
|
85 | - // If the date format is wrong |
|
86 | - // if ( |
|
87 | - // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
88 | - // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
89 | - // ) { |
|
90 | - // redirect_header( |
|
91 | - // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
92 | - // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
93 | - // ); |
|
94 | - // exit; |
|
95 | - // } |
|
96 | - |
|
97 | - //exit; |
|
98 | - /////////////////////////////////////////////////////////////////////////////// |
|
99 | - Extcal\Utility::loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
100 | - /////////////////////////////////////////////////////////////////////////////// |
|
101 | - $data = [ |
|
102 | - 'event_title' => $_POST['event_title'], |
|
103 | - 'cat_id' => $_POST['cat_id'], |
|
104 | - 'event_desc' => $_POST['event_desc'], |
|
105 | - 'event_nbmember' => $_POST['event_nbmember'], |
|
106 | - 'event_organisateur' => $_POST['event_organisateur'], |
|
107 | - 'event_contact' => $_POST['event_contact'], |
|
108 | - 'event_url' => $_POST['event_url'], |
|
109 | - 'event_email' => $_POST['event_email'], |
|
110 | - 'event_address' => $_POST['event_address'], |
|
111 | - 'event_approved' => 1, |
|
112 | - 'event_start' => $_POST['event_start'], |
|
113 | - 'have_end' => $_POST['have_end'], |
|
114 | - 'event_end' => $_POST['event_end'], |
|
115 | - 'event_picture1' => @$event_picture1, |
|
116 | - 'event_picture2' => @$event_picture2, |
|
117 | - 'event_price' => @$_POST['event_price'], |
|
118 | - 'event_location' => $_POST['event_location'], |
|
119 | - 'dohtml' => $extcalConfig['allow_html'], |
|
120 | - 'event_icone' => $_POST['event_icone'], |
|
121 | - ]; |
|
122 | - |
|
123 | - // Event edited |
|
124 | - if (\Xmf\Request::hasVar('event_id', 'POST')) { |
|
125 | - if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
126 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
78 | + case 'enreg': |
|
79 | + |
|
80 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
81 | + $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
|
82 | + // $t = print_r($_POST,true); |
|
83 | + // echo "<pre>{$t}</pre><br>"; |
|
84 | + // exit; |
|
85 | + // If the date format is wrong |
|
86 | + // if ( |
|
87 | + // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
88 | + // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
89 | + // ) { |
|
90 | + // redirect_header( |
|
91 | + // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
92 | + // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
93 | + // ); |
|
94 | + // exit; |
|
95 | + // } |
|
96 | + |
|
97 | + //exit; |
|
98 | + /////////////////////////////////////////////////////////////////////////////// |
|
99 | + Extcal\Utility::loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
100 | + /////////////////////////////////////////////////////////////////////////////// |
|
101 | + $data = [ |
|
102 | + 'event_title' => $_POST['event_title'], |
|
103 | + 'cat_id' => $_POST['cat_id'], |
|
104 | + 'event_desc' => $_POST['event_desc'], |
|
105 | + 'event_nbmember' => $_POST['event_nbmember'], |
|
106 | + 'event_organisateur' => $_POST['event_organisateur'], |
|
107 | + 'event_contact' => $_POST['event_contact'], |
|
108 | + 'event_url' => $_POST['event_url'], |
|
109 | + 'event_email' => $_POST['event_email'], |
|
110 | + 'event_address' => $_POST['event_address'], |
|
111 | + 'event_approved' => 1, |
|
112 | + 'event_start' => $_POST['event_start'], |
|
113 | + 'have_end' => $_POST['have_end'], |
|
114 | + 'event_end' => $_POST['event_end'], |
|
115 | + 'event_picture1' => @$event_picture1, |
|
116 | + 'event_picture2' => @$event_picture2, |
|
117 | + 'event_price' => @$_POST['event_price'], |
|
118 | + 'event_location' => $_POST['event_location'], |
|
119 | + 'dohtml' => $extcalConfig['allow_html'], |
|
120 | + 'event_icone' => $_POST['event_icone'], |
|
121 | + ]; |
|
122 | + |
|
123 | + // Event edited |
|
124 | + if (\Xmf\Request::hasVar('event_id', 'POST')) { |
|
125 | + if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
126 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
127 | + } else { |
|
128 | + $fileHandler->createFile(\Xmf\Request::getInt('event_id', 0, 'POST')); |
|
129 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
130 | + } |
|
131 | + |
|
132 | + // New event |
|
127 | 133 | } else { |
128 | - $fileHandler->createFile(\Xmf\Request::getInt('event_id', 0, 'POST')); |
|
129 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
134 | + /** @var \XoopsNotificationHandler $notificationHandler */ |
|
135 | + $notificationHandler = xoops_getHandler('notification'); |
|
136 | + /** @var Extcal\CategoryHandler $catHandler */ |
|
137 | + // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
138 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
139 | + |
|
140 | + $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
141 | + $data['event_submitdate'] = time(); |
|
142 | + |
|
143 | + if ($eventHandler->createEvent($data, $_POST)) { |
|
144 | + $fileHandler->createFile($eventHandler->getInsertId()); |
|
145 | + $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
146 | + $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]); |
|
147 | + $notificationHandler->triggerEvent('category', $_POST['cat_id'], 'new_event_cat', [ |
|
148 | + 'EVENT_TITLE' => $_POST['event_title'], |
|
149 | + 'CAT_NAME' => $cat->getVar('cat_name'), |
|
150 | + ]); |
|
151 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
152 | + } else { |
|
153 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
154 | + } |
|
130 | 155 | } |
156 | + break; |
|
131 | 157 | |
132 | - // New event |
|
133 | - } else { |
|
134 | - /** @var \XoopsNotificationHandler $notificationHandler */ |
|
135 | - $notificationHandler = xoops_getHandler('notification'); |
|
136 | - /** @var Extcal\CategoryHandler $catHandler */ |
|
137 | - // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
138 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
139 | - |
|
140 | - $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
141 | - $data['event_submitdate'] = time(); |
|
142 | - |
|
143 | - if ($eventHandler->createEvent($data, $_POST)) { |
|
144 | - $fileHandler->createFile($eventHandler->getInsertId()); |
|
145 | - $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
146 | - $notificationHandler->triggerEvent('global', 0, 'new_event', ['EVENT_TITLE' => $_POST['event_title']]); |
|
147 | - $notificationHandler->triggerEvent('category', $_POST['cat_id'], 'new_event_cat', [ |
|
148 | - 'EVENT_TITLE' => $_POST['event_title'], |
|
149 | - 'CAT_NAME' => $cat->getVar('cat_name'), |
|
150 | - ]); |
|
151 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
152 | - } else { |
|
153 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
158 | + case 'clone': /* sur validation du formulaire */ |
|
159 | + case 'modify': |
|
160 | + $action = (('clone' === $op) ? 'clone' : 'edit'); |
|
161 | + xoops_cp_header(); |
|
162 | + //================================================ |
|
163 | + // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
164 | + // |
|
165 | + // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
166 | + // $dateBirthday = new \XoopsTcCalendar("datez1", true, false); |
|
167 | + // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
168 | + // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
169 | + // //$dateBirthday->rtl=false; |
|
170 | + // $dateBirthday->setAutoHide(false); |
|
171 | + // |
|
172 | + // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
173 | + // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
174 | + // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
175 | + // |
|
176 | + // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
177 | + // $dateBirthday->zindex = 150; //default 1 |
|
178 | + // $dateBirthday->setYearInterval(1995, date('Y')); |
|
179 | + // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
180 | + // //$dateBirthday->autoSubmit(true, "calendar"); |
|
181 | + // $dateBirthday->disabledDay("sat"); |
|
182 | + // $dateBirthday->disabledDay("sun"); |
|
183 | + // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
184 | + // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
185 | + // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
186 | + // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
187 | + // echo $dateBirthday->render(); |
|
188 | + // echo "</td></tr></table>"; |
|
189 | + //echo $dateBirthday->render(); |
|
190 | + //================================================ |
|
191 | + // @author Gregory Mage (Aka Mage) |
|
192 | + //*************************************************************************************** |
|
193 | + // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
194 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
195 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
196 | + //*************************************************************************************** |
|
197 | + |
|
198 | + $eventId = $_GET['event_id']; |
|
199 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
200 | + |
|
201 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
202 | + |
|
203 | + if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
|
204 | + $form->display(); |
|
154 | 205 | } |
155 | - } |
|
156 | - break; |
|
157 | - |
|
158 | - case 'clone': /* sur validation du formulaire */ |
|
159 | - case 'modify': |
|
160 | - $action = (('clone' === $op) ? 'clone' : 'edit'); |
|
161 | - xoops_cp_header(); |
|
162 | - //================================================ |
|
163 | - // require_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
164 | - // |
|
165 | - // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
166 | - // $dateBirthday = new \XoopsTcCalendar("datez1", true, false); |
|
167 | - // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
168 | - // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
169 | - // //$dateBirthday->rtl=false; |
|
170 | - // $dateBirthday->setAutoHide(false); |
|
171 | - // |
|
172 | - // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
173 | - // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
174 | - // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
175 | - // |
|
176 | - // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
177 | - // $dateBirthday->zindex = 150; //default 1 |
|
178 | - // $dateBirthday->setYearInterval(1995, date('Y')); |
|
179 | - // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
180 | - // //$dateBirthday->autoSubmit(true, "calendar"); |
|
181 | - // $dateBirthday->disabledDay("sat"); |
|
182 | - // $dateBirthday->disabledDay("sun"); |
|
183 | - // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
184 | - // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
185 | - // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
186 | - // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
187 | - // echo $dateBirthday->render(); |
|
188 | - // echo "</td></tr></table>"; |
|
189 | - //echo $dateBirthday->render(); |
|
190 | - //================================================ |
|
191 | - // @author Gregory Mage (Aka Mage) |
|
192 | - //*************************************************************************************** |
|
193 | - // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
194 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
195 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
196 | - //*************************************************************************************** |
|
197 | - |
|
198 | - $eventId = $_GET['event_id']; |
|
199 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
200 | - |
|
201 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
202 | - |
|
203 | - if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
|
204 | - $form->display(); |
|
205 | - } |
|
206 | 206 | |
207 | - echo '</fieldset><br>'; |
|
207 | + echo '</fieldset><br>'; |
|
208 | 208 | |
209 | - xoops_cp_footer(); |
|
209 | + xoops_cp_footer(); |
|
210 | 210 | |
211 | - break; |
|
211 | + break; |
|
212 | 212 | |
213 | - case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
213 | + case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
214 | 214 | |
215 | - //$newEventId = 1; |
|
216 | - $eventId = $_GET['event_id']; |
|
217 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
218 | - $event = $eventHandler->getEvent($eventId); |
|
219 | - $t = $event->getVars(); |
|
220 | - $data = []; |
|
221 | - // while (list($key, $val) = each($t)) { |
|
222 | - foreach ($t as $key => $val) { |
|
223 | - $data[$key] = $val['value']; |
|
224 | - } |
|
215 | + //$newEventId = 1; |
|
216 | + $eventId = $_GET['event_id']; |
|
217 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
218 | + $event = $eventHandler->getEvent($eventId); |
|
219 | + $t = $event->getVars(); |
|
220 | + $data = []; |
|
221 | + // while (list($key, $val) = each($t)) { |
|
222 | + foreach ($t as $key => $val) { |
|
223 | + $data[$key] = $val['value']; |
|
224 | + } |
|
225 | 225 | |
226 | - $data['event_id'] = 0; |
|
227 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
226 | + $data['event_id'] = 0; |
|
227 | + $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
228 | 228 | |
229 | - $newEvent = $eventHandler->create(); |
|
230 | - $newEvent->setVars($data); |
|
231 | - $t = $eventHandler->insert($newEvent, true); |
|
229 | + $newEvent = $eventHandler->create(); |
|
230 | + $newEvent->setVars($data); |
|
231 | + $t = $eventHandler->insert($newEvent, true); |
|
232 | 232 | |
233 | - $newEventId = $newEvent->getVar('event_id'); |
|
234 | - $ts = print_r($newEventId, true); |
|
233 | + $newEventId = $newEvent->getVar('event_id'); |
|
234 | + $ts = print_r($newEventId, true); |
|
235 | 235 | |
236 | - redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
237 | - break; |
|
236 | + redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
237 | + break; |
|
238 | 238 | |
239 | - case 'delete': |
|
239 | + case 'delete': |
|
240 | 240 | |
241 | - if (\Xmf\Request::hasVar('confirm', 'POST')) { |
|
242 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
243 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
241 | + if (\Xmf\Request::hasVar('confirm', 'POST')) { |
|
242 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
243 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
244 | + } |
|
245 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
246 | + // $eventHandler->deleteEvent($_POST['event_id']); |
|
247 | + deleteEvents($_POST['event_id']); |
|
248 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
249 | + } else { |
|
250 | + xoops_cp_header(); |
|
251 | + // @author Gregory Mage (Aka Mage) |
|
252 | + //*************************************************************************************** |
|
253 | + //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
254 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
255 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
256 | + //*************************************************************************************** |
|
257 | + |
|
258 | + $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1]; |
|
259 | + xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
260 | + |
|
261 | + xoops_cp_footer(); |
|
244 | 262 | } |
245 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
246 | - // $eventHandler->deleteEvent($_POST['event_id']); |
|
247 | - deleteEvents($_POST['event_id']); |
|
248 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
249 | - } else { |
|
263 | + |
|
264 | + break; |
|
265 | + |
|
266 | + case 'deleteSelection': |
|
267 | + |
|
250 | 268 | xoops_cp_header(); |
251 | 269 | // @author Gregory Mage (Aka Mage) |
252 | 270 | //*************************************************************************************** |
@@ -254,184 +272,166 @@ discard block |
||
254 | 272 | $adminObject = \Xmf\Module\Admin::getInstance(); |
255 | 273 | $adminObject->displayNavigation(basename(__FILE__)); |
256 | 274 | //*************************************************************************************** |
275 | + if (isset($_POST['deleteSelection'][0])) { |
|
276 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
277 | + $ids = array_keys($_POST['deleteAllEvents']); |
|
278 | + } else { |
|
279 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
280 | + $ids = array_keys($_POST['deleteEvents']); |
|
281 | + } |
|
257 | 282 | |
258 | - $hiddens = ['event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1]; |
|
259 | - xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
283 | + // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
284 | + // $ids = array_keys($_POST['deleteEvents']); |
|
285 | + $ids = implode(',', $ids); |
|
286 | + //echo $ids.'<br>'; |
|
287 | + $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1]; |
|
288 | + //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
289 | + xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
260 | 290 | |
261 | 291 | xoops_cp_footer(); |
262 | - } |
|
263 | 292 | |
264 | - break; |
|
265 | - |
|
266 | - case 'deleteSelection': |
|
267 | - |
|
268 | - xoops_cp_header(); |
|
269 | - // @author Gregory Mage (Aka Mage) |
|
270 | - //*************************************************************************************** |
|
271 | - //require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
272 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
273 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
274 | - //*************************************************************************************** |
|
275 | - if (isset($_POST['deleteSelection'][0])) { |
|
276 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
277 | - $ids = array_keys($_POST['deleteAllEvents']); |
|
278 | - } else { |
|
279 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
280 | - $ids = array_keys($_POST['deleteEvents']); |
|
281 | - } |
|
293 | + break; |
|
282 | 294 | |
283 | - // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
284 | - // $ids = array_keys($_POST['deleteEvents']); |
|
285 | - $ids = implode(',', $ids); |
|
286 | - //echo $ids.'<br>'; |
|
287 | - $hiddens = ['event_ids' => $ids, 'form_delete' => '', 'confirm' => 1]; |
|
288 | - //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
289 | - xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
290 | - |
|
291 | - xoops_cp_footer(); |
|
292 | - |
|
293 | - break; |
|
294 | - |
|
295 | - case 'deleteSelectionOK': |
|
296 | - //----------------------------------------- |
|
297 | - // $t = print_r($_GET,true); |
|
298 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
299 | - // |
|
300 | - // $t = print_r($_POST,true); |
|
301 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
302 | - // exit; |
|
303 | - //----------------------------------------- |
|
304 | - |
|
305 | - if (isset($_POST['deleteSelection'][0])) { |
|
306 | - } else { |
|
307 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
308 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
309 | - } |
|
295 | + case 'deleteSelectionOK': |
|
296 | + //----------------------------------------- |
|
297 | + // $t = print_r($_GET,true); |
|
298 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
299 | + // |
|
300 | + // $t = print_r($_POST,true); |
|
301 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
302 | + // exit; |
|
303 | + //----------------------------------------- |
|
310 | 304 | |
311 | - deleteEvents($_POST['event_ids']); |
|
305 | + if (isset($_POST['deleteSelection'][0])) { |
|
306 | + } else { |
|
307 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
308 | + redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
309 | + } |
|
312 | 310 | |
313 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
314 | - } |
|
311 | + deleteEvents($_POST['event_ids']); |
|
315 | 312 | |
316 | - break; |
|
313 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
314 | + } |
|
317 | 315 | |
318 | - case 'default': |
|
319 | - default: |
|
316 | + break; |
|
320 | 317 | |
321 | - //global $extcalConfig; |
|
322 | - $extcalConfig = Extcal\Config::getHandler(); |
|
318 | + case 'default': |
|
319 | + default: |
|
323 | 320 | |
324 | - $start = \Xmf\Request::getInt('start', 0, 'GET'); |
|
325 | - $nbEventsByPage = $helper->getConfig('nbEventsByPage'); |
|
321 | + //global $extcalConfig; |
|
322 | + $extcalConfig = Extcal\Config::getHandler(); |
|
326 | 323 | |
327 | - xoops_cp_header(); |
|
328 | - // @author Gregory Mage (Aka Mage) |
|
329 | - //*************************************************************************************** |
|
324 | + $start = \Xmf\Request::getInt('start', 0, 'GET'); |
|
325 | + $nbEventsByPage = $helper->getConfig('nbEventsByPage'); |
|
330 | 326 | |
331 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
332 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
333 | - //*************************************************************************************** |
|
327 | + xoops_cp_header(); |
|
328 | + // @author Gregory Mage (Aka Mage) |
|
329 | + //*************************************************************************************** |
|
334 | 330 | |
335 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
336 | - $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
|
337 | - $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
331 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
332 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
333 | + //*************************************************************************************** |
|
338 | 334 | |
339 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
340 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
341 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
342 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
|
335 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
336 | + $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
|
337 | + $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
343 | 338 | |
344 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
345 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
339 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
340 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
341 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
342 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
|
346 | 343 | |
347 | - echo '</fieldset><br>'; |
|
344 | + echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
345 | + echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
348 | 346 | |
349 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
347 | + echo '</fieldset><br>'; |
|
350 | 348 | |
351 | - echo '<form method="POST" action="event.php">'; |
|
352 | - echo '<input type="hidden" name="op" value="deleteSelection">'; |
|
349 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
353 | 350 | |
354 | - echo '<table class="outer" style="width:100%;">'; |
|
355 | - echo '<tr style="text-align:center;">'; |
|
356 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
357 | - echo '<th>#</th>'; |
|
358 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
362 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
363 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
364 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
351 | + echo '<form method="POST" action="event.php">'; |
|
352 | + echo '<input type="hidden" name="op" value="deleteSelection">'; |
|
365 | 353 | |
366 | - echo '</tr>'; |
|
354 | + echo '<table class="outer" style="width:100%;">'; |
|
355 | + echo '<tr style="text-align:center;">'; |
|
356 | + echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
357 | + echo '<th>#</th>'; |
|
358 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
359 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
360 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
361 | + echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
362 | + echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
363 | + echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
364 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
367 | 365 | |
368 | - if (count($events) > 0) { |
|
369 | - $i = 0; |
|
370 | - foreach ($events as $event) { |
|
371 | - $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
372 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
373 | - echo "<td width='10%' align='center'>"; |
|
374 | - echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
375 | - echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
|
376 | - echo '</td>'; |
|
377 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
378 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>'; |
|
379 | - |
|
380 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
381 | - |
|
382 | - // if ($event['event_isrecur']) { |
|
383 | - // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
384 | - // } else { |
|
385 | - // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
386 | - // } |
|
387 | - |
|
388 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
389 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
390 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
391 | - if (!isset($event['formated_reccur_rule'])) { |
|
392 | - $event['formated_reccur_rule'] = ''; |
|
366 | + echo '</tr>'; |
|
367 | + |
|
368 | + if (count($events) > 0) { |
|
369 | + $i = 0; |
|
370 | + foreach ($events as $event) { |
|
371 | + $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
372 | + echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
373 | + echo "<td width='10%' align='center'>"; |
|
374 | + echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
375 | + echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
|
376 | + echo '</td>'; |
|
377 | + echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
378 | + echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>'; |
|
379 | + |
|
380 | + echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
381 | + |
|
382 | + // if ($event['event_isrecur']) { |
|
383 | + // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
384 | + // } else { |
|
385 | + // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
386 | + // } |
|
387 | + |
|
388 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
389 | + echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
390 | + echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
391 | + if (!isset($event['formated_reccur_rule'])) { |
|
392 | + $event['formated_reccur_rule'] = ''; |
|
393 | + } |
|
394 | + echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
395 | + |
|
396 | + echo '<td style="width:10%; text-align:center;">'; |
|
397 | + echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
398 | + echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
399 | + echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
400 | + echo '</td>'; |
|
401 | + |
|
402 | + echo '</tr>'; |
|
393 | 403 | } |
394 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
404 | + //--------------------------------------------------------- |
|
405 | + $pageNav = new \XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
395 | 406 | |
396 | - echo '<td style="width:10%; text-align:center;">'; |
|
397 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
398 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
399 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
407 | + echo '<tr><td colspan="2" style="text-align: right;">'; |
|
408 | + echo $pageNav->renderNav(2); |
|
400 | 409 | echo '</td>'; |
401 | 410 | |
402 | - echo '</tr>'; |
|
403 | - } |
|
404 | - //--------------------------------------------------------- |
|
405 | - $pageNav = new \XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
411 | + echo '<td colspan="2" style="text-align: right;">'; |
|
406 | 412 | |
407 | - echo '<tr><td colspan="2" style="text-align: right;">'; |
|
408 | - echo $pageNav->renderNav(2); |
|
409 | - echo '</td>'; |
|
413 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
414 | + echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
410 | 415 | |
411 | - echo '<td colspan="2" style="text-align: right;">'; |
|
412 | - |
|
413 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
414 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
415 | - |
|
416 | - echo '</td>'; |
|
417 | - echo '</tr>'; |
|
418 | - } else { |
|
419 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
420 | - } |
|
421 | - echo '</table>'; |
|
422 | - echo '</form>'; |
|
416 | + echo '</td>'; |
|
417 | + echo '</tr>'; |
|
418 | + } else { |
|
419 | + echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
420 | + } |
|
421 | + echo '</table>'; |
|
422 | + echo '</form>'; |
|
423 | 423 | |
424 | - echo '</fieldset>'; |
|
425 | - echo '</fieldset><br><br>'; |
|
426 | - //Fin de la liste des evennement ------------------------------------- |
|
427 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
424 | + echo '</fieldset>'; |
|
425 | + echo '</fieldset><br><br>'; |
|
426 | + //Fin de la liste des evennement ------------------------------------- |
|
427 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
428 | 428 | |
429 | - $form = $eventHandler->getEventForm('admin'); |
|
430 | - $form->display(); |
|
429 | + $form = $eventHandler->getEventForm('admin'); |
|
430 | + $form->display(); |
|
431 | 431 | |
432 | - echo '</fieldset>'; |
|
432 | + echo '</fieldset>'; |
|
433 | 433 | |
434 | - require_once __DIR__ . '/admin_footer.php'; |
|
434 | + require_once __DIR__ . '/admin_footer.php'; |
|
435 | 435 | |
436 | - break; |
|
436 | + break; |
|
437 | 437 | } |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
23 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
24 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
22 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
25 | 25 | // require_once dirname(__DIR__) . '/class/form/extcalform.php'; |
26 | -require_once __DIR__ . '/admin_header.php'; |
|
26 | +require_once __DIR__.'/admin_header.php'; |
|
27 | 27 | // require_once dirname(__DIR__) . '/class/Utility.php'; |
28 | 28 | |
29 | 29 | /** @var Extcal\Helper $helper */ |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $gepeto = array_merge($_GET, $_POST); |
33 | 33 | //while (list($k, $v) = each($gepeto)) { |
34 | 34 | foreach ($gepeto as $k => $v) { |
35 | - ${$k} =$v; |
|
35 | + ${$k} = $v; |
|
36 | 36 | } |
37 | 37 | if (!isset($op)) { |
38 | 38 | $op = ''; |
@@ -55,15 +55,15 @@ discard block |
||
55 | 55 | // while (list($k, $t) = each($rst)) { |
56 | 56 | foreach ($rst as $k => $t) { |
57 | 57 | if ('' != $t['event_picture1']) { |
58 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
58 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
59 | 59 | unlink($f); |
60 | - echo $f . '<br>'; |
|
60 | + echo $f.'<br>'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if ('' != $t['event_picture2']) { |
64 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
64 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
65 | 65 | unlink($f); |
66 | - echo $f . '<br>'; |
|
66 | + echo $f.'<br>'; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $eventId = $_GET['event_id']; |
199 | 199 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
200 | 200 | |
201 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
201 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
202 | 202 | |
203 | 203 | if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
204 | 204 | $form->display(); |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | $data[$key] = $val['value']; |
224 | 224 | } |
225 | 225 | |
226 | - $data['event_id'] = 0; |
|
227 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
226 | + $data['event_id'] = 0; |
|
227 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
228 | 228 | |
229 | 229 | $newEvent = $eventHandler->create(); |
230 | 230 | $newEvent->setVars($data); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | |
241 | 241 | if (\Xmf\Request::hasVar('confirm', 'POST')) { |
242 | 242 | if (!$GLOBALS['xoopsSecurity']->check()) { |
243 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
243 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
244 | 244 | } |
245 | 245 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
246 | 246 | // $eventHandler->deleteEvent($_POST['event_id']); |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | if (isset($_POST['deleteSelection'][0])) { |
306 | 306 | } else { |
307 | 307 | if (!$GLOBALS['xoopsSecurity']->check()) { |
308 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
308 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | deleteEvents($_POST['event_ids']); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | default: |
320 | 320 | |
321 | 321 | //global $extcalConfig; |
322 | - $extcalConfig = Extcal\Config::getHandler(); |
|
322 | + $extcalConfig = Extcal\Config::getHandler(); |
|
323 | 323 | |
324 | 324 | $start = \Xmf\Request::getInt('start', 0, 'GET'); |
325 | 325 | $nbEventsByPage = $helper->getConfig('nbEventsByPage'); |
@@ -336,32 +336,32 @@ discard block |
||
336 | 336 | $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
337 | 337 | $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
338 | 338 | |
339 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
340 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
339 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
340 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
341 | 341 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
342 | 342 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
343 | 343 | |
344 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
345 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
344 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
345 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
346 | 346 | |
347 | 347 | echo '</fieldset><br>'; |
348 | 348 | |
349 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
349 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
350 | 350 | |
351 | 351 | echo '<form method="POST" action="event.php">'; |
352 | 352 | echo '<input type="hidden" name="op" value="deleteSelection">'; |
353 | 353 | |
354 | 354 | echo '<table class="outer" style="width:100%;">'; |
355 | 355 | echo '<tr style="text-align:center;">'; |
356 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
356 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
357 | 357 | echo '<th>#</th>'; |
358 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
362 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
363 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
364 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
358 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
359 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
360 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
361 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
362 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
363 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
364 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
365 | 365 | |
366 | 366 | echo '</tr>'; |
367 | 367 | |
@@ -369,15 +369,15 @@ discard block |
||
369 | 369 | $i = 0; |
370 | 370 | foreach ($events as $event) { |
371 | 371 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
372 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
372 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
373 | 373 | echo "<td width='10%' align='center'>"; |
374 | 374 | echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
375 | 375 | echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
376 | 376 | echo '</td>'; |
377 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
378 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['cat']['cat_id'] . '&form_modify' . '>' . $event['cat']['cat_name'] . '</a>' . '</td>'; |
|
377 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
378 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>'; |
|
379 | 379 | |
380 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
380 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
381 | 381 | |
382 | 382 | // if ($event['event_isrecur']) { |
383 | 383 | // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
@@ -385,18 +385,18 @@ discard block |
||
385 | 385 | // echo '<td>' . $event['formated_event_start'] . '</td>'; |
386 | 386 | // } |
387 | 387 | |
388 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
389 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
390 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
388 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
389 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
390 | + echo '<td align="center">'.((1 == $event['event_isrecur']) ? _YES : _NO).'</td>'; |
|
391 | 391 | if (!isset($event['formated_reccur_rule'])) { |
392 | 392 | $event['formated_reccur_rule'] = ''; |
393 | 393 | } |
394 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
394 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
395 | 395 | |
396 | 396 | echo '<td style="width:10%; text-align:center;">'; |
397 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
398 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
399 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
397 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a> "; |
|
398 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a> "; |
|
399 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>"; |
|
400 | 400 | echo '</td>'; |
401 | 401 | |
402 | 402 | echo '</tr>'; |
@@ -410,13 +410,13 @@ discard block |
||
410 | 410 | |
411 | 411 | echo '<td colspan="2" style="text-align: right;">'; |
412 | 412 | |
413 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
414 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
413 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
414 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
415 | 415 | |
416 | 416 | echo '</td>'; |
417 | 417 | echo '</tr>'; |
418 | 418 | } else { |
419 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
419 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
420 | 420 | } |
421 | 421 | echo '</table>'; |
422 | 422 | echo '</form>'; |
@@ -424,14 +424,14 @@ discard block |
||
424 | 424 | echo '</fieldset>'; |
425 | 425 | echo '</fieldset><br><br>'; |
426 | 426 | //Fin de la liste des evennement ------------------------------------- |
427 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
427 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
428 | 428 | |
429 | 429 | $form = $eventHandler->getEventForm('admin'); |
430 | 430 | $form->display(); |
431 | 431 | |
432 | 432 | echo '</fieldset>'; |
433 | 433 | |
434 | - require_once __DIR__ . '/admin_footer.php'; |
|
434 | + require_once __DIR__.'/admin_footer.php'; |
|
435 | 435 | |
436 | 436 | break; |
437 | 437 | } |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
23 | -require_once __DIR__ . '/include/constantes.php'; |
|
22 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
23 | +require_once __DIR__.'/include/constantes.php'; |
|
24 | 24 | |
25 | -require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php'; |
|
25 | +require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/calendar.php'; |
|
26 | 26 | |
27 | 27 | /** @var Extcal\Helper $helper */ |
28 | 28 | $helper = Extcal\Helper::getInstance(); |
@@ -43,136 +43,136 @@ discard block |
||
43 | 43 | // Adding formated date for start and end event |
44 | 44 | $eventHandler->formatEventDate($event, $helper->getConfig('event_date_event')); |
45 | 45 | |
46 | -echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; |
|
47 | -echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; |
|
48 | -echo '<head>' . "\n"; |
|
49 | -echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n"; |
|
50 | -echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n"; |
|
51 | -echo '</head>' . "\n"; |
|
52 | -echo '<body onload="window.print()">' . "\n"; |
|
53 | -echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n"; |
|
54 | -echo '<tr>' . "\n"; |
|
55 | -echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n"; |
|
56 | -echo $event['event_title'] . "\n"; |
|
57 | -echo '</td>' . "\n"; |
|
58 | -echo '</tr>' . "\n"; |
|
59 | -echo '<tr>' . "\n"; |
|
60 | -echo '<td style="width:50%; border:1px solid black;">' . "\n"; |
|
61 | -echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n"; |
|
62 | -echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n"; |
|
63 | -echo '</td>' . "\n"; |
|
64 | -echo '<td style="border:1px solid black;">' . "\n"; |
|
46 | +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n"; |
|
47 | +echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n"; |
|
48 | +echo '<head>'."\n"; |
|
49 | +echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'">'."\n"; |
|
50 | +echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n"; |
|
51 | +echo '</head>'."\n"; |
|
52 | +echo '<body onload="window.print()">'."\n"; |
|
53 | +echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n"; |
|
54 | +echo '<tr>'."\n"; |
|
55 | +echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n"; |
|
56 | +echo $event['event_title']."\n"; |
|
57 | +echo '</td>'."\n"; |
|
58 | +echo '</tr>'."\n"; |
|
59 | +echo '<tr>'."\n"; |
|
60 | +echo '<td style="width:50%; border:1px solid black;">'."\n"; |
|
61 | +echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n"; |
|
62 | +echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n"; |
|
63 | +echo '</td>'."\n"; |
|
64 | +echo '<td style="border:1px solid black;">'."\n"; |
|
65 | 65 | if (!$event['event_isrecur']) { |
66 | - echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n"; |
|
67 | - echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n"; |
|
66 | + echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n"; |
|
67 | + echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n"; |
|
68 | 68 | } else { |
69 | - echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n"; |
|
69 | + echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n"; |
|
70 | 70 | } |
71 | -echo '</td>' . "\n"; |
|
72 | -echo '</tr>' . "\n"; |
|
71 | +echo '</td>'."\n"; |
|
72 | +echo '</tr>'."\n"; |
|
73 | 73 | |
74 | -echo '<tr>' . "\n"; |
|
74 | +echo '<tr>'."\n"; |
|
75 | 75 | if ('' != $event['event_desc']) { |
76 | - echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n"; |
|
76 | + echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n"; |
|
77 | 77 | } |
78 | 78 | if ('' != $event['event_price']) { |
79 | - echo '<td style="border:1px solid black;">' . _MD_EXTCAL_LOCATION_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n"; |
|
79 | + echo '<td style="border:1px solid black;">'._MD_EXTCAL_LOCATION_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n"; |
|
80 | 80 | } |
81 | -echo '</tr>' . "\n"; |
|
81 | +echo '</tr>'."\n"; |
|
82 | 82 | |
83 | 83 | //show contact info |
84 | 84 | if ('' != $event['event_contact']) { |
85 | - echo '<tr>' . "\n"; |
|
86 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
87 | - echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n"; |
|
88 | - echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n"; |
|
89 | - echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n"; |
|
90 | - echo $event['event_address'] . '</span>' . "\n"; |
|
91 | - echo '</td>' . "\n"; |
|
92 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
93 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n"; |
|
94 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n"; |
|
95 | - echo '</td>' . "\n"; |
|
96 | - echo '</tr>' . "\n"; |
|
85 | + echo '<tr>'."\n"; |
|
86 | + echo '<td style="border:1px solid black;">'."\n"; |
|
87 | + echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n"; |
|
88 | + echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n"; |
|
89 | + echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n"; |
|
90 | + echo $event['event_address'].'</span>'."\n"; |
|
91 | + echo '</td>'."\n"; |
|
92 | + echo '<td style="border:1px solid black;">'."\n"; |
|
93 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n"; |
|
94 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n"; |
|
95 | + echo '</td>'."\n"; |
|
96 | + echo '</tr>'."\n"; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | //show location |
100 | 100 | if ($event['event_location'] = 0) { |
101 | - echo '<tr>' . "\n"; |
|
101 | + echo '<tr>'."\n"; |
|
102 | 102 | |
103 | 103 | // echo($location['nom']); |
104 | 104 | // var_dump($location); |
105 | 105 | // var_dump($event); |
106 | 106 | |
107 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
108 | - echo '<b>' . _MD_EXTCAL_LOCATION . '</b>' . "\n"; |
|
107 | + echo '<td style="border:1px solid black;">'."\n"; |
|
108 | + echo '<b>'._MD_EXTCAL_LOCATION.'</b>'."\n"; |
|
109 | 109 | if ('' != $location['categorie']) { |
110 | - echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n"; |
|
110 | + echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n"; |
|
111 | 111 | } |
112 | 112 | if ('' != $location['logo']) { |
113 | - echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/location/' . $location['logo'] . ' height="75px">' . '' . "\n"; |
|
113 | + echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/location/'.$location['logo'].' height="75px">'.''."\n"; |
|
114 | 114 | } |
115 | 115 | |
116 | - echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n"; |
|
117 | - echo $location['description'] . '<br>' . "\n"; |
|
118 | - echo $location['adresse'] . '</span> <br>' . "\n"; |
|
116 | + echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n"; |
|
117 | + echo $location['description'].'<br>'."\n"; |
|
118 | + echo $location['adresse'].'</span> <br>'."\n"; |
|
119 | 119 | if ('' != $location['adresse2']) { |
120 | - echo $location['adresse2'] . '</span> <br>' . "\n"; |
|
120 | + echo $location['adresse2'].'</span> <br>'."\n"; |
|
121 | 121 | } |
122 | - echo $location['ville'] . "\n"; |
|
123 | - echo $location['cp'] . '<br>' . "\n"; |
|
122 | + echo $location['ville']."\n"; |
|
123 | + echo $location['cp'].'<br>'."\n"; |
|
124 | 124 | |
125 | 125 | if ('' != $location['horaires']) { |
126 | - echo $location['horaires'] . '</span> <br>' . "\n"; |
|
126 | + echo $location['horaires'].'</span> <br>'."\n"; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | if ('' != $location['divers']) { |
130 | - echo $location['divers'] . '</span> <br>' . "\n"; |
|
130 | + echo $location['divers'].'</span> <br>'."\n"; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | if ('' != $location['tarifs']) { |
134 | - echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n"; |
|
134 | + echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n"; |
|
135 | 135 | } |
136 | 136 | |
137 | - echo '</td>' . "\n"; |
|
138 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
137 | + echo '</td>'."\n"; |
|
138 | + echo '<td style="border:1px solid black;">'."\n"; |
|
139 | 139 | |
140 | 140 | if ('' != $location['tel_fixe']) { |
141 | - echo '<b>' . _MD_EXTCAL_LOCATION_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n"; |
|
141 | + echo '<b>'._MD_EXTCAL_LOCATION_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n"; |
|
142 | 142 | } |
143 | 143 | if ('' != $location['tel_portable']) { |
144 | - echo '<b>' . _MD_EXTCAL_LOCATION_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n"; |
|
144 | + echo '<b>'._MD_EXTCAL_LOCATION_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n"; |
|
145 | 145 | } |
146 | 146 | |
147 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n"; |
|
148 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n"; |
|
149 | - echo '<b>' . _MD_EXTCAL_LOCATION_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_LOCATION_MAP2 . '</a>' . "\n"; |
|
147 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n"; |
|
148 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n"; |
|
149 | + echo '<b>'._MD_EXTCAL_LOCATION_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_LOCATION_MAP2.'</a>'."\n"; |
|
150 | 150 | |
151 | - echo '</td>' . "\n"; |
|
152 | - echo '</tr>' . "\n"; |
|
151 | + echo '</td>'."\n"; |
|
152 | + echo '</tr>'."\n"; |
|
153 | 153 | } |
154 | 154 | //show images |
155 | 155 | |
156 | 156 | if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) { |
157 | - echo '<tr>' . "\n"; |
|
157 | + echo '<tr>'."\n"; |
|
158 | 158 | if ('' != $event['event_picture1']) { |
159 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
160 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n"; |
|
161 | - echo '</td>' . "\n"; |
|
159 | + echo '<td style="border:1px solid black;">'."\n"; |
|
160 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px">'.''."\n"; |
|
161 | + echo '</td>'."\n"; |
|
162 | 162 | } |
163 | 163 | if ('' != $event['event_picture2']) { |
164 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
165 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n"; |
|
166 | - echo '</td>' . "\n"; |
|
164 | + echo '<td style="border:1px solid black;">'."\n"; |
|
165 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px">'.''."\n"; |
|
166 | + echo '</td>'."\n"; |
|
167 | 167 | } |
168 | - echo '</tr>' . "\n"; |
|
168 | + echo '</tr>'."\n"; |
|
169 | 169 | } |
170 | 170 | //-------------------- |
171 | 171 | |
172 | -echo '</table><br>' . "\n"; |
|
172 | +echo '</table><br>'."\n"; |
|
173 | 173 | echo '<div style="text-align:center; width:640px;">'; |
174 | -echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>'; |
|
175 | -echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>'; |
|
174 | +echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>'; |
|
175 | +echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>'; |
|
176 | 176 | echo '</div>'; |
177 | -echo '</body>' . "\n"; |
|
178 | -echo '</html>' . "\n"; |
|
177 | +echo '</body>'."\n"; |
|
178 | +echo '</html>'."\n"; |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
5 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | 7 | |
8 | 8 | $fileId = \Xmf\Request::getInt('file', 0, 'GET'); |
9 | 9 | |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $file = $fileHandler->getFile($fileId); |
14 | 14 | |
15 | -header('Content-Type: ' . $file->getVar('file_mimetype') . ''); |
|
16 | -header('Content-Disposition: attachment; filename="' . $file->getVar('file_nicename') . '"'); |
|
15 | +header('Content-Type: '.$file->getVar('file_mimetype').''); |
|
16 | +header('Content-Disposition: attachment; filename="'.$file->getVar('file_nicename').'"'); |
|
17 | 17 | |
18 | -readfile(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name')); |
|
18 | +readfile(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name')); |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
5 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
6 | 6 | |
7 | 7 | //modif JJD |
8 | -require_once __DIR__ . '/include/constantes.php'; |
|
8 | +require_once __DIR__.'/include/constantes.php'; |
|
9 | 9 | |
10 | 10 | /** @var Extcal\Helper $helper */ |
11 | 11 | $helper = Extcal\Helper::getInstance(); |