1. <div class="wrap">
  2. <?php include_once("button.php"); ?>
  3. <h2><?php echo wp_specialchars( 'Horizontal scrolling announcement' ); ?></h2>
  4. <?php
  5. global $wpdb, $wp_version;
  6.  
  7. $hsa_title = get_option('hsa_title');
  8. $hsa_scrollamount = get_option('hsa_scrollamount');
  9. $hsa_scrolldelay = get_option('hsa_scrolldelay');
  10. $hsa_direction = get_option('hsa_direction');
  11. $hsa_style = get_option('hsa_style');
  12.  
  13. // KM 25 NOV 11 add check that $_POST['hsa_submit'] is initialized
  14. if (isset($_POST['hsa_submit']) && $_POST['hsa_submit'])
  15. {
  16. $hsa_title = stripslashes($_POST['hsa_title']);
  17. $hsa_scrollamount = stripslashes($_POST['hsa_scrollamount']);
  18. $hsa_scrolldelay = stripslashes($_POST['hsa_scrolldelay']);
  19. $hsa_direction = stripslashes($_POST['hsa_direction']);
  20. $hsa_style = stripslashes($_POST['hsa_style']);
  21.  
  22. update_option('hsa_title', $hsa_title );
  23. update_option('hsa_scrollamount', $hsa_scrollamount );
  24. update_option('hsa_scrolldelay', $hsa_scrolldelay );
  25. update_option('hsa_direction', $hsa_direction );
  26. update_option('hsa_style', $hsa_style );
  27.  
  28. }
  29.  
  30. ?>
  31. <form name="form_hsa" method="post" action="">
  32. <table width="800" border="0" cellspacing="4" cellpadding="4">
  33. <tr>
  34. <td width="125" align="left" valign="middle">Title:</td>
  35. <td width="247" rowspan="10" align="center" valign="top">
  36.  
  37. </td>
  38. </tr>
  39. <tr align="left" valign="middle">
  40. <td><input name="hsa_title" type="text" value="<?php echo $hsa_title; ?>" id="hsa_title" size="70" maxlength="100"></td>
  41. </tr>
  42. <tr align="left" valign="middle">
  43. <td>Scroll Amount:</td>
  44. </tr>
  45. <tr align="left" valign="middle">
  46. <td>
  47. <input name="hsa_scrollamount" type="text" value="<?php echo $hsa_scrollamount; ?>" id="hsa_scrollamount" maxlength="5">
  48. Makes the scroll faster. </td>
  49. </tr>
  50. <tr align="left" valign="middle">
  51. <td>Scroll Delay:</td>
  52. </tr>
  53. <tr align="left" valign="middle">
  54. <td>
  55. <input name="hsa_scrolldelay" type="text" value="<?php echo $hsa_scrolldelay; ?>" id="hsa_scrolldelay" maxlength="5">
  56. Sets the amount of delay in milliseconds. </td>
  57. </tr>
  58. <tr align="left" valign="middle">
  59. <td>Direction:</td>
  60. </tr>
  61. <tr align="left" valign="middle">
  62. <td>
  63. <input name="hsa_direction" type="text" value="<?php echo $hsa_direction; ?>" id="hsa_direction" maxlength="10">
  64. Iindicates which direction to scroll
  65. </td>
  66. </tr>
  67. <tr align="left" valign="middle">
  68. <td>HTML Style Attribute :</td>
  69. </tr>
  70. <tr>
  71. <td align="left" valign="middle"><input name="hsa_style" type="text" value="<?php echo $hsa_style; ?>" id="hsa_style" size="70" maxlength="500"></td>
  72. </tr>
  73. <tr>
  74. <td height="40" align="left" valign="bottom"> <input name="hsa_submit" id="hsa_submit" lang="publish" class="button-primary" value="Update Setting" type="submit" /></td>
  75. <td align="center" valign="top">&nbsp;</td>
  76. </tr>
  77. </table>
  78. </form>
  79. <?php
  80. include_once("help.php");
  81. // KM 25 NOV 11 change to fix undefined constant error
  82. if (function_exists ('help')) help();
  83. ?>
  84. </div>