Archívum - Aug 29, 2015
2 szintű menü generálás php tömbbel
Sziasztok
Van az alábbi menüm:
[colorer=php]<div class="block bLeft">
<div class="blockHeader">Főmenü<span class="plusminus" onclick="show_hide_div(this,'lista_1');">-</span> </div>
<ul class="sideNav" id="lista_1" style="display:block">
<?php
$nav_down = mysqli_query($kapcs, "SELECT top_menu_id, top_menu_nev FROM top_menu ORDER BY top_menu_nev ASC");
if(mysqli_num_rows($nav_down) > 0 )
{
while($navData = mysqli_fetch_assoc($nav_down))
{
echo '<li><a class="menuitem" href="http://'.$_SERVER['HTTP_HOST'].'/'.$admin_folder.'/tartalom.php?site='.$navData['top_menu_id'].'&cat=1"><b>'.$navData['top_menu_nev'].'</b></a></li>';
}
}
?>
</ul>
</div>
<div class="block bLeft">
<div class="blockHeader">Hírlevél<span class="plusminus" onclick="show_hide_div(this,'lista_2');">-</span> </div>
<ul class="sideNav" id="lista_2" style="display:block">
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/hirlevel.php?cat=2"><b>Hírlevél</b></a></li>
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/csoportok.php?cat=2"><b>Csoportok</b></a></li>
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/feliratkozok.php?cat=2"><b>Feliratkozottak</b></a></li>
</ul>
</div>
<div class="block bLeft">
<div class="blockHeader">További modulok<span class="plusminus" onclick="show_hide_div(this,'lista_3');">-</span> </div>
<ul class="sideNav" id="lista_3" style="display:block">
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/konfiguracio.php?cat=3"><b>Konfiguráció</b></a></li>
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?
Van az alábbi menüm:
[colorer=php]<div class="block bLeft">
<div class="blockHeader">Főmenü<span class="plusminus" onclick="show_hide_div(this,'lista_1');">-</span> </div>
<ul class="sideNav" id="lista_1" style="display:block">
<?php
$nav_down = mysqli_query($kapcs, "SELECT top_menu_id, top_menu_nev FROM top_menu ORDER BY top_menu_nev ASC");
if(mysqli_num_rows($nav_down) > 0 )
{
while($navData = mysqli_fetch_assoc($nav_down))
{
echo '<li><a class="menuitem" href="http://'.$_SERVER['HTTP_HOST'].'/'.$admin_folder.'/tartalom.php?site='.$navData['top_menu_id'].'&cat=1"><b>'.$navData['top_menu_nev'].'</b></a></li>';
}
}
?>
</ul>
</div>
<div class="block bLeft">
<div class="blockHeader">Hírlevél<span class="plusminus" onclick="show_hide_div(this,'lista_2');">-</span> </div>
<ul class="sideNav" id="lista_2" style="display:block">
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/hirlevel.php?cat=2"><b>Hírlevél</b></a></li>
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/csoportok.php?cat=2"><b>Csoportok</b></a></li>
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/feliratkozok.php?cat=2"><b>Feliratkozottak</b></a></li>
</ul>
</div>
<div class="block bLeft">
<div class="blockHeader">További modulok<span class="plusminus" onclick="show_hide_div(this,'lista_3');">-</span> </div>
<ul class="sideNav" id="lista_3" style="display:block">
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?>/konfiguracio.php?cat=3"><b>Konfiguráció</b></a></li>
<li><a class="menuitem" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/<?php echo $admin_folder; ?