Guest User

Untitled

a guest
Jan 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. $KIRONOS_LOGIN_API = file_get_contents("https://kironweb123.000webhostapp.com/servers/kironos/login.php");
  2. echo $KIRONOS_LOGIN_API;
  3.  
  4. Uncaught Error: Call to undefined function UserFound() in /storage/ssd3/001/3278001/public_html/projects/KironOS-2/login.php:37 Stack trace: #0 {main} thrown in /storage/ssd3/001/3278001/public_html/projects/KironOS-2/login.php on line 37
  5.  
  6. $USERNAME = $_GET["uname"];
  7. $USERNAME = strtolower($USERNAME);
  8. $USERNAME = ucfirst($USERNAME);
  9. $PASSWORD = $_GET["pword"];
  10.  
  11. $KIRONOS_LOGIN_API = file_get_contents("https://kironweb123.000webhostapp.com/servers/kironos/login.php");
  12. echo $KIRONOS_LOGIN_API;
  13.  
  14. if (UserFound($USERNAME)) {
  15. if (TryLogin($USERNAME,$PASSWORD)) {
  16. $_SESSION["kironos_uname"] = $USERNAME;
  17. ?>
  18. <script>
  19. editURL("homepage.php");
  20. </script>
  21. <?php
  22. } else {
  23. ?>
  24. <script>
  25. editURL("index.php");
  26. </script>
  27. <?php
  28. }
  29. } else {
  30. ?>
  31. <script>
  32. editURL("index.php");
  33. </script>
  34. <?php
  35. }
  36. }
  37. ?>
  38.  
  39. <?php
  40.  
  41. function UserFound($user) {
  42. $userdir = "https://kironweb123.000webhostapp.com/projects/KironOS-2/Users/".$user;
  43. if (file_exists($userdir)) {
  44. return true;
  45. } else {
  46. return false;
  47. }
  48. }
  49.  
  50. function TryLogin($user,$pass) {
  51. $userdir = "https://kironweb123.000webhostapp.com/projects/KironOS-2/Users/".$user;
  52. $passwFile = $userdir."/passw";
  53. $corrPassw = file_get_contents($passwFile);
  54. if ($corrPassw == $pass) {
  55. return true;
  56. } else {
  57. return false;
  58. }
  59. }
  60.  
  61. ?>
Add Comment
Please, Sign In to add comment