coupon_edit.tpl.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php include mymps_tpl('inc_head');?>
  2. <script language="javascript" src="js/vbm.js"></script>
  3. <script language="javascript">
  4. function check_sub(){
  5. if (document.form1.title.value=="") {
  6. alert('请填写优惠券名称');
  7. document.form1.title.focus();
  8. return false;
  9. }
  10. if (document.form1.userid.value=="") {
  11. alert('请填写发布商家会员用户名');
  12. document.form1.userid.focus();
  13. return false;
  14. }
  15. if (document.form1.des.value=="") {
  16. alert('请填写简短说明!');
  17. document.form1.des.focus();
  18. return false;
  19. }
  20. return true;
  21. }
  22. </script>
  23. <style>
  24. .vbm tr{ background:#ffffff}
  25. .altbg1{ background-color:#f1f5f8}
  26. </style>
  27. <form action="?part=edit&id=<?=$id?>" method="post" enctype="multipart/form-data" name="form1" onSubmit="return check_sub();">
  28. <input name="pre_picture" value="<?=$edit['pre_picture']?>" type="hidden">
  29. <input name="picture" value="<?=$edit['picture']?>" type="hidden">
  30. <div id="<?=MPS_SOFTNAME?>">
  31. <table width="100%" cellspacing="0" cellpadding="0" class="vbm">
  32. <tr class="firstr">
  33. <td colspan="2">基本信息</td>
  34. </tr>
  35. <tr>
  36. <td class="altbg1">优惠券名称:<font color="red">*</font></td>
  37. <td>
  38. <input type="text" name="title" value="<?=$edit['title']?>" class="text" />
  39. </td>
  40. </tr>
  41. <tr>
  42. <td class="altbg1" width="15%">发布商家:<font color="red">*</font></td>
  43. <td width="75%">
  44. <input type="text" name="userid" id="userid" value="<?=$edit['userid']?>" class="text" style="background-color:#eee"/> <font color=red>非必要,请勿修改</font>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class="altbg1">优惠券分类:<font color="red">*</font></td>
  49. <td>
  50. <?php echo get_couponclass_select('cate_id',$edit['cate_id']); ?>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="altbg1">所属地区:<font color="red">*</font></td>
  55. <td>
  56. <select name="areaid">
  57. <?=cat_list('area',0,$edit['areaid'])?>
  58. </select>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td class="altbg1">有效期:</td>
  63. <td><input type="text" name="begindate" value="<?=$begindate?>" class="text" style="width:80px"/> - <input type="text" name="enddate" value="<?=$enddate?>" class="text" style="width:80px" />&nbsp;(YYYY-MM-DD)</td>
  64. </tr>
  65. <tr>
  66. <td class="altbg1">优惠说明:<font color="red">*</font></td>
  67. <td><textarea name="des" style="height:60px; width:500px;"><?=de_textarea_post_change($edit['des'])?></textarea></td>
  68. </tr>
  69. <tr>
  70. <td class="altbg1">优惠券类型:</td>
  71. <td>
  72. <label for="1"><input name="ctype" type="radio" id="1" onclick='$("sup").style.display = "";' class="radio" <?php if($edit['ctype'] == '折扣券' || empty($edit['ctype'])) echo 'checked'; ?>>折扣券</label> <label for="2"><input name="ctype" class="radio" onclick='$("sup").style.display = "none";' value="2" id="2" type="radio" <?php if($edit['ctype'] == '抵价券') echo 'checked'; ?>>抵价券</label>
  73. </td>
  74. </tr>
  75. <tr id="sup" <?php if($edit['sup'] == '抵价券') echo 'style="display:none"'?>>
  76. <td class="altbg1">折扣</td>
  77. <td><input name="sup" class="txt" value="<?=$edit['sup']?>"> 折</td>
  78. </tr>
  79. <tr>
  80. <td class="altbg1">可用:</td>
  81. <td>
  82. <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> </td>
  83. </tr>
  84. <tr>
  85. <td class="altbg1">状态</td>
  86. <td>
  87. <select name="grade">
  88. <option value="0" <?php if($edit['grade'] == 0) echo 'selected style=\'background-color:#6eb00c; color:white!important;\''; ?>>待审</option>
  89. <option value="1" <?php if($edit['grade'] == 1) echo 'selected style=\'background-color:#6eb00c; color:white!important;\''; ?>>正常</option>
  90. <option value="2" <?php if($edit['grade'] == 2) echo 'selected style=\'background-color:#6eb00c; color:white!important;\''; ?>>推荐</option>
  91. </select>
  92. </td>
  93. </tr>
  94. <tr class="firstr">
  95. <td colspan="2">预览图片</td>
  96. </tr>
  97. <tr>
  98. <td class="altbg1">优惠券图片:</td>
  99. <td>
  100. <?php
  101. echo "<img src=".$mymps_global[SiteUrl]."".$edit[pre_picture]." style='_margin-top:expression(( 180 - this.height ) / 2);' />\r\n";
  102. ?>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td class="altbg1">更新图片:</td>
  107. <td>
  108. <input type="file" name="coupon_image" size="30" id="litpic" onChange="SeePic(document.picview,document.form1.litpic);">
  109. </td>
  110. </tr>
  111. <tr>
  112. <td class="altbg1">预览:</td>
  113. <td>
  114. <img src="template/images/mpview.gif" width="150" id="picview" name="picview" />
  115. </td>
  116. </tr>
  117. </table>
  118. <div style="margin-top:3px;">
  119. <?php echo $acontent; ?>
  120. </div>
  121. </div>
  122. <center><input type="submit" name="coupon_submit" value="提 交" class="mymps large" /></center>
  123. </form>
  124. <?php mymps_admin_tpl_global_foot();?>