예제 #1
0
 * You can contact Smackcoders at email address info@smackcoders.com.
 *
 * The interactive user interfaces in original and modified versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License
 * version 3, these Appropriate Legal Notices must retain the display of the
 * WP Ultimate CSV Importer copyright notice. If the display of the logo is
 * not reasonably feasible for technical reasons, the Appropriate Legal
 * Notices must display the words
 * "Copyright Smackcoders. 2014. All rights reserved".
 ********************************************************************************/
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $wpdb;
if ($_REQUEST['postdata'] == 'firstchartdata') {
    require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php';
    require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php';
    require_once 'actions.php';
    $dashObj = new DashboardActions();
    echo json_encode($dashObj->piechart());
} elseif ($_REQUEST['postdata'] == 'secondchartdata') {
    require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php';
    require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php';
    require_once 'actions.php';
    $dashObj = new DashboardActions();
    echo json_encode($dashObj->getStatsWithDate());
}
예제 #2
0
function roundchart()
{
    global $wpdb;
    ob_flush();
    require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/base/SkinnyBaseActions.php';
    require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/core/SkinnyActions.php';
    require_once "modules/dashboard/actions/actions.php";
    ?>
	<?php 
    $myObj = new DashboardActions();
    $content = "<form name='piechart' onload='pieStats();'> <div id ='pieStats' style='height:250px;'>";
    $content .= $myObj->piechart();
    $content .= "</div></form>";
    echo $content;
}