PDA

View Full Version : Well Im an Idiot



lotsofissues
July 25th, 2002, 18:04
I can't even find scripts!!!-- muchless make them.

I was looking through www.hotscripts.com and I couldn't even find a free login manager. Can anyone help?

Also it would be helpful to find a script for the user to take tests and have those tests recoreded into a history. Does anyone think this item can be found for free?

YUPAPA
July 25th, 2002, 20:02
how do you want your user to login?
.htaccess?

here is the script create logins: You will need to edit the .htpasswd file manually when you want to delete user... I did not include that part in the script...




#!/usr/bin/perl
use strict;
use CGI qw(:standard :form);


my $htpasswd = q(.htpasswd);
my $script_name = q(script.pl);
my $query = new CGI();
my $username = $query->param('username');
my $password = $query->param('password');
my $stage = $query->param('stage');
my $content;


if($stage eq 'add_user') { &add_user; }
else { &index; }


sub index {
$content .= qq(
<FORM METHOD="POST" ACTION="$script_name">
<INPUT TYPE="HIDDEN" NAME="stage" VALUE="add_user">
Username <INPUT TYPE="TEXT" NAME="username"><BR>
Password <INPUT TYPE="TEXT" NAME="password"><BR>
<INPUT TYPE="SUBMIT" VALUE="Create">
</FORM>
);
}


sub add_user {
open(HTPASSWD,">>$htpasswd") or die print "Error opening htpasswd $htpasswd: $!\n";
print HTPASSWD join(":",$username,crypt($password,'MD'))."\n";
close(HTPASSWD);
$content .= "New user has been added :)\n";
}

sub PRINT {
print "Content-Type: text/html\n\n";
print qq~
<HTML><HEAD><TITLE>Create User Script</TITLE></HEAD><BODY>
~;
print $_[0];
print qq~
</BODY></HTML>
~;
}

PRINT($content);


__END__

lotsofissues
July 26th, 2002, 00:25
Thanks Yup.

BTW-- Did they ban you?

YUPAPA
July 26th, 2002, 00:33
HI,
please edit line 15 and 16 again!

Jan
July 26th, 2002, 00:35
Originally posted by lotsofissues
Thanks Yup.

BTW-- Did they ban you?
Banned people can't reply :confused2

rapmaster
July 26th, 2002, 02:59
lol, I think they saw the "Guest" as Yupapaz title and though it was a forum title.