#!/usr/bin/perl -T # top.pl - top level entry point for a HyperNews site. # Copyright HyperNews.org, 1998 # Add current directory to load path. $0 = $ENV{SCRIPT_FILENAME} if $0 =~ m{^/dev}; $0 =~ m{^(.*)/[^/]+$ }x; $hnbin = $1 || '.'; unshift(@INC, $hnbin, "$hnbin/.scripts", "$hnbin/.scripts/lib"); require "Admin/hnrc"; &feval('&Public()'); sub Public { require "urc.pl"; require "member-lib.pl"; require 'hnview-lib.pl'; require "formlib.pl"; require HN::Message; my %form = &GetFormArgs(); # Check for authentication. &checkAuthenticated($form{UserID}, $form{Password}, $form{remoteUser}, $form{adminPassword}); &checkAuthenticated(); my $isAdmin = $authenticated && &isAdmin($remoteUser); $URL = $ENV{'PATH_INFO'}; my $thisURL = &URLencode($ENV{REQUEST_URI} || "$editResponseURL$URL"); my $thisUserID = "userid=$remoteUser" if $remoteUser; my $redirectURL = "$loginURL?$thisUserID&url=$thisURL"; # broken? # Need to check whether URL is for SECURED or Admin. if ($manualSecurity == 1 && !$authenticated && $hnReadSF > 1) { # Try logging in first. Need to avoid login loop. &printRedirect($redirectURL); } &access1($hnReadSF, 4, '', $remoteUser, "User $remoteUser is not permitted to access this system.

", $authenticated); my $whoami = &sustring($remoteUser); if ($whoami) { $whoami = "You are authenticated as: $whoami

"; } my $adminEmail = &addressOf($hnAdmin[0]) || $hnAdmin[0]; $gifsOK = $ENV{'HTTP_ACCEPT'} =~ m,(image/gif)|(\*/\*),; &HNMsg("ACCEPT: $ENV{HTTP_ACCEPT}") if $debug; my $setup_long_form_URL; if ($ENV{'SCRIPT_NAME'} =~ m{\.cgi$ }x) { $setup_long_form_URL = "$hnAdminURL/setup-form.cgi"; } else { $setup_long_form_URL = "$hnAdminURL/setup-form.pl"; } &print_HTML_HEAD("Welcome to $hnSystemName"); print qq{
AMS Computing AMS HyperNews  
Forums - Membership - Subscriptions - Login - Search - Feedback - Admin - Help

Welcome to AMS HyperNews

This site uses the HyperNews system, version 1.10. See the HyperNews Home Page for lists of forums at other HyperNews sites.

}; my $test_text = qq{ You are welcome to try out HyperNews on the HyperNews.org Test Forum. } if $hntestURL; print qq{ Here are some brief instructions on how to use HyperNews. Please see the more detailed instructions if you have questions. Email $adminEmail if you have problems using this HyperNews site. $test_text . List of AMS Forums

$whoami }; print "\n"; if ($instructionsURL) { print qq{ }; # # &new_command_button("$instructionsURL#Reading", $targetBlank, # "Help for $hnSystemName $hnversion", # "/icons/help.gif", # $commandIconXsize, $commandIconYsize, # "Help"); print qq{

}; } if ($searchURL) { print qq{

}; &new_command_button($searchURL, $targetBlank, "Search $hnSystemName", 'search.gif', $commandIconXsize, $commandIconYsize, "Search $hnSystemName"); print qq{ }; } if ($viewMembers) { $viewMsg = "list members, "; } if (!$authenticateInquiries) { $inquireMsg = "display more info about individual members,"; } if (!$authenticated && $joinSF && $joinSF < 3 || $isAdmin) { $registerMsg = " register as a new member,"; } if ($joinSF && !$externalSecurity) { print qq{ }; # # &new_command_button("$viewMembersURL", $targetBlank, # "View list of $hnSystemName members", # 'members.gif', # $commandIconXsize, $commandIconYsize, # "Members"); # # print qq{ # #}; } if (($editArticleSF && ($editArticleSF < 3)) || $isAdmin) { print qq{ }; }; print qq{ }; # We should use the new_command_button for all these images. # But disable the command action, of course, except for the above. print qq{ }; print qq{ }; print qq{ }; print qq{ }; print qq{ }; if ($isAdmin) { print qq{ }; }; print qq{
Help for AMS HyperNews 1.10 Get more detailed help.

Members With this button you can list members, display more info about individual members or update your member info. Membership applies to all forums at this site.
register as a new member to post news or to create a new forum.
Search the contents of all the public HyperNews groups at UMDNJ.

#With this button you can #$viewMsg #$inquireMsg #$registerMsg or #update your member info. #Membership applies to all forums at this site. #

#

}; &new_command_button("$editArticleURL", $targetBlank, "Create or update a forum", 'forum.gif', $commandIconXsize, $commandIconYsize, "Edit Forum"); print qq{ Create or update a forum. (more instructions)

When reading a forum or message, use the following buttons.
Add a message to the forum. To add a reply to a message, first make sure you are reading the message, then click on the Add Message button. }; print qq{
Subscribe to a forum or message. You will get email when a message or reply is added. Also use this button to Unsubscribe.
\"[
[ Inline All ]
In inline mode, the contents of the messages will be displayed on your screen one after another. If you inline only one level, the reply messages will be shown in outline mode.
[ Outline 1 ]
[ Outline 2 ]
[ Outline 3 ]
[ Outline All ]
In outline mode, only message titles are shown, in which case you select the message whose content you wish to read.
[ Previous ]
[ Next ]
[ More ]
Navigate the thread of message within one window.
[ Frames ] Creates a multi-frame view of the forum that may be easier for you to navigate.
Setup HyperNews
}; if (($autoGenerateChildForumList && $displayChildren) || @childForums) { print qq{

Every page has a list of other forums that are available. Related forums may be listed that are at a lower level, higher level, or at the same level. Forums at a lower level are generally about subtopics. Below is a list of the top-most forums at this site.

}; }; print qq{

Other discussion groups

Forum One offers a searchable index of thousands of web-based discussion forums.    
}; print qq`


Extensions over base HyperNews for AMS by A.Klimentov. Pages design by T.Wenaus from BNL/CERN.
`; &printEnd(); }