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

42 line
1.7KB

  1. <?php
  2. /**
  3. * 评论修改
  4. *
  5. * @version $id:feedback_edit.php 19:09 2010年7月12日 tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022 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('sys_Feedback');
  13. $id = isset($id) && is_numeric($id) ? $id : 0;
  14. $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "feedback_main.php" : $_COOKIE['ENV_GOBACK_URL'];
  15. if (empty($dopost)) $dopost = "";
  16. if ($dopost == 'edit') {
  17. $msg = cn_substrR($msg, 3500);
  18. $adminmsg = trim($adminmsg);
  19. if ($adminmsg != "") {
  20. $adminmsg = cn_substrR($adminmsg, 1500);
  21. $adminmsg = str_replace("<", "&lt;", $adminmsg);
  22. $adminmsg = str_replace(">", "&gt;", $adminmsg);
  23. $adminmsg = str_replace(" ", "&nbsp;&nbsp;", $adminmsg);
  24. $adminmsg = str_replace("\r\n", "<br>\n", $adminmsg);
  25. $msg = $msg."<br>\n"."<span class='text-primary'>管理员回复:$adminmsg</span>\n";
  26. }
  27. $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id";
  28. $dsql->ExecuteNoneQuery($query);
  29. ShowMsg("成功回复一则留言", $ENV_GOBACK_URL);
  30. exit();
  31. } elseif ($dopost === 'makehtml') {
  32. require_once(DEDEADMIN.'/inc/inc_archives_functions.php');
  33. $query = "SELECT * FROM `#@__feedback` WHERE id=$id";
  34. $row = $dsql->GetOne($query);
  35. MakeArt($row['aid']);
  36. ShowMsg("成功更新评论所在的文档", $ENV_GOBACK_URL);
  37. exit();
  38. }
  39. $query = "SELECT * FROM `#@__feedback` WHERE id=$id";
  40. $row = $dsql->GetOne($query);
  41. include DedeInclude('templets/feedback_edit.htm');
  42. ?>