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

47 lines
1.5KB

  1. <?php
  2. /**
  3. * 会员短消息,发布所有消息
  4. *
  5. * @version $Id: member_pmall.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
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. CheckPurview('member_Pm');
  13. if(!isset($action)) $action = '';
  14. if($action=="post")
  15. {
  16. $floginid = 'admin';
  17. $fromid = 0;
  18. $toid = 0;
  19. $tologinid = 0;
  20. $sendtime = time();
  21. $writetime = time();
  22. $subject = cn_substrR(HtmlReplace($subject),70);
  23. $message = cn_substrR(HtmlReplace($message),1000);
  24. if(!isset($subject)||empty($subject))
  25. {
  26. ShowMsg('短信标题不能为空!','-1');
  27. exit();
  28. } else if (!isset($message) || empty($message))
  29. {
  30. ShowMsg('请填写短信内容!','-1');
  31. exit();
  32. }
  33. #api{{
  34. if(defined('UC_API') && @include_once DEDEROOT.'/uc_client/client.php')
  35. {
  36. uc_pm_send(0,'',$subject,$message);
  37. ShowMsg('短信已成功发送','-1'); exit;
  38. }
  39. #/aip}}
  40. $rs = $dsql->ExecuteNoneQuery("INSERT INTO #@__member_pms(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');");
  41. ShowMsg('短信已成功发送','-1');
  42. exit();
  43. }
  44. require_once(DEDEADMIN."/templets/member_pmall.htm");