Completed
Push — master ( 008aa0...00b67b )
by Christopher
13:47 queued 06:29
created
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/statistics.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -139,12 +139,12 @@
 block discarded – undo
139 139
     		<tbody>
140 140
     		<?php
141 141
                 $sql = "SELECT s.date,s.detail1,s.detail2,s.detail3,s.type,trim(concat(u.firstName,' ',u.lastName)) AS name FROM cr_statistics s INNER JOIN cr_users u ON u.id = s.userid";
142
-          if (!isAdmin()) {
143
-              $sql .= 'WHERE u.ID=s.userID';
144
-              if (!$debug) {
145
-                  $sql .= " AND s.type = 'system'";
146
-              }
147
-          }
142
+            if (!isAdmin()) {
143
+                $sql .= 'WHERE u.ID=s.userID';
144
+                if (!$debug) {
145
+                    $sql .= " AND s.type = 'system'";
146
+                }
147
+            }
148 148
                 $sql .= ' ORDER BY date desc '.$limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 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
 
@@ -26,28 +26,28 @@  discard block
 block discarded – undo
26 26
     if ($method == 'truncate') {
27 27
         $sql = "CREATE TABLE tmp_system_statistics as SELECT * from cr_statistics WHERE type='system'";
28 28
         if (!mysqli_query(db(), $sql)) {
29
-            die('Error: '.mysqli_error(db()));
29
+            die('Error: ' . mysqli_error(db()));
30 30
         }
31 31
 
32 32
         $sql = ('TRUNCATE TABLE cr_statistics');
33 33
         if (!mysqli_query(db(), $sql)) {
34
-            die('Error: '.mysqli_error(db()));
34
+            die('Error: ' . mysqli_error(db()));
35 35
         }
36 36
 
37 37
         $sql = ('ALTER TABLE cr_statistics  AUTO_INCREMENT = 50');
38 38
         if (!mysqli_query(db(), $sql)) {
39
-            die('Error: '.mysqli_error(db()));
39
+            die('Error: ' . mysqli_error(db()));
40 40
         }
41 41
 
42 42
         $sql = 'INSERT INTO cr_statistics (userid,date,type,detail1,detail2,detail3,script) ';
43
-        $sql = $sql.'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date';
43
+        $sql = $sql . 'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date';
44 44
         if (!mysqli_query(db(), $sql)) {
45
-            die('Error: '.mysqli_error(db()));
45
+            die('Error: ' . mysqli_error(db()));
46 46
         }
47 47
 
48 48
         $sql = 'DROP TABLE tmp_system_statistics';
49 49
         if (!mysqli_query(db(), $sql)) {
50
-            die('Error: '.mysqli_error(db()));
50
+            die('Error: ' . mysqli_error(db()));
51 51
         }
52 52
 
53 53
         insertStatistics('system', __FILE__, 'statistics deleted');
@@ -103,22 +103,22 @@  discard block
 block discarded – undo
103 103
               <?php
104 104
 
105 105
                         $sql = 'SELECT VERSION( ) AS mysqli_version';
106
-            $result = mysqli_query(db(), $sql) or die('MySQL-Error: '.mysqli_error(db()));
106
+            $result = mysqli_query(db(), $sql) or die('MySQL-Error: ' . mysqli_error(db()));
107 107
             $dbv = mysqli_fetch_array($result, MYSQLI_ASSOC);
108 108
             $mysqli_version = $dbv['mysqli_version'];
109 109
 
110 110
             if (substr($mysqli_version, 0, 1) == 5) {
111
-                $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc ".$browserLimit;
111
+                $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc " . $browserLimit;
112 112
             } else {
113
-                $sql = "SELECT detail3 as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc ".$browserLimit;
113
+                $sql = "SELECT detail3 as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc " . $browserLimit;
114 114
             }
115 115
 
116 116
             $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
117 117
             while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
118 118
                 extract($row);
119 119
                 echo '<tr>';
120
-                echo '<td>'.$browser.'</td>';
121
-                echo '<td>'.$count.'</td>';
120
+                echo '<td>' . $browser . '</td>';
121
+                echo '<td>' . $count . '</td>';
122 122
                 echo '</tr>';
123 123
             } ?>
124 124
 
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
                   $sql .= " AND s.type = 'system'";
146 146
               }
147 147
           }
148
-                $sql .= ' ORDER BY date desc '.$limit;
148
+                $sql .= ' ORDER BY date desc ' . $limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
151 151
                     extract($row);
152 152
                     echo '<tr>';
153
-                    echo '<td>'.$date.'</td>';
154
-                    echo '<td>'.$name.'</td>';
155
-                    echo '<td>'.$type.'</td>';
156
-                    echo '<td>'.$detail1.'</td>';
157
-                    echo '<td>'.$detail2.'</td>';
153
+                    echo '<td>' . $date . '</td>';
154
+                    echo '<td>' . $name . '</td>';
155
+                    echo '<td>' . $type . '</td>';
156
+                    echo '<td>' . $detail1 . '</td>';
157
+                    echo '<td>' . $detail2 . '</td>';
158 158
                     //echo "<td>".$detail3."</td>";
159 159
                     echo '</tr>';
160 160
                 }
Please login to merge, or discard this patch.
public/old/createEvent.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -567,7 +567,8 @@  discard block
 block discarded – undo
567 567
 											<?php if (!$userRole->getReserve()): ?>
568 568
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
569 569
 											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
570
-											<?php else: ?>
570
+											<?php else {
571
+    : ?>
571 572
 											<?php $countReserve += 1 ?>
572 573
 											<?php endif //!userRole->getReserve?>
573 574
 										<?php endforeach //users?>
@@ -646,4 +647,6 @@  discard block
 block discarded – undo
646 647
   </div><!-- /.createSeries -->
647 648
 
648 649
 
649
-<?php include 'includes/footer.php'; ?>
650
+<?php include 'includes/footer.php';
651
+}
652
+?>
Please login to merge, or discard this 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
         }
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 
140 140
     // convert format of date
141 141
     $date = str_replace('/', '-', $date); // ensure it isn't read as mm/dd/yyyy
142
-    $date = strftime('%Y-%m-%d', strtotime($date.' 00:00:00'));
143
-    $date = $date.' '.$time.':00';
142
+    $date = strftime('%Y-%m-%d', strtotime($date . ' 00:00:00'));
143
+    $date = $date . ' ' . $time . ':00';
144 144
     $date = mysqli_real_escape_string(db(), $date);
145 145
 
146 146
     if ($action == 'edit') {
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
         //if ($userisBandAdmin) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from cr_skills where groupid=2)";
211 211
         //if ($userisEventEditor) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from cr_skills where groupid!=2)";
212 212
         if ($userisBandAdmin) {
213
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from cr_skills where groupid in (2,3,4))';
213
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from cr_skills where groupid in (2,3,4))';
214 214
         }
215 215
         if ($userisEventEditor) {
216
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from cr_skills where not (groupid in (2,3,4)))';
216
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from cr_skills where not (groupid in (2,3,4)))';
217 217
         }
218 218
         mysqli_query(db(), $delete_all_sql) or die(mysqli_error(db()));
219 219
     }
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
     // redirect
222 222
     if (isset($_SESSION['lastEventsFilter'])) {
223 223
         $type = $_SESSION['lastEventsFilter'];
224
-        header('Location: events.php?view=all&filter='.$type.'#event'.$eventID);
224
+        header('Location: events.php?view=all&filter=' . $type . '#event' . $eventID);
225 225
     } else {
226
-        header('Location: events.php?view=all#event'.$eventID);
226
+        header('Location: events.php?view=all#event' . $eventID);
227 227
     }
228 228
     exit;
229 229
 }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                                         while ($ob = mysqli_fetch_object($result)) {
301 301
                                             if (!(isset($type) && $ob->id == $type)) {
302 302
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
303
-                                                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>';
303
+                                                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>';
304 304
                                             }
305 305
                                         } ?>
306 306
 									</select>
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
327 327
                                             if (isset($subtype) && $row['id'] == $subtype) {
328 328
                                             } else {
329
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
329
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
330 330
                                             }
331 331
                                         } ?>
332 332
 									</select>
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
355 355
                                             if (isset($location) && $row['id'] == $location) {
356 356
                                             } else {
357
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
357
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
358 358
                                             }
359 359
                                         } ?>
360 360
 									</select>
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
498 498
                                         if (isset($type) && $row['id'] == $type) {
499 499
                                         } else {
500
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
500
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
501 501
                                         }
502 502
                                     } ?>
503 503
 								</select>
@@ -567,8 +567,8 @@  discard block
 block discarded – undo
567 567
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
568 568
 											<?php if (!$userRole->getReserve()): ?>
569 569
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
570
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
571
-											<?php else: ?>
570
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
571
+											<?php else : ?>
572 572
 											<?php $countReserve += 1 ?>
573 573
 											<?php endif //!userRole->getReserve?>
574 574
 										<?php endforeach //users?>
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
579 579
 											<?php if ($userRole->getReserve()): ?>
580 580
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
581
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
581
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
582 582
 											<?php endif ?>
583 583
 										<?php endforeach //users?>
584 584
 										</optgroup>
Please login to merge, or discard this patch.
public/old/editRole.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 }
35 35
 
36 36
 if (!isAdmin()) {
37
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
37
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
38 38
     exit;
39 39
 }
40 40
 
Please login to merge, or discard this patch.
public/old/events.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,8 +435,10 @@
 block discarded – undo
435 435
 
436 436
                             echo '</li>';
437 437
                         }
438
-        echo '</ul>'; else:
438
+        echo '</ul>'; else {
439
+            :
439 440
                         echo '<p>No roles assigned to this event.';
441
+        }
440 442
         endif; ?>
441 443
 			</div><!-- /.user-roles -->
442 444
 		</div><!-- /.box-body -->
Please login to merge, or discard this 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 cr_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 cr_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
                 } ?>
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 							WHERE e.type = '$filter'
271 271
 							AND e.date >= DATE(NOW())
272 272
 							AND e.removed = 0
273
-							ORDER BY ".$dateOrderBy;
273
+							ORDER BY " . $dateOrderBy;
274 274
     } else {
275 275
         $sql = "SELECT
276 276
 							DISTINCT e.id AS id,
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 							WHERE e.date >= DATE(NOW())
299 299
 							AND ur.userId = '$view'
300 300
 							AND e.removed = 0
301
-							ORDER BY ".$dateOrderBy;
301
+							ORDER BY " . $dateOrderBy;
302 302
     }
303 303
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
304 304
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         $newMonth = strftime('%B %Y', strtotime($row->sundayDate));
317 317
         if ($month != $newMonth) {
318 318
             $month = $newMonth;
319
-            echo '<li class="time-label"><span class="bg-green">'.$month.'</span></li>';
319
+            echo '<li class="time-label"><span class="bg-green">' . $month . '</span></li>';
320 320
         }
321 321
 
322 322
         // Event details?>
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
 						<h4><?php
331 331
                             echo date('jS: ', strtotime($row->sundayDate));
332 332
         if ($eventName != '') {
333
-            echo '<strong>'.$eventName.'</strong><br />'.$subType.' - <em>'.$type.'</em>';
333
+            echo '<strong>' . $eventName . '</strong><br />' . $subType . ' - <em>' . $type . '</em>';
334 334
         } else {
335
-            echo $subType.' - <em>'.$type.'</em>';
335
+            echo $subType . ' - <em>' . $type . '</em>';
336 336
         } ?>
337 337
 						</h4>
338 338
 					</a>
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 				<?php //<p><strong>Rehearsal:</strong> <?php
345 345
                 //echo ($row->rehearsalDateFormatted = "0000-00-00 00:00:00") ? "none" : strftime(siteSettings()->time_format_normal,strtotime($row->rehearsalDateFormatted));</p>?>
346 346
 					
347
-				<p><strong><?php echo $row->eventGroup ? $row->eventGroup.': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '('.$row->bibleVerse.')' : '' ?></p>
347
+				<p><strong><?php echo $row->eventGroup ? $row->eventGroup . ': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '(' . $row->bibleVerse . ')' : '' ?></p>
348 348
 				
349 349
 				<p><strong>Location:</strong> <?php echo $row->eventLocation; ?></p>
350 350
 				
@@ -416,16 +416,16 @@  discard block
 block discarded – undo
416 416
                                 } else {
417 417
                                     echo '</ul>';
418 418
                                 }
419
-                                echo '<p><strong>'.$groupName.'</strong></p>';
419
+                                echo '<p><strong>' . $groupName . '</strong></p>';
420 420
                                 echo '<ul>';
421 421
                             }
422 422
 
423 423
                             echo '<li>';
424
-                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : '';
424
+                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : '';
425 425
                             echo $viewPeople->name;
426 426
 
427 427
                             if ($viewPeople->rolename != '') {
428
-                                echo ' - <em>'.$viewPeople->rolename.'</em>';
428
+                                echo ' - <em>' . $viewPeople->rolename . '</em>';
429 429
                             } else {
430 430
                                 // If there is no skill, we don't need to mention this.
431 431
                             }
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
 
452 452
 				<?php
453 453
                 if (isAdmin() || $userisBandAdmin || $userisEventEditor) {
454
-                    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 */
455
-                    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 */
456
-                    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 */
454
+                    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 */
455
+                    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 */
456
+                    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 */
457 457
                 }
458 458
         if (isAdmin()) {
459 459
             //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 */
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 
463 463
             echo "<ul class='dropdown-menu'>";
464 464
 
465
-            echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */
465
+            echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */
466 466
 
467 467
             echo '</ul>';
468 468
         } ?>
Please login to merge, or discard this patch.
public/old/editeventtype.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 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
 
Please login to merge, or discard this patch.
public/old/series.php 2 patches
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 cr_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 cr_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.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,10 +142,10 @@
 block discarded – undo
142 142
 	</form>
143 143
 </div><!-- /.box -->
144 144
   <?php
145
-  if (isAdmin()) {
146
-      ?>
145
+    if (isAdmin()) {
146
+        ?>
147 147
   <div id="right">
148 148
   		<div class="item"><a href="settings.php">Back to settings</a></div>
149 149
 <?php
150
-  } ?>
150
+    } ?>
151 151
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
public/old/pendingAccounts.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,24 +30,24 @@
 block discarded – undo
30 30
     switch ($_POST['action']) {
31 31
     case 'approve':
32 32
       $userId = approvePendingUser($id);
33
-      mailNewUser($userId);
34
-      header('Location: addUser.php?action=edit&user='.$userId);
35
-      break;
33
+        mailNewUser($userId);
34
+        header('Location: addUser.php?action=edit&user='.$userId);
35
+        break;
36 36
     case 'merge':
37 37
       $existingUserId = $_POST['existingUser'];
38
-      $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
-      mergePendingUserWithUserId($id, $existingUserId);
40
-      mailNewUser($existingUserId);
41
-      header('Location: addUser.php?action=edit&user='.$existingUserId);
42
-      break;
38
+        $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
+        mergePendingUserWithUserId($id, $existingUserId);
40
+        mailNewUser($existingUserId);
41
+        header('Location: addUser.php?action=edit&user='.$existingUserId);
42
+        break;
43 43
     case 'decline':
44 44
       declinePendingUser($id);
45
-      break;
45
+        break;
46 46
 
47 47
     default:
48 48
       // code...
49 49
       break;
50
-  }
50
+    }
51 51
 }
52 52
 
53 53
 if (empty($id)) {
Please login to merge, or discard this patch.
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -28,25 +28,25 @@
 block discarded – undo
28 28
     $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT);
29 29
 
30 30
     switch ($_POST['action']) {
31
-    case 'approve':
32
-      $userId = approvePendingUser($id);
33
-      mailNewUser($userId);
34
-      header('Location: addUser.php?action=edit&user='.$userId);
35
-      break;
36
-    case 'merge':
37
-      $existingUserId = $_POST['existingUser'];
38
-      $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
-      mergePendingUserWithUserId($id, $existingUserId);
40
-      mailNewUser($existingUserId);
41
-      header('Location: addUser.php?action=edit&user='.$existingUserId);
42
-      break;
43
-    case 'decline':
44
-      declinePendingUser($id);
45
-      break;
46
-
47
-    default:
48
-      // code...
49
-      break;
31
+        case 'approve':
32
+          $userId = approvePendingUser($id);
33
+          mailNewUser($userId);
34
+          header('Location: addUser.php?action=edit&user='.$userId);
35
+          break;
36
+        case 'merge':
37
+          $existingUserId = $_POST['existingUser'];
38
+          $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39
+          mergePendingUserWithUserId($id, $existingUserId);
40
+          mailNewUser($existingUserId);
41
+          header('Location: addUser.php?action=edit&user='.$existingUserId);
42
+          break;
43
+        case 'decline':
44
+          declinePendingUser($id);
45
+          break;
46
+
47
+        default:
48
+          // code...
49
+          break;
50 50
   }
51 51
 }
52 52
 
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
 
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
     case 'approve':
32 32
       $userId = approvePendingUser($id);
33 33
       mailNewUser($userId);
34
-      header('Location: addUser.php?action=edit&user='.$userId);
34
+      header('Location: addUser.php?action=edit&user=' . $userId);
35 35
       break;
36 36
     case 'merge':
37 37
       $existingUserId = $_POST['existingUser'];
38 38
       $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT);
39 39
       mergePendingUserWithUserId($id, $existingUserId);
40 40
       mailNewUser($existingUserId);
41
-      header('Location: addUser.php?action=edit&user='.$existingUserId);
41
+      header('Location: addUser.php?action=edit&user=' . $existingUserId);
42 42
       break;
43 43
     case 'decline':
44 44
       declinePendingUser($id);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 <div class="box box-primary">
91 91
   <div class="box-header">
92 92
     <h2 class="box-title">
93
-      <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName.' '.$user->lastName ?>
93
+      <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName . ' ' . $user->lastName ?>
94 94
     </h2>
95 95
   </div>
96 96
   <div class="box-body">
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             <?php
132 132
             $users = allUsersNames();
133 133
             foreach ($users as $existingUser): ?>
134
-            <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName.' '.$existingUser->lastName ?></option>
134
+            <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName . ' ' . $existingUser->lastName ?></option>
135 135
             <?php endforeach; ?>
136 136
           </select>
137 137
         </div>
Please login to merge, or discard this patch.