-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecover.php
119 lines (77 loc) · 3.18 KB
/
recover.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php $app->view('header');?>
<div class="container-fluid">
<div class="row no-gutter">
<div class="d-none d-md-flex col-md-4 col-lg-6 bg-image"></div>
<div class="col-md-8 col-lg-6">
<div class="login d-flex align-items-center py-5">
<div class="container">
<div class="row">
<div class="col-md-9 col-lg-8 mx-auto">
<?php /*
// ***********************************************************************
// STEP 2:
// LINK FROM THE EMAIL WAS CLICKED - SHOW / SUBMIT THE PASSWORD RESET FORM
//
*/ ?>
<?php if ( isset($password_form) ):?>
<?php if ( $app->action('post') ):?>
<?php if (! empty($errors) ):?>
<h3 class="login-heading mb-4">Choose a New Password</h3>
<?php foreach($errors as $error):?>
<div class="alert alert-danger" role="alert">
<?=$error;?>
</div>
<?php endforeach;?>
<?php $app->form('password-reset');?>
<?php else:?>
<h3 class="login-heading mb-4">Login with Your New Password</h3>
<?php $app->form('login', ['action' => APP_URL.'/login']); ?>
<?php endif;?>
<?php else:?>
<?php if (! empty($errors) ):?>
<h3 class="login-heading mb-4">Sorry...</h3>
<?php foreach($errors as $error):?>
<div class="alert alert-danger" role="alert">
<?=$error;?>
</div>
<?php endforeach;?>
<?php else:?>
<h3 class="login-heading mb-4">Choose a New Password</h3>
<?php $app->form('password-reset');?>
<?php endif;?>
<?php endif;?>
<?php /*
// ***********************************************************************
// STEP 1:
// SHOW / SUBMIT THE RECOVERY FORM
//
*/ ?>
<?php else:?>
<h3 class="login-heading mb-4">Recover Your Account</h3>
<?php // Recovery form was submitted and valid ?>
<?php if ( isset($success) && $success ):?>
<div class="alert alert-success" role="alert">
Email sent. Click the recovery link to reset your password.
</div>
<?php // Recovery form was submitted, but there are errors ?>
<?php elseif(isset($errors) && !empty($errors) ):?>
<?php foreach($errors as $error):?>
<div class="alert alert-danger" role="alert">
<?=$error;?>
</div>
<?php endforeach;?>
<?php endif;?>
<?php $app->form('recover');?>
<div class="text-center">
<a class="small" href="<?=APP_URL;?>/login">Login</a>
<?php if( REGISTRATION_ENABLED ):?> | <a class="small" href="<?=APP_URL;?>/create-account">Create Account</a><?php endif;?>
</div>
<?php endif;?>
</div><!--col-->
</div><!--row-->
</div><!--container-->
</div><!--login-->
</div><!--col-->
</div><!--row-->
</div><!--container-->
<?php $app->view('footer');?>