File:  [mozdev] / bbecontainer / www / index.php.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Thu Dec 9 20:29:29 2010 UTC (6 years, 10 months ago) by moonwalker
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

<html>
<head>
<title>BBEcontainer</title>
<meta Http-Equiv="Content" Content-Type="text/html;charset=utf-8">
<link rel="STYLESHEET" href="styles.css" type="text/css"/>

<script type="text/javascript"  src="menu.js"></script>
<script type="text/javascript">if (window.getComputedStyle) /*DOM*/ {
function Init()
{ 
	  var parseStyleAttr=function(prop) {
		return parseInt( /([\d]+)px/.exec(prop) )
	}
	var content=document.body //document.getElementById('content_frame')
	//content.style.paddingTop=0;
	var style=(window.getComputedStyle)?window.getComputedStyle(content,null):window.currentStyle;
	var h=( parseStyleAttr(style.marginBottom)+parseStyleAttr(style.marginTop) );
	content.style.height= (
			window.innerHeight-
			//content.offsetParent.clientHeight-  content.offsetTop-  content.offsetParent.scrollTop  -
				h
			)+'px';
	content=document.getElementById('content_frame')
	style=window.getComputedStyle(content,null);
	h=( parseStyleAttr(style.marginBottom)+parseStyleAttr(style.marginTop)+
	parseStyleAttr(style.borderBottomWidth)+parseStyleAttr(style.borderTopWidth) );
		content.style.height= (
			window.innerHeight-  content.offsetTop-
				h
			)+'px';
}

}else /*IE*/ {
function Init()
{ 
	  var parseStyleAttr=function(prop) {
		return parseInt( /([\d]+)px/.exec(prop) )
	}
	var content=document.body;

	var style=content.currentStyle;
	var h=( parseStyleAttr(style.marginBottom)+parseStyleAttr(style.marginTop) );
	content.style.height= (
			document.body.clientHeight-	h	)+'px';
	content=document.getElementById('content_frame')
	
	var style=content.currentStyle;
	var h=( parseStyleAttr(style.marginBottom)+parseStyleAttr(style.marginTop) );
	content.style.height= (
			document.body.clientHeight-content.offsetTop-2*content.clientTop	)+'px';
	
}


}</script>

<?php
$current_page_id = ( array_key_exists('page', $_GET) ) ? ($_GET['page']) : 0;

//include_once dirname(__FILE__).'/persistance_db.php';
include_once dirname(__FILE__).'/persistance_xml.php';
?>
</head><body style="margin-bottom:0;margin-top:0px;background-color:red;"  onload="Init()">
<div style="padding: 0px 0px;height:13%; line-height:190%;font-size: 30px;margin-bottom:4px;
	background-color: rgb(0, 208, 0);overflow:hidden;" align="center"
><a href="http://www.mozdev.org"
	><img align="left" vspace="3" style="display:block;width:12%;height:90%;"
	alt="mozdev.org" src="http://www.mozdev.org/sharedimages/mozdev.gif" 
	/></a>
<div style="float:left;width:87%;height:100%;">BBEcontainer</div>
  </div>
<!-- MENU ********************************************************* -->
<?php

function create_menus($prime_menu)
{
	?><div class="main_menu" id="menu_element"><?php
	function page_link($i,$page)
	{
	?><a class="main_menu_item" href=<?php echo '"'.$page['content_fname'].'" ';?>
	target="content_frame"	onmouseover="show_submenu(this,'dummy');">
	<?php echo $page['title'];?> </a><?php
	}
	function submenu($i,$page)
	{
	?><a class="submenu_title" href="#" onmouseover=
	<?php	echo '"show_submenu(this,\''.$i.'\');"'  ?>
	><?php echo $page['title'];?></a><?php
	}
	
	foreach($prime_menu as $i=>$cat) 
	{
		if(array_key_exists('pages',$cat) ) submenu($i,$cat);
		else page_link($i,$cat);
	}
	?>
	<div class="submenu" id="dummy_submenu" style="display: block;">
	&nbsp;
	</div>
	<?php
	foreach($prime_menu as $i=>$tlpage) 
	{
		if(array_key_exists('pages',$tlpage) ) 
 		{ ?> 
		<div class="submenu"  style="display: none;" id= <?php echo '"'.$i.'_submenu"' ?> >
		<?php	
		foreach($tlpage['pages'] as $i=>$page) 
			{ ?>
				<a class="main_menu_item" target="content_frame" href=
					<?php echo '"'.$page['content_fname'].'">'./*TODO:html encode*/$page['title'] ?>
				</a>
			<?php }	?>
			</div>
		<?php }
	}

	?></div><?php
}
create_menus($prime_menu);
?><!-- ************************************************************** -->
<br clear="all">
<!-- ************************************************************** -->
<iframe id="content_frame" name="content_frame"  src=
	<?php
	if ($prime_menu[$current_page_id]['content_fname'])
		echo   '"'.$prime_menu[$current_page_id]['content_fname'].'" ';
	else {	}
	?>
	style="background-color:white;border:2px solid;width:100%;height:74%;margin-bottom:0px;">
</iframe></body>
</html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>