mirror of
https://github.com/Daniongithub/ER-TPL.git
synced 2025-12-06 17:52:03 +00:00
Deprecato percorrenza seta, l'iframe orari sta in percorsi
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
|
||||||
|
<li><a href="/seta_menu/seta.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
|
||||||
<li><a href="/seta_menu/frequenze/index.html"><h1 style="font-size: 100%;font-weight: 500;">Selettore linea</h1></a></li>
|
<li><a href="/seta_menu/frequenze/index.html"><h1 style="font-size: 100%;font-weight: 500;">Selettore linea</h1></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -27,7 +29,8 @@
|
|||||||
<th onclick="javascript:setAs()">Andata</th>
|
<th onclick="javascript:setAs()">Andata</th>
|
||||||
<th onclick="javascript:setDi()">Ritorno</th>
|
<th onclick="javascript:setDi()">Ritorno</th>
|
||||||
</table>
|
</table>
|
||||||
<iframe id="iframe" src="" frameborder="0"></iframe>
|
<div id="caricamento-div"></div>
|
||||||
|
<iframe id="iframe" src="" frameborder="0" onload="javascript:removeLoading()"></iframe>
|
||||||
<script src="js/iframeorari.js"></script>
|
<script src="js/iframeorari.js"></script>
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
|
||||||
<li><h1 class="warning">ATTENZIONE! Il servizio è in fase di sviluppo e non sono inserite tutte le linee, si prega di avere pazienza.</h1></li>
|
|
||||||
</ul>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
|
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
|
||||||
<li><a href="/seta_menu/seta.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
|
<li><a href="/seta_menu/seta.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<!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.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="/seta_menu/seta.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
|
|
||||||
<li><a href="/seta_menu/frequenze/index.html"><h1 style="font-size: 100%;font-weight: 500;">Selettore linea</h1></a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<h1>Frequenze e tempi di percorrenza linea: <span id="linea-span"></span></h1>
|
|
||||||
<div id="desc-container"></div>
|
|
||||||
<div id="link-a-seta"></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/infos.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -3,6 +3,7 @@ const num = params.get('routenum');
|
|||||||
const lineaSpan = document.getElementById('linea-span');
|
const lineaSpan = document.getElementById('linea-span');
|
||||||
const iframe = document.getElementById('iframe');
|
const iframe = document.getElementById('iframe');
|
||||||
const messageDiv = document.getElementById('message');
|
const messageDiv = document.getElementById('message');
|
||||||
|
const loadingDiv = document.getElementById('caricamento-div');
|
||||||
|
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const todayDate=date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear();
|
const todayDate=date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear();
|
||||||
@@ -13,19 +14,36 @@ const diURL = "https://setaapi.serverissimo.freeddns.org/lineedyn_linea_dett_per
|
|||||||
//Display numero linea
|
//Display numero linea
|
||||||
lineaSpan.textContent=num;
|
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
|
//Spawn iframe
|
||||||
iframe.setAttribute("src",asURL);
|
iframe.setAttribute("src",asURL);
|
||||||
if(num==undefined||num==""){
|
if(num==undefined||num==""){
|
||||||
iframe.setAttribute("src","");
|
iframe.setAttribute("src","");
|
||||||
message.innerHTML=`
|
messageDiv.innerHTML=`
|
||||||
<p>Non hai specificato nessuna linea nei parametri dell'url</p>
|
<p>Non hai specificato nessuna linea nei parametri dell'url</p>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAs(){
|
function setAs(){
|
||||||
|
loadingDiv.style.margin="12px";
|
||||||
|
loadingDiv.innerHTML="Caricamento in corso...";
|
||||||
|
iframe.style.display="none";
|
||||||
iframe.setAttribute("src",asURL);
|
iframe.setAttribute("src",asURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDi(){
|
function setDi(){
|
||||||
|
loadingDiv.style.margin="12px";
|
||||||
|
loadingDiv.innerHTML="Caricamento in corso...";
|
||||||
|
iframe.style.display="none";
|
||||||
iframe.setAttribute("src",diURL);
|
iframe.setAttribute("src",diURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeLoading(){
|
||||||
|
loadingDiv.style.margin="";
|
||||||
|
loadingDiv.innerHTML="";
|
||||||
|
iframe.style.display="";
|
||||||
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
const params = new URLSearchParams(window.location.search);
|
|
||||||
const num = params.get('routenum');
|
|
||||||
const lineaSpan = document.getElementById('linea-span');
|
|
||||||
const descContainer = document.getElementById('desc-container');
|
|
||||||
const linkContainer = document.getElementById('link-a-seta');
|
|
||||||
|
|
||||||
const urlDesc = "https://setaapi.serverissimo.freeddns.org/frequencydescription/"+num;
|
|
||||||
|
|
||||||
//Display numero linea
|
|
||||||
lineaSpan.innerHTML=num;
|
|
||||||
|
|
||||||
//Contenuto del testo
|
|
||||||
fetch(urlDesc)
|
|
||||||
.then(response => {
|
|
||||||
if (!response.ok) throw new Error("Impossibile raggiungere il server.");
|
|
||||||
return response.json();
|
|
||||||
})
|
|
||||||
.then(data =>{
|
|
||||||
linkContainer.innerHTML=`<a href="iframeorari.html?routenum=${data[0].linea}" class="biancosott">Visualizza tabella e mappa</a>`;
|
|
||||||
descContainer.innerHTML=`
|
|
||||||
<table id="desc-table">
|
|
||||||
<th>Destinazione</th>
|
|
||||||
<th>Tempo di percorrenza (min)</th>
|
|
||||||
<th>Frequenza (min)</th>
|
|
||||||
</table>`;
|
|
||||||
const table = document.getElementById('desc-table');
|
|
||||||
if(data[0].linea==undefined){
|
|
||||||
descContainer.innerHTML="La linea specificata non possiede nessuna descrizione valida.";
|
|
||||||
}
|
|
||||||
var i=0;
|
|
||||||
data[0].destinazioni.forEach(element => {
|
|
||||||
var tr = document.createElement('tr');
|
|
||||||
var td = document.createElement('td');
|
|
||||||
td.innerHTML=data[0].destinazioni[i];
|
|
||||||
tr.appendChild(td);
|
|
||||||
var td = document.createElement('td');
|
|
||||||
td.innerHTML=data[0].percorrenza[i];
|
|
||||||
tr.appendChild(td);
|
|
||||||
var td = document.createElement('td');
|
|
||||||
td.innerHTML=data[0].frequenze[i];
|
|
||||||
tr.appendChild(td);
|
|
||||||
//var td = document.createElement('td');
|
|
||||||
//td.innerHTML=data[0].frequenze_dom[i];
|
|
||||||
//tr.appendChild(td);
|
|
||||||
table.appendChild(tr);
|
|
||||||
i++;
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(error => {descContainer.innerHTML="La linea specificata non possiede nessuna descrizione valida.";console.error(error);})
|
|
||||||
@@ -17,7 +17,7 @@ fetch(url)
|
|||||||
if(element.includes("(")){
|
if(element.includes("(")){
|
||||||
result.setAttribute("class","rosso");
|
result.setAttribute("class","rosso");
|
||||||
}
|
}
|
||||||
result.setAttribute("href","infolinea.html?routenum="+element);
|
result.setAttribute("href","iframeorari.html?routenum="+element);
|
||||||
result.innerHTML = `
|
result.innerHTML = `
|
||||||
<div class="search-result"><h3>${element}</h3>
|
<div class="search-result"><h3>${element}</h3>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<a class="gbutton" href="cercaorario/index.html">Orari in tempo reale</a>
|
<a class="gbutton" href="cercaorario/index.html">Orari in tempo reale</a>
|
||||||
<a class="gbutton" href="businservizio/index.html">Monitor autobus in servizio</a>
|
<a class="gbutton" href="businservizio/index.html">Monitor autobus in servizio</a>
|
||||||
<a class="gbutton" href="percorsi/index.html">Percorsi</a>
|
<a class="gbutton" href="percorsi/index.html">Percorsi</a>
|
||||||
<a class="gbutton" href="frequenze/index.html">Frequenze e percorrenza (BETA)</a>
|
<a class="gbutton" href="frequenze/index.html">Frequenze (BETA)</a>
|
||||||
<a class="gbutton" href="zone.html">Zone (BETA)</a>
|
<a class="gbutton" href="zone.html">Zone (BETA)</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user