#!/usr/bin/perl ######################################### # post # - create a new thread/post from an initial file # - form: append multiple files ######################################### use localbucky; my $pid; $dbh = DBI->connect ($dsn); our ($USER, $lastlog) = checkin(); logout() unless ($USER != -1); if ($input->{c} eq 'new') { new_post_action(); } elsif ($input->{c} eq 'reply') { reply_post_action(); } else { long_post_form(); } ################################# sub long_post_form { my $t = -1; my $k = -1; if ( exists($input->{thread}) ) { my $header_args; $t = get_thread( $input->{thread} ); $k = get_keyword( $t->{keyword} ); error("No such post!") unless ($t != -1); error("No such keyword!") unless ($k == -1 || ($k->{public} || check_op($k))); $header_args->{title} = qq(reply to $t->{title}); $header_args->{subtitle} = qq(return to post); header ($header_args); } elsif ( exists($input->{keyword}) ) { my $header_args; $k = get_keyword( $input->{keyword} ); if ($k != -1 && (($k->{public} || check_op($k)))) { $header_args->{title} = qq(new $k->{keyword}); $header_args->{subtitle} = qq(return to $BUCKY_LEXICON_KEYWORD); header ($header_args); } else { header("Creating a new post..."); } } else { header("Creating a new post..."); } menu(); print "
\n\n"; my $checked = ''; print qq(