예제 #1
0
<?php

if (count($_POST) > 0) {
    $user = new MedicData();
    $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->add();
    print "<script>window.location='index.php?view=medics';</script>";
}
예제 #2
0
<?php

$pacients = PacientData::getAll();
$medics = MedicData::getAll();
?>

<div class="row">
<div class="col-md-10">
<h1>Nueva Cita</h1>
<form class="form-horizontal" role="form" method="post" action="./?action=addreservation">
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Asunto</label>
    <div class="col-lg-10">
      <input type="text" name="title" required class="form-control" id="inputEmail1" placeholder="Asunto">
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Paciente</label>
    <div class="col-lg-10">
<select name="pacient_id" class="form-control" required>
<option value="">-- SELECCIONE --</option>
  <?php 
foreach ($pacients as $p) {
    ?>
    <option value="<?php 
    echo $p->id;
    ?>
"><?php 
    echo $p->id . " - " . $p->name . " " . $p->lastname;
    ?>
</option>
예제 #3
0
 public function getMedic()
 {
     return MedicData::getById($this->medic_id);
 }
예제 #4
0
<?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;
    ?>
예제 #5
0
<?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>";
}
예제 #6
0
  </div>
  <div class="card-content table-responsive">

<div class="btn-group">
	<a href="index.php?view=newmedic" class="btn btn-default"><i class='fa fa-support'></i> Nuevo Medico</a>
<!--<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/medicss-word.php">Word 2007 (.docx)</a></li>
  </ul>
</div> -->
</div>
		<?php 
$users = MedicData::getAll();
if (count($users) > 0) {
    // si hay usuarios
    ?>

			<table class="table table-bordered table-hover">
			<thead>
			<th>Nombre completo</th>
			<th>Direccion</th>
			<th>Email</th>
			<th>Telefono</th>
			<th>Area</th>
			<th></th>
			</thead>
			<?php 
    foreach ($users as $user) {
예제 #7
0
<?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>