######################################################################################### ######################################################################################### # Multi Board Additions ############################ # On the Fly main page sub on_the_fly_main_page { $numofmainresponses = 0; open(MAIN,"$basedir/$mesgfile") || die $!; @maincopy =
; close(MAIN); $number_of_lines_maincopy = @maincopy; #determine the number of main responses not replies for ($count = 0; $count < $number_of_lines_maincopy; $count++) { if ($maincopy[$count] =~ /*/) { $numofmainresponses++; $topvalue = $1; $count++; do { $count++; }while($maincopy[$count] !~ /*/); } } #determine the interger number of pages $pages_needed = $numofmainresponses / $perpagedisplay; $pages_needed_remander = $numofmainresponses % $perpagedisplay; #Store In Interger Format $pages_needed = ($pages_needed - ($pages_needed_remander/$perpagedisplay)); #Added one because a remainder if ($pages_needed_remander) { $pages_needed++; } #determine what type of pages to type if($numofmainresponses < $perpagedisplay) { #print only one page # Logic: Begin Storing Lines after first top and until bottom tag is found $detect = 0; $countpages = 1; for ($count = 0; $count < $number_of_lines_maincopy; $count++) { if ($maincopy[$count] =~ /*/) { $topvalue = $1; $counttops++; $detect = 1; splice(@page_contents, -1, 0, $maincopy[$count]); #read and store until next top $count++; while($maincopy[$count] !~ /*/) { splice(@page_contents, -1, 0, $maincopy[$count]); $count++; last if ($count == $maincopylength); last if ($maincopy[$count] =~ /