#################################
#
# Define Variables
# The first thing you need to do is define the variables to make this 
# script work for you. There are A LOT of variables, but don't worry,
# it's not that bad. You only NEED to set a few of them. The rest are to
# customize the look and language of the script.
#
# A couple guidelines, if you use a quotation mark (") at symbol (@)
# or dollar sign ($) in any of these variables, you MUST but a 
# backslash (\) immediatley before that character.
#
##################
# Required Changes
#
# These are variables you must set for the script to run on your server.

$base_url = "http://mnstats.morris.umn.edu/courses/math1601/cgi-bin/chat";
#the base url to the chat directory

$base_path = "/www/documents/courses/math1601/cgi-bin/chat";
#the base path to the chat directory

$valid_referer = "mnstats.morris.umn.edu";
# This is the domain from which the script will run.
# The part immediately following http:// and before any slashes (/)
# This insures the script will only accept forms sent from this
# domain. It fills a big security hole pointed out by Matt Wright.

$java = "yes";
# This determines wheather or not java should be enabled.  The monitor 
# feature uses java to return the audio alert.

$admin_name = "admin";
$admin_passwd = "vumm";
# These allow admin privalages (Monitor and Chat Records).

$require_pass = "no";
# If you want the require a valid username and password, this must be set 
# to "yes".

$name1 = "ethan";
$pass1 = "paul";
$name2 = "student";
$pass2 = "vumm";
# This is the list of username and password which will be able to access 
# the script.  You may include up to 100 users. If more users are needed, 
# the script itself will need to be modified.  These only matter if 
#$require_pass is set to "yes".

#You must also make some additional changes:
#1. chat directory:
# 	chmod 755 *.cgi
# 	chmod 755 *.sol
#2. visitors directory:
#	chmod 777
#	delete all contents
#3. files directory:
#	chmod 777
#	delete all contents
#4. records directory
#	chmod 777
#	chmod 755 clear.cgi
#       delete records.inc
#	archive directory:
#		chmod 777
#		delete all contents
#5.  monitor directory
#	chmod 755 monitor.cgi

# That is all you NEED to change for the script to run on your server.
##############
# The Look
#
# These are variables to control the look of the script. You'll
# want to change some of them, but many are fine as they are.

$page_title = "Math 1601 Chat"; 
# This is the title of the chat page

$message_area_color = "99CCFF";

$background = "";
# This is the url of a background texture for all the pages this script
# produces. Leave it blank if you don't want a background texture.

$bgcolor = "F5F5DC";
# This is the background color for most of the pages this script produces.
# Remember to use hex numbers (ffffff is white). Some browsers will
# accept literal color names such as "red".
$popup_bgcolor = "CDCDCD";
# This is the background color for the popup pages (admin functions).

$text_color = "000000";
$link_color = "800000";
$vlink_color = "808000";
# This is the text color, the link color and the viewed link color for
# all the pages this script produces. 

$oldcolor = "444444";
# This is the color of the text for messages a person has already read

$newcolor = "red";
# This is the color of the text for messages a person has not read
# This is also the color of the large message on the registration page 
# telling people to reload

$one_color = "green";
# This is the color of the text for one on one messages. 

$mon_beep = "alert.au";
# This is the audio file to be used as an alert by the monitor feature.
# The audio file should be placed in the monitor directory.

#
##################
# The Feel
#
# These are variables to control the feel of the script. You'll
# want to change some of them, but many are fine as they are.

$schedule_file = "";
# If you have a file detailing scheduled chats put the url of the schedule 
# file between the quotes. Otherwise leave them empty. If you put something
# in here a link will be added to this file from the registration page.

$help_file = "";
# This is the name of the help file for the script. You can leave it set
# to my help page, or change it to one of your own, or delete the variable
# and a link won't show up at all.

$public_rooms = "<option>entry<option>two<option>three"; 
# These are the names of the public rooms that anyone can enter.
# Each room must be preceeded by <option>

$entry = "entry";
#This is the name of the room you want all people to enter when they 
#first join the chat.

$out_link = "http://mnstats.morris.umn.edu/courses/math1601/protected/enterregist.html";
# This is the url where you want people sent when they leave the chat page. 
# Probably your own main page.

$visitors_time = 600; 
# This is the time in seconds which people will remain in the visitors list
# since their last reload.

$chat_time = 18000;  
# This is the time in seconds which messages will remain in the chat file.

$lock_time = 5; 
# This is the time in seconds that the script will wait if the lock file 
#exists before running the script. If the lock file remains for a few seconds,
# it is probably a bogus file leftover from a previous error.

#The rest of the variables are for changing the language of the script.
#
######################
# Language variables
#
# The following variables are provided for converting this script for 
# non-english speaking people. Feel free to reword what I say anyway
# you please.
######################
#
# Signup Page

$reg_page = "Registration Page";
# This is the subtitle for the page shown directly under the $script_title
# $title_graphic

$instruct = "Click <b>POST</b> or <b>REFRESH</b> to see the latest conversation in a room. Type a message and click <b>POST</b> to send it. Click <b>LEAVE</b> to leave the script.";
# These are the BRIEF instructions that are shown on the signup page.

$no_vis = "There are no people in the $entry room right now."; 
$one_vis = "There is one person in the $entry room right now.";
# These are the messages when there are no visitors and one visitor
# in the room set by the $entry variable.

$mult_vis_a = "There are";
$mult_vis_b = "people in the $entry room right now.";
# These are the messages displayed before and after the number when there
# are multiple people in the room specified by $entry.

$no_vis_tot = "There are no people chatting anywhere inside.";
$one_vis_tot = "There is one person in the entire place right now.";
# These are the messages when there are no visitors and one visitor
# in the room set by the $entry variable.

$mult_vis_tot_a = "There are";
$mult_vis_tot_b = "people chatting total right now.";
# These are the messages displayed before and after the number when there
# are multiple people in the room specified by $entry.

$name_blank = "Name:";
$passwd_blank = "Password:";
$mail_blank = "E-Mail:";
# These are the messages before the name, password and e-mail parts 
# of the form

$enter_chat = "Enter Chat";
# This is the text on the button to enter the chat.

$sched_note_a = "This room has";
$sched_note_b = "scheduled";
$sched_note_c = "meeting times.";
# These three form a message alerting users of the scheduled times if you
# filled in the $schedule_file variable above. The first one is before the 
# link the second one IS the linked text and the thrid is after the link.

$help_a = "Want some";
$help_b = "HELP";
$help_c = "using this chat page?";
# These three form a message offering help with the page to users if you
# filled in the $help_file variable above. The first one is before the link
# the second one IS the linked text and the thrid is after the link.

# End entry room variables
#####################
# Main Chat Page variables

$message_text = "Messages:";
# This is the text just before the text field where they enter their message.
# It also serves as a link down to the message area.

$one_on_one_text = "1 on 1";
$post_text = "Post";
$reload_text = "Refresh";
$clear_text = "Clear";
$leave_text = "Leave";
# These are the names of the five buttons on the control panel.

$num_mesgs = "<font color=800000></font>";
# This is the text before the radio buttons for selecting the number
# of messages to display

$nummes_new = "New";
# This is the text next to the radio button to only display new
# messages

$people = "People";
$last = "Last Refresh";
$reload_time_text = "Refresh";
#These are the headers of the visitors table.

$change_rooms = "";
# This is the text displayed as the title of the room change area.

$currently_in = "<br><font color=800000>You are currently in:</font>";
# This is the prefix to the name of their current room down in the
# room changing area.

$pub_room_title = "<font color=800000>Rooms available:</font>";
$pri_room_title = "<font color=800000>Private Rooms:</font>";
# These are the prefixes to selecting public and private rooms

$go_there = "Change Rooms";
#This is the name of the button for changing rooms

$mon_button = "Monitor";
#This is the name of the button for entering monitr

$rec_button = "Records";
#This is the name of the button for displaying chat records.

$clear_button = "Clear Records";
#This is the name of the button for clearing chat records.

$archive_button = "Archived Records";
#This is the name of the button for displaying archived chat records.

$admin_functions = "Admin Functions";
#This is the name of the admin functions title

$joined_chat = "joined the chat at";
$left_chat = "left the chat at";
$left_room = "left the room at";
# These are the public messages displayed when someone joins the chat
# leaves the chat or leaves a room (respectively). When a person enters
# a new room the $joined_chat one is used. These will all be preceeded
# by the person's name in bold and followed by the time.

#
# End main page variables
###################
# One on one page variables
$one_on_one_page = "One on One Messages<br>";
# This is the title of the one on one page

$one_on_one_instruct = "Type your one on one message in this field and then click on the person's name to send it.";
#This is the instructions for sending a one on one message

$one_on_one_to = "Select the person to send your message to:<br>";
#This is the text above the buttons with everyone's name

$return_to_chat = "Return to Chat";
#This is the button to return to the chat

$reload_remind = "you must hit the refresh button to see the latest conversation.";
# This is the one on one message sent when someone joins reminding
# them to reload. It will be preceeded by their name and a comma

#
# End one on one page variables

###################
# Monitor page variables
#

$arrive = "A new message has arrived!";
# This is the message displayed when a new message arrives.

$description = "This purpose of this monitor is to alert you in case of 
the arrival of a new message.  It is useful because the chat room 
requires that you hit \"$reload_text\" in order to see the most recent 
conversation.  Monitor allows you to concentrate on other things while 
waiting for another chat participant.";

$refresh = "Switch to $page_title and click \"$reload_text\" to join the 
conversation."; 
# This explains how to return to the chat room.

# This is displayed only if a new message arrives.
$ no_new = "No New Messages";

$recent_one = "The most recent message ocurred";
$recent_two = "seconds ago";
# These are the head and the tail for the "The most recent message 
# ocurred x seconds ago" message.

# End monitor page variables

###################
# Clear Records variables
#

$clear_title = "Clear Chat Records";
#The title for the generated page.

$records_cleared = "The records file has been cleared.";
#The records file xxx has been cleared.

$archived_as = "The records have been archived as";
#The records have been arvhived as xxx.

# End Clear Records variables
####################
#Miscellaneous variables.

$index_html = "Nice try, but it's not that easy to see the names of chat files.";
# This is the html page that will be returned if the go to the file or
# visitors directory in hopes of seeing file names which would include private 
# room names.

$wrong_name = "The name you requested is already in use, or you didn't 
enter a name, or the password you entered is incorrect, or you didn't 
enter a password.<p>Please try again.";
# This variable is for the page if they enter a name which is taken,
# don't enter a name, enter the wrong password, or don't enter a
# password.
#
# End Miscellaneous language variables
######################

#You should not need to edit below this line.

$file_dir = "$base_path/files";
# This is the directory path to the chat and visitor files that
# will be made for each room. These files are deleted after haven't
# been used for a set amount of time so make this a directory
# exclusively for these files. This directory must be set to chmod 777

$records_dir = "/$base_path/records";
# This is the directory path to the records file.  This directory must be 
#set to chmod 777.

$records_file = "$records_dir/records.inc";
# This is the file to which each discussion will be recorded.  This file 
# must be set to chmod 777.

$base_records_url = "$base_url/records";
# This is the base records directory as a URL.

$archive_url = "$base_records_url/archive";
# This is the archive directory.

$records_url = "$base_url/records/index.shtml";
# This is the file which will contain the records file as a server side 
# include. 

$clear_url = "$base_url/records/clear.cgi";
# This is the script which will clear the records file.  The command is 
# issued from the admin version of chat.

$monitor_url = "$base_url/monitor/monitor.cgi";
# monitor_url is the path to the monitor script

$monitor_base = "$file_dir";
# monitor_base is the path to the files directory

$monitor_rbase = "$base_url/files";
# monitor_rbase is the URL to the files directory

$vis_dir = "$base_path/visitors";
# This is the directory path to the visitor files that
# will be made for each person. These files are deleted after they haven't
# been used for a set amount of time so make this a directory
# exclusively for these files. This directory must be set to chmod 777
#

