@@ -34,19 +34,19 @@ |
||
| 34 | 34 | //$xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 35 | 35 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 36 | 36 | |
| 37 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;"; |
|
| 37 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;"; |
|
| 38 | 38 | $xoopsDB->query($sql); |
| 39 | 39 | |
| 40 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;'; |
|
| 40 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;'; |
|
| 41 | 41 | $xoopsDB->query($sql); |
| 42 | 42 | |
| 43 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` '; |
|
| 43 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` '; |
|
| 44 | 44 | $xoopsDB->query($sql); |
| 45 | 45 | |
| 46 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;'; |
|
| 46 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;'; |
|
| 47 | 47 | $xoopsDB->query($sql); |
| 48 | 48 | |
| 49 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;'; |
|
| 49 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;'; |
|
| 50 | 50 | $xoopsDB->query($sql); |
| 51 | 51 | |
| 52 | 52 | $sql = 'CREATE TABLE `' |
@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 7 | -require_once __DIR__ . '/header.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | +require_once __DIR__.'/header.php'; |
|
| 8 | 8 | |
| 9 | 9 | // Getting eXtCal object's handler |
| 10 | 10 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $permHandler = Extcal\Perm::getHandler(); |
| 13 | 13 | $xoopsUser = $xoopsUser ?: null; |
| 14 | 14 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
| 15 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 15 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 16 | 16 | |
| 17 | 17 | // Title of the page |
| 18 | 18 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | //$form->display(); |
| 24 | 24 | |
| 25 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 25 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 26 | 26 | } else { |
| 27 | 27 | redirect_header('index.php', 3); |
| 28 | 28 | } |
@@ -19,20 +19,20 @@ 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 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_event.tpl'; |
| 26 | -require_once __DIR__ . '/header.php'; |
|
| 26 | +require_once __DIR__.'/header.php'; |
|
| 27 | 27 | |
| 28 | 28 | //exit; |
| 29 | 29 | |
| 30 | -include XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
| 30 | +include XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
| 31 | 31 | |
| 32 | 32 | if (!isset($_GET['event'])) { |
| 33 | 33 | $eventId = 0; |
| 34 | 34 | } else { |
| 35 | - $eventId = (int)$_GET['event']; |
|
| 35 | + $eventId = (int) $_GET['event']; |
|
| 36 | 36 | } |
| 37 | 37 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 38 | 38 | $fileHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_FILE); |
@@ -230,4 +230,4 @@ discard block |
||
| 230 | 230 | |
| 231 | 231 | //function XoopsFormDhtmlTextArea($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = array()); |
| 232 | 232 | |
| 233 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 233 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -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_MONTH, 'file' => _EXTCAL_FILE_MONTH]; |
| 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 | -$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 | +$cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; |
|
| 15 | 15 | /* ========================================================================== */ |
| 16 | 16 | |
| 17 | 17 | $form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get'); |
| 18 | 18 | $form->addElement(getListYears($year, $xoopsModuleConfig['agenda_nb_years_before'], $xoopsModuleConfig['agenda_nb_years_after'])); |
| 19 | 19 | $form->addElement(getListMonths($month)); |
| 20 | 20 | $form->addElement(Extcal\Utility::getListCategories($cat)); |
| 21 | -$form->addElement( new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 21 | +$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit')); |
|
| 22 | 22 | |
| 23 | 23 | // Assigning the form to the template |
| 24 | 24 | $form->assign($xoopsTpl); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'cat' => $cat, |
| 34 | 34 | 'externalKeys' => 'cat_id', |
| 35 | 35 | ]; |
| 36 | -$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 36 | +$events = $eventHandler->getEventsOnPeriode($criteres); |
|
| 37 | 37 | /**********************************************************************/ |
| 38 | 38 | $eventsArray = $events; |
| 39 | 39 | |
@@ -90,21 +90,21 @@ discard block |
||
| 90 | 90 | $nMonthCalObj = $monthCalObj->nextMonth('object'); |
| 91 | 91 | $navig = [ |
| 92 | 92 | 'prev' => [ |
| 93 | - 'uri' => 'year=' . $pMonthCalObj->thisYear() . '&month=' . $pMonthCalObj->thisMonth(), |
|
| 93 | + 'uri' => 'year='.$pMonthCalObj->thisYear().'&month='.$pMonthCalObj->thisMonth(), |
|
| 94 | 94 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $pMonthCalObj->getTimestamp()), |
| 95 | 95 | ], |
| 96 | 96 | 'this' => [ |
| 97 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
| 97 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
| 98 | 98 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
| 99 | 99 | ], |
| 100 | 100 | 'next' => [ |
| 101 | - 'uri' => 'year=' . $nMonthCalObj->thisYear() . '&month=' . $nMonthCalObj->thisMonth(), |
|
| 101 | + 'uri' => 'year='.$nMonthCalObj->thisYear().'&month='.$nMonthCalObj->thisMonth(), |
|
| 102 | 102 | 'name' => $timeHandler->getFormatedDate($xoopsModuleConfig['nav_date_month'], $nMonthCalObj->getTimestamp()), |
| 103 | 103 | ], |
| 104 | 104 | ]; |
| 105 | 105 | |
| 106 | 106 | // Title of the page |
| 107 | -$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name') . ' ' . $navig['this']['name']); |
|
| 107 | +$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name').' '.$navig['this']['name']); |
|
| 108 | 108 | |
| 109 | 109 | // Assigning navig data to the template |
| 110 | 110 | $xoopsTpl->assign('navig', $navig); |
@@ -161,4 +161,4 @@ discard block |
||
| 161 | 161 | $xoopsTpl->assign('lang', $lang); |
| 162 | 162 | $xoopsTpl->assign('view', 'month'); |
| 163 | 163 | |
| 164 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 164 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -include __DIR__ . '/../../mainfile.php'; |
|
| 22 | +include __DIR__.'/../../mainfile.php'; |
|
| 23 | 23 | |
| 24 | -include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 25 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 24 | +include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 25 | +require_once __DIR__.'/include/constantes.php'; |
|
| 26 | 26 | |
| 27 | 27 | $permHandler = Extcal\Perm::getHandler(); |
| 28 | 28 | $xoopsUser = $xoopsUser ?: null; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
| 36 | 36 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 37 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
| 37 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
| 38 | 38 | /* ========================================================================== */ |
| 39 | 39 | |
| 40 | 40 | // Tooltips include |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | if (!isset($_GET['event'])) { |
| 46 | 46 | $eventId = 0; |
| 47 | 47 | } else { |
| 48 | - $eventId = (int)$_GET['event']; |
|
| 48 | + $eventId = (int) $_GET['event']; |
|
| 49 | 49 | } |
| 50 | 50 | if (!isset($_GET['action'])) { |
| 51 | 51 | $action = 'edit'; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | // Getting eXtCal object's handler |
| 57 | 57 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 58 | 58 | |
| 59 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
| 59 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
| 60 | 60 | |
| 61 | 61 | // Title of the page |
| 62 | 62 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -65,4 +65,4 @@ discard block |
||
| 65 | 65 | $form = $eventHandler->getEventForm('user', $action, ['event_id' => $eventId]); |
| 66 | 66 | $form->display(); |
| 67 | 67 | |
| 68 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 68 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -2,16 +2,16 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -include __DIR__ . '/../../mainfile.php'; |
|
| 6 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 7 | -require_once __DIR__ . '/header.php'; |
|
| 5 | +include __DIR__.'/../../mainfile.php'; |
|
| 6 | +require_once __DIR__.'/include/constantes.php'; |
|
| 7 | +require_once __DIR__.'/header.php'; |
|
| 8 | 8 | |
| 9 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 9 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 10 | 10 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 11 | 11 | if (!isset($_GET['cat'])) { |
| 12 | 12 | $cat = 0; |
| 13 | 13 | } else { |
| 14 | - $cat = (int)$_GET['cat']; |
|
| 14 | + $cat = (int) $_GET['cat']; |
|
| 15 | 15 | } |
| 16 | 16 | if (function_exists('mb_http_output')) { |
| 17 | 17 | mb_http_output('pass'); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat); |
| 25 | 25 | if (is_array($events)) { |
| 26 | 26 | $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); |
| 27 | - $tpl->assign('channel_link', XOOPS_URL . '/'); |
|
| 27 | + $tpl->assign('channel_link', XOOPS_URL.'/'); |
|
| 28 | 28 | $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))); |
| 29 | 29 | $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss')); |
| 30 | 30 | $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']); |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | $tpl->assign('channel_category', 'Event'); |
| 33 | 33 | $tpl->assign('channel_generator', 'XOOPS'); |
| 34 | 34 | $tpl->assign('channel_language', _LANGCODE); |
| 35 | - $tpl->assign('image_url', XOOPS_URL . '/modules/extcal/assets/images/extcal_logo.png'); |
|
| 35 | + $tpl->assign('image_url', XOOPS_URL.'/modules/extcal/assets/images/extcal_logo.png'); |
|
| 36 | 36 | $tpl->assign('image_width', 92); |
| 37 | 37 | $tpl->assign('image_height', 52); |
| 38 | 38 | foreach ($events as $event) { |
| 39 | 39 | $tpl->append('items', [ |
| 40 | 40 | 'title' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)), |
| 41 | - 'link' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
| 42 | - 'guid' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
| 41 | + 'link' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
| 42 | + 'guid' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
| 43 | 43 | 'pubdate' => formatTimestamp($event->getVar('event_start'), 'rss'), |
| 44 | 44 | 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES)), |
| 45 | 45 | ]); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | //Kraven 30 |
| 21 | 21 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
| 22 | 22 | |
| 23 | -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; |
|
| 23 | +require_once XOOPS_ROOT_PATH.'/kernel/object.php'; |
|
| 24 | 24 | |
| 25 | 25 | //class Event extends \XoopsObject |
| 26 | 26 | //class extcal_etablissement extends \XoopsObject |
@@ -70,34 +70,34 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | $title = $this->isNew() ? sprintf(_MD_EXTCAL_ETABLISSEMENT_ADD) : sprintf(_MD_EXTCAL_ETABLISSEMENT_EDIT); |
| 72 | 72 | |
| 73 | - require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 73 | + require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 74 | 74 | |
| 75 | 75 | $form = new \XoopsThemeForm($title, 'form', $action, 'post', true); |
| 76 | 76 | $form->setExtra('enctype="multipart/form-data"'); |
| 77 | 77 | |
| 78 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_NOM, 'nom', 50, 255, $this->getVar('nom')), true); |
|
| 79 | - $form->addElement( new \XoopsFormDhtmlTextArea(_MD_EXTCAL_ETABLISSEMENT_DESCRIPTION, 'description', $this->getVar('description'), 10), false); |
|
| 80 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CATEGORIE, 'categorie', 40, 255, $this->getVar('categorie')), false); |
|
| 81 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE, 'adresse', 50, 255, $this->getVar('adresse')), false); |
|
| 82 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE2, 'adresse2', 50, 255, $this->getVar('adresse2')), false); |
|
| 83 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CP, 'cp', 10, 10, $this->getVar('cp')), false); |
|
| 84 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_VILLE, 'ville', 20, 255, $this->getVar('ville')), false); |
|
| 85 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_FIXE, 'tel_fixe', 20, 20, $this->getVar('tel_fixe')), false); |
|
| 86 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE, 'tel_portable', 20, 20, $this->getVar('tel_portable')), false); |
|
| 87 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAIL, 'mail', 50, 255, $this->getVar('mail')), false); |
|
| 88 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_SITE, 'site', 50, 255, $this->getVar('site')), false); |
|
| 89 | - $form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40)); |
|
| 90 | - $form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40)); |
|
| 78 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_NOM, 'nom', 50, 255, $this->getVar('nom')), true); |
|
| 79 | + $form->addElement(new \XoopsFormDhtmlTextArea(_MD_EXTCAL_ETABLISSEMENT_DESCRIPTION, 'description', $this->getVar('description'), 10), false); |
|
| 80 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CATEGORIE, 'categorie', 40, 255, $this->getVar('categorie')), false); |
|
| 81 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE, 'adresse', 50, 255, $this->getVar('adresse')), false); |
|
| 82 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_ADRESSE2, 'adresse2', 50, 255, $this->getVar('adresse2')), false); |
|
| 83 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_CP, 'cp', 10, 10, $this->getVar('cp')), false); |
|
| 84 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_VILLE, 'ville', 20, 255, $this->getVar('ville')), false); |
|
| 85 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_FIXE, 'tel_fixe', 20, 20, $this->getVar('tel_fixe')), false); |
|
| 86 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TEL_PORTABLE, 'tel_portable', 20, 20, $this->getVar('tel_portable')), false); |
|
| 87 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAIL, 'mail', 50, 255, $this->getVar('mail')), false); |
|
| 88 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_SITE, 'site', 50, 255, $this->getVar('site')), false); |
|
| 89 | + $form->addElement(new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40)); |
|
| 90 | + $form->addElement(new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40)); |
|
| 91 | 91 | //$form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_TARIFS, 'tarifs', $this->getVar("tarifs"), 5, 40)); |
| 92 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS . ' ( ' . _MD_EXTCAL_DEVISE2 . ' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false); |
|
| 92 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS.' ( '._MD_EXTCAL_DEVISE2.' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false); |
|
| 93 | 93 | |
| 94 | 94 | //$form->addElement( new \XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', $this->getVar("map"), 5, 40)); |
| 95 | - $form->addElement( new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false); |
|
| 95 | + $form->addElement(new \XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false); |
|
| 96 | 96 | |
| 97 | 97 | //Logo |
| 98 | 98 | $file_tray = new \XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
| 99 | 99 | if ('' != $this->getVar('logo')) { |
| 100 | - $file_tray->addElement( new \XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/etablissement/' . $this->getVar('logo') . "' name='image' id='image' alt=''><br><br>")); |
|
| 100 | + $file_tray->addElement(new \XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/etablissement/'.$this->getVar('logo')."' name='image' id='image' alt=''><br><br>")); |
|
| 101 | 101 | $check_del_img = new \XoopsFormCheckBox('', 'delimg'); |
| 102 | 102 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
| 103 | 103 | $file_tray->addElement($check_del_img); |
@@ -108,15 +108,15 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | $file_img->setExtra("size ='40'"); |
| 110 | 110 | $file_tray->addElement($file_img); |
| 111 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(3145728 / 1000), 500, 500); |
|
| 112 | - $file_label = new \XoopsFormLabel('', '<br>' . $msg); |
|
| 111 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (3145728 / 1000), 500, 500); |
|
| 112 | + $file_label = new \XoopsFormLabel('', '<br>'.$msg); |
|
| 113 | 113 | $file_tray->addElement($file_label); |
| 114 | 114 | $form->addElement($file_tray); |
| 115 | - $form->addElement( new \XoopsFormHidden('file', $this->getVar('logo'))); |
|
| 115 | + $form->addElement(new \XoopsFormHidden('file', $this->getVar('logo'))); |
|
| 116 | 116 | unset($file_img, $file_tray); |
| 117 | 117 | |
| 118 | - $form->addElement( new \XoopsFormHidden('op', 'save_etablissement')); |
|
| 119 | - $form->addElement( new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
| 118 | + $form->addElement(new \XoopsFormHidden('op', 'save_etablissement')); |
|
| 119 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
| 120 | 120 | $form->display(); |
| 121 | 121 | |
| 122 | 122 | return $form; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * L'utilisation de ce formulaire d'adminitration suppose |
| 16 | 16 | * que la classe correspondante de la table a été générées avec classGenerator |
| 17 | 17 | **/ |
| 18 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 18 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 19 | 19 | |
| 20 | 20 | use Xmf\Request; |
| 21 | 21 | use XoopsModules\Extcal; |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2) |
| 61 | 61 | { |
| 62 | 62 | /////////////////////////////////////////////////////////////////////////////// |
| 63 | - $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/'; |
|
| 64 | - $uploadurl_event = XOOPS_URL . '/uploads/extcal/'; |
|
| 63 | + $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/'; |
|
| 64 | + $uploadurl_event = XOOPS_URL.'/uploads/extcal/'; |
|
| 65 | 65 | //$picture = ''; |
| 66 | 66 | for ($j = 1; $j < 3; ++$j) { |
| 67 | - $delimg = @$REQUEST['delimg_' . $j . '']; |
|
| 68 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
| 67 | + $delimg = @$REQUEST['delimg_'.$j.'']; |
|
| 68 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
| 69 | 69 | if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) { |
| 70 | 70 | $upload = new \XoopsMediaUploader($uploaddir_event, [ |
| 71 | 71 | 'image/gif', |
@@ -88,15 +88,15 @@ discard block |
||
| 88 | 88 | $event_picture2 = $upload->getSavedFileName(); |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | - } elseif (!empty($REQUEST['file' . $j])) { |
|
| 91 | + } elseif (!empty($REQUEST['file'.$j])) { |
|
| 92 | 92 | if (1 == $j) { |
| 93 | - $event_picture1 = $REQUEST['file' . $j]; |
|
| 93 | + $event_picture1 = $REQUEST['file'.$j]; |
|
| 94 | 94 | } elseif (2 == $j) { |
| 95 | - $event_picture2 = $REQUEST['file' . $j]; |
|
| 95 | + $event_picture2 = $REQUEST['file'.$j]; |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | } else { |
| 99 | - $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j]; |
|
| 99 | + $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j]; |
|
| 100 | 100 | if (1 == $j) { |
| 101 | 101 | $event_picture1 = ''; |
| 102 | 102 | } elseif (2 == $j) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | { |
| 125 | 125 | global $xoopsUser; |
| 126 | 126 | // Category selectbox |
| 127 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 127 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 128 | 128 | |
| 129 | 129 | $catsList = $catHandler->getAllCat($xoopsUser); |
| 130 | 130 | $catSelect = new \XoopsFormSelect('', $name, $cat); |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | // Category selectbox |
| 153 | 153 | //<option style="background-color:#00FFFF;">VARCHAR</option> |
| 154 | 154 | |
| 155 | - $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 156 | - $catsList = $catHandler->getAllCat($xoopsUser); |
|
| 155 | + $catHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_CAT); |
|
| 156 | + $catsList = $catHandler->getAllCat($xoopsUser); |
|
| 157 | 157 | |
| 158 | 158 | $t = []; |
| 159 | 159 | foreach ($catsList as $catList) { |
@@ -192,17 +192,17 @@ discard block |
||
| 192 | 192 | $select->addOption('', ''); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 196 | - $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 195 | + $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 196 | + $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 197 | 197 | |
| 198 | - $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 199 | - $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 198 | + $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 199 | + $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 200 | 200 | |
| 201 | - $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 202 | - $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 201 | + $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 202 | + $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 203 | 203 | |
| 204 | - $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
| 205 | - $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
| 204 | + $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
| 205 | + $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
| 206 | 206 | |
| 207 | 207 | return $select; |
| 208 | 208 | } |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | public static function echoDateArray($period) |
| 317 | 317 | { |
| 318 | 318 | foreach ($period as $dt) { |
| 319 | - echo $dt->format("l Y-m-d H:i:s\n") . '<br>'; |
|
| 319 | + echo $dt->format("l Y-m-d H:i:s\n").'<br>'; |
|
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | $txt = print_r($t, true); |
| 335 | - echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>"; |
|
| 335 | + echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>"; |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /*****************************************************************/ |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | if ('' != $msg) { |
| 346 | 346 | echo "<hr>{$msg}<hr>"; |
| 347 | 347 | } |
| 348 | - echo $line . '<br>'; |
|
| 348 | + echo $line.'<br>'; |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | /*****************************************************************/ |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | echo "<hr>{$msg}<hr>"; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | - echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>'; |
|
| 375 | + echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>'; |
|
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | /*****************************************************************/ |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | */ |
| 487 | 487 | public static function getLighterColor($color, $plancher, $plafond) |
| 488 | 488 | { |
| 489 | - require_once __DIR__ . '/ColorTools.php'; |
|
| 489 | + require_once __DIR__.'/ColorTools.php'; |
|
| 490 | 490 | |
| 491 | 491 | //$ct = new ColorTools(); |
| 492 | 492 | //return $ct->eclaircir($color,$plancher,$plafond); |
@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | $groupPermissionHandler = xoops_getHandler('groupperm'); |
| 62 | 62 | $moduleId = $GLOBALS['xoopsModule']->getVar('mid'); |
| 63 | 63 | |
| 64 | - $criteria = new \CriteriaCompo(); |
|
| 65 | - $criteria->add( new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
| 66 | - $criteria->add( new \Criteria('gperm_modid', $moduleId)); |
|
| 64 | + $criteria = new \CriteriaCompo(); |
|
| 65 | + $criteria->add(new \Criteria('gperm_name', 'extcal_perm_mask')); |
|
| 66 | + $criteria->add(new \Criteria('gperm_modid', $moduleId)); |
|
| 67 | 67 | $permMask = $groupPermissionHandler->getObjects($criteria); |
| 68 | 68 | |
| 69 | 69 | // Retriving group list |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public function getCat($catId, $skipPerm = false) |
| 126 | 126 | { |
| 127 | - $criteriaCompo = new \CriteriaCompo(); |
|
| 128 | - $criteriaCompo->add( new \Criteria('cat_id', $catId)); |
|
| 127 | + $criteriaCompo = new \CriteriaCompo(); |
|
| 128 | + $criteriaCompo->add(new \Criteria('cat_id', $catId)); |
|
| 129 | 129 | if (!$skipPerm) { |
| 130 | 130 | $this->_addCatPermCriteria($criteriaCompo, $GLOBALS['xoopsUser']); |
| 131 | 131 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | public function getAllCat($user, $perm = 'extcal_cat_view') |
| 147 | 147 | { |
| 148 | - $criteriaCompo = new \CriteriaCompo(); |
|
| 148 | + $criteriaCompo = new \CriteriaCompo(); |
|
| 149 | 149 | if ('all' !== $perm) { |
| 150 | 150 | $this->_addCatPermCriteria($criteriaCompo, $user, $perm); |
| 151 | 151 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function getAllCatById($user, $perm = 'all') |
| 163 | 163 | { |
| 164 | - $criteriaCompo = new \CriteriaCompo(); |
|
| 164 | + $criteriaCompo = new \CriteriaCompo(); |
|
| 165 | 165 | if ('all' !== $perm) { |
| 166 | 166 | $this->_addCatPermCriteria($criteriaCompo, $user, $perm); |
| 167 | 167 | } |
@@ -186,15 +186,15 @@ discard block |
||
| 186 | 186 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
| 187 | 187 | $count = count($authorizedAccessCats); |
| 188 | 188 | if ($count > 0) { |
| 189 | - $in = '(' . $authorizedAccessCats[0]; |
|
| 189 | + $in = '('.$authorizedAccessCats[0]; |
|
| 190 | 190 | array_shift($authorizedAccessCats); |
| 191 | 191 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
| 192 | - $in .= ',' . $authorizedAccessCat; |
|
| 192 | + $in .= ','.$authorizedAccessCat; |
|
| 193 | 193 | } |
| 194 | 194 | $in .= ')'; |
| 195 | - $criteria->add( new \Criteria('cat_id', $in, 'IN')); |
|
| 195 | + $criteria->add(new \Criteria('cat_id', $in, 'IN')); |
|
| 196 | 196 | } else { |
| 197 | - $criteria->add( new \Criteria('cat_id', '(0)', 'IN')); |
|
| 197 | + $criteria->add(new \Criteria('cat_id', '(0)', 'IN')); |
|
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | |