/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
up file
home
<?php include('config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $forget_id = mysqli_real_escape_string($connection, $_GET['id']); /// เช็คเวลา $ch_time = "SELECT * FROM tbl_change_password WHERE id = '$forget_id'"; $res_ch = mysqli_query($connection, $ch_time); $row_ch = mysqli_fetch_assoc($res_ch); $expire_datetime = $row_ch['expire_datetime']; $date_now = date('Y-m-d H:i:s'); if ($res_ch->num_rows > 0) { if ($expire_datetime >= $date_now) { /// ภายใน 15 นาที ?> <script> location.href = "change_password?acc=change&id=<?=$forget_id?>"; </script> <?php } else { // เกิน 15 นาที ?> <script> location.href = "change_password?acc=timeout"; </script> <?php } } else { /// ไม่พบ forget id ?> <script> location.href = "change_password?acc=notfound"; </script> <?php } ?>