Compare commits

..

No commits in common. "main" and "v0.0.2" have entirely different histories.
main ... v0.0.2

56 changed files with 130 additions and 1591 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
.idea/*
.idea
config.php

21
LICENSE
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2024 Valentin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,86 +0,0 @@
<br />
<div id="readme-top" align="center">
<a href="https://github.com/itsmrval/subway">
<img src="https://raw.githubusercontent.com/itsmrval/subway/main/public/assets/logo/dark.png" alt="Logo" width="164">
</a>
<h3 align="center">Subway Schedule</h3>
<p align="center">
A school project using php vanilla to provide user-saved real-time information on metro stations
<br />
<br />
View Demo
·
<a href="https://github.com/itsmrval/subway/issues">Report Bug</a>
·
<a href="https://github.com/itsmrval/subway/pulls">Pull request</a>
</p>
</div>
## What is Subway Schedule
<img src="https://i.imgur.com/ZjLkOIR.png" width="500px">
Note: This app is not intended for production use, but for personal or educational purposes.
### Built With
This section list major frameworks/libraries used
* ![](https://img.shields.io/badge/php-20232A?style=for-the-badge&logo=php)
* ![](https://img.shields.io/badge/MySQL-20232A?style=for-the-badge&logo=mysql)
* ![](https://img.shields.io/badge/Bootstrap-20232A?style=for-the-badge&logo=bootstrap)
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Getting Started
Now let's see how to set up an subway schedule instance.
### Prerequisites
First, install nginx, php and mysql on your server.<br>
Then, create a user with a database
### Installation
1. Clone the repository
```sh
cd /my/directory
git clone https://github.com/itsmrval/subway .
```
2. Copy the example config
```sh
cp config_example.php config.php
```
3. Change `config.php` permissions
```sh
chmod 600 config.php
```
4. Copy and rename `exemple.env`
```js
cp exemple.env .env
```
5. Complete `config.php`
* idfm_api_key with your [IDFM PRIM account](https://prim.iledefrance-mobilites.fr)
* db_host / db_user / db_password / db_name with mysql infos.
6. Run your nginx server on `/public` directory
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Known issues
- Some stations with RER A doesnt display timetables
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
<p align="right">(<a href="#readme-top">back to top</a>)</p>

View File

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View File

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 620 B

View File

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 501 B

View File

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

View File

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 802 B

View File

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

View File

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 564 B

View File

Before

Width:  |  Height:  |  Size: 682 B

After

Width:  |  Height:  |  Size: 682 B

View File

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 431 B

View File

Before

Width:  |  Height:  |  Size: 570 B

After

Width:  |  Height:  |  Size: 570 B

View File

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 701 B

View File

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 398 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 808 B

After

Width:  |  Height:  |  Size: 808 B

View File

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 700 B

View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

View File

@ -1,107 +0,0 @@
<?php
function getUserDetails($userId) {
global $conn;
try {
$query = $conn->prepare("SELECT email, firstName, lastName FROM users WHERE id = ?");
$query->execute([$userId]);
return $query->fetch(PDO::FETCH_ASSOC);
} catch(PDOException $e) {
return null;
}
}
function updateUserDetails($userId, $email, $firstName, $lastName, $password = null) {
global $conn;
try {
if ($password) {
$query = $conn->prepare("UPDATE users SET email = ?, firstName = ?, lastName = ?, password = ? WHERE id = ?");
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
$query->execute([$email, $firstName, $lastName, $hashedPassword, $userId]);
} else {
$query = $conn->prepare("UPDATE users SET email = ?, firstName = ?, lastName = ? WHERE id = ?");
$query->execute([$email, $firstName, $lastName, $userId]);
}
return true;
} catch(PDOException $e) {
return false;
}
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$success = updateUserDetails($_SESSION['user_id'], $_POST['email'], $_POST['firstName'], $_POST['lastName'], $_POST['password']);
if ($success) {
$_SESSION['message'] = '<div class="alert alert-success text-center" role="alert">Account updated successfully.</div>';
} else {
$_SESSION['message'] = '<div class="alert alert-danger text-center" role="alert">Failed to update account.</div>';
}
header("Location: " . $_SERVER['REQUEST_URI']);
exit();
}
$userDetails = getUserDetails($_SESSION['user_id']);
?>
<div class="container mt-5">
<?php
echo $_SESSION['message'] ?? '';
unset($_SESSION['message']);
?>
<h2 class="mb-4">Edit Account</h2>
<form method="POST" action="">
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" value="<?php echo htmlspecialchars($userDetails['email']); ?>" placeholder="Enter your email" required>
</div>
<div class="mb-3">
<label for="firstName" class="form-label">First Name</label>
<input type="text" class="form-control" id="firstName" name="firstName" value="<?php echo htmlspecialchars($userDetails['firstName']); ?>" placeholder="Enter your first name" required>
</div>
<div class="mb-3">
<label for="lastName" class="form-label">Last Name</label>
<input type="text" class="form-control" id="lastName" name="lastName" value="<?php echo htmlspecialchars($userDetails['lastName']); ?>" placeholder="Enter your last name" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" name="password" placeholder="Enter a new password">
<small class="form-text text-muted">Leave blank if you do not want to change the password</small>
</div>
<button type="submit" class="btn btn-primary">Save Changes</button>
</form>
</div>
<?php
function getUserLogs($userId) {
global $conn;
try {
$query = $conn->prepare("SELECT logs.ip, logs.date, users.email FROM logs JOIN users ON logs.userId = users.id WHERE logs.userId = ?");
$query->execute([$userId]);
return $query->fetchAll(PDO::FETCH_ASSOC);
} catch(PDOException $e) {
return [];
}
}
$logDetails = getUserLogs($_SESSION['user_id']);
?>
<table class="table mt-4">
<thead>
<tr>
<th>IP</th>
<th>Date</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php foreach ($logDetails as $log): ?>
<tr>
<td><?php echo $log['ip']; ?></td>
<td><?php echo $log['date']; ?></td>
<td><?php echo $log['email']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -1,47 +0,0 @@
<?php
if (!isset($_SESSION['is_admin']) || $_SESSION['is_admin'] !== 1) {
header("Location: /");
exit();
}
function getUsers() {
global $conn;
try {
$query = $conn->prepare("SELECT id, email, firstName, lastName, is_admin FROM users");
$query->execute();
return $query->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
return [];
}
}
$users = getUsers();
include 'post.php';
?>
<div class="container mt-5">
<?php
echo $_SESSION['message'] ?? '';
unset($_SESSION['message']);
?>
<h2 class="mb-4">Administration</h2>
<form method="POST">
<button type="submit" name="refreshData" class="btn btn-primary">Refresh Data</button>
</form>
<?php include 'users_list.php'; ?>
</div>
<?php include 'modal.php'; ?>
<script>
var editUserModal = document.getElementById('editUserModal');
editUserModal.addEventListener('show.bs.modal', function (event) {
editUserModal.querySelector('#editUserId').value = event.relatedTarget.getAttribute('data-id');
editUserModal.querySelector('#editEmail').value = event.relatedTarget.getAttribute('data-email');
editUserModal.querySelector('#editFirstName').value = event.relatedTarget.getAttribute('data-firstname');
editUserModal.querySelector('#editLastName').value = event.relatedTarget.getAttribute('data-lastname');
editUserModal.querySelector('#editIsAdmin').checked = event.relatedTarget.getAttribute('data-isadmin') === '1';
});
</script>

View File

@ -1,37 +0,0 @@
<div class="modal fade" id="editUserModal" tabindex="-1" aria-labelledby="editUserModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Edititing user</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="editUserForm" method="POST" action="">
<input type="hidden" name="userId" id="editUserId">
<div class="mb-3">
<label for="editEmail" class="form-label">Email</label>
<input type="email" class="form-control" id="editEmail" name="email" required>
</div>
<div class="mb-3">
<label for="editFirstName" class="form-label">First Name</label>
<input type="text" class="form-control" id="editFirstName" name="firstName" required>
</div>
<div class="mb-3">
<label for="editLastName" class="form-label">Last Name</label>
<input type="text" class="form-control" id="editLastName" name="lastName" required>
</div>
<div class="mb-3">
<label for="editPassword" class="form-label">Password</label>
<input type="password" class="form-control" id="editPassword" name="password">
<small class="form-text text-muted">Leave blank if you do not want to change the password</small>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="editIsAdmin" name="is_admin">
<label class="form-label" for="editIsAdmin">Admin role</label>
</div>
<button type="submit" class="btn btn-primary">Save Changes</button>
</form>
</div>
</div>
</div>
</div>

View File

@ -1,113 +0,0 @@
<?php
function updateUserDetails($userId, $email, $firstName, $lastName, $is_admin, $password = null) {
global $conn;
try {
if ($password) {
$query = $conn->prepare("UPDATE users SET email = ?, firstName = ?, lastName = ?, password = ?, is_admin = ? WHERE id = ?");
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
$query->execute([$email, $firstName, $lastName, $hashedPassword, $is_admin, $userId]);
} else {
$query = $conn->prepare("UPDATE users SET email = ?, firstName = ?, lastName = ?, is_admin = ? WHERE id = ?");
$query->execute([$email, $firstName, $lastName, $is_admin, $userId]);
}
return true;
} catch(PDOException $e) {
return false;
}
}
function deleteUser($userId) {
global $conn;
try {
$query = $conn->prepare("DELETE FROM users WHERE id = ?");
$query->execute([$userId]);
return true;
} catch(PDOException $e) {
return false;
}
}
function refreshData() {
global $conn;
try {
$conn->exec("TRUNCATE TABLE stops");
$json = @file_get_contents(__DIR__ .'/../../data/stops.json');
$data = json_decode($json, true);
$filteredData = array_filter($data, function($item) {
return isset($item['fields']['mode']) && $item['fields']['mode'] === 'METRO';
});
$query = $conn->prepare("INSERT INTO stops (stopId, name, lineId) VALUES (?, ?, ?)");
$conn->beginTransaction();
foreach ($filteredData as $item) {
$fields = $item['fields'];
if (isset($fields['id_ref_zda'], $fields['nom_zda'], $fields['indice_lig'])) {
try {
$query->execute([$fields['id_ref_zda'], $fields['nom_zda'], $fields['indice_lig']]);
} catch (PDOException $e) {
}
}
}
$conn->commit();
return true;
} catch (Exception $e) {
return false;
}
}
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['refreshData'])) {
$success = refreshData();
if ($success) {
$_SESSION['message'] = '<div class="alert alert-success text-center" role="alert">Data refreshed successfully.</div>';
} else {
$_SESSION['message'] = '<div class="alert alert-danger text-center" role="alert">Failed to refresh data.</div>';
}
header("Location: " . $_SERVER['REQUEST_URI']);
exit();
}
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['userId'])) {
if (isset($_POST['delete'])) {
if ($_POST['userId'] == $_SESSION['user_id']) {
$_SESSION['message'] = '<div class="alert alert-danger text-center" role="alert">You cannot delete yourself.</div>';
header("Location: " . $_SERVER['REQUEST_URI']);
exit();
}
$success = deleteUser($_POST['userId']);
if ($success) {
$_SESSION['message'] = '<div class="alert alert-success text-center" role="alert">User deleted successfully.</div>';
} else {
$_SESSION['message'] = '<div class="alert alert-danger text-center" role="alert">Failed to delete user.</div>';
}
header("Location: " . $_SERVER['REQUEST_URI']);
exit();
}
$password = !empty($_POST['password']) ? $_POST['password'] : null;
$_POST['is_admin'] = isset($_POST['is_admin']) ? 1 : 0;
$success = updateUserDetails($_POST['userId'], $_POST['email'], $_POST['firstName'], $_POST['lastName'], $_POST['is_admin'], $password);
if ($success) {
$_SESSION['message'] = '<div class="alert alert-success text-center" role="alert">User updated successfully.</div>';
} else {
$_SESSION['message'] = '<div class="alert alert-danger text-center" role="alert">Failed to update user.</div>';
}
header("Location: " . $_SERVER['REQUEST_URI']);
exit();
}
?>

View File

@ -1,39 +0,0 @@
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Email</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $user): ?>
<tr>
<th scope="row"><?php echo htmlspecialchars($user['id']); ?></th>
<td><?php echo htmlspecialchars($user['email']); ?></td>
<td><?php echo htmlspecialchars($user['firstName']); ?></td>
<td><?php echo htmlspecialchars($user['lastName']); ?></td>
<td>
<div class="d-flex">
<button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#editUserModal"
data-id="<?php echo htmlspecialchars($user['id']); ?>"
data-email="<?php echo htmlspecialchars($user['email']); ?>"
data-firstname="<?php echo htmlspecialchars($user['firstName']); ?>"
data-lastname="<?php echo htmlspecialchars($user['lastName']); ?>"
data-isadmin="<?php echo htmlspecialchars($user['is_admin']); ?>"
>
Edit
</button>
<form method="POST" action="">
<input type="hidden" name="userId" value="<?php echo htmlspecialchars($user['id']); ?>">
<button type="submit" name="delete" class="btn btn-danger">Delete</button>
</form>
</div>
</td>
</tr>
</tr>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -1,20 +1,9 @@
<div class="card mb-4">
<div class="card-body">
<div class="d-flex align-items-center">
<img src="/assets/lines/m.svg" width="64px" class="img-fluid mb-3">&nbsp;&nbsp;
<img src="/assets/lines/<?php echo $lineId; ?>.svg" width="64px" class="img-fluid mb-3">
</div>
<div>
<img src="/assets/lines/m.svg" width="64px" class="img-fluid mb-3">
<img src="/assets/lines/<?php echo $line; ?>.svg" width="64px" class="img-fluid mb-3">
<?php
$favoriteStops = getFavorites($lineId);
foreach ($favoriteStops as $stop) {
$stop_name = getStopName($stop['stopId']);
include 'stop.php';
if (count($favoriteStops) > 1) {
echo '<hr class="mt-4">';
}
}
?>
</div>
</div>
<?php
$stop_name = "Champs elysées";
include 'components/homepage/stop.php';
?>
</div>

View File

@ -1,71 +1,9 @@
<?php
function getStopName($stopId) {
$json = file_get_contents(__DIR__ . '/../../data/stops.json');
$result = array_filter(json_decode($json, true), function($item) use ($stopId) {
return $item['fields']['mode'] === 'METRO' && $item['fields']['id_ref_zda'] === $stopId;
});
return reset($result)['fields']['nom_zda'];
}
function getFavorites($lineId) {
global $conn;
try {
$query = $conn->prepare("SELECT stopId FROM favorites WHERE lineId = ? AND userId = ?");
$query->execute([$lineId, $_SESSION['user_id']]);
$result = $query->fetchAll(PDO::FETCH_ASSOC);
return $result;
} catch(PDOException $e) {
return [];
}
}
$query = $conn->prepare("SELECT DISTINCT lineId FROM favorites WHERE userId = ?");
$query->execute([$_SESSION['user_id']]);
$lineIds = $query->fetchAll(PDO::FETCH_COLUMN);
$line = '2';
include 'components/homepage/line.php';
?>
<div class="px-4 my-5 text-center">
<h1 class="display-5 fw-bold">Subways</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">Displaying your favorite stations and lines below</p>
</div>
</div>
<hr>
<?php
foreach ($lineIds as $lineId) {
include 'line.php';
}
if (empty($lineIds)) {
echo '<div class="alert alert-info text-center" role="alert">You havent added any favorites yet.</div>';
}
?>
<script>
function removeFavorite(stopId, lineId) {
var formData = new FormData();
formData.append('stopId', stopId);
formData.append('lineId', lineId);
formData.append('action', 'remove');
fetch('/updateFavorite.php', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
location.reload();
}
})
.catch(error => {
console.log(error);
});
}
</script>
$line = '5';
include 'components/homepage/line.php';
?>

View File

@ -1,61 +1,18 @@
<?php
$response = file_get_contents('https://prim.iledefrance-mobilites.fr/marketplace/stop-monitoring?MonitoringRef=STIF:StopArea:SP:' . $stop['stopId'] . ':',
false, stream_context_create([
"http" => [
"header" => "apiKey: " . $idfm_api_key
]
]));
$data = json_decode($response, true);
$directions = [];
if (isset($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit'])) {
foreach ($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit'] as $visit) {
$vehicleJourney = $visit['MonitoredVehicleJourney'];
if (strpos($vehicleJourney['OperatorRef']['value'], '.' . $lineId . '.' . $lineId . ':')) {
if (isset($vehicleJourney['MonitoredCall']['ExpectedDepartureTime'])) {
$direction = $vehicleJourney['DestinationName'][0]['value'];
$expectedDeparture = $vehicleJourney['MonitoredCall']['ExpectedDepartureTime'];
$departureTime = date('H:i', strtotime($expectedDeparture . ' +2 hours'));
$currentTime = date('H:i', strtotime('now' . ' +2 hours'));
if ($departureTime > $currentTime) {
if (!isset($directions[$direction])) {
$directions[$direction] = [];
}
if (count($directions[$direction]) < 2) {
$directions[$direction][] = $departureTime;
}
}
}
}
}
}
$finalDirections = [];
foreach ($directions as $direction => $times) {
if (count($times) == 2) {
$finalDirections[] = [
'direction' => $direction,
'next_departure' => $times[0],
'following_departure' => $times[1]
];
} elseif (count($times) == 1) {
$finalDirections[] = [
'direction' => $direction,
'next_departure' => $times[0],
'following_departure' => '-'
];
}
}
?>
<div>
<p class="h5 d-inline"><?php echo $stop_name; ?></p>
<a id="remove-<?php echo $stop['stopId'] . "-" . $lineId ?>" class="btn btn-danger btn-sm mb-2" onclick="removeFavorite(<?php echo $stop['stopId'] . ',' . $lineId; ?>)"><i class="fa fa-trash"></i></a>
</div>
<?php include 'stop_table.php'; ?>
<p class="h5"><?php echo $stop_name; ?></p>
<?php
$directions = [
[
'direction' => 'Château de Vincennes',
'next_departure' => '05:32',
'following_departure' => '05:41'
],
[
'direction' => 'Porte de Pantin',
'next_departure' => '05:40',
'following_departure' => '05:49'
],
];
include 'stop_table.php';
?>
</div>

View File

@ -3,23 +3,18 @@
<thead>
<tr>
<th>Direction</th>
<th>Next train</th>
<th>Following departure</th>
<th>Prochain départ</th>
<th>Prochain suivant</th>
</tr>
</thead>
<tbody>
<?php
if (empty($finalDirections)) {
echo '<tr><td colspan="3">This train no longer takes passengers</td></tr>';
}
foreach ($finalDirections as $direction):
?>
<?php foreach ($directions as $direction): ?>
<tr>
<td><?php echo htmlspecialchars($direction['direction']); ?></td>
<td><?php echo htmlspecialchars($direction['next_departure']); ?></td>
<td><?php echo htmlspecialchars($direction['following_departure']); ?></td>
<td><?php echo $direction['direction']; ?></td>
<td><?php echo $direction['next_departure']; ?></td>
<td><?php echo $direction['following_departure']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>

View File

@ -1,39 +0,0 @@
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$query = $conn->prepare("SELECT * FROM users WHERE email = :email");
$query->bindParam(':email', $_POST['email']);
$query->execute();
$user = $query->fetch(PDO::FETCH_ASSOC);
if ($user && password_verify($_POST['password'], $user['password'])) {
$_SESSION['user_id'] = $user['id'];
$_SESSION['first_name'] = $user['first_name'];
$_SESSION['is_admin'] = $user['is_admin'];
header("Location: /");
$log = $conn->prepare("INSERT INTO logs (userId, date, ip) VALUES (:userId, :date, :ip)");
$log->bindParam(':userId', $user['id']);
$log->bindParam(':date', date('Y-m-d-H-i-s'));
$log->bindParam(':ip', $_SERVER['REMOTE_ADDR']);
$log->execute();
} else {
$errorMessage = "Invalid email or password.";
}
}
?>
<body class="text-center">
<form class="form-signin" method="POST" action="login.php">
<img class="mb-4" src="assets/logo/dark.png" alt="" width="256px">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<?= isset($errorMessage) ? '<div class="alert alert-danger" role="alert">' . $errorMessage . '</div>' : '' ?>
<input type="email" id="email" name="email" class="form-control mt-2" placeholder="damien.dupuis@gmail.com" required autofocus>
<input type="password" id="password" name="password" class="form-control mt-2" placeholder="Password" required>
<button class="btn btn-lg btn-primary btn-block" type="submit">Continue</button>
<p class="mt-5 mb-3 text-muted">Not registered ? <a class="text-decoration-none" href="/register.php">Create an account here</a></p>
</form>
</body>

View File

@ -1,110 +1,34 @@
<?php
function getStops($lineId) {
global $conn;
$stmt = $conn->prepare("SELECT * FROM stops WHERE lineId = ?");
$stmt->execute([$lineId]);
return $stmt->fetchAll();
}
function isFavorite($userId, $stopId, $lineId) {
global $conn;
$stmt = $conn->prepare("SELECT * FROM favorites WHERE userId = ? AND stopId = ? AND lineId = ?");
$stmt->execute([$userId, $stopId, $lineId]);
return $stmt->rowCount() > 0;
}
include 'services/stop_service.php';
?>
<div class="px-4 my-5 text-center">
<h1 class="display-5 fw-bold">Metro lines</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">Explore available Paris metro lines in the IDFM network</p>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="row">
<?php
for ($i = 1; $i <= 14; $i++):
$stops = getStops($i);
if (!empty($stops)):
?>
<div class="col-2 mb-3">
<div class="card h-100">
<div class="card-body">
<a data-bs-toggle="modal" href="#modal<?= $i ?>">
<img src="/assets/lines/<?= $i ?>.svg" alt="Logo Ligne <?= $i ?>" class="img-fluid" style="padding: 10px;">
</a>
<div class="modal fade" id="modal<?= $i ?>" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Stations de la ligne <?= $i ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<div class="row">
<?php
$stops = getStops($i);
include 'stop_list.php';
?>
</div>
</div>
</div>
<h2>Lignes de Métro</h2>
<div class="row">
<?php for ($i = 1; $i <= 14; $i++): ?>
<div class="col-3 mb-3">
<div class="card h-100">
<div class="card-body">
<a data-bs-toggle="modal" href="#modal<?= $i ?>">
<img src="/assets/lines/<?= $i ?>.svg" alt="Logo Ligne <?= $i ?>" class="img-fluid" style="padding: 10px;">
</a>
<div class="modal fade" id="modal<?= $i ?>" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Stations de la ligne <?= $i ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<?php
$stops = getStops($i);
include 'components/navigate/stop_list.php';
?>
</div>
</div>
</div>
</div>
</div>
<?php if ($i % 6 === 0): ?>
</div><div class="row">
<?php endif; ?>
<?php endif; endfor; ?>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.add-stop, .remove-stop').forEach(function(button) {
button.addEventListener('click', function() {
var stopId = this.getAttribute('data-station-id');
var lineId = this.getAttribute('data-line-id');
var action = this.classList.contains('add-stop') ? 'add' : 'remove';
var buttonElement = this;
fetch('/updateFavorite.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: 'stopId=' + stopId + '&lineId=' + lineId + '&action=' + action
})
.then(response => response.json())
.then(data => {
if (data.success) {
if (action === 'add') {
buttonElement.classList.remove('add-stop', 'btn-success');
buttonElement.classList.add('remove-stop', 'btn-danger');
buttonElement.textContent = 'Revoke';
} else {
buttonElement.classList.remove('remove-stop', 'btn-danger');
buttonElement.classList.add('add-stop', 'btn-success');
buttonElement.textContent = 'Add';
}
buttonElement.removeEventListener('click', arguments.callee);
buttonElement.addEventListener('click', arguments.callee);
} else {
console.error('Error:', data.error);
}
})
.catch(error => console.error('Error:', error));
});
});
});
</script>
<?php endfor; ?>
</div>

View File

@ -1,8 +1,11 @@
<div class="row">
<?php
$chunks = array_chunk($stops, ceil(count($stops) / 2), true);
foreach ($chunks as $chunk): ?>
$stations = array_fill(1, 10, 'Station');
$half = ceil(count($stations) / 2);
$chunks = array_chunk($stations, ceil(count($stations) / 2), true);
?>
<?php foreach ($chunks as $chunk): ?>
<div class="col-md-6">
<table class="table table-striped">
<thead>
@ -14,18 +17,12 @@
<tbody>
<?php foreach ($chunk as $station): ?>
<tr>
<td><?php echo htmlspecialchars($station['name']); ?></td>
<td class="text-end">
<?php if (isFavorite($_SESSION['user_id'], $station['stopId'], $i)): ?>
<button class="btn btn-danger remove-stop" data-station-id="<?= $station['stopId'] ?>" data-line-id="<?= $i ?>">Revoke</button>
<?php else: ?>
<button class="btn btn-success add-stop" data-station-id="<?= $station['stopId'] ?>" data-line-id="<?= $i ?>">Add</button>
<?php endif; ?>
</td>
<td><?php echo $station; ?></td>
<td class="text-end"><div class="btn btn-success">Ajouter</div></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@ -1,76 +0,0 @@
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($_POST['password'] !== $_POST['confirmPassword']) {
$errorMessage = "Password doesnt match";
} else {
$query = $conn->prepare("SELECT * FROM users WHERE email = :email");
$query->bindParam(':email', $_POST['email']);
$query->execute();
$user = $query->fetch(PDO::FETCH_ASSOC);
if ($user) {
$errorMessage = "Email already used.";
}
if (!isset($errorMessage)) {
try {
$password = password_hash($_POST['password'], PASSWORD_DEFAULT);
$query = $conn->prepare("INSERT INTO users (firstName, lastName, email, password) VALUES (:firstName, :lastName, :email, :password)");
$query->bindParam(':firstName', $_POST['firstName']);
$query->bindParam(':lastName', $_POST['lastName']);
$query->bindParam(':email', $_POST['email']);
$query->bindParam(':password', $password);
$query->execute();
$query = $conn->prepare("SELECT COUNT(*) as count FROM users");
$query->execute();
$result = $query->fetch(PDO::FETCH_ASSOC);
if ($result['count'] == 1) {
$query = $conn->prepare("UPDATE users SET is_admin = 1 WHERE email = :email");
$query->bindParam(':email', $_POST['email']);
$query->execute();
}
header("Location: login.php");
exit();
} catch (PDOException $e) {
$errorMessage = "Please fill correct values";
}
}
}
}
?>
<body class="text-center">
<form class="form-signin" method="POST" action="register.php">
<img src="assets/logo/dark.png" alt="" width="256px">
<h1 class="h3 mb-3 font-weight-normal">Create an account</h1>
<?= isset($errorMessage) ? '<div class="alert alert-danger" role="alert">' . $errorMessage . '</div>' : '' ?>
<div class="row">
<div class="col">
<input type="text" id="firstName" name="firstName" class="form-control mt-2" placeholder="Damien" required>
</div>
<div class="col">
<input type="text" id="lastName" name="lastName" class="form-control mt-2" placeholder="Dupuis" required>
</div>
</div>
<input type="email" id="email" name="email" class="form-control mt-2" placeholder="damien.dupuis@gmail.com" required>
<hr>
<div class="row">
<div class="col">
<input type="password" id="password" name="password" class="form-control" placeholder="Password" required>
</div>
<div class="col">
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control" placeholder="Confirmation" required>
</div>
</div>
<button class="btn btn-lg btn-primary btn-block mt-4" type="submit">Continue</button>
<p class="mt-5 mb-3 text-muted">Already an account ? <a class="text-decoration-none" href="/login.php">Login here</a></p>
</form>
</body>

View File

@ -1,34 +0,0 @@
<?php
session_start();
include __DIR__ . '/../../config.php';
$page = basename($_SERVER['PHP_SELF']);
if (!isset($_SESSION['user_id']) && $page !== 'login.php' && $page !== 'register.php') {
header("Location: login.php");
exit();
} else if (isset($_SESSION['user_id']) && ($page === 'login.php' || $page === 'register.php')) {
header("Location: index.php");
exit();
}
include 'header.php';
include 'navbar.php';
include __DIR__ . '/../../services/db.php';
?>
<main class="container mt-4">
<?php include $content; ?>
</main>
<?php include 'footer.php'; ?>
<script>
window.addEventListener('load', function() {
document.body.style.display = 'block';
});
</script>
</body>
</html>

View File

@ -1,37 +0,0 @@
<?php if (isset($_SESSION['user_id'])) : ?>
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="assets/logo/dark.png" alt="" width="64">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link <?php echo ($_SERVER['REQUEST_URI'] == '/') ? 'active' : ''; ?>" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo ($_SERVER['REQUEST_URI'] == '/navigate.php') ? 'active' : ''; ?>" href="/navigate.php">Discover</a>
</li>
<li class="nav-item">
<a class="nav-link <?php echo ($_SERVER['REQUEST_URI'] == '/account.php') ? 'active' : ''; ?>" href="/account.php">Account</a>
</li>
</ul>
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="/logout.php"><i class="fa fa-sign-out"></i></a>
</li>
</ul>
<div class="d-flex">
<?php if(isset($_SESSION['is_admin']) && $_SESSION['is_admin']): ?>
<a class="btn btn-primary" href="/admin.php">Admin</a>
<?php endif; ?>
</div>
</div>
</div>
</nav>
</header>
<?php endif; ?>

View File

@ -1,7 +0,0 @@
<?php
$idfm_api_key = '';
$db_host = '127.0.0.1';
$db_name = 'subwaySchedule';
$db_user = '';
$db_password = '';
?>

File diff suppressed because one or more lines are too long

4
index.php Normal file
View File

@ -0,0 +1,4 @@
<?php
$content = 'components/homepage/main.php';
include 'structure/main.php';
?>

4
navigate.php Normal file
View File

@ -0,0 +1,4 @@
<?php
$content = 'components/navigate/main.php';
include 'structure/main.php';
?>

View File

@ -1,4 +0,0 @@
<?php
$content = __DIR__ . '/../components/account/main.php';
include __DIR__ . '/../components/structure/main.php';
?>

View File

@ -1,4 +0,0 @@
<?php
$content = __DIR__ . '/../components/admin/main.php';
include __DIR__ . '/../components/structure/main.php';
?>

View File

@ -1,49 +0,0 @@
html,
body {
height: 100%;
}
body {
display: -ms-flexbox;
display: -webkit-box;
display: flex;
-ms-flex-align: center;
-ms-flex-pack: center;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-signin {
width: 100%;
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .checkbox {
font-weight: 400;
}
.form-signin .form-control {
position: relative;
box-sizing: border-box;
height: auto;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,4 +0,0 @@
<?php
$content = __DIR__ . '/../components/homepage/main.php';
include __DIR__ . '/../components/structure/main.php';
?>

View File

@ -1,4 +0,0 @@
<?php
$content = __DIR__ . '/../components/login/main.php';
include __DIR__ . '/../components/structure/main.php';
?>

View File

@ -1,7 +0,0 @@
<?php
session_start();
session_unset();
session_destroy();
header("Location: login.php");
exit();
?>

View File

@ -1,4 +0,0 @@
<?php
$content = __DIR__ . '/../components/navigate/main.php';
include __DIR__ . '/../components/structure/main.php';
?>

View File

@ -1,4 +0,0 @@
<?php
$content = __DIR__ . '/../components/register/main.php';
include __DIR__ . '/../components/structure/main.php';
?>

View File

@ -1,32 +0,0 @@
<?php
session_start();
include __DIR__ . '/../config.php';
include __DIR__ . '/../services/db.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['stopId'], $_POST['lineId'], $_POST['action'])) {
$userId = $_SESSION['user_id'];
$stopId = $_POST['stopId'];
$lineId = $_POST['lineId'];
$action = $_POST['action'];
try {
if ($action === 'add') {
$query = $conn->prepare("SELECT * FROM favorites WHERE userId = ? AND stopId = ? AND lineId = ?");
$query->execute([$userId, $stopId, $lineId]);
$existingFavorite = $query->fetch();
if (!$existingFavorite) {
$query = $conn->prepare("INSERT INTO favorites (userId, stopId, lineId) VALUES (?, ?, ?)");
$query->execute([$userId, $stopId, $lineId]);
}
} elseif ($action === 'remove') {
$query = $conn->prepare("DELETE FROM favorites WHERE userId = ? AND stopId = ? AND lineId = ?");
$query->execute([$userId, $stopId, $lineId]);
}
echo json_encode(['success' => true]);
} catch (PDOException $e) {
echo json_encode(['error' => $e->getMessage()]);
}
exit();
}
?>

View File

@ -1,508 +0,0 @@
[2024-06-14 15:47:35] JSON file read successfully.
[2024-06-14 15:47:35] JSON data decoded successfully.
[2024-06-14 15:47:35] Data filtered. Number of items: 391
[2024-06-14 15:47:35] Database statement prepared.
[2024-06-14 15:47:35] Transaction started.
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44579' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44617' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42587' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58718' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44310' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42237' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44909' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42587' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44909' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58759' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44877' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '473875' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42288' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43493' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44139' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43511' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42237' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44617' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44617' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43138' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '470524' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44962' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42587' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44901' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '473890' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58718' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '473875' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45676' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44138' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43898' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44273' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44372' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44371' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44828' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44617' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58728' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58578' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58578' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42531' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43969' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42311' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42589' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43310' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44345' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45056' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43026' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '470519' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42230' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42280' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42288' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45229' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42587' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45676' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44075' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43566' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43898' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44236' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44371' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45193' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58716' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45314' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44600' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44637' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '462374' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43138' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58578' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '42874' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '462352' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43425' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '43566' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44901' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '44642' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '45100' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '58759' for key 'PRIMARY'
[2024-06-14 15:47:35] SQL Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '473875' for key 'PRIMARY'
[2024-06-14 15:47:35] Transaction committed. Number of items inserted: 304
[2024-06-14 15:48:02] JSON file read successfully.
[2024-06-14 15:48:02] JSON data decoded successfully.
[2024-06-14 15:48:02] Data filtered. Number of items: 391
[2024-06-14 15:48:02] Database statement prepared.
[2024-06-14 15:48:02] Transaction started.
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:02] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] SQL Error: SQLSTATE[HY000]: General error: 1364 Field 'stopId' doesn't have a default value
[2024-06-14 15:48:03] Transaction committed. Number of items inserted: 0
[2024-06-14 15:49:00] JSON file read successfully.
[2024-06-14 15:49:00] JSON data decoded successfully.
[2024-06-14 15:49:00] Data filtered. Number of items: 391
[2024-06-14 15:49:00] Database statement prepared.
[2024-06-14 15:49:00] Transaction started.
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] SQL Error: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'lineId' at row 1
[2024-06-14 15:49:00] Transaction committed. Number of items inserted: 379

View File

@ -1,44 +0,0 @@
<?php
try {
$conn = new PDO("mysql:host=$db_host", $db_user, $db_password);
$conn->exec("CREATE DATABASE IF NOT EXISTS $db_name");
$conn->exec("USE $db_name");
$conn->exec("CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
firstName VARCHAR(50) NOT NULL,
lastName VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
is_admin BOOLEAN NOT NULL DEFAULT 0,
CHECK (LENGTH(firstName) >= 2),
CHECK (LENGTH(lastName) >= 2),
CHECK (email REGEXP '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$')
)");
$conn->exec("CREATE TABLE IF NOT EXISTS favorites (
userId INT NOT NULL,
stopId INT NOT NULL,
lineId INT NOT NULL,
FOREIGN KEY (userId) REFERENCES users(id)
)");
$conn->exec("CREATE TABLE IF NOT EXISTS logs (
userId INT NOT NULL,
date DATETIME NOT NULL,
ip VARCHAR(255) NOT NULL,
FOREIGN KEY (userId) REFERENCES users(id)
)");
$conn->exec("CREATE TABLE IF NOT EXISTS stops (
id INT AUTO_INCREMENT PRIMARY KEY,
stopId INT NOT NULL,
lineId INT NOT NULL,
name VARCHAR(255) NOT NULL
)");
} catch(PDOException $e) {
echo "Connection failed: " . $e->getMessage();
}
?>

10
services/stop_service.php Normal file
View File

@ -0,0 +1,10 @@
<?php
function getStops($line) {
$json = file_get_contents("../data/stops.json");
$data = json_decode($json, true);
$result = array_filter($data, function($item) use ($line) {
return $item['fields']['mode'] === 'METRO' && $item['fields']['indice_lig'] === "$line";
});
return $result;
}

View File

@ -1,2 +1 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/440009238d.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

View File

@ -3,13 +3,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Subway</title>
<link rel="icon" href="assets/logo/favicon.png">
<title>Subway schedules</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<?php
if (!isset($_SESSION['user_id'])) {
echo '<link href="assets/css/login.css" rel="stylesheet">';
}
?>
</head>
<body style="display:none;">
<body>

10
structure/main.php Normal file
View File

@ -0,0 +1,10 @@
<?php include 'structure/header.php'; ?>
<?php include 'structure/navbar.php'; ?>
<main class="container mt-5">
<?php include $content; ?>
</main>
<?php include 'structure/footer.php'; ?>
</body>
</html>

25
structure/navbar.php Normal file
View File

@ -0,0 +1,25 @@
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Subways</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Accueil</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/navigate.php">Parcourir</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Mon compte</a>
</li>
</ul>
<div class="ms-auto">
<a class="btn btn-primary" href="#">Gestion des utilisateurs</a>
</div>
</div>
</nav>
</header>