array ('Setting' => array( 'Name', 'Type' => [text| 'Size', 'Description', 'Buttons' => array() nonce| 'Value' hidden| 'Value' title| 'Class', 'Value' checkbox| 'Description', 'Buttons' => array() selection| 'Description', 'Options' => array('Value', 'Name'), 'Buttons' => array() buttons| 'Buttons' => ('Value' => ('Action', 'Class'))) Opts => Actual settings Title = 'Title of Form' Open = True if want Form Header
Close = True if want Form Footer,
Body = True if want to process options */ if (!class_exists('AmazonWishlist_Options')) { class AmazonWishlist_Options { /* * Must be called by the client's init function */ function init() { $stylesheet = plugins_url("form.css", __FILE__); wp_register_style('amazon-link-form', $stylesheet); } function enqueue_styles() { wp_enqueue_style('amazon-link-form'); } function displayForm($optionList, $Opts, $Open = True, $Body = True, $Close = True, $NoTable = True) { if ($Open) { if ($NoTable) { ?>
$optDetails) { if (!isset($Opts[$optName])) $Opts[$optName] = isset($optDetails['Default']) ? $optDetails['Default'] : ''; if ($optDetails['Type'] == 'checkbox') { // Insert a Check Box Item ////////////////////////////////////////////////////////////////////////////////////////////////////////////// $hint = isset($optDetails['Hint']) ? $optDetails['Hint'] : ''; $id = isset($optDetails['Id']) ? 'id="'.$optDetails['Id'].'"' : ''; $class = isset($optDetails['Class']) ? 'class="'.$optDetails['Class'].' al_opt_container"' : 'class="al_opt_container"'; $script = isset($optDetails['Script']) ? ' onClick="'.$optDetails['Script'].'" ' : ''; $readonly = isset($optDetails['Read_Only']) ? 'readonly disabled ' : ''; ?>
>
name="" title="" type="checkbox" value="=1)+1 ?>" = 1) ?>/>  displayInput($optionList[$Details['Input']], $Details['Input'], $Opts); ?> '.$optDetails['Description'].''; ?>
>
displayButtons($optDetails['Buttons']); ?> '.$optDetails['Description'].''; ?>
>
displayButtons($optDetails['Buttons']); ?> '.$optDetails['Description'].''; ?>
>
    $Details) { if (is_array($Details)) { $Name = $Details['Name']; $id = isset($Details['Id']) ? 'id="'.$Details['Id'].'"' : ''; } else { $Name = $Details; $Value= $Details; $id = ''; } echo "
  • " . $Name; if (isset($Details['Input'])) $this->displayInput($optionList[$Details['Input']], $Details['Input'], $Opts); echo "
  • \n"; } ?>
displayButtons($optDetails['Buttons']); ?> '.$optDetails['Description'].''; ?>
> displayButtons($optDetails['Buttons']); ?>
'.$optDetails['Description'].'
'; ?> name="" type="hidden" value="" />
>
name="" title="" type="text" value="" size="" />
displayForm($optDetails['Options'], $Opts, False, True, False); ?> displayButtons($optDetails['Buttons']); ?> '.$optDetails['Description'].''; ?>
'. $optDetails['Value'] . ''; } else { $Title = '

'. $optDetails['Value'] . '

'; } ?>
> '.$optDetails['Description'].'
'; ?> displayButtons($optDetails['Buttons']); ?> '. $optDetails['Value'] . ''; } else { $Title = '

'. $optDetails['Value'] . '

'; } ?>
> '.$optDetails['Description'].'
'; ?> displayButtons($optDetails['Buttons']); ?> '. $optDetails['Value'] . ''; } else { $Title = '

'. $optDetails['Value'] . '

'; } $class = isset($optDetails['Class']) ? 'class="'.$optDetails['Class'].' al_options"' : 'class="al_options"'; ?>
'.$optDetails['Description'].'
'; if (isset($optDetails['Buttons'])) $this->displayButtons($optDetails['Buttons']); ?>
>
"; } else { // Unknown ////////////////////////////////////////////////////////////////////////////////////////////////////////////// // echo "
UNKNOWN:"; print_r ($optDetails); echo "
"; } } } if ($Close) { if ($NoTable) { ?>
name="" title="" type="text" value="" size="" /> '.$optDetails['Description'].''; ?>
$details) { $type = isset($details['Type']) ? $details['Type'] : 'submit'; $script = isset($details['Script']) ? ' onClick="'.$details['Script'].'" ' : ''; $id = isset($details['Id']) ? 'id="'.$details['Id'].'" ' : ''; $hint = isset($details['Hint']) ? 'title="'.$details['Hint'].'" ' : ''; $value = isset($details['Value']) ? 'value="'.$details['Value'].'" ' : ''; $disabled = isset($details['Disabled']) ? 'disabled="disabled" ' : ''; ?> type="" class="" name="" value="" /> name="" title="" type="text" value="" size="" /> displayButtons($optDetails['Buttons']); ?> '.$optDetails['Description'].'
'; ?>