= count($TAG_NAME) || $V < 0) redirect('./'); mysql_open(); $tag_set_define = get_tag_set_define(); switch($N) { case 0: if($V >= count($FIND_PRICE)) redirect('./'); $sub_title = $FIND_PRICE[$V][0]; $condition = "(`price` >= {$FIND_PRICE[$V][1]} AND `price` <= {$FIND_PRICE[$V][2]})"; break; case 4: if($V >= count($FIND_WEIGHT)) redirect('./'); $sub_title = $FIND_WEIGHT[$V][0]; $condition = "(`total_weight` >= {$FIND_WEIGHT[$V][1]} AND `total_weight` <= {$FIND_WEIGHT[$V][2]})"; break; case 1: case 2: case 3: case 5: case 6: case 7: $set_value = $tag_set_define[$TAG_SET[$N]]; if($V >= count($set_value)) redirect('./'); $sub_title = $set_value[$V]; $condition = "(FIND_IN_SET('{$set_value[$V]}', `{$TAG_SET[$N]}`))"; break; case 9: if($V > 1) redirect('./'); $sub_title = '綜合'; $condition = "(`tag_package`='綜合')"; break; } $sql = "SELECT * FROM `products` WHERE $condition AND `tag_package`!='' AND `enable`=1 ORDER BY `id`"; $result = mysql_query($sql) or mysql_err(); $products = array(); while($row = mysql_fetch_assoc($result)) { $products[] = $row; } mysql_free_result($result); mysql_close(); $path = array( '#' => $TAG_NAME[$N], "{$php_self}?n=" . ($N + 1) . "&v=" . ($V + 1) => $sub_title ); html_header_1('', null, null, $TAG_NAME[$N] . ':' . $sub_title); html_upstartdna(); html_header_2($path); html_product_result($products, '', '', ''); html_footer(); ?>