<?php
session_start();
include('../db.php');

if (!session_is_registered("clave_audio")) {
	include("../login.php");
	if (!$continuar) exit;
}
?>

<!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>glosario</title>
<link href="../sformi.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- CONTENT -->
	<table border="0" cellspacing="0" cellpadding="0">
		<tr><td><a href="glosario_edit.php?op=add" class="button">[ a&ntilde;adir un nuevo registro ]</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 glosario_id, glosario_palabra, glosario_descripcion, glosario_url FROM edito_glosario ORDER BY glosario_palabra";
		$result = mysql_query($query, $conn);
		$num_results = mysql_num_rows($result);
?>
	<tr>
		<td width="150" valign="top" class="hdr">Palabra</td><td width="300" valign="top" class="hdr">Descripci&oacute;n</td><td></td>
	</tr>
<?php
	for ($i=0; $i <$num_results; $i++)
	{
		$row = mysql_fetch_array($result);
		$glosario_id = $row['glosario_id'];
		$glosario_palabra = $row['glosario_palabra'];
		$glosario_descripcion = $row['glosario_descripcion'];
?>
	<tr>
			<td width="150" valign="top" class="lbl"><?php echo $glosario_palabra; ?></td><td width="300" valign="top" class="data"><?php echo $glosario_descripcion; ?></td>
			<td valign="top" class="data">&nbsp;<a href="glosario_edit.php?op=edit&id=<?php echo $glosario_id; ?>" class="button">[ editar ]</a></td>
	</tr>
	<tr>
		<td bgcolor="#DBDEE6" colspan="4"><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>
</body>
</html>
