voucher.templatelist.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?php defined('InShopNC') or exit('Access Invalid!');?>
  2. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery-ui/jquery.ui.js"></script>
  3. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
  4. <link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL;?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  5. <div class="page">
  6. <!-- 页面导航 -->
  7. <div class="fixed-bar">
  8. <div class="item-title">
  9. <h3><?php echo $lang['nc_voucher_price_manage'];?></h3>
  10. <ul class="tab-base">
  11. <?php foreach($output['menu'] as $menu) { if($menu['menu_key'] == $output['menu_key']) { ?>
  12. <li><a href="JavaScript:void(0);" class="current"><span><?php echo $menu['menu_name'];?></span></a></li>
  13. <?php } else { ?>
  14. <li><a href="<?php echo $menu['menu_url'];?>" ><span><?php echo $menu['menu_name'];?></span></a></li>
  15. <?php } } ?>
  16. </ul>
  17. </ul>
  18. </div>
  19. </div>
  20. <!-- 搜索 -->
  21. <div class="fixed-empty"></div>
  22. <form method="get" name="formSearch">
  23. <input type="hidden" name="act" value="voucher">
  24. <input type="hidden" name="op" value="templatelist">
  25. <table class="tb-type1 noborder search">
  26. <tbody>
  27. <tr>
  28. <th><label for="store_name"><?php echo $lang['admin_voucher_storename'];?></label></th>
  29. <td><input type="text" value="<?php echo $_GET['store_name'];?>" name="store_name" id="store_name" class="txt" style="width:100px;"></td>
  30. <th><label for="store_name"><?php echo $lang['admin_voucher_template_adddate'];?></label></th>
  31. <td><input type="text" id="sdate" name="sdate" class="txt date" value="<?php echo $_GET['sdate'];?>" >~<input type="text" id="edate" name="edate" class="txt date" value="<?php echo $_GET['edate'];?>" ></td>
  32. <th><label><?php echo $lang['nc_state'];?></label></th>
  33. <td>
  34. <select name="state">
  35. <option value="0" <?php if(0 === intval($_GET['state'])) echo 'selected';?>><?php echo $lang['nc_status'];?></option>
  36. <?php if(is_array($output['templatestate_arr'])) { ?>
  37. <?php foreach($output['templatestate_arr'] as $key=>$val) { ?>
  38. <option value="<?php echo $val[0];?>" <?php if(intval($val[0]) === intval($_GET['state'])) echo 'selected';?>><?php echo $val[1];?></option>
  39. <?php } ?>
  40. <?php } ?>
  41. </select></td>
  42. <td>
  43. <select name="recommend">
  44. <option value="" selected>是否推荐</option>
  45. <option value="1" <?php if('1' === $_GET['recommend']) echo 'selected';?>>已推荐</option>
  46. <option value="0" <?php if('0' === $_GET['recommend']) echo 'selected';?>>未推荐</option>
  47. </select></td>
  48. <td><a href="javascript:document.formSearch.submit();" class="btn-search " title="<?php echo $lang['nc_query'];?>">&nbsp;</a></td>
  49. </tr>
  50. </tbody>
  51. </table>
  52. </form>
  53. <!-- 帮助 -->
  54. <table class="table tb-type2" id="prompt">
  55. <tbody>
  56. <tr class="space odd">
  57. <th colspan="12" class="nobg"><div class="title">
  58. <h5><?php echo $lang['nc_prompts'];?></h5>
  59. <span class="arrow"></span></div></th>
  60. </tr>
  61. <tr>
  62. <td><ul><li><?php echo $lang['admin_voucher_template_list_tip'];?></li></ul></td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <!-- 列表 -->
  67. <form id="list_form" method="post">
  68. <input type="hidden" id="object_id" name="object_id" />
  69. <table class="table tb-type2">
  70. <thead>
  71. <tr class="thead">
  72. <th class="w24">&nbsp;</th>
  73. <th class="align-left"><span><?php echo $lang['admin_voucher_storename'];?></span></th>
  74. <th class="align-left"><span><?php echo $lang['admin_voucher_template_title'];?></span></th>
  75. <th class="align-center"><span><?php echo $lang['admin_voucher_template_price'];?></span></th>
  76. <th class="align-center"><span><?php echo $lang['admin_voucher_template_orderpricelimit'];?></span></th>
  77. <th class="align-center"><span><?php echo $lang['admin_voucher_template_enddate'];?></span></th>
  78. <th class="align-center"><span><?php echo $lang['admin_voucher_template_adddate'];?></span></th>
  79. <th class="align-center"><span><?php echo $lang['nc_state'];?></span></th>
  80. <th class="align-center"><?php echo $lang['nc_recommend'];?></th>
  81. <th class="align-center"><span><?php echo $lang['nc_handle'];?></span></th>
  82. </tr>
  83. </thead>
  84. <tbody id="treet1">
  85. <?php if(!empty($output['list']) && is_array($output['list'])){ ?>
  86. <?php foreach($output['list'] as $k => $val){ ?>
  87. <tr class="hover">
  88. <td>&nbsp;</td>
  89. <td class="align-left"><a href="<?php echo urlShop('show_store','index', array('store_id'=>$val['voucher_t_store_id']));?>" ><span><?php echo $val['voucher_t_storename'];?></span></a>
  90. <?php if (isset($output['flippedOwnShopIds'][$val['voucher_t_store_id']])) { ?>
  91. <span class="ownshop">[自营]</span>
  92. <?php } ?>
  93. </td>
  94. <td class="align-left"><span><?php echo $val['voucher_t_title'];?></span></td>
  95. <td class="align-center"><span><?php echo $val['voucher_t_price'];?></span></td>
  96. <td class="align-center"><span><?php echo $val['voucher_t_limit'];?></span></td>
  97. <td class="align-center"><span><?php echo @date('Y-m-d',$val['voucher_t_start_date']);?>~<?php echo @date('Y-m-d',$val['voucher_t_end_date']);?></span></td>
  98. <td class="align-center"><span><?php echo @date('Y-m-d',$val['voucher_t_add_date']);?></span></td>
  99. <td class="align-center"><span>
  100. <?php foreach($output['templatestate_arr'] as $k=>$v){
  101. if($val['voucher_t_state'] == $v[0]){
  102. echo $v[1];
  103. }
  104. } ?>
  105. </span></td>
  106. <td class="align-center yes-onoff"><?php if($val['voucher_t_recommend'] == '0'){ ?>
  107. <a href="JavaScript:void(0);" class="disabled" ajax_branch='voucher_t_recommend' nc_type="inline_edit" fieldname="voucher_t_recommend" fieldid="<?php echo $val['voucher_t_id']?>" fieldvalue="0" title="<?php echo $lang['nc_editable'];?>"><img src="<?php echo ADMIN_TEMPLATES_URL;?>/images/transparent.gif"></a>
  108. <?php }else{ ?>
  109. <a href="JavaScript:void(0);" class="enabled" ajax_branch='voucher_t_recommend' nc_type="inline_edit" fieldname="voucher_t_recommend" fieldid="<?php echo $val['voucher_t_id']?>" fieldvalue="1" title="<?php echo $lang['nc_editable'];?>"><img src="<?php echo ADMIN_TEMPLATES_URL;?>/images/transparent.gif"></a>
  110. <?php } ?></td>
  111. <td class="nowrap align-center"><a href="index.php?act=voucher&op=templateedit&tid=<?php echo $val['voucher_t_id'];?>"><?php echo $lang['nc_edit'];?></a></td>
  112. </tr>
  113. <?php } ?>
  114. <?php }else { ?>
  115. <tr class="no_data">
  116. <td colspan="16"><?php echo $lang['nc_no_record'];?></td>
  117. </tr>
  118. <?php } ?>
  119. </tbody>
  120. <?php if(!empty($output['list']) && is_array($output['list'])){ ?>
  121. <tfoot>
  122. <tr class="tfoot">
  123. <td colspan="16">
  124. <div class="pagination"> <?php echo $output['show_page'];?> </div>
  125. </td>
  126. </tr>
  127. </tfoot>
  128. <?php } ?>
  129. </table>
  130. </form>
  131. </div>
  132. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.edit.js" charset="utf-8"></script>
  133. <script language="javascript">
  134. $(function(){
  135. $('#sdate').datepicker({dateFormat: 'yy-mm-dd'});
  136. $('#edate').datepicker({dateFormat: 'yy-mm-dd'});
  137. });
  138. </script>