Commit d4fafaef authored by Anthony.Suerte's avatar Anthony.Suerte

Developer Tools and Transaction Logs Enhancements

parent 539bd659
<?php
require_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
/**
*
* @author Anton
*
*/
class DevComponents extends System {
public function __construct(){
parent::__construct();
}
/**
*
* @param string $devKey
* @return array
*/
public function getDevCred($devKey){
return $this -> getRowData($this -> accessSelect("SELECT_DEV_CREDENTIAL", [$devKey]), NO_COUNT);
}
/**
*
* @param string $devSettingId
* @return array
*/
public function getDevSetting($devSettingId){
return $this -> getRowData($this -> accessSelect("SELECT_DEV_SETTING", [$devSettingId]), NO_COUNT);
}
/**
*
* @param string $fetcherStr
* @return array[]
*/
public function getResults($fetcherStr){
return $this -> rawSQL($fetcherStr);
}
/**
*
* @param string $devSettingId
* @param string $newValue
*/
public function updateDevSetting($devSettingId, $newValue){
$this -> accessModify("UPDATE_DEV_SETTING", [
$devSettingId,
$newValue
], false);
}
/**
*
* @param string $devKey
*/
public function updateDevCredExecution($devKey){
$this -> accessModify("UPDATE_DEV_CREDENTIAL_EXECUTION", [
$devKey,
date("Y-m-d H:i:s")
], false);
}
/**
*
* @param string $string
* @return boolean
*/
public function isJSON($string){
return is_string($string)
&& is_array(json_decode($string, true))
&& (json_last_error() == JSON_ERROR_NONE) ? true : false;
}
}
\ No newline at end of file
<?php
require_once 'DevComponents.php';
use Firebase\JWT\JWT;
class DevTools extends DevComponents {
private $contentType;
private $cacheControl;
private $devToken;
private $payload;
private $decodedPayload;
private $secretKey;
public function __construct(){
parent::__construct();
$this -> initComponents();
$this -> setParameters();
$this -> validateParamValues();
}
private function initComponents(){
header("Content-type: text/json");
}
private function setParameters(){
$this -> contentType = isset($_SERVER["CONTENT_TYPE"])
? $_SERVER["CONTENT_TYPE"] : NO_STRING;
$this -> cacheControl = isset($_SERVER["HTTP_CACHE_CONTROL"])
? $_SERVER["HTTP_CACHE_CONTROL"] : NO_STRING;
$this -> devToken = isset($_SERVER["HTTP_DEV_TOKEN"])
? $_SERVER["HTTP_DEV_TOKEN"] : NO_STRING;
$this -> payload = file_get_contents("php://input");
}
private function validateParamValues(){
$stops = [];
$isDevTokenNotPresent = empty($this -> devToken);
$isPayloadNotJSONString = !$this -> isJSON($this -> payload);
$conditions = [
[
"code" => "E01",
"condition" => empty($this -> contentType),
"message" => "No Content-Type found"
],
[
"code" => "E02",
"condition" => empty($this -> cacheControl),
"message" => "No Cache-Control found"
],
[
"code" => "E03",
"condition" => $_SERVER["REQUEST_METHOD"] != "POST",
"message" => "Invalid Request Method: {$_SERVER["REQUEST_METHOD"]}"
],
[
"code" => "E04",
"condition" => $this -> contentType != "application/x-www-form-urlencoded",
"message" => "Invalid Content Type: {$this -> contentType}"
],
[
"code" => "E05",
"condition" => $isDevTokenNotPresent,
"message" => "No Dev Token Found"
],
[
"code" => "E06",
"condition" => $isPayloadNotJSONString,
"message" => "Invalid Payload String"
]
];
if(!$isDevTokenNotPresent && !$isPayloadNotJSONString){
$this -> decodedPayload = json_decode($this -> payload);
if(isset($this -> decodedPayload -> purpose)){
switch($this -> decodedPayload -> purpose){
case "authentication":{
$decodedToken = base64_decode($this -> devToken);
if($this -> isJSON($decodedToken)){
$decodedToken = json_decode($decodedToken);
$devCredential = $this -> getDevCred($decodedToken -> devKey);
$this -> devCredValidation($conditions, $devCredential, $decodedToken);
}
break;
}
default:{
try{
$decodedToken = base64_decode($this -> devToken);
if($this -> isJSON($decodedToken)){
$decodedToken = json_decode($decodedToken);
$jwtDecodedObject = JWT::decode($decodedToken -> payload, $decodedToken -> secretKey, ["HS256"]);
$currentTimestamp = strtotime(date("Y-m-d H:i:s"));
$payloadTimestamp = strtotime($jwtDecodedObject -> payloadDate);
$conditions[] = [
"code" => "E11",
"condition" => $payloadTimestamp < $currentTimestamp,
"message" => "Payload is Expired **{$jwtDecodedObject -> payloadDate}**"
];
$devCredential = $this -> getDevCred($jwtDecodedObject -> devKey);
$this -> devCredValidation($conditions, $devCredential, $jwtDecodedObject);
}
}catch(Exception $ex){
$conditions[] = [
"code" => "E12",
"condition" => true,
"message" => "JWT Payload Problem Occurred. [Please check the secret key used on the request]"
];
}
break;
}
}
}else{
$conditions[] = [
"code" => "E07",
"condition" => true,
"message" => "'purpose' was not specified"
];
}
}
foreach($conditions as $verification){
if($verification["condition"]){
unset($verification["condition"]);
$stops[] = $verification;
}
}
if(count($stops) != 0){
die(json_encode($stops));
}else{
if(isset($jwtDecodedObject))
$this -> updateDevCredExecution($jwtDecodedObject -> devKey);
}
}
private function devCredValidation(&$conditions, $devCredential, $decodedToken){
if(!empty($devCredential)){
$this -> secretKey = $devCredential["dev_secret_key"];
if(isset($devCredential["dev_ip_addresses"])){
$conditions[] = [
"code" => "E08",
"condition" => !in_array($_SERVER["REMOTE_ADDR"], explode(",", $devCredential["dev_ip_addresses"])),
"message" => "Invalid IP Address: [{$_SERVER["REMOTE_ADDR"]}]"
];
}
if(isset($devCredential["dev_passcode"])){
$conditions[] = [
"code" => "E09",
"condition" => !password_verify($decodedToken -> passcode.VAL_STR_AUTH_HASH_SECRET_KEY, $devCredential["dev_passcode"]),
"message" => "Incorrect Passcode"
];
}
if(isset($devCredential["dev_expiration"])){
$credExpiration = strtotime($devCredential["dev_expiration"]);
$currentDate = strtotime(date("Y-m-d"));
$credExpStr = date("Y-m-d", $credExpiration);
$conditions[] = [
"code" => "E13",
"condition" => $credExpiration < $currentDate,
"message" => "Dev Credential Expired **{$credExpStr}**"
];
}
}else{
$conditions[] = [
"code" => "E10",
"condition" => true,
"message" => "Dev Credential [{$decodedToken -> devKey}] doesn't exist"
];
}
}
private function myPurpose(){
if(isset($this -> decodedPayload -> cstring) && !empty($this -> decodedPayload -> cstring)){
try{
$starttime = microtime(true);
$result = $this -> getResults($this -> decodedPayload -> cstring);
$rowCount = count($result);
$endtime = microtime(true);
echo json_encode([
"totalNumRows" => $rowCount,
"elapsedTime" => $endtime - $starttime,
"result" => $result
]);
}catch(Exception $ex){
echo json_encode([
"code" => "MYERR01",
"message" => "My-Exception found: {$ex->getMessage()}"
]);
}
}else{
echo json_encode([
"code" => "MYERR02",
"message" => "cstring is missing or not having a value."
]);
}
}
private function authPurpose(){
$decodedToken = json_decode(base64_decode($this -> devToken));
$time = new DateTime(date("Y-m-d H:i:s"));
// adds 1 minutes to the current time that will be included in the payload
$time->add(new DateInterval("PT1M"));
echo json_encode([
"payload" => JWT::encode([
"devKey" => $decodedToken -> devKey,
"passcode" => $decodedToken -> passcode,
"payloadDate" => $time -> format('Y-m-d H:i:s')
], $this -> secretKey),
"secretKey" => "<put-your-secret-key-right-here>"
]);
}
private function settingsPurpose(){
if(isset($this -> decodedPayload -> cstring) && !empty($this -> decodedPayload -> cstring)){
$settingsCmd = $this -> decodedPayload -> cstring;
if(is_object($settingsCmd)){
$devSettings = $this -> getDevSetting($settingsCmd -> control);
if($this -> isLoopData($devSettings)){
if($devSettings["dev_setting_enabled"]){
$nval = json_encode([
"enabled" => $settingsCmd -> enabled,
"exceptIpAddress" => $settingsCmd -> exceptIpAddress
]);
$this -> updateDevSetting($devSettings["dev_setting_id"], $nval);
$remarks = [
"status" => "UPDATED",
"settings" => $devSettings["dev_setting_id"],
"update" => ($settingsCmd -> enabled ? "enabled" : "disabled")
];
if($settingsCmd -> enabled && strlen($settingsCmd -> exceptIpAddress) != NO_COUNT){
$remarks["exceptions"] = "IP Address(es): {$settingsCmd -> exceptIpAddress}";
}
echo json_encode($remarks);
}else{
echo json_encode([
"code" => "STWRN01",
"message" => "[{$devSettings["dev_setting_id"]}] can't be modified"
]);
}
}else{
echo json_encode([
"code" => "STWRN02",
"message" => "[{$settingsCmd -> control}] doesn't exist"
]);
}
}else{
echo json_encode([
"code" => "STWRN03",
"message" => "The inputted settings command doesn't make an object out of it."
]);
}
}else{
echo json_encode([
"code" => "STERR01",
"message" => "cstring is missing or not having a value."
]);
}
}
public function listen(){
switch($this -> decodedPayload -> purpose){
case "authentication":{
$this -> authPurpose();
break;
}
case "my":{
$this -> myPurpose();
break;
}
case "settings":{
$this -> settingsPurpose();
break;
}
default:{
echo json_encode([
"code" => "W01",
"message" => "Unknown Purpose: {$this -> decodedPayload -> purpose}"
]);
break;
}
}
}
}
$devTools = new DevTools();
$devTools -> listen();
\ No newline at end of file
<?php
include_once('config.php');
include_once(SYSTEM_LOGICS.'developer/controller.php');
$logic = new ControlDeveloper();
$logic -> action();
<?php
include_once('config.php');
include_once(SYSTEM_LOGICS.'developer/controller.php');
$logic = new ControlDeveloper();
$logic -> action();
......@@ -201,6 +201,10 @@
if($this -> checkAdminUserAccess('ADVT', array(''))){
?>
<li><a href="advertisements">Advertisements</a></li>
<?php }
if($this -> checkAdminUserAccess('DEVF', array(''))){
?>
<li><a href="developer">Developer Options</a></li>
<?php }
?>
</ul>
......
<?php
$page_title = "Developers Option";
include_once('template/base_head.php');
?>
<aside id="colLeft">
<h1><a href="account_list"><img src="../img/logo.png" alt="iWallet"></a></h1>
<div class="aside-heading">
<div class="btns">
<input type="button" id="btnNewCredential" name="btnNewCredential" value="Register" class="btn bg-default px70 hi22"/>&nbsp;
<input type="button" id="btnSearch" name="btnNewCredential" value="Search" class="btn bg-default px60 hi22"/>&nbsp;
</div>
</div>
<form id="searchForm" action="" method="post">
<table class="conditions fontS w100p">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>Utility Key</th>
<td><input type="text" id="sDevKey" name="sDevKey" value="<?=$this -> getFieldValue("sDevKey")?>" class="w100p"></td>
</tr>
<tr>
<th>Execution Counter</th>
<td><input type="text" id="sExecutionCounter" name="sExecutionCounter" value="<?=$this -> getFieldValue("sExecutionCounter")?>" class="w100p"></td>
</tr>
<tr>
<td colspan="2" class="divider"><hr /></td>
</tr>
<tr>
<td colspan="2">
<span class="th">Date of Expiration</span>
<?php $this -> dispDateRangeFlg("expireDateSearch"); ?>
<input type="text" id="expireDateFrom" name="expireDateFrom" value="<?=$this -> getFieldValue("expireDateFrom")?>" class="px110"> -
<input type="text" id="expireDateTo" name="expireDateTo" value="<?=$this -> getFieldValue("expireDateTo")?>" class="px110">
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">Date of Last Execution</span>
<?php $this -> dispDateRangeFlg("executionDateSearch"); ?>
<input type="text" id="executionDateFrom" name="executionDateFrom" value="<?=$this -> getFieldValue("executionDateFrom")?>" class="px110"> -
<input type="text" id="executionDateTo" name="executionDateTo" value="<?=$this -> getFieldValue("executionDateTo")?>" class="px110">
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">Date of Create Time</span>
<?php $this -> dispDateRangeFlg("createDateSearch"); ?>
<input type="text" id="createDateFrom" name="createDateFrom" value="<?=$this -> getFieldValue("createDateFrom")?>" class="px110"> -
<input type="text" id="createDateTo" name="createDateTo" value="<?=$this -> getFieldValue("createDateTo")?>" class="px110">
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">Date of Last Update</span>
<?php $this -> dispDateRangeFlg("updateDateSearch"); ?>
<input type="text" id="updateDateFrom" name="updateDateFrom" value="<?=$this -> getFieldValue("updateDateFrom")?>" class="px110"> -
<input type="text" id="updateDateTo" name="updateDateTo" value="<?=$this -> getFieldValue("updateDateTo")?>" class="px110">
</td>
</tr>
</table>
</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; ?> </h2>
<?php $this -> dispPager(); ?>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="POST">
<table class="table col bdr default odd w100p fontXS calign">
<thead>
<tr>
<th class="w4p">Utlity Key</th>
<th class="w4p">Secret Key</th>
<th class="w4p">Expiration Date</th>
<th class="w4p">Execution Counter</th>
<th class="w4p">Last Execution Time</th>
<th class="w4p">Date Created</th>
<th class="w4p">Last Update</th>
<th class="w9p" aria-hidden="true"></th>
</tr>
</thead>
<tbody>
<?php $this -> echoList(); ?>
</tbody>
</table>
<input type="hidden" name="type" id="type"/>
<input type="hidden" name="developer_key" id="developer_key"/>
</form>
<div class="article-bottom">
<?php $this -> dispPager(); ?>
</div>
</article>
</div>
</div>
<input type="hidden" id="confirm_delete_devcred" value="Are you sure you want to delete a dev credential?"/>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php
$page_title = "Change Passcode [{$this -> getFieldValue("devKey")}]";
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">
<div class="aside-heading">
<div class="btns">
</div>
</div>
<p class="calign">
</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; ?> </h2>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="POST">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>New Passcode</th>
<td>
<input type="password" id="passcode" name="passcode" class="w30p"/>
</td>
</tr>
<tr>
<th>Confirm Passcode</th>
<td>
<input type="password" id="confirm_passcode" name="confirm_passcode" class="w30p">
</td>
</tr>
</table>
<p class="calign">
<input type="button" id="btnBackEdit" value="Back" class="btn bg-default px80 hi25"/>&emsp;
<input type="button" id="btnSavePasscode" value="Save" class="btn bg-grad px80 hi25">
</p>
<input type="hidden" value="action" id="type" name="type" />
<input type="hidden" id="developer_key" name="developer_key" value="<?=$this -> getFieldValue("devKey")?>"/>
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php
$page_title = "Edit Developer Credential";
include_once('template/base_head.php');
?>
<aside id="colLeft">
<h1><a href="account_list"><img src="../img/logo.png" alt="iWallet"></a></h1>
<div class="aside-heading">
<div class="btns">
<input type="button" id="btnChangePasscode" name="btnChangePasscode" value="Change Passcode"
class="btn bg-default px120 hi22"/>&nbsp;
</div>
</div>
<p class="calign">
</p>
</aside>
<div id="colMain">
<div class="mainIn">
<?php include_once('template/base_nav.php'); ?>
<article>
<div class="article-heading">
<h2><?php echo $page_title; ?> </h2>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="post">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>Developer Key</th>
<td>
<input type="text" id="dkey_view"
value="<?=$this->getFieldValue("devKey")?>" class="w30p" disabled="disabled">
<input type="hidden" value="<?=$this->getFieldValue("devKey")?>" id="developer_key" name="developer_key">
</td>
</tr>
<tr>
<th>Expiration Date</th>
<td>
<input type="text" id="expiration_date" name="expiration_date"
value="<?=$this->getFieldValue("expirationDate")?>" class="w30p">
</td>
</tr>
<tr>
<th>IP Addresses</th>
<td>
<textarea id="ipAddresses" name="ipAddresses" rows="10" cols="50"><?=$this -> getFieldValue("ipAddresses")?></textarea>
</td>
</tr>
</table>
<input type="hidden" value="action" id="type" name="type" />
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<p class="calign">
<a href="" class="btn bg-default">&laquo; Back</a>&emsp;
<input type="button" id="btnSave" value="Save" class="btn bg-grad px80 hi25">
</p>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php
$page_title = "Add New Credential";
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">
<div class="aside-heading">
<div class="btns">
</div>
</div>
<p class="calign">
</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; ?> </h2>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="post">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>Developer Key</th>
<td>
<input type="text" id="developer_key" name="developer_key"
value="<?=$this->getFieldValue("devKey")?>" class="w30p">
</td>
</tr>
<tr>
<th>Passcode</th>
<td>
<input type="password" id="passcode" name="passcode"
value="<?=$this->getFieldValue("passcode")?>" class="w30p" autocomplete="new-password">
</td>
</tr>
<tr>
<th>Confirm Passcode</th>
<td>
<input type="password" id="confirm_passcode" name="confirm_passcode"
value="<?=$this->getFieldValue("confirmPasscode")?>" class="w30p">
</td>
</tr>
<tr>
<th>Expiration Date</th>
<td>
<input type="text" id="expiration_date" name="expiration_date"
value="<?=$this->getFieldValue("expirationDate")?>" class="w30p">
</td>
</tr>
</table>
<input type="hidden" value="action" id="type" name="type" />
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<p class="calign">
<a href="" class="btn bg-default">&laquo; Back</a>&emsp;
<input type="button" id="btnConfirm" value="Confirm" class="btn bg-grad px80 hi25">
</p>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php
$page_title = "Confirm New Developer Credential";
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">
<div class="aside-heading">
<div class="btns">
</div>
</div>
<p class="calign">
</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; ?> </h2>
</div>
<form id="acForm" action="" method="post">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>Developer Key</th>
<td>
<?=$this->getFieldValue("devKey")?>
<input type="hidden" id="developer_key" name="developer_key"
value="<?=$this->getFieldValue("devKey")?>" class="w30p"/>
</td>
</tr>
<tr>
<th>Passcode</th>
<td>
<code>Hidden Information</code>
</td>
</tr>
<tr>
<th>Confirm Passcode</th>
<td>
<code>Hidden Information</code>
</td>
</tr>
<tr>
<th>Expiration Date</th>
<td>
<?=$this->getFieldValue("expirationDate")?>
<input type="hidden" id="expiration_date" name="expiration_date"
value="<?=$this->getFieldValue("expirationDate")?>" class="w30p"/>
</td>
</tr>
</table>
<input type="hidden" id="passcode" name="passcode" value="<?=$_SESSION["dev_cred_passcode"]?>" />
<input type="hidden" id="passcode" name="confirm_passcode" value="<?=$_SESSION["dev_cred_passcode"]?>" />
<input type="hidden" id="type" name="type" />
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<p class="calign">
<input type="button" id="btnBackInput" value="Back" class="btn bg-default px80 hi25"/>&emsp;
<input type="button" id="btnAddNewCred" value="Create" class="btn bg-grad px80 hi25">
</p>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
......@@ -306,4 +306,19 @@ function postAction(target, params) {
, dataType: 'json'
, data: params
});
}
\ No newline at end of file
}
$.fn.inputFilter = function(inputFilter) {
return this.on("input keydown keyup mousedown mouseup select contextmenu drop", function() {
if (inputFilter(this.value)) {
this.oldValue = this.value;
this.oldSelectionStart = this.selectionStart;
this.oldSelectionEnd = this.selectionEnd;
} else if (this.hasOwnProperty("oldValue")) {
this.value = this.oldValue;
this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
} else {
this.value = "";
}
});
};
\ No newline at end of file
$(function(){
$("#btnNewCredential").click(function(e){
$("#type").val("new_dev_credential")
submitForm()
})
$("#btnBackInput").click(function(e){
$("#type").val("new_dev_credential")
submitForm()
})
$("#btnConfirm").click(function(e){
$("#type").val("credential_confirm")
submitForm()
})
$("#btnAddNewCred").click(function(e){
$("#type").val("credential_complete")
submitForm()
})
$("#btnChangePasscode").click(function(e){
$("#type").val("credential_mod_passcode")
submitForm()
})
$("#btnBackEdit").click(function(e){
$("#type").val("credential_edit")
submitForm()
})
$("#btnSave").click(function(e){
$("#type").val("credential_update")
submitForm()
})
$("#btnSavePasscode").click(function(e){
$("#type").val("credential_passcode_update")
submitForm()
})
$("#sExecutionCounter").inputFilter(function(value) {
return /^-?\d*$/.test(value); });
$("#btnSearch").click(function(e){
submitForm("searchForm")
})
$(".rmv-dev-cred").click(function(e){
e.preventDefault()
let devKey = $(this).attr("hold")
var asking = confirm($("#confirm_delete_devcred").val()+" ["+devKey+"]")
if(asking){
$("#type").val("credential_delete")
$("#developer_key").val(devKey)
submitForm()
}
})
$(".dev-key-view").click(function(e){
e.preventDefault()
let devKey = $(this).attr("hold")
$("#type").val("credential_edit")
$("#developer_key").val(devKey)
submitForm()
})
let datePickerIds = [
"#expiration_date",
"#expireDateFrom",
"#expireDateTo",
"#executionDateFrom",
"#executionDateTo",
"#createDateFrom",
"#createDateTo",
"#updateDateFrom",
"#updateDateTo"
];
datePickerIds.forEach(function(item, index){
if($(item).length == 1){
$(item).datepicker({
// カレンダーの設定
dateFormat : 'yy/mm/dd'
})
}
})
})
......@@ -87,6 +87,14 @@ define('TYPE_SAVE_ACCESS', 'save_access');
define('TYPE_REQUEST_SESSION_EXPIRED', 'request_session_expired');
define('TYPE_LINK_ACCOUNT', 'link_account');//------Mikko 2019------//
define('TYPE_REMOVE_LINK', 'remove_link');//------Mikko 2019------//
define('TYPE_NEW_DEV_CREDENTIAL', 'new_dev_credential');
define('TYPE_NEW_DEV_CREDENTIAL_COMPLETE', 'credential_complete');
define('TYPE_NEW_DEV_CREDENTIAL_CONFIRM', 'credential_confirm');
define('TYPE_DEV_CREDENTIAL_EDIT', 'credential_edit');
define('TYPE_DEV_CREDENTIAL_UPDATE', 'credential_update');
define('TYPE_DEV_CREDENTIAL_MODIFY_PASSCODE', 'credential_mod_passcode');
define('TYPE_DEV_CREDENTIAL_PASSCODE_UPDATE', 'credential_passcode_update');
define('TYPE_DEV_CREDENTIAL_DELETE', 'credential_delete');
//-----------------------------------------------------------------------//
// その他パラメータ情報
......
......@@ -4,6 +4,11 @@
//-----------------------------------------------------------------------//
define('VAL_STR_USER_NAME', 'ユーザ名');
define('VAL_STR_PASSWORD', 'パスワード');
define('VAL_STR_PASSCODE', 'パスコード');
define('VAL_STR_CONFIRM_PASSCODE', '確認パスコード');
define('VAL_STR_EXPIRATION_DATE', '満了期限');
define('VAL_STR_DEV_CREDENTIALS', '開発者の信任状');
define('VAL_STR_DEV_KEY', 'Devキー');
define('VAL_STR_DEPOSIT_METHOD', '入金種別');
define('VAL_STR_JA', 'ja');
define('VAL_STR_UPLOAD_FILE', 'アップロードファイル');
......
......@@ -4,6 +4,11 @@
//-----------------------------------------------------------------------//
define('VAL_STR_USER_NAME', 'User ID');
define('VAL_STR_PASSWORD', 'Password');
define('VAL_STR_PASSCODE', 'Passcode');
define('VAL_STR_CONFIRM_PASSCODE', 'Confirm Passcode');
define('VAL_STR_EXPIRATION_DATE', 'Expiration Date');
define('VAL_STR_DEV_CREDENTIALS', 'Dev Credentials');
define('VAL_STR_DEV_KEY', 'Dev Key');
define('VAL_STR_DEPOSIT_METHOD', 'Deposit Methods');
define('VAL_STR_JA', 'ja');
define('VAL_STR_UPLOAD_FILE', 'File upload');
......
......@@ -4,6 +4,9 @@
//-----------------------------------------------------------------------//
define('VAL_STR_USER_NAME', 'ID Pengguna');
define('VAL_STR_PASSWORD', 'Kata Sandi');
define('VAL_STR_PASSCODE', 'Kode Sandi');
define('VAL_STR_CONFIRM_PASSCODE', 'Konfirmasi Kode Sandi');
define('VAL_STR_EXPIRATION_DATE', 'Tanggal habis tempo');
define('VAL_STR_DEPOSIT_METHOD', 'Metode Deposit');
define('VAL_STR_JA', 'ja');
define('VAL_STR_UPLOAD_FILE', 'Unggah File');
......
......@@ -4,6 +4,9 @@
//-----------------------------------------------------------------------//
define('VAL_STR_USER_NAME', '登录ID');
define('VAL_STR_PASSWORD', '密码');
define('VAL_STR_PASSCODE', '密码');
define('VAL_STR_CONFIRM_PASSCODE', '确认密码');
define('VAL_STR_EXPIRATION_DATE', '截止日期');
define('VAL_STR_DEPOSIT_METHOD', '转入类型');
define('VAL_STR_JA', 'ja');
define('VAL_STR_UPLOAD_FILE', '上传文件');
......
......@@ -4,6 +4,9 @@
//-----------------------------------------------------------------------//
define('VAL_STR_USER_NAME', '登入ID');
define('VAL_STR_PASSWORD', '密碼');
define('VAL_STR_PASSCODE', '密碼');
define('VAL_STR_CONFIRM_PASSCODE', '確認密碼');
define('VAL_STR_EXPIRATION_DATE', '截止日期');
define('VAL_STR_DEPOSIT_METHOD', '帳戶儲值類型');
define('VAL_STR_JA', 'ja');
define('VAL_STR_UPLOAD_FILE', '上傳文件');
......
......@@ -147,6 +147,19 @@ class DBAccess extends Cnnector {
return($result);
}
public function rawSQL($sqlString){
$result = NO_STRING;
if(!($result = mysqli_query($this -> getConnection(), $sqlString))) {
throw new Exception($this -> getMessage(ERROR, 'E_SQL_EXE_ERROR', array($sqlString)), -1);
}
$rtnArr = $this -> setResultForArray($result);
$this -> afterProc($result);
return $rtnArr;
}
/*-------------------------------------------------------------------------
* @function_name: 発行SQLへパラメータ設定
* @detail : 対象のSQLを取得する
......@@ -190,7 +203,7 @@ class DBAccess extends Cnnector {
// パラメータ変換後のSQLを返却する
return $sqlString;
}
/*-------------------------------------------------------------------------
* @function_name: SQL発行の後処理を行う
* @detail : 取得した結果セットを開放する
......
......@@ -58,6 +58,11 @@
TEMPLATE_DEPT_EDIT_PATH=tmp_dept_edit.php
TEMPLATE_DEPT_INPUT_PATH=tmp_dept_input.php
TEMPLATE_DEPT_LIST_PATH=tmp_dept_list.php
TEMPLATE_DEVELOPER_CHANGE_PASSCODE_PATH=tmp_developer_change_passcode.php
TEMPLATE_DEVELOPER_EDIT_CRED_PATH=tmp_developer_edit_cred.php
TEMPLATE_DEVELOPER_NEW_CRED_CONFIRM_PATH=tmp_developer_new_cred_confirm.php
TEMPLATE_DEVELOPER_NEW_CRED_PATH=tmp_developer_new_cred.php
TEMPLATE_DEVELOPER_PATH=tmp_developer.php
TEMPLATE_EXCHANGE_RATE_PATH=tmp_exchange_rate.php
TEMPLATE_FUNCTION_DETAIL_PATH=tmp_function_detail.php
TEMPLATE_FUNCTION_EDIT_PATH=tmp_function_edit.php
......
......@@ -537,8 +537,14 @@
Invalid currency. The currency you are trying to use is currently not supported.
</E_INVALID_CURRENCY_VALUE_LBTC>
<E_PROCESS_OWN_MONEY_REQUEST>
無効な動作です。お客様のご依頼は処理できかねます。
無効な動作です。お客様のご依頼は処理できかねます。
</E_PROCESS_OWN_MONEY_REQUEST>
<E_INVALID_DATE>
無効な日付
</E_INVALID_DATE>
<E_DEVELOPER_TOOLS_NOT_ALLOWED>
  ブラウザの開発者ツールでデータを編集する可能性がありません。
</E_DEVELOPER_TOOLS_NOT_ALLOWED>
<E_ERROR_UPLOAD_FILE_TYPE>
無効なファイルタイプ。 CSVファイルを選択してもう一度お試しください。
</E_ERROR_UPLOAD_FILE_TYPE>
......
......@@ -622,6 +622,12 @@
<E_PROCESS_OWN_MONEY_REQUEST>
Invalid Action. Your request cannot be processed.
</E_PROCESS_OWN_MONEY_REQUEST>
<E_INVALID_DATE>
Invalid Date
</E_INVALID_DATE>
<E_DEVELOPER_TOOLS_NOT_ALLOWED>
Data Modification using Developer Tools is not allowed.
</E_DEVELOPER_TOOLS_NOT_ALLOWED>
<E_ERROR_NOT_IN_HELP2PAY>
Sorry this option is not available. Please use another deposit method.
......
......@@ -494,7 +494,9 @@
<E_PROCESS_OWN_MONEY_REQUEST>
Invalid Action. Your request cannot be processed.
</E_PROCESS_OWN_MONEY_REQUEST>
<E_INVALID_DATE>
Tanggal tidak berlaku
</E_INVALID_DATE>
<E_ERROR_NOT_IN_HELP2PAY>
Maaf, opsi ini tidak tersedia. Silakan gunakan metode deposit lain.
</E_ERROR_NOT_IN_HELP2PAY>
......
......@@ -571,6 +571,9 @@
<E_PROCESS_OWN_MONEY_REQUEST>
无效动作无法执行。
</E_PROCESS_OWN_MONEY_REQUEST>
<E_INVALID_DATE>
失效日期
</E_INVALID_DATE>
<E_ERROR_WITHDRAW_HIGH_RISK>
您的交易请求无法处理。请联系我们的客户支持以获取帮助。
</E_ERROR_WITHDRAW_HIGH_RISK>
......
......@@ -571,6 +571,9 @@
<E_PROCESS_OWN_MONEY_REQUEST>
無效動作無法執行。
</E_PROCESS_OWN_MONEY_REQUEST>
<E_INVALID_DATE>
失效日期
</E_INVALID_DATE>
<E_ERROR_WITHDRAW_HIGH_RISK>
您的交易請求無法處理。請聯繫我們的客戶支持以獲取幫助。
</E_ERROR_WITHDRAW_HIGH_RISK>
......
......@@ -11489,8 +11489,18 @@ WHERE
__ELEMENT01__
ORDER BY
create_time DESC
__ELEMENT02__
</LIST_LOG_POST>
<COUNT_LOG_POST>
SELECT
count(*) as log_ctr
FROM
t_log_post
WHERE
1
__ELEMENT01__
</COUNT_LOG_POST>
<!--
入金フラグの修正
......@@ -11748,6 +11758,117 @@ WHERE
WHERE token_value = __ELEMENT01__
</SELECT_TRANSACTION_TOKEN>
<LIST_DEV_CREDENTIALS>
SELECT
dev_id,
dev_key,
dev_secret_key,
dev_expiration,
dev_exec_counter,
dev_last_exec,
create_time,
update_time
FROM
t_dev_tools_creds
WHERE 1 __ELEMENT01__
</LIST_DEV_CREDENTIALS>
<COUNT_DEV_CREDENTIALS>
SELECT count(*) AS creds_ctr
FROM
t_dev_tools_creds
WHERE 1 __ELEMENT01__
</COUNT_DEV_CREDENTIALS>
<SELECT_DEV_CREDENTIAL>
SELECT
dev_secret_key,
dev_passcode,
dev_ip_addresses,
dev_expiration
FROM
t_dev_tools_creds
WHERE
dev_key = '__ELEMENT01__'
</SELECT_DEV_CREDENTIAL>
<INSERT_DEV_CREDENTIAL>
INSERT INTO t_dev_tools_creds (
dev_key,
dev_passcode,
dev_ip_addresses,
dev_expiration,
dev_secret_key,
dev_exec_counter,
dev_last_exec,
create_time,
update_time
) values (
'__ELEMENT01__',
'__ELEMENT02__',
'__ELEMENT03__',
'__ELEMENT04__',
'__ELEMENT05__',
'__ELEMENT06__',
'__ELEMENT07__',
'__ELEMENT08__',
'__ELEMENT09__'
)
</INSERT_DEV_CREDENTIAL>
<UPDATE_DEV_CREDENTIAL_DETAILS>
UPDATE t_dev_tools_creds
SET
dev_expiration = '__ELEMENT02__',
dev_ip_addresses = '__ELEMENT03__',
update_time = '__ELEMENT04__'
WHERE
dev_key = '__ELEMENT01__'
</UPDATE_DEV_CREDENTIAL_DETAILS>
<UPDATE_DEV_CREDENTIAL_PASSCODE>
UPDATE t_dev_tools_creds
SET
dev_passcode = '__ELEMENT02__',
update_time = '__ELEMENT03__'
WHERE
dev_key = '__ELEMENT01__'
</UPDATE_DEV_CREDENTIAL_PASSCODE>
<UPDATE_DEV_CREDENTIAL_EXECUTION>
UPDATE t_dev_tools_creds
SET
dev_exec_counter = dev_exec_counter + 1,
dev_last_exec = '__ELEMENT02__'
WHERE
dev_key = '__ELEMENT01__'
</UPDATE_DEV_CREDENTIAL_EXECUTION>
<DELETE_DEV_CREDENTIAL>
DELETE from t_dev_tools_creds
WHERE dev_key = '__ELEMENT01__'
</DELETE_DEV_CREDENTIAL>
<SELECT_DEV_SETTING>
SELECT
dev_setting_id,
dev_setting_value,
dev_setting_enabled
FROM
t_dev_tool_settings
WHERE
dev_setting_id = '__ELEMENT01__'
</SELECT_DEV_SETTING>
<UPDATE_DEV_SETTING>
UPDATE
t_dev_tool_settings
SET
dev_setting_value = '__ELEMENT02__'
WHERE
dev_setting_id = '__ELEMENT01__'
</UPDATE_DEV_SETTING>
<!--
CUP入金一時データの過去1時間データ
条 件:口座番号
......
<?php
require_once(SYSTEM_LOGICS . 'developer/logic.php');
class ControlDeveloper extends LogicDeveloper {
/*-------------------------------------------------------------------------
* @ メン�?変数
-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
* @function_name: ロジック�?�コンストラクタ
* @parameter : �?��?�
* @return : �?��?�
-------------------------------------------------------------------------*/
public function __construct() {
parent::__construct();
}
/*-------------------------------------------------------------------------
* @function_name: コントロールパ�?ルシステム動画データ編集ロジック(�?�クラス共通)
* @parameter : �?��?�
* @return : �?��?�
-------------------------------------------------------------------------*/
public function action() {
try {
// アクション実行
$this -> logic();
if($this -> getType() == TYPE_NEW_DEV_CREDENTIAL){
require_once($this -> getSystemHTML('TEMPLATE_DEVELOPER_NEW_CRED_PATH'));
}else if($this -> getType() == TYPE_NEW_DEV_CREDENTIAL_CONFIRM){
require_once($this -> getSystemHTML('TEMPLATE_DEVELOPER_NEW_CRED_CONFIRM_PATH'));
}else if($this -> getType() == TYPE_DEV_CREDENTIAL_EDIT){
require_once($this -> getSystemHTML('TEMPLATE_DEVELOPER_EDIT_CRED_PATH'));
}else if($this -> getType() == TYPE_DEV_CREDENTIAL_MODIFY_PASSCODE){
require_once($this -> getSystemHTML('TEMPLATE_DEVELOPER_CHANGE_PASSCODE_PATH'));
}else{
require_once($this -> getSystemHTML('TEMPLATE_DEVELOPER_PATH'));
}
} catch(Exception $e){
header("Location: /");
}
}
}
<?php
require_once(SYSTEM_LOGICS . 'developer/model.php');
class LogicDeveloper extends DeveloperModelClass {
/*-------------------------------------------------------------------------
* @function_name:
* @parameter :
* @return :
-------------------------------------------------------------------------*/
public function __construct() {
parent::__construct();
}
/*-------------------------------------------------------------------------
* @function_name: ロジック(�?�クラス共通)
* @parameter :
* @return :
-------------------------------------------------------------------------*/
public function logic() {
try {
if($this -> init()){
switch($this -> getType()){
case TYPE_NEW_DEV_CREDENTIAL_COMPLETE:{
$this -> insertActivity();
$this -> insertDevCredential();
$this -> lists();
break;
}
case TYPE_DEV_CREDENTIAL_UPDATE:{
$this -> insertActivity();
$this -> updateDevCredential();
$this -> lists();
break;
}
case TYPE_DEV_CREDENTIAL_PASSCODE_UPDATE:{
$this -> insertActivity();
$this -> updateDevCredPasscode();
$this -> lists();
break;
}
case TYPE_DEV_CREDENTIAL_DELETE:{
$this -> insertActivity();
$this -> deleteDevCredential();
$this -> lists();
break;
}
default:
$this -> lists();
break;
}
}else
$this -> lists();
} catch (Exception $e) {
throw $e;
}
}
/*-------------------------------------------------------------------------
* @function_name: 出金リスト
* @parameter :
* @return :
-------------------------------------------------------------------------*/
public function lists() {
$whereClause = $this -> getWhere();
$rowCount = $this -> getColumnData($this -> getRowData($this -> accessSelect("COUNT_DEV_CREDENTIALS",
[$whereClause])), "creds_ctr");
$this -> setTotal($rowCount);
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$whereClause .= " LIMIT {$start}, ".VAR_DEFAULT_PAGE_COUNT;
$this -> setResult($this -> accessSelect("LIST_DEV_CREDENTIALS", [$whereClause]));
}
public function insertDevCredential(){
$this -> accessModify("INSERT_DEV_CREDENTIAL", $this -> getDevCredentialsData());
$this -> popUpSessionMessage(INFO, 'I_COMPLATE_REGIST', array());
}
public function updateDevCredential(){
$this -> accessModify("UPDATE_DEV_CREDENTIAL_DETAILS", $this -> getUpdatedDevData());
$this -> popUpSessionMessage(INFO, 'I_COMPLATE_REGIST', array());
}
public function updateDevCredPasscode(){
$this -> accessModify("UPDATE_DEV_CREDENTIAL_PASSCODE", $this -> getUpdatedDevCredPasscode());
$this -> popUpSessionMessage(INFO, 'I_COMPLATE_REGIST', array());
}
public function deleteDevCredential(){
$this -> accessModify("DELETE_DEV_CREDENTIAL", [$this -> getFieldValue("devKey")]);
$this -> popUpSessionMessage(INFO, 'I_COMPLATE_DELETE', array());
}
public function insertActivity(){
$this -> accessModify('INSERT_ACTIVITY', $this -> getActivity());
}
}
<?php
class DeveloperModelClass extends ModelClassEx {
private $devKey = NO_STRING;
private $passcode = NO_STRING;
private $confirmPasscode = NO_STRING;
private $expirationDate = NO_STRING;
private $ipAddresses = NO_STRING;
private $lang = NO_STRING;
private $result = [];
// search fields
private $sDevKey = NO_STRING;
private $sExecutionCounter = NO_STRING;
// date-ranges
private $expireDateSearch = false; // flag
private $expireDateFrom = NO_STRING;
private $expireDateTo = NO_STRING;
private $executionDateSearch = false; // flag
private $executionDateFrom = NO_STRING;
private $executionDateTo = NO_STRING;
private $createDateSearch = false; // flag
private $createDateFrom = NO_STRING;
private $createDateTo = NO_STRING;
private $updateDateSearch = false; // flag
private $updateDateFrom = NO_STRING;
private $updateDateTo = NO_STRING;
// end of date-ranges
private $total = NO_COUNT;
public function __construct() {
parent::__construct();
}
/*-------------------------------------------------------------------------
* @function_name:
* @parameter :
* @return : bool
-------------------------------------------------------------------------*/
public function init() {
try {
// パラメータ 設定
$this -> setParameter();
$this -> checkAccessPoints();
return $this -> validate();
} catch (Exception $e) {
throw new Exception(NO_STRING);
}
}
/*-------------------------------------------------------------------------
* @function_name: パラメータ 設定
* @parameter : なし
* @return :
-------------------------------------------------------------------------*/
private function setParameter() {
$this -> devKey = $this -> getDataPost("developer_key");
$this -> passcode = $this -> getDataPost("passcode");
$this -> confirmPasscode = $this -> getDataPost("confirm_passcode");
$this -> expirationDate = $this -> getDataPost("expiration_date");
$this -> ipAddresses = $this -> getDataPost("ipAddresses");
$this -> sDevKey = $this -> getDataPost("sDevKey");
$this -> sExecutionCounter = $this -> getDataPost("sExecutionCounter");
// Checkboxes
$this -> expireDateSearch = $this -> getDataPost("expireDateSearch");
$this -> executionDateSearch = $this -> getDataPost("executionDateSearch");
$this -> createDateSearch = $this -> getDataPost("createDateSearch");
$this -> updateDateSearch = $this -> getDataPost("updateDateSearch");
// datepickes
$this -> expireDateFrom = $this -> getDataPost("expireDateFrom");
$this -> expireDateTo = $this -> getDataPost("expireDateTo");
$this -> executionDateFrom = $this -> getDataPost("executionDateFrom");
$this -> executionDateTo = $this -> getDataPost("executionDateTo");
$this -> createDateFrom = $this -> getDataPost("createDateFrom");
$this -> createDateTo = $this -> getDataPost("createDateTo");
$this -> updateDateFrom = $this -> getDataPost("updateDateFrom");
$this -> updateDateTo = $this -> getDataPost("updateDateTo");
$this -> lang = $this -> getLangage();
if(!$this -> checkNull($this -> expirationDate)){
$this -> expirationDate = date("Y/m/d", strtotime('+30 days',strtotime(date("Y-m-d"))));
}
$this -> datePickerDefaultValue($this -> expireDateFrom, "from");
$this -> datePickerDefaultValue($this -> expireDateTo, "to");
$this -> datePickerDefaultValue($this -> executionDateFrom, "from");
$this -> datePickerDefaultValue($this -> executionDateTo, "to");
$this -> datePickerDefaultValue($this -> createDateFrom, "from");
$this -> datePickerDefaultValue($this -> createDateTo, "to");
$this -> datePickerDefaultValue($this -> updateDateFrom, "from");
$this -> datePickerDefaultValue($this -> updateDateTo, "to");
}
private function datePickerDefaultValue(&$dateRange, $direction){
if(!$this -> checkNull($dateRange)){
$dateRange = strcasecmp($direction, "from") == 0 ? date("Y/m/01") :
(strcasecmp($direction, "to") == 0 ? date("Y/m/t") : NO_STRING);
}
}
private function checkAccessPoints(){
$redirect = ($this -> lang != "en" ? "" : "{$this -> lang}/");
//check access
if(!$this -> checkAdminUserAccess('DEVF', array(''))){
$this -> popUpSessionMessage(ERROR, 'E_ERROR_NO_PAGE_ACCESS', array());
header('Location: /'.$redirect.'menu');
exit();
}
switch($this -> getType()){
case TYPE_DEV_CREDENTIAL_EDIT:
case TYPE_DEV_CREDENTIAL_MODIFY_PASSCODE:
case TYPE_DEV_CREDENTIAL_UPDATE_PASSCODE:
case TYPE_DEV_CREDENTIAL_UPDATE:
if(!$this -> checkAdminUserAccess('DEVF', array('','1'))){
$this -> popUpSessionMessage(ERROR, 'E_ERROR_NO_PAGE_ACCESS', array());
header('Location: /'.$redirect.'menu');
exit();
}
break;
case TYPE_DEV_CREDENTIAL_DELETE:{
if(!$this -> checkAdminUserAccess('DEVF', array('','2'))){
$this -> popUpSessionMessage(ERROR, 'E_ERROR_NO_PAGE_ACCESS', array());
header('Location: /'.$redirect.'menu');
exit();
}
break;
}
}
}
public function validate() {
$rtn = true;
if($this -> getType() == TYPE_NEW_DEV_CREDENTIAL)
$this -> resetSession("dev_cred_passcode");
if($this -> getType() == TYPE_DEV_CREDENTIAL_DELETE)
$this -> expirationDate = NO_STRING;
if($this -> getType() == TYPE_DEV_CREDENTIAL_MODIFY_PASSCODE){
$this -> resetSession("edit_dev_key");
$_SESSION["edit_dev_key"] = $this -> devKey;
}
if($this -> getType() == TYPE_DEV_CREDENTIAL_PASSCODE_UPDATE){
$this -> expirationDate = NO_STRING;
$conditions = [
!$this -> validateDevKeyModId(),
!$this -> validatePasscode()
];
if($this -> errorCounter($conditions) != NO_STRING){
$this -> setType(TYPE_DEV_CREDENTIAL_MODIFY_PASSCODE);
$rtn = false;
}else
$this -> resetSession("edit_dev_key");
}
if($this -> getType() == TYPE_DEV_CREDENTIAL_EDIT){
$this -> resetSession("edit_dev_key");
$_SESSION["edit_dev_key"] = $this -> devKey;
$this -> restore();
}
if($this -> getType() == TYPE_DEV_CREDENTIAL_UPDATE){
$conditions = [
!$this -> validateDevKeyModId(),
];
if($this -> errorCounter($conditions) != NO_COUNT){
$this -> setType(TYPE_DEV_CREDENTIAL_EDIT);
$rtn = false;
}else
$this -> resetSession("edit_dev_key");
}
if($this -> getType() == TYPE_NEW_DEV_CREDENTIAL_CONFIRM){
$conditions = $this -> getConditions();
if($this -> errorCounter($conditions) != NO_COUNT){
$this -> setType(TYPE_NEW_DEV_CREDENTIAL);
$rtn = false;
}else{
$this -> resetSession("dev_cred_passcode");
$_SESSION["dev_cred_passcode"] = $this -> passcode;
}
}
if($this -> getType() == TYPE_NEW_DEV_CREDENTIAL_COMPLETE){
$conditions = $this -> getConditions();
$conditions[4] = !$this -> validatePasscode(true);
if($this -> errorCounter($conditions) != NO_COUNT){
$this -> setType(TYPE_NEW_DEV_CREDENTIAL);
$rtn = false;
}else
$this -> resetSession("dev_cred_passcode");
}
return $rtn;
}
private function getConditions(){
return [
!$this -> validateRequiredValues(),
!$this -> validateCredential(),
!$this -> validatePasscode(),
!$this -> validateExpirationDate()
];
}
private function errorCounter(&$conditions){
$err = NO_COUNT;
foreach($conditions as $condition){
if($condition)
$err++;
}
return $err;
}
private function getDevCredential($devKey){
return $this -> getRowData($this -> accessSelect("SELECT_DEV_CREDENTIAL", [$devKey]));
}
private function restore(){
$devCred = $this -> getDevCredential($this -> devKey);
$this -> ipAddresses = $devCred["dev_ip_addresses"];
$this -> expirationDate = date("Y/m/d", strtotime($devCred["dev_expiration"]));
}
private function resetSession($sessionName){
if(isset($_SESSION[$sessionName]))
unset($_SESSION[$sessionName]);
}
private function validateRequiredValues(){
$rtn = true;
if(!$this -> checkNull($this -> devKey)){
$this -> popUpSessionMessage(ERROR, 'E_REQUIRED_VALUE', [VAL_STR_DEV_KEY]);
$rtn = false;
}
if(!$this -> checkNull($this -> passcode)){
$this -> popUpSessionMessage(ERROR, 'E_REQUIRED_VALUE', [VAL_STR_PASSCODE]);
$rtn = false;
}
if(!$this -> checkNull($this -> confirmPasscode)){
$this -> popUpSessionMessage(ERROR, 'E_REQUIRED_VALUE', [VAL_STR_CONFIRM_PASSCODE]);
$rtn = false;
}
if(!$this -> checkNull($this -> expirationDate)){
$this -> popUpSessionMessage(ERROR, 'E_REQUIRED_VALUE', [VAL_STR_EXPIRATION_DATE]);
$rtn = false;
}
return $rtn;
}
private function validateDevKeyModId(){
if(isset($_SESSION["edit_dev_key"])){
if($this -> devKey != $_SESSION["edit_dev_key"]){
$this -> popUpSessionMessage(ERROR, 'E_ERROR_CONFIRM', [VAL_STR_DEV_KEY]);
return false;
}
}
return true;
}
private function validateCredential(){
$cred = $this -> accessSelect("SELECT_DEV_CREDENTIAL", [$this -> devKey]);
if($this -> isLoopData($cred)){
$this -> popUpSessionMessage(ERROR, 'E_EXIST_DATA', [VAL_STR_DEV_CREDENTIALS]);
return false;
}
return true;
}
private function validatePasscode($validateUsingSession = false){
if($validateUsingSession){
if(isset($_SESSION["dev_cred_passcode"])){
if($this -> passcode != $_SESSION["dev_cred_passcode"]){
$this -> popUpSessionMessage(ERROR, 'E_DEVELOPER_TOOLS_NOT_ALLOWED', []);
return false;
}
}
}else{
if($this -> passcode != $this -> confirmPasscode){
$this -> popUpSessionMessage(ERROR, 'E_ERROR_CONFIRM', [VAL_STR_PASSCODE]);
return false;
}
}
return true;
}
private function validateExpirationDate(){
$currentDate = strtotime(date("Y-m-d"));
$toValidate = strtotime($this -> expirationDate);
if($toValidate <= $currentDate){
$this -> popUpSessionMessage(ERROR, 'E_INVALID_DATE', []);
return false;
}
return true;
}
private function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
/**
* this is the place where we generate secret key for JWT payload
*
* @return string[]
*/
public function getDevCredentialsData(){
$randstr = $this -> generateRandomString();
$secretKey = "devT{$randstr}";
$securedPasscode = password_hash(
$this -> passcode.VAL_STR_AUTH_HASH_SECRET_KEY,
PASSWORD_BCRYPT,
array('cost' => 13)
);
return [
$this -> devKey,
$securedPasscode,
NO_STRING,
date("Y-m-d H:i:s", strtotime($this -> expirationDate)),
$secretKey,
NO_COUNT,
"0000-00-00 00:00:00",
date("Y-m-d H:i:s"),
"0000-00-00 00:00:00",
];
}
public function getUpdatedDevData(){
return [
$this -> devKey,
$this -> expirationDate,
trim($this -> ipAddresses),
date("Y-m-d H:i:s")
];
}
public function getUpdatedDevCredPasscode(){
$securedPasscode = password_hash(
$this -> passcode.VAL_STR_AUTH_HASH_SECRET_KEY,
PASSWORD_BCRYPT,
array('cost' => 13)
);
return [
$this -> devKey,
$securedPasscode,
date("Y-m-d H:i:s")
];
}
public function echoList(){
$rows = NO_STRING;
if($this -> isLoopData($this -> result)){
foreach($this -> result as $row){
$expTime = strtotime($row["dev_expiration"]);
$curTime = strtotime(date("Y-m-d"));
$style = NO_STRING;
if($expTime < $curTime)
$style = "style=\"color:#741506;font-weight:bold;\"";
$rows .=<<<HTMLROW
<tr>
<td><a class="dev-key-view" href="#" hold="{$row["dev_key"]}">{$row["dev_key"]}</a></td>
<td>{$row["dev_secret_key"]}</td>
<td {$style}>{$row["dev_expiration"]}</td>
<td>{$row["dev_exec_counter"]}</td>
<td>{$row["dev_last_exec"]}</td>
<td>{$row["create_time"]}</td>
<td>{$row["update_time"]}</td>
<td><a href="#" class="rmv-dev-cred" hold="{$row["dev_key"]}"><span class="fa fa-trash"></span></a></td>
</tr>
HTMLROW;
}
}else
$rows = '<tr><td colspan="8">'.VAL_STR_SEARCH_MESSAGE.'</td></tr>';
echo $rows;
}
public function getWhere(){
$build = NO_STRING;
if($this -> checkNull($this -> sDevKey)){
$build .= " AND dev_key = ('){$this -> sDevKey}(')";
}
if($this -> checkNull($this -> sExecutionCounter)){
$build .= " AND dev_exec_counter = ('){$this -> sExecutionCounter}(')";
}
if($this -> expireDateSearch){
if($this -> checkNull($this -> expireDateFrom)){
$build .= " AND cast(dev_expiration as date) >= ('){$this -> expireDateFrom}(')";
}
if($this -> checkNull($this -> expireDateTo)){
$build .= " AND cast(dev_expiration as date) <= ('){$this -> expireDateTo}(')";
}
}
if($this -> executionDateSearch){
if($this -> checkNull($this -> executionDateFrom)){
$build .= " AND cast(dev_last_exec as date) >= ('){$this -> executionDateFrom}(')";
}
if($this -> checkNull($this -> executionDateTo)){
$build .= " AND cast(dev_last_exec as date) <= ('){$this -> executionDateTo}(')";
}
}
if($this -> createDateSearch){
if($this -> checkNull($this -> createDateFrom)){
$build .= " AND cast(create_time as date) >= ('){$this -> createDateFrom}(')";
}
if($this -> checkNull($this -> createDateTo)){
$build .= " AND cast(create_time as date) <= ('){$this -> createDateTo}(')";
}
}
if($this -> updateDateSearch){
if($this -> checkNull($this -> updateDateFrom)){
$build .= " AND cast(update_time as date) >= ('){$this -> updateDateFrom}(')";
}
if($this -> checkNull($this -> updateDateTo)){
$build .= " AND cast(update_time as date) <= ('){$this -> updateDateTo}(')";
}
}
return $build;
}
public function dispPager() {
echo $this -> getPagerCommon($this -> getTargetPage()
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $this -> total)
, $this -> total
, NO_STRING
, false);
}
public function dispDateRangeFlg($dateRangeFlgField) {
echo '<label>'
. $this -> makeCheckOne(
$dateRangeFlgField,
$dateRangeFlgField,
VAL_INT_1,
NO_STRING,
$this -> {$dateRangeFlgField})
. '</label>';
}
public function setResult($result){
$this -> result = $result;
}
public function setTotal($total){
$this -> total = $total;
}
public function getFieldValue($fieldName){
return $this->{$fieldName};
}
public function getActivity(){
$detail = [];
$cred = $this -> getDevCredential($this -> devKey);
if($this -> isLoopData($cred)){
if($this -> getType() != TYPE_DEV_CREDENTIAL_DELETE){
if($this -> checkNull($this -> ipAddresses) && $cred["dev_ip_addresses"] != $this -> ipAddresses)
$detail[] = "Updated IP Address From [{$cred["dev_ip_addresses"]}] to [{$this -> ipAddresses}]";
if($this -> checkNull($this -> expirationDate)){
$cred["dev_expiration"] = date("Y/m/d", strtotime($cred["dev_expiration"]));
if($cred["dev_expiration"] != $this -> expirationDate){
$detail[] = "Updated Expiration Date From [{$cred["dev_expiration"]}] to [{$this -> expirationDate}]";
}
}
if($this -> checkNull($this -> passcode)){
if(!password_verify($this -> passcode.VAL_STR_AUTH_HASH_SECRET_KEY, $cred["dev_passcode"]))
$detail[] = "Developer's Credential Passcode Updated [{$this -> devKey}]";
}
}else{
if($this -> checkNull($this -> devKey))
$detail[] = "Developer Credential Deleted [{$this -> devKey}]";
}
}else{
$detail[] = "New Developer Credential Added [{$this -> devKey}]";
}
$mixed = implode(', <br/>', $detail);
if($detail != NULL)
$message = "[Developers Option] <br/> <b>Update</b>: {$mixed}";
else
$message = "[Developers Option] Saved without any changes";
$rtn = [
$this -> getAdminUserData(PARAM_UID),
$_SERVER[PARAM_REMOTE_ADDR],
$_SERVER[PARAM_HTTP_USER_AGENT],
VAL_INT_23,
date("Y-m-d H:i:s"),
$message
];
return $rtn;
}
public function dispHTML() {
return array();
}
}
......@@ -19,12 +19,12 @@ class LogicTransactionLogs extends TransactionLogsModelClass {
function logic() {
try {
// 初期データ処理
if($this -> init()){
$this -> lists();
}else{
$this -> lists();
}
$this -> init();
if($this -> getMethod() == "From_DB"){
$this -> lists();
}
} catch (Exception $e) {
throw $e;
}
......@@ -40,8 +40,16 @@ class LogicTransactionLogs extends TransactionLogsModelClass {
$where = null;
$where = $this -> getWhere();
$where[VAL_INT_1] = NO_STRING;
$count = $this -> getColumnData($this -> getRowData($this -> accessSelect('COUNT_LOG_POST', $where), NO_COUNT),
"log_ctr");
$this -> setCount($count);
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$where[VAL_INT_1] = ' LIMIT ' . $start . DELIMIT_COMMA . VAR_DEFAULT_PAGE_COUNT;
$this -> setResult($this -> accessSelect('LIST_LOG_POST', $where));
//var_dump($where);
}
}
?>
\ No newline at end of file
......@@ -12,6 +12,8 @@ class TransactionLogsModelClass extends ModelClassEx {
private $url = NO_STRING;
private $ip = NO_STRING;
private $count = NO_COUNT;
/*-------------------------------------------------------------------------
* @function_name: コントロールパネルシステムindexモデルクラスコンストラクタ
* @parameter : なし
......@@ -167,7 +169,7 @@ class TransactionLogsModelClass extends ModelClassEx {
$total = count($merged['merged']);
}else{
$total = count($this -> rs);
$total = $this -> count;
}
echo $this -> getPagerCommon($this -> getTargetPage()
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $total)
......@@ -225,6 +227,15 @@ class TransactionLogsModelClass extends ModelClassEx {
echo $rtn;
}
/*-------------------------------------------------------------------------
* @function_name: setCount
* @parameter :
* @return :
-------------------------------------------------------------------------*/
function setCount($count){
$this -> count = $count;
}
/*-------------------------------------------------------------------------
* @function_name: getMethod
* @parameter :
......@@ -316,13 +327,7 @@ class TransactionLogsModelClass extends ModelClassEx {
$where .= ' AND (post LIKE (\')%'. $this -> post .'%(\'))';
}
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$end = $this -> getTargetPage() * VAR_DEFAULT_PAGE_COUNT;
$page = ' LIMIT ' . $start . DELIMIT_COMMA . VAL_INT_50;
$rtn[] = $where;
$rtn[] = $page;
return $rtn;
}
......
......@@ -201,6 +201,14 @@
if($this -> checkAdminUserAccess('OLOG', array(''))){
?>
<li><a href="admin_log">操作ログ</a></li>
<?php }
if($this -> checkAdminUserAccess('ADVT', array(''))){
?>
<li><a href="advertisements">広告</a></li>
<?php }
if($this -> checkAdminUserAccess('DEVF', array(''))){
?>
<li><a href="developer">開発者向けのオプション</a></li>
<?php }
?>
</ul>
......
<?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>
<div class="aside-heading">
<div class="btns">
<input type="button" id="btnNewCredential" name="btnNewCredential" value="登録" class="btn bg-default px70 hi22"/>&nbsp;
<input type="button" id="btnSearch" name="btnNewCredential" value="検索" class="btn bg-default px60 hi22"/>&nbsp;
</div>
</div>
<form id="searchForm" action="" method="post">
<table class="conditions fontS w100p">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>DEVキー</th>
<td><input type="text" id="sDevKey" name="sDevKey" value="<?=$this -> getFieldValue("sDevKey")?>" class="w100p"></td>
</tr>
<tr>
<th>シークレットキー</th>
<td><input type="text" id="sExecutionCounter" name="sExecutionCounter" value="<?=$this -> getFieldValue("sExecutionCounter")?>" class="w100p"></td>
</tr>
<tr>
<td colspan="2" class="divider"><hr /></td>
</tr>
<tr>
<td colspan="2">
<span class="th">満了日</span>
<?php $this -> dispDateRangeFlg("expireDateSearch"); ?>
<input type="text" id="expireDateFrom" name="expireDateFrom" value="<?=$this -> getFieldValue("expireDateFrom")?>" class="px110"> -
<input type="text" id="expireDateTo" name="expireDateTo" value="<?=$this -> getFieldValue("expireDateTo")?>" class="px110">
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">最後実行日</span>
<?php $this -> dispDateRangeFlg("executionDateSearch"); ?>
<input type="text" id="executionDateFrom" name="executionDateFrom" value="<?=$this -> getFieldValue("executionDateFrom")?>" class="px110"> -
<input type="text" id="executionDateTo" name="executionDateTo" value="<?=$this -> getFieldValue("executionDateTo")?>" class="px110">
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">作成日</span>
<?php $this -> dispDateRangeFlg("createDateSearch"); ?>
<input type="text" id="createDateFrom" name="createDateFrom" value="<?=$this -> getFieldValue("createDateFrom")?>" class="px110"> -
<input type="text" id="createDateTo" name="createDateTo" value="<?=$this -> getFieldValue("createDateTo")?>" class="px110">
</td>
</tr>
<tr>
<td colspan="2">
<span class="th">最後変更日</span>
<?php $this -> dispDateRangeFlg("updateDateSearch"); ?>
<input type="text" id="updateDateFrom" name="updateDateFrom" value="<?=$this -> getFieldValue("updateDateFrom")?>" class="px110"> -
<input type="text" id="updateDateTo" name="updateDateTo" value="<?=$this -> getFieldValue("updateDateTo")?>" class="px110">
</td>
</tr>
</table>
</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; ?> </h2>
<?php $this -> dispPager(); ?>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="POST">
<table class="table col bdr default odd w100p fontXS calign">
<thead>
<tr>
<th class="w4p">DEVキー</th>
<th class="w4p">シークレットキー</th>
<th class="w4p">満了日</th>
<th class="w4p">実行カウンター</th>
<th class="w4p">最後実行日</th>
<th class="w4p">作成日</th>
<th class="w4p">最後変更日</th>
<th class="w9p" aria-hidden="true"></th>
</tr>
</thead>
<tbody>
<?php $this -> echoList(); ?>
</tbody>
</table>
<input type="hidden" name="type" id="type"/>
<input type="hidden" name="developer_key" id="developer_key"/>
</form>
<div class="article-bottom">
<?php $this -> dispPager(); ?>
</div>
</article>
</div>
</div>
<input type="hidden" id="confirm_delete_devcred" value="開発者向けのクレデンシャルを削除してもよろしいですか?"/>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php
$page_title = "パスコードを編集 [{$this -> getFieldValue("devKey")}]";
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">
<div class="aside-heading">
<div class="btns">
</div>
</div>
<p class="calign">
</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; ?> </h2>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="POST">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>新しいパスコード</th>
<td>
<input type="password" id="passcode" name="passcode" class="w30p"/>
</td>
</tr>
<tr>
<th>確認パスコード</th>
<td>
<input type="password" id="confirm_passcode" name="confirm_passcode" class="w30p">
</td>
</tr>
</table>
<p class="calign">
<input type="button" id="btnBackEdit" value="戻る" class="btn bg-default px80 hi25"/>&emsp;
<input type="button" id="btnSavePasscode" value="保存" class="btn bg-grad px80 hi25">
</p>
<input type="hidden" value="action" id="type" name="type" />
<input type="hidden" id="developer_key" name="developer_key" value="<?=$this -> getFieldValue("devKey")?>"/>
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?php
$page_title = "DEVクレデンシャルを編集";
include_once('template/base_head.php');
?>
<aside id="colLeft">
<h1><a href="account_list"><img src="../img/logo.png" alt="iWallet"></a></h1>
<div class="aside-heading">
<div class="btns">
<input type="button" id="btnChangePasscode" name="btnChangePasscode" value="パスコードを編集"
class="btn bg-default px120 hi22"/>&nbsp;
</div>
</div>
<p class="calign">
</p>
</aside>
<div id="colMain">
<div class="mainIn">
<?php include_once('template/base_nav.php'); ?>
<article>
<div class="article-heading">
<h2><?php echo $page_title; ?> </h2>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="post">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>DEVキー</th>
<td>
<input type="text" id="dkey_view"
value="<?=$this->getFieldValue("devKey")?>" class="w30p" disabled="disabled">
<input type="hidden" value="<?=$this->getFieldValue("devKey")?>" id="developer_key" name="developer_key">
</td>
</tr>
<tr>
<th>満了日</th>
<td>
<input type="text" id="expiration_date" name="expiration_date"
value="<?=$this->getFieldValue("expirationDate")?>" class="w30p">
</td>
</tr>
<tr>
<th>IPアドレス</th>
<td>
<textarea id="ipAddresses" name="ipAddresses" rows="10" cols="50"><?=$this -> getFieldValue("ipAddresses")?></textarea>
</td>
</tr>
</table>
<input type="hidden" value="action" id="type" name="type" />
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<p class="calign">
<a href="" class="btn bg-default">&laquo; 戻る</a>&emsp;
<input type="button" id="btnSave" value="保存" class="btn bg-grad px80 hi25">
</p>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?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">
<div class="aside-heading">
<div class="btns">
</div>
</div>
<p class="calign">
</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; ?> </h2>
</div>
<?php $this -> echoMessage(); ?>
<form id="acForm" action="" method="post">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>DEVキー</th>
<td>
<input type="text" id="developer_key" name="developer_key"
value="<?=$this->getFieldValue("devKey")?>" class="w30p">
</td>
</tr>
<tr>
<th>パスコード</th>
<td>
<input type="password" id="passcode" name="passcode"
value="<?=$this->getFieldValue("passcode")?>" class="w30p" autocomplete="new-password">
</td>
</tr>
<tr>
<th>確認パスコード</th>
<td>
<input type="password" id="confirm_passcode" name="confirm_passcode"
value="<?=$this->getFieldValue("confirmPasscode")?>" class="w30p">
</td>
</tr>
<tr>
<th>満了日</th>
<td>
<input type="text" id="expiration_date" name="expiration_date"
value="<?=$this->getFieldValue("expirationDate")?>" class="w30p">
</td>
</tr>
</table>
<input type="hidden" value="action" id="type" name="type" />
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<p class="calign">
<a href="" class="btn bg-default">&laquo; 戻る</a>&emsp;
<input type="button" id="btnConfirm" value="確認" class="btn bg-grad px80 hi25">
</p>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
<?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">
<div class="aside-heading">
<div class="btns">
</div>
</div>
<p class="calign">
</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; ?> </h2>
</div>
<form id="acForm" action="" method="post">
<table class="table col bdr default odd w60p fontXS m_auto mb20">
<colgroup>
<col class="w40p">
<col class="w60p">
</colgroup>
<tr>
<th>DEVキー</th>
<td>
<?=$this->getFieldValue("devKey")?>
<input type="hidden" id="developer_key" name="developer_key"
value="<?=$this->getFieldValue("devKey")?>" class="w30p"/>
</td>
</tr>
<tr>
<th>パスコード</th>
<td>
<code>隠し中情報</code>
</td>
</tr>
<tr>
<th>確認パスコード</th>
<td>
<code>隠し中情報</code>
</td>
</tr>
<tr>
<th>満了日</th>
<td>
<?=$this->getFieldValue("expirationDate")?>
<input type="hidden" id="expiration_date" name="expiration_date"
value="<?=$this->getFieldValue("expirationDate")?>" class="w30p"/>
</td>
</tr>
</table>
<input type="hidden" id="passcode" name="passcode" value="<?=$_SESSION["dev_cred_passcode"]?>" />
<input type="hidden" id="passcode" name="confirm_passcode" value="<?=$_SESSION["dev_cred_passcode"]?>" />
<input type="hidden" id="type" name="type" />
<!-- Language Transition Data (Anton) 04/23/2016 -->
<input class="lang-trans-data" type="hidden" id="lang_data_action" value="/developer"/>
<input class="lang-trans-data" type="hidden" id="lang_data_form" value="#acForm"/>
<input class="lang-trans-data" type="hidden" id="lang_data_type" value="input"/>
<!-- /Language Transition Data -->
</form>
<p class="calign">
<input type="button" id="btnBackInput" value="戻る" class="btn bg-default px80 hi25"/>&emsp;
<input type="button" id="btnAddNewCred" value="作成" class="btn bg-grad px80 hi25">
</p>
<div class="article-bottom">
</div>
</article>
</div>
</div>
</div>
<?php include_once('template/base_foot.php'); ?>
</div>
<script src="../js/developer.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>
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