Thread: Error: OK??
View Single Post
 
Old Jul 21, 2003, 07:46 PM
Liquibyte Liquibyte is offline
New Member
 
Member Since: Jul 2003
Posts: 4
Put in in here like this:

<blockquote><font size=1>In reply to:</font><hr>

# ----------------------------------------------
# Main
# ----------------------------------------------

sub main {

$|++; # Flush Output Right Away

$userid = $in{'username'}; $pw = $in{'password'};
$in{'userid'} = $userid; $in{'pw'} = $pw;

&auth_cleanup; # Remove old session files.
($status, $uid) = &auth_check_password; # Authenticate User, get permissions and userid.
$script_link = "$db_script_url?db=default&uid=$db_uid";

if ($status eq "ok") {
if (length($userid) < 3) { ($userid, $trashy) = split(/\./,$uid); }
if ($userid) { $script_link = "$script_link&userid=$userid"; }
if ($uid eq "default") { $db_userid = $uid; }
else { ($db_userid) = $db_uid =~ /([A-Za-z0-9]+)\.\d+/; }

if ($in{'edit'}) {
$edit = $in{'edit'};
&verify;

} elsif ($in{'logoff'}) { &auth_logging('logged off') if ($auth_logging);
$auth_logoff ? (print "Location: $auth_logoff\n\n") : (print "Location: $db_script_url\n\n");

} elsif ($in{'addentry'} =~ /Add/) {

&get_variables;
if ($blurbonly eq 0) { &new_file; } #if there is not just a blurb, write a new news file
&main_page;
&return_html("entry added"); #show user added entry

} elsif ($in{'addentry'} =~ /Preview/) {

&get_variables;
&preview;

} elsif ($in{'auth'} eq "adduser") {
&print_new_auth;

} elsif ($in{'login'}) {
&addform;

} else {
&error($status);

} # End Edit
} elsif ($in{'auth'} eq "login") {
&addform;

} elsif ($in{'auth'} eq "newpass") {
if ($in{'password'} eq $in{'verify'}) {
&signup;
} else { &print_new_auth("Sorry... Your passwords didn't match. Please try again."); }

} elsif ($status eq "no login") {
&print_auth($status);

} else {
&error($status);
}

exit(0);

} # End Main

<hr></blockquote>