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

80 lines
2.4KB

  1. <?php
  2. /**
  3. * 挑错管理
  4. *
  5. * @version $id:erraddsave.php 19:09 2010年7月12日 tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022 DedeBIZ.COM
  8. * @license GNU GPL v2 (https://www.dedebiz.com/license)
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__).'/config.php');
  12. require_once(DEDEINC.'/datalistcp.class.php');
  13. require_once(DEDEINC.'/common.func.php');
  14. if (empty($dopost)) $dopost = '';
  15. if (empty($fmdo)) $fmdo = '';
  16. function username($mid)
  17. {
  18. global $dsql;
  19. if (!isset($mid) || empty($mid)) {
  20. return "游客";
  21. } else {
  22. $sql = "SELECT uname FROM `#@__member` WHERE `mid` = '$mid'";
  23. $row = $dsql->GetOne($sql);
  24. return $row['uname'];
  25. }
  26. }
  27. function typename($me)
  28. {
  29. switch ($me) {
  30. case $me == 1:
  31. return $me = "错别字";
  32. case $me == 2:
  33. return $me = "成语运用不当";
  34. case $me == 3:
  35. return $me = "专业术语写法不规则";
  36. case $me == 4:
  37. return $me = "产品与图片不符";
  38. case $me == 5:
  39. return $me = "事实年代以及文档错误";
  40. case $me == 6:
  41. return $me = "事实年代以及文档错误";
  42. case $me == 7:
  43. return $me = "其他错误";
  44. default:
  45. return $me = "未知错误";
  46. }
  47. }
  48. if ($dopost == "delete") {
  49. if ($id == '') {
  50. ShowMsg("参数无效", "-1");
  51. exit();
  52. }
  53. if ($fmdo == 'yes') {
  54. $id = explode("`", $id);
  55. foreach ($id as $var) {
  56. $query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'";
  57. $dsql->ExecuteNoneQuery($query);
  58. }
  59. ShowMsg("成功删除指定的文档", "erraddsave.php");
  60. exit();
  61. } else {
  62. require_once(DEDEINC."/libraries/oxwindow.class.php");
  63. $wintitle = "删除文档错误";
  64. $win = new OxWindow();
  65. $win->Init("erraddsave.php", "/static/web/js/admin.blank.js", "POST");
  66. $win->AddHidden("fmdo", "yes");
  67. $win->AddHidden("dopost", $dopost);
  68. $win->AddHidden("id", $id);
  69. $win->AddTitle("您确定要删除".$id."错误提示吗");
  70. $winform = $win->GetWindow("ok");
  71. $win->Display();
  72. exit();
  73. }
  74. }
  75. $sql = "SELECT * FROM `#@__erradd` ORDER BY id DESC";
  76. $dlist = new DataListCP();
  77. $dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm");
  78. $dlist->SetSource($sql);
  79. $dlist->display();
  80. ?>