forked from science-ation/science-ation
- Update the fair stats to use the new list
- Don't have curl dump debug info
This commit is contained in:
parent
6bd4d03941
commit
cb6740fa6f
@ -52,7 +52,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<pre>Curl Send: $str</pre>";
|
||||
// echo "<pre>Curl Send: $str</pre>";
|
||||
|
||||
$ch = curl_init(); /// initialize a cURL session
|
||||
curl_setopt ($ch, CURLOPT_URL, $url);
|
||||
@ -80,7 +80,7 @@
|
||||
$ret['message'] = $datastream;
|
||||
break;
|
||||
}
|
||||
echo "<pre>Server Returned: ";print_r($ret);echo "</pre><br>";
|
||||
// echo "<pre>Server Returned: ";print_r($ret);echo "</pre><br>";
|
||||
return $ret;
|
||||
}
|
||||
?>
|
||||
|
@ -66,15 +66,15 @@
|
||||
|
||||
/* SFIAB config options server side */
|
||||
$server_config = array();
|
||||
$server_config['fair_stats_participation'] = 'no';
|
||||
$server_config['fair_stats_schools_ext'] = 'no';
|
||||
$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';
|
||||
$server_config['participation'] = false;
|
||||
$server_config['schools_ext'] = false;
|
||||
$server_config['minorities'] = false;
|
||||
$server_config['guests'] = false;
|
||||
$server_config['sffbc_misc'] = false;
|
||||
$server_config['info'] = false;
|
||||
$server_config['next_chair'] = false;
|
||||
$server_config['scholarships'] = false;
|
||||
$server_config['delegates'] = false;
|
||||
|
||||
if($_GET['year']) $year=intval($_GET['year']);
|
||||
else $year=$config['FAIRYEAR'];
|
||||
@ -155,7 +155,7 @@
|
||||
}
|
||||
|
||||
if($fair['type'] == 'ysf') {
|
||||
$data['statconfig'] = array('fair_stats_participation');
|
||||
$data['statconfig'] = array('participation');
|
||||
} else {
|
||||
echo notice(i18n('Getting stats request and downloading existing stats from server %1', array($fair['url'])));
|
||||
/* Query the server to see what stats we need */
|
||||
@ -174,8 +174,8 @@
|
||||
echo i18n('This server has requested the following stats for your %1 fair:', array($year));
|
||||
echo '<br /><br />';
|
||||
|
||||
foreach($server_config as $k=>$v) {
|
||||
$server_config[$k] = $data['statconfig'][$k];
|
||||
foreach($data['statconfig'] as $k) {
|
||||
$server_config[$k] = true;
|
||||
}
|
||||
|
||||
/* Gather all stats, then we'll decide what to send */
|
||||
@ -305,7 +305,7 @@
|
||||
echo "<form method=\"POST\" action=\"$PHPSELF\">";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"sendstats\" />";
|
||||
|
||||
if($server_config['fair_stats_info'] == 'yes') {
|
||||
if($server_config['info']) {
|
||||
echo '<h3>'.i18n('%1 Fair information', array($year)).'</h3>';
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.i18n('Fair Start Date').':</td>';
|
||||
@ -331,7 +331,7 @@
|
||||
}
|
||||
|
||||
|
||||
if($server_config['fair_stats_next_chair'] == 'yes') {
|
||||
if($server_config['next_chair']) {
|
||||
echo '<h3>'.i18n('%1 - %2 Chairperson (if known)', array($year, $year+1)).'</h3>';
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.i18n('Name').': </td>';
|
||||
@ -350,7 +350,7 @@
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
if($server_config['fair_stats_delegates'] == 'yes') {
|
||||
if($server_config['delegates']) {
|
||||
echo '<h3>'.i18n('%1 CWSF Delegates and Alternatives', array($year)).'</h3>';
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.i18n('Delegate Name(s)').'</td><td>'.i18n('Email').'</td><td>'.i18n('Jacket Size').'<td></tr>';
|
||||
@ -371,14 +371,14 @@
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
if($server_config['fair_stats_scholarships'] == 'yes') {
|
||||
if($server_config['scholarships']) {
|
||||
echo '<h3>'.i18n('%1 Scholarships', array($year)).'</h3>';
|
||||
echo 'How many university/college scholarships are available at your fair? (use a format like: <br /><b>6 - University of British Columbia - Entrance Scholarships</b><br />';
|
||||
echo '<textarea name="scholarships" rows="4\" cols="80">'.htmlspecialchars($stats['scholarships']).'</textarea>';
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
if($server_config['fair_stats_participation'] == 'yes') {
|
||||
if($server_config['participation']) {
|
||||
$rangemap = array(1=>'1-3', 4=>'4-6', 7=>'7-8', 9=>'9-10', 11=>'11-12');
|
||||
echo '<h3>'.i18n('%1 Fair participation', array($year)).'</h3>';
|
||||
echo '<br />';
|
||||
@ -411,7 +411,7 @@
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
if($server_config['fair_stats_schools_ext'] == 'yes') {
|
||||
if($server_config['schools_ext']) {
|
||||
echo '<h3>'.i18n('%1 Extended School/Participant data', array($year)).'</h3>';
|
||||
echo '<br />';
|
||||
echo i18n('Public schools: <b>%1</b> (<b>%2</b> students).',array(
|
||||
@ -429,20 +429,18 @@
|
||||
echo '<br />';
|
||||
echo '<br />';
|
||||
}
|
||||
if($server_config['fair_stats_minorities'] != '') {
|
||||
if($server_config['minorities']) {
|
||||
echo '<h3>'.i18n('%1 Data on minority groups', array($year)).'</h3>';
|
||||
echo '<br />';
|
||||
echo '<table>';
|
||||
if(strstr('firstnations',$server_config['fair_stats_minorities']) != false) {
|
||||
echo '<tr><td>'.i18n('Number of First Nations students');
|
||||
echo ": </td><td><input type=\"text\" name=\"firstnations\" value=\"{$stats['firstnations']}\" size=\"5\" />";
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '<tr><td>'.i18n('Number of First Nations students');
|
||||
echo ": </td><td><input type=\"text\" name=\"firstnations\" value=\"{$stats['firstnations']}\" size=\"5\" />";
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '<br />';
|
||||
echo '<br />';
|
||||
}
|
||||
if($server_config['fair_stats_guests'] == 'yes' ) {
|
||||
if($server_config['guests'] ) {
|
||||
echo '<h3>'.i18n('%1 Guests visiting the fair', array($year)).'</h3>';
|
||||
echo '<br />';
|
||||
echo '<table>';
|
||||
@ -457,7 +455,7 @@
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
if($server_config['fair_stats_sffbc_misc'] == 'yes') {
|
||||
if($server_config['sffbc_misc']) {
|
||||
echo '<h3>'.i18n('%1 Misc. SFFBC Questions', array($year)).'</h3>';
|
||||
echo '<br />';
|
||||
echo '<table>';
|
||||
|
Loading…
Reference in New Issue
Block a user