video_details as $row) { $tags = $row->tags; } // no tags on the video, so we can't display matching ebay listings if (empty($tags)) { $qry = 'dvd'; } else { //$tagArray = explode(' ',$tags); //$qry = $tagArray[0]; $qry = '(' . str_replace(' ',',',$tags) . ')'; } if (!$_GET['Order']) { $orderBy = 'MetaEndSort'; } else { $orderBy = $_GET["Order"]; } if (!$_GET['ItemTypeFilter']) { $itemTypeFilter = '3'; } else { $itemTypeFilter = $_GET["ItemTypeFilter"]; } if (!$_GET['HighestPrice']) { $highestPrice = 0; } else { $highestPrice = $_GET["HighestPrice"]; } if (!$_GET['SearchInDescription']) { $searchInDescription = 0; } else { $searchInDescription = $_GET["SearchInDescription"]; } if (!$_GET['AuctionsWithNoBids']) { $auctionsWithNoBids = 0; } else { $auctionsWithNoBids = $_GET["AuctionsWithNoBids"]; } if (!$_GET['page']) { $page = 1; $skip = 0; } else { $page = $_GET['page']; $skip = ($page*$maxResults); } $currentTimePlus5Mins = (time() + (10 * 60) - 7200); $currentTimePlus3Days = (time() + (3 * 86400) - 3600); $endTimeFrom = date("Y-m-d%20H:i:s",$currentTimePlus5Mins); $endTimeTo = date("Y-m-d%20H:i:s",$currentTimePlus3Days); $buffer = ebayRestCall($qry, $maxResults, $siteId, $skip, $category, $orderBy, $itemTypeFilter, $highestPrice, $endTimeFrom, $endTimeTo, $searchInDescription, $sid ); $timeDifference = (6*3600); } } ?> PaginationResult->TotalNumberOfEntries; $start = (($page-1)*$totaldisplay); $end = $totalDisplay; $auctionsWithNoBidsCount = 0; // no ebay auctions for listed tag, so show default ebay listings. if ($count < 1) { $qry = 'dvd'; if (!$_GET['Order']) { $orderBy = 'MetaEndSort'; } else { $orderBy = $_GET["Order"]; } if (!$_GET['ItemTypeFilter']) { $itemTypeFilter = '3'; } else { $itemTypeFilter = $_GET["ItemTypeFilter"]; } if (!$_GET['HighestPrice']) { $highestPrice = 0; } else { $highestPrice = $_GET["HighestPrice"]; } if (!$_GET['SearchInDescription']) { $searchInDescription = 0; } else { $searchInDescription = $_GET["SearchInDescription"]; } if (!$_GET['AuctionsWithNoBids']) { $auctionsWithNoBids = 0; } else { $auctionsWithNoBids = $_GET["AuctionsWithNoBids"]; } if (!$_GET['page']) { $page = 1; $skip = 0; } else { $page = $_GET['page']; $skip = ($page*$maxResults); } $currentTimePlus5Mins = (time() + (10 * 60) - 7200); $currentTimePlus3Days = (time() + (3 * 86400) - 3600); $endTimeFrom = date("Y-m-d%20H:i:s",$currentTimePlus5Mins); $endTimeTo = date("Y-m-d%20H:i:s",$currentTimePlus3Days); $buffer = ebayRestCall($qry, $maxResults, $siteId, $skip, $category, $orderBy, $itemTypeFilter, $highestPrice, $endTimeFrom, $endTimeTo, $searchInDescription, $sid ); $timeDifference = (6*3600); if (!empty($buffer)) { $xml = simplexml_load_string($buffer); $totaldisplay = $maxResults; $count = $xml->PaginationResult->TotalNumberOfEntries; $start = (($page-1)*$totaldisplay); $end = $totalDisplay; $auctionsWithNoBidsCount = 0; } } ?>
powered by AffiliateCompare.co.uk