$rs = $_dao->find($params); if (!empty($rs)) { foreach ($rs as $v) { $options[$v[$e[1]['option_key']]] = $v[$e[1]['option_value']]; } } } } else { $options = $e[1]; } } $attributes = array(); if (isset($e[2]) && !empty($e[2])) { $attributes = $e[2]; } echo __select('data.' . $field, $options, $attributes); break; case 'autocomplete': $options = array(); $params = array(); if (isset($e[1]) && !empty($e[1])) { if (array_key_exists('option_table', $e[1])) { if (array_key_exists('option_key', $e[1]) && array_key_exists('option_value', $e[1])) { $_dao = new ScrudDao($e[1]['option_table'], $CI->db); $params['fields'] = array($e[1]['option_key'], $e[1]['option_value']); $rs = $_dao->find($params); if (!empty($rs)) { foreach ($rs as $v) { $options[$v[$e[1]['option_key']]] = $v[$e[1]['option_value']]; } }
$rs = $_dao->find($params); if (!empty($rs)) { foreach ($rs as $v) { $options[$v[$e[1]['option_key']]] = $v[$e[1]['option_value']]; } } } } else { $options = $e[1]; } } $attributes = array(); if (isset($e[2]) && !empty($e[2])) { $attributes = $e[2]; } echo __select('src.' . $field, $options, $attributes); break; } } ?> </div> </div> <?php } } else { if ($this->search == 'one_field') { ?> <?php $attributes = array(); echo __text('src.one_field', $attributes); ?>