@@ -29,11 +29,11 @@ |
||
| 29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
| 30 | 30 | // indexes |
| 31 | 31 | $columns = [ |
| 32 | - ['db' => 'id', 'dt' => 0], |
|
| 33 | - ['db' => 'firstname', 'dt' => 1], |
|
| 34 | - ['db' => 'surname', 'dt' => 2], |
|
| 35 | - ['db' => 'zip', 'dt' => 3], |
|
| 36 | - ['db' => 'country', 'dt' => 4], |
|
| 32 | + ['db' => 'id', 'dt' => 0], |
|
| 33 | + ['db' => 'firstname', 'dt' => 1], |
|
| 34 | + ['db' => 'surname', 'dt' => 2], |
|
| 35 | + ['db' => 'zip', 'dt' => 3], |
|
| 36 | + ['db' => 'country', 'dt' => 4], |
|
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | // SQL server connection information |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | // ensure user is allowed to see page |
| 40 | 40 | |
| 41 | 41 | if (!isAdmin() && $queryStringUser != $sessionUserId) { |
| 42 | - header('Location: swaps.php?user='.$sessionUserId); |
|
| 42 | + header('Location: swaps.php?user=' . $sessionUserId); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | // fetch swaps |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | <p> |
| 91 | 91 | <strong> |
| 92 | 92 | <s class="text-red"> |
| 93 | - <?php echo $swap->getOldUserRole()->getUser()->getFirstName().' '.$swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>) |
|
| 93 | + <?php echo $swap->getOldUserRole()->getUser()->getFirstName() . ' ' . $swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>) |
|
| 94 | 94 | </s> |
| 95 | 95 | → |
| 96 | 96 | <span class="text-green"> |
| 97 | - <?php echo $swap->getNewUserRole()->getUser()->getFirstName().' '.$swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>) |
|
| 97 | + <?php echo $swap->getNewUserRole()->getUser()->getFirstName() . ' ' . $swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>) |
|
| 98 | 98 | </span> |
| 99 | 99 | </strong> |
| 100 | 100 | </p> |
@@ -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 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | <?php |
| 117 | 117 | else: |
| 118 | - echo '<div class="box-body">'.$sentSuccess.'</div>'; |
|
| 118 | + echo '<div class="box-body">' . $sentSuccess . '</div>'; |
|
| 119 | 119 | endif; |
| 120 | 120 | ?> |
| 121 | 121 | </div> |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | while ($ob = mysqli_fetch_object($result)) { |
| 89 | 89 | if (!(isset($type) && $ob->id == $type)) { |
| 90 | 90 | $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime)); |
| 91 | - 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>'; |
|
| 91 | + 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>'; |
|
| 92 | 92 | } |
| 93 | 93 | } ?> |
| 94 | 94 | </select> |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 115 | 115 | if (isset($subtype) && $row['id'] == $subtype) { |
| 116 | 116 | } else { |
| 117 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
| 117 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
| 118 | 118 | } |
| 119 | 119 | } ?> |
| 120 | 120 | </select> |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 143 | 143 | if (isset($location) && $row['id'] == $location) { |
| 144 | 144 | } else { |
| 145 | - echo "<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
| 145 | + echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
| 146 | 146 | } |
| 147 | 147 | } ?> |
| 148 | 148 | </select> |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 286 | 286 | if (isset($type) && $row['id'] == $type) { |
| 287 | 287 | } else { |
| 288 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
| 288 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
| 289 | 289 | } |
| 290 | 290 | } ?> |
| 291 | 291 | </select> |
@@ -53,8 +53,8 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // After we have inserted the data, we want to head back to the main users page |
| 56 | - header('Location: subTypes.php'); // Move to the home page of the admin section |
|
| 57 | - exit; |
|
| 56 | + header('Location: subTypes.php'); // Move to the home page of the admin section |
|
| 57 | + exit; |
|
| 58 | 58 | } |
| 59 | 59 | include 'includes/header.php'; |
| 60 | 60 | ?> |
@@ -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 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $sql = ("INSERT INTO eventSubTypes (name, description) VALUES ('$name', '$description')"); |
| 39 | 39 | if (!mysqli_query(db(), $sql)) { |
| 40 | - die('Error: '.mysqli_error(db())); |
|
| 40 | + die('Error: ' . mysqli_error(db())); |
|
| 41 | 41 | } |
| 42 | 42 | } else { |
| 43 | 43 | // Otherwise we are dealing with edits, not new stuff |
@@ -88,10 +88,10 @@ discard block |
||
| 88 | 88 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
| 89 | 89 | |
| 90 | 90 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 91 | - echo '<input type="hidden" name="formindex[]" value="'.$row['id'].'" />'; |
|
| 92 | - echo "<input name='name[]' value='".$row['name']."' />"; |
|
| 91 | + echo '<input type="hidden" name="formindex[]" value="' . $row['id'] . '" />'; |
|
| 92 | + echo "<input name='name[]' value='" . $row['name'] . "' />"; |
|
| 93 | 93 | |
| 94 | - echo " <a href='subTypes.php?method=remove&subType=".$row['id']."'><i class='fa fa-times'></i></a><br />"; |
|
| 94 | + echo " <a href='subTypes.php?method=remove&subType=" . $row['id'] . "'><i class='fa fa-times'></i></a><br />"; |
|
| 95 | 95 | } ?> |
| 96 | 96 | </div><!-- /.box-body --> |
| 97 | 97 | <div class="box-footer"> |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | // get token |
| 36 | 36 | $response = $client->request( |
| 37 | - 'POST', |
|
| 38 | - 'v3/tokens.json', |
|
| 39 | - ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'], |
|
| 40 | - 'email' => siteConfig()['recording']['locomotivecms']['email'], ]] |
|
| 41 | - ); |
|
| 37 | + 'POST', |
|
| 38 | + 'v3/tokens.json', |
|
| 39 | + ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'], |
|
| 40 | + 'email' => siteConfig()['recording']['locomotivecms']['email'], ]] |
|
| 41 | + ); |
|
| 42 | 42 | if ($response->getStatusCode() == 201) { |
| 43 | 43 | $token = json_decode($response->getBody())->token; |
| 44 | 44 | } |
@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | // test token |
| 47 | 47 | if (isset($token)) { |
| 48 | 48 | $response = $client->request( |
| 49 | - 'GET', |
|
| 50 | - 'v3/my_account.json', |
|
| 51 | - ['query' => ['auth_token' => $token]]); |
|
| 49 | + 'GET', |
|
| 50 | + 'v3/my_account.json', |
|
| 51 | + ['query' => ['auth_token' => $token]]); |
|
| 52 | 52 | var_dump($response); |
| 53 | 53 | } else { |
| 54 | 54 | echo '<p>Unable to connect to main site</p>'; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | // only load page if functionality enabled |
| 20 | 20 | if (siteConfig()['recording']['type'] != 'locomotivecms') { |
| 21 | 21 | echo '<p>This feature is not enabled</p>'; |
| 22 | - echo '<p><a href='.siteSettings()->getSiteUrl().'>< back to homepage</a></p>'; |
|
| 22 | + echo '<p><a href=' . siteSettings()->getSiteUrl() . '>< back to homepage</a></p>'; |
|
| 23 | 23 | exit; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | $client = new Client([ |
| 29 | 29 | // Base URI is used with relative requests |
| 30 | - 'base_uri' => siteConfig()['recording']['locomotivecms']['url'].'/locomotive/api/', |
|
| 30 | + 'base_uri' => siteConfig()['recording']['locomotivecms']['url'] . '/locomotive/api/', |
|
| 31 | 31 | // You can set any number of default request options. |
| 32 | 32 | 'timeout' => 2.0, |
| 33 | 33 | ]); |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | var_dump($response); |
| 53 | 53 | } else { |
| 54 | 54 | echo '<p>Unable to connect to main site</p>'; |
| 55 | - echo '<p><a href='.siteSettings()->getSiteUrl().'>< back to homepage</a></p>'; |
|
| 55 | + echo '<p><a href=' . siteSettings()->getSiteUrl() . '>< back to homepage</a></p>'; |
|
| 56 | 56 | exit; |
| 57 | 57 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $statusMessage = 'Sent successfully'; |
| 54 | 54 | } else { |
| 55 | 55 | foreach ($sent as $errorMessage) { |
| 56 | - $statusMessage .= '<p>'.$errorMessage.'</p>'; |
|
| 56 | + $statusMessage .= '<p>' . $errorMessage . '</p>'; |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | if (!isAdmin()) { |
| 37 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 37 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 38 | 38 | exit; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -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 | |