Completed
Branch master (a049c8)
by Christopher
12:07
created
public/old/swap.php 4 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $swapId = filter_var($swapId, FILTER_SANITIZE_NUMBER_INT);
48 48
 
49 49
 switch ($action) {
50
-  case 'swap':
50
+    case 'swap':
51 51
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
52 52
         $eventPersonId = $_POST['eventPerson'];
53 53
         $newUserRoleId = $_POST['newUserRole'];
@@ -61,58 +61,58 @@  discard block
 block discarded – undo
61 61
         $err = 'Swap details incorrect, please try again.';
62 62
     }
63 63
     break;
64
-  case 'accept':
64
+    case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67 67
         case '1':
68 68
           $message = 'Swap Successful';
69
-          break;
69
+            break;
70 70
         case '2':
71 71
           $message = 'Swap already accepted.';
72
-          break;
72
+            break;
73 73
         case '3':
74 74
           $message = 'Swap already declined.';
75
-          break;
75
+            break;
76 76
         case '4':
77 77
           $message = 'Swap already reverted.';
78
-          break;
78
+            break;
79 79
         default:
80 80
           $err = 'Technical issue - please inform system administrator';
81
-          break;
82
-      }
81
+            break;
82
+        }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
85 85
     }
86 86
     break;
87
-  case 'decline':
87
+    case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90 90
         case '1':
91 91
           $message = 'Swap declined';
92
-          break;
92
+            break;
93 93
         case '2':
94 94
           $message = 'Swap already declined.';
95
-          break;
95
+            break;
96 96
         default:
97 97
           $err = 'Technical issue - please inform system administrator';
98
-          break;
98
+            break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
102 102
     }
103 103
     break;
104 104
 
105
-  default:
105
+    default:
106 106
     // code...
107 107
     break;
108 108
 }
109 109
 
110 110
 if (!empty($eventId)) {
111 111
     // ensure user is logged in before allowing creation of swap
112
-  if (!(isset($_SESSION['is_logged_in']) || $_SESSION['db_is_logged_in'] == true)) {
113
-      $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/swap.php?event='.$eventId;
114
-      header('Location: login.php');
115
-  }
112
+    if (!(isset($_SESSION['is_logged_in']) || $_SESSION['db_is_logged_in'] == true)) {
113
+        $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/swap.php?event='.$eventId;
114
+        header('Location: login.php');
115
+    }
116 116
     $createSwap = true;
117 117
 
118 118
     $numberOfRoles = numberOfRolesOfUserAtEvent($sessionUserID, $eventId);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		<section class="content">
164 164
       
165 165
       <?php
166
-      if (isset($message)): ?>
166
+        if (isset($message)): ?>
167 167
       
168 168
         <p><?php echo $message ?></p>
169 169
 
@@ -224,19 +224,19 @@  discard block
 block discarded – undo
224 224
                 <label for="newUserRole">Swap To:</label>
225 225
                 <select name="newUserRole" class="form-control">
226 226
                   <?php
227
-                  if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
-                      $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
-                  } else {
230
-                      $whereAnd = 'r.id = '.$role->roleId;
231
-                  }
232
-                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM cr_users u INNER JOIN cr_userRoles ur ON ur.userId = u.id INNER JOIN cr_roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
-                  $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
-
235
-                  while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
-                      ?>
227
+                    if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
+                        $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
+                    } else {
230
+                        $whereAnd = 'r.id = '.$role->roleId;
231
+                    }
232
+                    $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM cr_users u INNER JOIN cr_userRoles ur ON ur.userId = u.id INNER JOIN cr_roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
+                    $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
+
235
+                    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
+                        ?>
237 237
                     <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'].' '.$row['lastName'].' ('.$row['name'].')'; ?></option>
238 238
                   <?php
239
-                  } ?>
239
+                    } ?>
240 240
                 </select>
241 241
               </div>
242 242
             </div>
Please login to merge, or discard this patch.
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,21 +64,21 @@  discard block
 block discarded – undo
64 64
   case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67
-        case '1':
68
-          $message = 'Swap Successful';
69
-          break;
70
-        case '2':
71
-          $message = 'Swap already accepted.';
72
-          break;
73
-        case '3':
74
-          $message = 'Swap already declined.';
75
-          break;
76
-        case '4':
77
-          $message = 'Swap already reverted.';
78
-          break;
79
-        default:
80
-          $err = 'Technical issue - please inform system administrator';
81
-          break;
67
+            case '1':
68
+              $message = 'Swap Successful';
69
+              break;
70
+            case '2':
71
+              $message = 'Swap already accepted.';
72
+              break;
73
+            case '3':
74
+              $message = 'Swap already declined.';
75
+              break;
76
+            case '4':
77
+              $message = 'Swap already reverted.';
78
+              break;
79
+            default:
80
+              $err = 'Technical issue - please inform system administrator';
81
+              break;
82 82
       }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
   case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90
-        case '1':
91
-          $message = 'Swap declined';
92
-          break;
93
-        case '2':
94
-          $message = 'Swap already declined.';
95
-          break;
96
-        default:
97
-          $err = 'Technical issue - please inform system administrator';
98
-          break;
90
+            case '1':
91
+              $message = 'Swap declined';
92
+              break;
93
+            case '2':
94
+              $message = 'Swap already declined.';
95
+              break;
96
+            default:
97
+              $err = 'Technical issue - please inform system administrator';
98
+              break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
Please login to merge, or discard this 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 cr_users u INNER JOIN cr_userRoles ur ON ur.userId = u.id INNER JOIN cr_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 cr_users u INNER JOIN cr_userRoles ur ON ur.userId = u.id INNER JOIN cr_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.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,14 +271,17 @@
 block discarded – undo
271 271
 
272 272
         <?php endforeach; ?>
273 273
       
274
-      <?php else: ?>
274
+      <?php else {
275
+    : ?>
275 276
       <?php // event has no roles the user can cover?>
276 277
       
277 278
       <div class="alert alert-warning">
278 279
         <h4><i class="icon fa fa-info"></i>There are no roles in the event you are skilled to cover.</h4>
279 280
         <p>If you need adding to the rota, speak to an admin.</p>
280 281
       </div>
281
-      <?php endif; ?>
282
+      <?php endif;
283
+}
284
+?>
282 285
 
283 286
 
284 287
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
public/old/createEvents.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                                         while ($ob = mysqli_fetch_object($result)) {
89 89
                                             if (!(isset($type) && $ob->id == $type)) {
90 90
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
91
-                                                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>';
91
+                                                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>';
92 92
                                             }
93 93
                                         } ?>
94 94
 									</select>
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
115 115
                                             if (isset($subtype) && $row['id'] == $subtype) {
116 116
                                             } else {
117
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
117
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
118 118
                                             }
119 119
                                         } ?>
120 120
 									</select>
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
143 143
                                             if (isset($location) && $row['id'] == $location) {
144 144
                                             } else {
145
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
145
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
146 146
                                             }
147 147
                                         } ?>
148 148
 									</select>
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
286 286
                                         if (isset($type) && $row['id'] == $type) {
287 287
                                         } else {
288
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
288
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
289 289
                                         }
290 290
                                     } ?>
291 291
 								</select>
Please login to merge, or discard this patch.
public/old/subTypes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
     }
54 54
 
55 55
     // After we have inserted the data, we want to head back to the main users page
56
-     header('Location: subTypes.php'); // Move to the home page of the admin section
57
-      exit;
56
+        header('Location: subTypes.php'); // Move to the home page of the admin section
57
+        exit;
58 58
 }
59 59
 include 'includes/header.php';
60 60
 ?>
Please login to merge, or discard this 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 cr_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/recordingUpload.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 
35 35
 // get token
36 36
 $response = $client->request(
37
-  'POST',
38
-  'v3/tokens.json',
39
-  ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'],
40
-                       'email' => siteConfig()['recording']['locomotivecms']['email'], ]]
41
-  );
37
+    'POST',
38
+    'v3/tokens.json',
39
+    ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'],
40
+                        'email' => siteConfig()['recording']['locomotivecms']['email'], ]]
41
+    );
42 42
 if ($response->getStatusCode() == 201) {
43 43
     $token = json_decode($response->getBody())->token;
44 44
 }
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 // test token
47 47
 if (isset($token)) {
48 48
     $response = $client->request(
49
-  'GET',
50
-  'v3/my_account.json',
51
-  ['query' => ['auth_token' => $token]]);
49
+    'GET',
50
+    'v3/my_account.json',
51
+    ['query' => ['auth_token' => $token]]);
52 52
     var_dump($response);
53 53
 } else {
54 54
     echo '<p>Unable to connect to main site</p>';
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 // only load page if functionality enabled
20 20
 if (siteConfig()['recording']['type'] != 'locomotivecms') {
21 21
     echo '<p>This feature is not enabled</p>';
22
-    echo '<p><a href='.siteSettings()->getSiteUrl().'>&lt; back to homepage</a></p>';
22
+    echo '<p><a href=' . siteSettings()->getSiteUrl() . '>&lt; back to homepage</a></p>';
23 23
     exit;
24 24
 }
25 25
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 $client = new Client([
29 29
     // Base URI is used with relative requests
30
-    'base_uri' => siteConfig()['recording']['locomotivecms']['url'].'/locomotive/api/',
30
+    'base_uri' => siteConfig()['recording']['locomotivecms']['url'] . '/locomotive/api/',
31 31
     // You can set any number of default request options.
32 32
     'timeout'  => 2.0,
33 33
 ]);
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
     var_dump($response);
53 53
 } else {
54 54
     echo '<p>Unable to connect to main site</p>';
55
-    echo '<p><a href='.siteSettings()->getSiteUrl().'>&lt; back to homepage</a></p>';
55
+    echo '<p><a href=' . siteSettings()->getSiteUrl() . '>&lt; back to homepage</a></p>';
56 56
     exit;
57 57
 }
Please login to merge, or discard this patch.
public/old/emailGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $statusMessage = 'Sent successfully';
54 54
     } else {
55 55
         foreach ($sent as $errorMessage) {
56
-            $statusMessage .= '<p>'.$errorMessage.'</p>';
56
+            $statusMessage .= '<p>' . $errorMessage . '</p>';
57 57
         }
58 58
     }
59 59
 
Please login to merge, or discard this patch.
public/old/notification.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,14 +57,14 @@
 block discarded – undo
57 57
 if (!empty($notificationId)) {
58 58
     seenNotification($notificationId, $referer);
59 59
 
60
-  // redir if notification has URL
61
-  $redir = notificationLink($notificationId);
60
+    // redir if notification has URL
61
+    $redir = notificationLink($notificationId);
62 62
     if (!empty($redir)) {
63 63
         header('Location: '.$redir);
64 64
     }
65 65
 
66
-  // find notification
67
-  $notification = notificationWithId($notificationId);
66
+    // find notification
67
+    $notification = notificationWithId($notificationId);
68 68
 }
69 69
 
70 70
     // ------ Presentation --------
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 } else {
34 34
     $notificationId = getQueryStringForKey('id');
35 35
     $referer = getQueryStringForKey('click');
36
-    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/notification.php?id='.$notificationId.'&click='.$referer;
36
+    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/notification.php?id=' . $notificationId . '&click=' . $referer;
37 37
     header('Location: login.php');
38 38
     exit;
39 39
 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
   // redir if notification has URL
61 61
   $redir = notificationLink($notificationId);
62 62
     if (!empty($redir)) {
63
-        header('Location: '.$redir);
63
+        header('Location: ' . $redir);
64 64
     }
65 65
 
66 66
   // find notification
Please login to merge, or discard this patch.
public/old/tableView.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 									 FROM cr_eventTypes et
112 112
 									 WHERE id IN (SELECT e.type
113 113
 										 						FROM cr_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 cr_groups g ORDER BY '.$group_sorting_name;
135
+    $sql = 'SELECT * FROM cr_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)) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     if ($filter == '') {
165 165
         $sql .= '
166
-							AND '.$whereTwoMonth.'
166
+							AND '.$whereTwoMonth . '
167 167
 						ORDER BY
168 168
 							e.date';
169 169
     } elseif ($filter == 'all') {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     } elseif ($filter != '') {
174 174
         $sql .= "
175 175
 							AND e.type = '$filter'
176
-							AND ".$whereTwoMonth.'
176
+							AND " . $whereTwoMonth . '
177 177
 						ORDER BY
178 178
 							e.date';
179 179
     }
@@ -188,34 +188,34 @@  discard block
 block discarded – undo
188 188
         echo '<tr>';
189 189
         echo '<td >';
190 190
         setlocale(LC_TIME, $lang_locale); //de_DE
191
-        echo '<a href="event.php?id='.$row['id'].'">';
191
+        echo '<a href="event.php?id=' . $row['id'] . '">';
192 192
         echo strftime($time_format_short, strtotime($row['sundayDate'])); // %a, <strong>%e. %b</strong>, KW%V
193 193
         echo '</a>';
194 194
 
195 195
         //$row['sundayDate']
196 196
         if (!empty($row['eventType'])) {
197
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventType'].'</em>';
197
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventType'] . '</em>';
198 198
         }
199 199
         if (!empty($row['eventSubType'])) {
200
-            echo ' - <em>'.$row['eventSubType'].'</em>';
200
+            echo ' - <em>' . $row['eventSubType'] . '</em>';
201 201
         }
202 202
         if (!empty($row['eventLocation'])) {
203
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventLocation'].'</em>';
203
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventLocation'] . '</em>';
204 204
         }
205 205
         if (!empty($row['name'])) {
206
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['name'].'</em>';
206
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['name'] . '</em>';
207 207
         }
208 208
         if (!empty($row['eventGroup'])) {
209
-            echo '<br /><strong>&nbsp;&nbsp;&nbsp;'.$row['eventGroup'].'</strong>';
209
+            echo '<br /><strong>&nbsp;&nbsp;&nbsp;' . $row['eventGroup'] . '</strong>';
210 210
         }
211 211
         if (!empty($row['sermonTitle'])) {
212
-            echo ': '.$row['sermonTitle'];
212
+            echo ': ' . $row['sermonTitle'];
213 213
         }
214 214
         if (!empty($row['bibleVerse'])) {
215
-            echo ' <em>('.$row['bibleVerse'].')</em>';
215
+            echo ' <em>(' . $row['bibleVerse'] . ')</em>';
216 216
         }
217 217
         if (!empty($row['comment'])) {
218
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;('.$row['comment'].')</em>';
218
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;(' . $row['comment'] . ')</em>';
219 219
         }
220 220
         echo '</td>';
221 221
 
@@ -247,16 +247,16 @@  discard block
 block discarded – undo
247 247
                             if ($previousName == '') {
248 248
                                 // new name
249 249
                                 echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
250
-                                echo $name.' <em>('.$viewPeople['role'];
250
+                                echo $name . ' <em>(' . $viewPeople['role'];
251 251
                             } elseif ($previousName != $name) {
252 252
                                 echo ')</em>';
253 253
                                 echo ($viewPeople['userId'] != $sessionUserId) ? '</strong>' : '';
254 254
                                 echo '<br />'; // line break from previous name
255 255
                                 // new name
256 256
                                 echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
257
-                                echo $name.' <em>('.$viewPeople['role'];
257
+                                echo $name . ' <em>(' . $viewPeople['role'];
258 258
                             } else {
259
-                                echo ', '.$viewPeople['role'];
259
+                                echo ', ' . $viewPeople['role'];
260 260
                             }
261 261
 
262 262
                     $peopleInEvent = true;
Please login to merge, or discard this patch.
public/old/resources.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
         $sql = "UPDATE cr_documents SET title = '$resourcename', description = '$resourcedescription', link = '$resourcelink' WHERE id = '$id'";
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
         if ($_FILES['resourcefile']['tmp_name'] == 'none') {
46 46
         } else {
47 47
             $filename = $_FILES['resourcefile']['name'];
48
-            copy($_FILES['resourcefile']['tmp_name'], './documents/'.$_FILES['resourcefile']['name']);
48
+            copy($_FILES['resourcefile']['tmp_name'], './documents/' . $_FILES['resourcefile']['name']);
49 49
         }
50 50
 
51 51
         $sql = ("INSERT INTO cr_documents (title, description, url, link) VALUES ('$resourcename', '$resourcedescription', '$filename', '$resourcelink')");
52 52
         if (!mysqli_query(db(), $sql)) {
53
-            die('Error: '.mysqli_error(db()));
53
+            die('Error: ' . mysqli_error(db()));
54 54
         }
55 55
         // After we have inserted the data, we want to head back to the main page
56 56
     }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     if ($action == 'new') {
84 84
         $actionlink = 'resources.php?action=newsent';
85 85
     } else {
86
-        $actionlink = 'resources.php?action=editsent&id='.$id;
86
+        $actionlink = 'resources.php?action=editsent&id=' . $id;
87 87
         $sql = "SELECT * FROM cr_documents WHERE id = '$id'";
88 88
         $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
89 89
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 				<?php echo $Parsedown->text(htmlspecialchars($row['description'])); ?>
207 207
 			</div>
208 208
 			<div class="box-footer">
209
-				<a class="btn btn-primary" href="<?php echo ($row['url'] != '') ? 'documents/'.$row['url'] : '#' ?>">Download</a>
209
+				<a class="btn btn-primary" href="<?php echo ($row['url'] != '') ? 'documents/' . $row['url'] : '#' ?>">Download</a>
210 210
 				<?php if (isAdmin()): ?>
211 211
 				<a class="btn btn-warning" href='resources.php?action=edit&id=<?php echo $resourceID; ?>'><i class='fa fa-pencil'></i> Edit</a>
212 212
 				<button type="button" class='btn btn-danger' data-toggle='modal' data-target='#deleteModal<?php echo $resourceID; ?>'><i class='fa fa-times'></i> Remove</a>
Please login to merge, or discard this patch.
public/old/login.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
             <label class="fa fa-lock" for="login__password"><span class="hidden">Password</span></label>
106 106
             <input name="password" id="login__password" type="password" class="form__input" placeholder="Password" required>
107 107
           </div>
108
-					<?php if (!empty($message)): echo '<p>'.$message.'</p>'; endif; ?>
108
+					<?php if (!empty($message)): echo '<p>' . $message . '</p>'; endif; ?>
109 109
           <div class="form__field">
110 110
             <input type="submit" value="Sign In">
111 111
           </div>
Please login to merge, or discard this patch.