ClaveAudio_Web/admin/shoop/marcas.php
2011-05-06 11:33:27 +00:00

68 lines
2.1 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>marcas</title>
<link href="../sformi.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="marcas_edit.php?op=add" class="button">[ a&ntilde;adir una nueva marca ]</a></td>
</tr>
<tr><td><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 fab_id, fab_nombre, fab_url, fab_descripcion FROM shoop_fabricantes ORDER BY fab_nombre";
$result = mysql_query($query, $conn);
$num_results = mysql_num_rows($result);
?>
<tr>
<td colspan="3" valign="top" class="hdr">Marca</td>
</tr>
<?php
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
$fab_id = $row['fab_id'];
$fab_nombre = $row['fab_nombre'];
$fab_nombre = $row['fab_nombre'];
$fab_logo = $row['fab_logo'];
$fab_url = $row['fab_url'];
$fab_descripcion = $row['fab_descripcion'];
?>
<tr>
<td width="160" valign="top" class="data"><b><?php echo $fab_nombre; ?></b><br><img src="../../_logos/c/<?php echo $fab_id; ?>.gif" hspace="10" vspace="2"></td>
<td width="400" valign="top" class="data"><a href="http://<?php echo $fab_url; ?>" target="_blank" class="button"><?php echo $fab_url; ?></a><br><?php echo $fab_descripcion; ?></td>
<td valign="top" class="data"><a href="marcas_edit.php?id=<?php echo $fab_id; ?>" class="button">[ editar ]</a></td>
</tr>
<tr>
<td bgcolor="#DBDEE6" colspan=3><img src="../_imgs/d.gif" width="5" height="1"></td>
</tr>
<?php
} // FOR
} else { // IF CONN
echo '<p>An error has occurred while accessing the database: ' . mysql_error();
}
?>
</table>
<!-- EOF CONTENT -->
</body>
</html>