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])) {
$max_display = 15;
$start = (empty($_GET[start])) ? 0 : $_GET[start];
$id = $_GET[id];
$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 (isset($_POST[boot_size]) || isset($_GET[boot_size])) {
$size_query = " AND (";
$this_size = (isset($_POST[boot_size])) ? $_POST[boot_size] : $_GET[boot_size];
$size_query .= "sizes LIKE '%$this_size%'";
$size_query .= ")";
}
$size_qstring = (isset($this_size)) ? "&boot_size=$this_size" : "";
$limit_query .= " 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;
}
$order_query = " ORDER BY ID DESC";
$query2 .= $size_query . $order_query . $limit_query;
$result = mysql_query($query2);
$rows = mysql_num_rows($result);
if ($rows) {
$q = "SELECT * FROM subcategories WHERE ID = $_GET[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)) {
$img = (empty($line[photo])) ? " " :
$photo_list = (empty($line[photo])) ? " " : $line[photo];
if (!empty($photo_list)) $photo_arr = explode(",", $photo_list);
if (!is_array($photo_arr)) {
$img = " ";
} else {
$photo_links = "";
if (sizeof($photo_arr) > 1) {
$x = 1;
foreach($photo_arr AS $photo) {
$photo_links .= " $x ";
$x++;
}
$photo_links .= "
";
}
$img = "" .
"
$photo_links" .
"
";
}
$listings .= "
| " .
"$line[title] |
" .
" " .
htmldecode(nl2br($line[description])) . " ";
if ($_GET[id] != 89) {
$listings .= "";
}
$listings .= " | $img |
";
}
} 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] >= 28 && $_GET[id] <= 30) { ?>
| | |