Example #1
0
*/

<?php 
// First of all get sessionId
if (isset($_GET["searchSessionId"])) {
    $searchSession = Session::navigateTo($sessionId);
    if ($searchSession == null) {
        // print "alert('No ".$_GET["navigateTo"]." session available');";
        $searchSession = Session::getById($sessionId);
    }
} else {
    // keyword & query is set
    // strip # from the query keyword
    // convert ""
    //query =
    $searchSession = Session::getByKeywordAndQuery($sessionId);
}
//$links = Link::getAll($sessionId);
print "searchSessionId='" . $searchSession["_id"] . "';";
?>

// Also setting searchSessionId in parent docuement
//if (parent != null)
if (parent != null)
{
	parent.searchSessionId = '<?php 
print $searchSession["_id"];
?>
';
	parent.query = '<?php 
print $searchSession["query"];