国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2KB

  1. <?php
  2. /**
  3. * 增加任务
  4. *
  5. * @version $Id: sys_task_add.php 1 23:07 2010年7月20日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require(dirname(__FILE__) . "/config.php");
  12. CheckPurview('sys_Task');
  13. if (empty($dopost)) $dopost = '';
  14. if ($dopost == 'save') {
  15. $starttime = empty($starttime) ? 0 : GetMkTime($starttime);
  16. $endtime = empty($endtime) ? 0 : GetMkTime($endtime);
  17. $runtime = $h . ':' . $m;
  18. $Query = "INSERT INTO `#@__sys_task`(`taskname`,`dourl`,`islock`,`runtype`,`runtime`,`starttime`,`endtime`,`freq`,`lastrun`,`description`,`parameter`,`settime`)
  19. VALUES('$taskname', '$dourl', '$nislock', '$runtype', '$runtime', '$starttime', '$endtime','$freq', '0', '$description','$parameter', '" . time() . "'); ";
  20. $rs = $dsql->ExecuteNoneQuery($Query);
  21. if ($rs) {
  22. ShowMsg('成功增加一个任务!', 'sys_task.php');
  23. } else {
  24. ShowMsg('增加任务失败!' . $dsql->GetError(), 'javascript:;');
  25. }
  26. exit();
  27. }
  28. include DedeInclude('templets/sys_task_add.htm');