Version 0.9 - renaming php classes
This commit is contained in:
parent
54129c1bc5
commit
93658f1e3c
2 changed files with 14 additions and 14 deletions
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
**/
|
||||
|
||||
class Submenu_Page {
|
||||
class zpmt_stats_page {
|
||||
|
||||
public $_limit;
|
||||
public $_offset;
|
||||
|
@ -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);
|
||||
?>
|
||||
<div style="margin-top: 25px;
|
||||
<div style="margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding-right: 20px;
|
||||
font-family: 'Noto Sans';
|
|
@ -5,12 +5,12 @@
|
|||
* This class creates the main statistics page for the plugin.
|
||||
*
|
||||
**/
|
||||
class Submenu {
|
||||
class zpmt_stats {
|
||||
|
||||
private $submenu_page;
|
||||
private $zpmtStatsPage;
|
||||
|
||||
public function __construct( $submenu_page ) {
|
||||
$this->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' )
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in a new issue