Commit efea0d21 authored by Antonio.Suerte's avatar Antonio.Suerte

Program Code Filter in Transaction Logs

parent 742b5560
...@@ -199,7 +199,7 @@ class MoneyRequest extends System { ...@@ -199,7 +199,7 @@ class MoneyRequest extends System {
$this -> result[PARAM_STATUS] = "REJECTED"; $this -> result[PARAM_STATUS] = "REJECTED";
} }
$this -> logPost(); $this -> logPost($this -> pnum);
} }
private function getTransactionalParams(){ private function getTransactionalParams(){
...@@ -275,6 +275,7 @@ class MoneyRequest extends System { ...@@ -275,6 +275,7 @@ class MoneyRequest extends System {
$this -> accessModifyCommon('INSERT_LOG_POST', $this -> accessModifyCommon('INSERT_LOG_POST',
[ [
$this -> ip, $this -> ip,
$this -> pnum,
$this -> referer, $this -> referer,
'[REMITTANCE_CALLBACK_RESULT]'.json_encode($this -> result) '[REMITTANCE_CALLBACK_RESULT]'.json_encode($this -> result)
]); ]);
...@@ -293,6 +294,7 @@ class MoneyRequest extends System { ...@@ -293,6 +294,7 @@ class MoneyRequest extends System {
$this -> accessModifyCommon('INSERT_LOG_POST', [ $this -> accessModifyCommon('INSERT_LOG_POST', [
$this -> ip, $this -> ip,
$this -> pnum,
$this -> referer, $this -> referer,
"[INSERT_DB]{$encodedParams}" "[INSERT_DB]{$encodedParams}"
]); ]);
...@@ -352,6 +354,7 @@ class MoneyRequest extends System { ...@@ -352,6 +354,7 @@ class MoneyRequest extends System {
$this -> accessModifyCommon("INSERT_LOG_POST", $this -> accessModifyCommon("INSERT_LOG_POST",
[ [
$this -> ip, $this -> ip,
$this -> pnum,
$this -> referer, $this -> referer,
'[INSERT_DB_ERR]'.json_encode($params) '[INSERT_DB_ERR]'.json_encode($params)
]); ]);
......
...@@ -25,16 +25,14 @@ class LogicSettlement extends SettlementModelClass { ...@@ -25,16 +25,14 @@ class LogicSettlement extends SettlementModelClass {
function logic() { function logic() {
try { try {
// POSTのログを取る
$this -> logPost();
// 初期データ処理 // 初期データ処理
$this -> init(); $this -> init();
// ロジック実行 // ロジック実行
$this -> biz(); $this -> biz();
// POSTのログを取る
$this -> logPost($this -> getProgramCode());
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }
...@@ -210,13 +208,25 @@ class LogicSettlement extends SettlementModelClass { ...@@ -210,13 +208,25 @@ class LogicSettlement extends SettlementModelClass {
&& $result == NO_COUNT) { // 正常終了 && $result == NO_COUNT) { // 正常終了
// logs the data that will be passed // logs the data that will be passed
$this -> accessModifyCommon('INSERT_LOG_POST', array($ip, $referer, "[TO_RETURN_URL_DATA]{$data}")); $this -> accessModifyCommon('INSERT_LOG_POST', array(
$ip,
$this -> getProgramCode(),
$referer,
"[TO_RETURN_URL_DATA]{$data}"));
$this -> accessModifyCommon('INSERT_LOG_POST', array($ip, $referer, "[CALLBACK_SUCCESSFUL]{$jsonData}")); $this -> accessModifyCommon('INSERT_LOG_POST', array(
$ip,
$this -> getProgramCode(),
$referer,
"[CALLBACK_SUCCESSFUL]{$jsonData}"));
header('Location: ' . $url); header('Location: ' . $url);
} else { // 異常 } else { // 異常
$this -> accessModifyCommon('INSERT_LOG_POST', array($ip,$referer,"[CALLBACK_ERROR]{$jsonData}")); $this -> accessModifyCommon('INSERT_LOG_POST', array(
$ip,
$this -> getProgramCode(),
$referer,
"[CALLBACK_ERROR]{$jsonData}"));
if($failUrl != NO_STRING) { if($failUrl != NO_STRING) {
header('Location: ' . $failUrl); header('Location: ' . $failUrl);
} }
......
...@@ -286,7 +286,7 @@ class SettlementModelClass extends ModelClassEx { ...@@ -286,7 +286,7 @@ class SettlementModelClass extends ModelClassEx {
$_SESSION['settlement_currency'] = $this -> currency; $_SESSION['settlement_currency'] = $this -> currency;
// POSTのログを取る // POSTのログを取る
$this -> logPost(); $this -> logPost($this -> getProgramCode());
$this -> setType(CONTROL_NAME_LOGIN); $this -> setType(CONTROL_NAME_LOGIN);
...@@ -600,7 +600,7 @@ class SettlementModelClass extends ModelClassEx { ...@@ -600,7 +600,7 @@ class SettlementModelClass extends ModelClassEx {
} }
function getAgentCodeURL(){ function getAgentCodeURL(){
$baseUrl = 'https://'.SITE_DOMAIN_FULL.'/'. $this -> getLangage() .'/register'; $baseUrl = 'https://'.SITE_DOMAIN.'/'. $this -> getLangage() .'/register';
if(!empty($this -> pNum)){ if(!empty($this -> pNum)){
$rowData = $this -> getRowData($this -> accessSelect('SELECT_AGENT_CODE_BY_AID', array($this -> pNum))); $rowData = $this -> getRowData($this -> accessSelect('SELECT_AGENT_CODE_BY_AID', array($this -> pNum)));
$AgentCode = $this -> getColumnData($rowData, COLUMN_AGENT_CODE); $AgentCode = $this -> getColumnData($rowData, COLUMN_AGENT_CODE);
...@@ -923,6 +923,15 @@ class SettlementModelClass extends ModelClassEx { ...@@ -923,6 +923,15 @@ class SettlementModelClass extends ModelClassEx {
function echoPNum() { function echoPNum() {
echo $this -> pNum; echo $this -> pNum;
} }
/*-------------------------------------------------------------------------
* @function_name: 番組コードの取得
* @parameter : なし
* @return : 転送先URL
-------------------------------------------------------------------------*/
function getProgramCode() {
return $this -> pNum;
}
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* @function_name: 送金元手数料の取得 * @function_name: 送金元手数料の取得
......
...@@ -27,6 +27,10 @@ include_once('template/base_head.php'); ...@@ -27,6 +27,10 @@ include_once('template/base_head.php');
<th>IP Address</th> <th>IP Address</th>
<td><input type="text" id="ip_address" name="ip_address" value="<?php $this -> echoIP(); ?>" class="w100p"></td> <td><input type="text" id="ip_address" name="ip_address" value="<?php $this -> echoIP(); ?>" class="w100p"></td>
</tr> </tr>
<tr>
<th>Program Code</th>
<td><input type="text" id="p_num" name="p_num" value="<?php $this -> echoProgramCode(); ?>" class="w100p"></td>
</tr>
<tr> <tr>
<th>URL</th> <th>URL</th>
<td><input type="text" id="url" name="url" value="<?php $this -> echoURL(); ?>" class="w100p"></td> <td><input type="text" id="url" name="url" value="<?php $this -> echoURL(); ?>" class="w100p"></td>
...@@ -68,6 +72,7 @@ include_once('template/base_head.php'); ...@@ -68,6 +72,7 @@ include_once('template/base_head.php');
<?php }else{ ?> <?php }else{ ?>
<tr> <tr>
<th class="w10p">IP Address</th> <th class="w10p">IP Address</th>
<th class="w10p">Program Code</th>
<th class="w5p">URL</th> <th class="w5p">URL</th>
<th class="w60p">Post</th> <th class="w60p">Post</th>
<th class="w10p">Date</th> <th class="w10p">Date</th>
......
...@@ -4362,7 +4362,7 @@ class Common extends HtmlBuilder { ...@@ -4362,7 +4362,7 @@ class Common extends HtmlBuilder {
* @parameter : なし * @parameter : なし
* @return : なし * @return : なし
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
function logPost() { function logPost($programCode = NO_STRING) {
// 変数宣言部 // 変数宣言部
$params = array(); $params = array();
...@@ -4383,6 +4383,7 @@ class Common extends HtmlBuilder { ...@@ -4383,6 +4383,7 @@ class Common extends HtmlBuilder {
// 登録用パラメータ // 登録用パラメータ
$params[] = $ip; $params[] = $ip;
$params[] = $programCode;
$params[] = $referer; $params[] = $referer;
$params[] = $post; $params[] = $post;
......
...@@ -10117,6 +10117,7 @@ WHERE ...@@ -10117,6 +10117,7 @@ WHERE
<INSERT_LOG_POST> <INSERT_LOG_POST>
INSERT INTO t_log_post ( INSERT INTO t_log_post (
ip_address ip_address
, p_num
, url , url
, post , post
, create_time , create_time
...@@ -11494,6 +11495,7 @@ WHERE ...@@ -11494,6 +11495,7 @@ WHERE
<LIST_LOG_POST> <LIST_LOG_POST>
SELECT SELECT
l_id l_id
, p_num
, ip_address , ip_address
, url , url
, post , post
......
...@@ -11,6 +11,7 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -11,6 +11,7 @@ class TransactionLogsModelClass extends ModelClassEx {
private $post = NO_STRING; private $post = NO_STRING;
private $url = NO_STRING; private $url = NO_STRING;
private $ip = NO_STRING; private $ip = NO_STRING;
private $programCode = NO_STRING;
private $count = NO_COUNT; private $count = NO_COUNT;
...@@ -64,6 +65,7 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -64,6 +65,7 @@ class TransactionLogsModelClass extends ModelClassEx {
$this -> ip = $this -> getDataPost(PARAM_IP_ADDRESS); $this -> ip = $this -> getDataPost(PARAM_IP_ADDRESS);
$this -> url = $this -> getDataPost('url'); $this -> url = $this -> getDataPost('url');
$this -> post = $this -> getDataPost('post'); $this -> post = $this -> getDataPost('post');
$this -> programCode = $this -> getDataPost(PARAM_P_NUM);
// ------------------ 検索系 ------------------// // ------------------ 検索系 ------------------//
$this -> lang = $this -> getLangage(); $this -> lang = $this -> getLangage();
...@@ -96,7 +98,7 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -96,7 +98,7 @@ class TransactionLogsModelClass extends ModelClassEx {
public function echoList() { public function echoList() {
$solution = $this -> method; $solution = $this -> method;
$apiUrl = "https://secure.iwl.world/api/Logs/"; $apiUrl = SITE_PROTOCOL."://".SITE_DOMAIN_FULL."/api/Logs/";
//for deposit logs //for deposit logs
$logFolder = dirname(SYSTEM_PATH).DIRECTORY_SEPARATOR.'api'.DIRECTORY_SEPARATOR.'Logs'.DIRECTORY_SEPARATOR; $logFolder = dirname(SYSTEM_PATH).DIRECTORY_SEPARATOR.'api'.DIRECTORY_SEPARATOR.'Logs'.DIRECTORY_SEPARATOR;
...@@ -258,6 +260,7 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -258,6 +260,7 @@ class TransactionLogsModelClass extends ModelClassEx {
foreach($this -> rs as $row) { foreach($this -> rs as $row) {
$rtn .= '<tr>' $rtn .= '<tr>'
. '<td> '. $this -> getColumnData($row, COLUMN_IP_ADDRESS) .'</td>' . '<td> '. $this -> getColumnData($row, COLUMN_IP_ADDRESS) .'</td>'
. '<td> '. $this -> getColumnData($row, 'p_num') .'</td>'
. '<td>' . $this -> getColumnData($row, 'url') . '</td>' . '<td>' . $this -> getColumnData($row, 'url') . '</td>'
. '<td style="word-break:break-all;">' . $this -> getColumnData($row, 'post') . '</td>' . '<td style="word-break:break-all;">' . $this -> getColumnData($row, 'post') . '</td>'
. '<td>' . $this -> getColumnData($row, COLUMN_CREATE_TIME) . '</td>' . '<td>' . $this -> getColumnData($row, COLUMN_CREATE_TIME) . '</td>'
...@@ -265,7 +268,7 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -265,7 +268,7 @@ class TransactionLogsModelClass extends ModelClassEx {
} }
} else { } else {
$rtn = '<tr><td colspan="6">' . $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()) . '</td></tr>'; $rtn = '<tr><td colspan="5">' . $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()) . '</td></tr>';
} }
echo $rtn; echo $rtn;
...@@ -288,7 +291,6 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -288,7 +291,6 @@ class TransactionLogsModelClass extends ModelClassEx {
function getWhere() { function getWhere() {
$where = NO_STRING; $where = NO_STRING;
$rtn = array(); $rtn = array();
$statuses = array();
if($this -> sFrom != '2014/01/01' if($this -> sFrom != '2014/01/01'
&& $this -> sFrom != NO_STRING) { && $this -> sFrom != NO_STRING) {
...@@ -319,6 +321,10 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -319,6 +321,10 @@ class TransactionLogsModelClass extends ModelClassEx {
if($this -> post != NO_STRING) { if($this -> post != NO_STRING) {
$where .= ' AND (post LIKE (\')%'. $this -> post .'%(\'))'; $where .= ' AND (post LIKE (\')%'. $this -> post .'%(\'))';
} }
if($this -> programCode != NO_STRING){
$where .= ' AND (p_num = (\')'. $this -> programCode . '(\'))';
}
$rtn[] = $where; $rtn[] = $where;
...@@ -453,5 +459,9 @@ class TransactionLogsModelClass extends ModelClassEx { ...@@ -453,5 +459,9 @@ class TransactionLogsModelClass extends ModelClassEx {
function echoIP(){ function echoIP(){
echo $this -> ip; echo $this -> ip;
} }
function echoProgramCode(){
echo $this -> programCode;
}
} }
?> ?>
\ No newline at end of file
<?php <?php
$page_title = "Transaction Logs"; $page_title = "取り引きロッグ";
include_once('template/base_head.php'); include_once('template/base_head.php');
?> ?>
<!-- サイドバー --> <!-- サイドバー -->
...@@ -7,7 +7,7 @@ include_once('template/base_head.php'); ...@@ -7,7 +7,7 @@ include_once('template/base_head.php');
<h1><a href=""><img src="../img/logo.png" alt="iWallet"></a></h1> <h1><a href=""><img src="../img/logo.png" alt="iWallet"></a></h1>
<div class="aside-heading"> <div class="aside-heading">
<div class="btns"> <div class="btns">
<input type="button" id="btnSearch" value="Search" class="btn bg-default px50 hi22"> <input type="button" id="btnSearch" value="検索" class="btn bg-default px50 hi22">
</div> </div>
</div> </div>
<form id="searchForm" action="" method="post"> <form id="searchForm" action="" method="post">
...@@ -24,9 +24,13 @@ include_once('template/base_head.php'); ...@@ -24,9 +24,13 @@ include_once('template/base_head.php');
</tr> </tr>
<?php if($this -> getMethod() == 'From_DB'){ ?> <?php if($this -> getMethod() == 'From_DB'){ ?>
<tr> <tr>
<th>IP Address</th> <th>IPアドレス</th>
<td><input type="text" id="ip_address" name="ip_address" value="<?php $this -> echoIP(); ?>" class="w100p"></td> <td><input type="text" id="ip_address" name="ip_address" value="<?php $this -> echoIP(); ?>" class="w100p"></td>
</tr> </tr>
<tr>
<th>番組コード</th>
<td><input type="text" id="p_num" name="p_num" value="<?php $this -> echoProgramCode(); ?>" class="w100p"></td>
</tr>
<tr> <tr>
<th>URL</th> <th>URL</th>
<td><input type="text" id="url" name="url" value="<?php $this -> echoURL(); ?>" class="w100p"></td> <td><input type="text" id="url" name="url" value="<?php $this -> echoURL(); ?>" class="w100p"></td>
...@@ -37,7 +41,7 @@ include_once('template/base_head.php'); ...@@ -37,7 +41,7 @@ include_once('template/base_head.php');
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<span class="th">Specify Date</span> <span class="th">日付け</span>
<input type="text" id="s_from" name="s_from" value="<?php $this -> echoTagFrom(); ?>" class="px110" placeholder=""> - <input type="text" id="s_to" name="s_to" value="<?php $this -> echoTagTo(); ?>" class="px110" placeholder=""> <input type="text" id="s_from" name="s_from" value="<?php $this -> echoTagFrom(); ?>" class="px110" placeholder=""> - <input type="text" id="s_to" name="s_to" value="<?php $this -> echoTagTo(); ?>" class="px110" placeholder="">
</td> </td>
</tr> </tr>
...@@ -61,17 +65,18 @@ include_once('template/base_head.php'); ...@@ -61,17 +65,18 @@ include_once('template/base_head.php');
<?php if($this -> getMethod() != 'From_DB'){ ?> <?php if($this -> getMethod() != 'From_DB'){ ?>
<tr> <tr>
<th class="w45p">Solutions</th> <th class="w45p">Solutions</th>
<th class="w35p">Requests</th> <th class="w35p">リクエスト</th>
<th class="w35p">Response</th> <th class="w35p">返信</th>
</tr> </tr>
<?php $this -> echoList(); ?> <?php $this -> echoList(); ?>
<?php }else{ ?> <?php }else{ ?>
<tr> <tr>
<th class="w10p">IP Address</th> <th class="w10p">IPアドレス</th>
<th class="w10p">番組コード</th>
<th class="w5p">URL</th> <th class="w5p">URL</th>
<th class="w60p">Post</th> <th class="w60p">POST</th>
<th class="w10p">Date</th> <th class="w10p">日付け</th>
</tr> </tr>
<?php $this -> echoListDB(); ?> <?php $this -> echoListDB(); ?>
<?php } ?> <?php } ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment