Advertisement
Guest User

forgot.php

a guest
Jul 2nd, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if ($_SESSION['username']!=NULL)
  4. {
  5. echo "<script>location.href='http://103.253.113.42/bubble_apps/web/';</script>";
  6. }
  7. else {
  8. ?>
  9. <!DOCTYPE html>
  10. <html>
  11. <?php
  12. include "element/script_atas.php";
  13. ?>
  14. <title>Forgot Password | Markisha</title>
  15. <body>
  16. <div class="mask-l" style="background-color: #fff; width: 100%; height: 100%; position: fixed; top: 0; left:0; z-index: 9999999;"></div> <!--removed by integration-->
  17. <?php
  18. include "element/menu.php"
  19. ?>
  20.  
  21. <script>
  22.  
  23. $(function () {
  24.  
  25. $('#form-upload').on('submit', function (e) {
  26.  
  27. e.preventDefault();
  28.  
  29. $.ajax({
  30. type: 'post',
  31. url: 'proses_forgot.php',
  32. data: $('#form-upload').serialize(),
  33. success: function () {
  34. document.getElementById("success").innerHTML = "Silahkan, Cek Email Anda";
  35. document.getElementById("form-upload").reset();
  36. }
  37. });
  38.  
  39. });
  40.  
  41. });
  42.  
  43. $(document).ready(function() {
  44.  
  45. //the min chars for email
  46. var min_chars = 3;
  47. var characters_error = 'Bukan Email';
  48. var checking_html = '<img src="img/loading.gif" /> Checking...';
  49.  
  50. //when button is clicked
  51. $('#create_acm').keyup(function(){
  52. //run the character number check
  53. if($('#create_acm').val().length < min_chars){
  54. //if it's bellow the minimum show characters_error text
  55. $('#email_availability_result').html(characters_error);
  56. }
  57. else{
  58. //else show the cheking_text and run the function to check
  59. $('#email_availability_result').html(checking_html);
  60. check_availability3();
  61. }
  62. });
  63.  
  64.  
  65.  
  66.  
  67. //function to check email availability
  68. function check_availability3(){
  69.  
  70. //get the email
  71. var email = $('#create_acm').val();
  72.  
  73. //use ajax to run the check
  74. $.post("check_email2.php", { email : email },
  75. function(result){
  76. //if the result is 1
  77. if(result == 1){
  78. $('#email_availability_result').html('<span style="color:red;" class="is_not_available"><b>' +email + '</b> Tidak Ditemukan</span>');
  79. $('#upload-gambar').prop('disabled', true);
  80. }else{
  81. $('#email_availability_result').html('');
  82. $('#upload-gambar').prop('disabled', false);
  83. }
  84. });
  85.  
  86. }
  87.  
  88. });
  89. </script>
  90.  
  91. <div class="l-main-container">
  92. <div class="container b-forgot-password-page">
  93. <div class="row">
  94. <div class="col-md-5 col-md-offset-4 col-sm-6 col-sm-offset-3">
  95. <div class="b-forgot-password-form">
  96. <h3 class="f-primary-l is-global-title">Forgot Username / Password</h3>
  97. <p>Enter your email and we'll send you your username and new password.</p>
  98. <div class="b-form-row b-form-inline b-form-horizontal b-form-password">
  99. <form id="form-upload" method="POST" enctype="multipart/form-data">
  100. <div class="b-form-row">
  101. <div class="b-form-horizontal--mail f-form-horizontal--mail">
  102. <i class="fa fa-envelope"></i>
  103. <input type="text" name="email" id="create_acm" name="create_acm" class="form-control" placeholder="Email" required/>
  104. <div id='email_availability_result'></div>
  105. </div>
  106. </div>
  107. <div class="b-form-row">
  108. <div>
  109. <button disabled="" type="submit" id="upload-gambar" class="b-btn f-btn button-sm b-btn-default f-primary-b b-btn__w100">Send Me Now</button>
  110. </div>
  111. </div>
  112. <center>
  113. <font color="green" id="success"></font>
  114. </center>
  115. </form>
  116. <!--<div class="b-form-row">
  117. <div class="b-form-horizontal--mail">
  118. <a href="#" class="f-link--color">Contact Online Support?</a>
  119. </div>
  120. </div>-->
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <?php
  128. include "element/footer.php";
  129. include "element/script_bawah.php";
  130. ?>
  131.  
  132.  
  133. </body>
  134. </html>
  135.  
  136. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement