Spostamento servizi seta

This commit is contained in:
Leocraft1
2025-11-02 14:30:43 +01:00
parent 8fea308e79
commit 9f6f009d1c
32 changed files with 131 additions and 131 deletions

View File

@@ -0,0 +1,249 @@
body {
background-color: #282828;
text-align: center;
color: white;
font-family: Titillium Web;
}
.search-result {
border: 2px solid white;
border-radius: 8px;
width: 20vw;
margin: auto;
margin-left: 5px;
margin-right: 5px;
margin-top: 10px;
cursor: pointer;
display: inline-block;
}
h3{
font-size: 20px;
}
table {
border-collapse: collapse;
border-radius: 8px;
min-width: 85%;
max-width: 100%;
margin: auto;
margin-top: 18px;
}
td.uguale{
width: 50%;
}
th {
background-color: rgb(204, 132, 0);
}
th,td {
border: 2px solid #444;
padding: .7vw;
padding-top: .6vw;
padding-bottom: .6vw;
text-align: left;
}
.bus-card-red {
background-color: rgb(55,0,0) !important;
}
.bus-card-yellow {
background-color: rgb(65, 65, 0) !important;
}
.bus-card-green {
background-color: rgb(0, 55, 0) !important;
}
hr{
margin-top:19px;
}
h1.warning {
color:red;
font-size: 16px;
}
h1.yellow-warning {
color:rgb(255, 205, 0);
font-size: 16px;
}
header {
font-size: 67%;
background-color: #333;
height: auto;
padding: 0px 0px;
align-items: start;
width: 100%;
border-radius: 10px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
justify-content: left;
}
nav {
text-align: center;
flex-shrink: 0;
}
nav ul li {
margin-left: 20px;
margin-right: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 16px;
}
nav ul li a:hover {
text-decoration: underline;
}
a {
color: orange;
}
a.bianco{
color: white;
text-decoration: none;
}
a.biancosott{
color: white;
}
a.link-cell {
display: block;
width: 100%;
height: 100%;
color: white;
}
div.content-background {
background-color: #333;
max-width: 85%;
margin: auto;
border-radius: 8px;
padding-top: 16px;
padding-bottom: 16px;
}
div.content-background h3{
margin-top: 0;
margin-bottom: 16px;
}
div.select-container {
display: flex;
justify-content: center;
gap: 4px;
padding-left: 32px;
padding-right: 32px;
}
div.content-background select {
flex: 1 1 0;
width: 100%;
min-width: 0;
box-sizing: border-box;
}
select,input{
height: 50px;
width: auto;
background-color: #333;
color: white;
border-radius: 8px;
border: 2px solid rgb(100, 100, 100);
padding-left: 8px;
padding-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
@media (max-width: 768px) {
p.scaled{
font-size: 2vw;
}
table {
margin-top: 10px;
min-width: 100%;
}
div.content-background {
max-width: 100%;
}
.search-result {
display: block;
width: 96.5%;
}
.container {
flex-direction: column;
}
th,td {
font-size: 2vw;
}
nav#corsie-nav ul li a{
font-size: 90%;
margin: 0;
}
table {
width: 100%;
}
h2{
margin-bottom: 8px;
}
h2.noreduction{
margin-bottom: 16px;
}
hr{
margin-bottom:19px;
}
img{
width: 98%;
height: auto;
}
nav ul:last-child li {
margin-right: 20px;
}
nav ul li {
margin-right: 8px;
}
}
@media (max-width: 512px) {
p.scaled{
font-size: 3vw;
}
th,td {
font-size: 3vw;
}
table{
margin-top:10px;
}
h2{
margin-bottom: 0;
}
h2.noreduction{
margin-bottom: 16px;
}
}
footer {
position: relative;
bottom: 0;
left: 0;
width: 100%;
}
div.search-result div{
margin-left: 10px;
margin-right: 10px;
}
p.space{
width: 20px;
}

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="description" content="Monitor bus in servizio SETA bacino di Modena.">
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
<meta name="author" content="ER-TPL Team">
<title>SETA Modena - Bus in servizio</title>
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav id="nav-inservizio" style="display: flex;">
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
</ul>
<ul style="flex:1;justify-content: right;">
<li><a href=""><h1 style="font-size: 100%;font-weight: 500;">Aggiorna</h1></a></li>
</ul>
</nav>
</header>
<h1>Visualizzatore bus in servizio SETA Modena</h1>
<div id="content-background" class="content-background">
<h3>Ordina per:</h3>
<div class="select-container">
<select id="linea" autocomplete="off">
<option value="ph" disabled selected hidden style="color: gray;">Linea:</option>
</select>
<select id="modello" autocomplete="off">
<option value="ph" disabled selected hidden style="color: gray;">Modello:</option>
</select>
</div>
</div>
<p class="scaled">E' possibile cliccare sul numero del mezzo per ulteriori informazioni.</p>
<div id="tabella-container"><div style="height: 12px;"></div>Caricamento dati...</div>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/script.js"></script>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SETA Modena - Orario fermate</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav style="display: flex;">
<ul>
<li><a href="/seta_servizi/businservizio/index.html"><h1 style="font-size: 100%;font-weight: 500;">Torna indietro</h1></a></li>
</ul>
<ul style="flex:1;justify-content: right;">
<li><a href=""><h1 style="font-size: 100%;font-weight: 500;">Aggiorna</h1></a></li>
</ul>
</nav>
</header>
<h2>Informazioni veicolo numero: <span id="numero-span"></span></h2>
<div id="tabella-container">Caricamento dati...</div>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/infoveicolo.js"></script>
</body>
</html>

View File

@@ -0,0 +1,202 @@
const params = new URLSearchParams(window.location.search);
const id = params.get('id');
//Sets stop name
const numero_span = document.getElementById('numero-span');
numero_span.textContent=id;
const urlBackend = `https://setaapi.serverissimo.freeddns.org/vehicleinfo/${id}`;
//const urlBackend = `http://localhost:5001/vehicleinfo/${id}`;
function caricadati(){
var item=[];
fetch(urlBackend)
.then(response => {
if (!response.ok) throw new Error("Errore di risposta nel caricamento dei dati, probabilmente il server API è offline.");
return response.json();
})
.then(data => {
item = data;
})
.then(data => {
const container = document.getElementById('tabella-container');
container.innerHTML = '';
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea" colspan="2" style="text-align:center;">Informazioni veicolo:</th>
</tr>
`;
table.appendChild(thead);
// Corpo tabella
const tbody = document.createElement('tbody');
item.features.forEach(element => {
const bus = element.properties;
var tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="uguale">Linea:</td>
<td class="uguale">${bus.linea}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Direzione:</td>
<td>${bus.route_desc}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Tipo linea:</td>
<td>${bus.service_tag}</td>
</tr>
`;
tbody.appendChild(tr);
//Ritardo col +
if(bus.delay>0){
bus.delay="+"+bus.delay;
}
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Ritardo/Anticipo: (+/-)</td>
<td>${bus.delay}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Numero mezzo:</td>
<td>${bus.vehicle_code}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Modello:</td>
<td>${bus.model}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Targa:</td>
<td>${bus.plate_num}</td>
</tr>
`;
tbody.appendChild(tr);
//Si o no pedana
if(bus.pedana==1){
bus.pedana="Sì";
}else{
bus.pedana="No";
}
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Pedana?:</td>
<td>${bus.pedana}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Ora si trova a:</td>
<td><a href="/seta_servizi/cercaorario/fermata.html?code=${bus.waypoint_code}&name=${bus.next_stop}" class="bianco">${bus.next_stop}</a></td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Codice percorso:</td>
<td><a href="/seta_modena/servizi/percorsi/percorso.html?routecode=${bus.route_code}" class="bianco">${bus.route_code}</a></td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Codice corsa:</td>
<td><a href="/seta_modena/servizi/percorsi/prossimefermate.html?journeycode=${bus.journey_code}" class="bianco">${bus.journey_code}</a></td>
</tr>
`;
tbody.appendChild(tr);
//Colore sfondo conta passeggeri
if(bus.num_passeggeri<=bus.posti_totali/4){
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="bus-card-green">Numero passeggeri a bordo:</td>
<td class="bus-card-green">${bus.num_passeggeri}</td>
</tr>
`;
}else if(bus.num_passeggeri<=bus.posti_totali/1.8){
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="bus-card-yellow">Numero passeggeri a bordo:</td>
<td class="bus-card-yellow">${bus.num_passeggeri}</td>
</tr>
`;
}else{
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="bus-card-red">Numero passeggeri a bordo:</td>
<td class="bus-card-red">${bus.num_passeggeri}</td>
</tr>
`;
}if(bus.num_passeggeri==null){
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Numero passeggeri a bordo:</td>
<td>Non disponibile</td>
</tr>
`;
}
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Numero posti totali (in piedi + sedili):</td>
<td>${bus.posti_totali}</td>
</tr>
`;
tbody.appendChild(tr);
tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td>Posizione:</td>
<td><a href="https://wimb.setaweb.it/qm/index.html?id=${bus.vehicle_code}">GPS</a></td>
</tr>
`;
tbody.appendChild(tr);
});
table.appendChild(tbody);
container.appendChild(table);
})
.catch(err => {
console.error('Errore nel caricamento dati:', err);
document.getElementById('tabella-container').textContent = "Errore nella sintassi dei dati ricevuti.";
});
}
caricadati();
setInterval(caricadati, 60000);

View File

@@ -0,0 +1,382 @@
const lineaSelect = document.getElementById('linea');
const modelloSelect = document.getElementById('modello');
const contentBackground = document.getElementById('content-background');
let allresults = [];
const urlList="https://setaapi.serverissimo.freeddns.org/busesinservice";
//const urlList="http://localhost:5001/busesinservice";
//Reperire modelli e numeri linea
const urlRoutes = 'https://setaapi.serverissimo.freeddns.org/routenumberslist';
//const urlRoutes = 'http://localhost:5001/routenumberslist';
const urlModels = 'https://setaapi.serverissimo.freeddns.org/busmodels';
//const urlModels = 'http://localhost:5001/stoplist';
//Fetch routes and models and fill the selects
fetch(urlRoutes)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
allresults = data;
allresults.forEach(route => {
const option = document.createElement('option');
option.value = route;
option.textContent = route;
lineaSelect.appendChild(option);
});
})
.catch(error => {console.error('Errore nel caricamento dei dati:', error)});
fetch(urlModels)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
allresults = data;
allresults.forEach(model => {
const option = document.createElement('option');
if(
model!="CAM New Busotto"&&
model!="Iveco Cityclass CNG"&&
model!="Irisbus Cityclass CNG ex Pavia"&&
model!="Mercedes Integro O550 (Giallo)"
){
option.value = modelsDictionary(model);
option.textContent = model;
modelloSelect.appendChild(option);
}
});
})
.catch(error => {console.error('Errore nel caricamento dei dati:', error)});
function modelsDictionary(model){
return model;
//Non serve piu! :D
/*
if(model=="Irisbus Citelis CNG EEV"){
return "Irisbus Citelis CNG";
}
if(model=="Irisbus Crossway"){
return "Irisbus Crossway";
}
if(model=="Irisbus Crossway ex Esercito Tedesco"){
return "Irisbus Crossway Esercito";
}
if(model=="Iveco Urbanway Mild Hybrid 2022"){
return "Iveco Urbanway Mild Hybrid CNG";
}
if(model=="MenariniBus Citymood LNG"){
return "Menarinibus Citymood LNG";
}
if(model=="MenariniBus Citymood CNG"){
return "Menarinibus Citymood CNG";
}
if(model=="Iveco Crossway LE 12 CNG"){
return "Iveco Crossway LE CNG";
}
if(model=="Iveco Crossway LE"){
return "Iveco Crossway LE Diesel";
}
if(model=="Iveco Crossway Line"){
return "Iveco Crossway Line";
}
if(model=="Mercedes Integro O550"||model=="Mercedes Integro O550 (Giallo)"){
return "Mercedes Integro";
}
if(model=="Scania Irizar i4 LNG"){
return "Irizar i4 LNG";
}
if(model=="Solaris Urbino 12 III CNG"){
return "Solaris Urbino 12 CNG";
}
if(model=="Iveco Crossway Line 12 CNG"){
return "Iveco Crossway Line CNG";
}
if(model=="MAN Lion's Regio"){
return "MAN Lion's Regio";
}
if(model=="Setra S415 LE 2p ex Bolzano"){
return "Setra ex Bolzano (2 porte)";
}
if(model=="Setra S415 LE 3p ex Bolzano"){
return "Setra ex Bolzano (3 porte)";
}
if(model=="Iveco Crossway LE 14"){
return "Iveco Crossway LE 14m";
}
if(model=="MAN Lion's City 19 CNG"){
return "New MAN Lion's City 19G";
}
if(model=="Solaris Trollino 12 IV"){
return "Solaris Trollino 12";
}
if(model=="Irisbus Cityclass CNG ATCM"){
return "Irisbus Cityclass CNG ATCM";
}
if(model=="Mercedes Citaro O530N CNG"){
return model;
}
if(model=="Iveco Crossway LE 14"){
return "Iveco Crossway LE 14m";
}
if(model=="Iveco Crossway LE 14"){
return "Iveco Crossway LE 14m";
}
if(model=="Iveco Crossway LE 14"){
return "Iveco Crossway LE 14m";
}
if(model=="Iveco Crossway LE 14"){
return "Iveco Crossway LE 14m";
}
*/
}
caricadati();
var refreshGeneraleID=setInterval(caricadati, 60000);
function caricadati(){
fetch(urlList)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
item = data.features;
})
.then(data => {
const container = document.getElementById('tabella-container');
container.innerHTML = '';
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea">Linea</th>
<th class="direzione">Direzione</th>
<th class="orario">Veicolo</th>
<th class="stato">Modello veicolo</th>
<th class="veicolo">Ora si trova a</th>
</tr>
`;
table.appendChild(thead);
// Corpo tabella
const tbody = document.createElement('tbody');
item.forEach(item => {
const element = item.properties;
const tr = document.createElement('tr');
if(element.next_stop==null){
var posizione="";
}else{
var posizione=element.next_stop;
}
tr.innerHTML = `
<td>${element.linea}</td>
<td>${element.route_desc}</td>
<td><a href="infoveicolo.html?id=${element.vehicle_code}" class="bianco">${element.vehicle_code}</a></td>
<td>${element.model}</td>
<td>${posizione}</td>
`;
tbody.appendChild(tr);
});
table.appendChild(tbody);
container.appendChild(table);
})
.catch(err => {
console.error('Errore nel caricamento dati:', err);
document.getElementById('tabella-container').textContent = 'Errore nel caricamento dati.';
});
}
//FILTRI
var intervalFiltrati = 0;
//Filtro per linea
lineaSelect.addEventListener('change', function(event) {
if(intervalFiltrati!=undefined){
//alert("Non è possibile usare due filtri allo stesso momento")
clearInterval(intervalFiltrati);
}
const selectedOption = event.target.value;
caricaFiltratiLinea(selectedOption);
intervalFiltrati = setInterval(function dummyFunc(){caricaFiltratiLinea(selectedOption);}, 60000);
clearInterval(refreshGeneraleID);
if(document.getElementById("reimposta-filtro")==undefined){
const reimpostaFiltro = document.createElement('p');
reimpostaFiltro.setAttribute("style","margin-bottom: 0; font-size: 14px;");
reimpostaFiltro.setAttribute("id","reimposta-filtro");
reimpostaFiltro.innerHTML = `
<a href="" class="biancosott">Reimposta il filtro</a>
`;
contentBackground.appendChild(reimpostaFiltro);
}
});
//Filtro per modello
modelloSelect.addEventListener('change', function(event) {
if(intervalFiltrati!=undefined){
//alert("Non è possibile usare due filtri allo stesso momento")
clearInterval(intervalFiltrati);
}
const selectedOption = event.target.value;
caricaFiltratiModello(selectedOption);
intervalFiltrati = setInterval(function dummyFunc(){caricaFiltratiModello(selectedOption);}, 60000);
clearInterval(refreshGeneraleID);
if(document.getElementById("reimposta-filtro")==undefined){
const reimpostaFiltro = document.createElement('p');
reimpostaFiltro.setAttribute("style","margin-bottom: 0; font-size: 14px;");
reimpostaFiltro.setAttribute("id","reimposta-filtro");
reimpostaFiltro.innerHTML = `
<a href="" class="biancosott">Reimposta il filtro</a>
`;
contentBackground.appendChild(reimpostaFiltro);
}
});
function reloadFiltratiLinea(){
caricaFiltratiLinea(lineaSelect.value);
}
function caricaFiltratiLinea(selectedOption){
const container = document.getElementById('tabella-container');
container.innerHTML = 'Caricamento dati...';
fetch(urlList)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data=>{
container.innerHTML = '';
//Sostituisco il pulsante aggiorna tutti col pulsante aggiorna filtrati
const aggiornaNav = document.getElementById('nav-inservizio');
aggiornaNav.innerHTML = `
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
</ul>
<ul style="flex:1;justify-content: right;">
<li><a href="javascript:reloadFiltratiLinea();"><h1 style="font-size: 16px;font-weight: 500;">Aggiorna</h1></a></li>
</ul>
`;
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea">Linea</th>
<th class="direzione">Direzione</th>
<th class="orario">Veicolo</th>
<th class="stato">Modello veicolo</th>
<th class="veicolo">Ora si trova a</th>
</tr>
`;
table.appendChild(thead);
data.features.forEach(elements => {
// Extract only the numeric part
const number = elements.properties.linea.match(/\d+/g);
if(number==selectedOption){
const tbody = document.createElement('tbody');
const element = elements.properties;
const tr = document.createElement('tr');
if(element.next_stop==null){
var posizione="";
}else{
var posizione=element.next_stop;
}
tr.innerHTML = `
<td>${element.linea}</td>
<td>${element.route_desc}</td>
<td><a href="infoveicolo.html?id=${element.vehicle_code}" class="bianco">${element.vehicle_code}</a></td>
<td>${element.model}</td>
<td>${posizione}</td>
`;
tbody.appendChild(tr);
table.appendChild(tbody);
container.appendChild(table);
console.log("Ricarico");
}else{
container.appendChild(table);
}
});
});
}
function caricaFiltratiModello(selectedOption){
const container = document.getElementById('tabella-container');
container.innerHTML = 'Caricamento dati...';
fetch(urlList)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data=>{
container.innerHTML = '';
//Sostituisco il pulsante aggiorna tutti col pulsante aggiorna filtrati
const aggiornaNav = document.getElementById('nav-inservizio');
aggiornaNav.innerHTML = `
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
</ul>
<ul style="flex:1;justify-content: right;">
<li><a href="javascript:reloadFiltratiModello();"><h1 style="font-size: 16px;font-weight: 500;">Aggiorna</h1></a></li>
</ul>
`;
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea">Linea</th>
<th class="direzione">Direzione</th>
<th class="orario">Veicolo</th>
<th class="stato">Modello veicolo</th>
<th class="veicolo">Ora si trova a</th>
</tr>
`;
table.appendChild(thead);
data.features.forEach(elements => {
if(elements.properties.model==selectedOption){
const tbody = document.createElement('tbody');
const element = elements.properties;
const tr = document.createElement('tr');
if(element.next_stop==null){
var posizione="";
}else{
var posizione=element.next_stop;
}
tr.innerHTML = `
<td>${element.linea}</td>
<td>${element.route_desc}</td>
<td><a href="infoveicolo.html?id=${element.vehicle_code}" class="bianco">${element.vehicle_code}</a></td>
<td>${element.model}</td>
<td>${posizione}</td>
`;
tbody.appendChild(tr);
table.appendChild(tbody);
container.appendChild(table);
console.log("Ricarico");
}else{
container.appendChild(table);
}
});
});
}
function reloadFiltratiModello(){
caricaFiltratiModello(modelloSelect.value);
}

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ER-TPL</title>
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
<link rel="shortcut icon" href="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Immagini%20sito/atcma.png" type="image/x-icon">
</head>
<body>
<header>
<nav style="min-height: 46px;">
<ul>
<li>
</li>
</ul>
</nav>
</header>
<h2>Altre corsie di: "<span id="fermata-span"></span>"</h2>
<div id="buttons" class="search-results"></div>
<script src="js/paginacorsie.js"></script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<title>SETA Modena - Cerca fermata</title>
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
<li><a href="/seta_servizi/cercaorario/index.html"><h1 style="font-size: 100%;font-weight: 500;">Cerca orario</h1></a></li>
</ul>
</nav>
</header>
<h1>Come trovare il codice fermata:</h1>
<hr>
<h2 class="noreduction">Urbano:</h2>
<img src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Immagini%20sito/comeleggereurbano.jpg&fileId=27873&x=1920&y=1080&a=true&etag=323197e0017d8081193a7169ffa5a567" alt="Server foto non raggiungibile.">
<hr>
<h2 class="noreduction">Suburbano e Extraurbano:</h2>
<img src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Immagini%20sito/comeleggeresub.jpeg&fileId=28551&x=1920&y=1080&a=true&etag=fa795ec099936fdcda8a0b1981aa116d" alt="Server foto non raggiungibile.">
<p>Se vengono riportate altre lettere dopo il MO, inserirle.</p>
</body>
</html>

View File

@@ -0,0 +1,226 @@
body {
background-color: #282828;
text-align: center;
color: white;
font-family: Titillium Web;
}
.search-result {
border: 2px solid white;
border-radius: 8px;
width: 20vw;
margin: auto;
margin-left: 5px;
margin-right: 5px;
margin-top: 10px;
cursor: pointer;
display: inline-block;
}
table {
border-collapse: collapse;
border-radius: 8px;
min-width: 85%;
max-width: 100%;
margin: auto;
margin-top: 18px;
}
th {
background-color: rgb(204, 132, 0);
}
th,td {
border: 2px solid #444;
padding: .7vw;
padding-top: .6vw;
padding-bottom: .6vw;
text-align: left;
}
.bus-card-red {
background-color: rgb(241, 120, 120) !important;
}
hr{
margin-top:19px;
}
h1.warning {
color:red;
font-size: 16px;
}
h1.yellow-warning {
color:rgb(255, 205, 0);
font-size: 16px;
}
header {
font-size: 67%;
background-color: #333;
height: auto;
padding: 0px 0px;
align-items: start;
width: 100%;
border-radius: 10px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
justify-content: left;
}
nav {
text-align: center;
flex-shrink: 0;
}
nav#corsie-nav ul{
justify-content: center;
}
nav#corsie-nav ul li a{
color: white;
text-decoration: underline;
}
nav#corsie-nav ul li{
margin-left: 8px;
margin-right: 7px;
}
nav ul li {
margin-left: 20px;
margin-right: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 16px;
}
nav ul li a:hover {
text-decoration: underline;
}
a {
color: orange;
}
a.rossosott{
color: red;
text-decoration: underline;
}
a.bianco{
color: white;
text-decoration: none;
}
a.biancosott{
color: white;
}
a.link-cell {
display: block;
width: 100%;
height: 100%;
color: white;
}
#bacino,
#searchBar {
padding: 10px;
font-size: 16px;
border-radius: 6px;
border: 1px solid var(--border-color);
width: 280px;
}
#stopCodeBar {
padding: 10px;
font-size: 16px;
border-radius: 6px;
border: 1px solid var(--border-color);
width: 280px;
}
img{
height:300px;
}
@media (max-width: 768px) {
.search-result {
display: block;
width: 96.5%;
}
.container {
flex-direction: column;
}
th,td {
font-size: 2vw;
}
nav#corsie-nav ul li a{
font-size: 90%;
margin: 0;
}
table {
width: 100%;
}
h2{
margin-bottom: 8px;
}
h2.noreduction{
margin-bottom: 16px;
}
#searchBar {
width: 80%;
}
#stopCodeBar {
width: 80%;
}
hr{
margin-bottom:19px;
}
img{
width: 98%;
height: auto;
}
nav ul:last-child li {
margin-right: 20px;
}
nav ul li {
margin-right: 8px;
}
}
@media (max-width: 512px) {
th,td {
font-size: 3vw;
}
table{
margin-top:10px;
}
nav#corsie-nav ul li a{
font-size: 3.2vw;
}
h2{
margin-bottom: 0;
}
h2.noreduction{
margin-bottom: 16px;
}
}
footer {
position: relative;
bottom: 0;
left: 0;
width: 100%;
}
div.search-result div{
margin-left: 10px;
margin-right: 10px;
}
p.space{
width: 20px;
}

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SETA Modena - Orario fermate</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav style="display: flex;">
<ul>
<li><a href="/seta_servizi/cercaorario/index.html"><h1 style="font-size: 100%;font-weight: 500;">Torna indietro</h1></a></li>
</ul>
<ul style="flex:1;justify-content: right;">
<li><a href=""><h1 style="font-size: 100%;font-weight: 500;">Aggiorna</h1></a></li>
</ul>
</nav>
</header>
<h2>Informazioni fermata "<span id="fermata-span"></span>"</h2>
<nav id="corsie-nav"></nav>
<div id="tabella-container">Caricamento dati...</div>
<p>Il ritardo viene espresso rispetto all'orario previsto. Quello indicato, se disponibile, è l'orario di arrivo in tempo reale.</p>
<p>E' possibile cliccare sul numero del mezzo per vedere la sua posizione sulla mappa.</p>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/fermata.js"></script>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="description" content="Cerca orari in tempo reale per le fermate di SETA a Modena.">
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
<meta name="author" content="ER-TPL Team">
<title>SETA Modena - Cerca fermata</title>
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
</ul>
</nav>
</header>
<h1>Visualizzatore orari di arrivo SETA Modena</h1>
<div>
<input type="text" id="searchBar" placeholder="Cerca una fermata..." autocomplete="off">
</div>
<h3 style="margin: 16px;">Oppure:</h3>
<div>
<input type="text" id="stopCodeBar" placeholder="Inserisci un codice fermata..." autocomplete="off">
</div>
<p id="warning-mo"><a href="comeleggere.html" style="color: white;">Come leggere il codice fermata.</a></p>
<div id="searchResults">
<h3 style="margin-bottom:4px;">Fermate rapide:</h3>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=MODENA AUTOSTAZIONE" class="bianco"><div class="search-result"><h3>Autostazione</h3></div></a>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=STAZIONE FS" class="bianco"><div class="search-result"><h3>Stazione FS</h3></div></a>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=GARIBALDI" class="bianco"><div class="search-result"><h3>Largo Garibaldi</h3></div></a>
</div>
<h1 class="yellow-warning">Aggiornamento lista fermate: da 21/08/25 a oggi.</h1>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/cercafermata.js"></script>
</body>
</html>

View File

@@ -0,0 +1,132 @@
const searchBar = document.getElementById('searchBar');
const stopCodeBar = document.getElementById('stopCodeBar');
const resultsContainer = document.getElementById('searchResults');
let allresults = [];
const url = 'https://setaapi.serverissimo.freeddns.org/stopcodesarchive';
//const url='http://localhost:5001/stoplist';
fetch(url)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
allresults = data;
})
.catch(error => console.error('Errore nel caricamento dei dati:', error));
searchBar.addEventListener('input', () => {
const warning=document.getElementById('warning-mo');
if (searchBar.value == '') {
resultsContainer.innerHTML=`
<h3 style="margin-bottom:4px;">Fermate rapide:</h3>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=STAZIONE FS" class="bianco"><div class="search-result"><h3>Autostazione</h3></div></a>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=MODENA AUTOSTAZIONE" class="bianco"><div class="search-result"><h3>Stazione FS</h3></div></a>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=GARIBALDI" class="bianco"><div class="search-result"><h3>Largo Garibaldi</h3></div></a>
`;
warning.innerHTML = `
<p id="warning-mo"><a href="comeleggere.html" style="color: white;">Come leggere il codice fermata.</a></p>
`;
}else{
const searchTerm = searchBar.value.toLowerCase();
warning.innerHTML='';
const filtered = allresults
.filter(item => item.fermata.toLowerCase().includes(searchTerm))
.sort((a, b) => {
const aStartsWith = a.fermata.toLowerCase().startsWith(searchTerm);
const bStartsWith = b.fermata.toLowerCase().startsWith(searchTerm);
if (aStartsWith && !bStartsWith) return -1;
if (!aStartsWith && bStartsWith) return 1;
return 0;
});
renderresults(filtered);
}
});
stopCodeBar.addEventListener('input', () => {
var code=stopCodeBar.value.toUpperCase();
code="MO"+code;
//renderresultscode(filtered);
const searchResultsContainer = document.getElementById('searchResults');
const warning=document.getElementById('warning-mo');
warning.innerHTML='';
searchResultsContainer.innerHTML = '';
const div = document.createElement('div');
div.className = 'search-result';
div.innerHTML = `
<div>
<h3>${code}</h3>
<p>Codice fermata: ${code}</p>
</div>
`;
div.addEventListener('click', () => {
const url = `fermata.html?code=${code}&name=${code}`;
parent.location=url;
});
searchResultsContainer.appendChild(div);
if (stopCodeBar.value == '') {
resultsContainer.innerHTML=`
<h3 style="margin-bottom:4px;">Fermate rapide:</h3>
<a href="" class="bianco"><div class="search-result"><h3>Autostazione</h3></div></a>
<a href="" class="bianco"><div class="search-result"><h3>Stazione FS</h3></div></a>
<a href="" class="bianco"><div class="search-result"><h3>Largo Garibaldi</h3></div></a>
`;
warning.innerHTML = `
<p id="warning-mo"><a href="comeleggere.html" style="color: white;">Come leggere il codice fermata.</a></p>
`;
return;
}
});
function renderresultscode(results) {
const searchResultsContainer = document.getElementById('searchResults');
searchResultsContainer.innerHTML = '';
const div = document.createElement('div');
div.className = 'search-result';
div.innerHTML = `
<div>
<h3>${results.fermata}</h3>
<p>Codice fermata: ${results.valore}</p>
</div>
`;
div.addEventListener('click', () => {
const url = `fermata.html?code=${item.valore}&name=${item.fermata}`;
parent.location=url;
});
searchResultsContainer.appendChild(div);
}
function renderresults(results) {
const searchResultsContainer = document.getElementById('searchResults');
searchResultsContainer.innerHTML = '';
if (results.length === 0) {
searchResultsContainer.innerHTML = '<p>Nessun risultato trovato</p>';
return;
}
results.forEach(item => {
const div = document.createElement('div');
div.className = 'search-result';
div.innerHTML = `
<div>
<h3>${item.fermata}</h3>
<p>Codice fermata: ${item.valore}</p>
</div>
`;
div.addEventListener('click', () => {
const url = `fermata.html?code=${item.valore}&name=${item.fermata}`;
parent.location=url;
});
searchResultsContainer.appendChild(div);
});
}

View File

@@ -0,0 +1,186 @@
const params = new URLSearchParams(window.location.search);
const nome = params.get('name');
const codice = params.get('code');
//Ricerca per pulsante dall'altra parte
const url = 'https://setaapi.serverissimo.freeddns.org/stopcodesarchive';
//const url='http://localhost:5001/stoplist';
fetch(url)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
allresults = data;
//Set corsie per stazione o autostazione
const corsie_nav = document.getElementById('corsie-nav');
if(nome.includes("STAZIONE FS")){
corsie_nav.innerHTML = `
<ul>
<li>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=STAZIONE FS">Altre corsie</a>
</li>
</ul>`;
}
if(nome.includes("MODENA AUTOSTAZIONE")){
corsie_nav.innerHTML = `
<ul>
<li>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=MODENA AUTOSTAZIONE">Altre corsie</a>
</li>
</ul>`;
}
if(nome.includes("GARIBALDI")){
corsie_nav.innerHTML = `
<ul>
<li>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=GARIBALDI">Altre corsie</a>
</li>
</ul>`;
}
if(nome.includes("POLO LEONARDO")){
corsie_nav.innerHTML = `
<ul>
<li>
<a href="/seta_servizi/cercaorario/altrecorsie.html?location=POLO LEONARDO">Altre corsie</a>
</li>
</ul>`;
}
//Pulsante dall'altra parte
console.log(altraParteSearch(nome))
if(altraParteSearch(nome)!=undefined){
const codes = altraParteSearch(nome);
const altrocodice = 0;
if(codice==codes[0]){
altroCodice = codes[1];
}else{
altroCodice = codes[0];
}
corsie_nav.innerHTML = `
<ul>
<li>
<a href="/seta_servizi/cercaorario/fermata.html?code=${altroCodice}&name=${nome}">Dall'altra parte</a>
</li>
</ul>`;
}
})
.catch(error => console.error('Errore nel caricamento dei dati:', error));
//Sets stop name
const fermata_span = document.getElementById('fermata-span');
fermata_span.textContent=nome;
const urlBackend = `https://setaapi.serverissimo.freeddns.org/arrivals/${codice}`;
//const urlBackend = `http://localhost:5001/arrivals/${codice}`;
function caricadati(){
fetch(urlBackend)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
item = data.arrival;
})
.then(data => {
const container = document.getElementById('tabella-container');
container.innerHTML = '';
if (item.error=="no arrivals scheduled in next 90 minutes") {
container.innerHTML = '<h3>Nessuna corsa programmata nei prossimi 90 minuti.</h3>';
return;
}
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea">Linea</th>
<th class="direzione">Direzione</th>
<th class="orario">Orario (Rit/Ant)</th>
<th class="stato">Stato corsa</th>
<th class="veicolo">Veicolo</th>
<th class="location">Ora si trova a</th>
</tr>
`;
table.appendChild(thead);
// Corpo tabella
const tbody = document.createElement('tbody');
item.services.forEach(item => {
const tr = document.createElement('tr');
if(item.type=="planned"){
var stato="Prevista";
}else{
var stato="In tempo reale";
}if(item.next_stop==null){
var posizione="";
}else{
var posizione=item.next_stop;
}
if(item.delay==undefined){
tr.innerHTML = `
<td>${item.service}</td>
<td>${item.destination}</td>
<td>${item.arrival}</td>
<td>${stato}</td>
<td><a href="https://wimb.setaweb.it/qm/index.html?id=${item.busnum}" class="bianco">${item.busnum}</a></td>
<td>${posizione}</td>
`;
tbody.appendChild(tr);
}else{
if(item.delay>0){
tr.innerHTML = `
<td>${item.service}</td>
<td>${item.destination}</td>
<td>${item.arrival} (+${item.delay})</td>
<td>${stato}</td>
<td><a href="https://wimb.setaweb.it/qm/index.html?id=${item.busnum}" class="bianco">${item.busnum}</a></td>
<td>${posizione}</td>
`;
tbody.appendChild(tr);
}else{
tr.innerHTML = `
<td>${item.service}</td>
<td>${item.destination}</td>
<td>${item.arrival} (${item.delay})</td>
<td>${stato}</td>
<td><a href="https://wimb.setaweb.it/qm/index.html?id=${item.busnum}" class="bianco">${item.busnum}</a></td>
<td>${posizione}</td>
`;
tbody.appendChild(tr);
}
}
});
table.appendChild(tbody);
container.appendChild(table);
})
.catch(err => {
console.error('Errore nel caricamento dati:', err);
document.getElementById('tabella-container').textContent = 'Errore nel caricamento dati.';
});
}
caricadati();
setInterval(caricadati, 60000);
function altraParteSearch(searchTerm){
var dupedCodes = [];
var i = 0;
allresults.forEach(element => {
if(element.fermata.toLowerCase()==searchTerm.toLowerCase()){
dupedCodes[i]=element.valore;
i++;
}
});
if(dupedCodes.length==2){
return dupedCodes;
}else if(dupedCodes.length==1){
return undefined;
}
}

View File

@@ -0,0 +1,91 @@
const params = new URLSearchParams(window.location.search);
const bottoni = document.getElementById('buttons');
const posto = params.get('location');
const fermata_span = document.getElementById('fermata-span');
fermata_span.textContent=posto;
if(posto=="STAZIONE FS"){
bottoni.innerHTML = `
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6132&name=STAZIONE%20FS%20(Corsia%201)" class="bianco">
<div class="search-result"><h3>Corsia 1</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6133&name=STAZIONE%20FS%20(Corsia%202)" class="bianco">
<div class="search-result"><h3>Corsia 2</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6134&name=STAZIONE%20FS%20(Corsia%203)" class="bianco">
<div class="search-result"><h3>Corsia 3</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6119&name=STAZIONE%20FS%20(Corsia%204)" class="bianco">
<div class="search-result"><h3>Corsia 4</h3></div>
</a>
`;
}
if(posto=="MODENA AUTOSTAZIONE"){
bottoni.innerHTML = `
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6121&name=MODENA AUTOSTAZIONE (dir. Centro)" class="bianco">
<div class="search-result"><h3>Direzione Centro</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO5003&name=MODENA AUTOSTAZIONE (lato Novi Park)" class="bianco">
<div class="search-result"><h3>Lato Novi Park</h3></div>
</a>
<div></div>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6600&name=MODENA AUTOSTAZIONE (davanti biglietteria)" class="bianco">
<div class="search-result"><h3>Davanti Biglietteria</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO10&name=MODENA AUTOSTAZIONE (fianco biglietteria)" class="bianco">
<div class="search-result"><h3>Fianco Biglietteria</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6120&name=MODENA AUTOSTAZIONE (fianco biglietteria lato Novi Park)" class="bianco">
<div class="search-result"><h3>Fianco Biglietteria lato Novi Park</h3></div>
</a>
<hr>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO3&name=MODENA AUTOSTAZIONE (Corriere corsia 1)" class="bianco">
<div class="search-result"><h3>Corriere corsia 1</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO303&name=MODENA AUTOSTAZIONE (Corriere corsia 2)" class="bianco">
<div class="search-result"><h3>Corriere corsia 2</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO342&name=MODENA AUTOSTAZIONE (Corriere corsia 3)" class="bianco">
<div class="search-result"><h3>Corriere corsia 3</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO344&name=MODENA AUTOSTAZIONE (Corriere corsia 4)" class="bianco">
<div class="search-result"><h3>Corriere corsia 4</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO350&name=MODENA AUTOSTAZIONE (Corriere corsia 5)" class="bianco">
<div class="search-result"><h3>Corriere corsia 5</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO346&name=MODENA AUTOSTAZIONE (Corriere corsia 6)" class="bianco">
<div class="search-result"><h3>Corriere corsia 6</h3></div>
</a>
`;
}
if(posto=="GARIBALDI"){
bottoni.innerHTML = `
<a href="/seta_servizi/cercaorario/fermata.html?code=MO5900&name=GARIBALDI%20(dir.%20Centro)" class="bianco">
<div class="search-result"><h3>Direzione Centro</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO30&name=GARIBALDI%20(dir.%20Trento%20Trieste)" class="bianco">
<div class="search-result"><h3>Direzione Trento Trieste</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO9&name=GARIBALDI (lato Caduti in Guerra)" class="bianco">
<div class="search-result"><h3>Lato Caduti in Guerra</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO5111&name=GARIBALDI%20(Storchi%20dir.%20Trento%20Trieste)" class="bianco">
<div class="search-result"><h3>Storchi direzione Trento Trieste</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO5112&name=GARIBALDI%20(Storchi%20dir.%20Centro)" class="bianco">
<div class="search-result"><h3>Storchi direzione Centro</h3></div>
</a>
`;
}
if(posto=="POLO LEONARDO"){
bottoni.innerHTML = `
<a href="/seta_servizi/cercaorario/fermata.html?code=MO6783&name=POLO LEONARDO (Strada)" class="bianco">
<div class="search-result"><h3>POLO LEONARDO (Strada)</h3></div>
</a>
<a href="/seta_servizi/cercaorario/fermata.html?code=MO2928&name=POLO LEONARDO 1" class="bianco">
<div class="search-result"><h3>POLO LEONARDO 1</h3></div>
</a>
`;
}

View File

@@ -0,0 +1,228 @@
body {
background-color: #282828;
text-align: center;
color: white;
font-family: Titillium Web;
}
.search-result {
border: 2px solid white;
border-radius: 8px;
width: 20vw;
margin: auto;
margin-left: 5px;
margin-right: 5px;
margin-top: 10px;
cursor: pointer;
display: inline-block;
}
#link-a-seta{
margin:8px;
}
iframe{
width: 100%;
height: 2000px;
}
table{
margin-left: auto;
margin-right: auto;
}
th,td {
border: none;
padding: .7vw;
padding-top: .6vw;
padding-bottom: .6vw;
text-align: left;
}
hr{
margin-top:19px;
}
h1.warning {
color:red;
font-size: 16px;
}
h1.yellow-warning {
color:rgb(255, 205, 0);
font-size: 16px;
}
header {
font-size: 67%;
background-color: #333;
height: auto;
padding: 0px 0px;
align-items: start;
width: 100%;
border-radius: 10px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
justify-content: left;
}
nav {
text-align: center;
flex-shrink: 0;
}
nav.index{
display: flex;
min-height: 46px;
}
nav ul li {
margin-left: 20px;
margin-right: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 16px;
}
nav ul li a:hover {
text-decoration: underline;
}
.bus-card-red {
background-color: rgb(55,0,0) !important;
}
.bus-card-yellow {
background-color: rgb(65, 65, 0) !important;
}
.bus-card-green {
background-color: rgb(0, 55, 0) !important;
}
a {
color: orange;
}
a.bianco{
color: white;
text-decoration: none;
}
a.rosso{
color:white;
text-decoration: none;
}
a.rosso div{
background-color: rgb(55,0,0) !important;
}
a.biancosott{
color: white;
}
a.link-cell {
display: block;
width: 100%;
height: 100%;
color: white;
}
img{
height:300px;
}
@media (max-width: 768px) {
table#selettore-direzione th:first-child {
background-color: rgb(50, 50, 50);
border-top-left-radius: 8px;
}
table#selettore-direzione th:last-child {
background-color: rgb(50, 50, 50);
border-top-right-radius: 8px;
}
iframe{
width: 100%;
height: 2200px;
}
.search-result {
display: block;
width: 96.5%;
}
.container {
flex-direction: column;
}
nav#corsie-nav ul li a{
font-size: 75%;
margin: 0;
}
table {
width: 100%;
}
h2.noreduction{
margin-bottom: 16px;
}
#searchBar {
width: 80%;
}
#stopCodeBar {
width: 80%;
}
hr{
margin-bottom:19px;
}
img{
width: 98%;
height: auto;
}
nav ul:last-child li {
margin-right: 20px;
}
nav ul li {
margin-right: 8px;
}
}
#selettore-direzione {
border-collapse: collapse;
border-radius: 8px;
width: 100%;
margin: auto;
}
table#selettore-direzione th:hover {
background-color: rgb(204, 132, 0);
}
table#selettore-direzione th:active{
background-color: rgb(255, 234, 196);
}
table#selettore-direzione th {
border-left: 1px solid #282828;
border-right: 1px solid #282828;
padding: 10.7px;
padding-top: 9.2px;
padding-bottom: 9.2px;
text-align: center;
}
footer {
position: relative;
bottom: 0;
left: 0;
width: 100%;
}
div.search-result div{
margin-left: 10px;
margin-right: 10px;
}
p.space{
width: 20px;
}

View File

@@ -0,0 +1,227 @@
body {
background-color: #282828;
text-align: center;
color: white;
font-family: Titillium Web;
}
.search-result {
border: 2px solid white;
border-radius: 8px;
width: 20vw;
margin: auto;
margin-left: 5px;
margin-right: 5px;
margin-top: 10px;
cursor: pointer;
display: inline-block;
}
table {
border-collapse: collapse;
border-radius: 8px;
min-width: 85%;
max-width: 100%;
margin: auto;
margin-top: 18px;
}
th {
background-color: rgb(204, 132, 0);
}
th,td {
border: 2px solid #444;
padding: 10.75px;
padding-top: 9.2px;
padding-bottom: 9.2px;
text-align: left;
}
td.uguale{
width: 50%;
}
hr{
margin-top:19px;
}
h1.warning {
color:red;
font-size: 16px;
}
h1.yellow-warning {
color:rgb(255, 205, 0);
font-size: 16px;
}
header {
font-size: 67%;
background-color: #333;
height: auto;
padding: 0px 0px;
align-items: start;
width: 100%;
border-radius: 10px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
justify-content: left;
}
nav {
text-align: center;
flex-shrink: 0;
}
nav.index{
display: flex;
min-height: 46px;
}
nav#corsie-nav ul{
justify-content: center;
}
nav#corsie-nav ul li a{
color: white;
text-decoration: underline;
}
nav#corsie-nav ul li{
margin-left: 8px;
margin-right: 7px;
}
nav ul li {
margin-left: 20px;
margin-right: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 16px;
}
nav ul li a:hover {
text-decoration: underline;
}
.bus-card-red {
background-color: rgb(55,0,0) !important;
}
.bus-card-yellow {
background-color: rgb(65, 65, 0) !important;
}
.bus-card-green {
background-color: rgb(0, 55, 0) !important;
}
a {
color: orange;
}
a.bianco{
color: white;
text-decoration: none;
}
a.rosso{
color:white;
text-decoration: none;
}
a.rosso div{
background-color: rgb(55,0,0) !important;
}
a.biancosott{
color: white;
}
a.link-cell {
display: block;
width: 100%;
height: 100%;
color: white;
}
img{
height:300px;
}
@media (max-width: 768px) {
.search-result {
display: block;
width: 96.5%;
}
.container {
flex-direction: column;
}
th,td {
font-size: 90%;
padding: .7vw;
padding-top: .6vw;
padding-bottom: .6vw;
}
nav#corsie-nav ul li a{
font-size: 75%;
margin: 0;
}
table {
width: 100%;
}
h2{
margin-bottom: 0;
}
h2.noreduction{
margin-bottom: 16px;
}
#searchBar {
width: 80%;
}
#stopCodeBar {
width: 80%;
}
hr{
margin-bottom:19px;
}
img{
width: 98%;
height: auto;
}
nav ul li {
margin-right: 8px;
}
nav#rcodes-nav ul:last-child li {
margin-right: 20px;
}
nav#rcodes-nav ul li:last-child {
margin-right: 20px;
}
}
@media (max-width: 512px) {
th,td {
font-size: 3.2vw;
}
table{
margin-top:10px;
}
}
footer {
position: relative;
bottom: 0;
left: 0;
width: 100%;
}
div.search-result div{
margin-left: 10px;
margin-right: 10px;
}
p.space{
width: 20px;
}

View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="description" content="Visualizza i tempi di percorrenza di SETA a Modena.">
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
<meta name="author" content="ER-TPL Team">
<title>SETA Modena - Tempi di percorrenza</title>
<link rel="stylesheet" href="css/style-iframeorari.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="javascript:history.back()"><h1 style="font-size: 100%;font-weight: 500;">Torna indietro</h1></a></li>
</ul>
</nav>
</header>
<h2>Linea: <span id="linea-span"></span></h2>
<div id="message"></div>
<table id="selettore-direzione">
<th onclick="javascript:setAs()">Andata</th>
<th onclick="javascript:setDi()">Ritorno</th>
</table>
<div id="caricamento-div"></div>
<iframe id="iframe" src="" frameborder="0" onload="javascript:removeLoading()"></iframe>
<script src="js/iframeorari.js"></script>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
</body>
</html>

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="description" content="Visualizza i percorsi di SETA a Modena.">
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
<meta name="author" content="ER-TPL Team">
<title>SETA Modena - Percorsi</title>
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
</ul>
</nav>
</header>
<h1>Percorsi e codici corsa SETA Modena</h1>
<h2>Scegli una linea:</h2>
<h2>Urbano:</h2>
<div id="urbano-container"></div>
<hr>
<h2>Scolastiche:</h2>
<div id="scuola-container"></div>
<hr>
<h2>Taxi:</h2>
<div id="speciali-container"></div>
<hr>
<h2>Suburbano e Extraurbano:</h2>
<div id="subextra-container"></div>
<hr>
<h2>Altre città:</h2>
<div id="altri-container"></div>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/script.js"></script>
</body>
</html>

View File

@@ -0,0 +1,49 @@
const params = new URLSearchParams(window.location.search);
const num = params.get('routenum');
const lineaSpan = document.getElementById('linea-span');
const iframe = document.getElementById('iframe');
const messageDiv = document.getElementById('message');
const loadingDiv = document.getElementById('caricamento-div');
const date = new Date();
const todayDate=date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear();
const asURL = "https://setaapi.serverissimo.freeddns.org/lineedyn_linea_dett_percorsi/?b=mo&l=MO"+num+"&dd="+todayDate+"&v=As";
const diURL = "https://setaapi.serverissimo.freeddns.org/lineedyn_linea_dett_percorsi/?b=mo&l=MO"+num+"&dd="+todayDate+"&v=Di";
//Display numero linea
lineaSpan.textContent=num;
//Schermata di caricamento, viene annullata da onload dell'iframe
loadingDiv.style.margin="12px";
loadingDiv.innerHTML="Caricamento in corso...";
iframe.style.display="none";
//Spawn iframe
iframe.setAttribute("src",asURL);
if(num==undefined||num==""){
iframe.setAttribute("src","");
messageDiv.innerHTML=`
<p>Non hai specificato nessuna linea nei parametri dell'url</p>
`;
}
function setAs(){
loadingDiv.style.margin="12px";
loadingDiv.innerHTML="Caricamento in corso...";
iframe.style.display="none";
iframe.setAttribute("src",asURL);
}
function setDi(){
loadingDiv.style.margin="12px";
loadingDiv.innerHTML="Caricamento in corso...";
iframe.style.display="none";
iframe.setAttribute("src",diURL);
}
function removeLoading(){
loadingDiv.style.margin="";
loadingDiv.innerHTML="";
iframe.style.display="";
}

View File

@@ -0,0 +1,76 @@
const params = new URLSearchParams(window.location.search);
const id = params.get('routecode');
const num = params.get('routenum');
const codiceSpan = document.getElementById('codice-span');
const destSpan = document.getElementById('destinazione-span');
const pNav = document.getElementById('percorso-nav');
//Displays route code
codiceSpan.textContent = id;
//Nav per tornare indietro
pNav.innerHTML = `
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/seta_modena/servizi/percorsi/index.html"><h1 style="font-size: 100%;font-weight: 500;">Selettore linea</h1></a></li>
<li><a href="/seta_modena/servizi/percorsi/rcodes.html?routenum=${num}"><h1 style="font-size: 100%;font-weight: 500;">Selettore percorso</h1></a></li>
</ul>
`;
const urlBackend = `https://setaapi.serverissimo.freeddns.org/routestops/${id}`;
//const urlBackend = `http://localhost:5001/arrivals/${codice}`;
function caricadati(){
var item=[];
fetch(urlBackend)
.then(response => {
if (!response.ok) throw new Error("Errore di risposta nel caricamento dei dati, probabilmente il server API è offline.");
return response.json();
})
.then(data => {
item = data;
})
.then(data => {
const container = document.getElementById('tabella-container');
container.innerHTML = '';
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea" style="text-align:center;">Nome:</th>
<th class="linea" style="text-align:center;">Codice:</th>
</tr>
`;
table.appendChild(thead);
// Corpo tabella
const tbody = document.createElement('tbody');
item.forEach(item => {
const element = item;
var tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="uguale"><a href="/seta_servizi/cercaorario/fermata.html?code=${item.code}&name=${item.desc}" class="bianco">${item.desc}</a></td>
<td class="uguale"><a href="/seta_servizi/cercaorario/fermata.html?code=${item.code}&name=${item.desc}" class="bianco">${item.code}</a></td>
</tr>
`;
tbody.appendChild(tr);
if(element.islast==true){
destSpan.innerHTML=element.desc.toUpperCase();
}
});
table.appendChild(tbody);
container.appendChild(table);
})
.catch(err => {
if(item.error=="Percorso non trovato"){
document.getElementById('tabella-container').textContent = "Percorso non trovato.";
}else{
console.error('Errore nel caricamento dati:', err);
document.getElementById('tabella-container').textContent = "Errore nella sintassi dei dati ricevuti.";
}
});
}
caricadati();

View File

@@ -0,0 +1,86 @@
const params = new URLSearchParams(window.location.search);
const id = params.get('journeycode');
const codiceSpan = document.getElementById('codice-span');
const destSpan = document.getElementById('destinazione-span');
const ritSpan = document.getElementById('ritardo-span');
//Displays route code
codiceSpan.innerHTML = id;
const urlBackend = `https://setaapi.serverissimo.freeddns.org/nextstops/${id}`;
//const urlBackend = `http://localhost:5001/arrivals/${codice}`;
function caricadati(){
var item=[];
fetch(urlBackend)
.then(response => {
if (!response.ok) throw new Error("Errore di risposta nel caricamento dei dati, probabilmente il server API è offline.");
return response.json();
})
.then(data => {
item = data;
})
.then(data => {
const container = document.getElementById('tabella-container');
container.innerHTML = '';
//Testo destinazione
//destSpan.innerHTML=item.arrivals[item.arrivals.length-1].desc;
//Testo ritardo
if(item.arrivals[0].delay>0){
ritSpan.setAttribute("style","color:rgba(255, 50, 50, 1);")
ritSpan.innerHTML="+"+item.arrivals[0].delay;
}else{
ritSpan.setAttribute("style","color:green;")
ritSpan.innerHTML=item.arrivals[0].delay;
}
item.arrivals.forEach(element => {
// Creo tabella
const table = document.createElement('table');
// Intestazione
const thead = document.createElement('thead');
thead.innerHTML = `
<tr>
<th class="linea" style="text-align:center;" colspan="2"><a href="/seta_servizi/cercaorario/fermata.html?code=${element.wp_code}&name=${element.desc}" class="bianco">${element.desc}</a></th>
</tr>
`;
table.appendChild(thead);
// Corpo tabella
const tbody = document.createElement('tbody');
var tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="uguale">Orario previsto:</td>
<td class="uguale">${element.planarrival}</td>
</tr>
`;
tbody.appendChild(tr);
var tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="uguale">Orario in tempo reale:</td>
<td class="uguale">${element.realarrival}</td>
</tr>
`;
tbody.appendChild(tr);
var tr = document.createElement('tr');
tr.innerHTML = `
<tr>
<td class="uguale">Codice fermata:</td>
<td class="uguale">${element.wp_code}</td>
</tr>
`;
tbody.appendChild(tr);
table.appendChild(tbody);
container.appendChild(table);
});
})
.catch(err => {
console.error('Errore nel caricamento dati:', err);
document.getElementById('tabella-container').textContent = "Errore nella sintassi dei dati ricevuti.";
});
}
caricadati();
setInterval(caricadati, 60000);

View File

@@ -0,0 +1,372 @@
const params = new URLSearchParams(window.location.search);
const container = document.getElementById('res-container');
const id = params.get('routenum');
const nav = document.getElementById('rcodes-nav')
const url = "https://setaapi.serverissimo.freeddns.org/routecodesarchive";
//Spawn iframeorari
if(id!=undefined&&id!=""){
const ul = document.createElement('ul');
ul.setAttribute("style","flex:1;justify-content: right;");
ul.innerHTML=`<li><a href="/seta_modena/servizi/percorsi/iframeorari.html?routenum=${id}"><h1 style="font-size: 100%;font-weight: 500;">Orari e mappa di oggi</h1></a></li>`;
nav.appendChild(ul);
}
//Elenco percorsi
fetch(url)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
allresults = data;
allresults.forEach(element => {
if(id==element.linea){
element.codes.forEach(item =>{
const result = document.createElement('a');
const hr = document.createElement('hr');
hr.setAttribute("class","solid");
const dest = routesDictionary(item);
result.setAttribute("class","bianco");
result.setAttribute("href","percorso.html?routecode="+item+"&routenum="+id);
if(dest==undefined){
if(item.includes("(")){
result.setAttribute("class","rosso");
}
result.innerHTML = `
<div class="search-result"><h3 style="margin-left: 8px;margin-right: 8px;">${item}</h3>
`;
}else{
if(item.includes("(")){
result.setAttribute("class","rosso");
}
result.innerHTML = `
<div class="search-result"><h3 style="margin-left: 8px;margin-right: 8px;">${dest} <br> (${item})</h3>
`;
}
container.appendChild(result);
})
}
});
})
.catch(error => console.error('Errore nel caricamento dei dati:', error));
function routesDictionary(rcode){
switch(rcode){
//Linea 1
case "MO1-As-153":
return "1 ARIETE -> MARINUZZI";
case "MO1-Di-146":
return "1 MARINUZZI -> V.ZETA";
case "MO1-As-150":
return "1A V.ZETA -> MODENA EST";
case "MO1-As-154":
return "1 V.ZETA -> MARINUZZI";
case "MO1-Di-147":
return "1B MODENA EST -> ARIETE";
case "MO1-Di-145":
return "1B MARINUZZI -> ARIETE";
case "MO1-As-149":
return "1A ARIETE -> MODENA EST";
case "MO1-As-151":
return "1A AUTOSTAZIONE -> MODENA EST";
case "MO1-Di-144":
return "1A AUTOSTAZIONE -> POLO LEONARDO";
case "MO1-As-152":
return "1A POLO LEONARDO -> MODENA EST";
case "MO1-Di-141":
return "1A MARINUZZI -> POLO LEONARDO";
case "MO1-Di-142":
return "1A SCARLATTI -> POLO LEONARDO";
case "MO1-Di-140":
return "1A BONACINI -> POLO LEONARDO";
case "MO1-As-160":
return "1S AUTOSTAZIONE";
case "MO1-As-139":
return "1 POLO LEONARDO -> MARINUZZI";
case "MO1-Di-158":
return "1 STAZIONE FS -> V.ZETA";
//Linea 2
case "MO2-As-220":
return "2 SAN DAMASO";
case "MO2-Di-269":
return "2 SAN DAMASO -> SANT'ANNA";
case "MO2-Di-270":
return "2 SAN DONNINO -> SANT'ANNA";
case "MO2-As-271":
return "2A SAN DONNINO";
case "MO2-Di-268":
return "2 SAN DONNINO -> SAN DAMASO -> SANT'ANNA";
case "MO2-Di-290":
return "2/ AUTOSTAZIONE";
case "MO2-As-291":
return "2 AUTOSTAZIONE -> SAN DONNINO";
//Linea 3
case "MO3-As-343":
return "3A VACIGLIO-MATTARELLA";
case "MO3-Di-318":
return "3 MONTEFIORINO";
case "MO3-As-348":
return "3 MATTARELLA";
case "MO3-As-354":
return "3A MONTEFIORINO -> VACIGLIO";
case "MO3-Di-397":
return "3B NONANTOLANA 1010";
case "MO3-As-396":
return "3B RAGAZZI DEL 99";
case "MO3-As-302":
return "3/ NONANTOLANA 1010 -> STAZIONE FS";
case "MO3-As-326":
return "3A MONTEFIORINO -> MATTARELLA -> VACIGLIO";
case "MO3-Di-400":
return "3B STAZIONE FS -> NONANTOLANA 1010";
case "MO3-Di-339":
return "3A S.CATERINA-MONTEFIORINO";
case "MO3-As-296":
return "3B NONANTOLANA 1010 -> CANALETTO -> RAGAZZI DEL 99";
case "MO3-As-294":
return "3A MONTEFIORINO -> CANALETTO -> MATTARELLA -> VACIGLIO";
case "MO3-Di-288":
return "3B RAGAZZI DEL 99 -> CANALETTO -> NONANTOLANA 1010";
case "MO3-Di-293":
return "3/ RAGAZZI DEL 99 -> STAZIONE FS";
case "MO3-Di-289":
return "3A VACIGLIO -> CANALETTO -> S.CATERINA-MONTEFIORINO";
case "MO3-Di-295":
return "3/ VACIGLIO -> STAZIONE FS";
case "MO3-Di-394":
return "3A NONANTOLANA -> S.CATERINA-MONTEFIORINO";
case "MO3-Di-317":
return "3 VACIGLIO -> MONTEFIORINO";
case "MO3-Di-325 (2025)":
return "3A VACIGLIO -> PORTORICO";
case "MO3-Di-316 (2025)":
return "3 MATTARELLA -> S.CATERINA";
case "MO3-As-322 (2025)":
return "3A PORTORICO -> VACIGLIO";
case "MO3-As-361 (2025)":
return "3 S.CATERINA -> MATTARELLA";
case "MO3-Di-320 (2025)":
return "3A MATTARELLA -> PORTORICO";
case "MO3-As-323 (2025)":
return "3 PORTORICO -> MATTARELLA";
case "MO3-As-319 (2025)":
return "3 S.CATERINA -> MATTARELLA";
//Linea 4
case "MO4-As-434":
return "4 GALILEI";
case "MO4-Di-437":
return "4 VACIGLIO NORD";
case "MO4-As-432":
return "4 V.NORD -> POLO -> GALILEI";
case "MO4-As-492":
return "4/ V.NORD -> AUTOSTAZIONE";
case "MO4-As-490":
return "4/ GALILEI -> AUTOSTAZIONE";
//Linea 5
case "MO5-Di-535":
return "5A LA TORRE -> D'AVIA -> TRE OLMI";
case "MO5-Di-537":
return "5 LA TORRE -> D'AVIA";
case "MO5-As-540":
return "5 TRE OLMI -> LA TORRE";
case "MO5-As-512":
return "5 D'AVIA -> LA TORRE";
case "MO5-Di-542":
return "5A LA TORRE -> TRE OLMI";
case "MO5-As-514":
return "5 TRE OLMI -> D'AVIA -> CENTRO 2000 -> LA TORRE";
case "MO5-As-513":
return "5 TRE OLMI -> D'AVIA -> LA TORRE";
//Linea 6
case "MO6-Di-615":
return "6 CHINNICI";
case "MO6-As-614":
return "6 AUTOSTAZIONE";
case "MO6-As-620":
return "6A SANTI";
case "MO6-As-622":
return "6B VILLANOVA";
case "MO6-Di-621":
return "6 SANTI -> CHINNICI";
case "MO6-Di-623":
return "6 VILLANOVA -> CHINNICI";
case "MO6-Di-611 (2025)":
return "6 CHINNICI (per PANNI)";
case "MO6-As-610 (2025)":
return "6 AUTOSTAZIONE (per PANNI)";
//Linea 7
case "MO7-As-703":
return "7 GRAMSCI";
case "MO7-Di-702":
return "7 GOTTARDI";
case "MO7-As-714":
return "7/ STAZIONE FS";
case "MO7-Di-706":
return "7 STAZIONE FS -> GOTTARDI (Sera)";
case "MO7-Di-715":
return "7 STAZIONE FS -> GOTTARDI (Mattina)";
case "MO7-As-705":
return "7/ AUTOSTAZIONE";
//Linea 7A
case "MO7A-As-753":
return "7A GRAMSCI";
case "MO7A-Di-752":
return "7A GOTTARDI";
case "MO7A-As-728":
return "7A/ STAZIONE FS";
case "MO7A-Di-754":
return "7A STAZIONE FS -> GOTTARDI";
//Linea 8
case "MO8-As-854":
return "8 GAZZOTTI (per ARTIGIANATO)";
case "MO8-Di-855":
return "8 PANNI (per ARTIGIANATO)";
case "MO8-Di-853":
return "8 PANNI";
case "MO8-As-820":
return "8 GARIBALDI -> GAZZOTTI";
case "MO8-Di-891":
return "8 GARIBALDI -> PANNI";
case "MO8-As-819":
return "8 GAZZOTTI";
case "MO8-As-817 (2025)":
return "8 GAZZOTTI";
//Linea 9
case "MO9-As-9951":
return "9 M.NUOVA -> M.VECCHIA -> GOTTARDI";
case "MO9-As-9952":
return "9 CITTANOVA -> GOTTARDI (Festivo)";
case "MO9-Di-960":
return "9C GOTTARDI -> M.NUOVA -> RUBIERA";
case "MO9-Di-9964":
return "9A GOTTARDI -> M.VECCHIA -> M.NUOVA";
case "MO9-As-963":
return "9 RUBIERA -> M.VECCHIA -> GOTTARDI";
case "MO9-As-9949":
return "9 M.NUOVA -> GOTTARDI";
case "MO9-Di-9981":
return "9 CITTANOVA";
case "MO9-Di-960":
return "9C RUBIERA";
case "MO9-As-9955":
return "9 RUBIERA -> M.NUOVA -> M.VECCHIA -> GOTTARDI";
case "MO9-Di-9953":
return "9A MARZAGLIA NUOVA";
//NUOVE
case "MO9-Di-9954":
return "9C GOTTARDI -> M.VECCHIA -> RUBIERA";
case "MO9-Di-985":
return "9C AUTOSTAZIONE -> RUBIERA";
case "MO9-As-9950":
return "9 RUBIERA -> M.NUOVA -> GOTTARDI";
case "MO9-As-956":
return "9 CITTANOVA -> GOTTARDI (Non festivo)";
case "MO9-Di-966":
return "9A STAZIONE FS -> M.VECCHIA -> M.NUOVA";
case "MO9-Di-912":
return "9A STAZIONE FS -> M.NUOVA";
case "MO9-As-9691":
return "9 M.NUOVA -> M.VECCHIA -> GOTTARDI";
case "MO9-As-969":
return "9A GOTTARDI -> M.VECCHIA -> M.NUOVA";
case "MO9-As-9955":
return "9 RUBIERA -> M.NUOVA -> M.VECCHIA -> GOTTARDI";
case "MO9-As-986":
return "9/ RUBIERA -> AUTOSTAZIONE";
//Linea 10
case "MO10-As-1034":
return "10 ALBARETO -> COGNENTO";
case "MO10-Di-1030":
return "10A LA ROCCA";
case "MO10-Di-1029":
return "10 ALBARETO";
case "MO10-As-1032":
return "10 LA ROCCA -> COGNENTO (Festivo)";
case "MO10-Di-1090":
return "10A ALBARETO -> M.NUOVA";
case "MO10-As-1058":
return "10 LA ROCCA -> COGNENTO";
case "MO10-As-1039":
return "10A LA ROCCA -> M.NUOVA";
case "MO10-Di-1045":
return "10/ COGNENTO -> AUTOSTAZIONE";
//Linea 11
case "MO11-Di-1138":
return "11 SANT'ANNA";
case "MO11-As-1137":
return "11 ZODIACO";
case "MO11-Di-1140":
return "11/ STAZIONE FS";
//Linea 12
case "MO12-As-1279":
return "12S GARIBALDI";
case "MO12-As-1280":
return "12A NAZIONI";
case "MO12-As-1282":
return "12 FINZI";
case "MO12-As-1284":
return "12A GARIBALDI -> NAZIONI";
case "MO12-As-1286":
return "12/ FANTI FS";
case "MO12-Di-1281":
return "12 NAZIONI-> POLO LEONARDO";
case "MO12-Di-1283":
return "12 FINZI -> POLO LEONARDO";
case "MO12-Di-1285":
return "12 FANTI FS -> POLO LEONARDO";
case "MO12-As-1276 (2025)":
return "12 S.CATERINA";
case "MO12-Di-1277 (2025)":
return "12 POLO LEONARDO";
case "MO12-As-1272 (2025)":
return "12 GARIBALDI -> S.CATERINA";
//Linea 13
case "MO13-As-1330":
return "13F SANT'ANNA";
case "MO13-Di-1333":
return "13F OSPEDALE BAGGIOVARA";
case "MO13-As-1332":
return "13F SANT'ANNA incl. CIMITERO";
case "MO13-As-1334":
return "13A CARCERE";
case "MO13-Di-1337":
return "13F CARCERE -> OSPEDALE BAGGIOVARA";
case "MO13-As-1323":
return "13 SANT'ANNA";
case "MO13-Di-1321":
return "13 OSPEDALE BAGGIOVARA";
case "MO13-As-1324":
return "13A CARCERE";
case "MO13-Di-1320":
return "13 CARCERE -> OSPEDALE BAGGIOVARA";
//Linea 14
case "MO14-Di-1434":
return "14A NAZIONI";
case "MO14-As-1437":
return "14 NAZIONI -> NONANTOLANA";
case "MO14-As-1435":
return "14 FINZI -> NONANTOLANA";
case "MO14-Di-1432":
return "14 FINZI";
case "MO14-As-1433":
return "14 PORTORICO";
//Linea 15
case "MO15-Di-1501":
return "15 VILLANOVA";
case "MO15-As-1502":
return "15 VILLANOVA -> AUTOSTAZIONE";
case "MO15-Di-1503":
return "15/ SANTI";
case "MO15-As-1504":
return "15 SANTI -> AUTOSTAZIONE";
case "MO15-As-1505":
return "15 VILLANOVA -> SAN CATALDO";
//Linea 81
case "MO81-As-2213":
return "81 TETRA PAK";
case "MO81-As-2207":
return "81 SANT'ANNA";
}
}

View File

@@ -0,0 +1,87 @@
const uContainer = document.getElementById('urbano-container');
const sContainer = document.getElementById('speciali-container');
const seContainer = document.getElementById('subextra-container');
const othContainer = document.getElementById('altri-container');
const schContainer = document.getElementById('scuola-container');
const url = "https://setaapi.serverissimo.freeddns.org/routenumberslist";
//Elenco linee urbano
fetch(url)
.then(response => {
if (!response.ok) throw new Error("Errore nel caricamento dei dati.");
return response.json();
})
.then(data => {
allresults = data;
allresults.forEach(element => {
if(element<100){
const result = document.createElement('a');
result.setAttribute("class","bianco");
if(element.includes("(")){
result.setAttribute("class","rosso");
}
result.setAttribute("href","rcodes.html?routenum="+element);
result.innerHTML = `
<div class="search-result"><h3>${element}</h3>
`;
uContainer.appendChild(result);
}else if(element>390&&element<400){
const result = document.createElement('a');
result.setAttribute("class","bianco");
if(element.includes("(")){
result.setAttribute("class","rosso");
}
result.setAttribute("href","rcodes.html?routenum="+element);
result.innerHTML = `
<div class="search-result"><h3>${element}</h3>
`;
schContainer.appendChild(result);
}else if(element=="5taxi"||element=="10tax"){
const result = document.createElement('a');
result.setAttribute("class","bianco");
if(element.includes("(")){
result.setAttribute("class","rosso");
}
result.setAttribute("href","rcodes.html?routenum="+element);
result.innerHTML = `
<div class="search-result"><h3>${element}</h3>
`;
sContainer.appendChild(result);
}else if(/^[^A-Z].*[A-Z]/i.test(element)||element.includes("(")){
const result = document.createElement('a');
result.setAttribute("class","bianco");
if(element.includes("(")){
result.setAttribute("class","rosso");
}
result.setAttribute("href","rcodes.html?routenum="+element);
result.innerHTML = `
<div class="search-result"><h3>${element}</h3>
`;
uContainer.appendChild(result);
}else if(!/^[A-Z]/i.test(element)){
const result = document.createElement('a');
result.setAttribute("class","bianco");
if(element.includes("(")){
result.setAttribute("class","rosso");
}
result.setAttribute("href","rcodes.html?routenum="+element);
result.innerHTML = `
<div class="search-result"><h3>${element}</h3>
`;
seContainer.appendChild(result);
}else{
const result = document.createElement('a');
result.setAttribute("class","bianco");
if(element.includes("(")){
result.setAttribute("class","rosso");
}
result.setAttribute("href","rcodes.html?routenum="+element);
result.innerHTML = `
<div class="search-result"><h3>${element}</h3>
`;
othContainer.appendChild(result);
}
});
})
.catch(error => console.error('Errore nel caricamento dei dati:', error));

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SETA Modena - Percorsi</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav id="percorso-nav">
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/seta_modena/servizi/percorsi/index.html"><h1 style="font-size: 100%;font-weight: 500;">Selettore linea</h1></a></li>
</ul>
</nav>
</header>
<h2>Lista fermate linea: <span id="codice-span"></span></h2>
<p>Direzione: <span id="destinazione-span"></span></p>
<p>E' possibile cliccare sul codice o nome fermata per vedere gli arrivi alla rispettiva fermata.</p>
<div id="tabella-container">Caricamento dati...</div>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/linea.js"></script>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SETA Modena - Prossime fermate</title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav style="display: flex;">
<ul>
<li><a href="/seta_servizi/businservizio/index.html"><h1 style="font-size: 100%;font-weight: 500;">Monitor bus in servizio</h1></a></li>
</ul>
<ul style="flex:1;justify-content: right;">
<li><a href=""><h1 style="font-size: 100%;font-weight: 500;">Aggiorna</h1></a></li>
</ul>
</nav>
</header>
<h2>Prossime fermate corsa: <span id="codice-span"></span></h2>
<!--<p>Direzione: <span id="destinazione-span"></span></p>-->
<strong><p>Ritardo/Anticipo: <span id="ritardo-span"></span></p></strong>
<p>E' possibile cliccare sul nome fermata per vedere gli arrivi alla rispettiva fermata.</p>
<div id="tabella-container">Caricamento dati...</div>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/percorso-rt.js"></script>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="description" content="Cerca orari in tempo reale per le fermate di SETA a Modena.">
<meta name="keywords" content="seta, modena, seta-modena, orari, in, tempo, reale, autobus, fermate, orario, palina">
<meta name="author" content="ER-TPL Team">
<title>SETA Modena - Percorsi</title>
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://www.setaweb.it/images/favicon/android-icon-192x192.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav id="rcodes-nav" style="display: flex;">
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/seta_modena/servizi/percorsi/index.html"><h1 style="font-size: 100%;font-weight: 500;">Selettore linea</h1></a></li>
</ul>
</nav>
</header>
<h1>Percorsi e codici corsa SETA Modena</h1>
<h2>Scegli un percorso:</h2>
<div id="res-container"></div>
<footer>
<div>
<p>Copyright (C) 2025 ER-TPL Team - <a href="https://ertpl.pages.dev" target="_blank">ertpl.pages.dev</a> - code by Il Dani & SetaModenaFanpage <a href="https://github.com/Leocraft1/SetaAPI" target="_blank">Codice Sorgente</a> - I loghi SETA Spa sono marchi registrati e sono inseriti in questo sito solo a scopo di illustrazione.</p>
</div>
</footer>
<script src="js/rcodes.js"></script>
</body>
</html>