Search Results For \"$terms\"\n"; echo "
\n"; //run the standard conception query $result=database_query("SELECT *, MATCH(concept, conception) AGAINST('$terms') AS score FROM ConceptsBeta, Authors WHERE MATCH(concept, conception) AGAINST('$terms') AND Authors.conceptID=ConceptsBeta.id AND status=1 ORDER BY score DESC LIMIT 20"); if($result && mysql_num_rows($result)>=1){ //there are results for a conception search, let's show them echo "
\n"; echo "

Conceptions (" . mysql_num_rows($result) . ")

\n"; while($myrow=mysql_fetch_row($result)){ //print_r($myrow); $CONCEPT_ID_ARRAY[]=$myrow[0]; $concept=ucwords($myrow[1]); $fullText=$myrow[2]; if(strlen($myrow[2])>200){ $myrow[2]=substr(strip_tags($myrow[2]),0,200); $myrow[2]=trim($myrow[2]); $myrow[2].="..."; } $searchResultItem=stripslashes("$concept ($myrow[5]): $myrow[2]\n"); //now we generate the code for the pop up boxes echo "

"; echo " $searchResultItem

\n"; echo "
\n"; echo "

\n"; echo stripslashes("Author: $myrow[9]
\n"); echo stripslashes("Year: $myrow[5]
\n"); echo "

\n"; echo stripslashes("Conception: $fullText
\n"); echo "

\n\n\n"; } echo "
\n"; } //OLD PLACE FOR RIGHT SIDE COLUMN //run an author search $result=database_query("SELECT ConceptsBeta.id, ConceptsBeta.concept, ConceptsBeta.conception, ConceptsBeta.year, Authors.name, ConceptsBeta.status, MATCH(Authors.name) AGAINST('$terms') AS score FROM Authors, ConceptsBeta WHERE MATCH(Authors.name) AGAINST('$terms') AND Authors.conceptID=ConceptsBeta.id AND ConceptsBeta.status=1 ORDER BY score DESC LIMIT 20"); if($result && mysql_num_rows($result)>=1){ //there are results for a conception search, let's show them echo "
\n"; echo "

Authors (" . mysql_num_rows($result) . ")

\n"; while($myrow=mysql_fetch_row($result)){ $CONCEPT_ID_ARRAY[]=$myrow[0]; $concept=ucwords($myrow[1]); $fullText=$myrow[2]; if(strlen($myrow[2])>200){ $myrow[2]=substr(strip_tags($myrow[2]),0,200); $myrow[2]=trim($myrow[2]); $myrow[2].="..."; } $searchResultItem=stripslashes("$concept ($myrow[3], $myrow[4]): $myrow[2]\n"); //now we generate the code for the pop up boxes echo "

"; echo " $searchResultItem \n"; echo "

\n"; echo "

\n"; echo stripslashes("Author: $myrow[4]
\n"); echo stripslashes("Year: $myrow[3]
\n"); echo "

\n"; echo stripslashes("Conception: $fullText
\n"); echo "

\n\n\n"; } echo "
\n"; } //run a keyword search $result=database_query("SELECT ConceptsBeta.id, ConceptsBeta.concept, ConceptsBeta.conception, ConceptsBeta.year, Keywords.keyword, ConceptsBeta.status, MATCH(Keywords.keyword) AGAINST('$terms') AS score FROM Keywords, ConceptsBeta WHERE MATCH(Keywords.keyword) AGAINST('$terms') AND Keywords.conceptID=ConceptsBeta.id AND ConceptsBeta.status=1 ORDER BY score DESC LIMIT 20"); if($result && mysql_num_rows($result)>=1){ //there are results for a conception search, let's show them echo "
\n"; echo "

Embedded Concepts (" . mysql_num_rows($result) . ")

\n"; while($myrow=mysql_fetch_row($result)){ $CONCEPT_ID_ARRAY[]=$myrow[0]; $concept=ucwords($myrow[1]); $fullText=$myrow[2]; if(strlen($myrow[2])>200){ $myrow[2]=substr(strip_tags($myrow[2]),0,200); $myrow[2]=trim($myrow[2]); $myrow[2].="..."; } $searchResultItem=stripslashes("$concept ($myrow[3], $myrow[4]): $myrow[2]\n"); //now we generate the code for the pop up boxes echo "

"; echo " $searchResultItem \n"; echo "

\n"; echo "

\n"; echo stripslashes("Year: $myrow[3]
\n"); echo "

\n"; echo stripslashes("Conception: $fullText
\n"); echo "

\n\n\n"; } echo "
\n"; } //run a citation search $result=database_query("SELECT ConceptsBeta.id, ConceptsBeta.concept, ConceptsBeta.conception, ConceptsBeta.year, Citations.citation, ConceptsBeta.id, ConceptsBeta.status, MATCH(Citations.citation) AGAINST('$terms') AS score FROM Citations, ConceptsBeta WHERE MATCH(Citations.citations) AGAINST('$terms') AND Citations.conceptID=ConceptsBeta.id AND ConceptsBeta.status=1 ORDER BY score DESC LIMIT 20"); if($result && mysql_num_rows($result)>=1){ //there are results for a conception search, let's show them echo "
\n"; echo "

Citations (" . mysql_num_rows($result) . ")

\n"; while($myrow=mysql_fetch_row($result)){ $CONCEPT_ID_ARRAY[]=$myrow[0]; $concept=ucwords($myrow[1]); $fullText=$myrow[2]; $searchResultItem=stripslashes("$concept ($myrow[3]). This entry cites: $myrow[4]\n"); //now we generate the code for the pop up boxes echo "

"; echo " $searchResultItem \n"; echo "

\n"; echo "

\n"; echo stripslashes("Year: $myrow[3]
\n"); echo stripslashes("Citation: $myrow[4]
\n"); echo "

\n"; echo stripslashes("Conception: $fullText
\n"); echo "

\n\n\n"; } echo "
\n"; } //run a notes search $result=database_query("SELECT *, MATCH(notes) AGAINST('$terms') AS score FROM ConceptsBeta WHERE MATCH(notes) AGAINST('$terms') AND status=1 ORDER BY score DESC LIMIT 20"); if($result && mysql_num_rows($result)>=1){ //there are results for a conception search, let's show them echo "
\n"; echo "

Notes (" . mysql_num_rows($result) . ")

\n"; while($myrow=mysql_fetch_row($result)){ $CONCEPT_ID_ARRAY[]=$myrow[0]; $concept=ucwords($myrow[1]); $fullText=$myrow[2]; if(strlen($myrow[2])>200){ $myrow[2]=substr(strip_tags($myrow[2]),0,200); $myrow[2]=trim($myrow[2]); $myrow[2].="..."; } $searchResultItem=stripslashes("$concept: $myrow[2]\n"); //now we generate the code for the pop up boxes echo "

"; echo " $searchResultItem \n"; echo "

\n"; echo "

\n"; echo stripslashes("Year: $myrow[5]
\n"); echo "

\n"; echo stripslashes("Conception: $fullText
\n"); echo "

\n\n\n"; } echo "
\n"; } //run a year search $result=database_query("SELECT * FROM ConceptsBeta WHERE (year='%$terms%' OR year LIKE '%$terms%') AND status=1 ORDER BY Concept ASC"); if($result && mysql_num_rows($result)>=1){ //there are results for a conception search, let's show them echo "
\n"; echo "

Year (" . mysql_num_rows($result) . ")

\n"; while($myrow=mysql_fetch_row($result)){ $CONCEPT_ID_ARRAY[]=$myrow[0]; $concept=ucwords($myrow[1]); $fullText=$myrow[2]; if(strlen($myrow[2])>200){ $myrow[2]=substr(strip_tags($myrow[2]),0,200); $myrow[2]=trim($myrow[2]); $myrow[2].="..."; } $searchResultItem=stripslashes("$concept ($myrow[5]): $myrow[2]\n"); //now we generate the code for the pop up boxes echo "

"; echo " $searchResultItem \n"; echo "

\n"; echo "

\n"; echo stripslashes("Year: $myrow[5]
\n"); echo "

\n"; echo stripslashes("Conception: $fullText
\n"); echo "

\n\n\n"; } echo "
\n"; } } else{ //there was a problem echo "

Search Failure

\n"; echo "

There was a problem: $ERROR_MESSAGE

\n"; } echo "
\n"; displaySimpleSearchBox("center", "Perform a New Search"); echo "
\n"; echo "
\n"; //this is the right column of the search results layout echo "
\n"; echo "
\n"; //CHECK TO SEE IF THERE ARE PICTURES echo "

Multimedia Results

\n"; $result=database_query("SELECT *, MATCH(g_description, g_keywords, g_summary, g_title) AGAINST('$terms') AS score FROM g2_Item WHERE MATCH(g_description, g_keywords, g_summary, g_title) AGAINST('$terms') ORDER BY score DESC LIMIT 20", 5); if(mysql_num_rows($result)>=1){ while($myrow=mysql_fetch_row($result)){ if($myrow[1]==0){ //it's an image echo "


$myrow[7]
$myrow[6]

\n"; } else{ //it's a gallery //for now, don't show it } } } else{ //there are no multimedia items for this topic echo "

There are no multimedia items matching your search.

\n"; } echo "

 

\n"; //now it's time to generate the master bibliography list $CONCEPT_ID_ARRAY=array_unique($CONCEPT_ID_ARRAY); if(count($CONCEPT_ID_ARRAY)>=1){ $conceptIDList=implode(",", $CONCEPT_ID_ARRAY); //this is the right column of the search results layout echo "

Bibliography

\n"; echo "

View a bibliography of all these search results

\n"; } echo "

 

\n"; //CHECK TO SEE IF THERE IS A WIKIPEDIA ENTRY $wikiSearchURL="http://en.wikipedia.org/w/index.php?title=Special:Search&search=" . $wikiTerms; echo "

Wikipedia Search

\n"; echo "

\"Do

\n"; echo "
\n"; echo "
\n"; include($_SERVER['DOCUMENT_ROOT'] . "/template/footer.php"); ?>