@@ -2,11 +2,11 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
5 | +require_once dirname(dirname(__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 | /** @var Extcal\Helper $helper */ |
12 | 12 | $helper = Extcal\Helper::getInstance(); |
@@ -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 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -104,21 +104,21 @@ discard block |
||
104 | 104 | |
105 | 105 | $navig = [ |
106 | 106 | 'prev' => [ |
107 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
107 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
108 | 108 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $pDayCalObj->getTimestamp()), |
109 | 109 | ], |
110 | 110 | 'this' => [ |
111 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
111 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
112 | 112 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $dayCalObj->getTimestamp()), |
113 | 113 | ], |
114 | 114 | 'next' => [ |
115 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
115 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
116 | 116 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $nDayCalObj->getTimestamp()), |
117 | 117 | ], |
118 | 118 | ]; |
119 | 119 | |
120 | 120 | // Title of the page |
121 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
121 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
122 | 122 | |
123 | 123 | // Assigning navig data to the template |
124 | 124 | $xoopsTpl->assign('navig', $navig); |
@@ -159,4 +159,4 @@ discard block |
||
159 | 159 | $xoopsTpl->assign('lang', $lang); |
160 | 160 | $xoopsTpl->assign('view', 'agendaday'); |
161 | 161 | |
162 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
162 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -17,14 +17,14 @@ |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
20 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
21 | 21 | $com_itemid = \Xmf\Request::getInt('com_itemid', 0, 'GET'); |
22 | 22 | if ($com_itemid > 0) { |
23 | 23 | // Get link title |
24 | - $sql = 'SELECT event_title, event_desc FROM ' . $xoopsDB->prefix('extcal_event') . ' WHERE event_id=' . $com_itemid . ' '; |
|
24 | + $sql = 'SELECT event_title, event_desc FROM '.$xoopsDB->prefix('extcal_event').' WHERE event_id='.$com_itemid.' '; |
|
25 | 25 | $result = $xoopsDB->query($sql); |
26 | 26 | $row = $xoopsDB->fetchArray($result); |
27 | 27 | $com_replytitle = $row['event_title']; |
28 | 28 | $com_replytext = $row['event_desc']; |
29 | - require_once XOOPS_ROOT_PATH . '/include/comment_new.php'; |
|
29 | + require_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
|
30 | 30 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once dirname(dirname(__DIR__)) . '/include/constantes.php'; |
|
3 | +require_once dirname(dirname(__DIR__)).'/include/constantes.php'; |
|
4 | 4 | define('_MI_EXTCAL_NAME', 'eXtCal'); |
5 | 5 | define('_MI_EXTCAL_ABOUT', 'About'); |
6 | 6 | define('_MI_EXTCAL_AFTER', 'After'); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | define('_MI_EXTCAL_START_PAGE', 'Module home page'); |
136 | 136 | define('_MI_EXTCAL_SUBMIT_EVENT', 'Submit Event'); |
137 | 137 | define('_MI_EXTCAL_TABS_WEIGHT', 'Order of the Tabs'); |
138 | -define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>' . "<span style='color:#0000FF;'>" . _EXTCAL_NAV_LIST . '</span>' . ' <br>Separator: new line'); |
|
138 | +define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>'."<span style='color:#0000FF;'>"._EXTCAL_NAV_LIST.'</span>'.' <br>Separator: new line'); |
|
139 | 139 | define('_MI_EXTCAL_VISIBLE_TAB_DESC', 'Define the visible view.'); |
140 | 140 | define('_MI_EXTCAL_VISIBLE_TABS', 'Visible tab'); |
141 | 141 | define('_MI_EXTCAL_WEEK_START_DAY', 'Week start Day'); |
@@ -162,6 +162,6 @@ discard block |
||
162 | 162 | |
163 | 163 | //Help |
164 | 164 | define('_MI_EXTCAL_DIRNAME', basename(dirname(dirname(__DIR__)))); |
165 | -define('_MI_EXTCAL_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
165 | +define('_MI_EXTCAL_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
166 | 166 | define('_MI_EXTCAL_BACK_2_ADMIN', 'Back to Administration of '); |
167 | 167 | define('_MI_EXTCAL_OVERVIEW', 'Overview'); |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
4 | -require_once XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
3 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
4 | +require_once XOOPS_ROOT_PATH.'/include/notification_update.php'; |
@@ -2,15 +2,15 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
5 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | 7 | |
8 | 8 | /** @var Extcal\Helper $helper */ |
9 | 9 | $helper = Extcal\Helper::getInstance(); |
10 | 10 | |
11 | 11 | $params = ['view' => _EXTCAL_NAV_MONTH, 'file' => _EXTCAL_FILE_MONTH]; |
12 | 12 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
13 | -require_once __DIR__ . '/header.php'; |
|
13 | +require_once __DIR__.'/header.php'; |
|
14 | 14 | |
15 | 15 | /* ========================================================================== */ |
16 | 16 | $year = \Xmf\Request::getInt('year', date('Y'), 'GET'); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'cat' => $cat, |
38 | 38 | 'externalKeys' => 'cat_id', |
39 | 39 | ]; |
40 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
40 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
41 | 41 | /**********************************************************************/ |
42 | 42 | $eventsArray = $events; |
43 | 43 | |
@@ -94,21 +94,21 @@ discard block |
||
94 | 94 | $nMonthCalObj = $monthCalObj->nextMonth('object'); |
95 | 95 | $navig = [ |
96 | 96 | 'prev' => [ |
97 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
97 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
98 | 98 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_month'), $pMonthCalObj->getTimestamp()), |
99 | 99 | ], |
100 | 100 | 'this' => [ |
101 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
101 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
102 | 102 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_month'), $monthCalObj->getTimestamp()), |
103 | 103 | ], |
104 | 104 | 'next' => [ |
105 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
105 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
106 | 106 | 'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_month'), $nMonthCalObj->getTimestamp()), |
107 | 107 | ], |
108 | 108 | ]; |
109 | 109 | |
110 | 110 | // Title of the page |
111 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
111 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
112 | 112 | |
113 | 113 | // Assigning navig data to the template |
114 | 114 | $xoopsTpl->assign('navig', $navig); |
@@ -165,4 +165,4 @@ discard block |
||
165 | 165 | $xoopsTpl->assign('lang', $lang); |
166 | 166 | $xoopsTpl->assign('view', 'month'); |
167 | 167 | |
168 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
168 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -2,9 +2,9 @@ discard block |
||
2 | 2 | |
3 | 3 | use XoopsModules\Extcal; |
4 | 4 | |
5 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
6 | -require_once __DIR__ . '/include/constantes.php'; |
|
7 | -require_once __DIR__ . '/header.php'; |
|
5 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
6 | +require_once __DIR__.'/include/constantes.php'; |
|
7 | +require_once __DIR__.'/header.php'; |
|
8 | 8 | |
9 | 9 | // Getting eXtCal object's handler |
10 | 10 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $permHandler = Extcal\Perm::getHandler(); |
13 | 13 | $xoopsUser = $xoopsUser ?: null; |
14 | 14 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
15 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
15 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
16 | 16 | |
17 | 17 | // Title of the page |
18 | 18 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | //$form->display(); |
24 | 24 | |
25 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
25 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
26 | 26 | } else { |
27 | 27 | redirect_header('index.php', 3); |
28 | 28 | } |
@@ -17,5 +17,5 @@ |
||
17 | 17 | * @author XOOPS Development Team, |
18 | 18 | */ |
19 | 19 | |
20 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
21 | -require_once XOOPS_ROOT_PATH . '/include/comment_delete.php'; |
|
20 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
21 | +require_once XOOPS_ROOT_PATH.'/include/comment_delete.php'; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | $step = $_POST['step']; |
6 | 6 | } |
7 | 7 | |
8 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
9 | -require_once __DIR__ . '/function.php'; |
|
8 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
9 | +require_once __DIR__.'/function.php'; |
|
10 | 10 | |
11 | 11 | // Change this variable if you use a cloned version of eXtGallery |
12 | 12 | $localModuleDir = 'extcal'; |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | $downloadServer = 'http://downloads.sourceforge.net/zoullou/'; |
17 | 17 | |
18 | 18 | $lastVersion = @file_get_contents($versionFile); |
19 | -$lastVersionString = substr($lastVersion, 0, 1) . '.' . substr($lastVersion, 1, 1) . '.' . substr($lastVersion, 2, 1); |
|
20 | -$moduleFileName = $moduleName . '-' . $lastVersionString . '.tar.gz'; |
|
21 | -$langFileName = $moduleName . '-lang-' . $lastVersionString . '_' . $xoopsConfig['language'] . '.tar.gz'; |
|
19 | +$lastVersionString = substr($lastVersion, 0, 1).'.'.substr($lastVersion, 1, 1).'.'.substr($lastVersion, 2, 1); |
|
20 | +$moduleFileName = $moduleName.'-'.$lastVersionString.'.tar.gz'; |
|
21 | +$langFileName = $moduleName.'-lang-'.$lastVersionString.'_'.$xoopsConfig['language'].'.tar.gz'; |
|
22 | 22 | |
23 | 23 | switch ($step) { |
24 | 24 | case 'download': |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | break; |
31 | 31 | } |
32 | 32 | |
33 | - if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) { |
|
33 | + if (!$handle = @fopen($downloadServer.$moduleFileName, 'r')) { |
|
34 | 34 | printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName); |
35 | 35 | xoops_cp_footer(); |
36 | 36 | break; |
37 | 37 | } |
38 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+'); |
|
38 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, 'w+'); |
|
39 | 39 | |
40 | 40 | // Downlad module archive |
41 | 41 | if ($handle) { |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | |
50 | 50 | // English file are included on module package |
51 | 51 | if ('english' !== $xoopsConfig['language']) { |
52 | - if (!$handle = @fopen($downloadServer . $langFileName, 'r')) { |
|
52 | + if (!$handle = @fopen($downloadServer.$langFileName, 'r')) { |
|
53 | 53 | printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName); |
54 | 54 | } else { |
55 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+'); |
|
55 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, 'w+'); |
|
56 | 56 | // Download language archive |
57 | 57 | if ($handle) { |
58 | 58 | while (!feof($handle)) { |
@@ -75,35 +75,35 @@ discard block |
||
75 | 75 | xoops_cp_header(); |
76 | 76 | adminMenu(); |
77 | 77 | |
78 | - if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) { |
|
78 | + if (!file_exists(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName)) { |
|
79 | 79 | echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT; |
80 | 80 | xoops_cp_footer(); |
81 | 81 | |
82 | 82 | break; |
83 | 83 | } |
84 | 84 | |
85 | - $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class'; |
|
86 | - require_once dirname(__DIR__) . '/class/pcltar.lib.php'; |
|
85 | + $gPcltarLibDir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class'; |
|
86 | + require_once dirname(__DIR__).'/class/pcltar.lib.php'; |
|
87 | 87 | |
88 | 88 | //TrOn(5); |
89 | 89 | |
90 | 90 | // Extract module files |
91 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
91 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
92 | 92 | // Delete downloaded module's files |
93 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName); |
|
93 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName); |
|
94 | 94 | |
95 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) { |
|
95 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$langFileName)) { |
|
96 | 96 | // Extract language files |
97 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
97 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
98 | 98 | // Delete downloaded module's files |
99 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName); |
|
99 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$langFileName); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // Delete template_c file |
103 | - if ($handle = opendir(XOOPS_ROOT_PATH . '/templates_c')) { |
|
103 | + if ($handle = opendir(XOOPS_ROOT_PATH.'/templates_c')) { |
|
104 | 104 | while (false !== ($file = readdir($handle))) { |
105 | 105 | if ('.' !== $file && '..' !== $file && 'index.html' !== $file) { |
106 | - unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file); |
|
106 | + unlink(XOOPS_ROOT_PATH.'/templates_c/'.$file); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | //TrDisplay(); |
113 | 113 | |
114 | - xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
114 | + xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL.'/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
115 | 115 | |
116 | 116 | xoops_cp_footer(); |
117 | 117 |
@@ -156,10 +156,10 @@ |
||
156 | 156 | } |
157 | 157 | } else { |
158 | 158 | xoops_confirm([ |
159 | - 'ok' => 1, |
|
160 | - 'location_id' => $_REQUEST['location_id'], |
|
161 | - 'op' => 'delete_location', |
|
162 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL . '<br>'); |
|
159 | + 'ok' => 1, |
|
160 | + 'location_id' => $_REQUEST['location_id'], |
|
161 | + 'op' => 'delete_location', |
|
162 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL . '<br>'); |
|
163 | 163 | } |
164 | 164 | break; |
165 | 165 |
@@ -20,18 +20,18 @@ discard block |
||
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | 22 | // Include xoops admin header |
23 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
23 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
24 | 24 | // require_once dirname(__DIR__) . '/class/ExtcalPersistableObjectHandler.php'; |
25 | -require_once dirname(dirname(dirname(__DIR__))) . '/kernel/module.php'; |
|
26 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopsformloader.php'; |
|
27 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/tree.php'; |
|
28 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopslists.php'; |
|
29 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/pagenav.php'; |
|
30 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/xoopsform/grouppermform.php'; |
|
31 | -require_once dirname(dirname(dirname(__DIR__))) . '/class/uploader.php'; |
|
32 | -require_once dirname(__DIR__) . '/include/constantes.php'; |
|
25 | +require_once dirname(dirname(dirname(__DIR__))).'/kernel/module.php'; |
|
26 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopsformloader.php'; |
|
27 | +require_once dirname(dirname(dirname(__DIR__))).'/class/tree.php'; |
|
28 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopslists.php'; |
|
29 | +require_once dirname(dirname(dirname(__DIR__))).'/class/pagenav.php'; |
|
30 | +require_once dirname(dirname(dirname(__DIR__))).'/class/xoopsform/grouppermform.php'; |
|
31 | +require_once dirname(dirname(dirname(__DIR__))).'/class/uploader.php'; |
|
32 | +require_once dirname(__DIR__).'/include/constantes.php'; |
|
33 | 33 | |
34 | -require_once __DIR__ . '/admin_header.php'; |
|
34 | +require_once __DIR__.'/admin_header.php'; |
|
35 | 35 | |
36 | 36 | //require("functions.php"); |
37 | 37 | //require("../include/functions.php"); |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | if ($xoopsUser) { |
40 | 40 | $xoopsModule = \XoopsModule::getByDirname('extcal'); |
41 | 41 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
42 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
42 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
43 | 43 | } |
44 | 44 | } else { |
45 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
45 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // Include language file |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | $criteria->setSort('nom'); |
98 | 98 | $criteria->setOrder('ASC'); |
99 | 99 | $location_arr = $locationHandler->getObjects($criteria); |
100 | - $numrows = $locationHandler->getCount($criteria); |
|
100 | + $numrows = $locationHandler->getCount($criteria); |
|
101 | 101 | if ($numrows > $limit) { |
102 | - $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); |
|
102 | + $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit); |
|
103 | 103 | $pagenav = $pagenav->renderNav(4); |
104 | 104 | } else { |
105 | 105 | $pagenav = ''; |
@@ -108,35 +108,35 @@ discard block |
||
108 | 108 | if ($numrows > 0) { |
109 | 109 | echo '<table width="100%" cellspacing="1" class="outer">'; |
110 | 110 | echo '<tr>'; |
111 | - echo '<th align="center">' . _AM_EXTCAL_LOCATION_FORM_NOM . '</th>'; |
|
112 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_LOCATION_FORM_ADRESSE . '</th>'; |
|
113 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_LOCATION_FORM_CITY . '</th>'; |
|
114 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_LOCATION_FORM_TELEPHONE . '</th>'; |
|
115 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_LOCATION_FORM_ACTION . '</th>'; |
|
111 | + echo '<th align="center">'._AM_EXTCAL_LOCATION_FORM_NOM.'</th>'; |
|
112 | + echo '<th align="center" width="20%">'._AM_EXTCAL_LOCATION_FORM_ADRESSE.'</th>'; |
|
113 | + echo '<th align="center" width="20%">'._AM_EXTCAL_LOCATION_FORM_CITY.'</th>'; |
|
114 | + echo '<th align="center" width="15%">'._AM_EXTCAL_LOCATION_FORM_TELEPHONE.'</th>'; |
|
115 | + echo '<th align="center" width="15%">'._AM_EXTCAL_LOCATION_FORM_ACTION.'</th>'; |
|
116 | 116 | echo '</tr>'; |
117 | 117 | $class = 'odd'; |
118 | 118 | foreach (array_keys($location_arr) as $i) { |
119 | - $class = ('even' === $class) ? 'odd' : 'even'; |
|
119 | + $class = ('even' === $class) ? 'odd' : 'even'; |
|
120 | 120 | $location_id = $location_arr[$i]->getVar('id'); |
121 | 121 | $location_nom = $location_arr[$i]->getVar('nom'); |
122 | 122 | $location_adresse = $location_arr[$i]->getVar('adresse'); |
123 | 123 | $location_city = $location_arr[$i]->getVar('ville'); |
124 | 124 | $location_telephone = $location_arr[$i]->getVar('tel_fixe'); |
125 | - echo '<tr class="' . $class . '">'; |
|
126 | - echo '<td align="left">' . '<a href="Location.php?op=edit_location&location_id=' . $location_id . '">' . $location_nom . '</a>' . '</td>'; |
|
125 | + echo '<tr class="'.$class.'">'; |
|
126 | + echo '<td align="left">'.'<a href="Location.php?op=edit_location&location_id='.$location_id.'">'.$location_nom.'</a>'.'</td>'; |
|
127 | 127 | |
128 | - echo '<td align="center"><b>' . $location_adresse . '</td>'; |
|
129 | - echo '<td align="center"><b>' . $location_city . '</td>'; |
|
130 | - echo '<td align="center"><b>' . $location_telephone . '</td>'; |
|
128 | + echo '<td align="center"><b>'.$location_adresse.'</td>'; |
|
129 | + echo '<td align="center"><b>'.$location_city.'</td>'; |
|
130 | + echo '<td align="center"><b>'.$location_telephone.'</td>'; |
|
131 | 131 | echo '<td align="center" width="15%">'; |
132 | - echo '<a href="Location.php?op=edit_location&location_id=' . $location_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_LOCATION_FORM_EDIT . '" title="' . _AM_EXTCAL_LOCATION_FORM_EDIT . '"></a> '; |
|
133 | - echo '<a href="Location.php?op=delete_location&location_id=' . $location_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_LOCATION_FORM_DELETE . '" title="' . _AM_EXTCAL_LOCATION_FORM_DELETE . '"></a> '; |
|
132 | + echo '<a href="Location.php?op=edit_location&location_id='.$location_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_LOCATION_FORM_EDIT.'" title="'._AM_EXTCAL_LOCATION_FORM_EDIT.'"></a> '; |
|
133 | + echo '<a href="Location.php?op=delete_location&location_id='.$location_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_LOCATION_FORM_DELETE.'" title="'._AM_EXTCAL_LOCATION_FORM_DELETE.'"></a> '; |
|
134 | 134 | echo '</td>'; |
135 | 135 | } |
136 | 136 | echo '</table><br>'; |
137 | - echo '<br><div align=right>' . $pagenav . '</div><br>'; |
|
137 | + echo '<br><div align=right>'.$pagenav.'</div><br>'; |
|
138 | 138 | } else { |
139 | - echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_LOCATION . '</div>'; |
|
139 | + echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_LOCATION.'</div>'; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | // Affichage du formulaire |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'ok' => 1, |
160 | 160 | 'location_id' => $_REQUEST['location_id'], |
161 | 161 | 'op' => 'delete_location', |
162 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL . '<br>'); |
|
162 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_LOCATION_SURDEL.'<br>'); |
|
163 | 163 | } |
164 | 164 | break; |
165 | 165 | |
@@ -201,11 +201,11 @@ discard block |
||
201 | 201 | $obj->setVar('map', $_REQUEST['map']); |
202 | 202 | |
203 | 203 | //Logo |
204 | - $uploaddir_location = XOOPS_ROOT_PATH . '/uploads/extcal/location/'; |
|
205 | - $uploadurl_location = XOOPS_URL . '/uploads/extcal/location/'; |
|
204 | + $uploaddir_location = XOOPS_ROOT_PATH.'/uploads/extcal/location/'; |
|
205 | + $uploadurl_location = XOOPS_URL.'/uploads/extcal/location/'; |
|
206 | 206 | |
207 | 207 | $delimg = @$_REQUEST['delimg']; |
208 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
208 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
209 | 209 | if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) { |
210 | 210 | $upload = new \XoopsMediaUploader($uploaddir_location, [ |
211 | 211 | 'image/gif', |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | $logo = $_REQUEST['file']; |
228 | 228 | } |
229 | 229 | } else { |
230 | - $logo = ''; |
|
231 | - $url_location = XOOPS_ROOT_PATH . '/uploads/extcal/location/' . $_REQUEST['file']; |
|
230 | + $logo = ''; |
|
231 | + $url_location = XOOPS_ROOT_PATH.'/uploads/extcal/location/'.$_REQUEST['file']; |
|
232 | 232 | if (is_file($url_location)) { |
233 | 233 | chmod($url_location, 0777); |
234 | 234 | unlink($url_location); |
@@ -248,4 +248,4 @@ discard block |
||
248 | 248 | break; |
249 | 249 | } |
250 | 250 | |
251 | -require_once __DIR__ . '/admin_footer.php'; |
|
251 | +require_once __DIR__.'/admin_footer.php'; |