Subversion Repositories VORC

Rev

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

Rev 56 Rev 65
Line 80... Line 80...
80
	</TR>
80
	</TR>
81
	<TR><TD colspan=2>&nbsp</TD></TR>
81
	<TR><TD colspan=2>&nbsp</TD></TR>
82
	<TR><TD colspan=2 align=center><input type=submit name=action value=$buttonValue><input type=button name=action value=Cancel onClick="location.href='/schedule/'"></TD></TR>
82
	<TR><TD colspan=2 align=center><input type=submit name=action value=$buttonValue><input type=button name=action value=Cancel onClick="location.href='/schedule/'"></TD></TR>
83
 </FORM>
83
 </FORM>
84
</TABLE>
84
</TABLE>
85
 
-
 
86
page1
85
page1
Line 87... Line 86...
87
 
86
 
88
sub updateDBPass {
87
sub updateDBPass {
89
	my ($EM, $STR) = @_;
88
	my ($EM, $STR) = @_;
90
	use DBI;
89
	use DBI;
Line 91... Line 90...
91
	use WebDB;
90
	use WebDB;
-
 
91
	
-
 
92
	my $dbh = WebDB->connect;
-
 
93
	
-
 
94
	my ($test) = $dbh->selectrow_array("select count(*) from official where email = ?", undef, $EM);
92
	
95
	return "ERROR: Email address [$EM] not found." unless $test;
93
	my $dbh = WebDB->connect;
96
	
-
 
97
	my $sth = $dbh->prepare("update official set password = password(?) where email=?");
94
	my $sth = $dbh->prepare("update official set password = password(?) where email=?");
98
	$sth->execute($STR, $EM);
Line 95... Line 99...
95
	$sth->execute($STR, $EM);
99
	return 0;
96
}
100
}
Line 97... Line 101...
97
 
101
 
98
sub resetPass {
102
sub resetPass {
99
	my $email = shift;
103
	my $email = shift;
Line 100... Line 104...
100
 
104
 
-
 
105
	my @chars = ("A".."Z", "a".."z", "1".."0", "(", ")", "-", "_", "*", "^", "!", "[", "]");
-
 
106
	my $string;
-
 
107
	$string .= $chars[rand @chars] for 1..8;
-
 
108
	
-
 
109
	my $error = &updateDBPass($email, $string);
Line 101... Line -...
101
	my @chars = ("A".."Z", "a".."z", "1".."0", "(", ")", "-", "_", "*", "^", "!", "[", "]");
-
 
102
	my $string;
110
  
103
	$string .= $chars[rand @chars] for 1..8;
-
 
Line 104... Line 111...
104
	
111
  if (!$error) {
Line 105... Line 112...
105
	&updateDBPass($email, $string);
112
  	use RCMailer;
Line 106... Line -...
106
 
-
 
107
	use RCMailer;
-
 
108
	my $subject = 'RollerCon Officials Schedule Manager - Password Reset';
113
  	my $subject = 'RollerCon Officials Schedule Manager - Password Reset';
Line 109... Line 114...
109
	my $body = "Greetings,
114
  	my $body = "Greetings,<br><br>
110
 
115
 
Line 111... Line 116...
111
It appears as though you've requested us to reset your password.  We've done so, and your new password is '$string' (without the quotes).
116
It appears as though you've requested us to reset your password.  We've done so, and your new password is '$string' (without the quotes).<br><br>
112
 
117
 
-
 
118
We'd recommend you log in and change it to your liking at the following link:<br><br>
Line 113... Line 119...
113
We'd recommend you log in and change it to your liking at the following link:
119
 
114
 
120
https://volunteers.rollercon.com/schedule/view_user.pl<br><br>
Line 131... Line 137...
131
<TABLE>
137
<TABLE>
132
	<TR>
138
	<TR>
133
		<TD align=right><img SRC="/logo.jpg"></TD>
139
		<TD align=right><img SRC="/logo.jpg"></TD>
134
		<TD align=center valign=middle><b><font size=+3>RollerCon Official<br>Schedule Manager<br>Password Reset</font></b></TD>
140
		<TD align=center valign=middle><b><font size=+3>RollerCon Official<br>Schedule Manager<br>Password Reset</font></b></TD>
135
	</TR>
141
	</TR>
136
	<TR><TD colspan=2>&nbsp</TD></TR>
142
	<TR><TD colspan=2><div class="error">$error</div>&nbsp</TD></TR>
137
	<TR><TD colspan=2 align=center>Your password has been reset and emailed to the address on record.<br>Please check your email (including Spam folders).&nbsp</TD></TR>
143
	<TR><TD colspan=2 align=center>If an account was found, your password was reset and emailed to the address on record.<br>Please check your email (including Spam folders).&nbsp</TD></TR>
138
	<TR><TD colspan=2>&nbsp</TD></TR>
144
	<TR><TD colspan=2>&nbsp</TD></TR>
139
	<TR><TD colspan=2 align=center><a href=/schedule/>[home]</a>&nbsp</TD></TR>
145
	<TR><TD colspan=2 align=center><a href=/schedule/>[home]</a>&nbsp</TD></TR>
140
</TABLE>
146
</TABLE>
Line 141... Line 147...
141
 
147