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

member_pm.php 1.8KB

2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * 会员短消息管理
  4. *
  5. * @version $Id: member_pm.php 1 11:24 2010年7月20日Z 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('member_Pm');
  13. setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
  14. require_once(DEDEINC.'/datalistcp.class.php');
  15. if (!isset($folder)) $folder = '';
  16. if (!isset($username)) $username = '';
  17. if (!isset($keyword)) $keyword = '';
  18. if (isset($dopost)) {
  19. $ID = preg_replace("#[^0-9]#", "", $ID);
  20. if ($dopost == "del" && !empty($ID)) {
  21. $dsql->ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'");
  22. }
  23. }
  24. $whereSql = '';
  25. if (!empty($folder)) $whereSql = "WHERE folder='$folder'";
  26. $postuser = "收件人";
  27. if ($folder == "inbox" || $folder == '') $postuser = "发件人";
  28. if (!empty($keyword)) {
  29. $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')";
  30. }
  31. if (!empty($username)) {
  32. $whereSql .= " AND floginid like '%".$username."%'";
  33. }
  34. $sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc";
  35. $dlist = new DataListCP();
  36. $dlist->pagesize = 30;
  37. $dlist->SetParameter("folder", $folder);
  38. $dlist->SetParameter("username", $username);
  39. $dlist->SetParameter("keyword", $keyword);
  40. $dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm");
  41. $dlist->SetSource($sql);
  42. $dlist->Display();
  43. $dlist->Close();
  44. function GetFolders($me)
  45. {
  46. if ($me == "outbox") return '发件箱';
  47. else if ($me == "inbox") return '收件箱';
  48. }
  49. function IsReader($me)
  50. {
  51. $me = preg_replace("#[^0-1]#", "", $me);
  52. if ($me) return "<span class='text-dark'>√</span>";
  53. else return "<span class='text-danger'>×</span>";
  54. }