upload.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. include '../../../system/db.class.php';
  3. if (!isAdminLogin()) {
  4. exit(iframe_message("请先登录管理中心!"));
  5. }
  6. echo '<!DOCTYPE html>
  7. <html lang="">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=' . IN_CHARSET . '" />
  10. <title>一键切图</title>
  11. <link href="' . IN_PATH . 'static/pack/upload/uploadify.css" rel="stylesheet" type="text/css" />
  12. <script src="' . IN_PATH . 'static/pack/layer/jquery.js"></script>
  13. <script src="' . IN_PATH . 'static/pack/upload/uploadify.js"></script>
  14. <script>
  15. var in_php = \'' . IN_PATH . 'source/pack/upload/icon/save.php\';
  16. var in_post = \'' . IN_EXT . '\';
  17. var in_size = 2;
  18. function return_response(response){
  19. if (response == 1) {
  20. location.href = "' . IN_PATH . 'data/icon/icon.zip?" + Math.random();
  21. } else if (response == -1) {
  22. $(".uploadifySuccess").hide();
  23. $(".uploadifyError").show().text("文件不规范,请重新选择!");
  24. } else if (response == -2) {
  25. $(".uploadifySuccess").hide();
  26. $(".uploadifyError").show().text("上传出错,请重试!");
  27. } else {
  28. $(".uploadifySuccess").hide();
  29. $(".uploadifyError").show().text(response);
  30. }
  31. }
  32. </script>
  33. </head>
  34. <body>
  35. <div id="fileQueue">
  36. <div class="uploadifyQueueItem uploadifySuccess" style="display:none">
  37. <div class="cancel">
  38. <a href="javascript:cancle()"><img src="' . IN_PATH . 'static/pack/upload/cancel.png" border="0"></a>
  39. </div>
  40. <span class="fileName"></span><span class="percentage"></span>
  41. <div class="uploadifyProgress">
  42. <div class="uploadifyProgressBar"></div>
  43. </div>
  44. </div>
  45. <div class="uploadifyQueueItem uploadifyError" style="display:none"></div>
  46. </div>
  47. <input type="file" id="uploadify" onchange="uploadify()" style="display:none">
  48. <img src="' . IN_PATH . 'static/pack/upload/up.png" style="cursor:pointer" onclick="$(\'#uploadify\').click()">
  49. </body>
  50. </html>';