Guest User

Untitled

a guest
Jan 27th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.10 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  6. <meta http-equiv="cache-control" content="max-age=0" />
  7. <meta http-equiv="cache-control" content="no-cache" />
  8. <meta http-equiv="expires" content="0" />
  9. <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
  10. <meta http-equiv="pragma" content="no-cache" />
  11. <meta name="msapplication-tap-highlight" content="no" />
  12. <meta http-equiv="x-ua-compatible" content="edge, chrome=1" />
  13. <meta name="mobile-web-app-capable" content="yes" />
  14. <meta name="apple-mobile-web-app-capable" content="yes" />
  15. <style type="text/css">
  16. body {
  17. width: 100%;
  18. height: 100%;
  19. background-color: #f5f5f5;
  20. margin: 0;
  21. padding: 0;
  22. font-family: Arial;
  23. font-size: 13px;
  24. color: #777777;
  25. user-select: none; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none;
  26. }
  27.  
  28. .uploadButton {
  29. -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
  30. -webkit-box-shadow: inset 0px 1px 0px 0px #ffffff;
  31. box-shadow: inset 0px 1px 0px 0px #ffffff;
  32. background-color: #ededed;
  33. -webkit-border-top-left-radius: 5px;
  34. -moz-border-radius-topleft: 5px;
  35. border-top-left-radius: 5px;
  36. -webkit-border-top-right-radius: 5px;
  37. -moz-border-radius-topright: 5px;
  38. border-top-right-radius: 5px;
  39. -webkit-border-bottom-right-radius: 5px;
  40. -moz-border-radius-bottomright: 5px;
  41. border-bottom-right-radius: 5px;
  42. -webkit-border-bottom-left-radius: 5px;
  43. -moz-border-radius-bottomleft: 5px;
  44. border-bottom-left-radius: 5px;
  45. text-indent: 0;
  46. border: 1px solid #dcdcdc;
  47. display: inline-block;
  48. color: #777777;
  49. font-size: 13px;
  50. font-weight: bold;
  51. height: 30px;
  52. line-height: 30px;
  53. text-decoration: none;
  54. text-align: center;
  55. text-shadow: 1px 1px 0px #ffffff;
  56. min-width: 180px;
  57. padding-left: 10px;
  58. padding-right: 10px;
  59. overflow: visible;
  60. }
  61.  
  62. .uploadButton:hover {
  63. background-color: #dfdfdf;
  64. }
  65.  
  66. #fileTransfer a {
  67. color: #000000;
  68. }
  69.  
  70. #fileTransfer a:hover {
  71. text-decoration: none;
  72. }
  73.  
  74. .dropFi {
  75. background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIGhlaWdodD0nNTAnIHdpZHRoPScxMjAnPjx0ZXh0IHg9JzE1JyB5PScxNScgZmlsbD0nZ3JleScgZm9udC1zaXplPScxMCc+RFJPUCBGSUxFUyBIRVJFITwvdGV4dD48L3N2Zz4=");
  76. background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIGhlaWdodD0nNTAnIHdpZHRoPScxMjAnPjx0ZXh0IHg9JzE1JyB5PScxNScgZmlsbD0nZ3JleScgZm9udC1zaXplPScxMCc+RFJPUCBGSUxFUyBIRVJFITwvdGV4dD48L3N2Zz4=");
  77. width: 100%;
  78. height: 100%;
  79. background-color: #f5f5f5;
  80. margin: 0;
  81. padding: 0;
  82. font-family: Arial;
  83. font-size: 13px;
  84. color: #777777;
  85. }
  86.  
  87. table tbody tr td {
  88. text-indent: 5px;
  89. color: #444;
  90. border-bottom: 1px solid #BBB;
  91. border-left: 1px solid #BBB;
  92. }
  93.  
  94. table tbody tr .left, table thead tr .left {
  95. text-align: left;
  96. }
  97.  
  98. table thead tr th {
  99. height: 20px;
  100. color: #777777;
  101. text-align: center;
  102. border-top: 1px solid #BBB;
  103. border-bottom: 1px solid #BBB;
  104. border-left: 1px solid #BBB;
  105. background-color: #EDEDED;
  106. }
  107.  
  108. .right {
  109. cursor: pointer;
  110. }
  111.  
  112. td {
  113. max-width: 0px;
  114. overflow: hidden;
  115. text-overflow: ellipsis;
  116. white-space: nowrap;
  117. }
  118. </style>
  119. <script type="text/javascript">window.iefor = false;</script>
  120. <!--[if IE]><script type="text/javascript">window.iefor = true;</script><![endif]-->
  121. <script charset="utf-8" type="text/javascript">
  122. (function() {
  123. var WIND, DOC, OPR, INR = "inn"+"erH"+"TML";
  124. (function() { WIND = window; DOC = document; })();
  125. WIND.pIaReal = false;
  126. WIND.langString = false;
  127. try {
  128. if((OPR = "pa"+"re"+"nt") && WIND[OPR] && WIND[OPR].W && WIND[OPR].W !== WIND[OPR]) {
  129. WIND.langString = WIND[OPR].W.langstring;
  130. } else if((OPR = "ope"+"ne"+"r") && WIND[OPR] && WIND[OPR].W && WIND[OPR].W !== WIND[OPR]) {
  131. WIND.langString = WIND[OPR].W.langstring;
  132. } else { OPR = "undefined_1"; }
  133. } catch(e) { OPR = "pa"+"re"+"nt"; }
  134. (function() {
  135. var sTrA;
  136. try {
  137. if("sessionStorage" in WIND && (sTrA = WIND.sessionStorage)) {
  138. var varSess = "win_name_jwts";
  139. if(varSess in sTrA) {
  140. var kA = sTrA[varSess];
  141. if(kA && kA.length > 0) { WIND.name = kA; }
  142. }
  143. }
  144. } catch(exc) { }
  145. try {
  146. if(WIND.name.length > 0) {
  147. var pIaR = false;
  148. if(WIND[OPR] && WIND[OPR].W) {
  149. pIaR = WIND[OPR].W.my64Dec(WIND.name);
  150. }
  151. if(pIaR && pIaR.length > 0) {
  152. var hX = { };
  153. eval("function F(W) { var window=W; " + pIaR + " };F;")(hX);
  154. if(hX.pIaR) { WIND.pIaReal = hX.pIaR; }
  155. }
  156. }
  157. } catch(exc) { }
  158. })();
  159.  
  160. WIND.uploadRulesSize = 0;
  161. WIND.uploadRulesExt = "";
  162. WIND.uploadRulesAllowExt = "";
  163. WIND.uploadRulesRun = "";
  164. WIND.lastClickType = 0;
  165. WIND.onStopProp = function(Ea) { if(!Ea) { Ea = WIND.event; if(!Ea) { return; } } if(Ea.stopPropagation) { Ea.stopPropagation(); } else { try { Ea.cancelBubble = true; } catch(a) { } } };
  166. WIND.loadmeBySoft = function() { };
  167. WIND.onerror = function(a, b, c, d) {
  168. try {
  169. if(WIND[OPR] && WIND[OPR].onerror) { return WIND[OPR].onerror(a, b, c, d); }
  170. } catch(exc) { }
  171. };
  172.  
  173. WIND.endsWith = function(th, str) {
  174. return str.length > 0 && th.substring(th.length - str.length, th.length) === str;
  175. };
  176.  
  177. WIND.myUploadExtRule = function(S) {
  178. var tC = S + "";
  179. while(tC.indexOf("|") == 0 || tC.indexOf("*") == 0) { tC = tC.substring(1); }
  180. while(WIND.endsWith(tC, "|")) { tC = tC.substring(0, tC.length - 1); }
  181. tC = tC.replace("|*.", ",.");
  182. return tC.replace("|", ",");
  183. };
  184.  
  185. WIND.allFilesNumber = 0;
  186. WIND.ondragleave = WIND.ondrop = WIND.dragenter = WIND.ondragover = function(a) { return false; };
  187. var jsb64array = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  188. var sent = false;
  189. var DragHoverTimeout = false;
  190.  
  191. WIND.jsencode64 = function(input) {
  192. var base64 = "";
  193. var hex = "";
  194. var chr1, chr2, chr3 = "";
  195. var enc1, enc2, enc3, enc4 = "";
  196. var i = 0;
  197. do {
  198. chr1 = input.charCodeAt(i++);
  199. chr2 = input.charCodeAt(i++);
  200. chr3 = input.charCodeAt(i++);
  201. enc1 = chr1 >> 2;
  202. enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
  203. enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
  204. enc4 = chr3 & 63;
  205. if(isNaN(chr2)) {
  206. enc3 = enc4 = 64;
  207. } else if(isNaN(chr3)) {
  208. enc4 = 64;
  209. }
  210. base64 = base64 +
  211. jsb64array.charAt(enc1) +
  212. jsb64array.charAt(enc2) +
  213. jsb64array.charAt(enc3) +
  214. jsb64array.charAt(enc4);
  215. chr1 = chr2 = chr3 = "";
  216. enc1 = enc2 = enc3 = enc4 = "";
  217. } while (i < input.length);
  218. return base64;
  219. }
  220.  
  221. WIND.coSize = function(a) {
  222. if(a < 1025) {
  223. a += "B";
  224. } else if(a < 1048577) {
  225. a = ((a / 1024).toFixed(2)) + "KB";
  226. } else {
  227. a = ((a / 1048576).toFixed(2)) + "MB";
  228. }
  229. return a;
  230. }
  231.  
  232. WIND.languaize = function() {
  233. try {
  234. var l;
  235. if((l = WIND.langString)) {
  236. if(l.owngu1) { DOC.getElementById("owngu1")[INR] = l.owngu1; }
  237. if(l.owngu2) { DOC.getElementById("owngu2")[INR] = l.owngu2; }
  238. }
  239. } catch(a) { }
  240. }
  241.  
  242. var UNDEFINED = void 0;
  243. var allFiles = new Object();
  244. var allXhrFiles = new Object();
  245.  
  246. WIND.firstload = function() {
  247. WIND.onclick = function(ev) { WIND.onStopProp(ev); WIND.loadme(2); return false; };
  248. try { DOC.getElementById("divfile").onclick = function(ev) { WIND.onStopProp(ev); WIND.loadme(3); return false; }; } catch(d) { }
  249. WIND.loadmeBySoft = function() { WIND.loadmeBySoft = function() { }; if(WIND.lastClickType < 2) { WIND.loadme(1); } };
  250.  
  251. WIND.languaize();
  252. var W = WIND;
  253. try {
  254. (function() {
  255. if(!W.W) { W.W = W; }
  256. var mainW = (W[OPR] && W[OPR].W ? W[OPR].W : false);
  257. if(mainW) {
  258. if("uploadRulesSize" in mainW) { W.uploadRulesSize = mainW.uploadRulesSize; }
  259. if("uploadRulesExt" in mainW) { W.uploadRulesExt = mainW.uploadRulesExt; }
  260. if("uploadRulesAllowExt" in mainW) { W.uploadRulesAllowExt = mainW.uploadRulesAllowExt; }
  261. if("uploadRulesRun" in mainW) { W.uploadRulesExt = mainW.uploadRulesRun; }
  262. }
  263. var mainJquery = (W[OPR] && W[OPR].W && W[OPR].W.mainJquery ? W[OPR].W.mainJquery.toString() : false);
  264. if(mainJquery) {
  265. W.JQW = { };
  266. eval("mainJquery = " + mainJquery)(W.JQW, W);
  267. if(W.JQW.$) {
  268. W.$ = W.JQW.$;
  269. W.mainJquery = mainJquery;
  270. }
  271. }
  272. })();
  273. } catch(exc) { }
  274. try {
  275. (function() {
  276. if(W.pIaReal) {
  277. if("uploadRulesSize" in W.pIaReal) { W.uploadRulesSize = W.pIaReal.uploadRulesSize; }
  278. if("uploadRulesExt" in W.pIaReal) { W.uploadRulesExt = W.pIaReal.uploadRulesExt; }
  279. if("uploadRulesAllowExt" in W.pIaReal) { W.uploadRulesAllowExt = W.pIaReal.uploadRulesAllowExt; }
  280. if("uploadRulesRun" in W.pIaReal) { W.uploadRulesRun = W.pIaReal.uploadRulesRun; }
  281. }
  282. })();
  283. } catch(exc) { }
  284. var addOwnInner = "";
  285. var allFilesCounter = 1;
  286.  
  287. var fg = DOC.getElementById("fileTransfer");
  288. var allAr = DOC.getElementsByTagName("body")[0];
  289. WIND.fg = fg;
  290. WIND.allAr = allAr;
  291.  
  292. WIND.UploadMe = function(file, parentDirA, uploadRulesRun) {
  293. var xhr;
  294. try {
  295. if(WIND.myxhr) {
  296. xhr = WIND.myxhr;
  297. WIND.myxhr = false;
  298. } else {
  299. xhr = new WIND.XMLHttpRequest();
  300. }
  301. } catch (df) {
  302. return;
  303. }
  304. var nameown = "nameown" in file ? file.nameown : file.name;
  305. var myfile = allFilesCounter + nameown;
  306. allFiles[myfile] = parentDirA + nameown;
  307. var fullFileName = allFiles[myfile];
  308. allXhrFiles[myfile] = [xhr, false];
  309. allFilesCounter++;
  310. WIND.allFilesNumber++;
  311. var progress = false;
  312. var el;
  313.  
  314. var op = DOC.getElementById("content");
  315. if(!op) {
  316. try {
  317. DOC.getElementById("divup")[INR] = "<div id='progress' style='text-align:center;'><table id='tabelle' width='100%' border='0' cellpadding='0' cellspacing='0'><thead><tr id='mainrow'><th style='width:57%;text-align:left;'>&nbsp;" + (!WIND.langString || !WIND.langString.ownglu1 ? "File Name" : WIND.langString.ownglu1) + "</th><th style='width:25%;'>" + (!WIND.langString || !WIND.langString.ownglu2 ? "Size" : WIND.langString.ownglu2) + "</th><th style='width:18%;cursor:pointer;'>" + (!WIND.langString || !WIND.langString.ownglu3 ? "Action" : WIND.langString.ownglu3) + "</th></tr></thead><tbody id='content'></tbody></table></div>";
  318. } catch (td) {}
  319. op = DOC.getElementById("content");
  320. }
  321.  
  322. if(op) {
  323. el = DOC.createElement("tr");
  324. el[INR] = "<td class=\"left\">"+fullFileName+"</td><td>"+WIND.coSize(file.size)+"</td><td class=\"right\"></td>";
  325. op.appendChild(el);
  326. progress = el.childNodes[2];
  327. allXhrFiles[myfile][1] = progress;
  328. progress.onclick = function(a) {
  329. progress.onclick = null;
  330. try { allXhrFiles[myfile][0].abort(); } catch(ads) { }
  331. progress[INR] = !WIND.langString || !WIND.langString.owngu3 ? "Aborted" : WIND.langString.owngu3;
  332. WIND.onStopProp(a);
  333. return false;
  334. };
  335.  
  336. var pcB = -1;
  337. if(progress) {
  338. xhr.upload.addEventListener("progress", function(e) {
  339. var pc = (e.loaded / e.total * 100) | 0;
  340. if(e.loaded == e.total) {
  341. progress[INR] = "100%";
  342. progress.onclick = null;
  343. progress = false;
  344. WIND.setTimeout(function() { op.removeChild(el); }, 1000);
  345. return;
  346. } else if(pcB != pc) {
  347. pcB = pc;
  348. progress[INR] = pc + "%";
  349. }
  350. }, false);
  351. }
  352. }
  353.  
  354. try {
  355. DOC.getElementById("divfile").style.display = "none";
  356. } catch (td) {}
  357. WIND.onsubme();
  358.  
  359. xhr.onreadystatechange = function(e) {
  360. if(xhr.readyState == 4) {
  361. try {
  362. allFiles[myfile] = UNDEFINED;
  363. allXhrFiles[myfile] = UNDEFINED;
  364. delete allFiles[myfile];
  365. delete allXhrFiles[myfile];
  366. } catch(oxs) {
  367. allFiles[myfile] = UNDEFINED;
  368. allXhrFiles[myfile] = UNDEFINED;
  369. }
  370.  
  371. var k = 0;
  372. for(var p in allFiles) {
  373. if(allFiles[p] != UNDEFINED) {
  374. k++;
  375. }
  376. }
  377. WIND.allFilesNumber = k;
  378. progress.onclick = null;
  379.  
  380. if(xhr.status == 200) {
  381. var specfilename = "";
  382. try {
  383. specfilename = xhr.getResponseHeader("Spec-Filename");
  384. } catch(exc) { specfilename = ""; }
  385. WIND.sendFinishUpload(WIND.realpathmain, fullFileName, specfilename, uploadRulesRun);
  386. } else if(xhr.status != 200) {
  387. try {
  388. if(progress[INR].indexOf((!WIND.langString || !WIND.langString.owngu3) ? "Aborted" : WIND.langString.owngu3) == -1) {
  389. var errstate = xhr.status;
  390. try {
  391. var errE = xhr.getResponseHeader("Spec-Error");
  392. if(errE) { errstate = errE; }
  393. } catch(exc) { }
  394. progress[INR] = "Err: " + errstate;
  395. }
  396. } catch(ad) { }
  397. }
  398.  
  399. if(k == 0) {
  400. if(WIND.sent) {
  401. WIND.sent = false;
  402. WIND.onbeforeunload = WIND.onunload = null;
  403. try { var C = DOC.getElementById("mainrow").childNodes[2]; C.onclick = null; C[INR] = !WIND.langString || !WIND.langString.ownglu3 ? "Action" : WIND.langString.ownglu3; } catch(esd) { }
  404. }
  405. if(xhr.status == 200) {
  406. var hr = xhr.responseText;
  407. try {
  408. DOC.close();
  409. } catch(df) { }
  410. try {
  411. try {
  412. DOC.open("text/html", "replace");
  413. } catch(dfa) { DOC.open(); }
  414. WIND.fromGetUpload = true;
  415. DOC.write(hr);
  416. DOC.close();
  417. } catch(df) { }
  418. return;
  419. }
  420. WIND.setTimeout(function() { WIND.close(); }, 3000);
  421. }
  422. }
  423. };
  424.  
  425. xhr.open("POST", WIND.action, true);
  426. try {
  427. xhr.setRequestHeader("X-File-Name", "base64" + WIND.jsencode64(encodeURIComponent(String(fullFileName))));
  428. } catch(dx) { }
  429. if(!WIND.sent) {
  430. WIND.sent = true;
  431. try {
  432. var C = DOC.getElementById("mainrow").childNodes[2];
  433. C[INR] = !WIND.langString || !WIND.langString.owngl4 ? "Abort" : WIND.langString.owngl4;
  434. C.onclick = function(s) {
  435. C.onclick = null;
  436. C[INR] = !WIND.langString || !WIND.langString.ownglu3 ? "Action" : WIND.langString.ownglu3;
  437. for(var p in allXhrFiles) {
  438. if(allXhrFiles[p] != UNDEFINED) {
  439. try {
  440. if(allXhrFiles[p][1]) {
  441. allXhrFiles[p][1].onclick = null;
  442. allXhrFiles[p][1][INR] = !WIND.langString || !WIND.langString.owngu3 ? "Aborted" : WIND.langString.owngu3;
  443. }
  444. allXhrFiles[p][0].abort();
  445. } catch(as) { }
  446. }
  447. }
  448. WIND.sent = false;
  449. WIND.onStopProp(s);
  450. return false;
  451. };
  452. } catch(esd) { }
  453. WIND.onbeforeunload = function(e) {
  454. if(WIND.sent) {
  455. return !WIND.langString || !WIND.langString.owngl6 ? "File transfer in progress!" : WIND.langString.owngl6;
  456. }
  457. };
  458. WIND.onunload = function(e) {
  459. if(WIND.sent) {
  460. try {
  461. var C = $("#mainrow")[0].childNodes[2];
  462. if(C && C.onclick) { C.onclick(e); }
  463. } catch(exc) { }
  464. }
  465. };
  466. }
  467. xhr.send(file);
  468. }
  469.  
  470. WIND.DragHover = function(e) {
  471. var mytype;
  472. try {
  473. mytype = e.type;
  474. e.stopPropagation();
  475. e.preventDefault();
  476. } catch(exc) { return false; }
  477. if(DragHoverTimeout) { WIND.clearTimeout(DragHoverTimeout); }
  478. DragHoverTimeout = WIND.setTimeout(function() {
  479. DragHoverTimeout = false;
  480. if(fg) {
  481. if(WIND.sent) {
  482. return;
  483. }
  484. if(mytype == "dragover") {
  485. if(!WIND.beforeFG || fg[INR] != addOwnInner) {
  486. WIND.beforeFG = fg[INR];
  487. }
  488. fg.style.display = "none";
  489. if(allAr) {
  490. allAr.className = "dropFi";
  491. }
  492. } else if(WIND.beforeFG) {
  493. fg.style.display = "";
  494. if(allAr) {
  495. allAr.className = "";
  496. }
  497. }
  498. }
  499. }, 10);
  500. }
  501.  
  502. WIND.ignoreDrag = function(e) {
  503. if(e && e.preventDefault) { e.preventDefault(); }
  504. };
  505.  
  506. WIND.startsWith = function(th, str) {
  507. return str.length > 0 && th.substring(0, str.length) === str;
  508. };
  509.  
  510. var endsWith = WIND.endsWith;
  511. var dirResolving = 0;
  512.  
  513. WIND.SelectHandler = function(e) {
  514. if(e) {
  515. if(e.stopPropagation) { e.stopPropagation(); }
  516. if(e.preventDefault) { e.preventDefault(); }
  517. }
  518. var files, items;
  519. try {
  520. files = e.U_R || e.target.files || e.dataTransfer.files;
  521. items = (e.U_R_I ? e.U_R_I : (e.dataTransfer && e.dataTransfer.items ? e.dataTransfer.items : false));
  522. e.U_R = e.U_R_I = void 0;
  523. } catch(as) { }
  524. var uploadRulesSize = "uploadRulesSize" in e ? e.uploadRulesSize : WIND.uploadRulesSize;
  525. var uploadRulesExt = "uploadRulesExt" in e ? e.uploadRulesExt : WIND.uploadRulesExt;
  526. var uploadRulesAllowExt = "uploadRulesAllowExt" in e ? e.uploadRulesAllowExt : WIND.uploadRulesAllowExt;
  527. var uploadRulesRun = "uploadRulesRun" in e ? e.uploadRulesRun : WIND.uploadRulesRun;
  528. if(fg && WIND.beforeFG) {
  529. fg.style.display = "";
  530. if(allAr) {
  531. allAr.className = "";
  532. }
  533. }
  534. var directories = [], aGE = [ 0, 0 ], dirlen = 0, entry;
  535. dirResolving++;
  536. try {
  537. var name;
  538. for(var i = 0, f; f = files[i]; i++) {
  539. if(!("UPLOADING_" in f)) {
  540. f.UPLOADING_ = true;
  541. var found = false;
  542. if(!("name" in f)) { f.name = f.fileName; if(!("size" in f)) { f.size = f.fileSize; } }
  543. f.nameown = f.name;
  544. if(!found && (uploadRulesSize > 0 || uploadRulesExt.length > 0 || uploadRulesAllowExt.length > 0)) {
  545. if(uploadRulesSize > 0 && f.size > uploadRulesSize) { found = true; if(WIND.console && WIND.console.log) { WIND.console.log("getList size rule exception: " + (f.size - uploadRulesSize)); } }
  546. if(!found) {
  547. var uriLook = (f.nameown + "").toLowerCase();
  548. while(startsWith(uriLook, "\\") || startsWith(uriLook, "/")) { uriLook = uriLook.substring(1); }
  549. if(!endsWith(uriLook, "|")) { uriLook += "|"; }
  550. if(uriLook.length > 1 && !startsWith(uriLook, "|")) { uriLook = "|" + uriLook; }
  551. var allowUpload = true;
  552. if(uploadRulesAllowExt.length > 0) { //should prefer
  553. allowUpload = false;
  554. if(uploadRulesAllowExt.indexOf(uriLook) < 0) {
  555. var bO = uploadRulesAllowExt.split("|");
  556. for(var ii = 0; ii < bO.length; ii += 1) {
  557. if(bO[ii].length < 1) { continue; }
  558. var foundA = false;
  559. while(startsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(1); foundA = true; }
  560. if(!foundA) { bO[ii] = "|" + bO[ii]; }
  561. foundA = false;
  562. while(endsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(0, bO[ii].length - 1); foundA = true; }
  563. if(!foundA) { bO[ii] += "|"; }
  564. if(uriLook.indexOf(bO[ii]) > -1) { allowUpload = true; break; }
  565. }
  566. } else {
  567. allowUpload = true;
  568. }
  569. } else if(uploadRulesExt.indexOf(uriLook) < 0) {
  570. var bO = uploadRulesExt.split("|");
  571. for(var ii = 0; ii < bO.length; ii += 1) {
  572. if(bO[ii].length < 1) { continue; }
  573. var foundA = false;
  574. while(startsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(1); foundA = true; }
  575. if(!foundA) { bO[ii] = "|" + bO[ii]; }
  576. foundA = false;
  577. while(endsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(0, bO[ii].length - 1); foundA = true; }
  578. if(!foundA) { bO[ii] += "|"; }
  579. if(uriLook.indexOf(bO[ii]) > -1) { allowUpload = false; break; }
  580. }
  581. } else {
  582. allowUpload = false;
  583. }
  584.  
  585. if(!allowUpload) {
  586. found = true;
  587. }
  588. }
  589. }
  590.  
  591. try {
  592. var wasDir = false;
  593. if(items && items[i]) {
  594. try { entry = (items[i].webkitGetAsEntry ? items[i].webkitGetAsEntry() : (items[i].getAsEntry ? items[i].getAsEntry() : false)); } catch(abs) { entry = false; }
  595. if(entry && entry.isDirectory && entry.createReader) {
  596. wasDir = true;
  597. directories[dirlen++] = [ entry, entry.name ];
  598. }
  599. }
  600. if(!wasDir) {
  601. if(!found) { aGE[0]++; WIND.UploadMe(f, "", uploadRulesRun); }
  602. else {
  603. aGE[1]++;
  604. if(WIND.console && WIND.console.log) { WIND.console.log("getList extension rule exception: " + f.nameown); }
  605. }
  606. }
  607. } catch(kl) { }
  608. }
  609. }
  610. } catch(fkl) { }
  611. for(var i = 0; i < dirlen; i++) {
  612. try { WIND.uploadDirectory(aGE, directories[i][0], directories[i][1], uploadRulesSize, uploadRulesExt, uploadRulesAllowExt, uploadRulesRun); } catch(kl) { }
  613. }
  614. dirResolving--;
  615. if(!WIND.sent && dirResolving < 1 && aGE[0] == 0 && aGE[1] > 0) { WIND.close(); }
  616. };
  617.  
  618. WIND.uploadDirectory = function(aGE, entry, parentDir, uploadRulesSize, uploadRulesExt, uploadRulesAllowExt, uploadRulesRun) {
  619. var directories = [], dirlen = 0, entry;
  620. var reader = entry.createReader();
  621. dirResolving++;
  622. reader.readEntries(function(entries) {
  623. for(var i = 0; i < entries.length; i++) {
  624. entry = entries[i];
  625. if(entry && entry.isDirectory && entry.createReader) {
  626. directories[dirlen++] = [ entry, entry.name ];
  627. } else if(entry.file) { //fetch file
  628. entry.file(function(f) {
  629. try {
  630. var found = false;
  631. if(!("name" in f)) { f.name = f.fileName; if(!("size" in f)) { f.size = f.fileSize; } }
  632. f.nameown = f.name;
  633. if(!found && (uploadRulesSize > 0 || uploadRulesExt.length > 0 || uploadRulesAllowExt.length > 0)) {
  634. if(uploadRulesSize > 0 && f.size > uploadRulesSize) { found = true; if(WIND.console && WIND.console.log) { WIND.console.log("getList size rule exception: " + (f.size - uploadRulesSize)); } }
  635. if(!found) {
  636. var uriLook = (f.nameown + "").toLowerCase();
  637. while(startsWith(uriLook, "\\") || startsWith(uriLook, "/")) { uriLook = uriLook.substring(1); }
  638. if(!endsWith(uriLook, "|")) { uriLook += "|"; }
  639. if(uriLook.length > 1 && !startsWith(uriLook, "|")) { uriLook = "|" + uriLook; }
  640. var allowUpload = true;
  641. if(uploadRulesAllowExt.length > 0) { //should prefer
  642. allowUpload = false;
  643. if(uploadRulesAllowExt.indexOf(uriLook) < 0) {
  644. var bO = uploadRulesAllowExt.split("|");
  645. for(var ii = 0; ii < bO.length; ii += 1) {
  646. if(bO[ii].length < 1) { continue; }
  647. var foundA = false;
  648. while(startsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(1); foundA = true; }
  649. if(!foundA) { bO[ii] = "|" + bO[ii]; }
  650. foundA = false;
  651. while(endsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(0, bO[ii].length - 1); foundA = true; }
  652. if(!foundA) { bO[ii] += "|"; }
  653. if(uriLook.indexOf(bO[ii]) > -1) { allowUpload = true; break; }
  654. }
  655. } else {
  656. allowUpload = true;
  657. }
  658. } else if(uploadRulesExt.indexOf(uriLook) < 0) {
  659. var bO = uploadRulesExt.split("|");
  660. for(var ii = 0; ii < bO.length; ii += 1) {
  661. if(bO[ii].length < 1) { continue; }
  662. var foundA = false;
  663. while(startsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(1); foundA = true; }
  664. if(!foundA) { bO[ii] = "|" + bO[ii]; }
  665. foundA = false;
  666. while(endsWith(bO[ii], "*")) { bO[ii] = bO[ii].substring(0, bO[ii].length - 1); foundA = true; }
  667. if(!foundA) { bO[ii] += "|"; }
  668. if(uriLook.indexOf(bO[ii]) > -1) { allowUpload = false; break; }
  669. }
  670. } else {
  671. allowUpload = false;
  672. }
  673.  
  674. if(!allowUpload) {
  675. found = true;
  676. if(WIND.console && WIND.console.log) { WIND.console.log("getList extension rule exception: " + f.nameown); }
  677. }
  678. }
  679. }
  680.  
  681. if(!found) { aGE[0]++; WIND.UploadMe(f, parentDir + "/", uploadRulesRun); } else { aGE[1]++; }
  682. } catch(ex) { }
  683. }, function(er) { });
  684. }
  685. }
  686. for(var i = 0; i < dirlen; i++) {
  687. try { WIND.uploadDirectory(aGE, directories[i][0], parentDir + "/" + directories[i][1], uploadRulesSize, uploadRulesExt, uploadRulesAllowExt, uploadRulesRun); } catch(kl) { }
  688. }
  689. dirResolving--;
  690. if(!WIND.sent && dirResolving < 1 && aGE[0] == 0 && aGE[1] > 0) { WIND.close(); }
  691. }, function(err) { });
  692. };
  693.  
  694. WIND.MySelectHandler = SelectHandler;
  695. var myExtRuleClean = WIND.myUploadExtRule(WIND.uploadRulesAllowExt);
  696. var forma = DOC.getElementById("forform");
  697. var fortxt = "<br><br><fo"+"rm id=\"frm1\" ac"+"tion=\"" + WIND.action + "\" method=\"post\" enctype=\"multipart/form-data\">";
  698. fortxt += "&nbsp;<input id=\"file\" style=\"position:absolute;left:-9999px;\" onchange=\"window.setme();window.clearValue(this);\" type=\"file\" " + (myExtRuleClean && myExtRuleClean.length > 0 ? "accept=\"" + myExtRuleClean + "\" " : "") + "name=\"file[]\" multiple />";
  699. fortxt += "<input id=\"mysubmit\" style=\"position:absolute;left:-9999px;\" type=\"button\" onmousedown=\"window.formSubmit(true);\" value=\"SEND\" />";
  700. fortxt += "</form><br><br><br><br><br><br><br><br><br><br>";
  701.  
  702. if(WIND.File && WIND.FileList && WIND.FileReader) {
  703. try {
  704. WIND.myxhr = new WIND.XMLHttpRequest();
  705. var filedrag = allAr;
  706.  
  707. if(filedrag && WIND.myxhr.upload) {
  708. fortxt = "<br><br><fo"+"rm id=\"frm1\" act"+"ion=\"" + WIND.action + "\" method=\"post\" enctype=\"multipart/form-data\">";
  709. fortxt += "&nbsp;<input id=\"file\" style=\"position:absolute;left:-9999px;\" onchange=\"window.MySelectHandler(event);window.clearValue(this);\" type=\"file\" " + (myExtRuleClean && myExtRuleClean.length > 0 ? "accept=\"" + myExtRuleClean + "\" " : "") + "name=\"file[]\" multiple />";
  710. fortxt += "</form><br><br><br><br><br><br><br><br><br><br>";
  711. WIND.ondragleave = WIND.ondrop = WIND.dragenter = WIND.ondragover = null;
  712. WIND.addEventListener("dragleave", DragHover, false);
  713. WIND.addEventListener("drop", SelectHandler, false);
  714. WIND.addEventListener("dragenter", ignoreDrag, false);
  715. WIND.addEventListener("dragover", function(a) { try { var effect = a.dataTransfer.effectAllowed; a.dataTransfer.dropEffect = ("move" === effect || "linkMove" === effect ? "move" : "copy"); } catch(asd) { } }, false);
  716. WIND.addEventListener("dragover", DragHover, false);
  717.  
  718. WIND.onblur = function() {
  719. if(WIND.fg) {
  720. WIND.fg.style.display = "";
  721. if(WIND.allAr) {
  722. WIND.allAr.className = "";
  723. }
  724. }
  725. }
  726. WIND.blur = WIND.onblur;
  727. WIND.onmouseout = WIND.onblur;
  728. }
  729. } catch(xn) { }
  730. }
  731.  
  732. if(forma) {
  733. try {
  734. forma[INR] = fortxt;
  735. } catch(d) {
  736. try {
  737. var trA = $(fortxt);
  738. if(trA && trA.length) {
  739. for(var ii = 0; ii < trA.length; ii += 1) {
  740. content.appendChild(trA[ii]);
  741. }
  742. }
  743. } catch(exc2) { }
  744. }
  745. try { DOC.getElementById("file").onclick = WIND.onStopProp; } catch(d) { }
  746. }
  747.  
  748. WIND.setTimeout(function() {
  749. var pr = false;
  750. try {
  751. if(WIND[OPR] && WIND[OPR].W) {
  752. pr = WIND[OPR];
  753. }
  754. } catch(ex) { pr = false; }
  755. if(!pr) { return; }
  756.  
  757. WIND.setInterval(function() {
  758. try {
  759. if(!WIND.sent) {
  760. if(!pr || pr.closed) {
  761. self.close();
  762. }
  763. }
  764. } catch(exc) { }
  765. }, 5000);
  766. }, 5000);
  767. };
  768.  
  769. WIND.loadme = function(from) {
  770. if(WIND.iefor) { //on ie6-8 click on divfile does not work
  771. try { DOC.getElementById("file").style.left = ""; } catch (d) { return; }
  772. } else {
  773. try { DOC.getElementById("divfile").style.display = ""; } catch (d) { return; }
  774. }
  775.  
  776. if(from == 0) { return false; }
  777. WIND.lastClickType = from;
  778.  
  779. var filed = DOC.getElementById("file");
  780.  
  781. try {
  782. filed.focus();
  783. filed.click();
  784. } catch(d) { }
  785. };
  786.  
  787. WIND.setme = function() {
  788. var text = DOC.getElementById("file").value;
  789. if(text.length > 0) {
  790. text = text.replace("C:\\fakepath\\", "");
  791. try { DOC.getElementById("divfile")[INR] = text; } catch(d) { return; }
  792. WIND.formSubmit(false);
  793. }
  794. };
  795.  
  796. WIND.clearValue = function(a) {
  797. if(!a) { a = DOC.getElementById("file"); }
  798. if(a) { try { a.value = ""; } catch(exc) { } }
  799. };
  800.  
  801. WIND.onsubme = function() {
  802. DOC.getElementById("divup").style.display = "";
  803. };
  804.  
  805. WIND.formSubmit = function(from) {
  806. try {
  807. if(DOC.getElementById("file").value.length < 1) {
  808. return;
  809. }
  810. if(!WIND.sent) {
  811. WIND.onsubme();
  812. DOC.getElementById("frm1").submit();
  813. WIND.sent = true;
  814. }
  815. } catch (e) {
  816. if(DOC.getElementById("mysubmit") != null) {
  817. DOC.getElementById("mysubmit").style.left = "";
  818. }
  819. if(from) {
  820. WIND.formSubmit(false);
  821. }
  822. }
  823. };
  824.  
  825. WIND.sendFinishUpload = function(a, f, d, u) {
  826. try {
  827. if(WIND[OPR] && WIND[OPR].W) {
  828. WIND[OPR].W.sendFinishUpload(a, f, WIND.allFilesNumber, d, u);
  829. }
  830. } catch(e) { }
  831. };
  832. })();
  833. </script>
  834. </head>
  835.  
  836. <body onload="window.firstload();window.loadme(0);">
  837. <div id="allArea">
  838. <br>
  839. <div id="fileTransfer">
  840. <div id="divfile" style="text-align:center;display:none;">
  841. <a id="owngu1" draggable="false" href="#" class="uploadButton">Click here to select your file!</a>
  842. </div>
  843. <div id="divup" style="text-align:center;display:none;">
  844. <p id="owngu2" style="line-height: 24px;">Uploading file, please wait..</p>
  845. </div>
  846. </div>
  847. <div id="forform" style="text-align:left;"></div>
  848. </div>
  849. <div id="allErr" style="text-align:center;display:none;"></div>
  850. </body>
  851.  
  852. </html>
Add Comment
Please, Sign In to add comment