Guest User

Untitled

a guest
Aug 29th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace home\controller;
  15.  
  16. class index
  17. {
  18. public function __construct()
  19. {
  20. $auth = new softauth();
  21. $auth->checkAuth();
  22. }
  23.  
  24. public function index()
  25. {
  26. tools::getUser();
  27. header('location:list');
  28. exit(1);
  29. }
  30.  
  31. public function login()
  32. {
  33. v();
  34. }
  35.  
  36. public function loginajax()
  37. {
  38. $u = $_POST['username'];
  39. $p = md5($_POST['password']);
  40. $isuser = m('user')->where(['username' => $u, 'password' => $p])->find();
  41.  
  42. if ($isuser) {
  43. cookie('username', $u);
  44. cookie('password', $p);
  45. $ret['ret'] = 1;
  46. }
  47. else {
  48. $ret['ret'] = 0;
  49. $ret['message'] = '用户名或密码错误!';
  50. }
  51.  
  52. echoJson($ret);
  53. ..................................................................
  54. ..............................................
  55. ............
Add Comment
Please, Sign In to add comment