国内流行的内容管理系统(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.

34 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 DedeCMS.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. {
  16. $starttime = empty($starttime) ? 0 : GetMkTime($starttime);
  17. $endtime = empty($endtime) ? 0 : GetMkTime($endtime);
  18. $runtime = $h.':'.$m;
  19. $Query = "INSERT INTO `#@__sys_task`(`taskname`,`dourl`,`islock`,`runtype`,`runtime`,`starttime`,`endtime`,`freq`,`lastrun`,`description`,`parameter`,`settime`)
  20. VALUES('$taskname', '$dourl', '$nislock', '$runtype', '$runtime', '$starttime', '$endtime','$freq', '0', '$description','$parameter', '".time()."'); ";
  21. $rs = $dsql->ExecuteNoneQuery($Query);
  22. if($rs)
  23. {
  24. ShowMsg('成功增加一个任务!', 'sys_task.php');
  25. }
  26. else
  27. {
  28. ShowMsg('增加任务失败!'.$dsql->GetError(), 'javascript:;');
  29. }
  30. exit();
  31. }
  32. include DedeInclude('templets/sys_task_add.htm');