@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | } else { |
51 | 51 | $urlFilters = ''; |
52 | 52 | if (isset($_SESSION['lastEventsFilter'])) { |
53 | - $urlFilters = '&filter='.$_SESSION['lastEventsFilter']; |
|
53 | + $urlFilters = '&filter=' . $_SESSION['lastEventsFilter']; |
|
54 | 54 | } |
55 | - header('Location: events.php?view=all'.$urlFilters); |
|
55 | + header('Location: events.php?view=all' . $urlFilters); |
|
56 | 56 | exit; |
57 | 57 | } |
58 | 58 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | session_destroy(); |
73 | 73 | header('Location: login.php'); |
74 | 74 | } else { |
75 | - header('Location: events.php?view='.$sessionUserID); |
|
75 | + header('Location: events.php?view=' . $sessionUserID); |
|
76 | 76 | exit; |
77 | 77 | } |
78 | 78 | } |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | if ($editskillID != '') { |
111 | 111 | $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')"); |
112 | 112 | if (!mysqli_query(db(), $sql)) { |
113 | - exit('Error: '.mysqli_error(db())); |
|
113 | + exit('Error: ' . mysqli_error(db())); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | // After we have inserted the data, we want to head back to the main page |
117 | - header('Location: index.php#section'.$editeventID); |
|
117 | + header('Location: index.php#section' . $editeventID); |
|
118 | 118 | exit; |
119 | 119 | } |
120 | 120 | |
@@ -127,12 +127,12 @@ discard block |
||
127 | 127 | |
128 | 128 | $sql = ("INSERT INTO eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')"); |
129 | 129 | if (!mysqli_query(db(), $sql)) { |
130 | - exit('Error: '.mysqli_error(db())); |
|
130 | + exit('Error: ' . mysqli_error(db())); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 | |
134 | 134 | // After we have inserted the data, we want to head back to the main page |
135 | - header('Location: index.php#section'.$editeventID); |
|
135 | + header('Location: index.php#section' . $editeventID); |
|
136 | 136 | exit; |
137 | 137 | } |
138 | 138 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $result = mysqli_query(db(), $mysqli_query) or exit(mysqli_error(db())); |
179 | 179 | $row = mysqli_fetch_object($result); |
180 | 180 | |
181 | - echo $row->name.'s'; |
|
181 | + echo $row->name . 's'; |
|
182 | 182 | } elseif ($_SESSION['onlyShowUserEvents'] == '1') { |
183 | 183 | echo 'My Events'; |
184 | 184 | } else { |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | |
205 | 205 | <?php if (!empty($pendingSwaps) && $pendingSwaps > 0) { |
206 | 206 | if ($pendingSwaps > 1) { |
207 | - $swapsMessage = $pendingSwaps.' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.'; |
|
207 | + $swapsMessage = $pendingSwaps . ' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.'; |
|
208 | 208 | } else { |
209 | 209 | $swapsMessage = 'A swap is pending approval. An email has been sent to the person covering to approve the swap.'; |
210 | 210 | } ?> |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | WHERE e.type = '$filter' |
272 | 272 | AND e.date >= DATE(NOW()) |
273 | 273 | AND e.removed = 0 |
274 | - ORDER BY ".$dateOrderBy; |
|
274 | + ORDER BY " . $dateOrderBy; |
|
275 | 275 | } else { |
276 | 276 | $sql = "SELECT |
277 | 277 | DISTINCT e.id AS id, |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | WHERE e.date >= DATE(NOW()) |
299 | 299 | AND ur.userId = '$view' |
300 | 300 | AND e.removed = 0 |
301 | - ORDER BY ".$dateOrderBy; |
|
301 | + ORDER BY " . $dateOrderBy; |
|
302 | 302 | } |
303 | 303 | $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); |
304 | 304 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $newMonth = strftime('%B %Y', strtotime($row->sundayDate)); |
317 | 317 | if ($month != $newMonth) { |
318 | 318 | $month = $newMonth; |
319 | - echo '<li class="time-label"><span class="bg-green">'.$month.'</span></li>'; |
|
319 | + echo '<li class="time-label"><span class="bg-green">' . $month . '</span></li>'; |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | // Event details?> |
@@ -330,9 +330,9 @@ discard block |
||
330 | 330 | <h4><?php |
331 | 331 | echo date('jS: ', strtotime($row->sundayDate)); |
332 | 332 | if ($eventName != '') { |
333 | - echo '<strong>'.$eventName.'</strong><br />'.$subType.' - <em>'.$type.'</em>'; |
|
333 | + echo '<strong>' . $eventName . '</strong><br />' . $subType . ' - <em>' . $type . '</em>'; |
|
334 | 334 | } else { |
335 | - echo $subType.' - <em>'.$type.'</em>'; |
|
335 | + echo $subType . ' - <em>' . $type . '</em>'; |
|
336 | 336 | } ?> |
337 | 337 | </h4> |
338 | 338 | </a> |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | <?php //<p><strong>Rehearsal:</strong> <?php |
345 | 345 | //echo ($row->rehearsalDateFormatted = "0000-00-00 00:00:00") ? "none" : strftime(siteSettings()->time_format_normal,strtotime($row->rehearsalDateFormatted));</p>?> |
346 | 346 | |
347 | - <p><strong><?php echo $row->eventGroup ? $row->eventGroup.': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '('.$row->bibleVerse.')' : '' ?></p> |
|
347 | + <p><strong><?php echo $row->eventGroup ? $row->eventGroup . ': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '(' . $row->bibleVerse . ')' : '' ?></p> |
|
348 | 348 | |
349 | 349 | <p><strong>Location:</strong> <?php echo $row->eventLocation; ?></p> |
350 | 350 | |
@@ -409,16 +409,16 @@ discard block |
||
409 | 409 | } else { |
410 | 410 | echo '</ul>'; |
411 | 411 | } |
412 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
412 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
413 | 413 | echo '<ul>'; |
414 | 414 | } |
415 | 415 | |
416 | 416 | echo '<li>'; |
417 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
417 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
418 | 418 | echo $viewPeople->name; |
419 | 419 | |
420 | 420 | if ($viewPeople->rolename != '') { |
421 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
421 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
422 | 422 | } else { |
423 | 423 | // If there is no skill, we don't need to mention this. |
424 | 424 | } |
@@ -445,9 +445,9 @@ discard block |
||
445 | 445 | |
446 | 446 | <?php |
447 | 447 | if (isAdmin() || $userisBandAdmin || $userisEventEditor) { |
448 | - 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 */ |
|
449 | - 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 */ |
|
450 | - 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 | + 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 */ |
|
449 | + 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 */ |
|
450 | + 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 */ |
|
451 | 451 | } |
452 | 452 | if (isAdmin()) { |
453 | 453 | //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 */ |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | |
457 | 457 | echo "<ul class='dropdown-menu'>"; |
458 | 458 | |
459 | - echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */ |
|
459 | + echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */ |
|
460 | 460 | |
461 | 461 | echo '</ul>'; |
462 | 462 | } ?> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if (($userisBandAdmin) || ($userisEventEditor) || (isAdmin())) { |
48 | 48 | // Just continue the code |
49 | 49 | } else { |
50 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
50 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if ($userisBandAdmin) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $location = $row['location']; |
85 | 85 | $locationname = $row['locationname']; |
86 | 86 | if ($action == 'edit') { |
87 | - $formaction = '?action=edit&id='.$id; |
|
87 | + $formaction = '?action=edit&id=' . $id; |
|
88 | 88 | } else { |
89 | 89 | $formaction = ''; |
90 | 90 | } |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | |
139 | 139 | // convert format of date |
140 | 140 | $date = str_replace('/', '-', $date); // ensure it isn't read as mm/dd/yyyy |
141 | - $date = strftime('%Y-%m-%d', strtotime($date.' 00:00:00')); |
|
142 | - $date = $date.' '.$time.':00'; |
|
141 | + $date = strftime('%Y-%m-%d', strtotime($date . ' 00:00:00')); |
|
142 | + $date = $date . ' ' . $time . ':00'; |
|
143 | 143 | $date = mysqli_real_escape_string(db(), $date); |
144 | 144 | |
145 | 145 | if ($action == 'edit') { |
@@ -209,10 +209,10 @@ discard block |
||
209 | 209 | //if ($userisBandAdmin) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid=2)"; |
210 | 210 | //if ($userisEventEditor) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from skills where groupid!=2)"; |
211 | 211 | if ($userisBandAdmin) { |
212 | - $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where groupid in (2,3,4))'; |
|
212 | + $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where groupid in (2,3,4))'; |
|
213 | 213 | } |
214 | 214 | if ($userisEventEditor) { |
215 | - $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from skills where not (groupid in (2,3,4)))'; |
|
215 | + $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from skills where not (groupid in (2,3,4)))'; |
|
216 | 216 | } |
217 | 217 | mysqli_query(db(), $delete_all_sql) or exit(mysqli_error(db())); |
218 | 218 | } |
@@ -220,9 +220,9 @@ discard block |
||
220 | 220 | // redirect |
221 | 221 | if (isset($_SESSION['lastEventsFilter'])) { |
222 | 222 | $type = $_SESSION['lastEventsFilter']; |
223 | - header('Location: events.php?view=all&filter='.$type.'#event'.$eventID); |
|
223 | + header('Location: events.php?view=all&filter=' . $type . '#event' . $eventID); |
|
224 | 224 | } else { |
225 | - header('Location: events.php?view=all#event'.$eventID); |
|
225 | + header('Location: events.php?view=all#event' . $eventID); |
|
226 | 226 | } |
227 | 227 | exit; |
228 | 228 | } |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | while ($ob = mysqli_fetch_object($result)) { |
300 | 300 | if (!(isset($type) && $ob->id == $type)) { |
301 | 301 | $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime)); |
302 | - 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>'; |
|
302 | + 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 | 303 | } |
304 | 304 | } ?> |
305 | 305 | </select> |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
326 | 326 | if (isset($subtype) && $row['id'] == $subtype) { |
327 | 327 | } else { |
328 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
328 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
329 | 329 | } |
330 | 330 | } ?> |
331 | 331 | </select> |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
354 | 354 | if (isset($location) && $row['id'] == $location) { |
355 | 355 | } else { |
356 | - echo "<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
356 | + echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
357 | 357 | } |
358 | 358 | } ?> |
359 | 359 | </select> |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
485 | 485 | if (isset($type) && $row['id'] == $type) { |
486 | 486 | } else { |
487 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
487 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
488 | 488 | } |
489 | 489 | } ?> |
490 | 490 | </select> |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | <?php foreach ($role->getUserRoles() as $userRole) { ?> |
555 | 555 | <?php if (!$userRole->getReserve()) { ?> |
556 | 556 | <?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?> |
557 | - <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option> |
|
557 | + <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option> |
|
558 | 558 | <?php } else { ?> |
559 | 559 | <?php $countReserve += 1 ?> |
560 | 560 | <?php } //!userRole->getReserve?> |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | <?php foreach ($role->getUserRoles() as $userRole) { ?> |
566 | 566 | <?php if ($userRole->getReserve()) { ?> |
567 | 567 | <?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?> |
568 | - <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option> |
|
568 | + <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option> |
|
569 | 569 | <?php } ?> |
570 | 570 | <?php } //users?> |
571 | 571 | </optgroup> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | exit; |
36 | 36 | } |
37 | 37 | if (!isAdmin()) { |
38 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
38 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
39 | 39 | exit; |
40 | 40 | } |
41 | 41 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | <?php |
119 | 119 | } else { |
120 | - echo '<div class="box-body">'.$sentSuccess.'</div>'; |
|
120 | + echo '<div class="box-body">' . $sentSuccess . '</div>'; |
|
121 | 121 | } |
122 | 122 | ?> |
123 | 123 | </div> |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | FROM eventTypes et |
114 | 114 | WHERE id IN (SELECT e.type |
115 | 115 | FROM events e |
116 | - WHERE '.$whereTwoMonth.' |
|
116 | + WHERE '.$whereTwoMonth . ' |
|
117 | 117 | AND e.removed = 0) |
118 | 118 | ORDER BY name'; |
119 | 119 | $result = mysqli_query(db(), $filter_sql) or exit(mysqli_error(db())); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | <tr> |
135 | 135 | <td ><strong>Event</strong></td> |
136 | 136 | <?php |
137 | - $sql = 'SELECT * FROM groups g ORDER BY '.$group_sorting_name; |
|
137 | + $sql = 'SELECT * FROM groups g ORDER BY ' . $group_sorting_name; |
|
138 | 138 | $result = mysqli_query(db(), $sql) or exit(mysqli_error(db())); |
139 | 139 | |
140 | 140 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | if ($filter == '') { |
166 | 166 | $sql .= ' |
167 | - AND '.$whereTwoMonth.' |
|
167 | + AND '.$whereTwoMonth . ' |
|
168 | 168 | ORDER BY |
169 | 169 | e.date'; |
170 | 170 | } elseif ($filter == 'all') { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } elseif ($filter != '') { |
175 | 175 | $sql .= " |
176 | 176 | AND e.type = '$filter' |
177 | - AND ".$whereTwoMonth.' |
|
177 | + AND " . $whereTwoMonth . ' |
|
178 | 178 | ORDER BY |
179 | 179 | e.date'; |
180 | 180 | } |
@@ -188,31 +188,31 @@ discard block |
||
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> '.$row['eventType'].'</em>'; |
|
197 | + echo '<br /><em> ' . $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> '.$row['eventLocation'].'</em>'; |
|
203 | + echo '<br /><em> ' . $row['eventLocation'] . '</em>'; |
|
204 | 204 | } |
205 | 205 | if (!empty($row['name'])) { |
206 | - echo '<br /><em> '.$row['name'].'</em>'; |
|
206 | + echo '<br /><em> ' . $row['name'] . '</em>'; |
|
207 | 207 | } |
208 | 208 | if (!empty($row['eventGroup'])) { |
209 | - echo '<br /><strong> '.$row['eventGroup'].'</strong>'; |
|
209 | + echo '<br /><strong> ' . $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 | echo '</td>'; |
218 | 218 | |
@@ -244,16 +244,16 @@ discard block |
||
244 | 244 | if ($previousName == '') { |
245 | 245 | // new name |
246 | 246 | echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : ''; |
247 | - echo $name.' <em>('.$viewPeople['role']; |
|
247 | + echo $name . ' <em>(' . $viewPeople['role']; |
|
248 | 248 | } elseif ($previousName != $name) { |
249 | 249 | echo ')</em>'; |
250 | 250 | echo ($viewPeople['userId'] != $sessionUserId) ? '</strong>' : ''; |
251 | 251 | echo '<br />'; // line break from previous name |
252 | 252 | // new name |
253 | 253 | echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : ''; |
254 | - echo $name.' <em>('.$viewPeople['role']; |
|
254 | + echo $name . ' <em>(' . $viewPeople['role']; |
|
255 | 255 | } else { |
256 | - echo ', '.$viewPeople['role']; |
|
256 | + echo ', ' . $viewPeople['role']; |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | $peopleInEvent = true; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | exit; |
36 | 36 | } |
37 | 37 | if (!isAdmin()) { |
38 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
38 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
39 | 39 | exit; |
40 | 40 | } |
41 | 41 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if ($editskillID != '') { |
72 | 72 | $sql = ("INSERT INTO eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')"); |
73 | 73 | if (!mysqli_query(db(), $sql)) { |
74 | - exit('Error: '.mysqli_error(db())); |
|
74 | + exit('Error: ' . mysqli_error(db())); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | // After we have inserted the data, we want to head back to the main page |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | $sql = ("INSERT INTO eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')"); |
90 | 90 | if (!mysqli_query(db(), $sql)) { |
91 | - exit('Error: '.mysqli_error(db())); |
|
91 | + exit('Error: ' . mysqli_error(db())); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | exit; |
36 | 36 | } |
37 | 37 | if (!isAdmin()) { |
38 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
38 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
39 | 39 | exit; |
40 | 40 | } |
41 | 41 | |
@@ -59,20 +59,20 @@ discard block |
||
59 | 59 | if ($action == 'update') { |
60 | 60 | //if ($language='de-de') |
61 | 61 | if ($rowSettings['lang_locale'] == 'en_GB') { |
62 | - executeDbSql("update settings set lang_locale = 'de_DE'"); // de_DE |
|
62 | + executeDbSql("update settings set lang_locale = 'de_DE'"); // de_DE |
|
63 | 63 | 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 |
64 | 64 | executeDbSql("update settings set time_format_normal = '%d.%m.%Y %H:%M '"); // de_DE: %d.%m.%Y %H:%M |
65 | - executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V |
|
65 | + executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V |
|
66 | 66 | executeDbSql("update settings set time_zone = 'Europe/Berlin'"); //de_DE: Europe/Berlin |
67 | 67 | executeDbSql("update settings set google_group_calendar = ''"); |
68 | 68 | 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'"); |
69 | 69 | } |
70 | 70 | //else |
71 | 71 | if ($rowSettings['lang_locale'] == 'de_DE') { |
72 | - executeDbSql("update settings set lang_locale = 'en_GB'"); // de_DE |
|
72 | + executeDbSql("update settings set lang_locale = 'en_GB'"); // de_DE |
|
73 | 73 | executeDbSql("update settings set time_format_long = '%A, %B %e @ %I:%M %p'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V |
74 | 74 | executeDbSql("update settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M |
75 | - executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V |
|
75 | + executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V |
|
76 | 76 | executeDbSql("update settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin |
77 | 77 | executeDbSql("update settings set google_group_calendar = ''"); |
78 | 78 | 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'"); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $resultSettings = mysqli_query(db(), $sqlSettings) or exit(mysqli_error(db())); |
85 | 85 | $rowSettings = mysqli_fetch_array($resultSettings, MYSQLI_ASSOC); |
86 | 86 | |
87 | - $updateNotification = 'Settings updated successfully to: '.$rowSettings['lang_locale'].' <br> <br>'; |
|
87 | + $updateNotification = 'Settings updated successfully to: ' . $rowSettings['lang_locale'] . ' <br> <br>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | $formatting = 'true'; |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | <hr> |
97 | 97 | This page has only beta status. <br>Please do only use it in testing environments! |
98 | 98 | <hr> |
99 | - <?php echo 'Your web browser identifies your language as: '.$language; ?><br> |
|
100 | - <?php echo 'Church Rota is set to use: '.$rowSettings['lang_locale']; ?><br> <br> |
|
99 | + <?php echo 'Your web browser identifies your language as: ' . $language; ?><br> |
|
100 | + <?php echo 'Church Rota is set to use: ' . $rowSettings['lang_locale']; ?><br> <br> |
|
101 | 101 | |
102 | 102 | <?php |
103 | 103 | if ($updateNotification == '') { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | while ($ob = mysqli_fetch_object($result)) { |
91 | 91 | if (!(isset($type) && $ob->id == $type)) { |
92 | 92 | $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime)); |
93 | - 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>'; |
|
93 | + 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>'; |
|
94 | 94 | } |
95 | 95 | } ?> |
96 | 96 | </select> |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
117 | 117 | if (isset($subtype) && $row['id'] == $subtype) { |
118 | 118 | } else { |
119 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
119 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
120 | 120 | } |
121 | 121 | } ?> |
122 | 122 | </select> |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
145 | 145 | if (isset($location) && $row['id'] == $location) { |
146 | 146 | } else { |
147 | - echo "<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
147 | + echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
148 | 148 | } |
149 | 149 | } ?> |
150 | 150 | </select> |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
288 | 288 | if (isset($type) && $row['id'] == $type) { |
289 | 289 | } else { |
290 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
290 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
291 | 291 | } |
292 | 292 | } ?> |
293 | 293 | </select> |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | exit; |
17 | 17 | } |
18 | 18 | if (!isAdmin()) { |
19 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
19 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
20 | 20 | exit; |
21 | 21 | } |
22 | 22 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | if ($role && $assignTo) { |
37 | 37 | $sql = "UPDATE roles r SET r.groupId = '$assignTo' WHERE r.id = '$role'"; |
38 | 38 | if (!mysqli_query(db(), $sql)) { |
39 | - exit('Error: '.mysqli_error(db())); |
|
39 | + exit('Error: ' . mysqli_error(db())); |
|
40 | 40 | } |
41 | 41 | header('Location: roles.php'); |
42 | 42 | exit; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $sql = "INSERT INTO roles (name, description, rehersalId, groupId) |
73 | 73 | VALUES ('$newrole', '$newrole', $rehersal, $groupId)"; |
74 | 74 | if (!mysqli_query(db(), $sql)) { |
75 | - exit('Error: '.mysqli_error(db())); |
|
75 | + exit('Error: ' . mysqli_error(db())); |
|
76 | 76 | } |
77 | 77 | } else { |
78 | 78 | // Handle renaming of the roles |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | $i = 1; |
106 | 106 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
107 | 107 | if ($type == 'option') { |
108 | - $list = $list."<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
108 | + $list = $list . "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
109 | 109 | } elseif ($type == 'li') { |
110 | - $list = $list.'<li>'.$row['name'].'</li>'; |
|
110 | + $list = $list . '<li>' . $row['name'] . '</li>'; |
|
111 | 111 | } elseif ($type == 'li-a') { |
112 | - $list = $list."<li><a href='roles.php?role=".$roleId.'&assignto='.$row['id']."'>".$row['name'].'</a></li>'; |
|
112 | + $list = $list . "<li><a href='roles.php?role=" . $roleId . '&assignto=' . $row['id'] . "'>" . $row['name'] . '</a></li>'; |
|
113 | 113 | } |
114 | 114 | $i++; |
115 | 115 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $group = $row['groupId']; |
176 | 176 | $down = $group + 1; |
177 | 177 | $up = $group - 1; |
178 | - echo '<div><strong>'.$groupname.'</strong><br />'; |
|
178 | + echo '<div><strong>' . $groupname . '</strong><br />'; |
|
179 | 179 | } |
180 | 180 | // Print text input box if a role exists for the group. |
181 | 181 | // Allows user to update role names and move roles between groups |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | if ($availableCommits[0]['sha'] !== $commitHash) { |
95 | 95 | $updateAvailable = true; |
96 | 96 | |
97 | - $email = siteSettings()->getOwner().' <'.siteSettings()->getAdminEmailAddress().'>'; |
|
97 | + $email = siteSettings()->getOwner() . ' <' . siteSettings()->getAdminEmailAddress() . '>'; |
|
98 | 98 | $message = <<<'MESSAGE' |
99 | 99 | There is an update available for your installation of Rota. |
100 | 100 | |
@@ -116,23 +116,23 @@ discard block |
||
116 | 116 | WHERE |
117 | 117 | date >= CURDATE() |
118 | 118 | AND date_format( date , "%y-%m-%d" ) |
119 | - <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert.' DAY ) , "%y-%m-%d" )'; |
|
119 | + <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert . ' DAY ) , "%y-%m-%d" )'; |
|
120 | 120 | $resultEvents = mysqli_query(db(), $sqlEvents) or exit(mysqli_error(db())); |
121 | 121 | $i = 0; |
122 | 122 | while ($rowEvents = mysqli_fetch_array($resultEvents, MYSQLI_ASSOC)) { |
123 | 123 | $usersNotified = notifyEveryoneForEvent($rowEvents['id']); |
124 | 124 | if (count($usersNotified) > 0) { |
125 | - $out = $out.'Automatic notifications sent to users ('.implode(', ', $usersNotified).') for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n"; |
|
125 | + $out = $out . 'Automatic notifications sent to users (' . implode(', ', $usersNotified) . ') for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n"; |
|
126 | 126 | } else { |
127 | - $out = $out.'No notifications sent for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n"; |
|
127 | + $out = $out . 'No notifications sent for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n"; |
|
128 | 128 | } |
129 | 129 | $i = $i + 1; |
130 | 130 | } |
131 | 131 | if ($i == 0) { |
132 | - $out = $out.'No events found to automatically notify for.'; |
|
132 | + $out = $out . 'No events found to automatically notify for.'; |
|
133 | 133 | } |
134 | 134 | } else { |
135 | - $out = $out.'Automatic notifications are disabled.'; |
|
135 | + $out = $out . 'Automatic notifications are disabled.'; |
|
136 | 136 | } ?> |
137 | 137 | <html> |
138 | 138 | <body> |