include_once 'session.php'; ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="healthClinic.css"> <script type="text/javascript" src="js/jquery-2.1.4.js"></script> <title>Health Clinic - Alterar conta </title> </head> <body> <?php $id = $_SESSION["patient_id"]; include_once 'patientDAO.php'; $patientDAO = new patientDAO("localhost", "healthclinicuser", "hcuser", "healthclinic"); $patient = $patientDAO->getPatientByID($id); ?> <div class="alterPatientClass"> <h3> Editar dados: </h3> <div> <label for="alterName">Nome:</label> <input id="alterName" type="text" name="alterName" value="<?php echo $patient->name; ?> "/> </div> <div> <label for="alterCPF">CPF:</label>
<?php include_once 'patientDAO.php'; include_once 'patientVO.php'; $patient = new Patient(); $patient->name = $_POST['insertName']; $patient->cpf = $_POST['insertCPF']; $patient->complement = $_POST['insertComplement']; $patient->cep = $_POST['insertCEP']; $patient->number = $_POST['insertNumber']; $patient->login = $_POST['insertLogin']; $patient->password = $_POST['insertPassword']; $patientDAO = new patientDAO("localhost", "healthclinicuser", "hcuser", "healthclinic"); echo $patientDAO->insertPatient($patient);
<?php include_once 'patientDAO.php'; $patientDAO = new patientDAO("localhost", "healthclinicuser", "hcuser", "healthclinic"); $result = $patientDAO->verifyLogin($_POST['patientLogin'], $_POST['patientPassword']); if ($result->num_rows > 0) { session_start(); $_SESSION['patient_id'] = $result->fetch_object()->idpatient; $_SESSION['LAST_ACTIVITY'] = time(); } echo $result->num_rows > 0;
<?php if (isset($_POST['searchType'], $_POST['searchWord'])) { include_once 'patientDAO.php'; $patientDAO = new patientDAO("localhost", "healthclinicuser", "hcuser", "healthclinic"); echo json_encode($patientDAO->searchPatient($_POST['searchType'], $_POST['searchWord'])); }
<?php include_once "session.php"; include_once 'patientDAO.php'; $patientDAO = new patientDAO("localhost", "healthclinicuser", "hcuser", "healthclinic"); echo $patientDAO->inactivatePatient($_SESSION["patient_id"]); ?>