人人商城

slide.html 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {template 'common/header'}
  2. <ul class="nav nav-tabs">
  3. <li><a href="{php echo url('site/multi/display');}">返回微站管理</a></li>
  4. <li {if $do == 'display'}class="active"{/if}><a href="{php echo url('site/slide/display', array('mtid' => $_GPC['mtid'], 'f' => $_GPC['f']));}">管理</a></li>
  5. <li {if $do == 'post' && empty($id)}class="active"{/if}><a href="{php echo url('site/slide/post', array('mtid' => $_GPC['multiid'], 'f' => $_GPC['f']));}">添加</a></li>
  6. {if $do == 'post' && $id}
  7. <li {if $do == 'post' && !empty($id)}class="active"{/if}><a href="{php echo url('site/slide/post', array('id'=>$id, 'mtid' => $_GPC['multiid'], 'f' => $_GPC['f']));}">编辑</a></li>
  8. {/if}
  9. </ul>
  10. <style>
  11. .table td span{display:inline-block;margin-top:4px;}
  12. .table td input{margin-bottom:0;}
  13. </style>
  14. {if $do == 'display'}
  15. <div class="main">
  16. <div class="panel panel-info">
  17. <div class="panel-heading">筛选</div>
  18. <div class="panel-body">
  19. <form action="./index.php" method="get" class="form-horizontal" role="form">
  20. <input type="hidden" name="c" value="site">
  21. <input type="hidden" name="a" value="slide">
  22. <input type="hidden" name="do" value="display"/>
  23. <input type="hidden" name="f" value="{$_GPC['f']}" />
  24. <input type="hidden" name="mtid" value="{$_GPC['mtid']}">
  25. <div class="form-group clearfix">
  26. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
  27. <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
  28. <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
  29. </div>
  30. <div class="col-xs-12 col-sm-3 col-md-2 col-lg-1">
  31. <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. </div>
  37. <form class="form-horizontal" action="" method="post">
  38. <div class="panel panel-default">
  39. <div class="panel-body table-responsive">
  40. <table class="table table-hover">
  41. <thead class="navbar-inner">
  42. <tr>
  43. <th style="width:120px;">排序</th>
  44. <th style="width:200px;">缩略图</th>
  45. <th>标题</th>
  46. <th style="width:100px; text-align:right;">操作</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. {loop $list $item}
  51. <tr>
  52. <td style="width:100px;"><input type="text" class="form-control" name="displayorder[{$item['id']}]" value="{$item['displayorder']}" /></td>
  53. <td><img src="{php echo tomedia($item['thumb'])}" width="150" /></td>
  54. <td style="vertical-align:middle">{$item['title']}</td>
  55. <td style="text-align:right;">
  56. <a href="{php echo url('site/slide/post', array('id' => $item['id'], 'f' => $_GPC['f'], 'mtid' => $_GPC['multiid']))}">编辑</a>&nbsp;-&nbsp;
  57. <a onclick="return confirm('此操作不可恢复,确认吗?'); return false;" href="{php echo url('site/slide/delete', array('id' => $item['id'], 'f' => $_GPC['f'], 'multiid' => $_GPC['multiid']))}">删除</a>
  58. </td>
  59. </tr>
  60. {/loop}
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <div class="form-group">
  66. <div class="col-sm-12">
  67. <input name="token" type="hidden" value="{$_W['token']}" />
  68. <input type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交" />
  69. </div>
  70. </div>
  71. {$pager}
  72. </form>
  73. </div>
  74. <script type="text/javascript">
  75. <!--
  76. var category = {php echo json_encode($children)};
  77. //-->
  78. </script>
  79. {elseif $do == 'post'}
  80. <div class="main">
  81. <form class="form-horizontal form" action="" method="post" enctype="multipart/form-data" onsubmit="return formcheck(this)">
  82. <input type="hidden" name="id" value="{$item[id]}">
  83. <div class="panel panel-default">
  84. <div class="panel-heading">
  85. 幻灯片管理
  86. </div>
  87. <div class="panel-body">
  88. <div class="form-group">
  89. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">分配到微站</label>
  90. <div class="col-sm-10 col-xs-12">
  91. <select class="form-control" name="multiid">
  92. {loop $multis $multi}
  93. <option value="{$multi['id']}" {if $item['multiid'] == $multi['id'] || $_GPC['mtid'] == $multi['id']}selected{/if}>{$multi['title']}{if $multi['id'] == $default_site}[默认微站]{/if}</option>
  94. {/loop}
  95. </select>
  96. </div>
  97. </div>
  98. <div class="form-group">
  99. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">排序</label>
  100. <div class="col-sm-10 col-xs-12">
  101. <input type="text" class="form-control" placeholder="" name="displayorder" value="{$item['displayorder']}">
  102. </div>
  103. </div>
  104. <div class="form-group">
  105. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">标题</label>
  106. <div class="col-sm-10 col-xs-12">
  107. <input type="text" class="form-control" placeholder="" name="title" value="{$item['title']}">
  108. </div>
  109. </div>
  110. <div class="form-group">
  111. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">缩略图</label>
  112. <div class="col-sm-10 col-xs-12">
  113. {php echo tpl_form_field_image('thumb', $item['thumb'])}
  114. <span class="help-block"></span>
  115. </div>
  116. </div>
  117. <div class="form-group">
  118. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">链接</label>
  119. <div class="col-sm-10 col-xs-12">
  120. {php echo tpl_form_field_link('url', $item['url'], array('css' => array('input' => ' input-sm', 'btn' => ' btn-sm')));}
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <div class="form-group col-sm-12">
  126. <button type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交">提交</button>
  127. <input type="hidden" name="token" value="{$_W['token']}" />
  128. </div>
  129. </form>
  130. </div>
  131. <script type="text/javascript">
  132. <!--
  133. var category = {php echo json_encode($children)};
  134. //-->
  135. </script>
  136. {/if}
  137. {template 'common/footer'}