Example #1
0
<?php

session_start();
error_reporting(E_ALL);
ini_set('display_errors', 1);
include 'config/autoload.inc.php';
use classes as cls;
use config as cfg;
$db = new cfg\database();
$pf = new cls\profiles();
/*
Array
(
[title] => นาย
[firstname] => กรุณ
[lastname] => รูปหล่อ
[birthday] => 1988-12-21
[tel] =>                                     0875435550,045261624
[email] =>
[address] => 439 ถ.สรรพสิทธิ์
[province] =>
[hidden_province_id] => 23
[amphur] =>
[hidden_amphur_id] => 312
[district] =>
[hidden_district_id] => 2788
[zipcode] => 34000
[latlng] => 1
)
*/
$data = array();
Example #2
0
<?php

session_start();
if (!isset($_SESSION["admin"]) || $_SESSION["admin"] != "logon") {
    session_unset();
    session_destroy();
    header("Location: index.php");
    exit;
} else {
    include '../php/config/autoload.inc.php';
}
use classes as cls;
use config\database as db;
$db = new db();
$pv = new cls\provinces();
$pf = new cls\profiles();
?>
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <title>Admin Management</title>
        <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
    </head>

    <body>
        <article class="container-fluid">
            <?php 
include "header.php";
?>
Example #3
0
<?php

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>
Example #4
0
<?php

include 'config/autoload.inc.php';
use classes as cls;
use config as cfg;
$db = new cfg\database();
$pf = new cls\profiles();
/*
username = panchai
password = 489329
title = นาย
firstname = พันชัย
lastname = ประสมเพชร
birthday = 1988-12-21
tel = 0875435550
email = thongtank@hotmail.com
address = 213 หมู่ 12
province = 23
amphur = 325
district = 2947
zipcode = 34140
lat =
lng =
privacy = 1
*/
$data = array();
foreach ($_POST as $k => $v) {
    $data[$k] = $v;
}
$latlng = explode(",", $data['latlng']);
$data['lat'] = trim($latlng[0]);
Example #5
0
if (!isset($_SESSION["admin"]) || $_SESSION["admin"] != "logon") {
    session_unset();
    session_destroy();
    header("Location: index.php");
    exit;
} else {
    include '../php/config/autoload.inc.php';
}
if (!isset($_GET['id']) || empty($_GET['id'])) {
    header("Location: main.php");
}
use classes as cls;
use config\database as db;
$db = new db();
$pv = new cls\provinces();
$pf = new cls\profiles();
$data = $pf->get_profile(trim($_GET['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>Admin Management</title>
        <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
    </head>