From 655775e46054019520d5152ffc88d6823c90b912 Mon Sep 17 00:00:00 2001 From: Caspar Armster Date: Mon, 9 May 2016 16:36:52 +0200 Subject: [PATCH] =?UTF-8?q?[FIX]=20=C3=9Cberspringt=20nun=20unbekannte=20H?= =?UTF-8?q?ersteller=20und=20l=C3=B6scht=20die=20Optionen=20wieder,=20wenn?= =?UTF-8?q?=20weiter=20vorne=20etwas=20Neues=20ausgew=C3=A4hlt=20wurde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 390 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 240 insertions(+), 150 deletions(-) diff --git a/index.php b/index.php index 4ec3d33..3c14299 100644 --- a/index.php +++ b/index.php @@ -209,18 +209,22 @@ EOT; $router_tmp[$i]['version'] = "Alle"; $router_tmp[$i]['modell'] = strtoupper(substr($files['beta']['factory'][$i], $pos_hersteller+2, stripos($files['beta']['factory'][$i], ".", $pos_hersteller+2)-$pos_hersteller-2)); } - $router[$i]['hersteller'] = $router_tmp[$i]['hersteller']; - $router[$i]['version'] = $router_tmp[$i]['version']; - $router[$i]['modell'] = $router_tmp[$i]['modell']; - $router[$i]['betafactory'] = 1; - $router[$i]['betasysupgrade'] = 0; - $router[$i]['brokenfactory'] = 0; - $router[$i]['brokensysupgrade'] = 0; - $router[$i]['experimentalfactory'] = 0; - $router[$i]['experimentalsysupgrade'] = 0; - $router[$i]['stablefactory'] = 0; - $router[$i]['stablesysupgrade'] = 0; - $router[$i]['betafactorylink'] = $firmware_download_path."beta/factory/".$files['beta']['factory'][$i]; + if(isset($router_tmp[$i]['hersteller']) != true) { + echo("Unbekannten Hersteller im Dateinamen gefunden, bitte Script updaten!"); + } else { + $router[$i]['hersteller'] = $router_tmp[$i]['hersteller']; + $router[$i]['version'] = $router_tmp[$i]['version']; + $router[$i]['modell'] = $router_tmp[$i]['modell']; + $router[$i]['betafactory'] = 1; + $router[$i]['betasysupgrade'] = 0; + $router[$i]['brokenfactory'] = 0; + $router[$i]['brokensysupgrade'] = 0; + $router[$i]['experimentalfactory'] = 0; + $router[$i]['experimentalsysupgrade'] = 0; + $router[$i]['stablefactory'] = 0; + $router[$i]['stablesysupgrade'] = 0; + $router[$i]['betafactorylink'] = $firmware_download_path."beta/factory/".$files['beta']['factory'][$i]; + } } } $router_tmp = array(); @@ -296,27 +300,31 @@ EOT; $router_tmp[$i]['version'] = "Alle"; $router_tmp[$i]['modell'] = strtoupper(substr($files['beta']['sysupgrade'][$i], $pos_hersteller+2, stripos($files['beta']['sysupgrade'][$i], ".", $pos_hersteller+2)-$pos_hersteller-13)); } - $router_neu = 1; - for( $j=0; $j"); - for( $j=0; $j"); + for( $j=0; $j"); } catch(Exception $e) { - echo("Fehler: ".$e); + echo("Fehler: ".$e->getMessage()); die(); } @@ -916,6 +946,10 @@ EOT; function populateA(s1,s2){ var s1 = document.getElementById(s1); var s2 = document.getElementById(s2); + var s3 = document.getElementById("slct3"); + var s4 = document.getElementById("slct4"); + var s5 = document.getElementById("slct5"); + var s6 = document.getElementById("slct6"); s2.innerHTML = ""; EOT; for( $i=0; $i 1) { + s3.remove(s3.length-1); + } + while(s4.length > 1) { + s4.remove(s4.length-1); + } + while(s5.length > 1) { + s5.remove(s5.length-1); + } + s6.href = "#"; + s6.className = s6.className.replace( /(?:^|\s)disabled(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-primary(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-danger(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-warning(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-success(?!\S)/g , '' ); + s6.className += " btn-primary disabled"; + s6.innerHTML = "Download Firmware"; } function populateB(s1,s2){ var s1 = document.getElementById(s1); var s2 = document.getElementById(s2); + var s4 = document.getElementById("slct4"); + var s5 = document.getElementById("slct5"); + var s6 = document.getElementById("slct6"); s2.innerHTML = ""; EOT; $i=0; @@ -981,10 +1035,26 @@ EOT; newOption.innerHTML = pair[1]; s2.options.add(newOption); } + while(s4.length > 1) { + s4.remove(s4.length-1); + } + while(s5.length > 1) { + s5.remove(s5.length-1); + } + s6.href = "#"; + s6.className = s6.className.replace( /(?:^|\s)disabled(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-primary(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-danger(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-warning(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-success(?!\S)/g , '' ); + s6.className += " btn-primary disabled"; + s6.innerHTML = "Download Firmware"; } function populateC(s1,s2){ var s1 = document.getElementById(s1); var s2 = document.getElementById(s2); + var s5 = document.getElementById("slct5"); + var s6 = document.getElementById("slct6"); s2.innerHTML = ""; EOT; $i=0; @@ -1009,10 +1079,22 @@ EOT; newOption.innerHTML = pair[1]; s2.options.add(newOption); } + while(s5.length > 1) { + s5.remove(s5.length-1); + } + s6.href = "#"; + s6.className = s6.className.replace( /(?:^|\s)disabled(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-primary(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-danger(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-warning(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-success(?!\S)/g , '' ); + s6.className += " btn-primary disabled"; + s6.innerHTML = "Download Firmware"; } function populateD(s1,s2){ var s1 = document.getElementById(s1); var s2 = document.getElementById(s2); + var s6 = document.getElementById("slct6"); s2.innerHTML = ""; EOT; $i=0; @@ -1059,6 +1141,14 @@ EOT; newOption.innerHTML = pair[1]; s2.options.add(newOption); } + s6.href = "#"; + s6.className = s6.className.replace( /(?:^|\s)disabled(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-primary(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-danger(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-warning(?!\S)/g , '' ); + s6.className = s6.className.replace( /(?:^|\s)btn-success(?!\S)/g , '' ); + s6.className += " btn-primary disabled"; + s6.innerHTML = "Download Firmware"; } function populateE(s1,s2){ var s1 = document.getElementById(s1); @@ -1139,7 +1229,7 @@ EOT; Freifunk Hennef Firmware

- Auf dieser Seite können Sie die passende Firmware für ihren Router auswählen und herunterladen! + Auf dieser Seite können Sie die passende Firmware für ihren Router in Hennef auswählen und herunterladen!

Zurück zur Startseite @@ -1160,7 +1250,7 @@ EOT; Legen Sie anschließend fest, ob sie den Router zum ersten Mal mit einer Freifunk Firmware flashen und welches Entwicklungsstadium die Firmware haben soll.

@@ -1170,7 +1260,7 @@ EOT;

- Router Hersteller: + Router Hersteller

@@ -1191,7 +1281,7 @@ EOT;

- Router Modell: + Router Modell

@@ -1205,7 +1295,7 @@ EOT;

- Router Version: + Router Version

@@ -1221,7 +1311,7 @@ EOT;

- Firmware Erstinstallation: + Firmware Erstinstallation

@@ -1235,7 +1325,7 @@ EOT;

- Firmware Entwicklungsstadium: + Firmware Entwicklungsstadium

@@ -1249,7 +1339,7 @@ EOT;

- Firmware Download: + Firmware Download