2020-06-18 14:48:12 +02:00
|
|
|
<?php session_start(); ?>
|
2020-06-18 10:35:01 +02:00
|
|
|
<html class="no-js" lang="es">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
|
|
<title>Gestión de citas</title>
|
|
|
|
<meta name="description" content="">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2020-06-23 01:04:59 +02:00
|
|
|
<link rel="stylesheet" href="static/style.css" type="text/css" media="screen"/>
|
|
|
|
<link rel="stylesheet" href="static/fullcalendar.css" type="text/css" media="screen"/>
|
2020-06-26 12:19:51 +02:00
|
|
|
<link rel="stylesheet" href="static/jquery-ui.css" type="text/css" media="screen"/>
|
2020-06-21 19:36:38 +02:00
|
|
|
<script src="static/jquery-3.5.1.min.js"></script>
|
2020-06-23 01:04:59 +02:00
|
|
|
<script src="static/jquery-ui.min.js"></script>
|
|
|
|
<script src="static/moment.min.js"></script>
|
|
|
|
<script src="static/fullcalendar.min.js"></script>
|
2020-06-18 10:35:01 +02:00
|
|
|
<script src="calendar.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2020-06-21 21:40:25 +02:00
|
|
|
<?php include 'navbar.php'; ?>
|
2020-06-21 20:38:22 +02:00
|
|
|
<?php
|
|
|
|
include 'database.php';
|
|
|
|
|
2020-06-25 17:59:56 +02:00
|
|
|
$pdo = connectDatabase();
|
2020-06-26 12:19:51 +02:00
|
|
|
$list = listPatients($pdo);
|
|
|
|
$calendar_settings = fetchCalendarSettings($pdo, $doctor);
|
2020-06-21 20:38:22 +02:00
|
|
|
?>
|
2020-06-25 21:15:52 +02:00
|
|
|
<?php if($_SESSION["user_type"] == 1): ?>
|
|
|
|
<form name="select_doctor" method="post" action="appointment_management.php">
|
2020-06-25 20:01:41 +02:00
|
|
|
<?php $doctors = listDoctors($pdo); ?>
|
|
|
|
<div class="input-group">
|
|
|
|
<select id="medico" name="medico">
|
|
|
|
<option>Seleccione un médico</option>
|
|
|
|
<?php foreach ($doctors as $row) : ?>
|
|
|
|
<option value="<?php echo $row[0]; ?>"><?php echo $row[1]; ?></option>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</select>
|
|
|
|
<button class="create_btn" type="submit" name="select">Seleccionar</button>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php closeDatabase($pdo); ?>
|
2020-06-26 12:19:51 +02:00
|
|
|
<div id="dialog-form" title="Añadir cita">
|
|
|
|
<form>
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="hora">Hora</label>
|
|
|
|
<input type="time" name="hora" value="">
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="duracion">Duración</label>
|
|
|
|
<input type="number" name="duracion" value="<?php echo $calendar_settings[8]; ?>" step="30">
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="observaciones">Observaciones</label>
|
|
|
|
<input type="text" name="observaciones" value="">
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<select id="paciente" name="paciente">
|
|
|
|
<option>Seleccione un paciente</option>
|
|
|
|
<?php foreach ($patients as $row) : ?>
|
|
|
|
<option value="<?php echo $row[0]; ?>"><?php echo $row[1]; ?></option>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<button class="create_btn" type="submit" name="crear" >Añadir cita</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-06-18 15:59:21 +02:00
|
|
|
<div class="response"></div>
|
2020-06-23 01:04:59 +02:00
|
|
|
<div id="calendar"></div>
|
2020-06-18 10:35:01 +02:00
|
|
|
</body>
|
|
|
|
</html>
|