oc-include/osclass/frm/Item.form.class.php
함수 아래에 붙여 넣기
<?php ItemForm::city_area_select(CityArea::newInstance()->findByCity('3')) ; ?>
같은 함수를 호출한다.
이
은 내 광고에서 도시 지역을 달성 할 수 있어요 어떻게
http://aclassifieds.in
static public function city_area_select($citi_area = null, $item = null) {
if(Session::newInstance()->_getForm('cityArea') != ''){
$citi_area = null;
} else {
if($citi_area==null) { $citi_area = array(); };
}
if($item==null) { $item = osc_item(); };
if(count($citi_area) >= 1) {
if(Session::newInstance()->_getForm('cityAreaId') != "") {
$item['fk_i_city_area_id'] = Session::newInstance()->_getForm('cityAreaId');
}
if(Session::newInstance()->_getForm('cityId') != "") {
$item['fk_i_city_id'] = Session::newInstance()->_getForm('cityId');
}
parent::generic_select('cityAreaId', $citi_area, 'pk_i_id', 's_name', __('Select a city area..'), (isset($item['fk_i_city_area_id'])) ? $item['fk_i_city_area_id'] : null) ;
return true ;
} else {
if(Session::newInstance()->_getForm('cityArea') != "") {
$item['s_city_area'] = Session::newInstance()->_getForm('cityArea');
}
parent::generic_input_text('cityArea', (isset($item['s_city_area'])) ? $item['s_city_area'] : null) ;
return true ;
}
}