Replied: Thu, 10 Oct 2002 12:38:34 -0500 Replied: pamela fox Return-Path: pfox@usc.edu Delivery-Date: Thu Oct 10 12:25:23 2002 Return-Path: Received: from round.uits.indiana.edu (round.uits.indiana.edu [129.79.1.72]) by grids.ucs.indiana.edu (8.10.2+Sun/8.10.2) with ESMTP id g9AHPNm13795 for ; Thu, 10 Oct 2002 12:25:23 -0500 (EST) Received: from postal.usc.edu (postal.usc.edu [128.125.253.6]) by round.uits.indiana.edu (8.12.1/8.12.1/IUPO) with ESMTP id g9AHPqsl008346 for ; Thu, 10 Oct 2002 12:25:52 -0500 (EST) Received: from usc.edu (localhost.usc.edu [127.0.0.1]) by postal.usc.edu (iPlanet Messaging Server 5.2 HotFix 0.9 (built Jul 29 2002)) with ESMTP id <0H3S006160F2OA@postal.usc.edu> for gcf@indiana.edu; Thu, 10 Oct 2002 10:25:50 -0700 (PDT) Received: from [128.125.252.174] by postal.usc.edu (mshttpd); Thu, 10 Oct 2002 10:25:50 -0700 Date: Thu, 10 Oct 2002 10:25:50 -0700 From: pamela fox To: gcf@indiana.edu Message-id: <3a42f43ab0aa.3ab0aa3a42f4@usc.edu> MIME-version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 HotFix 0.9 (built Jul 29 2002) Content-type: multipart/mixed; boundary="Boundary_(ID_WR+AU9N4JRbID2lkn43Xqw)" Content-language: en X-Accept-Language: en Priority: normal Content-Length: 38075 This is a multi-part message in MIME format. --Boundary_(ID_WR+AU9N4JRbID2lkn43Xqw) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline http://www.imagine-it.org/discus//messages/8/8.html?1034219171 http://www.imagine-it.org/discus//messages/8/12.html?1034219171 any of the things you can do with a submit button are now defunct --Boundary_(ID_WR+AU9N4JRbID2lkn43Xqw) Content-type: text/plain; NAME=board-post-form.cgi Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=board-post-form.cgi #!/usr/local/bin/perl $discus_conf = '/home/imagine-/www/discus_admin/discus.conf'; $pro_fileid = '100152311032459243'; #Discus board posting form script #------------------------------------------------------------------------------- # DISCUS VERSION 3.10 COPYRIGHT NOTICE # # Discus 3.10 is copyright (c) 2000 by DiscusWare, LLC, all rights reserved. # The use of Discus is governed by the Discus License Agreement which is # available from the Discus WWW site at: # http://www.discusware.com/discus/license # # Pursuant to the Discus License Agreement, this copyright notice may not be # removed or altered in any way. #------------------------------------------------------------------------------- if (open (FILE, "$discus_conf")) { @file = ; close (FILE); foreach $line (@file) { if ($line =~ /^(\w+)=(.*)/) { $varname = $1; $value = $2; $value =~ s/\r//g; ${$varname} = $value; } } require "$admin_dir/source/src-board-subs-common"; } else { print "Content-type: text/html\n\n"; print "Script Execution Error\n"; print "\n"; print "

Script Execution Error

\n"; print "Discus scripts could not execute because the discus.conf file\n"; print "could not be opened."; print "

Reason: $!" if $!; print "

This generally indicates a setup error of some kind.\n"; if ($0 =~ m|\.(\w+)$|) { print "

Consult your diagnostics for details.\n"; } print "Consult the Discus "; print "Resource Center for troubleshooting information.\n"; exit(0); } "a_message if $DO_NOT_WRITE_FILES_FLAG; &error_message($L{FILELOCKERROR}, $L{NOTICE_MAINTENANCEMODE}, 0, 1, 1) if $GLOBAL_OPTIONS{'maintenance'}; &ex('cleaning_jobs', 1); &parse_form; &read_cookie; if ($FORM{'HTTP_REFERER'} ne "") { $_ = $FORM{'HTTP_REFERER'}; } else { $_ = $ENV{'HTTP_REFERER'}; $FORM{'HTTP_REFERER'} = $ENV{'HTTP_REFERER'}; } &extract($_); &header; ($bgcolor,$text,$link,$vlink,$alink,$face,$size,$image) = &ex('extract_colorsonly', 1); $strg = &JavaScript_prepare ($topic_name); $str = "$L{BPFCREATETITLE}"; &ex('printuntil', 1, 1, $topic_number, $str); print "

\n"; print "
$str
\n
\n"; &ex('printuntil', 3, 3, $topic_number, $str, 0, 1); print ""; print "$title:\n" if $GLOBAL_OPTIONS{'alternate_topic_navbar'} == 0; print "$title:\n" if ($GLOBAL_OPTIONS{'alternate_topic_navbar'} == 1 && $GLOBAL_OPTIONS{'alternate_topic_navbar_url'} ne ""); $file = "$topic_number/$topic_number.$ext"; print "$topic_name: " if -e "$message_dir/$file"; print "$topic_name: " if !-e "$message_dir/$file"; foreach $key (keys(%level_number)) { $strg = "$L{NBRETURN} " . &JavaScript_prepare ($level_name{$key}); $file = "$topic_number/$level_number{$key}.$ext"; print "$level_name{$key}: \n"; } &ex('printuntil', 5, 5, $topic_number, $str, 0, 1); open (FILE, "$admin_dir/posting.txt"); @file = ; close (FILE); @file = grep(/\S/, @file); if (grep(/^$topic_number:/, @file)) { ($line) = grep(/^$topic_number:/, @file); $line =~ s/\s+$//; @file = grep(!/^$topic_number:/, @file); ($tn, $ip, $usr, $mod, $pas) = split(/:/, $line); $disabled = 1 if ($ip eq "" && $usr eq "" && $mod eq "" && $pas !~ /\S/); } print <
End_Of_File if ($disabled == 0) { print < $L{BPFSUBJECT}



End_Of_File } &ex('printuntil', 7, 13, $topic_number, $str, 0, 1); if ($disabled == 1) { $l = $L{BPPOSTINGDISABLEDDESCR}; $l =~ s/\%aopen//g; $l =~ s/\%aclose/<\/A>/g; print "

$l
"; } else { ($template, $addfile) = &determine_templates($topic_number, 1); @file = split(/\n/, $addfile); foreach $line (@file) { $line .= "\n"; $line =~ s///g; $line = "" if $line =~ m|FORM>|; $line = &common_discus_variables($line, $topic_number, $me_number); } $flag = 0; foreach $line (@file) { if ($line =~ //) { $flag = 1; } elsif ($line =~ //) { $flag = 2+$flag; } elsif ($flag >= 2) { $flag -= 2; } elsif ($line =~ //) { $submit_included = 1; } elsif ($line =~ m|^|) { next if $anon; next if ($GLOBAL_OPTIONS{'anonymous'} == 0 && $GLOBAL_OPTIONS{'options_used'} == 1); print $line; } elsif ($flag == 1) { print $line; } } print "
\n"; if ($submit_included == 0) { print "
\n"; print "\n"; print "

\n"; } } &ex('printuntil', 15, 17, $topic_number, $str, 0, 1); exit(0); # END - FILE IS CORRECTLY UPLOADED # --Boundary_(ID_WR+AU9N4JRbID2lkn43Xqw) Content-type: text/plain; NAME=board-post.cgi Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=board-post.cgi #!/usr/local/bin/perl $discus_conf = '/home/imagine-/www/discus_admin/discus.conf'; $pro_fileid = '100152311032459243'; #Discus board post script (board-post.cgi) #------------------------------------------------------------------------------- # DISCUS VERSION 3.10 COPYRIGHT NOTICE # # Discus 3.10 is copyright (c) 2000 by DiscusWare, LLC, all rights reserved. # The use of Discus is governed by the Discus License Agreement which is # available from the Discus WWW site at: # http://www.discusware.com/discus/license # # Pursuant to the Discus License Agreement, this copyright notice may not be # removed or altered in any way. #------------------------------------------------------------------------------- $double_post_threshold = 120; if (open (FILE, "$discus_conf")) { @file = ; close (FILE); foreach $line (@file) { if ($line =~ /^(\w+)=(.*)/) { $varname = $1; $value = $2; $value =~ s/\r//g; ${$varname} = $value; } } require "$admin_dir/source/src-board-subs-common"; } else { print "Content-type: text/html\n\n"; print "Script Execution Error\n"; print "\n"; print "

Script Execution Error

\n"; print "Discus scripts could not execute because the discus.conf file\n"; print "could not be opened."; print "

Reason: $!" if $!; print "

This generally indicates a setup error of some kind.\n"; if ($0 =~ m|\.(\w+)$|) { print "

Consult your diagnostics for details.\n"; } print "Consult the Discus "; print "Resource Center for troubleshooting information.\n"; exit(0); } "a_message if $DO_NOT_WRITE_FILES_FLAG; require "$admin_dir/source/src-board-subs-admin"; # Added for reply by e-mail script $reply_by_email = 1; if ($ARGV[0] ne "") { $tempfile = $ARGV[0]; $tempfile =~ s/\D//g; if (open(TEMPFILE, "$admin_dir/msg_index/$tempfile-reply.txt")) { @tempfile = ; close (TEMPFILE); $post = $tempfile[0]; chomp $post; $ENV{'QUERY_STRING'} = $post; $ENV{'CONTENT_LENGTH'} = 0; unlink("$admin_dir/msg_index/$tempfile-reply.txt"); } } &parse_form; &read_cookie; $COOKIE{"cpwd$COOKIE_ID"} = $FORM{'crypted_pw'} if ($ARGV[0] ne "" && $FORM{'crypted_pw'} ne ""); if ($FORM{'action'} eq "spch") { &ex('spellchecker_javascript', 1); } $FORM{'name'} = $FORM{'username'} if $FORM{'username'} ne ""; $FORM{'number'} = $FORM{'passwd'} if $FORM{'passwd'} ne ""; $adminappend = "?username=$FORM{'name'}"; $adminappend .= "&HTTP_REFERER=$FORM{'HTTP_REFERER'}&action=page_editor#Messages"; if ($GLOBAL_OPTIONS{'posting'} == 0 && $GLOBAL_OPTIONS{'options_used'} == 1) { &error_message($L{BPAUTHERROR}, $L{AUTHERROR_CLOSED}, 0, 1); } if ($ENV{'HTTP_REFERER'} =~ /(.*)\.$cgi_extension/i || $FORM{'HTTP_REFERER'}) { $_ = $FORM{'HTTP_REFERER'}; s/#(.*)//g; } else { $_ = $ENV{'HTTP_REFERER'}; $FORM{'HTTP_REFERER'} = $_; s/#(.*)//g; } &extract ($_) if $_ ne ""; $FORM{'name'} =~ s/[\(\)]//g; $username_input = $FORM{'name'}; $password_input = $FORM{'number'}; ($auth, $passwordline, $poster_type, $is_su, $is_mod, $is_user, $poster_binary) = &ex('verify_postread_privileges', $topic_number, $username_input, $password_input, $password_input, "posting", 1); if ($pro) { &ex('get_preferences', "*", "*", $passwordline); } undef @file; undef $line; open (FILE, "$admin_dir/postoptions.txt"); @file = ; close (FILE); ($line) = grep(/^$topic_number:/, @file); chomp $line; ($tn, $anonymous_forbidden, $stamp_forbidden, $email_forbidden) = split(/:/, $line); if ($passwordline ne "") { $passwordline =~ s/\s+$//; ($file, $user, $pass, $email, $full, $foo1, $foo2, $foo3, $group) = split(/:/, $passwordline); $user_x = $user; if ($GLOBAL_OPTIONS{'capitalize_username'} == 1 || $GLOBAL_OPTIONS{'capitalize_username'} eq "") { @x = split(/_/, $user_x); foreach $x (@x) { $x = "\u$x"; } $user_x = join("_", @x); } $ccux = &remove_html(&char_convert($user_x)); $full = $ccux if ($full eq "fullname" || $full eq "" || $stamp_forbidden || ($GLOBAL_OPTIONS{'fullnames'} == 0 && $GLOBAL_OPTIONS{'options_used'} == 1)); $full .= " ($ccux)" if $GLOBAL_OPTIONS{'user_paren'} eq ""; $full .= " ($ccux)" if $GLOBAL_OPTIONS{'user_paren'} == 1; if ($group !~ /\S/) { $group_hold = "MODERATOR"; } else { $group_hold = $group; } $FULLNAME = $full; $PROFILE_LINK = ""; $EMAIL = ""; if ($pro) { if (($GLOBAL_OPTIONS{'anonymous'} == 1 || $GLOBAL_OPTIONS{'options_used'} == 0) && $FORM{'Anon'} && !$anonymous_forbidden) { $FULLNAME = $L{BPANONYMOUS}; $PROFILE_LINK = ""; $EMAIL = ""; } else { $warn_anon = 1 if $FORM{'Anon'}; $filename = "$user-$group_hold.txt"; $filename = &getfn($filename); if (-e "$admin_dir/profiles/$filename" && !$email_forbidden && ($GLOBAL_OPTIONS{'email_on_post'} == 1 || $GLOBAL_OPTIONS{'options_used'} == 0)) { $PROFILE_LINK = ""; } else { $EMAIL = $email if ($PREF{'noemail'} == 0 && $email ne "" && $email ne "email" && !$email_forbidden && ($GLOBAL_OPTIONS{'email_on_post'} == 1 || $GLOBAL_OPTIONS{'options_used'} == 0)); } } } else { if (($GLOBAL_OPTIONS{'anonymous'} == 1 || $GLOBAL_OPTIONS{'options_used'} == 0) && $FORM{'Anon'} && !$anonymous_forbidden) { $FULLNAME = $L{BPANONYMOUS}; } else { $warn_anon = 1 if $FORM{'Anon'}; $EMAIL = $email if ($email ne "" && $email ne "email" && !$email_forbidden && ($GLOBAL_OPTIONS{'email_on_post'} == 1 || $GLOBAL_OPTIONS{'options_used'} == 0)); } } $username = $user; } else { $FULLNAME = &remove_html(&char_convert(&remove_html($username_input))); $PROFILE_LINK = ""; $EMAIL = ""; if (($GLOBAL_OPTIONS{'anonymous'} == 1 || $GLOBAL_OPTIONS{'options_used'} == 0) && $FORM{'Anon'} && !$anonymous_forbidden) { $FULLNAME = $L{BPANONYMOUS}; } else { $warn_anon = 1 if $FORM{'Anon'}; if ($FORM{'email'} ne "") { $FORM{'email'} = &remove_html($FORM{'email'}); $EMAIL = $FORM{'email'}; if ($EMAIL =~ m|^https?://|i && !$GLOBAL_OPTIONS{'allow_email_url'}) { $EMAIL = ""; $FORM{'email'} = ""; } } } $username = "PUBLIC"; $group_hold = "PUBLIC"; } if ($GLOBAL_OPTIONS{'ip_on_post'}) { $rh = $ENV{'REMOTE_HOST'}; $rh =~ s/[<>]//g; $ra = $ENV{'REMOTE_ADDR'}; $ra =~ s/[<>]//g; $FULLNAME .= " ($rh - $ra)" if $rh; $FULLNAME .= " ($ra)" if !$rh; } $FORM{'message'} =~ s/\s+$//; $FORM{'message'} =~ s/^\s+//; $FORM{'message'} =~ s/\n{3,}/\n\n\n/g; if ($FORM{"message"} =~ m|^\{\\rtf| && $pro && $GLOBAL_OPTIONS{'RTF'}) { ($FORM{"message"}) = &ex('rtf_to_webtags', $FORM{"message"}); ($lint, $newmessage) = &ex('webtags', $FORM{"message"}, 0, 1, $is_mod, $is_su); &error_message("$L{FORMATTINGERROR}", "$newmessage") if ($FORM{'generate_error'} && $lint_subj eq "!Error"); } undef $swear_error; if ($FORM{"message"} !~ /\\(\S+)\{/ && $FORM{"message"} =~ m|<(\s*)([^>]*)(\s*)>| && $GLOBAL_OPTIONS{'html'}) { ($message_html) = &ex('html_to_webtags', $FORM{"message"}); $NEW_SOURCE = $message_html; $message_html =~ s/<([^>]*)>//g; if ($GLOBAL_OPTIONS{'profanity'}) { ($message_html) = &ex('remove_swearing', $message_html) if ($GLOBAL_OPTIONS{'profanity_detected'} == 1 || $GLOBAL_OPTIONS{'profanity_detected'} eq ""); ($x) = &ex('remove_swearing', $message_html) if $GLOBAL_OPTIONS{'profanity_detected'} == 2; $swear_error .= $x if $x; } ($lint, $newmessage) = &ex('webtags', $message_html, 0, 1, $is_mod, $is_su); &error_message("$L{FORMATTINGERROR}", "$newmessage") if ($FORM{'generate_error'} && $lint_subj eq "!Error"); } else { $NEW_SOURCE = ""; if ($FORM{"message"} !~ /\\(\S+)\{/ && $GLOBAL_OPTIONS{'active_links'}) { $FORM{"message"} = join("", " ", $FORM{"message"}, " "); $m = ""; $after = $FORM{"message"}; while ($after =~ m|(http://)([\w\-\.\+/~\%\?\&\=\:\,]+)|i) { $url = join("", $1, $2); $b4 = $`; $after = $'; if ($url =~ m|([\.\:\;\,])$|) { $url = $`; $after = "$1$after"; } $url_link = $url; $url_link =~ s/,(.)/\%2C$1/g; $m .= join("", $b4, "\\topurl\{$url_link,$url}"); } $FORM{"message"} = $m . $after; $m = ""; $after = $FORM{"message"}; while ($after =~ m|([\w\-\+\.]+)\@([\w\-\+\.]+)|i) { $url = join("", $1, "\@", $2); $b4 = $`; $after = $'; if ($url =~ m|([\.\:\;\,])$|) { $url = $`; $after = "$1$after"; } $url_link = $url; $url_link =~ s/,(.)/\%2C$1/g; $m .= join("", $b4, "\\mail\{$url_link,$url}"); } $FORM{"message"} = $m . $after; } $message_temp = $FORM{"message"}; if ($GLOBAL_OPTIONS{'profanity'}) { ($message_temp) = &ex('remove_swearing', $message_temp) if ($GLOBAL_OPTIONS{'profanity_detected'} == 1 || $GLOBAL_OPTIONS{'profanity_detected'} eq ""); ($swear_error) = &ex('remove_swearing', $message_temp) if $GLOBAL_OPTIONS{'profanity_detected'} == 2; } ($lint, $newmessage) = &ex('webtags', $message_temp, 0, 1, $is_mod, $is_su); &error_message("$L{FORMATTINGERROR}", "$newmessage") if ($FORM{'generate_error'} && $lint_subj eq "!Error"); $error_observed = 1; } if ($FORM{'subject'} ne "") { $newsubject = $FORM{'subject'}; if ($GLOBAL_OPTIONS{'profanity'}) { ($newsubject) = &ex('remove_swearing', $newsubject) if ($GLOBAL_OPTIONS{'profanity_detected'} == 1 || $GLOBAL_OPTIONS{'profanity_detected'} eq ""); ($x) = &ex('remove_swearing', $newsubject) if $GLOBAL_OPTIONS{'profanity_detected'} == 2; $swear_error .= $x if $x ne ""; } ($lint_subj, $newsubject) = &ex('webtags', $newsubject, 3, 1, $is_mod, $is_su); &error_message("$L{FORMATTINGERROR}", "$newsubject") if ($FORM{'generate_error'} && $lint_subj eq "!Error"); $newsubject = "\u$newsubject" if $GLOBAL_OPTIONS{'capitalize'}; $newsubj = 1; } if ($GLOBAL_OPTIONS{'profanity'}) { ($FULLNAME) = &ex('remove_swearing', $FULLNAME, 0, 1) if ($GLOBAL_OPTIONS{'profanity_detected'} == 1 || $GLOBAL_OPTIONS{'profanity_detected'} eq ""); ($x) = &ex('remove_swearing', $FULLNAME, 0, 1) if $GLOBAL_OPTIONS{'profanity_detected'} == 2; $swear_error .= $x if $x ne ""; } if ($auth == 0) { $newmessage = "

$L{BPAUTHERROR}

$L{BPAUTHERRORINVALID}"; &error_message("$L{BPAUTHERROR}", "$L{BPAUTHERRORINVALID}") if $FORM{'generate_error'}; } elsif ($auth == 2) { $newmessage = "

$L{BPAUTHERROR}

$L{AUTHERROR_BANNED}"; &error_message("$L{BPAUTHERROR}", "$L{AUTHERROR_BANNED}") if $FORM{'generate_error'}; } elsif ($auth == 3) { $newmessage = "

$L{BPAUTHERROR}

$L{AUTHERROR_CLOSED}"; &error_message("$L{BPAUTHERROR}", "$L{AUTHERROR_CLOSED}") if $FORM{'generate_error'}; } elsif ($FULLNAME !~ /\S/ || ($username_input !~ /\S/ && ($FORM{'Anon'} eq "" || $warn_anon == 1))) { $newmessage = "

$L{BPAUTHERROR}

$L{BPAUTHERRORNONAME}"; &error_message("$L{BPAUTHERROR}", "$L{BPAUTHERRORNONAME}") if $FORM{'generate_error'}; } elsif ($FORM{"message"} !~ /\S/) { $newmessage = "

$L{BPADDMSGERROR}

$L{BPADDMSGERRORDESC}"; &error_message("$L{BPADDMSGERROR}", "$L{BPADDMSGERRORDESC}") if $FORM{'generate_error'}; } elsif ($FORM{"new_conversation"} == 1 && $FORM{"subject"} !~ /\S/) { $newmessage = "

$L{BPCREATEERROR}

$L{BPCREATEERRORDESC}"; $newsubj = 1; &error_message("$L{BPCREATEERROR}", "$L{BPCREATEERRORDESC}") if $FORM{'generate_error'}; } elsif ($poster_type == 8 && (length($FORM{'message'})/1000) > $GLOBAL_OPTIONS{'public_msgsize'} && $GLOBAL_OPTIONS{'options_used'} && $GLOBAL_OPTIONS{'public_msgsize'}) { $newmessage = "

$L{BPADDMSGERROR}

"; $toolong = $L{BP_MESSAGE_EXCEEDED_MAXLENGTH}; $mxs = $GLOBAL_OPTIONS{'public_msgsize'}; $toolong =~ s/\%maxsize/$mxs/g; $ys = length($FORM{'message'})/1000; $toolong =~ s/\%yoursize/$ys/g; $newmessage .= $toolong; &error_message("$L{BPADDMSGERROR}", "$toolong") if $FORM{'generate_error'}; } elsif ($poster_type != 8 && (length($FORM{'message'})/1000) > $GLOBAL_OPTIONS{'registered_msgsize'} && $GLOBAL_OPTIONS{'options_used'} && $GLOBAL_OPTIONS{'registered_msgsize'}) { $newmessage = "

$L{BPADDMSGERROR}

"; $toolong = $L{BP_MESSAGE_EXCEEDED_MAXLENGTH}; $mxs = $GLOBAL_OPTIONS{'registered_msgsize'}; $toolong =~ s/\%maxsize/$mxs/g; $ys = length($FORM{'message'})/1000; $toolong =~ s/\%yoursize/$ys/g; $newmessage .= $toolong; &error_message("$L{BPADDMSGERROR}", "$toolong") if $FORM{'generate_error'}; } elsif ($swear_error) { $newmessage = "

$L{PROFANITY_DETECTED}

"; $l = $L{PROFANITY_DETECTED_MESSAGE}; $l =~ s/\%wordlist/$swear_error/g; $newmessage .= $l; $l =~ s/
  • /\*/g; &error_message("$L{PROFANITY_DETECTED}", "$l") if $FORM{'generate_error'}; } else { $error_observed = 0; } $error_observed = 1 if $lint eq "!Error"; $error_observed = 1 if $lint_subj eq "!Error"; $error_observed = 1 if $swear_error; $newmessage = $newsubject if $lint_subj eq "!Error"; if ($error_observed && $FORM{'generate_error'}) { &error_message("$L{FORMATTINGERROR}", $newmessage); } $message_hold = $FORM{'message'}; $message_hold =~ s/&/&/g; $message_hold =~ s/>/>/g; $message_hold =~ s//>/g; $subject_hold =~ s/
    $L{BPNORMALTITLE}
    \n" if $newsubj == 0; print "
    $L{BPCREATETITLE}
    \n" if $newsubj == 1; print "
    \n"; &ex('printuntil', 3, 3, $topic_number, $title, 0, 1, 0, 0, $spellchecker); $file = "$message_dir/$topic_number/$me_number.$ext" if -e "$message_dir/$topic_number/$me_number.$ext"; if (!-e "$message_dir/$topic_number/$me_number.$ext") { $file = "$secdir/$topic_number/$me_number.$ext"; $secure = 1; } open (FILE, $file); @file = ; close (FILE); if ($FORM{'isitok'} ne "okiedokie") { ($pre) = &ex('get_navbar', $topic_number, $me_number, "post"); $pre = "
    $title: $pre" if $GLOBAL_OPTIONS{'alternate_topic_navbar'} == 0; $pre = "$title: $pre" if ($GLOBAL_OPTIONS{'alternate_topic_navbar'} == 1 && $GLOBAL_OPTIONS{'alternate_topic_navbar_url'}); } else { &extract("$FORM{'HTTP_REFERER'}"); my (@array) = ("$topic_number:$topic_name"); foreach $key (sort by_number keys(%level_number)) { push (@array, "$level_number{$key}:$level_name{$key}"); } $pre = "Page Manager: \n"; foreach $line (@array) { ($number,$name) = split(/:/, $line, 2); $pre .= "$name: "; } } $pre .= "$L{BPCREATEDISPLAY}" if $newsubj == 1; $pre .= "$L{BPNORMALDISPLAY}" if $newsubj == 0; &ex('printuntil', 5, 9, $topic_number, $title, 0, 1); print "$pre\n"; print "
    \n"; if (!($error_observed)) { print "$L{BPMESSAGEPOST}" if $newsubj == 0; print "$L{BPCREATEPOST}" if $newsubj == 1; print "

    "; if ($warn_anon == 1) { print "$L{BPWARNANONYMOUS}

    \n"; } if ($lint ne "") { print "$L{BPPOSSIBLEFORMATTINGERRORS}

    "; print "$L{BPPOSSIBLEFORMATTINGERRORSDESC}"; print "

    \n"; print "

      $lint

    \n"; } if ($pro && $PREF{'spellcheck'} == 1 && $dictionary ne "") { ($newmessage, $scmessage) = &ex('spellcheck', $newmessage); if ($scmessage ne "") { print $scmessage; } } &ex('printuntil', 11, 11, $topic_number, $title, 0, 1); print "\n"; print "
    \n"; if ($newsubj == 1) { print "$L{BPSUBJECTTAG} $newsubject
    \n"; } $postby = $FULLNAME; $postby = join("", $PROFILE_LINK, $FULLNAME, "") if $PROFILE_LINK; $postby = join("", "", $FULLNAME, "") if $EMAIL !~ m|^https?://|i; $postby = join("", "", $FULLNAME, "") if $EMAIL =~ m|^https?://|i; $pb = $L{POSTBY}; $postby = join("", "", $postby, "") if $warn_anon == 1; ($datetime) = &ex('get_date_time', "long"); $pb =~ s/\%name/$postby/g; $pb =~ s/\%date/$datetime/g; print "$pb

    \n"; } print "$newmessage"; if (!$error_observed) { print "

    \n"; print "

    \n"; print "\n"; print "\n" if $FORM{'new_conversation'} == 1; print "\n"; print "\n" if $FORM{'isitok'} eq "okiedokie"; print "\n" if $FORM{'no_email'}; print "
    \n"; print "
    \n"; if ($spellchecker_net_feature_on) { $button_ok = 0; $bv = 0; if ($ENV{'HTTP_USER_AGENT'} =~ m|MSIE ([\d\.]+)|) { $bv = $1; $button_ok = 1 if $bv >= 4; $button_ok = 0 if ($ENV{'HTTP_USER_AGENT'} =~ m|Mac| && $bv == 5); } elsif ($ENV{'HTTP_USER_AGENT'} =~ m|Mozilla/([\d\.]+)|) { $bv = $1; $button_ok = 1 if $bv >= 4; $button_ok = 0 if $bv == 6; $button_ok = 0 if $bv >= 4.5 && $bv < 4.6; } if ($button_ok && ($GLOBAL_OPTIONS{'spellchecker'} == 1 || $GLOBAL_OPTIONS{'spellchecker'} eq "") && $PREF{'disable_spellchecker'} != 1) { print "\n"; } } print "\n" if !$error_observed; print " "; } else { print "'$cgiurlm$adminappend'\"> "; } print "
    \n"; } else { print "

    \n"; print "\n"; print "\n"; print "\n" if $FORM{'new_conversation'} == 1; print "\n" if $FORM{'isitok'} eq "okiedokie"; print "\n" if $FORM{'no_email'}; print "\n"; } print "
    \n"; &ex('printuntil', 13, 13, $topic_number, $title, 0, 1); print "\n"; ($page, $add) = &determine_templates($topic_number, 1); @file = split(/\n/, $add); $am = $L{ADDMESSAGE}; if ($newsubj == 1) { $flag = 0; foreach $line (@file) { if ($line =~ m|$am|i && $flag == 0) { print join("", $`, "$L{BPREVISESUBJECT}", $'); $flag = 1; } } print "

    $L{BPREVISESUBJECT}

    \n" if $flag == 0; print "$L{BPFSUBJECT}

    \n"; print "

    \n"; print "


    \n"; } $flag = 0; $message_hold =~ s/^\s+//; $message_hold =~ s/\s+$//; foreach $line (@file) { if ($line =~ //) { $flag = 1; } elsif ($line =~ //) { $flag = 2+$flag; } elsif ($flag >= 2) { $flag -= 2; } elsif ($line =~ //) { $submit_included = 1; } elsif ($flag == 1) { $line = &common_discus_variables($line, $topic_number, $me_number); if ($line =~ /NAME="name" VALUE=""/i) { $line = join("", $`, "NAME=\"name\" VALUE=\"$username_input\"", $'); } elsif ($line =~ /NAME="number" VALUE=""/i) { $line = join("", $`, "NAME=\"number\" VALUE=\"$FORM{'number'}\"", $'); $line = "" if $FORM{'isitok'} eq "okiedokie"; } elsif ($line =~ /NAME="Anon"/i) { $line = join("", $`, "NAME=\"Anon\" CHECKED", $') if $FORM{'Anon'} eq "on"; } elsif ($line =~ /NAME="username" VALUE=""/i) { $line = join("", $`, "NAME=\"username\" VALUE=\"$username_input\"", $'); } elsif ($line =~ /NAME="passwd" VALUE=""/i) { $line = join("", $`, "NAME=\"passwd\" VALUE=\"$FORM{'number'}\"", $'); $line = "" if $FORM{'isitok'} eq "okiedokie"; } elsif ($line =~ /NAME="email" VALUE=""/i) { $line = join("", $`, "NAME=\"email\" VALUE=\"$FORM{'email'}\"", $'); } elsif ($line =~ /$am/i) { $line = join("", $`, "$L{BPREVISEMESSAGE}", $'); } if ($line =~ m||i) { $line = join("", $`, $message_hold, $&, $'); } print $line; } } print "
    \n"; if ($submit_included == 0) { print "
    \n"; print "\n"; print "

    \n"; print "
    \n"; } &ex('printuntil', 15, 17, $topic_number, $title, 0, 1); exit(0); } &error_message ("Error", "This page ($me_number) does not allow for public posting of messages!",0,1) if $param !~ /Add/ && $newsubj == 0 && $FORM{'isitok'} ne "okiedokie"; &error_message ("Error", "This page does not allow for public creation of conversations!",0,1) if $param !~ /Create/ && $newsubj == 1; &error_message ("Error", "Your username/password combination was invalid, or you are not allowed to post to this topic.",0,1) if $passwordline eq "invalid"; if ($GLOBAL_OPTIONS{'double_post'}) { if ($newsubj == 0) { ($head, $color, $lm, $ann, $ann_src, $sublist, $about, $about_src, $message, $message_src, $description_src) = &get_page($topic_number, $me_number); @msg = split(/\n/, $message); foreach $line (@msg) { if ($line =~ m||) { $time = $2; } elsif ($line =~ m|(.*)|) { $text = $1; } elsif ($line =~ m||) { next if (time - $double_post_threshold) > $time; if ($text eq $newmessage) { if ($FORM{'isitok'} ne 'okiedokie') { $url = "$message_url/$topic_number/$me_number.$ext" if !-e "$secdir/$topic_number"; $url = "$script_url/board-auth.$cgi_extension?file=/$topic_number/$me_number.$ext" if -e "$secdir/$topic_number"; } else { $url = "$cgiurlm$adminappend"; } &error_message("$L{BPALREADYPOSTED}", "$L{BPALREADYPOSTEDDESC}

    $L{BPCLICKCONTINUE}

    ", 0, 1); } } } } else { open (TREE, "$admin_dir/msg_index/$topic_number-tree.txt"); @TREE_STRUCTURE_FILE = ; close (TREE); @ll = grep(/^(\d+)\t$topic_number\t(\d+)\t$me_number\t/, @TREE_STRUCTURE_FILE); foreach $line (@ll) { @c = split(/\t/, $line); if (&unescape($c[4]) eq $newsubject && (time - $double_post_threshold) <= $c[9]) { if ($FORM{'isitok'} ne 'okiedokie') { $url = "$message_url/$c[1]/$c[2].$ext" if !-e "$secdir/$c[1]"; $url = "$script_url/board-auth.$cgi_extension?file=/$c[1]/$c[2].$ext" if -e "$secdir/$c[1]"; } else { $url = "$cgiurlm$adminappend"; } &error_message("$L{BPALREADYPOSTED}", "$L{BPALREADYPOSTEDDESC}

    $L{BPCLICKCONTINUE}

    ", 0, 1); } } } } $message_hold = $message_html if $message_html; if ($pro) { ($queue) = &ex('check_queue_status', $topic_number, $poster_type); } $locked_the_tree = 0; if ($newsubj == 1 && !$queue) { $create_new_subject = $newsubject; } elsif ($newsubj == 1 && $queue) { $subject_line = $newsubject; } $TIME_HOLD = time; if (!$queue) { $me_number_hold = $me_number; $topic_number_hold = $topic_number; ($postindex, $source_out, $me_number) = &ex('post_message',$topic_number,$me_number,$message_hold,$newmessage,$FULLNAME,$EMAIL,$PROFILE_LINK,$username,$group_hold,$TIME_HOLD, "", "", $create_new_subject); $topic_number = $topic_number_hold; if ($postindex == 0 || $me_number eq "") { &log_error("board-post.cgi", "posting operation", "post_message returned flawed data ($postindex;$me_number)... $@ $!"); } else { if ($pro) { ($notify_flag) = &ex('check_notification_hold', $poster_binary); if ($GLOBAL_OPTIONS{'email'} && (!$notify_flag || $FORM{'no_email'} != 1)) { &ex('email_notification_pro', $topic_number, $me_number, $FULLNAME, $newmessage, $username, $group_hold, 0, $postindex); } } else { &ex('email_notification', $topic_number, $me_number, $FULLNAME, $newmessage, $username, $group_hold, $postindex) if ($GLOBAL_OPTIONS{'email'} && !$pro); } } } else { $me_number_hold = $me_number; $topic_number_hold = $topic_number; ($queue_id, $source_out) = &ex('send_message_to_queue', $topic_number, $me_number, $message_hold, $newmessage, $FULLNAME, $username, $group_hold, $subject_line, $EMAIL, $PROFILE_LINK); $me_number = $me_number_hold; $topic_number = $topic_number_hold; &ex('email_notification_pro', $topic_number, $me_number, $FULLNAME, $newmessage, $username, $group_hold, 1, $queue_id) if ($GLOBAL_OPTIONS{'email'} && $pro); } if ($source_out =~ m|\\image_notuploaded\{| || $source_out =~ m|\\attachment_notuploaded\{|) { $string = $source_out; &header; ($bgcolor, $text, $link, $vlink, $alink, $face, $size, $image) = &ex('extract_colorsonly', 1); &ex('printuntil', 1, 1, $topic_number, "$L{BPIMGUPLOADTITLE3_00}"); print "

    $L{BPIMGUPLOADTITLE3_00}
    \n
    \n"; for ($i = 3; $i <= 9; $i += 2) { &ex('printuntil', $i, $i, $topic_number, "$L{BPIMGUPLOADTITLE3_00}"); } print "$L{BPIMGUPLOADINSTR3_00}

    \n"; print "

    \n"; print "
    \n"; for ($i = 11; $i <= 13; $i += 2) { &ex('printuntil', $i, $i, $topic_number); } $message = $string; while ($source_out =~ m|\\image_notuploaded\{(\d+),([^\}]*)\}|g) { $ctr = $1; $descr = $2; print "$L{BPPROVIDEFILE} $descr:

    \n"; print "
    \n"; print "


    \n"; } while ($source_out =~ m|\\attachment_notuploaded\{(\d+),([^\}]*)\}|g) { $ctr = $1; $descr = $2; print "$L{BPPROVIDEFILE} $descr:

    \n"; print "
    \n"; print "


    \n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n" if $FORM{'isitok'} eq "okiedokie"; print "\n"; print "\n"; print "
    \n"; print "
    \n"; if ($FORM{'isitok'} ne "okiedokie") { print "$L{BPIMGUPLOADCANCEL13_00} \n"; } else { print "$L{BPIMGUPLOADCANCEL13_00} \n"; } print "$L{BPIMGUPLOADCANCEL2}. "; print "$L{BPIMGUPLOADCANCEL33_00}\n"; print "
    \n"; for ($i = 15; $i <= 17; $i += 2) { &ex('printuntil', $i, $i, $topic_number); } exit(0); } else { &ex('queue_submitted', $topic_number, $me_number, $adminappend, $FORM{'isitok'}) if $queue; $secure = 0; $secure = 1 if !-e "$message_dir/$topic_number"; $secure = 0 if !$pro; $ts = $TIME_HOLD; $url = "$message_url/$topic_number/$me_number.$ext" if !$secure; $url .= "?$ts" if (!$noqm && !$secure); $url = "$script_url/board-auth.$cgi_extension?file=/$topic_number/$me_number.$ext&lm=$ts" if $secure; &seturl("$url") if $FORM{'isitok'} ne "okiedokie"; &seturl("$cgiurlm$adminappend") if $FORM{'isitok'} eq "okiedokie"; } sub verify_owner { my ($owner, $username) = @_; my (@group_data, $group, $usernames, @username, $groupname); open (GROUP, "$admin_dir/groups.txt") || &error_message("File Error", "Cannot open group file (groups.txt)!"); @group_data = ; close (GROUP); foreach $group (@group_data) { chop ($group) if $group =~ /\n$/; ($groupname, $usernames) = split(/:/, $group); if ($groupname eq $owner) { @username = split(/,/, $usernames); if (grep (/^$username$/, @username)) { return 1; } else { return 0; } } } return 0; } # END - FILE IS CORRECTLY UPLOADED # --Boundary_(ID_WR+AU9N4JRbID2lkn43Xqw)--