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

46 lines
1.5KB

  1. <?php
  2. /**
  3. * 会员短消息,发布所有消息
  4. *
  5. * @version $Id: member_pmall.php 1 11:24 2010年7月20日Z tianya $
  6. * @package DedeBIZ.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. $floginid = 'admin';
  16. $fromid = 0;
  17. $toid = 0;
  18. $tologinid = 0;
  19. $sendtime = time();
  20. $writetime = time();
  21. $subject = cn_substrR(HtmlReplace($subject), 70);
  22. $message = cn_substrR(HtmlReplace($message), 1000);
  23. if (!isset($subject) || empty($subject)) {
  24. ShowMsg('短信标题不能为空!', '-1');
  25. exit();
  26. } else if (!isset($message) || empty($message)) {
  27. ShowMsg('请填写短信内容!', '-1');
  28. exit();
  29. }
  30. #api{{
  31. if (defined('UC_API') && @include_once DEDEROOT . '/uc_client/client.php') {
  32. uc_pm_send(0, '', $subject, $message);
  33. ShowMsg('短信已成功发送', '-1');
  34. exit;
  35. }
  36. #/aip}}
  37. $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');");
  38. ShowMsg('短信已成功发送', '-1');
  39. exit();
  40. }
  41. require_once(DEDEADMIN . "/templets/member_pmall.htm");