You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.5 KiB

#!/usr/bin/perl
#
# $Id: logout.pl,v 1.3 2004/06/03 21:37:38 jeffo Exp $
#
# Source File: logout.pl
#print "Content-Type: text/html\n\n";
# Get config
require 'sitecfg.pl';
&app_initialize;
if (&get_session($FORM{'tid'})) {
&LanguageSupportInit();
if ($FORM{'idle'} eq 'R') {
print "Content-Type: text/html\n\n";
&show_template($FORM{'tmplt'});
} else {
&noresync;
}
} else {
print "Content-Type: text/html\n\n";
&show_illegal_access_warning;
}
sub noresync {
&close_session($FORM{'tid'});
if ($FORM{'idle'} eq 'N') {
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "4", "LO");
$SYSTEM{'message'}="";
} else {
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "4", "LO Forced");
$SYSTEM{'message'}="<FONT SIZE=1 COLOR=\"\#FF0000\">$xlatphrase[9]</FONT>";
$SYSTEM{'message'}=~ s/\$autologout/$autologout/ ;
}
# Load Index.html
my $index = $pubroot.$pathsep.$SESSION{'clid'}.$pathsep."index.html";
if (-e $index) {
# redirect
print "Status: 302 Moved\nLocation: /$SESSION{'clid'}${pathsep}index.html\n\n";
} else {
if ($SESSION{'clid'} eq 'std') {
@lines = &get_template("shome");
} else {
&get_client_profile($SESSION{'clid'});
@lines = &get_template("cindex");
}
if ($ipfilter ne '') {
if ($ipfilter =~ /$ENV{'REMOTE_ADDR'}/ ) {
# ip blocked
} else {
$SYSTEM{'message'} = join('<BR>', $SYSTEM{'message'}, "<IMG SRC=\"$graphroot/msgipb.gif\" ALT=\"Incorrect Password.\" BORDER=0>");
}
}
print "Content-Type: text/html\n\n";
foreach $line (@lines) {
$line = &xlatline($line);
}
}
}