Compare commits

..

20 Commits
v0.0.3 ... main

Author SHA1 Message Date
Valentin dce7330f73 fix(homepage) miss removing previous fix 2024-06-22 21:25:48 +02:00
Valentin db71adc9f2 fix(favicon) new icon 2024-06-22 21:19:32 +02:00
Valentin 9d36d93ad6
Update README.MD 2024-06-22 21:03:33 +02:00
Valentin ee12ab5324 fix(home) displaying users favorites... 2024-06-19 17:51:40 +02:00
Maxime H 9801bc99d9
fix(issues) 2024-06-19 17:49:31 +02:00
Valentin c80e41c953 fix(home) direction for 3 branches 2024-06-19 17:08:35 +02:00
Valentin 8d942f4e78 fix(register) fix check request 2024-06-17 11:28:49 +02:00
Maxime H ca48276b2b Add 3 checks 2024-06-17 11:02:42 +02:00
Valentin 3e4cb6ddd9 feat(logs) displaying logs on account page 2024-06-17 10:59:03 +02:00
Valentin 387bc0a2d7 feat(home) displaying cached stations 2024-06-14 18:02:10 +02:00
Valentin cf5f96f47b feat(stops) caching stops 2024-06-14 16:59:36 +02:00
Valentin 1d20fd7815 feat(admin) user delete & admin creation 2024-06-14 11:29:01 +02:00
Valentin b04fc41ab2 fix(readme) readme logo error 2024-06-14 10:50:09 +02:00
Valentin d7cdb94316 fix(public) better structure 2024-06-14 10:48:27 +02:00
Valentin f9d50f5b2b
Create LICENSE 2024-06-13 01:42:32 +02:00
Valentin a79972fee4
Update README.MD 2024-06-13 01:42:02 +02:00
Valentin b26fb9ff12 feat(README) readme temp 2024-06-13 01:29:46 +02:00
Valentin c2f825c56a fix(homepage) direction mistake 2024-06-13 01:14:35 +02:00
Valentin 913ff89538 fix(update) import config in endpoints 2024-06-13 01:05:21 +02:00
Valentin 7530c2472a fix(register) create user in db 2024-06-13 00:58:56 +02:00
54 changed files with 1136 additions and 107 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
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.

86
README.MD Normal file
View File

@ -0,0 +1,86 @@
<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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

107
components/account/main.php Normal file
View File

@ -0,0 +1,107 @@
<?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>

47
components/admin/main.php Normal file
View File

@ -0,0 +1,47 @@
<?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

@ -0,0 +1,37 @@
<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>

113
components/admin/post.php Normal file
View File

@ -0,0 +1,113 @@
<?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

@ -0,0 +1,39 @@
<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

@ -10,7 +10,7 @@
foreach ($favoriteStops as $stop) { foreach ($favoriteStops as $stop) {
$stop_name = getStopName($stop['stopId']); $stop_name = getStopName($stop['stopId']);
include 'components/homepage/stop.php'; include 'stop.php';
if (count($favoriteStops) > 1) { if (count($favoriteStops) > 1) {
echo '<hr class="mt-4">'; echo '<hr class="mt-4">';
} }

View File

@ -12,8 +12,8 @@ function getStopName($stopId) {
function getFavorites($lineId) { function getFavorites($lineId) {
global $conn; global $conn;
try { try {
$query = $conn->prepare("SELECT stopId FROM favorites WHERE lineId = ?"); $query = $conn->prepare("SELECT stopId FROM favorites WHERE lineId = ? AND userId = ?");
$query->execute([$lineId]); $query->execute([$lineId, $_SESSION['user_id']]);
$result = $query->fetchAll(PDO::FETCH_ASSOC); $result = $query->fetchAll(PDO::FETCH_ASSOC);
return $result; return $result;
@ -29,7 +29,7 @@ $lineIds = $query->fetchAll(PDO::FETCH_COLUMN);
?> ?>
<div class="px-4 my-5 text-center"> <div class="px-4 my-5 text-center">
<h1 class="display-5 fw-bold">Subway Schedule</h1> <h1 class="display-5 fw-bold">Subways</h1>
<div class="col-lg-6 mx-auto"> <div class="col-lg-6 mx-auto">
<p class="lead mb-4">Displaying your favorite stations and lines below</p> <p class="lead mb-4">Displaying your favorite stations and lines below</p>
@ -38,7 +38,7 @@ $lineIds = $query->fetchAll(PDO::FETCH_COLUMN);
<?php <?php
foreach ($lineIds as $lineId) { foreach ($lineIds as $lineId) {
include 'components/homepage/line.php'; include 'line.php';
} }
if (empty($lineIds)) { if (empty($lineIds)) {
@ -46,7 +46,6 @@ if (empty($lineIds)) {
} }
?> ?>
<script> <script>
function removeFavorite(stopId, lineId) { function removeFavorite(stopId, lineId) {
@ -55,7 +54,7 @@ function removeFavorite(stopId, lineId) {
formData.append('lineId', lineId); formData.append('lineId', lineId);
formData.append('action', 'remove'); formData.append('action', 'remove');
fetch('/endpoints/updateFavorite.php', { fetch('/updateFavorite.php', {
method: 'POST', method: 'POST',
body: formData body: formData
}) })

View File

@ -13,13 +13,15 @@ $directions = [];
if (isset($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit'])) { if (isset($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit'])) {
foreach ($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit'] as $visit) { foreach ($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit'] as $visit) {
$vehicleJourney = $visit['MonitoredVehicleJourney']; $vehicleJourney = $visit['MonitoredVehicleJourney'];
if (strpos($vehicleJourney['OperatorRef']['value'], '.' . $lineId . '.' . $lineId) !== false) { if (strpos($vehicleJourney['OperatorRef']['value'], '.' . $lineId . '.' . $lineId . ':')) {
$direction = $vehicleJourney['DirectionName'][0]['value']; if (isset($vehicleJourney['MonitoredCall']['ExpectedDepartureTime'])) {
$expectedArrival = $vehicleJourney['MonitoredCall']['ExpectedArrivalTime']; $direction = $vehicleJourney['DestinationName'][0]['value'];
$expectedDeparture = $vehicleJourney['MonitoredCall']['ExpectedDepartureTime']; $expectedDeparture = $vehicleJourney['MonitoredCall']['ExpectedDepartureTime'];
$departureTime = date('H:i', strtotime($expectedArrival . ' +2 hours')); $departureTime = date('H:i', strtotime($expectedDeparture . ' +2 hours'));
$currentTime = date('H:i', strtotime('now' . ' +2 hours'));
if ($departureTime > $currentTime) {
if (!isset($directions[$direction])) { if (!isset($directions[$direction])) {
$directions[$direction] = []; $directions[$direction] = [];
} }
@ -28,6 +30,8 @@ if (isset($data['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['Monitor
} }
} }
} }
}
}
} }
$finalDirections = []; $finalDirections = [];
@ -40,12 +44,13 @@ foreach ($directions as $direction => $times) {
]; ];
} elseif (count($times) == 1) { } elseif (count($times) == 1) {
$finalDirections[] = [ $finalDirections[] = [
'direction' => $times[0], 'direction' => $direction,
'next_departure' => $times[0], 'next_departure' => $times[0],
'following_departure' => '-' 'following_departure' => '-'
]; ];
} }
} }
?> ?>
<div> <div>

View File

@ -11,7 +11,13 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$_SESSION['user_id'] = $user['id']; $_SESSION['user_id'] = $user['id'];
$_SESSION['first_name'] = $user['first_name']; $_SESSION['first_name'] = $user['first_name'];
$_SESSION['is_admin'] = $user['is_admin']; $_SESSION['is_admin'] = $user['is_admin'];
header("Location: index.php"); 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 { } else {
$errorMessage = "Invalid email or password."; $errorMessage = "Invalid email or password.";
} }

View File

@ -1,12 +1,10 @@
<?php <?php
function getStops($line) { function getStops($lineId) {
$json = file_get_contents(__DIR__ . '/../../data/stops.json'); global $conn;
$data = json_decode($json, true); $stmt = $conn->prepare("SELECT * FROM stops WHERE lineId = ?");
$result = array_filter($data, function($item) use ($line) { $stmt->execute([$lineId]);
return $item['fields']['mode'] === 'METRO' && $item['fields']['indice_lig'] === "$line"; return $stmt->fetchAll();
});
return $result;
} }
function isFavorite($userId, $stopId, $lineId) { function isFavorite($userId, $stopId, $lineId) {
@ -16,6 +14,7 @@ function isFavorite($userId, $stopId, $lineId) {
return $stmt->rowCount() > 0; return $stmt->rowCount() > 0;
} }
?> ?>
<div class="px-4 my-5 text-center"> <div class="px-4 my-5 text-center">
@ -29,7 +28,11 @@ function isFavorite($userId, $stopId, $lineId) {
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<?php for ($i = 1; $i <= 14; $i++): ?> <?php
for ($i = 1; $i <= 14; $i++):
$stops = getStops($i);
if (!empty($stops)):
?>
<div class="col-2 mb-3"> <div class="col-2 mb-3">
<div class="card h-100"> <div class="card h-100">
<div class="card-body"> <div class="card-body">
@ -44,9 +47,12 @@ function isFavorite($userId, $stopId, $lineId) {
<button type="button" class="btn-close" data-bs-dismiss="modal"></button> <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<?php $stations = getStops($i); ?>
<div class="row"> <div class="row">
<?php include 'components/navigate/stop_list.php'; ?> <?php
$stops = getStops($i);
include 'stop_list.php';
?>
</div> </div>
</div> </div>
</div> </div>
@ -58,7 +64,7 @@ function isFavorite($userId, $stopId, $lineId) {
<?php if ($i % 6 === 0): ?> <?php if ($i % 6 === 0): ?>
</div><div class="row"> </div><div class="row">
<?php endif; ?> <?php endif; ?>
<?php endfor; ?> <?php endif; endfor; ?>
</div> </div>
</div> </div>
</div> </div>
@ -72,7 +78,7 @@ document.addEventListener('DOMContentLoaded', function() {
var action = this.classList.contains('add-stop') ? 'add' : 'remove'; var action = this.classList.contains('add-stop') ? 'add' : 'remove';
var buttonElement = this; var buttonElement = this;
fetch('/endpoints/updateFavorite.php', { fetch('/updateFavorite.php', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
@ -85,11 +91,11 @@ document.addEventListener('DOMContentLoaded', function() {
if (action === 'add') { if (action === 'add') {
buttonElement.classList.remove('add-stop', 'btn-success'); buttonElement.classList.remove('add-stop', 'btn-success');
buttonElement.classList.add('remove-stop', 'btn-danger'); buttonElement.classList.add('remove-stop', 'btn-danger');
buttonElement.textContent = 'Retirer'; buttonElement.textContent = 'Revoke';
} else { } else {
buttonElement.classList.remove('remove-stop', 'btn-danger'); buttonElement.classList.remove('remove-stop', 'btn-danger');
buttonElement.classList.add('add-stop', 'btn-success'); buttonElement.classList.add('add-stop', 'btn-success');
buttonElement.textContent = 'Ajouter'; buttonElement.textContent = 'Add';
} }
buttonElement.removeEventListener('click', arguments.callee); buttonElement.removeEventListener('click', arguments.callee);
buttonElement.addEventListener('click', arguments.callee); buttonElement.addEventListener('click', arguments.callee);

View File

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

View File

@ -1,7 +1,6 @@
<?php <?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($_POST['password'] !== $_POST['confirmPassword']) { if ($_POST['password'] !== $_POST['confirmPassword']) {
$errorMessage = "Password doesnt match"; $errorMessage = "Password doesnt match";
} else { } else {
@ -13,6 +12,33 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($user) { if ($user) {
$errorMessage = "Email already used."; $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";
}
}
} }
} }

View File

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

View File

@ -1,7 +1,7 @@
<?php <?php
session_start(); session_start();
include 'config.php'; include __DIR__ . '/../../config.php';
$page = basename($_SERVER['PHP_SELF']); $page = basename($_SERVER['PHP_SELF']);
if (!isset($_SESSION['user_id']) && $page !== 'login.php' && $page !== 'register.php') { if (!isset($_SESSION['user_id']) && $page !== 'login.php' && $page !== 'register.php') {
@ -12,9 +12,9 @@ if (!isset($_SESSION['user_id']) && $page !== 'login.php' && $page !== 'register
exit(); exit();
} }
include 'structure/header.php'; include 'header.php';
include 'structure/navbar.php'; include 'navbar.php';
include 'services/db.php'; include __DIR__ . '/../../services/db.php';
?> ?>
@ -22,7 +22,7 @@ include 'services/db.php';
<?php include $content; ?> <?php include $content; ?>
</main> </main>
<?php include 'structure/footer.php'; ?> <?php include 'footer.php'; ?>
<script> <script>
window.addEventListener('load', function() { window.addEventListener('load', function() {

View File

@ -17,7 +17,7 @@
<a class="nav-link <?php echo ($_SERVER['REQUEST_URI'] == '/navigate.php') ? 'active' : ''; ?>" href="/navigate.php">Discover</a> <a class="nav-link <?php echo ($_SERVER['REQUEST_URI'] == '/navigate.php') ? 'active' : ''; ?>" href="/navigate.php">Discover</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#">Account</a> <a class="nav-link <?php echo ($_SERVER['REQUEST_URI'] == '/account.php') ? 'active' : ''; ?>" href="/account.php">Account</a>
</li> </li>
</ul> </ul>
<ul class="navbar-nav ms-auto mb-2 mb-lg-0"> <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
@ -26,7 +26,9 @@
</li> </li>
</ul> </ul>
<div class="d-flex"> <div class="d-flex">
<a class="btn btn-primary" href="#">Admin</a> <?php if(isset($_SESSION['is_admin']) && $_SESSION['is_admin']): ?>
<a class="btn btn-primary" href="/admin.php">Admin</a>
<?php endif; ?>
</div> </div>
</div> </div>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -1,25 +0,0 @@
<?php
session_start();
include '../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') {
$stmt = $conn->prepare("INSERT INTO favorites (userId, stopId, lineId) VALUES (?, ?, ?)");
$stmt->execute([$userId, $stopId, $lineId]);
} elseif ($action === 'remove') {
$stmt = $conn->prepare("DELETE FROM favorites WHERE userId = ? AND stopId = ? AND lineId = ?");
$stmt->execute([$userId, $stopId, $lineId]);
}
echo json_encode(['success' => true]);
} catch (PDOException $e) {
echo json_encode(['error' => $e->getMessage()]);
}
exit();
}
?>

View File

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

View File

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

View File

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

4
public/account.php Normal file
View File

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

4
public/admin.php Normal file
View File

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

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

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

4
public/index.php Normal file
View File

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

4
public/login.php Normal file
View File

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

4
public/navigate.php Normal file
View File

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

4
public/register.php Normal file
View File

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

32
public/updateFavorite.php Normal file
View File

@ -0,0 +1,32 @@
<?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();
}
?>

508
refreshData.log Normal file
View File

@ -0,0 +1,508 @@
[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,4 +0,0 @@
<?php
$content = 'components/register/main.php';
include 'structure/main.php';
?>

View File

@ -11,18 +11,32 @@ try {
lastName VARCHAR(50) NOT NULL, lastName VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE, email VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL,
is_admin BOOLEAN NOT NULL DEFAULT 0 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 ( $conn->exec("CREATE TABLE IF NOT EXISTS favorites (
id INT AUTO_INCREMENT PRIMARY KEY,
userId INT NOT NULL, userId INT NOT NULL,
stopId INT NOT NULL, stopId INT NOT NULL,
lineId INT NOT NULL, lineId INT NOT NULL,
FOREIGN KEY (userId) REFERENCES users(id) 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) { } catch(PDOException $e) {
echo "Connection failed: " . $e->getMessage(); echo "Connection failed: " . $e->getMessage();