2005-01-25 16:44:25 +00:00
|
|
|
<?
|
|
|
|
/*
|
|
|
|
This file is part of the 'Science Fair In A Box' project
|
|
|
|
SFIAB Website: http://www.sfiab.ca
|
|
|
|
|
|
|
|
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
|
|
|
Copyright (C) 2005 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.
|
|
|
|
*/
|
|
|
|
?>
|
|
|
|
<?
|
|
|
|
require("common.inc.php");
|
2007-11-17 21:59:59 +00:00
|
|
|
send_header("Committee List", array());
|
2005-01-25 16:44:25 +00:00
|
|
|
|
2005-01-25 16:56:19 +00:00
|
|
|
echo "<table>";
|
|
|
|
$q=mysql_query("SELECT * FROM committees ORDER BY ord,name");
|
2005-01-25 16:44:25 +00:00
|
|
|
while($r=mysql_fetch_object($q))
|
|
|
|
{
|
2007-11-17 21:59:59 +00:00
|
|
|
$q2=mysql_query("SELECT
|
|
|
|
users.id,
|
|
|
|
users.firstname,users.lastname,
|
|
|
|
users.email,
|
|
|
|
users_committee.emailprivate,
|
|
|
|
users_committee.displayemail,
|
|
|
|
committees_link.title,
|
|
|
|
committees_link.ord
|
|
|
|
FROM
|
|
|
|
users, users_committee, committees_link
|
|
|
|
WHERE
|
|
|
|
users_committee.users_id=users.id
|
|
|
|
AND committees_link.users_id=users.id
|
|
|
|
AND committees_link.committees_id='$r->id'
|
|
|
|
ORDER BY
|
|
|
|
ord,firstname");
|
2005-01-25 16:44:25 +00:00
|
|
|
|
|
|
|
//if there's nobody in this committee, then just skip it and go on to the next one.
|
|
|
|
if(mysql_num_rows($q2)==0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
echo "<tr>";
|
2005-01-25 16:56:19 +00:00
|
|
|
echo "<td colspan=\"3\"><h3>$r->name</h3>";
|
2005-01-25 16:44:25 +00:00
|
|
|
echo "</td></tr>\n";
|
|
|
|
|
|
|
|
echo mysql_error();
|
|
|
|
while($r2=mysql_fetch_object($q2))
|
|
|
|
{
|
|
|
|
$output=$config['committee_publiclayout'];
|
|
|
|
|
2007-11-17 21:59:59 +00:00
|
|
|
$name=$r2->firstname.' '.$r2->lastname;
|
|
|
|
$output=str_replace("name",$name,$output);
|
2005-01-25 16:44:25 +00:00
|
|
|
$output=str_replace("title",$r2->title,$output);
|
|
|
|
|
|
|
|
//make sure we do emailprivate before email so we dont match the wrong thing
|
2007-11-17 21:59:59 +00:00
|
|
|
if($r2->emailprivate && $r2->displayemail=='yes')
|
2005-01-25 16:44:25 +00:00
|
|
|
{
|
|
|
|
list($b,$a)=split("@",$r2->emailprivate);
|
2005-01-25 16:56:19 +00:00
|
|
|
$output=str_replace("emailprivate","<script language=\"javascript\" type=\"text/javascript\">em('$b','$a')</script>",$output);
|
2005-01-25 16:44:25 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
$output=str_replace("emailprivate","",$output);
|
|
|
|
|
2007-11-17 21:59:59 +00:00
|
|
|
if($r2->email && $r2->displayemail=='yes')
|
2005-01-25 16:44:25 +00:00
|
|
|
{
|
|
|
|
list($b,$a)=split("@",$r2->email);
|
2005-01-25 16:56:19 +00:00
|
|
|
$output=str_replace("email","<script language=\"javascript\" type=\"text/javascript\">em('$b','$a')</script>",$output);
|
2005-01-25 16:44:25 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
$output=str_replace("email","",$output);
|
|
|
|
|
|
|
|
$output=str_replace("phonehome",$r2->phonehome,$output);
|
|
|
|
$output=str_replace("phonework",$r2->phonework,$output);
|
|
|
|
$output=str_replace("phonecell",$r2->phonecell,$output);
|
|
|
|
$output=str_replace("fax",$r2->fax,$output);
|
|
|
|
|
|
|
|
echo $output;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
echo "<td>";
|
|
|
|
echo " <b>$r2->name</b>";
|
|
|
|
echo "</td><td>";
|
|
|
|
if($r2->title) echo " $r2->title";
|
|
|
|
else echo " ";
|
|
|
|
echo "</td><td>";
|
|
|
|
if($r2->email)
|
|
|
|
{
|
|
|
|
echo " ";
|
|
|
|
list($b,$a)=split("@",$r2->email);
|
|
|
|
echo "<script language=javascript>em('$b','$a')</script>";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
echo " ";
|
|
|
|
|
|
|
|
echo "</td></tr>\n";
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
echo "<tr><td> </td></tr>\n";
|
|
|
|
}
|
|
|
|
echo "</table>";
|
|
|
|
|
|
|
|
send_footer();
|
|
|
|
?>
|