wpdb = $wpdb; $this->options = get_option('usecurex_options'); } /** * The actual function that kicks of the process of administration * */ function init(){ switch($_GET["sub"]){ case "settings": $this->adminSettings(); break; case "form": $this->groupForm(); break; case "submit": $this->groupSubmit(); break; default: $this->listGroups(); break; } $this->stroke($this->text); } /** * The settings page and update function * */ function adminSettings(){ if ($_POST["update"]){ if ($_POST["_wpnonce"]){ $nonce = $_POST["_wpnonce"]; } if (!wp_verify_nonce($nonce)){ die('Security check'); } $this->options["default_page"] = $_POST["default_page"]; update_option("usecurex_options", $this->options); $_POST = array(); $status = "Settings Updated"; } $text = "