Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.38 KB | None | 0 0
  1. $.post('../../system/app/ajaxrequests/register.php', { register: "", referrer: referrer, motto: motto, avatar: avatar, username: username, email: email, password: password, password_repeat: password_repeat, sec_word: secword}, function(errorCode)
  2. {
  3. if (errorCode == 'succes' || errorCode == 'ref_errorsucces')
  4. {
  5. window.location.href = "/me";
  6. }
  7. else
  8. {
  9. window.location.href = "#top";
  10. $(".error").fadeIn("18000").css('display', 'block');
  11. console.log(errorCode);
  12. if (language == 'nl')
  13. {
  14. if (errorCode == "empty_username")
  15. {
  16. $(".error").text("Je hebt geen gebruikersnaam ingevoerd.");
  17. }
  18. else if (errorCode == "register_disable")
  19. {
  20. $(".error").text("Registreren is op dit moment niet mogelijk!");
  21. }
  22. else if (errorCode == "empty_password")
  23. {
  24. $(".error").text("Je hebt geen wachtwoord ingevoerd.");
  25. }
  26. else if (errorCode == "empty_password_repeat")
  27. {
  28. $(".error").text("Je hebt je wachtwoord niet bevestigd.");
  29. }
  30. else if (errorCode == "empty_email")
  31. {
  32. $(".error").text("Je hebt geen email ingevoerd.");
  33. }
  34. else if (errorCode == "valid_email")
  35. {
  36. $(".error").text("Je email is geen geldig email adres.");
  37. }
  38. else if (errorCode == "used_username")
  39. {
  40. $(".error").text("Deze gebruikersnaam bestaat jammer genoeg al.");
  41. }
  42. else if (errorCode == "used_email")
  43. {
  44. $(".error").text("Dit email adres staat al in onze database.");
  45. }
  46. else if (errorCode == "short_password")
  47. {
  48. $(".error").text("Je wachtwoord moet uit minimaal 6 karakters bestaan.");
  49. }
  50. else if (errorCode == "password_repeat_error")
  51. {
  52. $(".error").text("Je wachtwoorden komen niet met elkaar overeen.");
  53. }
  54. else if (errorCode == "to_many_ip")
  55. {
  56. $(".error").text("Je mag maar maximaal 3 accounts op dit IP registreren.");
  57. }
  58. else if (errorCode == "robot")
  59. {
  60. $(".error").text("Ik ben geen robot.");
  61. }
  62. else if (errorCode == 'ref_error')
  63. {
  64. $(".error").text('Er is een fout opgetreden met jouw referrer. De referrer mag niet afkomstig zijn van jouw IP.');
  65. }
  66. else
  67. {
  68. $(".error").text("Er is een fout opgetreden! Neem a.u.b. contact op met de Website Beheerder.").css('display', 'block');
  69. }
  70. }
  71. else if (language == 'es')
  72. {
  73. if (errorCode == "empty_username")
  74. {
  75. $(".error").text("You forget enter a username.");
  76. }
  77. else if (errorCode == "register_disable")
  78. {
  79. $(".error").text("Registration is not enabled by the administrator.");
  80. }
  81. else if(errorCode == "short_username")
  82. {
  83. $(".error").text("Seems like you're username is too short.");
  84. }
  85. else if(errorCode == "short_sec_word")
  86. {
  87. $(".error").text("Dang! Your secret-word is too short.");
  88. }
  89. else if(errorCode == "empty_sec_word")
  90. {
  91. $(".error").text("Fiddle Sticks! You're secret-word is completely empty.");
  92. }
  93. else if (errorCode == "empty_password")
  94. {
  95. $(".error").text("You forget enter a password.");
  96. }
  97. else if (errorCode == "empty_password_repeat")
  98. {
  99. $(".error").text("You forget enter the conformation password.");
  100. }
  101. else if (errorCode == "empty_email")
  102. {
  103. $(".error").text("You forget enter a email adres.");
  104. }
  105. else if (errorCode == "valid_email")
  106. {
  107. $(".error").text("You email adres isn't valid.");
  108. }
  109. else if (errorCode == "used_username")
  110. {
  111. $(".error").text("This username is already in use.");
  112. }
  113. else if (errorCode == "used_email")
  114. {
  115. $(".error").text("This email adres is already in use.");
  116. }
  117. else if (errorCode == "short_password")
  118. {
  119. $(".error").text("Your password must be at least 6 characters.");
  120. }
  121. else if (errorCode == "password_repeat_error")
  122. {
  123. $(".error").text("The passwords don't match.");
  124. }
  125. else if (errorCode == "to_many_ip")
  126. {
  127. $(".error").text("You can only register up to three accounts on this IP.");
  128. }
  129. else if (errorCode == "robot")
  130. {
  131. $(".error").text("I'm not a robot.");
  132. }
  133. else if (errorCode == 'ref_error')
  134. {
  135. $(".error").text('Er is een fout opgetreden met jouw referrer. De referrer mag niet afkomstig zijn van jouw IP.');
  136. }
  137. else
  138. {
  139. $(".error").text("An error has occurred. Please contact thggge CMS administrator.").css('display', 'block');
  140. }
  141. }
  142. else
  143. {
  144. if (errorCode == 'empty_username')
  145. {
  146. $(".error").text("You forget enter a username.");
  147.  
  148. }
  149. else if (errorCode == "register_disable")
  150. {
  151. $(".error").text("Registration is not enabled by the administrator.");
  152. }
  153. else if (errorCode == "empty_password")
  154. {
  155. $(".error").text("You forget enter a password.");
  156. }
  157. else if (errorCode == "empty_password_repeat")
  158. {
  159. $(".error").text("You forget enter the conformation password.");
  160. }
  161. else if (errorCode == "empty_email")
  162. {
  163. $(".error").text("You forget enter a email adres.");
  164. }
  165. else if (errorCode == "valid_email")
  166. {
  167. $(".error").text("You email adres isn't valid.");
  168. }
  169. else if (errorCode == "used_username")
  170. {
  171. $(".error").text("This username is already in use.");
  172. }
  173. else if (errorCode == "used_email")
  174. {
  175. $(".error").text("This email adres is already in use.");
  176. }
  177. else if (errorCode == "short_password")
  178. {
  179. $(".error").text("Your password must be at least 6 characters.");
  180. }
  181. else if (errorCode == "password_repeat_error")
  182. {
  183. $(".error").text("The passwords don't match.");
  184. }
  185. else if (errorCode == "to_many_ip")
  186. {
  187. $(".error").text("You can only register up to three accounts on this IP.");
  188. }
  189. else if (errorCode == "robot")
  190. {
  191. $(".error").text("I'm not a robot.");
  192. }
  193. else if (errorCode == 'ref_error')
  194. {
  195. $(".error").text('Referrer user is not a good match!');
  196. }
  197. else
  198. {
  199. $(".error").text("An error has occurred. Please contact the CMS administrator.").css('display', 'block');
  200. console.log(errorCode);
  201. }
  202. }
  203. }
  204. });
  205. });
  206. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement