" "); //CSIP Query to get strand and grade groups corrosponding to map $SGQuery = " "; //CSIP Query to get SVG Map $SVGQ = " FAISALAHMAD "; //These variable checks if the user has selected a map or not $MapList = $_POST['MapList']; $StrandList = $_POST['StrandList']; $GradeList = $_POST['GradeList']; $SVGHeaderFileHandle = fopen("hsHeader.txt","r"); $SVGHeader = fread($SVGHeaderFileHandle, filesize("hsHeader.txt")); fclose($SVGHeaderFileHandle); $SVGFooterFileHandle = fopen("hsFooter.txt","r"); $SVGFooter = fread($SVGFooterFileHandle, filesize("hsFooter.txt")); fclose($SVGFooterFileHandle); $SVGFitMapFileHandle = fopen("fitMap.txt","r"); $SVGFitMap = fread($SVGFitMapFileHandle, filesize("fitMap.txt")); fclose($SVGFitMapFileHandle); #echo $MapList; #echo $StrandList; #echo $GradeList; ?> H-S Center for Astrophysics - Digital Video Library
By AAAS
Benchmarks
Using
Strand Map
By Other
Standards
Relating To
Instruction
Using Any
Criterion
View All
Home
//Inserts appropriate in number at runtime $SGQueryt = str_replace("FAISALAHMAD",$MapList,$SGQuery); //Constructing appropriate format for post request $StrandGradeQuery = array("Query" => $SGQueryt); ?> $SGQueryt); ?> or
$SVGQt); $Results = sendQueryRaw($SVGQuery); $Results = eregi_replace("onload=\"\"","onload=\"fitMap()\"",$Results); $Results = eregi_replace("<\?xml version=\"1.0\"\?>","",$Results); $Results = eregi_replace("","",$Results); $Results = eregi_replace("
$val[$index[$tag][$counter]]['value'],$id => $val[$index[$id][$counter]]['value'])); return $result; } //This function returns query result in XML format function sendQuery($query,$tag) { $http = new Net_HTTP_Client(); $http->addHeader("Host","preview.dlese.org"); $http->Connect( "preview.dlese.org", 80 ) or die( "Connect problem" ); $status = $http->Post( "/smsServer/Query" , $query); $xml_parser = xml_parser_create(); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_parse_into_struct($xml_parser,$http->getBody(),$vals,$index); xml_parser_free($xml_parser); $result = getTag($tag,$vals,$index); $http->Disconnect(); return $result; } //This function returns result in plain text function sendQueryRaw($query) { $http = new Net_HTTP_Client(); $http->addHeader("Host","preview.dlese.org"); $http->Connect( "preview.dlese.org", 80 ) or die( "Connect problem" ); $status = $http->Post( "/smsServer/Query" , $query); $xmlResults = $http->getBody(); $http->Disconnect(); return $xmlResults; } ?>