Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <?php
  2. include("Module_Get_User_Info.php");
  3. $CUI = new CUI;
  4.  
  5. function clean($str, $encode_ent = false) {
  6. $str = @trim($str);
  7. if($encode_ent) {
  8. $str = htmlentities($str);
  9. }
  10. if(version_compare(phpversion(),'4.3.0') >= 0) {
  11. if(get_magic_quotes_gpc()) {
  12. $str = stripslashes($str);
  13. }
  14. if(@mysql_ping()) {
  15. $str = mysql_real_escape_string($str);
  16. }
  17. else {
  18. $str = addslashes($str);
  19. }
  20. }
  21. else {
  22. if(!get_magic_quotes_gpc()) {
  23. $str = addslashes($str);
  24. }
  25. }
  26. return $str;
  27. }
  28.  
  29. if(isset($_GET['usr'])){
  30. if(isset($_GET['pw'])){
  31. $Username = clean($_GET['usr']);
  32. $Password = clean($_GET['pw']);
  33. $user_login_query = "SELECT user_id FROM gotactics_users WHERE go_username='".$Username."' AND go_user_password='".$Password."'";
  34. $user_login_result=mysql_query($user_login_query);
  35. if(mysql_num_rows($user_login_result)>0) {
  36. $user_info_array=mysql_fetch_assoc($user_login_result);
  37. $CUI->Username = clean($Username);
  38. $return_code = "logged_in";
  39. echo $return_code;
  40. }
  41. }
  42. }
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement