@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include __DIR__ . '/../../mainfile.php'; |
|
| 4 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 5 | -$params = [ |
|
| 3 | +include __DIR__.'/../../mainfile.php'; |
|
| 4 | +require_once __DIR__.'/include/constantes.php'; |
|
| 5 | +$params = [ |
|
| 6 | 6 | 'view' => _EXTCAL_NAV_SEARCH, |
| 7 | 7 | 'file' => _EXTCAL_FILE_SEARCH, |
| 8 | 8 | ]; |
| 9 | 9 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 10 | -require_once __DIR__ . '/header.php'; |
|
| 10 | +require_once __DIR__.'/header.php'; |
|
| 11 | 11 | |
| 12 | 12 | $recurEventsArray = []; |
| 13 | 13 | //needed to save the state of the form, so we don't show on the first time the list of available events |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | /***************************************************************/ |
| 20 | 20 | $searchExp = isset($_POST['searchExp']) ? $_POST['searchExp'] : ''; |
| 21 | 21 | $andor = isset($_POST['andor']) ? $_POST['andor'] : ''; |
| 22 | -$year = isset($_POST['year']) ? (int)$_POST['year'] : date('Y'); |
|
| 23 | -$month = isset($_POST['month']) ? (int)$_POST['month'] : date('n'); |
|
| 24 | -$day = isset($_POST['day']) ? (int)$_POST['day'] : 0; |
|
| 25 | -$cat = isset($_POST['cat']) ? (int)$_POST['cat'] : 0; |
|
| 22 | +$year = isset($_POST['year']) ? (int) $_POST['year'] : date('Y'); |
|
| 23 | +$month = isset($_POST['month']) ? (int) $_POST['month'] : date('n'); |
|
| 24 | +$day = isset($_POST['day']) ? (int) $_POST['day'] : 0; |
|
| 25 | +$cat = isset($_POST['cat']) ? (int) $_POST['cat'] : 0; |
|
| 26 | 26 | $orderby1 = isset($_POST['orderby1']) ? $_POST['orderby1'] : 'cat_name ASC'; |
| 27 | 27 | $orderby2 = isset($_POST['orderby2']) ? $_POST['orderby2'] : 'event_title ASC'; |
| 28 | 28 | $orderby3 = isset($_POST['orderby3']) ? $_POST['orderby3'] : ''; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | -$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray); |
|
| 146 | +$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray); |
|
| 147 | 147 | |
| 148 | 148 | // Sort event array by event start |
| 149 | 149 | //usort($eventsArray, "orderEvents"); |
@@ -234,4 +234,4 @@ discard block |
||
| 234 | 234 | $xoopsTpl->assign('lang', $lang); |
| 235 | 235 | $xoopsTpl->assign('view', 'search'); |
| 236 | 236 | |
| 237 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 237 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -17,20 +17,20 @@ discard block |
||
| 17 | 17 | * @author XOOPS Development Team, |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -include __DIR__ . '/../../mainfile.php'; |
|
| 20 | +include __DIR__.'/../../mainfile.php'; |
|
| 21 | 21 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_post.tpl'; |
| 22 | 22 | |
| 23 | -include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 24 | -include __DIR__ . '/class/form/extcalform.php'; |
|
| 25 | -include __DIR__ . '/class/perm.php'; |
|
| 23 | +include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 24 | +include __DIR__.'/class/form/extcalform.php'; |
|
| 25 | +include __DIR__.'/class/perm.php'; |
|
| 26 | 26 | |
| 27 | -require_once __DIR__ . '/class/utility.php'; |
|
| 28 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 27 | +require_once __DIR__.'/class/utility.php'; |
|
| 28 | +require_once __DIR__.'/include/constantes.php'; |
|
| 29 | 29 | |
| 30 | 30 | $permHandler = ExtcalPerm::getHandler(); |
| 31 | 31 | $xoopsUser = $xoopsUser ?: null; |
| 32 | 32 | |
| 33 | -if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int)$_POST['cat_id'])) { |
|
| 33 | +if (!$permHandler->isAllowed($xoopsUser, 'extcal_cat_submit', (int) $_POST['cat_id'])) { |
|
| 34 | 34 | redirect_header('index.php', 3); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -38,16 +38,16 @@ discard block |
||
| 38 | 38 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
| 39 | 39 | |
| 40 | 40 | if (isset($_POST['form_preview'])) { |
| 41 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 41 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 42 | 42 | |
| 43 | 43 | // Title of the page |
| 44 | 44 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
| 45 | 45 | |
| 46 | 46 | $data = [ |
| 47 | 47 | 'event_title' => $_POST['event_title'], |
| 48 | - 'cat_id' => (int)$_POST['cat_id'], |
|
| 48 | + 'cat_id' => (int) $_POST['cat_id'], |
|
| 49 | 49 | 'event_desc' => $_POST['event_desc'], |
| 50 | - 'event_nbmember' => (int)$_POST['event_nbmember'], |
|
| 50 | + 'event_nbmember' => (int) $_POST['event_nbmember'], |
|
| 51 | 51 | 'event_contact' => $_POST['event_contact'], |
| 52 | 52 | 'event_url' => $_POST['event_url'], |
| 53 | 53 | 'event_email' => $_POST['event_email'], |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | 'event_start' => $_POST['event_start'], |
| 57 | 57 | 'have_end' => $_POST['have_end'], |
| 58 | 58 | 'event_end' => $_POST['event_end'], |
| 59 | - 'dohtml' => (int)$xoopsModuleConfig['allow_html'], |
|
| 59 | + 'dohtml' => (int) $xoopsModuleConfig['allow_html'], |
|
| 60 | 60 | 'event_price' => $_POST['event_price'], |
| 61 | 61 | 'event_organisateur' => $_POST['event_organisateur'], |
| 62 | 62 | 'event_icone' => $_POST['event_icone'], |
| 63 | 63 | ]; |
| 64 | 64 | |
| 65 | 65 | if (isset($_POST['event_id'])) { |
| 66 | - $data['event_id'] = (int)$_POST['event_id']; |
|
| 66 | + $data['event_id'] = (int) $_POST['event_id']; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // Creating tempory event object to apply Object data filtering |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // // Assigning language data to the template |
| 83 | 83 | // $xoopsTpl->assign('lang', $lang); |
| 84 | 84 | |
| 85 | - $event['cat_id'] = (int)$_POST['cat_id']; |
|
| 85 | + $event['cat_id'] = (int) $_POST['cat_id']; |
|
| 86 | 86 | $event['have_end'] = $_POST['have_end']; |
| 87 | 87 | |
| 88 | 88 | // Display the submit form |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $xoopsTpl->assign('preview', true); |
| 92 | 92 | $xoopsTpl->assign('formBody', $formBody); |
| 93 | 93 | |
| 94 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 94 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 95 | 95 | } elseif (isset($_POST['form_submit'])) { |
| 96 | 96 | if (!isset($_POST['rrule_weekly_interval'])) { |
| 97 | 97 | $_POST['rrule_weekly_interval'] = 0; |
@@ -115,11 +115,11 @@ discard block |
||
| 115 | 115 | ExtcalUtility::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
| 116 | 116 | /////////////////////////////////////////////////////////////////////////////// |
| 117 | 117 | |
| 118 | - require_once __DIR__ . '/class/perm.php'; |
|
| 118 | + require_once __DIR__.'/class/perm.php'; |
|
| 119 | 119 | |
| 120 | 120 | $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
| 121 | 121 | $permHandler = ExtcalPerm::getHandler(); |
| 122 | - $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int)$_POST['cat_id']); |
|
| 122 | + $approve = $permHandler->isAllowed($xoopsUser, 'extcal_cat_autoapprove', (int) $_POST['cat_id']); |
|
| 123 | 123 | |
| 124 | 124 | $data = [ |
| 125 | 125 | 'event_title' => $_POST['event_title'], |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | ]; |
| 146 | 146 | |
| 147 | 147 | if (isset($_POST['event_id'])) { |
| 148 | - $eventHandler->modifyEvent((int)$_POST['event_id'], $data); |
|
| 149 | - $fileHandler->updateEventFile((int)$_POST['event_id']); |
|
| 150 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
| 148 | + $eventHandler->modifyEvent((int) $_POST['event_id'], $data); |
|
| 149 | + $fileHandler->updateEventFile((int) $_POST['event_id']); |
|
| 150 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
| 151 | 151 | |
| 152 | - redirect_header('event.php?event=' . $_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
| 152 | + redirect_header('event.php?event='.$_POST['event_id'], 3, _MD_EXTCAL_EVENT_UPDATED, false); |
|
| 153 | 153 | } else { |
| 154 | 154 | $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
| 155 | 155 | $data['event_submitdate'] = time(); |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | $notificationHandler->triggerEvent('global', 0, $notifyEvent, ['EVENT_TITLE' => $_POST['event_title']]); |
| 167 | 167 | if ($approve == 1) { |
| 168 | 168 | $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
| 169 | - $cat = $catHandler->getCat((int)$_POST['cat_id'], $xoopsUser, 'all'); |
|
| 170 | - $notificationHandler->triggerEvent('cat', (int)$_POST['cat_id'], 'new_event_cat', [ |
|
| 169 | + $cat = $catHandler->getCat((int) $_POST['cat_id'], $xoopsUser, 'all'); |
|
| 170 | + $notificationHandler->triggerEvent('cat', (int) $_POST['cat_id'], 'new_event_cat', [ |
|
| 171 | 171 | 'EVENT_TITLE' => $_POST['event_title'], |
| 172 | 172 | 'CAT_NAME' => $cat->getVar('cat_name'), |
| 173 | 173 | ]); |
@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | * @author XOOPS Development Team, |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -require_once __DIR__ . '/../../mainfile.php'; |
|
| 21 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 20 | +require_once __DIR__.'/../../mainfile.php'; |
|
| 21 | +require_once __DIR__.'/include/constantes.php'; |
|
| 22 | 22 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_etablissement.tpl'; |
| 23 | -require_once __DIR__ . '/header.php'; |
|
| 23 | +require_once __DIR__.'/header.php'; |
|
| 24 | 24 | |
| 25 | 25 | //require_once XOOPS_ROOT_PATH."/modules/extcal/class/etablissement.php"; |
| 26 | 26 | $etablissementHandler = xoops_getModuleHandler(_EXTCAL_CLS_ETABLISSEMENT, _EXTCAL_MODULE); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $etablissement_exist = $etablissementHandler->getCount($criteria); |
| 37 | 37 | |
| 38 | 38 | if ($etablissement_exist == 0) { |
| 39 | - redirect_header(XOOPS_URL . '/modules/extcal/index.php', 3, _NOPERM); |
|
| 39 | + redirect_header(XOOPS_URL.'/modules/extcal/index.php', 3, _NOPERM); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $view_etablissement = $etablissementHandler->getEtablissement($etablissement_id, true); |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $date = mktime(0, 0, 0, date('m'), date('d'), date('y')); |
| 80 | 80 | |
| 81 | -$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM ' . $xoopsDB->prefix('extcal_event') . " WHERE event_etablissement='" . $etablissement_id . "' AND event_start >='" . $date . "'"); |
|
| 81 | +$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM '.$xoopsDB->prefix('extcal_event')." WHERE event_etablissement='".$etablissement_id."' AND event_start >='".$date."'"); |
|
| 82 | 82 | while ($donnees = $xoopsDB->fetchArray($requete)) { |
| 83 | 83 | if ($donnees['event_desc'] > 210) { |
| 84 | 84 | $event_desc = $donnees['event_desc']; |
| 85 | 85 | } else { |
| 86 | - $event_desc = substr($donnees['event_desc'], 0, 210) . '...'; |
|
| 86 | + $event_desc = substr($donnees['event_desc'], 0, 210).'...'; |
|
| 87 | 87 | } |
| 88 | 88 | $xoopsTpl->append('events', [ |
| 89 | 89 | 'event_picture1' => $donnees['event_picture1'], |
@@ -96,4 +96,4 @@ discard block |
||
| 96 | 96 | /** @var xos_opal_Theme $xoTheme */ |
| 97 | 97 | $xoTheme->addScript('browse.php?modules/extcal/assets/js/highslide.js'); |
| 98 | 98 | $xoTheme->addStylesheet('browse.php?modules/extcal/assets/js/highslide.css'); |
| 99 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
| 99 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include __DIR__ . '/../../mainfile.php'; |
|
| 4 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 3 | +include __DIR__.'/../../mainfile.php'; |
|
| 4 | +require_once __DIR__.'/include/constantes.php'; |
|
| 5 | 5 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
| 6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 7 | -require_once __DIR__ . '/header.php'; |
|
| 7 | +require_once __DIR__.'/header.php'; |
|
| 8 | 8 | |
| 9 | 9 | /* ========================================================================== */ |
| 10 | 10 | //ext_echoArray($_GET); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | //exit; |
| 18 | 18 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
| 19 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 19 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 20 | 20 | |
| 21 | 21 | // Title of the page |
| 22 | 22 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $xoopsTpl->assign('lang', $lang); |
| 59 | 59 | $xoopsTpl->assign('view', 'newevent'); |
| 60 | 60 | |
| 61 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 61 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 62 | 62 | } else { |
| 63 | 63 | redirect_header('index.php', 3); |
| 64 | 64 | } |