Completed
Push — master ( a9decc...a21b67 )
by Michael
02:51
created

include/constantes.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 26 and the first side effect is on line 47.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright    {@link https://xoops.org/ XOOPS Project}
14
 * @license      {@link http://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
15
 * @package      extcal
16
 * @since
17
 * @author       XOOPS Development Team,
18
 *
19
 * L'utilisation de ce formulaire d'adminitration suppose
20
 * que la classe correspondante de la table a été générées avec classGenerator
21
 **/
22
23
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
24
25
//modif JJD
26
define('_EXTCAL_MODULE', 'extcal');
27
28
define('_EXTCAL_CLS_CAT', 'cat');
29
define('_EXTCAL_CLS_FILE', 'file');
30
define('_EXTCAL_CLS_MEMBER', 'eventmember');
31
define('_EXTCAL_CLS_NOT_MEMBER', 'eventnotmember');
32
define('_EXTCAL_CLS_ETABLISSEMENT', 'etablissement');
33
34
define('_EXTCAL_CLN_CAT', 'ExtcalCat');
35
define('_EXTCAL_CLN_FILE', 'ExtcalFile');
36
define('_EXTCAL_CLN_MEMBER', 'ExtcalEventmember');
37
define('_EXTCAL_CLN_NOT_MEMBER', 'ExtcalEventNotMember');
38
define('_EXTCAL_CLN_ETABLISSEMENT', 'ExtcalEtablissement');
39
40
define('_EXTCAL_CLS_EVENT', 'event');
41
define('_EXTCAL_CLN_EVENT', 'ExtcalEvent');
42
43
//-------------------------------------------------------------------
44
define('_EXTCAL_PEAR_ROOT_DEFAULT', __DIR__ . '/../class/pear');
45
//define('_EXTCAL_PEAR_ROOT', 'F:/wamp/www/xfr254b/xoops_lib/Frameworks/pear' );
46
47
$pear_path = _EXTCAL_PEAR_ROOT_DEFAULT;
48
global $xoopsModule, $xoopsModuleConfig;
49
50
$name = '';
51
if (is_object($xoopsModule)) {
52
    $name = $xoopsModule->getVar('name');
53
}
54
55
/** @var XoopsModuleHandler $moduleHandler */
56
$moduleHandler = xoops_getHandler('module');
57
$module        = $moduleHandler->getByDirname('extcal');
58
59
if ($name === 'extcal' || is_object($module)) {
60
    if (is_object($xoopsModuleConfig)) {
61
        $extcalConfig = $xoopsModuleConfig;
62
    } else {
63
        $configHandler = xoops_getHandler('config');
64
        $extcalConfig  = $configHandler->getConfigList($module->getVar('mid'));
65
    }
66
}
67
68
//////////////////////////////////
69
70
//$newPP = trim($extcalConfig['pear_path']);
71
//if (substr($newPP, -1, 1) == '/') {
72
//    $newPP = substr($newPP, 0, -1);
73
//}
74
//if ($newPP <> '' && is_dir($newPP)) {
75
//    $pear_path = $newPP;
76
//}
77
define('_EXTCAL_PEAR_ROOT', $pear_path);
78
79
define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT . '/Calendar');
80
define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT . '/');
81
82
//-------------------------------------------------------------------
83
define('_EXTCAL_SHOW_NO_PICTURE', false);
84
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/');
91
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);
95
96
//define('_EXTCAL_DIRNAME',    $xoopsModule->getVar('dirname'));
97
98
define('_EXTCAL_NAV_CALMONTH', 'calendar-month');
99
define('_EXTCAL_NAV_CALWEEK', 'calendar-week');
100
define('_EXTCAL_NAV_YEAR', 'year');
101
define('_EXTCAL_NAV_MONTH', 'month');
102
define('_EXTCAL_NAV_WEEK', 'week');
103
define('_EXTCAL_NAV_DAY', 'day');
104
define('_EXTCAL_NAV_AGENDA_WEEK', 'agenda-week');
105
define('_EXTCAL_NAV_AGENDA_DAY', 'agenda-day');
106
define('_EXTCAL_NAV_SEARCH', 'search');
107
define('_EXTCAL_NAV_NEW_EVENT', 'new-event');
108
109
define('_EXTCAL_NAV_LIST', _EXTCAL_NAV_CALMONTH
110
                           . "\n"
111
                           . _EXTCAL_NAV_CALWEEK
112
                           . "\n"
113
                           . _EXTCAL_NAV_YEAR
114
                           . "\n"
115
                           . _EXTCAL_NAV_MONTH
116
                           . "\n"
117
                           . _EXTCAL_NAV_WEEK
118
                           . "\n"
119
                           . _EXTCAL_NAV_DAY
120
                           . "\n"
121
                           . _EXTCAL_NAV_AGENDA_WEEK
122
                           . "\n"
123
                           . _EXTCAL_NAV_AGENDA_DAY
124
                           . "\n"
125
                           . _EXTCAL_NAV_SEARCH
126
                           . "\n"
127
                           . _EXTCAL_NAV_NEW_EVENT);
128
129
define('_EXTCAL_PREFIX_VIEW', 'view_');
130
define('_EXTCAL_SUFFIX_VIEW', '.php');
131
132
define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALMONTH . _EXTCAL_SUFFIX_VIEW);
133
define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALWEEK . _EXTCAL_SUFFIX_VIEW);
134
define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_YEAR . _EXTCAL_SUFFIX_VIEW);
135
define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_MONTH . _EXTCAL_SUFFIX_VIEW);
136
define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_WEEK . _EXTCAL_SUFFIX_VIEW);
137
define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_DAY . _EXTCAL_SUFFIX_VIEW);
138
define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_WEEK . _EXTCAL_SUFFIX_VIEW);
139
define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_DAY . _EXTCAL_SUFFIX_VIEW);
140
define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_SEARCH . _EXTCAL_SUFFIX_VIEW);
141
define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_NEW_EVENT . _EXTCAL_SUFFIX_VIEW);
142
143
define('_EXTCAL_MULTILOADER', '/class/xoopsform/multiuploads/formmultiuploads.php');
144
145
define('_EXTCAL_STATUS_NONE', 0);
146
// define("_EXTCAL_STATUS_INSCRIPTION", 1);
147
// define("_EXTCAL_STATUS_DESINSCRIPTION", 2);
148
// define("_EXTCAL_STATUS_DELEGATION", 3);
149
// define("_EXTCAL_STATUS_MESSAGE", 4);
150
151
define('_EXTCAL_STATUS_COME', 1);
152
define('_EXTCAL_STATUS_NOTCOME', 2);
153
154
define('_EXTCAL_HEADER_TEXT', 0);
155
define('_EXTCAL_HEADER_HTML', 1);
156
157
//---------------------------------------------------
158
define('_EXTCAL_EVENTS_DAY', 0);
159
160
define('_EXTCAL_EVENTS_MONTH', 1);
161
define('_EXTCAL_EVENTS_CALENDAR_MONTH', 2);
162
163
define('_EXTCAL_EVENTS_WEEK', 4);
164
define('_EXTCAL_EVENTS_CALENDAR_WEEK', 3);
165
define('_EXTCAL_EVENTS_AGENDA_WEEK', 5);
166
167
define('_EXTCAL_EVENTS_YEAR', 6);
168
169
//---------------------------------------------------
170
define('_EXTCAL_TS_SECOND', 1);
171
define('_EXTCAL_TS_MINUTE', 60);
172
define('_EXTCAL_TS_HOUR', 3600);
173
define('_EXTCAL_TS_DAY', 86400);
174
define('_EXTCAL_TS_WEEK', 604800);
175
//---------------------------------------------------
176
define('_EXTCAL_TS_YEARLY', 32140800);
177
178
define('_EXTCAL_MOTIF_DATE', "#(19|20)\d{2}-(0?[1-9]|1[0-2])-(?x)(0?[1-9]|[12][0-9]|3[01])#");
179
180
define('_EXTCAL_INFOBULLE_RGB_MIN', 220);
181
define('_EXTCAL_INFOBULLE_RGB_MAX', 250);
182
183
//2.37
184
define('_EXTCAL_EVENTS_UPCOMING', 7);
185