Beispiel #1
0
ini_set('display_errors', 1);
error_reporting(E_ERROR);
error_reporting(E_ALL || ~E_NOTICE);
include_once "lib/libdb.php";
include_once "lib/libmodlist.php";
date_default_timezone_set('Asia/Seoul');
//ini_set( 'include_path', ini_get('include_path').':../lib:../lib/jpgraph' );
//session_start();
header('Content-Type: text/html; charset=utf-8');
$DB = new dbconn("roomreserve", "localhost", "root", "medinfo");
$colors = array("#0072bc", "#00a651", "#f7941d", "ff66cc", "9999ff", "33ccff", "ccff33");
$confroom_group = array("2층 회의실" => array("2층 2303 회의실 1(원형)", "2층 2302 회의실 2", "2층 2301 회의실 3"), "3층 회의실" => array("3층 3301 회의실 1(원형)", "3층 3220 소회의실 1", "3층 3221 소회의실 2", "3층 3222 소회의실 3"), "4층 회의실" => array("4층 4301 회의실 1(원형)", "4층 4220 소회의실 1", "4층 4221 소회의실 2", "4층 4222 소회의실 3"));
$confroom = array("2층 2303 회의실 1(원형)", "2층 2302 회의실 2", "2층 2301 회의실 3", "3층 3301 회의실 1(원형)", "3층 3220 소회의실 1", "3층 3221 소회의실 2", "3층 3222 소회의실 3", "4층 4301 회의실 1(원형)", "4층 4220 소회의실 1", "4층 4221 소회의실 2", "4층 4222 소회의실 3");
${$key} = "1dasd12WESA12dsaasd456TGDFsd";
$table = $DB->table("deviceinfo");
list($room_name) = $table->selectfetch("", "di_room", "di_ip='" . $_SERVER["REMOTE_ADDR"] . "'");
//$room_name = "2층 2303 회의실 1(원형)";
function time_format($time_str)
{
    $time = substr($time_str, 0, 5);
    $apm = substr($time_str, 6, 2);
    list($h, $m) = explode(":", $time);
    if ($apm == "PM") {
        $h += 12;
    }
    return sprintf("%02d%02d", $h, $m);
}
function time_human($time_str)
{
    return substr($time_str, 0, 2) . ":" . substr($time_str, 2, 2);