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

29 lines
1.2KB

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