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 >
Wrap
PHP Script
|
2010-09-07
|
4KB
|
100 lines
<?php
include ("..\common\commonphp.php");
$oidbase = '1.3.6.1.4.1.2213.20.1.100.60.';
$Page_Settings = array( array(oid => $oidbase . '150', type => GLOBAL_INT, min => 5, max => 300),
array(oid => $oidbase . '120', type => GLOBAL_INT),
array(oid => $oidbase . '130', type => GLOBAL_INT, min => 5, max => 60),
array(oid => $oidbase . '140', type => GLOBAL_INT, min => 5, max => 300));
$tab_name = "tabFSMASamples";
if(!isset($_POST[SUBMIT_TABLE]))
{
/* first load of the page */
readSettings(&$Page_Settings);
}
else
{
if($_POST[RESTORE_TABLE] == 1)
{
/* user wants to restore defaults */
readDefaultSettings(&$Page_Settings);
}
else
{
if(isset($_POST["VAR_PAGE_SETTINGS_2"]))
$_POST["VAR_PAGE_SETTINGS_2"] *= 6000;
if(isset($_POST["VAR_PAGE_SETTINGS_3"]))
$_POST["VAR_PAGE_SETTINGS_3"] *= 100;
if(isset($_POST["VAR_PAGE_SETTINGS_0"]))
$_POST["VAR_PAGE_SETTINGS_0"] *= 100;
readPageData(&$Page_Settings);
if($_POST[SUBMIT_TABLE] == 1)
writeSettings($Page_Settings);
}
exit(0);
}
$Page_Settings[2][value] /= 6000;
$Page_Settings[3][value] /= 100;
$Page_Settings[0][value] /= 100;
?>
<script language="javascript">
<?php echo $tab_name;?>_settings_check = function()
{
<?php echo get_validation_script($Page_Settings[2], $tab_name, "VAR_PAGE_SETTINGS_2")?>
<?php echo get_validation_script($Page_Settings[3], $tab_name, "VAR_PAGE_SETTINGS_3")?>
<?php echo get_validation_script($Page_Settings[0], $tab_name, "VAR_PAGE_SETTINGS_0")?>
return true;
}
</script>
<?php show_form_management($tab_name); ?>
<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;">
<input type="hidden" name="SUBMIT_TABLE" value="0">
<input type="hidden" name="RESTORE_TABLE" value="0">
<input type="hidden" name="APPLY_SETTINGS" value="0">
<?php show_action_menu('Sample Submission', $tab_name); ?>
<table border="0" cellspacing="5" cellpadding="0" class="main_page_table">
<tr>
<td valign="top" width="100%">
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
<?php show_section_title('Connection options');?>
<tr align="left" class="tr_setting">
<td nowrap class="td_setting" width=160px>
<?=$Page_Settings[1][lock];?><?=fsloc('Max submission attempts:')?>
</td><td>
<select name="VAR_PAGE_SETTINGS_1">
<?php for($i = 1; $i <= 10; $i++) echo "<option value='{$i}' " . ($Page_Settings[1][value] == $i ? 'selected' : '') . ">{$i}"; ?>
</select>
</td></tr>
<tr align="left" class="tr_setting">
<td nowrap class="td_setting">
<?=$Page_Settings[2][lock];?><?=fsloc('Resend interval:')?>
</td><td><input type="text" size=5 name="VAR_PAGE_SETTINGS_2" value="<?php echo $Page_Settings[2][value];?>"> <?=fsloc('minutes')?>
</tr><tr align="left" class="tr_setting">
<td nowrap class="td_setting">
<?=$Page_Settings[3][lock];?><?=fsloc('Connection timeout:')?>
</td><td><input type="text" size=5 name="VAR_PAGE_SETTINGS_3" value="<?php echo $Page_Settings[3][value];?>"> <?=fsloc('seconds')?>
</tr><tr align="left" class="tr_setting">
<td nowrap class="td_setting">
<?=$Page_Settings[0][lock];?><?=fsloc('Send timeout:')?>
</td><td><input type="text" size=5 name="VAR_PAGE_SETTINGS_0" value="<?php echo $Page_Settings[0][value];?>"> <?=fsloc('seconds')?>
</td></tr>
</table>
</td>
</tr>
<?php show_action_buttons($tab_name, true, true); ?>
</table>
</form>