header('Content-type: text/javascript'); #header("Expires: " . gmdate("D, d M Y H:i:s", time()+86400) . " GMT"); $da = getdate(); $x = mktime (0, 0, 0, $da['mon'], $da['mday'], $da['year']); #header("Last-Modified: " . gmdate("D, d M Y H:i:s", $x) . " GMT"); ?> //fix for sub + loc flipers_run = 0; //Vars var n, v, abuf, sbuf, x; var shopsdb = Array( //Mode if (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'trade')) { $mode = 2; } else { //default = shop (1) $mode = 1; } //DB Settings $db_server = '213.171.193.145'; $db_user = 'AlchemyUSR1'; $db_pwd = 'hoodoo413'; $db_name = 'AlchemyDB1'; //Fetch Data $db_link = @mysql_connect($db_server, $db_user, $db_pwd) or exit('Could not connect: ' ); //. mysql_error()); $db = @mysql_select_db($db_name, $db_link) or exit('Could not select database: ' ); //. mysql_error()); $sql_str = "SELECT tocs_shop_emp.* FROM tocs_shop_emp WHERE (show_state = 1 AND (show_type & $mode) = $mode)"; $results = mysql_query($sql_str); //Display while ($row = mysql_fetch_assoc($results)) { ?> "", "", "", " - ", "", " if ($row['filter_on']==1) { echo '-on-';} ?> if ($row['filter_ad'] > 0) { echo '-ad-';} ?> if ($row['filter_ap']==1) { echo '-ap-';} ?>", "", " if ($row['website'] != '') { echo 'http://www.oldcuriosityshop.net/shop/se_res_jump.php?id=' . addslashes($row['id']); } ?>", } mysql_close($db_link); ?>''); var reclen; reclen = 8; var noshops; noshops = Math.floor(shopsdb.length / reclen); var shoporder; shoporder = Array(noshops); for (x=0; x < shoporder.length; x++) { shoporder[x] = x; } var fad, fon, fap, floc, fsub; fad = 0; fon = 0; fap = 0; floc = '' fsub = ''; back_url = ''; //Query String (Form data (only use GET requests)) sbuf = String(self.location.search); sbuf = sbuf.substring(1,999); abuf = sbuf.split('&'); for (x=0; x < abuf.length; x++) { sbuf = abuf[x].split("="); n = String(unescape("" + sbuf[0])); n = n.toLowerCase(); if (sbuf.length > 1) { v = String(unescape(sbuf[1])); v = v.replace(/\+/, " "); } else { v = String(''); } if (n == 'filter') { if (v == 'on') { fon = 1; } else if (v == 'ad') { fad = 1; } else if (v == 'ap') { fap = 1; } } else if (n == 'loc') { floc = v; } else if (n == 'sub') { fsub = v; } else if (n == 'back_url') { back_url = v; } } /************************************************************************ * * ************************************************************************ ************************************************************************/ //Flippers function flipers() { var x; if (back_url != '') { document.form1.back_url.value = back_url; } if (document.form1.loc) { for(x=0; x < document.form1.loc.length; x++) { if (document.form1.loc.options[x].value == floc) { document.form1.loc.selectedIndex = x; break; } } } if (document.form1.sub) { for(x=0; x < document.form1.sub.length; x++) { if (document.form1.sub.options[x].value == fsub) { document.form1.sub.selectedIndex = x; break; } } } if (self.location.search != "") { if (document.form1.filter) { for(x=0; x < document.form1.filter.length; x++) { if (document.form1.filter[x].value == 'on') { document.form1.filter[x].checked = (fon == 1); } else if (document.form1.filter[x].value == 'ad') { document.form1.filter[x].checked = (fad == 1); } else if (document.form1.filter[x].value == 'ap') { document.form1.filter[x].checked = (fap == 1); } } } } window.setTimeout("flipers_run = 1;", 500) } // 0=img, 1=www, 2=.htm, 3=name, 4=loc, 5=fil, 6=subloc, 7=real_web function showshop_x (sn) { var offs; var real_web; offs = sn * reclen; real_web = ((shopsdb[offs + 7]=="") ? ("http://" + shopsdb[offs + 1] + "/") : shopsdb[offs + 7]); document.write('
');
document.writeln('Sorry, no matches found for your region... '); document.writeln(' You can click here to see matches from other areas. '); document.writeln(' Remember however that some of these may have shipping resrictions.'); document.writeln(' |