@@ -17,10 +17,10 @@ |
||
| 17 | 17 | $_SESSION['foo'] = 'bar'; |
| 18 | 18 | |
| 19 | 19 | $fb = new Facebook\Facebook([ |
| 20 | - 'app_id' => $config['auth']['facebook']['appId'], |
|
| 21 | - 'app_secret' => $config['auth']['facebook']['appSecret'], |
|
| 22 | - 'default_graph_version' => 'v2.2', |
|
| 23 | - ]); |
|
| 20 | + 'app_id' => $config['auth']['facebook']['appId'], |
|
| 21 | + 'app_secret' => $config['auth']['facebook']['appSecret'], |
|
| 22 | + 'default_graph_version' => 'v2.2', |
|
| 23 | + ]); |
|
| 24 | 24 | |
| 25 | 25 | $helper = $fb->getRedirectLoginHelper(); |
| 26 | 26 | |
@@ -178,10 +178,10 @@ discard block |
||
| 178 | 178 | <div class="col-sm-8 col-md-8 col-lg-6"> |
| 179 | 179 | |
| 180 | 180 | <?php |
| 181 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 182 | - // ~~~~~~~~ Events this week ~~~~~~~~ |
|
| 183 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 184 | - ?> |
|
| 181 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 182 | + // ~~~~~~~~ Events this week ~~~~~~~~ |
|
| 183 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 184 | + ?> |
|
| 185 | 185 | |
| 186 | 186 | <h2>Events this week:</h2> |
| 187 | 187 | |
@@ -205,17 +205,17 @@ discard block |
||
| 205 | 205 | <div class="timeline-header"> |
| 206 | 206 | <a href="event.php?id=<?php echo $event->getId() ?>"> |
| 207 | 207 | <h4><?php |
| 208 | - echo $event->getDate('jS: '); |
|
| 209 | - $eventPeople = EventPersonQuery::create()->filterByEvent($event)->find(); |
|
| 210 | - $roles = []; |
|
| 211 | - foreach ($eventPeople as $eventPerson) { |
|
| 212 | - if ($eventPerson->getUserRole()->getUserId() == $user->getId()) { |
|
| 213 | - $roles[] = $eventPerson->getUserRole()->getRole()->getName(); |
|
| 214 | - } |
|
| 215 | - } |
|
| 216 | - $roles = implode(', ', $roles); |
|
| 217 | - echo $roles != '' ? $roles : 'No involvement'; |
|
| 218 | - ?> |
|
| 208 | + echo $event->getDate('jS: '); |
|
| 209 | + $eventPeople = EventPersonQuery::create()->filterByEvent($event)->find(); |
|
| 210 | + $roles = []; |
|
| 211 | + foreach ($eventPeople as $eventPerson) { |
|
| 212 | + if ($eventPerson->getUserRole()->getUserId() == $user->getId()) { |
|
| 213 | + $roles[] = $eventPerson->getUserRole()->getRole()->getName(); |
|
| 214 | + } |
|
| 215 | + } |
|
| 216 | + $roles = implode(', ', $roles); |
|
| 217 | + echo $roles != '' ? $roles : 'No involvement'; |
|
| 218 | + ?> |
|
| 219 | 219 | </h4> |
| 220 | 220 | </a> |
| 221 | 221 | <a class="label label-default" href="events.php?view=all&filter=<?php echo $event->getEventTypeId() ?>"><?php echo $event->getEventType()->getName() ?></a> |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | <div class="modal-body"> |
| 269 | 269 | <?php |
| 270 | 270 | |
| 271 | - $sqlPeople = "SELECT |
|
| 271 | + $sqlPeople = "SELECT |
|
| 272 | 272 | CONCAT(u.firstname, ' ', u.lastname) AS `name`, |
| 273 | 273 | r.name AS `rolename`, |
| 274 | 274 | ep.notified AS `notified`, |
@@ -284,13 +284,13 @@ discard block |
||
| 284 | 284 | AND ep.removed = 0 |
| 285 | 285 | ORDER BY g.name, r.name"; |
| 286 | 286 | |
| 287 | - $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db())); |
|
| 288 | - $groupName = ''; |
|
| 289 | - $groupId = 0; |
|
| 290 | - $identifier = '1'; |
|
| 291 | - $firstTime = true; |
|
| 287 | + $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db())); |
|
| 288 | + $groupName = ''; |
|
| 289 | + $groupId = 0; |
|
| 290 | + $identifier = '1'; |
|
| 291 | + $firstTime = true; |
|
| 292 | 292 | |
| 293 | - if (mysqli_num_rows($resultPeople) > 0): |
|
| 293 | + if (mysqli_num_rows($resultPeople) > 0): |
|
| 294 | 294 | |
| 295 | 295 | ?> |
| 296 | 296 | <?php while ($viewPeople = mysqli_fetch_object($resultPeople)) { |
@@ -323,9 +323,9 @@ discard block |
||
| 323 | 323 | echo '</li>'; |
| 324 | 324 | } |
| 325 | 325 | echo '</ul>'; |
| 326 | - else: |
|
| 326 | + else: |
|
| 327 | 327 | echo '<p>No roles assigned to this event.'; |
| 328 | - endif; |
|
| 328 | + endif; |
|
| 329 | 329 | ?> |
| 330 | 330 | </div> |
| 331 | 331 | <div class="modal-footer"> |
@@ -359,10 +359,10 @@ discard block |
||
| 359 | 359 | |
| 360 | 360 | |
| 361 | 361 | <?php |
| 362 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 363 | - // ~~~~~~~~~ User's events ~~~~~~~~~~ |
|
| 364 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 365 | - ?> |
|
| 362 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 363 | + // ~~~~~~~~~ User's events ~~~~~~~~~~ |
|
| 364 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 365 | + ?> |
|
| 366 | 366 | |
| 367 | 367 | <h2>My events:</h2> |
| 368 | 368 | |
@@ -387,9 +387,9 @@ discard block |
||
| 387 | 387 | <div class="timeline-header"> |
| 388 | 388 | <a href="event.php?id=<?php echo $event->id ?>"> |
| 389 | 389 | <h4><?php |
| 390 | - echo date('jS: ', strtotime($event->date)); |
|
| 391 | - echo $event->roles; |
|
| 392 | - ?> |
|
| 390 | + echo date('jS: ', strtotime($event->date)); |
|
| 391 | + echo $event->roles; |
|
| 392 | + ?> |
|
| 393 | 393 | </h4> |
| 394 | 394 | </a> |
| 395 | 395 | <a class="label label-default" href="events.php?view=all&filter=<?php echo $event->eventTypeId ?>"><?php echo $event->eventType ?></a> |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | <div class="modal-body"> |
| 446 | 446 | <?php |
| 447 | 447 | |
| 448 | - $sqlPeople = "SELECT |
|
| 448 | + $sqlPeople = "SELECT |
|
| 449 | 449 | CONCAT(u.firstname, ' ', u.lastname) AS `name`, |
| 450 | 450 | r.name AS `rolename`, |
| 451 | 451 | ep.notified AS `notified`, |
@@ -461,13 +461,13 @@ discard block |
||
| 461 | 461 | AND ep.removed = 0 |
| 462 | 462 | ORDER BY g.name, r.name"; |
| 463 | 463 | |
| 464 | - $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db())); |
|
| 465 | - $groupName = ''; |
|
| 466 | - $groupId = 0; |
|
| 467 | - $identifier = '1'; |
|
| 468 | - $firstTime = true; |
|
| 464 | + $resultPeople = mysqli_query(db(), $sqlPeople) or die(mysqli_error(db())); |
|
| 465 | + $groupName = ''; |
|
| 466 | + $groupId = 0; |
|
| 467 | + $identifier = '1'; |
|
| 468 | + $firstTime = true; |
|
| 469 | 469 | |
| 470 | - if (mysqli_num_rows($resultPeople) > 0): |
|
| 470 | + if (mysqli_num_rows($resultPeople) > 0): |
|
| 471 | 471 | |
| 472 | 472 | ?> |
| 473 | 473 | <?php while ($viewPeople = mysqli_fetch_object($resultPeople)) { |
@@ -500,9 +500,9 @@ discard block |
||
| 500 | 500 | echo '</li>'; |
| 501 | 501 | } |
| 502 | 502 | echo '</ul>'; |
| 503 | - else: |
|
| 503 | + else: |
|
| 504 | 504 | echo '<p>No roles assigned to this event.'; |
| 505 | - endif; |
|
| 505 | + endif; |
|
| 506 | 506 | ?> |
| 507 | 507 | </div> |
| 508 | 508 | <div class="modal-footer"> |
@@ -537,10 +537,10 @@ discard block |
||
| 537 | 537 | <div class="col-sm-4 col-md-4 col-lg-6"> |
| 538 | 538 | |
| 539 | 539 | <?php |
| 540 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 541 | - // ~~~~~~~ Remaining events ~~~~~~~~~ |
|
| 542 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 543 | - ?> |
|
| 540 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 541 | + // ~~~~~~~ Remaining events ~~~~~~~~~ |
|
| 542 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 543 | + ?> |
|
| 544 | 544 | <?php if (isset($remainingEventsInGroups)): ?> |
| 545 | 545 | |
| 546 | 546 | <div class="row"> |
@@ -616,10 +616,10 @@ discard block |
||
| 616 | 616 | |
| 617 | 617 | |
| 618 | 618 | <?php |
| 619 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 620 | - // ~~~~~~~~~ User details ~~~~~~~~~~~ |
|
| 621 | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 622 | - ?> |
|
| 619 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 620 | + // ~~~~~~~~~ User details ~~~~~~~~~~~ |
|
| 621 | + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| 622 | + ?> |
|
| 623 | 623 | |
| 624 | 624 | <div class="box box-widget widget-user-2"> |
| 625 | 625 | <div class="widget-user-header bg-yellow"> |
@@ -52,8 +52,8 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // After we have inserted the data, we want to head back to the main users page |
| 55 | - header('Location: bandskills.php'); // Move to the home page of the admin section |
|
| 56 | - exit; |
|
| 55 | + header('Location: bandskills.php'); // Move to the home page of the admin section |
|
| 56 | + exit; |
|
| 57 | 57 | } |
| 58 | 58 | include 'includes/header.php'; |
| 59 | 59 | ?> |
@@ -5,18 +5,18 @@ |
||
| 5 | 5 | include 'includes/config.php'; |
| 6 | 6 | include 'includes/functions.php'; |
| 7 | 7 | |
| 8 | - // you have to open the session first |
|
| 9 | - session_start(); |
|
| 8 | + // you have to open the session first |
|
| 9 | + session_start(); |
|
| 10 | 10 | |
| 11 | 11 | //if ($debug) notifyInfo(__FILE__,"logout",$_SESSION['userid']); //only_for_testing// |
| 12 | 12 | if ($debug) { |
| 13 | 13 | insertStatistics('user', __FILE__, 'logout'); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - //remove all the variables in the session |
|
| 17 | - session_unset(); |
|
| 16 | + //remove all the variables in the session |
|
| 17 | + session_unset(); |
|
| 18 | 18 | |
| 19 | - // destroy the session |
|
| 20 | - session_destroy(); |
|
| 19 | + // destroy the session |
|
| 20 | + session_destroy(); |
|
| 21 | 21 | |
| 22 | - header('Location: login.php'); |
|
| 22 | + header('Location: login.php'); |
|
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public function getUpSQL() |
| 41 | 41 | { |
| 42 | 42 | return [ |
| 43 | - 'default' => ' |
|
| 43 | + 'default' => ' |
|
| 44 | 44 | # This is a fix for InnoDB in MySQL >= 4.1.x |
| 45 | 45 | # It "suspends judgement" for fkey relationships until are tables are set. |
| 46 | 46 | SET FOREIGN_KEY_CHECKS = 0; |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | public function getDownSQL() |
| 173 | 173 | { |
| 174 | 174 | return [ |
| 175 | - 'default' => ' |
|
| 175 | + 'default' => ' |
|
| 176 | 176 | # This is a fix for InnoDB in MySQL >= 4.1.x |
| 177 | 177 | # It "suspends judgement" for fkey relationships until are tables are set. |
| 178 | 178 | SET FOREIGN_KEY_CHECKS = 0; |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return EventQuery::create() |
| 21 | 21 | ->useEventPersonQuery() |
| 22 | - ->useUserRoleQuery() |
|
| 22 | + ->useUserRoleQuery() |
|
| 23 | 23 | ->useRoleQuery() |
| 24 | - ->filterByGroup($this) |
|
| 24 | + ->filterByGroup($this) |
|
| 25 | + ->endUse() |
|
| 25 | 26 | ->endUse() |
| 26 | - ->endUse() |
|
| 27 | 27 | ->endUse() |
| 28 | 28 | ->orderByDate('desc') |
| 29 | 29 | ->findOne(); |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | $serviceContainer->setAdapterClass('default', 'mysql'); |
| 8 | 8 | $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); |
| 9 | 9 | $manager->setConfiguration([ |
| 10 | - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', |
|
| 11 | - 'dsn' => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'], |
|
| 12 | - 'user' => $config['db']['user'], |
|
| 13 | - 'password' => $config['db']['pass'], |
|
| 14 | - 'attributes' => [ |
|
| 10 | + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', |
|
| 11 | + 'dsn' => 'mysql:host='.$config['db']['host'].';dbname='.$config['db']['dbname'], |
|
| 12 | + 'user' => $config['db']['user'], |
|
| 13 | + 'password' => $config['db']['pass'], |
|
| 14 | + 'attributes' => [ |
|
| 15 | 15 | 'ATTR_EMULATE_PREPARES' => false, |
| 16 | 16 | 'ATTR_TIMEOUT' => 30, |
| 17 | - ], |
|
| 18 | - 'model_paths' => [ |
|
| 17 | + ], |
|
| 18 | + 'model_paths' => [ |
|
| 19 | 19 | 0 => 'src', |
| 20 | 20 | 1 => 'vendor', |
| 21 | - ], |
|
| 21 | + ], |
|
| 22 | 22 | ]); |
| 23 | 23 | $manager->setName('default'); |
| 24 | 24 | $serviceContainer->setConnectionManager('default', $manager); |
@@ -26,16 +26,16 @@ discard block |
||
| 26 | 26 | $serviceContainer->setAdapterClass('test', 'sqlite'); |
| 27 | 27 | $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); |
| 28 | 28 | $manager->setConfiguration([ |
| 29 | - 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', |
|
| 30 | - 'dsn' => 'sqlite:/var/tmp/test.db', |
|
| 31 | - 'attributes' => [ |
|
| 29 | + 'classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', |
|
| 30 | + 'dsn' => 'sqlite:/var/tmp/test.db', |
|
| 31 | + 'attributes' => [ |
|
| 32 | 32 | 'ATTR_EMULATE_PREPARES' => false, |
| 33 | 33 | 'ATTR_TIMEOUT' => 30, |
| 34 | - ], |
|
| 35 | - 'model_paths' => [ |
|
| 34 | + ], |
|
| 35 | + 'model_paths' => [ |
|
| 36 | 36 | 0 => 'src', |
| 37 | 37 | 1 => 'vendor', |
| 38 | - ], |
|
| 38 | + ], |
|
| 39 | 39 | ]); |
| 40 | 40 | $manager->setName('test'); |
| 41 | 41 | $serviceContainer->setConnectionManager('test', $manager); |
@@ -28,13 +28,13 @@ |
||
| 28 | 28 | $currentTimestamp = $date = strftime('%F %T', time()); |
| 29 | 29 | |
| 30 | 30 | $data = [ |
| 31 | - ['field' => 'name', 'type' => 'string', 'value' => $this->name], |
|
| 32 | - ['field' => 'date', 'type' => 'string', 'value' => $this->datetime], |
|
| 33 | - ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()], |
|
| 34 | - ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()], |
|
| 35 | - ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()], |
|
| 36 | - ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()], |
|
| 37 | - ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp], |
|
| 31 | + ['field' => 'name', 'type' => 'string', 'value' => $this->name], |
|
| 32 | + ['field' => 'date', 'type' => 'string', 'value' => $this->datetime], |
|
| 33 | + ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()], |
|
| 34 | + ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()], |
|
| 35 | + ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()], |
|
| 36 | + ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()], |
|
| 37 | + ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp], |
|
| 38 | 38 | ]; |
| 39 | 39 | |
| 40 | 40 | if (isset($this->notes)) { |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | $data = [ |
| 23 | - ['field' => 'name', 'type' => 'string', 'value' => $this->name], |
|
| 24 | - ['field' => 'description', 'type' => 'string', 'value' => $this->description], |
|
| 23 | + ['field' => 'name', 'type' => 'string', 'value' => $this->name], |
|
| 24 | + ['field' => 'description', 'type' => 'string', 'value' => $this->description], |
|
| 25 | 25 | ]; |
| 26 | 26 | |
| 27 | 27 | $db->insert($this->db_table, $data); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $whereCondition = 'id = '.$id; |
| 41 | 41 | $where = [ |
| 42 | - $whereCondition, |
|
| 42 | + $whereCondition, |
|
| 43 | 43 | ]; |
| 44 | 44 | |
| 45 | 45 | if ($db->delete($this->db_table, $where)) { |
@@ -59,14 +59,14 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $columns = [ |
| 62 | - 'id', |
|
| 63 | - 'name', |
|
| 64 | - 'description', |
|
| 62 | + 'id', |
|
| 63 | + 'name', |
|
| 64 | + 'description', |
|
| 65 | 65 | ]; |
| 66 | 66 | |
| 67 | 67 | $whereCondition = 'id = '.$id; |
| 68 | 68 | $where = [ |
| 69 | - $whereCondition, |
|
| 69 | + $whereCondition, |
|
| 70 | 70 | ]; |
| 71 | 71 | |
| 72 | 72 | $result = $db->selectSingle('Type', $this->db_table, $columns, $where); |