index.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <include file="public@header"/>
  2. <style type="text/css" media="all">
  3. .table .img p {
  4. display: inline-block;
  5. float: left;
  6. height: 100px;
  7. }
  8. .table .img img {
  9. width: 80px;
  10. height: 50px;
  11. float: right;
  12. display: block;
  13. margin-top: 30px;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <div class="wrap js-check-wrap">
  19. <ul class="nav nav-tabs">
  20. <li class="active"><a href="{:url('activity/index')}">{:lang('ADMIN_ACTIVITY_LIST')}</a></li>
  21. <li><a href="{:url('activity/add')}">添加活动</a></li>
  22. </ul>
  23. <form class="well form-inline margin-top-20" method="get" action="{:url('Activity/index')}">
  24. 活动名称:
  25. <input type="text" class="form-control" name="act_name" style="width: 150px;"
  26. value="{:input('request.user_login/s','')}" placeholder="请输入活动名称">
  27. <!-- 邮箱:
  28. <input type="text" class="form-control" name="user_email" style="width: 120px;" value="{:input('request.user_email/s','')}" placeholder="请输入">-->
  29. <input type="submit" class="btn btn-primary" value="搜索"/>
  30. <a class="btn btn-danger" href="{:url('Activity/index')}">清空</a>
  31. </form>
  32. <form class="js-ajax-form" action="" method="post">
  33. <div class="table-actions">
  34. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  35. data-action="{:url('Activity/top',array('yes'=>1))}" data-subcheck="true">置顶
  36. </button>
  37. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  38. data-action="{:url('Activity/top',array('no'=>1))}" data-subcheck="true">取消置顶
  39. </button>
  40. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  41. data-action="{:url('Activity/issort',array('yes'=>1))}" data-subcheck="true">排序
  42. </button>
  43. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  44. data-action="{:url('Activity/issort',array('no'=>1))}" data-subcheck="true">取消排序
  45. </button>
  46. <button class="btn btn-primary btn-sm js-ajax-submit"
  47. style=" background-color: #d9534f; width: 38px; border-color: #d9534f;" type="submit"
  48. data-action="{:url('Activity/delactivity',array('yes'=>1))}" onclick="return confirm('确定要删除该活动吗?')"
  49. data-subcheck="true">删除
  50. </button>
  51. </div>
  52. <table class="table table-hover table-bordered">
  53. <thead>
  54. <tr>
  55. <th width="16">
  56. <label>
  57. <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
  58. </label>
  59. </th>
  60. <th width="50">ID</th>
  61. <th>图片</th>
  62. <th>活动标题</th>
  63. <th>活动开始时间</th>
  64. <th>活动结束时间</th>
  65. <th style="text-align: center;">参与名额</th>
  66. <th>是否置顶</th>
  67. <th>{:lang('STATUS')}</th>
  68. <th width="180">{:lang('ACTIONS')}</th>
  69. </tr>
  70. </thead>
  71. <tbody>
  72. <php>
  73. $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
  74. </php>
  75. <foreach name="activitys" item="vo">
  76. <tr>
  77. <td>
  78. <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  79. value="{$vo.id}">
  80. </td>
  81. <td>{$vo.id}</td>
  82. <td class="img"><p></p><img src="/upload/{$vo.cover_img}" style="width: 80px;height: 50px;"></td>
  83. <td>{$vo.title}</td>
  84. <td>{:date('Y-m-d H:i:s',$vo['starttime'])}</td>
  85. <td>{:date('Y-m-d H:i:s',$vo['endtime'])}</td>
  86. <td style="text-align: center;">
  87. <span style="color:red">{$vo.bks}</span>/{$vo.act_nums}
  88. </td>
  89. <td>
  90. <switch name="vo.is_top">
  91. <case value="0"><font style="color: red"> 未置顶</font></case>
  92. <case value="1"><font style="color: orange"> 首页置顶 </font></case>
  93. <case value="2"><font style="color: green"> 活动置顶 </font></case>
  94. </switch>
  95. </td>
  96. <td>
  97. <switch name="vo.act_status">
  98. <case value="0"><font style="color: red"> 未开始 </font></case>
  99. <case value="1"><font style="color: green"> 进行中 </font></case>
  100. <case value="2"><font style="color: blue"> 已结束 </font></case>
  101. </switch>
  102. </td>
  103. <td>
  104. <a class="btn btn-xs btn-primary" href="{:url('activity/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
  105. <!-- <a class="btn btn-xs btn-danger" onclick="if(!confirm('删除后将不可恢复,确定删除吗?')) return false;" href="{:url('activity/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">
  106. {:lang('DELETE')}
  107. </a> -->
  108. <a class="btn btn-xs btn-success" href="{:url('books/index',array('id'=>$vo['id']))}">报名记录</a>
  109. <a class="btn btn-xs btn-primary"
  110. style="margin-top:5px; border-color:#E161F3;background-color:#E161F3"
  111. onclick="getPaike({$vo['id']})">时间提醒</a>
  112. <a class="btn btn-xs btn-primary"
  113. style="margin-top:5px; border-color:#f39961;background-color:#f39961"
  114. onclick="sendTips({$vo['id']})">评价提醒</a>
  115. <if condition="$vo.is_top != 1">
  116. <a class="btn btn-xs btn-primary"
  117. style="margin-top:5px;border-color:#7349B8;background-color:#7349B8"
  118. onclick="if (!confirm('确定要进行互动匹配发送吗?')) return false;"
  119. href="{:url('books/matching',array('id'=>$vo['id']))}">互动匹配</a>
  120. <a class="btn btn-xs btn-primary"
  121. style="margin-top:5px;border-color:#d9534f;;background-color:#d9534f;"
  122. onclick="if (!confirm('确定要进行互动匹配发送吗?')) return false;"
  123. href="{:url('books/twomatching',array('id'=>$vo['id']))}">重新匹配</a>
  124. <a class="btn btn-xs btn-primary"
  125. style="margin-top:5px;border-color:#dd208a;background-color:#dd208a"
  126. href="{:url('books/allhuxuan',array('id'=>$vo['id']))}">互选情况</a>
  127. </if>
  128. </td>
  129. </tr>
  130. </foreach>
  131. </tbody>
  132. </table>
  133. <div class="pagination">{$page}</div>
  134. </form>
  135. </div>
  136. <script src="__STATIC__/js/admin.js"></script>
  137. <script src="__STATIC__/js/layer/layer.js"></script>
  138. <script>
  139. function getPaike(id) {
  140. var addUrl = "{:url('Books/reminder')}?id=" + id;
  141. layer.open({
  142. type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
  143. title: '时间提醒设置',
  144. shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
  145. shade: 0.8, //遮罩
  146. area: ['470px', '470px'],
  147. content: addUrl,
  148. end: function () { //最后执行reload
  149. location.reload();
  150. }
  151. });
  152. }
  153. /**
  154. * 服务评价提醒
  155. * @param id
  156. * @returns {boolean}
  157. */
  158. function sendTips(id) {
  159. layer.open({
  160. type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
  161. title: '向所选用户发送服务评价提醒消息',
  162. shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
  163. shade: 0.8, //遮罩
  164. offset: 'auto',
  165. scrollbar: false,
  166. area: ['800px', '600px'],
  167. content: "{:url('admin/activity/send')}?id="+id,
  168. btnAlign: 'c',
  169. });
  170. return false;
  171. }
  172. </script>
  173. </body>
  174. </html>