<?php require('classes/main.php'); ?>
<!DOCTYPE html>
<html>
<?php require('common/head.php'); ?>
<body>
    <?php require('common/header.php'); ?>
    <div style="display:none;"><?php foreach($_SESSION as $key => $value) { echo $key . ': ' . $value . '<br />';  } ?></div>
    <?php
    $pg = 'registro-medico.php';
    if(isset($_GET['pg'])) {
        $pg_get = $main->cleanPg($_GET['pg']) . '.php';
        if(file_exists($pg_get)) {
            $pg = $pg_get;
        }
    } else if($main->checkUserOferente()) {
        $pg = 'oferente.php';
    }
    require($pg); ?>
    <?php require('common/footer.php'); ?>
</body>
</html>