function makemenu($m) { $out = "<ul>"; foreach ($m as $i) { $class = ""; if ($i['link'] == "system/coming_soon") { $class = "comingsoon"; } $out .= "<li class='" . $i['name'] . " " . $class . "'>"; if (!empty($i['link'])) { $link = $i['link']; $target = ""; if (strstr($link, "http")) { $target = " target = '_blank' "; } else { $link = site_url($link); } $out .= "<a href='" . $link . "' " . $target . ">"; } $out .= $i['title']; if (!empty($i['link'])) { $out .= "</a>"; } if (isset($i['children'])) { $out .= makemenu($i['children']); } $out .= "</li>\n"; } $out .= "</ul>"; return $out; }
<h1><?php echo $sitename; ?> </h1> </div><!--wrapper-header3--> </div><!--wrapper-header2--> </div><!--header--> </div><!--wrapper-header--> <div id="wrapper-content"> <div id="wrapper-menu-page"> <div id="menu-page"> <h3>Навигация</h3> <ul> <?php echo makemenu(); ?> </ul> <h3>Облако меток</h3> <ul> <li><?php include "mycode/cloudtags.php"; ?> </li> </ul> <h3>Новости</h3> <ul id="lastnews"> <?php include $localpath . '/mycode/lastnews.php';
<?php defined('_JEXEC') or die('Ай-яй-яй, сюда нельзя!'); makemenu();