Jump to content

Navigation Links problem


simonbillinton

Recommended Posts

Hello all,

I hope someone can help with a small problem i have.

I am currently amending a website, but it uses php and i'm not that familiar with it.

On this page www.syrinx.net.au , there is a menu on the right side.
If you click on 'water treatment' and then scroll down to 'Tioxide Acid mine' and click. You will then see that the menu has greyed out and become inactive. This is the problem i'm trying to fix. Any ideas?

Any help you could give would be most appreciated. Thanks.

I have included the 'functions.inc' file which i think is the code responsible for these menus:



<?php

if (empty($HTTP_HOST)) {
    if (!empty($_ENV) && isset($_ENV['HTTP_HOST'])) {
        $HTTP_HOST = $_ENV['HTTP_HOST'];
    }
    else if (!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_HOST'])) {
        $HTTP_HOST = $HTTP_ENV_VARS['HTTP_HOST'];
    }
    else if (@getenv('HTTP_HOST')) {
        $HTTP_HOST = getenv('HTTP_HOST');
    }
    else {
        $HTTP_HOST = '';
    }
}
if ($HTTP_HOST == "localhost") {
$root_dir="http://$HTTP_HOST/syrinx";
} elseif ($HTTP_HOST == "127.0.0.1") {
$root_dir="http://$HTTP_HOST/syrinx";
} else {
$root_dir="http://$HTTP_HOST";
}


function make_header($topPageTitle,$pageTitle) {
global $root_dir;

echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>';
echo $topPageTitle;
echo '</title>
<link media="screen, projection" type="text/css" href="'.$root_dir.'/css/1.css" rel="stylesheet" />
<!--[if IE 5]><link rel="stylesheet" type="text/css" href="'.$root_dir.'/css/screen-IE5.css" /><![endif]-->
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="'.$root_dir.'/css/screen-IE6.css" /><![endif]-->
<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />

</head><body>

<div id="pageHeader">
<h1><span><a href="'.$root_dir.'" title="syrinx title page">syrinx environmental pl</a></span></h1>
<h2><span>a unique multidisciplinary environmental and design company</span></h2>
</div> <!-- end on div id="pageHeader" -->

<div id="all">
<div id="frame">
<div id="contentHeader"><h2>';
echo $pageTitle;
echo '</h2></div>
<!-- -->
<!-- leave empty just in case it is needed
<div id="contentLeft">
</div>
-->
';
}

function make_navLinks($projectName) {
global $root_dir;
$facets = array("<strong>sustainable: </strong>","development","water treatment","restoration|remediation","ecological assessments","landscapes|builtscapes","universals");
echo '
<div id="contentRight">
<ul id="navLinks">
<li><a href="'.$root_dir.'/company.php" title="the company">the company</a>
<ul>
<li><a href="'.$root_dir.'/company-about.php" title="what we do, our expertise">about us</a></li>
<li><a href="'.$root_dir.'/company-order.php" title="company + managment structure, EH+S">order of things</a></li>
<li><a href="'.$root_dir.'/company-resources.php" title="human, IT, matrials + reference">resources</a></li>
<li><a href="'.$root_dir.'/company-positions.php" title="positions vacant">positions vacant</a></li>
</ul>

<!-- <li><a href="'.$root_dir.'/allProjects.php" title="our projects">our projects</a>
<ul>
<li><a href="'.$root_dir.'/projects/albion-main.php" title="Albion Demonstration Wetland + Community Park">Albion</a></li>
<li><a href="'.$root_dir.'/projects/ptf-main.php" title="Point Fraser Stormwater Wetland">Point Fraser</a></li>
<li><a href="'.$root_dir.'/projects/liege-main.php" title="Liege St Demonstration Wetland + Comservation Park">Liege St</a></li>
<li><a href="'.$root_dir.'/projects/perthForeshore-main.php" title="Perth Foreshore Restoration Feasibility Study">Perth Foreshore</a></li>
<li><a href="'.$root_dir.'/allProjects.php" title="All Projects">Other Projects</a></li>
</ul>
</li>-->


<li><a href="'.$root_dir.'/contact.php" title="contact information">contact us</a>
</li>
</ul>
<h2>what we do</h2>
<!-- <h7>sustainable</h7>
--> <ul id="moreLinks">
';
if($projectName!=='main') {
$file_array = getdirArray('./');
foreach ($file_array as $file_name) {
if (strstr($file_name, $projectName."-")) {
$facetsArray[]=substr($file_name, strlen($projectName."-"),-4);
} else {$facetsArray[]=Null;}
}
for ($i=0; $i<sizeof($facets); $i++) {
if(in_array($facets[$i],$facetsArray)) {
if($facets[$i]==substr(basename ($_SERVER['PHP_SELF'],".php"), strlen($projectName."-"))) {
echo '<li class="here"><a href="'.$root_dir.'/projects/'.$projectName.'-'.$facets[$i].'.php">'.$facets[$i].'</a></li>'."\n";
} else {
echo '<li><a href="'.$root_dir.'/projects/'.$projectName.'-'.$facets[$i].'.php">'.$facets[$i].'</a></li>'."\n";
}
} else {
echo '<li class="no"><span>'.$facets[$i].'</span></li>'."\n";
}
};
} else {
for ($i=0; $i<sizeof($facets); $i++) {
if($facets[$i]==substr(basename ($_SERVER['PHP_SELF'],".php"), strlen($projectName."-"))) {
echo '<li class="here"><a href="'.$root_dir.'/projects/'.$projectName.'-'.$facets[$i].'.php">'.$facets[$i].'</a></li>'."\n";
} else if ($facets[$i]=="remediation" or $facets[$i]=="research" or $facets[$i]=="masterplanning" or $facets[$i]=="landscape" or $facets[$i]=="ecotourism") {
echo '<li class="no"><span>'.$facets[$i].'</span></li>'."\n";
} else {
echo '<li><a href="'.$root_dir.'/projects/'.$projectName.'-'.$facets[$i].'.php">'.$facets[$i].'</a></li>'."\n";
}
};
}
echo '
</ul>
<p><a href="'.$root_dir.'/sitemap.php">sitemap</a></p>
</div> <!-- end on div id="contentRight" -->
';
}

function make_images () {

}

function make_footer() {
global $root_dir;
echo '
<br clear="all" /><!-- without this little <br /> NS6 and IE5PC do not stretch the frame div down to encopass the content DIVs -->
</div> <!-- end on div id="frame" -->
</div> <!-- end on div id="all" -->
<div id="rect3">&nbsp;</div>
<div id="rect1">&nbsp;</div>
<div id="rect2">&nbsp;</div>
<div id="logo"><a href="'.$root_dir.'" title="syrinx title page"><img alt="bamboo syrinx logo (2K)" src="'.$root_dir.'/img/bambooLogo.jpg" height="100" width="260" /></a></div>
<div id="layer-img"><img alt="3layers (11K)" src="'.$root_dir.'/img/3layers.gif" height="196" width="200" /></div>

</body>
</html>
';
}
function count_page($dirdepth)
{
if (0==$dirdepth) {
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
}
else {
}
}
function array_search_bit($needle, $haystack)
{
  foreach ($haystack as $key => $value)
  {
  if (strpos($value, $needle) !== FALSE)
  return $key;
  }
 
  return FALSE;
}

function remove_by_val($needle,&$haystack) {
# removes all entries in array $haystack,
# who's value is "xxxx$needlexxxxx"
  while(($gotcha = array_search_bit($needle,$haystack)) >-1)
  unset($haystack[$gotcha]);
}
function getdirArray($dir='./',$sort='asort')
{
global $dir_file_count;

if ( is_dir($dir) ) {
    $fd = @opendir($dir);
    while ( ($part = @readdir($fd)) == TRUE ) {
        clearstatcache();
        if ($part != "." && $part != "..") {
            $dir_array[] = $part;
        }
    }
    if($fd == TRUE) {
        closedir($fd);
    }
    if (is_array($dir_array)) {
        $sort($dir_array);
        $dir_file_count = count($dir_array);
        Return $dir_array;
    } else {
        Return FALSE;
    }
} else {
    Return FALSE;
}
}// EOF;
?>


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.