<?php
include_once("conn.php");
include_once("function.php");
$type = trim($_POST["type"]);
$big_id = trim($_POST["big_id"]);
//if(!check_is_numb($big_id))
//	show_err("大分类选择出错{$big_id}，请重新操作");
switch($type){
	case "t":
		$filter_arr[0] = array("2",$big_id,false);
		if($hm_arr = get_product_t($filter_arr)){
			echo "<select name=\"select_small\" id=\"select_small\">";
			foreach($hm_arr as $key=>$val)
				echo "<option value=\"$val[0]\">$val[2]</option>\n\r";
			echo "</select>";
		}
		break;
	case "hmcss_type":
		if($hm_arr=get_product_type("small" , $big_id)){
			echo "<select name=\"select_small\" id=\"select_small\">";
			foreach($hm_arr as $key=>$val)
				echo "<option value=\"$val[0]\">$val[1]</option>\n\r";
			echo "</select>";
		}
		break;
}
?>