<?php include 'sesion.php';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $nombresitio ?> - Panel de Administracion</title>
<style type="text/css">
<!--


body {
	background-image: url(../fondeux.jpg);
}


-->
</style>


<?php include 'concha.php';?>



<link href="../estilo.css" rel="stylesheet" type="text/css" />
  
</head>

<body>




</script>

  <script language=javascript>
function ventanaSecundaria (URL){
   window.open(URL,"ventana1","width=550,height=450,scrollbars=NO")
}
  </script>



  
<table width="900" border="0" align="center" cellpadding="4" cellspacing="0">
      <tr>
      <td bgcolor="#F1F2ED"><?php include 'menu.php';?></td>
    </tr>
  
    <tr>
      <td bgcolor="#FFFFFF">
      
    
    
    
    

<form id="form1" name="form1" method="post" action="formcat.php">

<p>Agregar Categoria Madre<br />

  <input type="text" name="nombre" id="nombre" />

</p>

<p>

  <input type="submit" name="button" id="button" value="Enviar" />

</p>



</form>





<a href="subcategorias.php">Agregar una subcategoria</a><br />

<br />

<?

include('concha.php');

mysql_connect ("$host", "$usuario", "$contra");

mysql_select_db ("$basedatos");



$sql = "SELECT * FROM cla_categorias ORDER BY nombre";



$consulta = mysql_query ($sql);

while ($row = mysql_fetch_array($consulta))

{

$ID = $row["ID"];

$nombre = $row["nombre"]; ?>

<span class="Estilo1">&lt;<a href="borrarcat.php?ID=<?php echo $ID ?>">x</a>&gt; | <strong><?php echo $nombre ?> </strong></span>

<HR />





<?





$sql2 = "SELECT * FROM subcategorias WHERE IDC = '$ID' ORDER BY nombresub";



$consulta2 = mysql_query ($sql2);

while ($row2 = mysql_fetch_array($consulta2))

{

$IDS = $row2["ID"];

$nombresub = $row2["nombresub"]; ?>

<span class="Estilo1">&lt;<a href="borrarsub.php?ID=<?php echo $IDS ?>">x</a>&gt; | --------- ><?php echo $nombresub ?> </span>

<HR />



<?

}

mysql_free_result($consulta2);

?>





<?

}

mysql_free_result($consulta);

?>



<p>&nbsp;</p>


    
    
        </td>
  </tr>
  </table>

</body>
</html>
