- change ysf to ysc in the code too

This commit is contained in:
dave 2009-09-19 06:13:22 +00:00
parent ed04710018
commit b5430b08b3
5 changed files with 14 additions and 14 deletions

View File

@ -44,7 +44,7 @@
echo i18n("Checking %1 for awards...",array($fair['name']));
echo "<br />";
if($fair['type'] == 'ysf') {
if($fair['type'] == 'ysc') {
$req=array("awardrequest"=>array(
"username"=>$r->username,
"password"=>$r->password,

View File

@ -28,7 +28,7 @@
require_once('xml.inc.php');
function curl_query($fair, $data, $ysf_url='')
function curl_query($fair, $data, $ysc_url='')
{
global $output;
switch($fair['type']) {
@ -40,11 +40,11 @@
'password' => $fair['password']);
$str = json_encode(array_merge($d, $data));
break;
case 'ysf':
if($ysf_url == '')
case 'ysc':
if($ysc_url == '')
$url = $fair['url'];
else
$url = $ysf_url;
$url = $ysc_url;
$var = 'xml';
$output="";
xmlCreateRecurse($data);
@ -73,7 +73,7 @@
case 'sfiab':
$ret=json_decode(urldecode($datastream), true);
break;
case 'ysf':
case 'ysc':
$datastream = str_replace(" standalone=\"yes\"","",$datastream);
/* Return is plaintext, make a return array */
$ret['error'] = 0;

View File

@ -29,9 +29,9 @@
require_once('stats.inc.php');
require_once('curl.inc.php');
function stats_to_ysf($fair, $stats)
function stats_to_ysc($fair, $stats)
{
if($fair['type'] == 'ysf') {
if($fair['type'] == 'ysc') {
/* Map data into YSF tags */
$y=array();
$y["numschoolstotal"]=$stats['schools_total'];
@ -95,8 +95,8 @@
$stats[$k] = $_POST[$k];
}
$stats['year'] = $year;
if($fair['type'] == 'ysf') {
$st = stats_to_ysf($fair, $stats);
if($fair['type'] == 'ysc') {
$st = stats_to_ysc($fair, $stats);
$req = array('affiliation' => array(
"ysf_region_id"=>$fair['username'],
"ysf_region_password"=>$fair['password'],
@ -126,7 +126,7 @@
echo "<form name=\"fairselect\" action=\"$PHPSELF\" method=\"get\">";
$q=mysql_query("SELECT * FROM fairs WHERE `type`='sfiab' OR `type`='ysf'");
$q=mysql_query("SELECT * FROM fairs WHERE `type`='sfiab' OR `type`='ysc'");
echo "<select name=\"id\" \">";
echo "<option value=\"\">".i18n("Choose a fair")."</option>\n";
while($r=mysql_fetch_object($q)) {
@ -154,7 +154,7 @@
exit;
}
if($fair['type'] == 'ysf') {
if($fair['type'] == 'ysc') {
$data['statconfig'] = array('participation');
} else {
echo notice(i18n('Getting stats request and downloading existing stats from server %1', array($fair['url'])));

View File

@ -25,7 +25,7 @@
require_once('../user.inc.php');
require_once('../fair.inc.php');
$fair_type = array('feeder' => 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysf' => 'YSF/CWSF Upstream');
$fair_type = array('feeder' => 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysc' => 'YSC/CWSF Upstream');
$stats = array('participation' => 'Particpation Numbers',
'schools_ext' => 'Extra school participation data, number of public/private school students',
'minorities' => 'Data on minority group participation',

View File

@ -27,7 +27,7 @@
require_once("user.inc.php");
require_once("fair.inc.php");
$fair_type = array('feeder' => 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysf' => 'YSF/CWSF Upstream');
$fair_type = array('feeder' => 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysc' => 'YSC/CWSF Upstream');
function yesno($name, $val)
{