'; $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"; echo '
\n"; if ($cj_id > 0) { $disp = '
'.$txt.'
'; // if ($merchant_id > 0) listMerCoup($merchant_id); } elseif ($gccDisp == 1){ echo 'This page shows a complete list of active online coupons and sales from the select stores listed below followed by a random listing of sales from all over the Internet. You can find more great internet deals on the sales page and deal of the day steals on the loss leader page.
'; } else { echo 'This program lets you browse and search the invetory of select stores affiliated with the Community Color directory project. Click on the item to purchase from the store. Proceeds from sales benefite the Community Color project.
'; } $SID="cbc3923c-fb44-4d0d-aebb-97fe39c6b9e7"; $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; // buffer the ids for the stores to make the linking easeir. if ($btn=='buff') { $str = @file_get_contents($URL); $lastPos = 1; while(($start=strpos($str,'gcsiteid',$lastPos)) !== false) { $start += 9; $lastPos = $start; $lenA = strpos($str,'&',$start) - $start; $gcid = ($lenA > 0)? substr($str,$start,$lenA) : 'error'; $startB = strpos($str,'gccid',$start); if ($startB > 0) { $startB +=6; $lenB = strpos($str,'"',$startB) - $startB; $gcCat = ($lenB > 0)? substr($str,$startB,$lenB) : 'errorB'; } echo 'ID '.$gcid.', cat '.$gcCat.'
'; execSQL('UPDATE Golden_Can SET cat_id = '.$gcCat.' WHERE can_id = '.$gcid,'',''); } } else { include($URL); } if ($can_id == 0) { showCoupons(); } if ($sod == '0000-00-00') { fobFoot('more shopping'); } else { fobFoot('more on '.$store_nm.''); } ?>