Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
public function mo_sf_sync_scheduled_sync() { $p9 = 0; $uN = new D..
Decoded Output download
<? public function mo_sf_sync_scheduled_sync()
{
$p9 = 0;
$uN = new DBUtils();
$n_ = $uN->mo_sf_sync_get_all_sf_to_wp_mappings();
if (!(empty($n_) || !is_array($n_))) {
goto c1;
}
return;
c1:
$mx = ini_get("max_execution_time");
set_time_limit($p9);
foreach ($n_ as $Ph) {
if (!(empty($Ph) || (!isset($Ph->scheduled_sync_enabled) || !$Ph->scheduled_sync_enabled))) {
goto xF;
}
goto dD;
xF:
$g3 = isset($Ph->last_scheduled_sync_timestamp) ? $Ph->last_scheduled_sync_timestamp : false;
$Ub = date("Y-m-d H:i:s", current_time("timestamp", 1));
if (empty($g3)) {
goto qr;
}
$Pz = abs(round((strtotime($Ub) - strtotime(substr($g3, 0, -11))) / 3600, 1));
if ($Ph->sync_interval === "every_10_minutes") {
goto Ty;
}
if ($Ph->sync_interval === "daily") {
goto KE;
}
goto dD;
goto AR;
KE:
if (!($Pz < 23)) {
goto LM;
}
goto dD;
LM:
AR:
goto p_;
Ty:
if (!($Pz < 0.167)) {
goto ng;
}
goto dD;
ng:
p_:
qr:
$Jo = $Ph->nomenclature;
$U3 = $Ph->salesforce_object;
$C2 = $Ph->wordpress_object;
$Ak = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($C2);
$ds = $this->db->mo_sf_sync_get_column_names($Ak["content_table"]);
$CT = maybe_unserialize($Ph->fields);
$KN = implode(",", array_keys($CT["field_mapping"]));
$Up = '';
if (empty($g3)) {
goto XH;
}
$Up = "WHERE SystemModstamp >= " . $g3;
XH:
$Na = "SELECT Id,{$KN} FROM {$U3} {$Up} ORDER BY SystemModstamp ASC";
$he = (new Salesforce())->mo_sf_sync_execute_soql($Na);
if (!(is_wp_error($he) || empty($he) || isset($he[0]) && isset($he[0]["errorCode"]))) {
goto PV;
}
$gX = isset($he[0]["errorCode"]) ? $he[0]["errorCode"] : '';
goto dD;
PV:
$kR = $this->mo_sf_sync_save_wp_records($he["records"], $C2, $U3, $CT, $Ak, $ds, $Jo);
if (!(empty($kR) || is_wp_error($kR))) {
goto mh;
}
goto dD;
mh:
$mX = false;
if (!(isset($he["done"]) && !empty($he["done"]))) {
goto bh;
}
$mX = true;
bh:
oi:
if ($mX) {
goto zF;
}
$Md = $he["nextRecordsUrl"];
$he = (new Salesforce())->mo_Sf_sync_get_next_records($Md);
if (!(isset($he["done"]) && !empty($he["done"]))) {
goto W9;
}
$mX = true;
W9:
if (!(is_wp_error($he) || empty($he) || isset($he[0]) && isset($he[0]["errorCode"]))) {
goto d2;
}
$gX = isset($he[0]["errorCode"]) ? $he[0]["errorCode"] : '';
$mX = true;
goto oi;
d2:
$kR = $this->mo_sf_sync_save_wp_records($he["records"], $C2, $U3, $CT, $Ak, $ds, $Jo);
if (!(empty($kR) || is_wp_error($kR))) {
goto O4;
}
$mX = true;
goto oi;
O4:
goto oi;
zF:
if (is_wp_error($he)) {
goto Gt;
}
goto pX;
Gt:
pX:
$aM = str_replace("Z", ".000%2B0000", gmdate("Y-m-d\TH:i:s\Z", time()));
$uN->mo_sf_sync_update_scheduled_sync_details($Ph->id, true, $Ph->sync_interval, $aM);
dD:
}
v4:
set_time_limit($mx);
} ?>
Did this file decode correctly?
Original Code
public function mo_sf_sync_scheduled_sync()
{
$p9 = 0;
$uN = new DBUtils();
$n_ = $uN->mo_sf_sync_get_all_sf_to_wp_mappings();
if (!(empty($n_) || !is_array($n_))) {
goto c1;
}
return;
c1:
$mx = ini_get("\x6d\141\170\137\x65\170\x65\x63\165\164\x69\157\x6e\137\164\151\x6d\145");
set_time_limit($p9);
foreach ($n_ as $Ph) {
if (!(empty($Ph) || (!isset($Ph->scheduled_sync_enabled) || !$Ph->scheduled_sync_enabled))) {
goto xF;
}
goto dD;
xF:
$g3 = isset($Ph->last_scheduled_sync_timestamp) ? $Ph->last_scheduled_sync_timestamp : false;
$Ub = date("\x59\x2d\x6d\x2d\x64\x20\x48\72\151\72\163", current_time("\x74\x69\x6d\145\163\x74\141\155\160", 1));
if (empty($g3)) {
goto qr;
}
$Pz = abs(round((strtotime($Ub) - strtotime(substr($g3, 0, -11))) / 3600, 1));
if ($Ph->sync_interval === "\145\x76\145\x72\x79\137\61\x30\137\x6d\x69\156\x75\x74\x65\163") {
goto Ty;
}
if ($Ph->sync_interval === "\144\141\x69\154\x79") {
goto KE;
}
goto dD;
goto AR;
KE:
if (!($Pz < 23)) {
goto LM;
}
goto dD;
LM:
AR:
goto p_;
Ty:
if (!($Pz < 0.167)) {
goto ng;
}
goto dD;
ng:
p_:
qr:
$Jo = $Ph->nomenclature;
$U3 = $Ph->salesforce_object;
$C2 = $Ph->wordpress_object;
$Ak = $this->Object_Sync_Sf_WordPress->get_wordpress_table_structure($C2);
$ds = $this->db->mo_sf_sync_get_column_names($Ak["\x63\x6f\x6e\x74\145\x6e\164\x5f\x74\141\142\154\145"]);
$CT = maybe_unserialize($Ph->fields);
$KN = implode("\x2c", array_keys($CT["\x66\x69\x65\154\x64\x5f\x6d\141\160\160\151\156\x67"]));
$Up = '';
if (empty($g3)) {
goto XH;
}
$Up = "\127\x48\x45\122\105\40\x53\x79\163\164\x65\155\115\x6f\144\163\x74\141\x6d\x70\x20\x3e\x3d\40" . $g3;
XH:
$Na = "\123\x45\x4c\105\x43\124\x20\x49\x64\x2c{$KN}\x20\x46\x52\x4f\115\x20{$U3}\x20{$Up}\40\117\122\104\x45\x52\40\102\x59\x20\x53\171\x73\x74\145\155\115\x6f\x64\163\x74\141\x6d\x70\40\x41\x53\x43";
$he = (new Salesforce())->mo_sf_sync_execute_soql($Na);
if (!(is_wp_error($he) || empty($he) || isset($he[0]) && isset($he[0]["\145\162\162\x6f\x72\x43\x6f\x64\145"]))) {
goto PV;
}
$gX = isset($he[0]["\145\162\162\157\x72\103\157\x64\x65"]) ? $he[0]["\145\162\162\x6f\162\x43\x6f\144\x65"] : '';
goto dD;
PV:
$kR = $this->mo_sf_sync_save_wp_records($he["\x72\145\143\x6f\x72\x64\x73"], $C2, $U3, $CT, $Ak, $ds, $Jo);
if (!(empty($kR) || is_wp_error($kR))) {
goto mh;
}
goto dD;
mh:
$mX = false;
if (!(isset($he["\x64\157\156\145"]) && !empty($he["\144\157\x6e\x65"]))) {
goto bh;
}
$mX = true;
bh:
oi:
if ($mX) {
goto zF;
}
$Md = $he["\156\x65\170\x74\122\x65\143\157\162\x64\x73\x55\x72\x6c"];
$he = (new Salesforce())->mo_Sf_sync_get_next_records($Md);
if (!(isset($he["\144\157\156\x65"]) && !empty($he["\x64\x6f\x6e\x65"]))) {
goto W9;
}
$mX = true;
W9:
if (!(is_wp_error($he) || empty($he) || isset($he[0]) && isset($he[0]["\x65\162\x72\x6f\x72\103\157\x64\145"]))) {
goto d2;
}
$gX = isset($he[0]["\145\162\x72\157\162\x43\x6f\144\145"]) ? $he[0]["\x65\162\162\x6f\162\x43\x6f\144\x65"] : '';
$mX = true;
goto oi;
d2:
$kR = $this->mo_sf_sync_save_wp_records($he["\x72\x65\143\x6f\x72\x64\163"], $C2, $U3, $CT, $Ak, $ds, $Jo);
if (!(empty($kR) || is_wp_error($kR))) {
goto O4;
}
$mX = true;
goto oi;
O4:
goto oi;
zF:
if (is_wp_error($he)) {
goto Gt;
}
goto pX;
Gt:
pX:
$aM = str_replace("\132", "\56\x30\60\60\45\62\102\x30\60\x30\60", gmdate("\x59\55\x6d\55\x64\134\124\x48\72\x69\72\x73\x5c\132", time()));
$uN->mo_sf_sync_update_scheduled_sync_details($Ph->id, true, $Ph->sync_interval, $aM);
dD:
}
v4:
set_time_limit($mx);
}
Function Calls
None |
Stats
MD5 | f7f3f6e4b2228acb04ad80e211c19250 |
Eval Count | 0 |
Decode Time | 49 ms |