<?php

include_once('class.dashboard.php');
$dashboardObj = new dashboard($configObj);
$_REQUEST['module'] = "dashboard";
$paramMain = $configObj->AllmoduleAccess[$configObj->ModuleName];
$configObj->glTplObj->set('paramMain', $paramMain);


if ($_REQUEST['action'] == "refreshPP") {
    $dashboardObj->refresh_powerpanel();
}
if ($paramMain['View'] == 'Y') {
    $configObj->glTplObj->change_path('modules/dashboard/html/templates/');
    $configObj->glTplObj->set('configObj', $configObj);
    $configObj->glTplObj->set('dashboardTab', true);
   
    $pagehitsdata = $dashboardObj->get_pagehitsdata();
    $configObj->glTplObj->set('pagehitsdata', $pagehitsdata);
    $count_newzletterdata = $dashboardObj->Countnewzlettersdata();
    $configObj->glTplObj->set('count_newzletterdata', $count_newzletterdata);
     $newzletterdata = $dashboardObj->get_newzletter();
    $configObj->glTplObj->set('newzletterdata', $newzletterdata);
    $contacthitsdata = $dashboardObj->get_contacthitsdata();
    $configObj->glTplObj->set('contacthitsdata', $contacthitsdata);
    $count_contacthitsdata = $dashboardObj->Countcontacthitsdata();
    $configObj->glTplObj->set('count_contacthitsdata', $count_contacthitsdata);
    $bookdata = $dashboardObj->get_Bookdata();
    $configObj->glTplObj->set('bookdata', $bookdata);
    $countbookdata = $dashboardObj->countBookdata();
    $configObj->glTplObj->set('countbookdata', $countbookdata);
    $configObj->glTplObj->set('height', $dashboardObj->height);
    $configObj->adminContentPanel = $configObj->glTplObj->process('dashboard.tpl.php');
} else {

    $configObj->adminContentPanel = '<div class="web-booking-main">
                                      <div class="add-new-user-subtitle-bg">
                                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr><center>Sorry! You have not access right of Dashboard.</center></tr>
                                      </table>
                                      </div>
                                      </div>';
}
?>