HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
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 ?>&amp;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 &raquo;" />
    </p>
  </form>
</div>