reportsController.php 616 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. class reportsController extends Staple_Controller
  3. {
  4. private $authLevel;
  5. public function _start()
  6. {
  7. $auth = Staple_Auth::get();
  8. $this->authLevel = $auth->getAuthLevel();
  9. if($this->authLevel < 500)
  10. {
  11. header("location:".$this->_link(array('index','index'))."");
  12. }
  13. }
  14. public function index($year = null, $month = null)
  15. {
  16. if($year == null)
  17. {
  18. $year = date('Y');
  19. }
  20. if($month == null)
  21. {
  22. $month = date('m');
  23. }
  24. $report = new reportModel($year,$month);
  25. }
  26. }