#!/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'}="$xlatphrase[9]"; $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('
', $SYSTEM{'message'}, "\"Incorrect"); } } print "Content-Type: text/html\n\n"; foreach $line (@lines) { $line = &xlatline($line); } } }