coupon_detail.tpl.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <?php
  2. include mymps_tpl('inc_header');
  3. echo '<link rel="Stylesheet" type="text/css" href="template/css/new.dialog.css" />
  4. <link rel="stylesheet" type="text/css" href="template/css/new.my.css" />
  5. <link rel="stylesheet" href="../include/datepicker/ui.css">
  6. <script type="text/javascript" src="template/jquery.172.min.js"></script>
  7. <script type="text/javascript" src="../include/datepicker/datepicker.js"></script>
  8. <script language=\'javascript\'>
  9. $(function(){
  10. $("#begindate").datepicker();
  11. $("#enddate").datepicker();
  12. });
  13. </script>
  14. <script language="javascript" src="template/javascript.js"></script>
  15. <script language="javascript">
  16. function check_sub(){
  17. ';
  18. if (!$id) {
  19. echo ' if (document.form1.coupon_image.value=="") {
  20. alert(\'请上传优惠券图片!\');
  21. document.form1.coupon_image.focus();
  22. return false;
  23. }
  24. ';
  25. }
  26. echo ' if (document.form1.title.value=="") {
  27. alert(\'请填写优惠券名称\');
  28. document.form1.title.focus();
  29. return false;
  30. }
  31. if (document.form1.des.value=="") {
  32. alert(\'请填写简短说明!\');
  33. document.form1.des.focus();
  34. return false;
  35. }
  36. return true;
  37. }
  38. </script>
  39. </head>
  40. <body class="';
  41. echo $mymps_global['cfg_tpl_dir'];
  42. echo '">
  43. <div class="container">
  44. ';
  45. include mymps_tpl('inc_head');
  46. echo '<div id="main" class="main section-setting">
  47. <div class="clearfix main-inner">
  48. <div class="content">
  49. <div class="clearfix content-inner">
  50. <div class="content-main">
  51. <div class="content-main-inner">
  52. <div class="pwrap setting-userinfo">
  53. <div class="phead"><div class="phead-inner"><div class="phead-inner">
  54. <h3 class="ptitle"><span>';
  55. echo $id ? '修改' : '发布';
  56. echo '优惠券</span></h3>
  57. <p class="pextra"><a href="?m=coupon&type=corp"><span>&laquo; 返回我上传的优惠券</span></a></p>
  58. </div></div></div>
  59. <div class="pbody">
  60. <div id="msg_success"></div>
  61. <div id="msg_error"></div>
  62. <div id="msg_alert"></div>
  63. <div style="display:none;">
  64. <iframe width=0 height=0 src=\'\' id="iframe_area" name="iframe_area"></iframe>
  65. <iframe width=0 height=0 src=\'\' id="iframe_street" name="iframe_street"></iframe>
  66. <form method="post" target="iframe_area" id="form_area"></form>
  67. </div>
  68. <form action="?m=coupon&ac=detail" enctype="multipart/form-data" method="post" name="form1" onSubmit="return check_sub();">
  69. ';
  70. if (!empty($id)) {
  71. echo ' <input name="id" value="';
  72. echo $id;
  73. echo '" type="hidden">
  74. <input name="picture_old" value="';
  75. echo $edit['picture'];
  76. echo '" type="hidden">
  77. <input name="pre_picture_old" value="';
  78. echo $edit['pre_picture'];
  79. echo '" type="hidden">
  80. ';
  81. }
  82. echo ' <input name="tid" value="';
  83. echo $tid;
  84. echo '" type="hidden">
  85. <div class="formgroup">
  86. <div class="formrow">
  87. <h3 class="label"><label>优惠券名称<font color="red">*</font></label></h3>
  88. <div class="form-enter">
  89. <input name="title" type="text" class="text" value="';
  90. echo $edit['title'];
  91. echo '" style="width:300px">
  92. </div>
  93. </div>
  94. <div class="formrow">
  95. <h3 class="label">优惠券分类<font color="red">*</font></h3>
  96. <div class="form-enter">
  97. ';
  98. echo get_couponclass_select('cate_id', $edit['cate_id']);
  99. echo ' </div>
  100. </div>
  101. <div class="formrow">
  102. <h3 class="label">所属地区<font color="red">*</font></h3>
  103. <div class="form-enter">
  104. <select name="areaid" class="input">
  105. ';
  106. echo cat_list('area', 0, $edit['areaid']);
  107. echo ' </select>
  108. </div>
  109. </div>
  110. ';
  111. if ($edit[pre_picture]) {
  112. echo ' <div class="formrow">
  113. <h3 class="label">原来的图片</h3>
  114. <div class="form-enter">
  115. ';
  116. echo '<img src=' . $mymps_global[SiteUrl] . '' . $edit[pre_picture] . ' style=\'_margin-top:expression(( 180 - this.height ) / 2);\' />
  117. ';
  118. echo ' </div>
  119. </div>
  120. ';
  121. }
  122. echo '
  123. <div class="formrow">
  124. <h3 class="label">';
  125. echo $id ? '更新图片' : '上传图片<font color=red>*</font>';
  126. echo '</h3>
  127. <div class="form-enter">
  128. <input type="file" name="coupon_image" size="30" id="litpic">
  129. </div>
  130. </div>
  131. <div class="formrow">
  132. <h3 class="label">有效期</h3>
  133. <input name="begindate" readonly id="begindate" type="text" class="text" value="';
  134. echo $begindate;
  135. echo '" style="width:100px"/> - <input name="enddate" id="enddate" readonly type="text" class="text" value="';
  136. echo $enddate;
  137. echo '" style="width:100px" />
  138. </div>
  139. <div class="formrow">
  140. <h3 class="label">简短说明<font color="red">*</font></h3>
  141. <div class="form-enter">
  142. <textarea name="des" class="texttarea" style="width:360px; height:100px">';
  143. echo $edit['des'];
  144. echo '</textarea>
  145. </div>
  146. </div>
  147. <div class="formrow">
  148. <h3 class="label">详细说明</h3>
  149. ';
  150. echo $acontent;
  151. echo ' </div>
  152. <div class="formrow">
  153. <h3 class="label">可用?</h3>
  154. <div class="form-enter">
  155. <input type="radio" name="status" value="1" id="radio_status_1" checked="checked" class="radio"/><label for="radio_status_1">可用</label>&nbsp;<input type="radio" name="status" value="2" id="radio_status_2" class="radio"/><label for="radio_status_2">失效</label>
  156. </div>
  157. </div>
  158. <div class="formrow">
  159. <h3 class="label">优惠券类型</h3>
  160. <label for="1"><input name="ctype" type="radio" id="1" onclick=\'$("sup").style.display = "block";\' class="radio" ';
  161. if ($edit['ctype'] == '折扣券' || empty($edit['ctype'])) {
  162. echo 'checked';
  163. }
  164. echo '>折扣券</label> <label for="2"><input name="ctype" onclick=\'$("sup").style.display = "none";\' value="2" id="2" type="radio" ';
  165. if ($edit['ctype'] == '抵价券') {
  166. echo 'checked';
  167. }
  168. echo '>抵价券</label>
  169. </div>
  170. <div class="formrow" id="sup" ';
  171. if ($edit['sup'] == '抵价券') {
  172. echo 'style="display:none"';
  173. }
  174. echo '>
  175. <h3 class="label">折扣</h3>
  176. <input name="sup" type="text" class="text" style="width:60px" value="';
  177. echo $edit['sup'];
  178. echo '"> 折
  179. </div>
  180. <div class="formrow formrow-action">
  181. <span class="minbtn-wrap"><span class="btn"><input type="submit" value="提交';
  182. echo empty($id) ? '上传' : '保存';
  183. echo '" class="button" name="coupon_submit" /></span></span>
  184. </div>
  185. </div>
  186. </form>
  187. </div>
  188. <div class="pfoot"><p><b>-</b></p></div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. ';
  195. include mymps_tpl('inc_sidebar');
  196. echo ' </div>
  197. </div>
  198. ';
  199. include mymps_tpl('inc_foot');
  200. echo '</div>
  201. </body>
  202. </html>';
  203. ?>