@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include __DIR__ . '/../../mainfile.php'; |
|
| 4 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 3 | +include __DIR__.'/../../mainfile.php'; |
|
| 4 | +require_once __DIR__.'/include/constantes.php'; |
|
| 5 | 5 | $params = ['view' => _EXTCAL_NAV_NEW_EVENT, 'file' => _EXTCAL_FILE_NEW_EVENT]; |
| 6 | 6 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
| 7 | -require_once __DIR__ . '/header.php'; |
|
| 7 | +require_once __DIR__.'/header.php'; |
|
| 8 | 8 | |
| 9 | 9 | /* ========================================================================== */ |
| 10 | 10 | //Extcal\Utility::echoArray($_GET); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | //exit; |
| 18 | 18 | if (count($permHandler->getAuthorizedCat($xoopsUser, 'extcal_cat_submit')) > 0) { |
| 19 | - include XOOPS_ROOT_PATH . '/header.php'; |
|
| 19 | + include XOOPS_ROOT_PATH.'/header.php'; |
|
| 20 | 20 | |
| 21 | 21 | // Title of the page |
| 22 | 22 | $xoopsTpl->assign('xoops_pagetitle', _MI_EXTCAL_SUBMIT_EVENT); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $xoopsTpl->assign('lang', $lang); |
| 59 | 59 | $xoopsTpl->assign('view', 'newevent'); |
| 60 | 60 | |
| 61 | - include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 61 | + include XOOPS_ROOT_PATH.'/footer.php'; |
|
| 62 | 62 | } else { |
| 63 | 63 | redirect_header('index.php', 3); |
| 64 | 64 | } |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../../mainfile.php'; |
|
| 23 | -require_once __DIR__ . '/include/constantes.php'; |
|
| 22 | +require_once __DIR__.'/../../mainfile.php'; |
|
| 23 | +require_once __DIR__.'/include/constantes.php'; |
|
| 24 | 24 | $GLOBALS['xoopsOption']['template_main'] = 'extcal_etablissement.tpl'; |
| 25 | -require_once __DIR__ . '/header.php'; |
|
| 25 | +require_once __DIR__.'/header.php'; |
|
| 26 | 26 | |
| 27 | 27 | //require_once XOOPS_ROOT_PATH."/modules/extcal/class/etablissement.php"; |
| 28 | 28 | $etablissementHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_ETABLISSEMENT); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $etablissement_exist = $etablissementHandler->getCount($criteria); |
| 39 | 39 | |
| 40 | 40 | if (0 == $etablissement_exist) { |
| 41 | - redirect_header(XOOPS_URL . '/modules/extcal/index.php', 3, _NOPERM); |
|
| 41 | + redirect_header(XOOPS_URL.'/modules/extcal/index.php', 3, _NOPERM); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $view_etablissement = $etablissementHandler->getEtablissement($etablissement_id, true); |
@@ -80,12 +80,12 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $date = mktime(0, 0, 0, date('m'), date('d'), date('y')); |
| 82 | 82 | |
| 83 | -$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM ' . $xoopsDB->prefix('extcal_event') . " WHERE event_etablissement='" . $etablissement_id . "' AND event_start >='" . $date . "'"); |
|
| 83 | +$requete = $xoopsDB->query('SELECT event_id, event_title, event_desc, event_picture1, event_start FROM '.$xoopsDB->prefix('extcal_event')." WHERE event_etablissement='".$etablissement_id."' AND event_start >='".$date."'"); |
|
| 84 | 84 | while ($donnees = $xoopsDB->fetchArray($requete)) { |
| 85 | 85 | if ($donnees['event_desc'] > 210) { |
| 86 | 86 | $event_desc = $donnees['event_desc']; |
| 87 | 87 | } else { |
| 88 | - $event_desc = substr($donnees['event_desc'], 0, 210) . '...'; |
|
| 88 | + $event_desc = substr($donnees['event_desc'], 0, 210).'...'; |
|
| 89 | 89 | } |
| 90 | 90 | $xoopsTpl->append('events', [ |
| 91 | 91 | 'event_picture1' => $donnees['event_picture1'], |
@@ -98,4 +98,4 @@ discard block |
||
| 98 | 98 | /** @var xos_opal_Theme $xoTheme */ |
| 99 | 99 | $xoTheme->addScript('browse.php?modules/extcal/assets/js/highslide.js'); |
| 100 | 100 | $xoTheme->addStylesheet('browse.php?modules/extcal/assets/js/highslide.css'); |
| 101 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
| 101 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 23 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 24 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 23 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 24 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 25 | 25 | //require_once __DIR__ . '/../class/form/extcalform.php'; |
| 26 | -require_once __DIR__ . '/admin_header.php'; |
|
| 26 | +require_once __DIR__.'/admin_header.php'; |
|
| 27 | 27 | //require_once __DIR__ . '/../class/Utility.php'; |
| 28 | 28 | |
| 29 | 29 | $gepeto = array_merge($_GET, $_POST); |
@@ -52,15 +52,15 @@ discard block |
||
| 52 | 52 | // while (list($k, $t) = each($rst)) { |
| 53 | 53 | foreach ($rst as $k => $t) { |
| 54 | 54 | if ('' != $t['event_picture1']) { |
| 55 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
| 55 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
| 56 | 56 | unlink($f); |
| 57 | - echo $f . '<br>'; |
|
| 57 | + echo $f.'<br>'; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if ('' != $t['event_picture2']) { |
| 61 | - $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1']; |
|
| 61 | + $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1']; |
|
| 62 | 62 | unlink($f); |
| 63 | - echo $f . '<br>'; |
|
| 63 | + echo $f.'<br>'; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
| 123 | 123 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
| 124 | 124 | } else { |
| 125 | - $fileHandler->createFile((int)$_POST['event_id']); |
|
| 125 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
| 126 | 126 | redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $eventId = $_GET['event_id']; |
| 195 | 195 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
| 196 | 196 | |
| 197 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>'; |
|
| 197 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
| 198 | 198 | |
| 199 | 199 | if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) { |
| 200 | 200 | $form->display(); |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | $data[$key] = $val['value']; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | - $data['event_id'] = 0; |
|
| 223 | - $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')'; |
|
| 222 | + $data['event_id'] = 0; |
|
| 223 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
| 224 | 224 | |
| 225 | 225 | $newEvent = $eventHandler->create(); |
| 226 | 226 | $newEvent->setVars($data); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | if (isset($_POST['confirm'])) { |
| 238 | 238 | if (!$GLOBALS['xoopsSecurity']->check()) { |
| 239 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 239 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 240 | 240 | } |
| 241 | 241 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
| 242 | 242 | // $eventHandler->deleteEvent($_POST['event_id']); |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | if (isset($_POST['deleteSelection'][0])) { |
| 302 | 302 | } else { |
| 303 | 303 | if (!$GLOBALS['xoopsSecurity']->check()) { |
| 304 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 304 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | deleteEvents($_POST['event_ids']); |
@@ -333,32 +333,32 @@ discard block |
||
| 333 | 333 | $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']); |
| 334 | 334 | $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
| 335 | 335 | |
| 336 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
| 337 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 336 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
| 337 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
| 338 | 338 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
| 339 | 339 | //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;> ". _AM_EXTCAL_INFO_DELETE; |
| 340 | 340 | |
| 341 | - echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
| 342 | - echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;> ' . _AM_EXTCAL_INFO_DELETE . '<br>'; |
|
| 341 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
| 342 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
| 343 | 343 | |
| 344 | 344 | echo '</fieldset><br>'; |
| 345 | 345 | |
| 346 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>'; |
|
| 346 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
| 347 | 347 | |
| 348 | 348 | echo '<form method="POST" action="event.php">'; |
| 349 | 349 | echo '<input type="hidden" name="op" value="deleteSelection">'; |
| 350 | 350 | |
| 351 | 351 | echo '<table class="outer" style="width:100%;">'; |
| 352 | 352 | echo '<tr style="text-align:center;">'; |
| 353 | - echo '<th>' . _AM_EXTCAL_DELETE . '</th>'; |
|
| 353 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
| 354 | 354 | echo '<th>#</th>'; |
| 355 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
| 356 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
| 357 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
| 358 | - echo '<th>' . _AM_EXTCAL_END_DATE . '</th>'; |
|
| 359 | - echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>'; |
|
| 360 | - echo '<th>' . _AM_EXTCAL_START_RULES . '</th>'; |
|
| 361 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
| 355 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
| 356 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
| 357 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
| 358 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
| 359 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
| 360 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
| 361 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
| 362 | 362 | |
| 363 | 363 | echo '</tr>'; |
| 364 | 364 | |
@@ -366,15 +366,15 @@ discard block |
||
| 366 | 366 | $i = 0; |
| 367 | 367 | foreach ($events as $event) { |
| 368 | 368 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
| 369 | - echo '<tr style="text-align:left;" class="' . $class . '">'; |
|
| 369 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
| 370 | 370 | echo "<td width='10%' align='center'>"; |
| 371 | 371 | echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
| 372 | 372 | echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>"; |
| 373 | 373 | echo '</td>'; |
| 374 | - echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>'; |
|
| 375 | - echo "<td width='10%'>" . '<a href=cat.php?op=modify&cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>'; |
|
| 374 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
| 375 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['Category']['cat_id'].'&form_modify'.'>'.$event['Category']['cat_name'].'</a>'.'</td>'; |
|
| 376 | 376 | |
| 377 | - echo '<td>' . '<a href=event.php?op=modify&event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>'; |
|
| 377 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
| 378 | 378 | |
| 379 | 379 | // if ($event['event_isrecur']) { |
| 380 | 380 | // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
@@ -382,18 +382,18 @@ discard block |
||
| 382 | 382 | // echo '<td>' . $event['formated_event_start'] . '</td>'; |
| 383 | 383 | // } |
| 384 | 384 | |
| 385 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>'; |
|
| 386 | - echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>'; |
|
| 387 | - echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>'; |
|
| 385 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
| 386 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
| 387 | + echo '<td align="center">'.((1 == $event['event_isrecur']) ? _YES : _NO).'</td>'; |
|
| 388 | 388 | if (!isset($event['formated_reccur_rule'])) { |
| 389 | 389 | $event['formated_reccur_rule'] = ''; |
| 390 | 390 | } |
| 391 | - echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
| 391 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
| 392 | 392 | |
| 393 | 393 | echo '<td style="width:10%; text-align:center;">'; |
| 394 | - echo '<a href=event.php?op=modify&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a> "; |
|
| 395 | - echo '<a href=event.php?op=delete&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a> "; |
|
| 396 | - echo '<a href=event.php?op=clone&event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>"; |
|
| 394 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a> "; |
|
| 395 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a> "; |
|
| 396 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>"; |
|
| 397 | 397 | echo '</td>'; |
| 398 | 398 | |
| 399 | 399 | echo '</tr>'; |
@@ -407,13 +407,13 @@ discard block |
||
| 407 | 407 | |
| 408 | 408 | echo '<td colspan="2" style="text-align: right;">'; |
| 409 | 409 | |
| 410 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">'; |
|
| 411 | - echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">'; |
|
| 410 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
| 411 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
| 412 | 412 | |
| 413 | 413 | echo '</td>'; |
| 414 | 414 | echo '</tr>'; |
| 415 | 415 | } else { |
| 416 | - echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
| 416 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
| 417 | 417 | } |
| 418 | 418 | echo '</table>'; |
| 419 | 419 | echo '</form>'; |
@@ -421,14 +421,14 @@ discard block |
||
| 421 | 421 | echo '</fieldset>'; |
| 422 | 422 | echo '</fieldset><br><br>'; |
| 423 | 423 | //Fin de la liste des evennement ------------------------------------- |
| 424 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>'; |
|
| 424 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
| 425 | 425 | |
| 426 | 426 | $form = $eventHandler->getEventForm('admin'); |
| 427 | 427 | $form->display(); |
| 428 | 428 | |
| 429 | 429 | echo '</fieldset>'; |
| 430 | 430 | |
| 431 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 431 | + require_once __DIR__.'/admin_footer.php'; |
|
| 432 | 432 | |
| 433 | 433 | break; |
| 434 | 434 | } |
@@ -20,19 +20,19 @@ discard block |
||
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | |
| 22 | 22 | // Include xoops admin header |
| 23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 24 | 24 | //require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php'; |
| 25 | -require_once __DIR__ . '/../../../kernel/module.php'; |
|
| 26 | -require_once __DIR__ . '/../../../class/xoopsformloader.php'; |
|
| 27 | -require_once __DIR__ . '/../../../class/tree.php'; |
|
| 28 | -require_once __DIR__ . '/../../../class/xoopslists.php'; |
|
| 29 | -require_once __DIR__ . '/../../../class/pagenav.php'; |
|
| 30 | -require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php'; |
|
| 31 | -require_once __DIR__ . '/../../../class/uploader.php'; |
|
| 25 | +require_once __DIR__.'/../../../kernel/module.php'; |
|
| 26 | +require_once __DIR__.'/../../../class/xoopsformloader.php'; |
|
| 27 | +require_once __DIR__.'/../../../class/tree.php'; |
|
| 28 | +require_once __DIR__.'/../../../class/xoopslists.php'; |
|
| 29 | +require_once __DIR__.'/../../../class/pagenav.php'; |
|
| 30 | +require_once __DIR__.'/../../../class/xoopsform/grouppermform.php'; |
|
| 31 | +require_once __DIR__.'/../../../class/uploader.php'; |
|
| 32 | 32 | //require_once __DIR__ . '/../class/etablissement.php'; |
| 33 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 33 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 34 | 34 | |
| 35 | -require_once __DIR__ . '/admin_header.php'; |
|
| 35 | +require_once __DIR__.'/admin_header.php'; |
|
| 36 | 36 | |
| 37 | 37 | //include_once("functions.php"); |
| 38 | 38 | //include_once("../include/functions.php"); |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | if ($xoopsUser) { |
| 41 | 41 | $xoopsModule = \XoopsModule::getByDirname('extcal'); |
| 42 | 42 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
| 43 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
| 43 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
| 44 | 44 | } |
| 45 | 45 | } else { |
| 46 | - redirect_header(XOOPS_URL . '/', 3, _NOPERM); |
|
| 46 | + redirect_header(XOOPS_URL.'/', 3, _NOPERM); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | // Include language file |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $etablissement_arr = $etablissementHandler->getObjects($criteria); |
| 101 | 101 | $numrows = $etablissementHandler->getCount($criteria); |
| 102 | 102 | if ($numrows > $limit) { |
| 103 | - $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); |
|
| 103 | + $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit); |
|
| 104 | 104 | $pagenav = $pagenav->renderNav(4); |
| 105 | 105 | } else { |
| 106 | 106 | $pagenav = ''; |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | if ($numrows > 0) { |
| 110 | 110 | echo '<table width="100%" cellspacing="1" class="outer">'; |
| 111 | 111 | echo '<tr>'; |
| 112 | - echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>'; |
|
| 113 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>'; |
|
| 114 | - echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>'; |
|
| 115 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>'; |
|
| 116 | - echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>'; |
|
| 112 | + echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>'; |
|
| 113 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>'; |
|
| 114 | + echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>'; |
|
| 115 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>'; |
|
| 116 | + echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>'; |
|
| 117 | 117 | echo '</tr>'; |
| 118 | 118 | $class = 'odd'; |
| 119 | 119 | foreach (array_keys($etablissement_arr) as $i) { |
@@ -123,21 +123,21 @@ discard block |
||
| 123 | 123 | $etablissement_adresse = $etablissement_arr[$i]->getVar('adresse'); |
| 124 | 124 | $etablissement_city = $etablissement_arr[$i]->getVar('ville'); |
| 125 | 125 | $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe'); |
| 126 | - echo '<tr class="' . $class . '">'; |
|
| 127 | - echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>'; |
|
| 126 | + echo '<tr class="'.$class.'">'; |
|
| 127 | + echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>'; |
|
| 128 | 128 | |
| 129 | - echo '<td align="center"><b>' . $etablissement_adresse . '</td>'; |
|
| 130 | - echo '<td align="center"><b>' . $etablissement_city . '</td>'; |
|
| 131 | - echo '<td align="center"><b>' . $etablissement_telephone . '</td>'; |
|
| 129 | + echo '<td align="center"><b>'.$etablissement_adresse.'</td>'; |
|
| 130 | + echo '<td align="center"><b>'.$etablissement_city.'</td>'; |
|
| 131 | + echo '<td align="center"><b>'.$etablissement_telephone.'</td>'; |
|
| 132 | 132 | echo '<td align="center" width="15%">'; |
| 133 | - echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> '; |
|
| 134 | - echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> '; |
|
| 133 | + echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> '; |
|
| 134 | + echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> '; |
|
| 135 | 135 | echo '</td>'; |
| 136 | 136 | } |
| 137 | 137 | echo '</table><br>'; |
| 138 | - echo '<br><div align=right>' . $pagenav . '</div><br>'; |
|
| 138 | + echo '<br><div align=right>'.$pagenav.'</div><br>'; |
|
| 139 | 139 | } else { |
| 140 | - echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>'; |
|
| 140 | + echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | // Affichage du formulaire |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | 'ok' => 1, |
| 161 | 161 | 'etablissement_id' => $_REQUEST['etablissement_id'], |
| 162 | 162 | 'op' => 'delete_etablissement', |
| 163 | - ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>'); |
|
| 163 | + ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>'); |
|
| 164 | 164 | } |
| 165 | 165 | break; |
| 166 | 166 | |
@@ -202,11 +202,11 @@ discard block |
||
| 202 | 202 | $obj->setVar('map', $_REQUEST['map']); |
| 203 | 203 | |
| 204 | 204 | //Logo |
| 205 | - $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/'; |
|
| 206 | - $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/'; |
|
| 205 | + $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'; |
|
| 206 | + $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/'; |
|
| 207 | 207 | |
| 208 | 208 | $delimg = @$_REQUEST['delimg']; |
| 209 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
| 209 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
| 210 | 210 | if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) { |
| 211 | 211 | $upload = new \XoopsMediaUploader($uploaddir_etablissement, [ |
| 212 | 212 | 'image/gif', |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | } |
| 230 | 230 | } else { |
| 231 | 231 | $logo = ''; |
| 232 | - $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file']; |
|
| 232 | + $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file']; |
|
| 233 | 233 | if (is_file($url_etablissement)) { |
| 234 | 234 | chmod($url_etablissement, 0777); |
| 235 | 235 | unlink($url_etablissement); |
@@ -249,4 +249,4 @@ discard block |
||
| 249 | 249 | break; |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 252 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | use Xmf\Request; |
| 21 | 21 | use XoopsModules\Extcal; |
| 22 | 22 | |
| 23 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 24 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
| 25 | -require_once __DIR__ . '/admin_header.php'; |
|
| 23 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 24 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
| 25 | +require_once __DIR__.'/admin_header.php'; |
|
| 26 | 26 | //require_once __DIR__ . '/../class/Utility.php'; |
| 27 | -require_once __DIR__ . '/../include/constantes.php'; |
|
| 27 | +require_once __DIR__.'/../include/constantes.php'; |
|
| 28 | 28 | |
| 29 | 29 | //$gepeto = array_merge($_GET, $_POST); |
| 30 | 30 | //while (list($key, $value) = each($gepeto)) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false); |
| 96 | 96 | $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000')); |
| 97 | 97 | |
| 98 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
| 98 | + $file_path = __DIR__.'/../assets/css/images'; |
|
| 99 | 99 | $tf = \XoopsLists::getImgListAsArray($file_path); |
| 100 | 100 | array_unshift($tf, _MD_EXTCAL_NONE); |
| 101 | 101 | //$xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), ''); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $form->display(); |
| 109 | 109 | |
| 110 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 110 | + require_once __DIR__.'/admin_footer.php'; |
|
| 111 | 111 | break; |
| 112 | 112 | |
| 113 | 113 | case 'edit': |
@@ -120,15 +120,15 @@ discard block |
||
| 120 | 120 | // $cat = $catHandler->getCat($cat_id, true); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>'; |
|
| 123 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>'; |
|
| 124 | 124 | |
| 125 | 125 | $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true); |
| 126 | 126 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true); |
| 127 | 127 | $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false); |
| 128 | 128 | $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false); |
| 129 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color'))); |
|
| 129 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color'))); |
|
| 130 | 130 | |
| 131 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
| 131 | + $file_path = __DIR__.'/../assets/css/images'; |
|
| 132 | 132 | $tf = \XoopsLists::getImgListAsArray($file_path); |
| 133 | 133 | array_unshift($tf, _MD_EXTCAL_NONE); |
| 134 | 134 | $xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), ''); |
@@ -284,6 +284,6 @@ discard block |
||
| 284 | 284 | //$xoopsTpl->assign("module_dirname", $xoopsModule->getVar("dirname") ); |
| 285 | 285 | |
| 286 | 286 | $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl'); |
| 287 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 287 | + require_once __DIR__.'/admin_footer.php'; |
|
| 288 | 288 | break; |
| 289 | 289 | } |
@@ -2,9 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use XoopsModules\Extcal; |
| 4 | 4 | |
| 5 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 6 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
| 7 | -require_once __DIR__ . '/admin_header.php'; |
|
| 5 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 6 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
| 7 | +require_once __DIR__.'/admin_header.php'; |
|
| 8 | 8 | |
| 9 | 9 | function extgalleryLastVersion() |
| 10 | 10 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | switch ($fct) { |
| 40 | 40 | case 'send': |
| 41 | 41 | if (!$GLOBALS['xoopsSecurity']->check()) { |
| 42 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 42 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 43 | 43 | } |
| 44 | 44 | xoops_cp_header(); |
| 45 | 45 | adminMenu(1); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'EV_TITLE' => $event->getVar('event_title'), |
| 73 | 73 | 'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')), |
| 74 | 74 | 'EV_END' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')), |
| 75 | - 'EV_LINK' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
| 75 | + 'EV_LINK' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
| 76 | 76 | ]; |
| 77 | 77 | $xoopsMailer->assign($tag); |
| 78 | 78 | $xoopsMailer->send(true); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | default: |
| 88 | 88 | xoops_cp_header(); |
| 89 | 89 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
| 90 | - $subjectCaption = _AM_EXTCAL_SUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_EXTCAL_USEFUL_TAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_EXTCAL_MAILTAGS6 . '<br>' . _AM_EXTCAL_MAILTAGS2 . '</span> '; |
|
| 90 | + $subjectCaption = _AM_EXTCAL_SUBJECT."<br><br><span style='font-size:x-small;font-weight:bold;'>"._AM_EXTCAL_USEFUL_TAGS."</span><br><span style='font-size:x-small;font-weight:normal;'>"._AM_EXTCAL_MAILTAGS6.'<br>'._AM_EXTCAL_MAILTAGS2.'</span> '; |
|
| 91 | 91 | $bodyCaption = _AM_EXTCAL_BODY |
| 92 | 92 | . "<br><br><span style='font-size:x-small;font-weight:bold;'>" |
| 93 | 93 | . _AM_EXTCAL_USEFUL_TAGS |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | . '<br>' |
| 111 | 111 | . _AM_EXTCAL_MAILTAGS9 |
| 112 | 112 | . '</span> '; |
| 113 | - $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
| 113 | + $toCheckBbox = new \XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
| 114 | 114 | $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL); |
| 115 | 115 | $toCheckBox->addOption('pm', _AM_EXTCAL_PM); |
| 116 | 116 | |
| 117 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
| 118 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 117 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
| 118 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
| 119 | 119 | echo _AM_EXTCAL_INFO_SEND_NOTIF; |
| 120 | 120 | echo '</fieldset><br>'; |
| 121 | 121 | $form = new \XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&fct=send', 'post', true); |
@@ -145,13 +145,13 @@ discard block |
||
| 145 | 145 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
| 146 | 146 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 147 | 147 | $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
| 148 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
| 149 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
| 150 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
| 148 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount()), '', 'Green'); |
|
| 149 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 1))), '', 'Green'); |
|
| 150 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new \Criteria('event_approved', 0))), '', 'Red'); |
|
| 151 | 151 | $criteriaCompo = new \CriteriaCompo(); |
| 152 | 152 | $criteriaCompo->add(new \Criteria('event_approved', 1)); |
| 153 | 153 | $criteriaCompo->add(new \Criteria('event_start', time(), '>=')); |
| 154 | - $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>'), '', 'Green'); |
|
| 154 | + $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>'), '', 'Green'); |
|
| 155 | 155 | |
| 156 | 156 | $adminObject->addConfigBoxLine(); |
| 157 | 157 | $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
@@ -168,42 +168,42 @@ discard block |
||
| 168 | 168 | $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
| 169 | 169 | $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
| 170 | 170 | |
| 171 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
| 172 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
| 171 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>'; |
|
| 172 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
| 173 | 173 | // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
| 174 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
| 175 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
| 174 | + echo '<img src='.$pathIcon16.'/edit.png> '._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>'; |
|
| 175 | + echo '<img src='.$pathIcon16.'/delete.png> '._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>'; |
|
| 176 | 176 | echo '</fieldset><br>'; |
| 177 | 177 | |
| 178 | 178 | echo '<table class="outer" style="width:100%;">'; |
| 179 | 179 | echo '<tr style="text-align:center;">'; |
| 180 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
| 181 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
| 182 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
| 183 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
| 180 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
| 181 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
| 182 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
| 183 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
| 184 | 184 | echo '</tr>'; |
| 185 | 185 | |
| 186 | 186 | if (count($pendingEvent) > 0) { |
| 187 | 187 | $i = 0; |
| 188 | 188 | foreach ($pendingEvent as $event) { |
| 189 | 189 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
| 190 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
| 191 | - echo '<td>' . $event['Category']['cat_name'] . '</td>'; |
|
| 192 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
| 193 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
| 190 | + echo '<tr style="text-align:center;" class="'.$class.'">'; |
|
| 191 | + echo '<td>'.$event['Category']['cat_name'].'</td>'; |
|
| 192 | + echo '<td>'.$event['event_title'].'</td>'; |
|
| 193 | + echo '<td>'.$event['formated_event_start'].'</td>'; |
|
| 194 | 194 | echo '<td style="width:10%; text-align:center;">'; |
| 195 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
| 196 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
| 195 | + echo '<a href="event.php?op=modify&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a> '; |
|
| 196 | + echo '<a href="event.php?op=delete&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>'; |
|
| 197 | 197 | echo '</td>'; |
| 198 | 198 | echo '</tr>'; |
| 199 | 199 | } |
| 200 | 200 | } else { |
| 201 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
| 201 | + echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | echo '</table></fieldset><br>'; |
| 205 | 205 | |
| 206 | - require_once __DIR__ . '/admin_footer.php'; |
|
| 206 | + require_once __DIR__.'/admin_footer.php'; |
|
| 207 | 207 | |
| 208 | 208 | break; |
| 209 | 209 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | use XoopsModules\Extcal; |
| 21 | 21 | use XoopsModules\Extcal\Common; |
| 22 | 22 | |
| 23 | -require_once __DIR__ . '/admin_header.php'; |
|
| 23 | +require_once __DIR__.'/admin_header.php'; |
|
| 24 | 24 | // Display Admin header |
| 25 | 25 | xoops_cp_header(); |
| 26 | 26 | /** @var Extcal\Utility $utilityClass */ |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | if ($helper->getConfig('displaySampleButton')) { |
| 41 | 41 | xoops_loadLanguage('admin/modulesadmin', 'system'); |
| 42 | - require_once __DIR__ . '/../testdata/index.php'; |
|
| 42 | + require_once __DIR__.'/../testdata/index.php'; |
|
| 43 | 43 | $adminObject->addItemButton(_AM_SYSTEM_MODULES_INSTALL_TESTDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
| 44 | 44 | $adminObject->displayButton('left', ''); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | -require_once __DIR__ . '/../testdata/index.php'; |
|
| 47 | +require_once __DIR__.'/../testdata/index.php'; |
|
| 48 | 48 | $adminObject->addItemButton(AM_EXTCAL_ADD_SAMPLEDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); |
| 49 | 49 | $adminObject->displayButton('left', ''); |
| 50 | 50 | |
@@ -55,4 +55,4 @@ discard block |
||
| 55 | 55 | echo $utility::getServerStats(); |
| 56 | 56 | |
| 57 | 57 | //codeDump(__FILE__); |
| 58 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 58 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -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>"; |
@@ -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'; |
|
@@ -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); |
@@ -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'; |
|