This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> level==0) { $primary=$id; $q2=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' ORDER BY ord LIMIT 1"); $r2=mysql_fetch_object($q2); $secondary=$r2->id; $pri=$r; $sec=$r2; $_SESSION['nav']['primary']=$id; } else if($r->level==1) { $secondary=$id; //we still need to find the primary so we can make sure its set properly $pq=mysql_query("SELECT * FROM rolestasks WHERE id='$r->pid'"); $pri=mysql_fetch_object($pq); $sec=$r; $_SESSION['nav']['primary']=$pri->id; } $_SESSION['nav']['secondary']=$secondary; //now we have a secondary whether it was a primary clicked on, or a secondary clicked on, so now we just get the tertiary (topic) link $q3=mysql_query("SELECT * FROM rolestasks WHERE pid='$secondary' AND link!='' ORDER BY ord LIMIT 1"); if($r3=mysql_fetch_object($q3)) { $tertiary=$r3->id; $_SESSION['nav']['tertiary']=$tertiary; header("Location: {$config['SFIABDIRECTORY']}{$r3->link}"); } else { send_header("Navigation Error"); echo error("Hmm something seems mis-configured. We hit a topic-level menu that doesnt have any linkable items")."
"; echo "Perhaps you should fix this in Superuser Role Tasks Setup"; echo "

"; echo "
Channel :"; print_r($pri); echo "
Division :"; print_r($sec); send_footer(); }