Admin Registration
+Create a new Admin or Superadmin account. This page should be deleted after use.
+ + + + +diff --git a/admin-registration.php b/admin-registration.php new file mode 100644 index 0000000..9485927 --- /dev/null +++ b/admin-registration.php @@ -0,0 +1,140 @@ +exec("CREATE TABLE IF NOT EXISTS admins ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL UNIQUE, + password VARCHAR(255) NOT NULL, + role ENUM('admin', 'superadmin') NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + )"); + + $name = $_POST['name']; + $email = $_POST['email']; + $password = password_hash($_POST['password'], PASSWORD_DEFAULT); + $role = $_POST['role']; + + // Check if email already exists + $stmt = $pdo->prepare("SELECT id FROM admins WHERE email = ?"); + $stmt->execute([$email]); + if ($stmt->fetch()) { + $message = '
Create a new Admin or Superadmin account. This page should be deleted after use.
+ + + + +Here you can manage the entire application, including admins, hospitals, doctors, and patients.
'; + break; + case 'admin': + $dashboardContent = 'Here you can manage hospitals, doctors, and patients.
'; + break; + case 'hospital': + $dashboardContent = ' +Here you can manage your hospital profile, treatments, and doctors.
+ + '; + break; + case 'doctor': + $db = db(); + $doctorId = $_SESSION['user_id']; + + // Fetch doctor's complete profile + $stmt = $db->prepare("SELECT d.full_name, d.email, d.specialty, d.qualifications, d.specialities, d.contact_phone, d.license_number, d.consultation_fee, d.availability, h.hospital_name, h.address, h.city, h.state, h.country FROM doctors d LEFT JOIN hospitals h ON d.hospital_id = h.id WHERE d.id = ?"); + $stmt->execute([$doctorId]); + $doctor = $stmt->fetch(PDO::FETCH_ASSOC); + + $profileInfo = 'Name: '.htmlspecialchars($doctor['full_name']).'
'; + $profileInfo .= 'Email: '.htmlspecialchars($doctor['email']).'
'; + $profileInfo .= 'Contact Phone: '.htmlspecialchars($doctor['contact_phone']).'
'; + $profileInfo .= 'Primary Specialty: '.htmlspecialchars($doctor['specialty']).'
'; + $profileInfo .= 'Additional Specialities: '.nl2br(htmlspecialchars($doctor['specialities'])).'
'; + $profileInfo .= 'Qualifications: '.nl2br(htmlspecialchars($doctor['qualifications'])).'
'; + $profileInfo .= 'License Number: '.htmlspecialchars($doctor['license_number']).'
'; + $profileInfo .= 'Consultation Fee: + case 'patient': + $dashboardContent = '
Here you can manage your profile, view your medical history, and book appointments.
'; + break; + default: + $dashboardContent = 'Welcome to your dashboard.
'; + break; +} + +?> + + + + + +Your role:
+Availability: '.nl2br(htmlspecialchars($doctor['availability'])).'
'; + } else { + $profileInfo .= 'Profile not found.
'; + } + $profileInfo .= ''.htmlspecialchars($doctor['hospital_name']).'
'; + $hospitalInfo .= ''.htmlspecialchars($doctor['address']).', '.htmlspecialchars($doctor['city']).', '.htmlspecialchars($doctor['state']).', '.htmlspecialchars($doctor['country']).'
'; + } else { + $hospitalInfo .= 'You are not currently affiliated with any hospital.
'; + } + $hospitalInfo .= 'No patient history found.
'; + } + $patientHistory .= 'Here you can manage your profile, view your medical history, and book appointments.
'; + break; + default: + $dashboardContent = 'Welcome to your dashboard.
'; + break; +} + +?> + + + + + +Your role:
+Primary Specialty:
+Qualifications:
+Additional Specialities:
+Contact Phone:
+Consultation Fee: $
+Availability:
+ + +, , ,
+ +Join our network of trusted medical professionals.
+ + +You have not added any doctors yet.
+ +| Name | +Specialty | +|
|---|---|---|
| + | + | + |
Register your hospital to be part of our exclusive network.
+ + +You have not added any treatment categories yet.
+ += ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-This page will update automatically as the plan is implemented.
-Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
Your one-stop platform for medical tourism. Connect with the best hospitals and doctors worldwide.
+ Explore Services +We are dedicated to connecting patients with world-class medical facilities and renowned doctors. Our platform simplifies the process of finding and booking medical treatments abroad, ensuring a seamless and stress-free experience.
+Search and compare top-rated hospitals from around the globe.
+Find experienced specialists and book consultations with ease.
+Coordinate your travel and accommodation seamlessly with our partners.
+Includes initial consultation, coronary angiography, and a 5-day hospital stay in a private room.
+$8,500
+ +Knee replacement surgery, including pre-op assessments, the procedure, and a 10-day rehabilitation stay.
+$12,300
+ +A complete package including a facelift, accommodation in a 5-star hotel, and all local transportation.
+$15,000
+ +"The platform made it so easy to find a great hospital for my procedure. The entire process was smooth and well-organized. Highly recommended!"
+ +