edit.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <div class="main">
  5. <div class="main_title">{%EDIT} <a href="{:u("IndexImage/index")}" class="back_list">{%BACK_LIST}</a></div>
  6. <div class="blank5"></div>
  7. <form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
  8. <table class="form" cellpadding=0 cellspacing=0>
  9. <tr>
  10. <td colspan=2 class="topTd"></td>
  11. </tr>
  12. <tr>
  13. <td class="item_title">标题:</td>
  14. <td class="item_input"><input type="text" class="textbox require" name="title" value="{$vo.title}" /></td>
  15. </tr>
  16. <tr>
  17. <td class="item_title">图片:</td>
  18. <td class="item_input"><html:imgUpload name = 'image' id='image' value="$vo.image" />
  19. <span class="tip_span" id="tip_span">&nbsp;[启动广告图标规格为:750px*1334px][其他图片规格为:828px*240px]</span>
  20. </td>
  21. </tr>
  22. <tr>
  23. <td class="item_title">显示位置:</td>
  24. <td class="item_input">
  25. <select name="show_position" id="position">
  26. <foreach name="position" item="position_item" key="k">
  27. <option value="{$k}" <if condition="$vo['show_position'] eq $k">selected="selected"</if>>{$position_item}</option>
  28. </foreach>
  29. </select>
  30. </td>
  31. </tr>
  32. <tr id="select_type">
  33. <td class="item_title">类型:</td>
  34. <td class="item_input">
  35. <select name="type" id="type">
  36. <foreach name="type_list" item="type_item" key="k">
  37. <option value="{$k}" <if condition="$vo['type'] eq $k">selected="selected"</if> >{$type_item}</option>
  38. </foreach>
  39. </select>
  40. </td>
  41. </tr>
  42. <tr id="url">
  43. <td class="item_title">链接:</td>
  44. <td class="item_input"><input type="text" class="textbox" name="url" value="{$vo.url}" /></td>
  45. </tr>
  46. <tr id="family_id" <if condition="$vo['type'] neq 1">style="display: none"</if>>
  47. <td class="item_title">家族:</td>
  48. <td class="item_input">
  49. <select name="show_id" style="width:300px">
  50. <foreach name="family" item="f_item" key="k">
  51. <option value="{$f_item.id}" <if condition="$vo['show_id'] eq $f_item['id']">selected="selected"</if> >{$f_item.name}</option>
  52. </foreach>
  53. </select>
  54. </td>
  55. </tr>
  56. <tr id="edu_show_id" style="display: none">
  57. <td class="item_title" id="edu_show_id_title" >房间id:</td>
  58. <td class="item_input">
  59. <input type="text" class="textbox" name="show_id" value="{$vo.show_id}" />
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="item_title">{%SORT}:</td>
  64. <td class="item_input"><input type="text" class="textbox" name="sort" value="{$vo.sort}" /></td>
  65. </tr>
  66. <tr>
  67. <td class="item_title"></td>
  68. <td class="item_input">
  69. <!--隐藏元素-->
  70. <input type="hidden" name="{:conf("VAR_MODULE")}" value="IndexImage" />
  71. <input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
  72. <input type="hidden" name="id" value="{$vo.id}" />
  73. <!--隐藏元素-->
  74. <input type="submit" class="button" value="{%EDIT}" />
  75. <input type="reset" class="button" value="{%RESET}" />
  76. </td>
  77. </tr>
  78. <tr>
  79. <td colspan=2 class="bottomTd"></td>
  80. </tr>
  81. </table>
  82. <script>
  83. $(function(){
  84. var type = $('#type option:selected').val();
  85. var position = $('#position option:selected').val();
  86. if(type==1){
  87. $('#family_id').show();
  88. }else{
  89. $('#family_id').hide();
  90. }
  91. if(type==0){
  92. $("#url").show();
  93. }else{
  94. $("#url").hide();
  95. }
  96. if(type>=6 && type<=9){
  97. $('#edu_show_id').show();
  98. $('#edu_show_id input').attr('name','show_id');
  99. if( type==8)
  100. $('#edu_show_id_title').html("房间号:");
  101. else if( type==6)
  102. $('#edu_show_id_title').html("机构id:");
  103. else if( type==9)
  104. $('#edu_show_id_title').html("课程id:");
  105. else
  106. $('#edu_show_id_title').html("会员id:");
  107. }else{
  108. $('#edu_show_id').hide();
  109. $('#edu_show_id input').removeAttr('name');
  110. }
  111. if(position == 3){
  112. $("#select_type").hide();
  113. $("#type").val(0);
  114. $("#url").show();
  115. }else{
  116. $("#select_type").show();
  117. }
  118. $("#type").change(function(){
  119. type = $(this).val();
  120. if(type==1){
  121. $('#family_id').show();
  122. }else{
  123. $('#family_id').hide();
  124. }
  125. if(type!=0){
  126. $("#url").hide();
  127. $("input[name='url']").val('');
  128. }else{
  129. $("#url").show();
  130. }
  131. if(type>=6 && type<=9){
  132. $('#edu_show_id').show();
  133. $('#edu_show_id input').attr('name','show_id');
  134. if( type==8)
  135. $('#edu_show_id_title').html("房间号:");
  136. else if( type==6)
  137. $('#edu_show_id_title').html("机构id:");
  138. else if( type==9)
  139. $('#edu_show_id_title').html("课程id:");
  140. else
  141. $('#edu_show_id_title').html("会员id:");
  142. }else{
  143. $('#edu_show_id').hide();
  144. $('#edu_show_id input').removeAttr('name');
  145. }
  146. });
  147. $("#position").change(function(){
  148. position = $(this).val();
  149. if(position == 3){
  150. $("#select_type").hide();
  151. $("#type").val(0);
  152. $("#url").show();
  153. }else{
  154. type = $('#type option:selected').val();
  155. if(type==0){
  156. $("#url").show();
  157. }else{
  158. $("#url").hide();
  159. $("input[name='url']").val('');
  160. }
  161. $("#select_type").show();
  162. }
  163. });
  164. });
  165. </script>
  166. </form>
  167. </div>
  168. <include file="Public:footer" />