我在osclass中有函数..
function item_city_area($cityarea_txt, $cityarea_select_txt) {
$aCityArea = osc_get_cityarea() ;
$item = (osc_item() != null) ? osc_item() : array() ;
switch( count($aCityArea) ) {
case 0: // 0 regions ?>
<div class="clearfix">
<label><?php echo $cityarea_txt ; ?></label>
<div class="input">
<input class="city_name" id="city_name" type="text" name="city" value="<?php echo get_city_name($item) ; ?>" />
</div>
</div>
<?php
break;
case 1: ?>
<input class="city_id" id="city_id" type="hidden" name="cityId" value="<?php echo get_city_id($item) ; ?>" />
<?php
break;
default: // more than one region ?>
<div class="clearfix">
<label><?php echo $cityarea_txt ; ?></label>
<div class="input">
<select class="cityarea_id" id="cityarea_id" name="cityArea">
<option value=""><?php echo $cityarea_select_txt ; ?></option>
<?php //foreach($aCityArea as $city) { ?>
<option value="<?php echo $city['pk_i_id'] ; ?>"><?php echo $city['s_name'] ; ?></option>
<?php //} ?>
</select>
</div>
</div>
<?php
break;
}
}
请帮我打电话和联系城市..