catalog third level

Hi all. Thanks in advance. I am having some trouble setting a third level in my catalog.

[php]while($row = mysql_fetch_assoc($result))
{
if($row[‘nosubs’] == 1)
{
$nosubs = ‘-00’;
}
else
{
$nosubs = ‘’;
}

           if($row['id'] == $currpage[0] && (!isset($currpage[1]) || $currpage[1] == '00'))
           {
           $class = 'catalog_btn catalog_active';
           }
           else
           {
           $class = 'catalog_btn catalog_sub1';
           }

   $bb .= '<li><span class="'.$class.'"><a href="wallcovering-catalog2Test.php?nav=' . $row['id'] . $nosubs . '">' . $row['name'] . '</a></span></li>';

                  if($row['id'] == $currpage[0])
                  {

                       if($CAPP == true && $access != true)
                       {
                       $subs = mysql_query("SELECT name, id, icon, subofsub, nosubs, sub_of FROM directoryTest WHERE sub = '$page' AND published = '1' AND catalog='$catalog' ORDER BY sort_order,id");
                       }
                       else
                       {
                       $subs = mysql_query("SELECT name, id, icon, subofsub, nosubs, sub_of FROM directoryTest WHERE sub = '$page' AND catalog='$catalog' ORDER BY sort_order,id");
                       }

                          while($subcats = mysql_fetch_assoc($subs))
                          {
                               if($subcats['id'] == $currpage[1])
                               {
                               $class = 'catalog_btn catalog_active';
                               }
                               else
                               {
                               $class = 'catalog_btn catalog_sub2';
                               }
                          $bb .= '<li><span class="'.$class.'"><a href="wallcovering-catalog2Test.php?nav=' . $page . '-' . $subcats['id'] . '">' . $subcats['name'] . '</a></span></li>';
                         }

                  if($row['nosubs'] = 2)
                  {

                       if($CAPP == true && $access != true)
                       {
                       $subs = mysql_query("SELECT name, id, icon, subofsub, nosubs, sub_of FROM directoryTest WHERE sub = '$page' AND published = '1' AND catalog='$catalog' ORDER BY sort_order,id");
                       }
                       else
                       {
                       $subs = mysql_query("SELECT name, id, icon, subofsub, nosubs, sub_of FROM directoryTest WHERE sub = '$page' AND catalog='$catalog' ORDER BY sort_order,id");
                       }

                          while($subcats = mysql_fetch_assoc($subs))
                          {

                               if($subcats['id'] == $currpage[1])
                               {
                               $class = 'catalog_btn catalog_active';
                               }
                               else
                               {
                               $class = 'catalog_btn catalog_sub3';
                               }
                          $bb .= '<li><span class="'.$class.'"><a href="wallcovering-catalog2Test.php?nav=' . $page . '-' . $subcats['sub_of'] . $nosubs . '">' . $subcats['name'] . '</a></span></li>';

echo $page . ‘-’ . $subcats[‘id’] . ‘-’ . $page2;
}} }}

[/php]


So basically. The first level displays icons and a nav list on the side. when you select an icon you are presented with sublevel of that selection. but when i try to add a third level, all of the info/icons gets set to the second level and i cant get past that. Any help would be much appreciated.

Sponsor our Newsletter | Privacy Policy | Terms of Service