Exemple #1
0
session_start();
error_reporting(E_ALL);
ini_set('display_errors', 1);
if (isset($_SESSION['profile']) && $_SESSION['profile'] == 'logon') {
    include 'php/config/autoload.inc.php';
} else {
    echo "\n    <script type='text/javascript'>\n        alert('กรุณาเข้าสู่ระบบก่อนกรอกประวัติการรักษา');\n        window.location = 'signin.php';\n    </script>\n    ";
    exit;
}
use classes as cls;
use config\database as db;
$db = new db();
$pv = new cls\provinces();
$pf = new cls\profiles();
$ht = new cls\hospitals();
$data_medical = $ht->get_medical($_SESSION['profile_detail']['profile_username']);
$data = $pf->get_profile(trim($_SESSION['profile_detail']['profile_id']));
$province = $pv->get_province($data['province'])[0];
$amphur = $pv->get_amphur($data['amphur'])[0];
$district = $pv->get_district($data['district'])[0];
// print "<pre>" . print_r($province, 1) . "</pre>";
// exit;
?>
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <title>ข้อมูลส่วนตัว</title>
        <link rel="stylesheet" href="js/jquery-ui-1.11.4.custom/jquery-ui.min.css">
        <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">