@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | if (isset($_SESSION['is_logged_in']) || $_SESSION['db_is_logged_in'] == true) { |
12 | 12 | // Just continue the code |
13 | 13 | } else { |
14 | - $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/event.php?id='.$eventId; |
|
14 | + $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/event.php?id=' . $eventId; |
|
15 | 15 | header('Location: login.php'); |
16 | 16 | exit; |
17 | 17 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <h2 class="box-title">Event Details</h2> |
61 | 61 | </div> |
62 | 62 | <div class="box-body"> |
63 | - <?php echo !empty($event->getName()) ? '<p><strong>Name:</strong> '.$event->getName().'</p>' : '' ?> |
|
63 | + <?php echo !empty($event->getName()) ? '<p><strong>Name:</strong> ' . $event->getName() . '</p>' : '' ?> |
|
64 | 64 | <p><strong>Date:</strong> <?php echo $event->getDate('d/m/y'); ?></p> |
65 | 65 | <p><strong>Location:</strong> <?php echo $event->getLocation()->getName() ?></p> |
66 | 66 | <p><strong>Type:</strong> <?php echo $event->getEventType()->getName() ?></p> |
@@ -160,16 +160,16 @@ discard block |
||
160 | 160 | } else { |
161 | 161 | echo '</ul>'; |
162 | 162 | } |
163 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
163 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
164 | 164 | echo '<ul>'; |
165 | 165 | } |
166 | 166 | |
167 | 167 | echo '<li>'; |
168 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
168 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
169 | 169 | echo $viewPeople->name; |
170 | 170 | |
171 | 171 | if ($viewPeople->rolename != '') { |
172 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
172 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
173 | 173 | } else { |
174 | 174 | // If there is no skill, we don't need to mention this. |
175 | 175 | } |
@@ -435,8 +435,10 @@ |
||
435 | 435 | |
436 | 436 | echo '</li>'; |
437 | 437 | } |
438 | - echo '</ul>'; else: |
|
438 | + echo '</ul>'; else { |
|
439 | + : |
|
439 | 440 | echo '<p>No roles assigned to this event.'; |
441 | + } |
|
440 | 442 | endif; ?> |
441 | 443 | </div><!-- /.user-roles --> |
442 | 444 | </div><!-- /.box-body --> |
@@ -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 cr_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 cr_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 | } ?> |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | WHERE e.type = '$filter' |
271 | 271 | AND e.date >= DATE(NOW()) |
272 | 272 | AND e.removed = 0 |
273 | - ORDER BY ".$dateOrderBy; |
|
273 | + ORDER BY " . $dateOrderBy; |
|
274 | 274 | } else { |
275 | 275 | $sql = "SELECT |
276 | 276 | 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 die(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 | |
@@ -416,16 +416,16 @@ discard block |
||
416 | 416 | } else { |
417 | 417 | echo '</ul>'; |
418 | 418 | } |
419 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
419 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
420 | 420 | echo '<ul>'; |
421 | 421 | } |
422 | 422 | |
423 | 423 | echo '<li>'; |
424 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
424 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
425 | 425 | echo $viewPeople->name; |
426 | 426 | |
427 | 427 | if ($viewPeople->rolename != '') { |
428 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
428 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
429 | 429 | } else { |
430 | 430 | // If there is no skill, we don't need to mention this. |
431 | 431 | } |
@@ -451,9 +451,9 @@ discard block |
||
451 | 451 | |
452 | 452 | <?php |
453 | 453 | if (isAdmin() || $userisBandAdmin || $userisEventEditor) { |
454 | - 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 */ |
|
455 | - 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 */ |
|
456 | - 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 */ |
|
454 | + 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 */ |
|
455 | + 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 */ |
|
456 | + 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 */ |
|
457 | 457 | } |
458 | 458 | if (isAdmin()) { |
459 | 459 | //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 */ |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | |
463 | 463 | echo "<ul class='dropdown-menu'>"; |
464 | 464 | |
465 | - echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */ |
|
465 | + echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */ |
|
466 | 466 | |
467 | 467 | echo '</ul>'; |
468 | 468 | } ?> |
@@ -14,7 +14,7 @@ |
||
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 |
@@ -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 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $sql = "UPDATE cr_eventGroups SET name = '$name', description = '$description' WHERE id = '$editid'"; |
41 | 41 | } |
42 | 42 | if (!mysqli_query(db(), $sql)) { |
43 | - die('Error: '.mysqli_error(db())); |
|
43 | + die('Error: ' . mysqli_error(db())); |
|
44 | 44 | } |
45 | 45 | } else { |
46 | 46 | $name = $_POST['seriesName']; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } else { |
55 | 55 | $sql = ("INSERT INTO cr_eventGroups (name, description) VALUES ('$name', '$description')"); |
56 | 56 | if (!mysqli_query(db(), $sql)) { |
57 | - die('Error: '.mysqli_error(db())); |
|
57 | + die('Error: ' . mysqli_error(db())); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | // After we have inserted the data, we want to head back to the main users page |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | |
98 | 98 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
99 | 99 | $seriesId = $row['id']; |
100 | - echo "<span id='".$seriesId."' class='edit'><strong>".$row['name'].'</strong></span>'; |
|
101 | - echo " <a href='series.php?method=remove&series=".$seriesId."'><i class='fa fa-close'></i></a><br />"; |
|
102 | - echo "<p id='".$seriesId."' class='edit'>".$row['description'].'</p>'; |
|
100 | + echo "<span id='" . $seriesId . "' class='edit'><strong>" . $row['name'] . '</strong></span>'; |
|
101 | + echo " <a href='series.php?method=remove&series=" . $seriesId . "'><i class='fa fa-close'></i></a><br />"; |
|
102 | + echo "<p id='" . $seriesId . "' class='edit'>" . $row['description'] . '</p>'; |
|
103 | 103 | echo '<hr />'; |
104 | 104 | } ?> |
105 | 105 | </div><!-- /.box-body --> |
@@ -142,10 +142,10 @@ |
||
142 | 142 | </form> |
143 | 143 | </div><!-- /.box --> |
144 | 144 | <?php |
145 | - if (isAdmin()) { |
|
146 | - ?> |
|
145 | + if (isAdmin()) { |
|
146 | + ?> |
|
147 | 147 | <div id="right"> |
148 | 148 | <div class="item"><a href="settings.php">Back to settings</a></div> |
149 | 149 | <?php |
150 | - } ?> |
|
150 | + } ?> |
|
151 | 151 | <?php include 'includes/footer.php'; ?> |
@@ -30,24 +30,24 @@ |
||
30 | 30 | switch ($_POST['action']) { |
31 | 31 | case 'approve': |
32 | 32 | $userId = approvePendingUser($id); |
33 | - mailNewUser($userId); |
|
34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | - break; |
|
33 | + mailNewUser($userId); |
|
34 | + header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | + break; |
|
36 | 36 | case 'merge': |
37 | 37 | $existingUserId = $_POST['existingUser']; |
38 | - $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | - mergePendingUserWithUserId($id, $existingUserId); |
|
40 | - mailNewUser($existingUserId); |
|
41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | - break; |
|
38 | + $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | + mergePendingUserWithUserId($id, $existingUserId); |
|
40 | + mailNewUser($existingUserId); |
|
41 | + header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | + break; |
|
43 | 43 | case 'decline': |
44 | 44 | declinePendingUser($id); |
45 | - break; |
|
45 | + break; |
|
46 | 46 | |
47 | 47 | default: |
48 | 48 | // code... |
49 | 49 | break; |
50 | - } |
|
50 | + } |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if (empty($id)) { |
@@ -28,25 +28,25 @@ |
||
28 | 28 | $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT); |
29 | 29 | |
30 | 30 | switch ($_POST['action']) { |
31 | - case 'approve': |
|
32 | - $userId = approvePendingUser($id); |
|
33 | - mailNewUser($userId); |
|
34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | - break; |
|
36 | - case 'merge': |
|
37 | - $existingUserId = $_POST['existingUser']; |
|
38 | - $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | - mergePendingUserWithUserId($id, $existingUserId); |
|
40 | - mailNewUser($existingUserId); |
|
41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | - break; |
|
43 | - case 'decline': |
|
44 | - declinePendingUser($id); |
|
45 | - break; |
|
46 | - |
|
47 | - default: |
|
48 | - // code... |
|
49 | - break; |
|
31 | + case 'approve': |
|
32 | + $userId = approvePendingUser($id); |
|
33 | + mailNewUser($userId); |
|
34 | + header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | + break; |
|
36 | + case 'merge': |
|
37 | + $existingUserId = $_POST['existingUser']; |
|
38 | + $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | + mergePendingUserWithUserId($id, $existingUserId); |
|
40 | + mailNewUser($existingUserId); |
|
41 | + header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | + break; |
|
43 | + case 'decline': |
|
44 | + declinePendingUser($id); |
|
45 | + break; |
|
46 | + |
|
47 | + default: |
|
48 | + // code... |
|
49 | + break; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 |
@@ -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 | |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | case 'approve': |
32 | 32 | $userId = approvePendingUser($id); |
33 | 33 | mailNewUser($userId); |
34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
34 | + header('Location: addUser.php?action=edit&user=' . $userId); |
|
35 | 35 | break; |
36 | 36 | case 'merge': |
37 | 37 | $existingUserId = $_POST['existingUser']; |
38 | 38 | $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
39 | 39 | mergePendingUserWithUserId($id, $existingUserId); |
40 | 40 | mailNewUser($existingUserId); |
41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
41 | + header('Location: addUser.php?action=edit&user=' . $existingUserId); |
|
42 | 42 | break; |
43 | 43 | case 'decline': |
44 | 44 | declinePendingUser($id); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | <div class="box box-primary"> |
91 | 91 | <div class="box-header"> |
92 | 92 | <h2 class="box-title"> |
93 | - <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName.' '.$user->lastName ?> |
|
93 | + <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName . ' ' . $user->lastName ?> |
|
94 | 94 | </h2> |
95 | 95 | </div> |
96 | 96 | <div class="box-body"> |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | <?php |
132 | 132 | $users = allUsersNames(); |
133 | 133 | foreach ($users as $existingUser): ?> |
134 | - <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName.' '.$existingUser->lastName ?></option> |
|
134 | + <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName . ' ' . $existingUser->lastName ?></option> |
|
135 | 135 | <?php endforeach; ?> |
136 | 136 | </select> |
137 | 137 | </div> |
@@ -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 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | skin='$skin'"; |
166 | 166 | |
167 | 167 | if (!mysqli_query(db(), $sql)) { |
168 | - die('Error: '.mysqli_error(db())); |
|
168 | + die('Error: ' . mysqli_error(db())); |
|
169 | 169 | } |
170 | 170 | header('Location: settings.php'); |
171 | 171 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | <!-- Content Header (Page header) --> |
193 | 193 | <section class="content-header"> |
194 | 194 | <h1>Settings |
195 | - <?php echo '<small>v'.$row['version'].'</small>'; ?> |
|
195 | + <?php echo '<small>v' . $row['version'] . '</small>'; ?> |
|
196 | 196 | </h1> |
197 | 197 | <ol class="breadcrumb"> |
198 | 198 | <li><a href="<?php echo siteSettings()->getSiteUrl() ?>"><i class="fa fa-dashboard"></i> Home</a></li> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } catch (\Exception $e) { |
35 | 35 | } |
36 | 36 | |
37 | -$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
|
37 | +$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
|
38 | 38 | $url = substr($url, 0, -12); // remove "/install.php" from url |
39 | 39 | |
40 | 40 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | //exit; |
49 | 49 | $conn->exec($sql); |
50 | 50 | } catch (\Exception $e) { |
51 | - echo 'Error (code: '.$e->getCode().') adding tables to database: '.$e->getMessage(); |
|
51 | + echo 'Error (code: ' . $e->getCode() . ') adding tables to database: ' . $e->getMessage(); |
|
52 | 52 | exit; |
53 | 53 | } |
54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $lastname = $_POST['lastname']; |
59 | 59 | $lastname = trim(strip_tags($lastname)); |
60 | 60 | |
61 | - $username = strtolower($firstname).'.'.strtolower($lastname); |
|
61 | + $username = strtolower($firstname) . '.' . strtolower($lastname); |
|
62 | 62 | |
63 | 63 | $password = $_POST['password']; |
64 | 64 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | try { |
83 | 83 | $user->save(); |
84 | 84 | } catch (\Exception $e) { |
85 | - echo 'Error (code: '.$e->getCode().') adding user to database: '.$e->getMessage(); |
|
85 | + echo 'Error (code: ' . $e->getCode() . ') adding user to database: ' . $e->getMessage(); |
|
86 | 86 | exit; |
87 | 87 | } |
88 | 88 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | |
180 | 180 | $settings->save(); |
181 | 181 | |
182 | - header('Location: login.php?username='.$username); // Move to the home page of the admin section |
|
182 | + header('Location: login.php?username=' . $username); // Move to the home page of the admin section |
|
183 | 183 | exit; |
184 | 184 | } |
185 | 185 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | The following error has occurred |
46 | 46 | <?php namespace TechWilk\Rota; |
47 | 47 | |
48 | -echo " on page '".$page."':<br><br>"; |
|
48 | +echo " on page '" . $page . "':<br><br>"; |
|
49 | 49 | echo '<strong>'; |
50 | 50 | |
51 | 51 | switch ($no) { |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace TechWilk\Rota; |
4 | 4 | |
5 | -ini_set('display_errors', false); // set on for development, off for production |
|
5 | +ini_set('display_errors', false); // set on for development, off for production |
|
6 | 6 | ini_set('log_errors', true); |
7 | 7 | error_reporting(E_ALL); |