<?PHP
include ("conexion/SecurityAccess.php");
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Highcharts Example</title>

		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
		<style type="text/css">
${demo.css}
		</style>
		<script type="text/javascript">
$(function () {
    $('#container').highcharts({
		
		credits: {
            enabled: false
        },
		
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: 0,
            plotShadow: false
        },
        title: {
            text: 'Accesos',
            align: 'center',
            verticalAlign: 'middle',
            y: 50
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                dataLabels: {
                    enabled: true,
                    distance: -50,
                    style: {
                        fontWeight: 'bold',
                        color: 'white',
                        textShadow: '0px 1px 2px black'
                    }
                },
                startAngle: -90,
                endAngle: 90,
                center: ['50%', '75%']
            }
        },
        series: [{
            type: 'pie',
            name: 'Browser share',
            innerSize: '50%',
            data: [
			
			<?php
			$FechaHoy=date("Y/m/d");
			$sql=mysql_query("SELECT COUNT( * ) AS Accesos,USUARIO As UsuProceso, (SELECT NOMBRE FROM tabla_usuarios WHERE USUARION = UsuProceso ) As NombreUsuarioFinal FROM `tabla_controlaccesos` Where USUARIO<>'Reportes' GROUP BY USUARIO ORDER BY Accesos DESC Limit 0,10");
			while($res=mysql_fetch_array($sql)){
			?>
			
				['<?php echo $res['NombreUsuarioFinal'] ?>',   <?php echo $res['Accesos'] ?>],
               
			<?php
			}
			?>
			
            ]
        }]
    });
});


		</script>
	</head>
	<body>
<script src="Highcharts-4.1.5/js/highcharts.js"></script>
<script src="Highcharts-4.1.5/js/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 330px; max-width: 600px; margin: 0 auto"></div>

	</body>
</html>
