$this->addDashboardTab($users); } } ?> ~~~ Create the HTML markup for rendering the dashboard. ~~~ <?php // Filename: tabbed.php require 'dashboards.php'; ?> <!doctype html> <html> <head> <link rel="stylesheet" href="razorflow_php/static/rf/css/razorflow.min.css"/> <script src="razorflow_php/static/rf/js/jquery.min.js" type="text/javascript"></script> <script src="razorflow_php/static/rf/js/razorflow.wrapper.min.js" type="text/javascript"></script> <script src="razorflow_php/static/rf/js/razorflow.devtools.min.js" type="text/javascript"></script> </head> <body> <h1>Tabbed Embedded Dashboard</h1> <?php $db = new MyDashboard(); $db->renderEmbedded(); ?> </body> </html> ~~~
public function getFreeDetail() { //acc_id //hash //mon *optional //y *optional $id = addslashes($_POST['acc_id']); $acc = new Account(); $acc->getByID($id); if ($acc->admin_hash != $_POST['hash']) { $json['status_code'] = 0; $json['status_message'] = "Invalid Token"; echo json_encode($json); die; } $_GET['mon'] = $_POST['mon']; $_GET['y'] = $_POST['y']; MyDashboard::freebiesWS($acc); }
function myfreebies() { MyDashboard::myfreebies(); }
<?php $key = get_current_user_key(); $userId = get_current_userid(); if (isset($key)) { include wpmlm_get_template_file_path('classes/wpmlm-my-dashboard.class.php'); $objMyDashboard = new MyDashboard($key); $userDetail = $objMyDashboard->GetUserInfoById($userId); $totalBus = $objMyDashboard->TotalBusiness($userId); $myLeftArr = $objMyDashboard->MyTop5LeftLegMember($userId); $myRightArr = $objMyDashboard->MyTop5RightLegMember($userId); $myPerSalesArr = $objMyDashboard->MyTop5PersonalSales($userId); $payoutArr = $objMyDashboard->MyTop5PayoutDetails($userId); $myRightTotal = $objMyDashboard->MyRightLegMemberTotal($userId); $myLeftTotal = $objMyDashboard->MyLeftLegMemberTotal($userId); $myPerSalesTotal = $objMyDashboard->MyPersonalSalesTotal($userId); //echo "<pre>";print_r($myLeftArr); exit; global $current_user; get_currentuserinfo(); $sponsor_name = $current_user->user_login; $reg_page_id = wpmlm_get_the_post_id_by_shortcode('[registration]'); $affiliateURL = get_permalink($reg_page_id) . '&sp=' . $key; } ?> <div class="dashboard"> <br /> <p class="affiliate_url"><strong>Affiliate URL :</strong> <?php echo $affiliateURL; ?> </p> <div class="leftSide">
$this->setDashboardTitle('KPI Dashboard'); $this->setActive(); $this->addComponent($kpi2); } } class SalesDashboard extends Dashboard { public function buildDashboard() { $chart = new ChartComponent("2011_sales"); $chart->setCaption("2011 Sales"); $chart->setDimensions(4, 4); $chart->setLabels(["Beverages", "Vegetables"]); $chart->addSeries("sales", "Sales", [1343, 7741]); $chart->addSeries("quantity", "Quantity", [76, 119]); $this->setDashboardTitle('Sales Dashboard'); $this->addComponent($chart); } } class MyDashboard extends TabbedDashboard { public function buildDashboard() { $db1 = new KPIDashboard(); $db2 = new SalesDashboard(); $this->addDashboardTab($db1); $this->addDashboardTab($db2); } } $db = new MyDashboard(); $db->renderStandalone();