source: branches/feature-module-update/html/test/kakinaka/epsilon_check.php @ 15078

Revision 15078, 1.5 KB checked in by nanasess, 17 years ago (diff)

r15064 から svn cp
とりあえず暫定コミット.

  • UTF-8 に変更
  • slib.php, glib.php のクラス化
  • LC_Page の抽象化(一部)
Line 
1<?php
2require_once("../../require.php");
3require_once(MODULE_PATH . "mdl_epsilon/mdl_epsilon.inc");
4require_once(DATA_PATH . "module/Request.php");
5
6
7$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
8gfprintlog($HTTP_USER_AGENT);
9
10
11
12$objQuery = new SC_Query();
13/*
14// trans_code を指定されていて且つ、入金済みの場合
15if($_POST["trans_code"] != "" and $_POST["paid"] == 1 and $_POST["order_number"] != ""){
16    // ステータスを入金済みに変更する
17    $sql = "UPDATE dtb_order SET status = 6, update_date = now() WHERE order_id = ? AND memo04 = ? ";
18    $objQuery->query($sql, array($_POST["order_number"], $_POST["trans_code"]));
19   
20    // POSTの内容を全てログ保存
21    $log_path = DATA_PATH . "logs/epsilon.log";
22    gfPrintLog("epsilon conveni start---------------------------------------------------------", $log_path);
23    foreach($_POST as $key => $val){
24        gfPrintLog( "\t" . $key . " => " . $val, $log_path);
25    }
26    gfPrintLog("epsilon conveni end-----------------------------------------------------------", $log_path);
27*/
28
29    // URIから各情報を取得
30    $info = parse_url( $_SERVER["REQUEST_URI"] );
31    $scheme = $info['scheme'];
32    $host = $info['host'];
33    $port = $info['port'];
34    $path = $info['path'];
35
36    $req =& new HTTP_Request($_SERVER["REQUEST_URI"]);
37    $req->addHeader("Content-Type", "text/plan");
38   
39echo "Content-Type: text/plain
40
411";
42
43//  $req->setBody($body);
44//  sfprintr($info);
45   
46    $req->clearPostData();
47   
48    if (PEAR::isError($req)) {
49        echo $req->getMessage();
50    } else {
51        echo $req->getResponseBody();
52    }
53//}
54
55?>
Note: See TracBrowser for help on using the repository browser.