function __construct() { parent::__construct(); $tables = $this->db->list_tables(); // Show non-cms tables. $this->data['tables'] = array(); foreach ($tables as $key => $row) { if (stripos($row, 'CMS_') === false) { $this->data['tables'][$row] = $row; } } // Setup field types. $this->data['field_types'] = array('default' => 'Default', 'cms-type-ahead' => 'Type Ahead', 'disabled-text' => 'Disabled Text', 'ignore' => 'Ignore Field', 'cms-image' => 'Image', 'us-timezones' => 'US Timezones'); // Add custom fields. $custom = CMS\Libraries\Fields::get_all_custom_fields(); foreach ($custom as $key => $row) { $this->data['field_types'][$key] = $key; } }
echo $this->load->view('cms/fields/cms-image', array('row' => $row, 'data' => $data, 'bucket' => $bucket)); break; case 'cms-system-textarea': echo form_label($label, $row->name); echo $this->load->view('cms/fields/cms-system-textarea', array('row' => $row, 'data' => $data, 'bucket' => $bucket)); break; case 'cms-type-ahead': echo form_label($label, $row->name); echo $this->load->view('cms/fields/cms-type-ahead', array('row' => $row, 'data' => $data, 'bucket' => $bucket, 'field' => $row->field)); break; case 'ignore': continue; break; } // Do we have a custom field? if ($path = CMS\Libraries\Fields::get_custom_path($row->type)) { require $path; } ?> <?php echo form_error($row->name, '<span class="help-block">', '</span>'); ?> </p> <?php } ?> <?php } ?>