すくすくゴートうちゃん Android 版(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

user.mod.hsp 658 B

1 year ago
1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #include "./modules/http.mod.hsp"
  2. #ifndef __USER__
  3. #define __USER__
  4. #module \
  5. User
  6. #define CREATE_URL (CONFIG_SERVER_URL + "/create_user.php")
  7. #define FETCH_URL (CONFIG_SERVER_URL + "/fetch_user.php")
  8. #deffunc local \
  9. Create \
  10. str p_name,
  11. local l_data
  12. Fetch@Http CREATE_URL + "?name=" + p_name
  13. If status@Http = STATUS_SUCCESS@Http {
  14. Split data@Http, ",", l_data
  15. id = Int (l_data.0)
  16. pass = l_data.1
  17. inheritanceCode = l_data.2
  18. }
  19. Else {
  20. id = 0
  21. pass = ""
  22. inheritanceCode = ""
  23. }
  24. Return
  25. #deffunc local \
  26. Auth \
  27. int p_id,\
  28. local l_data
  29. id = userId@Setting
  30. pass = userPasscode@Setting
  31. Return
  32. #global
  33. #endif ; not __USER__