ElJardinDeCarrejo_Web/textosubidas/graba.php
david 7817b99896 - Títulos en versión inglesa.
- Pequeños arreglos.

git-svn-id: https://192.168.0.254/svn/Proyectos.JardinDeCarrejo_Web/trunk@30 a05c588e-6d60-420d-a138-a9ac874067ed
2010-04-15 09:20:53 +00:00

101 lines
3.5 KiB
PHP

<?php
$noticias_sp = $_POST['noticias_sp'];
$noticias_en = $_POST['noticias_en'];
$ofertas_sp = $_POST['ofertas_sp'];
$ofertas_en = $_POST['ofertas_en'];
graba($noticias_sp, "noticias_sp.txt");
graba($noticias_en, "noticias_en.txt");
graba($ofertas_sp, "ofertas_sp.txt", true);
graba($ofertas_en, "ofertas_en.txt", true);
$noticias = file_get_contents("../index_original.htm");
$f = fopen("../index.htm", "w");
$noticias_sp = str_replace(array("[", "]"), array("<strong>", "</strong>"), $noticias_sp);
$noticias_en = str_replace(array("[", "]"), array("<strong>", "</strong>"), $noticias_en);
$noticias = str_replace(array("{NOTICIAS_SP}", "{NOTICIAS_EN}"), array($noticias_sp, $noticias_en), $noticias);
fwrite($f, $noticias);
fclose($f);
$ofertas = file_get_contents("../es/ofertas-promociones-hotel-rural-santander_original.htm");
$f = fopen("../es/ofertas-promociones-hotel-rural-santander.htm", "w");
$ofertas_sp = str_replace(array("[", "]"), array("<strong>", "</strong>"), $ofertas_sp);
$resultado = str_replace(array("{OFERTAS_SP}"), array($ofertas_sp), $ofertas);
fwrite($f, $resultado);
fclose($f);
$ofertas = file_get_contents("../en/news-offers-rural-hotel-cantabria_original.htm");
$f = fopen("../en/news-offers-rural-hotel-cantabria.htm", "w");
$ofertas_en = str_replace(array("[", "]"), array("<strong>", "</strong>"), $ofertas_en);
$resultado = str_replace(array("{OFERTAS_EN}"), array($ofertas_en), $ofertas);
fwrite($f, $resultado);
fclose($f);
/*$original = file_get_contents("../textonoticias_original.htm");
$texto = file_get_contents("ofertas_sp.txt");
$f = fopen("../textonoticias.htm", "w");
$texto = str_replace(array("[", "]"), array("<strong>", "</strong>"), $texto);
$resultado = str_replace(array("{OFERTAS_SP}"), array($texto), $original);
fwrite($f, $resultado);
fclose($f);
$original = file_get_contents("../English/textonoticias_original.htm");
$texto = file_get_contents("ofertas_en.txt");
$f = fopen("../English/textonoticias.htm", "w");
$texto = str_replace(array("[", "]"), array("<strong>", "</strong>"), $texto);
$resultado = str_replace(array("{OFERTAS_EN}"), array($texto), $original);
fwrite($f, $resultado);
fclose($f);*/
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>
<title>Hotel El jard&iacute;n de Carrejo. Hotel sin humos. Precios y reservas. Carrejo, Cantabria, Espa&ntilde;a</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Estilo3 {
color: #333333;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 22px;
color: #666666;
padding-left:22px;
}
-->
</style>
</head>
<body >
<form name="form1" method="post">
<table width="794" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="../img/cabecera-textos-online.jpg" width="794" height="170"></td>
<td></td>
</tr>
<tr>
<td align="right" height="20" ><pre class="Estilo3"><center>Los cambios han sido realizados</center></td>
</tr>
<tr>
<td align="right" height="20" ><pre class="Estilo3"><center><a href="../index.htm">Ir a la home</a></td>
</tr>
</table>
</form>
</body>
</html>