sub PrintChatEntrance { local($setup,$chat_error) = @_;
local ($chat_room_options); $setup = "" if ($setup
eq "chat"); # # The chat room options # are derived
from the # available chat rooms in the # array of chat rooms
in the # chat.setup script $chat_room_options = "";
for (0..@chat_rooms - 1) { $chat_room_options .= "
Welcome To The Chat Page
$chat_error
!; } # end of PrintChatEntrance
############################################################
# # subroutine: PrintChatScreen # # Prints the main chat
screen. This includes the form # for chatting. # #
Parameters: # $chat_buffer = all the chat messages #
$refresh-rate = refresh rate for use with the META # operator
# $session = session id # $chat_room = chat room name #
$setup = setup file. # $frames = "on" for Printing
Main Frame HTML # $fmsgs = "on" for printing
Messages Frame # $fsubmit = "on" for printing chat
Messages Frame #
############################################################
sub PrintChatScreen { local($chat_buffer, $refresh_rate,
$session, $chat_room, $setup, $frames, $fmsgs, $fsubmit) =
@_; local($chat_message_header, $more_url, $more_hidden,
$chat_refresh); $setup = "" if ($setup eq
"chat"); # # $more_url contains setup information #
that needs to get passed from screen to # screen and is used
with the META Tag. # # $more_hidden is the same thing but is
# used as a hidden variable in the form # posted below. #
$more_url = ""; $more_hidden = ""; if
($setup ne "") { $more_url =
"&setup=$setup"; $more_hidden = ""; }
$more_url = "session=$session" .
"&chat_room=$chat_room" . $more_url; # When we
generate a meta tag, we need to # make sure the hidden
variables get passed to # the URL since we can not post using
the # META operator # if ($refresh_rate > 0) {
$chat_refresh = qq!!; } else { $chat_refresh = "";
} if ($frames ne "on" && $fsubmit eq
"on") { $chat_refresh = ""; } if ($frames
eq "on") { print qq!
!; } if ($frames ne "on") { print qq!
$chat_refresh
!; } if ($fsubmit eq "on") { $form_header = qq!
!; if ($fsubmit ne "on") { print "
\n"; } } if (($frames ne "on" &&
$fsubmit ne "on") || $fmsgs eq "on") {
print qq! $chat_message_header $chat_buffer!; if ($fmsgs ne
"on") { print "
\n"; } } if ($frames ne "on") { print qq!
!; } } # end of PrintChatScreen
############################################################
# # subroutine: PrintChatError # # This routine outputs an
error page if something # happened incorrectly in the chat
room. #
############################################################
sub PrintChatError { local($error) = @_; print qq!
Problem In Chat Occurred
$error
!; } # End of PrintChatError