@@ -1,15 +1,15 @@ 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_CALMONTH, 'file' => _EXTCAL_FILE_CALMONTH]; |
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 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
11 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
12 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
10 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
11 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
12 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
13 | 13 | /* ========================================================================== */ |
14 | 14 | |
15 | 15 | $form = new XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get'); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'cat' => $cat, |
32 | 32 | 'externalKeys' => 'cat_id', |
33 | 33 | ]; |
34 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
34 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
35 | 35 | /**********************************************************************/ |
36 | 36 | |
37 | 37 | // Calculating timestamp for the begin and the end of the month |
@@ -126,21 +126,21 @@ discard block |
||
126 | 126 | // Making navig data |
127 | 127 | $navig = [ |
128 | 128 | 'prev' => [ |
129 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
129 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
130 | 130 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()), |
131 | 131 | ], |
132 | 132 | 'this' => [ |
133 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
133 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
134 | 134 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
135 | 135 | ], |
136 | 136 | 'next' => [ |
137 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
137 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
138 | 138 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()), |
139 | 139 | ], |
140 | 140 | ]; |
141 | 141 | |
142 | 142 | // Title of the page |
143 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
143 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
144 | 144 | |
145 | 145 | // Assigning navig data to the template |
146 | 146 | $xoopsTpl->assign('navig', $navig); |
@@ -180,4 +180,4 @@ discard block |
||
180 | 180 | $xoopsTpl->assign('lang', $lang); |
181 | 181 | $xoopsTpl->assign('view', 'calmonth'); |
182 | 182 | |
183 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
183 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -33,22 +33,22 @@ discard block |
||
33 | 33 | |
34 | 34 | //---------------------------------------------------------- |
35 | 35 | // Create eXtCal upload directory |
36 | - $indexFile = __DIR__ . '/index.html'; |
|
36 | + $indexFile = __DIR__.'/index.html'; |
|
37 | 37 | |
38 | - $dir = XOOPS_ROOT_PATH . '/uploads/extcal'; |
|
38 | + $dir = XOOPS_ROOT_PATH.'/uploads/extcal'; |
|
39 | 39 | if (!is_dir($dir)) { |
40 | 40 | mkdir($dir, 0777); |
41 | - copy($indexFile, $dir . '/index.html'); |
|
41 | + copy($indexFile, $dir.'/index.html'); |
|
42 | 42 | } |
43 | 43 | |
44 | - $dir = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement'; |
|
44 | + $dir = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement'; |
|
45 | 45 | if (!is_dir($dir)) { |
46 | 46 | mkdir($dir, 0777); |
47 | - copy($indexFile, $dir . '/index.html'); |
|
47 | + copy($indexFile, $dir.'/index.html'); |
|
48 | 48 | } |
49 | 49 | //------------------------------------------------------------ |
50 | 50 | |
51 | - $fld = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/versions/'; |
|
51 | + $fld = XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/versions/'; |
|
52 | 52 | $cls = 'extcal_%1$s'; |
53 | 53 | |
54 | 54 | $version = [ |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | foreach ($version as $key => $val) { |
68 | 68 | if ($previousVersion < $val) { |
69 | 69 | $name = sprintf($cls, $key); |
70 | - $f = $fld . $name . '.php'; |
|
70 | + $f = $fld.$name.'.php'; |
|
71 | 71 | //ext_echo ("<hr>{$f}<hr>"); |
72 | 72 | if (is_readable($f)) { |
73 | 73 | echo "mise à jour version : {$key} = {$val}<br>"; |
@@ -17,18 +17,18 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../../../mainfile.php'; |
|
20 | +require_once __DIR__.'/../../../mainfile.php'; |
|
21 | 21 | $moduleDirName = basename(dirname(__DIR__)); |
22 | 22 | |
23 | 23 | if (!defined('EXTCAL_DIRNAME')) { |
24 | 24 | define('EXTCAL_DIRNAME', $moduleDirName); |
25 | - define('EXTCAL_PATH', XOOPS_ROOT_PATH . '/modules/' . EXTCAL_DIRNAME); |
|
26 | - define('EXTCAL_URL', XOOPS_URL . '/modules/' . EXTCAL_DIRNAME); |
|
27 | - define('EXTCAL_ADMIN', EXTCAL_URL . '/admin/index.php'); |
|
28 | - define('EXTCAL_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . EXTCAL_DIRNAME); |
|
29 | - define('EXTCAL_AUTHOR_LOGOIMG', EXTCAL_URL . '/assets/images/logoModule.png'); |
|
30 | - define('EXTCAL_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
31 | - define('EXTCAL_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
25 | + define('EXTCAL_PATH', XOOPS_ROOT_PATH.'/modules/'.EXTCAL_DIRNAME); |
|
26 | + define('EXTCAL_URL', XOOPS_URL.'/modules/'.EXTCAL_DIRNAME); |
|
27 | + define('EXTCAL_ADMIN', EXTCAL_URL.'/admin/index.php'); |
|
28 | + define('EXTCAL_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.EXTCAL_DIRNAME); |
|
29 | + define('EXTCAL_AUTHOR_LOGOIMG', EXTCAL_URL.'/assets/images/logoModule.png'); |
|
30 | + define('EXTCAL_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
31 | + define('EXTCAL_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | //Configurator |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'name' => 'Module Configurator', |
37 | 37 | 'uploadFolders' => [ |
38 | 38 | EXTCAL_UPLOAD_PATH, |
39 | - EXTCAL_UPLOAD_PATH . '/etablissement' |
|
39 | + EXTCAL_UPLOAD_PATH.'/etablissement' |
|
40 | 40 | ], |
41 | 41 | // 'copyFiles' => array( |
42 | 42 | // EXTCAL_UPLOAD_PATH, |
@@ -57,4 +57,4 @@ discard block |
||
57 | 57 | |
58 | 58 | // module information |
59 | 59 | $mod_copyright = "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
60 | - <img src='" . EXTCAL_AUTHOR_LOGOIMG . "' alt='XOOPS Project'></a>"; |
|
60 | + <img src='" . EXTCAL_AUTHOR_LOGOIMG."' alt='XOOPS Project'></a>"; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | function xoops_module_pre_install_extcal(XoopsModule $module) |
29 | 29 | { |
30 | 30 | $moduleDirName = basename(dirname(__DIR__)); |
31 | - $className = ucfirst($moduleDirName) . 'Utility'; |
|
31 | + $className = ucfirst($moduleDirName).'Utility'; |
|
32 | 32 | if (!class_exists($className)) { |
33 | 33 | xoops_load('utility', $moduleDirName); |
34 | 34 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $mod_tables = $module->getInfo('tables'); |
46 | 46 | foreach ($mod_tables as $table) { |
47 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
47 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return true; |
@@ -73,21 +73,21 @@ discard block |
||
73 | 73 | */ |
74 | 74 | |
75 | 75 | // Access right |
76 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId); |
|
78 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
76 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId); |
|
78 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
79 | 79 | |
80 | 80 | // Can submit |
81 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId); |
|
81 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId); |
|
82 | 82 | |
83 | 83 | // Auto approve |
84 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId); |
|
84 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId); |
|
85 | 85 | |
86 | 86 | // $moduleDirName = $xoopsModule->getVar('dirname'); |
87 | - $configurator = include $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php'); |
|
87 | + $configurator = include $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/config.php'); |
|
88 | 88 | |
89 | 89 | /** @var ExtcalUtility $utilityClass */ |
90 | - $utilityClass = ucfirst($moduleDirName) . 'Utility'; |
|
90 | + $utilityClass = ucfirst($moduleDirName).'Utility'; |
|
91 | 91 | if (!class_exists($utilityClass)) { |
92 | 92 | xoops_load('utility', $moduleDirName); |
93 | 93 | } |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | if (count($configurator['copyFiles']) > 0) { |
102 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
102 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
103 | 103 | foreach (array_keys($configurator['copyFiles']) as $i) { |
104 | - $dest = $configurator['copyFiles'][$i] . '/blank.png'; |
|
104 | + $dest = $configurator['copyFiles'][$i].'/blank.png'; |
|
105 | 105 | $utilityClass::copyFile($file, $dest); |
106 | 106 | } |
107 | 107 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | define('_EXTCAL_CLN_EVENT', 'ExtcalEvent'); |
42 | 42 | |
43 | 43 | //------------------------------------------------------------------- |
44 | -define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__ . '/../class/pear'); |
|
44 | +define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__.'/../class/pear'); |
|
45 | 45 | //define('_EXTCAL_PEAR_ROOT', 'F:/wamp/www/xfr254b/xoops_lib/Frameworks/pear' ); |
46 | 46 | |
47 | 47 | $pear_path = _EXTCAL_PEAR_ROOT_DEFAULT; |
@@ -76,22 +76,22 @@ discard block |
||
76 | 76 | //} |
77 | 77 | define('_EXTCAL_PEAR_ROOT', $pear_path); |
78 | 78 | |
79 | -define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT . '/Calendar'); |
|
80 | -define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT . '/'); |
|
79 | +define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT.'/Calendar'); |
|
80 | +define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT.'/'); |
|
81 | 81 | |
82 | 82 | //------------------------------------------------------------------- |
83 | 83 | define('_EXTCAL_SHOW_NO_PICTURE', false); |
84 | 84 | |
85 | 85 | define('_EXTCAL_PATH_HORLOGES', '/modules/extcal/assets/images/horloges/'); |
86 | -define('_EXTCAL_PATH_ICONS16', XOOPS_URL . '/Frameworks/moduleclasses/icons/16/'); |
|
87 | -define('_EXTCAL_PATH_ICONS32', XOOPS_URL . '/Frameworks/moduleclasses/icons/32/'); |
|
88 | -define('_EXTCAL_PATH_FO', XOOPS_URL . '/modules/extcal/'); |
|
89 | -define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO . 'admin/'); |
|
90 | -define('_EXTCAL_PATH_LG', XOOPS_URL . '/modules/extcal/languages/'); |
|
86 | +define('_EXTCAL_PATH_ICONS16', XOOPS_URL.'/Frameworks/moduleclasses/icons/16/'); |
|
87 | +define('_EXTCAL_PATH_ICONS32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32/'); |
|
88 | +define('_EXTCAL_PATH_FO', XOOPS_URL.'/modules/extcal/'); |
|
89 | +define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO.'admin/'); |
|
90 | +define('_EXTCAL_PATH_LG', XOOPS_URL.'/modules/extcal/languages/'); |
|
91 | 91 | |
92 | 92 | define('_EXTCAL_IMG_INTERVAL', 'interval04.png'); |
93 | -define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16 . _EXTCAL_IMG_INTERVAL); |
|
94 | -define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32 . _EXTCAL_IMG_INTERVAL); |
|
93 | +define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16._EXTCAL_IMG_INTERVAL); |
|
94 | +define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32._EXTCAL_IMG_INTERVAL); |
|
95 | 95 | |
96 | 96 | //define('_EXTCAL_DIRNAME', $xoopsModule->getVar('dirname')); |
97 | 97 | |
@@ -108,22 +108,22 @@ discard block |
||
108 | 108 | |
109 | 109 | define( |
110 | 110 | '_EXTCAL_NAV_LIST', |
111 | - _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT |
|
111 | + _EXTCAL_NAV_CALMONTH."\n"._EXTCAL_NAV_CALWEEK."\n"._EXTCAL_NAV_YEAR."\n"._EXTCAL_NAV_MONTH."\n"._EXTCAL_NAV_WEEK."\n"._EXTCAL_NAV_DAY."\n"._EXTCAL_NAV_AGENDA_WEEK."\n"._EXTCAL_NAV_AGENDA_DAY."\n"._EXTCAL_NAV_SEARCH."\n"._EXTCAL_NAV_NEW_EVENT |
|
112 | 112 | ); |
113 | 113 | |
114 | 114 | define('_EXTCAL_PREFIX_VIEW', 'view_'); |
115 | 115 | define('_EXTCAL_SUFFIX_VIEW', '.php'); |
116 | 116 | |
117 | -define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALMONTH . _EXTCAL_SUFFIX_VIEW); |
|
118 | -define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALWEEK . _EXTCAL_SUFFIX_VIEW); |
|
119 | -define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_YEAR . _EXTCAL_SUFFIX_VIEW); |
|
120 | -define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_MONTH . _EXTCAL_SUFFIX_VIEW); |
|
121 | -define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_WEEK . _EXTCAL_SUFFIX_VIEW); |
|
122 | -define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_DAY . _EXTCAL_SUFFIX_VIEW); |
|
123 | -define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_WEEK . _EXTCAL_SUFFIX_VIEW); |
|
124 | -define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_DAY . _EXTCAL_SUFFIX_VIEW); |
|
125 | -define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_SEARCH . _EXTCAL_SUFFIX_VIEW); |
|
126 | -define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_NEW_EVENT . _EXTCAL_SUFFIX_VIEW); |
|
117 | +define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALMONTH._EXTCAL_SUFFIX_VIEW); |
|
118 | +define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALWEEK._EXTCAL_SUFFIX_VIEW); |
|
119 | +define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_YEAR._EXTCAL_SUFFIX_VIEW); |
|
120 | +define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_MONTH._EXTCAL_SUFFIX_VIEW); |
|
121 | +define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_WEEK._EXTCAL_SUFFIX_VIEW); |
|
122 | +define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_DAY._EXTCAL_SUFFIX_VIEW); |
|
123 | +define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_WEEK._EXTCAL_SUFFIX_VIEW); |
|
124 | +define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_DAY._EXTCAL_SUFFIX_VIEW); |
|
125 | +define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_SEARCH._EXTCAL_SUFFIX_VIEW); |
|
126 | +define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_NEW_EVENT._EXTCAL_SUFFIX_VIEW); |
|
127 | 127 | |
128 | 128 | define('_EXTCAL_MULTILOADER', '/class/xoopsform/multiuploads/formmultiuploads.php'); |
129 | 129 |
@@ -1,17 +1,17 @@ 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_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY]; |
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 | //recupe des variables get |
11 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
12 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
13 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
14 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
11 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
12 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
13 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
14 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
15 | 15 | /* ========================================================================== */ |
16 | 16 | |
17 | 17 | //echo "{$params['view']}-{$year}-{$month}-{$day}<hr>extcal_{$params['view']}.html<br>"; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'nbJours' => $nbJours, |
45 | 45 | 'externalKeys' => 'cat_id', |
46 | 46 | ]; |
47 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
47 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
48 | 48 | /**********************************************************************/ |
49 | 49 | $eventsArray = $events; |
50 | 50 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -99,21 +99,21 @@ discard block |
||
99 | 99 | |
100 | 100 | $navig = [ |
101 | 101 | 'prev' => [ |
102 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
102 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
103 | 103 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()), |
104 | 104 | ], |
105 | 105 | 'this' => [ |
106 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
106 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
107 | 107 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()), |
108 | 108 | ], |
109 | 109 | 'next' => [ |
110 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
110 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
111 | 111 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()), |
112 | 112 | ], |
113 | 113 | ]; |
114 | 114 | |
115 | 115 | // Title of the page |
116 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
116 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
117 | 117 | |
118 | 118 | // Assigning navig data to the template |
119 | 119 | $xoopsTpl->assign('navig', $navig); |
@@ -154,4 +154,4 @@ discard block |
||
154 | 154 | $xoopsTpl->assign('lang', $lang); |
155 | 155 | $xoopsTpl->assign('view', 'agendaday'); |
156 | 156 | |
157 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
157 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -17,28 +17,28 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -include __DIR__ . '/../../mainfile.php'; |
|
21 | -require_once __DIR__ . '/include/constantes.php'; |
|
20 | +include __DIR__.'/../../mainfile.php'; |
|
21 | +require_once __DIR__.'/include/constantes.php'; |
|
22 | 22 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_event.tpl'; |
24 | -require_once __DIR__ . '/header.php'; |
|
24 | +require_once __DIR__.'/header.php'; |
|
25 | 25 | |
26 | 26 | //exit; |
27 | 27 | |
28 | -include XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
28 | +include XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
29 | 29 | |
30 | 30 | if (!isset($_GET['event'])) { |
31 | 31 | $eventId = 0; |
32 | 32 | } else { |
33 | - $eventId = (int)$_GET['event']; |
|
33 | + $eventId = (int) $_GET['event']; |
|
34 | 34 | } |
35 | 35 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
36 | 36 | $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
37 | 37 | $eventMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_MEMBER, _EXTCAL_MODULE); |
38 | 38 | $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE); |
39 | 39 | $permHandler = ExtcalPerm::getHandler(); |
40 | -require_once __DIR__ . '/class/etablissement.php'; |
|
41 | -require_once __DIR__ . '/class/utility.php'; |
|
40 | +require_once __DIR__.'/class/etablissement.php'; |
|
41 | +require_once __DIR__.'/class/utility.php'; |
|
42 | 42 | $myts = MyTextSanitizer::getInstance(); // MyTextSanitizer object |
43 | 43 | |
44 | 44 | if (!function_exists('clear_unicodeslashes')) { |
@@ -228,4 +228,4 @@ discard block |
||
228 | 228 | |
229 | 229 | //function XoopsFormDhtmlTextArea($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = array()); |
230 | 230 | |
231 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
231 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -1,22 +1,22 @@ 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_AGENDA_WEEK, 'file' => _EXTCAL_FILE_AGENDA_WEEK]; |
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 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
11 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
12 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
13 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
10 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
11 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
12 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
13 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
14 | 14 | |
15 | 15 | // Validate the date (day, month and year) |
16 | 16 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
17 | 17 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
18 | 18 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
19 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
19 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
20 | 20 | $year = date('Y', $dayTS); |
21 | 21 | $month = date('n', $dayTS); |
22 | 22 | $day = date('j', $dayTS); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'nbJours' => $nbJours, |
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 | // Formating date |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | //------------------------------------------------------------------- |
82 | 82 | |
83 | 83 | //$params['colJourWidth'] = (int)((((500-50)/$nbJours)/500*100)+.5); |
84 | -$params['colJourWidth'] = (int)((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
84 | +$params['colJourWidth'] = (int) ((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
85 | 85 | // echo "agenda_week : {$dayTS}<br>"; |
86 | 86 | $tAgenda = agenda_getEvents($eventsArray, $dayTS, $hStart, $hEnd, $mTranche, $nbJours); |
87 | 87 | //$exp = print_r($eventsArray, true); |
@@ -103,21 +103,21 @@ discard block |
||
103 | 103 | |
104 | 104 | $navig = [ |
105 | 105 | 'prev' => [ |
106 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
106 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
107 | 107 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
108 | 108 | ], |
109 | 109 | 'this' => [ |
110 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
110 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
111 | 111 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
112 | 112 | ], |
113 | 113 | 'next' => [ |
114 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
114 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
115 | 115 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
116 | 116 | ], |
117 | 117 | ]; |
118 | 118 | |
119 | 119 | // Title of the page |
120 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
120 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
121 | 121 | |
122 | 122 | // Assigning navig data to the template |
123 | 123 | $xoopsTpl->assign('navig', $navig); |
@@ -158,4 +158,4 @@ discard block |
||
158 | 158 | $xoopsTpl->assign('lang', $lang); |
159 | 159 | $xoopsTpl->assign('view', 'agendaweek'); |
160 | 160 | |
161 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
161 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -1,15 +1,15 @@ 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_MONTH, 'file' => _EXTCAL_FILE_MONTH]; |
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 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
11 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
12 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
10 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
11 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
12 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
13 | 13 | /* ========================================================================== */ |
14 | 14 | |
15 | 15 | $form = new XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get'); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'cat' => $cat, |
32 | 32 | 'externalKeys' => 'cat_id', |
33 | 33 | ]; |
34 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
34 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
35 | 35 | /**********************************************************************/ |
36 | 36 | $eventsArray = $events; |
37 | 37 | |
@@ -88,21 +88,21 @@ discard block |
||
88 | 88 | $nMonthCalObj = $monthCalObj->nextMonth('object'); |
89 | 89 | $navig = [ |
90 | 90 | 'prev' => [ |
91 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
91 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
92 | 92 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()), |
93 | 93 | ], |
94 | 94 | 'this' => [ |
95 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
95 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
96 | 96 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
97 | 97 | ], |
98 | 98 | 'next' => [ |
99 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
99 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
100 | 100 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()), |
101 | 101 | ], |
102 | 102 | ]; |
103 | 103 | |
104 | 104 | // Title of the page |
105 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
105 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
106 | 106 | |
107 | 107 | // Assigning navig data to the template |
108 | 108 | $xoopsTpl->assign('navig', $navig); |
@@ -159,4 +159,4 @@ discard block |
||
159 | 159 | $xoopsTpl->assign('lang', $lang); |
160 | 160 | $xoopsTpl->assign('view', 'month'); |
161 | 161 | |
162 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
162 | +include XOOPS_ROOT_PATH.'/footer.php'; |