forked from science-ation/science-ation
- Send the stats gathering list from the fair info
This commit is contained in:
parent
cb6740fa6f
commit
38d3711ace
@ -30,15 +30,11 @@ require_once('user.inc.php');
|
||||
function handle_getstats(&$u, $fair,&$data, &$response)
|
||||
{
|
||||
$year = $data['getstats']['year'];
|
||||
$vars = array('fair_stats_participation', 'fair_stats_schools_ext',
|
||||
'fair_stats_minorities', 'fair_stats_guests',
|
||||
'fair_stats_sffbc_misc', 'fair_stats_info',
|
||||
'fair_stats_next_chair', 'fair_stats_scholarships',
|
||||
'fair_stats_delegates',
|
||||
);
|
||||
foreach($vars as $v) {
|
||||
$response['statconfig'][$v] = $config[$v];
|
||||
}
|
||||
|
||||
/* Send back the stats we'd like to collect */
|
||||
$response['statconfig'] = split(',', $fair['gather_stats']);
|
||||
|
||||
/* Send back the stats we currently have */
|
||||
$q = mysql_query("SELECT * FROM fairs_stats WHERE fairs_id='{$u['fairs_id']}'
|
||||
AND year='$year'");
|
||||
$response['stats'] = mysql_fetch_assoc($q);
|
||||
|
Loading…
Reference in New Issue
Block a user