<?php
$texto_ofertas = $_POST['ofertas'];
graba($texto_ofertas, "texto_ofertas.txt", true);
$fich_plantilla_ofertas = file_get_contents("../ofertas_plantilla.htm");
$fich_pagina_ofertas = fopen("../ofertas.htm", "w");
$texto_ofertas = str_replace(array("[", "]"), array("<strong>", "</strong>"), $texto_ofertas);
$texto_resultado = str_replace(array("{OFERTAS}"), array($texto_ofertas), $fich_plantilla_ofertas);
fwrite($fich_pagina_ofertas, $texto_resultado);
fclose($fich_pagina_ofertas);
function graba($texto, $fichero, $negritas=false) {
$f = fopen ($fichero, "w");
fwrite($f, $texto);
fclose($f);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="./imagen/cabecera-textos.jpg" width="780" height="82"></td>
</tr>
</table>
<br/>
<td colspan=2 align="center"><strong>Los cambios han sido guardados</strong>
<br/><br/>
Puedes ir a la <a href="http://www.posadalallosa.com/ofertas.htm">p<EFBFBD>gina de ofertas</a> para visualizar el texto, o pulsar <a href="javascript:window.history.back();">aqu<EFBFBD></a> para volver a modificarlo.
</td>
</body>
</html>