File: /home/httpd/html/stoptube.com/wp-content/plugins/linkscode/options-linkscode.php
<?php
/*
Author: Erik Rasmussen
Author URI: http://www.erik-rasmussen.com/blog/2006/11/30/widgetize-anything/
Description: Administrative options for linkscode
*/
$location = get_option('siteurl') . '/wp-admin/admin.php?page=linkscode/options-linkscode.php'; // Form Action URI
/*Lets add some default options if they don't exist*/
add_option('wza_howmany', 1);
/*check form submission and update options*/
if ('process' == $_POST['stage'])
{
$value = (int) $_POST['wza_howmany'];
if(!isset($value) || $value < 1)
$value = 1;
update_option('wza_howmany', $value);
}
/*Get options for form fields*/
$wza_howmany = get_option('wza_howmany');
?>
<div class="wrap">
<h2>Linkscode Options</h2>
<form name="form1" method="post" action="<?php echo $location ?>&updated=true">
<input type="hidden" name="stage" value="process" />
<table width="400" cellspacing="2" cellpadding="5" class="editform">
<tr>
<th scope="row">How many widgets?</th>
<td>
<?php
echo '<input name="wza_howmany" type="text" id="wza_howmany" style="width:50px;text-align:right;" value="'.$wza_howmany.'"/>';
?>
</tr>
</table>
<p class="submit">
<input type="submit" name="Submit" value="Update Options »" />
</p>
</form>
</div>