home *** CD-ROM | disk | FTP | other *** search
/ ftp.f-secure.com / 2014.06.ftp.f-secure.com.tar / ftp.f-secure.com / support / hotfix / fsav-server / FSAVSRV900_HF07.jar / iuwebui / forms / tree_fsma / samples.php < prev    next >
PHP Script  |  2010-09-07  |  4KB  |  100 lines

  1. <?php 
  2.     include ("..\common\commonphp.php");
  3.  
  4.     $oidbase = '1.3.6.1.4.1.2213.20.1.100.60.';
  5.     $Page_Settings = array(    array(oid => $oidbase . '150', type => GLOBAL_INT, min => 5, max => 300),
  6.                 array(oid => $oidbase . '120', type => GLOBAL_INT),
  7.                 array(oid => $oidbase . '130', type => GLOBAL_INT, min => 5, max => 60),
  8.                 array(oid => $oidbase . '140', type => GLOBAL_INT, min => 5, max => 300));
  9.  
  10.     $tab_name = "tabFSMASamples";
  11.  
  12.     if(!isset($_POST[SUBMIT_TABLE]))
  13.     {
  14.         /* first load of the page */
  15.         readSettings(&$Page_Settings);
  16.     }
  17.     else 
  18.     {
  19.         if($_POST[RESTORE_TABLE] == 1)
  20.         {
  21.             /* user wants to restore defaults */
  22.             readDefaultSettings(&$Page_Settings);
  23.         }
  24.         else
  25.         {
  26.             if(isset($_POST["VAR_PAGE_SETTINGS_2"]))
  27.                 $_POST["VAR_PAGE_SETTINGS_2"] *= 6000;
  28.             if(isset($_POST["VAR_PAGE_SETTINGS_3"]))
  29.                 $_POST["VAR_PAGE_SETTINGS_3"] *= 100;
  30.             if(isset($_POST["VAR_PAGE_SETTINGS_0"]))
  31.                 $_POST["VAR_PAGE_SETTINGS_0"] *= 100;
  32.  
  33.             readPageData(&$Page_Settings);
  34.             if($_POST[SUBMIT_TABLE] == 1)    
  35.                 writeSettings($Page_Settings);
  36.         }
  37.         exit(0);
  38.     }    
  39.     
  40.     $Page_Settings[2][value] /= 6000;
  41.     $Page_Settings[3][value] /= 100;
  42.     $Page_Settings[0][value] /= 100;
  43. ?>
  44.  
  45. <script language="javascript">
  46.     <?php echo $tab_name;?>_settings_check = function()
  47.     {
  48.         
  49.         <?php echo get_validation_script($Page_Settings[2], $tab_name, "VAR_PAGE_SETTINGS_2")?>
  50.         <?php echo get_validation_script($Page_Settings[3], $tab_name, "VAR_PAGE_SETTINGS_3")?>
  51.         <?php echo get_validation_script($Page_Settings[0], $tab_name, "VAR_PAGE_SETTINGS_0")?>
  52.         return true;
  53.     }
  54. </script>
  55.  
  56. <?php    show_form_management($tab_name); ?>
  57.  
  58. <form method="POST" action='<?php echo "{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}";?>' id="form_<?php echo $tab_name;?>" name="form_<?php echo $tab_name;?>" style="padding: 0; margin: 0;">
  59.     <input type="hidden" name="SUBMIT_TABLE" value="0">
  60.     <input type="hidden" name="RESTORE_TABLE" value="0">
  61.     <input type="hidden" name="APPLY_SETTINGS" value="0">
  62.  
  63.     <?php show_action_menu('Sample Submission', $tab_name); ?>
  64.     <table border="0" cellspacing="5" cellpadding="0" class="main_page_table">
  65.         <tr>
  66.             <td valign="top" width="100%">
  67.                 <table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
  68.                     <?php show_section_title('Connection options');?>
  69.                     <tr align="left" class="tr_setting">
  70.                         <td nowrap class="td_setting" width=160px>
  71.               <?=$Page_Settings[1][lock];?><?=fsloc('Max submission attempts:')?>   
  72.                         </td><td>
  73.                             <select name="VAR_PAGE_SETTINGS_1">
  74.                                     <?php for($i = 1; $i <= 10; $i++) echo "<option value='{$i}' " . ($Page_Settings[1][value] == $i ? 'selected' : '') . ">{$i}"; ?>
  75.                             </select>
  76.                     </td></tr>
  77.                     <tr align="left" class="tr_setting">
  78.                         <td nowrap class="td_setting">
  79.               <?=$Page_Settings[2][lock];?><?=fsloc('Resend interval:')?>   
  80.                         </td><td><input type="text" size=5 name="VAR_PAGE_SETTINGS_2" value="<?php echo $Page_Settings[2][value];?>">  <?=fsloc('minutes')?>
  81.                     </tr><tr align="left" class="tr_setting">
  82.                         <td nowrap class="td_setting">
  83.               <?=$Page_Settings[3][lock];?><?=fsloc('Connection timeout:')?>   
  84.                         </td><td><input type="text" size=5 name="VAR_PAGE_SETTINGS_3" value="<?php echo $Page_Settings[3][value];?>">  <?=fsloc('seconds')?>
  85.                     </tr><tr align="left" class="tr_setting">
  86.                         <td nowrap class="td_setting">
  87.               <?=$Page_Settings[0][lock];?><?=fsloc('Send timeout:')?>   
  88.                         </td><td><input type="text" size=5 name="VAR_PAGE_SETTINGS_0" value="<?php echo $Page_Settings[0][value];?>">  <?=fsloc('seconds')?>                                
  89.                     </td></tr>
  90.                 </table>
  91.             </td>
  92.         </tr>
  93.         <?php show_action_buttons($tab_name, true, true); ?>
  94.     </table>
  95. </form>    
  96.  
  97.  
  98.  
  99.  
  100.