Example #1
0
 function verUniRuta()
 {
     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.verruta.php');
         ob_start();
         $rutas = $data->verUnidadesRuta();
         if (count($rutas)) {
             include 'app/views/pages/p.verruta.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;
     }
 }