<?php
  /**
   * Index
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2017
   * @version $Id: index.tpl.php, v1.00 2017-10-05 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
?>
<h2><?php echo Lang::$word->DASH_TITLE;?></h2>
<p class="wojo small text"><?php echo Lang::$word->DASH_INFO;?></p>
<div class="wojo segment">
  <div class="row gutters">
    <div class="column screen-25 tablet-50 mobile-50 phone-100">
      <div class="wojo shadow card">
        <div class="header primary content-center">
          <span class="wojo huge white text counter"><?php echo $this->counters[0];?></span>
          <p class="wojo white text"><?php echo Lang::$word->DASH_RUSER;?></p>
        </div>
      </div>
    </div>
    <div class="column screen-25 tablet-50 mobile-50 phone-100">
      <div class="wojo shadow card">
        <div class="header secondary content-center"><span class="wojo huge white text counter"><?php echo $this->counters[1];?></span>
          <p class="wojo white text"><?php echo Lang::$word->DASH_AUSER;?></p>
        </div>
      </div>
    </div>
    <div class="column screen-25 tablet-50 mobile-50 phone-100">
      <div class="wojo shadow card">
        <div class="header positive content-center"><span class="wojo huge white text counter"><?php echo $this->counters[2];?></span>
          <p class="wojo white text"><?php echo Lang::$word->DASH_AMEM;?></p>
        </div>
      </div>
    </div>
    <div class="column screen-25 tablet-50 mobile-50 phone-100">
      <div class="wojo shadow card">
        <div class="header negative content-center"><span class="wojo huge white text counter"><?php echo $this->counters[3];?></span>
          <p class="wojo white text"><?php echo Lang::$word->DASH_PRODS;?></p>
        </div>
      </div>
    </div>
  </div>
  <?php if(Auth::checkAcl("owner")):?>
  <h6 class="wojo secondary text"><?php echo Lang::$word->DASH_TYEAR;?></h6>
  <div class="row horizontal-gutters">
    <div class="column screen-80 tablet-70 mobile-100 phone-100">
      <div id="legend" class="wojo small horizontal list align-right"></div>
      <div id="payment_chart" style="height:350px" class="wojo basic attached segment"></div>
    </div>
    <div class="column screen-20 tablet-30 mobile-100 phone-100">
      <div class="wojo attached basic card">
        <div class="header secondary">
          <p class="wojo white thick text half-bottom-padding"><?php echo Utility::formatMoney($this->stats['totalsum']);?></p>
          <div id="chart1" data-values="<?php echo $this->stats['amount_str'];?>"></div>
        </div>
      </div>
      <div class="wojo space divider"></div>
      <div class="wojo attached basic card">
        <div class="header primary">
          <p class="wojo white thick text half-bottom-padding"><?php echo $this->stats['totalsales'];?>
            <?php echo Lang::$word->TRX_SALES;?></p>
          <div id="chart2" data-values="<?php echo $this->stats['sales_str'];?>"></div>
        </div>
      </div>
    </div>
  </div>
  <h6 class="wojo secondary text"><?php echo Lang::$word->TRX_POPMEM;?> - <?php echo date('Y');?></h6>
  <div id="legend2" class="wojo small horizontal list align-right"></div>
  <div id="payment_chart2" style="height:350px" class="wojo basic attached segment"></div>
  <?php endif;?>
</div>
<?php if(Auth::checkAcl("owner")):?>
<script src="<?php echo SITEURL;?>/assets/morris.min.js"></script>
<script src="<?php echo SITEURL;?>/assets/raphael.min.js"></script>
<script src="<?php echo SITEURL;?>/assets/sparkline.min.js"></script>
<script src="<?php echo ADMINVIEW;?>/js/index.js"></script>
<script type="text/javascript"> 
// <![CDATA[	
$(document).ready(function() {
    $.Index({
        url: "<?php echo ADMINVIEW;?>",
    });
});
// ]]>
</script>
<?php endif;?>