Tetra-WebBBS Debugger 6.10

Contents of /home/zoetecnocampoco/public_html/cgi-bin/bbs/lib/webbbs_form.pl

    1- #<<<
    2- #######################################
    3- #    ---  Tetra-WebBBS  --- 
    4- # By:             tetrabb.com
    5- # Version:        6.10
    6- # Last modified:  2009-11-01
    7- # Copyright (c)   2006-2009
    8- # Website:        http://tetrabb.com
    9- # For more details see license.txt
   10- #
   11- # Core script:    webbbs_form.pl
   12- # Authors:        Rainer Libowski
   13- #                 Tarty
   14- # Derived from code by Darryl Burgdorf
   15- #######################################
   16- #>>>
   17- 
   18- sub PostForm {
   19- $messagenumber = '';
   20- if ( defined $tbb->{'get'}->{'id'} ) {
   21- $messagenumber = $tbb->{'get'}->{'id'};
   22- }
   23- elsif ( defined $tbb->{'post'}->{'msgnum'} ) {
   24- $messagenumber = $tbb->{'post'}->{'msgnum'};
   25- }
   26- if ( $messagenumber !~ /^\d+$/ ) {
   27- $tbb->send_error_plain( "9910", "9912", 'locwfrm_1010' );
   28- exit;
   29- }
   30- &Initialize_Data;
   31- 
   32- $SpellCheckerMeta = 1;
   33- $cust{'editor_code'} .= "<script type='text/javascript'>\n"
   34-     . "function bbSetFocus() {\n"
   35-     . "    var texta  = document.getElementsByName('body')[0];\n"
   36-     . "    var inputs = document.getElementsByTagName('input');\n"
   37-     . "    for ( var i = 0; i < inputs.length; i++ ) {\n"
   38-     . "        var inp = inputs[i];\n"
   39-     . "        if (inp.name == 'name' || inp.name == 'subject') {\n"
   40-     . "            if ( inp.type == 'text' && inp.value == '' ) {\n"
   41-     . "                var input = inp; break;\n"
   42-     . "            }\n"
   43-     . "        }\n"
   44-     . "    }\n"
   45-     . "    if (input)      input.focus();\n"
   46-     . "    else if ( texta && texta.value == '' ) {\n"
   47-     . "        texta.focus();\n"
   48-     . "    }\n" . "}\n"
   49-     . "function bbSetFocusOnload() {\n"
   50-     . "    var bbOldOnload = window.onload;\n"
   51-     . "    if ( typeof(window.onload) != 'function' ) window.onload = bbSetFocus;\n"
   52-     . "    else {\n"
   53-     . "        window.onload = function() {\n"
   54-     . "            if ( bbOldOnload ) bbOldOnload();\n"
   55-     . "            bbSetFocus();\n"
   56-     . "        }\n"
   57-     . "    }\n" . "}\n"
   58-     . "bbSetFocusOnload();\n"
   59-     . "</script>";
   60- if ($UserEditRun) {
   61- &Header( $text{'0221'}, $MessageHeaderFile );
   62- }
   63- elsif ( $messagenumber > 0 ) {
   64- unless ( $MessageList{$messagenumber} > 0 ) {
   65- &Error( '9220', '9221' );
   66- }
   67- &Header( $text{'0003'}, $MessageHeaderFile );
   68- }
   69- else {
   70- &Header( $text{'0007'}, $MessageHeaderFile );
   71- }
   72- 
   73- ( $navbar_top, $navbar_bottom ) =
   74-     $main::tbb->{'tbb_html'}->get_navbar_HTML( 'sub_navbar'  => undef,
   75-                                                'subnav_args' => undef, );
   76- unless ($TopNavbarNoPrint) {
   77- print "<div id='nb_top'>\n" . $navbar_top . "</div>\n";
   78- }
   79- if ( $cust{'misc_c01'} ) {
   80- print "<div id='misc_c01'>\n", $cust{'misc_c01'}, "\n</div>\n";
   81- }
   82- if ($printboardname) {
   83- print "<div id='glob_header'>\n", $cust{'glob_header_s'}, "<h2>$boardname</h2>\n", $cust{'glob_header_e'}, "</div>\n";
   84- }
   85- if ( $cust{'misc_c02'} ) {
   86- print "<div id='misc_c02'>\n", $cust{'misc_c02'}, "\n</div>\n";
   87- }
   88- print "<div id='misc_msgform'>\n", $cust{'misc_msgform_s'};
   89- if ( $messagenumber > 0 ) {
   90- my $subdir = '/bbs' . int( $messagenumber / 1000 );
   91- open( FILE, $dir . $subdir . '/' . $messagenumber );
   92- @message = <FILE>;
   93- close(FILE);
   94- &Print_Form($messagenumber);
   95- }
   96- else {
   97- &Print_Form;
   98- }
   99- print $cust{'misc_msgform_e'}, "</div>\n";
  100- if ( $cust{'misc_c03'} ) {
  101- print "<div id='misc_c03'>\n", $cust{'misc_c03'}, "\n</div>\n";
  102- }
  103- &Footer( $MessageFooterFile, 'credits', 'nonavbar' );
  104- } ## end sub PostForm
  105- 
  106- sub Print_Form {
  107- unless ( $_[0] == -1 ) {
  108- if (    $ArchiveOnly
  109-      || ( $_[0]      && !($AllowResponses) )
  110-      || ( !( $_[0] ) && !($AllowNewThreads) ) )
  111- {
  112- return;
  113- }
  114- }
  115- my $formid_md5 = '';
  116- if ( $FORM{'formid'} ) {
  117- $formid_md5 = $FORM{'formid'};
  118- }
  119- else {
  120- ( undef, $formid_md5 ) = $tbb->{'basic'}->create_id();
  121- }
  122- if ($PRO::VERSION) {
  123- &PRO::cb_message_form_1( 'tbb'      => $main::tbb,
  124-                          'formid'   => $formid_md5,
  125-                          'board_id' => $main::tbb->{'conf'}->{'board_id'},
  126- );
  127- }
  128- 
  129- if ($RequireProfile) {
  130- my $profilename = $name;
  131- $profilename =~ s/[^\w\.\-\']/\+/g;
  132- $profilename =~ tr/A-Z/a-z/;
  133- unless ( -e "$UserProfileDir/$profilename.txt" ) {
  134- print "<div class='alert'>\n", "<h3>", $text{'9532'}, "</h3>\n", $text{'9533'}, "\n", "</div>\n";
  135- }
  136- }
  137- print "<form enctype='multipart/form-data' method='post' action='", $DestinationURL, $BBSquery, 'md', $QS2, $QueryMode{'post'}, "' name='message' target='_self'>\n";
  138- 
  139- if ( $cust{'msg_form_01'} ) {
  140- print $cust{'msg_form_01'}, "\n";
  141- }
  142- print "<input type='hidden' name='formid' value='$formid_md5'>\n";
  143- 
  144- my ( $quotedtext, $linecnt ) = ( '', 0 );
  145- 
  146- if ( $UserEditRun || $FORM{'editmsg'} ) {
  147- if ( $FORM{'editmsg'} ) {
  148- $edit_msg = $FORM{'editmsg'};
  149- }
  150- print "<input type='hidden' name='editmsg' ", "value='$edit_msg'>\n";
  151- }
  152- elsif ( $AdminRun && $tbb->{'post'}->{'EditPost'} ) {
  153- print "<input type='hidden' name='EditPost' ", "value='$tbb->{'post'}->{'EditPost'}'>\n";
  154- }
  155- 
  156- elsif ( $_[0] > 0 ) {
  157- print "<input type='hidden' name='followup' value='$_[0]'>\n";
  158- foreach (@message) {
  159- if (/^SUBJECT>(.*)/io) {
  160- $subject = $1;
  161- if   ( ( $AutoQuote == 1 ) || ( ( $AutoQuote == 2 ) && $SepPostFormRead ) ) { next; }
  162- else                                                                        { last; }
  163- }
  164- elsif (/^POSTER>(.*)/io) { $poster = $1; next; }
  165- elsif (    (/^ADMIN>/io)
  166-         || (/^EMAIL>/io)
  167-         || (/^DATE>/io)
  168-         || (/^EMAILNOTICES>/io)
  169-         || (/^IP_ADDRESS>/io)
  170-         || (/^<!--/io)
  171-         || (/^PASSWORD>/io)
  172-         || (/^PREVIOUS>/io)
  173-         || (/^NEXT>/io)
  174-         || (/^IMAGE>/io)
  175-         || (/^LINKNAME>/io)
  176-         || (/^LINKURL>/io)
  177-         || (/^<([^>])*>>/io)
  178-         || (/^<(br|p)\s*\/?>$AutoQuoteChar /io)
  179-         || (/^<(br|p)\s*\/?>$/io)
  180-         || (/^\s\n/) )
  181- {
  182- next;
  183- }
  184- $quotedtext .= $_;
  185- $linecnt++;
  186- }
  187- if (%SmileyCode) {
  188- foreach ( keys %SmileyCode ) {
  189- my $key2 = $SmileyCode{$_};
  190- $key2       =~ s/([\[\]\(\)\\\*\+\?\\\|])/\\$1/g;
  191- $subject    =~ s/$key2/$_/g;
  192- $quotedtext =~ s/$key2/$_/g;
  193- }
  194- }
  195- 
  196- if ( $quotedtext && %FormatCode ) {
  197- require 'webbbs_share.pl';
  198- }
  199- if ($NM_Telltale)   { $subject =~ s/ $Cleaned_NM_Telltale//g; }
  200- if ($Link_Telltale) { $subject =~ s/ $Cleaned_Link_Telltale//g; }
  201- if ($Pic_Telltale)  { $subject =~ s/ $Cleaned_Pic_Telltale//g; }
  202- $subject =~ s/"/"/g;
  203- $subject =~ s/'/\'\;/g;
  204- }
  205- elsif ( $FORM{'followup'} ) {
  206- print "<input type='hidden' name='followup' ", "value='$FORM{'followup'}'>\n";
  207- }
  208- 
  209- if ( $PrepostMessage && ( $_[0] == 0 ) ) {
  210- print "<table $tablespec>\n", "<tr>\n", "<td>", $PrepostMessage, "</td>\n", "</tr>\n", "</table>\n";
  211- }
  212- elsif ( ( $_[0] > 0 ) && ( $AutoQuote == 2 ) && $SepPostFormRead ) {
  213- $quotedtext =~ s/\n/ /g;
  214- $quotedtext =~ s/<P>/\n\n/g;
  215- $quotedtext =~ s/<BR>/\n/g;
  216- $quotedtext =~ s/^$AutoQuoteChar\s*\n*$AutoQuoteChar /$AutoQuoteChar /g;
  217- $quotedtext =~ s/^\n*//g;
  218- $quotedtext =~ s/<([^>]|\n)*(>|$)/ /g;
  219- $quotedtext =~ s/\& /\&\; /g;
  220- $quotedtext =~ s/"/\"\;/g;
  221- $quotedtext =~ s/</\<\;/g;
  222- $quotedtext =~ s/>/\>\;/g;
  223- print "<div id='msg_wrap'>\n", "<div class='msg_prev'>\n";
  224- unless ( length($quotedtext) < 2 ) {
  225- print "<span id='RplyLnk' class='msg_subject' style='float:right;";
  226- print "display:none;" if ( $linecnt > 3 );
  227- print "'><a href='#postbox'>$text{'0003'}</a></span>\n";
  228- }
  229- print $text{'1002'}, " <span class='msg_subject'>$subject ($poster)</span>\n", "</div>\n";
  230- unless ( length($quotedtext) < 2 ) {
  231- my @quotedlines = split( /\n/, $quotedtext );
  232- $quotedtext = '';
  233- foreach $quotedline (@quotedlines) {
  234- $quotewrap = 0;
  235- @quotedwords = split( /\s/, $quotedline );
  236- foreach (@quotedwords) {
  237- $quotewrap += length($_) + 1;
  238- if ( $quotewrap > $InputColumns + 48 ) {
  239- $quotedtext .= "\n$_ ";
  240- $quotewrap = length($_) + 6;
  241- }
  242- else { $quotedtext .= "$_ "; }
  243- }
  244- $quotedtext .= "\n";
  245- }
  246- print "<script type='text/javascript'>\n", "function show_msg_text() {\n", "    document.getElementById('showTxtLnk').style.display = 'none';\n", "    document.getElementById('RplyLnk').style.display    = '';\n", "    document.getElementById('hideTxtLnk').style.display = '';\n", "    document.getElementById('msg_text').style.display   = '';\n", "    setFocus();\n", "}\n", "function hide_msg_text() {\n", "    document.getElementById('showTxtLnk').style.display = '';\n",
  247-     "    document.getElementById('RplyLnk').style.display    = 'none';\n", "    document.getElementById('hideTxtLnk').style.display = 'none';\n", "    document.getElementById('msg_text').style.display   = 'none';\n", "    setFocus();\n", "}\n", "function setFocus() {\n", "    document.getElementsByName('body')[0].focus();\n", "}\n", "</script>\n";
  248- print "<div id='msg_text' class='msg_text'";
  249- print " style='display:none;'" if ( $linecnt > 3 );
  250- print ">\n", "<pre class='quote'>\n", $quotedtext, "</pre>\n", "</div>\n", "<div class='msg_delete'>\n", "<span id='showTxtLnk'";
  251- print " style='display:none;'" if ( $linecnt <= 3 );
  252- print "><a href='#misc_msgform' onclick='show_msg_text();'>", $text{'1561'}, "</a></span>\n", "<span id='hideTxtLnk'";
  253- print " style='display:none;'" if ( $linecnt > 3 );
  254- print "><a href='#misc_msgform'", " onclick='hide_msg_text();'>", $text{'1562'}, "</a></span>\n", "</div>\n";
  255- }
  256- print "</div>\n";
  257- }
  258- print "<table id='postbox' $tablespec>\n", "    <tr>\n", "<th colspan='2'>";
  259- if    ($UserEditRun)  { print $text{'1504'}; }
  260- elsif ( $_[0] == -1 ) { print $text{'1504'}; }
  261- elsif ( $_[0] )       { print $text{'0003'}; }
  262- else                  { print $text{'0007'}; }
  263- print "</th>\n", "    </tr><tr id='pb_01'>\n", "<td align='right'>", $text{'1510'}, "</td>\n", "<td>";
  264- 
  265- if ( !($AdminRun) && $LockRemoteUser && $ENV{'REMOTE_USER'} ) {
  266- print "<input type='hidden' name='name' ", "value=\"$ENV{'REMOTE_USER'}\">", "<span class='strong'>$ENV{'REMOTE_USER'}</span>";
  267- $profilename = $ENV{'REMOTE_USER'};
  268- }
  269- elsif ($UserEditRun) {
  270- print "<input type='hidden' name='name' ", "value=\"$msg_content->{'poster_name'}\">", "<span class='strong'>$msg_content->{'poster_name'}</span>";
  271- }
  272- else {
  273- print "<input type='text' name='name' ", "size='$InputLength' maxlength='$MaxInputLength'";
  274- if ( $_[0] == -1 ) {
  275- print " value=\"$name\"";
  276- $profilename = $name;
  277- }
  278- elsif ( $Cookies{'name'} ) {
  279- print " value=\"$Cookies{'name'}\"";
  280- $profilename = $Cookies{'name'};
  281- }
  282- print ">";
  283- }
  284- print "</td>\n", "    </tr><tr id='pb_02'>\n", "<td align='right'>", $text{'1511'}, "</td>\n", "<td>";
  285- if (    $RequireEmail
  286-      && $RequireProfile
  287-      && ( $_[0] > 0 )
  288-      && !($SepPostFormRead) )
  289- {
  290- $email = '';
  291- $profilename =~ s/[^\w\.\-\']/\+/g;
  292- $profilename =~ tr/A-Z/a-z/;
  293- if ( open( FILE, "$UserProfileDir/$profilename.txt" ) ) {
  294- binmode(FILE);
  295- while (<FILE>) {
  296- if (/^EMAIL>(.*)/i) { $email = $1; last; }
  297- }
  298- close(FILE);
  299- }
  300- }
  301- if ($UserEditRun) {
  302- print "<input type='text' name='email' ", "size='$InputLength' maxlength='100'", " value=\"$msg_content->{'email'}\"", ">";
  303- }
  304- elsif ( !($AdminRun) && $email && $RequireEmail && $RequireProfile ) {
  305- if ( $DisplayEmail && !($BlindEmail) ) {
  306- print "<span class='strong'>$email</span>";
  307- }
  308- else { print "<span class='strong'>Private!</span>"; }
  309- }
  310- else {
  311- print "<input type='text' name='email' ", "size='$InputLength' maxlength='100'";
  312- if ( $_[0] == -1 ) {
  313- print " value=\"$email\"";
  314- }
  315- elsif ( $Cookies{'email'} ) {
  316- print " value=\"$Cookies{'email'}\"";
  317- }
  318- print ">";
  319- }
  320- print "</td>\n", "    </tr><tr id='pb_03'>\n", "<td align='right'>", $text{'1512'}, "</td>\n", "<td>";
  321- if ( @SubjectPrefixes && ( $_[0] < 1 ) && !($followup) && ( !$UserEditRun ) ) {
  322- print "<select name='subjectprefix'>", "<option value=''>", $text{'1530'};
  323- foreach (@SubjectPrefixes) {
  324- print "<option";
  325- if ( $FORM{'subjectprefix'} eq $_ ) { print " selected"; }
  326- print " value=\"$_\">$_";
  327- }
  328- print "</select><br>\n";
  329- }
  330- print "<input type='text' name='subject' ", "size='$InputLength' maxlength='$MaxInputLength'";
  331- if ($UserEditRun) {
  332- print " value=\"$msg_content->{'subject'}\"";
  333- }
  334- elsif ( $_[0] == -1 ) {
  335- if ($subject) {
  336- print " value=\"$subject\"";
  337- }
  338- elsif ( $FORM{'subject'} ) {
  339- print " value=\"$FORM{'subject'}\"";
  340- }
  341- }
  342- elsif ( $_[0] ) {
  343- print " value=\"";
  344- unless ( $subject =~ /^$text{'1513'}/ ) { print "$text{'1513'} "; }
  345- print "$subject\"";
  346- }
  347- print "></td>\n", "    </tr><tr id='pb_04'>\n", "<td colspan='2'>", "$text{'1514'}\n";
  348- if ( $cust{'msg_form_20'} ) {
  349- print $cust{'msg_form_20'}, "\n";
  350- }
  351- print "<textarea cols='$InputColumns' rows='$InputRows' name='body'>";
  352- if ($UserEditRun) {
  353- print $msg_content->{'text'};
  354- 
  355- }
  356- if ( $_[0] == -1 ) {
  357- $body =~ s/\n$//g;
  358- print $body;
  359- }
  360- elsif ( $_[0] && ( $AutoQuote == 1 ) ) {
  361- $quotedtext =~ s/<PRE>$AutoQuoteChar .+?<\/PRE>\n?//sgi;
  362- my %pres    = ();
  363- my $pre_cnt = 1;
  364- while ( $quotedtext =~ m/<pre>(.+?)<\/pre>/sig ) {
  365- $pres{$pre_cnt} = $1;
  366- $pre_cnt++;
  367- }
  368- for ( keys %pres ) {
  369- my $code = $pres{$_};
  370- $pres{$_} =~ s/\n/\n$AutoQuoteChar /sgi;
  371- $pres{$_} = "\n<PRE>\n$AutoQuoteChar " . $pres{$_} . "\n</PRE>";
  372- if (%FormatCode) {
  373- $pres{$_} = decode_BB_code( $pres{$_}, \%FormatCode );
  374- }
  375- $code =~ s/\//\\\//gi;
  376- my $newcode = '[[pre' . $_ . ']]';
  377- $quotedtext =~ s/\Q$code\E/$newcode/sig;
  378- }
  379- $quotedtext =~ s/\n/ /g;
  380- 
  381- if (%FormatCode) {
  382- $quotedtext = decode_BB_code( $quotedtext, \%FormatCode );
  383- }
  384- $quotedtext =~ s/\s*<P>/\n\n$AutoQuoteChar /gi;
  385- $quotedtext =~ s/\s*<BR\s*\/?>/\n$AutoQuoteChar /gi;
  386- $quotedtext =~ s/^$AutoQuoteChar\s*\n*$AutoQuoteChar /$AutoQuoteChar /g;
  387- $quotedtext =~ s/^\n*//g;
  388- $quotedtext =~ s/<([^>]|\n)*(>|$)/ /g;
  389- $quotedtext =~ s/\& /\&\; /g;
  390- $quotedtext =~ s/"/\"\;/g;
  391- $quotedtext =~ s/</\<\;/g;
  392- $quotedtext =~ s/>/\>\;/g;
  393- my @quotedlines = split( /\n/, $quotedtext );
  394- foreach $quotedline (@quotedlines) {
  395- $quotewrap = 0;
  396- @quotedwords = split( /\s/, $quotedline );
  397- foreach (@quotedwords) {
  398- if ( $_ =~ /\[\[pre(\d+)\]\]/ ) {
  399- print $pres{$1};
  400- $quotewrap = 0;
  401- next;
  402- }
  403- $quotewrap += length($_) + 1;
  404- if ( $quotewrap > $InputColumns ) {
  405- print "\n$AutoQuoteChar $_ ";
  406- $quotewrap = length($_) + 6;
  407- }
  408- else { print "$_ "; }
  409- }
  410- print "\n";
  411- }
  412- }
  413- print "</textarea>\n";
  414- if ( $cust{'msg_form_21'} ) {
  415- print $cust{'msg_form_21'}, "\n";
  416- }
  417- print "</td>\n", "    </tr>\n";
  418- if ( $cust{'msg_form_30'} ) {
  419- print $cust{'msg_form_30'}, "\n";
  420- }
  421- if ($AllowURLs) {
  422- print "<tr id='pb_05'><td></td>\n", "<td>", $text{'1500'}, "</td>\n", "    </tr><tr id='pb_06'>\n", "<td align='right'>", $text{'1515'}, "</td>\n", "<td><input type='text' ", "name='url' size='$InputLength' maxlength='250' value=\"";
  423- 
  424- if ($UserEditRun) {
  425- print $msg_content->{'linkurl'};
  426- }
  427- elsif ( $_[0] == -1 )         { print $message_url; }
  428- elsif ( $Cookies{'linkurl'} ) { print $Cookies{'linkurl'}; }
  429- else                          { print "http://"; }
  430- print "\"></td>\n", "    </tr><tr id='pb_07'>\n", "<td align='right'>", $text{'1516'}, "</td>\n", "<td><input type='text' ", "name='url_title' size='$InputLength' maxlength='$MaxInputLength'";
  431- if ($UserEditRun) {
  432- print ' value="', $msg_content->{'linkname'}, '"';
  433- }
  434- elsif ( $_[0] == -1 ) { print " value=\"$message_url_title\""; }
  435- elsif ( $Cookies{'linkname'} ) {
  436- print " value=\"$Cookies{'linkname'}\"";
  437- }
  438- print "></td>\n", "    </tr>\n";
  439- }
  440- if ( $cust{'msg_form_31'} ) {
  441- print $cust{'msg_form_31'}, "\n";
  442- }
  443- if ($AllowPics) {
  444- print "<tr id='pb_08'><td></td>\n", "<td>", $text{'1501'}, "</td>\n", "    </tr><tr id='pb_09'>\n", "<td align='right'>", $text{'1517'}, "</td>\n", "<td><input type='text' ", "name='imageurl' size='$InputLength' maxlength='250' value=\"";
  445- if ($UserEditRun) {
  446- print $msg_content->{'image_url'};
  447- }
  448- elsif ( $_[0] == -1 )          { print $image_url; }
  449- elsif ( $Cookies{'imageurl'} ) { print $Cookies{'imageurl'}; }
  450- else                           { print "http://"; }
  451- print "\"></td>\n", "    </tr>\n";
  452- if ($AllowUserPicsUpload) {
  453- print "<tr id='pb_10'><td></td>\n", "<td>", $text{'1507'}, "</td>\n", "    </tr><tr id='pb_11'>\n", "<td align='right'>", $text{'2505'}, "</td>\n", "<td>", "<input type='file' name='postgraphic' size='$InputLength'>", "</td>\n", "    </tr>\n";
  454- }
  455- }
  456- if ( $cust{'msg_form_32'} ) {
  457- print $cust{'msg_form_32'}, "\n";
  458- }
  459- if ( $AllowUserDeletion || $AllowUserEditHours ) {
  460- print "<tr id='pb_12'><td></td>\n", "<td>", $text{'1502'}, "</td>\n", "    </tr>\n";
  461- }
  462- elsif ($AllowProfiles) {
  463- print "<tr id='pb_13'><td></td>\n", "<td>", $text{'1505'}, "</td>\n", "    </tr>\n";
  464- }
  465- if ( $AllowUserDeletion || $AllowUserEditHours || $AllowProfiles ) {
  466- print "<tr id='pb_14'><td align='right'>", $text{'0205'}, "</td>\n", "<td><input type='password' name='password'";
  467- if ($UserEditRun) {
  468- print " value=\"$FORM{'newpassword'}\"";
  469- }
  470- elsif ( $FORM{'password'} ) { print " value=\"$FORM{'password'}\""; }
  471- print " size='$InputLength'></td>\n", "    </tr>\n";
  472- if ($UseCookies) {
  473- print "<tr id='pb_15'><td align='right'>", $text{'6720'}, "</td>\n", "<td>", "<label><input type='radio' name='CookiePW' value='Yes'";
  474- unless ( $FORM{'CookiePW'} eq "No" ) {
  475- if ( $FORM{'password'} ) { print " checked"; }
  476- $YesChecked = 1;
  477- }
  478- print "> $text{'1519'}</label> ", "<label><input type='radio' name='CookiePW' value='No'";
  479- unless ($YesChecked) { print " checked"; }
  480- print "> $text{'1520'}</label></td>\n", "    </tr>\n";
  481- }
  482- }
  483- if ( $cust{'msg_form_33'} ) {
  484- print $cust{'msg_form_33'}, "\n";
  485- }
  486- if ( $mailprog && $AllowEmailNotices ) {
  487- print "<tr id='pb_16'><td></td>\n", "<td><label><input type='checkbox' name='wantnotice'";
  488- unless (    ( ( $Cookies{'wantnotice'} eq "no" ) || ( ( !$Cookies{'wantnotice'} ) && ( !$EmailNoticesCheckbox ) ) )
  489-          || ( $msg_content->{'emailnotices'} ) )
  490- {
  491- print " checked";
  492- }
  493- print " value='yes'> $text{'1503'}</label></td>\n", "    </tr>\n";
  494- }
  495- if ( $cust{'msg_form_34'} ) {
  496- print $cust{'msg_form_34'}, "\n";
  497- }
  498- if ($AdminRun) {
  499- print "<tr id='pb_17'><td align='right'>";
  500- print "$text{'1518'}";
  501- print "</td><td><label><INPUT TYPE='RADIO' NAME=\"Admin\" ";
  502- print "VALUE=\"AdminPost\"";
  503- if ( ( $_[0] > -1 ) || ( $FORM{'Admin'} eq "AdminPost" ) ) {
  504- print " CHECKED";
  505- }
  506- print "> $text{'1519'}</label>";
  507- print "<label><INPUT TYPE='RADIO' NAME=\"Admin\" ";
  508- print "VALUE=\"No\"";
  509- if ( ( $_[0] == -1 ) && ( $FORM{'Admin'} ne "AdminPost" ) ) {
  510- print " CHECKED";
  511- }
  512- print "> $text{'1520'}</label>";
  513- print "</td></tr>\n";
  514- }
  515- if ( $cust{'msg_form_35'} ) {
  516- print $cust{'msg_form_35'}, "\n";
  517- }
  518- print "<tr><td colspan='2' class='misc_msgform_b'>";
  519- if ($SpellCheckURL) {
  520- print "<button class='button' type='button' onClick='spellcheck_sendtext(\"message\", \"body\", \"$spellcheck_popup_width\", \"$spellcheck_popup_height\", \"$spellcheck_popup_top\", \"$spellcheck_popup_left\")'>\n", "$text{'1552'}</button>\n";
  521- }
  522- if ($UserEditRun) {
  523- print "<input TYPE='SUBMIT' class='button' name='Post' value=\"$text{'0221'}\">\n";
  524- }
  525- else {
  526- if ($AllowPreview) {
  527- print "<input TYPE='SUBMIT' class='button' name='Preview' value=\"$text{'1550'}\"> \n";
  528- }
  529- print "<input TYPE='SUBMIT' class='button' name='Post' value=\"$text{'1551'}\">\n";
  530- }
  531- print "</td>\n", "    </tr>\n", "</table>\n", "</form>\n";
  532- if ($SpellCheckURL) {
  533- print "<form name='send' action='$SpellCheckURL' method='POST' target='SpellChecker'>\n", "<input type='hidden' name='checkme'>\n", "<input type='hidden' name='form'>\n", "<input type='hidden' name='field'>\n", "<input type='hidden' name='spell' value='check'>\n", "</form>\n";
  534- }
  535- } ## end sub Print_Form
  536- 
  537- sub SetCookieData {
  538- &GetCookie($boardname);
  539- $FORM{'ListType'} = $Cookies{'listtype'};
  540- $FORM{'password'} = $Cookies{'password'};
  541- if ( !$name )  { $name  = $Cookies{'name'}; }
  542- if ( !$email ) { $email = $Cookies{'email'}; }
  543- } ## end sub SetCookieData
  544- 
  545- 1;