Beispiel #1
0
<?php

session_start();
if (isset($_SESSION['SECRETARIA'])) {
    include "secretaria_topo.php";
    include "../controle/PacienteControle.php";
    $paciente = new PacienteControle();
    if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_SESSION[$_SERVER['PHP_SELF']]) and $_SESSION[$_SERVER['PHP_SELF']] == $_POST['remover']) {
        if (isset($_POST['paciente'])) {
            $paciente->remover($_POST['paciente']);
        }
    }
    $listaPacientes = $paciente->listar();
    ?>
   
      
<div class="container">
    <h1>Pacientes</h1>
		
		<form action="" method="post">
			
			<hr>
			<?php 
    foreach ($listaPacientes as $paciente) {
        ?>
            <div class="row">
                <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12" ><input type="radio" value='<?php 
        echo $paciente->getId();
        ?>
' name='paciente'></div>
                <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12" ><?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['confirmarCadastro']) {
        include "../controle/PacienteControle.php";
        $paciente = new PacienteControle();
        $listaPacientes = $paciente->inserir();
    }
    ?>
   

<div class="container">
    <h1>Cadastro de Pacientes</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="nome"	id="nome" placeholder="Nome">

            <label for=""></label>
            <input type="email" class="form-control" 	name="email"	id="email" placeholder="Email">

            <label for=""></label>
            <input type="text" class="form-control" 	name="celular"	id="celular" placeholder="Celular">

            <label for=""></label>