Advertisement
Telinc1

Login form + detail checker (TeliH)

Jan 16th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <Teli
  2. Server.Operation.Connect('telinc', 'serverPass', 'telihost');
  3. Server.Operation.SelectDB('loginForm');
  4.  
  5. if (HTML.Button.'submit' == press) {
  6.  
  7. if (HTML.Input.'name'.empty == "N/A") {
  8.  
  9. if (HTML.Input.'pass'.empty == "N/A") {
  10.  
  11. var username * create
  12. var username = HTML.Input.'name';
  13.  
  14. var password * create
  15. var password = HTML.Input.'pass';
  16.  
  17. var dataGet * create
  18. var dataGet = runQuery("SELECT `password` FROM `users` WHERE `username` = "append(var username));
  19.  
  20. if (var dataGet #= "0") {
  21.  
  22. sessionSet('user_loggedIn');
  23. sesionPut('user_loggedIn', var username);
  24. redirect('index.tlf', '3');
  25.  
  26. }else{
  27. kill("The password is incorrect!");
  28. }
  29.  
  30. }else{
  31. kill("Please type a password");
  32. }
  33.  
  34. }else{
  35. kill("Please type a username");
  36. }
  37.  
  38. }else{
  39. display '
  40. <form action="" method="post">
  41. Username: <input style="text" name="name"><br />
  42. Password: <input style="password" name="pass"><br />
  43. <input type="submit" value="Login!" name="submit">
  44. </form>
  45. ';
  46. }
  47.  
  48. >
  49.  
  50. <html>
  51. <head>
  52. </head>
  53.  
  54. <body>
  55. </body>
  56.  
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement