@@ -2,14 +2,14 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -include __DIR__ . '/../../mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
7 | -$params = [ |
|
5 | +include __DIR__.'/../../mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | +$params = [ |
|
8 | 8 | 'view' => _EXTCAL_NAV_SEARCH, |
9 | 9 | 'file' => _EXTCAL_FILE_SEARCH, |
10 | 10 | ]; |
11 | 11 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
12 | -require_once __DIR__ . '/header.php'; |
|
12 | +require_once __DIR__.'/header.php'; |
|
13 | 13 | |
14 | 14 | $recurEventsArray = []; |
15 | 15 | //needed to save the state of the form, so we don't show on the first time the list of available events |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | /***************************************************************/ |
22 | 22 | $searchExp = isset($_POST['searchExp']) ? $_POST['searchExp'] : ''; |
23 | 23 | $andor = isset($_POST['andor']) ? $_POST['andor'] : ''; |
24 | -$year = isset($_POST['year']) ? (int)$_POST['year'] : date('Y'); |
|
25 | -$month = isset($_POST['month']) ? (int)$_POST['month'] : date('n'); |
|
26 | -$day = isset($_POST['day']) ? (int)$_POST['day'] : 0; |
|
27 | -$cat = isset($_POST['cat']) ? (int)$_POST['cat'] : 0; |
|
24 | +$year = isset($_POST['year']) ? (int) $_POST['year'] : date('Y'); |
|
25 | +$month = isset($_POST['month']) ? (int) $_POST['month'] : date('n'); |
|
26 | +$day = isset($_POST['day']) ? (int) $_POST['day'] : 0; |
|
27 | +$cat = isset($_POST['cat']) ? (int) $_POST['cat'] : 0; |
|
28 | 28 | $orderby1 = isset($_POST['orderby1']) ? $_POST['orderby1'] : 'cat_name ASC'; |
29 | 29 | $orderby2 = isset($_POST['orderby2']) ? $_POST['orderby2'] : 'event_title ASC'; |
30 | 30 | $orderby3 = isset($_POST['orderby3']) ? $_POST['orderby3'] : ''; |
@@ -108,18 +108,18 @@ discard block |
||
108 | 108 | } |
109 | 109 | } |
110 | 110 | |
111 | -$criteria = new \CriteriaCompo(); |
|
112 | -$criteria->add( new \Criteria('event_isrecur', 1)); |
|
111 | +$criteria = new \CriteriaCompo(); |
|
112 | +$criteria->add(new \Criteria('event_isrecur', 1)); |
|
113 | 113 | |
114 | 114 | if ($cat > 0) { |
115 | - $criteria->add( new \Criteria('cat_id', $cat)); |
|
115 | + $criteria->add(new \Criteria('cat_id', $cat)); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | //$criteria = new \Criteria('event_isrecur', 1); |
119 | 119 | |
120 | 120 | $recurrents = $eventHandler->getAllEvents($criteria, false); |
121 | 121 | //$catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
122 | -$catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
122 | +$catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
123 | 123 | |
124 | 124 | //========================================= |
125 | 125 | for ($h = 0, $count = count($recurrents); $h < $count; ++$h) { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
149 | -$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray); |
|
149 | +$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray); |
|
150 | 150 | |
151 | 151 | // Sort event array by event start |
152 | 152 | //usort($eventsArray, "orderEvents"); |
@@ -237,4 +237,4 @@ discard block |
||
237 | 237 | $xoopsTpl->assign('lang', $lang); |
238 | 238 | $xoopsTpl->assign('view', 'search'); |
239 | 239 | |
240 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
240 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -2,20 +2,20 @@ |
||
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 | |
8 | 8 | if (!isset($_GET['file'])) { |
9 | 9 | $fileId = 0; |
10 | 10 | } else { |
11 | - $fileId = (int)$_GET['file']; |
|
11 | + $fileId = (int) $_GET['file']; |
|
12 | 12 | } |
13 | 13 | /** @var FileHandler $fileHandler */ |
14 | 14 | $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
15 | 15 | |
16 | 16 | $file = $fileHandler->getFile($fileId); |
17 | 17 | |
18 | -header('Content-Type: ' . $file->getVar('file_mimetype') . ''); |
|
19 | -header('Content-Disposition: attachment; filename="' . $file->getVar('file_nicename') . '"'); |
|
18 | +header('Content-Type: '.$file->getVar('file_mimetype').''); |
|
19 | +header('Content-Disposition: attachment; filename="'.$file->getVar('file_nicename').'"'); |
|
20 | 20 | |
21 | -readfile(XOOPS_ROOT_PATH . '/uploads/extcal/' . $file->getVar('file_name')); |
|
21 | +readfile(XOOPS_ROOT_PATH.'/uploads/extcal/'.$file->getVar('file_name')); |
@@ -19,20 +19,20 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -include __DIR__ . '/../../mainfile.php'; |
|
22 | +include __DIR__.'/../../mainfile.php'; |
|
23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl'; |
24 | 24 | |
25 | -include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
25 | +include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
26 | 26 | //include __DIR__ . '/class/form/extcalform.php'; |
27 | 27 | //include __DIR__ . '/class/perm.php'; |
28 | 28 | |
29 | -require_once __DIR__ . '/class/Utility.php'; |
|
30 | -require_once __DIR__ . '/include/constantes.php'; |
|
29 | +require_once __DIR__.'/class/Utility.php'; |
|
30 | +require_once __DIR__.'/include/constantes.php'; |
|
31 | 31 | |
32 | 32 | $permHandler = Extcal\Perm::getHandler(); |
33 | 33 | $xoopsUser = $xoopsUser ?: null; |
34 | 34 | |
35 | -if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) { |
|
35 | +if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) { |
|
36 | 36 | redirect_header('index.php', 3); |
37 | 37 | } |
38 | 38 | |
@@ -40,16 +40,16 @@ discard block |
||
40 | 40 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
41 | 41 | |
42 | 42 | if (isset($_POST['form_preview'])) { |
43 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
43 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
44 | 44 | |
45 | 45 | // Title of the page |
46 | 46 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
47 | 47 | |
48 | 48 | $data = [ |
49 | 49 | 'event_title' => $_POST['event_title'], |
50 | - 'cat_id' => (int)$_POST['cat_id'], |
|
50 | + 'cat_id' => (int) $_POST['cat_id'], |
|
51 | 51 | 'event_desc' => $_POST['event_desc'], |
52 | - 'event_nbmember' => (int)$_POST['event_nbmember'], |
|
52 | + 'event_nbmember' => (int) $_POST['event_nbmember'], |
|
53 | 53 | 'event_contact' => $_POST['event_contact'], |
54 | 54 | 'event_url' => $_POST['event_url'], |
55 | 55 | 'event_email' => $_POST['event_email'], |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | 'event_start' => $_POST['event_start'], |
59 | 59 | 'have_end' => $_POST['have_end'], |
60 | 60 | 'event_end' => $_POST['event_end'], |
61 | - 'dohtml' => (int)$xoopsModuleConfig['allow_html'], |
|
61 | + 'dohtml' => (int) $xoopsModuleConfig['allow_html'], |
|
62 | 62 | 'event_price' => $_POST['event_price'], |
63 | 63 | 'event_organisateur' => $_POST['event_organisateur'], |
64 | 64 | 'event_icone' => $_POST['event_icone'], |
65 | 65 | ]; |
66 | 66 | |
67 | 67 | if (isset($_POST['event_id'])) { |
68 | - $data['event_id'] = (int)$_POST['event_id']; |
|
68 | + $data['event_id'] = (int) $_POST['event_id']; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | // Creating tempory event object to apply Object data filtering |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | // // Assigning language data to the template |
85 | 85 | // $xoopsTpl->assign('lang', $lang); |
86 | 86 | |
87 | - $event['cat_id'] = (int)$_POST['cat_id']; |
|
87 | + $event['cat_id'] = (int) $_POST['cat_id']; |
|
88 | 88 | $event['have_end'] = $_POST['have_end']; |
89 | 89 | |
90 | 90 | // Display the submit form |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $xoopsTpl->assign('preview', true); |
94 | 94 | $xoopsTpl->assign('formBody', $formBody); |
95 | 95 | |
96 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
96 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
97 | 97 | } elseif (isset($_POST['form_submit'])) { |
98 | 98 | if (!isset($_POST['rrule_weekly_interval'])) { |
99 | 99 | $_POST['rrule_weekly_interval'] = 0; |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | Extcal\Utility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
118 | 118 | /////////////////////////////////////////////////////////////////////////////// |
119 | 119 | |
120 | - require_once __DIR__ . '/class/perm.php'; |
|
120 | + require_once __DIR__.'/class/perm.php'; |
|
121 | 121 | |
122 | 122 | $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
123 | 123 | $permHandler = Extcal\Perm::getHandler(); |
124 | - $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']); |
|
124 | + $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']); |
|
125 | 125 | |
126 | 126 | $data = [ |
127 | 127 | 'event_title' => $_POST['event_title'], |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | ]; |
148 | 148 | |
149 | 149 | if (isset($_POST['event_id'])) { |
150 | - $eventHandler->modifyEvent((int)$_POST['event_id'], $data); |
|
151 | - $fileHandler->updateEventFile((int)$_POST['event_id']); |
|
152 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
150 | + $eventHandler->modifyEvent((int) $_POST['event_id'], $data); |
|
151 | + $fileHandler->updateEventFile((int) $_POST['event_id']); |
|
152 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
153 | 153 | |
154 | - redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
154 | + redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
155 | 155 | } else { |
156 | 156 | $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
157 | 157 | $data['event_submitdate'] = time(); |
@@ -168,9 +168,9 @@ discard block |
||
168 | 168 | $notificationHandler->triggerEvent('global', 0, $notifyEvent, ['EVENT_TITLE' => $_POST['event_title']]); |
169 | 169 | if (1 == $approve) { |
170 | 170 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
171 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
172 | - $cat = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all'); |
|
173 | - $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [ |
|
171 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
172 | + $cat = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all'); |
|
173 | + $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [ |
|
174 | 174 | 'EVENT_TITLE' => $_POST['event_title'], |
175 | 175 | 'CAT_NAME' => $cat->getVar('cat_name'), |
176 | 176 | ]); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
22 | +require_once __DIR__.'/../include/constantes.php'; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @param $options |
@@ -63,26 +63,26 @@ discard block |
||
63 | 63 | global $xoopsUser; |
64 | 64 | |
65 | 65 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
66 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
66 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
67 | 67 | |
68 | 68 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
69 | 69 | |
70 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
71 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
72 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
70 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
71 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
72 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
73 | 73 | array_shift($options); |
74 | 74 | array_shift($options); |
75 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
75 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
76 | 76 | if (false === array_search(0, $options)) { |
77 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
77 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
78 | 78 | } else { |
79 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
79 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
80 | 80 | } |
81 | 81 | foreach ($cats as $cat) { |
82 | 82 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
83 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
83 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
84 | 84 | } else { |
85 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
85 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | $form .= '</select>'; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
22 | +require_once __DIR__.'/../include/constantes.php'; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @param $options |
@@ -62,26 +62,26 @@ discard block |
||
62 | 62 | { |
63 | 63 | global $xoopsUser; |
64 | 64 | |
65 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
65 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
66 | 66 | |
67 | 67 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
68 | 68 | |
69 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
70 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
71 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
69 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
70 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
71 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
72 | 72 | array_shift($options); |
73 | 73 | array_shift($options); |
74 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
74 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
75 | 75 | if (false === array_search(0, $options)) { |
76 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
76 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
77 | 77 | } else { |
78 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
78 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
79 | 79 | } |
80 | 80 | foreach ($cats as $cat) { |
81 | 81 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
82 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
82 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
83 | 83 | } else { |
84 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
84 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | $form .= '</select>'; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
22 | +require_once __DIR__.'/../include/constantes.php'; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @param $options |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | //mb $events = $eventHandler->objectToArray($eventHandler->getUpcommingEvent($nbEvent, $options)); |
54 | 54 | |
55 | 55 | /* ========================================================================== */ |
56 | - $year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
57 | - $month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
58 | - $day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
59 | - $cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
56 | + $year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
57 | + $month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
58 | + $day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
59 | + $cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
60 | 60 | /* ========================================================================== */ |
61 | 61 | |
62 | 62 | // Validate the date (day, month and year) |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'nbEvent' => $nbEvent, |
90 | 90 | 'nbDays' => $nbDays, |
91 | 91 | ]; |
92 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
92 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
93 | 93 | |
94 | 94 | //---------------------------- |
95 | 95 | |
@@ -112,31 +112,31 @@ discard block |
||
112 | 112 | { |
113 | 113 | global $xoopsUser; |
114 | 114 | |
115 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
115 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
116 | 116 | |
117 | 117 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
118 | 118 | |
119 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
120 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
121 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
119 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
120 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
121 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
122 | 122 | |
123 | - $form .= _MB_EXTCAL_UPCOMING_DAYS . ' : <input name="options[2]" size="5" maxlength="255" value="' . $options[2] . '" type="text"><br>'; |
|
123 | + $form .= _MB_EXTCAL_UPCOMING_DAYS.' : <input name="options[2]" size="5" maxlength="255" value="'.$options[2].'" type="text"><br>'; |
|
124 | 124 | |
125 | 125 | array_shift($options); |
126 | 126 | array_shift($options); |
127 | 127 | array_shift($options); |
128 | 128 | |
129 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
129 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
130 | 130 | if (false === array_search(0, $options)) { |
131 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
131 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
132 | 132 | } else { |
133 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
133 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
134 | 134 | } |
135 | 135 | foreach ($cats as $cat) { |
136 | 136 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
137 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
137 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
138 | 138 | } else { |
139 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
139 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | $form .= '</select>'; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | 22 | global $extcalConfig, $xoopsUser; |
23 | -require_once __DIR__ . '/../include/constantes.php'; |
|
23 | +require_once __DIR__.'/../include/constantes.php'; |
|
24 | 24 | //require_once __DIR__ . '/../class/Utility.php'; |
25 | 25 | //require_once __DIR__ . '/../class/tableForm.php'; |
26 | 26 | //--------------------------------------------------------------------------- |
@@ -37,16 +37,16 @@ discard block |
||
37 | 37 | |
38 | 38 | // require_once __DIR__ . '/../class/config.php'; |
39 | 39 | |
40 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
41 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
42 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
40 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
41 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
42 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
43 | 43 | // require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
44 | 44 | // require_once CALENDAR_ROOT . 'Day.php'; |
45 | 45 | |
46 | 46 | // Retriving Image for block if enabled |
47 | 47 | if (1 == $options[0]) { |
48 | 48 | $imageHandler = xoops_getHandler('image'); |
49 | - $criteria = new \Criteria('imgcat_id', $options[1]); |
|
49 | + $criteria = new \Criteria('imgcat_id', $options[1]); |
|
50 | 50 | $criteria->setSort('RAND()'); |
51 | 51 | $criteria->setLimit($options[6]); |
52 | 52 | $images = $imageHandler->getObjects($criteria); |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | //---------------------------------------------------- |
85 | 85 | // Getting eXtCal object's handler |
86 | 86 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
87 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
87 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
88 | 88 | |
89 | - $cats = $catHandler->getAllCatById($xoopsUser); |
|
89 | + $cats = $catHandler->getAllCatById($xoopsUser); |
|
90 | 90 | // $t = print_r($cats,true); |
91 | 91 | // echo "zzz<pre>{$t}</pre>"; |
92 | 92 | |
93 | - $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
93 | + $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
|
94 | 94 | $timeHandler = Extcal\Time::getHandler(); |
95 | 95 | |
96 | 96 | // Retriving month and year value according to block options |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'category' => $tCatSelected, |
129 | 129 | 'externalKeys' => 'cat_id', |
130 | 130 | ]; |
131 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
131 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
132 | 132 | } else { |
133 | 133 | $events = []; |
134 | 134 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | 'number' => $dayCalObj->thisDay(), |
194 | 194 | 'isSelected' => $dayCalObj->isSelected(), |
195 | 195 | ]; |
196 | - $day = $dayCalObj->thisDay(); |
|
196 | + $day = $dayCalObj->thisDay(); |
|
197 | 197 | if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) { |
198 | 198 | $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true; |
199 | 199 | $tableRows[$rowId]['week'][$cellId]['color'] = $eventsArray[$day]['color']; |
@@ -223,15 +223,15 @@ discard block |
||
223 | 223 | // Making navig data |
224 | 224 | $navig = [ |
225 | 225 | 'page' => $extcalConfig['start_page'], |
226 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
226 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
227 | 227 | 'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
228 | 228 | ]; |
229 | 229 | |
230 | 230 | $horloge = []; |
231 | 231 | $horloge['display'] = ('' != trim($options[11])); |
232 | - $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11]; |
|
233 | - $horloge['width'] = $options[12] . 'px'; |
|
234 | - $horloge['height'] = $options[13] . 'px'; |
|
232 | + $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11]; |
|
233 | + $horloge['width'] = $options[12].'px'; |
|
234 | + $horloge['height'] = $options[13].'px'; |
|
235 | 235 | |
236 | 236 | $ret = [ |
237 | 237 | 'imageParam' => $imageParam, |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | |
274 | 274 | //============================================================ |
275 | 275 | |
276 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
276 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
277 | 277 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
278 | 278 | $imageCatHandler = xoops_getHandler('imagecategory'); |
279 | 279 | |
280 | 280 | //===================================================================== |
281 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head'); |
|
281 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head'); |
|
282 | 282 | |
283 | 283 | $k = 0; |
284 | 284 | $xfValue[$k] = new \XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $xfValue[$k] = new Extcal\Form\Spin\FormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = ''); |
320 | 320 | $form->addElement($xfValue[$k], false); |
321 | 321 | //===================================================================== |
322 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head'); |
|
322 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head'); |
|
323 | 323 | |
324 | 324 | $t = [ |
325 | 325 | -1 => _MB_EXTCAL_PREVIEW, |
@@ -358,9 +358,9 @@ discard block |
||
358 | 358 | $form->addElement($xfValue[$k], false); |
359 | 359 | |
360 | 360 | //===================================================================== |
361 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head'); |
|
361 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head'); |
|
362 | 362 | //--------------------------------------------------------------------- |
363 | - $t = \XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES); |
|
363 | + $t = \XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES); |
|
364 | 364 | $t = array_merge([' ' => _NONE], $t); |
365 | 365 | |
366 | 366 | $k = 11; |
@@ -445,12 +445,12 @@ discard block |
||
445 | 445 | // $src = $doc->createElement('src'); |
446 | 446 | $src = clone $tempSrc; |
447 | 447 | $src = $photo->appendChild($src); |
448 | - $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name')); |
|
448 | + $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name')); |
|
449 | 449 | $src->appendChild($value); |
450 | 450 | } |
451 | 451 | |
452 | 452 | // get completed xml document |
453 | - $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml'); |
|
453 | + $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml'); |
|
454 | 454 | } |
455 | 455 | |
456 | 456 | /**************************************************************************/ |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
22 | +require_once __DIR__.'/../include/constantes.php'; |
|
23 | 23 | |
24 | 24 | /******************************************************/ |
25 | 25 | /* Ajour JJD - Evenements par categries */ |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | /***********************************************************/ |
59 | 59 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
60 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
60 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
61 | 61 | $t = $catHandler->objectToArray($catHandler->getAllCat($xoopsUser, 'all')); |
62 | 62 | $tCats = []; |
63 | 63 | for ($h = 0, $count = count($t); $h < $count; ++$h) { |
@@ -88,26 +88,26 @@ discard block |
||
88 | 88 | global $xoopsUser; |
89 | 89 | |
90 | 90 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
91 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
91 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
92 | 92 | |
93 | 93 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
94 | 94 | |
95 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
96 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
97 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
95 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
96 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
97 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
98 | 98 | array_shift($options); |
99 | 99 | array_shift($options); |
100 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
100 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
101 | 101 | if (false === array_search(0, $options)) { |
102 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
102 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
103 | 103 | } else { |
104 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
104 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
105 | 105 | } |
106 | 106 | foreach ($cats as $cat) { |
107 | 107 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
108 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
108 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
109 | 109 | } else { |
110 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
110 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | $form .= '</select>'; |
@@ -2,20 +2,20 @@ 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_CALMONTH, 'file' => _EXTCAL_FILE_CALMONTH]; |
8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
9 | 9 | |
10 | 10 | //include __DIR__ . '/preloads/autoloader.php'; |
11 | 11 | //$catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
12 | 12 | |
13 | -require_once __DIR__ . '/header.php'; |
|
13 | +require_once __DIR__.'/header.php'; |
|
14 | 14 | |
15 | 15 | /* ========================================================================== */ |
16 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
17 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
18 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
16 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
17 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
18 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
19 | 19 | /* ========================================================================== */ |
20 | 20 | |
21 | 21 | $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get'); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'cat' => $cat, |
38 | 38 | 'externalKeys' => 'cat_id', |
39 | 39 | ]; |
40 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
40 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
41 | 41 | /**********************************************************************/ |
42 | 42 | |
43 | 43 | // Calculating timestamp for the begin and the end of the month |
@@ -133,21 +133,21 @@ discard block |
||
133 | 133 | // Making navig data |
134 | 134 | $navig = [ |
135 | 135 | 'prev' => [ |
136 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
136 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
137 | 137 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()), |
138 | 138 | ], |
139 | 139 | 'this' => [ |
140 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
140 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
141 | 141 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
142 | 142 | ], |
143 | 143 | 'next' => [ |
144 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
144 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
145 | 145 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()), |
146 | 146 | ], |
147 | 147 | ]; |
148 | 148 | |
149 | 149 | // Title of the page |
150 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
150 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
151 | 151 | |
152 | 152 | // Assigning navig data to the template |
153 | 153 | $xoopsTpl->assign('navig', $navig); |
@@ -187,4 +187,4 @@ discard block |
||
187 | 187 | $xoopsTpl->assign('lang', $lang); |
188 | 188 | $xoopsTpl->assign('view', 'calmonth'); |
189 | 189 | |
190 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
190 | +include XOOPS_ROOT_PATH.'/footer.php'; |