Completed
Branch master (a049c8)
by Christopher
12:07
created
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 1 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.
public/old/fb-signup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
     // Returns a `Facebook\FacebookResponse` object
42 42
   $response = $fb->get('/me?fields=id,name,email', $accessToken);
43 43
 } catch (Facebook\Exceptions\FacebookResponseException $e) {
44
-    echo 'Graph returned an error: '.$e->getMessage();
44
+    echo 'Graph returned an error: ' . $e->getMessage();
45 45
     exit;
46 46
 } catch (Facebook\Exceptions\FacebookSDKException $e) {
47
-    echo 'Facebook SDK returned an error: '.$e->getMessage();
47
+    echo 'Facebook SDK returned an error: ' . $e->getMessage();
48 48
     exit;
49 49
 }
50 50
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             <label class="fa fa-envelope-o" for="email"><span class="hidden">Email address</span></label>
92 92
             <input name="email" id="email" type="text" class="form__input" placeholder="Email address" value="<?php echo $user->getEmail(); ?>" required>
93 93
           </div>
94
-					<?php if (!empty($message)): echo '<p>'.$message.'</p>'; endif; ?>
94
+					<?php if (!empty($message)): echo '<p>' . $message . '</p>'; endif; ?>
95 95
           <div class="form__field">
96 96
             <input type="submit" value="Request access">
97 97
           </div>
Please login to merge, or discard this patch.
public/old/viewBands.php 1 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 1 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 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 if (($userisBandAdmin) || ($userisEventEditor) || (isAdmin())) {
46 46
     // Just continue the code
47 47
 } else {
48
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
48
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
49 49
 }
50 50
 
51 51
 if ($userisBandAdmin) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $location = $row['location'];
83 83
         $locationname = $row['locationname'];
84 84
         if ($action == 'edit') {
85
-            $formaction = '?action=edit&id='.$id;
85
+            $formaction = '?action=edit&id=' . $id;
86 86
         } else {
87 87
             $formaction = '';
88 88
         }
@@ -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.