Advertisement
Guest User

Untitled

a guest
May 20th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2. include 'includes.inc.php';
  3.  
  4. class LoginAction implements IAction
  5. {
  6. public function __construct ()
  7. {
  8.  
  9. }
  10. public function actionIsset ()
  11. {
  12. if (!isset($_POST)
  13. {
  14. return false;
  15. }
  16. $user = $_POST["username"];
  17. $pass = $_POST["password"];
  18. if (isempty($user) || isempty($pass))
  19. {
  20. return false;
  21. }
  22. //check in baza de date sa vad daca exista userul si parola asta -> vezi lab2
  23.  
  24. return true;
  25. }
  26.  
  27.  
  28. public function execute ()
  29. {
  30. if(actionIsset() == true)
  31. }
  32. else
  33. {
  34. throw new ActionNotSetException;
  35. }
  36. }
  37. }
  38.  
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement