/** * SQweb Config file * * * @category Plugin * @package SQwebv2 * @author Thibaud de La Villarmois * @link https://sqweb.com */ global $wpdb; function sqw_site_url() { $protocol = !empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS'] || 443 == $_SERVER['SERVER_PORT'] ? 'https://' : 'http://'; return $protocol . $_SERVER['HTTP_HOST']; } define('SQW_CURRENT_URL', sqw_site_url()); define('SQW_PLUGIN_NAME', 'sqweb'); // Upload folder for upload purpose. $upload_folder = wp_upload_dir(); define('SQW_UPLOAD_DIR', $upload_folder['basedir']); // Upload folder for display purpose. define('SQW_UPLOAD_URL', $upload_folder['baseurl']); // Plug in directory absolute address. define('SQW_PLUGIN_DIR', plugins_url(__FILE__)); // Plug in directory for upload and writing purpose. $path = plugin_dir_path(__FILE__); define('SQW_PLUGIN_DIR_U', $path); // Salt used to hash the captcha string, customize it how you like // even though id advise you to just execute a faceroll on your keyboard. define('SQW_SALT_CAPTCHA', 'JKEIUZANEIUAZ87248732H8ENDSZ2DNS2NEND3U82ND8'); // SQL tables.
_e('Update', 'sqweb'); ?> " /> </form> <?php } else { echo '<p class="sqw-notice">', __('Woops! It looks like you havent registered your website yet', 'sqweb'), '<br><a href="' . add_query_arg('website', 'add') . '">', __('Click here', 'sqweb'), '</a> ', __('to start', 'sqweb'), '</p>'; } } ?> </div> <?php } if (isset($_COOKIE['sqw_admin_token']) && 0 == $sqw_webmaster) { setcookie('sqw_admin_token', 0, time() - 1); wp_redirect(sqw_site_url() . $_SERVER['REQUEST_URI']); } } else { ?> <div class="sqw-auth-box"> <?php if (isset($_GET['action']) && 'signup' == $_GET['action']) { if (isset($_POST) && (!empty($_POST['sqw-firstname']) || !empty($_POST['sqw-lastname']) || !empty($_POST['sqw-email']) || !empty($_POST['sqw-password']))) { $error = 1; $r = sqweb_sign_up($_POST['sqw-firstname'], $_POST['sqw-lastname'], $_POST['sqw-email'], $_POST['sqw-password']); if (1 == $r) { wp_redirect(add_query_arg(array('action' => 'signin', 'success' => 'true'))); exit; } } else { $error = 0;