forked from science-ation/science-ation
0567451a58
options. This way, the logo/fairname can be moved around and resized. Ensure those fields exist in each report. Convert name/logo preferences in all existing reports, and adjust the yloc/height of existing fields to make way for the headers if they exist.
120 lines
3.1 KiB
PHP
120 lines
3.1 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 fair_name and fair_logo */
|
|
'fair_name' => array(
|
|
'start_option_group' => 'Fair Information',
|
|
'name' => 'Fair -- Name',
|
|
'header' => 'Fair Name',
|
|
'width' => 76.2 /*mm*/,
|
|
'table' => "'".mysql_escape_string($config['fairname'])."'"),
|
|
|
|
'fair_year' => array (
|
|
'name' => 'Fair -- Year',
|
|
'header' => 'Year',
|
|
'width' => 12.7 /*mm*/,
|
|
'table' => "{$config['FAIRYEAR']}"),
|
|
|
|
'fair_logo' => array(
|
|
'name' => 'Fair -- 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;
|
|
$year = $report['year'];
|
|
|
|
$q = " FROM
|
|
tours
|
|
WHERE
|
|
tours.year='$year'
|
|
";
|
|
|
|
return $q;
|
|
}
|
|
|
|
?>
|