/var/www/hkosl.com/ifapc/html_20210817/IFAPC2021/application/views/main/member_forgotten_index.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
<?php include_once('templates/top.php'); ?>
<section id="page-title" style="background-image: url('<?php echo assets_url('main/img/lady_gold_2018.jpg'); ?>');" class="background-title">
    <div class="container clearfix">
        <h1><?php echo __('Forget Password'); ?></h1>
        <ol class="breadcrumb">
            <li><a href="#"><?php echo __('Home'); ?></a></li>
            <li class="active"><?php echo __('Forget Password'); ?></li>
        </ol>
    </div>
</section>

<!-- Content
        ============================================= -->
<section id="content">
    <div class="content-wrap">
        <div class="container clearfix">
            <div class="tabs divcenter nobottommargin clearfix" id="tab-login-forgot" style="max-width: 500px;">
                <div class="tab-container">
                    <div class="tab-content clearfix" id="tab-forgot">
                        <div class="panel panel-default nobottommargin">
                            <div class="panel-body" style="padding: 40px;">
                                <?php echo form_open(front_url('member/forgot_password'), 'id="forgot_form"'); ?>
                                <?php if (validation_errors() || isset($_SESSION['error_msg'])) {?>
                                <div class="col_full alert alert-danger">
                                    <?php echo validation_errors(); ?>
                                    <?php echo $_SESSION['error_msg']; ?>
                                    <?php unset($_SESSION['error_msg']); ?>
                                </div>
                                <?php }?>

                                <div class="col_full">
                                    <?php $field 'email'?>
                                    <label for="<?php echo $field?>"><?php echo __('Email'); ?>:</label>
                                    <input type="email" id="<?php echo $field?>" name="<?php echo $field?>"
                                        value="<?php echo set_value($field); ?>" class="sm-form-control" required>
                                </div>

                                <div class="col_full">
                                    <?php $field 'captcha_code'?>
                                    <label for="<?php echo $field?>"><?php echo __('Captcha code'); ?>:</label>
                                    <div>
                                        <span id="captcha_span"><?php echo $captcha_img?></span><img
                                            id="refresh_captcha" src="<?php echo assets_url('main/img/refresh.png'); ?>"
                                            style="border: 0;">
                                    </div>
                                    <input type="text" name="<?php echo $field?>" class="form-control" required>
                                </div>

                                <div class="col_full nobottommargin">
                                    <button class="button button-3d button-black nomargin"><?php echo __('Submit'); ?></button>
                                </div>
                                <?php echo form_close(); ?>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
<?php include_once('templates/bottom.php'); ?>
<script>
$(function() {
    $('#refresh_captcha').bind('click', function() {
        $('[name="captcha_code"]').val('').focus();
        ajax_update_captcha();
    });
    $('#captcha_span').attr('style', $('#captcha_span img').attr('style'));

    var forgot_lock = false;
    $('#forgot_form').bind('submit', function(e) {
        if (forgot_lock) {
            e.preventDefault();
        } else {
            forgot_lock = true;
        }
    });
});

function ajax_update_captcha() {
    $.ajax({
        url: '<?php echo front_url('member/ajax_update_captcha'); ?>',
        dataType: 'json',
        cache: false,
        data: {
            '<?php echo $this->security->get_csrf_token_name(); ?>': $(
                '[name="<?php echo $this->security->get_csrf_token_name(); ?>"]').val()
        },
        type: 'post',
        timeout: 30000,
        success: function(result) {
            $('#captcha_span').html(result.captcha_img);
            $('[name="<?php echo $this->security->get_csrf_token_name(); ?>"]').val(result
                .updated_csrf);
        }
    });
}
</script>
<?php unset($_SESSION['error_msg']); ?>