fix
This commit is contained in:
@@ -3,6 +3,9 @@ include '../backend.php';
|
|||||||
$base_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
$base_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||||
$local_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
$local_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||||
|
|
||||||
|
$base_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||||
|
$local_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||||
|
|
||||||
//$base_url = 'https://www.wrenchboard.com/svs/user';
|
//$base_url = 'https://www.wrenchboard.com/svs/user';
|
||||||
//$local_url = 'https://www.wrenchboard.com/svs/user';
|
//$local_url = 'https://www.wrenchboard.com/svs/user';
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class Bko extends CI_Controller {
|
|||||||
$_SESSION['bko_sessionid'] = $out["sessionid"];
|
$_SESSION['bko_sessionid'] = $out["sessionid"];
|
||||||
$_SESSION['bko_username'] = $out["username"];
|
$_SESSION['bko_username'] = $out["username"];
|
||||||
$_SESSION['bko_selected_memberd_id'] = 0;
|
$_SESSION['bko_selected_memberd_id'] = 0;
|
||||||
$_SESSION['bko_group'] = $out['group_id'];
|
$_SESSION['bko_group'] = $out['group_id'];
|
||||||
$_SESSION['bkodata'] = $out;
|
$_SESSION['bkodata'] = $out;
|
||||||
redirect('bkouser/dash');
|
redirect('bkouser/dash');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,7 @@ class Bkotransaction extends Bko_Controller {
|
|||||||
case 'TRANSDETAIL':
|
case 'TRANSDETAIL':
|
||||||
|
|
||||||
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
||||||
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee, "
|
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee "
|
||||||
. "'<input type=submit id=\"accs'||m.id||'\" onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
|
|
||||||
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process "
|
|
||||||
. "FROM money_transfer m "
|
. "FROM money_transfer m "
|
||||||
. "LEFT JOIN members me ON me.id=m.member_id "
|
. "LEFT JOIN members me ON me.id=m.member_id "
|
||||||
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
||||||
@@ -145,8 +143,8 @@ class Bkotransaction extends Bko_Controller {
|
|||||||
$myTable .="<tr><td style='width:100px;'><b>Amount</b></td><td>" . $out['amount'] . "</td></tr>";
|
$myTable .="<tr><td style='width:100px;'><b>Amount</b></td><td>" . $out['amount'] . "</td></tr>";
|
||||||
$myTable .="<tr><td style='width:100px;'><b>Fee</b></td><td>" . $out['fee'] . "</td></tr>";
|
$myTable .="<tr><td style='width:100px;'><b>Fee</b></td><td>" . $out['fee'] . "</td></tr>";
|
||||||
|
|
||||||
$myTable .="<tr><td style='width:100px;'><b></b></td><td><div id='btump" . $out['id'] . "'><input type=submit id=\"acmp" . $out['id'] . "\" onclick=\"return smoneyProcessComplete('" . $out['id'] . "')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Complete\"></div></td></tr>";
|
$myTable .="<tr><td style='width:100px;'><b></b></td><td></td></tr>";
|
||||||
$myTable .="</table></form> [another tabble]";
|
$myTable .="</table></form> ";
|
||||||
|
|
||||||
return $myTable;
|
return $myTable;
|
||||||
}
|
}
|
||||||
@@ -171,25 +169,68 @@ class Bkotransaction extends Bko_Controller {
|
|||||||
public function moneytransfer() {
|
public function moneytransfer() {
|
||||||
// $this->load->view('bko/view_bko_header', $data);
|
// $this->load->view('bko/view_bko_header', $data);
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
|
$this->load->library('pagination');
|
||||||
|
$config = array();
|
||||||
|
|
||||||
$this->load->library('table');
|
$this->load->library('table');
|
||||||
$this->table->set_template($this->template);
|
$this->table->set_template($this->template);
|
||||||
$mysql = "SELECT * FROM money_transfer LIMIT 100";
|
$mysql = "SELECT m.* FROM money_transfer m LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id WHERE m.status =1 AND m.completed IS NULL AND mp.confirmation IS NOT NULL";
|
||||||
|
|
||||||
|
$query = $this->db->query($mysql);
|
||||||
|
$config["total_rows"] = $query->num_rows();
|
||||||
|
$config["base_url"] = base_url() . "/bkotransaction/moneytransfer";
|
||||||
|
$config["per_page"] = 15;
|
||||||
|
$config["uri_segment"] = 3;
|
||||||
|
$config["num_links"] = 5;
|
||||||
|
|
||||||
|
$config['full_tag_open'] = "<ul class='pagination'>";
|
||||||
|
$config['full_tag_close'] = "</ul>";
|
||||||
|
$config['num_tag_open'] = '<li>';
|
||||||
|
$config['num_tag_close'] = '</li>';
|
||||||
|
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
|
||||||
|
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
|
||||||
|
$config['next_tag_open'] = "<li>";
|
||||||
|
$config['next_tagl_close'] = "</li>";
|
||||||
|
$config['prev_tag_open'] = "<li>";
|
||||||
|
$config['prev_tagl_close'] = "</li>";
|
||||||
|
$config['first_tag_open'] = "<li>";
|
||||||
|
$config['first_tagl_close'] = "</li>";
|
||||||
|
$config['last_tag_open'] = "<li>";
|
||||||
|
$config['last_tagl_close'] = "</li>";
|
||||||
|
|
||||||
|
$this->pagination->initialize($config);
|
||||||
|
|
||||||
|
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
|
||||||
|
|
||||||
|
$page = is_numeric($page) ? $page : 0;
|
||||||
|
|
||||||
$sdate = '2016-01-01';
|
$sdate = '2016-01-01';
|
||||||
$edate = '2018-01-01';
|
$edate = '2018-01-01';
|
||||||
|
|
||||||
$mysql = "SELECT m.added,mp.confirmation,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
$mysql = "SELECT m.added,mp.confirmation,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
||||||
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee, "
|
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee, "
|
||||||
. "'<input type=submit onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
|
. "'<input type=submit id=\"accs'||m.id||'\" onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
|
||||||
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process "
|
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-danger btn-sm\" value=\"Process\">' As Process "
|
||||||
. "FROM money_transfer m "
|
. "FROM money_transfer m "
|
||||||
. "LEFT JOIN members me ON me.id=m.member_id "
|
. "LEFT JOIN members me ON me.id=m.member_id "
|
||||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||||
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
||||||
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code "
|
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code "
|
||||||
. "WHERE m.status =1 AND m.completed IS NULL ORDER BY m.added DESC ";
|
. "WHERE m.status =1 AND m.completed IS NULL AND mp.confirmation IS NOT NULL ORDER BY m.added DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
|
||||||
|
|
||||||
|
$this->table->set_heading(
|
||||||
|
array('data' => 'Added', 'style' => 'width:120px'),
|
||||||
|
array('data' => 'Confirmation', 'style' => 'width:120px'),
|
||||||
|
'Sender',
|
||||||
|
'Recipient',
|
||||||
|
array('data' => 'Amount', 'style' => 'width:10px'),
|
||||||
|
array('data' => 'Fee', 'style' => 'width:50px'),
|
||||||
|
array('data' => 'Details', 'style' => 'width:100px'),
|
||||||
|
array('data' => 'Process', 'style' => 'width:10px')
|
||||||
|
);
|
||||||
|
$data["links"] = $this->pagination->create_links();
|
||||||
|
|
||||||
$query = $this->db->query($mysql);
|
$query = $this->db->query($mysql);
|
||||||
$data['sendmoney_dash_table'] = $this->table->generate($query);
|
$data['sendmoney_dash_table'] = $this->table->generate($query);
|
||||||
|
|
||||||
|
|||||||
@@ -1,128 +1,127 @@
|
|||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<!-- Main charts -->
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col-lg-9">
|
||||||
<div class="col-lg-9">
|
|
||||||
|
<!-- Traffic sources -->
|
||||||
<!-- Traffic sources -->
|
<div class="panel panel-flat">
|
||||||
<div class="panel panel-flat">
|
<div class="panel-heading">
|
||||||
<div class="panel-heading">
|
<h6 class="panel-title"><b>Pending Withdraw(s)</b></h6>
|
||||||
<h6 class="panel-title"><b>Pending Withdraw(s)</b></h6>
|
<div class="heading-elements">
|
||||||
<div class="heading-elements">
|
<form class="heading-form" action="#">
|
||||||
<form class="heading-form" action="#">
|
<?=$links?>
|
||||||
|
</form>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="container-fluid">
|
||||||
<div class="container-fluid">
|
<div class="row">
|
||||||
<div class="row">
|
<?php echo $sendmoney_dash_table; ?>
|
||||||
<?php echo $sendmoney_dash_table; ?>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
<!-- /traffic sources -->
|
||||||
<!-- /traffic sources -->
|
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="col-lg-3">
|
||||||
<div class="col-lg-3">
|
|
||||||
|
<!-- Sales stats -->
|
||||||
<!-- Sales stats -->
|
<div class="panel panel-flat">
|
||||||
<div class="panel panel-flat">
|
|
||||||
|
<div id='selected_detail'>
|
||||||
<div id='selected_detail'>
|
<div class="panel-heading">
|
||||||
<div class="panel-heading">
|
<h6 class="panel-title"><b>.</b></h6>
|
||||||
<h6 class="panel-title"><b>.</b></h6>
|
<div class="heading-elements">
|
||||||
<div class="heading-elements">
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="container-fluid">
|
||||||
<div class="container-fluid">
|
|
||||||
|
<div class="row text-left">
|
||||||
<div class="row text-left">
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="content-group-sm" id="app_sales"></div>
|
||||||
<div class="content-group-sm" id="app_sales"></div>
|
<div id="monthly-sales-stats"></div>
|
||||||
<div id="monthly-sales-stats"></div>
|
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
</div>
|
||||||
</div>
|
<!-- /sales stats -->
|
||||||
<!-- /sales stats -->
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- /main charts -->
|
||||||
<!-- /main charts -->
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
<!-- /main content -->
|
||||||
<!-- /main content -->
|
<script type="text/javascript">
|
||||||
<script type="text/javascript">
|
<!--
|
||||||
<!--
|
function smoneyProcess(link_id) {
|
||||||
function smoneyProcess(link_id) {
|
if(confirm("Are you sure you want to view this transaction?")) {
|
||||||
if(confirm("Are you sure you want to view this transaction?")) {
|
// do something
|
||||||
// do something
|
} else {
|
||||||
} else {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
$('#selected_detail').html('Processing...');
|
||||||
$('#selected_detail').html('Processing...');
|
$('#acc'+link_id).prop('disabled', true);
|
||||||
$('#acc'+link_id).prop('disabled', true);
|
$.ajax({
|
||||||
$.ajax({
|
url: "/bkotransaction/smprocess?proc=PROCESS&sendmoney_id="+link_id
|
||||||
url: "/bkotransaction/smprocess?proc=PROCESS&sendmoney_id="+link_id
|
}).done(function (data) {
|
||||||
}).done(function (data) {
|
$('#selected_detail').html(data);
|
||||||
$('#selected_detail').html(data);
|
//document.offer_individual.rec_email.value = '';
|
||||||
document.offer_individual.rec_email.value = '';
|
$('#acc'+link_id).prop('disabled', false);
|
||||||
$('#acc'+link_id).prop('disabled', false);
|
});
|
||||||
});
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
function smoneyDetail(link_id) {
|
||||||
function smoneyDetail(link_id) {
|
|
||||||
|
$('#selected_detail').html('Generating...');
|
||||||
$('#btu'+link_id).html('Processing...');
|
$('#accs'+link_id).prop('disabled', true);
|
||||||
$('#accs'+link_id).prop('disabled', true);
|
$.ajax({
|
||||||
$.ajax({
|
url: "/bkotransaction/smprocess?proc=TRANSDETAIL&sendmoney_id="+link_id
|
||||||
url: "/bkotransaction/smprocess?proc=DETAIL&sendmoney_id="+link_id
|
}).done(function (data) {
|
||||||
}).done(function (data) {
|
$('#selected_detail').html(data);
|
||||||
$('#btu'+link_id).html(data);
|
// document.offer_individual.rec_email.value = '';
|
||||||
document.offer_individual.rec_email.value = '';
|
$('#accs'+link_id).prop('disabled', false);
|
||||||
$('#accs'+link_id).prop('disabled', false);
|
});
|
||||||
});
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
function smoneyProcessComplete(link_id) {
|
||||||
function smoneyProcessComplete(link_id) {
|
var f = document.getElementById('sendmoneyProcessPage'+link_id);
|
||||||
var f = document.getElementById('sendmoneyProcessPage'+link_id);
|
var tcode = f.tcode.value;
|
||||||
var tcode = f.tcode.value;
|
var tref = f.tref.value;
|
||||||
var tref = f.tref.value;
|
if (tcode==null || tcode=='') {
|
||||||
if (tcode==null || tcode=='') {
|
alert('Trans Code is required');
|
||||||
alert('Trans Code is required');
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
if (tref==null || tref=='') {
|
||||||
if (tref==null || tref=='') {
|
alert('Trans Ref is required');
|
||||||
alert('Trans Ref is required');
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
$('#btump'+link_id).html('Processing...');
|
||||||
$('#btump'+link_id).html('Processing...');
|
$('#acmp'+link_id).prop('disabled', true);
|
||||||
$('#acmp'+link_id).prop('disabled', true);
|
$.ajax({
|
||||||
$.ajax({
|
url: "/bkotransaction/smprocess?proc=COMPLETE&sendmoney_id="+link_id+'&tcode='+tcode+'&tref='+tref
|
||||||
url: "/bkotransaction/smprocess?proc=COMPLETE&sendmoney_id="+link_id+'&tcode='+tcode+'&tref='+tref
|
}).done(function (data) {
|
||||||
}).done(function (data) {
|
$('#btump'+link_id).html(data);
|
||||||
$('#btump'+link_id).html(data);
|
document.offer_individual.rec_email.value = '';
|
||||||
document.offer_individual.rec_email.value = '';
|
$('#acmp'+link_id).prop('disabled', false);
|
||||||
$('#acmp'+link_id).prop('disabled', false);
|
});
|
||||||
});
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
// -->
|
||||||
// -->
|
</script>
|
||||||
</script>
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ if (!array_key_exists('wrenchboard', $GLOBALS)) {
|
|||||||
$USER = strtok($USER, '/');
|
$USER = strtok($USER, '/');
|
||||||
if ($USER=='opt') $USER = 'root';
|
if ($USER=='opt') $USER = 'root';
|
||||||
// Load API class
|
// Load API class
|
||||||
// $USER = 'root';
|
$USER = 'oameye';
|
||||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||||
$wrenchboard = new $wrenchboard_class();
|
$wrenchboard = new $wrenchboard_class();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user