2007-03-20 06:24:18 +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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
$report_committees_fields = array(
|
|
|
|
'name' => array(
|
2007-12-24 19:20:01 +00:00
|
|
|
'name' => 'Committee Member -- Full Name ',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Name',
|
|
|
|
'width' => 1.75,
|
2007-12-24 19:20:01 +00:00
|
|
|
'table' => "CONCAT(users.firstname, ' ', users.lastname)",
|
|
|
|
'table_sort' => 'users.lastname'),
|
|
|
|
|
|
|
|
'last_name' => array(
|
|
|
|
'name' => 'Committee Member -- Last Name',
|
|
|
|
'header' => 'Last Name',
|
|
|
|
'width' => 1.0,
|
|
|
|
'table' => 'users.lastname' ),
|
|
|
|
|
|
|
|
'first_name' => array(
|
|
|
|
'name' => 'Committee Member -- First Name',
|
|
|
|
'header' => 'First Name',
|
|
|
|
'width' => 1.0,
|
|
|
|
'table' => 'users.firstname' ),
|
|
|
|
|
2007-03-20 06:24:18 +00:00
|
|
|
'email' => array(
|
2007-12-24 19:20:01 +00:00
|
|
|
'name' => 'Committee Member -- Email',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Email',
|
|
|
|
'width' => 2.0,
|
2007-11-17 21:59:59 +00:00
|
|
|
'table' => 'users.email'),
|
2007-03-20 06:24:18 +00:00
|
|
|
|
|
|
|
'phone_home' => array(
|
2007-12-24 19:20:01 +00:00
|
|
|
'name' => 'Committee Member -- Phone (Home)',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Phone(Home)',
|
|
|
|
'width' => 1,
|
2007-11-17 21:59:59 +00:00
|
|
|
'table' => 'users.phonehome'),
|
2007-03-20 06:24:18 +00:00
|
|
|
|
|
|
|
'phone_work' => array(
|
2007-12-24 19:20:01 +00:00
|
|
|
'name' => 'Committee Member -- Phone (Work)',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Phone(Work)',
|
|
|
|
'width' => 1.25,
|
2007-11-17 21:59:59 +00:00
|
|
|
'table' => 'users.phonework'),
|
2007-03-20 06:24:18 +00:00
|
|
|
|
|
|
|
'phone_cel' => array(
|
2007-12-24 19:20:01 +00:00
|
|
|
'name' => 'Committee Member -- Phone (Cel)',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Phone(Cel)',
|
|
|
|
'width' => 1,
|
2007-11-17 21:59:59 +00:00
|
|
|
'table' => 'users.phonecell'),
|
2007-03-20 06:24:18 +00:00
|
|
|
|
2007-12-24 19:20:01 +00:00
|
|
|
'address' => array(
|
|
|
|
'name' => 'Committee Member -- Address Street',
|
|
|
|
'header' => 'Address',
|
|
|
|
'width' => 2.0,
|
|
|
|
'table' => "CONCAT(users.address, ' ', users.address2)"),
|
|
|
|
|
|
|
|
'city' => array(
|
|
|
|
'name' => 'Committee Member -- Address City',
|
|
|
|
'header' => 'City',
|
|
|
|
'width' => 1.5,
|
|
|
|
'table' => 'users.city' ),
|
|
|
|
|
|
|
|
'province' => array(
|
|
|
|
'name' => 'Committee Member -- Address Province',
|
|
|
|
'header' => 'Province',
|
|
|
|
'width' => 0.75,
|
|
|
|
'table' => 'users.province' ),
|
|
|
|
|
|
|
|
'postal' => array(
|
|
|
|
'name' => 'Committee Member -- Address Postal Code',
|
|
|
|
'header' => 'Postal',
|
|
|
|
'width' => 0.75,
|
|
|
|
'table' => 'users.postalcode' ),
|
|
|
|
|
2007-03-20 06:24:18 +00:00
|
|
|
'organization' => array(
|
2007-12-24 19:20:01 +00:00
|
|
|
'name' => 'Committee Member -- Organization',
|
2007-03-20 06:24:18 +00:00
|
|
|
'header' => 'Organization',
|
|
|
|
'width' => 2,
|
2007-11-17 21:59:59 +00:00
|
|
|
'table' => 'users.organization'),
|
2007-03-20 06:24:18 +00:00
|
|
|
|
|
|
|
'static_text' => array(
|
|
|
|
'name' => 'Static Text (useful for labels)',
|
|
|
|
'header' => '',
|
|
|
|
'width' => 0.1,
|
|
|
|
'table' => "CONCAT(' ')"),
|
|
|
|
);
|
|
|
|
|
2007-03-26 01:54:18 +00:00
|
|
|
function report_committees_fromwhere($report, $components)
|
2007-03-20 06:24:18 +00:00
|
|
|
{
|
|
|
|
global $config, $report_committees_fields;
|
|
|
|
|
|
|
|
$fields = $report_committees_fields;
|
|
|
|
$year = $report['year'];
|
|
|
|
|
|
|
|
/*
|
|
|
|
$teams_from = '';
|
|
|
|
$teams_where = '';
|
|
|
|
if(in_array('teams', $components)) {
|
|
|
|
$teams_from = ",committees_teams_link, committees_teams";
|
2007-11-17 21:59:59 +00:00
|
|
|
$teams_where = "AND committees_teams_link.committees_id=users.id
|
2007-03-20 06:24:18 +00:00
|
|
|
AND committees_teams_link.year='$year'
|
|
|
|
AND committees_teams.id=committees_teams_link.committees_teams_id
|
|
|
|
AND committees_teams.year='$year'";
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
$q = " FROM
|
2007-11-17 21:59:59 +00:00
|
|
|
users
|
2007-03-20 06:24:18 +00:00
|
|
|
WHERE
|
|
|
|
1
|
|
|
|
";
|
|
|
|
|
|
|
|
return $q;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|