SendMsg.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. require("../../member/class/user.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=1;
  10. //验证用户
  11. $lur=is_login();
  12. $logininid=$lur['userid'];
  13. $loginin=$lur['username'];
  14. $loginrnd=$lur['rnd'];
  15. $loginlevel=$lur['groupid'];
  16. $loginadminstyleid=$lur['adminstyleid'];
  17. //ehash
  18. $ecms_hashur=hReturnEcmsHashStrAll();
  19. //验证权限
  20. CheckLevel($logininid,$loginin,$classid,"msg");
  21. $enews=$_POST['enews'];
  22. if($enews)
  23. {
  24. hCheckEcmsRHash();
  25. @set_time_limit(0);
  26. }
  27. if($enews=="SendMsg")
  28. {
  29. include("../../class/com_functions.php");
  30. include "../".LoadLang("pub/fun.php");
  31. DoSendMsg($_POST,0,$logininid,$loginin);
  32. }
  33. $groupid=(int)$_GET['groupid'];
  34. //----------会员组
  35. $sql=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  36. while($level_r=$empire->fetch($sql))
  37. {
  38. if($groupid==$level_r[groupid])
  39. {$select=" selected";}
  40. else
  41. {$select="";}
  42. $membergroup.="<option value=".$level_r[groupid].$select.">".$level_r[groupname]."</option>";
  43. }
  44. db_close();
  45. $empire=null;
  46. ?>
  47. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  48. <html>
  49. <head>
  50. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  51. <title>发送站内短消息</title>
  52. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  53. </head>
  54. <body>
  55. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  56. <tr>
  57. <td>位置: <a href="SendMsg.php<?=$ecms_hashur['whehref']?>">发送站内短消息</a></td>
  58. </tr>
  59. </table>
  60. <form name="sendform" method="post" action="SendMsg.php" onsubmit="return confirm('确认要发送?');">
  61. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  62. <?=$ecms_hashur['form']?>
  63. <tr class="header">
  64. <td height="25" colspan="2"><div align="center">发送站内短消息
  65. <input name="enews" type="hidden" id="enews" value="SendMsg">
  66. </div></td>
  67. </tr>
  68. <tr>
  69. <td height="25" bgcolor="#FFFFFF">接收会员组</td>
  70. <td bgcolor="#FFFFFF"> <select name="groupid[]" size="5" multiple id="groupid[]">
  71. <?=$membergroup?>
  72. </select> <font color="#666666">(全选用&quot;CTRL+A&quot;,选择多个用CTRL/SHIFT+点击选择)</font></td>
  73. </tr>
  74. <tr>
  75. <td height="25" bgcolor="#FFFFFF">接收会员用户名</td>
  76. <td bgcolor="#FFFFFF"><input name="username" type="text" id="username" size="60">
  77. <font color="#666666">(多个用户名“|”隔开)</font></td>
  78. </tr>
  79. <tr>
  80. <td height="25" bgcolor="#FFFFFF">每组发送个数</td>
  81. <td bgcolor="#FFFFFF"><input name="line" type="text" id="line" value="300" size="8">
  82. </td>
  83. </tr>
  84. <tr>
  85. <td width="23%" height="25" bgcolor="#FFFFFF">标题</td>
  86. <td width="77%" bgcolor="#FFFFFF"><input name="title" type="text" id="title" size="60"></td>
  87. </tr>
  88. <tr>
  89. <td height="25" valign="top" bgcolor="#FFFFFF"> <div align="left">内容<br>
  90. (支持html代码)</div></td>
  91. <td bgcolor="#FFFFFF"><textarea name="msgtext" cols="60" rows="16" id="msgtext"></textarea></td>
  92. </tr>
  93. <tr>
  94. <td height="25" bgcolor="#FFFFFF"><div align="left"></div></td>
  95. <td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="发送"> <input type="reset" name="Submit2" value="重置"></td>
  96. </tr>
  97. <tr>
  98. <td height="25" bgcolor="#FFFFFF">&nbsp;</td>
  99. <td bgcolor="#FFFFFF">可以在标题与内容中使用:[!--username--]代表用户名</td>
  100. </tr>
  101. </table>
  102. </form>
  103. </body>
  104. </html>