Copyright (C) 2005 James Grant 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. */ ?> "; $q=mysql_query("SELECT * FROM committees ORDER BY ord,name"); while($r=mysql_fetch_object($q)) { $q2=mysql_query("SELECT ". "committees_members.id,". "committees_members.name,". "committees_members.email,". "committees_members.emailprivate,". "committees_members.displayemail,". "committees_link.title, ". "committees_link.ord ". "FROM committees_members, committees_link ". "WHERE committees_link.committees_members_id=committees_members.id ". " AND committees_link.committees_id='$r->id'". " ORDER BY ord,name"); //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 ""; echo "

$r->name

"; echo "\n"; echo mysql_error(); while($r2=mysql_fetch_object($q2)) { $output=$config['committee_publiclayout']; $output=str_replace("name",$r2->name,$output); $output=str_replace("title",$r2->title,$output); //make sure we do emailprivate before email so we dont match the wrong thing if($r2->emailprivate && $r2->displayemail=='Y') { list($b,$a)=split("@",$r2->emailprivate); $output=str_replace("emailprivate","",$output); } else $output=str_replace("emailprivate","",$output); if($r2->email && $r2->displayemail=='Y') { list($b,$a)=split("@",$r2->email); $output=str_replace("email","",$output); } 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 ""; echo "    $r2->name"; echo ""; if($r2->title) echo "    $r2->title"; else echo " "; echo ""; if($r2->email) { echo "     "; list($b,$a)=split("@",$r2->email); echo ""; } else echo " "; echo "\n"; */ } echo " \n"; } echo ""; send_footer(); ?>