AccessQontrol options

Main config

Make website private This blocks unregistered people only.
Block everyone This blocks everyone but the users specified below. The Dashboard remains available at all times!
Always allow these users
Type login names, comma seperated. 'admin' cannot be blocked!

Template

Template Title HTML allowed.
Template Content
Available options: %login_link%. HTML allowed.

AccessQontrol Uninstall

AccessQontrol adds some options to the database. When you disable the plugin these will not be deleted. To delete the options use the button below.
WARNING! -- This process is irreversible and will delete ALL saved options related to AccessQontrol!

'admin'); $buffer = array_combine($buffer1, $buffer2); if($user_ID == '' OR ($aqontrol_config['block_registered'] == 'yes' AND !in_array($userdata->user_login, $buffer))) { aqontrol_login_template(); exit; } } /* ------------------------------------------------------------- Name: aqontrol_login_template Purpose: Shows to people when site is restricted. Receive: -None- Return: -None- ------------------------------------------------------------- */ function aqontrol_login_template() { global $aqontrol_template; get_header(); $template_title = stripslashes(html_entity_decode($aqontrol_template['title'], ENT_QUOTES)); $template_content = stripslashes(html_entity_decode($aqontrol_template['content'], ENT_QUOTES)); $template_content = str_replace('%login_link%', 'Login form', $template_content); ?>
$value1) { $out[$value1] = $arr2[$key1]; } return $out; } } /*------------------------------------------------------------- Name: aqontrol_check_config Purpose: Create or update the options Receive: -none- Return: -none- -------------------------------------------------------------*/ function aqontrol_check_config() { // Configuration if ( !$option = get_option('aqontrol_config') ) { // Default Options $option['enable'] = 'yes'; $option['block_registered'] = 'no'; $option['except'] = ''; update_option('aqontrol_config', $option); } // If value not assigned insert default (upgrades) // "except" may be empty!! if (strlen($option['enable']) < 1 or strlen($option['block_registered']) < 1) { $option['enable'] = 'yes'; $option['block_registered'] = 'no'; $option['except'] = ''; // may be left empty!! update_option('aqontrol_config', $option); } // Template if ( !$template = get_option('aqontrol_template') ) { // Default Options $template['title'] = '

You need to log in to enter this website

'; $template['content'] = 'If you wish to log in you need an account. Please contact the system administrator if you do not have an account.'; update_option('aqontrol_template', $template); } // If value not assigned insert default (upgrades) if ( strlen($template['title']) < 1 or strlen($template['content'] ) < 1) { $template['title'] = '

You need to log in to enter this website

'; $template['content'] = 'If you wish to log in you need an account. Please contact the system administrator if you do not have an account.'; update_option('aqontrol_template', $template); } } /*------------------------------------------------------------- Name: aqontrol_options_submit Purpose: Save options Receive: $_POST Return: -none- -------------------------------------------------------------*/ function aqontrol_options_submit() { //options page $option['enable'] = $_POST['aqontrol_enable']; $option['block_registered'] = $_POST['aqontrol_block_registered']; $option['except'] = trim($_POST['aqontrol_except'], "\t\n "); $template['title'] = htmlspecialchars(trim($_POST['aqontrol_title'], "\t\n "), ENT_QUOTES); $template['content'] = htmlspecialchars(trim($_POST['aqontrol_content'], "\t\n "), ENT_QUOTES); update_option('aqontrol_config', $option); update_option('aqontrol_template', $template); } /*------------------------------------------------------------- Name: aqontrol_uninstall Purpose: Delete the entire database table and remove the options on uninstall. Receive: -none- Return: -none- -------------------------------------------------------------*/ function aqontrol_uninstall() { // Delete Option delete_option('aqontrol_config'); delete_option('aqontrol_template'); // Deactivate Plugin $current = get_settings('active_plugins'); array_splice($current, array_search( "accessqontrol.php", $current), 1); update_option('active_plugins', $current); do_action('deactivate_' . trim( $_GET['plugin'] )); die(); } ?>