If there's less than 2 conferences (specifically, 1 conference) then dont show the conference selector in the header

This commit is contained in:
james 2010-12-07 19:29:02 +00:00
parent 673b0b51f8
commit 8f17e80169

View File

@ -166,23 +166,22 @@ if(isset($_SESSION['roles']) && $_SESSION['username']) {
}
?>
</div>
<div id="header-conferences">
<?
$q=mysql_query("SELECT * FROM conferences WHERE status='running' ORDER BY name");
if(mysql_num_rows($q)) {
echo "<ul class=\"conferencenav\">";
if(mysql_num_rows($q)>1) {
echo " <div id=\"header-conferences\">\n";
echo " <ul class=\"conferencenav\">";
while($r=mysql_fetch_object($q)) {
if($_SESSION['conferences_id']==$r->id)
$cl="class=\"selected\"";
else
$cl="";
echo "<li $cl><a $cl href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=switchconference&amp;switchconference=$r->id\">$r->name</a></li>\n";
echo " <li $cl><a $cl href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=switchconference&amp;switchconference=$r->id\">$r->name</a></li>\n";
}
echo "</ul>\n";
echo " </ul>\n";
echo " </div>\n";
}
?>
</div>
</div>
</div>