function modificaPreOc($provcostid, $provedor, $costo, $total, $nombreprovedor, $cantidad, $rest) { if (isset($_SESSION['user'])) { $data = new pegaso(); $pagina = $this->load_template('Compra Venta'); $html = $this->load_page('app/views/pages/p.ordcomp.php'); ob_start(); $exec = $data->actualizaPreOc($provcostid, $provedor, $costo, $total, $nombreprovedor, $cantidad, $rest); if ($exec != 0) { header('Location: app/views/pages/p.ordcompMod.php'); } else { $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $html . '<h2>No hay usuarios registrados</h2>', $pagina); } $this->view_page($pagina); } else { $e = "Favor de Iniciar Sesión"; header('Location: index.php?action=login&e=' . urlencode($e)); exit; } }