#!/usr/bin/perl
use CGI;
# Sends Errors to Browser
use CGI::Carp qw(fatalsToBrowser);
$query = new CGI;
# File location of the member info
$user_file = "members.txt";
# File location of member program info
$progs_file = "memprogs.txt";
# Gets value from information string
$user = $query->param('user');
# Retrieve data
open(USERS,$user_file);
@users=;
close(USERS);
# Look for member and print info
$match = 0;
foreach $member (@users){
chomp($member);
($userid, $name, $username, $email, $age, $city, $aim, $yahooid, $icq, $webname, $webaddy, $webdes, $calcown, $calcprog, $calclang, $complang, $otherinfo, $date, $progs, $dloads) = split(/\|/,$member);
if ($userid eq $user){
$match = 1;
&print_page($userid, $name, $username, $email, $age, $city, $aim, $yahooid, $icq, $webname, $webaddy, $webdes, $calcown, $calcprog, $calclang, $complang, $otherinfo, $date, $progs, $dloads);
}
}
# Displays if a member match isn't found
if ($match==0){
print $query->header;
print<Member Profile Not Found
Member Profile Not Found
The member profile that you are trying to display was not found. If you are receiving this message becuase you tried to type in the URL to the member's profile, then click here to go to the List of Members page. If you got here by clicking on a link on this site, please let me know about it so that I can fix it. Make sure to include where on the page the link was that got you here.
NOMATCH
}
# Print the member's profile
sub print_page{
print $query->header;
print<$name ($username)