function maps_marker_pro_license_activation_page()
{
    if (isset($_POST["maps_marker_pro_register_free"])) {
        $lu = new Ou();
        $l15 = "";
        $O15 = array();
        if (!$_POST["maps_marker_pro_first_name"]) {
            $O15[] = __("Please enter your first name to continue.", "lmm");
        }
        if (!$_POST["maps_marker_pro_last_name"]) {
            $O15[] = __("Please enter your last name to continue.", "lmm");
        }
        if (!$_POST["maps_marker_pro_email"]) {
            $O15[] = __("Please enter your email to continue.", "lmm");
        }
        if (sanitize_email($_POST["maps_marker_pro_email"]) !== $_POST["maps_marker_pro_email"]) {
            $O15[] = __("Please enter a valid email to continue (or get an anonymous trial license key)", "lmm");
        }
        if (!$_POST["maps_marker_pro_tos"]) {
            $O15[] = __("You must agree to the TOS to continue.", "lmm");
        }
        if (empty($O15)) {
            $qs = "mod=3rd_party&task=api&api_key=50a2094314fbc82e712b3f9b21f00745&email=" . urlencode(sanitize_email($_POST["maps_marker_pro_email"])) . "&first_name=" . urlencode($_POST["maps_marker_pro_first_name"]) . "&last_name=" . urlencode($_POST["maps_marker_pro_last_name"]) . "&company_name=" . urlencode($_POST["maps_marker_pro_first_name"]) . "%20" . urlencode($_POST["maps_marker_pro_last_name"]) . "&username="******"maps_marker_pro_last_name"], $l16 = TRUE) . substr(sanitize_user($_POST["maps_marker_pro_first_name"], $l16 = TRUE), 0, 1));
            $O16 = $lu->l17("https://www.mapsmarker.com/store/api/index.php", $qs);
            if (strtolower(substr($O16, 0, 021)) == "connection error:") {
                $O15[] = $O16;
            } else {
                if (strtolower(substr($O16, 0, 5)) == "error") {
                    $O15[] = $O16;
                } else {
                    $O16 = json_decode($O16);
                    update_option("leafletmapsmarkerpro_license_key", $lu->lx = $O16[0]);
                    update_option("leafletmapsmarkerpro_license_local_key", "");
                    update_option("leafletmapsmarkerpro_license_key_trial", $lu->lx = $O16[0]);
                    $l15 = __("Your new license was registered successfully!", "lmm");
                }
            }
        }
    } else {
        if (isset($_POST["maps_marker_pro_register_free_anonym"])) {
            $lu = new Ou();
            $l15 = "";
            $O15 = array();
            if (!$_POST["maps_marker_pro_tos"]) {
                $O15[] = __("You must agree to the TOS to continue.", "lmm");
            }
            if (empty($O15)) {
                $qs = "mod=3rd_party&task=api&api_key=f8b3782fef25c3f68e809f621d193063";
                $O16 = $lu->l17("https://www.mapsmarker.com/store/api/index.php", $qs);
                if (strtolower(substr($O16, 0, 021)) == "connection error:") {
                    $O15[] = $O16;
                } else {
                    if (strtolower(substr($O16, 0, 5)) == "error") {
                        $O15[] = $O16;
                    } else {
                        $O16 = json_decode($O16);
                        update_option("leafletmapsmarkerpro_license_key", $lu->lx = $O16[0]);
                        update_option("leafletmapsmarkerpro_license_local_key", "");
                        update_option("leafletmapsmarkerpro_license_key_trial", $lu->lx = $O16[0]);
                        $l15 = __("Your new license was registered successfully!", "lmm");
                    }
                }
            }
        } else {
            if (!function_exists("wp_verify_nonce")) {
                require_once ABSPATH . "wp-includes/pluggable.php";
            }
            $O17 = isset($_POST["maps_marker_pro_license"]) && wp_verify_nonce($_POST["maps_marker_pro_license"], "maps_marker_pro_license");
            if ($O17) {
                update_option("leafletmapsmarkerpro_license_local_key", "");
                update_option("leafletmapsmarkerpro_license_key", $_POST["leafletmapsmarkerpro_license_key"]);
            }
            $lu = Op(TRUE);
        }
    }
    include dirname(__FILE__) . "/leaflet-license.php";
    return TRUE;
}
示例#2
0
function Oo($Os = FALSE)
{
    $lt = new Ot();
    $lt->lu = "database";
    $lt->Ou = array("local_key" => get_option("leafletmapsmarkerpro_license_local_key"));
    $lt->lv = array("function" => "update_option", "key" => "leafletmapsmarkerpro_license_local_key");
    $lt->Ov = "1,2,3,4,5,6,7,8,9,10";
    $lt->lw = get_option("leafletmapsmarkerpro_license_key");
    $lt->Ow = "7ca99e156b5e30e0648f49b81178cd7e";
    $lt->lx = "https://www.mapsmarker.com/store/api/index.php";
    $lt->validate();
    if ($Os) {
        return $lt;
    }
    $lq = array("leafletmapsmarker_markers", "leafletmapsmarker_marker", "leafletmapsmarker_import_export", "leafletmapsmarker_layers", "leafletmapsmarker_layer", "leafletmapsmarker_tools", "leafletmapsmarker_settings");
    if (is_admin() && Op($lq, TRUE) && $lt->Ox) {
        return $lt->Ox;
    }
    return TRUE;
}