2
0

Compare commits

..

10 Commits

Author SHA1 Message Date
Daniel
cef321152a add stuff from 22-05-26 2026-05-22 08:15:56 +02:00
Daniel
94441419c6 set all day heading to H3, more 2026-05-22 07:50:42 +02:00
Daniel
c021ed345f fix typo, cisco packet... idk what changed 2026-05-22 07:47:37 +02:00
Daniel
a4eb5a0d23 remove old KA files 2026-05-22 07:45:00 +02:00
cwikladaniel
e25792cbb9 Task to JS + AJAX and PHP, code from 21-05-26 2026-05-21 10:31:08 +02:00
Daniel
ac5030828d add ospf routing 2026-05-21 09:02:21 +02:00
Daniel
c74ac5302f fix pull issues 2026-05-21 08:04:28 +02:00
Daniel
867726e29c remove old files, add CiscoPacketTracer Files (and RIP ROuting) 2026-05-21 08:03:19 +02:00
cwikladaniel
a7e5c71d86 delete moved files and add AJAX stuff from 20-5-26 2026-05-20 15:11:16 +02:00
cwikladaniel
b3afa9163b change folder structure for KA's 2026-05-20 15:00:22 +02:00
13 changed files with 231 additions and 23 deletions

View File

@@ -0,0 +1,9 @@
# Cisco Packet Tracer
> Sach aus LBTL2
Es wurde [dieser](https://www.netacad.com/cisco-packet-tracer) Packet Tracer genutzt

Binary file not shown.

View File

@@ -4,91 +4,105 @@
Wichtige Informationen Wichtige Informationen
- Wird eventuell nie aktuell sein. - Wird eventuell nie aktuell sein.
- Stundenplan - [Link](https://wvss-mannheim.webuntis.com/WebUntis/?school=wvss-mannheim#/basic/timetablePublic/class?entityId=2583) - Stundenplan - [Link](https://wvss-mannheim.webuntis.com/WebUntis/?school=wvss-mannheim#/basic/timetablePublic/class?entityId=2583)
- Ab 21-05-25 habe ich vor `.pkt` (Cisco Packet Tracer) Datein auch im Repo zu speichern.
## Ordner ## Ordner
- JavaScript - [./javascript](/Zweites%20Jahr/javascript/) - JavaScript - [./javascript](/Zweites%20Jahr/javascript/)
- Unterrichts Projekt - [./unterrichts_projekt](/Zweites%20Jahr/unterrichts_projekt/portal/register.php) (Register Seite) - Unterrichts Projekt - [./unterrichts_projekt](/Zweites%20Jahr/unterrichts_projekt/portal/register.php) (Register Seite)
- Cisco Packet Tracer - [./CISCO PACKET TRACER](/Zweites%20Jahr/CISCO%20PACKET%20TRACER/)
## 30-04-26 ## Was gemacht
> Möglicher weise nicht zu 100% akurat oder aktuell.
### 22-05-26 - PHP (Unterrichts Projekt)
- Register wiederholt
### 21-05-26 - CPT + PHP, JS und AJAX
- RIP routing datein hinzugefügt
- OSPRF hinzugefügt
- AB zu PHP, JS und AJAX
### 20-04-26 - JS + AJAX
- Einführung AJAX
- HTML Formular mit JavaScript
### 19-04-26 - PHP KA
- KA geschrieben ([Klassenarbeit](/Zweites%20Jahr/Klassenarbeit/LBT3/KA2/))
### 30-04-26
- Event Listener - Event Listener
## 29-04-26 - JS + PHP ### 29-04-26 - JS + PHP
- Login in PHP (unfertig) - Login in PHP (unfertig)
- Einstieg in JAVASCRIPT - Einstieg in JAVASCRIPT
## 27-03-26 - PHP (Unterrichts Projekt) ### 27-03-26 - PHP (Unterrichts Projekt)
- Registrierung weiter gemacht - Registrierung weiter gemacht
- Passwort checks - Passwort checks
- Passwort hashing - Passwort hashing
- Email checking - Email checking
## 25-03-26 - PHP (Unterrichts Projekt) ### 25-03-26 - PHP (Unterrichts Projekt)
- Registrierung gemacht - Registrierung gemacht
> Es wurden ebenfalls fehlende Datein hinzugefügt > Es wurden ebenfalls fehlende Datein hinzugefügt
## 05-03-26 - packet tracer ### 05-03-26 - packet tracer
- vlan in packet tracer - vlan in packet tracer
## 06-02-26 - SQL ### 06-02-26 - SQL
- DATE sachen in SQL - DATE sachen in SQL
## 05-02-26 - PHP (JSON, SQL) ### 05-02-26 - PHP (JSON, SQL)
- Aus PHP JSON Datei erstellen - Aus PHP JSON Datei erstellen
- In PHP SQL abfrage in JSON datei umwandeln - In PHP SQL abfrage in JSON datei umwandeln
## 04-02-26 - PHP (Kryptographie) ### 04-02-26 - PHP (Kryptographie)
- Caeser chiffere kontrolliert - Caeser chiffere kontrolliert
- Vigenere chieffre gemacht - Vigenere chieffre gemacht
## 03-02-26 - PHP (JSON) ### 03-02-26 - PHP (JSON)
- JSON in PHP (Datein derzeit nicht verfügbar da Pc nicht mehr zugägnlich) - JSON in PHP (Datein derzeit nicht verfügbar da Pc nicht mehr zugägnlich)
## 16-01-26 - PHP ### 16-01-26 - PHP
- Modulo - Modulo
## 14-01-26 - PHP ### 14-01-26 - PHP
- Kryptologie (LBT3) - Kryptologie (LBT3)
## 12-12-25 - PHP (SQL) ### 12-12-25 - PHP (SQL)
- Aufgabe von gester überarbeitet - Aufgabe von gester überarbeitet
- Unterrichts Projekt: - Unterrichts Projekt:
- Verschiedene wege um daten aus db anzuzeigen - Verschiedene wege um daten aus db anzuzeigen
- Form um user anzulegen - Form um user anzulegen
## 11-12-25 - PHP (XML) ### 11-12-25 - PHP (XML)
- XML aus PHP erstellt - XML aus PHP erstellt
- CSV Datei in XML Datei konvertiert - CSV Datei in XML Datei konvertiert
## 10-12-25 - PHP ### 10-12-25 - PHP
- Unterrichtsprojekt begonnen: - Unterrichtsprojekt begonnen:
- Verbindung zur Datenbank - Verbindung zur Datenbank
## 9-12-25 - PHP (SQL) ### 9-12-25 - PHP (SQL)
- Datenbank durch PHP erstellt und Daten hinzufügen - Datenbank durch PHP erstellt und Daten hinzufügen
### 21-11-25 - PHP ### 21-11-25 - PHP
- Aufgabe von gestern Kontroliert + Kommentare hinzugefügt - Aufgabe von gestern Kontroliert + Kommentare hinzugefügt
- XML von AP1 Aufgabe - XML von AP1 Aufgabe
### 20-11-25 - PHP ### 20-11-25 - PHP
- GETTER in PHP - GETTER in PHP
- Übung zu OOP - Übung zu OOP
### 19-11-25 - PHP ### 19-11-25 - PHP
- Übung Datei lesen/schreiben (Log Access) - Übung Datei lesen/schreiben (Log Access)
### 18-11-25 - PHP ### 18-11-25 - PHP
- Datein lesen CSV - Datein lesen CSV
### Davor ### Davor

View File

@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AJAX BEispiel 2</title>
</head>
<body>
<form>
<label>Mitarbeiter
<select id="selection" name="mitarbeiter">
<option>Bitte Auswählen</option>
<option value="0">Mortens</option>
<option value="1">Müller</option>
<option value="2">Meier</option>
<option value="3">Schulu</option>
</select>
</label>
</form>
<div id="output"></div>
<script>
// ajax
let xhr = new XMLHttpRequest();
window.addEventListener("load", function(){
document.getElementById("selection").addEventListener("change",auswahl);
});
function auswahl(){
xhr.open("get", "gehalt.json");
xhr.send();
xhr.onreadystatechange=function(){
if(xhr.readyState == 4 && xhr.status == 200){
let res = JSON.parse(xhr.responseText);
console.log(res);
let select = document.getElementById("selection").value;
console.log(select);
document.getElementById("output").innerHTML =
"Name: " +res[select].Name +
"<br>" +
"Gehalt: " + res[select].Gehalt + " EUR";
}
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,18 @@
[
{
"Name" : "Mertens",
"Gehalt" : 5694.34
},
{
"Name" : "Müller",
"Gehalt" : 4324.32
},
{
"Name" : "Meier",
"Gehalt" : 4444.55
},
{
"Name" : "Schulz",
"Gehalt" : 7777.77
}
]

View File

@@ -0,0 +1,47 @@
<?php
header('Content-Type: application/json; charset=utf-8');
// DB-Zugangsdaten (bitte anpassen)
$host = 'localhost';
$db = 'json';
$user = 'phpmyadmin';
$pass = 'server';
$charset = 'utf8mb4';
if (isset($_GET['qualifikation']) && !empty($_GET['qualifikation'])) {
$quali = $_GET['qualifikation'];
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
try {
// PDO-Verbindung aufbauen
$pdo = new PDO($dsn, $user, $pass, $options);
// SQL-Statement vorbereiten (Schutz vor SQL-Injection)
// HINWEIS: Tabellen- und Spaltennamen müssen dem importierten Dump entsprechen.
$stmt = $pdo->prepare(
'SELECT m.Name AS name, q.Qualifikation AS qualifikation
FROM mitarbeiter m
JOIN mitarbeiter_hat_qualifikation mhq ON m.idMitarbeiter = mhq.Mitarbeiter_idMitarbeiter
JOIN qualifikation q ON mhq.Qualifikation_idQualifikation = q.idQualifikation
WHERE qualifikation = ?');
$stmt->execute([$quali]);
$ergebnisse = $stmt->fetchAll();
// Als JSON an den Client senden
echo json_encode($ergebnisse);
} catch (\PDOException $e) {
// Im Fehlerfall leeres Array oder Fehlermeldung senden
echo json_encode(['error' => 'Datenbankfehler: ' . $e->getMessage()]);
}
} else {
echo json_encode([]);
}

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Mitarbeiter Qualifikation</title>
<style>
table { width: 50%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid #ccc; padding: 8px; text-align: left; }
th { background-color: #f4f4f4; }
</style>
</head>
<body>
<label for="qualiSelect">Qualifikation:</label>
<select id="qualiSelect" onchange="loadMitarbeiter(this.value)">
<option value="">- Bitte Auswählen -</option>
<option value="Java">Java</option>
<option value="HTML">HTML</option>
<option value="CSS">CSS</option>
<option value="RedisDB">RedisDB</option>
<option value="MySQL">MySQL</option>
</select>
<table id="resultTable" style="display:none;">
<thead>
<tr>
<th>Name</th>
<th>Qualifikation</th>
</tr>
</thead>
<tbody id="tableBody"></tbody>
</table>
<script>
function loadMitarbeiter(quali) {
if (!quali) {
document.getElementById('resultTable').style.display = 'none';
return;
}
// AJAX-Anfrage über GET senden
fetch(`backend.php?qualifikation=${encodeURIComponent(quali)}`)
.then(response => response.json())
.then(data => {
const tbody = document.getElementById('tableBody');
tbody.innerHTML = ''; // Alte Ergebnisse löschen
if(data.length > 0) {
data.forEach(mitarbeiter => {
const row = `<tr>
<td>${mitarbeiter.name}</td>
<td>${mitarbeiter.qualifikation}</td>
</tr>`;
tbody.innerHTML += row;
});
document.getElementById('resultTable').style.display = 'table';
} else {
tbody.innerHTML = '<tr><td colspan="2">Keine Mitarbeiter gefunden.</td></tr>';
document.getElementById('resultTable').style.display = 'table';
}
})
.catch(error => console.error('Fehler:', error));
}
</script>
</body>
</html>