@@ -27,13 +27,13 @@ |
||
27 | 27 | public function testPrevDay_Array() |
28 | 28 | { |
29 | 29 | $this->assertEqual(array( |
30 | - 'year' => 2003, |
|
31 | - 'month' => 10, |
|
32 | - 'day' => 24, |
|
33 | - 'hour' => 0, |
|
34 | - 'minute' => 0, |
|
35 | - 'second' => 0, |
|
36 | - ), $this->cal->prevDay('array')); |
|
30 | + 'year' => 2003, |
|
31 | + 'month' => 10, |
|
32 | + 'day' => 24, |
|
33 | + 'hour' => 0, |
|
34 | + 'minute' => 0, |
|
35 | + 'second' => 0, |
|
36 | + ), $this->cal->prevDay('array')); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 |
@@ -71,13 +71,13 @@ |
||
71 | 71 | public function testPrevDay_Array() |
72 | 72 | { |
73 | 73 | $this->assertEqual(array( |
74 | - 'year' => 2003, |
|
75 | - 'month' => 10, |
|
76 | - 'day' => 8, |
|
77 | - 'hour' => 0, |
|
78 | - 'minute' => 0, |
|
79 | - 'second' => 0, |
|
80 | - ), $this->cal->prevDay('array')); |
|
74 | + 'year' => 2003, |
|
75 | + 'month' => 10, |
|
76 | + 'day' => 8, |
|
77 | + 'hour' => 0, |
|
78 | + 'minute' => 0, |
|
79 | + 'second' => 0, |
|
80 | + ), $this->cal->prevDay('array')); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | public function testThisDay() |
@@ -463,8 +463,8 @@ |
||
463 | 463 | /**************************************************************************/ |
464 | 464 | /** |
465 | 465 | * @param $color |
466 | - * @param $plancher |
|
467 | - * @param $plafond |
|
466 | + * @param integer $plancher |
|
467 | + * @param integer $plafond |
|
468 | 468 | * |
469 | 469 | * @return string |
470 | 470 | */ |
@@ -150,7 +150,7 @@ |
||
150 | 150 | $cat_color = $catList->getVar('cat_color'); |
151 | 151 | $checked = in_array($cat_id, $cat) ? 'checked' : ''; |
152 | 152 | $cat = '' . "<div style='float:left; margin-left:5px;'>" . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
153 | - . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>'; |
|
153 | + . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>'; |
|
154 | 154 | |
155 | 155 | $t[] = $cat; |
156 | 156 | } |
@@ -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 | -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
18 | +include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Class ExtcalUtilities. |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2) |
49 | 49 | { |
50 | 50 | /////////////////////////////////////////////////////////////////////////////// |
51 | - $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/'; |
|
52 | - $uploadurl_event = XOOPS_URL . '/uploads/extcal/'; |
|
51 | + $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/'; |
|
52 | + $uploadurl_event = XOOPS_URL.'/uploads/extcal/'; |
|
53 | 53 | //$picture = ''; |
54 | 54 | for ($j = 1; $j < 3; ++$j) { |
55 | - $delimg = @$REQUEST['delimg_' . $j . '']; |
|
56 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
55 | + $delimg = @$REQUEST['delimg_'.$j.'']; |
|
56 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
57 | 57 | if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) { |
58 | 58 | $upload = new XoopsMediaUploader($uploaddir_event, array( |
59 | 59 | 'image/gif', |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | $event_picture2 = $upload->getSavedFileName(); |
77 | 77 | } |
78 | 78 | } |
79 | - } elseif (!empty($REQUEST['file' . $j])) { |
|
79 | + } elseif (!empty($REQUEST['file'.$j])) { |
|
80 | 80 | if ($j == 1) { |
81 | - $event_picture1 = $REQUEST['file' . $j]; |
|
81 | + $event_picture1 = $REQUEST['file'.$j]; |
|
82 | 82 | } elseif ($j == 2) { |
83 | - $event_picture2 = $REQUEST['file' . $j]; |
|
83 | + $event_picture2 = $REQUEST['file'.$j]; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } else { |
87 | - $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j]; |
|
87 | + $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j]; |
|
88 | 88 | if ($j == 1) { |
89 | 89 | $event_picture1 = ''; |
90 | 90 | } elseif ($j == 2) { |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | $name = $catList->getVar('cat_name'); |
150 | 150 | $cat_color = $catList->getVar('cat_color'); |
151 | 151 | $checked = in_array($cat_id, $cat) ? 'checked' : ''; |
152 | - $cat = '' . "<div style='float:left; margin-left:5px;'>" . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
|
153 | - . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>'; |
|
152 | + $cat = ''."<div style='float:left; margin-left:5px;'>"."<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
|
153 | + . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"." {$name}".'</div>'; |
|
154 | 154 | |
155 | 155 | $t[] = $cat; |
156 | 156 | } |
@@ -176,17 +176,17 @@ discard block |
||
176 | 176 | $select->addOption('', ''); |
177 | 177 | } |
178 | 178 | |
179 | - $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
180 | - $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
179 | + $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
180 | + $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
181 | 181 | |
182 | - $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
183 | - $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
182 | + $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
183 | + $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
184 | 184 | |
185 | - $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
186 | - $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
185 | + $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
186 | + $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
187 | 187 | |
188 | - $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
189 | - $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
188 | + $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
189 | + $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
190 | 190 | |
191 | 191 | return $select; |
192 | 192 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | public static function echoDateArray($period) |
301 | 301 | { |
302 | 302 | foreach ($period as $dt) { |
303 | - echo $dt->format("l Y-m-d H:i:s\n") . '<br>'; |
|
303 | + echo $dt->format("l Y-m-d H:i:s\n").'<br>'; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | $txt = print_r($t, true); |
319 | - echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>"; |
|
319 | + echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>"; |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | /*****************************************************************/ |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | if ($msg != '') { |
330 | 330 | echo "<hr>{$msg}<hr>"; |
331 | 331 | } |
332 | - echo $line . '<br>'; |
|
332 | + echo $line.'<br>'; |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /*****************************************************************/ |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | echo "<hr>{$msg}<hr>"; |
357 | 357 | } |
358 | 358 | |
359 | - echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>'; |
|
359 | + echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>'; |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | /*****************************************************************/ |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | */ |
471 | 471 | public static function getLighterColor($color, $plancher, $plafond) |
472 | 472 | { |
473 | - include_once __DIR__ . '/colorTools.php'; |
|
473 | + include_once __DIR__.'/colorTools.php'; |
|
474 | 474 | |
475 | 475 | //$ct = new ColorTools(); |
476 | 476 | //return $ct->eclaircir($color,$plancher,$plafond); |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | if (!mkdir($folder) && !is_dir($folder)) { |
493 | 493 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
494 | 494 | } else { |
495 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
495 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
496 | 496 | } |
497 | 497 | } |
498 | 498 | } catch (Exception $e) { |
@@ -530,10 +530,10 @@ discard block |
||
530 | 530 | // @mkdir($dst); |
531 | 531 | while (false !== ($file = readdir($dir))) { |
532 | 532 | if (($file !== '.') && ($file !== '..')) { |
533 | - if (is_dir($src . '/' . $file)) { |
|
534 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
533 | + if (is_dir($src.'/'.$file)) { |
|
534 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
535 | 535 | } else { |
536 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
536 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
537 | 537 | } |
538 | 538 | } |
539 | 539 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | //check for minimum XOOPS version |
555 | 555 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
556 | 556 | $currArray = explode('.', $currentVer); |
557 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
557 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
558 | 558 | $reqArray = explode('.', $requiredVer); |
559 | 559 | $success = true; |
560 | 560 | foreach ($reqArray as $k => $v) { |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | break; |
569 | 569 | } |
570 | 570 | } else { |
571 | - if ((int)$v > 0) { // handles things like x.x.x.0_RC2 |
|
571 | + if ((int) $v > 0) { // handles things like x.x.x.0_RC2 |
|
572 | 572 | $success = false; |
573 | 573 | break; |
574 | 574 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | // check for minimum PHP version |
597 | 597 | $success = true; |
598 | 598 | $verNum = phpversion(); |
599 | - $reqVer =& $module->getInfo('min_php'); |
|
599 | + $reqVer = & $module->getInfo('min_php'); |
|
600 | 600 | if (false !== $reqVer && '' !== $reqVer) { |
601 | 601 | if (version_compare($verNum, $reqVer, '<')) { |
602 | 602 | $module->setErrors(sprintf(_AM_TAG_ERROR_BAD_PHP, $reqVer, $verNum)); |
@@ -51,176 +51,194 @@ discard block |
||
51 | 51 | |
52 | 52 | switch ($op) { |
53 | 53 | |
54 | - case 'enreg': |
|
55 | - |
|
56 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
57 | - $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
|
58 | - // $t = print_r($_POST,true); |
|
59 | - // echo "<pre>{$t}</pre><br>"; |
|
60 | - // exit; |
|
61 | - // If the date format is wrong |
|
62 | - // if ( |
|
63 | - // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
64 | - // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
65 | - // ) { |
|
66 | - // redirect_header( |
|
67 | - // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
68 | - // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
69 | - // ); |
|
70 | - // exit; |
|
71 | - // } |
|
72 | - |
|
73 | - //exit; |
|
74 | - /////////////////////////////////////////////////////////////////////////////// |
|
75 | - ExtcalUtilities::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
76 | - /////////////////////////////////////////////////////////////////////////////// |
|
77 | - $data = array( |
|
78 | - 'event_title' => $_POST['event_title'], |
|
79 | - 'cat_id' => $_POST['cat_id'], |
|
80 | - 'event_desc' => $_POST['event_desc'], |
|
81 | - 'event_nbmember' => $_POST['event_nbmember'], |
|
82 | - 'event_organisateur' => $_POST['event_organisateur'], |
|
83 | - 'event_contact' => $_POST['event_contact'], |
|
84 | - 'event_url' => $_POST['event_url'], |
|
85 | - 'event_email' => $_POST['event_email'], |
|
86 | - 'event_address' => $_POST['event_address'], |
|
87 | - 'event_approved' => 1, |
|
88 | - 'event_start' => $_POST['event_start'], |
|
89 | - 'have_end' => $_POST['have_end'], |
|
90 | - 'event_end' => $_POST['event_end'], |
|
91 | - 'event_picture1' => @$event_picture1, |
|
92 | - 'event_picture2' => @$event_picture2, |
|
93 | - 'event_price' => @$_POST['event_price'], |
|
94 | - 'event_etablissement' => $_POST['event_etablissement'], |
|
95 | - 'dohtml' => $extcalConfig['allow_html'], |
|
96 | - 'event_icone' => $_POST['event_icone'], |
|
97 | - ); |
|
98 | - |
|
99 | - // Event edited |
|
100 | - if (isset($_POST['event_id'])) { |
|
101 | - if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
102 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
54 | + case 'enreg': |
|
55 | + |
|
56 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
57 | + $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
|
58 | + // $t = print_r($_POST,true); |
|
59 | + // echo "<pre>{$t}</pre><br>"; |
|
60 | + // exit; |
|
61 | + // If the date format is wrong |
|
62 | + // if ( |
|
63 | + // !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_start']['date']) |
|
64 | + // || !preg_match(_EXTCAL_MOTIF_DATE, $_POST['event_end']['date']) |
|
65 | + // ) { |
|
66 | + // redirect_header( |
|
67 | + // 'event.php', 3, _MD_EXTCAL_WRONG_DATE_FORMAT . "<br>" |
|
68 | + // . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) |
|
69 | + // ); |
|
70 | + // exit; |
|
71 | + // } |
|
72 | + |
|
73 | + //exit; |
|
74 | + /////////////////////////////////////////////////////////////////////////////// |
|
75 | + ExtcalUtilities::extcal_loadImg($_REQUEST, $event_picture1, $event_picture2); |
|
76 | + /////////////////////////////////////////////////////////////////////////////// |
|
77 | + $data = array( |
|
78 | + 'event_title' => $_POST['event_title'], |
|
79 | + 'cat_id' => $_POST['cat_id'], |
|
80 | + 'event_desc' => $_POST['event_desc'], |
|
81 | + 'event_nbmember' => $_POST['event_nbmember'], |
|
82 | + 'event_organisateur' => $_POST['event_organisateur'], |
|
83 | + 'event_contact' => $_POST['event_contact'], |
|
84 | + 'event_url' => $_POST['event_url'], |
|
85 | + 'event_email' => $_POST['event_email'], |
|
86 | + 'event_address' => $_POST['event_address'], |
|
87 | + 'event_approved' => 1, |
|
88 | + 'event_start' => $_POST['event_start'], |
|
89 | + 'have_end' => $_POST['have_end'], |
|
90 | + 'event_end' => $_POST['event_end'], |
|
91 | + 'event_picture1' => @$event_picture1, |
|
92 | + 'event_picture2' => @$event_picture2, |
|
93 | + 'event_price' => @$_POST['event_price'], |
|
94 | + 'event_etablissement' => $_POST['event_etablissement'], |
|
95 | + 'dohtml' => $extcalConfig['allow_html'], |
|
96 | + 'event_icone' => $_POST['event_icone'], |
|
97 | + ); |
|
98 | + |
|
99 | + // Event edited |
|
100 | + if (isset($_POST['event_id'])) { |
|
101 | + if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) { |
|
102 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false); |
|
103 | + } else { |
|
104 | + $fileHandler->createFile((int) $_POST['event_id']); |
|
105 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
106 | + } |
|
107 | + |
|
108 | + // New event |
|
103 | 109 | } else { |
104 | - $fileHandler->createFile((int) $_POST['event_id']); |
|
105 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false); |
|
110 | + $notificationHandler = xoops_getHandler('notification'); |
|
111 | + /** @var ExtcalCatHandler $catHandler */ |
|
112 | + $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
113 | + |
|
114 | + $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
115 | + $data['event_submitdate'] = time(); |
|
116 | + |
|
117 | + if ($eventHandler->createEvent($data, $_POST)) { |
|
118 | + $fileHandler->createFile($eventHandler->getInsertId()); |
|
119 | + $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
120 | + $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title'])); |
|
121 | + $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array( |
|
122 | + 'EVENT_TITLE' => $_POST['event_title'], |
|
123 | + 'CAT_NAME' => $cat->getVar('cat_name'), |
|
124 | + )); |
|
125 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
126 | + } else { |
|
127 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
128 | + } |
|
106 | 129 | } |
130 | + break; |
|
107 | 131 | |
108 | - // New event |
|
109 | - } else { |
|
110 | - $notificationHandler = xoops_getHandler('notification'); |
|
111 | - /** @var ExtcalCatHandler $catHandler */ |
|
112 | - $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
113 | - |
|
114 | - $data['event_submitter'] = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
|
115 | - $data['event_submitdate'] = time(); |
|
116 | - |
|
117 | - if ($eventHandler->createEvent($data, $_POST)) { |
|
118 | - $fileHandler->createFile($eventHandler->getInsertId()); |
|
119 | - $cat = $catHandler->getCat($_POST['cat_id'], $xoopsUser, 'all'); |
|
120 | - $notificationHandler->triggerEvent('global', 0, 'new_event', array('EVENT_TITLE' => $_POST['event_title'])); |
|
121 | - $notificationHandler->triggerEvent('cat', $_POST['cat_id'], 'new_event_cat', array( |
|
122 | - 'EVENT_TITLE' => $_POST['event_title'], |
|
123 | - 'CAT_NAME' => $cat->getVar('cat_name'), |
|
124 | - )); |
|
125 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATED, false); |
|
126 | - } else { |
|
127 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_CREATE_FAILED, false); |
|
132 | + case 'clone': /* sur validation du formulaire */ |
|
133 | + case 'modify': |
|
134 | + $action = (($op === 'clone') ? 'clone' : 'edit'); |
|
135 | + xoops_cp_header(); |
|
136 | + //================================================ |
|
137 | + // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
138 | + // |
|
139 | + // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
140 | + // $dateBirthday = new XoopsTcCalendar("datez1", true, false); |
|
141 | + // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
142 | + // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
143 | + // //$dateBirthday->rtl=false; |
|
144 | + // $dateBirthday->setAutoHide(false); |
|
145 | + // |
|
146 | + // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
147 | + // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
148 | + // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
149 | + // |
|
150 | + // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
151 | + // $dateBirthday->zindex = 150; //default 1 |
|
152 | + // $dateBirthday->setYearInterval(1995, date('Y')); |
|
153 | + // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
154 | + // //$dateBirthday->autoSubmit(true, "calendar"); |
|
155 | + // $dateBirthday->disabledDay("sat"); |
|
156 | + // $dateBirthday->disabledDay("sun"); |
|
157 | + // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
158 | + // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
159 | + // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
160 | + // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
161 | + // echo $dateBirthday->render(); |
|
162 | + // echo "</td></tr></table>"; |
|
163 | + //echo $dateBirthday->render(); |
|
164 | + //================================================ |
|
165 | + // @author Gregory Mage (Aka Mage) |
|
166 | + //*************************************************************************************** |
|
167 | + // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
168 | + $eventAdmin = new ModuleAdmin(); |
|
169 | + echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
170 | + //*************************************************************************************** |
|
171 | + |
|
172 | + $eventId = $_GET['event_id']; |
|
173 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
174 | + |
|
175 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
176 | + |
|
177 | + if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) { |
|
178 | + $form->display(); |
|
128 | 179 | } |
129 | - } |
|
130 | - break; |
|
131 | - |
|
132 | - case 'clone': /* sur validation du formulaire */ |
|
133 | - case 'modify': |
|
134 | - $action = (($op === 'clone') ? 'clone' : 'edit'); |
|
135 | - xoops_cp_header(); |
|
136 | - //================================================ |
|
137 | - // include_once (XOOPS_ROOT_PATH . '/class/xoopsform/tc_calendar/formtccalendar.php'); |
|
138 | - // |
|
139 | - // // Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com |
|
140 | - // $dateBirthday = new XoopsTcCalendar("datez1", true, false); |
|
141 | - // //$dateBirthday->setIcon("/images/iconCalendar.gif"); |
|
142 | - // $dateBirthday->setIcon("/class/xoopsform/tc_calendar/images/iconCalendar.gif"); |
|
143 | - // //$dateBirthday->rtl=false; |
|
144 | - // $dateBirthday->setAutoHide(false); |
|
145 | - // |
|
146 | - // //$myCalendar->setDate(date('d'), date('m'), date('Y')); |
|
147 | - // //$dateBirthday->setDate($p['date1_day'], $p['date1_month'], $p['date1_year']); |
|
148 | - // $dateBirthday->setDate(date('d'), date('m'), date('Y')); |
|
149 | - // |
|
150 | - // $dateBirthday->setPath(XOOPS_URL . "/class/xoopsform/tc_calendar/"); |
|
151 | - // $dateBirthday->zindex = 150; //default 1 |
|
152 | - // $dateBirthday->setYearInterval(1995, date('Y')); |
|
153 | - // $dateBirthday->dateAllow('1960-03-01', date('Y-m-d')); |
|
154 | - // //$dateBirthday->autoSubmit(true, "calendar"); |
|
155 | - // $dateBirthday->disabledDay("sat"); |
|
156 | - // $dateBirthday->disabledDay("sun"); |
|
157 | - // $dateBirthday->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month'); |
|
158 | - // $dateBirthday->setSpecificDate(array("2011-04-01"), 0, 'year'); |
|
159 | - // $dateBirthday->setAlignment('right', 'bottom'); //optional |
|
160 | - // echo "<table><tr><td>zzzzz</td><td></td><td>"; |
|
161 | - // echo $dateBirthday->render(); |
|
162 | - // echo "</td></tr></table>"; |
|
163 | - //echo $dateBirthday->render(); |
|
164 | - //================================================ |
|
165 | - // @author Gregory Mage (Aka Mage) |
|
166 | - //*************************************************************************************** |
|
167 | - // include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
168 | - $eventAdmin = new ModuleAdmin(); |
|
169 | - echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
170 | - //*************************************************************************************** |
|
171 | - |
|
172 | - $eventId = $_GET['event_id']; |
|
173 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
174 | - |
|
175 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>'; |
|
176 | - |
|
177 | - if ($form = $eventHandler->getEventForm('admin', $action, array('event_id' => $eventId))) { |
|
178 | - $form->display(); |
|
179 | - } |
|
180 | 180 | |
181 | - echo '</fieldset><br>'; |
|
181 | + echo '</fieldset><br>'; |
|
182 | 182 | |
183 | - xoops_cp_footer(); |
|
183 | + xoops_cp_footer(); |
|
184 | 184 | |
185 | - break; |
|
185 | + break; |
|
186 | 186 | |
187 | - case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
187 | + case 'clone2': /* sur clique de l'icone du formulaire*/ |
|
188 | 188 | |
189 | - //$newEventId = 1; |
|
190 | - $eventId = $_GET['event_id']; |
|
191 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
192 | - $event = $eventHandler->getEvent($eventId); |
|
193 | - $t = $event->getVars(); |
|
194 | - $data = array(); |
|
195 | - while (list($key, $val) = each($t)) { |
|
196 | - $data[$key] = $val['value']; |
|
197 | - } |
|
189 | + //$newEventId = 1; |
|
190 | + $eventId = $_GET['event_id']; |
|
191 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
192 | + $event = $eventHandler->getEvent($eventId); |
|
193 | + $t = $event->getVars(); |
|
194 | + $data = array(); |
|
195 | + while (list($key, $val) = each($t)) { |
|
196 | + $data[$key] = $val['value']; |
|
197 | + } |
|
198 | 198 | |
199 | - $data['event_id'] = 0; |
|
200 | - $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
199 | + $data['event_id'] = 0; |
|
200 | + $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')'; |
|
201 | 201 | |
202 | - $newEvent = $eventHandler->create(); |
|
203 | - $newEvent->setVars($data); |
|
204 | - $t = $eventHandler->insert($newEvent, true); |
|
202 | + $newEvent = $eventHandler->create(); |
|
203 | + $newEvent->setVars($data); |
|
204 | + $t = $eventHandler->insert($newEvent, true); |
|
205 | 205 | |
206 | - $newEventId = $newEvent->getVar('event_id'); |
|
207 | - $ts = print_r($newEventId, true); |
|
206 | + $newEventId = $newEvent->getVar('event_id'); |
|
207 | + $ts = print_r($newEventId, true); |
|
208 | 208 | |
209 | - redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
210 | - break; |
|
209 | + redirect_header("event.php?op=modify&event_id={$newEventId}", 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
210 | + break; |
|
211 | 211 | |
212 | - case 'delete': |
|
212 | + case 'delete': |
|
213 | 213 | |
214 | - if (isset($_POST['confirm'])) { |
|
215 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
216 | - redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
217 | - exit; |
|
214 | + if (isset($_POST['confirm'])) { |
|
215 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
216 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
217 | + exit; |
|
218 | + } |
|
219 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
220 | + // $eventHandler->deleteEvent($_POST['event_id']); |
|
221 | + deleteEvents($_POST['event_id']); |
|
222 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
223 | + } else { |
|
224 | + xoops_cp_header(); |
|
225 | + // @author Gregory Mage (Aka Mage) |
|
226 | + //*************************************************************************************** |
|
227 | + //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
228 | + $eventAdmin = new ModuleAdmin(); |
|
229 | + echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
230 | + //*************************************************************************************** |
|
231 | + |
|
232 | + $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1); |
|
233 | + xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
234 | + |
|
235 | + xoops_cp_footer(); |
|
218 | 236 | } |
219 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
220 | - // $eventHandler->deleteEvent($_POST['event_id']); |
|
221 | - deleteEvents($_POST['event_id']); |
|
222 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENT_DELETED, false); |
|
223 | - } else { |
|
237 | + |
|
238 | + break; |
|
239 | + |
|
240 | + case 'deleteSelection': |
|
241 | + |
|
224 | 242 | xoops_cp_header(); |
225 | 243 | // @author Gregory Mage (Aka Mage) |
226 | 244 | //*************************************************************************************** |
@@ -228,186 +246,168 @@ discard block |
||
228 | 246 | $eventAdmin = new ModuleAdmin(); |
229 | 247 | echo $eventAdmin->addNavigation(basename(__FILE__)); |
230 | 248 | //*************************************************************************************** |
249 | + if (isset($_POST['deleteSelection'][0])) { |
|
250 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
251 | + $ids = array_keys($_POST['deleteAllEvents']); |
|
252 | + } else { |
|
253 | + $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
254 | + $ids = array_keys($_POST['deleteEvents']); |
|
255 | + } |
|
231 | 256 | |
232 | - $hiddens = array('event_id' => $_GET['event_id'], 'form_delete' => '', 'confirm' => 1); |
|
233 | - xoops_confirm($hiddens, 'event.php?op=delete', _AM_EXTCAL_CONFIRM_DELETE_EVENT, _DELETE, 'event.php'); |
|
257 | + // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
258 | + // $ids = array_keys($_POST['deleteEvents']); |
|
259 | + $ids = implode(',', $ids); |
|
260 | + //echo $ids.'<br>'; |
|
261 | + $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1); |
|
262 | + //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
263 | + xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
234 | 264 | |
235 | 265 | xoops_cp_footer(); |
236 | - } |
|
237 | 266 | |
238 | - break; |
|
239 | - |
|
240 | - case 'deleteSelection': |
|
241 | - |
|
242 | - xoops_cp_header(); |
|
243 | - // @author Gregory Mage (Aka Mage) |
|
244 | - //*************************************************************************************** |
|
245 | - //include_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
246 | - $eventAdmin = new ModuleAdmin(); |
|
247 | - echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
248 | - //*************************************************************************************** |
|
249 | - if (isset($_POST['deleteSelection'][0])) { |
|
250 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_ALL; |
|
251 | - $ids = array_keys($_POST['deleteAllEvents']); |
|
252 | - } else { |
|
253 | - $msg = _AM_EXTCAL_CONFIRM_DELETE_SELECTION; |
|
254 | - $ids = array_keys($_POST['deleteEvents']); |
|
255 | - } |
|
267 | + break; |
|
256 | 268 | |
257 | - // $msg = ((isset($_POST['deleteSelection'][0])) ? _AM_EXTCAL_CONFIRM_DELETE_ALL : _AM_EXTCAL_CONFIRM_DELETE_SELECTION); |
|
258 | - // $ids = array_keys($_POST['deleteEvents']); |
|
259 | - $ids = implode(',', $ids); |
|
260 | - //echo $ids.'<br>'; |
|
261 | - $hiddens = array('event_ids' => $ids, 'form_delete' => '', 'confirm' => 1); |
|
262 | - //$hiddens = array('event_ids' => $_POST['deleteEvents'], 'form_delete' => '', 'confirm' => 1); |
|
263 | - xoops_confirm($hiddens, 'event.php?op=deleteSelectionOK', $msg, _DELETE, 'event.php'); |
|
264 | - |
|
265 | - xoops_cp_footer(); |
|
266 | - |
|
267 | - break; |
|
268 | - |
|
269 | - case 'deleteSelectionOK': |
|
270 | - //----------------------------------------- |
|
271 | - // $t = print_r($_GET,true); |
|
272 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
273 | - // |
|
274 | - // $t = print_r($_POST,true); |
|
275 | - // echo "<hr><pre>{$t}</pre><hr>"; |
|
276 | - // exit; |
|
277 | - //----------------------------------------- |
|
278 | - |
|
279 | - if (isset($_POST['deleteSelection'][0])) { |
|
280 | - } else { |
|
281 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
282 | - redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
283 | - exit; |
|
284 | - } |
|
269 | + case 'deleteSelectionOK': |
|
270 | + //----------------------------------------- |
|
271 | + // $t = print_r($_GET,true); |
|
272 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
273 | + // |
|
274 | + // $t = print_r($_POST,true); |
|
275 | + // echo "<hr><pre>{$t}</pre><hr>"; |
|
276 | + // exit; |
|
277 | + //----------------------------------------- |
|
285 | 278 | |
286 | - deleteEvents($_POST['event_ids']); |
|
279 | + if (isset($_POST['deleteSelection'][0])) { |
|
280 | + } else { |
|
281 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
282 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
283 | + exit; |
|
284 | + } |
|
287 | 285 | |
288 | - redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
289 | - } |
|
286 | + deleteEvents($_POST['event_ids']); |
|
290 | 287 | |
291 | - break; |
|
288 | + redirect_header('event.php', 3, _AM_EXTCAL_EVENTS_DELETED, false); |
|
289 | + } |
|
292 | 290 | |
293 | - case 'default': |
|
294 | - default: |
|
291 | + break; |
|
295 | 292 | |
296 | - //global $extcalConfig; |
|
297 | - $extcalConfig = ExtcalConfig::getHandler(); |
|
298 | - $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
|
293 | + case 'default': |
|
294 | + default: |
|
299 | 295 | |
300 | - $start = isset($_GET['start']) ? $_GET['start'] : 0; |
|
301 | - $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage']; |
|
296 | + //global $extcalConfig; |
|
297 | + $extcalConfig = ExtcalConfig::getHandler(); |
|
298 | + $xoopsModuleConfig = $extcalConfig->getModuleConfig(); |
|
302 | 299 | |
303 | - xoops_cp_header(); |
|
304 | - // @author Gregory Mage (Aka Mage) |
|
305 | - //*************************************************************************************** |
|
300 | + $start = isset($_GET['start']) ? $_GET['start'] : 0; |
|
301 | + $nbEventsByPage = $xoopsModuleConfig['nbEventsByPage']; |
|
306 | 302 | |
307 | - $eventAdmin = new ModuleAdmin(); |
|
308 | - echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
309 | - //*************************************************************************************** |
|
303 | + xoops_cp_header(); |
|
304 | + // @author Gregory Mage (Aka Mage) |
|
305 | + //*************************************************************************************** |
|
310 | 306 | |
311 | - $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
312 | - $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id')); |
|
313 | - $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
307 | + $eventAdmin = new ModuleAdmin(); |
|
308 | + echo $eventAdmin->addNavigation(basename(__FILE__)); |
|
309 | + //*************************************************************************************** |
|
314 | 310 | |
315 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
316 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
317 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
318 | - //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/> ". _AM_EXTCAL_INFO_DELETE; |
|
311 | + $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
312 | + $events = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), array('cat_id')); |
|
313 | + $eventHandler->formatEventsDate($events, _SHORTDATESTRING); |
|
319 | 314 | |
320 | - echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
321 | - echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
315 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
316 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
317 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;/> ' . _AM_EXTCAL_INFO_EDIT . '<br>'; |
|
318 | + //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;/> ". _AM_EXTCAL_INFO_DELETE; |
|
322 | 319 | |
323 | - echo '</fieldset><br>'; |
|
320 | + echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;/> '._AM_EXTCAL_INFO_EDIT.'<br>'; |
|
321 | + echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;/> '._AM_EXTCAL_INFO_DELETE.'<br>'; |
|
324 | 322 | |
325 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
323 | + echo '</fieldset><br>'; |
|
326 | 324 | |
327 | - echo '<form method="POST" action="event.php">'; |
|
328 | - echo '<input type="hidden" name="op" value="deleteSelection" />'; |
|
325 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>'; |
|
329 | 326 | |
330 | - echo '<table class="outer" style="width:100%;">'; |
|
331 | - echo '<tr style="text-align:center;">'; |
|
332 | - echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
333 | - echo '<th>#</th>'; |
|
334 | - echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
335 | - echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
336 | - echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
337 | - echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
338 | - echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
339 | - echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
340 | - echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
327 | + echo '<form method="POST" action="event.php">'; |
|
328 | + echo '<input type="hidden" name="op" value="deleteSelection" />'; |
|
341 | 329 | |
342 | - echo '</tr>'; |
|
330 | + echo '<table class="outer" style="width:100%;">'; |
|
331 | + echo '<tr style="text-align:center;">'; |
|
332 | + echo '<th>'._AM_EXTCAL_DELETE.'</th>'; |
|
333 | + echo '<th>#</th>'; |
|
334 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
335 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
336 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
337 | + echo '<th>'._AM_EXTCAL_END_DATE.'</th>'; |
|
338 | + echo '<th>'._AM_EXTCAL_RECURRENT.'</th>'; |
|
339 | + echo '<th>'._AM_EXTCAL_START_RULES.'</th>'; |
|
340 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
343 | 341 | |
344 | - if (count($events) > 0) { |
|
345 | - $i = 0; |
|
346 | - foreach ($events as $event) { |
|
347 | - $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
348 | - echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
349 | - echo "<td width='10%' align='center'>"; |
|
350 | - echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
351 | - echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />"; |
|
352 | - echo '</td>'; |
|
353 | - echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
354 | - echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>'; |
|
355 | - |
|
356 | - echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
357 | - |
|
358 | - // if ($event['event_isrecur']) { |
|
359 | - // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
360 | - // } else { |
|
361 | - // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
362 | - // } |
|
363 | - |
|
364 | - echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
365 | - echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
366 | - echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>'; |
|
367 | - if (!isset($event['formated_reccur_rule'])) { |
|
368 | - $event['formated_reccur_rule'] = ''; |
|
342 | + echo '</tr>'; |
|
343 | + |
|
344 | + if (count($events) > 0) { |
|
345 | + $i = 0; |
|
346 | + foreach ($events as $event) { |
|
347 | + $class = (++$i % 2 == 0) ? 'even' : 'odd'; |
|
348 | + echo '<tr style="text-align:left;" class="'.$class.'">'; |
|
349 | + echo "<td width='10%' align='center'>"; |
|
350 | + echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >"; |
|
351 | + echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1' />"; |
|
352 | + echo '</td>'; |
|
353 | + echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>'; |
|
354 | + echo "<td width='10%'>".'<a href=cat.php?op=modify&cat_id='.$event['cat']['cat_id'].'&form_modify'.'>'.$event['cat']['cat_name'].'</a>'.'</td>'; |
|
355 | + |
|
356 | + echo '<td>'.'<a href=event.php?op=modify&event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>'; |
|
357 | + |
|
358 | + // if ($event['event_isrecur']) { |
|
359 | + // echo '<td>' . $event['formated_reccur_rule'] . '</td>'; |
|
360 | + // } else { |
|
361 | + // echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
362 | + // } |
|
363 | + |
|
364 | + echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>'; |
|
365 | + echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>'; |
|
366 | + echo '<td align="center">'.(($event['event_isrecur'] == 1) ? _YES : _NO).'</td>'; |
|
367 | + if (!isset($event['formated_reccur_rule'])) { |
|
368 | + $event['formated_reccur_rule'] = ''; |
|
369 | + } |
|
370 | + echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
371 | + |
|
372 | + echo '<td style="width:10%; text-align:center;">'; |
|
373 | + echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."' /></a> "; |
|
374 | + echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."' /></a> "; |
|
375 | + echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>"; |
|
376 | + echo '</td>'; |
|
377 | + |
|
378 | + echo '</tr>'; |
|
369 | 379 | } |
370 | - echo '<td>'.$event['formated_reccur_rule'].'</td>'; |
|
380 | + //--------------------------------------------------------- |
|
381 | + $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
371 | 382 | |
372 | - echo '<td style="width:10%; text-align:center;">'; |
|
373 | - echo '<a href=event.php?op=modify&event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."' /></a> "; |
|
374 | - echo '<a href=event.php?op=delete&event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."' /></a> "; |
|
375 | - echo '<a href=event.php?op=clone&event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."' /></a>"; |
|
383 | + echo '<tr><td colspan="2" style="text-align: right;">'; |
|
384 | + echo $pageNav->renderNav(2); |
|
376 | 385 | echo '</td>'; |
377 | 386 | |
378 | - echo '</tr>'; |
|
379 | - } |
|
380 | - //--------------------------------------------------------- |
|
381 | - $pageNav = new XoopsPageNav($eventHandler->getCountNewEvent(), $nbEventsByPage, $start); |
|
387 | + echo '<td colspan="2" style="text-align: right;">'; |
|
382 | 388 | |
383 | - echo '<tr><td colspan="2" style="text-align: right;">'; |
|
384 | - echo $pageNav->renderNav(2); |
|
385 | - echo '</td>'; |
|
389 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
390 | + echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
386 | 391 | |
387 | - echo '<td colspan="2" style="text-align: right;">'; |
|
388 | - |
|
389 | - echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">'; |
|
390 | - echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">'; |
|
391 | - |
|
392 | - echo '</td>'; |
|
393 | - echo '</tr>'; |
|
394 | - } else { |
|
395 | - echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
396 | - } |
|
397 | - echo '</table>'; |
|
398 | - echo '</form>'; |
|
392 | + echo '</td>'; |
|
393 | + echo '</tr>'; |
|
394 | + } else { |
|
395 | + echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
396 | + } |
|
397 | + echo '</table>'; |
|
398 | + echo '</form>'; |
|
399 | 399 | |
400 | - echo '</fieldset>'; |
|
401 | - echo '</fieldset><br><br>'; |
|
402 | - //Fin de la liste des evennement ------------------------------------- |
|
403 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
400 | + echo '</fieldset>'; |
|
401 | + echo '</fieldset><br><br>'; |
|
402 | + //Fin de la liste des evennement ------------------------------------- |
|
403 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>'; |
|
404 | 404 | |
405 | - $form = $eventHandler->getEventForm('admin'); |
|
406 | - $form->display(); |
|
405 | + $form = $eventHandler->getEventForm('admin'); |
|
406 | + $form->display(); |
|
407 | 407 | |
408 | - echo '</fieldset>'; |
|
408 | + echo '</fieldset>'; |
|
409 | 409 | |
410 | - include_once __DIR__.'/admin_footer.php'; |
|
410 | + include_once __DIR__.'/admin_footer.php'; |
|
411 | 411 | |
412 | - break; |
|
412 | + break; |
|
413 | 413 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/../../include/constantes.php'; |
|
3 | +include_once __DIR__.'/../../include/constantes.php'; |
|
4 | 4 | define('_MI_EXTCAL_NAME', 'eXtCal'); |
5 | 5 | define('_MI_EXTCAL_ABOUT', 'About'); |
6 | 6 | define('_MI_EXTCAL_AFTER', 'After'); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | define('_MI_EXTCAL_START_PAGE', 'Module home page'); |
136 | 136 | define('_MI_EXTCAL_SUBMIT_EVENT', 'Submit Event'); |
137 | 137 | define('_MI_EXTCAL_TABS_WEIGHT', 'Order of the Tabs'); |
138 | -define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>' . "<span style='color:#0000FF;'>" . _EXTCAL_NAV_LIST . '</span>' . ' <br>Separator: new line'); |
|
138 | +define('_MI_EXTCAL_TABS_WEIGHT_DESC', 'Set the tab order <br>Be careful to respect tab names:<br>'."<span style='color:#0000FF;'>"._EXTCAL_NAV_LIST.'</span>'.' <br>Separator: new line'); |
|
139 | 139 | define('_MI_EXTCAL_VISIBLE_TAB_DESC', 'Define the visible view.'); |
140 | 140 | define('_MI_EXTCAL_VISIBLE_TABS', 'Visible tab'); |
141 | 141 | define('_MI_EXTCAL_WEEK_START_DAY', 'Week start Day'); |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
5 | -$params = array( |
|
3 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | +$params = array( |
|
6 | 6 | 'view' => _EXTCAL_NAV_SEARCH, |
7 | 7 | 'file' => _EXTCAL_FILE_SEARCH, |
8 | 8 | ); |
9 | 9 | $GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl"; |
10 | -include_once __DIR__ . '/header.php'; |
|
10 | +include_once __DIR__.'/header.php'; |
|
11 | 11 | |
12 | 12 | $recurEventsArray = array(); |
13 | 13 | //needed to save the state of the form, so we don't show on the first time the list of available events |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | /***************************************************************/ |
20 | 20 | $searchExp = isset($_POST['searchExp']) ? $_POST['searchExp'] : ''; |
21 | 21 | $andor = isset($_POST['andor']) ? $_POST['andor'] : ''; |
22 | -$year = isset($_POST['year']) ? (int)$_POST['year'] : date('Y'); |
|
23 | -$month = isset($_POST['month']) ? (int)$_POST['month'] : date('n'); |
|
24 | -$day = isset($_POST['day']) ? (int)$_POST['day'] : 0; |
|
25 | -$cat = isset($_POST['cat']) ? (int)$_POST['cat'] : 0; |
|
22 | +$year = isset($_POST['year']) ? (int) $_POST['year'] : date('Y'); |
|
23 | +$month = isset($_POST['month']) ? (int) $_POST['month'] : date('n'); |
|
24 | +$day = isset($_POST['day']) ? (int) $_POST['day'] : 0; |
|
25 | +$cat = isset($_POST['cat']) ? (int) $_POST['cat'] : 0; |
|
26 | 26 | $orderby1 = isset($_POST['orderby1']) ? $_POST['orderby1'] : 'cat_name ASC'; |
27 | 27 | $orderby2 = isset($_POST['orderby2']) ? $_POST['orderby2'] : 'event_title ASC'; |
28 | 28 | $orderby3 = isset($_POST['orderby3']) ? $_POST['orderby3'] : ''; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
146 | -$eventsArray = array_merge((array)$eventsArray, (array)$recurEventsArray); |
|
146 | +$eventsArray = array_merge((array) $eventsArray, (array) $recurEventsArray); |
|
147 | 147 | |
148 | 148 | // Sort event array by event start |
149 | 149 | //usort($eventsArray, "orderEvents"); |
@@ -234,4 +234,4 @@ discard block |
||
234 | 234 | $xoopsTpl->assign('lang', $lang); |
235 | 235 | $xoopsTpl->assign('view', 'search'); |
236 | 236 | |
237 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
237 | +include XOOPS_ROOT_PATH.'/footer.php'; |
@@ -1,23 +1,23 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
3 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
4 | 4 | |
5 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
5 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
6 | 6 | |
7 | -include_once __DIR__ . '/include/agenda_fnc.php'; |
|
8 | -include_once __DIR__ . '/class/utilities.php'; |
|
7 | +include_once __DIR__.'/include/agenda_fnc.php'; |
|
8 | +include_once __DIR__.'/class/utilities.php'; |
|
9 | 9 | |
10 | -include_once __DIR__ . '/class/perm.php'; |
|
11 | -include_once __DIR__ . '/class/form/extcalform.php'; |
|
10 | +include_once __DIR__.'/class/perm.php'; |
|
11 | +include_once __DIR__.'/class/form/extcalform.php'; |
|
12 | 12 | |
13 | 13 | xoops_loadLanguage('modinfo', _EXTCAL_MODULE); |
14 | 14 | |
15 | 15 | //------------------------------------------------------ |
16 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
17 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
18 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weekdays.php'; |
|
19 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Week.php'; |
|
20 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
16 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
17 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
18 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weekdays.php'; |
|
19 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Week.php'; |
|
20 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
21 | 21 | |
22 | 22 | //------------------------------------------------------ |
23 | 23 | // Getting eXtCal object's handler |
@@ -17,18 +17,18 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
20 | +require_once dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
21 | 21 | $moduleDirName = basename(dirname(__DIR__)); |
22 | 22 | |
23 | 23 | if (!defined('EXTCAL_DIRNAME')) { |
24 | 24 | define('EXTCAL_DIRNAME', $moduleDirName); |
25 | - define('EXTCAL_PATH', XOOPS_ROOT_PATH . '/modules/' . EXTCAL_DIRNAME); |
|
26 | - define('EXTCAL_URL', XOOPS_URL . '/modules/' . EXTCAL_DIRNAME); |
|
27 | - define('EXTCAL_ADMIN', EXTCAL_URL . '/admin/index.php'); |
|
28 | - define('EXTCAL_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . EXTCAL_DIRNAME); |
|
29 | - define('EXTCAL_AUTHOR_LOGOIMG', EXTCAL_URL . '/assets/images/logoModule.png'); |
|
30 | - define('EXTCAL_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
31 | - define('EXTCAL_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
25 | + define('EXTCAL_PATH', XOOPS_ROOT_PATH.'/modules/'.EXTCAL_DIRNAME); |
|
26 | + define('EXTCAL_URL', XOOPS_URL.'/modules/'.EXTCAL_DIRNAME); |
|
27 | + define('EXTCAL_ADMIN', EXTCAL_URL.'/admin/index.php'); |
|
28 | + define('EXTCAL_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.EXTCAL_DIRNAME); |
|
29 | + define('EXTCAL_AUTHOR_LOGOIMG', EXTCAL_URL.'/assets/images/logoModule.png'); |
|
30 | + define('EXTCAL_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
31 | + define('EXTCAL_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.EXTCAL_DIRNAME); // WITHOUT Trailing slash |
|
32 | 32 | |
33 | 33 | } |
34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'name' => 'Module Configurator', |
38 | 38 | 'uploadFolders' => array( |
39 | 39 | EXTCAL_UPLOAD_PATH, |
40 | - EXTCAL_UPLOAD_PATH . '/etablissement' |
|
40 | + EXTCAL_UPLOAD_PATH.'/etablissement' |
|
41 | 41 | ), |
42 | 42 | // 'copyFiles' => array( |
43 | 43 | // EXTCAL_UPLOAD_PATH, |
@@ -58,4 +58,4 @@ discard block |
||
58 | 58 | |
59 | 59 | // module information |
60 | 60 | $mod_copyright = "<a href='http://xoops.org' title='XOOPS Project' target='_blank'> |
61 | - <img src='" . EXTCAL_AUTHOR_LOGOIMG . "' alt='XOOPS Project' /></a>"; |
|
61 | + <img src='" . EXTCAL_AUTHOR_LOGOIMG."' alt='XOOPS Project' /></a>"; |
@@ -102,8 +102,8 @@ |
||
102 | 102 | define('_EXTCAL_NAV_NEW_EVENT', 'new-event'); |
103 | 103 | |
104 | 104 | define('_EXTCAL_NAV_LIST', |
105 | - _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" |
|
106 | - . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT); |
|
105 | + _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" |
|
106 | + . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT); |
|
107 | 107 | |
108 | 108 | define('_EXTCAL_PREFIX_VIEW', 'view_'); |
109 | 109 | define('_EXTCAL_SUFFIX_VIEW', '.php'); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | define('_EXTCAL_CLN_EVENT', 'ExtcalEvent'); |
38 | 38 | |
39 | 39 | //------------------------------------------------------------------- |
40 | -define('_EXTCAL_PEAR_ROOT_DEFAULT', dirname(__DIR__) . '/class/pear'); |
|
40 | +define('_EXTCAL_PEAR_ROOT_DEFAULT', dirname(__DIR__).'/class/pear'); |
|
41 | 41 | //define('_EXTCAL_PEAR_ROOT', 'F:/wamp/www/xfr254b/xoops_lib/Frameworks/pear' ); |
42 | 42 | |
43 | 43 | $pear_path = _EXTCAL_PEAR_ROOT_DEFAULT; |
@@ -71,22 +71,22 @@ discard block |
||
71 | 71 | //} |
72 | 72 | define('_EXTCAL_PEAR_ROOT', $pear_path); |
73 | 73 | |
74 | -define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT . '/Calendar'); |
|
75 | -define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT . '/'); |
|
74 | +define('_EXTCAL_PEAR_CALENDAR_ROOT', _EXTCAL_PEAR_ROOT.'/Calendar'); |
|
75 | +define('CALENDAR_ROOT', _EXTCAL_PEAR_CALENDAR_ROOT.'/'); |
|
76 | 76 | |
77 | 77 | //------------------------------------------------------------------- |
78 | 78 | define('_EXTCAL_SHOW_NO_PICTURE', false); |
79 | 79 | |
80 | 80 | define('_EXTCAL_PATH_HORLOGES', '/modules/extcal/assets/images/horloges/'); |
81 | -define('_EXTCAL_PATH_ICONS16', XOOPS_URL . '/Frameworks/moduleclasses/icons/16/'); |
|
82 | -define('_EXTCAL_PATH_ICONS32', XOOPS_URL . '/Frameworks/moduleclasses/icons/32/'); |
|
83 | -define('_EXTCAL_PATH_FO', XOOPS_URL . '/modules/extcal/'); |
|
84 | -define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO . 'admin/'); |
|
85 | -define('_EXTCAL_PATH_LG', XOOPS_URL . '/modules/extcal/languages/'); |
|
81 | +define('_EXTCAL_PATH_ICONS16', XOOPS_URL.'/Frameworks/moduleclasses/icons/16/'); |
|
82 | +define('_EXTCAL_PATH_ICONS32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32/'); |
|
83 | +define('_EXTCAL_PATH_FO', XOOPS_URL.'/modules/extcal/'); |
|
84 | +define('_EXTCAL_PATH_BO', _EXTCAL_PATH_FO.'admin/'); |
|
85 | +define('_EXTCAL_PATH_LG', XOOPS_URL.'/modules/extcal/languages/'); |
|
86 | 86 | |
87 | 87 | define('_EXTCAL_IMG_INTERVAL', 'interval04.png'); |
88 | -define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16 . _EXTCAL_IMG_INTERVAL); |
|
89 | -define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32 . _EXTCAL_IMG_INTERVAL); |
|
88 | +define('_EXTCAL_IMG_INTERVAL16', _EXTCAL_PATH_ICONS16._EXTCAL_IMG_INTERVAL); |
|
89 | +define('_EXTCAL_IMG_INTERVAL32', _EXTCAL_PATH_ICONS32._EXTCAL_IMG_INTERVAL); |
|
90 | 90 | |
91 | 91 | //define('_EXTCAL_DIRNAME', $xoopsModule->getVar('dirname')); |
92 | 92 | |
@@ -102,22 +102,22 @@ discard block |
||
102 | 102 | define('_EXTCAL_NAV_NEW_EVENT', 'new-event'); |
103 | 103 | |
104 | 104 | define('_EXTCAL_NAV_LIST', |
105 | - _EXTCAL_NAV_CALMONTH . "\n" . _EXTCAL_NAV_CALWEEK . "\n" . _EXTCAL_NAV_YEAR . "\n" . _EXTCAL_NAV_MONTH . "\n" . _EXTCAL_NAV_WEEK . "\n" . _EXTCAL_NAV_DAY . "\n" . _EXTCAL_NAV_AGENDA_WEEK . "\n" . _EXTCAL_NAV_AGENDA_DAY . "\n" |
|
106 | - . _EXTCAL_NAV_SEARCH . "\n" . _EXTCAL_NAV_NEW_EVENT); |
|
105 | + _EXTCAL_NAV_CALMONTH."\n"._EXTCAL_NAV_CALWEEK."\n"._EXTCAL_NAV_YEAR."\n"._EXTCAL_NAV_MONTH."\n"._EXTCAL_NAV_WEEK."\n"._EXTCAL_NAV_DAY."\n"._EXTCAL_NAV_AGENDA_WEEK."\n"._EXTCAL_NAV_AGENDA_DAY."\n" |
|
106 | + . _EXTCAL_NAV_SEARCH."\n"._EXTCAL_NAV_NEW_EVENT); |
|
107 | 107 | |
108 | 108 | define('_EXTCAL_PREFIX_VIEW', 'view_'); |
109 | 109 | define('_EXTCAL_SUFFIX_VIEW', '.php'); |
110 | 110 | |
111 | -define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALMONTH . _EXTCAL_SUFFIX_VIEW); |
|
112 | -define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_CALWEEK . _EXTCAL_SUFFIX_VIEW); |
|
113 | -define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_YEAR . _EXTCAL_SUFFIX_VIEW); |
|
114 | -define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_MONTH . _EXTCAL_SUFFIX_VIEW); |
|
115 | -define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_WEEK . _EXTCAL_SUFFIX_VIEW); |
|
116 | -define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_DAY . _EXTCAL_SUFFIX_VIEW); |
|
117 | -define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_WEEK . _EXTCAL_SUFFIX_VIEW); |
|
118 | -define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_AGENDA_DAY . _EXTCAL_SUFFIX_VIEW); |
|
119 | -define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_SEARCH . _EXTCAL_SUFFIX_VIEW); |
|
120 | -define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW . _EXTCAL_NAV_NEW_EVENT . _EXTCAL_SUFFIX_VIEW); |
|
111 | +define('_EXTCAL_FILE_CALMONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALMONTH._EXTCAL_SUFFIX_VIEW); |
|
112 | +define('_EXTCAL_FILE_CALWEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_CALWEEK._EXTCAL_SUFFIX_VIEW); |
|
113 | +define('_EXTCAL_FILE_YEAR', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_YEAR._EXTCAL_SUFFIX_VIEW); |
|
114 | +define('_EXTCAL_FILE_MONTH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_MONTH._EXTCAL_SUFFIX_VIEW); |
|
115 | +define('_EXTCAL_FILE_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_WEEK._EXTCAL_SUFFIX_VIEW); |
|
116 | +define('_EXTCAL_FILE_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_DAY._EXTCAL_SUFFIX_VIEW); |
|
117 | +define('_EXTCAL_FILE_AGENDA_WEEK', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_WEEK._EXTCAL_SUFFIX_VIEW); |
|
118 | +define('_EXTCAL_FILE_AGENDA_DAY', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_AGENDA_DAY._EXTCAL_SUFFIX_VIEW); |
|
119 | +define('_EXTCAL_FILE_SEARCH', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_SEARCH._EXTCAL_SUFFIX_VIEW); |
|
120 | +define('_EXTCAL_FILE_NEW_EVENT', _EXTCAL_PREFIX_VIEW._EXTCAL_NAV_NEW_EVENT._EXTCAL_SUFFIX_VIEW); |
|
121 | 121 | |
122 | 122 | define('_EXTCAL_MULTILOADER', '/class/xoopsform/multiuploads/formmultiuploads.php'); |
123 | 123 |