I don't understand this user defined function:
function get_or_post($var, $dfvalue = "") {
    $CI = & get_instance();
    $value = $dfvalue;
    if (!empty($var)) {
        if ($CI->input->get($var) != FALSE) {
            $value = $CI->input->get($var);
        } else if ($CI->input->post($var) != FALSE) {
            $value = $CI->input->post($var);
        }
    }
    return $value;
}