function htmldecode($encoded) {
return strtr($encoded,array_flip(get_html_translation_table(HTML_ENTITIES)));
}
$link = mysql_connect("mysql3.ezhostingserver.com", "evildj", "pbhell");
mysql_select_db("myhnt4b054");
if (isset($_GET[id])) {
$id = $_GET["id"];
if ($id == 11 || $id == 88 || $id == 92 || $id == 94 || $id == 126 || $id == 128|| ($id >= 57 && $id <= 61)) {
$header_graphic = "
";
} else {
$header_graphic = "
";
}
$max_display = 10;
$start = (empty($_GET["start"])) ? 0 : $_GET["start"];
$query1 = "SELECT ID FROM products_new WHERE subcat = '$id' OR subcat LIKE '$id,%' OR subcat LIKE '%,$id' OR subcat LIKE '%,$id,%'";
$query2 = "SELECT * FROM products_new WHERE subcat = '$id' OR subcat LIKE '$id,%' OR subcat LIKE '%,$id' OR subcat LIKE '%,$id,%'";
if (is_array($_POST["boot_size"]) && !empty($_POST["boot_size"][0])) {
$size_query = " AND (";
$or = "";
foreach ($_POST["boot_size"] AS $this_size) {
$size_query .= $or . "sizes LIKE '%$this_size%'";
$or = " OR ";
}
$size_query .= ")";
}
$limit_query .= " ORDER BY ID DESC LIMIT $start, $max_display";
$query1 .= $size_query;
$result = mysql_query($query1);
$num_records = mysql_num_rows($result);
if (!$num_records) {
header("Location:custom_requests.php");
exit;
}
if ($num_records > $max_display) {
$z = 1;
for ($x = 0; $x < $num_records; $x += $max_display) {
if ($x == $start) {
$pages .= "
";
} else {
$pages .= "
";
}
$z++;
}
if ($start + $max_display < $num_records) {
$next = "
";
}
if ($start - $max_display >= 0) {
$prev = "
";
}
$links = $prev . $pages . $next;
}
$query2 .= $size_query . $limit_query;
$result = mysql_query($query2);
$rows = mysql_num_rows($result);
if ($rows) {
$q = "SELECT * FROM subcategories WHERE ID = $id";
$result3 = mysql_query($q);
$line3 = mysql_fetch_array($result3, MYSQL_ASSOC);
$cat = $line3["cat"];
$subcat_title = $line3["subcat"];
$q = "SELECT * FROM categories WHERE ID = $cat";
$result3 = mysql_query($q);
$line3 = mysql_fetch_array($result3, MYSQL_ASSOC);
$cat_title = $line3["category"];
$page_header = "You are viewing $cat_title - $subcat_title";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$photo_list = (empty($line["photo"])) ? "" : $line["photo"];
if (!empty($photo_list)) $photo_arr = explode(",", $photo_list);
if (!is_array($photo_arr)) {
$photos = " ";
} else {
$photos = "
";
$x = 1;
foreach($photo_arr AS $photo) {
if ($x == 4) $photos .= "
";
//$width = ($_GET[id] == 92) ? "500" : "175";
$photos .= "" .
" | ";
$x++;
}
$photos .= "
";
}
$listings .= "| " .
"$line[title] |
" .
"| $photos " .
htmldecode(nl2br($line[description])) . " |
";
}
} else {
$listings = "| No Matching Listings - Please Call for Availability |
";
}
}
if ($_GET[id] >= 28 && $_GET[id] <= 30) {
$query = "SELECT * FROM boot_sizes";
$result = mysql_query($query);
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$sizes[] = "$line[code]^$line[size]";
}
function boot_sizes($size_ids) {
global $sizes;
$selected = (!is_array($size_ids)) ? " selected" : "";
$size_str = (!is_array($size_ids)) ? "" : implode(",", $size_ids);
$size_options = "\n";
return $size_options;
}
}
?>
:: Welcome to Falconhead - Boots - Belts - Buckles ::
 |
if ($_GET[id] == 58) {
print " ";
} else if ($_GET[id] == 59) {
print "
 | " .
" | " .
" | " .
" | " .
" | " .
" | " .
" | " .
" | " .
" | " .
" | " .
" | " .
" | ";
}
?>
|
if ($_GET[id] >= 28 && $_GET[id] <= 30) { ?>
| | |