last_error; } // generate the comment flak text area components function get_comment_flak($last_tab_index, $field_prefix = "comment", $classname = "cf", $flak_count = 13, $columns = 70, $rows = 18) { $output = ""; if ($classname != "") { $output .= "
"; } for ($i = 0; $i < $flak_count; $i++) { $tab_index = $i + $last_tab_index; $output .= ""; } if ($classname != "") { $output .= "
"; } return $output; } // check the comment flak component values function detect_spam($field_prefix = "comment", $flak_count = 13, $request) { $is_spam = false; for ($i = 0; $i < $flak_count; $i++) { $field = $field_prefix . "_" . $i; if (strlen(trim($request[$field])) > 0) { // the field is not empty, so it must be spam $is_spam = true; } } return $is_spam; } }