@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | { |
10 | 10 | list($usec, $sec) = explode(' ', microtime()); |
11 | 11 | |
12 | - return (float)$usec + (float)$sec; |
|
12 | + return (float) $usec + (float) $sec; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | // Switch to PEAR::Date engine |
@@ -43,27 +43,27 @@ discard block |
||
43 | 43 | $_GET['view'] = 'calendar_year'; |
44 | 44 | // no break |
45 | 45 | case 'calendar_year': |
46 | - require_once CALENDAR_ROOT . 'Year.php'; |
|
46 | + require_once CALENDAR_ROOT.'Year.php'; |
|
47 | 47 | $c = new Calendar_Year($_GET['y']); |
48 | 48 | break; |
49 | 49 | case 'calendar_month': |
50 | - require_once CALENDAR_ROOT . 'Month.php'; |
|
50 | + require_once CALENDAR_ROOT.'Month.php'; |
|
51 | 51 | $c = new Calendar_Month($_GET['y'], $_GET['m']); |
52 | 52 | break; |
53 | 53 | case 'calendar_day': |
54 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
54 | + require_once CALENDAR_ROOT.'Day.php'; |
|
55 | 55 | $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
56 | 56 | break; |
57 | 57 | case 'calendar_hour': |
58 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
58 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
59 | 59 | $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
60 | 60 | break; |
61 | 61 | case 'calendar_minute': |
62 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
62 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
63 | 63 | $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
64 | 64 | break; |
65 | 65 | case 'calendar_second': |
66 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
66 | + require_once CALENDAR_ROOT.'Second.php'; |
|
67 | 67 | $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
68 | 68 | break; |
69 | 69 | } |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $date = new Date($c->getTimestamp()); |
73 | 73 | |
74 | 74 | echo '<h1>Using PEAR::Date engine</h1>'; |
75 | -echo 'Viewing: ' . @$_GET['view'] . '<br>'; |
|
76 | -echo 'The time is now: ' . $date->format('%Y %a %e %T') . '<br >'; |
|
75 | +echo 'Viewing: '.@$_GET['view'].'<br>'; |
|
76 | +echo 'The time is now: '.$date->format('%Y %a %e %T').'<br >'; |
|
77 | 77 | |
78 | 78 | $i = 1; |
79 | 79 | echo '<h1>First Iteration</h1>'; |
@@ -83,15 +83,15 @@ discard block |
||
83 | 83 | $c->build(); |
84 | 84 | while ($e = $c->fetch()) { |
85 | 85 | $class = strtolower(get_class($e)); |
86 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
87 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
88 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
86 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
87 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
88 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
89 | 89 | if (0 == ($i % 10)) { |
90 | 90 | echo '<br>'; |
91 | 91 | } |
92 | 92 | ++$i; |
93 | 93 | } |
94 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
94 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
95 | 95 | |
96 | 96 | $i = 1; |
97 | 97 | echo '<h1>Second Iteration</h1>'; |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | $start = getmicrotime(); |
101 | 101 | while ($e = $c->fetch()) { |
102 | 102 | $class = strtolower(get_class($e)); |
103 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
104 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
105 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
103 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
104 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
105 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
106 | 106 | if (0 == ($i % 10)) { |
107 | 107 | echo '<br>'; |
108 | 108 | } |
109 | 109 | ++$i; |
110 | 110 | } |
111 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
111 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $basePath = explode('/', $_SERVER['SCRIPT_NAME']); |
16 | 16 | array_pop($basePath); |
17 | 17 | $basePath = implode('/', $basePath); |
18 | -$url = 'http://' . $_SERVER['SERVER_NAME'] . $basePath . '/7.php?wsdl'; |
|
18 | +$url = 'http://'.$_SERVER['SERVER_NAME'].$basePath.'/7.php?wsdl'; |
|
19 | 19 | |
20 | 20 | if (!isset($_GET['y'])) { |
21 | 21 | $_GET['y'] = date('Y'); |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | |
27 | 27 | $wsdl = new SOAP_WSDL($url); |
28 | 28 | |
29 | -echo '<pre>' . $wsdl->generateProxyCode() . '</pre>'; |
|
29 | +echo '<pre>'.$wsdl->generateProxyCode().'</pre>'; |
|
30 | 30 | |
31 | 31 | $calendarClient = $wsdl->getProxy(); |
32 | 32 | |
33 | -$month = $calendarClient->getMonth((int)$_GET['y'], (int)$_GET['m']); |
|
33 | +$month = $calendarClient->getMonth((int) $_GET['y'], (int) $_GET['m']); |
|
34 | 34 | |
35 | 35 | if (PEAR::isError($month)) { |
36 | 36 | die($month->toString()); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | if (1 === $day->isEmpty) { |
63 | 63 | echo '<td></td>'; |
64 | 64 | } else { |
65 | - echo '<td>' . $day->day . '</td>'; |
|
65 | + echo '<td>'.$day->day.'</td>'; |
|
66 | 66 | } |
67 | 67 | if (1 === $day->isLast) { |
68 | 68 | echo "</tr>\n"; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | list($usec, $sec) = explode(' ', microtime()); |
10 | 10 | |
11 | - return (float)$usec + (float)$sec; |
|
11 | + return (float) $usec + (float) $sec; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | if (!@include 'Calendar/Calendar.php') { |
@@ -39,33 +39,33 @@ discard block |
||
39 | 39 | $_GET['view'] = 'calendar_year'; |
40 | 40 | // no break |
41 | 41 | case 'calendar_year': |
42 | - require_once CALENDAR_ROOT . 'Year.php'; |
|
42 | + require_once CALENDAR_ROOT.'Year.php'; |
|
43 | 43 | $c = new Calendar_Year($_GET['y']); |
44 | 44 | break; |
45 | 45 | case 'calendar_month': |
46 | - require_once CALENDAR_ROOT . 'Month.php'; |
|
46 | + require_once CALENDAR_ROOT.'Month.php'; |
|
47 | 47 | $c = new Calendar_Month($_GET['y'], $_GET['m']); |
48 | 48 | break; |
49 | 49 | case 'calendar_day': |
50 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
50 | + require_once CALENDAR_ROOT.'Day.php'; |
|
51 | 51 | $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
52 | 52 | break; |
53 | 53 | case 'calendar_hour': |
54 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
54 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
55 | 55 | $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
56 | 56 | break; |
57 | 57 | case 'calendar_minute': |
58 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
58 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
59 | 59 | $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
60 | 60 | break; |
61 | 61 | case 'calendar_second': |
62 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
62 | + require_once CALENDAR_ROOT.'Second.php'; |
|
63 | 63 | $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
64 | 64 | break; |
65 | 65 | } |
66 | 66 | |
67 | -echo 'Viewing: ' . @$_GET['view'] . '<br>'; |
|
68 | -echo 'The time is now: ' . date('Y M d H:i:s', $c->getTimestamp()) . '<br >'; |
|
67 | +echo 'Viewing: '.@$_GET['view'].'<br>'; |
|
68 | +echo 'The time is now: '.date('Y M d H:i:s', $c->getTimestamp()).'<br >'; |
|
69 | 69 | |
70 | 70 | $i = 1; |
71 | 71 | echo '<h1>First Iteration</h1>'; |
@@ -75,15 +75,15 @@ discard block |
||
75 | 75 | $c->build(); |
76 | 76 | while ($e = $c->fetch()) { |
77 | 77 | $class = strtolower(get_class($e)); |
78 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
79 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
80 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
78 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
79 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
80 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
81 | 81 | if (0 == ($i % 10)) { |
82 | 82 | echo '<br>'; |
83 | 83 | } |
84 | 84 | ++$i; |
85 | 85 | } |
86 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
86 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
87 | 87 | |
88 | 88 | $i = 1; |
89 | 89 | echo '<h1>Second Iteration</h1>'; |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | $start = getmicrotime(); |
93 | 93 | while ($e = $c->fetch()) { |
94 | 94 | $class = strtolower(get_class($e)); |
95 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
96 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
97 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
95 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
96 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
97 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
98 | 98 | if (0 == ($i % 10)) { |
99 | 99 | echo '<br>'; |
100 | 100 | } |
101 | 101 | ++$i; |
102 | 102 | } |
103 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
103 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | if (!$engine) { |
99 | 99 | if (!class_exists($class)) { |
100 | - require_once CALENDAR_ROOT . 'Engine' . '/' . CALENDAR_ENGINE . '.php'; |
|
100 | + require_once CALENDAR_ROOT.'Engine'.'/'.CALENDAR_ENGINE.'.php'; |
|
101 | 101 | } |
102 | 102 | $engine = new $class(); |
103 | 103 | } |
@@ -209,13 +209,13 @@ discard block |
||
209 | 209 | if (!isset($cE)) { |
210 | 210 | $cE = Calendar_Engine_Factory::getEngine(); |
211 | 211 | } |
212 | - $this->cE =& $cE; |
|
213 | - $this->year = (int)$y; |
|
214 | - $this->month = (int)$m; |
|
215 | - $this->day = (int)$d; |
|
216 | - $this->hour = (int)$h; |
|
217 | - $this->minute = (int)$i; |
|
218 | - $this->second = (int)$s; |
|
212 | + $this->cE = & $cE; |
|
213 | + $this->year = (int) $y; |
|
214 | + $this->month = (int) $m; |
|
215 | + $this->day = (int) $d; |
|
216 | + $this->hour = (int) $h; |
|
217 | + $this->minute = (int) $i; |
|
218 | + $this->second = (int) $s; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | return $this->toArray($stamp); |
332 | 332 | break; |
333 | 333 | case 'object': |
334 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
334 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
335 | 335 | |
336 | 336 | return Calendar_Factory::createByTimestamp($returnType, $stamp); |
337 | 337 | break; |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | */ |
354 | 354 | public function build($sDates = []) |
355 | 355 | { |
356 | - require_once __DIR__ . '/PEAR.php'; |
|
356 | + require_once __DIR__.'/PEAR.php'; |
|
357 | 357 | PEAR::raiseError('Calendar::build is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::build()'); |
358 | 358 | |
359 | 359 | return false; |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | */ |
370 | 370 | public function setSelection($sDates) |
371 | 371 | { |
372 | - require_once __DIR__ . '/PEAR.php'; |
|
372 | + require_once __DIR__.'/PEAR.php'; |
|
373 | 373 | PEAR::raiseError('Calendar::setSelection is abstract', null, PEAR_ERROR_TRIGGER, E_USER_NOTICE, 'Calendar::setSelection()'); |
374 | 374 | |
375 | 375 | return false; |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | public function &getValidator() |
437 | 437 | { |
438 | 438 | if (!isset($this->validator)) { |
439 | - require_once CALENDAR_ROOT . 'Validator.php'; |
|
439 | + require_once CALENDAR_ROOT.'Validator.php'; |
|
440 | 440 | $this->validator = new Calendar_Validator($this); |
441 | 441 | } |
442 | 442 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | { |
471 | 471 | if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) { |
472 | 472 | if ((CALENDAR_FIRST_DAY_OF_WEEK != $firstDay) && !is_null($firstDay)) { |
473 | - $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.' . ' The $firstDay parameter will be ignored.'; |
|
473 | + $msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.'.' The $firstDay parameter will be ignored.'; |
|
474 | 474 | trigger_error($msg, E_USER_WARNING); |
475 | 475 | } |
476 | 476 |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | |
20 | 20 | // defined('XOOPS_ROOT_PATH') || exit('Restricted access.'); |
21 | 21 | |
22 | -require_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
23 | -require_once __DIR__ . '/perm.php'; |
|
24 | -require_once __DIR__ . '/time.php'; |
|
25 | -require_once __DIR__ . '/config.php'; |
|
26 | -require_once __DIR__ . '/extDateTime.php'; |
|
27 | -require_once __DIR__ . '/utility.php'; |
|
28 | -require_once __DIR__ . '/../include/constantes.php'; |
|
22 | +require_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
23 | +require_once __DIR__.'/perm.php'; |
|
24 | +require_once __DIR__.'/time.php'; |
|
25 | +require_once __DIR__.'/config.php'; |
|
26 | +require_once __DIR__.'/extDateTime.php'; |
|
27 | +require_once __DIR__.'/utility.php'; |
|
28 | +require_once __DIR__.'/../include/constantes.php'; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Class ExtcalEvent. |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false); |
67 | 67 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
68 | 68 | |
69 | - $this->externalKey['cat_id'] = [ |
|
69 | + $this->externalKey['cat_id'] = [ |
|
70 | 70 | 'className' => 'cat', |
71 | 71 | 'getMethodeName' => 'getCat', |
72 | 72 | 'keyName' => 'cat', |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | |
403 | 403 | // while (list($k, $v) = each($events)) { |
404 | 404 | foreach ($events as $k => $t) { |
405 | - $ordre[] = (int)$v['event_start']; |
|
405 | + $ordre[] = (int) $v['event_start']; |
|
406 | 406 | $this->formatEventDate($v, $extcalConfig['event_date_week']); |
407 | 407 | //$v['cat']['cat_light_color'] = $v['cat']['cat_color']; |
408 | 408 | $v['cat']['cat_light_color'] = ExtcalUtility::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX); |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | |
607 | 607 | reset($period); |
608 | 608 | foreach ($period as $dt) { |
609 | - echo $dt->format("l d-m-Y H:i:s\n") . '<br>'; |
|
609 | + echo $dt->format("l d-m-Y H:i:s\n").'<br>'; |
|
610 | 610 | } |
611 | 611 | } |
612 | 612 | |
@@ -939,10 +939,10 @@ discard block |
||
939 | 939 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
940 | 940 | $count = count($authorizedAccessCats); |
941 | 941 | if ($count > 0) { |
942 | - $in = '(' . $authorizedAccessCats[0]; |
|
942 | + $in = '('.$authorizedAccessCats[0]; |
|
943 | 943 | array_shift($authorizedAccessCats); |
944 | 944 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
945 | - $in .= ',' . $authorizedAccessCat; |
|
945 | + $in .= ','.$authorizedAccessCat; |
|
946 | 946 | } |
947 | 947 | $in .= ')'; |
948 | 948 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -962,10 +962,10 @@ discard block |
||
962 | 962 | } |
963 | 963 | if (is_array($cats)) { |
964 | 964 | if (false === array_search(0, $cats)) { |
965 | - $in = '(' . current($cats); |
|
965 | + $in = '('.current($cats); |
|
966 | 966 | array_shift($cats); |
967 | 967 | foreach ($cats as $cat) { |
968 | - $in .= ',' . $cat; |
|
968 | + $in .= ','.$cat; |
|
969 | 969 | } |
970 | 970 | $in .= ')'; |
971 | 971 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -988,7 +988,7 @@ discard block |
||
988 | 988 | $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
989 | 989 | |
990 | 990 | /***************************************************/ |
991 | - require_once __DIR__ . '/etablissement.php'; |
|
991 | + require_once __DIR__.'/etablissement.php'; |
|
992 | 992 | if ('admin' === $siteSide) { |
993 | 993 | $action = 'event.php?op=enreg'; |
994 | 994 | $cats = $catHandler->getAllCat($GLOBALS['xoopsUser'], 'all'); |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | if ('clone' === $mode) { |
1007 | 1007 | $data['event_id'] = 0; |
1008 | 1008 | $event->setVar('event_id', 0); |
1009 | - $newTitle = $event->getVar('event_title') . ' (' . _MD_EXTCAL_CLONE_OF . $data['event_id'] . ')'; |
|
1009 | + $newTitle = $event->getVar('event_title').' ('._MD_EXTCAL_CLONE_OF.$data['event_id'].')'; |
|
1010 | 1010 | $event->setVar('event_title', $newTitle); |
1011 | 1011 | } |
1012 | 1012 | |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | $form->addElement($catSelect, true); |
1191 | 1191 | //----------------------------------------------------------- |
1192 | 1192 | |
1193 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
1193 | + $file_path = __DIR__.'/../assets/css/images'; |
|
1194 | 1194 | $tf = XoopsLists::getImgListAsArray($file_path); |
1195 | 1195 | array_unshift($tf, _MD_EXTCAL_NONE); |
1196 | 1196 | $xfIcones = new XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, ''); |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | if (count($files) > 0) { |
1296 | 1296 | $eventFiles = new ExtcalFormFileCheckBox('', 'filetokeep'); |
1297 | 1297 | foreach ($files as $file) { |
1298 | - $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size']; |
|
1298 | + $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size']; |
|
1299 | 1299 | $eventFiles->addOption($file['file_id'], $name); |
1300 | 1300 | } |
1301 | 1301 | $fileElmtTray->addElement($eventFiles); |
@@ -1311,7 +1311,7 @@ discard block |
||
1311 | 1311 | //Picture1 |
1312 | 1312 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), ''); |
1313 | 1313 | if (!empty($event_picture1)) { |
1314 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''><br><br>")); |
|
1314 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''><br><br>")); |
|
1315 | 1315 | $check_del_img = new XoopsFormCheckBox('', 'delimg_1'); |
1316 | 1316 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
1317 | 1317 | $file_tray->addElement($check_del_img); |
@@ -1322,8 +1322,8 @@ discard block |
||
1322 | 1322 | } |
1323 | 1323 | $file_img->setExtra("size ='40'"); |
1324 | 1324 | $file_tray->addElement($file_img); |
1325 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
1326 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
1325 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
1326 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
1327 | 1327 | $file_tray->addElement($file_label); |
1328 | 1328 | $form->addElement($file_tray); |
1329 | 1329 | $form->addElement(new XoopsFormHidden('file1', $event_picture1)); |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | //Picture2 |
1332 | 1332 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
1333 | 1333 | if (!empty($event_picture2)) { |
1334 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''><br><br>")); |
|
1334 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''><br><br>")); |
|
1335 | 1335 | $check_del_img = new XoopsFormCheckBox('', 'delimg_2'); |
1336 | 1336 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
1337 | 1337 | $file_tray->addElement($check_del_img); |
@@ -1342,8 +1342,8 @@ discard block |
||
1342 | 1342 | } |
1343 | 1343 | $file_img->setExtra("size ='40'"); |
1344 | 1344 | $file_tray->addElement($file_img); |
1345 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
1346 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
1345 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
1346 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
1347 | 1347 | $file_tray->addElement($file_label); |
1348 | 1348 | $form->addElement($file_tray); |
1349 | 1349 | $form->addElement(new XoopsFormHidden('file2', $event_picture2)); |
@@ -1410,7 +1410,7 @@ discard block |
||
1410 | 1410 | $recurRules = 'weekly|'; |
1411 | 1411 | $recurRules .= $parm['rrule_weekly_interval']; |
1412 | 1412 | foreach ($parm['rrule_weekly_bydays'] as $day) { |
1413 | - $recurRules .= '|' . $day; |
|
1413 | + $recurRules .= '|'.$day; |
|
1414 | 1414 | } |
1415 | 1415 | |
1416 | 1416 | break; |
@@ -1420,11 +1420,11 @@ discard block |
||
1420 | 1420 | $parm['rrule_monthly_interval'] = 0; |
1421 | 1421 | } |
1422 | 1422 | $recurRules = 'monthly|'; |
1423 | - $recurRules .= $parm['rrule_monthly_interval'] . '|'; |
|
1423 | + $recurRules .= $parm['rrule_monthly_interval'].'|'; |
|
1424 | 1424 | if ('' != $parm['rrule_monthly_byday']) { |
1425 | 1425 | $recurRules .= $parm['rrule_monthly_byday']; |
1426 | 1426 | } else { |
1427 | - $recurRules .= 'MD' . $parm['rrule_bymonthday']; |
|
1427 | + $recurRules .= 'MD'.$parm['rrule_bymonthday']; |
|
1428 | 1428 | } |
1429 | 1429 | |
1430 | 1430 | break; |
@@ -1458,9 +1458,9 @@ discard block |
||
1458 | 1458 | |
1459 | 1459 | $recurRules = 'yearly|'; |
1460 | 1460 | $recurRules .= $parm['rrule_yearly_interval']; |
1461 | - $recurRules .= '|' . $parm['rrule_yearly_byday']; |
|
1461 | + $recurRules .= '|'.$parm['rrule_yearly_byday']; |
|
1462 | 1462 | foreach ($parm['rrule_yearly_bymonths'] as $month) { |
1463 | - $recurRules .= '|' . $month; |
|
1463 | + $recurRules .= '|'.$month; |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | 1466 | break; |
@@ -2390,10 +2390,10 @@ discard block |
||
2390 | 2390 | global $xoopsDB; |
2391 | 2391 | |
2392 | 2392 | //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}"; |
2393 | - $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te'; |
|
2394 | - $tCat = $xoopsDB->prefix('extcal_cat') . ' AS tc'; |
|
2393 | + $tEvent = $xoopsDB->prefix('extcal_event').' AS te'; |
|
2394 | + $tCat = $xoopsDB->prefix('extcal_cat').' AS tc'; |
|
2395 | 2395 | |
2396 | - $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}"; |
|
2396 | + $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}"; |
|
2397 | 2397 | //--------------------------------------------------- |
2398 | 2398 | $tw = []; |
2399 | 2399 | $tw[] = 'te.cat_id = tc.cat_id'; |
@@ -2402,7 +2402,7 @@ discard block |
||
2402 | 2402 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
2403 | 2403 | $inCat = 'te.cat_id IN (0)'; |
2404 | 2404 | if (count($authorizedAccessCats) > 0) { |
2405 | - $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')'; |
|
2405 | + $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')'; |
|
2406 | 2406 | } |
2407 | 2407 | //echo $tw[count($tw)-1]; |
2408 | 2408 | |
@@ -2438,12 +2438,12 @@ discard block |
||
2438 | 2438 | 'te.event_address', |
2439 | 2439 | 'tc.cat_name', |
2440 | 2440 | ]; |
2441 | - $t = []; |
|
2441 | + $t = []; |
|
2442 | 2442 | for ($i = 0, $count = count($queryarray); $i < $count; ++$i) { |
2443 | 2443 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
2444 | 2444 | } |
2445 | 2445 | |
2446 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
2446 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
2447 | 2447 | |
2448 | 2448 | $t = []; |
2449 | 2449 | for ($h = 0, $count = count($tFields); $h < $count; ++$h) { |
@@ -2452,10 +2452,10 @@ discard block |
||
2452 | 2452 | |
2453 | 2453 | $filtre = implode(' OR ', $t); |
2454 | 2454 | $filtre = str_replace('#', '%', $filtre); |
2455 | - $tw[] = '(' . $filtre . ')'; |
|
2455 | + $tw[] = '('.$filtre.')'; |
|
2456 | 2456 | } |
2457 | 2457 | |
2458 | - $sql .= ' WHERE ' . implode(' AND ', $tw); |
|
2458 | + $sql .= ' WHERE '.implode(' AND ', $tw); |
|
2459 | 2459 | //------------------------------------------------------------ |
2460 | 2460 | if (count($orderBy) > 0) { |
2461 | 2461 | $t = []; |
@@ -2465,7 +2465,7 @@ discard block |
||
2465 | 2465 | } |
2466 | 2466 | } |
2467 | 2467 | if (count($t) > 0) { |
2468 | - $sql .= ' ORDER BY ' . implode(',', $t); |
|
2468 | + $sql .= ' ORDER BY '.implode(',', $t); |
|
2469 | 2469 | } |
2470 | 2470 | } |
2471 | 2471 | |
@@ -2498,7 +2498,7 @@ discard block |
||
2498 | 2498 | $i = 0; |
2499 | 2499 | while ($myrow = $xoopsDB->fetchArray($result)) { |
2500 | 2500 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
2501 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
2501 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
2502 | 2502 | $ret[$i]['title'] = $myrow['event_title']; |
2503 | 2503 | $ret[$i]['time'] = $myrow['event_submitdate']; |
2504 | 2504 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -2538,23 +2538,23 @@ discard block |
||
2538 | 2538 | // } |
2539 | 2539 | $tEvent = $xoopsDB->prefix('extcal_event'); |
2540 | 2540 | $tCat = $xoopsDB->prefix('extcal_cat'); |
2541 | - $sql = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color " . " FROM {$tEvent}, {$tCat}" . " WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'"; |
|
2541 | + $sql = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color "." FROM {$tEvent}, {$tCat}"." WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'"; |
|
2542 | 2542 | |
2543 | 2543 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
2544 | 2544 | $count = count($authorizedAccessCats); |
2545 | 2545 | if ($count > 0) { |
2546 | - $in = '(' . $authorizedAccessCats[0]; |
|
2546 | + $in = '('.$authorizedAccessCats[0]; |
|
2547 | 2547 | array_shift($authorizedAccessCats); |
2548 | 2548 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
2549 | - $in .= ',' . $authorizedAccessCat; |
|
2549 | + $in .= ','.$authorizedAccessCat; |
|
2550 | 2550 | } |
2551 | 2551 | $in .= ')'; |
2552 | 2552 | } else { |
2553 | 2553 | $in = '(0)'; |
2554 | 2554 | } |
2555 | - $sql .= " AND {$tEvent}.cat_id IN " . $in . ''; |
|
2555 | + $sql .= " AND {$tEvent}.cat_id IN ".$in.''; |
|
2556 | 2556 | if (0 != $userId) { |
2557 | - $sql .= " AND event_submitter = '" . $userId . "'"; |
|
2557 | + $sql .= " AND event_submitter = '".$userId."'"; |
|
2558 | 2558 | } |
2559 | 2559 | |
2560 | 2560 | //echoArray($queryarray,false); |
@@ -2574,7 +2574,7 @@ discard block |
||
2574 | 2574 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
2575 | 2575 | } |
2576 | 2576 | |
2577 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
2577 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
2578 | 2578 | |
2579 | 2579 | $t = []; |
2580 | 2580 | for ($h = 0, $count = count($tFields); $h < $count; ++$h) { |
@@ -2583,11 +2583,11 @@ discard block |
||
2583 | 2583 | |
2584 | 2584 | $filtre = implode(' OR ', $t); |
2585 | 2585 | $filtre = str_replace('#', '%', $filtre); |
2586 | - $sql .= " AND ($filtre)"; |
|
2586 | + $sql .= " AND ($filtre)"; |
|
2587 | 2587 | } |
2588 | 2588 | |
2589 | 2589 | if ('' != $criteresPlus) { |
2590 | - $sql .= ' AND ' . $criteresPlus; |
|
2590 | + $sql .= ' AND '.$criteresPlus; |
|
2591 | 2591 | } |
2592 | 2592 | $sql .= ' ORDER BY event_id DESC'; |
2593 | 2593 | |
@@ -2597,7 +2597,7 @@ discard block |
||
2597 | 2597 | if ($xoopsSearch) { |
2598 | 2598 | while ($myrow = $xoopsDB->fetchArray($result)) { |
2599 | 2599 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
2600 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
2600 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
2601 | 2601 | $ret[$i]['title'] = $myrow['event_title']; |
2602 | 2602 | $ret[$i]['time'] = $myrow['event_submitdate']; |
2603 | 2603 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * L'utilisation de ce formulaire d'adminitration suppose |
16 | 16 | * que la classe correspondante de la table a été générées avec classGenerator |
17 | 17 | **/ |
18 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
18 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Class ExtcalUtility. |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2) |
50 | 50 | { |
51 | 51 | /////////////////////////////////////////////////////////////////////////////// |
52 | - $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/'; |
|
53 | - $uploadurl_event = XOOPS_URL . '/uploads/extcal/'; |
|
52 | + $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/'; |
|
53 | + $uploadurl_event = XOOPS_URL.'/uploads/extcal/'; |
|
54 | 54 | //$picture = ''; |
55 | 55 | for ($j = 1; $j < 3; ++$j) { |
56 | - $delimg = @$REQUEST['delimg_' . $j . '']; |
|
57 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
56 | + $delimg = @$REQUEST['delimg_'.$j.'']; |
|
57 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
58 | 58 | if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) { |
59 | 59 | $upload = new XoopsMediaUploader($uploaddir_event, [ |
60 | 60 | 'image/gif', |
@@ -77,15 +77,15 @@ discard block |
||
77 | 77 | $event_picture2 = $upload->getSavedFileName(); |
78 | 78 | } |
79 | 79 | } |
80 | - } elseif (!empty($REQUEST['file' . $j])) { |
|
80 | + } elseif (!empty($REQUEST['file'.$j])) { |
|
81 | 81 | if (1 == $j) { |
82 | - $event_picture1 = $REQUEST['file' . $j]; |
|
82 | + $event_picture1 = $REQUEST['file'.$j]; |
|
83 | 83 | } elseif (2 == $j) { |
84 | - $event_picture2 = $REQUEST['file' . $j]; |
|
84 | + $event_picture2 = $REQUEST['file'.$j]; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | } else { |
88 | - $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j]; |
|
88 | + $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j]; |
|
89 | 89 | if (1 == $j) { |
90 | 90 | $event_picture1 = ''; |
91 | 91 | } elseif (2 == $j) { |
@@ -181,17 +181,17 @@ discard block |
||
181 | 181 | $select->addOption('', ''); |
182 | 182 | } |
183 | 183 | |
184 | - $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
185 | - $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
184 | + $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
185 | + $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
186 | 186 | |
187 | - $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
188 | - $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
187 | + $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
188 | + $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
189 | 189 | |
190 | - $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
191 | - $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
190 | + $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
191 | + $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
192 | 192 | |
193 | - $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
194 | - $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
193 | + $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
194 | + $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
195 | 195 | |
196 | 196 | return $select; |
197 | 197 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | public static function echoDateArray($period) |
306 | 306 | { |
307 | 307 | foreach ($period as $dt) { |
308 | - echo $dt->format("l Y-m-d H:i:s\n") . '<br>'; |
|
308 | + echo $dt->format("l Y-m-d H:i:s\n").'<br>'; |
|
309 | 309 | } |
310 | 310 | } |
311 | 311 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | } |
322 | 322 | |
323 | 323 | $txt = print_r($t, true); |
324 | - echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>"; |
|
324 | + echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>"; |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | /*****************************************************************/ |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | if ('' != $msg) { |
335 | 335 | echo "<hr>{$msg}<hr>"; |
336 | 336 | } |
337 | - echo $line . '<br>'; |
|
337 | + echo $line.'<br>'; |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | /*****************************************************************/ |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | echo "<hr>{$msg}<hr>"; |
362 | 362 | } |
363 | 363 | |
364 | - echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>'; |
|
364 | + echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>'; |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | /*****************************************************************/ |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | */ |
476 | 476 | public static function getLighterColor($color, $plancher, $plafond) |
477 | 477 | { |
478 | - require_once __DIR__ . '/colorTools.php'; |
|
478 | + require_once __DIR__.'/colorTools.php'; |
|
479 | 479 | |
480 | 480 | //$ct = new ColorTools(); |
481 | 481 | //return $ct->eclaircir($color,$plancher,$plafond); |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | if (!mkdir($folder) && !is_dir($folder)) { |
498 | 498 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
499 | 499 | } else { |
500 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
500 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
501 | 501 | } |
502 | 502 | } |
503 | 503 | } catch (Exception $e) { |
@@ -535,10 +535,10 @@ discard block |
||
535 | 535 | // @mkdir($dst); |
536 | 536 | while (false !== ($file = readdir($dir))) { |
537 | 537 | if (('.' !== $file) && ('..' !== $file)) { |
538 | - if (is_dir($src . '/' . $file)) { |
|
539 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
538 | + if (is_dir($src.'/'.$file)) { |
|
539 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
540 | 540 | } else { |
541 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
541 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
542 | 542 | } |
543 | 543 | } |
544 | 544 | } |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
566 | 566 | $currArray = explode('.', $currentVer); |
567 | 567 | if (null === $requiredVer) { |
568 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
568 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
569 | 569 | } |
570 | 570 | $reqArray = explode('.', $requiredVer); |
571 | 571 | $success = true; |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | break; |
581 | 581 | } |
582 | 582 | } else { |
583 | - if ((int)$v > 0) { // handles versions like x.x.x.0_RC2 |
|
583 | + if ((int) $v > 0) { // handles versions like x.x.x.0_RC2 |
|
584 | 584 | $success = false; |
585 | 585 | break; |
586 | 586 | } |
@@ -34,9 +34,9 @@ |
||
34 | 34 | if ('add' === $_POST['mode']) { |
35 | 35 | $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
36 | 36 | $eventNotMemberHandler->createEventNotMember([ |
37 | - 'event_id' => (int)$_POST['event'], |
|
38 | - 'uid' => $xoopsUser->getVar('uid'), |
|
39 | - ]); |
|
37 | + 'event_id' => (int)$_POST['event'], |
|
38 | + 'uid' => $xoopsUser->getVar('uid'), |
|
39 | + ]); |
|
40 | 40 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3); |
41 | 41 | $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_ADDED_TO_EVENT; |
42 | 42 |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include __DIR__ . '/../../mainfile.php'; |
|
3 | +include __DIR__.'/../../mainfile.php'; |
|
4 | 4 | |
5 | -require_once __DIR__ . '/include/constantes.php'; |
|
6 | -require_once __DIR__ . '/include/mail_fnc.php'; |
|
7 | -require_once __DIR__ . '/class/utility.php'; |
|
5 | +require_once __DIR__.'/include/constantes.php'; |
|
6 | +require_once __DIR__.'/include/mail_fnc.php'; |
|
7 | +require_once __DIR__.'/class/utility.php'; |
|
8 | 8 | |
9 | 9 | /* |
10 | 10 | ext_echoArray($_POST); |
@@ -21,20 +21,20 @@ discard block |
||
21 | 21 | $member_uid = $xoopsUser->getVar('uid'); |
22 | 22 | |
23 | 23 | if (!$GLOBALS['xoopsSecurity']->check()) { |
24 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
24 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | if ($xoopsUser && $xoopsModuleConfig['whosnot_going']) { |
28 | 28 | // If param are right |
29 | - if ((int)$_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) { |
|
29 | + if ((int) $_POST['event'] > 0 && ('add' === $_POST['mode'] || 'remove' === $_POST['mode'])) { |
|
30 | 30 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
31 | 31 | $eventNotMemberHandler = xoops_getModuleHandler(_EXTCAL_CLS_NOT_MEMBER, _EXTCAL_MODULE); |
32 | 32 | |
33 | 33 | // If the user have to be added |
34 | 34 | if ('add' === $_POST['mode']) { |
35 | - $event = $eventHandler->getEvent((int)$_POST['event'], $xoopsUser); |
|
35 | + $event = $eventHandler->getEvent((int) $_POST['event'], $xoopsUser); |
|
36 | 36 | $eventNotMemberHandler->createEventNotMember([ |
37 | - 'event_id' => (int)$_POST['event'], |
|
37 | + 'event_id' => (int) $_POST['event'], |
|
38 | 38 | 'uid' => $xoopsUser->getVar('uid'), |
39 | 39 | ]); |
40 | 40 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_3, _MD_EXTCAL_MSG_3); |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | // If the user have to be remove |
44 | 44 | } else { |
45 | 45 | if ('remove' === $_POST['mode']) { |
46 | - $eventNotMemberHandler->deleteEventNotMember([(int)$_POST['event'], $xoopsUser->getVar('uid')]); |
|
46 | + $eventNotMemberHandler->deleteEventNotMember([(int) $_POST['event'], $xoopsUser->getVar('uid')]); |
|
47 | 47 | sendMail2member($mode, $event_id, $member_uid, _MD_EXTCAL_SUBJECT_4, _MD_EXTCAL_MSG_4); |
48 | 48 | $rediredtMessage = _MD_EXTCAL_WHOSNOT_GOING_REMOVED_TO_EVENT; |
49 | 49 | } |
50 | 50 | } |
51 | - redirect_header('event.php?event=' . $_POST['event'], 3, $rediredtMessage, false); |
|
51 | + redirect_header('event.php?event='.$_POST['event'], 3, $rediredtMessage, false); |
|
52 | 52 | } else { |
53 | 53 | redirect_header('index.php', 3, _NOPERM, false); |
54 | 54 | } |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | switch ($op) { |
36 | - case 'notification': |
|
37 | - switch ($fct) { |
|
36 | + case 'notification': |
|
37 | + switch ($fct) { |
|
38 | 38 | case 'send': |
39 | 39 | if (!$GLOBALS['xoopsSecurity']->check()) { |
40 | 40 | redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
@@ -130,78 +130,78 @@ discard block |
||
130 | 130 | xoops_cp_footer(); |
131 | 131 | |
132 | 132 | break; |
133 | - } |
|
133 | + } |
|
134 | 134 | break; |
135 | 135 | |
136 | - default: |
|
137 | - case 'default': |
|
138 | - // @author Gregory Mage (Aka Mage) |
|
139 | - //*************************************************************************************** |
|
140 | - xoops_cp_header(); |
|
141 | - // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
142 | - // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
143 | - // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
144 | - $adminObject = \Xmf\Module\Admin::getInstance(); |
|
145 | - $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
146 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green'); |
|
147 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
148 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
149 | - $criteriaCompo = new CriteriaCompo(); |
|
150 | - $criteriaCompo->add(new Criteria('event_approved', 1)); |
|
151 | - $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
152 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green'); |
|
153 | - |
|
154 | - $adminObject->addConfigBoxLine(); |
|
155 | - $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
156 | - $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
157 | - |
|
158 | - //JJD |
|
159 | - // $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
160 | - |
|
161 | - // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
162 | - // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
163 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
164 | - $adminObject->displayIndex(); |
|
165 | - //*************************************************************************************** |
|
166 | - $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
|
167 | - $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
168 | - |
|
169 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
170 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
171 | - // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
|
172 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
173 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
174 | - echo '</fieldset><br>'; |
|
175 | - |
|
176 | - echo '<table class="outer" style="width:100%;">'; |
|
177 | - echo '<tr style="text-align:center;">'; |
|
178 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
179 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
180 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
181 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
182 | - echo '</tr>'; |
|
183 | - |
|
184 | - if (count($pendingEvent) > 0) { |
|
185 | - $i = 0; |
|
186 | - foreach ($pendingEvent as $event) { |
|
187 | - $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
188 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
189 | - echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
190 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
191 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
192 | - echo '<td style="width:10%; text-align:center;">'; |
|
193 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
194 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
195 | - echo '</td>'; |
|
196 | - echo '</tr>'; |
|
136 | + default: |
|
137 | + case 'default': |
|
138 | + // @author Gregory Mage (Aka Mage) |
|
139 | + //*************************************************************************************** |
|
140 | + xoops_cp_header(); |
|
141 | + // require_once XOOPS_ROOT_PATH . "/modules/extcal/class/admin.php"; |
|
142 | + // $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
|
143 | + // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
|
144 | + $adminObject = \Xmf\Module\Admin::getInstance(); |
|
145 | + $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
|
146 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green'); |
|
147 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
148 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
149 | + $criteriaCompo = new CriteriaCompo(); |
|
150 | + $criteriaCompo->add(new Criteria('event_approved', 1)); |
|
151 | + $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
|
152 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green'); |
|
153 | + |
|
154 | + $adminObject->addConfigBoxLine(); |
|
155 | + $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
|
156 | + $adminObject->addConfigBoxLine(_EXTCAL_PEAR_ROOT, 'folder'); |
|
157 | + |
|
158 | + //JJD |
|
159 | + // $adminObject->addConfigBoxLine(XOOPS_ROOT_PATH,'folder'); |
|
160 | + |
|
161 | + // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_PHP, $xoopsModule->getInfo("min_php"), 'php'); |
|
162 | + // $adminObject->addLineConfigLabel(_AM_EXTCAL_CONFIG_XOOPS, $xoopsModule->getInfo("min_xoops"), 'xoops'); |
|
163 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
164 | + $adminObject->displayIndex(); |
|
165 | + //*************************************************************************************** |
|
166 | + $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
|
167 | + $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
|
168 | + |
|
169 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
170 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
171 | + // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
|
172 | + echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
173 | + echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
174 | + echo '</fieldset><br>'; |
|
175 | + |
|
176 | + echo '<table class="outer" style="width:100%;">'; |
|
177 | + echo '<tr style="text-align:center;">'; |
|
178 | + echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
179 | + echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
180 | + echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
181 | + echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
182 | + echo '</tr>'; |
|
183 | + |
|
184 | + if (count($pendingEvent) > 0) { |
|
185 | + $i = 0; |
|
186 | + foreach ($pendingEvent as $event) { |
|
187 | + $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
|
188 | + echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
189 | + echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
190 | + echo '<td>' . $event['event_title'] . '</td>'; |
|
191 | + echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
192 | + echo '<td style="width:10%; text-align:center;">'; |
|
193 | + echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
194 | + echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
195 | + echo '</td>'; |
|
196 | + echo '</tr>'; |
|
197 | + } |
|
198 | + } else { |
|
199 | + echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
197 | 200 | } |
198 | - } else { |
|
199 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
200 | - } |
|
201 | 201 | |
202 | - echo '</table></fieldset><br>'; |
|
202 | + echo '</table></fieldset><br>'; |
|
203 | 203 | |
204 | - require_once __DIR__ . '/admin_footer.php'; |
|
204 | + require_once __DIR__ . '/admin_footer.php'; |
|
205 | 205 | |
206 | - break; |
|
206 | + break; |
|
207 | 207 | } |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
4 | -include __DIR__ . '/../../../class/xoopsformloader.php'; |
|
5 | -require_once __DIR__ . '/admin_header.php'; |
|
3 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
4 | +include __DIR__.'/../../../class/xoopsformloader.php'; |
|
5 | +require_once __DIR__.'/admin_header.php'; |
|
6 | 6 | |
7 | 7 | function extgalleryLastVersion() |
8 | 8 | { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | switch ($fct) { |
38 | 38 | case 'send': |
39 | 39 | if (!$GLOBALS['xoopsSecurity']->check()) { |
40 | - redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
40 | + redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
41 | 41 | } |
42 | 42 | xoops_cp_header(); |
43 | 43 | adminMenu(1); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'EV_TITLE' => $event->getVar('event_title'), |
71 | 71 | 'EV_START' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_start')), |
72 | 72 | 'EV_END' => $extcalTime->getFormatedDate($xoopsModuleConfig['date_long'], $event->getVar('event_end')), |
73 | - 'EV_LINK' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), |
|
73 | + 'EV_LINK' => XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'), |
|
74 | 74 | ]; |
75 | 75 | $xoopsMailer->assign($tag); |
76 | 76 | $xoopsMailer->send(true); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | default: |
86 | 86 | xoops_cp_header(); |
87 | 87 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
88 | - $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> '; |
|
88 | + $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> '; |
|
89 | 89 | $bodyCaption = _AM_EXTCAL_BODY |
90 | 90 | . "<br><br><span style='font-size:x-small;font-weight:bold;'>" |
91 | 91 | . _AM_EXTCAL_USEFUL_TAGS |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | . '<br>' |
109 | 109 | . _AM_EXTCAL_MAILTAGS9 |
110 | 110 | . '</span> '; |
111 | - $toCheckBbox = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
111 | + $toCheckBbox = new XoopsFormCheckBox(_AM_EXTCAL_SEND_TO, 'mail_send_to', 'mail'); |
|
112 | 112 | $toCheckBox->addOption('mail', _AM_EXTCAL_EMAIL); |
113 | 113 | $toCheckBox->addOption('pm', _AM_EXTCAL_PM); |
114 | 114 | |
115 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>'; |
|
116 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
115 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>'; |
|
116 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
117 | 117 | echo _AM_EXTCAL_INFO_SEND_NOTIF; |
118 | 118 | echo '</fieldset><br>'; |
119 | 119 | $form = new XoopsThemeForm(_AM_EXTCAL_SEND_NOTIFICATION, 'mailusers', 'index.php?op=notification&fct=send', 'post', true); |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | // $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
144 | 144 | $adminObject = \Xmf\Module\Admin::getInstance(); |
145 | 145 | $adminObject->addInfoBox(_MI_EXTCAL_DASHBOARD); |
146 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_CATEGORIES . '</infolabel>', $catHandler->getCount(), 'Green'); |
|
147 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_EVENT . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
148 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_PENDING . '</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
146 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_CATEGORIES.'</infolabel>', $catHandler->getCount(), 'Green'); |
|
147 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_EVENT.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 1)), 'Green'); |
|
148 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_PENDING.'</infolabel>', $eventHandler->getCount(new Criteria('event_approved', 0)), 'Red'); |
|
149 | 149 | $criteriaCompo = new CriteriaCompo(); |
150 | 150 | $criteriaCompo->add(new Criteria('event_approved', 1)); |
151 | 151 | $criteriaCompo->add(new Criteria('event_start', time(), '>=')); |
152 | - $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>' . _AM_EXTCAL_INDEX_APPROVED . '</infolabel><infotext>', $eventHandler->getCount($criteriaCompo) . '</infotext>', 'Green'); |
|
152 | + $adminObject->addInfoBoxLine(_MI_EXTCAL_DASHBOARD, '<infolabel>'._AM_EXTCAL_INDEX_APPROVED.'</infolabel><infotext>', $eventHandler->getCount($criteriaCompo).'</infotext>', 'Green'); |
|
153 | 153 | |
154 | 154 | $adminObject->addConfigBoxLine(); |
155 | 155 | $adminObject->addConfigBoxLine(_AM_EXTCAL_PEAR_PATH); |
@@ -166,42 +166,42 @@ discard block |
||
166 | 166 | $pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']); |
167 | 167 | $eventHandler->formatEventsDate($pendingEvent, 'd/m/Y'); |
168 | 168 | |
169 | - echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>'; |
|
170 | - echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>'; |
|
169 | + echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_PENDING_EVENT.'</legend>'; |
|
170 | + echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>'; |
|
171 | 171 | // echo '<img src="../assets/images/icons/on.png" > '._AM_EXTCAL_INFO_APPROVE_PENDING_EVENT.'<br>'; |
172 | - echo '<img src=' . $pathIcon16 . '/edit.png> ' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>'; |
|
173 | - echo '<img src=' . $pathIcon16 . '/delete.png> ' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>'; |
|
172 | + echo '<img src='.$pathIcon16.'/edit.png> '._AM_EXTCAL_INFO_EDIT_PENDING_EVENT.'<br>'; |
|
173 | + echo '<img src='.$pathIcon16.'/delete.png> '._AM_EXTCAL_INFO_DELETE_PENDING_EVENT.'<br>'; |
|
174 | 174 | echo '</fieldset><br>'; |
175 | 175 | |
176 | 176 | echo '<table class="outer" style="width:100%;">'; |
177 | 177 | echo '<tr style="text-align:center;">'; |
178 | - echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>'; |
|
179 | - echo '<th>' . _AM_EXTCAL_TITLE . '</th>'; |
|
180 | - echo '<th>' . _AM_EXTCAL_START_DATE . '</th>'; |
|
181 | - echo '<th>' . _AM_EXTCAL_ACTION . '</th>'; |
|
178 | + echo '<th>'._AM_EXTCAL_CATEGORY.'</th>'; |
|
179 | + echo '<th>'._AM_EXTCAL_TITLE.'</th>'; |
|
180 | + echo '<th>'._AM_EXTCAL_START_DATE.'</th>'; |
|
181 | + echo '<th>'._AM_EXTCAL_ACTION.'</th>'; |
|
182 | 182 | echo '</tr>'; |
183 | 183 | |
184 | 184 | if (count($pendingEvent) > 0) { |
185 | 185 | $i = 0; |
186 | 186 | foreach ($pendingEvent as $event) { |
187 | 187 | $class = (0 == ++$i % 2) ? 'even' : 'odd'; |
188 | - echo '<tr style="text-align:center;" class="' . $class . '">'; |
|
189 | - echo '<td>' . $event['cat']['cat_name'] . '</td>'; |
|
190 | - echo '<td>' . $event['event_title'] . '</td>'; |
|
191 | - echo '<td>' . $event['formated_event_start'] . '</td>'; |
|
188 | + echo '<tr style="text-align:center;" class="'.$class.'">'; |
|
189 | + echo '<td>'.$event['cat']['cat_name'].'</td>'; |
|
190 | + echo '<td>'.$event['event_title'].'</td>'; |
|
191 | + echo '<td>'.$event['formated_event_start'].'</td>'; |
|
192 | 192 | echo '<td style="width:10%; text-align:center;">'; |
193 | - echo '<a href="event.php?op=modify&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a> '; |
|
194 | - echo '<a href="event.php?op=delete&event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>'; |
|
193 | + echo '<a href="event.php?op=modify&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/edit.png></a> '; |
|
194 | + echo '<a href="event.php?op=delete&event_id='.$event['event_id'].'"><img src='.$pathIcon16.'/delete.png></a>'; |
|
195 | 195 | echo '</td>'; |
196 | 196 | echo '</tr>'; |
197 | 197 | } |
198 | 198 | } else { |
199 | - echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>'; |
|
199 | + echo '<tr><td colspan="4">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>'; |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | echo '</table></fieldset><br>'; |
203 | 203 | |
204 | - require_once __DIR__ . '/admin_footer.php'; |
|
204 | + require_once __DIR__.'/admin_footer.php'; |
|
205 | 205 | |
206 | 206 | break; |
207 | 207 | } |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | $step = $_POST['step']; |
6 | 6 | } |
7 | 7 | |
8 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
9 | -include __DIR__ . '/function.php'; |
|
8 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
9 | +include __DIR__.'/function.php'; |
|
10 | 10 | |
11 | 11 | // Change this variable if you use a cloned version of eXtGallery |
12 | 12 | $localModuleDir = 'extcal'; |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | $downloadServer = 'http://downloads.sourceforge.net/zoullou/'; |
17 | 17 | |
18 | 18 | $lastVersion = @file_get_contents($versionFile); |
19 | -$lastVersionString = substr($lastVersion, 0, 1) . '.' . substr($lastVersion, 1, 1) . '.' . substr($lastVersion, 2, 1); |
|
20 | -$moduleFileName = $moduleName . '-' . $lastVersionString . '.tar.gz'; |
|
21 | -$langFileName = $moduleName . '-lang-' . $lastVersionString . '_' . $xoopsConfig['language'] . '.tar.gz'; |
|
19 | +$lastVersionString = substr($lastVersion, 0, 1).'.'.substr($lastVersion, 1, 1).'.'.substr($lastVersion, 2, 1); |
|
20 | +$moduleFileName = $moduleName.'-'.$lastVersionString.'.tar.gz'; |
|
21 | +$langFileName = $moduleName.'-lang-'.$lastVersionString.'_'.$xoopsConfig['language'].'.tar.gz'; |
|
22 | 22 | |
23 | 23 | switch ($step) { |
24 | 24 | case 'download': |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | break; |
31 | 31 | } |
32 | 32 | |
33 | - if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) { |
|
33 | + if (!$handle = @fopen($downloadServer.$moduleFileName, 'r')) { |
|
34 | 34 | printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName); |
35 | 35 | xoops_cp_footer(); |
36 | 36 | break; |
37 | 37 | } |
38 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+'); |
|
38 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, 'w+'); |
|
39 | 39 | |
40 | 40 | // Downlad module archive |
41 | 41 | if ($handle) { |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | |
50 | 50 | // English file are included on module package |
51 | 51 | if ('english' !== $xoopsConfig['language']) { |
52 | - if (!$handle = @fopen($downloadServer . $langFileName, 'r')) { |
|
52 | + if (!$handle = @fopen($downloadServer.$langFileName, 'r')) { |
|
53 | 53 | printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName); |
54 | 54 | } else { |
55 | - $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+'); |
|
55 | + $localHandle = @fopen(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, 'w+'); |
|
56 | 56 | // Download language archive |
57 | 57 | if ($handle) { |
58 | 58 | while (!feof($handle)) { |
@@ -75,35 +75,35 @@ discard block |
||
75 | 75 | xoops_cp_header(); |
76 | 76 | adminMenu(); |
77 | 77 | |
78 | - if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) { |
|
78 | + if (!file_exists(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName)) { |
|
79 | 79 | echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT; |
80 | 80 | xoops_cp_footer(); |
81 | 81 | |
82 | 82 | break; |
83 | 83 | } |
84 | 84 | |
85 | - $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class'; |
|
86 | - include __DIR__ . '/../class/pcltar.lib.php'; |
|
85 | + $gPcltarLibDir = XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/class'; |
|
86 | + include __DIR__.'/../class/pcltar.lib.php'; |
|
87 | 87 | |
88 | 88 | //TrOn(5); |
89 | 89 | |
90 | 90 | // Extract module files |
91 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
91 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
92 | 92 | // Delete downloaded module's files |
93 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName); |
|
93 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$moduleFileName); |
|
94 | 94 | |
95 | - if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) { |
|
95 | + if (file_exists(XOOPS_ROOT_PATH.'/uploads/'.$langFileName)) { |
|
96 | 96 | // Extract language files |
97 | - PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/'); |
|
97 | + PclTarExtract(XOOPS_ROOT_PATH.'/uploads/'.$langFileName, XOOPS_ROOT_PATH.'/modules/'.$localModuleDir.'/', 'modules/'.$moduleName.'/'); |
|
98 | 98 | // Delete downloaded module's files |
99 | - unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName); |
|
99 | + unlink(XOOPS_ROOT_PATH.'/uploads/'.$langFileName); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // Delete template_c file |
103 | - if ($handle = opendir(XOOPS_ROOT_PATH . '/templates_c')) { |
|
103 | + if ($handle = opendir(XOOPS_ROOT_PATH.'/templates_c')) { |
|
104 | 104 | while (false !== ($file = readdir($handle))) { |
105 | 105 | if ('.' !== $file && '..' !== $file && 'index.html' !== $file) { |
106 | - unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file); |
|
106 | + unlink(XOOPS_ROOT_PATH.'/templates_c/'.$file); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | //TrDisplay(); |
113 | 113 | |
114 | - xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
114 | + xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL.'/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE); |
|
115 | 115 | |
116 | 116 | xoops_cp_footer(); |
117 | 117 |