adv.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.flea_adv_manage}</h3>
  7. <h5></h5>
  8. </div>
  9. </div>
  10. </div>
  11. <div class="fixed-empty"></div>
  12. <div class="explanation" id="explanation">
  13. <div class="title" id="checkZoom">
  14. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  15. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  16. </div>
  17. <ul>
  18. <li>{$Think.lang.flea_adv_help1}</li>
  19. </ul>
  20. </div>
  21. <form id="form1" method="post" enctype="multipart/form-data" name="form1">
  22. <input type="hidden" name="old_adv_pic1" value="{notempty name="$adv_list[1]['pic']"}{$adv_list[1]['pic']}{/notempty}" />
  23. <input type="hidden" name="old_adv_pic2" value="{notempty name="$adv_list[2]['pic']"}{$adv_list[2]['pic']}{/notempty}" />
  24. <input type="hidden" name="old_adv_pic3" value="{notempty name="$adv_list[3]['pic']"}{$adv_list[3]['pic']}{/notempty}" />
  25. <input type="hidden" name="old_adv_pic4" value="{notempty name="$adv_list[4]['pic']"}{$adv_list[4]['pic']}{/notempty}" />
  26. <input type="hidden" name="old_adv_pic5" value="{notempty name="$adv_list[5]['pic']"}{$adv_list[5]['pic']}{/notempty}" />
  27. <table class="ds-default-table">
  28. <tbody>
  29. <tr>
  30. <td class="required"><label>{$Think.lang.flea_adv}-01:</label></td><td>{$Think.lang.ds_link}:</td>
  31. </tr>
  32. <tr class="noborder">
  33. <td class="vatop rowform">{notempty name="$adv_list[1]['pic']"}<span class="type-file-show"><a data-lightbox="lightbox-image" href="{:ds_get_pic(ATTACH_PATH,$adv_list[1]['pic'])}"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png"></a>
  34. </span>{/notempty}<span class="type-file-box">
  35. <input name="adv_pic1" type="file" class="type-file-file" id="adv_pic1" size="30" hidefocus="true">
  36. <input type='text' name='textfield' id='textfield1' class='type-file-text' />
  37. <input type='button' name='button' id='button1' value='上传' class='type-file-button' />
  38. </span></td>
  39. <td class="vatop tips"><input id="adv_url1" class="txt" type="text" name="adv_url1" value="{notempty name="$adv_list[1]['url']"}{$adv_list[1]['url']}{/notempty}" style=" width:300px;">
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="required"><label>{$Think.lang.flea_adv}-02:</label></td><td>{$Think.lang.ds_link}:</td>
  44. </tr>
  45. <tr class="noborder">
  46. <td class="vatop rowform">{notempty name="$adv_list[2]['pic']"}<span class="type-file-show"><a data-lightbox="lightbox-image" href="{:ds_get_pic(ATTACH_PATH,$adv_list[2]['pic'])}"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png"></a>
  47. </span>{/notempty}<span class="type-file-box">
  48. <input name="adv_pic2" type="file" class="type-file-file" id="adv_pic2" size="30" hidefocus="true">
  49. <input type='text' name='textfield' id='textfield2' class='type-file-text' />
  50. <input type='button' name='button' id='button2' value='上传' class='type-file-button' />
  51. </span></td>
  52. <td class="vatop tips"><input id="adv_url2" class="txt" type="text" name="adv_url2" value="{notempty name="$adv_list[2]['url']"}{$adv_list[2]['url']}{/notempty}" style=" width:300px;">
  53. </td>
  54. </tr>
  55. <tr>
  56. <td class="required"><label>{$Think.lang.flea_adv}-03:</label></td><td>{$Think.lang.ds_link}:</td>
  57. </tr>
  58. <tr class="noborder">
  59. <td class="vatop rowform">{notempty name="$adv_list[3]['pic']"}<span class="type-file-show"><a data-lightbox="lightbox-image" href="{:ds_get_pic(ATTACH_PATH,$adv_list[3]['pic'])}"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png"></a>
  60. </span>{/notempty}<span class="type-file-box">
  61. <input name="adv_pic3" type="file" class="type-file-file" id="adv_pic3" size="30" hidefocus="true">
  62. <input type='text' name='textfield' id='textfield3' class='type-file-text' />
  63. <input type='button' name='button' id='button3' value='上传' class='type-file-button' />
  64. </span></td>
  65. <td class="vatop tips">
  66. <input id="adv_url3" class="txt" type="text" name="adv_url3" value="{notempty name="$adv_list[3]['url']"}{$adv_list[3]['url']}{/notempty}" style=" width:300px;">
  67. </td>
  68. </tr>
  69. <tr>
  70. <td class="required"><label>{$Think.lang.flea_adv}-04:</label></td><td>{$Think.lang.ds_link}:</td>
  71. </tr>
  72. <tr class="noborder">
  73. <td class="vatop rowform">{notempty name="$adv_list[4]['pic']"}<span class="type-file-show"><a data-lightbox="lightbox-image" href="{:ds_get_pic(ATTACH_PATH,$adv_list[4]['pic'])}"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png"></a>
  74. </span>{/notempty}<span class="type-file-box">
  75. <input name="adv_pic4" type="file" class="type-file-file" id="adv_pic4" size="30" hidefocus="true">
  76. <input type='text' name='textfield' id='textfield4' class='type-file-text' />
  77. <input type='button' name='button' id='button4' value='上传' class='type-file-button' />
  78. </span></td>
  79. <td class="vatop tips">
  80. <input id="adv_url4" class="txt" type="text" name="adv_url4" value="{notempty name="$adv_list[4]['url']"}{$adv_list[4]['url']}{/notempty}" style=" width:300px;">
  81. </td>
  82. </tr>
  83. <tr>
  84. <td class="required"><label>{$Think.lang.flea_adv}-05:</label></td><td>{$Think.lang.ds_link}:</td>
  85. </tr>
  86. <tr class="noborder">
  87. <td class="vatop rowform">{notempty name="$adv_list[5]['pic']"}<span class="type-file-show"><a data-lightbox="lightbox-image" href="{:ds_get_pic(ATTACH_PATH,$adv_list[5]['pic'])}"><img class="show_image" src="{$Think.ADMIN_SITE_ROOT}/images/preview.png"></a>
  88. </span>{/notempty}<span class="type-file-box">
  89. <input name="adv_pic5" type="file" class="type-file-file" id="adv_pic5" size="30" hidefocus="true">
  90. <input type='text' name='textfield' id='textfield5' class='type-file-text' />
  91. <input type='button' name='button' id='button5' value='上传' class='type-file-button' />
  92. </span></td>
  93. <td class="vatop tips">
  94. <input id="adv_url5" class="txt" type="text" name="adv_url5" value="{notempty name="$adv_list[5]['url']"}{$adv_list[5]['url']}{/notempty}" style=" width:300px;">
  95. </td>
  96. </tr>
  97. </tbody>
  98. <tfoot>
  99. <tr class="tfoot">
  100. <td colspan="2" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  101. </tr>
  102. </tfoot>
  103. </table>
  104. </form>
  105. </div>
  106. <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
  107. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
  108. <script type="text/javascript">
  109. // 模拟网站LOGO上传input type='file'样式
  110. $(function(){
  111. $("#adv_pic1").change(function(){$("#textfield1").val($(this).val());});
  112. $("#adv_pic2").change(function(){$("#textfield2").val($(this).val());});
  113. $("#adv_pic3").change(function(){$("#textfield3").val($(this).val());});
  114. $("#adv_pic4").change(function(){$("#textfield4").val($(this).val());});
  115. $("#adv_pic5").change(function(){$("#textfield5").val($(this).val());});
  116. // 上传图片类型
  117. $('input[class="type-file-file"]').change(function(){
  118. var filepatd=$(this).val();
  119. var extStart=filepatd.lastIndexOf(".");
  120. var ext=filepatd.substring(extStart,filepatd.lengtd).toUpperCase();
  121. if(ext!=".PNG"&&ext!=".GIF"&&ext!=".JPG"&&ext!=".JPEG"){
  122. layer.alert("{$Think.lang.circle_setting_adv_img_check}");
  123. $(this).attr('value','');
  124. return false;
  125. }
  126. });
  127. });
  128. </script>
  129. {include file="public/footer" /}
  130. <script type="text/javascript">
  131. $(function() {
  132. $('#form1').validate({
  133. errorPlacement: function(error, element) {
  134. error.appendTo(element.parent());
  135. },
  136. rules: {
  137. adv_url1 : {
  138. url:true
  139. },
  140. adv_url2 : {
  141. url:true
  142. },
  143. adv_url3 : {
  144. url:true
  145. },
  146. adv_url4 : {
  147. url:true
  148. },
  149. adv_url5 : {
  150. url:true
  151. }
  152. },
  153. messages: {
  154. adv_url1 : {
  155. url : '{$Think.lang.ds_url_error}'
  156. },
  157. adv_url2 : {
  158. url : '{$Think.lang.ds_url_error}'
  159. },
  160. adv_url3 : {
  161. url : '{$Think.lang.ds_url_error}'
  162. },
  163. adv_url4 : {
  164. url : '{$Think.lang.ds_url_error}'
  165. },
  166. adv_url5 : {
  167. url : '{$Think.lang.ds_url_error}'
  168. }
  169. }
  170. });
  171. });
  172. </script>