- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
/*
* Быстрая навигация
*/
if(isset($url[1]))
{
if(isset($component_array[$url[1]]))
{
if(isset($component_array[$url[1]]['subAct']))
{
foreach($component_array[$url[1]]['subAct'] as $comAct => $comActLink)
{
$subNav .= '<span' . ((isset($url[2]) && $url[2] == $comActLink OR !isset($url[2]) && $comActLink == '') ? ' class="navMainActive"' : '') . '><a href="' . ADMIN . '/' . $url[1] . '/' . $comActLink . '">' . $comAct . '</a></span>';
}
}
$noSub = '<span class="navMainActive"><a href="' . ADMIN . '/' . $url[1] . '">' . $component_array[$url[1]]['name'] . '</a></span>';
}
elseif(isset($url[2]) && isset($module_array[$url[2]]))
{
if(isset($module_array[$url[2]]['subAct']))
{
foreach($module_array[$url[2]]['subAct'] as $comAct => $comActLink)
{
$subNav .= '<span' . ((isset($url[3]) && $url[3] == $comActLink OR !isset($url[3]) && $comActLink == '') ? ' class="navMainActive"' : '') . '><a href="' . ADMIN . '/module/' . $url[2] . '/' . $comActLink . '">' . $comAct . '</a></span>';
}
}
$noSub = '<span class="navMainActive"><a href="' . ADMIN . '/module/' . $url[2] . '">' . $module_array[$url[2]]['name'] . '</a></span>';
}
elseif(isset($services_array[$url[1]]))
{
if(isset($services_array[$url[1]]['subAct']))
{
foreach($services_array[$url[1]]['subAct'] as $comAct => $comActLink)
{
$subNav .= '<span' . ((isset($url[2]) && $url[2] == $comActLink OR !isset($url[2]) && $comActLink == '') ? ' class="navMainActive"' : '') . '><a href="' . ADMIN . '/' . $url[1] . '/' . $comActLink . '">' . $comAct . '</a></span>';
}
}
$noSub = '<span class="navMainActive"><a href="' . ADMIN . '/' . $url[1] . '">' . $services_array[$url[1]]['name'] . '</a></span>';
}
}
Кусок из Toogle CMS.
facepalm.
Lure Of Chaos 05.07.2011 21:50 # −1
Vasiliy 05.07.2011 21:54 # +2
bugmenot 05.07.2011 22:06 # +2
guest 06.07.2011 01:15 # −2
striker 06.07.2011 03:42 # +2