science-ation/admin/reports_tours.inc.php

114 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_tours_fields = array(
'tour_name' => array(
'start_option_group' => 'Tour Information',
'name' => 'Tour -- Name',
'header' => 'Tour Name',
'width' => 76.2 /*mm*/,
'table' => 'tours.name' ),
'tour_num' => array(
'name' => 'Tour -- Number',
'header' => 'Num',
'width' => 19.05 /*mm*/,
'table' => 'tours.num' ),
'tour_desc' => array(
'name' => 'Tour -- Description',
'header' => 'Tour Description',
'width' => 76.2 /*mm*/,
'table' => 'tours.description'),
'tour_capacity' => array(
'name' => 'Tour -- Capacity',
'header' => 'Cap',
'width' => 10.16 /*mm*/,
'table' => 'tours.capacity' ),
'tour_mingrade' => array(
'name' => 'Tour -- Minimum Grade',
'header' => 'Min Gr.',
'width' => 10.16 /*mm*/,
'table' => 'tours.grade_min' ),
'tour_maxgrade' => array(
'name' => 'Tour -- Maximum Grade',
'header' => 'Max Gr.',
'width' => 10.16 /*mm*/,
'table' => 'tours.grade_max' ),
'tour_location' => array(
'name' => 'Tour -- Location',
'header' => 'Tour Location',
'width' => 50.8 /*mm*/,
'table' => 'tours.location'),
'tour_contact' => array(
'name' => 'Tour -- Contact',
'header' => 'Contact',
'width' => 38.1 /*mm*/,
'table' => 'tours.contact' ),
'tour_id' => array(
'name' => 'Tour -- Database ID',
'header' => '#',
'width' => 10.16 /*mm*/,
'table' => 'tours.id' ),
/* The label system depends on each report type having conference_name and conference_logo */
'conference_name' => array(
'start_option_group' => 'Conference Information',
'name' => 'Conference -- Name',
'header' => 'Conference Name',
'width' => 76.2 /*mm*/,
'table' => "'".mysql_real_escape_string($conference['name'])."'"),
'conference_logo' => array(
'name' => 'Conference -- Logo (for Labels only)',
'header' => '',
'width' => 1 /*mm*/,
'table' => "CONCAT(' ')"),
);
function report_tours_fromwhere($report, $components)
{
global $config, $report_tours_fields;
$fields = $report_tours_fields;
$conferences_id = $report['conferences_id'];
$q = " FROM
tours
WHERE
tours.conferences_id='$conferences_id'
";
return $q;
}
?>