@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | use Xmf\Request; |
21 | 21 | use XoopsModules\Extcal; |
22 | 22 | |
23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
24 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
25 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
24 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
25 | +require_once __DIR__.'/admin_header.php'; |
|
26 | 26 | //require_once __DIR__ . '/../class/Utility.php'; |
27 | -require_once __DIR__ . '/../include/constantes.php'; |
|
27 | +require_once __DIR__.'/../include/constantes.php'; |
|
28 | 28 | |
29 | 29 | //$gepeto = array_merge($_GET, $_POST); |
30 | 30 | //while (list($key, $value) = each($gepeto)) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // $op = ''; |
37 | 37 | //} |
38 | 38 | $op = 'list'; |
39 | -if(Request::hasVar('op', 'GET' )) { |
|
39 | +if (Request::hasVar('op', 'GET')) { |
|
40 | 40 | $op = Request::getString('op', ''); |
41 | 41 | $cat_id = Request::getInt('cat_id', 0); |
42 | 42 | } |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | //$cat = $catHandler->getCat($cat_id, true); |
92 | 92 | |
93 | 93 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
94 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255), true); |
|
95 | - $form->addElement( new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', ''), false); |
|
96 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
|
97 | - $form->addElement( new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
|
94 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255), true); |
|
95 | + $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', ''), false); |
|
96 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
|
97 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
|
98 | 98 | |
99 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
99 | + $file_path = __DIR__.'/../assets/css/images'; |
|
100 | 100 | $tf = \XoopsLists::getImgListAsArray($file_path); |
101 | 101 | array_unshift($tf, _MD_EXTCAL_NONE); |
102 | 102 | //$xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | $xfIcones->addOptionArray($tf); |
105 | 105 | $form->addElement($xfIcones, false); |
106 | 106 | |
107 | - $form->addElement( new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
107 | + $form->addElement(new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
108 | 108 | |
109 | 109 | $form->display(); |
110 | 110 | |
111 | - require_once __DIR__ . '/admin_footer.php'; |
|
111 | + require_once __DIR__.'/admin_footer.php'; |
|
112 | 112 | break; |
113 | 113 | |
114 | 114 | case 'edit': |
@@ -121,23 +121,23 @@ discard block |
||
121 | 121 | // $cat = $catHandler->getCat($cat_id, true); |
122 | 122 | } |
123 | 123 | |
124 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
124 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
125 | 125 | |
126 | 126 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
127 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
|
128 | - $form->addElement( new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
|
129 | - $form->addElement( new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
|
130 | - $form->addElement( new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
127 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
|
128 | + $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
|
129 | + $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
|
130 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
131 | 131 | |
132 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
132 | + $file_path = __DIR__.'/../assets/css/images'; |
|
133 | 133 | $tf = \XoopsLists::getImgListAsArray($file_path); |
134 | 134 | array_unshift($tf, _MD_EXTCAL_NONE); |
135 | 135 | $xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
136 | 136 | $xfIcones->addOptionArray($tf); |
137 | 137 | $form->addElement($xfIcones, false); |
138 | 138 | |
139 | - $form->addElement( new \XoopsFormHidden('cat_id', $cat->getVar('cat_id')), false); |
|
140 | - $form->addElement( new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
139 | + $form->addElement(new \XoopsFormHidden('cat_id', $cat->getVar('cat_id')), false); |
|
140 | + $form->addElement(new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit'), false); |
|
141 | 141 | $form->display(); |
142 | 142 | |
143 | 143 | echo '</fieldset>'; |
@@ -285,6 +285,6 @@ discard block |
||
285 | 285 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
286 | 286 | |
287 | 287 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
288 | - require_once __DIR__ . '/admin_footer.php'; |
|
288 | + require_once __DIR__.'/admin_footer.php'; |
|
289 | 289 | break; |
290 | 290 | } |
@@ -20,19 +20,19 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | 22 | // Include xoops admin header |
23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
24 | 24 | //require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php'; |
25 | -require_once __DIR__ . '/../../../kernel/module.php'; |
|
26 | -require_once __DIR__ . '/../../../class/xoopsformloader.php'; |
|
27 | -require_once __DIR__ . '/../../../class/tree.php'; |
|
28 | -require_once __DIR__ . '/../../../class/xoopslists.php'; |
|
29 | -require_once __DIR__ . '/../../../class/pagenav.php'; |
|
30 | -require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php'; |
|
31 | -require_once __DIR__ . '/../../../class/uploader.php'; |
|
25 | +require_once __DIR__.'/../../../kernel/module.php'; |
|
26 | +require_once __DIR__.'/../../../class/xoopsformloader.php'; |
|
27 | +require_once __DIR__.'/../../../class/tree.php'; |
|
28 | +require_once __DIR__.'/../../../class/xoopslists.php'; |
|
29 | +require_once __DIR__.'/../../../class/pagenav.php'; |
|
30 | +require_once __DIR__.'/../../../class/xoopsform/grouppermform.php'; |
|
31 | +require_once __DIR__.'/../../../class/uploader.php'; |
|
32 | 32 | //require_once __DIR__ . '/../class/etablissement.php'; |
33 | -require_once __DIR__ . '/../include/constantes.php'; |
|
33 | +require_once __DIR__.'/../include/constantes.php'; |
|
34 | 34 | |
35 | -require_once __DIR__ . '/admin_header.php'; |
|
35 | +require_once __DIR__.'/admin_header.php'; |
|
36 | 36 | |
37 | 37 | //include_once("functions.php"); |
38 | 38 | //include_once("../include/functions.php"); |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | if ($xoopsUser) { |
41 | 41 | $xoopsModule = \XoopsModule::getByDirname('extcal'); |
42 | 42 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
43 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
43 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
44 | 44 | } |
45 | 45 | } else { |
46 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
46 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | // Include language file |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $adminObject->displayNavigation(basename(__FILE__)); |
81 | 81 | //*************************************************************************************** |
82 | 82 | |
83 | - $criteria = new \CriteriaCompo(); |
|
83 | + $criteria = new \CriteriaCompo(); |
|
84 | 84 | if (isset($_REQUEST['limit'])) { |
85 | 85 | $criteria->setLimit($_REQUEST['limit']); |
86 | 86 | $limit = $_REQUEST['limit']; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $etablissement_arr = $etablissementHandler->getObjects($criteria); |
101 | 101 | $numrows = $etablissementHandler->getCount($criteria); |
102 | 102 | if ($numrows > $limit) { |
103 | - $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); |
|
103 | + $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit); |
|
104 | 104 | $pagenav = $pagenav->renderNav(4); |
105 | 105 | } else { |
106 | 106 | $pagenav = ''; |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | if ($numrows > 0) { |
110 | 110 | echo '<table width="100%" cellspacing="1" class="outer">'; |
111 | 111 | echo '<tr>'; |
112 | - echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>'; |
|
113 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>'; |
|
114 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>'; |
|
115 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>'; |
|
116 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>'; |
|
112 | + echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>'; |
|
113 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>'; |
|
114 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>'; |
|
115 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>'; |
|
116 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>'; |
|
117 | 117 | echo '</tr>'; |
118 | 118 | $class = 'odd'; |
119 | 119 | foreach (array_keys($etablissement_arr) as $i) { |
@@ -123,21 +123,21 @@ discard block |
||
123 | 123 | $etablissement_adresse = $etablissement_arr[$i]->getVar('adresse'); |
124 | 124 | $etablissement_city = $etablissement_arr[$i]->getVar('ville'); |
125 | 125 | $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe'); |
126 | - echo '<tr class="' . $class . '">'; |
|
127 | - echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>'; |
|
126 | + echo '<tr class="'.$class.'">'; |
|
127 | + echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>'; |
|
128 | 128 | |
129 | - echo '<td align="center"><b>' . $etablissement_adresse . '</td>'; |
|
130 | - echo '<td align="center"><b>' . $etablissement_city . '</td>'; |
|
131 | - echo '<td align="center"><b>' . $etablissement_telephone . '</td>'; |
|
129 | + echo '<td align="center"><b>'.$etablissement_adresse.'</td>'; |
|
130 | + echo '<td align="center"><b>'.$etablissement_city.'</td>'; |
|
131 | + echo '<td align="center"><b>'.$etablissement_telephone.'</td>'; |
|
132 | 132 | echo '<td align="center" width="15%">'; |
133 | - echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> '; |
|
134 | - echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> '; |
|
133 | + echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> '; |
|
134 | + echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> '; |
|
135 | 135 | echo '</td>'; |
136 | 136 | } |
137 | 137 | echo '</table><br>'; |
138 | - echo '<br><div align=right>' . $pagenav . '</div><br>'; |
|
138 | + echo '<br><div align=right>'.$pagenav.'</div><br>'; |
|
139 | 139 | } else { |
140 | - echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>'; |
|
140 | + echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>'; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | // Affichage du formulaire |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | 'ok' => 1, |
161 | 161 | 'etablissement_id' => $_REQUEST['etablissement_id'], |
162 | 162 | 'op' => 'delete_etablissement', |
163 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>'); |
|
163 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>'); |
|
164 | 164 | } |
165 | 165 | break; |
166 | 166 | |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | $obj->setVar('map', $_REQUEST['map']); |
203 | 203 | |
204 | 204 | //Logo |
205 | - $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/'; |
|
206 | - $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/'; |
|
205 | + $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'; |
|
206 | + $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/'; |
|
207 | 207 | |
208 | 208 | $delimg = @$_REQUEST['delimg']; |
209 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
209 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
210 | 210 | if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) { |
211 | 211 | $upload = new \XoopsMediaUploader($uploaddir_etablissement, [ |
212 | 212 | 'image/gif', |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | } else { |
231 | 231 | $logo = ''; |
232 | - $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file']; |
|
232 | + $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file']; |
|
233 | 233 | if (is_file($url_etablissement)) { |
234 | 234 | chmod($url_etablissement, 0777); |
235 | 235 | unlink($url_etablissement); |
@@ -249,4 +249,4 @@ discard block |
||
249 | 249 | break; |
250 | 250 | } |
251 | 251 | |
252 | -require_once __DIR__ . '/admin_footer.php'; |
|
252 | +require_once __DIR__.'/admin_footer.php'; |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
23 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
24 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
23 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
25 | 25 | //require_once __DIR__ . '/../class/form/extcalform.php'; |
26 | -require_once __DIR__ . '/admin_header.php'; |
|
26 | +require_once __DIR__.'/admin_header.php'; |
|
27 | 27 | //require_once __DIR__ . '/../class/Utility.php'; |
28 | 28 | |
29 | 29 | $gepeto = array_merge($_GET, $_POST); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | /** @var EventHandler $eventHandler */ |
46 | 46 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
47 | - $criteria = new \Criteria('event_id', "($ids)", 'IN'); |
|
47 | + $criteria = new \Criteria('event_id', "($ids)", 'IN'); |
|
48 | 48 | |
49 | 49 | //Supression des images |
50 | 50 | $rst = $eventHandler->getAllEvents($criteria); |
@@ -52,15 +52,15 @@ discard block |
||
52 | 52 | // while (list($k, $t) = each($rst)) { |
53 | 53 | foreach ($rst as $k => $t) { |
54 | 54 | if ('' != $t['event_picture1']) { |
55 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
55 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
56 | 56 | unlink($f); |
57 | - echo $f . '<br>'; |
|
57 | + echo $f.'<br>'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if ('' != $t['event_picture2']) { |
61 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
61 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
62 | 62 | unlink($f); |
63 | - echo $f . '<br>'; |
|
63 | + echo $f.'<br>'; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
123 | 123 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
124 | 124 | } else { |
125 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
125 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
126 | 126 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
127 | 127 | } |
128 | 128 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $notificationHandler = xoops_getHandler('notification'); |
132 | 132 | /** @var Extcal\CategoryHandler $catHandler */ |
133 | 133 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
134 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
134 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
135 | 135 | |
136 | 136 | $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
137 | 137 | $data['event_submitdate'] = time(); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $eventId = $_GET['event_id']; |
195 | 195 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
196 | 196 | |
197 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
197 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
198 | 198 | |
199 | 199 | if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
200 | 200 | $form->display(); |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | $data[$key] = $val['value']; |
220 | 220 | } |
221 | 221 | |
222 | - $data['event_id'] = 0; |
|
223 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
222 | + $data['event_id'] = 0; |
|
223 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
224 | 224 | |
225 | 225 | $newEvent = $eventHandler->create(); |
226 | 226 | $newEvent->setVars($data); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | if (isset($_POST['confirm'])) { |
238 | 238 | if (!$GLOBALS['xoopsSecurity']->check()) { |
239 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
239 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
240 | 240 | } |
241 | 241 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
242 | 242 | // $eventHandler->deleteEvent($_POST['event_id']); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | if (isset($_POST['deleteSelection'][0])) { |
302 | 302 | } else { |
303 | 303 | if (!$GLOBALS['xoopsSecurity']->check()) { |
304 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
304 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | deleteEvents($_POST['event_ids']); |
@@ -333,32 +333,32 @@ discard block |
||
333 | 333 | $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
334 | 334 | $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
335 | 335 | |
336 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
337 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
336 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
337 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
338 | 338 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
339 | 339 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
340 | 340 | |
341 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
342 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
341 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
342 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
343 | 343 | |
344 | 344 | echo '</fieldset><br>'; |
345 | 345 | |
346 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
346 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
347 | 347 | |
348 | 348 | echo '<form method="POST" action="event.php">'; |
349 | 349 | echo '<input type="hidden" name="op" value="deleteSelection">'; |
350 | 350 | |
351 | 351 | echo '<table class="outer" style="width:100%;">'; |
352 | 352 | echo '<tr style="text-align:center;">'; |
353 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
353 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
354 | 354 | echo '<th>#</th>'; |
355 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
356 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
357 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
358 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
359 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
360 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
361 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
355 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
356 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
357 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
358 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
359 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
360 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
361 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
362 | 362 | |
363 | 363 | echo '</tr>'; |
364 | 364 | |
@@ -366,15 +366,15 @@ discard block |
||
366 | 366 | $i = 0; |
367 | 367 | foreach ($events as $event) { |
368 | 368 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
369 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
369 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
370 | 370 | echo "<td width='10%' align='center'>"; |
371 | 371 | echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
372 | 372 | echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
373 | 373 | echo '</td>'; |
374 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
375 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
374 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
375 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['Category']['cat_id'].'&form_modify'.'>'.$event['Category']['cat_name'].'</a>'.'</td>'; |
|
376 | 376 | |
377 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
377 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
378 | 378 | |
379 | 379 | // if ($event['event_isrecur']) { |
380 | 380 | // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
@@ -382,18 +382,18 @@ discard block |
||
382 | 382 | // echo '<td>' . $event['formated_event_start'] . '</td>'; |
383 | 383 | // } |
384 | 384 | |
385 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
386 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
387 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
385 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
386 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
387 | + echo '<td align="center">'.((1 == $event['event_isrecur']) ? _YES : _NO).'</td>'; |
|
388 | 388 | if (!isset($event['formated_reccur_rule'])) { |
389 | 389 | $event['formated_reccur_rule'] = ''; |
390 | 390 | } |
391 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
391 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
392 | 392 | |
393 | 393 | echo '<td style="width:10%; text-align:center;">'; |
394 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
395 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
396 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
394 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a> "; |
|
395 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a> "; |
|
396 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>"; |
|
397 | 397 | echo '</td>'; |
398 | 398 | |
399 | 399 | echo '</tr>'; |
@@ -407,13 +407,13 @@ discard block |
||
407 | 407 | |
408 | 408 | echo '<td colspan="2" style="text-align: right;">'; |
409 | 409 | |
410 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
411 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
410 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
411 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
412 | 412 | |
413 | 413 | echo '</td>'; |
414 | 414 | echo '</tr>'; |
415 | 415 | } else { |
416 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
416 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
417 | 417 | } |
418 | 418 | echo '</table>'; |
419 | 419 | echo '</form>'; |
@@ -421,14 +421,14 @@ discard block |
||
421 | 421 | echo '</fieldset>'; |
422 | 422 | echo '</fieldset><br><br>'; |
423 | 423 | //Fin de la liste des evennement ------------------------------------- |
424 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
424 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
425 | 425 | |
426 | 426 | $form = $eventHandler->getEventForm('admin'); |
427 | 427 | $form->display(); |
428 | 428 | |
429 | 429 | echo '</fieldset>'; |
430 | 430 | |
431 | - require_once __DIR__ . '/admin_footer.php'; |
|
431 | + require_once __DIR__.'/admin_footer.php'; |
|
432 | 432 | |
433 | 433 | break; |
434 | 434 | } |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
21 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; |
|
22 | -require_once __DIR__ . '/admin_header.php'; |
|
20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
21 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; |
|
22 | +require_once __DIR__.'/admin_header.php'; |
|
23 | 23 | |
24 | 24 | $step = 'default'; |
25 | 25 | if (isset($_POST['step'])) { |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $groupPermissionHandler = xoops_getHandler('groupperm'); |
36 | 36 | |
37 | 37 | // Delete old public mask |
38 | - $criteria = new \CriteriaCompo(); |
|
39 | - $criteria->add( new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
40 | - $criteria->add( new \Criteria('gperm_modid', $moduleId)); |
|
38 | + $criteria = new \CriteriaCompo(); |
|
39 | + $criteria->add(new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
40 | + $criteria->add(new \Criteria('gperm_modid', $moduleId)); |
|
41 | 41 | $groupPermissionHandler->deleteAll($criteria); |
42 | 42 | |
43 | 43 | foreach ($_POST['perms']['extcal_perm_mask']['group'] as $groupId => $perms) { |
@@ -95,35 +95,35 @@ discard block |
||
95 | 95 | echo '<fieldset id="defaultBookmark"><legend><a href="#defaultBookmark" style="font-weight:bold; color:#990000;" onClick="toggle(\'default\'); toggleIcon(\'defaultIcon\');"><img id="defaultIcon" src="../assets/images/icons/minus.gif"> ' |
96 | 96 | . _AM_EXTCAL_PUBLIC_PERM_MASK |
97 | 97 | . '</a></legend><div id="default">'; |
98 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
98 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
99 | 99 | echo _AM_EXTCAL_PUBLIC_PERM_MASK_INFO; |
100 | 100 | echo '</fieldset><br>'; |
101 | 101 | echo '<table class="outer" style="width:100%;">'; |
102 | 102 | echo '<form method="post" action="permissions.php">'; |
103 | 103 | echo '<tr>'; |
104 | - echo '<th colspan="8" style="text-align:center;">' . _AM_EXTCAL_PUBLIC_PERM_MASK . '</th>'; |
|
104 | + echo '<th colspan="8" style="text-align:center;">'._AM_EXTCAL_PUBLIC_PERM_MASK.'</th>'; |
|
105 | 105 | echo '</tr>'; |
106 | 106 | echo '<tr>'; |
107 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_GROUP_NAME . '</td>'; |
|
108 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_VIEW . '</td>'; |
|
109 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_SUBMIT . '</td>'; |
|
110 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_AUTO_APPROVE . '</td>'; |
|
111 | - echo '<td class="head" style="text-align:center;">' . _AM_EXTCAL_CAN_EDIT . '</td>'; |
|
107 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_GROUP_NAME.'</td>'; |
|
108 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_VIEW.'</td>'; |
|
109 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_SUBMIT.'</td>'; |
|
110 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_AUTO_APPROVE.'</td>'; |
|
111 | + echo '<td class="head" style="text-align:center;">'._AM_EXTCAL_CAN_EDIT.'</td>'; |
|
112 | 112 | echo '</tr>'; |
113 | 113 | $i = 0; |
114 | 114 | foreach ($glist as $k => $v) { |
115 | 115 | $style = (0 == ++$i % 2) ? 'odd' : 'even'; |
116 | 116 | echo '<tr>'; |
117 | - echo '<td class="' . $style . '">' . $v . '</td>'; |
|
118 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][1]" type="checkbox"' . getChecked($viewGroup, $k) . '></td>'; |
|
119 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][2]" type="checkbox"' . getChecked($submitGroup, $k) . '></td>'; |
|
120 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][4]" type="checkbox"' . getChecked($autoApproveGroup, $k) . '></td>'; |
|
121 | - echo '<td class="' . $style . '" style="text-align:center;"><input name="perms[extcal_perm_mask][group][' . $k . '][8]" type="checkbox"' . getChecked($editGroup, $k) . '></td>'; |
|
117 | + echo '<td class="'.$style.'">'.$v.'</td>'; |
|
118 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][1]" type="checkbox"'.getChecked($viewGroup, $k).'></td>'; |
|
119 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][2]" type="checkbox"'.getChecked($submitGroup, $k).'></td>'; |
|
120 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][4]" type="checkbox"'.getChecked($autoApproveGroup, $k).'></td>'; |
|
121 | + echo '<td class="'.$style.'" style="text-align:center;"><input name="perms[extcal_perm_mask][group]['.$k.'][8]" type="checkbox"'.getChecked($editGroup, $k).'></td>'; |
|
122 | 122 | echo '</tr>'; |
123 | 123 | } |
124 | 124 | echo '<input type="hidden" name="type" value="public">'; |
125 | 125 | echo '<input type="hidden" name="step" value="enreg">'; |
126 | - echo '<tr><td colspan="8" style="text-align:center;" class="head"><input type="submit" value="' . _SUBMIT . '"></td></tr></form>'; |
|
126 | + echo '<tr><td colspan="8" style="text-align:center;" class="head"><input type="submit" value="'._SUBMIT.'"></td></tr></form>'; |
|
127 | 127 | echo '</table><br>'; |
128 | 128 | |
129 | 129 | echo '</div></fieldset><br>'; |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | . '</a></legend><div id="' |
159 | 159 | . $permName |
160 | 160 | . '">'; |
161 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
161 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
162 | 162 | echo $permDesc; |
163 | 163 | echo '</fieldset>'; |
164 | 164 | |
165 | 165 | if ($catHandler->getCount()) { |
166 | - echo $form->render() . '<br>'; |
|
166 | + echo $form->render().'<br>'; |
|
167 | 167 | } else { |
168 | 168 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
169 | 169 | } |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | . '</a></legend><div id="' |
197 | 197 | . $permName |
198 | 198 | . '">'; |
199 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
199 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
200 | 200 | echo $permDesc; |
201 | 201 | echo '</fieldset>'; |
202 | 202 | if ($catHandler->getCount()) { |
203 | - echo $form->render() . '<br>'; |
|
203 | + echo $form->render().'<br>'; |
|
204 | 204 | } else { |
205 | 205 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
206 | 206 | } |
@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | . '</a></legend><div id="' |
234 | 234 | . $permName |
235 | 235 | . '">'; |
236 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
236 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
237 | 237 | echo $permDesc; |
238 | 238 | echo '</fieldset>'; |
239 | 239 | if ($catHandler->getCount()) { |
240 | - echo $form->render() . '<br>'; |
|
240 | + echo $form->render().'<br>'; |
|
241 | 241 | } else { |
242 | 242 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
243 | 243 | } |
@@ -270,11 +270,11 @@ discard block |
||
270 | 270 | . '</a></legend><div id="' |
271 | 271 | . $permName |
272 | 272 | . '">'; |
273 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
273 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
274 | 274 | echo $permDesc; |
275 | 275 | echo '</fieldset>'; |
276 | 276 | if ($catHandler->getCount()) { |
277 | - echo $form->render() . '<br>'; |
|
277 | + echo $form->render().'<br>'; |
|
278 | 278 | } else { |
279 | 279 | redirect_header('cat.php', 2, _AM_EXTCAL_NOPERMSSET, false); |
280 | 280 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | echo 'toggle(\'extcal_cat_edit\'); toggleIcon (\'extcal_cat_editIcon\');'; |
292 | 292 | echo '</script>'; |
293 | 293 | |
294 | - require_once __DIR__ . '/admin_footer.php'; |
|
294 | + require_once __DIR__.'/admin_footer.php'; |
|
295 | 295 | |
296 | 296 | break; |
297 | 297 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | use XoopsModules\Extcal\Common; |
22 | 22 | |
23 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once __DIR__.'/admin_header.php'; |
|
24 | 24 | // Display Admin header |
25 | 25 | xoops_cp_header(); |
26 | 26 | /** @var Extcal\Utility $utilityClass */ |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | |
40 | 40 | if ($helper->getConfig('displaySampleButton')) { |
41 | 41 | xoops_loadLanguage('admin/modulesadmin', 'system'); |
42 | - require_once __DIR__ . '/../testdata/index.php'; |
|
42 | + require_once __DIR__.'/../testdata/index.php'; |
|
43 | 43 | $adminObject->addItemButton(_AM_SYSTEM_MODULES_INSTALL_TESTDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
44 | 44 | $adminObject->displayButton('left', ''); |
45 | 45 | } |
46 | 46 | |
47 | -require_once __DIR__ . '/../testdata/index.php'; |
|
47 | +require_once __DIR__.'/../testdata/index.php'; |
|
48 | 48 | $adminObject->addItemButton(AM_XOOPSTUBE_ADD_SAMPLEDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
49 | 49 | $adminObject->displayButton('left', ''); |
50 | 50 | |
@@ -55,4 +55,4 @@ discard block |
||
55 | 55 | echo $utility::getServerStats(); |
56 | 56 | |
57 | 57 | //codeDump(__FILE__); |
58 | -require_once __DIR__ . '/admin_footer.php'; |
|
58 | +require_once __DIR__.'/admin_footer.php'; |
@@ -29,33 +29,33 @@ |
||
29 | 29 | $adminmenu[] = [ |
30 | 30 | 'title' => _MI_EXTCAL_INDEX, |
31 | 31 | 'link' => 'admin/index.php', |
32 | - 'icon' => $pathIcon32 . '/home.png' |
|
32 | + 'icon' => $pathIcon32.'/home.png' |
|
33 | 33 | ]; |
34 | 34 | |
35 | 35 | $adminmenu[] = [ |
36 | 36 | 'title' => _MI_EXTCAL_CATEGORY, |
37 | 37 | 'link' => 'admin/cat.php', |
38 | - 'icon' => $pathIcon32 . '/category.png' |
|
38 | + 'icon' => $pathIcon32.'/category.png' |
|
39 | 39 | ]; |
40 | 40 | |
41 | 41 | $adminmenu[] = [ |
42 | 42 | 'title' => _MI_EXTCAL_EVENT, |
43 | 43 | 'link' => 'admin/event.php', |
44 | - 'icon' => $pathIcon32 . '/event.png' |
|
44 | + 'icon' => $pathIcon32.'/event.png' |
|
45 | 45 | ]; |
46 | 46 | $adminmenu[] = [ |
47 | 47 | 'title' => _MI_EXTCAL_ETABLISSEMENTS, |
48 | 48 | 'link' => 'admin/etablissement.php', |
49 | - 'icon' => $pathModIcon32 . '/etablissement.png' |
|
49 | + 'icon' => $pathModIcon32.'/etablissement.png' |
|
50 | 50 | ]; |
51 | 51 | $adminmenu[] = [ |
52 | 52 | 'title' => _MI_EXTCAL_PERMISSIONS, |
53 | 53 | 'link' => 'admin/permissions.php', |
54 | - 'icon' => $pathIcon32 . '/permissions.png' |
|
54 | + 'icon' => $pathIcon32.'/permissions.png' |
|
55 | 55 | ]; |
56 | 56 | |
57 | 57 | $adminmenu[] = [ |
58 | 58 | 'title' => _MI_EXTCAL_ABOUT, |
59 | 59 | 'link' => 'admin/about.php', |
60 | - 'icon' => $pathIcon32 . '/about.png' |
|
60 | + 'icon' => $pathIcon32.'/about.png' |
|
61 | 61 | ]; |
@@ -2,18 +2,18 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -include __DIR__ . '/../../mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
5 | +include __DIR__.'/../../mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | 7 | $params = ['view' => _EXTCAL_NAV_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY]; |
8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | 11 | /* ========================================================================== */ |
12 | 12 | //recupe des variables get |
13 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
14 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
15 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
16 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
13 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
14 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
15 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
16 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
17 | 17 | /* ========================================================================== */ |
18 | 18 | |
19 | 19 | //echo "{$params['view']}-{$year}-{$month}-{$day}<hr>extcal_{$params['view']}.html<br>"; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $form->addElement(getListMonths($month)); |
24 | 24 | $form->addElement(getListDays($day)); |
25 | 25 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
26 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
26 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
27 | 27 | |
28 | 28 | //------------------------------------------------------ |
29 | 29 | // Assigning the form to the template |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | 'nbJours' => $nbJours, |
47 | 47 | 'externalKeys' => 'cat_id', |
48 | 48 | ]; |
49 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
49 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
50 | 50 | /**********************************************************************/ |
51 | 51 | $eventsArray = $events; |
52 | 52 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -101,21 +101,21 @@ discard block |
||
101 | 101 | |
102 | 102 | $navig = [ |
103 | 103 | 'prev' => [ |
104 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
104 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
105 | 105 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()), |
106 | 106 | ], |
107 | 107 | 'this' => [ |
108 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
108 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
109 | 109 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()), |
110 | 110 | ], |
111 | 111 | 'next' => [ |
112 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
112 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
113 | 113 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()), |
114 | 114 | ], |
115 | 115 | ]; |
116 | 116 | |
117 | 117 | // Title of the page |
118 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
118 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
119 | 119 | |
120 | 120 | // Assigning navig data to the template |
121 | 121 | $xoopsTpl->assign('navig', $navig); |
@@ -156,4 +156,4 @@ discard block |
||
156 | 156 | $xoopsTpl->assign('lang', $lang); |
157 | 157 | $xoopsTpl->assign('view', 'agendaday'); |
158 | 158 | |
159 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
159 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -19,15 +19,15 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -include __DIR__ . '/../../mainfile.php'; |
|
23 | -require_once __DIR__ . '/include/constantes.php'; |
|
22 | +include __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 | if (!isset($_GET['event'])) { |
28 | 28 | $eventId = 0; |
29 | 29 | } else { |
30 | - $eventId = (int)$_GET['event']; |
|
30 | + $eventId = (int) $_GET['event']; |
|
31 | 31 | } |
32 | 32 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
33 | 33 | $event = $eventHandler->objectToArray($eventHandler->getEvent($eventId), ['cat_id']); |
@@ -42,136 +42,136 @@ discard block |
||
42 | 42 | // Adding formated date for start and end event |
43 | 43 | $eventHandler->formatEventDate($event, $xoopsModuleConfig['event_date_event']); |
44 | 44 | |
45 | -echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; |
|
46 | -echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; |
|
47 | -echo '<head>' . "\n"; |
|
48 | -echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n"; |
|
49 | -echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n"; |
|
50 | -echo '</head>' . "\n"; |
|
51 | -echo '<body onload="window.print()">' . "\n"; |
|
52 | -echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n"; |
|
53 | -echo '<tr>' . "\n"; |
|
54 | -echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n"; |
|
55 | -echo $event['event_title'] . "\n"; |
|
56 | -echo '</td>' . "\n"; |
|
57 | -echo '</tr>' . "\n"; |
|
58 | -echo '<tr>' . "\n"; |
|
59 | -echo '<td style="width:50%; border:1px solid black;">' . "\n"; |
|
60 | -echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n"; |
|
61 | -echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n"; |
|
62 | -echo '</td>' . "\n"; |
|
63 | -echo '<td style="border:1px solid black;">' . "\n"; |
|
45 | +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n"; |
|
46 | +echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n"; |
|
47 | +echo '<head>'."\n"; |
|
48 | +echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'">'."\n"; |
|
49 | +echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n"; |
|
50 | +echo '</head>'."\n"; |
|
51 | +echo '<body onload="window.print()">'."\n"; |
|
52 | +echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n"; |
|
53 | +echo '<tr>'."\n"; |
|
54 | +echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n"; |
|
55 | +echo $event['event_title']."\n"; |
|
56 | +echo '</td>'."\n"; |
|
57 | +echo '</tr>'."\n"; |
|
58 | +echo '<tr>'."\n"; |
|
59 | +echo '<td style="width:50%; border:1px solid black;">'."\n"; |
|
60 | +echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n"; |
|
61 | +echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n"; |
|
62 | +echo '</td>'."\n"; |
|
63 | +echo '<td style="border:1px solid black;">'."\n"; |
|
64 | 64 | if (!$event['event_isrecur']) { |
65 | - echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n"; |
|
66 | - echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n"; |
|
65 | + echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n"; |
|
66 | + echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n"; |
|
67 | 67 | } else { |
68 | - echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n"; |
|
68 | + echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n"; |
|
69 | 69 | } |
70 | -echo '</td>' . "\n"; |
|
71 | -echo '</tr>' . "\n"; |
|
70 | +echo '</td>'."\n"; |
|
71 | +echo '</tr>'."\n"; |
|
72 | 72 | |
73 | -echo '<tr>' . "\n"; |
|
73 | +echo '<tr>'."\n"; |
|
74 | 74 | if ('' != $event['event_desc']) { |
75 | - echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n"; |
|
75 | + echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n"; |
|
76 | 76 | } |
77 | 77 | if ('' != $event['event_price']) { |
78 | - echo '<td style="border:1px solid black;">' . _MD_EXTCAL_ETABLISSEMENT_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n"; |
|
78 | + echo '<td style="border:1px solid black;">'._MD_EXTCAL_ETABLISSEMENT_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n"; |
|
79 | 79 | } |
80 | -echo '</tr>' . "\n"; |
|
80 | +echo '</tr>'."\n"; |
|
81 | 81 | |
82 | 82 | //show contact info |
83 | 83 | if ('' != $event['event_contact']) { |
84 | - echo '<tr>' . "\n"; |
|
85 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
86 | - echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n"; |
|
87 | - echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n"; |
|
88 | - echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n"; |
|
89 | - echo $event['event_address'] . '</span>' . "\n"; |
|
90 | - echo '</td>' . "\n"; |
|
91 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
92 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n"; |
|
93 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n"; |
|
94 | - echo '</td>' . "\n"; |
|
95 | - echo '</tr>' . "\n"; |
|
84 | + echo '<tr>'."\n"; |
|
85 | + echo '<td style="border:1px solid black;">'."\n"; |
|
86 | + echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n"; |
|
87 | + echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n"; |
|
88 | + echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n"; |
|
89 | + echo $event['event_address'].'</span>'."\n"; |
|
90 | + echo '</td>'."\n"; |
|
91 | + echo '<td style="border:1px solid black;">'."\n"; |
|
92 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n"; |
|
93 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n"; |
|
94 | + echo '</td>'."\n"; |
|
95 | + echo '</tr>'."\n"; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | //show location |
99 | 99 | if ($event['event_etablissement'] = 0) { |
100 | - echo '<tr>' . "\n"; |
|
100 | + echo '<tr>'."\n"; |
|
101 | 101 | |
102 | 102 | // echo($location['nom']); |
103 | 103 | // var_dump($location); |
104 | 104 | // var_dump($event); |
105 | 105 | |
106 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
107 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT . '</b>' . "\n"; |
|
106 | + echo '<td style="border:1px solid black;">'."\n"; |
|
107 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT.'</b>'."\n"; |
|
108 | 108 | if ('' != $location['categorie']) { |
109 | - echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n"; |
|
109 | + echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n"; |
|
110 | 110 | } |
111 | 111 | if ('' != $location['logo']) { |
112 | - echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/etablissement/' . $location['logo'] . ' height="75px">' . '' . "\n"; |
|
112 | + echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/etablissement/'.$location['logo'].' height="75px">'.''."\n"; |
|
113 | 113 | } |
114 | 114 | |
115 | - echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n"; |
|
116 | - echo $location['description'] . '<br>' . "\n"; |
|
117 | - echo $location['adresse'] . '</span> <br>' . "\n"; |
|
115 | + echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n"; |
|
116 | + echo $location['description'].'<br>'."\n"; |
|
117 | + echo $location['adresse'].'</span> <br>'."\n"; |
|
118 | 118 | if ('' != $location['adresse2']) { |
119 | - echo $location['adresse2'] . '</span> <br>' . "\n"; |
|
119 | + echo $location['adresse2'].'</span> <br>'."\n"; |
|
120 | 120 | } |
121 | - echo $location['ville'] . "\n"; |
|
122 | - echo $location['cp'] . '<br>' . "\n"; |
|
121 | + echo $location['ville']."\n"; |
|
122 | + echo $location['cp'].'<br>'."\n"; |
|
123 | 123 | |
124 | 124 | if ('' != $location['horaires']) { |
125 | - echo $location['horaires'] . '</span> <br>' . "\n"; |
|
125 | + echo $location['horaires'].'</span> <br>'."\n"; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | if ('' != $location['divers']) { |
129 | - echo $location['divers'] . '</span> <br>' . "\n"; |
|
129 | + echo $location['divers'].'</span> <br>'."\n"; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | if ('' != $location['tarifs']) { |
133 | - echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n"; |
|
133 | + echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n"; |
|
134 | 134 | } |
135 | 135 | |
136 | - echo '</td>' . "\n"; |
|
137 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
136 | + echo '</td>'."\n"; |
|
137 | + echo '<td style="border:1px solid black;">'."\n"; |
|
138 | 138 | |
139 | 139 | if ('' != $location['tel_fixe']) { |
140 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n"; |
|
140 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n"; |
|
141 | 141 | } |
142 | 142 | if ('' != $location['tel_portable']) { |
143 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n"; |
|
143 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n"; |
|
144 | 144 | } |
145 | 145 | |
146 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n"; |
|
147 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n"; |
|
148 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_ETABLISSEMENT_MAP2 . '</a>' . "\n"; |
|
146 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n"; |
|
147 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n"; |
|
148 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_ETABLISSEMENT_MAP2.'</a>'."\n"; |
|
149 | 149 | |
150 | - echo '</td>' . "\n"; |
|
151 | - echo '</tr>' . "\n"; |
|
150 | + echo '</td>'."\n"; |
|
151 | + echo '</tr>'."\n"; |
|
152 | 152 | } |
153 | 153 | //show images |
154 | 154 | |
155 | 155 | if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) { |
156 | - echo '<tr>' . "\n"; |
|
156 | + echo '<tr>'."\n"; |
|
157 | 157 | if ('' != $event['event_picture1']) { |
158 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
159 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n"; |
|
160 | - echo '</td>' . "\n"; |
|
158 | + echo '<td style="border:1px solid black;">'."\n"; |
|
159 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px">'.''."\n"; |
|
160 | + echo '</td>'."\n"; |
|
161 | 161 | } |
162 | 162 | if ('' != $event['event_picture2']) { |
163 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
164 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n"; |
|
165 | - echo '</td>' . "\n"; |
|
163 | + echo '<td style="border:1px solid black;">'."\n"; |
|
164 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px">'.''."\n"; |
|
165 | + echo '</td>'."\n"; |
|
166 | 166 | } |
167 | - echo '</tr>' . "\n"; |
|
167 | + echo '</tr>'."\n"; |
|
168 | 168 | } |
169 | 169 | //-------------------- |
170 | 170 | |
171 | -echo '</table><br>' . "\n"; |
|
171 | +echo '</table><br>'."\n"; |
|
172 | 172 | echo '<div style="text-align:center; width:640px;">'; |
173 | -echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>'; |
|
174 | -echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>'; |
|
173 | +echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>'; |
|
174 | +echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>'; |
|
175 | 175 | echo '</div>'; |
176 | -echo '</body>' . "\n"; |
|
177 | -echo '</html>' . "\n"; |
|
176 | +echo '</body>'."\n"; |
|
177 | +echo '</html>'."\n"; |
@@ -2,23 +2,23 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -include __DIR__ . '/../../mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
5 | +include __DIR__.'/../../mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | 7 | $params = ['view' => _EXTCAL_NAV_AGENDA_WEEK, 'file' => _EXTCAL_FILE_AGENDA_WEEK]; |
8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
9 | -require_once __DIR__ . '/header.php'; |
|
9 | +require_once __DIR__.'/header.php'; |
|
10 | 10 | |
11 | 11 | /* ========================================================================== */ |
12 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
13 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
14 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
15 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
12 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
13 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
14 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
15 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
16 | 16 | |
17 | 17 | // Validate the date (day, month and year) |
18 | 18 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
19 | 19 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
20 | 20 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
21 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
21 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
22 | 22 | $year = date('Y', $dayTS); |
23 | 23 | $month = date('n', $dayTS); |
24 | 24 | $day = date('j', $dayTS); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $form->addElement(getListMonths($month)); |
29 | 29 | $form->addElement(getListDays($day)); |
30 | 30 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
31 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
31 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
32 | 32 | |
33 | 33 | // Assigning the form to the template |
34 | 34 | $form->assign($xoopsTpl); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'nbJours' => $nbJours, |
52 | 52 | 'externalKeys' => 'cat_id', |
53 | 53 | ]; |
54 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
54 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
55 | 55 | /**********************************************************************/ |
56 | 56 | $eventsArray = $events; |
57 | 57 | // Formating date |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | //------------------------------------------------------------------- |
84 | 84 | |
85 | 85 | //$params['colJourWidth'] = (int)((((500-50)/$nbJours)/500*100)+.5); |
86 | -$params['colJourWidth'] = (int)((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
86 | +$params['colJourWidth'] = (int) ((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
87 | 87 | // echo "agenda_week : {$dayTS}<br>"; |
88 | 88 | $tAgenda = agenda_getEvents($eventsArray, $dayTS, $hStart, $hEnd, $mTranche, $nbJours); |
89 | 89 | //$exp = print_r($eventsArray, true); |
@@ -105,21 +105,21 @@ discard block |
||
105 | 105 | |
106 | 106 | $navig = [ |
107 | 107 | 'prev' => [ |
108 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
108 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
109 | 109 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
110 | 110 | ], |
111 | 111 | 'this' => [ |
112 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
112 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
113 | 113 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
114 | 114 | ], |
115 | 115 | 'next' => [ |
116 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
116 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
117 | 117 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
118 | 118 | ], |
119 | 119 | ]; |
120 | 120 | |
121 | 121 | // Title of the page |
122 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
122 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
123 | 123 | |
124 | 124 | // Assigning navig data to the template |
125 | 125 | $xoopsTpl->assign('navig', $navig); |
@@ -160,4 +160,4 @@ discard block |
||
160 | 160 | $xoopsTpl->assign('lang', $lang); |
161 | 161 | $xoopsTpl->assign('view', 'agendaweek'); |
162 | 162 | |
163 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
163 | +include XOOPS_ROOT_PATH.'/footer.php'; |