git-svn-id: https://192.168.0.254/svn/Proyectos.ClaveAudio_Web/trunk@16 44ade383-bb54-5b4f-835b-923f7702b206
84 lines
2.5 KiB
PHP
84 lines
2.5 KiB
PHP
<?php
|
|
session_start();
|
|
if (!session_is_registered("clave_audio")) {
|
|
include("../login.php");
|
|
if (!$continuar) exit;
|
|
}
|
|
include('../db.php');
|
|
?>
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<title>Oferta</title>
|
|
<link href="../sformi.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body>
|
|
<table border="0" cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td width="200"><a href="oferta_edit.php?op=add" class="button">[ añadir oferta ]</a></td>
|
|
<tr><td colspan="5"><img src="../_imgs/d.gif" width="200" height="5"></td></tr>
|
|
</table>
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
<?php
|
|
$conn = db_connect();
|
|
if($conn) {
|
|
$query = "SELECT oferta_id, oferta_categoria, oferta_nombre, oferta_estado, oferta_pvp, oferta_unidades, oferta_descripcion
|
|
FROM shoop_oferta
|
|
ORDER BY oferta_categoria, oferta_id";
|
|
$result = mysql_query($query, $conn);
|
|
?>
|
|
<tr>
|
|
<td width="455" valign="top" class="hdr">Nombre</td>
|
|
<td width="100" valign="top" class="hdr" align="right">PVP</td>
|
|
<td width="100" valign="top" class="hdr"> </td>
|
|
</tr>
|
|
<?php
|
|
$secciones = array('', 'Altavoces', 'Electrónicas', 'Reproductores de CD, convertidores D/A, etc.', 'Varios');
|
|
$curSeccion='';
|
|
while ($row = mysql_fetch_array($result))
|
|
{
|
|
$oferta_id = $row['oferta_id'];
|
|
$oferta_categoria = $row['oferta_categoria'];
|
|
$oferta_nombre = $row['oferta_nombre'];
|
|
$oferta_estado = $row['oferta_estado'];
|
|
$oferta_pvp = $row['oferta_pvp'];
|
|
$oferta_unidades = $row['oferta_unidades'];
|
|
$oferta_descripcion = $row['oferta_descripcion'];
|
|
?>
|
|
<tr>
|
|
<td valign="top" class="data"> <?php echo '<span class="lbl">' . $oferta_nombre . '</span>' . (strlen($oferta_estado) ? ' (' . $oferta_estado . ')': "") . (strlen($oferta_descripcion) ? '<br> <i>' . $oferta_descripcion . '</i>': "") ; ?></td>
|
|
<td valign="top" align="right" class="data"><?php echo number_format($oferta_pvp, 2, ',', '.');; ?></td>
|
|
<td valign="top" class="data" align="center"> <a href="oferta_edit.php?op=edit&id=<?php echo $oferta_id; ?>" class="button">[ editar ]</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td bgcolor="#DBDEE6" colspan=7><img src="img/d.gif" width="5" height="1"></td>
|
|
</tr>
|
|
<?php
|
|
} // while
|
|
} else { // IF CONN
|
|
echo '<p>An error has occurred while accessing the database: ' . mysql_error();
|
|
}
|
|
?>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|