<?php
require_once "clases/modelo.php";

$conexion = Conectar::con();
$saludoe='';
$cuerpoe='';
$imagene='';
$actual_link_img = '';


$sql = "SELECT id,saludo,cuerpo,imagen,asunto FROM saludo WHERE id=1;"; 
$sentencia = $conexion->prepare($sql);
$sentencia->execute();
$sentencia->bind_result($id,$saludo,$cuerpo,$imagen,$asunto);
$arr = array();

 while ($sentencia->fetch()) {
	 $saludoe=$saludo;
	 $cuerpoe=$cuerpo;
	 $imagene=$imagen;
	 $asuntoe=$asunto;
}

if($imagene!=''){
	//$actual_link_img = '<img src="http://'.$_SERVER['HTTP_HOST'].'/imagenes/'.$imagene.'">';
	$img='http://'.$_SERVER['HTTP_HOST'].'/imagenes/'.$imagene;
	$actual_link_img ="background-image:url('".$img."')";
	
}

?>
<html>
<head><title><?=$_GET['titulo']?></title></head>
<body style="font-family: Arial, 'Helvetica Neue';">
<div style="margin:0 auto 0 auto; width:847px;">
<?=$_GET['saludo']?><br>
<?=$_GET['cuerpo']?><br>
<table width="847" height="1004px" border="0" style="<?=$actual_link_img?>">
<tr height="395"><td colspan="2"></td></tr>
<tr height="40"><td width="160"></td><td><font style="font-size:110%;" color="#626264"><?=$_GET['cli']?></font></td></tr>
<tr><td colspan="2"></td></tr>
</table>
</div>
</body>
</html>