getVar("frontendadmin") == 1) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST) && !empty($_POST)) { # code... // Get the page id $cid = preg_replace("/[^0-9]/", "", $_POST["fieldid"]); // Get the slug name $cslug = str_replace($cid, "", $_POST["fieldid"]); // Clean the content $val = jak_clean_safe_userpost($_POST["content"]); if ($jakdb->has("translations", ["AND" => ["opid" => $_SESSION['opid'], "cmsid" => $cid, "cmsslug" => $cslug, "lang" => $BT_LANGUAGE]])) { $jakdb->update("translations", ["description" => $val], ["AND" => ["opid" => $_SESSION['opid'],"cmsid" => $cid, "cmsslug" => $cslug, "lang" => $BT_LANGUAGE]]); } else { $jakdb->insert("translations", ["opid" => $_SESSION['opid'], "description" => $val, "cmsid" => $cid, "cmsslug" => $cslug, "lang" => $BT_LANGUAGE]); } // We have stored something $formsuc = true; } } } die(json_encode(array("status" => $formsuc))); ?>