@@ -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_EXTCAL_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'; |
@@ -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>"; |
@@ -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'; |
@@ -2,24 +2,24 @@ 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_CALWEEK, 'file' => _EXTCAL_FILE_CALWEEK]; |
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 | |
18 | 18 | // Validate the date (day, month and year) |
19 | 19 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
20 | 20 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
21 | 21 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
22 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
22 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
23 | 23 | $year = date('Y', $dayTS); |
24 | 24 | $month = date('n', $dayTS); |
25 | 25 | $day = date('j', $dayTS); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'cat' => $cat, |
50 | 50 | 'externalKeys' => 'cat_id', |
51 | 51 | ]; |
52 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
52 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
53 | 53 | /**********************************************************************/ |
54 | 54 | //$eventsArray = $events; |
55 | 55 | |
@@ -138,21 +138,21 @@ discard block |
||
138 | 138 | // Making navig data |
139 | 139 | $navig = [ |
140 | 140 | 'prev' => [ |
141 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
141 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
142 | 142 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
143 | 143 | ], |
144 | 144 | 'this' => [ |
145 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
145 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
146 | 146 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
147 | 147 | ], |
148 | 148 | 'next' => [ |
149 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
149 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
150 | 150 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
151 | 151 | ], |
152 | 152 | ]; |
153 | 153 | |
154 | 154 | // Title of the page |
155 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
155 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
156 | 156 | |
157 | 157 | // Assigning navig data to the template |
158 | 158 | $xoopsTpl->assign('navig', $navig); |
@@ -192,4 +192,4 @@ discard block |
||
192 | 192 | $xoopsTpl->assign('lang', $lang); |
193 | 193 | $xoopsTpl->assign('view', 'calweek'); |
194 | 194 | |
195 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
195 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -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 | |
@@ -41,16 +41,16 @@ discard block |
||
41 | 41 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
42 | 42 | |
43 | 43 | if (isset($_POST['form_preview'])) { |
44 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
44 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
45 | 45 | |
46 | 46 | // Title of the page |
47 | 47 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
48 | 48 | |
49 | 49 | $data = [ |
50 | 50 | 'event_title' => $_POST['event_title'], |
51 | - 'cat_id' => (int)$_POST['cat_id'], |
|
51 | + 'cat_id' => (int) $_POST['cat_id'], |
|
52 | 52 | 'event_desc' => $_POST['event_desc'], |
53 | - 'event_nbmember' => (int)$_POST['event_nbmember'], |
|
53 | + 'event_nbmember' => (int) $_POST['event_nbmember'], |
|
54 | 54 | 'event_contact' => $_POST['event_contact'], |
55 | 55 | 'event_url' => $_POST['event_url'], |
56 | 56 | 'event_email' => $_POST['event_email'], |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | 'event_start' => $_POST['event_start'], |
60 | 60 | 'have_end' => $_POST['have_end'], |
61 | 61 | 'event_end' => $_POST['event_end'], |
62 | - 'dohtml' => (int)$xoopsModuleConfig['allow_html'], |
|
62 | + 'dohtml' => (int) $xoopsModuleConfig['allow_html'], |
|
63 | 63 | 'event_price' => $_POST['event_price'], |
64 | 64 | 'event_organisateur' => $_POST['event_organisateur'], |
65 | 65 | 'event_icone' => $_POST['event_icone'], |
66 | 66 | ]; |
67 | 67 | |
68 | 68 | if (isset($_POST['event_id'])) { |
69 | - $data['event_id'] = (int)$_POST['event_id']; |
|
69 | + $data['event_id'] = (int) $_POST['event_id']; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // Creating tempory event object to apply Object data filtering |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | // // Assigning language data to the template |
86 | 86 | // $xoopsTpl->assign('lang', $lang); |
87 | 87 | |
88 | - $event['cat_id'] = (int)$_POST['cat_id']; |
|
88 | + $event['cat_id'] = (int) $_POST['cat_id']; |
|
89 | 89 | $event['have_end'] = $_POST['have_end']; |
90 | 90 | |
91 | 91 | // Display the submit form |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $xoopsTpl->assign('preview', true); |
96 | 96 | $xoopsTpl->assign('formBody', $formBody); |
97 | 97 | |
98 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
98 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
99 | 99 | } elseif (isset($_POST['form_submit'])) { |
100 | 100 | if (!isset($_POST['rrule_weekly_interval'])) { |
101 | 101 | $_POST['rrule_weekly_interval'] = 0; |
@@ -119,12 +119,12 @@ discard block |
||
119 | 119 | Extcal\Utility::loadImg($_REQUEST, $event_picture1, $event_picture2); |
120 | 120 | /////////////////////////////////////////////////////////////////////////////// |
121 | 121 | |
122 | - require_once __DIR__ . '/class/perm.php'; |
|
122 | + require_once __DIR__.'/class/perm.php'; |
|
123 | 123 | |
124 | 124 | /** @var Extcal\FileHandler $fileHandler */ |
125 | 125 | $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
126 | 126 | $permHandler = Extcal\Perm::getHandler(); |
127 | - $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']); |
|
127 | + $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']); |
|
128 | 128 | |
129 | 129 | $data = [ |
130 | 130 | 'event_title' => $_POST['event_title'], |
@@ -150,11 +150,11 @@ discard block |
||
150 | 150 | ]; |
151 | 151 | |
152 | 152 | if (isset($_POST['event_id'])) { |
153 | - $eventHandler->modifyEvent((int)$_POST['event_id'], $data); |
|
154 | - $fileHandler->updateEventFile((int)$_POST['event_id']); |
|
155 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
153 | + $eventHandler->modifyEvent((int) $_POST['event_id'], $data); |
|
154 | + $fileHandler->updateEventFile((int) $_POST['event_id']); |
|
155 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
156 | 156 | |
157 | - redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
157 | + redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
158 | 158 | } else { |
159 | 159 | $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
160 | 160 | $data['event_submitdate'] = time(); |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | if (1 == $approve) { |
174 | 174 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
175 | 175 | $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
176 | - $cat = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all'); |
|
177 | - $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [ |
|
176 | + $cat = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all'); |
|
177 | + $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [ |
|
178 | 178 | 'EVENT_TITLE' => $_POST['event_title'], |
179 | 179 | 'CAT_NAME' => $cat->getVar('cat_name'), |
180 | 180 | ]); |
@@ -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); |
@@ -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'; |
@@ -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 | |
@@ -116,27 +116,27 @@ discard block |
||
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>'; |
@@ -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 |
@@ -69,23 +69,23 @@ discard block |
||
69 | 69 | |
70 | 70 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
71 | 71 | |
72 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
73 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
74 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
72 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
73 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
74 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
75 | 75 | array_shift($options); |
76 | 76 | array_shift($options); |
77 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
77 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
78 | 78 | if (false === array_search(0, $options)) { |
79 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
79 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
80 | 80 | } else { |
81 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
81 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
82 | 82 | } |
83 | 83 | /** @var Extcal\Category $cat */ |
84 | 84 | foreach ($cats as $cat) { |
85 | 85 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
86 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
86 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
87 | 87 | } else { |
88 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
88 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | $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 |
@@ -66,22 +66,22 @@ discard block |
||
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 | /* Ajour JJD - Evenements par categries */ |
@@ -92,22 +92,22 @@ discard block |
||
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>'; |