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
|
<?php include('_init.php');
if (!empty($_SESSION['cmsloginid']) && ($_SESSION['member_login'] || $_SESSION['student_login'])) { header("Location: index.php"); exit; }
$action = $_GET["action"]; ?> <!DOCTYPE html> <html lang="en"> <head> <?php include('_head.php'); ?> <script type="text/javascript" src="js/facebook.js"></script> <link href="css/style_k.css?v=<?= time(); ?>" type="text/css" rel="stylesheet"> <style> .form-control-feedback { left: 0 !important; }
.has-feedback i { border-bottom: 1px solid #fff !important; }
.has-feedback .form-control { padding-left: 35px; padding-right: 0; background-color: inherit; border: none; border-bottom: 1px solid #555;; box-shadow: none; border-radius: 0; }
.error { padding-left: 35px; } </style> </head>
<body> <?php include('_header.php') ?>
<?php //include('_dialog.php') ?>
<div class="ProfileContent"> <div class="Profilecontainer"> <div class="row"> <div class="col-md-12 faq"> <h1 class="tc"><?= _lang("忘記密碼") ?></h1> <hr>
<? if($action=='success'){?> <p class="general_txt success bigger"> <?=_lang("We have sent new password to your email account.")?> </p> <? }else if($action=='fail'){?> <p class="general_txt success bigger"> <?=_lang("Cannot send email. Please try again.")?></p> <? }?>
<form action="_process.php" method="post" enctype="multipart/form-data" role="form" id="LiLoginForm"> <input type="hidden" name="action" value="forgetpassword"> <div class="form-group has-feedback"> <input type="text" name="email" class="form-control" placeholder="電子郵件" required> <i class="form-control-feedback glyphicon glyphicon-envelope" style="color:#555;"></i> <div style="color:#F00; display:none;" class="error" id="emailError">請輸入你的電郵</div> <div style="color:#F00; display:none;" class="error" id="emailError2">請檢查電郵格式。</div> </div>
<button type="button" class="SignUpSubmit" id="LiLoginBtn">提交</button> </form>
</div> </div> </div> </div>
<? include('_footer.php') ?>
<script type="text/javascript"> $(function () { $("#LiLoginBtn").on("click", function () { $(".error").hide(); var email = $("input[name='email']").val(); if(!email){ $("#emailError").show(); }else{ if (!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/.test($('input[name="email"]').val())) { $("#emailError2").show(); }else{ $("form").submit(); } } });
}); </script> </body> </html>
|