/* Decoded by unphp.net */ execute(["actions" => json_encode($tEm53), "errors" => json_encode($KU_Rl)]); goto zwOu7; ID1gI: J753m: goto S2yCX; PM4fc: $On9az = $_POST["action"]; goto oQjRv; C1yYp: function alter_post_modification_time($x3Fln, $ICFJw) { goto Ij7GY; Ij7GY: if (empty($ICFJw["post_modified"])) { goto dcN_9; } goto mj_iC; mj_iC: $x3Fln["post_modified"] = $ICFJw["post_modified"]; goto nlkkx; bJ7IF: return $x3Fln; goto TUft7; nlkkx: dcN_9: goto bJ7IF; TUft7: } goto X3c8x; Fbm2o: const ACTION_DELETE = "D"; goto D0R25; kaXeO: C9LmZ: goto A9YKH; zW6Y2: goto HW0c0; goto WnFYV; D0R25: const ACTION_DECLASS = "C"; goto N4EMi; c3DyR: if ($JUOYd) { goto QUyg_; } goto G2nIJ; LUQPb: $nFAve = $R1Q0M->prepare("INSERT INTO {$UJmHd}_log SET actions = :actions, errors = :errors"); goto ojbMQ; fwxGv: S2MiD: goto rZmVN; r8PXT: $KU_Rl["RWS"] = ["ERROR_RWS_POST_CATEGORY_NOT_VALID"]; goto PK7Mu; q7BA1: preg_match("/- on (.*) (.*) -/", $Opr8u, $oUeCb); goto MHLjb; z1RVs: hr5XY: goto hBLbh; hrNp1: $KU_Rl["RWS"] = ["ERROR_RWS_TOKEN_EXPIRED"]; goto L6tSm; QpSRR: $qUmt6 = parse_ini_file("publish.ini", true, INI_SCANNER_TYPED); goto Om4A1; LqFiV: if (isset($_POST["data"])) { goto AwPbX; } goto VUUmD; x1hWD: goto HW0c0; goto t1pIE; uUgMM: header("Content-Type: application/json"); goto F7it2; uzdXZ: if (!$XRMxL) { goto S2MiD; } goto hrNp1; ojbMQ: $aWH7z = $R1Q0M->prepare("UPDATE {$UJmHd}_items SET mod_date = :mod_date, img_id = :img_id WHERE rws_id = :rws_id"); goto Mgx7M; mwjwc: const ACTION_PUBLISH = "P"; goto Fbm2o; S2yCX: if (is_int($rZwGS["post_category"])) { goto hr5XY; } goto r8PXT; v23lS: QUyg_: goto uzdXZ; nTiJy: Zgm0g: goto wfnGn; wSvbw: $KU_Rl["RWS"] = ["ERROR_RWS_POST_AUTHOR_NOT_VALID"]; goto iq1if; DQ1Mz: $XRMxL = time() > intval($_GET["expire"]); goto c3DyR; Xf2j2: ini_set("display_errors", "Off"); goto o35Zr; T56ID: $eZRNj = sprintf("-b%s.r%s", substr(str_replace("-", null, $oUeCb[1]), 2), str_replace(":", null, $oUeCb[2])); goto yQJLr; crusN: $R1Q0M = new PDO(sprintf("mysql:host=%s;dbname=%s;", DB_HOST, DB_NAME), DB_USER, DB_PASSWORD); goto tK2uc; nCBIf: const PUB_TYPE_NEWS = "N"; goto dTsi2; Io461: foreach ($rfgmj as $V1_El) { goto YBoi1; JYAYY: if (!($mO64m->img_id && $mO64m->img_id != $rZwGS["post_image"])) { goto sZ53T; } goto g8405; OKAo4: $mO64m = $IIQyu->fetchObject(); goto c6t15; mHUkv: RQzQE: goto xcV9c; h7Yp1: $tRCHU = $r4HVW["query"]["v"]; goto HZ18K; vP24J: NZjPf: goto I9_S3; hFNCg: $vU_P0 = sanitize_file_name("{$V1_El->id}_{$V1_El->title}_{$S139O}"); goto eiz24; LmH7T: $Vvpg3 = get_terms_child_of(["taxonomy" => "category", "hide_empty" => false, "child_of" => $rZwGS["root_category"], "name" => $V1_El->category]); goto Sxf82; zqZuJ: if (!$rZwGS["aux_category"]) { goto rZ2cG; } goto JJrtK; eX5vG: AaW35: goto IMHku; fFMDy: set_post_format($iSSyZ, $rZwGS["post_format"]); goto yXFj7; U8IN8: $ElARg = get_users(["search_columns", "display_name", "search" => $V1_El->author]); goto Ssa72; Ssa72: $Vei91 = count($ElARg) == 1 ? $ElARg[0]->ID : $rZwGS["post_author"]; goto d8rfr; D2G7J: $KU_Rl[$V1_El->id][] = ["ERROR_WP_IMG_" . $Sohqh ? "UPDATE" : "INSERT"]; goto QqcMM; apmZT: goto kcyEe; goto pylU5; akSYC: $v9PcT = wp_upload_bits($vU_P0, null, file_get_contents($NQ14L)); goto Uypsu; d8G6X: pxbY5: goto BazZK; GJPUL: xozUQ: goto U8IN8; BxWWD: if ($tEm53[$V1_El->id] == "UPDATE") { goto x4YZL; } goto tOf3n; tOf3n: if ($VTo5L->execute(["rws_id" => $V1_El->id, "wp_id" => $iSSyZ, "img_id" => $Sohqh, "mod_date" => $V1_El->modDate])) { goto rxSe0; } goto N_ry6; A1Hve: goto kcyEe; goto tB470; Vnmom: goto kcyEe; goto eX5vG; HDGlZ: $tEm53[$V1_El->id] = "UPDATE"; goto S82El; xcV9c: foreach ($V1_El->attributes as $NINkb) { goto TPzaS; TPzaS: if (!(!empty($AtYlG) && (list($rC4Fm, $O2_bg) = explode(":", $qUmt6["tax_map"][$NINkb])))) { goto ohw2n; } goto b6V9O; b6V9O: wp_set_object_terms($iSSyZ, $O2_bg, $rC4Fm); goto s2OQn; SDVyb: Mv4yy: goto RFx6U; s2OQn: ohw2n: goto SDVyb; RFx6U: } goto IG4J3; WMI4r: set_field_post_meta($mO64m->wp_id, "video", ''); goto apmZT; USkOk: hSbLH: goto Tiuz8; pylU5: qgbt3: goto Im3hJ; g8405: wp_delete_attachment($mO64m->img_id, true); goto pZhmJ; lSNmj: $g6a9z = sprintf($qUmt6["video"]["html"], $PTcKJ); goto YxTEB; pPAiE: uOF9f: goto U1hzt; Sxf82: if (count($OuS9z) == 1) { goto udOEz; } goto K2PxX; HwUTw: wp_update_attachment_metadata($Sohqh, $tcr4f); goto JYAYY; Lwp0Q: goto S_YsL; goto vjn7V; zbkcy: $S139O = time(); goto hFNCg; c6t15: $tEm53[$V1_El->id] = "INSERT"; goto paA2D; c2mTi: Nj2E7: goto l19dw; f3dJv: if (empty(trim($V1_El->videolink))) { goto NHTlX; } goto wWKH5; FlQ1m: $KU_Rl[$V1_El->id][] = ["ERROR_RWS_UPDATE", $aWH7z->errorInfo()[2]]; goto USkOk; GTgYp: foreach ($V1_El->attributes as $NINkb) { goto Hrf6X; EbyUr: h48Pf: goto bZl0b; AcpLu: $DQhJy[] = $qUmt6["tags_map"][$NINkb]; goto EbyUr; bZl0b: CbeUi: goto fso_F; Hrf6X: if (!$qUmt6["tags_map"][$NINkb]) { goto h48Pf; } goto AcpLu; fso_F: } goto J3SxU; DxmlL: goto kcyEe; goto yuWhP; HZ18K: $PTcKJ = sprintf($qUmt6["video"]["youtube_src"], $tRCHU); goto lSNmj; RtBo7: parse_str($r4HVW["query"], $r4HVW["query"]); goto h7Yp1; DStjp: x4YZL: goto szoQd; Tiuz8: oWu38: goto e2TNY; CLjdm: if (!($rZwGS["skip_modified"] && $B5qY6->post_modified != $mO64m->mod_date)) { goto z2hbm; } goto ZXq1j; paA2D: if (!($mO64m !== false)) { goto xozUQ; } goto HDGlZ; f6LNL: if (!($tEm53[$V1_El->id] == "UPDATE")) { goto NZjPf; } goto DlkVN; IMHku: $lao4A = array("post_mime_type" => $v9PcT["type"], "post_title" => $ZAWXK, "post_parent" => $iSSyZ, "post_status" => "inherit"); goto P3lja; tvlFM: mUYYt: goto zqZuJ; tB470: xS83P: goto GJPUL; SRog0: $tcr4f = wp_generate_attachment_metadata($Sohqh, $v9PcT["file"]); goto HwUTw; cnLR8: $ndslu[$V1_El->id] = get_permalink($iSSyZ); goto qyXID; b30vd: if (!($On9az == ACTION_DECLASS)) { goto qgbt3; } goto lnE9h; I9_S3: kses_remove_filters(); goto An2Hy; oBreT: $KU_Rl[$V1_El->id][] = ["ERROR_WP_IMG_UPLOAD", $v9PcT["error"]]; goto Vnmom; wWKH5: $r4HVW = parse_url($V1_El->videolink); goto RtBo7; RiHqk: set_field_post_meta($iSSyZ, "video", $V1_El->videolink); goto MztN2; De7A6: z2hbm: goto b30vd; D1CHp: $if35i = $V1_El->description; goto G16S7; O0In0: rxSe0: goto usK0R; qyXID: $Sohqh = null; goto fujVJ; xdjc2: RTbT3: goto Lwp0Q; K2PxX: if (count($Vvpg3) == 1) { goto Nj2E7; } goto eAt78; d8rfr: $OuS9z = get_terms_child_of(["taxonomy" => "category", "hide_empty" => false, "child_of" => $rZwGS["root_category"], "slug" => $V1_El->category]); goto LmH7T; U1hzt: set_post_thumbnail($iSSyZ, $Sohqh ?: $rZwGS["post_image"]); goto BxWWD; yXFj7: if (!(!empty($V1_El->aux_taxonomy) && !empty($rZwGS["aux_taxonomy_name"]))) { goto RQzQE; } goto DtIpS; a82jn: goto RTbT3; goto c2mTi; MztN2: set_field_post_meta($iSSyZ, "eyelet", $V1_El->eyelet); goto N3SR_; eAt78: $ptXOf = [$rZwGS["post_category"]]; goto a82jn; lnE9h: $tEm53[$V1_El->id] = "DECLASS"; goto WMI4r; ZXq1j: $tEm53[$V1_El->id] = "SKIP"; goto Np12R; G16S7: if (!($rZwGS["prepend_place"] && !empty($V1_El->place))) { goto pxbY5; } goto sQ0bR; vjn7V: udOEz: goto rmv23; An2Hy: if ($iSSyZ = wp_insert_post($N3qbs)) { goto RTMT1; } goto jH5QX; jjSMs: rZ2cG: goto jziJY; S66Pr: set_field_post_meta($iSSyZ, "place", $V1_El->place); goto cnLR8; pZhmJ: sZ53T: goto pPAiE; NQ92N: DZ6li: goto SRog0; QqcMM: goto kcyEe; goto NQ92N; Im3hJ: if (!($On9az == ACTION_DELETE)) { goto xS83P; } goto KqhDt; YxTEB: NHTlX: goto tu0xU; szoQd: if ($aWH7z->execute(["rws_id" => $V1_El->id, "img_id" => $Sohqh, "mod_date" => $V1_El->modDate])) { goto hSbLH; } goto FlQ1m; S82El: $B5qY6 = get_post($mO64m->wp_id); goto CLjdm; e2TNY: kcyEe: goto MvN2i; y4_Lc: goto kcyEe; goto De7A6; C2VW9: wp_trash_post($mO64m->wp_id); goto A1Hve; usK0R: goto oWu38; goto DStjp; P3lja: if ($Sohqh = wp_insert_attachment($lao4A, $v9PcT["file"])) { goto DZ6li; } goto D2G7J; DlkVN: $N3qbs += ["ID" => $mO64m->wp_id]; goto vP24J; kbB1l: $NQ14L = $qcfoe["tmp_name"]; goto zbkcy; jH5QX: $KU_Rl[$V1_El->id][] = ["ERROR_WP_POST_" . $tEm53[$V1_El->id]]; goto DxmlL; N_ry6: $KU_Rl[$V1_El->id][] = ["ERROR_RWS_INSERT", $VTo5L->errorInfo()[2]]; goto O0In0; Np12R: $ndslu[$V1_El->id] = get_permalink($mO64m->wp_id); goto y4_Lc; N3SR_: set_field_post_meta($iSSyZ, "summary", $V1_El->summary); goto S66Pr; JJrtK: $ptXOf[] = $rZwGS["aux_category"]; goto jjSMs; KqhDt: $tEm53[$V1_El->id] = "DELETE"; goto C2VW9; eiz24: $vU_P0 .= "." . end(explode(".", $qcfoe["name"])); goto akSYC; BazZK: $N3qbs = ["post_title" => $V1_El->title, "post_content" => $if35i, "post_date" => $V1_El->addDate, "post_modified" => $V1_El->modDate, "post_author" => $Vei91, "post_status" => $rZwGS["post_status"], "post_type" => $rZwGS["post_type"], "post_category" => $ptXOf, "tags_input" => $DQhJy]; goto f6LNL; J3SxU: bmB1i: goto D1CHp; sQ0bR: $if35i = preg_replace("/
/", sprintf("
%s - ", strtoupper($V1_El->place)), $V1_El->description, 1); goto d8G6X; rmv23: $ptXOf = [$OuS9z[0]->term_id]; goto dvF9p; tu0xU: set_field_post_meta($iSSyZ, "iframe", $g6a9z); goto RiHqk; pcsPv: $DQhJy = array_merge($DQhJy, $V1_El->tags); goto I9T6Z; DtIpS: wp_set_object_terms($iSSyZ, $V1_El->aux_taxonomy, $rZwGS["aux_taxonomy_name"]); goto mHUkv; fujVJ: if (!($qcfoe = $_FILES["imgs:{$V1_El->id}"])) { goto uOF9f; } goto kbB1l; yuWhP: RTMT1: goto fFMDy; zpTgY: if (!is_array($V1_El->tags)) { goto c_ScX; } goto pcsPv; I9T6Z: c_ScX: goto GTgYp; k2Umw: foreach ($V1_El->attributes as $NINkb) { goto WSuqs; R3Kyd: E_nrf: goto IJXrb; WSuqs: if (!$qUmt6["cat_map"][$NINkb]) { goto E_nrf; } goto ebnre; ebnre: $ptXOf[] = $qUmt6["cat_map"][$NINkb]; goto R3Kyd; IJXrb: EprOi: goto hrH2J; hrH2J: } goto tvlFM; jziJY: $DQhJy = [$V1_El->place]; goto zpTgY; dvF9p: S_YsL: goto k2Umw; YBoi1: $IIQyu->execute(["rws_id" => $V1_El->id]); goto OKAo4; IG4J3: Z2Dh_: goto f3dJv; l19dw: $ptXOf = [$Vvpg3[0]->term_id]; goto xdjc2; Uypsu: if (!($v9PcT["error"] != '')) { goto AaW35; } goto oBreT; MvN2i: } goto kaXeO; foo4c: $rZwGS = array_merge($rZwGS, $qUmt6[SECTIONS[$wBLsu]], ["section" => SECTIONS[$wBLsu]]); goto HoPiu; HoPiu: wYJ9Z: goto aUt_7; o35Zr: set_time_limit(120); goto lKI6d; IngrI: $ndslu = []; goto QpSRR; becn3: $IIQyu = $R1Q0M->prepare("SELECT * FROM {$UJmHd}_items WHERE rws_id = :rws_id"); goto JgCqn; wfnGn: if (empty($qUmt6[SECTIONS[$wBLsu]])) { goto wYJ9Z; } goto foo4c; zwOu7: $R1Q0M->commit(); goto iZr6q; oQjRv: $wBLsu = $_POST["type"]; goto dSDJ2; yQJLr: Vbxfx: goto uUgMM; lKI6d: const APP_VERSION = "1.8.1"; goto nCBIf; aUt_7: if (is_int($rZwGS["post_author"])) { goto J753m; } goto wSvbw; PCk1e: $tEm53 = []; goto i2LMu; oklap: $JUOYd = $_GET["token"] == sha1($_POST["action"] . $_POST["data"] . $qUmt6["token_key"] . $_GET["expire"]); goto DQ1Mz; hBLbh: if (is_int($rZwGS["post_image"])) { goto z7PZB; } goto YTlhF; rZmVN: require_once "../wp-config.php"; goto TG26T; tK2uc: $UJmHd = $qUmt6["db_prefix"] ?: "rws"; goto becn3; VUUmD: $KU_Rl["RWS"] = ["ERROR_RWS_MISSING_JSON"]; goto zW6Y2; Z1tRt: $KU_Rl["RWS"] = ["ERROR_RWS_MISSING_CONFIG"]; goto D0kA0; BNxI1: goto HW0c0; goto v23lS; MHLjb: if (!(count($oUeCb) > 1)) { goto Vbxfx; } goto T56ID; L0WET: function set_field_post_meta($IPGVU, $mVUBN, $gVAXz) { goto Wunqu; tihg3: $M_t4e = $Omoh7[0]; goto L6PR5; sdmsl: LZjK4: goto dEzNz; ViIHg: $M_t4e = $qUmt6["{$mVUBN}_meta_key"]; goto szC34; szC34: $SPJNO = $gVAXz; goto o2YZd; GdONI: update_post_meta($IPGVU, $M_t4e, $SPJNO); goto sdmsl; Mw46n: $SPJNO = [$Omoh7[1] => $gVAXz]; goto oacp6; Wunqu: global $qUmt6; goto f5CmN; oacp6: gYlkn: goto pnp_c; f5CmN: if (empty($qUmt6["{$mVUBN}_meta_key"])) { goto LZjK4; } goto ViIHg; pnp_c: if (!(count($Omoh7 = explode(".", $qUmt6["{$mVUBN}_meta_key"])) > 1)) { goto bJLVB; } goto tihg3; I_rgn: bJLVB: goto GdONI; o2YZd: if (!(count($Omoh7 = explode(">", $qUmt6["{$mVUBN}_meta_key"])) > 1)) { goto gYlkn; } goto p83xs; L6PR5: $SPJNO = json_encode([$Omoh7[1] => $gVAXz]); goto I_rgn; p83xs: $M_t4e = $Omoh7[0]; goto Mw46n; dEzNz: } goto crusN; L6tSm: goto HW0c0; goto fwxGv; D0kA0: goto HW0c0; goto PkPMT; o5dUC: $rZwGS = array_merge($rZwGS, $qUmt6["default"], ["section" => "default"]); goto nTiJy; Om4A1: if ($qUmt6) { goto x2IYt; } goto Z1tRt; X3c8x: add_filter("wp_insert_post_data", "alter_post_modification_time", 99, 2); goto Y2kjU; iZr6q: HW0c0: goto LV4B3; J7g0z: $rZwGS = ["section" => "root", "post_status" => "publish", "post_type" => "post", "post_format" => "standard", "post_author" => null, "post_category" => null, "post_image" => null, "root_category" => null, "aux_taxonomy_name" => null, "prepend_place" => false, "skip_modified" => true]; goto tMag0; N4EMi: const SECTIONS = array(PUB_TYPE_NEWS => "news", PUB_TYPE_VIDEO => "video", PUB_TYPE_VOD => "vod"); goto PCk1e; G2nIJ: $KU_Rl["RWS"] = ["ERROR_RWS_TOKEN_INVALID"]; goto BNxI1; E3Y5G: const PUB_TYPE_VOD = "O"; goto mwjwc; dSDJ2: $rfgmj = json_decode($_POST["data"]); goto J7g0z; tMag0: if (empty($qUmt6["default"])) { goto Zgm0g; } goto o5dUC; YTlhF: $KU_Rl["RWS"] = ["ERROR_RWS_POST_IMAGE_NOT_VALID"]; goto x1hWD; iq1if: goto HW0c0; goto ID1gI; PK7Mu: goto HW0c0; goto z1RVs; i2LMu: $KU_Rl = []; goto IngrI; PkPMT: x2IYt: goto PM4fc; TG26T: if (!function_exists("wp_generate_attachment_metadata")) { require_once "../wp-admin/includes/image.php"; } goto C1yYp; LV4B3: $Opr8u = substr(file_get_contents(__FILE__), 0, 140); goto q7BA1; WnFYV: AwPbX: goto oklap; Mgx7M: $R1Q0M->beginTransaction(); goto Io461; dTsi2: const PUB_TYPE_VIDEO = "V"; goto E3Y5G; JgCqn: $VTo5L = $R1Q0M->prepare("INSERT INTO {$UJmHd}_items SET rws_id = :rws_id, wp_id = :wp_id, img_id = :img_id, mod_date = :mod_date"); goto LUQPb; t1pIE: z7PZB: goto LqFiV; Y2kjU: function get_terms_child_of($OVkSW) { goto G6XIu; zq0Fx: return $nJ7fV; goto Pb66g; JSdNq: if (!empty($C6HVx)) { goto V7D8J; } goto zq0Fx; UbzLt: $Jy62J = []; goto Stvsa; Stvsa: foreach ($nJ7fV as $H08gL) { goto uKcfJ; uKcfJ: if (!in_array($C6HVx, get_ancestors($H08gL->term_id, "category"))) { goto DJ0cP; } goto oOYUC; oOYUC: $Jy62J[] = $H08gL; goto kOzGl; kOzGl: DJ0cP: goto vtJJX; vtJJX: QSiT2: goto LKz6i; LKz6i: } goto BgZXj; Pv359: unset($OVkSW["child_of"]); goto Zy6Xo; G6XIu: $C6HVx = $OVkSW["child_of"]; goto Pv359; CatMS: return $Jy62J; goto KNWv5; Pb66g: V7D8J: goto UbzLt; Zy6Xo: $nJ7fV = get_terms($OVkSW); goto JSdNq; BgZXj: lOek9: goto CatMS; KNWv5: } goto L0WET; F7it2: echo json_encode(["version" => APP_VERSION . $eZRNj, "php_ver" => phpversion(), "timestamp" => date("c"), "section" => $rZwGS["section"], "status" => count($KU_Rl) == 0 ? "OK" : "KO", "actions" => $tEm53, "errors" => $KU_Rl, "links" => $ndslu], JSON_PRETTY_PRINT); ?>