groupbuy.list.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <h3><?php echo $lang['groupbuy_index_manage'];?></h3>
  6. <ul class="tab-base">
  7. <?php foreach($output['menu'] as $menu) { if($menu['menu_type'] == 'text') { ?>
  8. <li><a href="JavaScript:void(0);" class="current"><span><?php echo $menu['menu_name'];?></span></a></li>
  9. <?php } else { ?>
  10. <li><a href="<?php echo $menu['menu_url'];?>" ><span><?php echo $menu['menu_name'];?></span></a></li>
  11. <?php } } ?>
  12. </ul>
  13. </ul>
  14. </div>
  15. </div>
  16. <!-- 搜索 -->
  17. <div class="fixed-empty"></div>
  18. <form method="get" name="formSearch">
  19. <input type="hidden" name="act" value="groupbuy">
  20. <input type="hidden" name="op" value="groupbuy_list">
  21. <table class="tb-type1 noborder search">
  22. <tbody>
  23. <tr>
  24. <th><label for="xianshi_name">抢购名称</label></th>
  25. <td><input type="text" value="<?php echo $_GET['groupbuy_name'];?>" name="groupbuy_name" id="groupbuy_name" class="txt" style="width:100px;"></td>
  26. <th><label for="store_name"><?php echo $lang['store_name'];?></label></th>
  27. <td><input type="text" value="<?php echo $_GET['store_name'];?>" name="store_name" id="store_name" class="txt" style="width:100px;"></td>
  28. <th><label for="groupbuy_state">状态</label></th>
  29. <td>
  30. <select name="groupbuy_state" class="w90">
  31. <?php if(is_array($output['groupbuy_state_array'])) { ?>
  32. <?php foreach($output['groupbuy_state_array'] as $key=>$val) { ?>
  33. <option value="<?php echo $key;?>" <?php if($key == $_GET['groupbuy_state']) { echo 'selected';}?>><?php echo $val;?></option>
  34. <?php } ?>
  35. <?php } ?>
  36. </select>
  37. </td>
  38. <td><a href="javascript:document.formSearch.submit();" class="btn-search " title="<?php echo $lang['nc_query'];?>">&nbsp;</a></td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </form>
  43. <!-- 说明 -->
  44. <table class="table tb-type2" id="prompt">
  45. <tbody>
  46. <tr class="space odd">
  47. <th colspan="12" class="nobg"><div class="title">
  48. <h5><?php echo $lang['nc_prompts'];?></h5>
  49. <span class="arrow"></span></div></th>
  50. </tr>
  51. <tr>
  52. <td><ul>
  53. <li>管理员可以审核新的抢购活动申请、取消进行中的抢购活动或者删除抢购活动</li>
  54. </ul></td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. <form id="list_form" method="post">
  59. <input type="hidden" id="group_id" name="group_id" />
  60. <table class="table tb-type2">
  61. <thead>
  62. <tr class="thead">
  63. <th colspan="2"><?php echo $lang['groupbuy_index_name'];?></th>
  64. <th class="align-center" width="120"><?php echo $lang['groupbuy_index_start_time'];?></th>
  65. <th class="align-center" width="120"><?php echo $lang['groupbuy_index_end_time'];?></th>
  66. <th class="align-center" width="80"><?php echo $lang['groupbuy_index_click'];?></th>
  67. <th class="align-center" width="80">已购买</th>
  68. <th class="align-center" width="80"><?php echo $lang['nc_recommend'];?></th>
  69. <th class="align-center" width="120"><?php echo $lang['groupbuy_index_state'];?></th>
  70. <th class="align-center" width="120"><?php echo $lang['nc_handle'];?></th>
  71. </tr>
  72. </thead>
  73. <tbody id="treet1">
  74. <?php if(!empty($output['groupbuy_list']) && is_array($output['groupbuy_list'])){ ?>
  75. <?php foreach($output['groupbuy_list'] as $k => $val){ ?>
  76. <tr class="hover">
  77. <td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i><a target="_blank" href="<?php echo SHOP_SITE_URL."/index.php?act=show_groupbuy&op=groupbuy_detail&group_id=".$val['groupbuy_id'];?>"><img src="<?php echo gthumb($val['groupbuy_image'], 'small');?>" style=" max-width: 56px; max-height: 56px;"/></a></span></div></td>
  78. <td class="group"><p><a target="_blank" href="<?php echo SHOP_SITE_URL."/index.php?act=show_groupbuy&op=groupbuy_detail&group_id=".$val['groupbuy_id'];?>"><?php echo $val['groupbuy_name'];?></a></p>
  79. <p class="goods"><?php echo $lang['groupbuy_index_goods_name'];?>:<a target="_blank" href="<?php echo SHOP_SITE_URL."/index.php?act=goods&goods_id=".$val['goods_id'];?>" title="<?php echo $val['goods_name'];?>"><?php echo $val['goods_name'];?></a></p>
  80. <p class="store"><?php echo $lang['groupbuy_index_store_name'];?>:<a href="<?php echo urlShop('show_store','index', array('store_id'=>$val['store_id']));?>" title="<?php echo $val['store_name'];?>"><?php echo $val['store_name'];?></a>
  81. <?php if (isset($output['flippedOwnShopIds'][$val['store_id']])) { ?>
  82. <span class="ownshop">[自营]</span>
  83. <?php } ?>
  84. </p></td>
  85. <td class="align-center nowarp"><?php echo $val['start_time_text'];?></td>
  86. <td class="align-center nowarp"><?php echo $val['end_time_text'];?></td>
  87. <td class="align-center"><?php echo $val['views']; ?></td>
  88. <td class="align-center"><?php echo $val['buy_quantity']; ?></td>
  89. <td class="yes-onoff align-center"><?php if($val['recommended'] == '0'){ ?>
  90. <a href="JavaScript:void(0);" class=" disabled" ajax_branch='recommended' nc_type="inline_edit" fieldname="recommended" fieldid="<?php echo $val['groupbuy_id']?>" fieldvalue="0" title="<?php echo $lang['nc_editable'];?>"><img src="<?php echo ADMIN_TEMPLATES_URL;?>/images/transparent.gif"></a>
  91. <?php }else { ?>
  92. <a href="JavaScript:void(0);" class=" enabled" ajax_branch='recommended' nc_type="inline_edit" fieldname="recommended" fieldid="<?php echo $val['groupbuy_id']?>" fieldvalue="1" title="<?php echo $lang['nc_editable'];?>"><img src="<?php echo ADMIN_TEMPLATES_URL;?>/images/transparent.gif"></a>
  93. <?php } ?></td>
  94. <td class="align-center"><?php echo $val['groupbuy_state_text'];?></td>
  95. <td class="align-center">
  96. <?php if($val['reviewable']) { ?>
  97. <a nctype="btn_review_pass" data-groupbuy-id="<?php echo $val['groupbuy_id'];?>" href="javascript:;">通过</a>
  98. <a nctype="btn_review_fail" data-groupbuy-id="<?php echo $val['groupbuy_id'];?>" href="javascript:;">拒绝</a>
  99. <?php } ?>
  100. <?php if($val['cancelable']) { ?>
  101. <a nctype="btn_cancel" data-groupbuy-id="<?php echo $val['groupbuy_id'];?>" href="javascript:;">取消</a>
  102. <?php } ?>
  103. <a nctype="btn_del" data-groupbuy-id="<?php echo $val['groupbuy_id'];?>" href="javascript:;">删除</a>
  104. </td>
  105. </tr>
  106. <?php } ?>
  107. <?php }else { ?>
  108. <tr class="no_data">
  109. <td colspan="16"><?php echo $lang['nc_no_record'];?></td>
  110. </tr>
  111. <?php } ?>
  112. </tbody>
  113. <?php if(!empty($output['groupbuy_list']) && is_array($output['groupbuy_list'])){ ?>
  114. <tfoot>
  115. <tr class="tfoot">
  116. <td colspan="16"><label>
  117. &nbsp;&nbsp;
  118. <div class="pagination"><?php echo $output['show_page'];?> </div></td>
  119. </tr>
  120. </tfoot>
  121. <?php } ?>
  122. </table>
  123. </form>
  124. </div>
  125. <form id="op_form" action="" method="POST">
  126. <input type="hidden" id="groupbuy_id" name="groupbuy_id">
  127. </form>
  128. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.edit.js" charset="utf-8"></script>
  129. <script type="text/javascript">
  130. $(document).ready(function() {
  131. $('[nctype="btn_review_pass"]').on('click', function() {
  132. if(confirm('确认通过该抢购申请?')) {
  133. var action = '<?php echo urlAdmin('groupbuy', 'groupbuy_review_pass');?>';
  134. var groupbuy_id = $(this).attr('data-groupbuy-id');
  135. $('#op_form').attr('action', action);
  136. $('#groupbuy_id').val(groupbuy_id);
  137. $('#op_form').submit();
  138. }
  139. });
  140. $('[nctype="btn_review_fail"]').on('click', function() {
  141. if(confirm('确认拒绝该抢购申请?')) {
  142. var action = '<?php echo urlAdmin('groupbuy', 'groupbuy_review_fail');?>';
  143. var groupbuy_id = $(this).attr('data-groupbuy-id');
  144. $('#op_form').attr('action', action);
  145. $('#groupbuy_id').val(groupbuy_id);
  146. $('#op_form').submit();
  147. }
  148. });
  149. $('[nctype="btn_cancel"]').on('click', function() {
  150. if(confirm('确认取消该抢购活动?')) {
  151. var action = '<?php echo urlAdmin('groupbuy', 'groupbuy_cancel');?>';
  152. var groupbuy_id = $(this).attr('data-groupbuy-id');
  153. $('#op_form').attr('action', action);
  154. $('#groupbuy_id').val(groupbuy_id);
  155. $('#op_form').submit();
  156. }
  157. });
  158. $('[nctype="btn_del"]').on('click', function() {
  159. if(confirm('确认删除该抢购活动?')) {
  160. var action = '<?php echo urlAdmin('groupbuy', 'groupbuy_del');?>';
  161. var groupbuy_id = $(this).attr('data-groupbuy-id');
  162. $('#op_form').attr('action', action);
  163. $('#groupbuy_id').val(groupbuy_id);
  164. $('#op_form').submit();
  165. }
  166. });
  167. });
  168. </script>