2023-08-16 18:26:11 +02:00
< html lang = " de " >
< head >
< meta charset = " UTF-8 " >
< meta http - equiv = " X-UA-Compatible " content = " IE=edge " >
< meta name = " viewport " content = " width=device-width, initial-scale=1 " >
2023-08-16 21:43:54 +02:00
< link rel = " stylesheet " href = " css/custom.css?v=1.2 " >
2023-08-16 18:26:11 +02:00
< link rel = " stylesheet " href = " css/bootstrap.css " >
< title > Silias Zefix Suche </ title >
2023-08-16 17:23:44 +02:00
2023-08-16 21:15:28 +02:00
< style >
2023-08-17 21:38:35 +02:00
#sitzInput {
2023-08-16 21:15:28 +02:00
box - sizing : border - box ;
background - position : 14 px 12 px ;
background - repeat : no - repeat ;
font - size : 16 px ;
padding : 14 px 20 px 12 px 45 px ;
border : none ;
border - bottom : 1 px solid #ddd;
}
2023-08-17 21:38:35 +02:00
#sitzInput:focus {outline: 3px solid #ddd;}
2023-08-16 21:15:28 +02:00
. dropdown {
position : relative ;
display : inline - block ;
}
. dropdown - content {
position : absolute ;
background - color : #f6f6f6;
min - width : 230 px ;
overflow : auto ;
border : 1 px solid #ddd;
z - index : 1 ;
}
. dropdown - content a {
color : black ;
padding : 12 px 16 px ;
text - decoration : none ;
display : block ;
}
. dropdown a : hover { background - color : #ddd;}
. show { display : block ;}
2023-08-16 21:32:00 +02:00
. scrollWindow {
max - height : 300 px ; /* Adjust the value as needed */
overflow - y : auto ; /* This will add a scrollbar when content exceeds max-height */
border : 1 px solid #ccc; /* Optional: Add a border for visual clarity */
padding : 10 px ; /* Optional: Add padding for better spacing */
}
2023-08-16 21:15:28 +02:00
</ style >
2023-08-16 18:26:11 +02:00
</ head >
< body >
2023-08-16 17:36:41 +02:00
2023-08-16 18:27:32 +02:00
< div class = " wrapper " >
< section >
2023-08-16 18:21:11 +02:00
2023-08-16 18:27:32 +02:00
2023-08-16 21:15:28 +02:00
< div class = " container " >
2023-08-16 21:42:03 +02:00
< h1 > Silias Zefix Suche </ h1 >
2023-08-16 21:15:28 +02:00
2023-08-16 21:42:03 +02:00
< p > Diese Webseite wird gerade neu entwickelt und steht demnächst zur Verfügung .</ p >
2023-08-16 21:15:28 +02:00
< form action = " submit.php " method = " post " >
< label for = " firmenname " > Firmenname :</ label >
2023-08-16 21:32:00 +02:00
< input type = " text " id = " firmenname " name = " firmenname " >< br >< br >
2023-08-16 21:15:28 +02:00
< label for = " kanton " > Kanton :</ label >
2023-08-17 21:38:35 +02:00
< div id = " kantonauswahl " class = " scrollWindow " >
</ div >< br >< br >
2023-08-16 21:15:28 +02:00
2023-08-16 21:32:00 +02:00
< label for = " sitz " > Sitz ( Postleitzahl / Gemeinde ) :</ label >< br >
2023-08-16 21:15:28 +02:00
< div class = " dropdown " >
2023-08-17 21:38:35 +02:00
< div id = " gemeindeDropdown " class = " dropdown-content " >
< input type = " text " placeholder = " Postleitzahl / Ort " id = " sitzInput " onkeyup = " filterFunction() " onchange = " filterFunction() " name = " sitzfilter " autocomplete = " off " >
< div id = " sitzauswahl " class = " scrollWindow " >
2023-08-16 21:15:28 +02:00
</ div >
</ div >
2023-08-16 21:32:00 +02:00
</ div >< br >< br >< br >< br >
< label for = " rechtsform " > Rechtsform :</ label >< br >
< div class = " scrollWindow " >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Einzelunternehmen " > Einzelunternehmen </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Kollektivgesellschaft " > Kollektivgesellschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Aktiengesellschaft " > Aktiengesellschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Gesellschaft mit beschränkter Haftung " > Gesellschaft mit beschränkter Haftung </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Genossenschaft " > Genossenschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Verein " > Verein </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Stiftung " > Stiftung </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Institut des öffentlichen Rechts " > Institut des öffentlichen Rechts </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Zweigniederlassung " > Zweigniederlassung </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Kommanditgesellschaft " > Kommanditgesellschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Zweigniederlassung einer ausl. Gesellschaft " > Zweigniederlassung einer ausl . Gesellschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Kommanditaktiengesellschaft " > Kommanditaktiengesellschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Besondere Rechtsform " > Besondere Rechtsform </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Gemeinderschaft " > Gemeinderschaft </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Investmentgesellschaft mit festem Kapital " > Investmentgesellschaft mit festem Kapital </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Investmentgesellschaft mit variablem Kapital " > Investmentgesellschaft mit variablem Kapital </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Kommanditgesellschaft für kollektive Kapitalanlagen " > Kommanditgesellschaft für kollektive Kapitalanlagen </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " Nichtkaufmännische Prokura " > Nichtkaufmännische Prokura </ label >< br >
< label >< input type = " checkbox " name = " rechtsform[] " value = " (unbekannt) " > ( unbekannt ) </ label >< br >
</ div >
< br >< br >
2023-08-16 21:15:28 +02:00
< input type = " checkbox " id = " exakteSuche " name = " exakteSuche " >
< label for = " exakteSuche " > Exakte Suche </ label >< br >
< input type = " checkbox " id = " geloeschteRechtseinheiten " name = " geloeschteRechtseinheiten " >
< label for = " geloeschteRechtseinheiten " > Gelöschte Rechtseinheiten suchen </ label >< br >
< input type = " checkbox " id = " inBisherigenFirmen " name = " inBisherigenFirmen " >
< label for = " inBisherigenFirmen " > In bisherigen Firmen / Namen suchen </ label >< br >
< input type = " checkbox " id = " phonetischeSuche " name = " phonetischeSuche " >
< label for = " phonetischeSuche " > Phonetische Suche </ label >< br >< br >
2023-08-16 21:32:00 +02:00
< input type = " submit " value = " Suchergebnisse herunterladen " >
2023-08-16 21:15:28 +02:00
</ form >
< script >
// Parse CSV-Daten und fülle das Dropdown-Feld
let csvData ;
< ? php
include 'gemeinden.php' ;
?>
csvData = csvData . slice ( 1 );
// csvData = "PLZ,ORTBEZ,KANTON
// 1000,Lausanne Dépôt,VD
// 1001,Lausanne,VD
// 1002,Lausanne,VD"
const lines = csvData . trim () . split ( '\n' );
const headers = lines [ 0 ] . split ( ',' );
const gemeindeNameIndex = headers . indexOf ( 'Gemeindename' );
const plzIndex = headers . indexOf ( 'PLZ' );
const kantonIndex = headers . indexOf ( 'Kanton' );
const sitze = [];
2023-08-17 21:38:35 +02:00
const kantone = []
2023-08-16 21:15:28 +02:00
for ( let i = 1 ; i < lines . length ; i ++ ) {
2023-08-17 21:38:35 +02:00
2023-08-16 21:15:28 +02:00
const cells = lines [ i ] . split ( ',' );
const plz = cells [ plzIndex ] . trim ();
const gemeindeName = cells [ gemeindeNameIndex ] . trim ();
const kanton = cells [ kantonIndex ] . trim ();
// Falls Kanton noch nicht vorhanden -> hinzufügen
2023-08-17 21:38:35 +02:00
if ( ! kantone . includes ( kanton )) {
kantone . push ( kanton )
const label = document . createElement ( 'label' );
const kantonsauswahl = document . getElementById ( " kantonauswahl " )
kantonsauswahl . appendChild ( label );
const input = document . createElement ( 'input' );
input . type = " checkbox " ;
input . name = " kantone[] " ;
input . value = kanton ;
label . textContent = " " + kanton ;
label . style . marginBottom = '0' ;
label . prepend ( input );
kantonsauswahl . appendChild ( document . createElement ( " br " ))
2023-08-16 21:15:28 +02:00
}
// Sitz hinzufügen
2023-08-17 21:38:35 +02:00
sitze . push ( cells )
2023-08-16 21:15:28 +02:00
const sitzString = plz + " " + gemeindeName
2023-08-17 21:38:35 +02:00
const gemeindeEintrag = document . createElement ( " div " );
gemeindeEintrag . classList . add ( " gemeindeeintrag " );
const label = document . createElement ( 'label' );
const sitzauswahl = document . getElementById ( " sitzauswahl " )
sitzauswahl . appendChild ( gemeindeEintrag );
gemeindeEintrag . appendChild ( label );
const input = document . createElement ( 'input' );
input . type = " checkbox " ;
input . name = " sitze[] " ;
input . value = plz ;
label . textContent = " " + sitzString ;
label . style . marginBottom = '0' ;
label . prepend ( input );
gemeindeEintrag . appendChild ( document . createElement ( " br " ))
2023-08-16 21:15:28 +02:00
}
function filterFunction () {
2023-08-17 21:38:35 +02:00
const numKantoneAusgewählt = kantoneAusgewählt ()
2023-08-16 21:15:28 +02:00
var input , filter , ul , li , a , i ;
2023-08-17 21:38:35 +02:00
input = document . getElementById ( " sitzInput " );
2023-08-16 21:15:28 +02:00
filter = input . value . toUpperCase ();
2023-08-17 21:38:35 +02:00
div = document . getElementById ( " gemeindeDropdown " );
a = div . getElementsByClassName ( " gemeindeeintrag " );
2023-08-16 21:15:28 +02:00
for ( i = 0 ; i < a . length ; i ++ ) {
txtValue = a [ i ] . textContent || a [ i ] . innerText ;
2023-08-17 21:38:35 +02:00
if (( txtValue . toUpperCase () . indexOf ( filter ) > - 1 && ( document . querySelector ( 'input[name="kantone[]"][value=' + sitze [ i ][ kantonIndex ] + ']' ) . checked || numKantoneAusgewählt === 0 ) ) || a [ i ] . firstElementChild . firstElementChild . checked ) {
2023-08-16 21:15:28 +02:00
a [ i ] . style . display = " " ;
} else {
a [ i ] . style . display = " none " ;
}
}
}
2023-08-17 21:38:35 +02:00
function kantoneAusgewählt () {
const checkboxes = document . querySelectorAll ( 'input[name="kantone[]"]' );
let countChecked = 0 ;
for ( var i = 0 ; i < checkboxes . length ; i ++ ) {
if ( checkboxes [ i ] . checked ) {
countChecked = countChecked + 1 ;
}
}
return countChecked ;
2023-08-16 21:15:28 +02:00
}
2023-08-17 21:38:35 +02:00
const sitzInput = document . getElementById ( 'sitzInput' );
const sitzauswahl = document . getElementById ( 'sitzauswahl' );
sitzauswahl . style . display = 'none' ;
sitzInput . addEventListener ( 'focus' , () => {
sitzauswahl . style . display = 'block' ;
2023-08-16 21:15:28 +02:00
});
2023-08-17 21:38:35 +02:00
sitzInput . addEventListener ( 'blur' , () => {
2023-08-16 21:15:28 +02:00
setTimeout (() => {
2023-08-17 21:38:35 +02:00
sitzauswahl . style . display = 'none' ;
2023-08-16 21:15:28 +02:00
}, 100 ); // 1000 milliseconds = 1 second
});
2023-08-17 21:38:35 +02:00
// sitzauswahl.addEventListener('click', function(event) {
// setTimeout(() => {
// sitzInput.focus();
// sitzauswahl.style.display = 'block';
// console.log("exec")
// }, 150)
// })
2023-08-16 21:15:28 +02:00
</ script >
</ div >
2023-08-16 18:27:32 +02:00
</ section >
2023-08-16 21:42:03 +02:00
< div class = " push " ></ div >
2023-08-16 18:27:32 +02:00
</ div >
2023-08-16 21:15:28 +02:00
2023-08-16 18:19:50 +02:00
2023-08-16 18:26:11 +02:00
2023-08-16 18:19:50 +02:00
< footer class = " text-center " >
< div class = " container footer " >
< div class = " row " >
< table >
< tr >
< td class = " footer " >
< div class = " col-12 " >
< p >< span >< b > Impressum </ b ></ span >< br >
Silias KLG < br >
Toggenburgstrasse 31 < br >
8245 Feuerthalen < br >
< a href = " https://www.silias.ch " target = " _blank " > www . silias . ch </ a >< br >
< a href = " mailto:info@silias.ch " > info @ silias . ch </ a >< br >
2023-08-16 18:21:47 +02:00
< a href = " https://gitea.silias.ch/Silias-Public/Zefix_search " > Projekt Repository </ a >
2023-08-16 18:19:50 +02:00
</ div >
</ td >
< td class = " footer " >
< div class = " col-12 " >
< p >< span >< b > Datenquelle </ b ></ span >< br >
2023-08-16 18:26:11 +02:00
Zentraler Firmenindex < br >
2023-08-16 18:19:50 +02:00
Eidgenössisches Justiz - und Polizeidepartement ( EJPD ) < br >
Bundesamt für Justiz ( BJ ) < br >
2023-08-16 18:42:20 +02:00
Eidgenössisches Amt für das Handelsregister ( EHRA ) < br >
Bundesrain 20 < br >
3003 Bern < br >
2023-08-16 18:19:50 +02:00
< a href = " https://www.zefix.admin.ch " target = " _blank " > www . zefix . admin . ch </ a >< br >
2023-08-16 18:43:20 +02:00
< a href = " tel:+41584624197 " >+ 41 ( 0 ) 58 462 41 97 </ a >< br >
2023-08-16 18:42:20 +02:00
< a href = " zefix@bj.admin.ch " > zefix @ bj . admin . ch </ a >
2023-08-16 18:19:50 +02:00
</ p >
</ div >
</ td >
</ tr >
</ table >
</ div >
</ div >
</ footer >
2023-08-16 18:26:11 +02:00
</ body >
2023-08-16 18:19:50 +02:00
</ html >