@@ -62,7 +62,7 @@ |
||
| 62 | 62 | { |
| 63 | 63 | global $xoopsUser; |
| 64 | 64 | |
| 65 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 65 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 66 | 66 | |
| 67 | 67 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 68 | 68 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -62,26 +62,26 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | global $xoopsUser; |
| 64 | 64 | |
| 65 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 65 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 66 | 66 | |
| 67 | 67 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 68 | 68 | |
| 69 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 70 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 71 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 69 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 70 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 71 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 72 | 72 | array_shift($options); |
| 73 | 73 | array_shift($options); |
| 74 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 74 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 75 | 75 | if (false === array_search(0, $options)) { |
| 76 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 76 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 77 | 77 | } else { |
| 78 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 78 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 79 | 79 | } |
| 80 | 80 | foreach ($cats as $cat) { |
| 81 | 81 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 82 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 82 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 83 | 83 | } else { |
| 84 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 84 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | $form .= '</select>'; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param $options |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | //mb $events = $eventHandler->objectToArray($eventHandler->getUpcommingEvent($nbEvent, $options)); |
| 54 | 54 | |
| 55 | 55 | /* ========================================================================== */ |
| 56 | - $year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 57 | - $month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 58 | - $day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 59 | - $cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 56 | + $year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 57 | + $month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 58 | + $day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 59 | + $cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 60 | 60 | /* ========================================================================== */ |
| 61 | 61 | |
| 62 | 62 | // Validate the date (day, month and year) |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | 'nbEvent' => $nbEvent, |
| 90 | 90 | 'nbDays' => $nbDays, |
| 91 | 91 | ]; |
| 92 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 92 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 93 | 93 | |
| 94 | 94 | //---------------------------- |
| 95 | 95 | |
@@ -112,31 +112,31 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | global $xoopsUser; |
| 114 | 114 | |
| 115 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 115 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 116 | 116 | |
| 117 | 117 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 118 | 118 | |
| 119 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 120 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 121 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 119 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 120 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 121 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 122 | 122 | |
| 123 | - $form .= _MB_EXTCAL_UPCOMING_DAYS . ' : <input name="options[2]" size="5" maxlength="255" value="' . $options[2] . '" type="text"><br>'; |
|
| 123 | + $form .= _MB_EXTCAL_UPCOMING_DAYS.' : <input name="options[2]" size="5" maxlength="255" value="'.$options[2].'" type="text"><br>'; |
|
| 124 | 124 | |
| 125 | 125 | array_shift($options); |
| 126 | 126 | array_shift($options); |
| 127 | 127 | array_shift($options); |
| 128 | 128 | |
| 129 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 129 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 130 | 130 | if (false === array_search(0, $options)) { |
| 131 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 131 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 132 | 132 | } else { |
| 133 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 133 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 134 | 134 | } |
| 135 | 135 | foreach ($cats as $cat) { |
| 136 | 136 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 137 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 137 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 138 | 138 | } else { |
| 139 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 139 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | $form .= '</select>'; |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | { |
| 63 | 63 | global $xoopsUser; |
| 64 | 64 | |
| 65 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 65 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 66 | 66 | |
| 67 | 67 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 68 | 68 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 23 | 23 | |
| 24 | 24 | /******************************************************/ |
| 25 | 25 | /* Ajour JJD - Evenements par categries */ |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | /***********************************************************/ |
| 59 | 59 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
| 60 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 60 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 61 | 61 | $t = $catHandler->objectToArray($catHandler->getAllCat($xoopsUser, 'all')); |
| 62 | 62 | $tCats = []; |
| 63 | 63 | for ($h = 0, $count = count($t); $h < $count; ++$h) { |
@@ -88,26 +88,26 @@ discard block |
||
| 88 | 88 | global $xoopsUser; |
| 89 | 89 | |
| 90 | 90 | // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
| 91 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 91 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 92 | 92 | |
| 93 | 93 | $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view'); |
| 94 | 94 | |
| 95 | - $form = _MB_EXTCAL_DISPLAY . " \n"; |
|
| 96 | - $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text"> ' . _MB_EXTCAL_EVENT . '<br>'; |
|
| 97 | - $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>'; |
|
| 95 | + $form = _MB_EXTCAL_DISPLAY." \n"; |
|
| 96 | + $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text"> '._MB_EXTCAL_EVENT.'<br>'; |
|
| 97 | + $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>'; |
|
| 98 | 98 | array_shift($options); |
| 99 | 99 | array_shift($options); |
| 100 | - $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 100 | + $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">'; |
|
| 101 | 101 | if (false === array_search(0, $options)) { |
| 102 | - $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 102 | + $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 103 | 103 | } else { |
| 104 | - $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>'; |
|
| 104 | + $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>'; |
|
| 105 | 105 | } |
| 106 | 106 | foreach ($cats as $cat) { |
| 107 | 107 | if (false === array_search($cat->getVar('cat_id'), $options)) { |
| 108 | - $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>'; |
|
| 108 | + $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>'; |
|
| 109 | 109 | } else { |
| 110 | - $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>'; |
|
| 110 | + $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>'; |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | $form .= '</select>'; |
@@ -2,20 +2,20 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | 7 | $params = ['view' => _EXTCAL_NAV_CALMONTH, 'file' => _EXTCAL_FILE_CALMONTH]; |
| 8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 9 | 9 | |
| 10 | 10 | //include __DIR__ . '/preloads/autoloader.php'; |
| 11 | 11 | //$catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
| 12 | 12 | |
| 13 | -require_once __DIR__ . '/header.php'; |
|
| 13 | +require_once __DIR__.'/header.php'; |
|
| 14 | 14 | |
| 15 | 15 | /* ========================================================================== */ |
| 16 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 17 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 18 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 16 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 17 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 18 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 19 | 19 | /* ========================================================================== */ |
| 20 | 20 | |
| 21 | 21 | $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], '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 | |
| 43 | 43 | // Calculating timestamp for the begin and the end of the month |
@@ -133,21 +133,21 @@ discard block |
||
| 133 | 133 | // Making navig data |
| 134 | 134 | $navig = [ |
| 135 | 135 | 'prev' => [ |
| 136 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
| 136 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
| 137 | 137 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()), |
| 138 | 138 | ], |
| 139 | 139 | 'this' => [ |
| 140 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
| 140 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
| 141 | 141 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
| 142 | 142 | ], |
| 143 | 143 | 'next' => [ |
| 144 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
| 144 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
| 145 | 145 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()), |
| 146 | 146 | ], |
| 147 | 147 | ]; |
| 148 | 148 | |
| 149 | 149 | // Title of the page |
| 150 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 150 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 151 | 151 | |
| 152 | 152 | // Assigning navig data to the template |
| 153 | 153 | $xoopsTpl->assign('navig', $navig); |
@@ -187,4 +187,4 @@ discard block |
||
| 187 | 187 | $xoopsTpl->assign('lang', $lang); |
| 188 | 188 | $xoopsTpl->assign('view', 'calmonth'); |
| 189 | 189 | |
| 190 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 190 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,17 +19,17 @@ discard block |
||
| 19 | 19 | * @author XOOPS Development Team, |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -include __DIR__ . '/../../mainfile.php'; |
|
| 23 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 22 | +include __DIR__.'/../../mainfile.php'; |
|
| 23 | +require_once __DIR__.'/include/constantes.php'; |
|
| 24 | 24 | $params = ['view' => _EXTCAL_NAV_WEEK, 'file' => _EXTCAL_FILE_WEEK]; |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 26 | -require_once __DIR__ . '/header.php'; |
|
| 26 | +require_once __DIR__.'/header.php'; |
|
| 27 | 27 | |
| 28 | 28 | /* ========================================================================== */ |
| 29 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 30 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 31 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 32 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 29 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 30 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 31 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 32 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 33 | 33 | /* ========================================================================== */ |
| 34 | 34 | |
| 35 | 35 | // Validate the date (day, month and year) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $form->addElement(getListMonths($month)); |
| 49 | 49 | $form->addElement(getListDays($day)); |
| 50 | 50 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 51 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 51 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 52 | 52 | |
| 53 | 53 | // Assigning the form to the template |
| 54 | 54 | $form->assign($xoopsTpl); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | 'cat' => $cat, |
| 65 | 65 | 'externalKeys' => 'cat_id', |
| 66 | 66 | ]; |
| 67 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 67 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 68 | 68 | /**********************************************************************/ |
| 69 | 69 | $eventsArray = $events; |
| 70 | 70 | // Formating date |
@@ -105,21 +105,21 @@ discard block |
||
| 105 | 105 | $nWeekCalObj = $weekCalObj->nextWeek('object'); |
| 106 | 106 | $navig = [ |
| 107 | 107 | 'prev' => [ |
| 108 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
| 108 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
| 109 | 109 | 'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
| 110 | 110 | ], |
| 111 | 111 | 'this' => [ |
| 112 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
| 112 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
| 113 | 113 | 'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
| 114 | 114 | ], |
| 115 | 115 | 'next' => [ |
| 116 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
| 116 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
| 117 | 117 | 'name' => $timeHandler->getFormatedDate($extcalConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
| 118 | 118 | ], |
| 119 | 119 | ]; |
| 120 | 120 | |
| 121 | 121 | // Title of the page |
| 122 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 122 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 123 | 123 | |
| 124 | 124 | // Assigning navig data to the template |
| 125 | 125 | $xoopsTpl->assign('navig', $navig); |
@@ -179,4 +179,4 @@ discard block |
||
| 179 | 179 | $xoopsTpl->assign('lang', $lang); |
| 180 | 180 | $xoopsTpl->assign('view', 'week'); |
| 181 | 181 | |
| 182 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 182 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,17 +19,17 @@ discard block |
||
| 19 | 19 | * @author XOOPS Development Team, |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -include __DIR__ . '/../../mainfile.php'; |
|
| 23 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 22 | +include __DIR__.'/../../mainfile.php'; |
|
| 23 | +require_once __DIR__.'/include/constantes.php'; |
|
| 24 | 24 | $params = ['view' => _EXTCAL_NAV_DAY, 'file' => _EXTCAL_FILE_DAY]; |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 26 | -require_once __DIR__ . '/header.php'; |
|
| 26 | +require_once __DIR__.'/header.php'; |
|
| 27 | 27 | |
| 28 | 28 | /* ========================================================================== */ |
| 29 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 30 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 31 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 32 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 29 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 30 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 31 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 32 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 33 | 33 | /* ========================================================================== */ |
| 34 | 34 | |
| 35 | 35 | $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get'); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $form->addElement(getListMonths($month)); |
| 38 | 38 | $form->addElement(getListDays($day)); |
| 39 | 39 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 40 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 40 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 41 | 41 | |
| 42 | 42 | // Assigning the form to the template |
| 43 | 43 | $form->assign($xoopsTpl); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | 'cat' => $cat, |
| 54 | 54 | 'externalKeys' => 'cat_id', |
| 55 | 55 | ]; |
| 56 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 56 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 57 | 57 | /**********************************************************************/ |
| 58 | 58 | $eventsArray = $events; |
| 59 | 59 | |
@@ -99,21 +99,21 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | $navig = [ |
| 101 | 101 | 'prev' => [ |
| 102 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
| 102 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
| 103 | 103 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()), |
| 104 | 104 | ], |
| 105 | 105 | 'this' => [ |
| 106 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
| 106 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
| 107 | 107 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()), |
| 108 | 108 | ], |
| 109 | 109 | 'next' => [ |
| 110 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
| 110 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
| 111 | 111 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()), |
| 112 | 112 | ], |
| 113 | 113 | ]; |
| 114 | 114 | |
| 115 | 115 | // Title of the page |
| 116 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 116 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 117 | 117 | |
| 118 | 118 | // Assigning navig data to the template |
| 119 | 119 | $xoopsTpl->assign('navig', $navig); |
@@ -172,4 +172,4 @@ discard block |
||
| 172 | 172 | $xoopsTpl->assign('lang', $lang); |
| 173 | 173 | $xoopsTpl->assign('view', 'day'); |
| 174 | 174 | |
| 175 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 175 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -20,15 +20,15 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | use XoopsModules\Extcal; |
| 22 | 22 | |
| 23 | -include __DIR__ . '/../../mainfile.php'; |
|
| 24 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 23 | +include __DIR__.'/../../mainfile.php'; |
|
| 24 | +require_once __DIR__.'/include/constantes.php'; |
|
| 25 | 25 | $params = ['view' => _EXTCAL_NAV_YEAR, 'file' => _EXTCAL_FILE_YEAR]; |
| 26 | 26 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 27 | -require_once __DIR__ . '/header.php'; |
|
| 27 | +require_once __DIR__.'/header.php'; |
|
| 28 | 28 | |
| 29 | 29 | /* ========================================================================== */ |
| 30 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 31 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 30 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 31 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 32 | 32 | |
| 33 | 33 | // Getting eXtCal object's handler |
| 34 | 34 | $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $form->addElement(getListYears($year, $xoopsModuleConfig['agenda_nb_years_before'], $xoopsModuleConfig['agenda_nb_years_after'])); |
| 44 | 44 | |
| 45 | 45 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 46 | -$form->addElement( new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit')); |
|
| 46 | +$form->addElement(new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit')); |
|
| 47 | 47 | |
| 48 | 48 | // Assigning the form to the template |
| 49 | 49 | $form->assign($xoopsTpl); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | 'cat' => $cat, |
| 58 | 58 | 'externalKeys' => 'cat_id', |
| 59 | 59 | ]; |
| 60 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 60 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 61 | 61 | /**********************************************************************/ |
| 62 | 62 | $eventsArray = $events; |
| 63 | 63 | // Formating date |
@@ -101,21 +101,21 @@ discard block |
||
| 101 | 101 | // Making navig data |
| 102 | 102 | $navig = [ |
| 103 | 103 | 'prev' => [ |
| 104 | - 'uri' => 'year=' . $prevYear, |
|
| 104 | + 'uri' => 'year='.$prevYear, |
|
| 105 | 105 | 'name' => $prevYear, |
| 106 | 106 | ], |
| 107 | 107 | 'this' => [ |
| 108 | - 'uri' => 'year=' . $year, |
|
| 108 | + 'uri' => 'year='.$year, |
|
| 109 | 109 | 'name' => $year, |
| 110 | 110 | ], |
| 111 | 111 | 'next' => [ |
| 112 | - 'uri' => 'year=' . $nexYear, |
|
| 112 | + 'uri' => 'year='.$nexYear, |
|
| 113 | 113 | 'name' => $nexYear, |
| 114 | 114 | ], |
| 115 | 115 | ]; |
| 116 | 116 | |
| 117 | 117 | // Title of the page |
| 118 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 118 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 119 | 119 | |
| 120 | 120 | // Assigning navig data to the template |
| 121 | 121 | $xoopsTpl->assign('navig', $navig); |
@@ -169,4 +169,4 @@ discard block |
||
| 169 | 169 | $xoopsTpl->assign('lang', $lang); |
| 170 | 170 | $xoopsTpl->assign('view', 'year'); |
| 171 | 171 | |
| 172 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 172 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -2,24 +2,24 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | 7 | $params = ['view' => _EXTCAL_NAV_CALWEEK, 'file' => _EXTCAL_FILE_CALWEEK]; |
| 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 | /* ========================================================================== */ |
| 12 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 13 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 14 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 15 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 12 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 13 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 14 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 15 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 16 | 16 | /* ========================================================================== */ |
| 17 | 17 | |
| 18 | 18 | // Validate the date (day, month and year) |
| 19 | 19 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
| 20 | 20 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
| 21 | 21 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
| 22 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 22 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 23 | 23 | $year = date('Y', $dayTS); |
| 24 | 24 | $month = date('n', $dayTS); |
| 25 | 25 | $day = date('j', $dayTS); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $form->addElement(getListMonths($month)); |
| 33 | 33 | $form->addElement(getListDays($day)); |
| 34 | 34 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 35 | -$form->addElement( new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit')); |
|
| 35 | +$form->addElement(new \XoopsFormButton('', 'form_submit', _SUBMIT, 'submit')); |
|
| 36 | 36 | |
| 37 | 37 | // Assigning the form to the template |
| 38 | 38 | $form->assign($xoopsTpl); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | 'cat' => $cat, |
| 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 | |
@@ -138,21 +138,21 @@ discard block |
||
| 138 | 138 | // Making navig data |
| 139 | 139 | $navig = [ |
| 140 | 140 | 'prev' => [ |
| 141 | - 'uri' => 'year=' . $pWeekCalObj->thisYear() . '&month=' . $pWeekCalObj->thisMonth() . '&day=' . $pWeekCalObj->thisDay(), |
|
| 141 | + 'uri' => 'year='.$pWeekCalObj->thisYear().'&month='.$pWeekCalObj->thisMonth().'&day='.$pWeekCalObj->thisDay(), |
|
| 142 | 142 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $pWeekCalObj->getTimestamp()), |
| 143 | 143 | ], |
| 144 | 144 | 'this' => [ |
| 145 | - 'uri' => 'year=' . $weekCalObj->thisYear() . '&month=' . $weekCalObj->thisMonth() . '&day=' . $weekCalObj->thisDay(), |
|
| 145 | + 'uri' => 'year='.$weekCalObj->thisYear().'&month='.$weekCalObj->thisMonth().'&day='.$weekCalObj->thisDay(), |
|
| 146 | 146 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $weekCalObj->getTimestamp()), |
| 147 | 147 | ], |
| 148 | 148 | 'next' => [ |
| 149 | - 'uri' => 'year=' . $nWeekCalObj->thisYear() . '&month=' . $nWeekCalObj->thisMonth() . '&day=' . $nWeekCalObj->thisDay(), |
|
| 149 | + 'uri' => 'year='.$nWeekCalObj->thisYear().'&month='.$nWeekCalObj->thisMonth().'&day='.$nWeekCalObj->thisDay(), |
|
| 150 | 150 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_week'], $nWeekCalObj->getTimestamp()), |
| 151 | 151 | ], |
| 152 | 152 | ]; |
| 153 | 153 | |
| 154 | 154 | // Title of the page |
| 155 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 155 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 156 | 156 | |
| 157 | 157 | // Assigning navig data to the template |
| 158 | 158 | $xoopsTpl->assign('navig', $navig); |
@@ -192,4 +192,4 @@ discard block |
||
| 192 | 192 | $xoopsTpl->assign('lang', $lang); |
| 193 | 193 | $xoopsTpl->assign('view', 'calweek'); |
| 194 | 194 | |
| 195 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 195 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -2,10 +2,10 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | 6 | |
| 7 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 8 | -require_once __DIR__ . '/include/mail_fnc.php'; |
|
| 7 | +require_once __DIR__.'/include/constantes.php'; |
|
| 8 | +require_once __DIR__.'/include/mail_fnc.php'; |
|
| 9 | 9 | |
| 10 | 10 | // $member_uid = 1; |
| 11 | 11 | // $event_id = 393; |
@@ -40,26 +40,26 @@ discard block |
||
| 40 | 40 | //echo "<hr>"; |
| 41 | 41 | |
| 42 | 42 | if (!$GLOBALS['xoopsSecurity']->check()) { |
| 43 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 43 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | if ($xoopsUser && $xoopsModuleConfig['whos_going']) { |
| 47 | 47 | // If param are right |
| 48 | - if ((int)$_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) { |
|
| 48 | + if ((int) $_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) { |
|
| 49 | 49 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 50 | 50 | $eventMemberHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_MEMBER); |
| 51 | 51 | |
| 52 | 52 | // If the user have to be added |
| 53 | 53 | if ('add' === $_POST['mode']) { |
| 54 | - $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
|
| 54 | + $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser); |
|
| 55 | 55 | |
| 56 | 56 | if ($event->getVar('event_nbmember') > 0 |
| 57 | - && $eventMemberHandler->getNbMember((int)$_POST['event']) >= $event->getVar('event_nbmember')) { |
|
| 57 | + && $eventMemberHandler->getNbMember((int) $_POST['event']) >= $event->getVar('event_nbmember')) { |
|
| 58 | 58 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_0, _MD_EXTCAL_MSG_0); |
| 59 | 59 | $rediredtMessage = _MD_EXTCAL_MAX_MEMBER_REACHED; |
| 60 | 60 | } else { |
| 61 | 61 | $eventMemberHandler->createEventmember([ |
| 62 | - 'event_id' => (int)$_POST['event'], |
|
| 62 | + 'event_id' => (int) $_POST['event'], |
|
| 63 | 63 | 'uid' => $xoopsUser->getVar('uid'), |
| 64 | 64 | ]); |
| 65 | 65 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_1, _MD_EXTCAL_MSG_1); |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | // If the user have to be remove |
| 69 | 69 | } else { |
| 70 | 70 | if ('remove' === $_POST['mode']) { |
| 71 | - $eventMemberHandler->deleteEventmember([(int)$_POST['event'], $xoopsUser->getVar('uid')]); |
|
| 71 | + $eventMemberHandler->deleteEventmember([(int) $_POST['event'], $xoopsUser->getVar('uid')]); |
|
| 72 | 72 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_2, _MD_EXTCAL_MSG_2); |
| 73 | 73 | $rediredtMessage = _MD_EXTCAL_WHOS_GOING_REMOVED_TO_EVENT; |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | - redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false); |
|
| 76 | + redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false); |
|
| 77 | 77 | } else { |
| 78 | 78 | redirect_header('index.php', 3, _NOPERM, false); |
| 79 | 79 | } |