Advertisement
Guest User

Untitled

a guest
May 28th, 2011
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.57 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
  2.  
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <script src="jquery.js" type="text/javascript" language="javascript"></script>
  5. <script type="text/javascript">
  6. var MyFirstVar = <?php echo $_POST['username']; ?> ;
  7.  
  8. ;$(document).ready(function()
  9. {
  10.  
  11. $("#username").blur(function()
  12. {
  13. //remove all the class add the messagebox classes and start fading
  14. $("#msgbox").removeClass().addClass('messagebox').text('Kijken in de database').fadeIn("slow");
  15. //check the username exists or not from ajax
  16. $.post("register/user_availability.php",{ user_name:$(this).val() } ,function(data)
  17. {
  18. if(data=='no') //if username not avaiable
  19. {
  20. $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
  21. {
  22. //add message and change the class of the box and start fading
  23. $(this).html('Deze gebruikersnaam bestaat al').addClass('messageboxerror').fadeTo(900,1);
  24. });
  25. }
  26. else {
  27. $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
  28. {
  29. //add message and change the class of the box and start fading
  30. $(this).html('Deze naam is nog niet in gebruik').addClass('messageboxok').fadeTo(900,1);
  31. });
  32. }
  33.  
  34. });
  35.  
  36. });
  37. });
  38.  
  39. $(document).ready(function()
  40. {
  41.  
  42. $("#pass").blur(function()
  43. {
  44. //remove all the class add the messagebox classes and start fading
  45. $("#passmessage").removeClass().addClass('messagebox').text('Wachtwoord check').fadeIn("slow");
  46. //check the username exists or not from ajax
  47. $.post("register/pass_check.php",{ user_name:$('#username').val(),pass:$('#pass').val() } ,function(data)
  48. {
  49. if(data=='no') //if username not avaiable
  50. {
  51. $("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
  52. {
  53. //add message and change the class of the box and start fading
  54. $(this).html('Je wachtwoord is het zelfde als je gebruikersnaam').addClass('messageboxerror').fadeTo(900,1);
  55. });
  56. }
  57.  
  58. else if(data=='min') //if username not avaiable
  59. {
  60. $("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
  61. {
  62. //add message and change the class of the box and start fading
  63. $(this).html('Je moet minimaal 8 tekens in je wachtwoord').addClass('messageboxerror').fadeTo(900,1);
  64. });
  65. }
  66. else if(data=='empty') //if username not avaiable
  67. {
  68. $("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
  69. {
  70. //add message and change the class of the box and start fading
  71. $(this).html('Je moet wel wat invullen').addClass('messageboxerror').fadeTo(900,1);
  72. });
  73. }
  74. else {
  75. $("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
  76. {
  77. //add message and change the class of the box and start fading
  78. $(this).html('Dit wachtwoord is goed').addClass('messageboxok').fadeTo(900,1);
  79. });
  80. }
  81.  
  82. });
  83.  
  84. });
  85. });
  86.  
  87. $(document).ready(function()
  88. {
  89.  
  90. $("#regels").blur(function()
  91. {
  92. //remove all the class add the messagebox classes and start fading
  93. $("#regelbericht").removeClass().addClass('messagebox').text('Regelcheck').fadeIn("slow");
  94. //check the username exists or not from ajax
  95. $.post("register/regel_check.php",{ regels:$('#regels').val()} ,function(data)
  96. {
  97. if(data=='no') //if username not avaiable
  98. {
  99. $("#regelbericht").fadeTo(200,0.1,function() //start fading the messagebox
  100. {
  101. //add message and change the class of the box and start fading
  102. $(this).html('Accepteer de regels').addClass('messageboxerror').fadeTo(900,1);
  103. });
  104. }
  105.  
  106. else {
  107. $("#regelbericht").fadeTo(200,0.1,function() //start fading the messagebox
  108. {
  109. //add message and change the class of the box and start fading
  110. $(this).html('Je heb de regels geaccepteert').addClass('messageboxok').fadeTo(900,1);
  111. });
  112. }
  113.  
  114. });
  115.  
  116. });
  117. });
  118.  
  119.  
  120. $(document).ready(function()
  121. {
  122.  
  123. $("#pass2").blur(function()
  124. {
  125. //remove all the class add the messagebox classes and start fading
  126. $("#herhaalmessage").removeClass().addClass('messagebox').text('Wachtwoord check').fadeIn("slow");
  127. //check the username exists or not from ajax
  128. $.post("register/pass_herhaal.php",{ pass:$('#pass').val(),pass2:$('#pass2').val() } ,function(data)
  129. {
  130. if(data=='no') //if username not avaiable
  131. {
  132. $("#herhaalmessage").fadeTo(200,0.1,function() //start fading the messagebox
  133. {
  134. //add message and change the class of the box and start fading
  135. $(this).html('Je wachtwoorden zijn niet gelijk').addClass('messageboxerror').fadeTo(900,1);
  136. });
  137. }
  138.  
  139.  
  140. else if(data=='empty') //if username not avaiable
  141. {
  142. $("#herhaalmessage").fadeTo(200,0.1,function() //start fading the messagebox
  143. {
  144. //add message and change the class of the box and start fading
  145. $(this).html('Je heb geen wachtwoord ingevult').addClass('messageboxerror').fadeTo(900,1);
  146. });
  147. }
  148.  
  149.  
  150. else {
  151. $("#herhaalmessage").fadeTo(200,0.1,function() //start fading the messagebox
  152. {
  153. //add message and change the class of the box and start fading
  154. $(this).html('Je wachtwoorden zijn gelijk').addClass('messageboxok').fadeTo(900,1);
  155. });
  156. }
  157.  
  158. });
  159.  
  160. });
  161. });
  162.  
  163. $(document).ready(function()
  164. {
  165.  
  166. $("#mail2").blur(function()
  167. {
  168. //remove all the class add the messagebox classes and start fading
  169. $("#mail2message").removeClass().addClass('messagebox').text('Mail check').fadeIn("slow");
  170. //check the username exists or not from ajax
  171. $.post("register/mail_herhaal.php",{ mail:$('#mail').val(),mail2:$('#mail2').val() } ,function(data)
  172. {
  173. if(data=='no') //if username not avaiable
  174. {
  175. $("#mail2message").fadeTo(200,0.1,function() //start fading the messagebox
  176. {
  177. //add message and change the class of the box and start fading
  178. $(this).html('Je mail adressen zijn niet identiek').addClass('messageboxerror').fadeTo(900,1);
  179. });
  180. }
  181.  
  182.  
  183. else if(data=='empty') //if username not avaiable
  184. {
  185. $("#mail2message").fadeTo(200,0.1,function() //start fading the messagebox
  186. {
  187. //add message and change the class of the box and start fading
  188. $(this).html('Je moet wel wat invullen').addClass('messageboxerror').fadeTo(900,1);
  189. });
  190. } else
  191. {
  192. $("#mail2message").fadeTo(200,0.1,function() //start fading the messagebox
  193. {
  194. //add message and change the class of the box and start fading
  195. $(this).html('Je email adrres zijn gelijk').addClass('messageboxok').fadeTo(900,1);
  196. });
  197. }
  198.  
  199. });
  200.  
  201. });
  202. });
  203.  
  204. $(document).ready(function()
  205. {
  206. $("#mail").blur(function()
  207. {
  208. //remove all the class add the messagebox classes and start fading
  209. $("#mailmessage").removeClass().addClass('messagebox').text('Kijken in de database').fadeIn("slow");
  210. //check the username exists or not from ajax
  211. $.post("register/mail_availability.php",{ user_name:$(this).val() } ,function(data)
  212. {
  213. if(data=='no') //if username not avaiable
  214. {
  215. $("#mailmessage").fadeTo(200,0.1,function() //start fading the messagebox
  216. {
  217. //add message and change the class of the box and start fading
  218. $(this).html('Deze mail is al ingebruik').addClass('messageboxerror').fadeTo(900,1);
  219. });
  220. }
  221. else {
  222. $("#mailmessage").fadeTo(200,0.1,function() //start fading the messagebox
  223. {
  224. //add message and change the class of the box and start fading
  225. $(this).html('Mail naam is nog niet in gebruik').addClass('messageboxok').fadeTo(900,1);
  226. });
  227. }
  228.  
  229. });
  230.  
  231. });
  232. });
  233.  
  234. $(function(){
  235. $("#register_form").submit(function(){
  236. //remove all the class add the messagebox classes and start fading
  237. $("#aangemeldtekst").removeClass().addClass("messagebox_form").text("Account aan maken").fadeIn(1400);
  238. //check the username exists or not from ajax
  239. $.ajax({
  240. type: "POST",
  241. url: "register/ajax_register.php",
  242. data: "user_name=" + $("#username").val() + "&pass=" + $("#pass").val() + "&pass2=" + $("#pass2").val() + "&mail=" + $("#mail").val() + "&mail2=" + $("#mail2").val() + "&regels=" + $("#regels").val() + "&rand=" + Math.random(),
  243. success: function(msg){
  244. if(msg == "yes"){ //if correct login detail
  245. $("#aangemeldtekst").fadeTo(200,0.1,function(){ //start fading the messagebox
  246. //add message and change the class of the box and start fading
  247.  
  248. $(this).html("Je bent zojuist aangemeld ."+MyFirstVar+". Activeer je mail").addClass("messageboxok_form").fadeTo(900, 1, function(){
  249. //redirect to secure page
  250. });
  251. });
  252. } else{
  253. $("#aangemeldtekst").fadeTo(200, 0.1, function(){ //start fading the messagebox
  254. //add message and change the class of the box and start fading
  255. $(this).html("Je kon je niet aan melden probeer het opnieuw...").addClass("messageboxerror_form").fadeTo(900, 1);
  256. });
  257. }
  258. }
  259. });
  260. return false; //not to post the form physically
  261. });
  262. //now call the ajax also focus move from
  263. $("#register_form").blur(function(){
  264. $("#register_form").trigger("submit");
  265. });
  266. });
  267. </script>
  268. <style type="text/css">
  269. body {
  270. font-family:Verdana, Arial, Helvetica, sans-serif;
  271. font-size:11px;
  272. }
  273. .top {
  274. margin-bottom: 15px;
  275. }
  276. .messagebox{
  277. position:absolute;
  278. width:auto;
  279. margin-left:30px;
  280. border:1px solid #c93;
  281. background:#ffc;
  282. padding:3px;
  283. }
  284. .messageboxok{
  285. position:absolute;
  286. width:auto;
  287. margin-left:30px;
  288. border:1px solid #349534;
  289. background:#C9FFCA;
  290. padding:3px;
  291. font-weight:bold;
  292. color:#008000;
  293.  
  294. }
  295. .messageboxerror{
  296. position:absolute;
  297. width:auto;
  298. margin-left:30px;
  299. border:1px solid #CC0000;
  300. background:#F7CBCA;
  301. padding:3px;
  302. font-weight:bold;
  303. color:#CC0000;
  304. }
  305.  
  306. .messagebox_form{
  307. position:absolute;
  308. width:auto;
  309. border:1px solid #c93;
  310. background:#ffc;
  311. padding:3px;
  312. }
  313. .messageboxok_form{
  314. position:absolute;
  315. width:auto;
  316. border:1px solid #349534;
  317. background:#C9FFCA;
  318. padding:3px;
  319. font-weight:bold;
  320. color:#008000;
  321.  
  322. }
  323. .messageboxerror_form{
  324. position:absolute;
  325. width:auto;
  326. border:1px solid #CC0000;
  327. background:#F7CBCA;
  328. padding:3px;
  329. font-weight:bold;
  330. color:#CC0000;
  331. }
  332.  
  333. </style>
  334. </head>
  335. <body>
  336. <form method="post" action="" id="register_form">
  337.  
  338. <p>Welkom op true-crime Zin om mee te spelen meld je nu aan. <small>Let er op er komt een activatie link naar je mail</small></p>
  339. <div>
  340. <span id="aangemeldtekst" style="display:none"></span>
  341.  
  342. <br><br><br>
  343. </div>
  344.  
  345. <table >
  346. <td width="200">User Name :</td> <td width="200"> <input name="username" type="text" id="username" value="" maxlength="15" /></td>
  347. <td width="200"><span id="msgbox" style="display:none"></span></td>
  348. </table>
  349.  
  350. <table >
  351. <td width="200">Mail adres:</td> <td width="200"> <input name="mail" type="text" id="mail" value="" maxlength="90" /></td>
  352. <td width="200"> <span id="mailmessage" style="display:none"></span></td>
  353. </table>
  354.  
  355. <table >
  356. <td width="200">Herhaal Mail:</td> <td width="200"> <input name="mail2" type="text" id="mail2" value="" maxlength="90" /></td>
  357. <td width="200"> <span id="mail2message" style="display:none"></span></td>
  358. </table>
  359.  
  360. <table >
  361. <td width="200">Wachtwoord:</td> <td width="200"> <input name="pass" type="password" id="pass" value="" maxlength="15" /></td>
  362. <td width="200"> <span id="passmessage" style="display:none"></span></td>
  363. </table>
  364.  
  365.  
  366. <table >
  367. <td width="200">Herhaal Pass:</td> <td width="200"> <input name="pass2" type="password" id="pass2" value="" maxlength="15" /></td>
  368. <td width="200"> <span id="herhaalmessage" style="display:none"></span></td>
  369. </table>
  370.  
  371. <table >
  372. <td width="400" align="left"><input name="regels" type="checkbox" id="regels" /> Accepteer de regels</td>
  373. <td width="200"> <span id="regelbericht" style="display:none"></span></td>
  374. </table>
  375.  
  376. <table>
  377. <td col colspan="10" align="center"><input name="submit" type="submit" id="aanmelden_form" value="Maak account aan" /> </td>
  378. </table>
  379. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement