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,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>