message_list.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <{include file="./admin/header.html"}>
  2. <{include file="get_kindeditor.html"}>
  3. <{include file="./admin/nav.html"}>
  4. <div class="container">
  5. <p></p>
  6. <form class="form-inline" role="form" method="get">
  7. <input name="c" type="hidden" value="admin_message" />
  8. <div class="form-group">开始时间:</div>
  9. <div class="form-group">
  10. <input name="start_time" type="text" value="<{$start_time}>" class="form-control input-sm" />
  11. </div>
  12. <div class="form-group">结束时间:</div>
  13. <div class="form-group">
  14. <input name="end_time" type="text" value="<{$end_time}>" class="form-control input-sm" />
  15. </div>
  16. <br>
  17. <div class="form-group">用户昵称:</div>
  18. <div class="form-group">
  19. <input name="nickname" type="text" value="<{$nickname}>" class="form-control input-sm" />
  20. </div>
  21. <div class="form-group">消息类型:</div>
  22. <div class="form-group">
  23. <select name="msgType" class="form-control input-sm">
  24. <option value="">==选择消息类型==</option>
  25. <{foreach from=$msgTypeDesc item=tmpTypeDesc key=key}>
  26. <option value="<{$key}>" <{if $msgType == $key}>selected<{/if}>><{$tmpTypeDesc.desc}></option>
  27. <{/foreach}>
  28. </select>
  29. </div>
  30. <div class="form-group">消息关键词:</div>
  31. <div class="form-group">
  32. <input name="keyword" type="text" value="<{$keyword}>" class="form-control input-sm" />
  33. </div>
  34. <button type="submit" class="btn btn-default">查询</button>
  35. </form>
  36. <p></p>
  37. <table class="table table-hover ">
  38. <tr>
  39. <td width="20%">用户</td>
  40. <td width="10%">消息类型</td>
  41. <td width="40%">消息内容</td>
  42. <td width="18%">发送时间</td>
  43. <td width="12%">回复</td>
  44. </tr>
  45. <{if $info}>
  46. <{foreach from=$info item=item}>
  47. <tr>
  48. <td>
  49. <a href="<{$web_cfg.domain}>?c=admin_message&openid=<{$item.openid}>" target="_blank">
  50. <img src="<{$users[$item.openid].headimgurl}>" width=48 height=48 class="img-rounded">
  51. </a>
  52. <{assign var=groupid value=$users[$item.openid].groupid}>
  53. &nbsp;&nbsp;&nbsp;<a href="<{$web_cfg.domain}>?c=admin_message&openid=<{$item.openid}>" target="_blank"><{$users[$item.openid].nickname}></a>&nbsp;<span style="color:#959595;">(<{$groups.$groupid.name}>)</span>
  54. </td>
  55. <td><{$item.contentType}></td>
  56. <td>
  57. <{if $item.qrcodeid}> <{*二维码渠道描述*}>
  58. 渠道:<{$qrcodes[$item.qrcodeid].description}>
  59. <{else}>
  60. <{$item.html}>
  61. <{/if}>
  62. </td>
  63. <td><{$item.create_time|date_format:'%m-%d %H:%M:%S'}></td>
  64. <td>
  65. <{if $item.isSupportReply && $users[$item.openid].status == 1}>
  66. <a href="javascript:;" class="quickReply" data-openid="<{$item.openid}>" data-nickname="<{$users[$item.openid].nickname}>">回复</a>
  67. <{elseif $users[$item.openid].status != 1}>
  68. <span style="color:#C5C5C5;">已取消关注</span>
  69. <{else}>
  70. <span style="color:#C5C5C5;"><{$item.notSupportDesc}></span>
  71. <{/if}>
  72. </td>
  73. </tr>
  74. <{/foreach}>
  75. <{else}>
  76. <tr>
  77. <td colspan="5" align="center">还没有收到过消息</td>
  78. </tr>
  79. <{/if}>
  80. </table>
  81. <div class="page"><{$pager_html}></div>
  82. </div>
  83. <script type="text/javascript">
  84. $(document).ready(function(){
  85. $(".quickReply").click(function () {
  86. var openid = $(this).data('openid');
  87. var nickname = $(this).data('nickname');
  88. var body = "<div style=\"padding:10px;\"><textarea name=\"content\" class=\"form-control\" rows=\"3\" placeholder=\"输入回复内容\" ></textarea></div>";
  89. var dialog = KindEditor.dialog({
  90. width : 450,
  91. title : '回复-'+nickname,
  92. body : body,
  93. closeBtn : {
  94. name : '关闭',
  95. click : function(e) {
  96. dialog.remove();
  97. }
  98. },
  99. yesBtn : {
  100. name : '发送',
  101. click : function(e) {
  102. var content = $.trim($('textarea[name=content]').val());
  103. if (!content) {
  104. alert('消息内容不能为空');return false;
  105. }
  106. $.get("<{$web_cfg.domain}>/?c=admin_message&a=send"
  107. , {
  108. openid: openid,
  109. content: content
  110. }
  111. , function (data) {
  112. alert(data.msg);
  113. if (data.ok) {
  114. localtion.reload();
  115. }
  116. }
  117. , 'json'
  118. );
  119. dialog.remove();
  120. }
  121. },
  122. noBtn : {
  123. name : '取消',
  124. click : function(e) {
  125. dialog.remove();
  126. }
  127. }
  128. });
  129. });
  130. });
  131. KISSY.use("gallery/calendar/1.2/index", function (S, Calendar) {
  132. //日历
  133. new Calendar({
  134. count : 1, //日历个数
  135. isSelect : 1, //是否开启下拉列表选择日期,如果开启,日历个数限制为 1
  136. triggerNode : 'input[name=start_time],input[name=end_time]',
  137. });
  138. });
  139. </script>
  140. </body>
  141. </html>