Exemple #1
0
 public function loadModel($id)
 {
     $model = Ot::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemple #2
0
function maps_marker_pro_license_activation_page()
{
    if (isset($_POST["maps_marker_pro_register_free"])) {
        $lt = new Ot();
        $l14 = "";
        $O14 = array();
        if (!$_POST["maps_marker_pro_first_name"]) {
            $O14[] = __("Please enter your first name to continue.", "lmm");
        }
        if (!$_POST["maps_marker_pro_last_name"]) {
            $O14[] = __("Please enter your last name to continue.", "lmm");
        }
        if (!$_POST["maps_marker_pro_email"]) {
            $O14[] = __("Please enter your email to continue.", "lmm");
        }
        if (sanitize_email($_POST["maps_marker_pro_email"]) !== $_POST["maps_marker_pro_email"]) {
            $O14[] = __("Please enter a valid email to continue (or get an anonymous trial license key)", "lmm");
        }
        if (!$_POST["maps_marker_pro_tos"]) {
            $O14[] = __("You must agree to the TOS to continue.", "lmm");
        }
        if (empty($O14)) {
            $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"], $l15 = TRUE) . substr(sanitize_user($_POST["maps_marker_pro_first_name"], $l15 = TRUE), 0, 1));
            $O15 = $lt->l16("https://www.mapsmarker.com/store/api/index.php", $qs);
            if (strtolower(substr($O15, 0, 021)) == "connection error:") {
                $O14[] = $O15;
            } else {
                if (strtolower(substr($O15, 0, 5)) == "error") {
                    $O14[] = $O15;
                } else {
                    $O15 = json_decode($O15);
                    update_option("leafletmapsmarkerpro_license_key", $lt->lw = $O15[0]);
                    update_option("leafletmapsmarkerpro_license_local_key", "");
                    update_option("leafletmapsmarkerpro_license_key_trial", $lt->lw = $O15[0]);
                    $l14 = __("Your new license was registered successfully!", "lmm");
                }
            }
        }
    } else {
        if (isset($_POST["maps_marker_pro_register_free_anonym"])) {
            $lt = new Ot();
            $l14 = "";
            $O14 = array();
            if (!$_POST["maps_marker_pro_tos"]) {
                $O14[] = __("You must agree to the TOS to continue.", "lmm");
            }
            if (empty($O14)) {
                $qs = "mod=3rd_party&task=api&api_key=f8b3782fef25c3f68e809f621d193063";
                $O15 = $lt->l16("https://www.mapsmarker.com/store/api/index.php", $qs);
                if (strtolower(substr($O15, 0, 021)) == "connection error:") {
                    $O14[] = $O15;
                } else {
                    if (strtolower(substr($O15, 0, 5)) == "error") {
                        $O14[] = $O15;
                    } else {
                        $O15 = json_decode($O15);
                        update_option("leafletmapsmarkerpro_license_key", $lt->lw = $O15[0]);
                        update_option("leafletmapsmarkerpro_license_local_key", "");
                        update_option("leafletmapsmarkerpro_license_key_trial", $lt->lw = $O15[0]);
                        $l14 = __("Your new license was registered successfully!", "lmm");
                    }
                }
            }
        } else {
            if (!function_exists("wp_verify_nonce")) {
                require_once ABSPATH . "wp-includes/pluggable.php";
            }
            $O16 = isset($_POST["maps_marker_pro_license"]) && wp_verify_nonce($_POST["maps_marker_pro_license"], "maps_marker_pro_license");
            if ($O16) {
                update_option("leafletmapsmarkerpro_license_local_key", "");
                update_option("leafletmapsmarkerpro_license_key", $_POST["leafletmapsmarkerpro_license_key"]);
            }
            $lt = Oo(TRUE);
        }
    }
    include dirname(__FILE__) . "/leaflet-license.php";
    return TRUE;
}