diff --git a/assets/php/class-submenu-page.php b/assets/php/class-submenu-page.php
index 5660907..68120ad 100644
--- a/assets/php/class-submenu-page.php
+++ b/assets/php/class-submenu-page.php
@@ -20,17 +20,16 @@ class Submenu_Page {
public $_nrows;
public $_path;
- function __construct( ) {
+ public function __construct( $path ) {
+
global $wpdb;
$this->_path = $path;
- $this->console_log('$_path -> '. $this->_path);
-
- $this->_nrows = $this->getPmtsCount();
- //
- // Create zgo_pmtlst if does not exist
- //
- $sql = 'create table if not exists zgo_pmtlst (' .
+ $this->_nrows = $this->getPmtsCount();
+ //
+ // Create zgo_pmtlst if does not exist
+ //
+ $sql = 'create table if not exists zgo_pmtlst (' .
'pg_ix integer ,' .
'pg_page integer not null default 0,' .
'pg_npages integer not null default 0,' .
@@ -38,9 +37,9 @@ class Submenu_Page {
'pg_limit integer not null default 0,' .
'pg_dt datetime default current_timestamp, '.
'unique lstix (pg_ix) );';
- $wpdb->query($sql);
+ $wpdb->query($sql);
- if ( ! $this->pmtLstRdy() ) {
+ if ( ! $this->pmtLstRdy() ) {
//
// Calculate first time pagination paramters
//
@@ -58,7 +57,7 @@ class Submenu_Page {
$this->_offset . ',' .
$this->_limit .')';
$wpdb->query($sql);
- } else {
+ } else {
// Load last state
$params = $this->pmtLstParams();
$this->_page = $params->pg_page;
@@ -109,15 +108,14 @@ class Submenu_Page {
public function console_log($data) {
- $file = $this->_path . 'zgopmtgwy/assets/console.log';
+ $file = $this->_path . 'assets/log/console.log';
file_put_contents($file, 'LST::' . $data . chr(0x0D) . chr(0x0A), FILE_TEXT | FILE_APPEND | LOCK_EX );
-
}
public function render() {
global $wpdb;
- $currentDate = date('Y-m-d H:i:s');
+ $currentDate = date('Y-m-d H:i:s');
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
//
@@ -189,42 +187,42 @@ class Submenu_Page {
-
-
-
- _page . '/' . $this->_npages;
- ?>
- |
-
-
- |
-
-
-
-
- ZGo Order Id |
- Shop Order Id |
- Customer |
- Accepted |
- Confirmed |
- Order Total |
- Rate |
- Total ZEC |
- Paid? |
-
+
+
+
+ _page . '/' . $this->_npages;
+ ?>
+ |
+
+
+ |
+
+
+
+
+ ZGo Order Id |
+ Shop Order Id |
+ Customer |
+ Accepted |
+ Confirmed |
+ Order Total |
+ Rate |
+ Total ZEC |
+ Paid? |
+
'.$row->pmt_wc_paid ."";
}
?>
-
-
-
-
+
+
+
+
render_stats();
@@ -338,11 +336,11 @@ class Submenu_Page {
ZGo Confirmed Payments Statistics
-
-
- |
-
+ |
+ |
+
-
- |
-
-
-
- Received Today |
-
-
-
- Total Amount |
-
-
- Average Rate |
-
-
- Total Zec |
-
-
- Number of payments |
-
-
- |
-
-
-
- dTotalAmount,2);?> |
-
-
- dTotalZec > 0.0) {
- echo number_format($result->dTotalZec/$result->dTotalAmount,2);
- } else { echo '0.00'; } ?> |
-
-
- dTotalZec,8);?> |
-
-
- dTotalPmts;?> |
-
-
- |
-
-
- Last 7 days |
-
-
-
- Total Amount |
-
-
- Average Rate |
-
-
- Total Zec |
-
-
- Number of payments |
-
-
- |
-
-
-
- wTotalAmount,2);?> |
-
-
- wTotalZec > 0.0) {
- echo number_format($result->wTotalAmount/$result->wTotalZec,2);
- } else { echo '0.00'; } ?> |
-
-
- wTotalZec,8);?> |
-
-
- wTotalPmts;?> |
-
-
- |
-
-
- Last 30 days |
-
-
-
- Total Amount |
-
-
- Average Rate |
-
-
- Total Zec |
-
-
- Number of payments |
-
-
- |
-
-
-
- mTotalAmount,2);?> |
-
-
- mTotalZec> 0.0) {
- echo number_format($result->mTotalAmount/$result->mTotalZec,2);
- } else { echo '0.00'; } ?> |
-
-
- mTotalZec,8);?> |
-
-
- mTotalPmts;?> |
-
-
- |
-
-
+ | |
+
+
+ |
+
+
+
+ Received Today |
+
+
+
+ Total Amount |
+
+
+ Average Rate |
+
+
+ Total Zec |
+
+
+ Number of payments |
+
+
+ |
+
+
+
+ dTotalAmount,2);?> |
+
+
+
+ dTotalZec > 0.0) {
+ echo number_format($result->dTotalZec/$result->dTotalAmount,2);
+ } else {
+ echo '0.00';
+ }
+ ?>
+ |
+
+
+
+ dTotalZec,8);
+ ?>
+ |
+
+
+
+ dTotalPmts;
+ ?>
+ |
+
+
+ |
+
+
+ Last 7 days |
+
+
+
+ Total Amount |
+
+
+ Average Rate |
+
+
+ Total Zec |
+
+
+ Number of payments |
+
+
+ |
+
+
+
+
+ wTotalAmount,2);
+ ?>
+ |
+
+
+
+ wTotalZec > 0.0) {
+ echo number_format($result->wTotalAmount/$result->wTotalZec,2);
+ } else {
+ echo '0.00';
+ }
+ ?>
+ |
+
+
+
+ wTotalZec,8);
+ ?>
+ |
+
+
+
+ wTotalPmts;
+ ?>
+ |
+
+
+ |
+
+
+ Last 30 days
+ |
+
+
+
+ Total Amount |
+
+
+ Average Rate |
+
+
+ Total Zec |
+
+
+ Number of payments |
+
+
+ |
+
+
+
+
+ mTotalAmount,2);
+ ?>
+ |
+
+
+
+ mTotalZec> 0.0) {
+ echo number_format($result->mTotalAmount/$result->mTotalZec,2);
+ } else {
+ echo '0.00';
+ }
+ ?>
+ |
+
+
+
+ mTotalZec,8);
+ ?>
+ |
+
+
+
+ mTotalPmts;
+ ?>
+ |
+
+
+ |
+
+
|
- |
-
-
-
+ |
+
+ font-weight: 600;
+ font-size: 15px;
+ margin: auto;
+ text-align: center;
+ vertical-align: center;
+ height: 20px;
+ background-color: #ff5722;
+ git color: white;">
Payments: |
gTotalPmts ?> |
Total Amount: |
@@ -581,6 +631,5 @@ class Submenu_Page {
init();
}
|