function Ordenes() { session_cache_limiter('private_no_expire'); if (isset($_SESSION['user'])) { $data = new pegaso(); $pagina = $this->load_template('Pedidos'); $html = $this->load_page('app/views/pages/p.ordenes.php'); ob_start(); $exec = $data->VerOrdenes(); if (count($exec) > 0) { include 'app/views/pages/p.ordenes.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; } }