国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.8KB

  1. <?php
  2. /**
  3. * 会员短消息管理
  4. *
  5. * @version $Id: member_pm.php 1 11:24 2010年7月20日Z tianya $
  6. * @package DedeCMS.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license/v6
  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. {
  20. $ID = preg_replace("#[^0-9]#", "", $ID);
  21. if($dopost=="del"&&!empty($ID))
  22. {
  23. $dsql->ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'");
  24. }
  25. }
  26. $whereSql = '';
  27. if(!empty($folder)) $whereSql = "WHERE folder='$folder'";
  28. $postuser = "收件人";
  29. if($folder=="inbox"||$folder=='') $postuser = "发件人";
  30. if(!empty($keyword))
  31. {
  32. $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')";
  33. }
  34. if(!empty($username))
  35. {
  36. $whereSql .= " AND floginid like '%".$username."%'";
  37. }
  38. $sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc";
  39. $dlist = new DataListCP();
  40. $dlist->pagesize = 25;
  41. $dlist->SetParameter("folder",$folder);
  42. $dlist->SetParameter("username",$username);
  43. $dlist->SetParameter("keyword",$keyword);
  44. $dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm");
  45. $dlist->SetSource($sql);
  46. $dlist->Display();
  47. $dlist->Close();
  48. function GetFolders($me)
  49. {
  50. if($me=="outbox") return '发件箱';
  51. else if($me=="inbox") return '收件箱';
  52. }
  53. function IsReader($me)
  54. {
  55. $me = preg_replace("#[^0-1]#", "", $me);
  56. if($me) return "<font color='green'>√</font>";
  57. else return "<font color='red'>×</font>";
  58. }