$pagemaker <$email>\n");
// $filemod = filemtime("~xmmssc/public_html/xidops/fields_status.txt");
$filemod = filemtime("/home/xmmssc/public_html/xidops/fields_status_new.txt");
$filemodtime = date("F j Y h:i:s A", $filemod);
$st=fputs($fp,"Based on: \"~xmmssc/public_html/xidops/fields_status.txt\", last modified $filemodtime \n");
}
?>".$text."");
}
else
{
$try=fputs($pt,"".$text."");
}
return $try;
}
$ran)
{
// calculate scores for WFC data
$wfcnow=$wfc[$rak];
$me=0;
$sc=0;
if ($sort === "WFC data status")
{
if (strpos($wfcnow[0],"N")!==0)
{
if (strpos($wfcnow[0],"S")!==0) $me+=2;
else $me+=1;
}
if (strpos($wfcnow[1],"N")!==0)
{
if (strpos($wfcnow[1],"S")!==0) $sc+=2;
else $sc+=1;
}
if (strpos($wfcnow[2],"N")!==0)
{
if (strpos($wfcnow[2],"S")!==0) $sc+=2;
else $sc+=1;
}
if (strpos($wfcnow[3],"N")!==0)
{
if (strpos($wfcnow[3],"S")!==0) $sc+=2;
else $sc+=1;
}
if (strpos($wfcnow[4],"N")!==0)
{
if (strpos($wfcnow[4],"S")!==0) $sc+=2;
else $sc+=1;
}
if (strpos($wfcnow[5],"N")!==0)
{
if (strpos($wfcnow[5],"S")!==0) $sc+=2;
else $sc+=1;
}
$first=$me+$sc*10;
// use RA as second order sorting
$second=substr($ran,0,2)*60.0*15 + substr($ran,3,2);
// specify ascending or descending, numeric or string
$so1=SORT_DESC;
$st1=SORT_NUMERIC;
$so2=SORT_ASC;
$st2=SORT_NUMERIC;
}
elseif($sort === "Field name")
{
$first=$field;
$second=0;
// specify ascending or descending, numeric or string
$so1=SORT_ASC;
$st1=SORT_STRING;
$so2=SORT_ASC;
$st2=SORT_NUMERIC;
}
// default is RA
else
{
// get ra hh, mm, don't use seconds for sorting
$first=substr($ran,0,2)*60.0*15 + substr($ran,3,2);
// use field name as second
$second=$field[$rak];
// specify ascending or descending, numeric or string
$so1=SORT_ASC;
$st1=SORT_NUMERIC;
$so2=SORT_ASC;
$st2=SORT_STRING;
}
$ff[]=$first;
$ss[]=$second;
$list[]=$rak+1;
}
// Use array_multisort to sort it by 1st, second, and to order the keys
// accordingly, i.e. the $list array is included so that it is rearranged too
array_multisort($ff,$so1,$st1,$ss,$so2,$st2,$list,SORT_NUMERIC,SORT_ASC);
return $list;
}
Based on: /home/xmmssc/public_html/xidops/fields_status.txt , last modified September 17 2002 11:00:05 AM