-
Notifications
You must be signed in to change notification settings - Fork 0
/
filterMenu.php
51 lines (46 loc) · 1.81 KB
/
filterMenu.php
1
2
3
4
5
6
7
8
9
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
43
44
45
46
47
48
49
50
51
<?php
class FilterMenu
{
public static function printGenDivs($type)
{
//this generates static ouput
if ($type == 'category') {
$divId = 'catDiv';
$divClass = 'category';
$LinkId = 'catLink';
$SpanId = 'catSpan';
} else {
$divId = 'genDiv';
$divClass = 'genre';
$LinkId = 'genLink';
$SpanId = 'genSpan';
}
for ($i = 1; $i <= 9; $i++) {
echo "\n<div id=\"$divId$i\" class=\"abs $divClass mnuItem mnuLine$i showMenu\">";
if ($i == 5) {
echo "<a href=\"#\" id=\"$LinkId$i\" name=\"$LinkId$i\" onkeydownset=\"{$LinkId}Down\" onkeyupset=\"{$LinkId}Up\" ";
if ($type == 'category') {
echo 'onclick="setFocus(\'genLink5\'); return false;" onkeyrightset="genLink5" onkeyleftset="genLink5"';
} else {
echo "onclick=\"setFocus(iActiveItem);openLink('$LinkId$i'); return false;\" onkeyrightset=\"catLink5\" onkeyleftset=\"catLink5\"";
}
echo '><img src="images/filter/menu_link.png" ONFOCUSSRC="images/filter/menu_active.png" class="menuImage" border="0" />';
echo '</a>';
}
echo "<span id=\"$SpanId$i\" class=\"menuLink" . ($i == 5 ? 'Active' : '') . "\"> </span>";
echo "</div>";
}
}
public static function printFooter()
{
?>
<img id="menu" class="abs mnuBack showMenu" src="images/filter/menu.png" />
<?
filterMenu::printGenDivs('category');
filterMenu::printGenDivs('genre');
?>
<img class="abs mnuBackTop showMenu" src="images/filter/mnu_top.png" />
<img class="abs mnuBackBot showMenu" src="images/filter/mnu_bottom.png" />
<?
}
}