Move the database logic to appointment_management
This commit is contained in:
@@ -21,13 +21,8 @@
|
||||
|
||||
$pdo = connectDatabase();
|
||||
?>
|
||||
<?php if($_SESSION["user_type"] == 2): ?>
|
||||
$user = finduser($pdo, $_SESSION["user"]);
|
||||
$events = fetchCalendarEvents($pdo, $user[0][4]);
|
||||
$holidays = fetchDoctorHolidays($pdo, $user[0][4]);
|
||||
$calendar_settings = fetchCalendarSettings($pdo, $user[0][4]);
|
||||
<?php else: ?>
|
||||
<form name="select_doctor" method="get">
|
||||
<?php if($_SESSION["user_type"] == 1): ?>
|
||||
<form name="select_doctor" method="post" action="appointment_management.php">
|
||||
<?php $doctors = listDoctors($pdo); ?>
|
||||
<div class="input-group">
|
||||
<select id="medico" name="medico">
|
||||
@@ -38,11 +33,6 @@
|
||||
</select>
|
||||
<button class="create_btn" type="submit" name="select">Seleccionar</button>
|
||||
</div>
|
||||
<?php
|
||||
$events = fetchCalendarEvents($pdo, $_GET["medico"]);
|
||||
$holidays = fetchDoctorHolidays($pdo, $_GET["medico"]);
|
||||
$calendar_settings = fetchCalendarSettings($pdo, $_GET["medico"]);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?php closeDatabase($pdo); ?>
|
||||
<div class="response"></div>
|
||||
|
||||
Reference in New Issue
Block a user