Пример #1
0
     } else {
         $e[1] = array(1 => 'Yes');
         $options = $e[1];
     }
     $attributes = array();
     if (isset($e[2]) && !empty($e[2])) {
         $attributes = $e[2];
     }
     echo __checkbox('data.' . $field, $options, $attributes);
     break;
 case 'password':
     $attributes = array();
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __password('data.' . $field, $attributes);
     break;
 case 'file':
     $attributes = array();
     $attributes['style'] = 'display:none;';
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __file('data.' . $field, $attributes);
     break;
 case 'select':
     $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])) {
Пример #2
0
     } else {
         $e[1] = array(1 => 'Yes');
         $options = $e[1];
     }
     $attributes = array();
     if (isset($e[2]) && !empty($e[2])) {
         $attributes = $e[2];
     }
     echo __checkbox('src.' . $field, $options, $attributes);
     break;
 case 'password':
     $attributes = array();
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __password('src.' . $field, $attributes);
     break;
 case 'file':
     $attributes = array();
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __file('src.' . $field, $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);