Se adaptan las ofertas para que la ficha tenga una foto grande 348 como las novedades

git-svn-id: https://192.168.0.254/svn/Proyectos.ClaveAudio_Web/trunk@18 44ade383-bb54-5b4f-835b-923f7702b206
This commit is contained in:
roberto 2011-06-20 16:40:51 +00:00
parent e6ec77a78c
commit 3b35a49852
3 changed files with 39 additions and 33 deletions

View File

@ -54,8 +54,9 @@ $conn = db_connect();
if ($operacion != "del") {
// modifico la imagen.
uploadImagenOferta($id, 247, 95, 168, 102);
uploadPDFOferta($id);
uploadImagenOferta($id, 348, 248, 168, 102);
uploadImagenOferta($id, 247, 95, 108, 108);
uploadPDFOferta($id);
// y vuelvo a la pantalla correspondiente
header('Location: oferta_edit.php?op=edit&id=' . $id);
}

View File

@ -98,11 +98,11 @@ define("MAX_SIZE", $max_size);
<tr>
<td>
<?php
if(file_exists('../../_ofr/' . $id . '_247.jpg')) {
if(file_exists('../../_ofr/' . $id . '_348.jpg')) {
?>
<table width="247" border="1" cellspacing="0" cellpadding="0" bordercolor="#333333" style="margin-top:10px; border-style:solid; border-color:#444444; border:1px; border-padding:1px;">
<table width="348" border="1" cellspacing="0" cellpadding="0" bordercolor="#333333" style="margin-top:10px; border-style:solid; border-color:#444444; border:1px; border-padding:1px;">
<tr>
<td align="center"><img src="../../_ofr/<?php echo $id; ?>_247.jpg"></td>
<td align="center"><img src="../../_ofr/<?php echo $id; ?>_348.jpg"></td>
</tr>
</table>
<?php

View File

@ -139,34 +139,7 @@ switch($oferta_categoria_id) {
</td>
<td></td>
<td width="170" valign="top" align="center">
<?php
//SI TIENE PDF la imagen irá al pdf si no a la ficha
$path_pdf = '_ofr/' . $oferta_id . '.pdf';
$path_jpg = '_ofr/' . $oferta_id . '_168.jpg';
if (!file_exists($path_pdf))
$path_pdf = "";
if (!file_exists($path_jpg))
$path_jpg = "";
if ($path_pdf != "") {
$enlace = $path_pdf;
}
else
$enlace = "oferta_ficha.php?id=". $oferta_id;
?>
<a href="<?php echo $enlace; ?>">
<?php
if ($path_jpg != "") {
?>
<img src="<?php echo $path_jpg; ?>" width="160" border="0"></a>
<?php }
if ($path_pdf != "") {
?>
<a href="<?php echo $enlace; ?>">Ver oferta</a>
<?php } ?>
<td width="170" valign="top" align="center"></td>
<tr>
<td width="170"><img src="_imgs/d.gif" width="170" height="12"></td><td width="8"><img src="_imgs/d.gif" width="8" height="1"></td><td width="170"><img src="_imgs/d.gif" width="170" height="1"></td></tr>
@ -226,6 +199,38 @@ switch($oferta_categoria_id) {
}
}
?>
<tr><td align="center">
<?php
//SI TIENE PDF la imagen irá al pdf si no a la ficha
$path_pdf = '_ofr/' . $oferta_id . '.pdf';
$path_jpg = '_ofr/' . $oferta_id . '_348.jpg';
if (!file_exists($path_pdf))
$path_pdf = "";
if (!file_exists($path_jpg))
$path_jpg = "";
if ($path_pdf != "") {
$enlace = $path_pdf;
}
else
$enlace = "oferta_ficha.php?id=". $oferta_id;
?>
<a href="<?php echo $enlace; ?>">
<?php
if ($path_jpg != "") {
?>
<img src="<?php echo $path_jpg; ?>" width="348" border="0"></a>
<?php }
if ($path_pdf != "") {
?>
<a href="<?php echo $enlace; ?>">Ver oferta</a>
<?php } ?>
</td></tr>
</table>
</td>
<td></td>