0)? 0 : 1; } else { $gDisp = 0; $can_id = 0; } $btn = (isset($_REQUEST['btn']))? $_REQUEST['btn'] : ''; include('fob.php'); // function shows coupons function showCoupons() { echo '

Random Sales

'; if ($category_id=='') $category_id=1; $tags = ''; $cnt=0; $mainSection = true; $ips = split ("\.", $_SERVER['REMOTE_ADDR']); $ipTag = sprintf("%02x%02x%02x%02x",$ips[0],$ips[1],$ips[2],$ips[3]); echo '

'; $sql="SELECT l.fob_id, l.merchant_id, l.fob_nm, s.width_no, s.height_no, s.align_cd, l.img_url, l.link_url, l.tag_url, l.display_txt, l.html, date_format(l.end_dt,'%m/%e/%Y') end_dt, info_tag, l.weight, l.cj_id FROM FOB_Listing l LEFT JOIN Ad_Size s ON l.size_id = s.size_id WHERE l.category_id = $category_id and l.active_yn = 'Y' and l.start_dt <= curdate() and l.end_dt >= now() and l.size_id = s.size_id ORDER BY l.weight DESC"; if ($result=mysql_query($sql)) { while ($row=mysql_fetch_row($result)) { list($fob_id, $merchant_id, $fob_nm, $width_no, $height_no, $align_cd, $img_url, $link_url, $tag_url, $display_txt, $html, $end_dt, $info_tag, $weight, $cj_id, $can_id, $store_nm) = $row; $endStr = ($end_dt=="" or substr($end_dt,0,2) == '00')? '' : ' [ends '.$end_dt.']'; $endStr .= ($weight==1)? "\n" : "

\n"; $infoTag =($info_tag==1) ? $ipTag : ''; if ($weight == 1) { if ($mainSection) { $mainSection = false; echo "

Text Ads

\n\n"; echo $tags; } if ($can_id > 0) { list($merchant_id, $cat_id, $sod, $store_nm, $top_ad, $txt) = sqlRow('SELECT merchant_id, cat_id, sod_dt, store_nm, top_ad, html_txt FROM Golden_Can WHERE can_id = '.$can_id); $titleStr = $store_nm; fobHead(-2,'index','A Fountain of Bargains - '.$titleStr,'','', false, true); $storeStr = ($cat_id > 0)? ' (browse products)' : ''; if ($top_ad != '') echo '
'.$top_ad.'
'; echo '

'.$store_nm.'

'; echo '

'.$txt.$storeStr.'

'; } elseif ($gDisp == 1) { fobHead(-2,'index','A Fountain of Bargains - Coupons','','', false, true); echo '

a Fountain of Bargains - Coupons and Sales

'; echo '

The block below lists coupons and sales for select merchants followed by a free form list of sales from around the Internet.

'; } else { $store_nm = 'Index'; $sod = '0000-00-00'; fobHead(-2,'index','A Fountain of Bargains - '.Home,'','',true); echo showBlob(35); } $SID="73e72da7-bf45-4113-9ba0-7c9a57545f94"; $IPAddress = urlencode($_SERVER['REMOTE_ADDR']); $UserAgent = urlencode($_SERVER['HTTP_USER_AGENT']); $Host=urlencode($_SERVER['HTTP_HOST']); $PageURL=urlencode($_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']); $URL="http://si.goldencan.com/GetData.aspx?ver=2.0&SID=".$SID; $URL=$URL.'&Host='.$Host; $URL = $URL.'&PageURL='.$PageURL; $URL = $URL.'&IPAddress='.$IPAddress; $URL = $URL.'&UserAgent='.$UserAgent; include($URL); if ($gDisp == 1) { showCoupons(); fobFoot('more online shopping ...'); } else { if ($sod == '0000-00-00') { fobFoot('more online shopping ...'); } else { fobFoot('more on '.$store_nm.''); } } ?>