if ($Nivel == 1 || $Nivel == "Todos") { if ($_SESSION['Nivel'] == "1") { $Inicio = 1; } else { $Inicio = 2; } $Fin = 7; } else { $Inicio = $Nivel; $Fin = $Nivel; } for ($j = $Inicio; $j <= $Fin; $j++) { $val = array(); for ($i = strtotime($FechaInicio); $i <= strtotime($FechaFin); $i = $i + 86400) { $Fecha = date("Y-m-d", $i); $log = $logusuario->mostrarCantidadUsuarioFecha($Fecha, $j); $log = array_shift($log); $Cantidad = $log['Cantidad']; array_push($val, $Cantidad); } switch ($j) { case 1: $nombre = $idioma['Administradores']; break; case 2: $nombre = $idioma['Directores']; break; case 3: $nombre = $idioma['Docentes']; break; case 4: