Beispiel #1
0
<?php

session_start();
if (isset($_SESSION['MEDICO'])) {
    include "medico_topo.php";
    require_once "../controle/ConsultaControle.php";
    $consulta = new ConsultaControle();
    $usuario = $_SESSION['MEDICO'];
    $listaConsultas = $consulta->listar($usuario);
    ?>


<div class="container">
    <h1>Consultas</h1>
	
		<form action="" method="post">
			
			<hr>
			<?php 
    foreach ($listaConsultas as $consulta) {
        ?>
            <div class="row">
                <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12" ><input type="radio" value='<?php 
        echo $consulta->getId();
        ?>
' name='consulta'></div>
                <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12" ><?php 
        echo $consulta->getPaciente();
        ?>
</div>
                <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12" >Dr(a) <?php 
<?php

session_start();
if (isset($_SESSION['SECRETARIA'])) {
    include "secretaria_topo.php";
    if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_SESSION[$_SERVER['PHP_SELF']]) and $_SESSION[$_SERVER['PHP_SELF']] == $_POST['confirmarCadastroConsulta']) {
        include "../controle/ConsultaControle.php";
        $consulta = new ConsultaControle();
        $consulta->inserir($_POST['cpf'], $_POST['dataHora'], $_POST['medico']);
    }
    ?>
   

<div class="container">
    <h1>Cadastro de Consulta</h1>

    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12  ">
      
      
        <form action="" method="post">
            <label for=""></label>
            <input type="text" class="form-control" 	name="cpf"	id="cpf" placeholder="CPF Paciente">

            <label for=""></label>
            <input type="datetime" class="form-control" 	name="dataHora"	id="dataHora" placeholder="Data e hota">
			
			<?php 
    require_once "../controle/MedicoControle.php";
    $medico = new MedicoControle();
    $listaMedicos = $medico->listar();