forked from science-ation/science-ation
111 lines
3.0 KiB
PHP
111 lines
3.0 KiB
PHP
|
<?
|
||
|
/*
|
||
|
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.
|
||
|
*/
|
||
|
|
||
|
$report_committees_fields = array(
|
||
|
'name' => array(
|
||
|
'name' => 'Committee -- Full Name ',
|
||
|
'header' => 'Name',
|
||
|
'width' => 1.75,
|
||
|
'table' => 'committees_members.name'),
|
||
|
|
||
|
'email' => array(
|
||
|
'name' => 'Committee -- Email',
|
||
|
'header' => 'Email',
|
||
|
'width' => 2.0,
|
||
|
'table' => 'committees_members.email'),
|
||
|
|
||
|
'phone_home' => array(
|
||
|
'name' => 'Committees -- Phone (Home)',
|
||
|
'header' => 'Phone(Home)',
|
||
|
'width' => 1,
|
||
|
'table' => 'committees_members.phonehome'),
|
||
|
|
||
|
'phone_work' => array(
|
||
|
'name' => 'Committees -- Phone (Work)',
|
||
|
'header' => 'Phone(Work)',
|
||
|
'width' => 1.25,
|
||
|
'table' => 'committees_members.phonework'),
|
||
|
|
||
|
'phone_cel' => array(
|
||
|
'name' => 'Committees -- Phone (Cel)',
|
||
|
'header' => 'Phone(Cel)',
|
||
|
'width' => 1,
|
||
|
'table' => 'committees_members.phonecel'),
|
||
|
|
||
|
'organization' => array(
|
||
|
'name' => 'Committees -- Organization',
|
||
|
'header' => 'Organization',
|
||
|
'width' => 2,
|
||
|
'table' => 'committees_members.organization'),
|
||
|
|
||
|
'static_text' => array(
|
||
|
'name' => 'Static Text (useful for labels)',
|
||
|
'header' => '',
|
||
|
'width' => 0.1,
|
||
|
'table' => "CONCAT(' ')"),
|
||
|
|
||
|
);
|
||
|
|
||
|
function report_committees_fromwhere($report)
|
||
|
{
|
||
|
global $config, $report_committees_fields;
|
||
|
|
||
|
$fields = $report_committees_fields;
|
||
|
$year = $report['year'];
|
||
|
|
||
|
/*
|
||
|
$components = array();
|
||
|
foreach($report['col'] as $c) {
|
||
|
if(!is_array($fields[$c]['select_component'])) continue;
|
||
|
$components = array_merge($components, $fields[$c]['select_component']);
|
||
|
}
|
||
|
|
||
|
|
||
|
$languages_from = '';
|
||
|
$languages_where = '';
|
||
|
if(in_array('languages', $components)) {
|
||
|
$languages_from = ', committees_languages';
|
||
|
$languages_where = 'AND committees_languages.committees_id=committees_members.id';
|
||
|
}
|
||
|
|
||
|
$teams_from = '';
|
||
|
$teams_where = '';
|
||
|
if(in_array('teams', $components)) {
|
||
|
$teams_from = ",committees_teams_link, committees_teams";
|
||
|
$teams_where = "AND committees_teams_link.committees_id=committees_members.id
|
||
|
AND committees_teams_link.year='$year'
|
||
|
AND committees_teams.id=committees_teams_link.committees_teams_id
|
||
|
AND committees_teams.year='$year'";
|
||
|
}
|
||
|
*/
|
||
|
$q = " FROM
|
||
|
committees_members
|
||
|
WHERE
|
||
|
1
|
||
|
";
|
||
|
|
||
|
return $q;
|
||
|
}
|
||
|
|
||
|
?>
|