admin-open.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. // by 请勿倒卖,已申请软著,否则追究法律责任
  3. include "../../system/db.class.php";
  4. if (!isAdminLogin()) {
  5. exit(iframe_message("请先登录管理中心!"));
  6. }
  7. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html lang="">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo IN_CHARSET;?>" />
  11. <title>上传应用</title>
  12. <link href="<?php echo IN_PATH;?>static/pack/upload/uploadify.css" rel="stylesheet" type="text/css" />
  13. <script src="<?php echo IN_PATH;?>static/pack/layer/jquery.js"></script>
  14. <script src="<?php echo IN_PATH;?>static/pack/upload/uploadify.js"></script>
  15. <script>
  16. var in_php = '<?php echo IN_PATH;?>source/pack/upload/admin-uplog.php';
  17. var in_post = '<?php echo $_COOKIE["in_adminid"];?>_<?php echo time();?>';
  18. var in_size = <?php echo intval(ini_get("upload_max_filesize"));?>;
  19. function return_response(response){
  20. if (response == -1) {
  21. $(".uploadifySuccess").hide();
  22. $(".uploadifyError").show().text("文件不规范,请重新选择!");
  23. } else {
  24. ReturnValue(eval('(' + response + ')'));
  25. }
  26. }
  27. function ReturnValue(response){
  28. $("#fileQueue").html('<div class="uploadifyQueueItem">正在解析应用,请稍等...</div>');
  29. var xhr = new XMLHttpRequest();
  30. xhr.onreadystatechange = function() {
  31. processAJAX();
  32. };
  33. xhr.open("GET", "<?php echo IN_PATH;?>source/pack/upload/admin-" + response.extension + ".php?time=" + response.time + "&size=" + response.size, true);
  34. xhr.send(null);
  35. function processAJAX() {
  36. if (xhr.readyState == 4) {
  37. if (xhr.status == 200) {
  38. if (xhr.responseText == -1) {
  39. $("#fileQueue").html('<div class="uploadifyQueueItem">Access denied</div>');
  40. return false;
  41. }
  42. var data = eval('(' + xhr.responseText + ')');
  43. parent.$("#in_name").val(data.name);
  44. parent.$("#in_mnvs").val(data.mnvs);
  45. parent.$("#in_bid").val(data.bid);
  46. parent.$("#in_bsvs").val(data.bsvs);
  47. parent.$("#in_bvs").val(data.bvs);
  48. parent.$("#in_form").val(data.form);
  49. parent.$("#in_nick").val(data.nick);
  50. parent.$("#in_type").val(data.type);
  51. parent.$("#in_team").val(data.team);
  52. parent.$("#in_icon").val(data.icon);
  53. parent.$("#in_app").val(data.app);
  54. parent.$("#in_size").val(data.size);
  55. parent.$("#btnsave").click();
  56. }
  57. }
  58. }
  59. }
  60. </script>
  61. </head>
  62. <body>
  63. <div id="fileQueue">
  64. <div class="uploadifyQueueItem uploadifySuccess" style="display:none">
  65. <div class="cancel">
  66. <a href="javascript:cancle()"><img src="<?php echo IN_PATH;?>static/pack/upload/cancel.png" border="0"></a>
  67. </div>
  68. <span class="fileName"></span><span class="percentage"></span>
  69. <div class="uploadifyProgress">
  70. <div class="uploadifyProgressBar"></div>
  71. </div>
  72. </div>
  73. <div class="uploadifyQueueItem uploadifyError" style="display:none"></div>
  74. </div>
  75. <input type="file" id="uploadify" onchange="uploadify()" style="display:none">
  76. <img src="<?php echo IN_PATH;?>static/pack/upload/up.png" style="cursor:pointer" onclick="$('#uploadify').click()">
  77. </body>
  78. </html>