@@ -58,9 +58,9 @@ |
||
58 | 58 | $rediredtMessage = _MD_EXTCAL_MAX_MEMBER_REACHED; |
59 | 59 | } else { |
60 | 60 | $eventMemberHandler->createEventmember([ |
61 | - 'event_id' => (int)$_POST['event'], |
|
62 | - 'uid' => $xoopsUser->getVar('uid'), |
|
63 | - ]); |
|
61 | + 'event_id' => (int)$_POST['event'], |
|
62 | + 'uid' => $xoopsUser->getVar('uid'), |
|
63 | + ]); |
|
64 | 64 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_1, _MD_EXTCAL_MSG_1); |
65 | 65 | $rediredtMessage = _MD_EXTCAL_WHOS_GOING_ADDED_TO_EVENT; |
66 | 66 | } |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | 4 | |
5 | -require_once __DIR__ . '/include/constantes.php'; |
|
6 | -require_once __DIR__ . '/include/mail_fnc.php'; |
|
7 | -require_once __DIR__ . '/class/utility.php'; |
|
5 | +require_once __DIR__.'/include/constantes.php'; |
|
6 | +require_once __DIR__.'/include/mail_fnc.php'; |
|
7 | +require_once __DIR__.'/class/utility.php'; |
|
8 | 8 | |
9 | 9 | // $member_uid = 1; |
10 | 10 | // $event_id = 393; |
@@ -39,26 +39,26 @@ discard block |
||
39 | 39 | //echo "<hr>"; |
40 | 40 | |
41 | 41 | if (!$GLOBALS['xoopsSecurity']->check()) { |
42 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
42 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($xoopsUser && $xoopsModuleConfig['whos_going']) { |
46 | 46 | // If param are right |
47 | - if ((int)$_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) { |
|
47 | + if ((int) $_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) { |
|
48 | 48 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
49 | 49 | $eventMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_MEMBER, _EXTCAL_MODULE); |
50 | 50 | |
51 | 51 | // If the user have to be added |
52 | 52 | if ('add' === $_POST['mode']) { |
53 | - $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
|
53 | + $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser); |
|
54 | 54 | |
55 | 55 | if ($event->getVar('event_nbmember') > 0 |
56 | - && $eventMemberHandler->getNbMember((int)$_POST['event']) >= $event->getVar('event_nbmember')) { |
|
56 | + && $eventMemberHandler->getNbMember((int) $_POST['event']) >= $event->getVar('event_nbmember')) { |
|
57 | 57 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_0, _MD_EXTCAL_MSG_0); |
58 | 58 | $rediredtMessage = _MD_EXTCAL_MAX_MEMBER_REACHED; |
59 | 59 | } else { |
60 | 60 | $eventMemberHandler->createEventmember([ |
61 | - 'event_id' => (int)$_POST['event'], |
|
61 | + 'event_id' => (int) $_POST['event'], |
|
62 | 62 | 'uid' => $xoopsUser->getVar('uid'), |
63 | 63 | ]); |
64 | 64 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_1, _MD_EXTCAL_MSG_1); |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | // If the user have to be remove |
68 | 68 | } else { |
69 | 69 | if ('remove' === $_POST['mode']) { |
70 | - $eventMemberHandler->deleteEventmember([(int)$_POST['event'], $xoopsUser->getVar('uid')]); |
|
70 | + $eventMemberHandler->deleteEventmember([(int) $_POST['event'], $xoopsUser->getVar('uid')]); |
|
71 | 71 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_2, _MD_EXTCAL_MSG_2); |
72 | 72 | $rediredtMessage = _MD_EXTCAL_WHOS_GOING_REMOVED_TO_EVENT; |
73 | 73 | } |
74 | 74 | } |
75 | - redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false); |
|
75 | + redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false); |
|
76 | 76 | } else { |
77 | 77 | redirect_header('index.php', 3, _NOPERM, false); |
78 | 78 | } |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -require_once __DIR__ . '/include/constantes.php'; |
|
5 | -$params = [ |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +require_once __DIR__.'/include/constantes.php'; |
|
5 | +$params = [ |
|
6 | 6 | 'view' => _EXTCAL_NAV_SEARCH, |
7 | 7 | 'file' => _EXTCAL_FILE_SEARCH, |
8 | 8 | ]; |
9 | 9 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
10 | -require_once __DIR__ . '/header.php'; |
|
10 | +require_once __DIR__.'/header.php'; |
|
11 | 11 | |
12 | 12 | $recurEventsArray = []; |
13 | 13 | //needed to save the state of the form, so we don't show on the first time the list of available events |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | /***************************************************************/ |
20 | 20 | $searchExp = isset($_POST['searchExp']) ? $_POST['searchExp'] : ''; |
21 | 21 | $andor = isset($_POST['andor']) ? $_POST['andor'] : ''; |
22 | -$year = isset($_POST['year']) ? (int)$_POST['year'] : date('Y'); |
|
23 | -$month = isset($_POST['month']) ? (int)$_POST['month'] : date('n'); |
|
24 | -$day = isset($_POST['day']) ? (int)$_POST['day'] : 0; |
|
25 | -$cat = isset($_POST['cat']) ? (int)$_POST['cat'] : 0; |
|
22 | +$year = isset($_POST['year']) ? (int) $_POST['year'] : date('Y'); |
|
23 | +$month = isset($_POST['month']) ? (int) $_POST['month'] : date('n'); |
|
24 | +$day = isset($_POST['day']) ? (int) $_POST['day'] : 0; |
|
25 | +$cat = isset($_POST['cat']) ? (int) $_POST['cat'] : 0; |
|
26 | 26 | $orderby1 = isset($_POST['orderby1']) ? $_POST['orderby1'] : 'cat_name ASC'; |
27 | 27 | $orderby2 = isset($_POST['orderby2']) ? $_POST['orderby2'] : 'event_title ASC'; |
28 | 28 | $orderby3 = isset($_POST['orderby3']) ? $_POST['orderby3'] : ''; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
146 | -$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray); |
|
146 | +$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray); |
|
147 | 147 | |
148 | 148 | // Sort event array by event start |
149 | 149 | //usort($eventsArray, "orderEvents"); |
@@ -234,4 +234,4 @@ discard block |
||
234 | 234 | $xoopsTpl->assign('lang', $lang); |
235 | 235 | $xoopsTpl->assign('view', 'search'); |
236 | 236 | |
237 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
237 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
4 | -require_once __DIR__ . '/include/constantes.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | +require_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
7 | -require_once __DIR__ . '/header.php'; |
|
7 | +require_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | 9 | /* ========================================================================== */ |
10 | 10 | //ext_echoArray($_GET); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | //exit; |
18 | 18 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
19 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
19 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
20 | 20 | |
21 | 21 | // Title of the page |
22 | 22 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $xoopsTpl->assign('lang', $lang); |
59 | 59 | $xoopsTpl->assign('view', 'newevent'); |
60 | 60 | |
61 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
61 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
62 | 62 | } else { |
63 | 63 | redirect_header('index.php', 3); |
64 | 64 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof XoopsUser) |
22 | 22 | || !$GLOBALS['xoopsUser']->IsAdmin()) { |
23 | - exit('Restricted access' . PHP_EOL); |
|
23 | + exit('Restricted access'.PHP_EOL); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | function xoops_module_pre_update_extcal(XoopsModule $xoopsModule) |
46 | 46 | { |
47 | 47 | $moduleDirName = basename(dirname(__DIR__)); |
48 | - $utilityClass = ucfirst($moduleDirName) . 'Utility'; |
|
48 | + $utilityClass = ucfirst($moduleDirName).'Utility'; |
|
49 | 49 | if (!class_exists($utilityClass)) { |
50 | 50 | xoops_load('utility', $moduleDirName); |
51 | 51 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | return true; |
82 | 82 | } |
83 | 83 | |
84 | - $fld = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/versions/'; |
|
84 | + $fld = XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/versions/'; |
|
85 | 85 | $cls = 'extcal_%1$s'; |
86 | 86 | |
87 | 87 | $version = [ |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | foreach ($version as $key => $val) { |
101 | 101 | if ($previousVersion < $val) { |
102 | 102 | $name = sprintf($cls, $key); |
103 | - $f = $fld . $name . '.php'; |
|
103 | + $f = $fld.$name.'.php'; |
|
104 | 104 | //ext_echo ("<hr>{$f}<hr>"); |
105 | 105 | if (is_readable($f)) { |
106 | 106 | echo "mise à jour version : {$key} = {$val}<br>"; |
@@ -111,9 +111,9 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | if ($previousVersion < 240) { |
114 | - $configurator = include __DIR__ . '/config.php'; |
|
114 | + $configurator = include __DIR__.'/config.php'; |
|
115 | 115 | /** @var ExtcalUtility $utilityClass */ |
116 | - $utilityClass = ucfirst($moduleDirName) . 'Utility'; |
|
116 | + $utilityClass = ucfirst($moduleDirName).'Utility'; |
|
117 | 117 | if (!class_exists($utilityClass)) { |
118 | 118 | xoops_load('utility', $moduleDirName); |
119 | 119 | } |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | //delete old HTML templates |
122 | 122 | if (count($configurator['templateFolders']) > 0) { |
123 | 123 | foreach ($configurator['templateFolders'] as $folder) { |
124 | - $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
124 | + $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder); |
|
125 | 125 | if (is_dir($templateFolder)) { |
126 | 126 | $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']); |
127 | 127 | foreach ($templateList as $k => $v) { |
128 | - $fileInfo = new SplFileInfo($templateFolder . $v); |
|
128 | + $fileInfo = new SplFileInfo($templateFolder.$v); |
|
129 | 129 | if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) { |
130 | - if (file_exists($templateFolder . $v)) { |
|
131 | - unlink($templateFolder . $v); |
|
130 | + if (file_exists($templateFolder.$v)) { |
|
131 | + unlink($templateFolder.$v); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | } |
@@ -138,9 +138,9 @@ discard block |
||
138 | 138 | |
139 | 139 | // --- COPY blank.png FILES --------------- |
140 | 140 | if (count($configurator['copyFiles']) > 0) { |
141 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
141 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
142 | 142 | foreach (array_keys($configurator['copyFiles']) as $i) { |
143 | - $dest = $configurator['copyFiles'][$i] . '/blank.png'; |
|
143 | + $dest = $configurator['copyFiles'][$i].'/blank.png'; |
|
144 | 144 | $utilityClass::copyFile($file, $dest); |
145 | 145 | } |
146 | 146 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if (count($configurator['oldFiles']) > 0) { |
150 | 150 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
151 | 151 | foreach (array_keys($configurator['oldFiles']) as $i) { |
152 | - $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator['oldFiles'][$i]); |
|
152 | + $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator['oldFiles'][$i]); |
|
153 | 153 | if (is_file($tempFile)) { |
154 | 154 | unlink($tempFile); |
155 | 155 | } |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | //--------------------- |
160 | 160 | |
161 | 161 | //delete .html entries from the tpl table |
162 | - $sql = 'DELETE FROM ' . $xoopsDB->prefix('tplfile') . " WHERE `tpl_module` = '" . $xoopsModule->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'"; |
|
162 | + $sql = 'DELETE FROM '.$xoopsDB->prefix('tplfile')." WHERE `tpl_module` = '".$xoopsModule->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'"; |
|
163 | 163 | $xoopsDB->queryF($sql); |
164 | 164 | |
165 | 165 | // Load class XoopsFile ==================== |
166 | 166 | xoops_load('XoopsFile'); |
167 | 167 | |
168 | 168 | //delete /images directory ============ |
169 | - $imagesDirectory = $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname', 'n') . '/images/'); |
|
169 | + $imagesDirectory = $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname', 'n').'/images/'); |
|
170 | 170 | $folderHandler = XoopsFile::getHandler('folder', $imagesDirectory); |
171 | 171 | $folderHandler->delete($imagesDirectory); |
172 | 172 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../include/constantes.php'; |
|
20 | +require_once __DIR__.'/../include/constantes.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @param $options |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function bExtcalNewShow($options) |
28 | 28 | { |
29 | - require_once __DIR__ . '/../class/config.php'; |
|
29 | + require_once __DIR__.'/../class/config.php'; |
|
30 | 30 | |
31 | 31 | // Retriving module config |
32 | 32 | $extcalConfig = ExtcalConfig::getHandler(); |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | |
65 | 65 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
66 | 66 | |
67 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
68 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
69 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
67 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
68 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
69 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
70 | 70 | array_shift($options); |
71 | 71 | array_shift($options); |
72 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
72 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
73 | 73 | if (false === array_search(0, $options)) { |
74 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
74 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
75 | 75 | } else { |
76 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
76 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
77 | 77 | } |
78 | 78 | foreach ($cats as $cat) { |
79 | 79 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
80 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
80 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
81 | 81 | } else { |
82 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
82 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | $form .= '</select>'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../include/constantes.php'; |
|
20 | +require_once __DIR__.'/../include/constantes.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @param $options |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function bExtcalDayShow($options) |
28 | 28 | { |
29 | - require_once __DIR__ . '/../class/config.php'; |
|
29 | + require_once __DIR__.'/../class/config.php'; |
|
30 | 30 | |
31 | 31 | // Retriving module config |
32 | 32 | $extcalConfig = ExtcalConfig::getHandler(); |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | |
65 | 65 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
66 | 66 | |
67 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
68 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
69 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
67 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
68 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
69 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
70 | 70 | array_shift($options); |
71 | 71 | array_shift($options); |
72 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
72 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
73 | 73 | if (false === array_search(0, $options)) { |
74 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
74 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
75 | 75 | } else { |
76 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
76 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
77 | 77 | } |
78 | 78 | foreach ($cats as $cat) { |
79 | 79 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
80 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
80 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
81 | 81 | } else { |
82 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
82 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | $form .= '</select>'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../include/constantes.php'; |
|
20 | +require_once __DIR__.'/../include/constantes.php'; |
|
21 | 21 | |
22 | 22 | /******************************************************/ |
23 | 23 | /* Ajour JJD - Evenements par categries */ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | global $xoopsUser, $extcalConfig; |
33 | 33 | |
34 | - require_once __DIR__ . '/../class/config.php'; |
|
34 | + require_once __DIR__.'/../class/config.php'; |
|
35 | 35 | |
36 | 36 | // Retriving module config |
37 | 37 | // $extcalConfig = ExtcalConfig::getHandler(); |
@@ -88,22 +88,22 @@ discard block |
||
88 | 88 | |
89 | 89 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
90 | 90 | |
91 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
92 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
93 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
91 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
92 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
93 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
94 | 94 | array_shift($options); |
95 | 95 | array_shift($options); |
96 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
96 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
97 | 97 | if (false === array_search(0, $options)) { |
98 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
98 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
99 | 99 | } else { |
100 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
100 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
101 | 101 | } |
102 | 102 | foreach ($cats as $cat) { |
103 | 103 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
104 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
104 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
105 | 105 | } else { |
106 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
106 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | $form .= '</select>'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../include/constantes.php'; |
|
20 | +require_once __DIR__.'/../include/constantes.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @param $options |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function bExtcalRandomShow($options) |
28 | 28 | { |
29 | - require_once __DIR__ . '/../class/config.php'; |
|
29 | + require_once __DIR__.'/../class/config.php'; |
|
30 | 30 | |
31 | 31 | // Retriving module config |
32 | 32 | $extcalConfig = ExtcalConfig::getHandler(); |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | |
65 | 65 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
66 | 66 | |
67 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
68 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
69 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
67 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
68 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
69 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
70 | 70 | array_shift($options); |
71 | 71 | array_shift($options); |
72 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
72 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
73 | 73 | if (false === array_search(0, $options)) { |
74 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
74 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
75 | 75 | } else { |
76 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
76 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
77 | 77 | } |
78 | 78 | foreach ($cats as $cat) { |
79 | 79 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
80 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
80 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
81 | 81 | } else { |
82 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
82 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | $form .= '</select>'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../include/constantes.php'; |
|
20 | +require_once __DIR__.'/../include/constantes.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @param $options |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function bExtcalUpcomingShow($options) |
28 | 28 | { |
29 | - require_once __DIR__ . '/../class/config.php'; |
|
29 | + require_once __DIR__.'/../class/config.php'; |
|
30 | 30 | |
31 | 31 | // Retriving module config |
32 | 32 | $extcalConfig = ExtcalConfig::getHandler(); |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | //mb $events = $eventHandler->objectToArray($eventHandler->getUpcommingEvent($nbEvent, $options)); |
52 | 52 | |
53 | 53 | /* ========================================================================== */ |
54 | - $year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
55 | - $month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
56 | - $day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
57 | - $cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
54 | + $year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
55 | + $month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
56 | + $day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
57 | + $cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
58 | 58 | /* ========================================================================== */ |
59 | 59 | |
60 | 60 | // Validate the date (day, month and year) |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'nbEvent' => $nbEvent, |
88 | 88 | 'nbDays' => $nbDays, |
89 | 89 | ]; |
90 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
90 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
91 | 91 | |
92 | 92 | //---------------------------- |
93 | 93 | |
@@ -114,27 +114,27 @@ discard block |
||
114 | 114 | |
115 | 115 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
116 | 116 | |
117 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
118 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
119 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
117 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
118 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
119 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
120 | 120 | |
121 | - $form .= _MB_EXTCAL_UPCOMING_DAYS . ' : <input name="options[2]" size="5" maxlength="255" value="' . $options[2] . '" type="text"><br>'; |
|
121 | + $form .= _MB_EXTCAL_UPCOMING_DAYS.' : <input name="options[2]" size="5" maxlength="255" value="'.$options[2].'" type="text"><br>'; |
|
122 | 122 | |
123 | 123 | array_shift($options); |
124 | 124 | array_shift($options); |
125 | 125 | array_shift($options); |
126 | 126 | |
127 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
127 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
128 | 128 | if (false === array_search(0, $options)) { |
129 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
129 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
130 | 130 | } else { |
131 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
131 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
132 | 132 | } |
133 | 133 | foreach ($cats as $cat) { |
134 | 134 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
135 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
135 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
136 | 136 | } else { |
137 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
137 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | $form .= '</select>'; |