心理咨询网
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

message.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. {include file='common/head.html'}
  2. <div class="layui-body">
  3. {if([$list])}
  4. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  5. <ul class="layui-tab-title">
  6. <li class="layui-this" lay-id="t1">留言列表</li>
  7. </ul>
  8. <div class="layui-tab-content">
  9. <form method="get" name="contentForm" >
  10. <div class="layui-tab-item layui-show">
  11. {foreach $messages(key,value,num)}
  12. <table class="layui-table table-two">
  13. <thead>
  14. <tr>
  15. <th colspan="2">
  16. <input type="checkbox" name="checkbox" title="选择" lay-skin="primary" class="check" value="[value->id]">
  17. <input type="hidden" name="listall[]" value="[value->id]">
  18. 在线留言-[num]
  19. <span style="float:right">
  20. {if($value->status)}
  21. <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/status/value/0}"><i class='fa fa-toggle-on' title="点击前端隐藏" style="vertical-align:middle"></i></a>
  22. {else}
  23. <a href="{url./admin/'.C.'/mod/id/'.$value->id.'/field/status/value/1}"><i class='fa fa-toggle-off' title="点击前端显示" style="vertical-align:middle"></i></a>
  24. {/if}
  25. {fun=get_btn_mod($value->id,'id','回复')}
  26. {fun=get_btn_del($value->id)}
  27. </span>
  28. </th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. {foreach $fields(key2,value2,num2)}
  33. <tr>
  34. <th>[value2->description]</th>
  35. {php} $field=$value2->name {/php}
  36. <td>[value->$field]</td>
  37. </tr>
  38. {/foreach}
  39. <tr>
  40. <th>时间</th>
  41. <td>[value->create_time]</td>
  42. </tr>
  43. <tr>
  44. <th>访客信息</th>
  45. <td>
  46. IP:<a href="http://ip.taobao.com/ipSearch.html?ipAddr={fun=long2ip($value->user_ip)}" target="_blank" title="点击查看归属地">{fun=long2ip($value->user_ip)}</a>;
  47. 浏览器:[value->user_bs];
  48. 操作系统:[value->user_os]
  49. </td>
  50. </tr>
  51. {if($value->username)}
  52. <tr>
  53. <th>会员账号</th>
  54. <td>[value->username]([value->nickname])</td>
  55. </tr>
  56. {/if}
  57. <tr>
  58. <th>回复内容</th>
  59. <td>[value->recontent]</td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. {/foreach}
  64. {if(session('ucode')==10001 && [$messages])}
  65. <a href="{url./admin/Message/clear}" onclick='return confirm("您确定要全部清空么?")' class="layui-btn layui-btn-sm">清空全部记录</a>
  66. <a href="javascript:" onclick="selectall('checkbox')" class="layui-btn layui-btn-sm">全选</a>
  67. <a href="javascript:" onclick="delselect(this);return false" class="layui-btn layui-btn-sm">清空选中记录</a>
  68. {/if}
  69. {if([$messages])}
  70. <a href="{url./admin/Message/index/export/1}" class="layui-btn layui-btn-sm">导出记录</a>
  71. {/if}
  72. <div class="page">{$pagebar}</div>
  73. </div>
  74. </form>
  75. </div>
  76. </div>
  77. {/if}
  78. {if([$mod])}
  79. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  80. <ul class="layui-tab-title">
  81. <li class="layui-this">留言回复</li>
  82. </ul>
  83. <div class="layui-tab-content">
  84. <div class="layui-tab-item layui-show">
  85. <form action="{url./admin/Message/mod/id/'.[$get.id].'}{$backurl}" method="post" class="layui-form">
  86. <input type="hidden" name="formcheck" value="{$formcheck}" >
  87. <div class="layui-form-item">
  88. <label class="layui-form-label">回复内容</label>
  89. <div class="layui-input-block">
  90. <textarea name="recontent" placeholder="请输入回复内容" class="layui-textarea">{$message->recontent}</textarea>
  91. </div>
  92. </div>
  93. <div class="layui-form-item">
  94. <label class="layui-form-label">状态</label>
  95. <div class="layui-input-block">
  96. <input type="radio" name="status" value="1" title="显示" {if([$message->status]==1)}checked="checked"{/if}>
  97. <input type="radio" name="status" value="0" title="隐藏" {if([$message->status]==0)}checked="checked"{/if}>
  98. </div>
  99. </div>
  100. <div class="layui-form-item">
  101. <div class="layui-input-block">
  102. <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
  103. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  104. {fun=get_btn_back()}
  105. </div>
  106. </div>
  107. </form>
  108. </div>
  109. </div>
  110. </div>
  111. {/if}
  112. </div>
  113. <script>
  114. function selectall(objName){
  115. var objNameList=document.getElementsByName(objName);
  116. if(null!=objNameList){
  117. for(var i=0;i<objNameList.length;i++){
  118. objNameList[i].checked="checked";
  119. }
  120. }
  121. }
  122. function delselect(obj){
  123. if(confirm("您确定要删除选中的内容么?")){
  124. var check_list = [];
  125. $('input[name="checkbox"]:checked').each(function (){
  126. check_list.push($(this).val());
  127. });
  128. var url = $(obj).attr("href");
  129. var str = check_list.join("and");
  130. // $(obj).attr("href", url + "" + str);
  131. location.href = "{url./admin/Message/clear}/ids/" + str;
  132. }
  133. }
  134. </script>
  135. {include file='common/foot.html'}