Completed
Pull Request — master (#64)
by Christopher
08:34
created
public/old/tableView.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 									 FROM eventTypes et
112 112
 									 WHERE id IN (SELECT e.type
113 113
 										 						FROM events e
114
-																WHERE '.$whereTwoMonth.'
114
+																WHERE '.$whereTwoMonth . '
115 115
 																AND e.removed = 0)
116 116
 									 ORDER BY name';
117 117
         $result = mysqli_query(db(), $filter_sql) or die(mysqli_error(db()));
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 <tr>
133 133
 	<td ><strong>Event</strong></td>
134 134
 	<?php
135
-    $sql = 'SELECT * FROM groups g ORDER BY '.$group_sorting_name;
135
+    $sql = 'SELECT * FROM groups g ORDER BY ' . $group_sorting_name;
136 136
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
137 137
 
138 138
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
     if ($filter == '') {
164 164
         $sql .= '
165
-							AND '.$whereTwoMonth.'
165
+							AND '.$whereTwoMonth . '
166 166
 						ORDER BY
167 167
 							e.date';
168 168
     } elseif ($filter == 'all') {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     } elseif ($filter != '') {
173 173
         $sql .= "
174 174
 							AND e.type = '$filter'
175
-							AND ".$whereTwoMonth.'
175
+							AND " . $whereTwoMonth . '
176 176
 						ORDER BY
177 177
 							e.date';
178 178
     }
@@ -186,31 +186,31 @@  discard block
 block discarded – undo
186 186
         echo '<tr>';
187 187
         echo '<td >';
188 188
         setlocale(LC_TIME, $lang_locale); //de_DE
189
-        echo '<a href="event.php?id='.$row['id'].'">';
189
+        echo '<a href="event.php?id=' . $row['id'] . '">';
190 190
         echo strftime($time_format_short, strtotime($row['sundayDate'])); // %a, <strong>%e. %b</strong>, KW%V
191 191
         echo '</a>';
192 192
 
193 193
         //$row['sundayDate']
194 194
         if (!empty($row['eventType'])) {
195
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventType'].'</em>';
195
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventType'] . '</em>';
196 196
         }
197 197
         if (!empty($row['eventSubType'])) {
198
-            echo ' - <em>'.$row['eventSubType'].'</em>';
198
+            echo ' - <em>' . $row['eventSubType'] . '</em>';
199 199
         }
200 200
         if (!empty($row['eventLocation'])) {
201
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventLocation'].'</em>';
201
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventLocation'] . '</em>';
202 202
         }
203 203
         if (!empty($row['name'])) {
204
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['name'].'</em>';
204
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['name'] . '</em>';
205 205
         }
206 206
         if (!empty($row['eventGroup'])) {
207
-            echo '<br /><strong>&nbsp;&nbsp;&nbsp;'.$row['eventGroup'].'</strong>';
207
+            echo '<br /><strong>&nbsp;&nbsp;&nbsp;' . $row['eventGroup'] . '</strong>';
208 208
         }
209 209
         if (!empty($row['sermonTitle'])) {
210
-            echo ': '.$row['sermonTitle'];
210
+            echo ': ' . $row['sermonTitle'];
211 211
         }
212 212
         if (!empty($row['bibleVerse'])) {
213
-            echo ' <em>('.$row['bibleVerse'].')</em>';
213
+            echo ' <em>(' . $row['bibleVerse'] . ')</em>';
214 214
         }
215 215
         echo '</td>';
216 216
 
@@ -242,16 +242,16 @@  discard block
 block discarded – undo
242 242
                     if ($previousName == '') {
243 243
                         // new name
244 244
                         echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
245
-                        echo $name.' <em>('.$viewPeople['role'];
245
+                        echo $name . ' <em>(' . $viewPeople['role'];
246 246
                     } elseif ($previousName != $name) {
247 247
                         echo ')</em>';
248 248
                         echo ($viewPeople['userId'] != $sessionUserId) ? '</strong>' : '';
249 249
                         echo '<br />'; // line break from previous name
250 250
                         // new name
251 251
                         echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
252
-                        echo $name.' <em>('.$viewPeople['role'];
252
+                        echo $name . ' <em>(' . $viewPeople['role'];
253 253
                     } else {
254
-                        echo ', '.$viewPeople['role'];
254
+                        echo ', ' . $viewPeople['role'];
255 255
                     }
256 256
 
257 257
                     $peopleInEvent = true;
Please login to merge, or discard this patch.
public/old/locations.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $sql = "UPDATE locations SET name = '$name' WHERE id = '$editid'";
40 40
         }
41 41
         if (!mysqli_query(db(), $sql)) {
42
-            die('Error: '.mysqli_error(db()));
42
+            die('Error: ' . mysqli_error(db()));
43 43
         }
44 44
     } else {
45 45
         $newlocation = $_POST['newlocation'];
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         $sql = ("INSERT INTO locations (name) VALUES ('$newlocation')");
52 52
         if (!mysqli_query(db(), $sql)) {
53
-            die('Error: '.mysqli_error(db()));
53
+            die('Error: ' . mysqli_error(db()));
54 54
         }
55 55
 
56 56
         // After we have inserted the data, we want to head back to the main users page
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 
96 96
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
97 97
         $locationID = $row['id'];
98
-        echo "<span id='".$locationID."' class='edit'>".$row['name'].'</span> ';
99
-        echo " <a href='locations.php?locationremove=true&locationID=".$locationID."'><i class='fa fa-close'></i></a><br />";
98
+        echo "<span id='" . $locationID . "' class='edit'>" . $row['name'] . '</span> ';
99
+        echo " <a href='locations.php?locationremove=true&locationID=" . $locationID . "'><i class='fa fa-close'></i></a><br />";
100 100
     } ?>
101 101
  </div><!-- /.box-body -->
102 102
 </div><!-- /.box -->
Please login to merge, or discard this patch.
public/old/events.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 } else {
49 49
     $urlFilters = '';
50 50
     if (isset($_SESSION['lastEventsFilter'])) {
51
-        $urlFilters = '&filter='.$_SESSION['lastEventsFilter'];
51
+        $urlFilters = '&filter=' . $_SESSION['lastEventsFilter'];
52 52
     }
53
-    header('Location: events.php?view=all'.$urlFilters);
53
+    header('Location: events.php?view=all' . $urlFilters);
54 54
     exit;
55 55
 }
56 56
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         session_destroy();
71 71
         header('Location: login.php');
72 72
     } else {
73
-        header('Location: events.php?view='.$sessionUserID);
73
+        header('Location: events.php?view=' . $sessionUserID);
74 74
         exit;
75 75
     }
76 76
 }
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
     if ($editskillID != '') {
109 109
         $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')");
110 110
         if (!mysqli_query(db(), $sql)) {
111
-            die('Error: '.mysqli_error(db()));
111
+            die('Error: ' . mysqli_error(db()));
112 112
         }
113 113
 
114 114
         // After we have inserted the data, we want to head back to the main page
115
-        header('Location: index.php#section'.$editeventID);
115
+        header('Location: index.php#section' . $editeventID);
116 116
         exit;
117 117
     }
118 118
 
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
 
126 126
             $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')");
127 127
             if (!mysqli_query(db(), $sql)) {
128
-                die('Error: '.mysqli_error(db()));
128
+                die('Error: ' . mysqli_error(db()));
129 129
             }
130 130
         }
131 131
 
132 132
         // After we have inserted the data, we want to head back to the main page
133
-        header('Location: index.php#section'.$editeventID);
133
+        header('Location: index.php#section' . $editeventID);
134 134
         exit;
135 135
     }
136 136
 }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     $result = mysqli_query(db(), $mysqli_query) or die(mysqli_error(db()));
177 177
                     $row = mysqli_fetch_object($result);
178 178
 
179
-                    echo $row->name.'s';
179
+                    echo $row->name . 's';
180 180
                 } elseif ($_SESSION['onlyShowUserEvents'] == '1') {
181 181
                     echo 'My Events';
182 182
                 } else {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 			<?php if (!empty($pendingSwaps) && $pendingSwaps > 0):
204 204
                 if ($pendingSwaps > 1) {
205
-                    $swapsMessage = $pendingSwaps.' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.';
205
+                    $swapsMessage = $pendingSwaps . ' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.';
206 206
                 } else {
207 207
                     $swapsMessage = 'A swap is pending approval. An email has been sent to the person covering to approve the swap.';
208 208
                 } ?>
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 							WHERE e.type = '$filter'
269 269
 							AND e.date >= DATE(NOW())
270 270
 							AND e.removed = 0
271
-							ORDER BY ".$dateOrderBy;
271
+							ORDER BY " . $dateOrderBy;
272 272
     } else {
273 273
         $sql = "SELECT
274 274
 							DISTINCT e.id AS id,
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 							WHERE e.date >= DATE(NOW())
296 296
 							AND ur.userId = '$view'
297 297
 							AND e.removed = 0
298
-							ORDER BY ".$dateOrderBy;
298
+							ORDER BY " . $dateOrderBy;
299 299
     }
300 300
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
301 301
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $newMonth = strftime('%B %Y', strtotime($row->sundayDate));
314 314
         if ($month != $newMonth) {
315 315
             $month = $newMonth;
316
-            echo '<li class="time-label"><span class="bg-green">'.$month.'</span></li>';
316
+            echo '<li class="time-label"><span class="bg-green">' . $month . '</span></li>';
317 317
         }
318 318
 
319 319
         // Event details?>
@@ -327,9 +327,9 @@  discard block
 block discarded – undo
327 327
 						<h4><?php
328 328
                             echo date('jS: ', strtotime($row->sundayDate));
329 329
         if ($eventName != '') {
330
-            echo '<strong>'.$eventName.'</strong><br />'.$subType.' - <em>'.$type.'</em>';
330
+            echo '<strong>' . $eventName . '</strong><br />' . $subType . ' - <em>' . $type . '</em>';
331 331
         } else {
332
-            echo $subType.' - <em>'.$type.'</em>';
332
+            echo $subType . ' - <em>' . $type . '</em>';
333 333
         } ?>
334 334
 						</h4>
335 335
 					</a>
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 				<?php //<p><strong>Rehearsal:</strong> <?php
342 342
                 //echo ($row->rehearsalDateFormatted = "0000-00-00 00:00:00") ? "none" : strftime(siteSettings()->time_format_normal,strtotime($row->rehearsalDateFormatted));</p>?>
343 343
 
344
-				<p><strong><?php echo $row->eventGroup ? $row->eventGroup.': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '('.$row->bibleVerse.')' : '' ?></p>
344
+				<p><strong><?php echo $row->eventGroup ? $row->eventGroup . ': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '(' . $row->bibleVerse . ')' : '' ?></p>
345 345
 
346 346
 				<p><strong>Location:</strong> <?php echo $row->eventLocation; ?></p>
347 347
 
@@ -407,16 +407,16 @@  discard block
 block discarded – undo
407 407
                                 } else {
408 408
                                     echo '</ul>';
409 409
                                 }
410
-                                echo '<p><strong>'.$groupName.'</strong></p>';
410
+                                echo '<p><strong>' . $groupName . '</strong></p>';
411 411
                                 echo '<ul>';
412 412
                             }
413 413
 
414 414
                             echo '<li>';
415
-                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : '';
415
+                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : '';
416 416
                             echo $viewPeople->name;
417 417
 
418 418
                             if ($viewPeople->rolename != '') {
419
-                                echo ' - <em>'.$viewPeople->rolename.'</em>';
419
+                                echo ' - <em>' . $viewPeople->rolename . '</em>';
420 420
                             } else {
421 421
                                 // If there is no skill, we don't need to mention this.
422 422
                             }
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
 
443 443
 				<?php
444 444
                 if (isAdmin() || $userisBandAdmin || $userisEventEditor) {
445
-                    echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=".$eventID."'><i class='fa fa-pencil'></i><span> &nbsp;Edit</span></a> "; /* Edit event */
446
-                    echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=".$eventID."'><i class='fa fa-pencil'></i><span> &nbsp;Copy</span></a> "; /* Edit event */
447
-                    echo " <a class ='btn btn-primary' href='emailEvent.php?event=".$eventID."'><i class='fa fa-envelope-o'></i><span> &nbsp;Send email</span></a> "; /* Send email */
445
+                    echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> &nbsp;Edit</span></a> "; /* Edit event */
446
+                    echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> &nbsp;Copy</span></a> "; /* Edit event */
447
+                    echo " <a class ='btn btn-primary' href='emailEvent.php?event=" . $eventID . "'><i class='fa fa-envelope-o'></i><span> &nbsp;Send email</span></a> "; /* Send email */
448 448
                 }
449 449
         if (isAdmin()) {
450 450
             //echo "<a class='btn btn-primary' href='index.php?notifyEveryone=true&eventID=$eventID'><i class='fa fa-envelope-o'></i><span> &nbsp;Send email</span></a> "; /* Send email */
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 
454 454
             echo "<ul class='dropdown-menu'>";
455 455
 
456
-            echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */
456
+            echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */
457 457
 
458 458
             echo '</ul>';
459 459
         } ?>
Please login to merge, or discard this patch.
public/old/roles.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 if ($role && $assignTo) {
35 35
     $sql = "UPDATE roles r SET r.groupId = '$assignTo' WHERE r.id = '$role'";
36 36
     if (!mysqli_query(db(), $sql)) {
37
-        die('Error: '.mysqli_error(db()));
37
+        die('Error: ' . mysqli_error(db()));
38 38
     }
39 39
     header('Location: roles.php');
40 40
     exit;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $sql = "INSERT INTO roles (name, description, rehersalId, groupId)
71 71
             VALUES ('$newrole', '$newrole', $rehersal, $groupId)";
72 72
         if (!mysqli_query(db(), $sql)) {
73
-            die('Error: '.mysqli_error(db()));
73
+            die('Error: ' . mysqli_error(db()));
74 74
         }
75 75
     } else {
76 76
         // Handle renaming of the roles
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
     $i = 1;
104 104
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
105 105
         if ($type == 'option') {
106
-            $list = $list."<option value='".$row['id']."'>".$row['name'].'</option>';
106
+            $list = $list . "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
107 107
         } elseif ($type == 'li') {
108
-            $list = $list.'<li>'.$row['name'].'</li>';
108
+            $list = $list . '<li>' . $row['name'] . '</li>';
109 109
         } elseif ($type == 'li-a') {
110
-            $list = $list."<li><a href='roles.php?role=".$roleId.'&assignto='.$row['id']."'>".$row['name'].'</a></li>';
110
+            $list = $list . "<li><a href='roles.php?role=" . $roleId . '&assignto=' . $row['id'] . "'>" . $row['name'] . '</a></li>';
111 111
         }
112 112
         $i++;
113 113
     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             $group = $row['groupId'];
174 174
             $down = $group + 1;
175 175
             $up = $group - 1;
176
-            echo '<div><strong>'.$groupname.'</strong><br />';
176
+            echo '<div><strong>' . $groupname . '</strong><br />';
177 177
         }
178 178
         // Print text input box if a role exists for the group.
179 179
         // Allows user to update role names and move roles between groups
Please login to merge, or discard this patch.
public/old/update.settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     exit;
34 34
 }
35 35
 if (!isAdmin()) {
36
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
36
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
37 37
     exit;
38 38
 }
39 39
 
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
 if ($action == 'update') {
58 58
     //if ($language='de-de')
59 59
     if ($rowSettings['lang_locale'] == 'en_GB') {
60
-        executeDbSql("update settings set lang_locale = 'de_DE'");                     // de_DE
60
+        executeDbSql("update settings set lang_locale = 'de_DE'"); // de_DE
61 61
             executeDbSql("update settings set time_format_long = '%A, %e. %B %Y, %R Uhr, KW%V'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
62 62
             executeDbSql("update settings set time_format_normal = '%d.%m.%Y %H:%M '"); // de_DE: %d.%m.%Y %H:%M
63
-            executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
63
+            executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
64 64
             executeDbSql("update settings set time_zone = 'Europe/Berlin'"); //de_DE: Europe/Berlin
65 65
             executeDbSql("update settings set google_group_calendar = ''");
66 66
         executeDbSql("update settings set overviewemail = '{{Gottesdienst-Planung [MONTH] [YEAR]}}\r\nHallo zusammen,\r\n\r\nanbei die Gottesdienst-Planung fuer [MONTH] [YEAR]\r\n\r\n[OVERVIEW]\r\n\r\nBitte fruehzeitig Bescheid geben, wenn etwas NICHT passt, ansonsten gehe ich davon aus, dass ihr wie geplant koennt.\r\n\r\nAlles Gute und Gottes Segen f�r Euch und Euren Dienst.\r\nEuer Gottesdienst Orga-Team'");
67 67
     }
68 68
     //else
69 69
     if ($rowSettings['lang_locale'] == 'de_DE') {
70
-        executeDbSql("update settings set lang_locale = 'en_GB'");                     // de_DE
70
+        executeDbSql("update settings set lang_locale = 'en_GB'"); // de_DE
71 71
             executeDbSql("update settings set time_format_long = '%A, %B %e @ %I:%M %p'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
72 72
             executeDbSql("update settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M
73
-            executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
73
+            executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
74 74
             executeDbSql("update settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin
75 75
             executeDbSql("update settings set google_group_calendar = ''");
76 76
         executeDbSql("update settings set overviewemail = 'Hello,\r\n\r\nIn this email you find the Rota for [MONTH] [YEAR].\r\n\r\n[OVERVIEW]\r\n\r\nPlease inform us as soon as possible, if you are not able to serve as scheduled.\r\n\r\nBe blessed.\r\nChurch Support Stuff'");
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     $resultSettings = mysqli_query(db(), $sqlSettings) or die(mysqli_error(db()));
83 83
     $rowSettings = mysqli_fetch_array($resultSettings, MYSQLI_ASSOC);
84 84
 
85
-    $updateNotification = 'Settings updated successfully to: '.$rowSettings['lang_locale'].' <br>&nbsp;<br>';
85
+    $updateNotification = 'Settings updated successfully to: ' . $rowSettings['lang_locale'] . ' <br>&nbsp;<br>';
86 86
 }
87 87
 
88 88
 $formatting = 'true';
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 	<hr>
95 95
 	This page has only beta status. <br>Please do only use it in testing environments!
96 96
 	<hr>
97
-	<?php echo 'Your web browser identifies your language as: '.$language; ?><br>
98
-	<?php echo 'Church Rota is set to use: '.$rowSettings['lang_locale']; ?><br>&nbsp;<br>
97
+	<?php echo 'Your web browser identifies your language as: ' . $language; ?><br>
98
+	<?php echo 'Church Rota is set to use: ' . $rowSettings['lang_locale']; ?><br>&nbsp;<br>
99 99
 	
100 100
 <?php
101 101
 if ($updateNotification == '') {
Please login to merge, or discard this patch.
public/old/swap.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 if (!empty($eventId)) {
111 111
     // ensure user is logged in before allowing creation of swap
112 112
     if (!(isset($_SESSION['is_logged_in']) || $_SESSION['db_is_logged_in'] == true)) {
113
-        $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/swap.php?event='.$eventId;
113
+        $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/swap.php?event=' . $eventId;
114 114
         header('Location: login.php');
115 115
     }
116 116
     $createSwap = true;
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
             <p>
187 187
               <strong>
188 188
                 <s class="text-red">
189
-                  <?php echo $swap->getOldUserRole()->getUser()->getFirstName().' '.$swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
189
+                  <?php echo $swap->getOldUserRole()->getUser()->getFirstName() . ' ' . $swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
190 190
                 </s>
191 191
                 &#8594;
192 192
                 <span class="text-green">
193
-                  <?php echo $swap->getNewUserRole()->getUser()->getFirstName().' '.$swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
193
+                  <?php echo $swap->getNewUserRole()->getUser()->getFirstName() . ' ' . $swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
194 194
                 </span>
195 195
               </strong>
196 196
             </p>
@@ -225,16 +225,16 @@  discard block
 block discarded – undo
225 225
                 <select name="newUserRole" class="form-control">
226 226
                   <?php
227 227
                   if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
-                      $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
228
+                      $whereAnd = 'r.groupId = ' . groupIdWithRole($role->roleId) . ' AND r.allowRoleSwaps IS NOT FALSE';
229 229
                   } else {
230
-                      $whereAnd = 'r.id = '.$role->roleId;
230
+                      $whereAnd = 'r.id = ' . $role->roleId;
231 231
                   }
232
-                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
232
+                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> ' . $role->userId . ' AND ' . $whereAnd . ' ORDER BY lastName, firstName, r.name';
233 233
                   $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234 234
 
235 235
                   while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236 236
                       ?>
237
-                    <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'].' '.$row['lastName'].' ('.$row['name'].')'; ?></option>
237
+                    <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'] . ' ' . $row['lastName'] . ' (' . $row['name'] . ')'; ?></option>
238 238
                   <?php
239 239
                   } ?>
240 240
                 </select>
Please login to merge, or discard this patch.
public/old/series.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $sql = "UPDATE eventGroups SET name = '$name', description = '$description' WHERE id = '$editid'";
41 41
         }
42 42
         if (!mysqli_query(db(), $sql)) {
43
-            die('Error: '.mysqli_error(db()));
43
+            die('Error: ' . mysqli_error(db()));
44 44
         }
45 45
     } else {
46 46
         $name = $_POST['seriesName'];
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         } else {
55 55
             $sql = ("INSERT INTO eventGroups (name, description) VALUES ('$name', '$description')");
56 56
             if (!mysqli_query(db(), $sql)) {
57
-                die('Error: '.mysqli_error(db()));
57
+                die('Error: ' . mysqli_error(db()));
58 58
             }
59 59
 
60 60
             // After we have inserted the data, we want to head back to the main users page
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 
98 98
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
99 99
         $seriesId = $row['id'];
100
-        echo "<span id='".$seriesId."' class='edit'><strong>".$row['name'].'</strong></span>';
101
-        echo " <a href='series.php?method=remove&series=".$seriesId."'><i class='fa fa-close'></i></a><br />";
102
-        echo "<p id='".$seriesId."' class='edit'>".$row['description'].'</p>';
100
+        echo "<span id='" . $seriesId . "' class='edit'><strong>" . $row['name'] . '</strong></span>';
101
+        echo " <a href='series.php?method=remove&series=" . $seriesId . "'><i class='fa fa-close'></i></a><br />";
102
+        echo "<p id='" . $seriesId . "' class='edit'>" . $row['description'] . '</p>';
103 103
         echo '<hr />';
104 104
     } ?>
105 105
  </div><!-- /.box-body -->
Please login to merge, or discard this patch.
public/old/subTypes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $sql = ("INSERT INTO eventSubTypes (name, description) VALUES ('$name', '$description')");
39 39
         if (!mysqli_query(db(), $sql)) {
40
-            die('Error: '.mysqli_error(db()));
40
+            die('Error: ' . mysqli_error(db()));
41 41
         }
42 42
     } else {
43 43
         // Otherwise we are dealing with edits, not new stuff
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
89 89
 
90 90
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
91
-        echo '<input type="hidden" name="formindex[]" value="'.$row['id'].'" />';
92
-        echo "<input name='name[]' value='".$row['name']."' />";
91
+        echo '<input type="hidden" name="formindex[]" value="' . $row['id'] . '" />';
92
+        echo "<input name='name[]' value='" . $row['name'] . "' />";
93 93
 
94
-        echo " <a href='subTypes.php?method=remove&subType=".$row['id']."'><i class='fa fa-times'></i></a><br />";
94
+        echo " <a href='subTypes.php?method=remove&subType=" . $row['id'] . "'><i class='fa fa-times'></i></a><br />";
95 95
     } ?>
96 96
    </div><!-- /.box-body -->
97 97
    <div class="box-footer">
Please login to merge, or discard this patch.
public/old/createEvent.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 if (($userisBandAdmin) || ($userisEventEditor) || (isAdmin())) {
46 46
     // Just continue the code
47 47
 } else {
48
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
48
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
49 49
 }
50 50
 
51 51
 if ($userisBandAdmin) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $location = $row['location'];
83 83
         $locationname = $row['locationname'];
84 84
         if ($action == 'edit') {
85
-            $formaction = '?action=edit&id='.$id;
85
+            $formaction = '?action=edit&id=' . $id;
86 86
         } else {
87 87
             $formaction = '';
88 88
         }
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 
137 137
     // convert format of date
138 138
     $date = str_replace('/', '-', $date); // ensure it isn't read as mm/dd/yyyy
139
-    $date = strftime('%Y-%m-%d', strtotime($date.' 00:00:00'));
140
-    $date = $date.' '.$time.':00';
139
+    $date = strftime('%Y-%m-%d', strtotime($date . ' 00:00:00'));
140
+    $date = $date . ' ' . $time . ':00';
141 141
     $date = mysqli_real_escape_string(db(), $date);
142 142
 
143 143
     if ($action == 'edit') {
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
         //if ($userisBandAdmin) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid=2)";
208 208
         //if ($userisEventEditor) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid!=2)";
209 209
         if ($userisBandAdmin) {
210
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where groupid in (2,3,4))';
210
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where groupid in (2,3,4))';
211 211
         }
212 212
         if ($userisEventEditor) {
213
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where not (groupid in (2,3,4)))';
213
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where not (groupid in (2,3,4)))';
214 214
         }
215 215
         mysqli_query(db(), $delete_all_sql) or die(mysqli_error(db()));
216 216
     }
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
     // redirect
219 219
     if (isset($_SESSION['lastEventsFilter'])) {
220 220
         $type = $_SESSION['lastEventsFilter'];
221
-        header('Location: events.php?view=all&filter='.$type.'#event'.$eventID);
221
+        header('Location: events.php?view=all&filter=' . $type . '#event' . $eventID);
222 222
     } else {
223
-        header('Location: events.php?view=all#event'.$eventID);
223
+        header('Location: events.php?view=all#event' . $eventID);
224 224
     }
225 225
     exit;
226 226
 }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                                         while ($ob = mysqli_fetch_object($result)) {
298 298
                                             if (!(isset($type) && $ob->id == $type)) {
299 299
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
300
-                                                echo "<option value='".$ob->id."' title='".$ob->description."' data-time='".($defaultTime == '00:00' ? '' : $defaultTime)."' data-location='".(is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId)."'>".$ob->name.'</option>';
300
+                                                echo "<option value='" . $ob->id . "' title='" . $ob->description . "' data-time='" . ($defaultTime == '00:00' ? '' : $defaultTime) . "' data-location='" . (is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId) . "'>" . $ob->name . '</option>';
301 301
                                             }
302 302
                                         } ?>
303 303
 									</select>
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
324 324
                                             if (isset($subtype) && $row['id'] == $subtype) {
325 325
                                             } else {
326
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
326
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
327 327
                                             }
328 328
                                         } ?>
329 329
 									</select>
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
352 352
                                             if (isset($location) && $row['id'] == $location) {
353 353
                                             } else {
354
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
354
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
355 355
                                             }
356 356
                                         } ?>
357 357
 									</select>
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
483 483
                                         if (isset($type) && $row['id'] == $type) {
484 484
                                         } else {
485
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
485
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
486 486
                                         }
487 487
                                     } ?>
488 488
 								</select>
@@ -552,8 +552,8 @@  discard block
 block discarded – undo
552 552
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
553 553
 											<?php if (!$userRole->getReserve()): ?>
554 554
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
555
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
556
-											<?php else: ?>
555
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
556
+											<?php else : ?>
557 557
 											<?php $countReserve += 1 ?>
558 558
 											<?php endif //!userRole->getReserve?>
559 559
 										<?php endforeach //users?>
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
564 564
 											<?php if ($userRole->getReserve()): ?>
565 565
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
566
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
566
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
567 567
 											<?php endif ?>
568 568
 										<?php endforeach //users?>
569 569
 										</optgroup>
Please login to merge, or discard this patch.