Copyright (C) 2009 David 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. */ ?> $v) { $stats[$k] = mysql_escape_string($stats[$k]); } // $str = join(',',$stats); $keys = '`fairs_id`,`year`,`'.join('`,`', array_keys($stats)).'`'; $vals = "'{$u['fairs_id']}','$year','".join("','", array_values($stats))."'"; mysql_query("DELETE FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}' AND year='$year'"); echo mysql_error(); mysql_query("INSERT INTO fairs_stats (`id`,$keys) VALUES ('',$vals)"); echo mysql_error(); happy_("Fair Information Saved."); exit; } if($_SESSION['embed'] == true) { echo "
"; display_messages(); echo "

".i18n("Fair Information and Statistics")."

"; echo "
"; } else { send_header("Fair Information and Statistics", array('Fair Main' => 'fair_main.php'), "fair_stats" ); } ?> "; echo i18n('Select Year').": "; $q = mysql_query("SELECT DISTINCT year FROM config WHERE year>1000 ORDER BY year DESC"); echo ""; echo ""; */ echo "
"; /* Load stats */ $q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}' AND year='$year'"); $stats = mysql_fetch_assoc($q); /* Print stats */ /* Print all blocks the server requests */ echo "
"; echo ""; if($server_config['info']) { echo '

'.i18n('%1 Fair information', array($year)).'

'; echo ''; echo ''; echo ""; echo ''; echo ""; echo ''; echo ''; echo ''; echo ""; echo ''; echo ''; echo ''; echo ""; echo '
'.i18n('Fair Start Date').':(YYYY-MM-DD)
'.i18n('Fair End Date').':(YYYY-MM-DD)
'.i18n('Fair Location/Address').':
'.i18n('Fair Budget').':$
'.i18n('YSF Affiliation Complete').'?
'.i18n('Charity Number or Information').'?
'; echo '
'; echo '
'; } if($server_config['next_chair']) { echo '

'.i18n('%1 - %2 Chairperson (if known)', array($year, $year+1)).'

'; echo ''; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo ""; echo ''; echo '
'.i18n('Name').': '.i18n('Email').':
'.i18n('Tel. Bus').': '.i18n('Tel. Home').':
'.i18n('Fax').':
'; echo '

'; } if($server_config['delegates']) { echo '

'.i18n('%1 CWSF Delegates and Alternatives', array($year)).'

'; echo ''; echo ''; for($x=1;$x<=3;$x++) { $sizes = array('small'=>'Small', 'medium'=>'Medium', 'large'=>'Large', 'xlarge'=>'X-Large'); echo ""; echo ""; echo "'; } echo '
'.i18n('Delegate Name(s)').''.i18n('Email').''.i18n('Jacket Size').'
'; echo i18n('Remember, the jackets fit smaller than normal sizes.'); echo '

'; } if($server_config['scholarships']) { echo '

'.i18n('%1 Scholarships', array($year)).'

'; echo 'How many university/college scholarships are available at your fair? (use a format like:
6 - University of British Columbia - Entrance Scholarships
'; echo ''; echo '

'; } if($server_config['participation']) { $rangemap = array(1=>'1-3', 4=>'4-6', 7=>'7-8', 9=>'9-10', 11=>'11-12'); echo '

'.i18n('%1 Fair participation', array($year)).'

'; echo '
'; echo i18n("Number of students").": "; echo ""; echo ''; echo ''; foreach($rangemap as $k=>$v) echo ""; echo ''; echo ''; foreach($rangemap as $k=>$v) echo ""; echo ''; echo ''; foreach($rangemap as $k=>$v) echo ""; echo ''; echo ''; foreach($rangemap as $k=>$v) echo ""; echo ''; echo '
'.i18n('Grade').'
$v
'.i18n('Male').'
'.i18n('Female').'
'.i18n('Projects').'
'; echo '
'; echo i18n("Number of schools").": "; echo '
'; echo i18n("Number of active schools").": "; echo '
'; echo '
'; echo i18n("Number of committee members").": "; echo '
'; echo i18n("Number of judges").": "; echo '
'; echo '
'; echo '
'; } if($server_config['schools_ext']) { echo '

'.i18n('%1 Extended School/Participant data', array($year)).'

'; echo '
'; ?>
: :
: :
: :
:



'.i18n('%1 Data on minority groups', array($year)).''; echo '
'; echo ''; echo ''; echo '
'.i18n('Number of First Nations students'); echo ": "; echo '
'; echo '
'; echo '
'; } if($server_config['guests'] ) { echo '

'.i18n('%1 Guests visiting the fair', array($year)).'

'; echo '
'; echo ''; echo ''; echo ''; echo '
'.i18n('Number of Students that visited the fair (tours, etc.)'); echo ": "; echo '
'.i18n('Number of Public Guests that visited the fair'); echo ": "; echo '
'; echo '
'; echo '
'; } if($server_config['sffbc_misc']) { echo '

'.i18n('%1 Misc. SFFBC Questions', array($year)).'

'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo '
'.i18n('Number of Teachers supporting student projects'); echo ": "; echo '
'.i18n('Number of Students indicating increased interest in science & technology'); echo ": "; echo '
'.i18n('Number of Students considering careers in science & technology'); echo ": "; echo '
'; echo '
'; echo '
'; } if($server_any_stats == false) { /* Every condition below will fail, tell the user something */ echo i18n("No stats to gather. Contact the admins if you believe this is an error."); } else { echo ""; } echo '
'; echo "
"; echo "
"; /* echo "
";
 print_r($fair);
 print_r($server_config);
 print_r($stats);
 echo "
"; */ if($_SESSION['embed'] != true) { send_footer(); } ?>