Commit 05e100ec authored by Anthony.Suerte's avatar Anthony.Suerte

AUI User Details Optimization [Mango Update Included]

parent d70dc06e
<?php
include_once('config.php');
include_once('logic/account_transactions/controller.php');
$logic = new ControlAccountTransactions();
$logic -> action();
\ No newline at end of file
<?php
include_once('config.php');
include_once(SYSTEM_LOGICS."account_transactions/controller.php");
$logic = new ControlAccountTransactions();
$logic -> action();
?>
<?php
$page_title = "User Transaction History";
include_once('template/base_head.php');
?>
<!-- サイドバー -->
<aside id="colLeft">
<h1><a href="account_list"><img src="../img/logo.png" alt="iWallet"></a></h1>
<form id="searchForm" action="" method="post">
<input type="hidden" id="detail_account" name="detail_account" value="<?php $this -> echoDetailAccount(); ?>">
<div class="aside-heading">
<div class="btns">
<input type="button" id="btnSearchToday" value="Today" class="btn bg-default px50 hi22">&nbsp;
<input type="button" id="btnSearch" value="Search" class="btn bg-default px50 hi22">
</div>
</div>
<table class="conditions fontS w100p">
<colgroup>
<col class="w50p">
<col class="w50p">
</colgroup>
<tr>
<th>Transaction Number</th>
<td><input type="text" id="transaction_number" name="transaction_number" value="<?php $this -> echoTransactionNumber(); ?>" class="w100p"></td>
</tr>
<tr>
<th>Email Address</th>
<td><input type="text" id="s_email" name="s_email" value="<?php $this -> echoSEmail(); ?>" class="w100p"></td>
</tr>
<tr>
<th>Account Number</th>
<td><input type="text" id="s_account" name="s_account" value="<?php $this -> echoSUserAccount(); ?>" class="w100p"></td>
</tr>
<tr>
<th>Currency Type</th>
<td>
<select id="s_currency" name="s_currency" class="w100p">
<?php $this -> echoCurrencyList(); ?>
</select>
</td>
</tr>
<tr>
<th>Transaction Type</th>
<td>
<select name="transaction_type" id="transaction_type" class="w100p">
<option value="">--- All ---</option>
<?php $this -> dispTransactionTypeList(); ?>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">Processing Date</span>
<p>
<input type="text" id="s_from" name="s_from" value="<?php $this -> echoFrom(); ?>" class="px110" placeholder="日付"> -
<input type="text" id="s_to" name="s_to" value="<?php $this -> echoTo(); ?>" class="px110" placeholder="日付">
</p>
</td>
</tr>
</table>
<p class="calign">
<input type="button" id="btnExport" value="Export" class="btn bg-grad hi25 px100">
<input type="button" id="btnBack" value="Back" class="btn bg-grad hi25 px100">
</p>
<input type="hidden" value="" id="s_type" name="type" />
</form>
</aside>
<div id="colMain">
<div class="mainIn">
<?php include_once('template/base_nav.php'); ?>
<article>
<div class="article-heading">
<h2><?php echo $page_title; ?> [<?php $this -> echoDetailAccount(); ?>]</h2>
<?php $this -> dispPager(); ?>
</div>
<?php $this -> echoList() ?>
<div class="article-bottom">
<?php $this -> dispPager(); ?>
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/account_transactions.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
\ No newline at end of file
$(function(){
$('#btnSearch').click(function() {
$('#s_type').val('search');
submitForm('searchForm');
});
$("#btnExport").click(function() {
$('#s_type').val('export');
submitForm('searchForm');
});
$("#btnBack").click(function(){
var currentUrl = window.location.href;
var modifiedBase = currentUrl.substring(0, currentUrl.lastIndexOf("/") + 1)
window.location.href = modifiedBase+"account_edit?detail_account="+$("#detail_account").val()
})
$('#s_from').datepicker({
// カレンダーの設定
dateFormat : 'yy/mm/dd'
});
$('#s_to').datepicker({
// カレンダーの設定
dateFormat : 'yy/mm/dd'
});
$('#btnSearchToday').click(function() {
$('#s_type').val('search');
$('#s_from:text').datepicker().datepicker('setDate', 'today');
$('#s_to:text').datepicker().datepicker('setDate', 'today');
$('#s_email').val('');
$('#s_account').val('');
$('#transaction_number').val('');
$('#transaction_type').val('');
$('#s_currency').val('');
submitForm('searchForm');
});
var currentSToVal = new Date($('#s_to').val())
var currentSToMonth = currentSToVal.getMonth() + 1
var currentSToYear = currentSToVal.getFullYear()
var currentSToDate = currentSToVal.getDate()
if(month < 9) {
currentSToMonth = "0" + currentSToMonth
}
if(date < 9) {
currentSToDate = "0" + currentSToDate
}
if($('#s_from').val() == '') {
var nowDate = new Date();
nowDate.setMonth(nowDate.getMonth() - 2);
var month = nowDate.getMonth();
var year = nowDate.getFullYear();
var date = nowDate.getDate();
month = month + 1;
if(month < 9) {
month = "0" + month
}
if(date < 9) {
date = "0" + date
}
var thisStr = year + '/' + month + '/' + '01';
$('#s_from:text').datepicker().datepicker('setDate', thisStr);
}
var setSto = currentSToYear + '/' + currentSToMonth + '/' + currentSToDate;
if($('#s_to').val() == '') {
$('#s_to:text').datepicker().datepicker('setDate','today');
} else {
$('#s_to:text').datepicker().datepicker('setDate', setSto);
}
})
\ No newline at end of file
......@@ -5,6 +5,7 @@ class CommonBase {
* @ メンバ変数
-------------------------------------------------------------------------*/
public $cfgFile; // 設定ファイルデータの配列
public $crdFile;
public $messages; // メッセージクラス
/*-------------------------------------------------------------------------
......@@ -15,13 +16,10 @@ class CommonBase {
* @return : なし
-------------------------------------------------------------------------*/
function __construct() {
// 変数宣言部
$workArr; // 設定ファイルのデータ配列
try {
$workArr = parse_ini_file(CONFIGRATION_FILE_PATH, TRUE); // セクションをパースする
$credArr = parse_ini_file(CREDENTIALS_FILE_PATH, TRUE); // セクションをパースする
$workArr = parse_ini_file(CONFIGRATION_FILE_PATH, TRUE);
if($workArr == FALSE) { // 読み込み失敗
throw new Exception("" , -1);
......@@ -29,6 +27,7 @@ class CommonBase {
// メンバ変数へ取得データを格納する
$this -> cfgFile = $workArr;
$this -> crdFile = $credArr;
// 多言語対応
$uri = explode('/', $_SERVER['REQUEST_URI']);
......@@ -65,12 +64,17 @@ class CommonBase {
* @return : 設定ファイルに対応する値(存在しない場合は空白文字)
-------------------------------------------------------------------------*/
function getConfigValue($section, $key) {
$file = $this -> cfgFile;
if($section == SECTION_DB || $section == SECTION_DIR_PATH){
$file = $this -> crdFile;
}
// 変数宣言部
$rtn = NO_STRING;
if(isset($this -> cfgFile[$section][$key])) {
$rtn = $this -> cfgFile[$section][$key];
if(isset($file[$section][$key])) {
$rtn = $file[$section][$key];
}
// 設定値の返却
......
......@@ -31,7 +31,9 @@ define('LIBRARIES', SYSTEM_PATH . 'lib/'); // システムライブラ
define('LIBRARIES_CORE', LIBRARIES . 'core/'); // コア設定群ディレクトリルート
define('SYSTEM_LOGICS', SYSTEM_PATH . 'logic/'); // ロジックディレクトリ
define('CONFIGRATION_FILE_NAME', 'marsys_conf.ini'); // 設定ファイルのファイル名
define('CREDENTIALS_FILE_NAME', 'marsys_data_conf.ini'); // 設定ファイルのファイル名
define('CONFIGRATION_FILE_PATH', LIBRARIES . CONFIGRATION_FILE_NAME); // 設定ファイルのファイルパス
define('CREDENTIALS_FILE_PATH', LIBRARIES . CREDENTIALS_FILE_NAME); // 設定ファイルのファイルパス
define('SYSTEM_DOCUMENT', SYSTEM_TEMPLATE_PATH . 'documents/'); // ドキュメント群のルート
......@@ -119,7 +121,14 @@ define('ERROR', 'ERROR'); // エラー
define('WARNING', 'WARNING'); // 警告
define('INFO', 'INFO'); // 情報
// error_reporting(0);
error_reporting(0);
if(defined('API_ACCESS')){
$sessionCookieParams = session_get_cookie_params();
if(!$sessionCookieParams['lifetime'])
session_set_cookie_params(3600, '/; samesite=None', $_SERVER['HTTP_HOST'], true, false);
}
// セッションスタート
session_name('iwallet');
......
This diff is collapsed.
This diff is collapsed.
<?php
require_once(SYSTEM_LOGICS . 'account_transactions/logic.php');
class ControlAccountTransactions extends LogicAccountTransactions {
public function __construct(){
parent::__construct();
}
public function action(){
try{
$this -> logic();
if($this -> getType() == TYPE_EXPORT){
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=Trans_List_' . date('YmdHis') . '.csv');
header('Content-Transfer-Encoding: binary');
echo "\xEF\xBB\xBF";
echo $this -> makeExportData();
}else{
require_once($this -> getSystemHTML('TEMPLATE_ACCOUNT_TRANSACTIONS', $this -> dispHTML()));
}
}catch(Exception $ex){
header("Location: /");
}
}
}
\ No newline at end of file
<?php
require_once(SYSTEM_LOGICS . 'account_transactions/model.php');
class LogicAccountTransactions extends ModelAccountTransactions {
public function __construct(){
parent::__construct();
}
public function logic(){
$this -> init();
$this -> list();
}
private function list(){
$this -> setCurrencies($this -> accessSelect('LIST_MST_CURRENCY_ACTIVE', array()));
$where = $this -> getWhere();
$rowCount = $this -> getColumnData(
$this -> getRowData($this -> accessSelect('SELECT_USER_TRANSACTION_ADMIN_COUNT', $where), 0),
"overall_total");
$this -> setTotal($rowCount);
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$this -> setStart($start);
$where[] = " LIMIT {$start}, ".VAR_DEFAULT_PAGE_COUNT;
$this -> setResult($this -> accessSelect('LIST_USER_TRANSACTION_ADMIN', $where));
}
}
\ No newline at end of file
This diff is collapsed.
<?php
$page_title = "ユーザー取引履歴";
include_once('template/base_head.php');
?>
<!-- サイドバー -->
<aside id="colLeft">
<h1><a href="account_list"><img src="../img/logo.png" alt="iWallet"></a></h1>
<form id="searchForm" action="" method="post">
<input type="hidden" id="detail_account" name="detail_account" value="<?php $this -> echoDetailAccount(); ?>">
<div class="aside-heading">
<div class="btns">
<input type="button" id="btnSearchToday" value="本日" class="btn bg-default px50 hi22">&nbsp;
<input type="button" id="btnSearch" value="検索" class="btn bg-default px50 hi22">
</div>
</div>
<table class="conditions fontS w100p">
<colgroup>
<col class="w50p">
<col class="w50p">
</colgroup>
<tr>
<th>取引番号</th>
<td><input type="text" id="transaction_number" name="transaction_number" value="<?php $this -> echoTransactionNumber(); ?>" class="w100p"></td>
</tr>
<tr>
<th>メールアドレス</th>
<td><input type="text" id="s_email" name="s_email" value="<?php $this -> echoSEmail(); ?>" class="w100p"></td>
</tr>
<tr>
<th>口座番号</th>
<td><input type="text" id="s_account" name="s_account" value="<?php $this -> echoSUserAccount(); ?>" class="w100p"></td>
</tr>
<tr>
<th>通貨種別</th>
<td>
<select id="s_currency" name="s_currency" class="w100p">
<?php $this -> echoCurrencyList(); ?>
</select>
</td>
</tr>
<tr>
<th>取引科目</th>
<td>
<select name="transaction_type" id="transaction_type" class="w100p">
<option value="">--- All ---</option>
<?php $this -> dispTransactionTypeList(); ?>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">処理日時指定</span>
<p>
<input type="text" id="s_from" name="s_from" value="<?php $this -> echoFrom(); ?>" class="px110" placeholder="日付"> -
<input type="text" id="s_to" name="s_to" value="<?php $this -> echoTo(); ?>" class="px110" placeholder="日付">
</p>
</td>
</tr>
</table>
<p class="calign">
<input type="button" id="btnExport" value="エクスポート" class="btn bg-grad hi25 px100">
<input type="button" id="btnBack" value="戻る" class="btn bg-grad hi25 px100">
</p>
<input type="hidden" value="" id="s_type" name="type" />
</form>
</aside>
<div id="colMain">
<div class="mainIn">
<?php include_once('template/base_nav.php'); ?>
<article>
<div class="article-heading">
<h2><?php echo $page_title; ?><?php $this -> echoDetailAccount(); ?></h2>
<?php $this -> dispPager(); ?>
</div>
<?php $this -> echoList() ?>
<div class="article-bottom">
<?php $this -> dispPager(); ?>
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/account_transactions.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
\ No newline at end of file
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