task.php 652 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 16/3/17
  6. * Time: 下午2:09
  7. */
  8. defined('InShopNC') or exit('Access Invalid!');
  9. class taskControl extends mobileHomeControl
  10. {
  11. public function __construct()
  12. {
  13. parent::__construct();
  14. }
  15. public function indexOp()
  16. {
  17. TPL::showpage("task_home");
  18. }
  19. public function addOp()
  20. {
  21. $task = $_POST['task'];
  22. if(!empty($task)) {
  23. if(!is_array($_SESSION['task'])) {
  24. $_SESSION['task'] = array();
  25. }
  26. $_SESSION['task'][] = $task;
  27. }
  28. self::outsuccess(NULL,"task_home");
  29. }
  30. }