<?php
function floorDec($val, $precision = 2)
{
    if ($precision < 0) {
        $precision = 0;
    }
    $numPointPosition = intval(strpos($val, '.'));
    if ($numPointPosition === 0) { //$val is an integer
        return $val;
    }
    return floatval(substr($val, 0, $numPointPosition + $precision + 1));
}
?>

<div class="container-fluid">
    <div class="row column_title">
        <div class="col-md-12">
            <div class="page_title">
                <h2>Dashboard</h2>
            </div>
        </div>
    </div>
    <div class="row column1">
        <div class="col-md-6 col-lg-3">
            <div class="full counter_section margin_bottom_30">
                <div class="couter_icon">
                    <div>
                        <i class="fa fa-user yellow_color"></i>
                    </div>
                </div>
                <div class="counter_no">
                    <div>
                        <p class="total_no"><?=$users?></p>
                        <p class="head_couter">Users</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6 col-lg-3">
            <div class="full counter_section margin_bottom_30">
                <div class="couter_icon">
                    <div>
                        <i class="fa fa-globe " style="color: green;"></i>
                    </div>
                </div>
                <div class="counter_no">
                    <div>
                        <p class="total_no"><?=$locations?></p>
                        <p class="head_couter">Locations</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6 col-lg-3">
            <div class="full counter_section margin_bottom_30">
                <div class="couter_icon">
                    <div>
                        <i class="fa fa-gear" style="color:grey;"></i>
                    </div>
                </div>
                <div class="counter_no">
                    <div>
                        <p class="total_no"><?=$machines?></p>
                        <p class="head_couter">Machines</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row column1">
        <div class="col-lg-12 col-md-12">
            <div class="white_shd full margin_bottom_30">
                <div class="full graph_head">
                    <div class="heading1 margin_0">
                        <h2>ClawMaster Stats</h2>
                    </div>
                </div>
                <div class="map_section padding_infor_info">
                    <canvas id="bar-chart"></canvas>
                </div>
            </div>
        </div>
    </div>


</div>