心理咨询网
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

slide.html 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. <li lay-id="t2">幻灯片新增</li>
  8. </ul>
  9. <div class="layui-tab-content">
  10. <div class="layui-tab-item layui-show">
  11. <form action="{url./admin/Slide/mod}" method="post" class="layui-form" onkeydown="if(event.keyCode==13) return false;">
  12. <input type="hidden" name="formcheck" value="{$formcheck}" >
  13. <table class="layui-table">
  14. <thead>
  15. <tr>
  16. <th>分组(gid)</th>
  17. <th>图片</th>
  18. <th>链接</th>
  19. <th>标题</th>
  20. <th>副标题</th>
  21. <th>排序</th>
  22. <th>操作</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {foreach $slides(key,value)}
  27. <tr>
  28. <td>[value->gid]</td>
  29. <td><img src="{SITE_DIR}[value->pic]" style="height:30px;"></td>
  30. <td>[value->link]</td>
  31. <td>[value->title]</td>
  32. <td>[value->subtitle]</td>
  33. <td class="table-input">
  34. <input type="hidden" name="listall[]" value="[value->id]">
  35. <input type="text" lay-ignore class="layui-input" name="sorting[]" value="[value->sorting]">
  36. </td>
  37. <td>
  38. {fun=get_btn_del($value->id)}
  39. {fun=get_btn_mod($value->id)}
  40. </td>
  41. </tr>
  42. {/foreach}
  43. </tbody>
  44. </table>
  45. <button type="submit" name="submit" value="sorting" class="layui-btn layui-btn-sm">保存排序</button>
  46. </form>
  47. <div class="page">{$pagebar}</div>
  48. </div>
  49. <div class="layui-tab-item">
  50. <form action="{url./admin/Slide/add}" method="post" class="layui-form">
  51. <input type="hidden" name="formcheck" value="{$formcheck}" >
  52. <div class="layui-form-item">
  53. <label class="layui-form-label">分组</label>
  54. <div class="layui-input-block">
  55. <select name="gid" >
  56. {foreach $gids(key,value)}
  57. <option value="[value]" >分组[value]</option>
  58. {/foreach}
  59. <option value="" >自动新增分组</option>
  60. </select>
  61. </div>
  62. </div>
  63. <div class="layui-form-item">
  64. <label class="layui-form-label">图片</label>
  65. <div class="layui-input-inline">
  66. <input type="text" name="pic" id="pic" required lay-verify="required" placeholder="请上传图片" class="layui-input">
  67. </div>
  68. <button type="button" class="layui-btn upload" data-des="pic">
  69. <i class="layui-icon">&#xe67c;</i>上传图片
  70. </button>
  71. <div id="pic_box" class="pic"></div>
  72. </div>
  73. <div class="layui-form-item">
  74. <label class="layui-form-label">链接</label>
  75. <div class="layui-input-block">
  76. <input type="text" name="link" placeholder="请输入跳转链接" class="layui-input">
  77. </div>
  78. </div>
  79. <div class="layui-form-item">
  80. <label class="layui-form-label">标题</label>
  81. <div class="layui-input-block">
  82. <input type="text" name="title" placeholder="请输入标题" class="layui-input">
  83. </div>
  84. </div>
  85. <div class="layui-form-item">
  86. <label class="layui-form-label">副标题</label>
  87. <div class="layui-input-block">
  88. <input type="text" name="subtitle" placeholder="请输入副标题" class="layui-input">
  89. </div>
  90. </div>
  91. <div class="layui-form-item">
  92. <label class="layui-form-label">排序</label>
  93. <div class="layui-input-block">
  94. <input type="text" name="sorting" required lay-verify="required" value="255" placeholder="请输入排序" class="layui-input">
  95. </div>
  96. </div>
  97. <div class="layui-form-item">
  98. <div class="layui-input-block">
  99. <button class="layui-btn" lay-submit>立即提交</button>
  100. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  101. </div>
  102. </div>
  103. </form>
  104. </div>
  105. </div>
  106. </div>
  107. {/if}
  108. {if([$mod])}
  109. <div class="layui-tab layui-tab-brief" lay-filter="tab">
  110. <ul class="layui-tab-title">
  111. <li class="layui-this">幻灯片修改</li>
  112. </ul>
  113. <div class="layui-tab-content">
  114. <div class="layui-tab-item layui-show">
  115. <form action="{url./admin/Slide/mod/id/'.[$get.id].'}{$backurl}" method="post" class="layui-form">
  116. <input type="hidden" name="formcheck" value="{$formcheck}" >
  117. <div class="layui-form-item">
  118. <label class="layui-form-label">分组</label>
  119. <div class="layui-input-block">
  120. <input type="text" name="gid" required lay-verify="required" value="{$slide->gid}" placeholder="请输入分组" class="layui-input">
  121. </div>
  122. </div>
  123. <div class="layui-form-item">
  124. <label class="layui-form-label">图片</label>
  125. <div class="layui-input-inline">
  126. <input type="text" name="pic" id="pic" required lay-verify="required" value="{$slide->pic}" placeholder="请上传图片" class="layui-input">
  127. </div>
  128. <button type="button" class="layui-btn upload" data-des="pic">
  129. <i class="layui-icon">&#xe67c;</i>上传图片
  130. </button>
  131. <div id="pic_box" class="pic">{if([$slide->pic])}<dl><dt><img src="{SITE_DIR}{$slide->pic}" data-url="{$slide->pic}"></dt><dd>删除</dd></dl>{/if}</div>
  132. </div>
  133. <div class="layui-form-item">
  134. <label class="layui-form-label">跳转链接</label>
  135. <div class="layui-input-block">
  136. <input type="text" name="link" value="{$slide->link}" placeholder="请输入跳转链接" class="layui-input">
  137. </div>
  138. </div>
  139. <div class="layui-form-item">
  140. <label class="layui-form-label">标题</label>
  141. <div class="layui-input-block">
  142. <input type="text" name="title" value="{$slide->title}" placeholder="请输入标题" class="layui-input">
  143. </div>
  144. </div>
  145. <div class="layui-form-item">
  146. <label class="layui-form-label">副标题</label>
  147. <div class="layui-input-block">
  148. <input type="text" name="subtitle" value="{$slide->subtitle}" placeholder="请输入副标题" class="layui-input">
  149. </div>
  150. </div>
  151. <div class="layui-form-item">
  152. <label class="layui-form-label">排序</label>
  153. <div class="layui-input-block">
  154. <input type="text" name="sorting" required lay-verify="required" value="{$slide->sorting}" placeholder="请输入排序" class="layui-input">
  155. </div>
  156. </div>
  157. <div class="layui-form-item">
  158. <div class="layui-input-block">
  159. <button class="layui-btn" lay-submit>立即提交</button>
  160. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  161. {fun=get_btn_back()}
  162. </div>
  163. </div>
  164. </form>
  165. </div>
  166. </div>
  167. </div>
  168. {/if}
  169. </div>
  170. {include file='common/foot.html'}