@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
3 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
4 | 4 | |
5 | -include_once __DIR__ . '/include/constantes.php'; |
|
6 | -include_once __DIR__ . '/include/mail_fnc.php'; |
|
7 | -include_once __DIR__ . '/include/functions.php'; |
|
5 | +include_once __DIR__.'/include/constantes.php'; |
|
6 | +include_once __DIR__.'/include/mail_fnc.php'; |
|
7 | +include_once __DIR__.'/include/functions.php'; |
|
8 | 8 | |
9 | 9 | /* |
10 | 10 | ext_echoArray($_POST); |
@@ -21,32 +21,32 @@ discard block |
||
21 | 21 | $member_uid = $xoopsUser->getVar('uid'); |
22 | 22 | |
23 | 23 | if (!$GLOBALS['xoopsSecurity']->check()) { |
24 | - redirect_header('index.php', 3, _NOPERM . '<br />' . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); |
|
24 | + redirect_header('index.php', 3, _NOPERM.'<br />'.implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); |
|
25 | 25 | exit; |
26 | 26 | } |
27 | 27 | |
28 | 28 | if ($xoopsUser && $xoopsModuleConfig['whosnot_going']) { |
29 | 29 | // If param are right |
30 | - if ((int)$_POST['event'] > 0 && ($_POST['mode'] === 'add' || $_POST['mode'] === 'remove')) { |
|
30 | + if ((int) $_POST['event'] > 0 && ($_POST['mode'] === 'add' || $_POST['mode'] === 'remove')) { |
|
31 | 31 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
32 | 32 | $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE); |
33 | 33 | |
34 | 34 | // If the user have to be added |
35 | 35 | if ($_POST['mode'] === 'add') { |
36 | - $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
|
37 | - $eventNotMemberHandler->createEventNotMember(array('event_id' => (int)$_POST['event'], 'uid' => $xoopsUser->getVar('uid'))); |
|
36 | + $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser); |
|
37 | + $eventNotMemberHandler->createEventNotMember(array('event_id' => (int) $_POST['event'], 'uid' => $xoopsUser->getVar('uid'))); |
|
38 | 38 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3); |
39 | 39 | $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_ADDED_TO_EVENT; |
40 | 40 | |
41 | 41 | // If the user have to be remove |
42 | 42 | } else { |
43 | 43 | if ($_POST['mode'] === 'remove') { |
44 | - $eventNotMemberHandler->deleteEventNotMember(array((int)$_POST['event'], $xoopsUser->getVar('uid'))); |
|
44 | + $eventNotMemberHandler->deleteEventNotMember(array((int) $_POST['event'], $xoopsUser->getVar('uid'))); |
|
45 | 45 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_4, _MD_EXTCAL_MSG_4); |
46 | 46 | $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_REMOVED_TO_EVENT; |
47 | 47 | } |
48 | 48 | } |
49 | - redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false); |
|
49 | + redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false); |
|
50 | 50 | } else { |
51 | 51 | redirect_header('index.php', 3, _NOPERM, false); |
52 | 52 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
3 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
4 | 4 | |
5 | 5 | //modif JJD |
6 | -include_once __DIR__ . '/include/constantes.php'; |
|
6 | +include_once __DIR__.'/include/constantes.php'; |
|
7 | 7 | |
8 | 8 | header("Location: {$xoopsModuleConfig['start_page']}"); |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
3 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | 5 | $params = array('view' => _EXTCAL_NAV_AGENDA_WEEK, 'file' => _EXTCAL_FILE_AGENDA_WEEK); |
6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
7 | -include_once __DIR__ . '/header.php'; |
|
7 | +include_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); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | 'cat' => $cat, |
49 | 49 | 'nbJours' => $nbJours, |
50 | 50 | 'externalKeys' => 'cat_id'); |
51 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
51 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
52 | 52 | /**********************************************************************/ |
53 | 53 | $eventsArray = $events; |
54 | 54 | // Formating date |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | //------------------------------------------------------------------- |
81 | 81 | |
82 | 82 | //$params['colJourWidth'] = (int)((((500-50)/$nbJours)/500*100)+.5); |
83 | -$params['colJourWidth'] = (int)((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
83 | +$params['colJourWidth'] = (int) ((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
84 | 84 | // echo "agenda_week : {$dayTS}<br />"; |
85 | 85 | $tAgenda = agenda_getEvents($eventsArray, $dayTS, $hStart, $hEnd, $mTranche, $nbJours); |
86 | 86 | //$exp = print_r($eventsArray, true); |
@@ -102,17 +102,17 @@ discard block |
||
102 | 102 | |
103 | 103 | $navig = array( |
104 | 104 | 'prev' => array( |
105 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
105 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
106 | 106 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp())), |
107 | 107 | 'this' => array( |
108 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
108 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
109 | 109 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp())), |
110 | 110 | 'next' => array( |
111 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
111 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
112 | 112 | 'name' => $extcalTimeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()))); |
113 | 113 | |
114 | 114 | // Title of the page |
115 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
115 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
116 | 116 | |
117 | 117 | // Assigning navig data to the template |
118 | 118 | $xoopsTpl->assign('navig', $navig); |
@@ -152,4 +152,4 @@ discard block |
||
152 | 152 | $xoopsTpl->assign('lang', $lang); |
153 | 153 | $xoopsTpl->assign('view', 'agendaweek'); |
154 | 154 | |
155 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
155 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
4 | -include dirname(dirname(dirname(__DIR__))) . '/class/xoopsformloader.php'; |
|
5 | -include_once __DIR__ . '/admin_header.php'; |
|
6 | -include_once(XOOPS_ROOT_PATH . '/modules/extcal/include/functions.php'); |
|
7 | -include_once(XOOPS_ROOT_PATH . '/modules/extcal/include/constantes.php'); |
|
3 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
4 | +include dirname(dirname(dirname(__DIR__))).'/class/xoopsformloader.php'; |
|
5 | +include_once __DIR__.'/admin_header.php'; |
|
6 | +include_once(XOOPS_ROOT_PATH.'/modules/extcal/include/functions.php'); |
|
7 | +include_once(XOOPS_ROOT_PATH.'/modules/extcal/include/constantes.php'); |
|
8 | 8 | |
9 | 9 | $gepeto = array_merge($_GET, $_POST); |
10 | 10 | while (list($k, $v) = each($gepeto)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $form->addElement(new XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
62 | 62 | $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
63 | 63 | |
64 | - $file_path = XOOPS_ROOT_PATH . '/modules/extcal/assets/css/images'; |
|
64 | + $file_path = XOOPS_ROOT_PATH.'/modules/extcal/assets/css/images'; |
|
65 | 65 | $tf = XoopsLists::getImgListAsArray($file_path); |
66 | 66 | array_unshift($tf, _MD_EXTCAL_NONE); |
67 | 67 | //$xfIcones = new XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $form->display(); |
75 | 75 | |
76 | - include_once __DIR__ . '/admin_footer.php'; |
|
76 | + include_once __DIR__.'/admin_footer.php'; |
|
77 | 77 | break; |
78 | 78 | |
79 | 79 | case 'edit': |
@@ -86,15 +86,15 @@ discard block |
||
86 | 86 | $cat = $catHandler->getCat($cat_id, true); |
87 | 87 | } |
88 | 88 | |
89 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
89 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
90 | 90 | |
91 | 91 | $form = new XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
92 | 92 | $form->addElement(new XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
93 | 93 | $form->addElement(new XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
94 | 94 | $form->addElement(new XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
95 | - $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
95 | + $form->addElement(new XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
96 | 96 | |
97 | - $file_path = XOOPS_ROOT_PATH . '/modules/extcal/assets/css/images'; |
|
97 | + $file_path = XOOPS_ROOT_PATH.'/modules/extcal/assets/css/images'; |
|
98 | 98 | $tf = XoopsLists::getImgListAsArray($file_path); |
99 | 99 | array_unshift($tf, _MD_EXTCAL_NONE); |
100 | 100 | $xfIcones = new XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
@@ -249,6 +249,6 @@ discard block |
||
249 | 249 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
250 | 250 | |
251 | 251 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
252 | - include_once __DIR__ . '/admin_footer.php'; |
|
252 | + include_once __DIR__.'/admin_footer.php'; |
|
253 | 253 | break; |
254 | 254 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | * @version :: $Id $ |
19 | 19 | **/ |
20 | 20 | |
21 | -echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>'; |
|
21 | +echo "<div class='adminfooter'>\n"." <div style='text-align: center;'>\n"." <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"." </div>\n".' '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>'; |
|
22 | 22 | |
23 | 23 | xoops_cp_footer(); |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | 28 | $path = dirname(dirname(dirname(__DIR__))); |
29 | -include_once $path . '/mainfile.php'; |
|
30 | -include_once $path . '/include/cp_functions.php'; |
|
31 | -require_once $path . '/include/cp_header.php'; |
|
29 | +include_once $path.'/mainfile.php'; |
|
30 | +include_once $path.'/include/cp_functions.php'; |
|
31 | +require_once $path.'/include/cp_header.php'; |
|
32 | 32 | |
33 | 33 | global $xoopsModule; |
34 | 34 | |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | xoops_loadLanguage('modinfo', $moduleDirName); |
40 | 40 | xoops_loadLanguage('main', $moduleDirName); |
41 | 41 | |
42 | -$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); |
|
43 | -$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); |
|
42 | +$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); |
|
43 | +$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); |
|
44 | 44 | $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); |
45 | 45 | |
46 | -if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) { |
|
47 | - include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); |
|
46 | +if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) { |
|
47 | + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); |
|
48 | 48 | } else { |
49 | 49 | redirect_header('../../../admin.php', 5, _AM_EXTCAL_MODULEADMIN_MISSING, false); |
50 | 50 | } |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | switch ($op) { |
36 | 36 | |
37 | - case 'notification': |
|
37 | + case 'notification': |
|
38 | 38 | |
39 | - switch ($fct) { |
|
39 | + switch ($fct) { |
|
40 | 40 | |
41 | 41 | case 'send': |
42 | 42 | |
@@ -116,79 +116,79 @@ discard block |
||
116 | 116 | |
117 | 117 | break; |
118 | 118 | |
119 | - } |
|
119 | + } |
|
120 | 120 | |
121 | 121 | break; |
122 | 122 | |
123 | - default: |
|
124 | - case 'default': |
|
125 | - // @author Gregory Mage (Aka Mage) |
|
126 | - //*************************************************************************************** |
|
127 | - xoops_cp_header(); |
|
128 | - // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
129 | - $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
130 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
131 | - $indexAdmin = new ModuleAdmin(); |
|
132 | - $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
133 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green'); |
|
134 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
135 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
136 | - $criteriaCompo = new CriteriaCompo(); |
|
137 | - $criteriaCompo->add(new Criteria('event_approved', 1)); |
|
138 | - $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
139 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green'); |
|
140 | - |
|
141 | - $indexAdmin->addConfigBoxLine(); |
|
142 | - $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
143 | - $indexAdmin->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
144 | - |
|
145 | - //JJD |
|
146 | - // $indexAdmin->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
147 | - |
|
148 | - // $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
149 | - // $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
150 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
151 | - echo $indexAdmin->renderIndex(); |
|
152 | - //*************************************************************************************** |
|
153 | - $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id')); |
|
154 | - $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
155 | - |
|
156 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
157 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
158 | - // echo '<img src="../assets/images/icons/on.png" /> '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br />'; |
|
159 | - echo '<img src=' . $pathIcon16 . '/edit.png /> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br />'; |
|
160 | - echo '<img src=' . $pathIcon16 . '/delete.png /> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br />'; |
|
161 | - echo '</fieldset><br />'; |
|
162 | - |
|
163 | - echo '<table class="outer" style="width:100%;">'; |
|
164 | - echo '<tr style="text-align:center;">'; |
|
165 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
166 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
167 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
168 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
169 | - echo '</tr>'; |
|
170 | - |
|
171 | - if (count($pendingEvent) > 0) { |
|
172 | - $i = 0; |
|
173 | - foreach ($pendingEvent as $event) { |
|
174 | - $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
175 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
176 | - echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
177 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
178 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
179 | - echo '<td style="width:10%; text-align:center;">'; |
|
180 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png /></a> '; |
|
181 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png /></a>'; |
|
182 | - echo '</td>'; |
|
183 | - echo '</tr>'; |
|
123 | + default: |
|
124 | + case 'default': |
|
125 | + // @author Gregory Mage (Aka Mage) |
|
126 | + //*************************************************************************************** |
|
127 | + xoops_cp_header(); |
|
128 | + // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
129 | + $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
130 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
131 | + $indexAdmin = new ModuleAdmin(); |
|
132 | + $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
133 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green'); |
|
134 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
135 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
136 | + $criteriaCompo = new CriteriaCompo(); |
|
137 | + $criteriaCompo->add(new Criteria('event_approved', 1)); |
|
138 | + $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
139 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green'); |
|
140 | + |
|
141 | + $indexAdmin->addConfigBoxLine(); |
|
142 | + $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
143 | + $indexAdmin->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
144 | + |
|
145 | + //JJD |
|
146 | + // $indexAdmin->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
147 | + |
|
148 | + // $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
149 | + // $indexAdmin->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
150 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
151 | + echo $indexAdmin->renderIndex(); |
|
152 | + //*************************************************************************************** |
|
153 | + $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id')); |
|
154 | + $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
155 | + |
|
156 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
157 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
158 | + // echo '<img src="../assets/images/icons/on.png" /> '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br />'; |
|
159 | + echo '<img src=' . $pathIcon16 . '/edit.png /> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br />'; |
|
160 | + echo '<img src=' . $pathIcon16 . '/delete.png /> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br />'; |
|
161 | + echo '</fieldset><br />'; |
|
162 | + |
|
163 | + echo '<table class="outer" style="width:100%;">'; |
|
164 | + echo '<tr style="text-align:center;">'; |
|
165 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
166 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
167 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
168 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
169 | + echo '</tr>'; |
|
170 | + |
|
171 | + if (count($pendingEvent) > 0) { |
|
172 | + $i = 0; |
|
173 | + foreach ($pendingEvent as $event) { |
|
174 | + $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
175 | + echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
176 | + echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
177 | + echo '<td>' . $event['event_title'] . '</td>'; |
|
178 | + echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
179 | + echo '<td style="width:10%; text-align:center;">'; |
|
180 | + echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png /></a> '; |
|
181 | + echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png /></a>'; |
|
182 | + echo '</td>'; |
|
183 | + echo '</tr>'; |
|
184 | + } |
|
185 | + } else { |
|
186 | + echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
184 | 187 | } |
185 | - } else { |
|
186 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
187 | - } |
|
188 | 188 | |
189 | - echo '</table></fieldset><br />'; |
|
189 | + echo '</table></fieldset><br />'; |
|
190 | 190 | |
191 | - include_once __DIR__ . '/admin_footer.php'; |
|
191 | + include_once __DIR__ . '/admin_footer.php'; |
|
192 | 192 | |
193 | - break; |
|
193 | + break; |
|
194 | 194 | } |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
4 | -include dirname(dirname(dirname(__DIR__))) . '/class/xoopsformloader.php'; |
|
5 | -include_once __DIR__ . '/admin_header.php'; |
|
3 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
4 | +include dirname(dirname(dirname(__DIR__))).'/class/xoopsformloader.php'; |
|
5 | +include_once __DIR__.'/admin_header.php'; |
|
6 | 6 | |
7 | 7 | function extgalleryLastVersion() |
8 | 8 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | case 'send': |
42 | 42 | |
43 | 43 | if (!$GLOBALS['xoopsSecurity']->check()) { |
44 | - redirect_header('index.php', 3, _NOPERM . '<br />' . implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); |
|
44 | + redirect_header('index.php', 3, _NOPERM.'<br />'.implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); |
|
45 | 45 | exit; |
46 | 46 | } |
47 | 47 | xoops_cp_header(); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'EV_TITLE' => $event->getVar('event_title'), |
76 | 76 | 'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')), |
77 | 77 | 'EV_END' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')), |
78 | - 'EV_LINK' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id')); |
|
78 | + 'EV_LINK' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id')); |
|
79 | 79 | $xoopsMailer->assign($tag); |
80 | 80 | $xoopsMailer->send(true); |
81 | 81 | echo $xoopsMailer->getSuccess(); |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | xoops_cp_header(); |
92 | 92 | |
93 | 93 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
94 | - $subjectCaption = _AM_EXTCAL_SUBJECT . "<br /><br /><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br /><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br />' . _AM_EXTCAL_MAILTAGS2 . '</span> '; |
|
95 | - $bodyCaption = _AM_EXTCAL_BODY . "<br /><br /><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br /><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS1 . '<br />' . _AM_EXTCAL_MAILTAGS2 . '<br />' . _AM_EXTCAL_MAILTAGS3 . '<br />' . _AM_EXTCAL_MAILTAGS4 . '<br />' . _AM_EXTCAL_MAILTAGS5 . '<br />' . _AM_EXTCAL_MAILTAGS6 . '<br />' . _AM_EXTCAL_MAILTAGS7 . '<br />' . _AM_EXTCAL_MAILTAGS8 . '<br />' . _AM_EXTCAL_MAILTAGS9 . '</span> '; |
|
94 | + $subjectCaption = _AM_EXTCAL_SUBJECT."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br />'._AM_EXTCAL_MAILTAGS2.'</span> '; |
|
95 | + $bodyCaption = _AM_EXTCAL_BODY."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS1.'<br />'._AM_EXTCAL_MAILTAGS2.'<br />'._AM_EXTCAL_MAILTAGS3.'<br />'._AM_EXTCAL_MAILTAGS4.'<br />'._AM_EXTCAL_MAILTAGS5.'<br />'._AM_EXTCAL_MAILTAGS6.'<br />'._AM_EXTCAL_MAILTAGS7.'<br />'._AM_EXTCAL_MAILTAGS8.'<br />'._AM_EXTCAL_MAILTAGS9.'</span> '; |
|
96 | 96 | $toCheckBbox = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
97 | 97 | $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL); |
98 | 98 | $toCheckBox->addOption('pm', _AM_EXTCAL_PM); |
99 | 99 | |
100 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
101 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
100 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
101 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
102 | 102 | echo _AM_EXTCAL_INFO_SEND_NOTIF; |
103 | 103 | echo '</fieldset><br />'; |
104 | 104 | $form = new XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&fct=send', 'post', true); |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
131 | 131 | $indexAdmin = new ModuleAdmin(); |
132 | 132 | $indexAdmin->addInfoBox(_MI_EXTCAL_DASHBOARD); |
133 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green'); |
|
134 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
135 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
133 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount(), 'Green'); |
|
134 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
135 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
136 | 136 | $criteriaCompo = new CriteriaCompo(); |
137 | 137 | $criteriaCompo->add(new Criteria('event_approved', 1)); |
138 | 138 | $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
139 | - $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green'); |
|
139 | + $indexAdmin->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>', 'Green'); |
|
140 | 140 | |
141 | 141 | $indexAdmin->addConfigBoxLine(); |
142 | 142 | $indexAdmin->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
@@ -153,42 +153,42 @@ discard block |
||
153 | 153 | $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), array('cat_id')); |
154 | 154 | $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
155 | 155 | |
156 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
157 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
156 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>'; |
|
157 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
158 | 158 | // echo '<img src="../assets/images/icons/on.png" /> '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br />'; |
159 | - echo '<img src=' . $pathIcon16 . '/edit.png /> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br />'; |
|
160 | - echo '<img src=' . $pathIcon16 . '/delete.png /> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br />'; |
|
159 | + echo '<img src='.$pathIcon16.'/edit.png /> '._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br />'; |
|
160 | + echo '<img src='.$pathIcon16.'/delete.png /> '._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br />'; |
|
161 | 161 | echo '</fieldset><br />'; |
162 | 162 | |
163 | 163 | echo '<table class="outer" style="width:100%;">'; |
164 | 164 | echo '<tr style="text-align:center;">'; |
165 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
166 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
167 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
168 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
165 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
166 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
167 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
168 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
169 | 169 | echo '</tr>'; |
170 | 170 | |
171 | 171 | if (count($pendingEvent) > 0) { |
172 | 172 | $i = 0; |
173 | 173 | foreach ($pendingEvent as $event) { |
174 | 174 | $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
175 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
176 | - echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
177 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
178 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
175 | + echo '<tr style="text-align:center;" class="'.$class.'">'; |
|
176 | + echo '<td>'.$event['cat']['cat_name'].'</td>'; |
|
177 | + echo '<td>'.$event['event_title'].'</td>'; |
|
178 | + echo '<td>'.$event['formated_event_start'].'</td>'; |
|
179 | 179 | echo '<td style="width:10%; text-align:center;">'; |
180 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png /></a> '; |
|
181 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png /></a>'; |
|
180 | + echo '<a href="event.php?op=modify&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png /></a> '; |
|
181 | + echo '<a href="event.php?op=delete&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png /></a>'; |
|
182 | 182 | echo '</td>'; |
183 | 183 | echo '</tr>'; |
184 | 184 | } |
185 | 185 | } else { |
186 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
186 | + echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | echo '</table></fieldset><br />'; |
190 | 190 | |
191 | - include_once __DIR__ . '/admin_footer.php'; |
|
191 | + include_once __DIR__.'/admin_footer.php'; |
|
192 | 192 | |
193 | 193 | break; |
194 | 194 | } |
@@ -18,18 +18,18 @@ discard block |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | // Include xoops admin header |
21 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
22 | -include_once XOOPS_ROOT_PATH . '/modules/extcal/class/ExtcalPersistableObjectHandler.php'; |
|
23 | -include_once(XOOPS_ROOT_PATH . '/kernel/module.php'); |
|
24 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
25 | -include_once XOOPS_ROOT_PATH . '/class/tree.php'; |
|
26 | -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
27 | -include_once XOOPS_ROOT_PATH . '/modules/extcal/class/etablissement.php'; |
|
28 | -include_once XOOPS_ROOT_PATH . '/modules/extcal/include/constantes.php'; |
|
29 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
30 | -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; |
|
31 | -include_once(XOOPS_ROOT_PATH . '/class/uploader.php'); |
|
32 | -include_once __DIR__ . '/admin_header.php'; |
|
21 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
22 | +include_once XOOPS_ROOT_PATH.'/modules/extcal/class/ExtcalPersistableObjectHandler.php'; |
|
23 | +include_once(XOOPS_ROOT_PATH.'/kernel/module.php'); |
|
24 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
25 | +include_once XOOPS_ROOT_PATH.'/class/tree.php'; |
|
26 | +include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
27 | +include_once XOOPS_ROOT_PATH.'/modules/extcal/class/etablissement.php'; |
|
28 | +include_once XOOPS_ROOT_PATH.'/modules/extcal/include/constantes.php'; |
|
29 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
30 | +include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; |
|
31 | +include_once(XOOPS_ROOT_PATH.'/class/uploader.php'); |
|
32 | +include_once __DIR__.'/admin_header.php'; |
|
33 | 33 | |
34 | 34 | //include_once("functions.php"); |
35 | 35 | //include_once("../include/functions.php"); |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | if ($xoopsUser) { |
38 | 38 | $xoopsModule = XoopsModule::getByDirname('extcal'); |
39 | 39 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
40 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
40 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
41 | 41 | } |
42 | 42 | } else { |
43 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
43 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | // Include language file |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $etablissement_arr = $etablissementHandler->getObjects($criteria); |
99 | 99 | $numrows = $etablissementHandler->getCount($criteria); |
100 | 100 | if ($numrows > $limit) { |
101 | - $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); |
|
101 | + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit); |
|
102 | 102 | $pagenav = $pagenav->renderNav(4); |
103 | 103 | } else { |
104 | 104 | $pagenav = ''; |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | if ($numrows > 0) { |
108 | 108 | echo '<table width="100%" cellspacing="1" class="outer">'; |
109 | 109 | echo '<tr>'; |
110 | - echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>'; |
|
111 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>'; |
|
112 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>'; |
|
113 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>'; |
|
114 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>'; |
|
110 | + echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>'; |
|
111 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>'; |
|
112 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>'; |
|
113 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>'; |
|
114 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>'; |
|
115 | 115 | echo '</tr>'; |
116 | 116 | $class = 'odd'; |
117 | 117 | foreach (array_keys($etablissement_arr) as $i) { |
@@ -121,21 +121,21 @@ discard block |
||
121 | 121 | $etablissement_adresse = $etablissement_arr[$i]->getVar('adresse'); |
122 | 122 | $etablissement_city = $etablissement_arr[$i]->getVar('ville'); |
123 | 123 | $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe'); |
124 | - echo '<tr class="' . $class . '">'; |
|
125 | - echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>'; |
|
124 | + echo '<tr class="'.$class.'">'; |
|
125 | + echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>'; |
|
126 | 126 | |
127 | - echo '<td align="center"><b>' . $etablissement_adresse . '</td>'; |
|
128 | - echo '<td align="center"><b>' . $etablissement_city . '</td>'; |
|
129 | - echo '<td align="center"><b>' . $etablissement_telephone . '</td>'; |
|
127 | + echo '<td align="center"><b>'.$etablissement_adresse.'</td>'; |
|
128 | + echo '<td align="center"><b>'.$etablissement_city.'</td>'; |
|
129 | + echo '<td align="center"><b>'.$etablissement_telephone.'</td>'; |
|
130 | 130 | echo '<td align="center" width="15%">'; |
131 | - echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> '; |
|
132 | - echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> '; |
|
131 | + echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> '; |
|
132 | + echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> '; |
|
133 | 133 | echo '</td>'; |
134 | 134 | } |
135 | 135 | echo '</table><br />'; |
136 | - echo '<br /><div align=right>' . $pagenav . '</div><br />'; |
|
136 | + echo '<br /><div align=right>'.$pagenav.'</div><br />'; |
|
137 | 137 | } else { |
138 | - echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>'; |
|
138 | + echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>'; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | // Affichage du formulaire |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | redirect_header('etablissement.php', 1, _AM_EXTCAL_REDIRECT_DELOK); |
155 | 155 | } |
156 | 156 | } else { |
157 | - xoops_confirm(array('ok' => 1, 'etablissement_id' => $_REQUEST['etablissement_id'], 'op' => 'delete_etablissement'), $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>'); |
|
157 | + xoops_confirm(array('ok' => 1, 'etablissement_id' => $_REQUEST['etablissement_id'], 'op' => 'delete_etablissement'), $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>'); |
|
158 | 158 | } |
159 | 159 | break; |
160 | 160 | |
@@ -174,9 +174,9 @@ discard block |
||
174 | 174 | redirect_header('etablissement.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
175 | 175 | } |
176 | 176 | if (isset($_REQUEST['etablissement_id'])) { |
177 | - $obj =& $etablissementHandler->get($_REQUEST['etablissement_id']); |
|
177 | + $obj = & $etablissementHandler->get($_REQUEST['etablissement_id']); |
|
178 | 178 | } else { |
179 | - $obj =& $etablissementHandler->create(); |
|
179 | + $obj = & $etablissementHandler->create(); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | $obj->setVar('nom', $_REQUEST['nom']); |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | $obj->setVar('map', $_REQUEST['map']); |
197 | 197 | |
198 | 198 | //Logo |
199 | - $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/'; |
|
200 | - $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/'; |
|
199 | + $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'; |
|
200 | + $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/'; |
|
201 | 201 | |
202 | 202 | $delimg = @$_REQUEST['delimg']; |
203 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
203 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
204 | 204 | if ($delimg == 0 && !empty($_REQUEST['xoops_upload_file'][0])) { |
205 | 205 | $upload = new XoopsMediaUploader($uploaddir_etablissement, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), 3145728, null, null); |
206 | 206 | if ($upload->fetchMedia($_REQUEST['xoops_upload_file'][0])) { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | } else { |
219 | 219 | $logo = ''; |
220 | - $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file']; |
|
220 | + $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file']; |
|
221 | 221 | if (is_file($url_etablissement)) { |
222 | 222 | chmod($url_etablissement, 0777); |
223 | 223 | unlink($url_etablissement); |
@@ -237,4 +237,4 @@ discard block |
||
237 | 237 | break; |
238 | 238 | } |
239 | 239 | |
240 | -include_once __DIR__ . '/admin_footer.php'; |
|
240 | +include_once __DIR__.'/admin_footer.php'; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | $step = $_POST['step']; |
6 | 6 | } |
7 | 7 | |
8 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
9 | -include __DIR__ . '/function.php'; |
|
8 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
9 | +include __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 | |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | break; |
34 | 34 | } |
35 | 35 | |
36 | - if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) { |
|
36 | + if (!$handle = @fopen($downloadServer.$moduleFileName, 'r')) { |
|
37 | 37 | printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName); |
38 | 38 | xoops_cp_footer(); |
39 | 39 | break; |
40 | 40 | } |
41 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+'); |
|
41 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, 'w+'); |
|
42 | 42 | |
43 | 43 | // Downlad module archive |
44 | 44 | if ($handle) { |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | |
53 | 53 | // English file are included on module package |
54 | 54 | if ($xoopsConfig['language'] !== 'english') { |
55 | - if (!$handle = @fopen($downloadServer . $langFileName, 'r')) { |
|
55 | + if (!$handle = @fopen($downloadServer.$langFileName, 'r')) { |
|
56 | 56 | printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName); |
57 | 57 | } else { |
58 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+'); |
|
58 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, 'w+'); |
|
59 | 59 | // Download language archive |
60 | 60 | if ($handle) { |
61 | 61 | while (!feof($handle)) { |
@@ -79,35 +79,35 @@ discard block |
||
79 | 79 | xoops_cp_header(); |
80 | 80 | adminMenu(); |
81 | 81 | |
82 | - if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) { |
|
82 | + if (!file_exists(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName)) { |
|
83 | 83 | echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT; |
84 | 84 | xoops_cp_footer(); |
85 | 85 | |
86 | 86 | break; |
87 | 87 | } |
88 | 88 | |
89 | - $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class'; |
|
90 | - include dirname(__DIR__) . '/class/pcltar.lib.php'; |
|
89 | + $gPcltarLibDir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class'; |
|
90 | + include dirname(__DIR__).'/class/pcltar.lib.php'; |
|
91 | 91 | |
92 | 92 | //TrOn(5); |
93 | 93 | |
94 | 94 | // Extract module files |
95 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
95 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
96 | 96 | // Delete downloaded module's files |
97 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName); |
|
97 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName); |
|
98 | 98 | |
99 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) { |
|
99 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$langFileName)) { |
|
100 | 100 | // Extract language files |
101 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
101 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
102 | 102 | // Delete downloaded module's files |
103 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName); |
|
103 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$langFileName); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | // Delete template_c file |
107 | - if ($handle = opendir(XOOPS_ROOT_PATH . '/templates_c')) { |
|
107 | + if ($handle = opendir(XOOPS_ROOT_PATH.'/templates_c')) { |
|
108 | 108 | while (false !== ($file = readdir($handle))) { |
109 | 109 | if ($file !== '.' && $file !== '..' && $file !== 'index.html') { |
110 | - unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file); |
|
110 | + unlink(XOOPS_ROOT_PATH.'/templates_c/'.$file); |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | //TrDisplay(); |
117 | 117 | |
118 | - xoops_confirm(array('dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'), XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
118 | + xoops_confirm(array('dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'), XOOPS_URL.'/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
119 | 119 | |
120 | 120 | xoops_cp_footer(); |
121 | 121 |