function allcity($str = '') { $db = load_class('db'); $categorys = get_cache('category', 'content'); $tmp = array(); foreach ($categorys as $cid => $cate) { if ($cate['modelid'] == 3) { $cate['cid'] = $cid; $tmp[$cid] = $cate; } } return WUZHI_form::tree_select($tmp, 0, 'name="cityid" class="form-control input-sm" ' . $str, '请选择城市'); }