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.fsfix
/
iuwebui
/
forms
/
tree_server
/
server-realtime.php
< prev
next >
Wrap
PHP Script
|
2010-09-07
|
11KB
|
262 lines
<?php
include ('../common/commonphp.php');
$tab_name = "tabServerRealtime";
$can_edit_settings = can_edit_settings();
$Page_Settings = array(
array(oid => "1.3.6.1.4.1.2213.12.1.111.2.10", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.12.1.111.2.100.38", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.38.1.300.100.100.300", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.38.1.300.100.70.500", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.12.1.300.1200.111.2.100.18", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.12.1.300.1200.111.2.100.20", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.38.1.600.1200.300.100.100.200", type => GLOBAL_INT),
array(oid => "1.3.6.1.4.1.2213.38.1.300.100.50", type => GLOBAL_INT)
);
$llock1 = settings_is_final('1.3.6.1.4.1.2213.12.1.111.2.100.11', 0) ||
settings_is_final('1.3.6.1.4.1.2213.12.1.111.2.100.2', 0) ? getLockImg() : '';
$llock2 = settings_is_final('1.3.6.1.4.1.2213.12.1.111.2.100.100.21', 0) ? getLockImg() : '';
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);
$extraSettingsToReset = array(
array(oid => '1.3.6.1.4.1.2213.12.1.111.2.100.11', type => GLOBAL_INT),
array(oid => '1.3.6.1.4.1.2213.12.1.111.2.100.100.2', type => GLOBAL_STR),
array(oid => '1.3.6.1.4.1.2213.12.1.111.2.100.100.21', type => GLOBAL_INT),
array(oid => '1.3.6.1.4.1.2213.12.1.111.2.100.100.22', type => GLOBAL_STR),
array(oid => '1.3.6.1.4.1.2213.12.1.111.2.100.100.49', type => GLOBAL_INT),
array(oid => '1.3.6.1.4.1.2213.12.1.111.2.100.100.50', type => GLOBAL_TBL),
array(oid => '1.3.6.1.4.1.2213.38.2.300.100.200.300.310.100', type => GLOBAL_TBL)
);
readDefaultSettings(&$extraSettingsToReset);
}
else
{
readPageData(&$Page_Settings);
if($_POST[SUBMIT_TABLE] == 1)
writeSettings($Page_Settings);
}
exit(0);
}
?>
<script type="text/javascript" src="/common/extlistfuncs.js"></script>
<script language='JavaScript' type='text/javascript'>
<?php echo $tab_name;?>enableControls = function()
{
if(!document.form_<?php echo $tab_name;?> || !document.form_<?php echo $tab_name;?>.VAR_PAGE_SETTINGS_0)
return;
var is_disabled = !document.form_<?php echo $tab_name;?>.VAR_PAGE_SETTINGS_0[1].checked;
control_enabler_arr('<?php echo $tab_name;?>', [0], false, disabled_settings_<?php echo $tab_name;?>);
control_enabler_arr('<?php echo $tab_name;?>', [1,3,4,7], is_disabled, disabled_settings_<?php echo $tab_name;?>);
var action_disabled = is_disabled || document.form_<?php echo $tab_name;?>.VAR_PAGE_SETTINGS_4[1].checked;
control_enabler_arr('<?php echo $tab_name;?>', [5,6], action_disabled, disabled_settings_<?php echo $tab_name;?>);
}
startup<?php echo $tab_name;?>enableControls = function()
{
<?php echo $tab_name;?>enableControls();
}
updateView1 = function(mode)
{
var label = dojo.byId("ServerRealtime: targets label");
label.innerHTML = dojo.string.escapeXml(GetAVTargetsText(mode));
}
updateView2 = function(excludeObjects, excludeTypes, excludedAppsCount)
{
var label = dojo.byId("ServerRealtime: exclusions label");
label.innerHTML = dojo.string.escapeXml(GetAVExclusionsText(excludeObjects, excludeTypes, excludedAppsCount));
}
<?php echo $tab_name;?>_init = function()
{
updateView1(
<?php settings_get_int("1.3.6.1.4.1.2213.12.1.111.2.100.11", &$mode); echo $mode; ?>
);
updateView2(
<?php settings_get_int("1.3.6.1.4.1.2213.12.1.111.2.100.100.49", &$mode); echo $mode; ?>,
<?php settings_get_int("1.3.6.1.4.1.2213.12.1.111.2.100.100.21", &$mode); echo $mode; ?>,
<?php
$tbl1 = array();
$tbl2 = array();
settings_get_table("1.3.6.1.4.1.2213.38.1.300.100.200.300.210.100", &$tbl1);
settings_get_table("1.3.6.1.4.1.2213.38.2.300.100.200.300.310.100", &$tbl2);
echo (count($tbl1) + count($tbl2));
?>
);
}
dojo.addOnLoad(<?php echo $tab_name;?>_init);
</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('Settings', $tab_name); ?>
<table border="0" cellspacing="5" cellpadding="0" class="main_page_table">
<tr>
<td valign="top" width="100%">
<?=$Page_Settings[0][lock];?><input type="hidden" name="VAR_PAGE_SETTINGS_0" value="0"/>
<input id='ServerRealtime: scanningEnabled' class='top_checkbox' type="checkbox"
name="VAR_PAGE_SETTINGS_0" value="1"
onclick="javascript: <?php echo $tab_name;?>enableControls();"
<?php if($Page_Settings[0][value] == 1) echo 'checked';?>/>
<label for='ServerRealtime: scanningEnabled'><?=fsloc("Turn on real-time scanning");?></label>
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
<?php show_section_title('Targets');?>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap width='245px'>
<?=$llock1;?><?=fsloc("Scan these files:")?>
</td>
<td class="td_setting" id="ServerRealtime: targets label">
</td>
<td class="td_setting" >
<button dojoType='fs:Button'
onClick='javascript: EnableFileTypesDialog("edit", "rts&updateView1");'
style='width: 100px;'
id="ServerRealtime: configureFiles">
<div class='button80p'>
<?=GetConfigurableAsWord($can_edit_settings && $llock1 == '', true)?>
</div>
</button>
</td>
</tr>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap width='245px'>
<?=$llock2;?><?=fsloc("Exclude from scanning:")?>
</td>
<td class="td_setting" id="ServerRealtime: exclusions label">
</td>
<td class="td_setting" >
<button
dojoType='fs:Button'
onClick='javascript: EnableExclusionsDialog("edit", "rts&updateView2");'
style='width: 100px;'
id="ServerRealtime: configureExclusions">
<div class='button80p'>
<?=GetConfigurableAsWord($can_edit_settings && $llock2 == '', true)?>
</div>
</button>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
<?php show_section_title('Options');?>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap>
<input type="hidden" name="VAR_PAGE_SETTINGS_1" value="0"/>
<?=$Page_Settings[1][lock];?><input type="checkbox" id='ServerRealtime: scanArchives' name="VAR_PAGE_SETTINGS_1"
value="1" <?php if($Page_Settings[1][value] == 1) echo 'checked';?> />
<label for="ServerRealtime: scanArchives"><?=fsloc("Scan inside compressed files (zip, arj, lzh, ...)")?></label>
</td>
<td></td>
<td></td>
</tr>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap>
<input type="hidden" name="VAR_PAGE_SETTINGS_7" value="0"/>
<?=$Page_Settings[7][lock];?><input type="checkbox" id="ServerRealtime: scan spyware" name="VAR_PAGE_SETTINGS_7"
value="1" <?php if($Page_Settings[7][value] == 1) echo 'checked';?> />
<label for="ServerRealtime: scan spyware"><?=fsloc("Scan for spyware")?></label>
</td>
<td></td>
<td></td>
</tr>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap>
<input type="hidden" name="VAR_PAGE_SETTINGS_3" value="0"/>
<?=$Page_Settings[3][lock];?><input type="checkbox" id="ServerRealtime: blockTrackingCookies" name="VAR_PAGE_SETTINGS_3"
value="1" <?php if($Page_Settings[3][value] == 1) echo 'checked';?> />
<label for="ServerRealtime: blockTrackingCookies"><?=fsloc("Block tracking cookies")?></label>
</td>
<td></td>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
<?php show_section_title('Actions');?>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap>
<input type="hidden" name="VAR_PAGE_SETTINGS_4" value="0"/>
<?=$Page_Settings[4][lock];?><input type="checkbox" id='ServerRealtime: decideActionAutomatically'
name="VAR_PAGE_SETTINGS_4" value="1"
onclick="javascript: <?php echo $tab_name;?>enableControls();"
<?php if($Page_Settings[4][value] == 1) echo 'checked';?> />
<label for='ServerRealtime: decideActionAutomatically'><?=fsloc("Decide action automatically")?></label>
</td>
<td></td>
<td></td>
</tr>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap width='245px'>
<?=$Page_Settings[5][lock];?>
<label for="ServerRealtime: virusAction"><?=fsloc("When virus is found")?></label>
</td>
<td class="td_setting" >
<?php $virAction = $Page_Settings[5][value]; ?>
<select id="ServerRealtime: virusAction" name="VAR_PAGE_SETTINGS_5">
<option value='8' <?php if($virAction == 8) echo 'selected';?>><?=fsloc('Ask what to do')?></option>
<option value="2" <?php if($virAction == 2) echo 'selected';?>><?=fsloc("Disinfect automatically")?></option>
<option value="260" <?php if($virAction == 260) echo 'selected';?>><?=fsloc("Quarantine automatically")?></option>
<option value="6" <?php if($virAction == 6) echo 'selected';?>><?=fsloc("Rename automatically")?></option>
<option value="4" <?php if($virAction == 4) echo 'selected';?>><?=fsloc("Delete automatically")?></option>
<option value="0" <?php if($virAction == 0) echo 'selected';?>><?=fsloc("Report only")?></option>
</select>
</td>
<td></td>
</tr>
<tr align="left" class="tr_setting">
<td class="td_setting" nowrap width='245px'>
<label for="ServerRealtime: spywareAction">
<?=$Page_Settings[6][lock];?>
<?=fsloc("When spyware is found")?></label>
</td>
<td class="td_setting" >
<?php $swAction = $Page_Settings[6][value];?>
<select id="ServerRealtime: spywareAction" name="VAR_PAGE_SETTINGS_6">
<option value='8' <?php if($swAction == 8) echo 'selected';?>><?=fsloc('Ask what to do')?></option>
<option value="0" <?php if($swAction == 0) echo 'selected';?>><?=fsloc("Report only")?></option>
<option value="4" <?php if($swAction == 4) echo 'selected';?>><?=fsloc("Remove automatically")?></option>
<option value="260" <?php if($swAction == 260) echo 'selected';?>><?=fsloc("Quarantine automatically")?></option>
</select>
</td>
<td></td>
</tr>
</table>
</td>
</tr>
<?php show_action_buttons($tab_name, true, true); ?>
</table>
</form>