@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | public function getAllEventsWithType(ServerRequestInterface $request, ResponseInterface $response, $args) |
33 | 33 | { |
34 | - $this->logger->info("Fetch event GET '/events/type/".$args['id']."'"); |
|
34 | + $this->logger->info("Fetch event GET '/events/type/" . $args['id'] . "'"); |
|
35 | 35 | |
36 | 36 | $eventType = EventTypeQuery::create()->findPk($args['id']); |
37 | 37 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | public function getAllEventsWithSubType(ServerRequestInterface $request, ResponseInterface $response, $args) |
44 | 44 | { |
45 | - $this->logger->info("Fetch event GET '/events/type/".$args['id']."'"); |
|
45 | + $this->logger->info("Fetch event GET '/events/type/" . $args['id'] . "'"); |
|
46 | 46 | |
47 | 47 | $eventType = EventSubTypeQuery::create()->findPk($args['id']); |
48 | 48 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $e->setCreatedBy($this->auth->currentUser()); |
86 | 86 | } |
87 | 87 | $e->setName($data['name']); |
88 | - $e->setDate(DateTime::createFromFormat('d/m/Y H:i', $data['date'].' '.$data['time'])); |
|
88 | + $e->setDate(DateTime::createFromFormat('d/m/Y H:i', $data['date'] . ' ' . $data['time'])); |
|
89 | 89 | $e->setEventTypeId($data['type']); |
90 | 90 | $e->setEventSubTypeId($data['subtype']); |
91 | 91 | $e->setLocationId($data['location']); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | public function getEvent(ServerRequestInterface $request, ResponseInterface $response, $args) |
120 | 120 | { |
121 | - $this->logger->info("Fetch event GET '/event/".$args['id']."'"); |
|
121 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "'"); |
|
122 | 122 | $e = EventQuery::create()->findPK($args['id']); |
123 | 123 | |
124 | 124 | if (!$e->authoriser()->readableBy($this->auth->currentUser())) { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | public function getEventEditForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
136 | 136 | { |
137 | - $this->logger->info("Fetch event GET '/event/".$args['id']."/edit'"); |
|
137 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "/edit'"); |
|
138 | 138 | $e = EventQuery::create()->findPK($args['id']); |
139 | 139 | $l = LocationQuery::create()->orderByName()->find(); |
140 | 140 | $et = EventTypeQuery::create()->orderByName()->find(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | public function getEventCopyForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
151 | 151 | { |
152 | - $this->logger->info("Fetch event GET '/event/".$args['id']."/copy'"); |
|
152 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "/copy'"); |
|
153 | 153 | $e = EventQuery::create()->findPK($args['id']); |
154 | 154 | $l = LocationQuery::create()->orderByName()->find(); |
155 | 155 | $et = EventTypeQuery::create()->orderByName()->find(); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | public function getEventAssignForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
166 | 166 | { |
167 | - $this->logger->info("Fetch event GET '/event/".$args['id']."/assign'"); |
|
167 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "/assign'"); |
|
168 | 168 | $e = EventQuery::create()->findPK($args['id']); |
169 | 169 | $ur = UserRoleQuery::create()->find(); |
170 | 170 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | public function postEventAssign(ServerRequestInterface $request, ResponseInterface $response, $args) |
179 | 179 | { |
180 | - $this->logger->info("Create event people POST '/event".$args['id']."/assign'"); |
|
180 | + $this->logger->info("Create event people POST '/event" . $args['id'] . "/assign'"); |
|
181 | 181 | |
182 | 182 | $eventId = filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT); |
183 | 183 | $existingUserRoles = UserRoleQuery::create()->useEventPersonQuery()->filterByEventId($eventId)->endUse()->find(); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | public function getAllEventsToPrintForGroup(ServerRequestInterface $request, ResponseInterface $response, $args) |
225 | 225 | { |
226 | - $this->logger->info("Fetch event printable page GET '/group/".$args['id']."/events'"); |
|
226 | + $this->logger->info("Fetch event printable page GET '/group/" . $args['id'] . "/events'"); |
|
227 | 227 | |
228 | 228 | $groupId = (int) $args['id']; |
229 | 229 | |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | |
270 | 270 | public function postEventComment(ServerRequestInterface $request, ResponseInterface $response, $args) |
271 | 271 | { |
272 | - $this->logger->info("Create event people POST '/event".$args['id']."/comment'"); |
|
272 | + $this->logger->info("Create event people POST '/event" . $args['id'] . "/comment'"); |
|
273 | 273 | |
274 | 274 | $eventId = filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT); |
275 | 275 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | if ($availableCommits[0]['sha'] !== $commitHash) { |
93 | 93 | $updateAvailable = true; |
94 | 94 | |
95 | - $email = siteSettings()->getOwner().' <'.siteSettings()->getAdminEmailAddress().'>'; |
|
95 | + $email = siteSettings()->getOwner() . ' <' . siteSettings()->getAdminEmailAddress() . '>'; |
|
96 | 96 | $message = <<<'MESSAGE' |
97 | 97 | There is an update available for your installation of Rota. |
98 | 98 | |
@@ -114,23 +114,23 @@ discard block |
||
114 | 114 | WHERE |
115 | 115 | date >= CURDATE() |
116 | 116 | AND date_format( date , "%y-%m-%d" ) |
117 | - <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert.' DAY ) , "%y-%m-%d" )'; |
|
117 | + <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert . ' DAY ) , "%y-%m-%d" )'; |
|
118 | 118 | $resultEvents = mysqli_query(db(), $sqlEvents) or die(mysqli_error(db())); |
119 | 119 | $i = 0; |
120 | 120 | while ($rowEvents = mysqli_fetch_array($resultEvents, MYSQLI_ASSOC)) { |
121 | 121 | $usersNotified = notifyEveryoneForEvent($rowEvents['id']); |
122 | 122 | if (count($usersNotified) > 0) { |
123 | - $out = $out.'Automatic notifications sent to users ('.implode(', ', $usersNotified).') for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n"; |
|
123 | + $out = $out . 'Automatic notifications sent to users (' . implode(', ', $usersNotified) . ') for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n"; |
|
124 | 124 | } else { |
125 | - $out = $out.'No notifications sent for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n"; |
|
125 | + $out = $out . 'No notifications sent for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n"; |
|
126 | 126 | } |
127 | 127 | $i = $i + 1; |
128 | 128 | } |
129 | 129 | if ($i == 0) { |
130 | - $out = $out.'No events found to automatically notify for.'; |
|
130 | + $out = $out . 'No events found to automatically notify for.'; |
|
131 | 131 | } |
132 | 132 | } else { |
133 | - $out = $out.'Automatic notifications are disabled.'; |
|
133 | + $out = $out . 'Automatic notifications are disabled.'; |
|
134 | 134 | } ?> |
135 | 135 | <html> |
136 | 136 | <body> |
@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | use Monolog\Handler\StreamHandler; |
7 | 7 | use Monolog\Logger; |
8 | 8 | |
9 | -include __DIR__.'/errors.php'; |
|
9 | +include __DIR__ . '/errors.php'; |
|
10 | 10 | |
11 | 11 | // setup the autoloading |
12 | -require_once __DIR__.'/../../../vendor/autoload.php'; |
|
12 | +require_once __DIR__ . '/../../../vendor/autoload.php'; |
|
13 | 13 | |
14 | 14 | // setup Propel |
15 | -require_once __DIR__.'/../../../generated-conf/config.php'; |
|
15 | +require_once __DIR__ . '/../../../generated-conf/config.php'; |
|
16 | 16 | |
17 | 17 | $defaultLogger = new Logger('defaultLogger'); |
18 | -$defaultLogger->pushHandler(new StreamHandler(__DIR__.'/../../../logs/propel.log', Logger::WARNING)); |
|
18 | +$defaultLogger->pushHandler(new StreamHandler(__DIR__ . '/../../../logs/propel.log', Logger::WARNING)); |
|
19 | 19 | |
20 | 20 | $serviceContainer->setLogger('defaultLogger', $defaultLogger); |
21 | 21 | |
@@ -64,18 +64,18 @@ discard block |
||
64 | 64 | return SettingsQuery::create()->findOne(); |
65 | 65 | } |
66 | 66 | |
67 | -include __DIR__.'/functions.auth.php'; |
|
68 | -include __DIR__.'/functions.notifications.php'; |
|
69 | -include __DIR__.'/functions.mail.php'; |
|
70 | -include __DIR__.'/functions.remove.php'; |
|
71 | -include __DIR__.'/functions.discussion.php'; |
|
72 | -include __DIR__.'/functions.event.php'; |
|
73 | -include __DIR__.'/functions.password.php'; |
|
74 | -include __DIR__.'/functions.users.php'; |
|
75 | -include __DIR__.'/functions.roles.php'; |
|
76 | -include __DIR__.'/functions.database.php'; |
|
77 | -include __DIR__.'/functions.calendars.php'; |
|
78 | -include __DIR__.'/functions.facebook.php'; |
|
67 | +include __DIR__ . '/functions.auth.php'; |
|
68 | +include __DIR__ . '/functions.notifications.php'; |
|
69 | +include __DIR__ . '/functions.mail.php'; |
|
70 | +include __DIR__ . '/functions.remove.php'; |
|
71 | +include __DIR__ . '/functions.discussion.php'; |
|
72 | +include __DIR__ . '/functions.event.php'; |
|
73 | +include __DIR__ . '/functions.password.php'; |
|
74 | +include __DIR__ . '/functions.users.php'; |
|
75 | +include __DIR__ . '/functions.roles.php'; |
|
76 | +include __DIR__ . '/functions.database.php'; |
|
77 | +include __DIR__ . '/functions.calendars.php'; |
|
78 | +include __DIR__ . '/functions.facebook.php'; |
|
79 | 79 | |
80 | 80 | date_default_timezone_set(siteSettings()->getTimeZone()); |
81 | 81 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $stat_id = $_SESSION['login_statistic_id']; |
176 | 176 | if (($stat_id != '') && ($stat_id != '0')) { |
177 | 177 | $stat = StatisticQuery::create()->findPk($stat_id); |
178 | - $stat->setDetail1($stat->getDetail1().'/'.$detail1); |
|
178 | + $stat->setDetail1($stat->getDetail1() . '/' . $detail1); |
|
179 | 179 | $stat->setDetail2($stat->getDate()->diff(new DateTime())); |
180 | 180 | $stat->save(); |
181 | 181 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | return 'never'; |
209 | 209 | } |
210 | 210 | |
211 | - return timeInWords($time).' ago'; |
|
211 | + return timeInWords($time) . ' ago'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | function timeInWordsWithTense($time) |
@@ -222,9 +222,9 @@ discard block |
||
222 | 222 | } |
223 | 223 | |
224 | 224 | if ($time->getTimestamp() > (new DateTime())->getTimestamp()) { |
225 | - return 'in '.timeInWords($time); |
|
225 | + return 'in ' . timeInWords($time); |
|
226 | 226 | } else { |
227 | - return timeInWords($time).' ago'; |
|
227 | + return timeInWords($time) . ' ago'; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | $client = new Client(); |
22 | - $url = $site->getUrl()['base'].$this->router->pathFor('home').'old/cr_daily.php'; |
|
22 | + $url = $site->getUrl()['base'] . $this->router->pathFor('home') . 'old/cr_daily.php'; |
|
23 | 23 | $guzzleResponse = $client->get($url, [ |
24 | 24 | 'query' => [ |
25 | 25 | 'token' => $args['token'], |
@@ -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> |
@@ -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 --> |