<html>
<body>
	<table style="margin: 0 auto; font: 70% Arial;  color:#424E8A; widht:800px; border-collapse: separate; border-spacing:  3px;">
		<tr>
			<td class='roundTable' style="background-color:#424E8A; font: 120% Arial;  color:white; text-align:center; width:200px; border: black 2px solid;">
				<p>Coberturas</p>
			</td>
			<td class='roundTable' style="background-color:white; text-align:center; width: 100px; border: black 2px solid;">
				<p><img src="picture_library/logo_pacifico.png" width="78px" height="54px" alt="Logo Pacifico"></p>
			</td>
			<td class='roundTable' style="background-color:#E32B2B; text-align:center; width: 100px; border: black 2px solid;">
				<p><img src="picture_library/logo_rimac_seguros.jpg" width="90px" height="35px" alt="Logo Rimac"></p>
			</td>
			<td class='roundTable' style="background-color:white; text-align:center; width: 100px; border: black 2px solid;">
				<p><img src="picture_library/logo-la-positiva (1).png" width="90px" height="35px" alt="Logo La Positiva"></p>
			</td>
			<td class='roundTable' style="background-color:white; text-align:center; width: 100px; border: black 2px solid;">
				<p><img src="picture_library/logo-hdi.gif" width="50px" height="35px" alt="Logo HDI"></p>
			</td>
		</tr>
		<?php
			include("config.php");
			$consulta="SELECT descripcion, idcobertura FROM cobertura";
			$todos=mysql_query($consulta);
				while($registro=mysql_fetch_array($todos))
				{
					echo "
					<tr class='roundTable' style='height:35px;'>
						<td class='roundTable' style='font: 110% tahoma; width: 200px; border: black 1px solid;'>"
							.$registro[0].
						"</td>
						<td class='roundTable' style='background-color:#CEECF5; font: 110% tahoma; width: 100px; border: black 1px solid; text-align:center;'>";
						$consultaPacifico="SELECT valorcobertura FROM cons_coberturas where idcobertura = '".$registro[1]."' and idcategoria = '".$catPacifico."'";
							$ctv = "select idtipovehiculo from modelo where idmodelo = ".$modelo;
							$rstv=mysql_query($ctv);
							$rstv2=mysql_fetch_array($rstv);
							$tipovehiculo=$rstv2[0];

						if ($registro[1] == 17)
						{
							$consultaPacifico="SELECT multimarca FROM DeduciblePacifico where idmarca = '".$marca1."' and idtipovehiculo = '".$tipovehiculo."'";
						}
						if ($registro[1] == 18)
						{
							$consultaPacifico="SELECT preferente FROM DeduciblePacifico where idmarca = '".$marca1."' and idtipovehiculo = '".$tipovehiculo."'";
						}
						if ($registro[1] == 19)
						{
							$consultaPacifico="SELECT concesionario FROM DeduciblePacifico where idmarca = '".$marca1."' and idtipovehiculo = '".$tipovehiculo."'";
						}

							$Pacifico=mysql_query($consultaPacifico);
							$registro2=mysql_fetch_array($Pacifico);
							echo $registro2[0];
					echo "</td>
						<td class='roundTable' style='background-color:#F6CECE; font: 110% tahoma; width: 100px; border: black 1px solid; text-align:center;'>";
							$consultaRimac="SELECT valorcobertura FROM cons_coberturas where idcobertura = '".$registro[1]."' and idcategoria = '".$catRimac."'";
							$Rimac=mysql_query($consultaRimac);
							$registro3=mysql_fetch_array($Rimac);
							echo $registro3[0];
					echo "</td>
						<td class='roundTable' style='background-color:#F5D0A9; font: 110% tahoma; width: 100px; border: black 1px solid; text-align:center;'>";
							$consultaLaPositiva="SELECT valorcobertura FROM cons_coberturas where idcobertura = '".$registro[1]."' and idcategoria = '".$catLaPositiva."'";
							$LaPositiva=mysql_query($consultaLaPositiva);
							$registro4=mysql_fetch_array($LaPositiva);
							echo $registro4[0];
					echo "</td>
						<td class='roundTable' style='background-color:#9DF888; font: 110% tahoma; width: 100px; border: black 1px solid; text-align:center;'>";
							$consultaHDI="SELECT valorcobertura FROM cons_coberturas where idcobertura = '".$registro[1]."' and idcategoria = '".$catHDI."'";
							$HDI=mysql_query($consultaHDI);
							$registro5=mysql_fetch_array($HDI);
					
						if ($registro[1] == 17 or $registro[1] == 18 or $registro[1] == 19)
						{
							echo "Deducible &Uacute;nico elegido";
						}					
						else
						{
							echo $registro5[0];
						}
					echo "</td>
					</tr>";
				}
		?>
	</table>
</body>
</html>