@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | { |
12 | 12 | public function getNotificationClick(ServerRequestInterface $request, ResponseInterface $response, $args) |
13 | 13 | { |
14 | - $this->logger->info("Fetch settings GET '/notification/".$args['id']."'"); |
|
14 | + $this->logger->info("Fetch settings GET '/notification/" . $args['id'] . "'"); |
|
15 | 15 | |
16 | 16 | $n = NotificationQuery::create()->findPk($args['id']); |
17 | 17 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor($link['route'], $link['attributes'])); |
37 | 37 | } else { |
38 | - return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home').$n->getLink()); |
|
38 | + return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home') . $n->getLink()); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | </div><!-- /.timeline-header --> |
222 | 222 | |
223 | 223 | <div class="timeline-body"> |
224 | - <p><strong><?php echo $event->getEventGroup() ? $event->getEventGroup()->getName().': ' : '' ?></strong><?php echo $event->getSermonTitle() ?> <?php echo $event->getBibleVerse() ? '('.$event->getBibleVerse().')' : '' ?></p> |
|
224 | + <p><strong><?php echo $event->getEventGroup() ? $event->getEventGroup()->getName() . ': ' : '' ?></strong><?php echo $event->getSermonTitle() ?> <?php echo $event->getBibleVerse() ? '(' . $event->getBibleVerse() . ')' : '' ?></p> |
|
225 | 225 | <p><strong>Location:</strong> <?php echo $event->getLocation()->getName(); ?></p> |
226 | 226 | |
227 | 227 | <?php if ($event->getComments()): ?> |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | INNER JOIN groups g ON g.id = r.groupId |
282 | 282 | INNER JOIN users u ON u.id = ur.userId |
283 | 283 | INNER JOIN eventPeople ep ON ep.userRoleId = ur.id |
284 | - WHERE ep.eventId = '".$event->getId()."' |
|
284 | + WHERE ep.eventId = '".$event->getId() . "' |
|
285 | 285 | AND ep.removed = 0 |
286 | 286 | ORDER BY g.name, r.name"; |
287 | 287 | |
@@ -306,16 +306,16 @@ discard block |
||
306 | 306 | } else { |
307 | 307 | echo '</ul>'; |
308 | 308 | } |
309 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
309 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
310 | 310 | echo '<ul>'; |
311 | 311 | } |
312 | 312 | |
313 | 313 | echo '<li>'; |
314 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
314 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
315 | 315 | echo $viewPeople->name; |
316 | 316 | |
317 | 317 | if ($viewPeople->rolename != '') { |
318 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
318 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
319 | 319 | } else { |
320 | 320 | // If there is no skill, we don't need to mention this. |
321 | 321 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | </div><!-- /.timeline-header --> |
398 | 398 | |
399 | 399 | <div class="timeline-body"> |
400 | - <p><strong><?php echo $event->eventGroup ? $event->eventGroup.': ' : '' ?></strong><?php echo $event->sermonTitle ?> <?php echo $event->bibleVerse ? '('.$event->bibleVerse.')' : '' ?></p> |
|
400 | + <p><strong><?php echo $event->eventGroup ? $event->eventGroup . ': ' : '' ?></strong><?php echo $event->sermonTitle ?> <?php echo $event->bibleVerse ? '(' . $event->bibleVerse . ')' : '' ?></p> |
|
401 | 401 | <p><strong>Location:</strong> <?php echo $event->eventLocation; ?></p> |
402 | 402 | |
403 | 403 | <?php if ($event->comment != ''): ?> |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | INNER JOIN groups g ON g.id = r.groupId |
459 | 459 | INNER JOIN users u ON u.id = ur.userId |
460 | 460 | INNER JOIN eventPeople ep ON ep.userRoleId = ur.id |
461 | - WHERE ep.eventId = '".$event->id."' |
|
461 | + WHERE ep.eventId = '".$event->id . "' |
|
462 | 462 | AND ep.removed = 0 |
463 | 463 | ORDER BY g.name, r.name"; |
464 | 464 | |
@@ -483,16 +483,16 @@ discard block |
||
483 | 483 | } else { |
484 | 484 | echo '</ul>'; |
485 | 485 | } |
486 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
486 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
487 | 487 | echo '<ul>'; |
488 | 488 | } |
489 | 489 | |
490 | 490 | echo '<li>'; |
491 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
491 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
492 | 492 | echo $viewPeople->name; |
493 | 493 | |
494 | 494 | if ($viewPeople->rolename != '') { |
495 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
495 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
496 | 496 | } else { |
497 | 497 | // If there is no skill, we don't need to mention this. |
498 | 498 | } |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | "> |
564 | 564 | <?php echo timeInWordsWithTense($event->getDate()) ?> |
565 | 565 | </span> |
566 | - <?php else: ?> |
|
566 | + <?php else : ?> |
|
567 | 567 | <span class="pull-right badge bg-red"> |
568 | 568 | never |
569 | 569 | </span> |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | <img class="img-circle" src="<?php echo getProfileImageUrl($_SESSION['userid'], 'large') ?>" alt="User Avatar"> |
629 | 629 | </div> |
630 | 630 | <!-- /.widget-user-image --> |
631 | - <h3 class="widget-user-username"><?php echo $user->getFirstName().' '.$user->getLastName() ?></h3> |
|
631 | + <h3 class="widget-user-username"><?php echo $user->getFirstName() . ' ' . $user->getLastName() ?></h3> |
|
632 | 632 | <h5 class="widget-user-desc">Account created <?php echo $user->getCreated('M. Y') ?></h5> |
633 | 633 | </div> |
634 | 634 | <div class="box-footer no-padding"> |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | $userHasEmail = (strlen($user->getEmail()) > 3); |
653 | 653 | $emailRemindersEnabled = ($userHasEmail && true); // todo: add opt-out for email reminders |
654 | 654 | ?> |
655 | - Email Reminders <span class="pull-right badge bg-<?php echo $emailRemindersEnabled ? 'green' : 'red' ?>"><?php echo $emailRemindersEnabled ? siteSettings()->getDaysToAlert().' days before' : ($userHasEmail ? 'Disabled' : 'No email address') ?></span> |
|
655 | + Email Reminders <span class="pull-right badge bg-<?php echo $emailRemindersEnabled ? 'green' : 'red' ?>"><?php echo $emailRemindersEnabled ? siteSettings()->getDaysToAlert() . ' days before' : ($userHasEmail ? 'Disabled' : 'No email address') ?></span> |
|
656 | 656 | </a> |
657 | 657 | </li> |
658 | 658 | <li> |
@@ -139,12 +139,12 @@ |
||
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 statistics s INNER JOIN 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)) { |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
26 | 26 | if ($method == 'truncate') { |
27 | 27 | $sql = "CREATE TABLE tmp_system_statistics as SELECT * from 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 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 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 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 |
||
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 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 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 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 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 |
||
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 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | FROM eventTypes et |
112 | 112 | WHERE id IN (SELECT e.type |
113 | 113 | FROM 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 |
||
132 | 132 | <tr> |
133 | 133 | <td ><strong>Event</strong></td> |
134 | 134 | <?php |
135 | - $sql = 'SELECT * FROM groups g ORDER BY '.$group_sorting_name; |
|
135 | + $sql = 'SELECT * FROM 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)) { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | if ($filter == '') { |
164 | 164 | $sql .= ' |
165 | - AND '.$whereTwoMonth.' |
|
165 | + AND '.$whereTwoMonth . ' |
|
166 | 166 | ORDER BY |
167 | 167 | e.date'; |
168 | 168 | } elseif ($filter == 'all') { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } elseif ($filter != '') { |
173 | 173 | $sql .= " |
174 | 174 | AND e.type = '$filter' |
175 | - AND ".$whereTwoMonth.' |
|
175 | + AND " . $whereTwoMonth . ' |
|
176 | 176 | ORDER BY |
177 | 177 | e.date'; |
178 | 178 | } |
@@ -186,31 +186,31 @@ discard block |
||
186 | 186 | echo '<tr>'; |
187 | 187 | echo '<td >'; |
188 | 188 | setlocale(LC_TIME, $lang_locale); //de_DE |
189 | - echo '<a href="event.php?id='.$row['id'].'">'; |
|
189 | + echo '<a href="event.php?id=' . $row['id'] . '">'; |
|
190 | 190 | echo strftime($time_format_short, strtotime($row['sundayDate'])); // %a, <strong>%e. %b</strong>, KW%V |
191 | 191 | echo '</a>'; |
192 | 192 | |
193 | 193 | //$row['sundayDate'] |
194 | 194 | if (!empty($row['eventType'])) { |
195 | - echo '<br /><em> '.$row['eventType'].'</em>'; |
|
195 | + echo '<br /><em> ' . $row['eventType'] . '</em>'; |
|
196 | 196 | } |
197 | 197 | if (!empty($row['eventSubType'])) { |
198 | - echo ' - <em>'.$row['eventSubType'].'</em>'; |
|
198 | + echo ' - <em>' . $row['eventSubType'] . '</em>'; |
|
199 | 199 | } |
200 | 200 | if (!empty($row['eventLocation'])) { |
201 | - echo '<br /><em> '.$row['eventLocation'].'</em>'; |
|
201 | + echo '<br /><em> ' . $row['eventLocation'] . '</em>'; |
|
202 | 202 | } |
203 | 203 | if (!empty($row['name'])) { |
204 | - echo '<br /><em> '.$row['name'].'</em>'; |
|
204 | + echo '<br /><em> ' . $row['name'] . '</em>'; |
|
205 | 205 | } |
206 | 206 | if (!empty($row['eventGroup'])) { |
207 | - echo '<br /><strong> '.$row['eventGroup'].'</strong>'; |
|
207 | + echo '<br /><strong> ' . $row['eventGroup'] . '</strong>'; |
|
208 | 208 | } |
209 | 209 | if (!empty($row['sermonTitle'])) { |
210 | - echo ': '.$row['sermonTitle']; |
|
210 | + echo ': ' . $row['sermonTitle']; |
|
211 | 211 | } |
212 | 212 | if (!empty($row['bibleVerse'])) { |
213 | - echo ' <em>('.$row['bibleVerse'].')</em>'; |
|
213 | + echo ' <em>(' . $row['bibleVerse'] . ')</em>'; |
|
214 | 214 | } |
215 | 215 | echo '</td>'; |
216 | 216 | |
@@ -242,16 +242,16 @@ discard block |
||
242 | 242 | if ($previousName == '') { |
243 | 243 | // new name |
244 | 244 | echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : ''; |
245 | - echo $name.' <em>('.$viewPeople['role']; |
|
245 | + echo $name . ' <em>(' . $viewPeople['role']; |
|
246 | 246 | } elseif ($previousName != $name) { |
247 | 247 | echo ')</em>'; |
248 | 248 | echo ($viewPeople['userId'] != $sessionUserId) ? '</strong>' : ''; |
249 | 249 | echo '<br />'; // line break from previous name |
250 | 250 | // new name |
251 | 251 | echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : ''; |
252 | - echo $name.' <em>('.$viewPeople['role']; |
|
252 | + echo $name . ' <em>(' . $viewPeople['role']; |
|
253 | 253 | } else { |
254 | - echo ', '.$viewPeople['role']; |
|
254 | + echo ', ' . $viewPeople['role']; |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | $peopleInEvent = true; |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
39 | 39 | $sql = "UPDATE 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 |
||
50 | 50 | |
51 | 51 | $sql = ("INSERT INTO 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 |
||
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 --> |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | } else { |
49 | 49 | $urlFilters = ''; |
50 | 50 | if (isset($_SESSION['lastEventsFilter'])) { |
51 | - $urlFilters = '&filter='.$_SESSION['lastEventsFilter']; |
|
51 | + $urlFilters = '&filter=' . $_SESSION['lastEventsFilter']; |
|
52 | 52 | } |
53 | - header('Location: events.php?view=all'.$urlFilters); |
|
53 | + header('Location: events.php?view=all' . $urlFilters); |
|
54 | 54 | exit; |
55 | 55 | } |
56 | 56 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | session_destroy(); |
71 | 71 | header('Location: login.php'); |
72 | 72 | } else { |
73 | - header('Location: events.php?view='.$sessionUserID); |
|
73 | + header('Location: events.php?view=' . $sessionUserID); |
|
74 | 74 | exit; |
75 | 75 | } |
76 | 76 | } |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | if ($editskillID != '') { |
109 | 109 | $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')"); |
110 | 110 | if (!mysqli_query(db(), $sql)) { |
111 | - die('Error: '.mysqli_error(db())); |
|
111 | + die('Error: ' . mysqli_error(db())); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | // After we have inserted the data, we want to head back to the main page |
115 | - header('Location: index.php#section'.$editeventID); |
|
115 | + header('Location: index.php#section' . $editeventID); |
|
116 | 116 | exit; |
117 | 117 | } |
118 | 118 | |
@@ -125,12 +125,12 @@ discard block |
||
125 | 125 | |
126 | 126 | $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')"); |
127 | 127 | if (!mysqli_query(db(), $sql)) { |
128 | - die('Error: '.mysqli_error(db())); |
|
128 | + die('Error: ' . mysqli_error(db())); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | 132 | // After we have inserted the data, we want to head back to the main page |
133 | - header('Location: index.php#section'.$editeventID); |
|
133 | + header('Location: index.php#section' . $editeventID); |
|
134 | 134 | exit; |
135 | 135 | } |
136 | 136 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $result = mysqli_query(db(), $mysqli_query) or die(mysqli_error(db())); |
177 | 177 | $row = mysqli_fetch_object($result); |
178 | 178 | |
179 | - echo $row->name.'s'; |
|
179 | + echo $row->name . 's'; |
|
180 | 180 | } elseif ($_SESSION['onlyShowUserEvents'] == '1') { |
181 | 181 | echo 'My Events'; |
182 | 182 | } else { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | <?php if (!empty($pendingSwaps) && $pendingSwaps > 0): |
204 | 204 | if ($pendingSwaps > 1) { |
205 | - $swapsMessage = $pendingSwaps.' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.'; |
|
205 | + $swapsMessage = $pendingSwaps . ' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.'; |
|
206 | 206 | } else { |
207 | 207 | $swapsMessage = 'A swap is pending approval. An email has been sent to the person covering to approve the swap.'; |
208 | 208 | } ?> |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | WHERE e.type = '$filter' |
269 | 269 | AND e.date >= DATE(NOW()) |
270 | 270 | AND e.removed = 0 |
271 | - ORDER BY ".$dateOrderBy; |
|
271 | + ORDER BY " . $dateOrderBy; |
|
272 | 272 | } else { |
273 | 273 | $sql = "SELECT |
274 | 274 | DISTINCT e.id AS id, |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | WHERE e.date >= DATE(NOW()) |
296 | 296 | AND ur.userId = '$view' |
297 | 297 | AND e.removed = 0 |
298 | - ORDER BY ".$dateOrderBy; |
|
298 | + ORDER BY " . $dateOrderBy; |
|
299 | 299 | } |
300 | 300 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
301 | 301 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $newMonth = strftime('%B %Y', strtotime($row->sundayDate)); |
314 | 314 | if ($month != $newMonth) { |
315 | 315 | $month = $newMonth; |
316 | - echo '<li class="time-label"><span class="bg-green">'.$month.'</span></li>'; |
|
316 | + echo '<li class="time-label"><span class="bg-green">' . $month . '</span></li>'; |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | // Event details?> |
@@ -327,9 +327,9 @@ discard block |
||
327 | 327 | <h4><?php |
328 | 328 | echo date('jS: ', strtotime($row->sundayDate)); |
329 | 329 | if ($eventName != '') { |
330 | - echo '<strong>'.$eventName.'</strong><br />'.$subType.' - <em>'.$type.'</em>'; |
|
330 | + echo '<strong>' . $eventName . '</strong><br />' . $subType . ' - <em>' . $type . '</em>'; |
|
331 | 331 | } else { |
332 | - echo $subType.' - <em>'.$type.'</em>'; |
|
332 | + echo $subType . ' - <em>' . $type . '</em>'; |
|
333 | 333 | } ?> |
334 | 334 | </h4> |
335 | 335 | </a> |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | <?php //<p><strong>Rehearsal:</strong> <?php |
342 | 342 | //echo ($row->rehearsalDateFormatted = "0000-00-00 00:00:00") ? "none" : strftime(siteSettings()->time_format_normal,strtotime($row->rehearsalDateFormatted));</p>?> |
343 | 343 | |
344 | - <p><strong><?php echo $row->eventGroup ? $row->eventGroup.': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '('.$row->bibleVerse.')' : '' ?></p> |
|
344 | + <p><strong><?php echo $row->eventGroup ? $row->eventGroup . ': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '(' . $row->bibleVerse . ')' : '' ?></p> |
|
345 | 345 | |
346 | 346 | <p><strong>Location:</strong> <?php echo $row->eventLocation; ?></p> |
347 | 347 | |
@@ -407,16 +407,16 @@ discard block |
||
407 | 407 | } else { |
408 | 408 | echo '</ul>'; |
409 | 409 | } |
410 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
410 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
411 | 411 | echo '<ul>'; |
412 | 412 | } |
413 | 413 | |
414 | 414 | echo '<li>'; |
415 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
415 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
416 | 416 | echo $viewPeople->name; |
417 | 417 | |
418 | 418 | if ($viewPeople->rolename != '') { |
419 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
419 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
420 | 420 | } else { |
421 | 421 | // If there is no skill, we don't need to mention this. |
422 | 422 | } |
@@ -442,9 +442,9 @@ discard block |
||
442 | 442 | |
443 | 443 | <?php |
444 | 444 | if (isAdmin() || $userisBandAdmin || $userisEventEditor) { |
445 | - echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=".$eventID."'><i class='fa fa-pencil'></i><span> Edit</span></a> "; /* Edit event */ |
|
446 | - echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=".$eventID."'><i class='fa fa-pencil'></i><span> Copy</span></a> "; /* Edit event */ |
|
447 | - echo " <a class ='btn btn-primary' href='emailEvent.php?event=".$eventID."'><i class='fa fa-envelope-o'></i><span> Send email</span></a> "; /* Send email */ |
|
445 | + echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> Edit</span></a> "; /* Edit event */ |
|
446 | + echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> Copy</span></a> "; /* Edit event */ |
|
447 | + echo " <a class ='btn btn-primary' href='emailEvent.php?event=" . $eventID . "'><i class='fa fa-envelope-o'></i><span> Send email</span></a> "; /* Send email */ |
|
448 | 448 | } |
449 | 449 | if (isAdmin()) { |
450 | 450 | //echo "<a class='btn btn-primary' href='index.php?notifyEveryone=true&eventID=$eventID'><i class='fa fa-envelope-o'></i><span> Send email</span></a> "; /* Send email */ |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | |
454 | 454 | echo "<ul class='dropdown-menu'>"; |
455 | 455 | |
456 | - echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */ |
|
456 | + echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */ |
|
457 | 457 | |
458 | 458 | echo '</ul>'; |
459 | 459 | } ?> |
@@ -14,7 +14,7 @@ discard block |
||
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 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | if ($role && $assignTo) { |
35 | 35 | $sql = "UPDATE roles r SET r.groupId = '$assignTo' WHERE r.id = '$role'"; |
36 | 36 | if (!mysqli_query(db(), $sql)) { |
37 | - die('Error: '.mysqli_error(db())); |
|
37 | + die('Error: ' . mysqli_error(db())); |
|
38 | 38 | } |
39 | 39 | header('Location: roles.php'); |
40 | 40 | exit; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $sql = "INSERT INTO roles (name, description, rehersalId, groupId) |
71 | 71 | VALUES ('$newrole', '$newrole', $rehersal, $groupId)"; |
72 | 72 | if (!mysqli_query(db(), $sql)) { |
73 | - die('Error: '.mysqli_error(db())); |
|
73 | + die('Error: ' . mysqli_error(db())); |
|
74 | 74 | } |
75 | 75 | } else { |
76 | 76 | // Handle renaming of the roles |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | $i = 1; |
104 | 104 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
105 | 105 | if ($type == 'option') { |
106 | - $list = $list."<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
106 | + $list = $list . "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
107 | 107 | } elseif ($type == 'li') { |
108 | - $list = $list.'<li>'.$row['name'].'</li>'; |
|
108 | + $list = $list . '<li>' . $row['name'] . '</li>'; |
|
109 | 109 | } elseif ($type == 'li-a') { |
110 | - $list = $list."<li><a href='roles.php?role=".$roleId.'&assignto='.$row['id']."'>".$row['name'].'</a></li>'; |
|
110 | + $list = $list . "<li><a href='roles.php?role=" . $roleId . '&assignto=' . $row['id'] . "'>" . $row['name'] . '</a></li>'; |
|
111 | 111 | } |
112 | 112 | $i++; |
113 | 113 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $group = $row['groupId']; |
174 | 174 | $down = $group + 1; |
175 | 175 | $up = $group - 1; |
176 | - echo '<div><strong>'.$groupname.'</strong><br />'; |
|
176 | + echo '<div><strong>' . $groupname . '</strong><br />'; |
|
177 | 177 | } |
178 | 178 | // Print text input box if a role exists for the group. |
179 | 179 | // Allows user to update role names and move roles between groups |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
57 | 57 | if ($action == 'update') { |
58 | 58 | //if ($language='de-de') |
59 | 59 | if ($rowSettings['lang_locale'] == 'en_GB') { |
60 | - executeDbSql("update settings set lang_locale = 'de_DE'"); // de_DE |
|
60 | + executeDbSql("update settings set lang_locale = 'de_DE'"); // de_DE |
|
61 | 61 | executeDbSql("update 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 settings set time_format_normal = '%d.%m.%Y %H:%M '"); // de_DE: %d.%m.%Y %H:%M |
63 | - executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V |
|
63 | + executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V |
|
64 | 64 | executeDbSql("update settings set time_zone = 'Europe/Berlin'"); //de_DE: Europe/Berlin |
65 | 65 | executeDbSql("update settings set google_group_calendar = ''"); |
66 | 66 | executeDbSql("update 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 settings set lang_locale = 'en_GB'"); // de_DE |
|
70 | + executeDbSql("update settings set lang_locale = 'en_GB'"); // de_DE |
|
71 | 71 | executeDbSql("update 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 settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M |
73 | - executeDbSql("update 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 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 settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin |
75 | 75 | executeDbSql("update settings set google_group_calendar = ''"); |
76 | 76 | executeDbSql("update 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 |
||
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> <br>'; |
|
85 | + $updateNotification = 'Settings updated successfully to: ' . $rowSettings['lang_locale'] . ' <br> <br>'; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | $formatting = 'true'; |
@@ -94,8 +94,8 @@ discard block |
||
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> <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> <br> |
|
99 | 99 | |
100 | 100 | <?php |
101 | 101 | if ($updateNotification == '') { |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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> |
@@ -110,7 +110,7 @@ discard block |
||
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 |
||
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 | → |
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 |
||
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> |