From 4ee342d02036822aecb20f411014e5e69293ec44 Mon Sep 17 00:00:00 2001 From: Zeti_1223 <121749710+zeti1223@users.noreply.github.com> Date: Sat, 7 Feb 2026 18:48:13 +0100 Subject: [PATCH 1/2] valentine day --- public/valentin.html | 227 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 public/valentin.html diff --git a/public/valentin.html b/public/valentin.html new file mode 100644 index 0000000..38b080a --- /dev/null +++ b/public/valentin.html @@ -0,0 +1,227 @@ + + + + + + + Valentin Napi Fotózás + + + + + + + +
+ +
+

Ki vagy?

+
+ + +
+
+ + + + + + + \ No newline at end of file From d5fb3799ca2733735d3249c168fcdc13f701f20a Mon Sep 17 00:00:00 2001 From: Zeti_1223 <121749710+zeti1223@users.noreply.github.com> Date: Sat, 7 Feb 2026 19:23:20 +0100 Subject: [PATCH 2/2] Valentine's day --- public/Admin/index.html | 3 + public/Admin/valentin.html | 238 +++++++++++++++++++++++++++++++++++++ public/valentin.html | 45 ++++++- 3 files changed, 282 insertions(+), 4 deletions(-) create mode 100644 public/Admin/valentin.html diff --git a/public/Admin/index.html b/public/Admin/index.html index ee19ecc..8cdce48 100644 --- a/public/Admin/index.html +++ b/public/Admin/index.html @@ -106,6 +106,9 @@

Quiz

+ +

Valentin napi fotózás

+
Menu

Games

diff --git a/public/Admin/valentin.html b/public/Admin/valentin.html new file mode 100644 index 0000000..62c3077 --- /dev/null +++ b/public/Admin/valentin.html @@ -0,0 +1,238 @@ + + + + + + + Valentin Fotózás - Admin + + + + + +
+
+

Valentin Napi Fotózás - Admin Panel

+
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + +
+ Név + + Osztály + + Fotós + + Időpont + + Szerkesztés + + Elküldve + + Email + + Telefon +
+
+
+ + + + + + \ No newline at end of file diff --git a/public/valentin.html b/public/valentin.html index 38b080a..f6a21a4 100644 --- a/public/valentin.html +++ b/public/valentin.html @@ -69,8 +69,7 @@
Valentin napi fotózás
- +
school @@ -200,10 +199,48 @@
Valentin napi fotózás
document.getElementById('photo-form').addEventListener('submit', (e) => { e.preventDefault(); - const classId = document.getElementById('class_id').value; + let classId = document.getElementById('class_id').value; const name = document.getElementById('name').value; const email = document.getElementById('email').value; - const phone = document.getElementById('phone').value; + let phone = document.getElementById('phone').value; + + let cleanPhone = phone.replace(/\D/g, ''); + if (cleanPhone.startsWith('06')) { + cleanPhone = '36' + cleanPhone.substring(2); + } else if (cleanPhone.length === 9) { + cleanPhone = '36' + cleanPhone; + } + if (cleanPhone.length === 11 && cleanPhone.startsWith('36')) { + phone = `+${cleanPhone.substring(0, 2)} ${cleanPhone.substring(2, 4)} ${cleanPhone.substring(4, 7)} ${cleanPhone.substring(7)}`; + } + + const classNumMatch = classId.match(/\d+/); + const classLetterMatch = classId.match(/[a-zA-Z]/); + + if (!classNumMatch || !classLetterMatch) { + showToast('Hibás osztály formátum! (pl. 9. B)', 'error'); + return; + } + + const grade = parseInt(classNumMatch[0]); + const letter = classLetterMatch[0].toUpperCase(); + + if (grade < 5 || grade > 12) { + showToast('Az osztály 5 és 12 között lehet!', 'error'); + return; + } + + if (grade >= 5 && grade <= 8) { + if (letter !== 'E') { + showToast('5-8. osztályig csak E osztály lehet!', 'error'); + return; + } + } else if (!['A', 'B', 'C', 'D', 'E'].includes(letter)) { + showToast('9-12. osztályig A-E osztály lehet!', 'error'); + return; + } + + classId = `${grade}. ${letter}`; const newEntryRef = push(ref(db, 'valentine_photos')); set(newEntryRef, {