// INFO table
// Begin reading table
$filename = "dropouts.txt";
$fd = fopen ($filename, "r");
$table = fread($fd,filesize ($filename));
fclose ($fd);
// End reading table
$lines = explode("\n", $table); // split into lines
$nobj = count($lines);
// Extract RAs, IDs
$ids = array();
$ras = array();
$decs = array();
$umags = array();
$gmags = array();
$rmags = array();
$imags = array();
foreach ( $lines as $line )
{
$line = explode("\t", $line); // split line into collumns
$ids[] = $line[0];
$ras[] = $line[1];
$decs[] = $line[2];
$umags[] = $line[3];
$gmags[] = $line[4];
$rmags[] = $line[5];
$imags[] = $line[6];
$zmags[] = $line[7];
}
?>
// Sort
$sortFlag = $_POST["sortFlag"];
if ($sortFlag == 0) {
array_multisort($ids, $lines);
}
if ($sortFlag == 1) {
array_multisort($ras, $lines);
}
if ($sortFlag == 2) {
array_multisort($decs, $lines);
}
if ($sortFlag == 3) {
array_multisort($umags, $lines);
}
if ($sortFlag == 4) {
array_multisort($gmags, $lines);
}
if ($sortFlag == 5) {
array_multisort($rmags, $lines);
}
if ($sortFlag == 6) {
array_multisort($imags, $lines);
}
if ($sortFlag == 7) {
array_multisort($zmags, $lines);
}
?>
SDSS High-z Dropout Lenses
|
$counter = 0;
foreach ( $lines as $oneline )
{
if (!empty($oneline))
{
$line = explode("\t", $oneline); // split line into collumns
// Extract parameters
$id = $line[0];
$ra = $line[1];
$dec = $line[2];
$umag = $line[3];
$gmag = $line[4];
$rmag = $line[5];
$imag = $line[6];
$zmag = $line[7];
// Print parameters
// Background color for different collumns
echo "";
echo "";
echo "DROPOUT $id gri ";
echo "";
echo " | ";
echo "DROPOUT $id grz ";
echo "";
echo " | ";
echo "DROPOUT $id riz ";
echo "";
echo " | ";
echo "RA= $ra Dec= $dec ";
echo "$umag $gmag $rmag $imag $zmag";
echo " | ";
" ";
$counter = $counter+1;
}
}
?>
|