##########################################################################
## ##
## Build A Niche Store v3.0 epn ##
## ---------------------- ##
## By Build A Niche Store ##
## (http://www.buildanichestore.com) ##
## ##
## "Build A Niche Store" IS NOT a free script. If you got this from ##
## someplace other than BuildANicheStore.com, please contact us as we ##
## do offer rewards for that type of information. ##
## ##
## Thanks! ##
## ##
## ##
## Copyright (c) 2007 BuildANicheStore.com - All Rights Reserved ##
## ##
##########################################################################
if(file_exists("install.php")){
header("Location: install.php");
exit;
}
include('cont/cont.php');
include('cont/Control.php');
include('cont/Pages.php');
include('cont/FrontControl.php');
include('cont/Mysql.php');
//foreach ($_POST as $k=> $val){
//echo $k."==".$val."
";
//}
$d = new DB;
$front = new FRONTCONTROL;
$mc = new CONTROL;
$front->num = $num;
$front->mainCat = $mainCat;
$front->subCat = $subCat;
$front->fsoo = $fsoo;
$front->catname = $catname;
$front->filename = $filename;
$front->sort = $sort;
//$front->q = str_replace("-"," ",$q);
$front->q = str_replace("_"," ",$q);
$front->id = $id;
$front->frontcat = $frontcat;
$front->miles = $miles;
$front->zip = $zip;
//SET MORE GLOBALS
$d->q("SELECT * FROM options");
if($d->nr()){
$d->nx();
define("MAINCAT", $d->fn('main_id'));
define("NAVIGATION", $d->fn('nav'));
define("PAGENAVIGATION", $d->fn('pagenav'));
define("MODE", $d->fn('mode'));
define("CJID", $d->fn('cj_pid'));
define("SITENAME", $d->fn('site_name'));
if($front->minbid == "")($front->minbid = $d->fn('minbid'));
if($front->maxbid == "")($front->maxbid = $d->fn('maxbid'));
if($front->minprice == "")($front->minprice = $d->fn('minprice'));
if($front->maxprice == "")($front->maxprice = $d->fn('maxprice'));
if($front->q == ""){
define("DISPLAY", $d->fn('display'));
} else {
define("DISPLAY", 1);
}
define("CLICKBANK", $d->fn('cb_id'));
define("SORTCONTROL", $d->fn('sort'));
}
$d->q("SELECT * FROM categories WHERE id = '".MAINCAT."'");
if($d->nr()){
$d->nx();
define("CATID", $d->fn('cat_id'));
}
$bincat = $front->getCategorySettings("bin","id='".$front->id."'");
$binmain = $front->getOptionSettings("bin");
if (($binmain == '2')&&($bincat == '0'))($front->bin = '0');
else if (($binmain == '2')&&($bincat == '1'))($front->bin = $binmain);
else if (($binmain == '2')&&($bincat == '2'))($front->bin = $binmain);
else if (($binmain == '0')&&($bincat == '2'))($front->bin = $bincat);
else ($front->bin = '0');
$front->rewrite();
if ($front->getCategorySettings("ppPage","id='".$front->id."'") == ''){ define("PPPAGE", $front->getOptions("ppPage")); } else define("PPPAGE", $front->getCategorySettings("ppPage","id='".$front->id."'"));
//echo "ID:".$front->id."
";
//echo "CATID:".$front->catid."
";
//echo "Catname:".$front->catname."
";
//echo "Content:".$front->content."
";
//echo "Description:".$front->description."
";
//echo "Keywords:".$front->description."
";
//echo "Title:".$front->title."
";
//echo "ParentID:".$front->parentid."
";
//echo "Local:".$front->local."
";
//echo "Miles:".$front->miles."
";
//echo "Zip:".$front->zip."
";
//CHECK TO SEE IF IT IS A FILE
if($mainCat != "" && isset($mainCat) && $subCat == "" && !isset($subCat)){
$checkFile = $front->getPageInfo('id',"file_name='".$mainCat."'");
}elseif($subCat != "" && isset($subCat)){
$checkFile = $front->getPageInfo('id',"file_name='".$subCat."'");
} else {
$checkFile = "";
}
if ($action == 'view'){
$temp = $template; }
else {
$temp = $front->getOptionSettings("template");
}
include "themes/$temp/header.php";
$localcat = $front->getCategorySettings("local","id='".$front->id."'");
$localmain = $front->getOptionSettings("local");
if ($localcat == '')($front->local = $localmain);
if ($localcat == '0')($front->local = $localmain);
else ($front->local = $localcat);
$milescat = $front->getCategorySettings("miles","id='".$front->id."'");
$milesmain = $front->getOptionSettings("miles");
if ($milescat == '')($front->miles = $milesmain);
else ($front->miles = $milescat);
$zipcat = $front->getCategorySettings("zip","id='".$front->id."'");
$zipmain = $front->getOptionSettings("zip");
if ($zipcat == '')($front->zip = $zipmain);
else ($front->zip = $zipcat);
$minbidcat = $front->getCategorySettings("minbid","id='".$front->id."'");
$minbidmain = $front->getOptionSettings("minbid");
if ($minbidcat == '')($front->minbid = $minbidmain);
else ($front->minbid = $minbidcat);
$maxbidcat = $front->getCategorySettings("maxbid","id='".$front->id."'");
$maxbidmain = $front->getOptionSettings("maxbid");
if ($maxbidcat == '')($front->maxbid = $maxbidmain);
else ($front->maxbid = $maxbidcat);
$minpricecat = $front->getCategorySettings("minprice","id='".$front->id."'");
$minpricemain = $front->getOptionSettings("minprice");
if ($minpricecat == '')($front->minprice = $minpricemain);
else ($front->minprice = $minpricecat);
$maxpricecat = $front->getCategorySettings("maxprice","id='".$front->id."'");
$maxpricemain = $front->getOptionSettings("maxprice");
if ($maxpricecat == '')($front->maxprice = $maxpricemain);
else ($front->maxprice = $maxpricecat);
$bincat = $front->getCategorySettings("bin","id='".$front->id."'");
$binmain = $front->getOptionSettings("bin");
if (($binmain == '2')&&($bincat == '0'))($front->bin = '0');
else if (($binmain == '2')&&($bincat == '1'))($front->bin = $binmain);
else if (($binmain == '2')&&($bincat == '2'))($front->bin = $binmain);
else if (($binmain == '0')&&($bincat == '2'))($front->bin = $bincat);
else ($front->bin = '0');
$front->displaynext = $front->getCategorySettings("displaynext","id='".$front->id."'");
$topadscat = $front->getCategorySettings("top_ads","id='".$front->id."'");
$topadsmain = $front->getAdSettings("top_ads");
if ($topadscat == '')($front->top_ads = $topadsmain);
else ($front->top_ads = $topadscat);
$bottomadscat = $front->getCategorySettings("bottom_ads","id='".$front->id."'");
$bottomadsmain = $front->getAdSettings("bottom_ads");
if ($bottomadscat == '')($front->bottom_ads = $bottomadsmain);
else ($front->bottom_ads = $bottomadscat);
if($checkFile != "" && is_numeric($checkFile)){
echo $front->pages($checkFile);
include "themes/$temp/footer.php";
} elseif($subCat != "" && $mainCat !=""){
echo $front->store();
include "themes/$temp/footer.php";
}else {
$f .= '';
if ($front->q != '' && $front->mainCat != '' && $front->mainCat != "search" && $front->query == ""){
$f .= '
'.$front->q.'
'.$front->top_ads.'';
}
elseif ($front->q == '' && $front->mainCat == ''){
$d->q("SELECT * FROM pages WHERE id = '1' ");
if($d->nr()){
$d->nx();
$mc = new CONTROL;
if($mc->logged() == true){
echo 'Edit This Page';
}
if ($d->fn('content') != ''){
$f .= ''.$d->fn('content').''.$front->top_ads.'';
}
else {
$f .= ''.$d->fn('title').'
'.$front->top_ads.'';
}}}
elseif ($front->q != '' && $front->mainCat == ''){
$d->q("SELECT * FROM pages WHERE id = '1' ");
if($d->nr()){
$d->nx();
if($mc->logged() == true){
echo 'Edit This Page';
}
if ($d->fn('content') != ''){
$f .= ''.$d->fn('content').''.$front->top_ads.'';
}
else {
$f .= ''.$d->fn('title').'
'.$front->top_ads.'';
}}}
elseif ($front->q == '' && $advanced == "y"){
$d->q("SELECT * FROM pages WHERE id = '1' ");
if($d->nr()){
$d->nx();
$f .= ''.$front->catname.'
'.$front->top_ads.'';
}}
elseif ($front->q != '' && $advanced == "y"){
$d->q("SELECT * FROM pages WHERE id = '1' ");
if($d->nr()){
$d->nx();
$f .= ''.$front->catname.'
'.$front->top_ads.'';
}
}
elseif ($front->q != '' && $front->mainCat =="search"){
$qcat = $front->getCategorySettings("query","id='".$front->id."'");
if ($qcat != ''){
$f .= ''.$front->catname.'
'.$front->top_ads.'';
}
else if (($qcat != '')&&($front->q != '')){
$f .= ''.ucwords($front->q).'
'.$front->top_ads.'';
}
else {
$f .= ''.ucwords($front->q).'
'.$front->top_ads.'';
}
}
elseif ($front->q == '' && $front->mainCat =="search"){
$d->q("SELECT * FROM pages WHERE id = '1' ");
if($d->nr()){
$d->nx();
$f .= ''.$front->catname.'
'.$front->top_ads.'';
}
}
elseif ($front->q == '' && $front->mainCat =="search" && $advanced == "y"){
$d->q("SELECT * FROM pages WHERE id = '1' ");
if($d->nr()){
$d->nx();
$f .= ''.$d->fn('title').'
'.$front->top_ads.'';
}
}
//DISPLAY
$display = $mc->getControlSettings("display");
//SORT
$sortcat = $front->getCategorySettings("sort","id='".$front->id."'");
$sortmain = $front->getOptionSettings("sort");
if ($sortcat == '')($front->sortcontrol = $sortmain);
else ($front->sortcontrol = $sortcat);
if ($front->sort == ''){
if ($front->sortcontrol == 'Highest'){($front->sort = '3') && ($front->fsoo = '2');}
elseif ($front->sortcontrol == 'Lowest'){($front->sort = '3') && ($front->fsoo = '1');}
elseif ($front->sortcontrol == 'Ending'){($front->sort = '1') && ($front->fsoo = '1');}
elseif ($front->sortcontrol == 'Newly'){($front->sort = '1') && ($front->fsoo = '2');}}
if (DISPLAY != '0' || $advanced == "y"){
$f .= '
| '.$front->logodisplay().' |
|
';
$productlayout = $front->getOptionSettings("productlayout");
if ($productlayout != '4'){
$f .= '
'; }
$displayimage = $front->getOptionSettings('displayimage');
$displaytitle = $front->getOptionSettings('displaytitle');
$displaybids = $front->getOptionSettings('displaybids');
$displayprice = $front->getOptionSettings('displayprice');
$displaytime = $front->getOptionSettings('displaytime');
$displaypaypal = $front->getOptionSettings('displaypaypal');
$siteType = $front->getOptionSettings("store");
$cloak = $front->getOptionSettings("cloak");
$productlayout = $front->getOptionSettings("productlayout");
$front->local = $front->getOptionSettings("local");
$front->miles = $front->getOptionSettings("miles");
$front->zip = $front->getOptionSettings("zip");
if (($mainCat = "search")&&($miles != "")&&($zip != "")){
$front->local = "1";
$front->miles = $miles;
$front->zip = $zip; }
$front->sellerid = $front->getOptionSettings("sellerid");
if($front->minbid == "")($front->minbid = $front->getOptionSettings('minbid'));
if($front->maxbid == "")($front->maxbid = $front->getOptionSettings('maxbid'));
if($front->minprice == "")($front->minprice = $front->getOptionSettings('minprice'));
if($front->maxprice == "")($front->maxprice = $front->getOptionSettings('maxprice'));
if (($mainCat = "search")&&($bin != "")){
$front->bin = $bin; }
if (($mainCat = "search")&&($minprice != "")){
$front->minprice = $minprice; }
if (($mainCat = "search")&&($maxprice != "")){
$front->maxprice = $maxprice; }
if (($mainCat = "search")&&($minbid != "")){
$front->minbid = $minbid; }
if (($mainCat = "search")&&($seller != "")){
$front->sellerid = $seller; }
if (($mainCat = "search")&&($maxbid != "")){
$front->maxbid = $maxbid; }
if ($front->catid == '')($front->catid = CATID);
if ($front->q == ''){
$sid = $front->getCategorySettings("file_name","id='".$front->id."'");
$sid = str_replace("-", "+", $sid);
$front->sid = substr($sid,0,25);
$front->sid = urlencode($front->sid);
if ($front->sid == '')($front->sid = 'Home');
}
if ($front->q != ''){
$cat = $front->getCategorySettings("file_name","id='".$front->id."'");
$cat = str_replace("-", "+", $cat);
$sid = 'Search+'.$cat.'';
$front->sid = str_replace(" ", "+", $sid);
$front->sid = substr($sid,0,25);
$front->sid = urlencode($front->sid);
if ($front->sid == '')($front->sid = 'Home');
}
if($front->sellerid == "")($front->fss = '1'); else $front->fss = '0';
$sitewidequery = $front->getOptionSettings('sitewide_query');
$sitewidecat = $front->getCategorySettings("query","id='".$front->id."'");
if ($sitewidecat != '')($sitewidequery = ''.$sitewidecat.'+');
else ($sitewidequery = ''.$sitewidequery.'+');
if ($num == '')($num = '1');
$frts = ($num*PPPAGE-PPPAGE);
if($siteType == "US"){($siteid = '0&language=en-US') && ($sitenum = 'salic=0');}
if($siteType == "UK"){($siteid = '3&language=en-GB') && ($sitenum = 'salic=3');}
if($siteType == "AU"){($siteid = '15&language=en-AU') && ($sitenum = 'salic=15');}
if($siteType == "CA"){($siteid = '2&language=en-CA') && ($sitenum = 'salic=2');}
if($siteType == "AT"){($siteid = '16&language=de-AT') && ($sitenum = 'salic=16');}
if($siteType == "BE"){($siteid = '123&language=nl-BE') && ($sitenum = 'salic=23');}
if($siteType == "FR"){($siteid = '71&language=fr-FR') && ($sitenum = 'salic=71');}
if($siteType == "NL"){($siteid = '146&language=nl-NL') && ($sitenum = 'salic=146');}
if($siteType == "IT"){($siteid = '101&language=it-IT') && ($sitenum = 'salic=101');}
if($siteType == "ES"){($siteid = '186&language=es-ES') && ($sitenum = 'salic=186');}
if($siteType == "SG"){($siteid = '216') && ($sitenum = 'salic=180');}
if($siteType == "IN"){($siteid = '203&language=en-IN') && ($sitenum = 'salic=95');}
if ($cloak == '1'){
$RSSFEEDS = array(
0 => "http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=".$siteid."&output=RSS20&fss=".$front->fss."&sasl=".$front->sellerid."&sacat=".$front->catid."&ftrt=1&fbd=1&sabdlo=".$front->minbid."&sabdhi=".$front->maxbid."&saprclo=".$front->minprice."&saprchi=".$front->maxprice."&floc=1&saslop=1&fsop=$front->sort&fsoo=$front->fsoo&from=R6&fss=0&sacur=0&afepn=".CJID."&customid=".$front->sid."&saslc=0&fcl=3&saaff=afepn&catref=C5&frpp=100&satitle=".urlencode($front->q)."+".urlencode($sitewidequery)."&ftrv=1&fts=$srchdesc&".$sitenum."&sascs=".$front->bin."&fspt=".$front->local."&fpos=".$front->zip."&sadis=".$front->miles."&frts=$frts",
);
}
else {
$RSSFEEDS = array(
0 => "http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=".$siteid."&output=RSS20&fss=".$front->fss."&sasl=".$front->sellerid."&sacat=".$front->catid."&ftrt=1&fbd=1&sabdlo=".$front->minbid."&sabdhi=".$front->maxbid."&saprclo=".$front->minprice."&saprchi=".$front->maxprice."&floc=1&saslop=1&fsop=$front->sort&fsoo=$front->fsoo&from=R6&fss=0&sacur=0&afepn=".CJID."&customid=".$front->sid."&saslc=0&fcl=3&saaff=afepn&catref=C5&frpp=100&satitle=".urlencode($front->q)."+".urlencode($sitewidequery)."&ftrv=1&fts=$srchdesc&".$sitenum."&sascs=".$front->bin."&fspt=".$front->local."&fpos=".$front->zip."&sadis=".$front->miles."&frts=$frts",
);
}
if (!isset($feedid)) $feedid = 0;
$rss_url = $RSSFEEDS[$feedid];
//echo $rss_url;
// exit;
if(MODE == 0){
$rss_feed = file_get_contents($rss_url);
} elseif(MODE == 1) {
$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $rss_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$rss_feed = curl_exec($ch);
curl_close($ch);
}
include('cont/xml.php');
$xml = xml_get($rss_feed);
$loop_total = count($xml['RSS'][0]['CHANNEL'][0]['ITEM']);
for($n = 0; $n <= $loop_total; $n++) {
$title[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['TITLE'][0]['VALUE'];
$link[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['LINK'][0]['VALUE'];
$description[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['DESCRIPTION'][0]['VALUE'];
$startDate[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['PUBDATE'][0]['VALUE'];
$bids[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:BIDCOUNT'][0]['VALUE'];
$endDate[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:ENDTIME'][0]['VALUE'];
$priceLength = strlen($xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE']);
if($priceLength < 3) {
if($priceLength == 2) {
$xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'] = '0'.$xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'];
}
elseif($priceLength == 1) {
$xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'] = '00'.$xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'];
}
elseif($priceLength == 0) {
$xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'] = '000';
}
}
$prePrice = (double)substr($xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'],0,-2).'.'.substr($xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:CURRENTPRICE'][0]['VALUE'],-2);
$price[$n] = number_format($prePrice, 2, '.', ',');
unset($prePrice);
$buyPrice[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:BUYITNOWPRICE'][0]['VALUE'];
$paypal[$n] = $xml['RSS'][0]['CHANNEL'][0]['ITEM'][$n]['RX:ITEMCHARACTERISTIC'][0]['VALUE'];
}
$rss_feed = str_replace("", "", $rss_feed);
$rss_feed = str_replace("\n", "", $rss_feed);
$rss_feed = str_replace("|", "
", $rss_feed);
$rss_feed = str_replace("&", "&", $rss_feed);
$rss_feed = preg_replace('#(.*?)#i', '', $rss_feed);
$rss_feed = preg_replace('##', '', $rss_feed );
$rss_feed = preg_replace('##i', '', $rss_feed);
$rss_feed = preg_replace('##i', '', $rss_feed);
//preg_match_all('#(.*?)#', $rss_feed, $title, PREG_SET_ORDER);
//preg_match_all('#(.*?)#', $rss_feed, $link, PREG_SET_ORDER);
//preg_match_all('#(.*?)#', $rss_feed, $description, PREG_SET_ORDER);
// preg_match_all('#(.*?)<\/pubDate>#si', $rss_feed, $startDate, PREG_SET_ORDER);
preg_match_all('#
#si', $rss_feed, $img, PREG_SET_ORDER);
/*preg_match_all('#(.*?)<\/rx:BidCount>#si', $rss_feed, $bids, PREG_SET_ORDER);*/
/*preg_match_all('#(.*?)<\/rx:EndTime>#si', $rss_feed, $endDate, PREG_SET_ORDER);*/
/*preg_match_all('#(.*?)#si', $rss_feed, $price, PREG_SET_ORDER);*/
/*preg_match_all('#
Buy It Now for only: (.*?)
#si', $rss_feed, $buyprice, PREG_SET_ORDER);*/
/*preg_match_all('#(.*?)<\/rx:ItemCharacteristic>#si', $rss_feed, $paypal, PREG_SET_ORDER);*/
if(count($title) <= 1)
{$f .= "No products matching your query have been found in our store. Please bookmark this page and come back soon to see if we have what you want.";
} else {
if($page == ""){
$page = 1;
}
$page = 1;
$counter = 0;
$rowclass = 0;
for ($counter; $counter <= (PPPAGE*$page) -1; $counter++ )
{
if(!empty($title[$counter]))
{
$preBuyPrice = (double)substr($buyPrice[$counter],0,-2).'.'.substr($buyPrice[$counter],-2);
$buyPrice[$counter] = number_format($preBuyPrice, 2, '.', ',');
unset($preBuyPrice);
$endtimee = "";
$endtimee = substr($endDate[$counter], 0, 10);
$ndDate = explode("-",date('n-d-Y-H-i-s',$endtimee));
$ndMonth = $ndDate[0];
$ndDay = $ndDate[1];
$ndYear = $ndDate[2];
$ndHours = ($ndDate[3]);
$ndMin = $ndDate[4];
$ndSec = $ndDate[5];
$ndDat = mktime($ndHours,$ndMin,$ndSec,$ndMonth,$ndDay,$ndYear);
$tmstmp = $front->formatetimestamp($ndDat);
$title[$counter] = str_replace("&", "&", $title[$counter]);
$title[$counter] = str_replace("'", "'", $title[$counter]);
$description[$counter] = preg_replace('/(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)[\s]{0,2}(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[-][0-9]{0,2}[-][0-9]{4}\s[0-9]{0,2}[:][0-9]{0,2}[:][0-9]{0,2}\s(PDT|BST|EST|EDT)/',$tmstmp,$description[$counter]);
$description[$counter] = html_entity_decode( $description[$counter][1]);
if(($siteType == "US") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/711-53200-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.com%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AUS%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "UK") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/710-53481-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.co.uk%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AGB%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "CA") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/706-53473-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.ca%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3ACA%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "AU") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/705-53470-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.com.au%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AAU%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "BE") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/1553-53471-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.benl.ebay.be%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3ABE%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "FR") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/709-53476-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.fr%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AFR%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "NL") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/1346-53482-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.nl%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3ANL%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "IT") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/724-53478-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.it%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AIT%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "ES") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/1185-53479-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.es%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AES%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "SG") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/3423-53474-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.com.sg%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3ASG%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if(($siteType == "IN") && ($cloak == "1")){
$front->sid = str_replace("%2B", "+", $front->sid);
$link[$counter] = str_replace("http://rover.ebay.com/rover/1/4686-53472-19255-0/1?", "".URL_PATH."/item/", $link[$counter]);
$link[$counter] = str_replace("&mpre=http%3A%2F%2Fcgi.ebay.in%2F", "", $link[$counter]);
$link[$counter] = str_replace("QQcmdZViewItemQQssPageNameZRSS%3AB%3ASRCH%3AIN%3A101", "", $link[$counter]);
$link[$counter] = str_replace("campid=".CJID."", "", $link[$counter]);
$link[$counter] = str_replace("&customid=".$front->sid."", "", $link[$counter]);
$link[$counter] = str_replace("&toolid=10005", "", $link[$counter]);
}
if ($productlayout == '0') {
$f .= FormatRow($rowclass, $title[$counter],$description[$counter],$link[$counter],$img[$counter][1],$bids[$counter],$price[$counter],$buyPrice[$counter],$tmstmp,$paypal[$counter],$displayimage,$displaytitle,$displaybids,$displayprice,$displaytime,$displaypaypal);
}
if ($productlayout == '1') {
$f .= FormatRow1($rowclass, $title[$counter],$description[$counter],$link[$counter],$img[$counter][1],$bids[$counter],$price[$counter],$buyPrice[$counter],$tmstmp,$paypal[$counter],$displayimage,$displaytitle,$displaybids,$displayprice,$displaytime,$displaypaypal);
}
if ($productlayout == '2') {
$f .= FormatRow2($rowclass, $title[$counter],$description[$counter],$link[$counter],$img[$counter][1],$bids[$counter],$price[$counter],$buyPrice[$counter],$tmstmp,$paypal[$counter],$displayimage,$displaytitle,$displaybids,$displayprice,$displaytime,$displaypaypal);
}
if ($productlayout == '3') {
$f .= FormatRow3($rowclass, $title[$counter],$description[$counter],$link[$counter],$img[$counter][1],$bids[$counter],$price[$counter],$buyPrice[$counter],$tmstmp,$paypal[$counter],$displayimage,$displaytitle,$displaybids,$displayprice,$displaytime,$displaypaypal);
}
if ($productlayout == '4') {
$f .= FormatRow4($rowclass, $title[$counter],$description[$counter],$link[$counter],$img[$counter][1],$bids[$counter],$price[$counter],$buyPrice[$counter],$tmstmp,$paypal[$counter],$displayimage,$displaytitle,$displaybids,$displayprice,$displaytime,$displaypaypal);
}
}
$rowclass = 1 - $rowclass;
}
}
}
//Sun, 01 Apr 2007 23:44:39 PDT
$productlayout = $front->getOptionSettings("productlayout");
if ($productlayout != '4'){
$f .= '
';
}
$pageAmount = $loop_total;
$f .= NavBar($pageAmount,$roCount,$page,$bin,$srchdesc,$maxprice,$minprice,$minbid,$maxbid,$advanced);
//$f .= displaying($pageAmount);
if (DISPLAY != '0' || $advanced == "y"){
if ($front->getOptionSettings('viewmore') == '1') {
$siteType = $front->getOptions("store");
$cloak = $front->getOptions("cloak");
$newwindow = $front->getOptions("newwindow");
if ($newwindow == "1"){
$opennew = 'target="_blank"';
}
$sitewidequery = $front->getOptionSettings('sitewide_query');
$sitewidecat = $front->getCategorySettings("query","id='".$front->id."'");
if ($sitewidecat != '')($front->sitewidequery = ''.$sitewidecat.'+');
else ($front->sitewidequery = ''.$sitewidequery.'+');
$front->sellerid = $front->getCategorySettings("sellerid","id='".$front->id."'");
if ($front->sellerid == '')($front->sellerid = $front->getOptionSettings('sellerid'));
if($siteType == "US"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/711-53200-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.com%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D0%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "UK"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/710-53481-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.co.uk%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D3%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "CA"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/706-53473-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.ca%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D2%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "AU"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/705-53470-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.com.au%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D15%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "BE"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/1553-53471-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.benl.ebay.be%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D180%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "FR"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/709-53476-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.fr%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D71%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "NL"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/1346-53482-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.nl%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D180%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "IT"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/724-53478-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.it%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D101%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "ES"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/1185-53479-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.es%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D180%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "SG"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/3423-53474-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.com.sg%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D180%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
if($siteType == "IN"){
$f .= '';
if ($cloak == '1'){
$url = "http://rover.ebay.com/rover/1/4686-53472-19255-0/1?type=4&campid=".CJID."&toolid=10001&customid=View&mpre=http%3A%2F%2Fsearch.ebay.in%2Fsearch%2Fsearch.dll%3Fsatitle%3D".urlencode($front->sitewidequery)."+".urlencode($front->q)."%26sacat%3D".urlencode($front->catid)."%26ftrt%3D1%26fbd%3D1%26sabdlo%3D".$front->minbid."%26sabdhi%3D".$front->maxbid."%26saprclo%3D".$front->minprice."%26saprchi%3D".$front->maxprice."%26floc%3D1%26saslop%3D1%26fsop%3D".$front->sort."%26fsoo%3D".$front->fsoo."%26fss%3D".$front->fss."%26sasl%3D".$front->sellerid."%26sacur%3D0%26saslc%3D0%26fcl%3D3%26ftrv%3D1%26fts%3D".$front->srchdesc."%26salic%3D95%26sascs%3D".$front->bin."%26fspt%3D".$front->local."%26fpos%3D".$front->zip."%26sadis%3D".$front->miles."";
$url = base64_encode($url);
$f .= "
View more items on eBay";
}
else {
$f .= "
View more items on eBay";
}
$f .= '
';
}
}
$f .=''.$front->bottom_ads.'';
if ($front->q == '' && $front->mainCat == ''){
$f .=''.$front->getCategorySettings("contentbelow","id='".MAINCAT."'").'';
}
}
echo $f;
include "themes/$temp/footer.php";
}
function getCatName($area,$id){
$d = new DB;
$d->q("SELECT $area FROM categories WHERE id='$id'");
if($d->nr()){
$d->nx();
return $d->fn($area);
} else {
return "";
}
}
function FormatRow($rowclass, $title, $description, $link, $img, $bids, $price, $buyprice, $tmstmp, $paypal, $displayimage, $displaytitle, $displaybids, $displayprice, $displaytime, $displaypaypal) {
$d = new DB;
$d->q("Select * FROM options");
$d->nr();
$d->nx();
$siteType = $d->fn('store');
if($siteType == "US")($currency = '$');
if($siteType == "UK")($currency = '£');
if($siteType == "AU")($currency = 'AU $');
if($siteType == "CA")($currency = 'C $');
if($siteType == "IN")($currency = 'Rs. ');
if($siteType == "AT")($currency = 'EUR ');
if($siteType == "BE")($currency = 'EUR ');
if($siteType == "FR")($currency = 'EUR ');
if($siteType == "NL")($currency = 'EUR ');
if($siteType == "IT")($currency = 'EUR ');
if($siteType == "ES")($currency = 'EUR ');
if($siteType == "SG")($currency = 'S$ ');
$temp = $d->fn('template');
$link = str_replace("&", "&", $link);
$title = str_replace("&", "&", $title);
$title = str_replace(",", ", ", $title);
$title = str_replace('/', ' ', $title);
$title = str_replace('"', '"', $title);
$cloak = $d->fn('cloak');
if ($cloak == "1"){
$img = str_replace("http://thumbs.ebaystatic.com", "".URL_PATH."", $img);
}
$newwindow = $d->fn('newwindow');
if ($newwindow == "1"){
$opennew = 'target="_blank"';
}
if (empty($bids))($bids = '-');
if ($buyprice != '0.00')($bin = '
');
if ($paypal == 'Listed with PayPal')($paypal = '
');
if ($paypal == 'Mis en vente avec PayPal')($paypal = '
');
if ($paypal == 'Mit PayPal eingestellt')($paypal = '
');
if ($paypal == 'Aangeboden met PayPal')($paypal = '
');
if ($paypal == 'Puesto a la venta con PayPal')($paypal = '
');
if ($paypal == 'Inserzioni con PayPal')($paypal = '
');
if ($paypal == '')($paypal = ' ');
if ($displayimage == "1") { $imagedisplay = ' | '; }
if ($displaytitle == "1") { $titledisplay = ' | '; }
if ($displaypaypal == "1") { $paypaldisplay = ''.$paypal.' | '; }
if ($displaytime == "1") { $timedisplay = ''.$tmstmp.' | '; }
if ($buyprice == $price) {
if ($displaybids == "1") { $biddisplay = ''.$bin.' | '; }
if ($displayprice == "1") { $pricedisplay = ''.$currency.''.$buyprice.' | '; }
} else {
if (($displaybids == "1") && ($buyprice != '0.00')) { $biddisplay = ''.$bids.' '.$bin.' | ';}
elseif ($displaybids == "1") { $biddisplay = ''.$bids.' | ';}
if (($displayprice == "1") && ($buyprice != '0.00')) { $pricedisplay = ''.$currency.''.$price.' '.$currency.''.$buyprice.' | '; }
elseif ($displayprice == "1") { $pricedisplay = ''.$currency.''.$price.' | '; }}
$f='
'.$imagedisplay.'
'.$titledisplay.'
'.$paypaldisplay.'
'.$biddisplay.'
'.$pricedisplay.'
'.$timedisplay.'
';
return $f;
}
function FormatRow1($rowclass, $title, $description, $link, $img, $bids, $price, $buyprice, $tmstmp, $paypal, $displayimage, $displaytitle, $displaybids, $displayprice, $displaytime, $displaypaypal) {
$d = new DB;
$d->q("Select * FROM options");
$d->nr();
$d->nx();
$siteType = $d->fn('store');
if($siteType == "US")($currency = '$');
if($siteType == "UK")($currency = '£');
if($siteType == "AU")($currency = 'AU $');
if($siteType == "CA")($currency = 'C $');
if($siteType == "IN")($currency = 'Rs. ');
if($siteType == "AT")($currency = 'EUR ');
if($siteType == "BE")($currency = 'EUR ');
if($siteType == "FR")($currency = 'EUR ');
if($siteType == "NL")($currency = 'EUR ');
if($siteType == "IT")($currency = 'EUR ');
if($siteType == "ES")($currency = 'EUR ');
if($siteType == "SG")($currency = 'S$ ');
$temp = $d->fn('template');
$link = str_replace("&", "&", $link);
$title = str_replace("&", "&", $title);
$title = str_replace(",", ", ", $title);
$title = str_replace('/', ' ', $title);
$title = str_replace('"', '"', $title);
$cloak = $d->fn('cloak');
if ($cloak == "1"){
$img = str_replace("http://thumbs.ebaystatic.com", "".URL_PATH."", $img);
}
$newwindow = $d->fn('newwindow');
if ($newwindow == "1"){
$opennew = 'target="_blank"';
}
if (empty($bids))($bids = '0');
if ($buyprice != '0.00')($bin = '
');
if ($paypal == 'Listed with PayPal')($paypal = '
');
if ($paypal == 'Mis en vente avec PayPal')($paypal = '
');
if ($paypal == 'Mit PayPal eingestellt')($paypal = '
');
if ($paypal == 'Aangeboden met PayPal')($paypal = '
');
if ($paypal == 'Puesto a la venta con PayPal')($paypal = '
');
if ($paypal == 'Inserzioni con PayPal')($paypal = '
');
if ($displayimage == "1") { $imagedisplay = ' | '; }
if ($displaytitle == "1") { $titledisplay = ''.$title.''; }
if ($displaypaypal == "1") { $paypaldisplay = ''.$paypal.''; }
if ($displaytime == "1") { $timedisplay = '
Time Left: '.$tmstmp.''; }
if ($buyprice == $price) {
if ($displaybids == "1") { $biddisplay = ''.$bin.''; }
if ($displayprice == "1") { $pricedisplay = '
'.$currency.''.$buyprice.''; }
} else {
if (($displaybids == "1") && ($buyprice != '0.00')) { $biddisplay = ''.$bin.'';}
elseif ($displaybids == "1") { $biddisplay = '('.$bids.' Bids)';}
if (($displayprice == "1") && ($buyprice != '0.00')) { $pricedisplay = '
'.$currency.''.$price.'
'.$currency.''.$buyprice.''; }
elseif ($displayprice == "1") { $pricedisplay = '
'.$currency.''.$price.''; }}
$f='
'.$imagedisplay.'
| '.$titledisplay.'
'.$paypaldisplay.'
'.$pricedisplay.' '.$biddisplay.'
'.$timedisplay.'
|
';
return $f;
}
function FormatRow2($rowclass, $title, $description, $link, $img, $bids, $price, $buyprice, $tmstmp, $paypal, $displayimage, $displaytitle, $displaybids, $displayprice, $displaytime, $displaypaypal) {
$d = new DB;
$d->q("Select * FROM options");
$d->nr();
$d->nx();
$siteType = $d->fn('store');
if($siteType == "US")($currency = '$');
if($siteType == "UK")($currency = '£');
if($siteType == "AU")($currency = 'AU $');
if($siteType == "CA")($currency = 'C $');
if($siteType == "IN")($currency = 'Rs. ');
if($siteType == "AT")($currency = 'EUR ');
if($siteType == "BE")($currency = 'EUR ');
if($siteType == "FR")($currency = 'EUR ');
if($siteType == "NL")($currency = 'EUR ');
if($siteType == "IT")($currency = 'EUR ');
if($siteType == "ES")($currency = 'EUR ');
if($siteType == "SG")($currency = 'S$ ');
$temp = $d->fn('template');
$link = str_replace("&", "&", $link);
$title = str_replace("&", "&", $title);
$title = str_replace(",", ", ", $title);
$title = str_replace('/', ' ', $title);
$title = str_replace('"', '"', $title);
$cloak = $d->fn('cloak');
if ($cloak == "1"){
$img = str_replace("http://thumbs.ebaystatic.com", "".URL_PATH."", $img);
}
$newwindow = $d->fn('newwindow');
if ($newwindow == "1"){
$opennew = 'target="_blank"';
}
if (empty($bids))($bids = '0');
if ($buyprice != '0.00')($bin = '
');
if ($paypal == 'Listed with PayPal')($paypal = '
');
if ($paypal == 'Mis en vente avec PayPal')($paypal = '
');
if ($paypal == 'Mit PayPal eingestellt')($paypal = '
');
if ($paypal == 'Aangeboden met PayPal')($paypal = '
');
if ($paypal == 'Puesto a la venta con PayPal')($paypal = '
');
if ($paypal == 'Inserzioni con PayPal')($paypal = '
');
if ($displaypaypal == "1") { $paypaldisplay = ''.$paypal.''; }
if ($displayimage == "1") { $imagedisplay = ' | '; }
if ($displaytitle == "1") { $titledisplay = '| '.$title.''.$paypaldisplay.' |
'; }
if ($displaytime == "1") { $timedisplay = '
Sale Ends: '.$tmstmp.''; }
if ($buyprice == $price) {
if ($displaybids == "1") { $biddisplay = ''.$bin.''; }
if ($displayprice == "1") { $pricedisplay = 'Buy It Now: '.$currency.''.$buyprice.''; }
} else {
if (($displaybids == "1") && ($buyprice != '0.00')) { $biddisplay = ''.$bin.'';}
elseif ($displaybids == "1") { $biddisplay = '('.$bids.' Bids)';}
if (($displayprice == "1") && ($buyprice != '0.00')) { $pricedisplay = 'Price: '.$currency.''.$price.'
Buy It Now: '.$currency.''.$buyprice.''; }
elseif ($displayprice == "1") { $pricedisplay = 'Price: '.$currency.''.$price.''; }}
$f=''.$titledisplay.'
'.$imagedisplay.'
|
'.$pricedisplay.'
'.$biddisplay.'
'.$timedisplay.'
|
';
return $f;
}
function FormatRow3($rowclass, $title, $description, $link, $img, $bids, $price, $buyprice, $tmstmp, $paypal, $displayimage, $displaytitle, $displaybids, $displayprice, $displaytime, $displaypaypal) {
$d = new DB;
$d->q("Select * FROM options");
$d->nr();
$d->nx();
$siteType = $d->fn('store');
if($siteType == "US")($currency = '$');
if($siteType == "UK")($currency = '£');
if($siteType == "AU")($currency = 'AU $');
if($siteType == "CA")($currency = 'C $');
if($siteType == "IN")($currency = 'Rs. ');
if($siteType == "AT")($currency = 'EUR ');
if($siteType == "BE")($currency = 'EUR ');
if($siteType == "FR")($currency = 'EUR ');
if($siteType == "NL")($currency = 'EUR ');
if($siteType == "IT")($currency = 'EUR ');
if($siteType == "ES")($currency = 'EUR ');
if($siteType == "SG")($currency = 'S$ ');
$temp = $d->fn(template);
$link = str_replace("&", "&", $link);
$title = str_replace("&", "&", $title);
$title = str_replace(",", ", ", $title);
$title = str_replace('/', ' ', $title);
$title = str_replace('"', '"', $title);
$cloak = $d->fn('cloak');
if ($cloak == "1"){
$img = str_replace("http://thumbs.ebaystatic.com", "".URL_PATH."", $img);
}
$newwindow = $d->fn('newwindow');
if ($newwindow == "1"){
$opennew = 'target="_blank"';
}
if ($buyprice != '0.00')($bin = '
');
if ($paypal == 'Listed with PayPal')($paypal = '
');
if ($paypal == 'Mis en vente avec PayPal')($paypal = '
');
if ($paypal == 'Mit PayPal eingestellt')($paypal = '
');
if ($paypal == 'Aangeboden met PayPal')($paypal = '
');
if ($paypal == 'Puesto a la venta con PayPal')($paypal = '
');
if ($paypal == 'Inserzioni con PayPal')($paypal = '
');
if ($paypal == '')($paypal = '
');
if (empty($bids))($bids = '0');
if ($displaypaypal == "1") { $paypaldisplay = ''.$paypal.''; } else { $paypaldisplay = ''; }
if ($displayimage == "1") { $imagedisplay = ''; }
if ($displaytitle == "1") { $titledisplay = ''.$title.' '.$paypaldisplay.'
'; }
if ($displaytime == "1") { $timedisplay = 'Time Left: '.$tmstmp.''; }
if ($buyprice == $price) {
if ($displayprice == "1") { $pricedisplay = 'Buy It Now: '.$currency.''.$buyprice.''; }
} else {
if (($displaybids == "1") && ($buyprice != '0.00')) { $biddisplay = '';} elseif ($displaybids == "1") { $biddisplay = ' ('.$bids.' Bids)';}
if (($displayprice == "1") && ($buyprice != '0.00')) { $pricedisplay = 'Price: '.$currency.''.$price.''.$biddisplay.'
Buy It Now: '.$currency.''.$buyprice.''; }
elseif ($displayprice == "1") { $pricedisplay = 'Price: '.$currency.''.$price.''.$biddisplay.''; }
}
$f='
'.$titledisplay.'
'.$imagedisplay.'
'.$pricedisplay.'
'.$timedisplay.'
';
return $f;
}
function FormatRow4($rowclass, $title, $description, $link, $img, $bids, $price, $buyprice, $tmstmp, $paypal, $displayimage, $displaytitle, $displaybids, $displayprice, $displaytime, $displaypaypal) {
$d = new DB;
$d->q("Select * FROM options");
$d->nr();
$d->nx();
$siteType = $d->fn('store');
if($siteType == "US")($currency = '$');
if($siteType == "UK")($currency = '£');
if($siteType == "AU")($currency = 'AU $');
if($siteType == "CA")($currency = 'C $');
if($siteType == "IN")($currency = 'Rs. ');
if($siteType == "AT")($currency = 'EUR ');
if($siteType == "BE")($currency = 'EUR ');
if($siteType == "FR")($currency = 'EUR ');
if($siteType == "NL")($currency = 'EUR ');
if($siteType == "IT")($currency = 'EUR ');
if($siteType == "ES")($currency = 'EUR ');
if($siteType == "SG")($currency = 'S$ ');
$temp = $d->fn('template');
$link = str_replace("&", "&", $link);
$title = str_replace("&", "&", $title);
$title = str_replace(",", ", ", $title);
$title = str_replace('/', ' ', $title);
$title = str_replace('"', '"', $title);
$cloak = $d->fn('cloak');
if ($cloak == "1"){
$img = str_replace("http://thumbs.ebaystatic.com", "".URL_PATH."", $img);
}
$newwindow = $d->fn('newwindow');
if ($newwindow == "1"){
$opennew = 'target="_blank"';
}
if (empty($bids))($bids = '0');
if ($buyprice != '0.00')($bin = '
');
if ($paypal == 'Listed with PayPal')($paypal = '
');
if ($paypal == 'Mis en vente avec PayPal')($paypal = '
');
if ($paypal == 'Mit PayPal eingestellt')($paypal = '
');
if ($paypal == 'Aangeboden met PayPal')($paypal = '
');
if ($paypal == 'Puesto a la venta con PayPal')($paypal = '
');
if ($paypal == 'Inserzioni con PayPal')($paypal = '
');
if ($displayimage == "1") { $imagedisplay = ' | '; }
if ($displaytitle == "1") { $titledisplay = ''.$title.''; }
if ($displaypaypal == "1") { $paypaldisplay = ''.$paypal.''; }
if ($displaytime == "1") { $timedisplay = '
Time Left: '.$tmstmp.''; }
if ($buyprice == $price) {
$biddisplay = ''.$bin.'';
if ($displayprice == "1") { $pricedisplay = '
'.$currency.''.$buyprice.''; }
} else {
if ($buyprice != '0.00') { $biddisplay = ''.$bin.'';}
elseif ($displaybids == "1") { $biddisplay = '('.$bids.' Bids)';}
if (($displayprice == "1") && ($buyprice != '0.00')) { $pricedisplay = '
'.$currency.''.$price.'
'.$currency.''.$buyprice.''; }
elseif ($displayprice == "1") { $pricedisplay = '
'.$currency.''.$price.''; }}
$f='
'.$imagedisplay.'
| '.$titledisplay.'
'.$paypaldisplay.'
'.$pricedisplay.' '.$biddisplay.'
'.$timedisplay.'
|
';
return $f;
}
function displaying($pageAmount){
global $front,$num;
$fromamount = ($num+1);
$fromamount = ($fromamount*PPPAGE-PPPAGE+1);
if(PPPAGE > $pageAmount) {
$toamount = ($num+1);
$toamount = ($toamount*PPPAGE);
$toamount = ($toamount-PPPAGE+$pageAmount); }
else {
$toamount = ($num+1);
$toamount = ($toamount*PPPAGE);
}
$n .= "Displaying items $fromamount - $toamount";
return $n;
}
function NavBar($pageAmount,$roCount,$page,$bin,$srchdesc,$maxprice,$minprice,$advanced){
global $front,$num,$q,$id,$sort,$fsoo,$seller,$local,$zip,$miles,$advanced,$minbid,$maxbid;
if ($front->displaynext == '1'){
$n = '';
$n .= '';
return $n;
}
}
?>