#!/usr/bin/perl ################################################################################ # WAccess Version 1.1 # # Copyright 1999 Frederic TYNDIUK (FTLS) All Rights Reserved. # # E-Mail: tyndiuk@ftls.org Script License: GPL # # Created 05/30/98 Last Modified 12/24/99 # # Scripts Archive at: http://www.ftls.org/cgi/ # ################################################################################ # Function : # # Display Member page # # Use : member.cgi : query login, pass and display member page # # if good login and pasword : # # member.cgi?login=YourLogin&pass=YourPassword : display member page # # member.cgi?login=YourLogin&pass=YourPassword&page=Page : display Page # # member.cgi?login=YourLogin&pass=YourPassword&page=user : display your page # # member.cgi?login=YourLogin&pass=YourPassword&ac=chpass : change password # ################################################################################ ########################## license & copyright header ########################## # # # Copyright (c) 1999 by TYNDIUK Frederic # # # # This program is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License as # # published by the Free Software Foundation; either version 2 of # # the License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program in the file 'COPYING'; if not, write to # # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # # Boston, MA 02111-1307, USA, or contact the author: # # # # TYNDIUK Frederic # # # # # ######################## end license & copyright header ######################## ################################################################################ # DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING # ################################################################################ require "WAccessLib.pl"; my($flogin, $fpass, $flevel, $fpage); &ReadParse(*input); my $mode = "guest"; my $file = $MEMBER_FILE; my $login = $input{'login'}; my $password = $input{'pass'}; my $page = $input{'page'}; if (($input{'ac'} eq "chpass") && (! $input{'BT_Exit'})) { &change_password($login, $password, %input); exit; } if ($page eq "user") { open(PASSWORD, $PASSWORD_FILE); ($_) = grep(/^$login\t/, ); close(PASSWORD); s/\n//; ($flogin, $fpass, $flevel, $fpage) = split /\t/; $file = $DATA_DIR.$fpage; $mode = $flevel; } elsif ($page ne "") { $page =~ s/\.\.//g; #Remove ../ $page =~ s/\///g; #Remove / $file = $DATA_DIR.$page.".html"; if ($file =~ /Adm/i) { $mode = "root"; } else { $mode = "guest"; } } &CheckAdminMember($login, $password, $mode, $file);