- Send the stats gathering list from the fair info

This commit is contained in:
dave 2009-09-17 07:14:12 +00:00
parent cb6740fa6f
commit 38d3711ace

View File

@ -30,15 +30,11 @@ require_once('user.inc.php');
function handle_getstats(&$u, $fair,&$data, &$response) function handle_getstats(&$u, $fair,&$data, &$response)
{ {
$year = $data['getstats']['year']; $year = $data['getstats']['year'];
$vars = array('fair_stats_participation', 'fair_stats_schools_ext',
'fair_stats_minorities', 'fair_stats_guests', /* Send back the stats we'd like to collect */
'fair_stats_sffbc_misc', 'fair_stats_info', $response['statconfig'] = split(',', $fair['gather_stats']);
'fair_stats_next_chair', 'fair_stats_scholarships',
'fair_stats_delegates', /* Send back the stats we currently have */
);
foreach($vars as $v) {
$response['statconfig'][$v] = $config[$v];
}
$q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}' $q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}'
AND year='$year'"); AND year='$year'");
$response['stats'] = mysql_fetch_assoc($q); $response['stats'] = mysql_fetch_assoc($q);