SearchIndex = $_GET['SearchIndex']; if( $_GET['Operation'] ){ if($_GET['Operation'] == "CustomerReviews"){ $myOperation = $_GET['Operation']; $_GET['Operation'] = "ItemLookup"; $aws->ReviewPage = $_GET['ReviewPage']; } $aws->Operation = $_GET['Operation']; } if( $_GET['Sort'] ){ $aws->Sort = $_GET['Sort']; } if( $_GET['BrowseNode'] ){ $aws->BrowseNode = $_GET['BrowseNode']; } if( $_GET['ItemId'] ){ $aws->ItemId = $_GET['ItemId']; } if( $_GET['Title'] ){ $aws->Title = $_GET['Title']; $search = 1; } if( $_GET['Actor'] ){ $aws->Actor = $_GET['Actor']; $search = 1; } if( $_GET['Director'] ){ $aws->Director = $_GET['Director']; $search = 1; } if( $_GET['Manufacturer'] ){ $aws->Manufacturer = $_GET['Manufacturer']; $search = 1; } if( $_GET['Keywords'] ){ $aws->Keywords = urlencode($_GET['Keywords']); $search = 1; } if( $_GET['ItemPage'] ){ $aws->ItemPage = $_GET['ItemPage']; }else{ $aws->ItemPage = 1; } if(!$curPage)$curPage=1; switch ($aws->Operation){ case 'ItemSearch': case 'SimilarityLookup': $aws->ResponseGroup = $aws->ResponseGroup_Products; break; case "CustomerReviews": $aws->ResponseGroup = $aws->ResponseGroup_Reviews; break; case "Image": $aws->ResponseGroup = $aws->ResponseGroup_Image; break; case "ItemLookup": if($myOperation == "CustomerReviews"){ $aws->ResponseGroup = $aws->ResponseGroup_Reviews; }else{ $aws->ResponseGroup = $aws->ResponseGroup_Item; } break; default: break; } if( $aws->BrowseNode || $aws->ItemId || $search ){ $aws->fetch(); switch ($aws->Operation){ case "ItemSearch": include("browsepage.php"); $incpage = "browsepage"; break; case "CustomerReviews": $aws->Operation = "ItemLookup"; include("reviewpage.php"); $incpage = "reviewpage"; break; case "ItemLookup": if($myOperation == "CustomerReviews"){ include("reviewpage.php"); $incpage = "reviewpage"; }else{ include("productpage.php"); $incpage = "productpage"; } break; default: break; } }else{ // default page include("catpage.php"); $incpage = "catpage"; } }else{ // default page $Operation = "ItemSearch"; $SearchIndex = "Apparel"; include("defaultpage.php"); $incpage = "defaultpage"; } $outputbuf = ob_get_contents(); ob_end_clean(); include("header.php"); // echo "
".$incpage."
"; echo "Operation: ".$aws->Operation."
"; echo "SearchIndex: ".$aws->SearchIndex."
"; echo "Keywords: ".$aws->Keywords."
"; echo "
"; echo $outputbuf; include("footer.php"); ?>