"Carreras", "teachers" => "Profesores", "rooms" => "Aulas"); $clasesbt = array ("years" => "danger", "teachers" => "info", "rooms" => "warning"); $clases = array ("years" => "carreras", "teachers" => "profesores", "rooms" => "aulas"); $tipo_horario = "years"; $id_tabla = ""; $raiz = 1; $directo = 0; if (isset($_GET["h"])) { $tipo_horario = $_GET["h"]; $raiz = 0; } if (isset($_GET["t"])) { $id_tabla = $_GET["t"]; $directo = 1; } $directorio = scandir("horario-actual"); foreach( $directorio as $clave => $valor) { if (false !== stripos($valor, $tipo_horario."_days_horizontal")) { $archivo = $directorio[$clave]; } } $semestre = file_get_contents("horario-actual/" . $archivo); $semestre = substr ($semestre, stripos($semestre, "Comentarios:")); $semestre = trim (substr ($semestre, stripos($semestre, "") + 4, stripos($semestre, "") - stripos($semestre, "") - 4)); if (!$raiz) { $lista = file_get_contents("horario-actual/" . $archivo); $lista = substr ($lista, stripos($lista, "") - stripos($lista, "