replace_img.htm 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {include file="public/layout" /}
  2. <body class="bodystyle">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page">
  7. {include file="filemanager/bar" /}
  8. <form class="form-horizontal" id="post_form" action="{:url('Filemanager/replace_img')}" method="post" enctype="multipart/form-data">
  9. <div class="ncap-form-default">
  10. <dl class="row">
  11. <dt class="tit">当前目录</dt>
  12. <dd class="opt">
  13. {$info['activepathname']|default=''}
  14. <input type="hidden" name="activepath" value="{$info['activepath']|default=''}">
  15. <span class="err"></span>
  16. <p class="notic"></p>
  17. </dd>
  18. </dl>
  19. <dl class="row">
  20. <dt class="tit">图片名</dt>
  21. <dd class="opt">
  22. {$info['filename']|default=''}
  23. <input type="hidden" name="filename" value="{$info.filename|default=''}">
  24. <span class="err"></span>
  25. <p class="notic"></p>
  26. </dd>
  27. </dl>
  28. <dl class="row">
  29. <dt class="tit">
  30. <label for="url">上传图片</label>
  31. </dt>
  32. <dd class="opt">
  33. <input type="file" name="upfile" value="" class="input-txt">
  34. <span class="err"></span>
  35. <p class="notic"></p>
  36. </dd>
  37. </dl>
  38. <div class="bot">
  39. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  40. </div>
  41. </div>
  42. </form>
  43. </div>
  44. <script type="text/javascript">
  45. // 判断输入框是否为空
  46. function checkForm(){
  47. var isempty = true;
  48. $.each($('input[name^=upfile]'), function(index, item){
  49. if ($.trim($(item).val()) != '' && $(item).val() != undefined && $(item).val() != null) {
  50. isempty = false;
  51. }
  52. })
  53. if(isempty == true){
  54. showErrorMsg('请选择上传图片!');
  55. return false;
  56. }
  57. layer_loading('正在处理');
  58. $('#post_form').submit();
  59. }
  60. </script>
  61. {include file="public/footer" /}