diff --git a/assets/php/class-submenu-page.php b/assets/php/zpmt-stats-page.php similarity index 98% rename from assets/php/class-submenu-page.php rename to assets/php/zpmt-stats-page.php index e0ade99..4b09c9a 100644 --- a/assets/php/class-submenu-page.php +++ b/assets/php/zpmt-stats-page.php @@ -6,7 +6,7 @@ * **/ -class Submenu_Page { +class zpmt_stats_page { public $_limit; public $_offset; @@ -172,7 +172,7 @@ class Submenu_Page { ?>
@@ -320,7 +320,7 @@ class Submenu_Page { $sql = "select ifnull(a.dTotalAmount,0) as dTotalAmount, ifnull(a.dTotalZec,0) as dTotalZec, ifnull(a.dTotalPmts,0) as dTotalPmts, ifnull(b.wTotalAmount,0) as wTotalAmount, ifnull(b.wTotalZec,0) as wTotalZec, ifnull(b.wTotalPmts,0) as wTotalPmts, ifnull(c.mTotalAmount,0) as mTotalAmount, ifnull(c.mTotalZec,0) as mTotalZec, ifnull(c.mTotalPmts,0) as mTotalPmts from (select sum(a0.pmt_amount) as dTotalAmount, sum(a0.pmt_zec) as dTotalZec, count(*) as dTotalPmts from zgo_payments a0 where STR_TO_DATE(left(a0.pmt_confirmed,10), '%Y-%m-%d') = CURRENT_DATE ) a join (select sum(aa.pmt_amount) as wTotalAmount, sum(aa.pmt_zec) as wTotalZec, count(*) as wTotalPmts from zgo_payments aa where STR_TO_DATE(aa.pmt_confirmed, '%Y-%m-%d %H:%i:%s') >= DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY)) b join (select sum(bb.pmt_amount) as mTotalAmount, sum(bb.pmt_zec) as mTotalZec, count(*) as mTotalPmts from zgo_payments bb where STR_TO_DATE(bb.pmt_confirmed, '%Y-%m-%d %H:%i:%s') >= DATE_SUB(CURRENT_DATE, INTERVAL 30 DAY)) c where 1;"; $result = $wpdb->get_row($sql,OBJECT); ?> -
submenu_page = $submenu_page; + public function __construct( $zpmtStatsPage ) { + $this->zpmtStatsPage = $zpmtStatsPage; } public function init() { @@ -24,7 +24,7 @@ class Submenu { 'ZGo Payments', 'manage_options', 'zgopmtlist', - array( $this->submenu_page, 'render' ) + array( $this->zpmtStatsPage, 'render' ) ); }
+ background-color: #ff5722; + color: white;"> ZGo Order Id Shop Order Id Customer