set_form_variables_string_trim_DoubleAposQQ set_form_variables # msg_id, one_line, message set db [bboard_db_gethandle] if { $db == "" } { bboard_return_error_page return } set selection [ns_db 1row $db "select topic, users.first_names || ' ' || users.last_name as name, users.email from bboard, users where bboard.user_id = users.user_id and msg_id = '$msg_id'"] set_variables_after_query set QQtopic [DoubleApos $topic] if {[bboard_get_topic_info] == -1} { return} if {[bboard_admin_authorization] == -1} { return} ns_db dml $db "begin transaction" if { [string length $QQmessage] < 4000 } { ns_db dml $db "update bboard set one_line = '$QQone_line', message = '$QQmessage' where msg_id = '$msg_id'" } else { ns_ora clob_dml "update bboard set one_line = '$QQone_line', email = '$QQemail', name = '$QQname', message = empty_clob() where msg_id = '$msg_id' returning messsage into :one" $message } ns_db dml $db "end transaction" ns_return 200 text/html "