Completed
Branch master (a049c8)
by Christopher
12:07
created
public/old/viewBands.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         }
69 69
     }
70 70
     // After we have inserted the data, we want to head back to the main page
71
-     header('Location: viewBands.php');
71
+        header('Location: viewBands.php');
72 72
     exit;
73 73
 }
74 74
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $bandName = $_POST['bandname'];
57 57
         $sql = ("INSERT INTO cr_bands (bandLeader) VALUES ('$bandName')");
58 58
         if (!mysqli_query(db(), $sql)) {
59
-            die('Error: '.mysqli_error(db()));
59
+            die('Error: ' . mysqli_error(db()));
60 60
         }
61 61
     } else {
62 62
         $editbandID = $_GET['band'];
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $sql = ("INSERT INTO cr_bandMembers (bandID, skillID) VALUES ('$editbandID', '$editskillID')");
66 66
         if (!mysqli_query(db(), $sql)) {
67
-            die('Error: '.mysqli_error(db()));
67
+            die('Error: ' . mysqli_error(db()));
68 68
         }
69 69
     }
70 70
     // After we have inserted the data, we want to head back to the main page
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 		<div class="elementBackground">
100 100
 			<h2><a name="section<?php echo $row['bandID']; ?>"><?php echo $row['bandLeader']; ?></a> <?php if (isAdmin()) {
101 101
                 echo "
102
-			<a href='editBand.php?id=".$bandid."'><img src='graphics/tool.png' /></a>
103
-			<a href='viewBands.php?skillremove=true&bandid=".$bandid."'><img src='graphics/close.png' /></a>";
102
+			<a href='editBand.php?id=".$bandid . "'><img src='graphics/tool.png' /></a>
103
+			<a href='viewBands.php?skillremove=true&bandid=".$bandid . "'><img src='graphics/close.png' /></a>";
104 104
             } ?></h2>
105 105
 			
106 106
 				<?php
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
                     while ($rowskills = mysqli_fetch_array($resultskills, MYSQLI_ASSOC)) {
121 121
                         $bandMembersID = $bandMember['bandMembersID'];
122 122
                         $sqlusers = '';
123
-                        echo '<strong>'.$rowskills['name'].'</strong> ';
124
-                        echo '<em> '.$rowskills['skill'].'</em>'." <a href='viewBands.php?skillremove=true&bandMembersID=".$bandMembersID."'><img src='graphics/close.png' /></a><br />";
123
+                        echo '<strong>' . $rowskills['name'] . '</strong> ';
124
+                        echo '<em> ' . $rowskills['skill'] . '</em>' . " <a href='viewBands.php?skillremove=true&bandMembersID=" . $bandMembersID . "'><img src='graphics/close.png' /></a><br />";
125 125
                     }
126 126
                 }
127 127
             }
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 					<label for="name">Add members:</label>
137 137
 					<select name="name" id="name">
138 138
 						<?php while ($addMember = mysqli_fetch_array($resultaddMembers, MYSQLI_ASSOC)) {
139
-                echo "<option value='".$addMember['skillID']."'>";
140
-                echo $addMember['name'].' - '.$addMember['skill'];
139
+                echo "<option value='" . $addMember['skillID'] . "'>";
140
+                echo $addMember['name'] . ' - ' . $addMember['skill'];
141 141
                 echo '</option>';
142 142
             } ?>
143 143
 					</select>
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
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>
@@ -566,8 +566,8 @@  discard block
 block discarded – undo
566 566
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
567 567
 											<?php if (!$userRole->getReserve()): ?>
568 568
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
569
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
570
-											<?php else: ?>
569
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
570
+											<?php else : ?>
571 571
 											<?php $countReserve += 1 ?>
572 572
 											<?php endif //!userRole->getReserve?>
573 573
 										<?php endforeach //users?>
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
578 578
 											<?php if ($userRole->getReserve()): ?>
579 579
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
580
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
580
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
581 581
 											<?php endif ?>
582 582
 										<?php endforeach //users?>
583 583
 										</optgroup>
Please login to merge, or discard this patch.
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.
public/old/locations.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
     // After we have inserted the data, we want to head back to the main users page
57
-     header('Location: locations.php'); // Move to the home page of the admin section
58
-      exit;
57
+        header('Location: locations.php'); // Move to the home page of the admin section
58
+        exit;
59 59
     }
60 60
 }
61 61
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 	</form>
122 122
 </div><!-- /.box -->
123 123
   <?php
124
-  if (isAdmin()) {
125
-      ?>
124
+    if (isAdmin()) {
125
+        ?>
126 126
   <div id="right">
127 127
   		<div class="item"><a href="settings.php">Back to settings</a></div>
128 128
 <?php
129
-  } ?>
129
+    } ?>
130 130
 <?php include 'includes/footer.php'; ?>
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
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $sql = "UPDATE cr_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 cr_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/cr_daily.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,23 +87,23 @@
 block discarded – undo
87 87
 									WHERE
88 88
 										date >= CURDATE()
89 89
 										AND date_format( date , "%y-%m-%d" )
90
-												<= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert.' DAY ) , "%y-%m-%d" )';
90
+												<= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert . ' DAY ) , "%y-%m-%d" )';
91 91
         $resultEvents = mysqli_query(db(), $sqlEvents) or die(mysqli_error(db()));
92 92
         $i = 0;
93 93
         while ($rowEvents = mysqli_fetch_array($resultEvents, MYSQLI_ASSOC)) {
94 94
             $usersNotified = notifyEveryoneForEvent($rowEvents['id']);
95 95
             if (count($usersNotified) > 0) {
96
-                $out = $out.'Automatic notifications sent to users ('.implode(', ', $usersNotified).') for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n";
96
+                $out = $out . 'Automatic notifications sent to users (' . implode(', ', $usersNotified) . ') for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n";
97 97
             } else {
98
-                $out = $out.'No notifications sent for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n";
98
+                $out = $out . 'No notifications sent for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n";
99 99
             }
100 100
             $i = $i + 1;
101 101
         }
102 102
         if ($i == 0) {
103
-            $out = $out.'No events found to automatically notify for.';
103
+            $out = $out . 'No events found to automatically notify for.';
104 104
         }
105 105
     } else {
106
-        $out = $out.'Automatic notifications are disabled.';
106
+        $out = $out . 'Automatic notifications are disabled.';
107 107
     } ?>
108 108
 <html>
109 109
 	<body>
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/event.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 if (isset($_SESSION['is_logged_in']) || $_SESSION['db_is_logged_in'] == true) {
12 12
     // Just continue the code
13 13
 } else {
14
-    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/event.php?id='.$eventId;
14
+    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/event.php?id=' . $eventId;
15 15
     header('Location: login.php');
16 16
     exit;
17 17
 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 					<h2 class="box-title">Event Details</h2>
61 61
 				</div>
62 62
 				<div class="box-body">
63
-					<?php echo !empty($event->getName()) ? '<p><strong>Name:</strong> '.$event->getName().'</p>' : '' ?>
63
+					<?php echo !empty($event->getName()) ? '<p><strong>Name:</strong> ' . $event->getName() . '</p>' : '' ?>
64 64
 					<p><strong>Date:</strong> <?php echo $event->getDate('d/m/y'); ?></p>
65 65
 					<p><strong>Location:</strong> <?php echo $event->getLocation()->getName() ?></p>
66 66
 					<p><strong>Type:</strong> <?php echo $event->getEventType()->getName() ?></p>
@@ -160,16 +160,16 @@  discard block
 block discarded – undo
160 160
                                 } else {
161 161
                                     echo '</ul>';
162 162
                                 }
163
-                                echo '<p><strong>'.$groupName.'</strong></p>';
163
+                                echo '<p><strong>' . $groupName . '</strong></p>';
164 164
                                 echo '<ul>';
165 165
                             }
166 166
 
167 167
                             echo '<li>';
168
-                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : '';
168
+                            echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : '';
169 169
                             echo $viewPeople->name;
170 170
 
171 171
                             if ($viewPeople->rolename != '') {
172
-                                echo ' - <em>'.$viewPeople->rolename.'</em>';
172
+                                echo ' - <em>' . $viewPeople->rolename . '</em>';
173 173
                             } else {
174 174
                                 // If there is no skill, we don't need to mention this.
175 175
                             }
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 cr_settings set lang_locale = 'de_DE'");                     // de_DE
60
+            executeDbSql("update cr_settings set lang_locale = 'de_DE'"); // de_DE
61 61
             executeDbSql("update cr_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 cr_settings set time_format_normal = '%d.%m.%Y %H:%M '"); // de_DE: %d.%m.%Y %H:%M
63
-            executeDbSql("update cr_settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
63
+            executeDbSql("update cr_settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
64 64
             executeDbSql("update cr_settings set time_zone = 'Europe/Berlin'"); //de_DE: Europe/Berlin
65 65
             executeDbSql("update cr_settings set google_group_calendar = ''");
66 66
             executeDbSql("update cr_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 cr_settings set lang_locale = 'en_GB'");                     // de_DE
70
+            executeDbSql("update cr_settings set lang_locale = 'en_GB'"); // de_DE
71 71
             executeDbSql("update cr_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 cr_settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M
73
-            executeDbSql("update cr_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 cr_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 cr_settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin
75 75
             executeDbSql("update cr_settings set google_group_calendar = ''");
76 76
             executeDbSql("update cr_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/calendar.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 // fetch events
52 52
 
53 53
 switch ($_GET['format']) {
54
-  case 'ical':
54
+    case 'ical':
55 55
     icalOutput($events);
56 56
     break;
57 57
 }
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
 function icalOutput($events)
60 60
 {
61 61
     // the iCal date format.
62
-  define('DATE_ICAL', 'Ymd\THis');
62
+    define('DATE_ICAL', 'Ymd\THis');
63 63
     define('HOUR', 60 * 60);
64 64
 
65
-  // max line length is 75 chars. New line is \r\n
65
+    // max line length is 75 chars. New line is \r\n
66 66
 
67
-  $output = 'BEGIN:VCALENDAR
67
+    $output = 'BEGIN:VCALENDAR
68 68
 METHOD:PUBLISH
69 69
 VERSION:2.0
70 70
 PRODID:-//Church Rota//Church Rota//EN
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 END:STANDARD
91 91
 END:VTIMEZONE\r\n";
92 92
 
93
-  // loop over events
94
-  foreach ($events as $event):
93
+    // loop over events
94
+    foreach ($events as $event):
95 95
     $output .=
96 96
 'BEGIN:VEVENT
97 97
 SUMMARY:'.$event->role.($event->name ? ' | '.$event->name.' ('.$event->type.')' : ' ('.$event->type.')').'
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 END:VEVENT\r\n";
113 113
     endforeach;
114 114
 
115
-  // close calendar
116
-  $output .= 'END:VCALENDAR';
115
+    // close calendar
116
+    $output .= 'END:VCALENDAR';
117 117
 
118 118
     echo $output;
119 119
 }
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
     $value = trim($value);
126 126
     $value = strip_tags($value);
127 127
     $value = preg_replace('/\n+/', ' ', $value); // remove newlines
128
-  $value = preg_replace('/\s{2,}/', ' ', $value); // remove whitespace
129
-  $value = str_replace(',', '\,', $value); // escape commas
130
-  $preamble_len = strlen($preamble);
128
+    $value = preg_replace('/\s{2,}/', ' ', $value); // remove whitespace
129
+    $value = str_replace(',', '\,', $value); // escape commas
130
+    $preamble_len = strlen($preamble);
131 131
     $lines = [];
132 132
     while (strlen($value) > (75 - $preamble_len)) {
133 133
         $space = (75 - $preamble_len);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 METHOD:PUBLISH
69 69
 VERSION:2.0
70 70
 PRODID:-//Church Rota//Church Rota//EN
71
-X-WR-CALNAME:'.siteSettings()->getOwner()." Rota
71
+X-WR-CALNAME:'.siteSettings()->getOwner() . " Rota
72 72
 CALSCALE:GREGORIAN
73 73
 BEGIN:VTIMEZONE
74 74
 TZID:Europe/London
@@ -94,16 +94,16 @@  discard block
 block discarded – undo
94 94
   foreach ($events as $event):
95 95
     $output .=
96 96
 'BEGIN:VEVENT
97
-SUMMARY:'.$event->role.($event->name ? ' | '.$event->name.' ('.$event->type.')' : ' ('.$event->type.')').'
98
-DESCRIPTION:'.ical_split('DESCRIPTION:', $event->series.':\n'.$event->sermonTitle.' ('.$event->bibleVerse.')\n\nIf you are unable to do '.$event->role.' at this event, please request a swap:\n'.siteSettings()->getSiteUrl().'/swap.php?event='.$event->id.'\n\nOnce the swap is accepted, this event will be removed from your calendar.\nPlease be aware that changes may take up to 24 hours or longer to be reflected. This is due to your calendar, not on the rota system.').'
99
-UID:ROTA'.$event->id.'
100
-ORGANIZER;CN="'.siteSettings()->getOwner().'":MAILTO:'.siteSettings()->getAdminEmailAddress().'
101
-STATUS:'.'CONFIRMED'.'
102
-DTSTART;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date)).'
103
-DTEND;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date) + HOUR).'
104
-LAST-MODIFIED:'.date(DATE_ICAL, strtotime($event->updated)).'Z
105
-LOCATION:'.ical_split('LOCATION:', $event->locationName.', '.$event->locationAddress).'
106
-URL:'.siteSettings()->getSiteUrl().'/event.php?id='.$event->id."
97
+SUMMARY:'.$event->role . ($event->name ? ' | ' . $event->name . ' (' . $event->type . ')' : ' (' . $event->type . ')') . '
98
+DESCRIPTION:'.ical_split('DESCRIPTION:', $event->series . ':\n' . $event->sermonTitle . ' (' . $event->bibleVerse . ')\n\nIf you are unable to do ' . $event->role . ' at this event, please request a swap:\n' . siteSettings()->getSiteUrl() . '/swap.php?event=' . $event->id . '\n\nOnce the swap is accepted, this event will be removed from your calendar.\nPlease be aware that changes may take up to 24 hours or longer to be reflected. This is due to your calendar, not on the rota system.') . '
99
+UID:ROTA'.$event->id . '
100
+ORGANIZER;CN="'.siteSettings()->getOwner() . '":MAILTO:' . siteSettings()->getAdminEmailAddress() . '
101
+STATUS:'.'CONFIRMED' . '
102
+DTSTART;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date)) . '
103
+DTEND;TZID="Europe/London":'.date(DATE_ICAL, strtotime($event->date) + HOUR) . '
104
+LAST-MODIFIED:'.date(DATE_ICAL, strtotime($event->updated)) . 'Z
105
+LOCATION:'.ical_split('LOCATION:', $event->locationName . ', ' . $event->locationAddress) . '
106
+URL:'.siteSettings()->getSiteUrl() . '/event.php?id=' . $event->id . "
107 107
 BEGIN:VALARM
108 108
 ACTION:DISPLAY
109 109
 DESCRIPTION:Reminder for Rota
Please login to merge, or discard this patch.