index.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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_seo}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <div class="fixed-empty"></div>
  13. <form id="form1" method="post" enctype="multipart/form-data" name="form1">
  14. <table class="ds-default-table">
  15. <tbody>
  16. <tr>
  17. <td colspan="2" class="required"><label for="flea_site_title">{$Think.lang.flea_site_title}:</label></td>
  18. </tr>
  19. <tr class="noborder">
  20. <td class="vatop rowform"><input id="flea_site_title" name="flea_site_title" value="{$list_setting.flea_site_title}" class="txt" type="text" /></td>
  21. <td></td>
  22. </tr>
  23. <tr>
  24. <td colspan="2" class="required"><label for="flea_site_description">{$Think.lang.flea_site_description}:</label></td>
  25. </tr>
  26. <tr class="noborder">
  27. <td class="vatop rowform"><textarea name="flea_site_description" rows="6" class="tarea" id="flea_site_description">{$list_setting.flea_site_description}</textarea></td>
  28. <td class="vatop tips"><span class="vatop rowform">{$Think.lang.site_description_notice}</span></td>
  29. </tr>
  30. <tr>
  31. <td colspan="2" class="required">{$Think.lang.flea_site_keywords}:</td>
  32. </tr>
  33. <tr class="noborder">
  34. <td class="vatop rowform"><input id="flea_site_keywords" name="flea_site_keywords" value="{$list_setting.flea_site_keywords}" class="txt" type="text" /></td>
  35. <td class="vatop tips"><span class="vatop rowform">{$Think.lang.site_keyword_notice}</span></td>
  36. </tr>
  37. </tbody>
  38. <tfoot>
  39. <tr class="tfoot">
  40. <td colspan="2" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  41. </tr>
  42. </tfoot>
  43. </table>
  44. </form>
  45. </div>
  46. {include file="public/footer" /}
  47. <script type="text/javascript">
  48. // 模拟网站LOGO上传input type='file'样式
  49. $(function(){
  50. var textButton="<input type='text' name='textfield' id='textfield1' class='type-file-text' /><input type='button' name='button' id='button1' value='上传' class='type-file-button' />"
  51. $(textButton).insertBefore("#site_logo");
  52. $("#site_logo").change(function(){
  53. $("#textfield1").val($("#site_logo").val());
  54. });
  55. // 上传图片类型
  56. $('input[class="type-file-file"]').change(function(){
  57. var filepatd=$(this).val();
  58. var extStart=filepatd.lastIndexOf(".");
  59. var ext=filepatd.substring(extStart,filepatd.lengtd).toUpperCase();
  60. if(ext!=".PNG"&&ext!=".GIF"&&ext!=".JPG"&&ext!=".JPEG"){
  61. layer.alert("{$Think.lang.default_img_wrong}");
  62. $(this).attr('value','');
  63. return false;
  64. }
  65. });
  66. });
  67. </script>
  68. <script type="text/javascript">
  69. $(function() {
  70. $('#form1').validate({
  71. errorPlacement: function(error, element) {
  72. error.appendTo(element.parent().parent().find('td:last'));
  73. },
  74. rules: {
  75. flea_site_title : {
  76. maxlength:30
  77. },
  78. flea_site_description : {
  79. maxlength:100
  80. },
  81. flea_site_keywords : {
  82. maxlength:30
  83. }
  84. },
  85. messages: {
  86. flea_site_title : {
  87. maxlength: '{$Think.lang.flea_site_title_error}'
  88. },
  89. flea_site_description : {
  90. maxlength: '{$Think.lang.flea_site_description_error}'
  91. },
  92. flea_site_keywords : {
  93. maxlength: '{$Think.lang.flea_site_keywords_error}'
  94. }
  95. }
  96. });
  97. });
  98. </script>