Exemple #1
0
function div1($pathpage)
{
    if (substr($pathpage, 0, 10) == substr($_SERVER['PHP_SELF'], 0, 10)) {
        echo '<div id="title_selected">';
    } else {
        echo '<div id="title_unselected">';
    }
}
function div2($pathpage)
{
    echo '</div>';
}
function print_menu_item($pathpage, $name_item)
{
    div1($pathpage);
    echo '<a href="' . $pathpage . '">' . $name_item . '</a> ';
    div2($pathpage);
}
?>

<div id="topbar"> 
<?php 
print_menu_item("/doc/index.php", "Startup");
print_menu_item("/doc/solver/index.php", "Solver");
print_menu_item("/doc/prox_operators/index.php", "Proximal operators");
print_menu_item("/doc/demos/index.php", "Demonstration");
?>
</div> 

    echo $url;
    ?>
"><?php 
    echo $name;
    ?>
</a>
	<?php 
} else {
    ?>
		<span><?php 
    echo $name;
    ?>
</span>
	<?php 
}
?>
	
	<?php 
if (count($nodes) > 0) {
    ?>
	<ul class="sub-menu">
		<?php 
    foreach ($nodes as $node) {
        echo print_menu_item($node);
    }
    ?>
	</ul>
<?php 
}
?>
</li>
Exemple #3
0
#}
if ($config['collect_papers']) {
    print_menu_item("papers.php", "Literature", "papers");
}
if ($config['collect_links']) {
    print_menu_item("links.php", "Links", "links");
}
print_menu_item("posts.php", "Posts", "posts");
print_menu_item("blogs.php", "Blogs", "blogs");
print_menu_item("search.php", "Search", "search");
print_menu_item("stats.php", "Zeitgeist", "zeitgeist");
if ($config['do_wiki']) {
    print_menu_item("wiki/doku.php", "Help", "wiki");
}
if ($logged_on && $is_admin) {
    print_menu_item("admin.php", "Admin", "admin");
}
?>
</div>
<!--[if gte IE 5]>
<style>
table {width: auto;}
</style>
<![endif]-->
<?php 
# caching - some pages should be cached where possible as they don't change until the pipeline is run again.
#$PAGE_CACHE = 0;
$PAGE_URL = $_SERVER['REQUEST_URI'];
if ($PAGE_CACHE) {
    $cached = get_cache($PAGE_URL);
    ob_flush();