# FILE: src-board-subs-1 #------------------------------------------------------------------------------- # This script is copyright (c) 1998 by DiscusWare, LLC, all rights reserved. # Its use is subject to the license agreement that can be found at the following # URL: http://www.chem.hope.edu/discus/license #------------------------------------------------------------------------------- #---SEPARATOR---# #REQ:get_number #REQ:new_file #REQ:get_date_time sub add_topic { local ($new_topic, $new_topic_group, $privs, $templ, $topic_unformatted) = @_; local ($topic_number,$topic_name,$me_name,$num,$dt,$lm,@main,$group); local ($main_line,$str,$time,$posted, $num_local); $num_local = &get_number; &lock("$admin_dir/posting.txt"); open (FILE, ">>$admin_dir/posting.txt"); print FILE "$num_local:", ":$new_topic_group:$new_topic_group:\n" if $privs ne "public"; print FILE "$num_local:~:$new_topic_group:$new_topic_group:\n" if $privs eq "public"; close (FILE); &unlock("$admin_dir/posting.txt"); &lock("$admin_dir/security.txt"); open (FILE, ">>$admin_dir/security.txt"); print FILE "$num_local:~:::\n"; close (FILE); &unlock("$admin_dir/security.txt"); $group = $new_topic_group; mkdir ("$message_dir/$num_local",0777) || &error_message("Directory Creation Error", "Could not create new directory for this topic! (System returned the error: '$!'.) If you are running unix, check that permissions on the 'messages' subdirectory are 0777 (rwxrwxrwx)."); chmod (0777, "$message_dir/$num_local"); $topic_number = $num_local; $topic_name = $new_topic; $me_name = $new_topic; $dt = &get_date_time('long'); $dt =~ s/\W//g; &new_file($num_local,$num_local,0,$new_topic_group,$new_topic,"SublistCreateAbout") if $templ eq "yes"; &new_file($num_local,$num_local,0,$new_topic_group,$new_topic,"Sublist") if $templ ne "yes"; if ($templ) { $message_hold = $L{WELCOME_TO_TOPIC}; $message_hold =~ s/\%topicname/$topic_unformatted/g; ($message) = &ex('webtags', $message_hold); &ex('change_about_message', "$message_dir/$num_local/$num_local.$ext", $message_hold, $message); } open (BLANKINDEX, ">$message_dir/$num_local/index.html"); close (BLANKINDEX); chmod (0666, "$message_dir/$num_local/index.html"); &lock("$message_dir/board-topics.html"); open(MAIN_1, "$message_dir/board-topics.html") || &error_message("File Error", "Could not open main topics file (board-topics.html)."); @main = ; close(MAIN_1); $posted = 0; open(MAIN_1, ">$message_dir/board-topics.html") || &error_message("File Error", "Could not write main topics file (board-topics.html)."); foreach $main_line (@main) { if ($main_line =~ // && $posted == 0) { if (open (FILE_c, "$admin_dir/frontpage_conf.txt")) { @file_c = ; close (FILE_c); foreach $line_c (@file_c) { if ($line_c =~ m|^(\w+)=(.*)|) { $FPCONFIG{$1} = $2; } } } else { $FPCONFIG{"Bold"} = "1"; $FPCONFIG{"Group"} = "0"; $FPCONFIG{"Date"} = "1"; } $new_topic = &remove_links($new_topic); $str = &JavaScript_prepare($new_topic); print MAIN_1 "
  • "; print MAIN_1 "" if $FPCONFIG{"Bold"} == 1; print MAIN_1 "$new_topic"; print MAIN_1 "" if $FPCONFIG{"Bold"} == 1; print MAIN_1 " "; print MAIN_1 "(\u$new_topic_group)" if $FPCONFIG{"Group"} == 1; print MAIN_1 " "; $time = &get_date_time('short'); print MAIN_1 "$time" if $FPCONFIG{"Date"} == 1; print MAIN_1 "\n


    \n"; $posted = 1; print MAIN_1 "\n"; } elsif ($main_line =~ //) { } else { print MAIN_1 $main_line; } } close(MAIN_1); &unlock("$message_dir/board-topics.html"); return $num_local; } #---SEPARATOR---# #REQ:recurse sub remove_topic { local ($remove_number) = @_; local (@lines,$line,$filenumber,$topic_number); &lock("$message_dir/board-topics.html"); open(MAIN_1, "$message_dir/board-topics.html") || &error_message("File Error", "Could not open main topics file (board-topics.html)."); @lines = ; close(MAIN_1); open(MAIN_1, ">" . "$message_dir/board-topics.html") || &error_message("File Error", "Could not write main topics file (board-topics.html)."); foreach $line (@lines) { if ($line =~ //) { print MAIN_1 $line if ($1 != $remove_number); } elsif ($line =~ //) { print MAIN_1 $line if ($1 != $remove_number); } elsif ($line =~ //) { print MAIN_1 $line if ($1 != $remove_number); } else { print MAIN_1 $line; } } close (MAIN_1); &unlock("$message_dir/board-topics.html"); if (-e "$message_dir/$remove_number") { $dir = "$message_dir/$remove_number"; } else { $dir = "$secdir/$remove_number"; } opendir(DIR, $dir); while ($f = readdir(DIR)) { unlink ("$dir/$f"); } closedir(DIR); rmdir("$dir/$f"); &lock("$admin_dir/log.txt"); open (LOG, "$admin_dir/log.txt"); @LOG = ; close (LOG); foreach $line (@LOG) { ($what, $who, $when, $where) = split(/;/, $line); ($topic, $page) = split(/\//, $where); if ($topic == $remove_number) { $line = ""; } } @LOG = grep(/\S/, @LOG); open (LOG, ">$admin_dir/log.txt"); print LOG @LOG; close (LOG); &unlock("$admin_dir/log.txt"); &lock("$admin_dir/posting.txt"); open (POSTING, "$admin_dir/posting.txt"); @posting = ; close (POSTING); @posting = grep(!/^$remove_number:/, @posting); open (POSTING, ">$admin_dir/posting.txt"); print POSTING @posting; close (POSTING); &unlock("$admin_dir/posting.txt"); &lock("$admin_dir/postoptions.txt"); open (POSTING, "$admin_dir/postoptions.txt"); @posting = ; close (POSTING); @posting = grep(!/^$remove_number:/, @posting); open (POSTING, ">$admin_dir/postoptions.txt"); print POSTING @posting; close (POSTING); &unlock("$admin_dir/postoptions.txt"); &lock("$admin_dir/security.txt"); open (READING, "$admin_dir/security.txt"); @reading = ; close (READING); @reading = grep(!/^$remove_number:/, @reading); open (READING, ">$admin_dir/security.txt"); print READING @reading; close (READING); &unlock("$admin_dir/security.txt"); } #---SEPARATOR---# #REQ:recurse #REQ:extract_lastmodified #REQ:get_date_time sub rename_topic { local ($topic_number_in, $newname) = @_; local ($line_top,$url,$lm,$str,@lines_top); &lock("$message_dir/board-topics.html"); open(MAIN_1, "$message_dir/board-topics.html") || &error_message("File Error", "Could not open main topics file (board-topics.html)."); @lines_top = ; close(MAIN_1); foreach $line_top (@lines_top) { if ($line_top =~ /^/) { $lm = &extract_lastmodified ("$topic_number_in:$topic_number_in"); &extract("//$topic_number_in/$topic_number_in.$ext"); $url = "$message_url/$topic_number_in/$topic_number_in.$ext"; $url .= "?$lm" if !$noqm; if (open (FILE_c, "$admin_dir/frontpage_conf.txt")) { @file_c = ; close (FILE_c); foreach $line_c (@file_c) { if ($line_c =~ m|^(\w+)=(.*)|) { $FPCONFIG{$1} = $2; } } } else { $FPCONFIG{"Bold"} = "1"; $FPCONFIG{"Group"} = "0"; $FPCONFIG{"Date"} = "1"; } $lmtime = 0; if ($line_top =~ m|.*(.*)|) { $datetime = $1; } else { $lmtime = (stat ("$html_dir/messages/$topic_number_in/$topic_number_in.$ext"))[9] if -e "$html_dir/messages/$topic_number_in/$topic_number_in.$ext"; $lmtime = (stat ("$secdir/$topic_number_in/$topic_number_in.$ext"))[9] if !-e "$html_dir/messages/$topic_number_in/$topic_number_in.$ext"; } $line_top = "
  • "; $line_top .= "" if $FPCONFIG{'Bold'} == 1; $line_top .= "$newname"; $line_top .= "" if $FPCONFIG{'Bold'} == 1; $line_top .= " (\u$owner)" if $FPCONFIG{'Group'} == 1; if ($FPCONFIG{'Date'} == 1 && $lmtime != 0) { $line_top .= " " . &get_date_time('short', $lmtime) . ""; } elsif ($FPCONFIG{'Date'} == 1) { $line_top .= " $datetime"; } $line_top .= "\n"; } } open(MAIN_1, ">$message_dir/board-topics.html") || &error_message("File Error", "Could not write main topics file (board-topics.html)."); print MAIN_1 @lines_top; close (MAIN_1); &unlock("$message_dir/board-topics.html"); &recurse ("$topic_number_in", "$topic_number_in", "rename:Topic", $newname); } #---SEPARATOR---# sub reorder_topics { local ($array) = @_; local ($topic_number,@ascending,$line,@lines,%newarray,$flag,$key, %printed); @ascending = split(/:/, $array); &lock("$message_dir/board-topics.html"); open(MAIN_1, "$message_dir/board-topics.html") || &error_message("File Error", "Could not open main topics file (board-topics.html)."); @lines = ; close(MAIN_1); undef %printed; foreach $line (@lines) { if ($line =~ //) { $newarray{$1} = $line; $printed{$1} = 0; } elsif ($line =~ m||) { $descrarray{$1} = $line; } } open(MAIN_1, ">" . "$message_dir/board-topics.html") || &error_message("File Error", "Could not write main topics file (board-topics.html)."); $flag = 0; foreach $line (@lines) { if ($line =~ // && $flag == 0) { $flag = 1; foreach $key (@ascending) { print MAIN_1 $newarray{$key}; print MAIN_1 $descrarray{$key}; $printed{$key} = 1; } foreach $key (keys(%printed)) { print MAIN_1 $newarray{$key} if $printed{$key} == 0; print MAIN_1 $descrarray{$key} if $printed{$key} == 0; } } elsif ($line =~ //) { $flag = 0; print MAIN_1 $line; } elsif ($flag == 0) { print MAIN_1 $line; } } close (MAIN_1); &unlock("$message_dir/board-topics.html"); } #---SEPARATOR---# sub change_main_message { local ($newmessage, $source) = @_; local ($line, @lines,$messageflag, $flag); &lock("$message_dir/board-topics.html"); open(MAIN_1, "$message_dir/board-topics.html") || &error_message("File Error", "Could not open main topics file (board-topics.html)."); @lines = ; close(MAIN_1); open(MAIN_1, ">" . "$message_dir/board-topics.html") || &error_message("File Error", "Could not write main topics file (board-topics.html)."); $messageflag = 0; foreach $line (@lines) { if ($line =~ m||) { $flag = 1; print MAIN_1 $line; print MAIN_1 $newmessage . "\n"; } elsif ($line =~ m||) { print MAIN_1 $line; $flag = 0; } elsif ($flag == 1) { if ($line =~ /\n"; } } else { print MAIN_1 $line; } } close (MAIN_1); &unlock("$message_dir/board-topics.html"); } #---SEPARATOR---# sub register_discus { &header; print 'Password Changed'; print "\n"; print "$fs
    Password Set
    "; print "\n
    \nCongratulations, your superuser password was successfully set.

    \n"; print "At this time, you need to "Register" the Discus\n"; print "program by clicking on "Register Now!" below.

    \n"; print "

    \n"; print "\n" if $pro; print "\n" if $pro_license; print "\n"; print "
    \n"; $contact =~ m|(.*)|; $email = $1; $name = $2; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
    $fs", "URL:
    $fs", "Title:
    $fs", "Your Name:
    $fs", "Your E-mail:
    $fs Yes! Inform me when new upgrades are available.
    \n

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

    \n\n"; exit(0); } #---SEPARATOR---# #REQ:recurse sub change_topic_group { local ($topic_number, $new_group, $smart) = @_; local ($line, @lines,$old_group); if (open (FILE_c, "$admin_dir/frontpage_conf.txt")) { @file_c = ; close (FILE_c); foreach $line_c (@file_c) { if ($line_c =~ m|^(\w+)=(.*)|) { $FPCONFIG{$1} = $2; } } } else { $FPCONFIG{"Bold"} = "1"; $FPCONFIG{"Group"} = "0"; $FPCONFIG{"Date"} = "1"; } open(MAIN_1, "$message_dir/board-topics.html") || &error_message("File Error", "Could not open main topics file (board-topics.html)."); @lines = ; close(MAIN_1); if ($FPCONFIG{"Group"} == 1) { &lock("$message_dir/board-topics.html"); open(MAIN_1, ">" . "$message_dir/board-topics.html") || &error_message("File Error", "Could not write main topics file (board-topics.html)."); foreach $line (@lines) { if ($line =~ //) { if ($1 == $topic_number) { if ($line =~ m| \(\w+\)|i) { $line = join("", $`, " (\u$new_group)", $'); } print MAIN_1 $line; } else { print MAIN_1 $line; } } else { print MAIN_1 $line; } } close (MAIN_1); &unlock("$message_dir/board-topics.html"); } if ($smart) { &extract("//$topic_number/$topic_number.$ext"); $oldgroup = $owner; @files = ('posting'); push (@files, 'security') if $pro; foreach $f (@files) { &lock("$admin_dir/$f.txt"); open (FILE, "$admin_dir/$f.txt"); @file = ; close (FILE); foreach $line (@file) { if ($line =~ m|^$topic_number:([^:]*):([^:]*):([^:]*):|) { ($public, $users, $moderators, $after) = ($1, $2, $3, $'); @u = split(/,/, $users); if (scalar(@u) > 1 && grep(/^$oldgroup$/, @u)) { $users .= ",$new_group" if !grep(/^$new_group$/, @u); } elsif ($users eq "$oldgroup") { $users = "$new_group"; } @u = split(/,/, $moderators); if (scalar(@u) > 1 && grep(/^$oldgroup$/, @u)) { $moderators .= ",$new_group" if !grep(/^$new_group$/, @u); } elsif ($moderators eq "$oldgroup") { $moderators = "$new_group"; } $line = join(":", $topic_number, $public, $users, $moderators, $after); } } open (FILE, ">$admin_dir/$f.txt"); print FILE @file; close (FILE); &unlock("$admin_dir/$f.txt"); } } &recurse ($topic_number,$topic_number,"chgrp",$new_group); } #---SEPARATOR---# #REQ:printuntil sub preview_board_colors { ($bgcolor,$text,$link,$vlink,$alink,$face,$size,$username,$image, $move_board) = @_; &header; &printuntil(1, 1, 0, "Preview Appearance", 1); print "
    Preview Appearance
    \n"; &ex('printuntil', 3, 7, 0, "", 0, 1); print "
    \n"; print "Board Manager: Preview Appearance
    \n"; print "

    This is the color of normal text.

    \n"; print "This is the color of an unvisited link.

    \n"; print "This is the color of a visited link.

    \n"; print "This is the color of an active link.

    \n"; print "(Note that the background of this page is the background color you have selected. The horizontal rules on this page are identical to those that will be displayed on pages.)

    Also note that some text on the board is displayed as size -1 (one size smaller than the specified base font size). This is a preview of that kind of text.
    \n"; print "


    \n"; print "
    \n"; print "\n"; print "\n"; print "
    \n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
    $fsBackground:
    $fsText:
    $fsLink:
    $fsVisited Link:
    $fsActive Link:
    $fsFont Face:
    $fsFont Size:
    $fsBackground Image:
    \n

    \n"; &ex('printuntil', 9, 13, 0, "", 0, 1); print "\n"; print "\n"; print "

    \n"; print "\n"; print "\n"; print "\n" if $move_board; print "
    \n"; &ex('printuntil', 15, 17, 0, "", 0, 1); exit(0); } #---SEPARATOR---# #REQ:prepare_navbar #REQ:extract_lastmodified #REQ:change_layout sub change_board_colors { local ($bgcolor,$text,$link,$vlink,$alink,$face,$size,$background,$move_board,$flag_noregen) = @_; &ex('auto_configure_email', 1); &lock("*"); $image = $background; local ($addfile, $template, @topics, @mainmessage, @description); if (open (FILE, "$admin_dir/frontpage_conf.txt")) { @file = ; close (FILE); foreach $line (@file) { $line =~ m|^(\w+)=(.*)|; $FPCONFIG{$1} = $2; } } $colorstr = join("\t", $bgcolor, $text, $link, $vlink, $alink, $background, $size, $face); local (@topic, @group_list, $line); open (TOPFILE, "$html_dir/messages/board-topics.html"); @topfile = ; close (TOPFILE); $flag = 0; undef (@topics); undef (@mainmessage); undef (@description); undef (@tmsg); foreach $line (@topfile) { if ($line =~ m|]*>?|i) { $line = join("", "", $'); if ($move_board) { if ($line =~ m|"([^"]+)/messages/(\d+)/(\d+)\.|) { if ($1 ne $html_url) { $old_html_url = $1 if $old_html_url eq ""; $line = join("", $`, "\"$message_url/$2/$3.", $'); } } if ($line =~ m|$html_url/messages/(\d+)/(\d+)\.$ext#(\w+)|) { $line = join("", $`, "$html_url/messages/$1/$2.$ext?$3", $'); } if ($line =~ m|"([^"]+)/board-auth\.(\w+)\?file=/(\d+)/(\d+)\.|) { $line = join("", $`, "\"$script_url/board-auth.$cgi_extension?file=/$3/$4.", $'); } } $line =~ s/

    //g; push (@topics, $line); } elsif ($line =~ m|^|) { $flag = 1; push (@mainmessage, $line); } elsif ($line =~ m|^|) { $flag = 0; $mainmessage_src =~ s/\s*$//; if ($mainmessage_src =~ /[^\w\%\+]/) { $mainmessage_src = &escape($mainmessage_src); } push (@mainmessage, "\n"); push (@mainmessage, $line); } elsif ($flag == 1) { if ($line =~ m|^| ) { $mainmessage_src = $1; } elsif ($line =~ m|^\s*$|) { $flag = 1; } else { $mainmessage_src .= $line; } } elsif ($line =~ m|^|i) { $flag = 0; } elsif ($flag == 2) { push (@description, $line); } elsif ($line =~ m|^|) { $flag = 3; push (@tmsg, $line); } elsif ($line =~ m|^|) { $flag = 0; push (@tmsg, $line); } elsif ($flag == 3) { $line =~ s|||g if $move_board; push (@tmsg, $line); } elsif ($line =~ m||i) { $meta_description = $1; } elsif ($line =~ m||i) { $meta_keywords = $1; } elsif ($line =~ m||i) { $meta_robots = $1; } } if (scalar(@tmsg) == 0) { $tm = "\n

    \n\n"; @tmsg = split(/\n/, $tm); foreach $line (@tmsg) { $line .= "\n"; } } if (scalar(@mainmessage) == 0) { $tm = "\n
    Powered by Discus
    \n\n"; @mainmessage = split(/\n/, $tm); foreach $line (@mainmessage) { $line .= "\n"; } } open (FILExx, "$admin_dir/newpage.conf"); @file = ; close (FILExx); @mainfile = @file; if (!(grep(//, @file))) { &error_message("Page Regeneration Error", "Template file (newpage.conf) has been corrupted; regeneration stopped for safety reasons."); } $str = "$titlej Topics"; $timestr = ""; open (TOPFILE, ">$html_dir/messages/board-topics.html"); $flag = 0; $flag2 = 0; foreach $line (@file) { if ($line =~ //) { $flag = 1; } elsif ($flag == 1) { while ($line =~ /\$(\w+)/) { $this = eval "\$$1"; $line = $` . $this . $'; } if ($line =~ //) { $flag2 = 1; } elsif ($flag2 == 1 && $line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { print TOPFILE "\n"; print TOPFILE $line; } elsif ($line =~ m||) { $flag2 = 1; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { $flag2 = 1; print TOPFILE "
    \n"; foreach $line_to (@topics) { if ($line_to =~ m|^


    \n" if !$description_seen{$t}; } else { print TOPFILE $line_to; } } print TOPFILE "\n"; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { $flag2 = 1; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { $flag2 = 1; print TOPFILE "
    \n"; $tstr2 = join("", @mainmessage); print TOPFILE $tstr2; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { $flag2 = 1; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { $flag2 = 1; print TOPFILE @tmsg; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m||) { $flag2 = 1; } elsif ($line =~ m||) { $flag2 = 0; } elsif ($line =~ m|\n"; } elsif ($line =~ m|-->| && $flag2 == 3) { $flag2 = 0; } elsif ($line =~ m|^|) { # Skip } elsif ($flag2 == 0) { print TOPFILE $line; } } } close (TOPFILE); if ($flag_noregen == -45) { &unlock("*"); return 1; } foreach $linettt (@topics) { if ($linettt =~ m||i) { $topic_number = $1; &extract("//$topic_number/$topic_number.$ext"); if (open(FILEx, "$message_dir/$topic_number/newpage.conf")) { @newpgfile = ; close (FILEx); } elsif (open(FILEx, "$secdir/$topic_number/newpage.conf")) { @newpgfile = ; close (FILEx); } else { @newpgfile = @mainfile; } open (POST, "$admin_dir/posting.txt"); @post = ; close (POST); ($line) = grep(/^$topic_number:/, @post); ($t, $ip) = split(/:/, $line); if ($ip eq "") { $privpub = "private"; } else { $privpub = "public"; } open (POST, "$admin_dir/postoptions.txt"); @post = ; close (POST); ($line) = grep(/^$topic:/, @post); ($t, $an) = split(/:/, $line); $anflag = $an; $anflag = 1 if ($GLOBAL_OPTIONS{'anonymous'} == 0 && $GLOBAL_OPTIONS{'options_used'} == 1); if (open(FILExx, "$message_dir/$topic_number/addmessage.conf")) { @addfile = ; close (FILExx); } elsif (open(FILExx, "$secdir/$topic_number/addmessage.conf")) { @addfile = ; close (FILExx); } elsif ($line =~ m|::::\s*$| && !-e "$message_dir/$topic_number/addmessage.conf" && !-e "$secdir/$topic_number/addmessage.conf") { $l = $L{BPPOSTINGDISABLEDDESCR}; $l =~ s|\%aopen||g; $l =~ s|\%aclose||g; @addfile = ("
    $l
    "); } else { open (FILExx, "$admin_dir/addmessage-$privpub.conf"); @addfile = ; close (FILExx); } @addfile = grep(!/^/, @addfile) if $anflag; $addfile = join("\n", @addfile); $addfile .= "\n"; $addfile =~ s///g; $addfile =~ s//$script_url\/board-post.$cgi_extension/g; $template = join("\n", @newpgfile); $template .= "\n"; ®enerate_page($topic_number, $topic_number, $topic_number, $template, $addfile, $move_board); } } &unlock("*"); } sub regenerate_page { local ($topic, $page, $my_parent, $template, $addfile, $move_board, $meta_override) = @_; local (@head, @sublist, $line); local ($head1, $color1, $lm1, $ann, $ann_src, $sublist1, $about1, $about_src1, $message1, $message_src1) = &get_page($topic, $page, $meta_override); @head = split(/\n/, $head1); @sublist = split(/\n/, $sublist1); if (!grep(/\n"; } foreach $line (@sublist) { if ($line =~ m|$message_url/(\d+)/(\d+).$ext#(\w+)|) { $line = join("", $`, "$message_url/$1/$2.$ext?$3", $'); } } if ($move_board) { foreach $line (@sublist) { if ($line =~ m|"([^"]+)/messages/(\d+)/(\d+)\.|) { $line = join("", $`, "\"$message_url/$2/$3.", $') if $1 ne $html_url; } } $message1 =~ s|]*)>||g; $message1 =~ s|
    ([^([^<]*)
    ([^<]+) \(([^>]+)\)
    |
    $4$5
    $9 \($10\)
    |g; $message1 =~ s|||g; $about1 =~ s|||g; $message1 =~ s||) { ®enerate_page($topic, $1, $page, $template, $addfile, $move_board, $meta_override); } } } #---SEPARATOR---# #REQ:get_date_time sub change_board_toppage { local ($boldon, $groupon, $dateon, $lockon, $hideon) = @_; if ($boldon eq "*") { open (TOP, "$admin_dir/frontpage_conf.txt"); @top = ; close (TOP); ($l) = grep(/^Bold=/, @top); $l =~ s/\D//g; $boldon = $l; ($l) = grep(/^Group=/, @top); $l =~ s/\D//g; $groupon = $l; ($l) = grep(/^Date=/, @top); $l =~ s/\D//g; $dateon = $l; ($l) = grep(/^Lock=/, @top); $l =~ s/\D//g; $lockon = $l; ($l) = grep(/^Hide=/, @top); $l =~ s/\D//g; $hideon = $l; } else { &lock("$admin_dir/frontpage_conf.txt"); open (FILE_c, ">$admin_dir/frontpage_conf.txt"); print FILE_c "Bold=$boldon\n"; print FILE_c "Group=$groupon\n"; print FILE_c "Date=$dateon\n"; print FILE_c "Lock=$lockon\n"; print FILE_c "Hide=$hideon\n"; close (FILE_c); &unlock("$admin_dir/frontpage_conf.txt"); } &lock("$html_dir/messages/board-topics.html"); open (TOPFILE, "$html_dir/messages/board-topics.html"); @topfile = ; close (TOPFILE); foreach $line_top (@topfile) { if ($line_top =~ m|| || $line_top =~ m|^(.*)
    |i) { $dt = $1; } else { $dt = ""; } &extract($file); $lm = (&get_page($num, $num))[2]; $line_top = ""; $line_top .= "" if ($hideon && $secured); $line_top .= "\n"; } elsif ($line_top =~ m|^(.*)

    |) { $line_top = ""; $line_top .= "" if ($hideon && $secured); $line_top .= "\n"; } } } open (TOPFILE, ">$html_dir/messages/board-topics.html"); print TOPFILE @topfile; close (TOPFILE); &unlock("$html_dir/messages/board-topics.html"); }