function verificaArticulo($Prod) { 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->valorArticulo($Prod); if ($exec != '') { list($unimed, $facconv) = explode("|", $exec); //header('Location: app/views/pages/p.ordcompVerifica.php?nombreProv='.$exec); //header('Location: index.php?action=ok&unimed='.$unimed); $_SESSION['unimed'] = $unimed; $_SESSION["facconv"] = $facconv; } else { //unset($_SESSION['unimed']); $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; } }