@@ -2,18 +2,18 @@ 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_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY]; |
| 8 | 8 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 9 | -require_once __DIR__ . '/header.php'; |
|
| 9 | +require_once __DIR__.'/header.php'; |
|
| 10 | 10 | |
| 11 | 11 | /* ========================================================================== */ |
| 12 | 12 | //recupe des variables get |
| 13 | -$year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
| 14 | -$month = isset($_GET['month']) ? (int)$_GET['month'] : date('n'); |
|
| 15 | -$day = isset($_GET['day']) ? (int)$_GET['day'] : date('j'); |
|
| 16 | -$cat = isset($_GET['cat']) ? (int)$_GET['cat'] : 0; |
|
| 13 | +$year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
| 14 | +$month = isset($_GET['month']) ? (int) $_GET['month'] : date('n'); |
|
| 15 | +$day = isset($_GET['day']) ? (int) $_GET['day'] : date('j'); |
|
| 16 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 17 | 17 | /* ========================================================================== */ |
| 18 | 18 | |
| 19 | 19 | //echo "{$params['view']}-{$year}-{$month}-{$day}<hr>extcal_{$params['view']}.html<br>"; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $form->addElement(getListMonths($month)); |
| 24 | 24 | $form->addElement(getListDays($day)); |
| 25 | 25 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 26 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 26 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 27 | 27 | |
| 28 | 28 | //------------------------------------------------------ |
| 29 | 29 | // Assigning the form to the template |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | 'nbJours' => $nbJours, |
| 47 | 47 | 'externalKeys' => 'cat_id', |
| 48 | 48 | ]; |
| 49 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 49 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 50 | 50 | /**********************************************************************/ |
| 51 | 51 | $eventsArray = $events; |
| 52 | 52 | $startDay = mktime(0, 0, 0, $month, $day, $year); |
@@ -101,21 +101,21 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $navig = [ |
| 103 | 103 | 'prev' => [ |
| 104 | - 'uri' => 'year=' . $pDayCalObj->thisYear() . '&month=' . $pDayCalObj->thisMonth() . '&day=' . $pDayCalObj->thisDay(), |
|
| 104 | + 'uri' => 'year='.$pDayCalObj->thisYear().'&month='.$pDayCalObj->thisMonth().'&day='.$pDayCalObj->thisDay(), |
|
| 105 | 105 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $pDayCalObj->getTimestamp()), |
| 106 | 106 | ], |
| 107 | 107 | 'this' => [ |
| 108 | - 'uri' => 'year=' . $dayCalObj->thisYear() . '&month=' . $dayCalObj->thisMonth() . '&day=' . $dayCalObj->thisDay(), |
|
| 108 | + 'uri' => 'year='.$dayCalObj->thisYear().'&month='.$dayCalObj->thisMonth().'&day='.$dayCalObj->thisDay(), |
|
| 109 | 109 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $dayCalObj->getTimestamp()), |
| 110 | 110 | ], |
| 111 | 111 | 'next' => [ |
| 112 | - 'uri' => 'year=' . $nDayCalObj->thisYear() . '&month=' . $nDayCalObj->thisMonth() . '&day=' . $nDayCalObj->thisDay(), |
|
| 112 | + 'uri' => 'year='.$nDayCalObj->thisYear().'&month='.$nDayCalObj->thisMonth().'&day='.$nDayCalObj->thisDay(), |
|
| 113 | 113 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_day'], $nDayCalObj->getTimestamp()), |
| 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); |
@@ -156,4 +156,4 @@ discard block |
||
| 156 | 156 | $xoopsTpl->assign('lang', $lang); |
| 157 | 157 | $xoopsTpl->assign('view', 'agendaday'); |
| 158 | 158 | |
| 159 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 159 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,15 +19,15 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 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 | |
| 25 | -require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/calendar.php'; |
|
| 25 | +require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/calendar.php'; |
|
| 26 | 26 | |
| 27 | 27 | if (!isset($_GET['event'])) { |
| 28 | 28 | $eventId = 0; |
| 29 | 29 | } else { |
| 30 | - $eventId = (int)$_GET['event']; |
|
| 30 | + $eventId = (int) $_GET['event']; |
|
| 31 | 31 | } |
| 32 | 32 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 33 | 33 | $event = $eventHandler->objectToArray($eventHandler->getEvent($eventId), ['cat_id']); |
@@ -42,136 +42,136 @@ discard block |
||
| 42 | 42 | // Adding formated date for start and end event |
| 43 | 43 | $eventHandler->formatEventDate($event, $xoopsModuleConfig['event_date_event']); |
| 44 | 44 | |
| 45 | -echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n"; |
|
| 46 | -echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"; |
|
| 47 | -echo '<head>' . "\n"; |
|
| 48 | -echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '">' . "\n"; |
|
| 49 | -echo '<title>' . $event['cat']['cat_name'] . ' - ' . $event['event_title'] . '</title>' . "\n"; |
|
| 50 | -echo '</head>' . "\n"; |
|
| 51 | -echo '<body onload="window.print()">' . "\n"; |
|
| 52 | -echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">' . "\n"; |
|
| 53 | -echo '<tr>' . "\n"; |
|
| 54 | -echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">' . "\n"; |
|
| 55 | -echo $event['event_title'] . "\n"; |
|
| 56 | -echo '</td>' . "\n"; |
|
| 57 | -echo '</tr>' . "\n"; |
|
| 58 | -echo '<tr>' . "\n"; |
|
| 59 | -echo '<td style="width:50%; border:1px solid black;">' . "\n"; |
|
| 60 | -echo '<b>' . $event['cat']['cat_name'] . '</b><br>' . "\n"; |
|
| 61 | -echo '<span style="font-weight:normal;">' . $event['cat']['cat_desc'] . '</span>' . "\n"; |
|
| 62 | -echo '</td>' . "\n"; |
|
| 63 | -echo '<td style="border:1px solid black;">' . "\n"; |
|
| 45 | +echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n"; |
|
| 46 | +echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n"; |
|
| 47 | +echo '<head>'."\n"; |
|
| 48 | +echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'">'."\n"; |
|
| 49 | +echo '<title>'.$event['cat']['cat_name'].' - '.$event['event_title'].'</title>'."\n"; |
|
| 50 | +echo '</head>'."\n"; |
|
| 51 | +echo '<body onload="window.print()">'."\n"; |
|
| 52 | +echo '<table style="border:1px solid black; width:640px;" cellspacing="0" cellspadding="0">'."\n"; |
|
| 53 | +echo '<tr>'."\n"; |
|
| 54 | +echo '<td colspan="2" style="font-size:1.2em; border:1px solid black;">'."\n"; |
|
| 55 | +echo $event['event_title']."\n"; |
|
| 56 | +echo '</td>'."\n"; |
|
| 57 | +echo '</tr>'."\n"; |
|
| 58 | +echo '<tr>'."\n"; |
|
| 59 | +echo '<td style="width:50%; border:1px solid black;">'."\n"; |
|
| 60 | +echo '<b>'.$event['cat']['cat_name'].'</b><br>'."\n"; |
|
| 61 | +echo '<span style="font-weight:normal;">'.$event['cat']['cat_desc'].'</span>'."\n"; |
|
| 62 | +echo '</td>'."\n"; |
|
| 63 | +echo '<td style="border:1px solid black;">'."\n"; |
|
| 64 | 64 | if (!$event['event_isrecur']) { |
| 65 | - echo '<b>' . _MD_EXTCAL_START . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_start'] . '</span><br>' . "\n"; |
|
| 66 | - echo '<b>' . _MD_EXTCAL_END . ' :</b> <span style="font-weight:normal;">' . $event['formated_event_end'] . '</span>' . "\n"; |
|
| 65 | + echo '<b>'._MD_EXTCAL_START.' :</b> <span style="font-weight:normal;">'.$event['formated_event_start'].'</span><br>'."\n"; |
|
| 66 | + echo '<b>'._MD_EXTCAL_END.' :</b> <span style="font-weight:normal;">'.$event['formated_event_end'].'</span>'."\n"; |
|
| 67 | 67 | } else { |
| 68 | - echo '<b>' . _MD_EXTCAL_RECCUR_RULE . ' :</b> <span style="font-weight:normal;">' . $event['formated_reccur_rule'] . '</span>' . "\n"; |
|
| 68 | + echo '<b>'._MD_EXTCAL_RECCUR_RULE.' :</b> <span style="font-weight:normal;">'.$event['formated_reccur_rule'].'</span>'."\n"; |
|
| 69 | 69 | } |
| 70 | -echo '</td>' . "\n"; |
|
| 71 | -echo '</tr>' . "\n"; |
|
| 70 | +echo '</td>'."\n"; |
|
| 71 | +echo '</tr>'."\n"; |
|
| 72 | 72 | |
| 73 | -echo '<tr>' . "\n"; |
|
| 73 | +echo '<tr>'."\n"; |
|
| 74 | 74 | if ('' != $event['event_desc']) { |
| 75 | - echo '<td style="border:1px solid black;">' . $event['event_desc'] . '</td>' . "\n"; |
|
| 75 | + echo '<td style="border:1px solid black;">'.$event['event_desc'].'</td>'."\n"; |
|
| 76 | 76 | } |
| 77 | 77 | if ('' != $event['event_price']) { |
| 78 | - echo '<td style="border:1px solid black;">' . _MD_EXTCAL_ETABLISSEMENT_PRICE . $event['event_price'] . ' ' . _MD_EXTCAL_DEVISE2 . '</td>' . "\n"; |
|
| 78 | + echo '<td style="border:1px solid black;">'._MD_EXTCAL_ETABLISSEMENT_PRICE.$event['event_price'].' '._MD_EXTCAL_DEVISE2.'</td>'."\n"; |
|
| 79 | 79 | } |
| 80 | -echo '</tr>' . "\n"; |
|
| 80 | +echo '</tr>'."\n"; |
|
| 81 | 81 | |
| 82 | 82 | //show contact info |
| 83 | 83 | if ('' != $event['event_contact']) { |
| 84 | - echo '<tr>' . "\n"; |
|
| 85 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
| 86 | - echo '<b>' . _MD_EXTCAL_CONTACT_INFO . '</b><br>' . "\n"; |
|
| 87 | - echo '<span style="font-weight:normal;">' . $event['event_organisateur'] . '<br>' . "\n"; |
|
| 88 | - echo '<span style="font-weight:normal;">' . $event['event_contact'] . '<br>' . "\n"; |
|
| 89 | - echo $event['event_address'] . '</span>' . "\n"; |
|
| 90 | - echo '</td>' . "\n"; |
|
| 91 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
| 92 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $event['event_email'] . '">' . $event['event_email'] . '</a><br>' . "\n"; |
|
| 93 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $event['event_url'] . '">' . $event['event_url'] . '</a>' . "\n"; |
|
| 94 | - echo '</td>' . "\n"; |
|
| 95 | - echo '</tr>' . "\n"; |
|
| 84 | + echo '<tr>'."\n"; |
|
| 85 | + echo '<td style="border:1px solid black;">'."\n"; |
|
| 86 | + echo '<b>'._MD_EXTCAL_CONTACT_INFO.'</b><br>'."\n"; |
|
| 87 | + echo '<span style="font-weight:normal;">'.$event['event_organisateur'].'<br>'."\n"; |
|
| 88 | + echo '<span style="font-weight:normal;">'.$event['event_contact'].'<br>'."\n"; |
|
| 89 | + echo $event['event_address'].'</span>'."\n"; |
|
| 90 | + echo '</td>'."\n"; |
|
| 91 | + echo '<td style="border:1px solid black;">'."\n"; |
|
| 92 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$event['event_email'].'">'.$event['event_email'].'</a><br>'."\n"; |
|
| 93 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$event['event_url'].'">'.$event['event_url'].'</a>'."\n"; |
|
| 94 | + echo '</td>'."\n"; |
|
| 95 | + echo '</tr>'."\n"; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | //show location |
| 99 | 99 | if ($event['event_etablissement'] = 0) { |
| 100 | - echo '<tr>' . "\n"; |
|
| 100 | + echo '<tr>'."\n"; |
|
| 101 | 101 | |
| 102 | 102 | // echo($location['nom']); |
| 103 | 103 | // var_dump($location); |
| 104 | 104 | // var_dump($event); |
| 105 | 105 | |
| 106 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
| 107 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT . '</b>' . "\n"; |
|
| 106 | + echo '<td style="border:1px solid black;">'."\n"; |
|
| 107 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT.'</b>'."\n"; |
|
| 108 | 108 | if ('' != $location['categorie']) { |
| 109 | - echo '<span style="font-weight:normal;"> (' . $location['categorie'] . ') <br>' . "\n"; |
|
| 109 | + echo '<span style="font-weight:normal;"> ('.$location['categorie'].') <br>'."\n"; |
|
| 110 | 110 | } |
| 111 | 111 | if ('' != $location['logo']) { |
| 112 | - echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/etablissement/' . $location['logo'] . ' height="75px">' . '' . "\n"; |
|
| 112 | + echo '<img align=right style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/etablissement/'.$location['logo'].' height="75px">'.''."\n"; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - echo '<span style="font-weight:normal;">' . $location['nom'] . '<br>' . "\n"; |
|
| 116 | - echo $location['description'] . '<br>' . "\n"; |
|
| 117 | - echo $location['adresse'] . '</span> <br>' . "\n"; |
|
| 115 | + echo '<span style="font-weight:normal;">'.$location['nom'].'<br>'."\n"; |
|
| 116 | + echo $location['description'].'<br>'."\n"; |
|
| 117 | + echo $location['adresse'].'</span> <br>'."\n"; |
|
| 118 | 118 | if ('' != $location['adresse2']) { |
| 119 | - echo $location['adresse2'] . '</span> <br>' . "\n"; |
|
| 119 | + echo $location['adresse2'].'</span> <br>'."\n"; |
|
| 120 | 120 | } |
| 121 | - echo $location['ville'] . "\n"; |
|
| 122 | - echo $location['cp'] . '<br>' . "\n"; |
|
| 121 | + echo $location['ville']."\n"; |
|
| 122 | + echo $location['cp'].'<br>'."\n"; |
|
| 123 | 123 | |
| 124 | 124 | if ('' != $location['horaires']) { |
| 125 | - echo $location['horaires'] . '</span> <br>' . "\n"; |
|
| 125 | + echo $location['horaires'].'</span> <br>'."\n"; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | if ('' != $location['divers']) { |
| 129 | - echo $location['divers'] . '</span> <br>' . "\n"; |
|
| 129 | + echo $location['divers'].'</span> <br>'."\n"; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | if ('' != $location['tarifs']) { |
| 133 | - echo $location['tarifs'] . '</span> ' . _MD_EXTCAL_DEVISE2 . "\n"; |
|
| 133 | + echo $location['tarifs'].'</span> '._MD_EXTCAL_DEVISE2."\n"; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - echo '</td>' . "\n"; |
|
| 137 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
| 136 | + echo '</td>'."\n"; |
|
| 137 | + echo '<td style="border:1px solid black;">'."\n"; |
|
| 138 | 138 | |
| 139 | 139 | if ('' != $location['tel_fixe']) { |
| 140 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_FIXE . ' :</b>' . $location['tel_fixe'] . '<br>' . "\n"; |
|
| 140 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_FIXE.' :</b>'.$location['tel_fixe'].'<br>'."\n"; |
|
| 141 | 141 | } |
| 142 | 142 | if ('' != $location['tel_portable']) { |
| 143 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE . ' :</b>' . $location['tel_portable'] . '<br>' . "\n"; |
|
| 143 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE.' :</b>'.$location['tel_portable'].'<br>'."\n"; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - echo '<b>' . _MD_EXTCAL_EMAIL . ' :</b> <a href="mailto:' . $location['mail'] . '">' . $location['mail'] . '</a><br>' . "\n"; |
|
| 147 | - echo '<b>' . _MD_EXTCAL_URL . ' :</b> <a href="' . $location['site'] . '">' . $location['site'] . '</a>' . '<br>' . "\n"; |
|
| 148 | - echo '<b>' . _MD_EXTCAL_ETABLISSEMENT_MAP . ' :</b> <a href="' . $location['map'] . '">' . _MD_EXTCAL_ETABLISSEMENT_MAP2 . '</a>' . "\n"; |
|
| 146 | + echo '<b>'._MD_EXTCAL_EMAIL.' :</b> <a href="mailto:'.$location['mail'].'">'.$location['mail'].'</a><br>'."\n"; |
|
| 147 | + echo '<b>'._MD_EXTCAL_URL.' :</b> <a href="'.$location['site'].'">'.$location['site'].'</a>'.'<br>'."\n"; |
|
| 148 | + echo '<b>'._MD_EXTCAL_ETABLISSEMENT_MAP.' :</b> <a href="'.$location['map'].'">'._MD_EXTCAL_ETABLISSEMENT_MAP2.'</a>'."\n"; |
|
| 149 | 149 | |
| 150 | - echo '</td>' . "\n"; |
|
| 151 | - echo '</tr>' . "\n"; |
|
| 150 | + echo '</td>'."\n"; |
|
| 151 | + echo '</tr>'."\n"; |
|
| 152 | 152 | } |
| 153 | 153 | //show images |
| 154 | 154 | |
| 155 | 155 | if (('' != $event['event_picture1']) || ('' != $event['event_picture2'])) { |
| 156 | - echo '<tr>' . "\n"; |
|
| 156 | + echo '<tr>'."\n"; |
|
| 157 | 157 | if ('' != $event['event_picture1']) { |
| 158 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
| 159 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture1'] . ' height="100px">' . '' . "\n"; |
|
| 160 | - echo '</td>' . "\n"; |
|
| 158 | + echo '<td style="border:1px solid black;">'."\n"; |
|
| 159 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture1'].' height="100px">'.''."\n"; |
|
| 160 | + echo '</td>'."\n"; |
|
| 161 | 161 | } |
| 162 | 162 | if ('' != $event['event_picture2']) { |
| 163 | - echo '<td style="border:1px solid black;">' . "\n"; |
|
| 164 | - echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src=' . XOOPS_URL . '/uploads/extcal/' . $event['event_picture2'] . ' height="100px">' . '' . "\n"; |
|
| 165 | - echo '</td>' . "\n"; |
|
| 163 | + echo '<td style="border:1px solid black;">'."\n"; |
|
| 164 | + echo '<img align=left style="border:1px solid #FFFFFF;margin-right:6px" src='.XOOPS_URL.'/uploads/extcal/'.$event['event_picture2'].' height="100px">'.''."\n"; |
|
| 165 | + echo '</td>'."\n"; |
|
| 166 | 166 | } |
| 167 | - echo '</tr>' . "\n"; |
|
| 167 | + echo '</tr>'."\n"; |
|
| 168 | 168 | } |
| 169 | 169 | //-------------------- |
| 170 | 170 | |
| 171 | -echo '</table><br>' . "\n"; |
|
| 171 | +echo '</table><br>'."\n"; |
|
| 172 | 172 | echo '<div style="text-align:center; width:640px;">'; |
| 173 | -echo $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'] . '<br>'; |
|
| 174 | -echo '<a href="' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '">' . XOOPS_URL . '/modules/extcal/event.php?event=' . $event['event_id'] . '</a>'; |
|
| 173 | +echo $xoopsConfig['sitename'].' - '.$xoopsConfig['slogan'].'<br>'; |
|
| 174 | +echo '<a href="'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'">'.XOOPS_URL.'/modules/extcal/event.php?event='.$event['event_id'].'</a>'; |
|
| 175 | 175 | echo '</div>'; |
| 176 | -echo '</body>' . "\n"; |
|
| 177 | -echo '</html>' . "\n"; |
|
| 176 | +echo '</body>'."\n"; |
|
| 177 | +echo '</html>'."\n"; |
|
@@ -2,23 +2,23 @@ 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_AGENDA_WEEK, 'file' => _EXTCAL_FILE_AGENDA_WEEK]; |
| 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 | // Validate the date (day, month and year) |
| 18 | 18 | $dayTS = mktime(0, 0, 0, $month, $day, $year); |
| 19 | 19 | //$offset = date('w', $dayTS) - $xoopsModuleConfig['week_start_day']; |
| 20 | 20 | $offset = date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] < 7 ? date('w', $dayTS) + 7 - $xoopsModuleConfig['week_start_day'] : 0; |
| 21 | -$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 21 | +$dayTS -= ($offset * _EXTCAL_TS_DAY); |
|
| 22 | 22 | $year = date('Y', $dayTS); |
| 23 | 23 | $month = date('n', $dayTS); |
| 24 | 24 | $day = date('j', $dayTS); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $form->addElement(getListMonths($month)); |
| 29 | 29 | $form->addElement(getListDays($day)); |
| 30 | 30 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 31 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 31 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 32 | 32 | |
| 33 | 33 | // Assigning the form to the template |
| 34 | 34 | $form->assign($xoopsTpl); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | 'nbJours' => $nbJours, |
| 52 | 52 | 'externalKeys' => 'cat_id', |
| 53 | 53 | ]; |
| 54 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 54 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 55 | 55 | /**********************************************************************/ |
| 56 | 56 | $eventsArray = $events; |
| 57 | 57 | // Formating date |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | //------------------------------------------------------------------- |
| 84 | 84 | |
| 85 | 85 | //$params['colJourWidth'] = (int)((((500-50)/$nbJours)/500*100)+.5); |
| 86 | -$params['colJourWidth'] = (int)((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
| 86 | +$params['colJourWidth'] = (int) ((((500 - 50) / $nbJours) / 500 * 100) + .6); |
|
| 87 | 87 | // echo "agenda_week : {$dayTS}<br>"; |
| 88 | 88 | $tAgenda = agenda_getEvents($eventsArray, $dayTS, $hStart, $hEnd, $mTranche, $nbJours); |
| 89 | 89 | //$exp = print_r($eventsArray, true); |
@@ -105,21 +105,21 @@ discard block |
||
| 105 | 105 | |
| 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($xoopsModuleConfig['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($xoopsModuleConfig['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($xoopsModuleConfig['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); |
@@ -160,4 +160,4 @@ discard block |
||
| 160 | 160 | $xoopsTpl->assign('lang', $lang); |
| 161 | 161 | $xoopsTpl->assign('view', 'agendaweek'); |
| 162 | 162 | |
| 163 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 163 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -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>'; |