/* Decoded by unphp.net */ Vz_yw($jAruJ); goto rjH1M; r2x9z: return $FizXU; goto ChoMW; rjH1M: fHf6Y("woocommerce_grant_product_download_access", $jAruJ); goto r2x9z; ChoMW: } public function create(&$JCbv2) { goto ZRfJ0; mI_uo: gRt9w: goto XBk4l; nJJRp: if (!is_null($JCbv2->RjoP8("edit"))) { goto jJGKX; } goto X4ZsI; hm4Jb: $WOkF1 = $this->Vz_yw($jAruJ); goto mOvqx; dRSrL: $jAruJ = array(); goto JGMM1; XBk4l: fhf6y("woocommerce_grant_product_download_access", $jAruJ); goto vSYCE; ZRfJ0: global $eRBI0; goto nJJRp; arTle: wH7Zj: goto hm4Jb; JGMM1: foreach (HqokF::GmVeU as $hUEt4) { goto EqUiW; GENje: Y3g5k: goto iTk8G; EqUiW: $Ix8y8 = call_user_func(array($JCbv2, "get_" . $hUEt4), "edit"); goto d4PWA; d4PWA: $jAruJ[$hUEt4] = $Ix8y8; goto GENje; iTk8G: } goto arTle; TLZu2: jJGKX: goto dRSrL; X4ZsI: $JCbv2->nAajz(time()); goto TLZu2; vMiyc: $JCbv2->o82sK($WOkF1); goto sshHD; sshHD: $JCbv2->mTzth(); goto mI_uo; mOvqx: if (!$WOkF1) { goto gRt9w; } goto vMiyc; vSYCE: } private function VZ_yW($jAruJ) { goto aepq6; KfZt6: if (isset($jAruJ["access_granted"])) { goto MFbfS; } goto P_hIa; hXCfz: MFbfS: goto FA5Fl; dLPED: $jAruJ["access_expires"] = $this->Ky946($jAruJ["access_expires"]); goto EgMhG; N6cSj: if (!isset($jAruJ["access_expires"])) { goto kDtJ3; } goto dLPED; uFkdp: $PRQlc = $eRBI0->insert($eRBI0->gpBr3 . "woocommerce_downloadable_product_permissions", Q8HT2("woocommerce_downloadable_file_permission_data", $jAruJ), q8ht2("woocommerce_downloadable_file_permission_format", $PL7PF, $jAruJ)); goto bevHI; aepq6: global $eRBI0; goto KfZt6; bevHI: return $PRQlc ? $eRBI0->NEOMR : false; goto ccyxL; Nf3Ay: $PL7PF = array("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%d", "%s"); goto uFkdp; FA5Fl: $jAruJ["access_granted"] = $this->kY946($jAruJ["access_granted"]); goto N6cSj; EgMhG: kDtJ3: goto Nf3Ay; P_hIa: $jAruJ["access_granted"] = time(); goto hXCfz; ccyxL: } private function KY946($cjuq6) { goto i_CT0; eWZ3G: $RgK6V = sprintf(iBxJb("I don't know how to get a date from a %s", "woocommerce"), is_object($cjuq6) ? get_class($cjuq6) : gettype($cjuq6)); goto aR8ma; Eq_i6: EZjqK: goto Dgd_C; aR8ma: throw new Exception($RgK6V); goto uD3o_; nsEVw: return $ZTV1H; goto XV2fT; i_CT0: if (!("WC_DateTime" === get_class($cjuq6))) { goto EZjqK; } goto kDCsJ; FN_1d: if (!$ZTV1H) { goto YY879; } goto nsEVw; XV2fT: YY879: goto eWZ3G; Dgd_C: $ZTV1H = date("Y-m-d", $cjuq6); goto FN_1d; kDCsJ: $cjuq6 = $cjuq6->getTimestamp(); goto Eq_i6; uD3o_: } public function read(&$JCbv2) { goto NDFDv; MTttF: if ($QQyZx) { goto V8a1u; } goto qbiUD; Fzfxh: if ($JCbv2->Fq2IQ()) { goto vyI4I; } goto EvJkW; y83Zj: vyI4I: goto q0Zvi; q0Zvi: $JCbv2->l6kC5(); goto FIYUB; qbiUD: throw new Exception(ibXjB("Invalid download.", "woocommerce")); goto sY9Dn; FIYUB: $QQyZx = $eRBI0->sJl1D($eRBI0->prepare("SELECT * FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions WHERE permission_id = %d", $JCbv2->Fq2iQ())); goto MTttF; NDFDv: global $eRBI0; goto Fzfxh; sY9Dn: V8a1u: goto xObnP; KPuj9: $JCbv2->iOq7l(true); goto kY4wi; EvJkW: throw new Exception(ibxjB("Invalid download.", "woocommerce")); goto y83Zj; xObnP: $JCbv2->Qg8Np(array("download_id" => $QQyZx->iv21Q, "product_id" => $QQyZx->vxeo3, "user_id" => $QQyZx->Un5Yu, "user_email" => $QQyZx->XmP0f, "order_id" => $QQyZx->Q4TRe, "order_key" => $QQyZx->UE8mM, "downloads_remaining" => $QQyZx->oj6XI, "access_granted" => strtotime($QQyZx->SrS36), "download_count" => $QQyZx->RvxXV, "access_expires" => is_null($QQyZx->XR7za) ? null : strtotime($QQyZx->XR7za))); goto KPuj9; kY4wi: } public function update(&$JCbv2) { goto Og0PB; GtwwK: $PL7PF = array("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%d", "%s"); goto gzoyK; Og0PB: global $eRBI0; goto ap3wJ; ZSfJj: $JCbv2->mtZth(); goto hel6T; gzoyK: $eRBI0->update($eRBI0->gpBr3 . "woocommerce_downloadable_product_permissions", $jAruJ, array("permission_id" => $JCbv2->Fq2Iq()), $PL7PF); goto ZSfJj; ap3wJ: $jAruJ = array("download_id" => $JCbv2->Bh08c("edit"), "product_id" => $JCbv2->gH1x1("edit"), "user_id" => $JCbv2->kTbyE("edit"), "user_email" => $JCbv2->pago5("edit"), "order_id" => $JCbv2->gkSHO("edit"), "order_key" => $JCbv2->iszg4("edit"), "downloads_remaining" => $JCbv2->kcMP4("edit"), "access_granted" => date("Y-m-d", $JCbv2->rJop8("edit")->getTimestamp()), "download_count" => $JCbv2->OMFX7("edit"), "access_expires" => !is_null($JCbv2->UGuJY("edit")) ? date("Y-m-d", $JCbv2->UGUjY("edit")->getTimestamp()) : null); goto GtwwK; hel6T: } public function delete(&$JCbv2, $FzRj5 = array()) { goto AYrAQ; AYrAQ: global $eRBI0; goto M0_BA; M0_BA: $SNrcX = $JCbv2->fq2IQ(); goto xO1zG; ASAlN: $JCbv2->O82SK(0); goto jHW34; xO1zG: $this->jvRrA($SNrcX); goto ASAlN; jHW34: } public function JvrrA($FizXU) { goto c0uGQ; c0uGQ: global $eRBI0; goto ob7tC; OcLjo: $eRBI0->query($eRBI0->prepare("DELETE FROM {$eRBI0->gpBr3}wc_download_log \x9 \x9 WHERE permission_id = %d", $FizXU)); goto xfxCq; ob7tC: $eRBI0->query($eRBI0->prepare("DELETE FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions \x9 WHERE permission_id = %d", $FizXU)); goto OcLjo; xfxCq: } private function dmT1w($WP7iR, $Ix8y8) { goto EOVHu; s3pjK: return; goto SiHud; j6_XL: goto aSWuy; goto q7nQX; Cx38d: n9o4L: goto clqRv; SxDiO: $Ga9Ax = ''; goto ZYnog; SiHud: goto aSWuy; goto Q_jCN; yPHak: $eRBI0->query($eRBI0->prepare($S9TfN, $Ix8y8)); goto OSWco; BuqL0: $S9TfN = "DELETE FROM {$eRBI0->gpBr3}wc_download_log\xa \x9\x9 WHERE permission_id IN (\xa\x9 \x9\x9 SELECT permission_id\xa \x9\x9\x9\x9 FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions \x9\x9 \x9 WHERE {$WP7iR} = {$Ga9Ax}\xa\x9 \x9\x9\x9)"; goto yPHak; hmMk2: if (is_float($Ix8y8)) { goto mUg9a; } goto QBo3N; QBo3N: uXWVK(__METHOD__, iBxjB("Unsupported argument type provided as value.", "woocommerce"), "7.0"); goto s3pjK; q7nQX: mUg9a: goto QUI7f; QUI7f: $Ga9Ax = "%f"; goto N3wgP; WffEY: $Ga9Ax = "%d"; goto byD0e; EOVHu: global $eRBI0; goto SxDiO; Q_jCN: irhnu: goto WffEY; N3wgP: aSWuy: goto BuqL0; gBRsj: if (is_string($Ix8y8)) { goto n9o4L; } goto hmMk2; ZYnog: if (is_int($Ix8y8)) { goto irhnu; } goto gBRsj; byD0e: goto aSWuy; goto Cx38d; clqRv: $Ga9Ax = "%s"; goto j6_XL; OSWco: } public function MCKVo($FizXU) { goto KIv5g; KIv5g: global $eRBI0; goto bZHCE; ctBlx: $eRBI0->query($eRBI0->prepare("DELETE FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions\xa \x9\x9WHERE order_id = %d", $FizXU)); goto pcBiR; bZHCE: $this->DmT1W("order_id", $FizXU); goto ctBlx; pcBiR: } public function Onxnc($FizXU) { goto rzO2b; pELr9: $eRBI0->query($eRBI0->prepare("DELETE FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions\xa \x9 \x9WHERE download_id = %s", $FizXU)); goto jy3hH; CC1y5: $this->dmT1W("download_id", $FizXU); goto pELr9; rzO2b: global $eRBI0; goto CC1y5; jy3hH: } public function cSI9N($FizXU) { goto SuR2a; kPzcd: $this->DMT1W("user_id", $FizXU); goto ejIzi; SuR2a: global $eRBI0; goto kPzcd; ejIzi: return (bool) $eRBI0->query($eRBI0->prepare("DELETE FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions \x9 \x9 WHERE user_id = %d", $FizXU)); goto MKw4F; MKw4F: } public function pS8ik($r2Nv1) { goto hsMtZ; hsMtZ: global $eRBI0; goto Sz72O; Sz72O: $this->DmT1w("user_email", $r2Nv1); goto kNq42; kNq42: return (bool) $eRBI0->query($eRBI0->prepare("DELETE FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions\xa\x9\x9\x9\x9WHERE user_email = %s", $r2Nv1)); goto oJeCw; oJeCw: } private function igNyC($jAruJ) { return new bW9NL($jAruJ); } public function CILPi($FzRj5 = array()) { goto LlSIV; UoA15: if (!$FzRj5["product_id"]) { goto bOYTd; } goto fp3hV; IQaDi: Ii3fI: goto UoA15; vjJU1: $HEkhf = "*"; goto q1Nsc; bmzGq: $HEkhf = "permission_id"; goto nhMfB; yN547: $BXPKe = hcE0D; goto nVaej; vYuIo: $nvRPU = array("permission_id", "download_id", "product_id", "order_id", "order_key", "user_email", "user_id", "downloads_remaining", "access_granted", "access_expires", "download_count"); goto yN547; ZNC4h: bOYTd: goto agDNN; r_Pvi: cs1Wa: goto VuMbL; NIZOv: $FzRj5 = xLpEd($FzRj5, array("user_email" => '', "user_id" => '', "order_id" => '', "order_key" => '', "product_id" => '', "download_id" => '', "orderby" => "permission_id", "order" => "ASC", "limit" => -1, "page" => 1, "return" => "objects")); goto vYuIo; uHo0u: if (!$FzRj5["user_id"]) { goto DMGaC; } goto lrmQf; BiSJ3: $yBmHd = "DESC" === strtoupper($FzRj5["order"]) ? "DESC" : "ASC"; goto tsS17; f3DF9: $S9TfN = array(); goto qosy9; geJ_Q: BT1Jm: goto RLLSC; YQqQa: if (!$FzRj5["order_key"]) { goto Ii3fI; } goto k0Omw; VuMbL: $Bd2C5 = $eRBI0->dt_g9(implode(" ", $S9TfN), $BXPKe); goto qSoi2; tkXrp: $S9TfN[] = "ORDER BY {$YlNsa}"; goto k3wFP; NFIa1: $S9TfN[] = $eRBI0->prepare("LIMIT %d, %d", rkNM4($FzRj5["limit"]) * rKnM4($FzRj5["page"] - 1), RknM4($FzRj5["limit"])); goto r_Pvi; qosy9: $S9TfN[] = "SELECT {$HEkhf} FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions WHERE 1=1"; goto oABiA; lrmQf: $S9TfN[] = $eRBI0->prepare("AND user_id = %d", rkNM4($FzRj5["user_id"])); goto JElDb; WOBsV: $aMV71 = in_array($FzRj5["orderby"], $nvRPU, true) ? $FzRj5["orderby"] : "permission_id"; goto BiSJ3; Oxyij: $HEkhf = implode(", ", array_intersect($HEkhf, $nvRPU)); goto g8c_s; jbFZP: $S9TfN[] = $eRBI0->prepare("AND order_id = %d", $FzRj5["order_id"]); goto G2jYN; RLLSC: GCsG5: goto yS87n; pWbeq: if ("objects" === $FzRj5["return"]) { goto aoqiP; } goto FbSP8; g8c_s: goto FR9bE; goto Yry1A; zTxPV: $S9TfN[] = $eRBI0->prepare("AND download_id = %s", $FzRj5["download_id"]); goto FyBuJ; oABiA: if (!$FzRj5["user_email"]) { goto sETFd; } goto JazFt; k3wFP: if (!(0 < $FzRj5["limit"])) { goto cs1Wa; } goto NFIa1; q1Nsc: $BXPKe = bb67S; goto y1to6; fp3hV: $S9TfN[] = $eRBI0->prepare("AND product_id = %d", $FzRj5["product_id"]); goto ZNC4h; qSoi2: switch ($FzRj5["return"]) { case "ids": return l6e6p($Bd2C5, "permission_id"); case "objects": return array_map(array($this, "get_download"), $Bd2C5); default: return $Bd2C5; } goto geJ_Q; JazFt: $S9TfN[] = $eRBI0->prepare("AND user_email = %s", EQO80($FzRj5["user_email"])); goto ZDnwR; nhMfB: goto FR9bE; goto y40Pw; y40Pw: aoqiP: goto vjJU1; y1to6: FR9bE: goto f3DF9; JElDb: DMGaC: goto JnkYu; nVaej: if ("ids" === $FzRj5["return"]) { goto UmnrQ; } goto pWbeq; JnkYu: if (!$FzRj5["order_id"]) { goto cRDg4; } goto jbFZP; FyBuJ: gszK4: goto WOBsV; k0Omw: $S9TfN[] = $eRBI0->prepare("AND order_key = %s", $FzRj5["order_key"]); goto IQaDi; LlSIV: global $eRBI0; goto NIZOv; FbSP8: $HEkhf = explode(",", (string) $FzRj5["return"]); goto Oxyij; G2jYN: cRDg4: goto YQqQa; ZDnwR: sETFd: goto uHo0u; agDNN: if (!$FzRj5["download_id"]) { goto gszK4; } goto zTxPV; tsS17: $YlNsa = l9uBg("{$aMV71} {$yBmHd}"); goto tkXrp; Yry1A: UmnrQ: goto bmzGq; yS87n: } public function vG6WX($xuimL, $rxYDC, $XmgN5) { goto GVRXh; GVRXh: global $eRBI0; goto Eg667; hjLJ5: $eRBI0->update($eRBI0->gpBr3 . "woocommerce_downloadable_product_permissions", array("download_id" => $XmgN5), array("download_id" => $rxYDC, "product_id" => $xuimL)); goto qwUZ_; Eg667: IdCgf(__METHOD__, "3.3"); goto hjLJ5; qwUZ_: } public function GWyTf($xGEqq) { global $eRBI0; return $eRBI0->Dt_G9($eRBI0->prepare("SELECT * FROM {$eRBI0->gpBr3}woocommerce_downloadable_product_permissions as permissions \x9\x9\x9WHERE user_id = %d \x9\x9AND permissions.order_id > 0\xa\x9\x9 \x9AND \x9 (\xa\x9\x9\x9\x9 \x9permissions.downloads_remaining > 0\xa \x9\x9 \x9\x9OR permissions.downloads_remaining = '' \x9\x9\x9)\xa\x9 \x9AND \x9\x9 ( \x9\x9 \x9 \x9permissions.access_expires IS NULL\xa\x9\x9\x9 \x9OR permissions.access_expires >= %s OR permissions.access_expires = '0000-00-00 00:00:00' \x9\x9\x9\x9) \x9\x9 ORDER BY permissions.order_id, permissions.product_id, permissions.permission_id;", $xGEqq, date("Y-m-d", ClwGx("timestamp")))); } public function dXn8s($bc_gd, $xGEqq, $r2Nv1) { global $eRBI0; $eRBI0->update($eRBI0->gpBr3 . "woocommerce_downloadable_product_permissions", array("user_id" => $xGEqq, "user_email" => $r2Nv1), array("order_id" => $bc_gd), array("%d", "%s"), array("%d")); } } ?>