Completed
Push — master ( 5d8acc...ee8b95 )
by Christopher
36s queued 15s
created
public/plugins/datatables/extensions/Scroller/examples/data/ssp.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 // parameter represents the DataTables column identifier. In this case simple
30 30
 // indexes
31 31
 $columns = [
32
-    ['db' => 'id',         'dt' => 0],
33
-    ['db' => 'firstname',  'dt' => 1],
34
-    ['db' => 'surname',    'dt' => 2],
35
-    ['db' => 'zip',        'dt' => 3],
36
-    ['db' => 'country',    'dt' => 4],
32
+    ['db' => 'id', 'dt' => 0],
33
+    ['db' => 'firstname', 'dt' => 1],
34
+    ['db' => 'surname', 'dt' => 2],
35
+    ['db' => 'zip', 'dt' => 3],
36
+    ['db' => 'country', 'dt' => 4],
37 37
 ];
38 38
 
39 39
 // SQL server connection information
Please login to merge, or discard this patch.
public/old/swaps.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 // ensure user is allowed to see page
40 40
 
41 41
 if (!isAdmin() && $queryStringUser != $sessionUserId) {
42
-    header('Location: swaps.php?user='.$sessionUserId);
42
+    header('Location: swaps.php?user=' . $sessionUserId);
43 43
 }
44 44
 
45 45
 // fetch swaps
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
               <p>
91 91
                 <strong>
92 92
                   <s class="text-red">
93
-                    <?php echo $swap->getOldUserRole()->getUser()->getFirstName().' '.$swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
93
+                    <?php echo $swap->getOldUserRole()->getUser()->getFirstName() . ' ' . $swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
94 94
                   </s>
95 95
                   &#8594;
96 96
                   <span class="text-green">
97
-                    <?php echo $swap->getNewUserRole()->getUser()->getFirstName().' '.$swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
97
+                    <?php echo $swap->getNewUserRole()->getUser()->getFirstName() . ' ' . $swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
98 98
                   </span>
99 99
                 </strong>
100 100
               </p>
Please login to merge, or discard this patch.
public/old/overview.php 2 patches
Spacing   +2 added lines, -2 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
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 		  <?php
117 117
             else:
118
-                echo '<div class="box-body">'.$sentSuccess.'</div>';
118
+                echo '<div class="box-body">' . $sentSuccess . '</div>';
119 119
             endif;
120 120
             ?>
121 121
 				</div>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,8 +114,10 @@
 block discarded – undo
114 114
 			</form>
115 115
 
116 116
 		  <?php
117
-            else:
117
+            else {
118
+                :
118 119
                 echo '<div class="box-body">'.$sentSuccess.'</div>';
120
+            }
119 121
             endif;
120 122
             ?>
121 123
 				</div>
Please login to merge, or discard this patch.
public/old/swap.php 4 patches
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,21 +64,21 @@  discard block
 block discarded – undo
64 64
   case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67
-        case '1':
68
-          $message = 'Swap Successful';
69
-          break;
70
-        case '2':
71
-          $message = 'Swap already accepted.';
72
-          break;
73
-        case '3':
74
-          $message = 'Swap already declined.';
75
-          break;
76
-        case '4':
77
-          $message = 'Swap already reverted.';
78
-          break;
79
-        default:
80
-          $err = 'Technical issue - please inform system administrator';
81
-          break;
67
+            case '1':
68
+              $message = 'Swap Successful';
69
+              break;
70
+            case '2':
71
+              $message = 'Swap already accepted.';
72
+              break;
73
+            case '3':
74
+              $message = 'Swap already declined.';
75
+              break;
76
+            case '4':
77
+              $message = 'Swap already reverted.';
78
+              break;
79
+            default:
80
+              $err = 'Technical issue - please inform system administrator';
81
+              break;
82 82
       }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
   case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90
-        case '1':
91
-          $message = 'Swap declined';
92
-          break;
93
-        case '2':
94
-          $message = 'Swap already declined.';
95
-          break;
96
-        default:
97
-          $err = 'Technical issue - please inform system administrator';
98
-          break;
90
+            case '1':
91
+              $message = 'Swap declined';
92
+              break;
93
+            case '2':
94
+              $message = 'Swap already declined.';
95
+              break;
96
+            default:
97
+              $err = 'Technical issue - please inform system administrator';
98
+              break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,14 +271,17 @@
 block discarded – undo
271 271
 
272 272
         <?php endforeach; ?>
273 273
       
274
-      <?php else: ?>
274
+      <?php else {
275
+    : ?>
275 276
       <?php // event has no roles the user can cover?>
276 277
       
277 278
       <div class="alert alert-warning">
278 279
         <h4><i class="icon fa fa-info"></i>There are no roles in the event you are skilled to cover.</h4>
279 280
         <p>If you need adding to the rota, speak to an admin.</p>
280 281
       </div>
281
-      <?php endif; ?>
282
+      <?php endif;
283
+}
284
+?>
282 285
 
283 286
 
284 287
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $swapId = filter_var($swapId, FILTER_SANITIZE_NUMBER_INT);
48 48
 
49 49
 switch ($action) {
50
-  case 'swap':
50
+    case 'swap':
51 51
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
52 52
         $eventPersonId = $_POST['eventPerson'];
53 53
         $newUserRoleId = $_POST['newUserRole'];
@@ -61,48 +61,48 @@  discard block
 block discarded – undo
61 61
         $err = 'Swap details incorrect, please try again.';
62 62
     }
63 63
     break;
64
-  case 'accept':
64
+    case 'accept':
65 65
     if (canAcceptSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
66 66
         switch (acceptSwap($swapId)) {
67 67
         case '1':
68 68
           $message = 'Swap Successful';
69
-          break;
69
+            break;
70 70
         case '2':
71 71
           $message = 'Swap already accepted.';
72
-          break;
72
+            break;
73 73
         case '3':
74 74
           $message = 'Swap already declined.';
75
-          break;
75
+            break;
76 76
         case '4':
77 77
           $message = 'Swap already reverted.';
78
-          break;
78
+            break;
79 79
         default:
80 80
           $err = 'Technical issue - please inform system administrator';
81
-          break;
82
-      }
81
+            break;
82
+        }
83 83
     } else {
84 84
         $err = 'Swap Already Actioned or Verification Code Invalid';
85 85
     }
86 86
     break;
87
-  case 'decline':
87
+    case 'decline':
88 88
     if (canDeclineSwap($swapId) || $verify == verificationCodeForSwap($swapId)) {
89 89
         switch (declineSwap($swapId)) {
90 90
         case '1':
91 91
           $message = 'Swap declined';
92
-          break;
92
+            break;
93 93
         case '2':
94 94
           $message = 'Swap already declined.';
95
-          break;
95
+            break;
96 96
         default:
97 97
           $err = 'Technical issue - please inform system administrator';
98
-          break;
98
+            break;
99 99
         }
100 100
     } else {
101 101
         $err = 'Swap Already Actioned or Verification Code Invalid';
102 102
     }
103 103
     break;
104 104
 
105
-  default:
105
+    default:
106 106
     // code...
107 107
     break;
108 108
 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		<section class="content">
164 164
       
165 165
       <?php
166
-      if (isset($message)): ?>
166
+        if (isset($message)): ?>
167 167
       
168 168
         <p><?php echo $message ?></p>
169 169
 
@@ -224,19 +224,19 @@  discard block
 block discarded – undo
224 224
                 <label for="newUserRole">Swap To:</label>
225 225
                 <select name="newUserRole" class="form-control">
226 226
                   <?php
227
-                  if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
-                      $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
-                  } else {
230
-                      $whereAnd = 'r.id = '.$role->roleId;
231
-                  }
232
-                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
-                  $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
-
235
-                  while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
-                      ?>
227
+                    if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
+                        $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
229
+                    } else {
230
+                        $whereAnd = 'r.id = '.$role->roleId;
231
+                    }
232
+                    $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
233
+                    $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234
+
235
+                    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236
+                        ?>
237 237
                     <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'].' '.$row['lastName'].' ('.$row['name'].')'; ?></option>
238 238
                   <?php
239
-                  } ?>
239
+                    } ?>
240 240
                 </select>
241 241
               </div>
242 242
             </div>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 if (!empty($eventId)) {
111 111
     // ensure user is logged in before allowing creation of swap
112 112
     if (!(isset($_SESSION['is_logged_in']) || $_SESSION['db_is_logged_in'] == true)) {
113
-        $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/swap.php?event='.$eventId;
113
+        $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/swap.php?event=' . $eventId;
114 114
         header('Location: login.php');
115 115
     }
116 116
     $createSwap = true;
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
             <p>
187 187
               <strong>
188 188
                 <s class="text-red">
189
-                  <?php echo $swap->getOldUserRole()->getUser()->getFirstName().' '.$swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
189
+                  <?php echo $swap->getOldUserRole()->getUser()->getFirstName() . ' ' . $swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
190 190
                 </s>
191 191
                 &#8594;
192 192
                 <span class="text-green">
193
-                  <?php echo $swap->getNewUserRole()->getUser()->getFirstName().' '.$swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
193
+                  <?php echo $swap->getNewUserRole()->getUser()->getFirstName() . ' ' . $swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
194 194
                 </span>
195 195
               </strong>
196 196
             </p>
@@ -225,16 +225,16 @@  discard block
 block discarded – undo
225 225
                 <select name="newUserRole" class="form-control">
226 226
                   <?php
227 227
                   if (roleCanSwapToOtherRoleInGroup($role->roleId)) {
228
-                      $whereAnd = 'r.groupId = '.groupIdWithRole($role->roleId).' AND r.allowRoleSwaps IS NOT FALSE';
228
+                      $whereAnd = 'r.groupId = ' . groupIdWithRole($role->roleId) . ' AND r.allowRoleSwaps IS NOT FALSE';
229 229
                   } else {
230
-                      $whereAnd = 'r.id = '.$role->roleId;
230
+                      $whereAnd = 'r.id = ' . $role->roleId;
231 231
                   }
232
-                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> '.$role->userId.' AND '.$whereAnd.' ORDER BY lastName, firstName, r.name';
232
+                  $sql = 'SELECT ur.id, u.firstName, u.lastName, r.name FROM users u INNER JOIN userRoles ur ON ur.userId = u.id INNER JOIN roles r ON r.id = ur.roleId WHERE u.id <> ' . $role->userId . ' AND ' . $whereAnd . ' ORDER BY lastName, firstName, r.name';
233 233
                   $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
234 234
 
235 235
                   while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
236 236
                       ?>
237
-                    <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'].' '.$row['lastName'].' ('.$row['name'].')'; ?></option>
237
+                    <option value='<?php echo $row['id']; ?>'><?php echo $row['firstName'] . ' ' . $row['lastName'] . ' (' . $row['name'] . ')'; ?></option>
238 238
                   <?php
239 239
                   } ?>
240 240
                 </select>
Please login to merge, or discard this patch.
public/old/createEvents.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                                         while ($ob = mysqli_fetch_object($result)) {
89 89
                                             if (!(isset($type) && $ob->id == $type)) {
90 90
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
91
-                                                echo "<option value='".$ob->id."' title='".$ob->description."' data-time='".($defaultTime == '00:00' ? '' : $defaultTime)."' data-location='".(is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId)."'>".$ob->name.'</option>';
91
+                                                echo "<option value='" . $ob->id . "' title='" . $ob->description . "' data-time='" . ($defaultTime == '00:00' ? '' : $defaultTime) . "' data-location='" . (is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId) . "'>" . $ob->name . '</option>';
92 92
                                             }
93 93
                                         } ?>
94 94
 									</select>
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
115 115
                                             if (isset($subtype) && $row['id'] == $subtype) {
116 116
                                             } else {
117
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
117
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
118 118
                                             }
119 119
                                         } ?>
120 120
 									</select>
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
143 143
                                             if (isset($location) && $row['id'] == $location) {
144 144
                                             } else {
145
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
145
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
146 146
                                             }
147 147
                                         } ?>
148 148
 									</select>
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
286 286
                                         if (isset($type) && $row['id'] == $type) {
287 287
                                         } else {
288
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
288
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
289 289
                                         }
290 290
                                     } ?>
291 291
 								</select>
Please login to merge, or discard this patch.
public/old/subTypes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
     }
54 54
 
55 55
     // After we have inserted the data, we want to head back to the main users page
56
-     header('Location: subTypes.php'); // Move to the home page of the admin section
57
-      exit;
56
+        header('Location: subTypes.php'); // Move to the home page of the admin section
57
+        exit;
58 58
 }
59 59
 include 'includes/header.php';
60 60
 ?>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $sql = ("INSERT INTO eventSubTypes (name, description) VALUES ('$name', '$description')");
39 39
         if (!mysqli_query(db(), $sql)) {
40
-            die('Error: '.mysqli_error(db()));
40
+            die('Error: ' . mysqli_error(db()));
41 41
         }
42 42
     } else {
43 43
         // Otherwise we are dealing with edits, not new stuff
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
89 89
 
90 90
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
91
-        echo '<input type="hidden" name="formindex[]" value="'.$row['id'].'" />';
92
-        echo "<input name='name[]' value='".$row['name']."' />";
91
+        echo '<input type="hidden" name="formindex[]" value="' . $row['id'] . '" />';
92
+        echo "<input name='name[]' value='" . $row['name'] . "' />";
93 93
 
94
-        echo " <a href='subTypes.php?method=remove&subType=".$row['id']."'><i class='fa fa-times'></i></a><br />";
94
+        echo " <a href='subTypes.php?method=remove&subType=" . $row['id'] . "'><i class='fa fa-times'></i></a><br />";
95 95
     } ?>
96 96
    </div><!-- /.box-body -->
97 97
    <div class="box-footer">
Please login to merge, or discard this patch.
public/old/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/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
         }
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 
137 137
     // convert format of date
138 138
     $date = str_replace('/', '-', $date); // ensure it isn't read as mm/dd/yyyy
139
-    $date = strftime('%Y-%m-%d', strtotime($date.' 00:00:00'));
140
-    $date = $date.' '.$time.':00';
139
+    $date = strftime('%Y-%m-%d', strtotime($date . ' 00:00:00'));
140
+    $date = $date . ' ' . $time . ':00';
141 141
     $date = mysqli_real_escape_string(db(), $date);
142 142
 
143 143
     if ($action == 'edit') {
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
         //if ($userisBandAdmin) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid=2)";
208 208
         //if ($userisEventEditor) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid!=2)";
209 209
         if ($userisBandAdmin) {
210
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where groupid in (2,3,4))';
210
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where groupid in (2,3,4))';
211 211
         }
212 212
         if ($userisEventEditor) {
213
-            $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where not (groupid in (2,3,4)))';
213
+            $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where not (groupid in (2,3,4)))';
214 214
         }
215 215
         mysqli_query(db(), $delete_all_sql) or die(mysqli_error(db()));
216 216
     }
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
     // redirect
219 219
     if (isset($_SESSION['lastEventsFilter'])) {
220 220
         $type = $_SESSION['lastEventsFilter'];
221
-        header('Location: events.php?view=all&filter='.$type.'#event'.$eventID);
221
+        header('Location: events.php?view=all&filter=' . $type . '#event' . $eventID);
222 222
     } else {
223
-        header('Location: events.php?view=all#event'.$eventID);
223
+        header('Location: events.php?view=all#event' . $eventID);
224 224
     }
225 225
     exit;
226 226
 }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                                         while ($ob = mysqli_fetch_object($result)) {
298 298
                                             if (!(isset($type) && $ob->id == $type)) {
299 299
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
300
-                                                echo "<option value='".$ob->id."' title='".$ob->description."' data-time='".($defaultTime == '00:00' ? '' : $defaultTime)."' data-location='".(is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId)."'>".$ob->name.'</option>';
300
+                                                echo "<option value='" . $ob->id . "' title='" . $ob->description . "' data-time='" . ($defaultTime == '00:00' ? '' : $defaultTime) . "' data-location='" . (is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId) . "'>" . $ob->name . '</option>';
301 301
                                             }
302 302
                                         } ?>
303 303
 									</select>
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
324 324
                                             if (isset($subtype) && $row['id'] == $subtype) {
325 325
                                             } else {
326
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
326
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
327 327
                                             }
328 328
                                         } ?>
329 329
 									</select>
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
352 352
                                             if (isset($location) && $row['id'] == $location) {
353 353
                                             } else {
354
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
354
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
355 355
                                             }
356 356
                                         } ?>
357 357
 									</select>
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
483 483
                                         if (isset($type) && $row['id'] == $type) {
484 484
                                         } else {
485
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
485
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
486 486
                                         }
487 487
                                     } ?>
488 488
 								</select>
@@ -552,8 +552,8 @@  discard block
 block discarded – undo
552 552
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
553 553
 											<?php if (!$userRole->getReserve()): ?>
554 554
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
555
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
556
-											<?php else: ?>
555
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
556
+											<?php else : ?>
557 557
 											<?php $countReserve += 1 ?>
558 558
 											<?php endif //!userRole->getReserve?>
559 559
 										<?php endforeach //users?>
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 										<?php foreach ($role->getUserRoles() as $userRole): ?>
564 564
 											<?php if ($userRole->getReserve()): ?>
565 565
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
566
-											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
566
+											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option>
567 567
 											<?php endif ?>
568 568
 										<?php endforeach //users?>
569 569
 										</optgroup>
Please login to merge, or discard this patch.
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.