From 66fe2ed34f74bcc2aee532e86f1fabce8962d795 Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 4 May 2009 06:13:15 +0000 Subject: [PATCH] - Add remaining stats gathering info for SFFBC, try to make them generic so anyone could use them. --- admin/fair_stats.php | 91 ++++++++++++++++++++++++++++++++++++++++---- admin/stats.inc.php | 48 +++++++++++------------ 2 files changed, 107 insertions(+), 32 deletions(-) diff --git a/admin/fair_stats.php b/admin/fair_stats.php index f3c5677..03ad6aa 100644 --- a/admin/fair_stats.php +++ b/admin/fair_stats.php @@ -84,6 +84,10 @@ $server_config['fair_stats_minorities'] = 'no'; $server_config['fair_stats_guests'] = 'no'; $server_config['fair_stats_sffbc_misc'] = 'no'; + $server_config['fair_stats_info'] = 'no'; + $server_config['fair_stats_next_chair'] = 'no'; + $server_config['fair_stats_scholarships'] = 'no'; + $server_config['fair_stats_delegates'] = 'no'; function curl_query($fair, $xml) { @@ -141,7 +145,6 @@ } $stats['year'] = $year; $xml = stats_to_xml($fair, $stats); - if(function_exists('curl_init')) { $r = curl_query($fair, $xml); @@ -211,7 +214,7 @@ echo notice(i18n('Server said: Success')); echo '
'; - echo i18n('This server has requested the following stats:'); + echo i18n('This server has requested the following stats for your %1 fair:', array($year)); echo '

'; foreach($server_config as $k=>$v) { @@ -345,10 +348,82 @@ echo "
"; echo ""; - $manual_stats = array(); + if($server_config['fair_stats_info'] == 'yes') { + 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['fair_stats_next_chair'] == 'yes') { + 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['fair_stats_delegates'] == 'yes') { + 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['fair_stats_scholarships'] == 'yes') { + 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['fair_stats_participation'] == 'yes') { $rangemap = array(1=>'1-3', 4=>'4-6', 7=>'7-8', 9=>'9-10', 11=>'11-12'); - echo ''.i18n('Fair participation').'
'; + echo '

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

'; echo '
'; echo i18n("Number of students").": {$stats['students_total']}"; echo ''; @@ -380,7 +455,7 @@ } if($server_config['fair_stats_schools_ext'] == 'yes') { - echo ''.i18n('Extended School/Participant data').'
'; + echo '

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

'; echo '
'; echo i18n('Public schools: %1 (%2 students).',array( $stats['schools_public'], $stats['students_public'])); @@ -398,7 +473,7 @@ echo '
'; } if($server_config['fair_stats_minorities'] != '') { - echo ''.i18n('Data on minority groups').'
'; + echo '

'.i18n('%1 Data on minority groups', array($year)).'

'; echo '
'; echo '
'.i18n('Grade').'
'; if(strstr('firstnations',$server_config['fair_stats_minorities']) != false) { @@ -411,7 +486,7 @@ echo '
'; } if($server_config['fair_stats_guests'] == 'yes' ) { - echo ''.i18n('Guests visiting the fair').'
'; + echo '

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

'; echo '
'; echo '
'; echo '
'.i18n('Number of Students that visited the fair (tours, etc.)'); @@ -426,7 +501,7 @@ } if($server_config['fair_stats_sffbc_misc'] == 'yes') { - echo ''.i18n('Misc. SFFBC Questions').'
'; + echo '

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

'; echo '
'; echo ''; echo '
'.i18n('Number of Teachers supporting student projects'); diff --git a/admin/stats.inc.php b/admin/stats.inc.php index abc405f..8c8514d 100644 --- a/admin/stats.inc.php +++ b/admin/stats.inc.php @@ -1,12 +1,12 @@ array(), - 'end_date' => array(), - 'address' => array(), - 'budget' => array(), - 'ysf_affiliation_complete' => array(), - 'charity' => array(), + 'start_date' => array('manual' => true), + 'end_date' => array('manual' => true), + 'address' => array('manual' => true), + 'budget' => array('manual' => true), + 'ysf_affiliation_complete' => array('manual' => true), + 'charity' => array('manual' => true), 'male_1' => array(), 'male_4' => array(), 'male_7' => array(), @@ -40,23 +40,23 @@ $stats_data = array( 'consideringcareer' => array('manual' => true), 'committee_members' => array(), 'judges' => array(), - 'next_chair_name' => array(), - 'next_chairemail' => array(), - 'next_chair_hphone' => array(), - 'next_chair_bphone' => array(), - 'next_chair_fax' => array(), - 'scholarships' => array(), - 'delegate1' => array(), - 'delegate2' => array(), - 'delegate3' => array(), - 'delegate4' => array(), - 'delegate1_email' => array(), - 'delegate2_email' => array(), - 'delegate3_email' => array(), - 'delegate4_email' => array(), - 'delegate1_size' => array(), - 'delegate2_size' => array(), - 'delegate3_size' => array(), - 'delegate4_size' => array(), + 'next_chair_name' => array('manual' => true), + 'next_chairemail' => array('manual' => true), + 'next_chair_hphone' => array('manual' => true), + 'next_chair_bphone' => array('manual' => true), + 'next_chair_fax' => array('manual' => true), + 'scholarships' => array('manual' => true), + 'delegate1' => array('manual' => true), + 'delegate2' => array('manual' => true), + 'delegate3' => array('manual' => true), + 'delegate4' => array('manual' => true), + 'delegate1_email' => array('manual' => true), + 'delegate2_email' => array('manual' => true), + 'delegate3_email' => array('manual' => true), + 'delegate4_email' => array('manual' => true), + 'delegate1_size' => array('manual' => true), + 'delegate2_size' => array('manual' => true), + 'delegate3_size' => array('manual' => true), + 'delegate4_size' => array('manual' => true), ); ?>