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

30 lines
1.2KB

  1. <?php
  2. /**
  3. * 站内新闻管理
  4. *
  5. * @version $Id: mynews_edit.php 1 15:28 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_once(dirname(__FILE__)."/config.php");
  12. CheckPurview('plus_站内新闻发布');
  13. if(empty($dopost)) $dopost = "";
  14. $aid = preg_replace("#[^0-9]#", "", $aid);
  15. if($dopost=="del")
  16. {
  17. $dsql->ExecuteNoneQuery("DELETE FROM #@__mynews WHERE aid='$aid';");
  18. ShowMsg("成功删除一条站内新闻!","mynews_main.php");
  19. exit();
  20. }
  21. else if($dopost=="editsave")
  22. {
  23. $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' WHERE aid='$aid';";
  24. $dsql->ExecuteNoneQuery($inquery);
  25. ShowMsg("成功更改一条站内新闻!","mynews_main.php");
  26. exit();
  27. }
  28. $myNews = $dsql->GetOne("SELECT #@__mynews.*,#@__arctype.typename FROM #@__mynews LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid WHERE #@__mynews.aid='$aid';");
  29. include DedeInclude('templets/mynews_edit.htm');