$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 .= $style_query . $option_query . $color_query . $size_query . $order_query . $limit_query; $result = mysql_query($query2); $rows = mysql_num_rows($result); if ($rows) { while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $img = ""; if (!empty($line[photo])) { $img = ""; $img_arr = explode(",", $line[photo]); foreach($img_arr as $image) { $img .= ""; } $img .= "
" . "
" . "
"; } $listings .= "" . "$line[title]" . "
" . htmldecode(nl2br($line[description])) . "

Available Sizes: $line[sizes]
" . "" . "$img"; } } else { $listings = "No Matching Listings - Please Call for Availability"; } } $query = "SELECT * FROM belt_styles ORDER BY rank"; $result = mysql_query($query); while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $styles[] = "$line[ID]^$line[style]"; } $query = "SELECT * FROM belt_options"; $result = mysql_query($query); while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $options[] = "$line[ID]^$line[option]"; } $query = "SELECT * FROM colors"; $result = mysql_query($query); while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $colors[] = "$line[code]^$line[color]"; } function belt_colors($ex_color_code) { global $colors, $belt_size; $color_options = "\n"; return $color_options; } function belt_styles($style_id) { global $styles, $belt_size; $style_options = "\n"; return $style_options; } function belt_options($option_id) { global $options, $belt_size; $options_options = "\n"; return $options_options; } function belt_sizes($size_id) { $size_options = "\n"; return $size_options; } ?> :: Welcome to Falconhead - Boots - Belts - Buckles ::
Return to Home Page