Subversion Repositories ORC

Rev

Rev 2 | Rev 8 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line 60... Line 60...
60
#}
60
#}
Line 61... Line 61...
61
 
61
 
62
printRCHeader("Password Reset");
62
printRCHeader("Password Reset");
Line -... Line 63...
-
 
63
print<<page1;
-
 
64
 
-
 
65
<p class="hint">This will reset a user's password to a random string and email that new password to them.<br>
63
print<<page1;
66
They will still need access to their email to get logged back in.</p>
64
 
67
 
65
 <FORM method=GET action=password_reset.pl> $RCid_input
68
 <FORM method=GET action=password_reset.pl> $RCid_input
66
	<TR><TD colspan=2>&nbsp</TD></TR>
69
	<TR><TD colspan=2>&nbsp</TD></TR>
67
	<TR><TD colspan=2 align=center>$USRMSG <FONT color=red><b>$USRMSGERR</b></font></TD></TR>
70
	<TR><TD colspan=2 align=center>$USRMSG <FONT color=red><b>$USRMSGERR</b></font></TD></TR>
Line 77... Line 80...
77
page1
80
page1
Line 78... Line 81...
78
 
81
 
79
sub updateDBPass {
82
sub updateDBPass {
80
	my ($EM, $STR) = @_;
83
	my ($EM, $STR) = @_;
81
	use DBI;
84
	use DBI;
82
	my $dsn = "DBI:mysql:database=rollerco_data;host=localhost;port=3306";
85
	my $dsn = "DBI:mysql:database=rollerco_data;host=qnap.home.lan;port=3306";
83
	my $dbh = DBI->connect($dsn, 'rollerco_www', 'www-data');
86
	my $dbh = DBI->connect($dsn, 'root', 'Jopy666!');
84
	my $sth = $dbh->prepare("update official set password = password(?) where email=?");
87
	my $sth = $dbh->prepare("update official set password = password(?) where email=?");
85
	$sth->execute($STR, $EM);
88
	$sth->execute($STR, $EM);
Line 86... Line 89...
86
}
89
}