public function getMedic() { return MedicData::getById($this->medic_id); }
<?php if (count($_POST) > 0) { $user = MedicData::getById($_POST["user_id"]); $category_id = "NULL"; if ($_POST["category_id"] != "") { $category_id = $_POST["category_id"]; } $user->name = $_POST["name"]; $user->category_id = $category_id; $user->lastname = $_POST["lastname"]; $user->address = $_POST["address"]; $user->email = $_POST["email"]; $user->phone = $_POST["phone"]; $user->update(); print "<script>window.location='index.php?view=medics';</script>"; }
<?php $user = MedicData::getById($_GET["id"]); $categories = CategoryData::getAll(); ?> <div class="row"> <div class="col-md-12"> <h1>Editar Medico</h1> <br> <form class="form-horizontal" method="post" id="addproduct" action="index.php?view=updatemedic" role="form"> <div class="form-group"> <label for="inputEmail1" class="col-lg-2 control-label">Area*</label> <div class="col-md-6"> <select name="category_id" class="form-control"> <option value="">-- SELECCIONE --</option> <?php foreach ($categories as $cat) { ?> <option value="<?php echo $cat->id; ?> " <?php if ($user->category_id == $cat->id) { echo "selected"; } ?> ><?php echo $cat->name; ?>
<?php $pacient = MedicData::getById($_GET["id"]); ?> <div class="row"> <div class="col-md-12"> <div class="btn-group pull-right"> <!--<div class="btn-group pull-right"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-download"></i> Descargar <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="report/clients-word.php">Word 2007 (.docx)</a></li> </ul> </div> --> </div> <h1>Historial de Citas del Medico</h1> <h4>Medico: <?php echo $pacient->name . " " . $pacient->lastname; ?> </h4> <br> <?php $users = ReservationData::getAllByMedicId($_GET["id"]); if (count($users) > 0) { // si hay usuarios ?> <table class="table table-bordered table-hover"> <thead>