msg.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. if(!defined('InEmpireCMS'))
  3. {
  4. exit();
  5. }
  6. ?>
  7. <?php
  8. $public_diyr['pagetitle']='消息列表';
  9. $url="<a href=../../../>首页</a>&nbsp;>&nbsp;<a href=../cp/>会员中心</a>&nbsp;>&nbsp;消息列表&nbsp;&nbsp;(<a href='AddMsg/?enews=AddMsg'>发送消息</a>)";
  10. require(ECMS_PATH.'e/template/incfile/header.php');
  11. ?>
  12. <script>
  13. function CheckAll(form)
  14. {
  15. for (var i=0;i<form.elements.length;i++)
  16. {
  17. var e = form.elements[i];
  18. if (e.name != 'chkall')
  19. e.checked = form.chkall.checked;
  20. }
  21. }
  22. </script>
  23. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  24. <tr>
  25. <td width="50%" height="30" bgcolor="#FFFFFF">&nbsp;</td>
  26. <td width="50%" bgcolor="#FFFFFF"><div align="right">[<a href="AddMsg/?enews=AddMsg">发送消息</a>]&nbsp;&nbsp;</div></td>
  27. </tr>
  28. </table>
  29. <br>
  30. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  31. <form name="listmsg" method="post" action="../doaction.php" onsubmit="return confirm('确认要删除?');">
  32. <tr class="header">
  33. <td width="4%" height="23"> <div align="center"></div></td>
  34. <td width="45%"><div align="center">标题</div></td>
  35. <td width="18%"><div align="center">发送者</div></td>
  36. <td width="23%"><div align="center">发送时间</div></td>
  37. <td width="10%"><div align="center">操作</div></td>
  38. </tr>
  39. <?php
  40. while($r=$empire->fetch($sql))
  41. {
  42. $img="haveread";
  43. if(!$r[haveread])
  44. {$img="nohaveread";}
  45. //后台管理员
  46. if($r['isadmin'])
  47. {
  48. $from_username="<a title='后台管理员'><b>".$r[from_username]."</b></a>";
  49. }
  50. else
  51. {
  52. $from_username="<a href='../ShowInfo/?userid=".$r[from_userid]."' target='_blank'>".$r[from_username]."</a>";
  53. }
  54. //系统信息
  55. if($r['issys'])
  56. {
  57. $from_username="<b>系统消息</b>";
  58. $r[title]="<b>".$r[title]."</b>";
  59. }
  60. ?>
  61. <tr bgcolor="#FFFFFF">
  62. <td height="25"> <div align="center">
  63. <input name="mid[]" type="checkbox" id="mid[]2" value="<?=$r[mid]?>">
  64. </div></td>
  65. <td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  66. <tr>
  67. <td width="9%"><div align="center"><img src="../../data/images/<?=$img?>.gif" border=0></div></td>
  68. <td width="91%"><a href="ViewMsg/?mid=<?=$r[mid]?>">
  69. <?=stripSlashes($r[title])?>
  70. </a></td>
  71. </tr>
  72. </table></td>
  73. <td><div align="center">
  74. <?=$from_username?>
  75. </div></td>
  76. <td><div align="center">
  77. <?=$r[msgtime]?>
  78. </div></td>
  79. <td> <div align="center">&nbsp;[<a href="../doaction.php?enews=DelMsg&mid=<?=$r[mid]?>" onclick="return confirm('确认要删除?');">删除</a>]</div></td>
  80. </tr>
  81. <?php
  82. }
  83. ?>
  84. <tr bgcolor="#FFFFFF">
  85. <td><div align="center">
  86. <input type=checkbox name=chkall value=on onclick=CheckAll(this.form)>
  87. </div></td>
  88. <td colspan="4"><input type="submit" name="Submit2" value="删除选中">
  89. <input name="enews" type="hidden" value="DelMsg_all"> </td>
  90. </tr>
  91. <tr bgcolor="#FFFFFF">
  92. <td><div align="center"></div></td>
  93. <td colspan="4">
  94. <?=$returnpage?> </td>
  95. </tr>
  96. <tr bgcolor="#FFFFFF">
  97. <td height="23" colspan="5"><div align="center">说明:<img src="../../data/images/nohaveread.gif" width="14" height="11">
  98. 代表未阅读消息,<img src="../../data/images/haveread.gif" width="15" height="12">
  99. 代表已阅读消息.</div></td>
  100. </tr>
  101. </form>
  102. </table>
  103. <?php
  104. require(ECMS_PATH.'e/template/incfile/footer.php');
  105. ?>