Skip to content

Instantly share code, notes, and snippets.

Created February 6, 2009 16:26
Show Gist options
  • Save anonymous/59469 to your computer and use it in GitHub Desktop.
Save anonymous/59469 to your computer and use it in GitHub Desktop.
foreach($navbar as $navbarname => $navbarid) {
if(isset($navbarItems[$navbarid])) {
$imageURL = 'images/navbar/' . $navbarid . '.jpg';
$imageSize = getimagesize($imageURL);
echo '<div style="height: ' . $imageSize[1] . 'px;">';
echo '<a href="' . $pageURL . $navbarid . '" onclick="Effect.toggle(\'' . $navbarid . '\',\'blind\'); return false;">';
echo '<img src="' . $imageURL . '" alt="' . $navbarname . '" />';
echo '</a>';
echo '</div>';
echo "\n";
//$thisBox['products'] = true;
foreach($navbarItems[$navbarid] as $useless => $usefulnavid) {
if(isset($navbarDropdownItems[$usefulnavid])) {
foreach($navbarDropdownItems[$usefulnavid] as $url) {
if($_GET['page'] == $url) {
$openMainBox[$navbarid] = true;
//echo $navbarid;
}
}
}else{
//echo $usefulnavid;
if($_GET['page'] == $usefulnavid) {
$openMainBox[$navbarid] = true;
}
/* foreach($navbarItems[$navbarid] as $name => $url) {
echo '<div style="color: red;">' . $url . '</div>';
if($_GET['page'] == $url) {
$openMainBox[$navbarid] = true;
//echo $navbarid;
echo 'hi';
}
} */
}
}
if($openMainBox[$navbarid]) {
echo '<div class="dropDown" id="' . $navbarid . '">';
}else{
echo '<div class="dropDown" id="' . $navbarid . '" style="display: none;">';
}
foreach($navbarItems[$navbarid] as $subcategoryName => $subcategoryValue) {
if(isset($navbarDropdownItems[$subcategoryValue])) {
echo '<div class="categoryTitle">';
echo '<a href="' . $subcategoryValue . '" onclick="Effect.toggle(\'' . $subcategoryValue . '\',\'blind\'); return false;">' . $subcategoryName . '</a>';
echo '</div>';
//echo '<div>&quot;' . $subcategoryValue . '&quot;</div>';
foreach($navbarDropdownItems[$subcategoryValue] as $name => $url) {
if($_GET['page'] == $url) {
$openBox[$subcategoryValue] = true;
}
}
if($openBox[$subcategoryValue]) {
echo '<div class="dropDown" id="' . $subcategoryValue . '">';
}else{
echo '<div class="dropDown" id="' . $subcategoryValue . '" style="display: none;">';
}
foreach($navbarDropdownItems[$subcategoryValue] as $thisName => $thisValue) {
echo '<div class="category">';
echo '<a href="' . $thisValue . '">';
echo $thisName;
if($_GET['page'] == $thisValue) {
echo '&nbsp;<span style="font-weight: bold;">&rarr;</span>';
}
echo '</a>';
echo '</div>';
}
echo '</div>';
}else{
echo '<div class="categoryTitle">';
echo '<a href="' . $subcategoryValue . '">' . $subcategoryName;
if($_GET['page'] == $subcategoryValue) {
echo '&nbsp;<span style="font-weight: bold;">&rarr;</span>';
}
echo '</a>';
echo '</div>';
}
}
echo '</div>';
echo '<!-- spacer --><div style="height: 10px;">&nbsp;</div><!-- spacer -->';
}else{
$imageURL = 'images/navbar/' . $navbarid . '.jpg';
$imageSize = getimagesize($imageURL);
echo '<div style="height: ' . $imageSize[1] . 'px;">';
echo '<a href="' . $pageURL . $navbarid . '">';
echo '<img src="' . $imageURL . '" alt="' . $navbarname . '" />';
echo '</a>';
echo '</div>';
echo '<!-- spacer --><div style="height: 10px;">&nbsp;</div><!-- spacer -->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment