echoi18n("Your PHP installation does not support CURL. You will need to login to the YSF system as the regional coodinator and upload the XML data manually");
}
send_footer();
exit;
}
$ok=true;
//make sure we have the ysf_region_id and ysf_region_password
if(!$config['ysf_region_id'])
{
echoerror(i18n("You have not yet specified your YSF Region ID. Go to the Configuration Variables page to set it"));
$ok=false;
}
if(!$config['ysf_region_password'])
{
echoerror(i18n("You have not yet specified your YSF Region Password. Go to the Configuration Variables page to set it"));
$q=mysql_query("SELECT DISTINCT(students.schools_id) AS sid FROM students,registrations WHERE students.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending')");
echomysql_error();
$numberofactiveschools=mysql_num_rows($q);
echoi18n("Number of active schools: %1",array($numberofactiveschools))."<br />";
$q=mysql_query("SELECT COUNT(students.id) AS num FROM students,registrations WHERE students.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending')");
$r=mysql_fetch_object($q);
$numberofstudents=$r->num;
echoi18n("Number of students: %1",array($numberofstudents))."<br />";
$q=mysql_query("SELECT COUNT(students.id) AS num, students.grade, students.sex FROM students,registrations WHERE students.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending') GROUP BY students.grade, students.sex");
$q=mysql_query("SELECT MAX(students.grade) grade FROM students,registrations,projects WHERE students.registrations_id=registrations.id AND projects.registrations_id=registrations.id AND students.year='$year' AND registrations.year='$year' AND projects.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending') GROUP BY projects.id");
$q=mysql_query("SELECT COUNT(id) AS num FROM committees_members WHERE deleted='N'");
$r=mysql_fetch_object($q);
$numcommittee=$r->num;
echoi18n("Committee Members: %1 (note: this is CURRENT number of active committee members as of right now! There is no way to extract committee member numbers from previous years)",array($r->num));
$q=mysql_query("SELECT COUNT(id) AS num FROM judges,judges_years WHERE judges_years.judges_id=judges.id AND judges_years.year='$year' AND judges.complete='yes' AND judges.deleted='no'");
echoi18n("Warning! You can only use this feature once, and it will send whatever data is listed above. If you try to submit this data a second time to YSF it will not work. So please make sure everything is correct before submitting!");
echo"<br />";
echo"<br />";
echo"<input type=\"submit\" value=\"".i18n("Send Affiliation Stats to YSF")."\">";