File "recv_d_2.php"
Full path: /www/haneda/qr/recv/recv_d_2.php
File size: 2.21 KiB (2265 bytes)
MIME-type: text/x-php
Charset: utf-8
<?php
//-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// 自動でクラスを参照する
// 関数名 : __autoload()
// 備考 : 参照先は./class/XXX.phpとする
// 更新 : 2012/10/19 KMK-Teraoka
//-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
function __autoload($className)
{
$fPath = "./class/" . str_replace("_", "/", $className) . ".php";
require_once $fPath;
}
//===============================================
// DEBUG_MODE
// 備考 :
// 更新 : 2012/10/19 KMK-Teraoka
//===============================================
define("DEBUG_MODE", "1");
cDebug::setMode(DEBUG_MODE);
if (DEBUG_MODE == 1)
{
cStopwatch::start();
}
$LOG_FILE = "./log/recv_r.log";
$mLog = new cLog($LOG_FILE);
$HOST = "192.168.100.153";
$DB = "pntdb";
$USER = "postgres";
$PASS = "am#71ZJ*";
$TABLE = "qr.work_data";
//================================================
// データベース接続
// 備考 :
// 更新 : 2012/10/19 KMK-Teraoka
//================================================
$conn = pg_connect("
host = ". $HOST. "
dbname = ". $DB. "
user = ". $USER. "
password= ". $PASS. "
");
extract($_GET['data']);
extract($_GET['date']);
extract($_GET['reg']);
$GET_data = isset($_GET['data']) ? htmlspecialchars($_GET['data']) : "";
$GET_date = isset($_GET['date']) ? htmlspecialchars($_GET['date']) : "";
$GET_reg = isset($_GET['reg']) ? htmlspecialchars($_GET['reg']) : "";
$DATA = explode("," ,$data);
$mLog->writeLog($GET_data. "\n");
$mLog->writeLog($GET_date. "\n");
$mLog->writeLog($GET_reg. "\n");
//変数にデータをセット
$DataDate = substr($DATA[0],"0","4") ."-" .substr($DATA[0],"4","2") ."-" .substr($DATA[0],"6","2") ." " ."00:00:00";
$DataTimeZone = substr($DATA[0],"8","1");
$DataTimeZone = (!strcmp(substr($DATA[0],"8","1"),"A")) ? 0 : 1;
$DataRegistrant = urldecode($DATA[1]);
/*
$INSERT = "INSERT INTO " .$TABLE ." (registrant_name, date, time_zone, work_flag, upddatetime, regdatetime) ";
$INSERT .= "VALUES (";
$INSERT .= "'" .$DataRegistrant ."'";
$INSERT .= "," ."'" .$DataDate ."'";
$INSERT .= "," .$DataTimeZone;
$INSERT .= "," ."0";
$INSERT .= "," ."current_timestamp ,current_timestamp";
$INSERT .= ")";
$res = pg_query($conn,$INSERT) OR DIE(pg_last_error() ."<BR>" .$INSERT);
*/
?>