getOptions();
/*****************************************************************************************/
$Action = (isset($_POST[ 'AmazonLinkAction' ]) && check_admin_referer( 'update-AmazonLink-options')) ?
$_POST[ 'AmazonLinkAction' ] : 'No Action';
// See if the user has posted us some information
// If they did, the admin Nonce should be set.
$NotifyUpdate = False;
if( $Action == __('Update Options', 'amazon-link') ) {
// Update Current Wishlist settings
foreach ($this->optionList as $optName => $optDetails) {
if (isset($optDetails['Name'])) {
// Read their posted value
$Opts[$optName] = stripslashes($_POST[$optName]);
}
}
$this->saveOptions($Opts);
$NotifyUpdate = True;
} else if ( $Action == __('Install Database','amazon-link')) {
// User requested installation of the ip2nation database
?>
optionList as $optName => $optDetails) {
if(!isset($Opts[$optName]) && isset($optDetails['Default']) && (!$optDetails['Name'])) {
$Opts[$optName] = $optDetails['Default'];
$Update=True;
}
}
if ($Update && current_user_can('manage_options'))
$this->saveOptions($Opts);
/*****************************************************************************************/
if ($NotifyUpdate) {
// **********************************************************
// Put an options updated message on the screen
?>
ip2n->status();
if ($ip2n_status['Install'] == True) {
$this->optionList['ip2n_message']['Type'] = 'buttons';
$this->optionList['ip2n_message']['Description'] = $ip2n_status['Message'];
$this->optionList['ip2n_message']['Buttons'][__('Install Database','amazon-link')] =
array('Class' => 'button-secondary', 'Action' => 'AmazonLinkAction');
} else {
$this->optionList['ip2n_message']['Type'] = 'title';
$this->optionList['ip2n_message']['Value'] = $ip2n_status['Message'];
$this->optionList['ip2n_message']['Class'] = 'sub-head';
}
/*****************************************************************************************/
// **********************************************************
// Now display the options editing screen
$this->form->displayForm($this->optionList, $Opts);
?>