indexController.php 760 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. class indexController extends Staple_Controller
  3. {
  4. public function _start()
  5. {
  6. }
  7. public function index()
  8. {
  9. $messages = array("The library will be closed on Monday for whatever reason. Just remember to not come in!");
  10. //$this->view->messages = $messages;
  11. }
  12. public function timesheet()
  13. {
  14. $timesheet = new timesheetModel();
  15. $this->view->timesheet = $timesheet->load();
  16. $insertTimeForm = new insertTimeForm();
  17. if($insertTimeForm->wasSubmitted())
  18. {
  19. $insertTimeForm->addData($_POST);
  20. if($insertTimeForm->validate())
  21. {
  22. echo "Valid Form!";
  23. }
  24. else
  25. {
  26. $this->view->insertTimeForm = $insertTimeForm;
  27. }
  28. }
  29. else
  30. {
  31. $this->view->insertTimeForm = $insertTimeForm;
  32. }
  33. }
  34. public function insert()
  35. {
  36. }
  37. }
  38. ?>