diff --git a/96_Quantum Leapers/admin.html b/96_Quantum Leapers/admin.html new file mode 100644 index 00000000..02e47294 --- /dev/null +++ b/96_Quantum Leapers/admin.html @@ -0,0 +1,81 @@ + + + + + + Admin Panel - Tutor Management + + + + + + +
+
+

Tutor Management Admin Panel

+ +
+

Admin Login

+ +
+ + + + 🔙 Back +

+
+
+
+ + + + + \ No newline at end of file diff --git a/96_Quantum Leapers/admin.js b/96_Quantum Leapers/admin.js new file mode 100644 index 00000000..c003a82a --- /dev/null +++ b/96_Quantum Leapers/admin.js @@ -0,0 +1,92 @@ +document.addEventListener("DOMContentLoaded", () => { + checkAdmin(); +}); + +function adminLogin() { + const username = document.getElementById("username").value; + const password = document.getElementById("password").value; + + if (username === "admin" && password === "password") { + alert("Admin Logged in Successfully"); + window.location.href = "adminPanel.html"; + } else { + alert("Incorrect Password"); + } +} + +function checkAdmin() { + fetch("http://localhost:5000/check-admin", { credentials: "include" }) + .then((res) => res.json()) + .then((data) => { + if (data.loggedIn) { + document.getElementById("login-section").classList.add("d-none"); + document.getElementById("admin-panel").classList.remove("d-none"); + loadTutors(); + } + }) + .catch((error) => console.error("Error checking admin session:", error)); +} + +function loadTutors() { + fetch("http://localhost:5000/tutors-pending", { credentials: "include" }) + .then((res) => res.json()) + .then((tutors) => { + let html = ""; + tutors.forEach((tutor) => { + html += ` + ${tutor.name} + ${tutor.subjects} + + + + + `; + }); + document.getElementById("pending-tutors").innerHTML = html; + }); + + fetch("http://localhost:5000/tutors", { credentials: "include" }) + .then((res) => res.json()) + .then((tutors) => { + let html = ""; + tutors.forEach((tutor) => { + html += ` + ${tutor.name} + ${tutor.subjects} + `; + }); + document.getElementById("verified-tutors").innerHTML = html; + }); +} + +function verifyTutor(id) { + fetch(`http://localhost:5000/verify/${id}`, { + method: "POST", + credentials: "include", + }) + .then((res) => res.json()) + .then(() => loadTutors()) + .catch((error) => console.error("Error verifying tutor:", error)); +} + +function deleteTutor(id) { + fetch(`http://localhost:5000/delete/${id}`, { + method: "DELETE", + credentials: "include", + }) + .then((res) => res.json()) + .then(() => loadTutors()) + .catch((error) => console.error("Error deleting tutor:", error)); +} + +function logout() { + fetch("http://localhost:5000/logout", { + method: "POST", + credentials: "include", + }) + .then(() => { + document.getElementById("login-section").classList.remove("d-none"); + document.getElementById("admin-panel").classList.add("d-none"); + }) + .catch((error) => console.error("Error logging out:", error)); +} diff --git a/96_Quantum Leapers/adminPanel.html b/96_Quantum Leapers/adminPanel.html new file mode 100644 index 00000000..42e3889c --- /dev/null +++ b/96_Quantum Leapers/adminPanel.html @@ -0,0 +1,106 @@ + + + + + + Admin Panel + + + +
+

Pending Tutor Approvals

+
+ + + + + + + + + + + + + + + +
NameSubjectsActions
Jha SirMath, Science + + +
+
+ +

Verified Tutors

+
+ + + + + + + + +
NameSubjects
+
+
+ + 🔙 Back + + + + + + + \ No newline at end of file diff --git a/96_Quantum Leapers/index.html b/96_Quantum Leapers/index.html new file mode 100644 index 00000000..15cf4aba --- /dev/null +++ b/96_Quantum Leapers/index.html @@ -0,0 +1,53 @@ + + + + + + Tutor Quest + + + + + +
+

Welcome to Tutor Quest

+

Select your role to proceed:

+
+ Login as Student + Login as Teacher + Login as Admin +
+
+ + + + + \ No newline at end of file diff --git a/96_Quantum Leapers/script.js b/96_Quantum Leapers/script.js new file mode 100644 index 00000000..7832f5ac --- /dev/null +++ b/96_Quantum Leapers/script.js @@ -0,0 +1,165 @@ +var map = L.map('map').setView([28.3720518, 77.3321204], 15); + +L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: '© OpenStreetMap contributors' +}).addTo(map); + +var marker = L.marker([28.3720518, 77.3321204]).addTo(map) + .bindPopup("Default Location: Faridabad") + .openPopup(); + +function getCurrentLocation() { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition( + (position) => { + let lat = position.coords.latitude; + let lon = position.coords.longitude; + + document.getElementById("location").value = `${lat}, ${lon}`; + + map.setView([lat, lon], 14); + marker.setLatLng([lat, lon]).bindPopup("You are here!").openPopup(); + }, + (error) => { + alert("Could not fetch location. Please enter manually."); + console.error("Error getting location:", error); + } + ); + } else { + alert("Geolocation is not supported by this browser."); + } +} + +function submitTeacherInfo() { + let formData = new FormData(document.getElementById("teacher-form")); + + fetch("http://localhost:5000/register", { + method: "POST", + body: formData + }) + .then(response => response.json()) + .then(data => alert(data.message)) + .catch(error => console.error("Error:", error)); +} + +function findTutors() { + let locationInput = document.getElementById("location").value.trim(); + let preferredTime = document.getElementById("preferred-time").value; + let tutorList = document.getElementById("tutor-list"); + + if (!locationInput) { + alert("Please enter your location to find tutors!"); + tutorList.style.display = "none"; + return; + } + + tutorList.style.display = "block"; + + let tutors = [ + { + name: "Ms. Rema Sharma", + photo: "teacher1.jpeg", + experience: "5 years", + subjects: "Math, Physics", + location: "1119 Sector 9, Faridabad", + mapLink: "https://maps.app.goo.gl/8AneUtqsP5vkHMQ37", + contact: "mailto:emily@example.com", + rating: 4.5, + reviews: 12, + verified: true, + moreInfoLink: "teacher1.html" + }, + { + name: "Ms. Shalu Pandey", + photo: "teacher2.jpg", + experience: "7 years", + subjects: "Python", + location: "1856 Sector 9, Faridabad", + mapLink: "https://maps.app.goo.gl/zkzXtVfeWQAh1juG6", + contact: "mailto:james@example.com", + rating: 4.8, + reviews: 20, + verified: false, + moreInfoLink: "teacher2.html" + } + ]; + + let filterSubject = document.getElementById("subject-filter")?.value.toLowerCase(); + let filteredTutors = tutors.filter((tutor) => + tutor.subjects.toLowerCase().includes(filterSubject || "") + ); + + if (filteredTutors.length === 0) { + tutorList.innerHTML = "

No tutors found for this subject.

"; + return; + } + + tutorList.innerHTML = + "

Nearby Tutors:

" + + filteredTutors + .map( + (tutor) => ` +
+
+
+ ${tutor.name} +

${tutor.name} ${tutor.verified ? '✔️' : ''}

+
+
+

Experience: ${tutor.experience}

+

Subjects: ${tutor.subjects}

+

Location: ${tutor.location}

+

Rating: ⭐${tutor.rating} (${tutor.reviews} reviews)

+ + +
+
+ +
+ ` + ) + .join(""); +} + +function processPayment(tutorName) { + alert(`Redirecting to payment gateway for ${tutorName}...`); +} + +function approveTutor(button) { + const row = button.parentElement.parentElement; + const name = row.cells[0].textContent; + const subjects = row.cells[1].textContent; + + document.getElementById("verified-tutors").innerHTML += ` + + ${name} + ${subjects} + + `; + row.remove(); +} + +function ignoreTutor(button) { + const row = button.parentElement.parentElement; + row.remove(); +} + +function logout() { + alert("Logged out"); +} + +function goBack() { + window.history.back(); +} + + +function previewPhoto(event) { + const reader = new FileReader(); + reader.onload = function () { + const img = document.getElementById("preview-img"); + img.src = reader.result; + img.style.width = "150px"; + img.style.height = "150px"; + }; + reader.readAsDataURL(event.target.files[0]); +} \ No newline at end of file diff --git a/96_Quantum Leapers/student.html b/96_Quantum Leapers/student.html new file mode 100644 index 00000000..e0ac2890 --- /dev/null +++ b/96_Quantum Leapers/student.html @@ -0,0 +1,95 @@ + + + + + + + + + Find Tutors + + + + + + +
+

Find Nearby Tutors

+ + + +
+ + + +
+ + + +
+ + + +
+ + + + +
+ + + + + + + + + 🔙 Back +
+ + + + + \ No newline at end of file diff --git a/96_Quantum Leapers/styles.css b/96_Quantum Leapers/styles.css new file mode 100644 index 00000000..9072d62a --- /dev/null +++ b/96_Quantum Leapers/styles.css @@ -0,0 +1,410 @@ +body { + font-family: 'Poppins', sans-serif; + background: linear-gradient(to right, #9417E2, #D7A1F9); + text-align: center; + display: flex; + justify-content: center; + align-items: center; + margin: 0; + flex-direction: column; + transition: background 0.3s, color 0.3s; +} + +.dark-mode { + background: linear-gradient(to right, #000000, #51087E); + color: white; +} + +.container { + align-items: center; + background: white; + padding: 30px; + border-radius: 10px; + box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2); + width: 90%; + max-width: 700px; + transition: background 0.3s, color 0.3s; +} + +.dark-mode .container { + background: #394755; + color: white; +} + +.title { + font-size: 24px; + font-weight: bold; + margin-bottom: 10px; +} + +.subtitle { + font-size: 16px; + color: #666; + margin-bottom: 20px; +} + +.btn.toggle { + position: absolute; + top: 15px; + right: 15px; + background: #4dd84fe4; + padding: 10px 15px; + border-radius: 5px; + font-size: 14px; + cursor: pointer; + border: none; + transition: background 0.3s, transform 0.2s; +} + +.btn.toggle:hover { + background: #128400; + transform: scale(1.05); +} + +.btn { + display: inline-block; + padding: 10px 15px; + background: #4dd84fe4; + color: white; + text-decoration: none; + border-radius: 5px; + font-size: 16px; + transition: background 0.3s, transform 0.2s; + cursor: pointer; + border: none; +} + +.btn:hover { + background: #128400; + transform: scale(1.05); +} + +.btn.back { + background: #4483ba; +} + +.btn.back:hover { + background: #003162; +} + +.dark-mode .input { + background: #333; + color: white; + border: 1px solid #555; +} + +.tutor-list { + margin-top: 20px; +} + +.tutor-card { + background: #fff; + padding: 15px; + margin: 10px auto; + border-radius: 8px; + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); + text-align: left; + width: 100%; + max-width: 800px; + transition: transform 0.3s, box-shadow 0.3s; +} + +.tutor-card:hover { + transform: scale(1.02); + box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15); +} + +.dark-mode .tutor-card { + background: #2a2a2a; +} + +.tutor-info { + display: flex; + align-items: center; + flex-wrap: wrap; +} + +.tutor-photo img { + width: 100px; + height: 100px; + border-radius: 50%; + display: block; + margin-bottom: 5px; +} + +.tutor-details { + flex-grow: 1; + min-width: 200px; +} + +.dark-mode button { + background: linear-gradient(135deg, #007bff, #0056b3); + color: white; +} + +.dark-mode li { + background: #444; +} + +.dark-mode .progress-bar { + background: linear-gradient(135deg, #007bff, #0056b3); +} + +@media (max-width: 768px) { + .tutor-info { + flex-direction: column; + text-align: center; + } + + .tutor-photo { + margin-bottom: 10px; + } + + .btn.toggle { + top: 10px; + right: 10px; + font-size: 12px; + } +} + +.teacher-profile { + text-align: center; + max-width: 700px; +} + +.profile-photo img { + width: 150px; + height: 150px; + border-radius: 50%; + margin-bottom: 10px; + border: 3px solid #007BFF; +} + +.teacher-name { + font-size: 24px; + font-weight: bold; + margin-bottom: 10px; +} + +.teacher-info { + text-align: left; +} + +.teacher-info h3 { + color: #007BFF; + margin-top: 15px; +} + +.teacher-info ul { + list-style-type: none; + padding: 0; +} + +.teacher-info ul li { + background: #f8f9fa; + padding: 8px; + margin: 5px 0; + border-radius: 5px; +} + +.dark-mode .teacher-info ul li { + background: #444; +} + +.tutor-card { + background: #fff; + padding: 15px; + margin: 10px auto; + border-radius: 8px; + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); + text-align: left; + width: 100%; + max-width: 600px; + transition: transform 0.3s, box-shadow 0.3s; +} + +.tutor-card:hover { + transform: scale(1.02); + box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15); +} + +.tutor-info { + display: flex; + align-items: center; + flex-wrap: wrap; +} + +.tutor-photo img { + width: 80px; + height: 80px; + border-radius: 50%; + display: block; + margin-right: 15px; +} + +.tutor-details { + flex-grow: 1; + min-width: 200px; +} + +.dark-mode .tutor-card { + background: #333; + color: white; +} + +.dark-mode .tutor-card a { + color: #74ebd5; +} +.photo-preview { + text-align: center; + margin-bottom: 15px; +} + +.photo-preview img { + width: 150px; + height: 150px; + object-fit: cover; + border-radius: 50%; + border: 3px solid #007bff; + display: block; + margin: 0 auto; + max-width: 100%; + max-height: 150px; +} +#admin-panel, #login-section { + display: block; + opacity: 1; +} + +.form-card { + width: 600px; + height: 400px; + overflow-y: auto; + background: white; + padding: 20px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + margin: auto; + text-align: center; +} + +.table-container { + max-height: 200px; + overflow-y: auto; +} + +@media (max-width: 768px) { + .form-card { + width: 90%; + height: auto; + } +} +table { + width: 100%; + border-collapse: collapse; +} +th, td { + padding: 10px; + border: 1px solid #ddd; +} +th { + background: #333; + color: white; +} +.btn { + padding: 10px 15px; + border: none; + cursor: pointer; + border-radius: 5px; + margin: 5px; + transition: background 0.3s; +} +.approve-btn { + background: #2ecc71; + color: white; +} + +.approve-btn:hover { + background: #27ae60; +} +.ignore-btn { + background: #e74c3c; + color: white; +} +.ignore-btn:hover { + background: #c0392b; +} +.back-btn { + background: #3498db; + color: white; +} +.back-btn:hover { + background: #2980b9; +} +.dark-mode { + background: #1e1e1e; + color: white; +} +.dark-mode .form-card { + background: #2a2a2a; + color: white; + box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1); +} +.dark-mode th { + background: #444; +} +.dark-mode .btn { + color: white; +} + +.video-container { + text-align: center; + margin: 20px 0; +} + +.video-container iframe { + width: 100%; + max-width: 560px; + height: 315px; + border-radius: 10px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); +} + +.reviews { + margin-top: 15px; +} + +.review { + background: #f9f9f9; + padding: 10px; + border-radius: 8px; + margin: 10px 0; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); +} + +.dark-mode { + background-color: #121212; + color: #ffffff; +} + +.dark-mode .review { + background: #1e1e1e; + color: #ffffff; + box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1); +} + +.btn.toggle { + position: fixed; + top: 10px; + right: 10px; + padding: 8px 12px; + background: #444; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; +} + +.btn.toggle:hover { + background: #666; +} diff --git a/96_Quantum Leapers/teacher.html b/96_Quantum Leapers/teacher.html new file mode 100644 index 00000000..6a0e8890 --- /dev/null +++ b/96_Quantum Leapers/teacher.html @@ -0,0 +1,142 @@ + + + + + + Teacher Registration + + + + + + +
+
+

Teacher Registration

+ +
+ Profile Preview +
+ +
+ + + + + + + + + + + + + + + + + + + + + +

Verification Documents

+ + + + + + + + + +
+ Verification Status: Pending +
+ + + 🔙 Back +
+
+
+ + + + + + \ No newline at end of file diff --git a/96_Quantum Leapers/teacher1.html b/96_Quantum Leapers/teacher1.html new file mode 100644 index 00000000..b276b443 --- /dev/null +++ b/96_Quantum Leapers/teacher1.html @@ -0,0 +1,97 @@ + + + + + + Teacher 1 Profile + + + + + +
+
+ Teacher 1 +
+

Ms. Rema Sharma

+ +
+

🎓 Education History

+

Bachelor's in Mathematics - Manav Rachna University

+

Master's in Education - K.R. Mangalam University

+ +

⭐ Plus Points

+ + +

📚 Subjects & Topics

+ + + +

🎥 Demo Teaching Video

+
+ +
+ + +

🌟 Student Reviews & Ratings

+
+
+

Arjun S. ⭐⭐⭐⭐⭐

+

"Ms. Rema is an amazing teacher! She explains everything so well."

+
+
+

Priya K. ⭐⭐⭐⭐

+

"Her classes are interactive and very helpful."

+
+
+

Rahul M. ⭐⭐⭐⭐⭐

+

"One of the best tutors I have ever learned from. Highly recommended!"

+
+
+
+ + 🔙 Back +
+ + + + + \ No newline at end of file diff --git a/96_Quantum Leapers/teacher1.jpeg b/96_Quantum Leapers/teacher1.jpeg new file mode 100644 index 00000000..bea364ce Binary files /dev/null and b/96_Quantum Leapers/teacher1.jpeg differ diff --git a/96_Quantum Leapers/teacher2.html b/96_Quantum Leapers/teacher2.html new file mode 100644 index 00000000..a3392545 --- /dev/null +++ b/96_Quantum Leapers/teacher2.html @@ -0,0 +1,94 @@ + + + + + + Teacher 2 Profile + + + + + +
+
+ Teacher 2 +
+

Ms. Shalu Pandey

+ +
+

🎓 Education History

+

Bachelor's in Computer Science - Delhi University

+

Master's in Education - Jawaharlal Nehru University

+ +

⭐ Plus Points

+ + +

📚 Subjects & Topics

+ + +

🎥 Demo Teaching Video

+
+ +
+ +

🌟 Student Reviews & Ratings

+
+
+

Sneha R. ⭐⭐⭐⭐⭐

+

"Ms. Shalu's classes are super interactive and engaging. Love the way she explains everything!"

+
+
+

Vikram T. ⭐⭐⭐⭐

+

"Her python lessons are very effective and easy to understand."

+
+
+

Neha M. ⭐⭐⭐⭐⭐

+

"I gained so much information in programing languages because of her. Highly recommended!"

+
+
+
+ + 🔙 Back +
+ + + + + diff --git a/96_Quantum Leapers/teacher2.jpg b/96_Quantum Leapers/teacher2.jpg new file mode 100644 index 00000000..d8485009 Binary files /dev/null and b/96_Quantum Leapers/teacher2.jpg differ