field->id, 'recordid', $recordid));
} else {
$content = '';
}
$str = '
';
$str .= '
';
$str .= '';
return $str;
}
function display_search_field($value = '') {
global $CFG;
$temp = get_records_sql_menu('SELECT id, content from '.$CFG->prefix.'data_content WHERE fieldid='.$this->field->id.' GROUP BY content ORDER BY content');
$options = array();
if(!empty($temp)) {
$options[''] = ''; //Make first index blank.
foreach ($temp as $key) {
$options[$key] = $key; //Build following indicies from the sql.
}
}
return choose_from_menu($options, 'f_'.$this->field->id, $value, 'choose', '', 0, true);
}
function parse_search_field() {
return optional_param('f_'.$this->field->id, '', PARAM_NOTAGS);
}
function generate_sql($tablealias, $value) {
return " ({$tablealias}.fieldid = {$this->field->id} AND {$tablealias}.content = '$value') ";
}
}
?>