/** * Copyright (C) 2014-2017 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ class Ai1wm_Status_Controller { public static function status() { echo json_encode( get_option( AI1WM_STATUS, array() ) ); exit; } } /** * Copyright (C) 2014-2017 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ class Ai1wm_Resolve_Controller { public static function resolve( $params = array() ) { // Set error handler @set_error_handler( 'Ai1wm_Handler::error' ); // Set params if ( empty( $params ) ) { $params = ai1wm_urldecode( $_REQUEST ); } // Set secret key $secret_key = null; if ( isset( $params['secret_key'] ) ) { $secret_key = $params['secret_key']; } // Verify secret key by using the value in the database, not in cache if ( $secret_key !== get_option( AI1WM_SECRET_KEY ) ) { Ai1wm_Status::error( sprintf( __( 'Unable to authenticate your request with secret_key = "%s"', AI1WM_PLUGIN_NAME ), $secret_key ), __( 'Unable to resolve', AI1WM_PLUGIN_NAME ) ); exit; } // Set IP address if ( isset( $params['url_ip'] ) && ( $ip = $params['url_ip'] ) ) { update_option( AI1WM_URL_IP, $ip ); } // Set adapter if ( isset( $params['url_adapter'] ) && ( $adapter = $params['url_adapter'] ) ) { if ( $adapter === 'curl' ) { update_option( AI1WM_URL_ADAPTER, 'curl' ); } else { update_option( AI1WM_URL_ADAPTER, 'stream' ); } } } } /** * Copyright (C) 2014-2017 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ class Ai1wm_Updater_Controller { public static function plugins_api( $result, $action = null, $args = null ) { return Ai1wm_Updater::plugins_api( $result, $action, $args ); } public static function pre_update_plugins( $transient ) { if ( empty( $transient->checked ) ) { return $transient; } // Check for updates Ai1wm_Updater::check_for_updates(); return $transient; } public static function update_plugins( $transient ) { return Ai1wm_Updater::update_plugins( $transient ); } public static function check_for_updates() { return Ai1wm_Updater::check_for_updates(); } public static function plugin_row_meta( $links, $file ) { return Ai1wm_Updater::plugin_row_meta( $links, $file ); } public static function updater() { $extensions = Ai1wm_Extensions::get(); // Set uuid $uuid = null; if ( isset( $_POST['ai1wm_uuid'] ) ) { $uuid = trim( $_POST['ai1wm_uuid'] ); } // Set extension $extension = null; if ( isset( $_POST['ai1wm_extension'] ) ) { $extension = trim( $_POST['ai1wm_extension'] ); } // Verify whether extension exists if ( isset( $extensions[ $extension ] ) ) { update_option( $extensions[ $extension ]['key'], $uuid ); } } } /** * Copyright (C) 2014-2017 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ class Ai1wm_Report_Controller { public static function report() { // Set E-mail $email = null; if ( isset( $_POST['ai1wm_email'] ) ) { $email = trim( $_POST['ai1wm_email'] ); } // Set Message $message = null; if ( isset( $_POST['ai1wm_message'] ) ) { $message = trim( $_POST['ai1wm_message'] ); } // Set Terms $terms = false; if ( isset( $_POST['ai1wm_terms'] ) ) { $terms = (bool) $_POST['ai1wm_terms']; } $model = new Ai1wm_Report; // Send Report $response = $model->add( $email, $message, $terms ); echo json_encode( $response ); exit; } } lightweight123 | CBro-Fit
Nutrition Planning

Nutrition Planning

Nutrition Planning With the mastery of a few principles of nutritional planning, virtually anybody, regardless of age, weight, gender, etc. can be successful. People often have a skewed view of eating healthy, thinking that in order to achieve their health and fitness...
Benefits of Working With a Personal Trainer

Benefits of Working With a Personal Trainer

Benefits of Working With a Personal Trainer A personal trainer can help you stay motivated and consistent: both with your exercise and nutrition. Motivation and Accountability These two go hand-in-hand.  First, especially when first starting out, staying motivated can...