Passed
Push — master ( d2520f...3f8ec2 )
by Michael
02:50
created
class/pear/Calendar/docs/examples/1.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>';
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/6.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 $start = getmicrotime();
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 if (!@include 'Calendar/Calendar.php') {
17 17
     define('CALENDAR_ROOT', '../../');
18 18
 }
19
-require_once CALENDAR_ROOT . 'Month/Weekdays.php';
20
-require_once CALENDAR_ROOT . 'Day.php';
19
+require_once CALENDAR_ROOT.'Month/Weekdays.php';
20
+require_once CALENDAR_ROOT.'Day.php';
21 21
 
22 22
 if (!isset($_GET['y'])) {
23 23
     $_GET['y'] = date('Y');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 <anchor>
49 49
                     Back to Month View
50 50
                     <go href="<?php
51
-                    echo '?y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '&amp;mime=wml'; ?>">
51
+                    echo '?y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'&amp;mime=wml'; ?>">
52 52
                 </anchor>
53 53
             </p>
54 54
             <table>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 $Day->build();
57 57
                 while ($Hour = $Day->fetch()) {
58 58
                     echo "<tr>\n";
59
-                    echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n";
59
+                    echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n";
60 60
                     echo "</tr>\n";
61 61
                 } ?>
62 62
             </table>
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
                     if ($Day->isEmpty()) {
84 84
                         echo "<td></td>\n";
85 85
                     } elseif ($Day->isSelected()) {
86
-                        echo '<td><anchor><strong><u>' . $Day->thisDay() . "</u></strong>\n<go href=\"" . $_SERVER['PHP_SELF'] . '?viewday=true&amp;y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . "&amp;mime=wml\">\n</anchor></td>\n";
86
+                        echo '<td><anchor><strong><u>'.$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay()."&amp;mime=wml\">\n</anchor></td>\n";
87 87
                     } else {
88
-                        echo '<td><anchor>' . $Day->thisDay() . "\n<go href=\"?viewday=true&amp;y=" . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . "&amp;mime=wml\"></anchor></td>\n";
88
+                        echo '<td><anchor>'.$Day->thisDay()."\n<go href=\"?viewday=true&amp;y=".$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay()."&amp;mime=wml\"></anchor></td>\n";
89 89
                     }
90 90
                     if ($Day->isLast()) {
91 91
                         echo "</tr>\n";
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                         <anchor>
97 97
                             &lt;&lt;
98 98
                             <go href="<?php
99
-                            echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->prevMonth() . '&amp;d=' . $Month->thisDay() . '&amp;mime=wml'; ?>">
99
+                            echo '?y='.$Month->thisYear().'&amp;m='.$Month->prevMonth().'&amp;d='.$Month->thisDay().'&amp;mime=wml'; ?>">
100 100
                         </anchor>
101 101
                     </td>
102 102
                     <td></td>
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                         <anchor>
109 109
                             &gt;&gt;
110 110
                             <go href="<?php
111
-                            echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->nextMonth() . '&amp;d=' . $Month->thisDay() . '&amp;mime=wml'; ?>">
111
+                            echo '?y='.$Month->thisYear().'&amp;m='.$Month->nextMonth().'&amp;d='.$Month->thisDay().'&amp;mime=wml'; ?>">
112 112
                         </anchor>
113 113
                     </td>
114 114
                 </tr>
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             <?php
118 118
         } ?>
119 119
         <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to HTML</a></p>
120
-        <?php echo '<p>Took: ' . (getmicrotime() - $start) . ' seconds</p>'; ?>
120
+        <?php echo '<p>Took: '.(getmicrotime() - $start).' seconds</p>'; ?>
121 121
     </wml>
122 122
     <?php
123 123
     #-----------------------------------------------------------------------------#
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
         <p>
142 142
             <anchor>
143 143
                 <a href="<?php
144
-                echo '?y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay(); ?>">Back to Month View</a>
144
+                echo '?y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay(); ?>">Back to Month View</a>
145 145
         </p>
146 146
         <table>
147 147
             <?php
148 148
             $Day->build();
149 149
             while ($Hour = $Day->fetch()) {
150 150
                 echo "<tr>\n";
151
-                echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n";
151
+                echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n";
152 152
                 echo "</tr>\n";
153 153
             } ?>
154 154
         </table>
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
                 if ($Day->isEmpty()) {
176 176
                     echo "<td></td>\n";
177 177
                 } elseif ($Day->isSelected()) {
178
-                    echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&amp;y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '&amp;wml"><strong><u>' . $Day->thisDay() . "</u></strong></a></td>\n";
178
+                    echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'&amp;wml"><strong><u>'.$Day->thisDay()."</u></strong></a></td>\n";
179 179
                 } else {
180
-                    echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&amp;y=' . $Day->thisYear() . '&amp;m=' . $Day->thisMonth() . '&amp;d=' . $Day->thisDay() . '">' . $Day->thisDay() . "</a></td>\n";
180
+                    echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&amp;y='.$Day->thisYear().'&amp;m='.$Day->thisMonth().'&amp;d='.$Day->thisDay().'">'.$Day->thisDay()."</a></td>\n";
181 181
                 }
182 182
                 if ($Day->isLast()) {
183 183
                     echo "</tr>\n";
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             <tr>
187 187
                 <td>
188 188
                     <a href="<?php
189
-                    echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->prevMonth() . '&amp;d=' . $Month->thisDay(); ?>">
189
+                    echo '?y='.$Month->thisYear().'&amp;m='.$Month->prevMonth().'&amp;d='.$Month->thisDay(); ?>">
190 190
                         &lt;&lt;</a>
191 191
                 </td>
192 192
                 <td></td>
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                 <td></td>
197 197
                 <td>
198 198
                     <a href="<?php
199
-                    echo '?y=' . $Month->thisYear() . '&amp;m=' . $Month->nextMonth() . '&amp;d=' . $Month->thisDay(); ?>">&gt;&gt;</a>
199
+                    echo '?y='.$Month->thisYear().'&amp;m='.$Month->nextMonth().'&amp;d='.$Month->thisDay(); ?>">&gt;&gt;</a>
200 200
                 </td>
201 201
             </tr>
202 202
         </table>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         <?php
205 205
     } ?>
206 206
 
207
-    <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?>
207
+    <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?>
208 208
     </body>
209 209
     </html>
210 210
     <?php
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/5.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 {
8 8
     list($usec, $sec) = explode(' ', microtime());
9 9
 
10
-    return (float)$usec + (float)$sec;
10
+    return (float) $usec + (float) $sec;
11 11
 }
12 12
 
13 13
 $start = getmicrotime();
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 if (!@include 'Calendar/Calendar.php') {
16 16
     define('CALENDAR_ROOT', '../../');
17 17
 }
18
-require_once CALENDAR_ROOT . 'Year.php';
19
-require_once CALENDAR_ROOT . 'Month.php';
20
-require_once CALENDAR_ROOT . 'Day.php';
21
-require_once CALENDAR_ROOT . 'Hour.php';
22
-require_once CALENDAR_ROOT . 'Minute.php';
23
-require_once CALENDAR_ROOT . 'Second.php';
18
+require_once CALENDAR_ROOT.'Year.php';
19
+require_once CALENDAR_ROOT.'Month.php';
20
+require_once CALENDAR_ROOT.'Day.php';
21
+require_once CALENDAR_ROOT.'Hour.php';
22
+require_once CALENDAR_ROOT.'Minute.php';
23
+require_once CALENDAR_ROOT.'Second.php';
24 24
 
25 25
 // Initialize if not set
26 26
 if (!isset($_POST['y'])) {
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 if (isset($_POST['update'])) {
54 54
     $Second = new Calendar_Second($_POST['y'], $_POST['m'], $_POST['d'], $_POST['h'], $_POST['i'], $_POST['s']);
55 55
     if (!$Second->isValid()) {
56
-        $V =& $Second->getValidator();
56
+        $V = & $Second->getValidator();
57 57
         echo '<p>Validation failed:</p>';
58 58
         while ($error = $V->fetch()) {
59
-            echo $error->toString() . '<br>';
59
+            echo $error->toString().'<br>';
60 60
         }
61 61
     } else {
62 62
         echo '<p>Validation success.</p>';
63
-        echo '<p>New timestamp is: ' . $Second->getTimestamp() . ' which could be used to update a database, for example';
63
+        echo '<p>New timestamp is: '.$Second->getTimestamp().' which could be used to update a database, for example';
64 64
     }
65 65
 } else {
66 66
 $Year   = new Calendar_Year($_POST['y']);
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
         $Year->build($selection);
79 79
         while ($Child = $Year->fetch()) {
80 80
             if ($Child->isSelected()) {
81
-                echo '<option value="' . $Child->thisMonth() . '" selected>' . $Child->thisMonth() . "\n";
81
+                echo '<option value="'.$Child->thisMonth().'" selected>'.$Child->thisMonth()."\n";
82 82
             } else {
83
-                echo '<option value="' . $Child->thisMonth() . '">' . $Child->thisMonth() . "\n";
83
+                echo '<option value="'.$Child->thisMonth().'">'.$Child->thisMonth()."\n";
84 84
             }
85 85
         } ?>
86 86
     </select>&nbsp;
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
         $Month->build($selection);
91 91
         while ($Child = $Month->fetch()) {
92 92
             if ($Child->isSelected()) {
93
-                echo '<option value="' . $Child->thisDay() . '" selected>' . $Child->thisDay() . "\n";
93
+                echo '<option value="'.$Child->thisDay().'" selected>'.$Child->thisDay()."\n";
94 94
             } else {
95
-                echo '<option value="' . $Child->thisDay() . '">' . $Child->thisDay() . "\n";
95
+                echo '<option value="'.$Child->thisDay().'">'.$Child->thisDay()."\n";
96 96
             }
97 97
         } ?>
98 98
     </select>&nbsp;
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
         $Day->build($selection);
103 103
         while ($Child = $Day->fetch()) {
104 104
             if ($Child->isSelected()) {
105
-                echo '<option value="' . $Child->thisHour() . '" selected>' . $Child->thisHour() . "\n";
105
+                echo '<option value="'.$Child->thisHour().'" selected>'.$Child->thisHour()."\n";
106 106
             } else {
107
-                echo '<option value="' . $Child->thisHour() . '">' . $Child->thisHour() . "\n";
107
+                echo '<option value="'.$Child->thisHour().'">'.$Child->thisHour()."\n";
108 108
             }
109 109
         } ?>
110 110
     </select>&nbsp;
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
         $Hour->build($selection);
115 115
         while ($Child = $Hour->fetch()) {
116 116
             if ($Child->isSelected()) {
117
-                echo '<option value="' . $Child->thisMinute() . '" selected>' . $Child->thisMinute() . "\n";
117
+                echo '<option value="'.$Child->thisMinute().'" selected>'.$Child->thisMinute()."\n";
118 118
             } else {
119
-                echo '<option value="' . $Child->thisMinute() . '">' . $Child->thisMinute() . "\n";
119
+                echo '<option value="'.$Child->thisMinute().'">'.$Child->thisMinute()."\n";
120 120
             }
121 121
         } ?>
122 122
     </select>&nbsp;
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
         $Minute->build($selection);
127 127
         while ($Child = $Minute->fetch()) {
128 128
             if ($Child->isSelected()) {
129
-                echo '<option value="' . $Child->thisSecond() . '" selected>' . $Child->thisSecond() . "\n";
129
+                echo '<option value="'.$Child->thisSecond().'" selected>'.$Child->thisSecond()."\n";
130 130
             } else {
131
-                echo '<option value="' . $Child->thisSecond() . '">' . $Child->thisSecond() . "\n";
131
+                echo '<option value="'.$Child->thisSecond().'">'.$Child->thisSecond()."\n";
132 132
             }
133 133
         } ?>
134 134
     </select>&nbsp;
@@ -136,6 +136,6 @@  discard block
 block discarded – undo
136 136
     <?php
137 137
     }
138 138
     ?>
139
-    <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?>
139
+    <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?>
140 140
 </body>
141 141
 </html>
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/13.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>';
Please login to merge, or discard this patch.
class/pear/Calendar/docs/examples/7.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             'in'  => ['year' => 'int', 'month' => 'int'],
25 25
             'out' => ['month' => '{urn:PEAR_SOAP_Calendar}Month'],
26 26
         ];
27
-        $this->__typedef['Month']         = [
27
+        $this->__typedef['Month'] = [
28 28
             'monthname' => 'string',
29 29
             'days'      => '{urn:PEAR_SOAP_Calendar}MonthDays',
30 30
         ];
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function getMonth($year, $month)
60 60
     {
61
-        require_once CALENDAR_ROOT . 'Month/Weekdays.php';
61
+        require_once CALENDAR_ROOT.'Month/Weekdays.php';
62 62
         $Month = new Calendar_Month_Weekdays($year, $month);
63 63
         if (!$Month->isValid()) {
64 64
             $V        = $Month->getValidator();
65 65
             $errorMsg = '';
66 66
             while ($error = $V->fetch()) {
67
-                $errorMsg .= $error->toString() . "\n";
67
+                $errorMsg .= $error->toString()."\n";
68 68
             }
69 69
 
70 70
             return new Soap_fault($errorMsg, 'Client');
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
             $Month->build();
75 75
             while ($Day = $Month->fetch()) {
76 76
                 $day    = [
77
-                    'isFirst' => (int)$Day->isFirst(),
78
-                    'isLast'  => (int)$Day->isLast(),
79
-                    'isEmpty' => (int)$Day->isEmpty(),
80
-                    'day'     => (int)$Day->thisDay(),
77
+                    'isFirst' => (int) $Day->isFirst(),
78
+                    'isLast'  => (int) $Day->isLast(),
79
+                    'isEmpty' => (int) $Day->isEmpty(),
80
+                    'day'     => (int) $Day->thisDay(),
81 81
                 ];
82 82
                 $days[] = $day;
83 83
             }
Please login to merge, or discard this patch.
blocks/new_events.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-require_once __DIR__ . '/../include/constantes.php';
22
+require_once __DIR__.'/../include/constantes.php';
23 23
 
24 24
 /**
25 25
  * @param $options
@@ -66,22 +66,22 @@  discard block
 block discarded – undo
66 66
 
67 67
     $cats = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view');
68 68
 
69
-    $form = _MB_EXTCAL_DISPLAY . "&nbsp;\n";
70
-    $form .= '<input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text">&nbsp;' . _MB_EXTCAL_EVENT . '<br>';
71
-    $form .= _MB_EXTCAL_TITLE_LENGTH . ' : <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text"><br>';
69
+    $form = _MB_EXTCAL_DISPLAY."&nbsp;\n";
70
+    $form .= '<input name="options[0]" size="5" maxlength="255" value="'.$options[0].'" type="text">&nbsp;'._MB_EXTCAL_EVENT.'<br>';
71
+    $form .= _MB_EXTCAL_TITLE_LENGTH.' : <input name="options[1]" size="5" maxlength="255" value="'.$options[1].'" type="text"><br>';
72 72
     array_shift($options);
73 73
     array_shift($options);
74
-    $form .= _MB_EXTCAL_CAT_TO_USE . '<br><select name="options[]" multiple="multiple" size="5">';
74
+    $form .= _MB_EXTCAL_CAT_TO_USE.'<br><select name="options[]" multiple="multiple" size="5">';
75 75
     if (false === array_search(0, $options)) {
76
-        $form .= '<option value="0">' . _MB_EXTCAL_ALL_CAT . '</option>';
76
+        $form .= '<option value="0">'._MB_EXTCAL_ALL_CAT.'</option>';
77 77
     } else {
78
-        $form .= '<option value="0" selected="selected">' . _MB_EXTCAL_ALL_CAT . '</option>';
78
+        $form .= '<option value="0" selected="selected">'._MB_EXTCAL_ALL_CAT.'</option>';
79 79
     }
80 80
     foreach ($cats as $cat) {
81 81
         if (false === array_search($cat->getVar('cat_id'), $options)) {
82
-            $form .= '<option value="' . $cat->getVar('cat_id') . '">' . $cat->getVar('cat_name') . '</option>';
82
+            $form .= '<option value="'.$cat->getVar('cat_id').'">'.$cat->getVar('cat_name').'</option>';
83 83
         } else {
84
-            $form .= '<option value="' . $cat->getVar('cat_id') . '" selected="selected">' . $cat->getVar('cat_name') . '</option>';
84
+            $form .= '<option value="'.$cat->getVar('cat_id').'" selected="selected">'.$cat->getVar('cat_name').'</option>';
85 85
         }
86 86
     }
87 87
     $form .= '</select>';
Please login to merge, or discard this patch.
admin/cat.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
 use Xmf\Request;
21 21
 use XoopsModules\Extcal;
22 22
 
23
-require_once __DIR__ . '/../../../include/cp_header.php';
24
-include __DIR__ . '/../../../class/xoopsformloader.php';
25
-require_once __DIR__ . '/admin_header.php';
23
+require_once __DIR__.'/../../../include/cp_header.php';
24
+include __DIR__.'/../../../class/xoopsformloader.php';
25
+require_once __DIR__.'/admin_header.php';
26 26
 // require_once __DIR__ . '/../class/Utility.php';
27
-require_once __DIR__ . '/../include/constantes.php';
27
+require_once __DIR__.'/../include/constantes.php';
28 28
 
29 29
 //$gepeto = array_merge($_GET, $_POST);
30 30
 //while (list($key, $value) = each($gepeto)) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, 0), false);
96 96
         $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#FF0000'));
97 97
 
98
-        $file_path = __DIR__ . '/../assets/css/images';
98
+        $file_path = __DIR__.'/../assets/css/images';
99 99
         $tf        = \XoopsLists::getImgListAsArray($file_path);
100 100
         array_unshift($tf, _MD_EXTCAL_NONE);
101 101
         //$xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, "cat_icone", $cat->getVar('cat_icone'), '');
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         $form->display();
109 109
 
110
-        require_once __DIR__ . '/admin_footer.php';
110
+        require_once __DIR__.'/admin_footer.php';
111 111
         break;
112 112
 
113 113
     case 'edit':
@@ -120,15 +120,15 @@  discard block
 block discarded – undo
120 120
             //            $cat = $catHandler->getCat($cat_id, true);
121 121
         }
122 122
 
123
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_EDIT_CATEGORY . '</legend>';
123
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_EDIT_CATEGORY.'</legend>';
124 124
 
125 125
         $form = new \XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true);
126 126
         $form->addElement(new \XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true);
127 127
         $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc')), false);
128 128
         $form->addElement(new \XoopsFormText(_AM_EXTCAL_WEIGHT, 'cat_weight', 30, 5, $cat->getVar('cat_weight')), false);
129
-        $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#' . $cat->getVar('cat_color')));
129
+        $form->addElement(new \XoopsFormColorPicker(_AM_EXTCAL_COLOR, 'cat_color', '#'.$cat->getVar('cat_color')));
130 130
 
131
-        $file_path = __DIR__ . '/../assets/css/images';
131
+        $file_path = __DIR__.'/../assets/css/images';
132 132
         $tf        = \XoopsLists::getImgListAsArray($file_path);
133 133
         array_unshift($tf, _MD_EXTCAL_NONE);
134 134
         $xfIcones = new \XoopsFormSelect(_AM_EXTCAL_ICONE, 'cat_icone', $cat->getVar('cat_icone'), '');
@@ -284,6 +284,6 @@  discard block
 block discarded – undo
284 284
         //$xoopsTpl->assign("module_dirname",    $xoopsModule->getVar("dirname") );
285 285
 
286 286
         $xoopsTpl->display('db:admin/extcal_admin_cat_list.tpl');
287
-        require_once __DIR__ . '/admin_footer.php';
287
+        require_once __DIR__.'/admin_footer.php';
288 288
         break;
289 289
 }
Please login to merge, or discard this patch.
admin/etablissement.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@  discard block
 block discarded – undo
20 20
 use XoopsModules\Extcal;
21 21
 
22 22
 // Include xoops admin header
23
-require_once __DIR__ . '/../../../include/cp_header.php';
23
+require_once __DIR__.'/../../../include/cp_header.php';
24 24
 // require_once __DIR__ . '/../class/ExtcalPersistableObjectHandler.php';
25
-require_once __DIR__ . '/../../../kernel/module.php';
26
-require_once __DIR__ . '/../../../class/xoopsformloader.php';
27
-require_once __DIR__ . '/../../../class/tree.php';
28
-require_once __DIR__ . '/../../../class/xoopslists.php';
29
-require_once __DIR__ . '/../../../class/pagenav.php';
30
-require_once __DIR__ . '/../../../class/xoopsform/grouppermform.php';
31
-require_once __DIR__ . '/../../../class/uploader.php';
25
+require_once __DIR__.'/../../../kernel/module.php';
26
+require_once __DIR__.'/../../../class/xoopsformloader.php';
27
+require_once __DIR__.'/../../../class/tree.php';
28
+require_once __DIR__.'/../../../class/xoopslists.php';
29
+require_once __DIR__.'/../../../class/pagenav.php';
30
+require_once __DIR__.'/../../../class/xoopsform/grouppermform.php';
31
+require_once __DIR__.'/../../../class/uploader.php';
32 32
 // require_once __DIR__ . '/../class/etablissement.php';
33
-require_once __DIR__ . '/../include/constantes.php';
33
+require_once __DIR__.'/../include/constantes.php';
34 34
 
35
-require_once __DIR__ . '/admin_header.php';
35
+require_once __DIR__.'/admin_header.php';
36 36
 
37 37
 //include_once("functions.php");
38 38
 //include_once("../include/functions.php");
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 if ($xoopsUser) {
41 41
     $xoopsModule = \XoopsModule::getByDirname('extcal');
42 42
     if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
43
-        redirect_header(XOOPS_URL . '/', 3, _NOPERM);
43
+        redirect_header(XOOPS_URL.'/', 3, _NOPERM);
44 44
     }
45 45
 } else {
46
-    redirect_header(XOOPS_URL . '/', 3, _NOPERM);
46
+    redirect_header(XOOPS_URL.'/', 3, _NOPERM);
47 47
 }
48 48
 
49 49
 // Include language file
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $etablissement_arr = $etablissementHandler->getObjects($criteria);
101 101
         $numrows           = $etablissementHandler->getCount($criteria);
102 102
         if ($numrows > $limit) {
103
-            $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit);
103
+            $pagenav = new \XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit='.$limit);
104 104
             $pagenav = $pagenav->renderNav(4);
105 105
         } else {
106 106
             $pagenav = '';
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
         if ($numrows > 0) {
110 110
             echo '<table width="100%" cellspacing="1" class="outer">';
111 111
             echo '<tr>';
112
-            echo '<th align="center">' . _AM_EXTCAL_ETABLISSEMENT_FORM_NOM . '</th>';
113
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE . '</th>';
114
-            echo '<th align="center" width="20%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_CITY . '</th>';
115
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE . '</th>';
116
-            echo '<th align="center" width="15%">' . _AM_EXTCAL_ETABLISSEMENT_FORM_ACTION . '</th>';
112
+            echo '<th align="center">'._AM_EXTCAL_ETABLISSEMENT_FORM_NOM.'</th>';
113
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ADRESSE.'</th>';
114
+            echo '<th align="center" width="20%">'._AM_EXTCAL_ETABLISSEMENT_FORM_CITY.'</th>';
115
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_TELEPHONE.'</th>';
116
+            echo '<th align="center" width="15%">'._AM_EXTCAL_ETABLISSEMENT_FORM_ACTION.'</th>';
117 117
             echo '</tr>';
118 118
             $class = 'odd';
119 119
             foreach (array_keys($etablissement_arr) as $i) {
@@ -123,21 +123,21 @@  discard block
 block discarded – undo
123 123
                 $etablissement_adresse   = $etablissement_arr[$i]->getVar('adresse');
124 124
                 $etablissement_city      = $etablissement_arr[$i]->getVar('ville');
125 125
                 $etablissement_telephone = $etablissement_arr[$i]->getVar('tel_fixe');
126
-                echo '<tr class="' . $class . '">';
127
-                echo '<td align="left">' . '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '">' . $etablissement_nom . '</a>' . '</td>';
126
+                echo '<tr class="'.$class.'">';
127
+                echo '<td align="left">'.'<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'">'.$etablissement_nom.'</a>'.'</td>';
128 128
 
129
-                echo '<td align="center"><b>' . $etablissement_adresse . '</td>';
130
-                echo '<td align="center"><b>' . $etablissement_city . '</td>';
131
-                echo '<td align="center"><b>' . $etablissement_telephone . '</td>';
129
+                echo '<td align="center"><b>'.$etablissement_adresse.'</td>';
130
+                echo '<td align="center"><b>'.$etablissement_city.'</td>';
131
+                echo '<td align="center"><b>'.$etablissement_telephone.'</td>';
132 132
                 echo '<td align="center" width="15%">';
133
-                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/edit.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_EDIT . '"></a> ';
134
-                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id=' . $etablissement_id . '"><img src=' . $pathIcon16 . '/delete.png alt="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '" title="' . _AM_EXTCAL_ETABLISSEMENT_FORM_DELETE . '"></a> ';
133
+                echo '<a href="etablissement.php?op=edit_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/edit.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_EDIT.'"></a> ';
134
+                echo '<a href="etablissement.php?op=delete_etablissement&etablissement_id='.$etablissement_id.'"><img src='.$pathIcon16.'/delete.png alt="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'" title="'._AM_EXTCAL_ETABLISSEMENT_FORM_DELETE.'"></a> ';
135 135
                 echo '</td>';
136 136
             }
137 137
             echo '</table><br>';
138
-            echo '<br><div align=right>' . $pagenav . '</div><br>';
138
+            echo '<br><div align=right>'.$pagenav.'</div><br>';
139 139
         } else {
140
-            echo '<div class="errorMsg" style="text-align: center;">' . _AM_EXTCAL_ERREUR_NO_ETABLISSEMENT . '</div>';
140
+            echo '<div class="errorMsg" style="text-align: center;">'._AM_EXTCAL_ERREUR_NO_ETABLISSEMENT.'</div>';
141 141
         }
142 142
 
143 143
         // Affichage du formulaire
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                               'ok'               => 1,
161 161
                               'etablissement_id' => $_REQUEST['etablissement_id'],
162 162
                               'op'               => 'delete_etablissement',
163
-                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL . '<br>');
163
+                          ], $_SERVER['REQUEST_URI'], _AM_EXTCAL_ETABLISSEMENT_SURDEL.'<br>');
164 164
         }
165 165
         break;
166 166
 
@@ -202,11 +202,11 @@  discard block
 block discarded – undo
202 202
         $obj->setVar('map', $_REQUEST['map']);
203 203
 
204 204
         //Logo
205
-        $uploaddir_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/';
206
-        $uploadurl_etablissement = XOOPS_URL . '/uploads/extcal/etablissement/';
205
+        $uploaddir_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/';
206
+        $uploadurl_etablissement = XOOPS_URL.'/uploads/extcal/etablissement/';
207 207
 
208 208
         $delimg = @$_REQUEST['delimg'];
209
-        $delimg = isset($delimg) ? (int)$delimg : 0;
209
+        $delimg = isset($delimg) ? (int) $delimg : 0;
210 210
         if (0 == $delimg && !empty($_REQUEST['xoops_upload_file'][0])) {
211 211
             $upload = new \XoopsMediaUploader($uploaddir_etablissement, [
212 212
                 'image/gif',
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             }
230 230
         } else {
231 231
             $logo              = '';
232
-            $url_etablissement = XOOPS_ROOT_PATH . '/uploads/extcal/etablissement/' . $_REQUEST['file'];
232
+            $url_etablissement = XOOPS_ROOT_PATH.'/uploads/extcal/etablissement/'.$_REQUEST['file'];
233 233
             if (is_file($url_etablissement)) {
234 234
                 chmod($url_etablissement, 0777);
235 235
                 unlink($url_etablissement);
@@ -249,4 +249,4 @@  discard block
 block discarded – undo
249 249
         break;
250 250
 }
251 251
 
252
-require_once __DIR__ . '/admin_footer.php';
252
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/event.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Extcal;
21 21
 
22
-require_once __DIR__ . '/../../../include/cp_header.php';
23
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
24
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
22
+require_once __DIR__.'/../../../include/cp_header.php';
23
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
24
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
25 25
 // require_once __DIR__ . '/../class/form/extcalform.php';
26
-require_once __DIR__ . '/admin_header.php';
26
+require_once __DIR__.'/admin_header.php';
27 27
 // require_once __DIR__ . '/../class/Utility.php';
28 28
 
29 29
 $gepeto = array_merge($_GET, $_POST);
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
     //    while (list($k, $t) = each($rst)) {
53 53
     foreach ($rst as $k => $t) {
54 54
         if ('' != $t['event_picture1']) {
55
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
55
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
56 56
             unlink($f);
57
-            echo $f . '<br>';
57
+            echo $f.'<br>';
58 58
         }
59 59
 
60 60
         if ('' != $t['event_picture2']) {
61
-            $f = XOOPS_ROOT_PATH . '/uploads/extcal/' . $t['event_picture1'];
61
+            $f = XOOPS_ROOT_PATH.'/uploads/extcal/'.$t['event_picture1'];
62 62
             unlink($f);
63
-            echo $f . '<br>';
63
+            echo $f.'<br>';
64 64
         }
65 65
     }
66 66
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             if (!$eventHandler->modifyEvent($_POST['event_id'], $data)) {
123 123
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDIT_FAILED, false);
124 124
             } else {
125
-                $fileHandler->createFile((int)$_POST['event_id']);
125
+                $fileHandler->createFile((int) $_POST['event_id']);
126 126
                 redirect_header('event.php', 3, _AM_EXTCAL_EVENT_EDITED, false);
127 127
             }
128 128
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $eventId      = $_GET['event_id'];
195 195
         $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT);
196 196
 
197
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_EDIT_EVENT . '</legend>';
197
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_EDIT_EVENT.'</legend>';
198 198
 
199 199
         if ($form = $eventHandler->getEventForm('admin', $action, ['event_id' => $eventId])) {
200 200
             $form->display();
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
             $data[$key] = $val['value'];
220 220
         }
221 221
 
222
-        $data['event_id']    = 0;
223
-        $data['event_title'] .= ' (' . _AM_EXTCAL_CLONE_OF . $eventId . ')';
222
+        $data['event_id'] = 0;
223
+        $data['event_title'] .= ' ('._AM_EXTCAL_CLONE_OF.$eventId.')';
224 224
 
225 225
         $newEvent = $eventHandler->create();
226 226
         $newEvent->setVars($data);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
         if (isset($_POST['confirm'])) {
238 238
             if (!$GLOBALS['xoopsSecurity']->check()) {
239
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
239
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
240 240
             }
241 241
             //             $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE);
242 242
             //             $eventHandler->deleteEvent($_POST['event_id']);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         if (isset($_POST['deleteSelection'][0])) {
302 302
         } else {
303 303
             if (!$GLOBALS['xoopsSecurity']->check()) {
304
-                redirect_header('index.php', 3, _NOPERM . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
304
+                redirect_header('index.php', 3, _NOPERM.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
305 305
             }
306 306
 
307 307
             deleteEvents($_POST['event_ids']);
@@ -333,32 +333,32 @@  discard block
 block discarded – undo
333 333
         $events       = $eventHandler->objectToArray($eventHandler->getNewEvent($start, $nbEventsByPage, 0, true), ['cat_id']);
334 334
         $eventHandler->formatEventsDate($events, _SHORTDATESTRING);
335 335
 
336
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_APPROVED_EVENT . '</legend>';
337
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
336
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._AM_EXTCAL_APPROVED_EVENT.'</legend>';
337
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._AM_EXTCAL_INFORMATION.'</legend>';
338 338
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/edit.png' .' '.'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
339 339
         //echo'<img src='. XOOPS_URL .'/'. $moduleInfo->getInfo('dirmoduleadmin').'/assets/images/action/delete.png'. ' '."style=vertical-align:middle;>&nbsp;&nbsp;". _AM_EXTCAL_INFO_DELETE;
340 340
 
341
-        echo '<img src=' . $pathIcon16 . '/edit.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT . '<br>';
342
-        echo '<img src=' . $pathIcon16 . '/delete.png' . ' ' . 'style=vertical-align:middle;>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE . '<br>';
341
+        echo '<img src='.$pathIcon16.'/edit.png'.' '.'style=vertical-align:middle;>&nbsp;&nbsp;'._AM_EXTCAL_INFO_EDIT.'<br>';
342
+        echo '<img src='.$pathIcon16.'/delete.png'.' '.'style=vertical-align:middle;>&nbsp;&nbsp;'._AM_EXTCAL_INFO_DELETE.'<br>';
343 343
 
344 344
         echo '</fieldset><br>';
345 345
 
346
-        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _MD_EXTCAL_SUBMITED_EVENT . '</legend>';
346
+        echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">'._MD_EXTCAL_SUBMITED_EVENT.'</legend>';
347 347
 
348 348
         echo '<form method="POST" action="event.php">';
349 349
         echo '<input type="hidden" name="op" value="deleteSelection">';
350 350
 
351 351
         echo '<table class="outer" style="width:100%;">';
352 352
         echo '<tr style="text-align:center;">';
353
-        echo '<th>' . _AM_EXTCAL_DELETE . '</th>';
353
+        echo '<th>'._AM_EXTCAL_DELETE.'</th>';
354 354
         echo '<th>#</th>';
355
-        echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
356
-        echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
357
-        echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
358
-        echo '<th>' . _AM_EXTCAL_END_DATE . '</th>';
359
-        echo '<th>' . _AM_EXTCAL_RECURRENT . '</th>';
360
-        echo '<th>' . _AM_EXTCAL_START_RULES . '</th>';
361
-        echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
355
+        echo '<th>'._AM_EXTCAL_CATEGORY.'</th>';
356
+        echo '<th>'._AM_EXTCAL_TITLE.'</th>';
357
+        echo '<th>'._AM_EXTCAL_START_DATE.'</th>';
358
+        echo '<th>'._AM_EXTCAL_END_DATE.'</th>';
359
+        echo '<th>'._AM_EXTCAL_RECURRENT.'</th>';
360
+        echo '<th>'._AM_EXTCAL_START_RULES.'</th>';
361
+        echo '<th>'._AM_EXTCAL_ACTION.'</th>';
362 362
 
363 363
         echo '</tr>';
364 364
 
@@ -366,15 +366,15 @@  discard block
 block discarded – undo
366 366
             $i = 0;
367 367
             foreach ($events as $event) {
368 368
                 $class = (0 == ++$i % 2) ? 'even' : 'odd';
369
-                echo '<tr style="text-align:left;" class="' . $class . '">';
369
+                echo '<tr style="text-align:left;" class="'.$class.'">';
370 370
                 echo "<td width='10%' align='center'>";
371 371
                 echo "<input type='checkbox' name='deleteEvents[{$event['event_id']}]' value='1' >";
372 372
                 echo "<input type='hidden' name='deleteAllEvents[{$event['event_id']}]' value='1'>";
373 373
                 echo '</td>';
374
-                echo "<td align = 'center' width='5%'>" . $event['event_id'] . '</td>';
375
-                echo "<td  width='10%'>" . '<a href=cat.php?op=modify&amp;cat_id=' . $event['Category']['cat_id'] . '&form_modify' . '>' . $event['Category']['cat_name'] . '</a>' . '</td>';
374
+                echo "<td align = 'center' width='5%'>".$event['event_id'].'</td>';
375
+                echo "<td  width='10%'>".'<a href=cat.php?op=modify&amp;cat_id='.$event['Category']['cat_id'].'&form_modify'.'>'.$event['Category']['cat_name'].'</a>'.'</td>';
376 376
 
377
-                echo '<td>' . '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . '>' . $event['event_title'] . '</a>' . '</td>';
377
+                echo '<td>'.'<a href=event.php?op=modify&amp;event_id='.$event['event_id'].'>'.$event['event_title'].'</a>'.'</td>';
378 378
 
379 379
                 //                 if ($event['event_isrecur']) {
380 380
                 //                     echo '<td>' . $event['formated_reccur_rule'] . '</td>';
@@ -382,18 +382,18 @@  discard block
 block discarded – undo
382 382
                 //                     echo '<td>' . $event['formated_event_start'] . '</td>';
383 383
                 //                 }
384 384
 
385
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_start'] . '</td>';
386
-                echo "<td align = 'center' width='10%'>" . $event['formated_event_end'] . '</td>';
387
-                echo '<td align="center">' . ((1 == $event['event_isrecur']) ? _YES : _NO) . '</td>';
385
+                echo "<td align = 'center' width='10%'>".$event['formated_event_start'].'</td>';
386
+                echo "<td align = 'center' width='10%'>".$event['formated_event_end'].'</td>';
387
+                echo '<td align="center">'.((1 == $event['event_isrecur']) ? _YES : _NO).'</td>';
388 388
                 if (!isset($event['formated_reccur_rule'])) {
389 389
                     $event['formated_reccur_rule'] = '';
390 390
                 }
391
-                echo '<td>' . $event['formated_reccur_rule'] . '</td>';
391
+                echo '<td>'.$event['formated_reccur_rule'].'</td>';
392 392
 
393 393
                 echo '<td style="width:10%; text-align:center;">';
394
-                echo '<a href=event.php?op=modify&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/edit.png' title='" . _AM_EXTCAL_ICONE_EDIT . "'></a>&nbsp;&nbsp;";
395
-                echo '<a href=event.php?op=delete&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/delete.png' title='" . _AM_EXTCAL_ICONE_DELETE . "'></a>&nbsp;&nbsp;";
396
-                echo '<a href=event.php?op=clone&amp;event_id=' . $event['event_id'] . "><img src='" . $pathIcon16 . "/editcopy.png' title='" . _AM_EXTCAL_ICONE_CLONE . "'></a>";
394
+                echo '<a href=event.php?op=modify&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/edit.png' title='"._AM_EXTCAL_ICONE_EDIT."'></a>&nbsp;&nbsp;";
395
+                echo '<a href=event.php?op=delete&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/delete.png' title='"._AM_EXTCAL_ICONE_DELETE."'></a>&nbsp;&nbsp;";
396
+                echo '<a href=event.php?op=clone&amp;event_id='.$event['event_id']."><img src='".$pathIcon16."/editcopy.png' title='"._AM_EXTCAL_ICONE_CLONE."'></a>";
397 397
                 echo '</td>';
398 398
 
399 399
                 echo '</tr>';
@@ -407,13 +407,13 @@  discard block
 block discarded – undo
407 407
 
408 408
             echo '<td colspan="2" style="text-align: right;">';
409 409
 
410
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_ALL . '" name="deleteSelection[0]">';
411
-            echo '<input type="submit" value="' . _AM_EXTCAL_DELETE_SELECTION . '" name="deleteSelection[1]">';
410
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_ALL.'" name="deleteSelection[0]">';
411
+            echo '<input type="submit" value="'._AM_EXTCAL_DELETE_SELECTION.'" name="deleteSelection[1]">';
412 412
 
413 413
             echo '</td>';
414 414
             echo '</tr>';
415 415
         } else {
416
-            echo '<tr><td colspan="5">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
416
+            echo '<tr><td colspan="5">'._AM_EXTCAL_NO_PENDING_EVENT.'</td></tr>';
417 417
         }
418 418
         echo '</table>';
419 419
         echo '</form>';
@@ -421,14 +421,14 @@  discard block
 block discarded – undo
421 421
         echo '</fieldset>';
422 422
         echo '</fieldset><br><br>';
423 423
         //Fin de la liste des evennement -------------------------------------
424
-        echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _MD_EXTCAL_SUBMIT_EVENT . '</legend>';
424
+        echo '<fieldset><legend style="font-weight:bold; color:#990000;">'._MD_EXTCAL_SUBMIT_EVENT.'</legend>';
425 425
 
426 426
         $form = $eventHandler->getEventForm('admin');
427 427
         $form->display();
428 428
 
429 429
         echo '</fieldset>';
430 430
 
431
-        require_once __DIR__ . '/admin_footer.php';
431
+        require_once __DIR__.'/admin_footer.php';
432 432
 
433 433
         break;
434 434
 }
Please login to merge, or discard this patch.