SendEmail.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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,"sendemail");
  21. $enews=$_POST['enews'];
  22. if($enews)
  23. {
  24. hCheckEcmsRHash();
  25. @set_time_limit(0);
  26. }
  27. if($enews=="SendEmail")
  28. {
  29. include("../../class/com_functions.php");
  30. include("../../class/SendEmail.inc.php");
  31. include "../".LoadLang("pub/fun.php");
  32. DoSendMsg($_POST,1,$logininid,$loginin);
  33. }
  34. $groupid=(int)$_GET['groupid'];
  35. //----------会员组
  36. $sql=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  37. while($level_r=$empire->fetch($sql))
  38. {
  39. if($groupid==$level_r[groupid])
  40. {$select=" selected";}
  41. else
  42. {$select="";}
  43. $membergroup.="<option value=".$level_r[groupid].$select.">".$level_r[groupname]."</option>";
  44. }
  45. db_close();
  46. $empire=null;
  47. ?>
  48. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  49. <html>
  50. <head>
  51. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  52. <title>发送邮件</title>
  53. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  54. </head>
  55. <body>
  56. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  57. <tr>
  58. <td>位置: <a href="SendEmail.php<?=$ecms_hashur['whehref']?>">发送邮件</a>&nbsp;(<a href="../SetEnews.php<?=$ecms_hashur['whehref']?>" target="_blank">邮件发送设置</a>)</td>
  59. </tr>
  60. </table>
  61. <form name="sendform" method="post" action="SendEmail.php" onsubmit="return confirm('确认要发送?');">
  62. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  63. <?=$ecms_hashur['form']?>
  64. <tr class="header">
  65. <td height="25" colspan="2"><div align="center">发送邮件
  66. <input name="enews" type="hidden" id="enews" value="SendEmail">
  67. </div></td>
  68. </tr>
  69. <tr>
  70. <td height="25" bgcolor="#FFFFFF">接收会员组</td>
  71. <td bgcolor="#FFFFFF"> <select name="groupid[]" size="5" multiple id="groupid[]">
  72. <?=$membergroup?>
  73. </select> <font color="#666666">(全选用&quot;CTRL+A&quot;,选择多个用CTRL/SHIFT+点击选择)</font></td>
  74. </tr>
  75. <tr>
  76. <td height="25" bgcolor="#FFFFFF">接收会员用户名</td>
  77. <td bgcolor="#FFFFFF"><input name="username" type="text" id="username" size="60">
  78. <font color="#666666">(多个用户名“|”隔开)</font></td>
  79. </tr>
  80. <tr>
  81. <td height="25" bgcolor="#FFFFFF">每组发送个数</td>
  82. <td bgcolor="#FFFFFF"><input name="line" type="text" id="line" value="100" size="8">
  83. </td>
  84. </tr>
  85. <tr>
  86. <td width="23%" height="25" bgcolor="#FFFFFF">标题</td>
  87. <td width="77%" bgcolor="#FFFFFF"><input name="title" type="text" id="title" size="60"></td>
  88. </tr>
  89. <tr>
  90. <td height="25" valign="top" bgcolor="#FFFFFF"> <div align="left">内容<br>
  91. (支持html代码)</div></td>
  92. <td bgcolor="#FFFFFF"><textarea name="msgtext" cols="60" rows="16" id="msgtext"></textarea></td>
  93. </tr>
  94. <tr>
  95. <td height="25" bgcolor="#FFFFFF"><div align="left"></div></td>
  96. <td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="发送"> <input type="reset" name="Submit2" value="重置"></td>
  97. </tr>
  98. </table>
  99. </form>
  100. </body>
  101. </html>