add.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <div class="main">
  5. <div class="main_title">{%ADD} <a href="{:u("WeiboIndex/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" /></td>
  15. </tr>
  16. <tr>
  17. <td class="item_title">图片:</td>
  18. <td class="item_input"><html:imgUpload name = 'image' id='image' />
  19. <span class="tip_span" id="tip_span">&nbsp;[启动广告图标规格为:750px*1334px][其他图片规格为:750px*400px]</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}">{$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}">{$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" /></td>
  45. </tr>
  46. <tr id="family_id" style="display: none">
  47. <td class="item_title">家族:</td>
  48. <td class="item_input">
  49. <select name="show_id">
  50. <foreach name="family" item="f_item" key="k">
  51. <option value="{$f_item.id}">{$f_item.name}</option>
  52. </foreach>
  53. </select>
  54. </td>
  55. </tr>
  56. <tr id="edu_show_id">
  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="" />
  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="{$new_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="WeiboIndex" />
  71. <input type="hidden" name="{:conf("VAR_ACTION")}" value="insert" />
  72. <!--隐藏元素-->
  73. <input type="submit" class="button" value="{%ADD}" />
  74. <input type="reset" class="button" value="{%RESET}" />
  75. </td>
  76. </tr>
  77. <tr>
  78. <td colspan=2 class="bottomTd"></td>
  79. </tr>
  80. </table>
  81. <script>
  82. $(function(){
  83. var type = $('#type option:selected').val();
  84. var position = $('#position option:selected').val();
  85. if(type==1){
  86. $('#family_id').show();
  87. }else{
  88. $('#family_id').hide();
  89. }
  90. if(type==0){
  91. $("#url").show();
  92. }else{
  93. $("#url").hide();
  94. }
  95. if(position == 3){
  96. $("#select_type").hide();
  97. $("#type").val(0);
  98. $("#url").show();
  99. }else{
  100. $("#select_type").show();
  101. }
  102. $("#type").bind("click",function(){
  103. type = $(this).val();
  104. if(type==1){
  105. $('#family_id').show();
  106. }else{
  107. $('#family_id').hide();
  108. }
  109. if(type!=0){
  110. $("#url").hide();
  111. $("input[name='url']").val('');
  112. }else{
  113. $("#url").show();
  114. }
  115. if(type==10 || type==11){
  116. $('#edu_show_id').show();
  117. if( type==10)
  118. $('#edu_show_id_title').html("会员id:");
  119. else
  120. $('#edu_show_id_title').html("动态id:");
  121. }else{
  122. $('#edu_show_id').hide();
  123. }
  124. });
  125. $("#position").bind("click",function(){
  126. position = $(this).val();
  127. if(position == 3){
  128. $("#select_type").hide();
  129. $("#type").val(0);
  130. $("#url").show();
  131. }
  132. else{
  133. type = $('#type option:selected').val();
  134. if(type==0){
  135. $("#url").show();
  136. }else{
  137. $("#url").hide();
  138. $("input[name='url']").val('');
  139. }
  140. $("#select_type").show();
  141. }
  142. });
  143. });
  144. </script>
  145. </form>
  146. </div>
  147. <include file="Public:footer" />