phpDocumentor ComCal
[ class tree: ComCal ] [ index: ComCal ] [ all elements ]

Source for file forgot.php

Documentation is available at forgot.php


1 <?include "functions.php";?>
2 <HTML>
3 <?include "templates/head.inc";?>
4 <?include "templates/body_top.inc";?>
5 <h1>Community Calendar</h1>
6 <h2>Did you forget something?</h2>
7 <?
8 if (isset($submit)) {
9 if (isset($email)) {$user_info = get_user_info($email, 'user_email');}
10 elseif (isset($username)) {$user_info = get_user_info($username, 'user_name');}
11 else {
12 $errors[] = 'You must submit either a username or password.';
13 }
14 arraylist($user_info);
15 if (isset($user_info)) {
16 $to = "$user_info[user_email]";
17 $subject = "Community Calendar Info";
18 $body = "We have located your login information for the calendar. \r\n\r\n
19 Username: $user_info[user_name]\r\n
20 Password: $user_info[user_password]\r\n\r\n
21 Please save this information in a safe place for future reference.
22 You may login to the
23 NCPR community calendar online now at:
24 \r\n\r\n ".$baseurl.$caldir."login.php";
25 $headers = "From: $adminemail\n";
26 mail($to,$subject,$body,$headers);
27 $errors[] = 'Your information has been emailed.';
28 }
29 else {
30 $errors[] = 'We were unable to find a match for the data you submitted.
31 Please try again. <br><br>If you are having repeated trouble,
32 please feel free to email our calendar administrator at '.$adminemail.'.';
33 }
34 if (isset($errors)) {
35 foreach ($errors as $error) {
36 echo '<div class="errors">'.$error.'</div>';
37 }
38 }
39 }
40 ?>
41 <h3>Enter either your email address or user name below, and we'll send your login info via Email.</h3>
42 <?include $forms_dir."forgotform.php";?>
43 <p><a href="<?=$baseurl.$caldir;?>">RETURN TO CALENDAR</a></p>
44
45 <?include "templates/body_bottom.inc";?>
46 </HTML>

Documentation generated on Wed, 19 Nov 2003 23:07:42 -0500 by phpDocumentor 1.2.3