function guardar($codigo)
 {
     $xErr = new cError();
     $xErr->setNewError($codigo, false, $this->mMessages);
 }
$contenido = parametro("idcontenido", "", MQL_RAW);
$programacion = parametro("idprogramacion");
$tipodeprog = parametro("idtipodeprogramacion");
$generadoen = parametro("idgeneradoen");
$mails = parametro("idmails", "", MQL_RAW);
$medios = "";
$destinatarios = "";
$medios = $ByMail == true ? ",MAIL" : "";
$medios = $BySMS == true ? ",SMS" : "";
$programacion = $generadoen == SYS_ALERTA_POR_EVENTO ? $programacion : "{$tipodeprog}:{$programacion}";
if ($action == SYS_UNO) {
    if ($titulo == "" or trim("{$oficiales} {$empresas} {$personas} {$mails}") == "") {
        //$msg			.= "$titulo |$oficiales| $empresas |$personas |$mails \r\n";
        $msg .= $xHP->lang(MSG_ERROR_SAVE);
        if (MODO_DEBUG == true) {
            $xErr = new cError();
            $msg .= $xErr->getREQVars();
        }
    } else {
        $xA = new cAlertasDelSistema();
        $destinatarios .= $oficiales == "" ? "" : "OFICIALES:{$oficiales}|";
        $destinatarios .= $empresas == "" ? "" : "EMPRESAS:{$empresas}|";
        $destinatarios .= $personas == "" ? "" : "PERSONAS:{$personas}|";
        $destinatarios .= $mails == "" ? "" : "CORREO:{$mails}|";
        $xA->setAgregarProgramacion($titulo, $contenido, $destinatarios, $programacion, $generadoen, $medios, $precomandos, $intentcheck);
        $msg .= $xA->getMessages();
        $msg .= $xHP->lang(MSG_READY_SAVE);
    }
}
$xPRG = new cAlertasDelSistema();
$xSel2 = new cHSelect();
 function goToPageError($iderror = DEFAULT_CODIGO_DE_ERROR, $out = OUT_HTML)
 {
     if ($out == OUT_HTML) {
         header("location:../404.php?i={$iderror}");
         exit;
     } else {
         $xErr = new cError($iderror);
         $xErr->init();
         $arrResponse = array("codigo" => $iderror, "message" => $xErr->getDescription());
         exit(json_encode($arrResponse));
     }
 }
<?php

/**
*	Archivo de redireccion en paginas
*	//
*/
include_once "core/core.deprecated.inc.php";
include_once "core/core.error.inc.php";
$id = isset($_GET["i"]) ? $_GET["i"] : DEFAULT_CODIGO_DE_ERROR;
$xErr = new cError($id);
$xErr->init();
?>
<html>
<head>
<title>S.A.F.E. OSMS</title>
<link href="css/global.css" rel="stylesheet" type="text/css">
</head>
<style>
    body {
	text-align: center;
	font-family: monospace;  }
.error {
  background: #f2dede;
  color: #b94a48;
  border-color: #b94a48;
  max-width: 400px;
  width: 50%;
  margin:0 auto;
  min-height: 400px;
  border-radius: 10px;
  border-style: solid;