<?php include('meta.php') ?>
<?php $bg_header = "bg_hc"; include('header.php') ?>
	<div id="box_body"><!-- body center -->


<br /><br /><br /><br />
<img src="graph.php?id=1093" alt="" border="0">


<?php 
$result = mysqli_query($con,"SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'losrobles_app_hc'  AND TABLE_NAME = 'se_evenement'");  
$row = mysqli_fetch_row($result); 
// Values received via ajax
$url = "view_event.php?id=".$row[0];
echo $url;
echo "<br><br>";
$fecha = date('Y-m-j H:i:s'); //inicializo la fecha con la hora
$nuevafecha = strtotime ( '+0 hour' , strtotime ( $fecha ) ) ;
$nuevafecha = strtotime ( '+60 minute' , $nuevafecha ) ; // utilizo "nuevafecha"
$nuevafecha = strtotime ( '+0 second' , $nuevafecha ) ; // utilizo "nuevafecha"
$nuevafecha = date ( 'Y-m-j H:i:s' , $nuevafecha );
echo "$fecha (Fecha Inicial)<br>";
echo "";
echo "$nuevafecha (Fecha con Suma)<br>";
$id = 1089;

echo "<br><br>";
?>


<span class="big_title">H.C y Controles</span><div id="line"></div><br>
        Ultimos H.C. agregadas:<br>
        <?php
        date_default_timezone_set('America/Bogota');
        $last_visit = date("Y-m-d H:i:s");
        echo $last_visit;
          $result = mysqli_query($con,"SELECT id,name,cc,age,proceso,last_visit FROM hc_paciente ORDER BY last_visit DESC LIMIT 10");  
        /*  $result = mysqli_query($con,"SELECT id,name,cc,age FROM hc_paciente  ORDER BY id DESC LIMIT 10");  */
          echo "<table class='table table-hover'> \n"; 
          echo "
          <thead>
            <tr>
            <th style='width:250px;'>Nombre</th>
            <th style='width:150px;'>Cedula</th>
            <th style='width:80px;'>Edad </th>
            <th>Ultimo Registro </th>
            <th> </th>
            </tr>
          </thead>
          <tbody> \n"; 
          while ($row = mysqli_fetch_row($result))
          { 
          echo "<tr> 
              <td class='last10_1'><strong>$row[1]</strong></td>
                  <td class='last10_1'>$row[2]</td>
                  <td class='last10_1'>$row[3] años</td>
                  <td class='last10_1'>$row[4]</td>
                  <td><a class='btn btn-info btn-sm' href='result.php?id=$row[0]'><span class='glyphicon glyphicon-search '> Ver</span></a>
                  </td>
                </tr>";
          };
          echo " \n"; 
          echo " </tbody></table> \n"; 
        ?><div align="right"><a href="allpatient.php" class="btn btn-info btn-xs" style="padding: 8px 8px 8px 15px;"><span class="glyphicon glyphicon-list-alt "> </span>   Ver todos los registros</a></div>




<div id="control1" style="display: none">
<?php
  if (isset($control1_number)) {
    $x= 1;
    $date_control = $control1_id['date_control'];
    $ct_cetonica = $control1_id['ct_cetonica'];
    $ct_peso = $control1_id['ct_peso'];
    $ct_porc_agua = $control1_id['ct_porc_agua'];
    $ct_abdomen_alto = $control1_id['ct_abdomen_alto'];
    $ct_pierna_right = $control1_id['ct_pierna_right'];
    $ct_brazo_right = $control1_id['ct_brazo_right'];
    $ct_imc = $control1_id['ct_imc'];
    $ct_exa_ta = $control1_id['ct_exa_ta'];
    $positivo = $control1_id['positivo'];
    $peso_actual = $control1_id['peso_actual'];
    $ct_porc_masamuscular = $control1_id['ct_porc_masamuscular'];
    $ct_abdomen_medio = $control1_id['ct_abdomen_medio'];
    $ct_pierna_left = $control1_id['ct_pierna_left'];
    $ct_brazo_left = $control1_id['ct_brazo_left'];
    $ct_porc_grasa = $control1_id['ct_porc_grasa'];
    $ct_exa_fc = $control1_id['ct_exa_fc'];
    $negativo = $control1_id['negativo'];
    $porc_redu = $control1_id['porc_redu'];
    $ct_porc_masaosea = $control1_id['ct_porc_masaosea'];
    $ct_abdomen_bajo = $control1_id['ct_abdomen_bajo'];
    $ct_exa_fr = $control1_id['ct_exa_fr'];
    $ct_obser = $control1_id['obser'];
    $ct_pres = $control1_id['pres'];
    $hc_creado = $control1_id['hc_creado'];
    include("controlx.php");
  }
?>
</div>
<div id="control2" style="display: none">
<?php
  if (isset($control2_number)) {
    $x= 2;
    $date_control = $control2_id['date_control'];
    $ct_cetonica  = $control2_id['ct_cetonica'];  
    $ct_peso  = $control2_id['ct_peso'];  
    $ct_porc_agua  = $control2_id['ct_porc_agua']; 
    $ct_abdomen_alto  = $control2_id['ct_abdomen_alto'];  
    $ct_pierna_right  = $control2_id['ct_pierna_right'];  
    $ct_brazo_right   = $control2_id['ct_brazo_right'];  
    $ct_imc   = $control2_id['ct_imc'];  
    $ct_exa_ta  = $control2_id['ct_exa_ta'];  
    $positivo   = $control2_id['positivo'];  
    $peso_actual  = $control2_id['peso_actual'];  
    $ct_porc_masamuscular   = $control2_id['ct_porc_masamuscular'];  
    $ct_abdomen_medio   = $control2_id['ct_abdomen_medio'];  
    $ct_pierna_left   = $control2_id['ct_pierna_left'];  
    $ct_brazo_left  = $control2_id['ct_brazo_left'];  
    $ct_porc_grasa  = $control2_id['ct_porc_grasa'];  
    $ct_exa_fc  = $control2_id['ct_exa_fc'];  
    $negativo   = $control2_id['negativo'];  
    $porc_redu  = $control2_id['porc_redu']; 
    $ct_porc_masaosea   = $control2_id['ct_porc_masaosea'];  
    $ct_abdomen_bajo  = $control2_id['ct_abdomen_bajo'];  
    $ct_exa_fr  = $control2_id['ct_exa_fr']; 
    $ct_obser = $control2_id['obser'];
    $ct_pres = $control2_id['pres']; 
    $hc_creado = $control2_id['hc_creado'];
    include("controlx.php");
  }
?>
</div>
<div id="control3" style="display: none">
<?php
  if (isset($control3_number)) {
      $x= 3;
      $date_control = $control3_id['date_control'];
      $ct_cetonica = $control3_id['ct_cetonica'];
      $ct_peso = $control3_id['ct_peso'];
      $ct_porc_agua = $control3_id['ct_porc_agua'];
      $ct_abdomen_alto = $control3_id['ct_abdomen_alto'];
      $ct_pierna_right = $control3_id['ct_pierna_right'];
      $ct_brazo_right = $control3_id['ct_brazo_right'];
      $ct_imc = $control3_id['ct_imc'];
      $ct_exa_ta = $control3_id['ct_exa_ta'];
      $positivo = $control3_id['positivo'];
      $peso_actual = $control3_id['peso_actual'];
      $ct_porc_masamuscular = $control3_id['ct_porc_masamuscular'];
      $ct_abdomen_medio = $control3_id['ct_abdomen_medio'];
      $ct_pierna_left = $control3_id['ct_pierna_left'];
      $ct_brazo_left = $control3_id['ct_brazo_left'];
      $ct_porc_grasa = $control3_id['ct_porc_grasa'];
      $ct_exa_fc = $control3_id['ct_exa_fc'];
      $negativo = $control3_id['negativo'];
      $porc_redu = $control3_id['porc_redu'];
      $ct_porc_masaosea = $control3_id['ct_porc_masaosea'];
      $ct_abdomen_bajo = $control3_id['ct_abdomen_bajo'];
      $ct_exa_fr = $control3_id['ct_exa_fr'];
      $ct_obser = $control3_id['obser'];
      $ct_pres = $control3_id['pres'];
      $hc_creado = $control3_id['hc_creado'];
      include("controlx.php");
  }
?>
</div>
<div id="control4" style="display: none">
<?php
  if (isset($control4_number)) {
      $x= 4;
      $date_control = $control4_id['date_control'];
      $ct_cetonica = $control4_id['ct_cetonica'];
      $ct_peso = $control4_id['ct_peso'];
      $ct_porc_agua = $control4_id['ct_porc_agua'];
      $ct_abdomen_alto = $control4_id['ct_abdomen_alto'];
      $ct_pierna_right = $control4_id['ct_pierna_right'];
      $ct_brazo_right = $control4_id['ct_brazo_right'];
      $ct_imc = $control4_id['ct_imc'];
      $ct_exa_ta = $control4_id['ct_exa_ta'];
      $positivo = $control4_id['positivo'];
      $peso_actual = $control4_id['peso_actual'];
      $ct_porc_masamuscular = $control4_id['ct_porc_masamuscular'];
      $ct_abdomen_medio = $control4_id['ct_abdomen_medio'];
      $ct_pierna_left = $control4_id['ct_pierna_left'];
      $ct_brazo_left = $control4_id['ct_brazo_left'];
      $ct_porc_grasa = $control4_id['ct_porc_grasa'];
      $ct_exa_fc = $control4_id['ct_exa_fc'];
      $negativo = $control4_id['negativo'];
      $porc_redu = $control4_id['porc_redu'];
      $ct_porc_masaosea = $control4_id['ct_porc_masaosea'];
      $ct_abdomen_bajo = $control4_id['ct_abdomen_bajo'];
      $ct_exa_fr = $control4_id['ct_exa_fr'];
      $ct_obser = $control4_id['obser'];
      $ct_pres = $control4_id['pres'];
      $hc_creado = $control4_id['hc_creado'];
      include("controlx.php");
  }
?>
</div>
<div id="control5" style="display: none">
<?php
  if (isset($control5_number)) {
      $x= 5;
      $date_control = $control5_id['date_control'];
      $ct_cetonica = $control5_id['ct_cetonica'];
      $ct_peso = $control5_id['ct_peso'];
      $ct_porc_agua = $control5_id['ct_porc_agua'];
      $ct_abdomen_alto = $control5_id['ct_abdomen_alto'];
      $ct_pierna_right = $control5_id['ct_pierna_right'];
      $ct_brazo_right = $control5_id['ct_brazo_right'];
      $ct_imc = $control5_id['ct_imc'];
      $ct_exa_ta = $control5_id['ct_exa_ta'];
      $positivo = $control5_id['positivo'];
      $peso_actual = $control5_id['peso_actual'];
      $ct_porc_masamuscular = $control5_id['ct_porc_masamuscular'];
      $ct_abdomen_medio = $control5_id['ct_abdomen_medio'];
      $ct_pierna_left = $control5_id['ct_pierna_left'];
      $ct_brazo_left = $control5_id['ct_brazo_left'];
      $ct_porc_grasa = $control5_id['ct_porc_grasa'];
      $ct_exa_fc = $control5_id['ct_exa_fc'];
      $negativo = $control5_id['negativo'];
      $porc_redu = $control5_id['porc_redu'];
      $ct_porc_masaosea = $control5_id['ct_porc_masaosea'];
      $ct_abdomen_bajo = $control5_id['ct_abdomen_bajo'];
      $ct_exa_fr = $control5_id['ct_exa_fr'];
      $ct_obser = $control5_id['obser'];
      $ct_pres = $control5_id['pres'];
      $hc_creado = $control5_id['hc_creado'];
      include("controlx.php");
  }
?>
</div>


	</div><!-- END body center -->
<?php include('footer.php') ?>
