el codigo del layout que uso es este
Código PHP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a:link {
color: #0099CC;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099CC;
}
a:hover {
text-decoration: underline;
color: #0099CC;
}
a:active {
text-decoration: none;
color: #ECE9D8;
}
-->
</style>
<script type="text/javascript" language="JavaScript1.2" src="stm31.js"></script>
<basefont color="black" face="Verdana" />
</head>
<body bgcolor="#ffffcc">
<?php include('includes/header.php'); ?>
<table width="740" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td width="300" bgcolor="1868b9"><table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" background="../images/ptl.gif"><img src="images/ptl.gif" width="150" height="220"></td>
<td width="150" background="../images/ptr.gif" bgcolor="d3ddff"><img src="images/ptr.gif" width="150" height="220"></td>
</tr>
<tr>
<td> </td>
<td bgcolor="d3ddff"> </td>
</tr>
<tr>
<td>
<div align="right">
[B]AQUÍ EMPIEZA EL CODIGO DEL MENU DESPLEGABLE[/B] <script id="Sothink Widgets:reto1.pgt" type="text/javascript" language="JavaScript1.2">
<!--
stm_bm(["tubtehr",430,"","blank.gif",0,"","",0,0,0,0,0,1,0,0,"","",0],this);
stm_bp("p0",[1,4,0,0,3,2,0,0,100,"",-2,"",-2,90,0,0,"#000000","#003399","",3,0,0,"#FFFFFF"]);
stm_ai("p0i0",[0," Home ","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,0,1,"#003399",0,"#66CCFF",0,"","",3,3,0,0,"#FFFFFF","#FFFFFF","#FFFFFF","#000000","8pt Arial","8pt Arial",0,0]);
stm_aix("p0i1","p0i0",[0,"Products"]);
stm_bp("p1",[1,4,0,0,0,3,0,0,100,"progid:DXImageTransform.Microsoft.Wheel(spokes=16,enabled=0,Duration=0.50)",-2,"",-2,60,2,3,"#000000","#FFFFFF","",3,1,5,"#66CCFF"]);
stm_aix("p1i0","p0i0",[0,"Sothink Glanda","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,0,1,"#0099CC",0,"#003399",0,"","",3,3,0,0,"#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]);
stm_ai("p1i1",[6,1,"#66CCFF","",0,0,0]);
stm_aix("p1i2","p1i0",[0,"Sothink HTML Editor"]);
stm_aix("p1i3","p1i1",[]);
stm_aix("p1i4","p1i0",[0,"Sothink DHTMLMenu"]);
stm_aix("p1i5","p1i1",[]);
stm_aix("p1i6","p1i0",[0,"Sothink SlidingMenu"]);
stm_aix("p1i7","p1i1",[]);
stm_aix("p1i8","p1i0",[0,"Sothink CoolMenu"]);
stm_aix("p1i9","p1i1",[]);
stm_aix("p1i10","p1i0",[0,"Sothink CoolButton"]);
stm_aix("p1i11","p1i1",[]);
stm_aix("p1i12","p1i0",[0,"Sothink CoolText"]);
stm_ep();
stm_aix("p0i2","p0i0",[0,"Order"]);
stm_bpx("p2","p1",[]);
stm_aix("p2i0","p1i0",[0,"Sothink Glanda"]);
stm_aix("p2i1","p1i1",[]);
stm_aix("p2i2","p1i0",[0,"Sothink HTML Editor"]);
stm_aix("p2i3","p1i1",[]);
stm_aix("p2i4","p1i4",[]);
stm_aix("p2i5","p1i1",[]);
stm_aix("p2i6","p1i6",[]);
stm_ep();
stm_aix("p0i3","p0i0",[0,"Support"]);
stm_ep();
stm_em();
//-->
</script> [B]AQUÍ TERMINA EL CÓDIGO DEL MENÚ DESPLEGABLE[/B]
</div></td>
<td bgcolor="d3ddff"> </td>
</tr>
</table></td>
<td width="433">
<?
if (file_exists( $path_modulo )) include( $path_modulo );
else die('Error al cargar el módulo <b>'.$modulo.'</b>. No existe el archivo <b>'.$conf[$modulo]['archivo'].'</b>');
?>
</td>
</tr>
</table>
<?php include('includes/footer.html'); ?>
</body>
</html>
Código PHP:
<?php
error_reporting(E_ALL);
// Primero incluimos el archivo de configuración
include('conf.php');
/** Verificamos que se haya escogido un modulo, sino
* tomamos el valor por defecto de la configuración.
*/
if (!empty($_GET['mod']))
$modulo = $_GET['mod'];
else
$modulo = MODULO_DEFECTO;
/** También debemos verificar que el valor que nos
* pasaron, corresponde a un modulo que existe, caso
* contrario, cargamos el modulo por defecto
*/
if (empty($conf[$modulo]))
$modulo = MODULO_DEFECTO;
/** Ahora determinamos que archivo de Layout tendrá
* este módulo, si no tiene ninguno asignado, utilizamos
* el que viene por defecto
*/
if (empty($conf[$modulo]['layout']))
$conf[$modulo]['layout'] = LAYOUT_DEFECTO;
/** Aqui podemos colocar todos los comandos necesarios para
* realizar las tareas que se deben repetir en cada recarga
* del index.php - En el ejemplo, conexión a la base de datos.
*
* include('clases/class.DB.php');
* $db = new DB();
* $db->conectar();
*/
/** Finalmente, cargamos el archivo de Layout que a su vez, se
* encargará de incluir al módulo propiamente dicho. si el archivo
* no existiera, cargamos directamente el módulo. También es un
* buen lugar para incluir Headers y Footers comunes.
*/
$path_layout = LAYOUT_PATH.'/'.$conf[$modulo]['layout'];
$path_modulo = MODULO_PATH.'/'.$conf[$modulo]['archivo'];
if (file_exists($path_layout))
include( $path_layout );
else
if (file_exists( $path_modulo ))
include( $path_modulo );
else
die('Error al cargar el módulo <b>'.$modulo.'</b>. No existe el archivo <b>'.$conf[$modulo]['archivo'].'</b>');
?>