2010-07-13 21:23:39 +00:00
|
|
|
<?
|
|
|
|
/*
|
|
|
|
This file is part of the 'Science Fair In A Box' project
|
|
|
|
SFIAB Website: http://www.sfiab.ca
|
|
|
|
|
|
|
|
Copyright (C) 2010 James Grant <james@lightbox.org>
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<?
|
|
|
|
include "common.inc.php";
|
|
|
|
$id=intval($_GET['id']);
|
|
|
|
$level=intval($_GET['level']);
|
|
|
|
|
|
|
|
if($id && $level) {
|
|
|
|
switch($level) {
|
|
|
|
case 1: //populate the scecondary menu
|
2010-07-15 21:24:10 +00:00
|
|
|
if($_SESSION['nav']['primary']!=$id) {
|
|
|
|
$_SESSION['nav']['primary']=$id;
|
|
|
|
}
|
2010-07-21 19:20:34 +00:00
|
|
|
unset($_SESSION['nav']['secondary']);
|
|
|
|
unset($_SESSION['nav']['tertiary']);
|
|
|
|
unset($_SESSION['nav']['tertiarylink']);
|
2010-08-20 19:59:20 +00:00
|
|
|
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=1 AND conferencetype='{$conference['type']}' ORDER By ord,task");
|
|
|
|
echo mysql_error();
|
2010-07-13 21:23:39 +00:00
|
|
|
echo "<ul class=\"secondarynav\">";
|
|
|
|
$cl="";
|
|
|
|
while($r=mysql_fetch_object($q)) {
|
|
|
|
if($_SESSION['nav']['secondary'] == $r->id) {
|
|
|
|
$cl="class=\"secondarynav-selected\"";
|
|
|
|
}
|
|
|
|
else $cl="";
|
2010-07-21 18:37:03 +00:00
|
|
|
echo "<li id=\"secondary_nav_{$r->id}\" $cl>";
|
2010-07-21 20:14:05 +00:00
|
|
|
//echo "<a href=\"#\" onclick=\"return taskNavLevel($r->id,$r->pid,$r->level)\">".i18n($r->task)."</a>";
|
|
|
|
echo "<a href=\"#\" onclick=\"return taskNavLevel($r->pid, $r->id)\">".i18n($r->task)."</a>";
|
2010-07-21 18:37:03 +00:00
|
|
|
echo "</li>\n";
|
2010-07-13 21:23:39 +00:00
|
|
|
}
|
|
|
|
echo "</ul>\n";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: //populate the tertiary menu
|
|
|
|
$_SESSION['nav']['secondary']=$id;
|
2010-07-21 19:20:34 +00:00
|
|
|
unset($_SESSION['nav']['tertiary']);
|
|
|
|
unset($_SESSION['nav']['tertiarylink']);
|
2010-08-20 19:59:20 +00:00
|
|
|
$q=mysql_query("SELECT * FROM rolestasks WHERE pid='$id' AND level=2 AND conferencetype='{$conference['type']}' ORDER By ord,task");
|
|
|
|
echo "<ul class=\"tertiary_nav\">";
|
2010-07-13 21:23:39 +00:00
|
|
|
while($r=mysql_fetch_object($q)) {
|
2010-08-20 19:59:20 +00:00
|
|
|
echo "<li id=\"tertiarylink_nav_{$r->id}\"><a href=\"".$config['SFIABDIRECTORY']."$r->link\">".i18n($r->task)."</a></li>\n";
|
|
|
|
/*
|
2010-08-20 18:16:21 +00:00
|
|
|
if($r->link) {
|
2010-07-21 18:37:03 +00:00
|
|
|
echo "<h3 id=\"tertiary_nav_{$r->id}\"><a href=\"{$config['SFIABDIRECTORY']}$r->link\">".i18n("$r->task")."</a></h3>\n";
|
2010-08-20 18:16:21 +00:00
|
|
|
} else {
|
|
|
|
echo "<h3 id=\"tertiary_nav_{$r->id}\">".i18n("$r->task")."</h3>\n";
|
|
|
|
}
|
2010-08-20 19:59:20 +00:00
|
|
|
*/
|
|
|
|
/*
|
2010-07-21 18:37:03 +00:00
|
|
|
echo "<ul class=\"tertiary_nav\">";
|
2010-08-20 19:59:20 +00:00
|
|
|
$q2=mysql_query("SELECT * FROM rolestasks WHERE pid='$r->id' AND level=3 AND conferencetype='{$conference['type']}' ORDER BY ord,task");
|
2010-07-13 21:23:39 +00:00
|
|
|
while($r2=mysql_fetch_object($q2)) {
|
2010-07-21 18:37:03 +00:00
|
|
|
echo "<li id=\"tertiarylink_nav_{$r2->id}\"><a href=\"".$config['SFIABDIRECTORY']."$r2->link\">".i18n($r2->task)."</a></li>\n";
|
2010-07-13 21:23:39 +00:00
|
|
|
}
|
|
|
|
echo "</ul>";
|
2010-08-20 19:59:20 +00:00
|
|
|
*/
|
2010-07-13 21:23:39 +00:00
|
|
|
}
|
|
|
|
echo "</ul>\n";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|