function ARuta() { session_cache_limiter('private_no_expire'); if (isset($_SESSION['user'])) { $data = new pegaso(); $pagina = $this->load_template('Pagos'); $html = $this->load_page('app/views/pages/p.aruta.php'); ob_start(); //generamos consultas $exec = $data->ARuta(); $unidad = $data->TraeUnidades(); if (count($exec) > 0) { include 'app/views/pages/p.aruta.php'; $table = ob_get_clean(); $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $table, $pagina); } else { $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $html . '<div class="alert-danger"><center><h2>Hubo un error al mostrar los datos</h2><center></div>', $pagina); } $this->view_page($pagina); } else { $e = "Favor de Iniciar SesiĆ³n"; header('Location: index.php?action=login&e=' . urlencode($e)); exit; } }