private function GetXmlValidationReceipt() { $DB = new DataBase(); $ReceiptPath = filter_input(INPUT_POST, "ReceiptPath"); $IdReceipt = filter_input(INPUT_POST, "IdReceipt"); $content = filter_input(INPUT_POST, "content"); if (!strlen($ReceiptPath) > 0 or !file_exists($ReceiptPath)) { $QueryGetReceipt = "SELECT ruta_acuse FROM validacion_{$content} WHERE id_validacion = {$IdReceipt}"; $ResultGetReceipt = $DB->ConsultaSelect("CFDI", $QueryGetReceipt); if ($ResultGetReceipt['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al intentar recuperar el comprobante de validación</p><br>Detalles:<br><br>" . $ResultGetReceipt['Estado']); return 0; } $ReceiptPath = $ResultGetReceipt['ArrayDatos'][0]['ruta_acuse']; } if (file_exists($ReceiptPath)) { $xml = simplexml_load_file($ReceiptPath); header('Content-Type: text/xml'); echo $xml->saveXML(); } else { XML::XmlResponse("Error", 0, "<p><b>Error</b>, el comprobante de validación solicitado no fué encontrado</p>"); } }
private function NewUser() { $DB = new DataBase(); $nombre = filter_input(INPUT_POST, "nombre"); $apellido_p = filter_input(INPUT_POST, "apellido_p"); $apellido_m = filter_input(INPUT_POST, "apellido_m"); $fecha_nac = filter_input(INPUT_POST, "fecha_nac"); $curp = filter_input(INPUT_POST, "curp"); $usuario = filter_input(INPUT_POST, "usuario"); $password = filter_input(INPUT_POST, "password"); $Repeated = "SELECT * FROM Usuarios WHERE nombre_usuario COLLATE utf8_bin = '{$usuario}'"; $ResultRepetaed = $DB->ConsultaSelect("CFDI", $Repeated); if ($ResultRepetaed['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al comprobar que el usuario no estuviera registrado previamente</p><br>Detalles:<br><br>" . $ResultRepetaed['Estado']); return; } if (count($ResultRepetaed['ArrayDatos']) > 0) { XML::XmlResponse("RepeatedUser", 1, "El usuario '{$nombre}' ya existe"); return 0; } $Insert = "INSERT INTO Usuarios (nombre_usuario,password,nombre,apellido_materno,apellido_paterno,curp,fecha_nac,tipo_usuario,fecha_alta)\r\n VALUES ('{$usuario}' ,'{$password}', '{$nombre}','{$apellido_m}','{$apellido_p}','{$curp}','{$fecha_nac}','usuario',now())"; if (($ResultInsert = $DB->ConsultaQuery("CFDI", $Insert)) != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al registrar el nuevo usuario</p><br>Detalles:<br><br>{$ResultInsert}"); return 0; } XML::XmlResponse("NewUser", 1, "El usuario '{$usuario}' se dio de alta con éxito"); }
private function GetHistoric() { $DB = new DataBase(); $content = filter_input(INPUT_POST, "content"); $IdDetail = filter_input(INPUT_POST, "IdDetail"); $ServerName = filter_input(INPUT_SERVER, "SERVER_NAME"); $q = "select his.id_historial,logi.nombre_usuario, his.fecha_hora, his.tipo_archivo, " . "vali.id_validacion, vali.ruta_acuse , his.ruta_xml, his.ruta_pdf from historial_{$content} his\n LEFT JOIN Usuarios logi on his.id_usuario=logi.IdUsuario \n LEFT JOIN validacion_{$content} vali on vali.id_validacion=his.id_validacion\n WHERE his.id_detalle={$IdDetail} ORDER BY his.tipo_archivo DESC"; $ResultGetHistoric = $DB->ConsultaSelect("CFDI", $q); if ($ResultGetHistoric['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al consulta el histórico del documento</p><br>Detalles:<br><br>" . $ResultGetHistoric['Estado']); return 0; } // XML::XmlArrayResponse("Historical", "Register", $ResultGetHistoric['ArrayDatos']); $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; $root = $doc->createElement('Historical'); $doc->appendChild($root); foreach ($ResultGetHistoric['ArrayDatos'] as $array) { $historico = $doc->createElement('Register'); $usuario = $doc->createElement('nombre_usuario', $array['nombre_usuario']); $historico->appendChild($usuario); $fecha = $doc->createElement('fecha_hora', $array['fecha_hora']); $historico->appendChild($fecha); $tipo_archivo = $doc->createElement('tipo_archivo', $array['tipo_archivo']); $historico->appendChild($tipo_archivo); $id_validacion = $doc->createElement('id_validacion', $array['id_validacion']); $historico->appendChild($id_validacion); $ruta_validacion = $doc->createElement("ruta_acuse", $array['ruta_acuse']); $historico->appendChild($ruta_validacion); $ruta_xml = $doc->createElement('ruta_xml', $array['ruta_xml']); $historico->appendChild($ruta_xml); $RutaPDF = $array['ruta_pdf']; if (strlen($RutaPDF) == 0) { $RutaPDF = 'S/PDF'; } else { if (file_exists($RutaPDF)) { //La ruta del pdf es absoluta y solo se necesita la ruta a nivel de server por eso se reconstruye $directorio = explode("/", $RutaPDF); $ruta_nueva_pdf = '/'; for ($cont = 3; $cont < count($directorio); $cont++) { if ($cont + 1 == count($directorio)) { $ruta_nueva_pdf .= $directorio[$cont]; } else { $ruta_nueva_pdf .= $directorio[$cont] . '/'; } } $ruta = 'http://' . $ServerName . $ruta_nueva_pdf; $RutaPDF = $ruta; } } $ruta_pdf = $doc->createElement("ruta_pdf", $RutaPDF); $historico->appendChild($ruta_pdf); $root->appendChild($historico); } header("Content-Type:text/xml"); echo $doc->saveXML(); }
public static function GetEnterprisePath($EnterpriseAlias) { $DB = new DataBase(); $Query = "SELECT ent.IdVolume, vol.VolumeName FROM Enterprises ent INNER JOIN Volumes vol ON " . "ent.IdVolume = vol.IdVolume WHERE ent.Alias COLLATE utf8_bin = '{$EnterpriseAlias}'"; $Result = $DB->ConsultaSelect("CSDOCS_CFDI", $Query, 1); if ($Result['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b< al consultar el Path del Volúmen</p><br>Detalles:<br><br>" . $Result['Estado']); return 0; } $Path = $Result['ArrayDatos'][0]['VolumeName']; if (!file_exists($Path)) { XML::XmlResponse("Error", 0, "<p><b>Error</b> el path de la empresa con Alias <b>{$EnterpriseAlias}</b> no existe.</p>"); return 0; } return $Path; }
private function NewUser() { $DB = new DataBase(); $EnterpriseAlias = filter_input(INPUT_POST, "EnterpriseAlias"); $NewUserName = filter_input(INPUT_POST, "NewUsername"); $LastName = filter_input(INPUT_POST, "LastName"); $MLastName = filter_input(INPUT_POST, "MLastName"); $SystemUsername = filter_input(INPUT_POST, "SystemUsername"); $Password = filter_input(INPUT_POST, "Password"); $Repeated = "SELECT * FROM Users WHERE UserName COLLATE utf8_bin = '{$SystemUsername}'"; $ResultRepetaed = $DB->ConsultaSelect($EnterpriseAlias, $Repeated); if ($ResultRepetaed['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al comprobar que el usuario no estuviera registrado previamente</p><br>Detalles:<br><br>" . $ResultRepetaed['Estado']); return; } if (count($ResultRepetaed['ArrayDatos']) > 0) { XML::XmlResponse("RepeatedUser", 1, "El usuario '{$NewUserName}' ya existe"); return 0; } $now = date('Y-m-d'); $Insert = "INSERT INTO Users (UserName, Password, Name, LastName, MLastName, DischargeDate)\n VALUES ('{$SystemUsername}', '{$Password}', '{$NewUserName}', '{$LastName}', '{$MLastName}', '{$now}')"; $IdUser = $DB->ConsultaInsertReturnId($EnterpriseAlias, $Insert); if (!$IdUser > 0) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al registrar el nuevo usuario</p><br>Detalles:<br><br>{$ResultInsert}"); return 0; } $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; $root = $doc->createElement("NewUser"); $doc->appendChild($root); $mensaje_ = $doc->createElement('Mensaje', "Usuario '{$NewUserName}' registrado con éxito"); $root->appendChild($mensaje_); $IdUserXml = $doc->createElement("IdUser", $IdUser); $root->appendChild($IdUserXml); $NewUsernameSystemXml = $doc->createElement("SystemUsername", $SystemUsername); $root->appendChild($NewUsernameSystemXml); $UserName = $doc->createElement("UserName", $NewUserName); $root->appendChild($UserName); $LastNameXml = $doc->createElement("LastName", $LastName); $root->appendChild($LastNameXml); $MLastNameXml = $doc->createElement("MLastName", $MLastName); $root->appendChild($MLastNameXml); $DischargeDate = $doc->createElement("DischargeDate", $now); $root->appendChild($DischargeDate); header("Content-Type:text/xml"); echo $doc->saveXML(); }
private function LogIn() { $DB = new DataBase(); // echo "<p>Ususario= ".$_POST['usuario']." Contraseña= ".$_POST['password']."</p>"; $EnterpriseAlias = filter_input(INPUT_POST, "EnterpriseAlias"); /* Alias de la empresa */ $IdEnterprise = filter_input(INPUT_POST, "IdEnterprise"); $UserName = filter_input(INPUT_POST, "UserName"); $idUser = 0; $Password = filter_input(INPUT_POST, "Password"); $q = ''; /* Modo administración solo puede entrar root */ if (strcasecmp($UserName, 'root') != 0 and strcasecmp($IdEnterprise, 0) == 0) { XML::XmlResponse("AccessDenied", 0, "<p>Acceso solo para root</p>"); return 0; } if (strcasecmp($EnterpriseAlias, "Manager") == 0) { $q = "SELECT * FROM Users WHERE UserName COLLATE utf8_bin = '{$UserName}' AND Password COLLATE utf8_bin = '{$Password}'"; } else { $q = "SELECT * FROM Users WHERE UserName COLLATE utf8_bin = '{$UserName}' AND Password COLLATE utf8_bin = '{$Password}'"; } $ResultLogin = $DB->ConsultaSelect($EnterpriseAlias, $q); if ($ResultLogin['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al iniciar sesión</p><br>Detalles:<br><br>" . $ResultLogin['Estado']); return 0; } $UserInfo = $ResultLogin['ArrayDatos']; if (count($UserInfo) > 0) { if (strcasecmp($UserName, "root") == 0) { $IdEnterprise = 1; } $nombre_usuario = $UserInfo[0]['UserName']; $idUser = $UserInfo[0]['IdUser']; } else { XML::XmlResponse("AccessDenied", 0, "<p>Usuario no registrado</p>"); return 0; } /* Se busca que la empresa este registrada */ if ($IdEnterprise > 0) { $EnterpriseLogin = "******"; $ResultEnterprisesLogin = $DB->ConsultaSelect($EnterpriseAlias, $EnterpriseLogin); if ($ResultEnterprisesLogin['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al solicitar la empresa {$EnterpriseAlias}</p><br>Detalles:<br><br>" . $ResultEnterprisesLogin['Estado']); return 0; } if (!($ResultEnterprisesLogin['ArrayDatos'] > 0)) { XML::XmlResponse("AccessDenied", 0, "<p>Empresa desconocida</p>"); return 0; } } $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; $root = $doc->createElement('Login'); $doc->appendChild($root); $id_usuario_ = $doc->createElement('IdUser', $idUser); $root->appendChild($id_usuario_); $nombre_usuario = $doc->createElement('UserName', $UserName); $root->appendChild($nombre_usuario); $EnterpriseNameXml = $doc->createElement("EnterpriseName", $EnterpriseAlias); $root->appendChild($EnterpriseNameXml); $IdEnterpriseXml = $doc->createElement("IdEnterprise", $IdEnterprise); $root->appendChild($IdEnterpriseXml); header("Content-Type:text/xml"); echo $doc->saveXML(); }
private function GetFiles() { $DB = new DataBase(); $IdUser = filter_input(INPUT_POST, "IdUser"); $IdUserName = filter_input(INPUT_POST, "UserName"); $content = filter_input(INPUT_POST, "content"); $IdReceiver = filter_input(INPUT_POST, "IdReceiver"); $StartDate = filter_input(INPUT_POST, "StartDate"); $EndDate = filter_input(INPUT_POST, "EndDate"); $IdTransmiter = filter_input(INPUT_POST, "IdTransmiter"); $SearchWord = trim(filter_input(INPUT_POST, "SearchWord"), ' '); $WhereTransmiter = ''; $Match = ''; $Key = 0; $TableName = ''; $q = ''; if ($IdTransmiter > 0) { $WhereTransmiter = "AND det.id_emisor = {$IdTransmiter}"; } if (strcasecmp($content, "provider") == 0) { $Key = 3; $TableName = "proveedor"; } if (strcasecmp($content, "client") == 0) { $Key = 2; $TableName = "cliente"; } if (strcasecmp($content, "payroll") == 0) { $Key = 1; $TableName = "nomina"; } if (strlen($SearchWord) > 0) { $Match = " AND MATCH (det.Full) AGAINST ('{$SearchWord}' IN BOOLEAN MODE) "; } if (strcasecmp($content, 'Provider') == 0 or strcasecmp($content, 'Client') == 0) { if ($StartDate == "" and $EndDate == "") { $q = "SELECT det.id_detalle, det.fecha, det.folio, det.subTotal, det.descuento, det.total,ruta_xml, det.ruta_pdf, det.id_validacion, det.tipo_archivo, val.ruta_acuse FROM detalle_factura_{$TableName} det inner join validacion_{$TableName} val on det.id_validacion=val.id_validacion WHERE det.id_receptor = {$IdReceiver} {$WhereTransmiter} {$Match}"; } if ($StartDate != "" and $EndDate != "") { $q = "SELECT det.id_detalle, det.fecha, det.folio, det.subTotal, det.descuento, det.total,ruta_xml, det.ruta_pdf, det.id_validacion, det.tipo_archivo, val.ruta_acuse FROM detalle_factura_{$TableName} det inner join validacion_{$TableName} val on det.id_validacion=val.id_validacion WHERE id_receptor={$IdReceiver} {$WhereTransmiter} AND (det.fecha BETWEEN '{$StartDate}' AND '{$EndDate}') {$Match}"; } if ($StartDate != "" and $EndDate == "") { $q = "SELECT det.id_detalle, det.fecha, det.folio, det.subTotal, det.descuento, det.total,ruta_xml, det.ruta_pdf, det.id_validacion, det.tipo_archivo, val.ruta_acuse FROM detalle_factura_{$TableName} det inner join validacion_{$TableName} val on det.id_validacion=val.id_validacion WHERE det.fecha>='{$StartDate}' AND id_receptor={$IdReceiver} {$WhereTransmiter} {$Match}"; } if ($StartDate == "" and $EndDate != "") { $q = "SELECT det.id_detalle, det.fecha, det.folio, det.subTotal, det.descuento, det.total,ruta_xml, det.ruta_pdf, det.id_validacion, det.tipo_archivo, val.ruta_acuse FROM detalle_factura_{$TableName} det inner join validacion_{$TableName} val on det.id_validacion=val.id_validacion WHERE det.fecha<='{$EndDate}' AND id_receptor={$IdReceiver} {$WhereTransmiter} {$Match}"; } } if (strcasecmp($content, 'PayRoll') == 0) { if ($StartDate == "" and $EndDate == "") { $q = "SELECT det.id_detalle, det.fecha, det.folio, det.subTotal, det.descuento, det.total,ruta_xml, det.ruta_pdf, det.id_validacion, det.tipo_archivo, val.ruta_acuse FROM detalle_factura_cliente det inner join validacion_cliente val on det.id_validacion=val.id_validacion WHERE det.id_receptor={$IdReceiver} and det.id_emisor={$IdTransmiter}"; } if ($StartDate != "" and $EndDate != "") { $q = "SELECT id_detalle,FechaPago,SalarioBaseCotApor,SalarioDiarioIntegrado,xml_ruta,pdf_ruta FROM detalle_recibo_nomina WHERE id_receptor={$IdReceiver} AND id_emisor={$IdTransmiter} AND (FechaPago BETWEEN '{$StartDate}' AND '{$EndDate}')"; } if ($StartDate != "" and $EndDate == "") { $q = "SELECT id_detalle,FechaPago,SalarioBaseCotApor,SalarioDiarioIntegrado,xml_ruta,pdf_ruta FROM detalle_recibo_nomina WHERE FechaPago>='{$StartDate}' AND id_receptor={$IdReceiver} AND id_emisor={$IdTransmiter}"; } if ($StartDate == "" and $EndDate != "") { $q = "SELECT id_detalle,FechaPago,SalarioBaseCotApor,SalarioDiarioIntegrado,xml_ruta,pdf_ruta FROM detalle_recibo_nomina WHERE FechaPago<='{$EndDate}' AND id_receptor={$IdReceiver} AND id_emisor={$IdTransmiter}"; } } $ResultGetFiles = $DB->ConsultaSelect("CFDI", $q); if ($ResultGetFiles['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al intentar recuperar los CFDI's</p><br>Detalles:<br><br>" . $ResultGetFiles['Estado']); return 0; } $FilesArray = $ResultGetFiles['ArrayDatos']; $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; $root = $doc->createElement('Files'); for ($cont = 0; $cont < count($FilesArray); $cont++) { $Cfdi = $doc->createElement("File"); $IdCfdi = $doc->createElement("IdCfdi", $FilesArray[$cont]['id_detalle']); $Cfdi->appendChild($IdCfdi); $Fecha = $doc->createElement("Date", $FilesArray[$cont]['fecha']); $Cfdi->appendChild($Fecha); $folio = $doc->createElement("Folio", $FilesArray[$cont]['folio']); $Cfdi->appendChild($folio); $CfdiSubtotal = $doc->createElement("subTotal", $FilesArray[$cont]['subTotal']); $Cfdi->appendChild($CfdiSubtotal); $CfdiTotal = $doc->createElement("Total", $FilesArray[$cont]['total']); $Cfdi->appendChild($CfdiTotal); $CfdiRutaXml = $doc->createElement("XmlPath", $FilesArray[$cont]['ruta_xml']); $Cfdi->appendChild($CfdiRutaXml); $CfdiPdf = $doc->createElement("PdfPath", $FilesArray[$cont]['ruta_pdf']); $Cfdi->appendChild($CfdiPdf); $CfdiState = $doc->createElement("StateCfdi", $FilesArray[$cont]['tipo_archivo']); $Cfdi->appendChild($CfdiState); $CfdiIdValidation = $doc->createElement("IdValidationReceipt", $FilesArray[$cont]['id_validacion']); $Cfdi->appendChild($CfdiIdValidation); $CfdiReceiptPath = $doc->createElement("ReceiptValidationPath", $FilesArray[$cont]['ruta_acuse']); $Cfdi->appendChild($CfdiReceiptPath); $root->appendChild($Cfdi); } $doc->appendChild($root); header("Content-Type:text/xml"); echo $doc->saveXML(); }
private function GetActiveEmails() { $DB = new DataBase(); $EnterpriseAlias = filter_input(INPUT_POST, "EnterpriseAlias"); $IdUser = filter_input(INPUT_POST, "IdUser"); $UserName = filter_input(INPUT_POST, "UserName"); $ActiveEmailsQuery = "SELECT IdEmail, User FROM EmailEngine"; $ActiveEmailResult = $DB->ConsultaSelect($EnterpriseAlias, $ActiveEmailsQuery); if ($ActiveEmailResult['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al consultar los correos activos</p><br>Detalles:<br><br>" . $ActiveEmailResult['Estado']); return 0; } XML::XmlArrayResponse("ActiveEmails", "Email", $ActiveEmailResult['ArrayDatos']); }
private function GetListEnterprisesXml() { $DB = new DataBase(); $content = filter_input(INPUT_POST, "content"); $QuerySelect = ''; if (strcasecmp($content, "provider") == 0) { $QuerySelect = "SELECT *FROM emisor_factura_proveedor"; } if (strcasecmp($content, "client") == 0) { $QuerySelect = "SELECT *FROM emisor_factura_cliente"; } if (strcasecmp($content, "payroll") == 0) { $QuerySelect = "SELECT *FROM emisor_recibo_nomina"; } $Result = $DB->ConsultaSelect("CFDI", $QuerySelect); if ($Result['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al obtener el listado de empresas</p><br>Detalles:<br><br>" . $Result['Estado']); return 0; } $Enterprises = $Result['ArrayDatos']; $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; $root = $doc->createElement('Enterprises'); for ($cont = 0; $cont < count($Enterprises); $cont++) { $Enterprise = $doc->createElement("Enterprise"); $IdEnterprise = $doc->createElement("IdEnterprise", $Enterprises[$cont]["idemisor"]); $Enterprise->appendChild($IdEnterprise); $EnterpriseName = $doc->createElement("Name", $Enterprises[$cont]['nombre']); $Enterprise->appendChild($EnterpriseName); $EnterpriseRFC = $doc->createElement("RFC", $Enterprises[$cont]['rfc']); $Enterprise->appendChild($EnterpriseRFC); $root->appendChild($Enterprise); } $doc->appendChild($root); header("Content-Type:text/xml"); echo $doc->saveXML(); }
private function RegisterVolumes() { $DB = new DataBase(); $RefularExpression = "/volume_.*/"; /* Ayuda a identificar un volumen (Inicio de línea de salida) */ $DiskDetail = shell_exec("df -m | grep volume"); $MemoryArray = preg_split('/\\s+/', trim($DiskDetail)); $Volumes = array(); for ($cont = 0; $cont < count($MemoryArray); $cont++) { $Volume = preg_match($RefularExpression, $MemoryArray[$cont]); if ($Volume) { $Volumes[] = array("FileSystem" => $MemoryArray[$cont], "Blocks" => $MemoryArray[$cont + 1], "Used" => $MemoryArray[$cont + 2], "Available" => $MemoryArray[$cont + 3], "Use" => $MemoryArray[$cont + 4], "Mounted" => $MemoryArray[$cont + 5]); } } /* Una vez obtenidos los volúmenes se registran en la BD */ for ($cont = 0; $cont < count($Volumes); $cont++) { $VolumeName = $Volumes[$cont]['Mounted']; // $FileSystem = $Volumes[$cont]['FileSystem']; // $Blocks = $Volumes[$cont]['Blocks']; $Used = $Volumes[$cont]['Used']; $Available = $Volumes[$cont]['Available']; $Total = (int) $Used + (int) $Available; $CheckIfExistVolume = "SELECT *FROM Volumes WHERE VolumeName COLLATE utf8_bin = '{$VolumeName}'"; $ResultCheck = $DB->ConsultaSelect("Manager", $CheckIfExistVolume); if ($ResultCheck['Estado'] != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al relizar registro de volúmenes</p><br>Detalles:<br><br>" . $ResultCheck['Estado']); return 0; } if (count($ResultCheck['ArrayDatos']) > 0) { continue; } /* Registro del volúmen */ $InsertVolume = "INSERT INTO Volumes (VolumeName, Used, Available, TotalMemory) VALUES ('{$VolumeName}', {$Used}, {$Available}, {$Total})"; if (($ResultInsert = $DB->ConsultaQuery("Manager", $InsertVolume)) != 1) { XML::XmlResponse("Error", 0, "<p><b>Error</b> al registrar el volumen <b>{$VolumeName}</b></p><br>Detalles:<br><br>{$ResultInsert}"); return 0; } } }