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-scheduled.php < prev   
PHP Script  |  2010-09-07  |  21KB  |  571 lines

  1. <?php
  2.     include ('../common/commonphp.php');
  3.  
  4.     $tab_name = "tabServerScheduledScanning";
  5.  
  6.     $Page_Settings = array(    
  7.         array(oid => "1.3.6.1.4.1.2213.12.1.160.65", type => GLOBAL_INT),
  8.         array(oid => "1.3.6.1.4.1.2213.12.1.160.60", type => GLOBAL_TBL)
  9.     );
  10.  
  11.     if(!isset($_POST[SUBMIT_TABLE]))
  12.     {
  13.         /* first load of the page */
  14.         readSettings(&$Page_Settings);                
  15.         set_empty_schedule(&$Page_Settings);
  16.     }
  17.     else 
  18.     {
  19.         readPageData(&$Page_Settings);        
  20.         $Page_Settings[1][value] = array();
  21.         if(isset($_POST['SCHEDULED_PARAMS']) && $_POST['SCHEDULED_PARAMS'] != '')
  22.         {
  23.             $Page_Settings[1][value][] = array(
  24.                 'Scheduled scanning task',
  25.                 $_POST['SCHEDULED_PARAMS'],
  26.                 2,
  27.                 ''
  28.             );
  29.         }
  30.         if($_POST[SUBMIT_TABLE] == 1)
  31.         {                
  32.             writeSettings($Page_Settings);
  33.         }
  34.         exit(0);    
  35.     }
  36.  
  37. function is_new_report()
  38. {    
  39.     $LogFileName = 'fsav_cmd.htm';
  40.     dfp_get_policy_str('1.3.6.1.4.1.2213.12.2.5', &$log_directory_name);
  41.     $new_report = $log_directory_name . '\\'. $LogFileName;
  42.     while(strpos($new_report, '\\\\'))
  43.         $new_report = str_replace('\\\\', '\\', $new_report);
  44.     
  45.     $webui_dir = getcwd();
  46.     $webui_dir = substr($webui_dir, 0, strpos($webui_dir, '\\forms\\') + strlen('\\forms\\'));
  47.     $webui_dir .= 'temp';
  48.     $old_report = $webui_dir . '\\fsav_cmd.[htm]-';
  49.     if (file_exists($new_report))
  50.     {       
  51.         if (!file_exists($old_report))
  52.             return true;
  53.         else
  54.         {
  55.  
  56.             if (filemtime($old_report) < filemtime($new_report))    
  57.                 return true;
  58.         }
  59.     }
  60.     return false;
  61.  
  62. }
  63.  
  64. function set_empty_schedule($page_settings)
  65. {
  66.     $default_params = '/t01:00 /rdaily';
  67.  
  68.     if (strlen($page_settings[1][value][0][1]) == 0)
  69.     {
  70.         $page_settings[0][value] = 0;
  71.         $page_settings[1][value][] = array(
  72.             'Scheduled scanning task',
  73.             $default_params,
  74.             2,
  75.             ''
  76.         );
  77.         
  78.     }
  79. }
  80.  
  81. function get_schedule($page_settings)
  82.  
  83. {       
  84.     $string = $page_settings[1][value][0][1];
  85.  
  86.     if (strpos($string,'rmonthly') !== false)
  87.         return 'Monthly';
  88.     else if (strpos($string,'rweekly') !== false)
  89.         return 'Weekly';
  90.     else if (strpos($string,'rdaily') !== false)
  91.         return 'Daily';
  92. }
  93.  
  94.  
  95. function get_start_time($page_settings)
  96. {
  97.     $string = $page_settings[1][value][0][1];                
  98.  
  99.     $ti = '';
  100.  
  101.     preg_match_all("/t\d+\:\d+/",$string,$out1);            
  102.     $t = str_replace('t','',$out1[0][0]);    
  103.     preg_match_all("/ti\d+/",$string,$out2);
  104.     if (count($out2[0])>0)
  105.     {
  106.         $ti = str_replace('ti','',$out2[0][0]);
  107.         return array(1,$t,$ti);
  108.     }
  109.     return array(0,$t,$ti);
  110. }
  111.  
  112. function get_daily_schedule($page_settings, $number_of_days)
  113. {
  114.     $string = $page_settings[1][value][0][1];
  115.     $schedule_array = array();
  116.     $not_null_values = array();
  117.  
  118.     if (strpos($string,'rweekly') !== false || strpos($string,'rmonthly') !== false)    
  119.     {       $k = 0;
  120.         for ($i = 1; $i <= $number_of_days; $i++)
  121.         {
  122.             if (strpos($string,"s" . $i . ' '))
  123.                 {       
  124.                     $not_null_values[$k] = $i;
  125.                     $schedule_array[$i] = 1;
  126.                     $k++;
  127.                 }
  128.             else
  129.                 $schedule_array[$i] = 0;                
  130.         }
  131.     }
  132.     else if (strpos($string, 'rdaily') !== false)
  133.         return array(array(1=>1,1,1,1,1,1,1),array(1=>1,1,1,1,1,1,1));
  134.     return array($schedule_array, $not_null_values);
  135.  
  136. }
  137. ?>
  138. <script language='JavaScript' type='text/javascript'>    
  139.  
  140.     WEEKLY_DIVS = ['weekly1', 'weekly2', 'weekly3'];
  141.     MONTHLY_DIVS = ['monthly1', 'monthly2', 'monthly3'];    
  142.     TIME_LIST = 'list_time'
  143.     TIME_TEXT = 'text_time'
  144.     DAILY_ID = 'daily';
  145.     WEEKLY_ID = 'weekly';
  146.     MONTHLY_ID = 'monthly';
  147.     
  148.     <?php echo $tab_name;?>enableControls = function() 
  149.     {
  150.         if(!document.form_<?php echo $tab_name;?> || !document.form_<?php echo $tab_name;?>.VAR_PAGE_SETTINGS_0)
  151.             return;
  152.  
  153.                                                                      
  154.         var is_disabled = !document.form_<?php echo $tab_name;?>.VAR_PAGE_SETTINGS_0[1].checked;        
  155.  
  156.         dojo.byId('daily_radio').disabled = is_disabled;
  157.         dojo.byId('monthly_radio').disabled = is_disabled;
  158.         dojo.byId('weekly_radio').disabled = is_disabled;
  159.  
  160.         dojo.byId('time_radio1').disabled = is_disabled;
  161.         dojo.byId(TIME_LIST).disabled = is_disabled;
  162.         dojo.byId(TIME_TEXT).disabled = is_disabled;
  163.  
  164.         disable_enable_div(MONTHLY_DIVS[0],is_disabled);
  165.         disable_enable_div(MONTHLY_DIVS[1],is_disabled);
  166.         disable_enable_div(MONTHLY_DIVS[2],is_disabled);
  167.  
  168.         dojo.byId(TIME_LIST).disabled = (is_disabled) ? is_disabled : !dojo.byId('time_radio1').checked;
  169.                 
  170.         if (dojo.byId('daily_radio').checked)
  171.             is_disabled = true;
  172.  
  173.         disable_enable_div(WEEKLY_DIVS[0],is_disabled);
  174.         disable_enable_div(WEEKLY_DIVS[1],is_disabled);
  175.         disable_enable_div(WEEKLY_DIVS[2],is_disabled);
  176.         
  177.     }
  178.  
  179.     startup<?php echo $tab_name;?>enableControls = function() 
  180.     {    
  181.         <?php echo $tab_name;?>enableControls();
  182.     }
  183.  
  184.  
  185.     disable_enable_div = function(div_id, is_disabled)
  186.     {               
  187.         var inputs = [];
  188.         inputs = get_div_inputs(div_id,inputs);
  189.         for (var i = 0; i < inputs.length; i++)
  190.         {
  191.             inputs[i].disabled = is_disabled;
  192.         }
  193.     }
  194.  
  195.     get_div_inputs = function(div_id,inputs)
  196.     {
  197.         var div = dojo.byId(div_id);
  198.         for (var child_item in div.childNodes)
  199.         { 
  200.             if (typeof(div.childNodes[child_item]) == 'object' && div.childNodes[child_item].nodeName.toLowerCase() != '#text')            
  201.             {    
  202.                 if (div.childNodes[child_item].nodeName.toLowerCase() == 'input' || div.childNodes[child_item].nodeName.toLowerCase() == 'select' )                    
  203.                     inputs.push(div.childNodes[child_item]);                
  204.                 else
  205.                     inputs.concat(get_div_inputs(div.childNodes[child_item],inputs));
  206.             }
  207.         }
  208.         return inputs;
  209.     }    
  210.  
  211.     check_div_checkboxes = function(div_id, is_checked)
  212.     {
  213.         var inputs = [];
  214.         inputs = get_div_inputs(div_id,inputs);
  215.         for (var i = 0; i < inputs.length; i++)
  216.         {
  217.             if (inputs[i].getAttribute('type').toLowerCase() == 'checkbox' && !inputs[i].checked)
  218.                 inputs[i].checked = is_checked;
  219.         }
  220.     }
  221.  
  222.     show_element_by_id = function(id)
  223.     {       
  224.         var is_disabled = true;
  225.  
  226.         var weekly1 = dojo.byId(WEEKLY_DIVS[0]);        
  227.         var weekly2 = dojo.byId(WEEKLY_DIVS[1]);
  228.         var weekly3 = dojo.byId(WEEKLY_DIVS[2]);
  229.  
  230.         var monthly1 = dojo.byId(MONTHLY_DIVS[0]);        
  231.         var monthly2 = dojo.byId(MONTHLY_DIVS[1]);
  232.         var monthly3 = dojo.byId(MONTHLY_DIVS[2]);
  233.  
  234.         weekly1.style.display = 'none';
  235.         weekly2.style.display = 'none';
  236.         weekly3.style.display = 'none';
  237.  
  238.         monthly1.style.display = 'none';
  239.         monthly2.style.display = 'none';
  240.         monthly3.style.display = 'none';
  241.  
  242.         
  243.         if (id == DAILY_ID)
  244.             {
  245.                 weekly1.style.display = 'block';            
  246.                 weekly2.style.display = 'block';            
  247.                 weekly3.style.display = 'block';
  248.  
  249.                 check_div_checkboxes(WEEKLY_DIVS[0],is_disabled);
  250.                 check_div_checkboxes(WEEKLY_DIVS[1],is_disabled);
  251.                 check_div_checkboxes(WEEKLY_DIVS[2],is_disabled);
  252.  
  253.             
  254.             }
  255.         else if (id == WEEKLY_ID)
  256.             {
  257.                 weekly1.style.display = 'block';                
  258.                 weekly2.style.display = 'block';                
  259.                 weekly3.style.display = 'block';                    
  260.  
  261.                 is_disabled = false;
  262.             }
  263.         else if (id == MONTHLY_ID)
  264.             {
  265.                 monthly1.style.display = 'block';
  266.                 monthly2.style.display = 'block';
  267.                 monthly3.style.display = 'block';
  268.                                 
  269.             }
  270.         disable_enable_div(WEEKLY_DIVS[0],is_disabled);
  271.         disable_enable_div(WEEKLY_DIVS[1],is_disabled);
  272.         disable_enable_div(WEEKLY_DIVS[2],is_disabled);
  273.         
  274.  
  275.     }
  276.         
  277.     <?php echo $tab_name;?>_submitit_hit = function()
  278.     {        
  279.         var tab = document.form_<?php echo $tab_name;?>;
  280.         var time,freq,day = '';
  281.  
  282.             tab.SUBMIT_TABLE.value = 1;
  283.             if (tab.monthly_radio.checked)            
  284.             {
  285.                 freq = '/rmonthly';
  286.                 if (tab.Day1.checked)
  287.                     day += ' /s' + tab.month_select1.value + ' ';
  288.                 if (tab.Day2.checked)
  289.                     day += ' /s' + tab.month_select2.value + ' ';
  290.                 if (tab.Day3.checked)
  291.                     day += ' /s' + tab.month_select3.value + ' ';
  292.             }
  293.             if (tab.weekly_radio.checked)
  294.             {
  295.                 freq = '/rweekly';
  296.                 if (tab.Monday.checked)
  297.                     day += ' /s1 ';
  298.                 if (tab.Tuesday.checked)
  299.                     day += ' /s2 ';
  300.                 if (tab.Wednesday.checked)
  301.                     day += ' /s3 ';
  302.                 if (tab.Thursday.checked)
  303.                     day += ' /s4 ';
  304.                 if (tab.Friday.checked)
  305.                     day += ' /s5 ';
  306.                 if (tab.Saturday.checked)
  307.                     day += ' /s6 ';
  308.                 if (tab.Sunday.checked)
  309.                     day += ' /s7 ';
  310.             }        
  311.             if (tab.daily_radio.checked)
  312.                 freq = '/rdaily' 
  313.             else if (tab.weekly_radio.checked)            
  314.                 freq = '/rweekly';
  315.             else if (tab.daily_radio.checked)            
  316.                 freq = '/rdaily';
  317.             time = '/t' + tab.time_text.value; 
  318.             if (tab.time_radio1.checked)
  319.                 time += ' /ti' + tab.time_list.value;
  320.             if (!tab.VAR_PAGE_SETTINGS_0[1].checked)
  321.                 tab.SCHEDULED_PARAMS.value = '';
  322.             else
  323.                         tab.SCHEDULED_PARAMS.value = time + ' '+ freq + ' ' + day;
  324.         
  325.         return true;        
  326.     }
  327.  
  328.     <?php echo $tab_name;?>_settings_check = function()
  329.     {       
  330.         var tab = document.form_<?php echo $tab_name;?>;
  331.         if (!tab.VAR_PAGE_SETTINGS_0[1].checked)
  332.             return true;
  333.         var reg = /^(\d{2}):(\d{2})$/;
  334.         var arr = reg.exec(tab.time_text.value);
  335.  
  336.         msg = localized_strings.TimeShouldBeInCorrectFormat;
  337.         if(!reg.test(tab.time_text.value))
  338.             {    
  339.                 show_webui_message_box(localized_strings.InvalidInput,msg,0);
  340.                 return false;
  341.             }
  342.         
  343.         else if (arr != null)        
  344.         {            
  345.             if (arr[1] > 23 || arr[2] > 59)
  346.             {
  347.                 show_webui_message_box(localized_strings.InvalidInput,msg,0);
  348.                 return false;
  349.             }
  350.         }
  351.         return true;
  352.     }
  353. </script>
  354.  
  355. <?php    show_form_management($tab_name); ?>
  356.  
  357. <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;">
  358.     <input type="hidden" name="SUBMIT_TABLE" value="0">
  359.     <input type="hidden" name="SCHEDULED_PARAMS" value="">
  360.     <input type="hidden" name="APPLY_SETTINGS" value="0">
  361.  
  362.     <?php show_action_menu('Settings', $tab_name); ?>
  363.     <table border="0" cellspacing="5" cellpadding="0" class="main_page_table">
  364.         <tr>
  365.             <td valign="top" width="100%">
  366.                 <input type="hidden" name="VAR_PAGE_SETTINGS_0" value="0">
  367.                 <?=$Page_Settings[0][lock];?><input id='ServerScheduled: scanningEnabled' class='top_checkbox' type="checkbox" 
  368.                     name="VAR_PAGE_SETTINGS_0" value="1"
  369.                     onclick="javascript: <?php echo $tab_name;?>enableControls();"
  370.                     <?php if($Page_Settings[0][value] == 1) echo 'checked';?>>
  371.                 <label for='ServerScheduled: scanningEnabled'><?=fsloc("Turn on scheduled scanning")?></label>
  372.             </td>
  373.         <tr>
  374.             <td>    
  375.                 <table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
  376.                     <?php show_section_title($Page_Settings[1][lock] . 'Scan performed'); $date = get_schedule($Page_Settings);?>
  377.                     <tr align="left" class="tr_setting">
  378.                         <td class="td_setting" nowrap width='100px'>
  379.                             <input type="radio" id="daily_radio" name="<?php echo $date;?>" value="<?php echo $date;?>" <?php if($date == 'Daily') echo 'checked';?> onclick="javascript:show_element_by_id('daily');"/>
  380.                             <label for="daily_radio"><?=fsloc("Daily")?></label>                            
  381.                         </td>
  382.                         <td align="left" class="td_setting" nowrap rowspan=3 width ='50px'>
  383.                             <img src='../pics/scheduled_separator.png'/>
  384.                         </td>
  385.                         <td class="td_setting" nowrap width='300px'> 
  386.                             <?php $day = get_daily_schedule($Page_Settings, 7); $day = $day[0];?>
  387.                             <div id="weekly1" style="display:<?php echo ($date == 'Weekly' || $date == 'Daily') ? 'block':'none';?>">
  388.                                 <table>
  389.                                 <tr>
  390.                                 <td width=100px>
  391.                                 <input type="hidden" name="monday" value="0"/>
  392.                                  <input type="checkbox" id='Monday' name="week_monday" value="1" <?php if($day[1] == 1) echo 'checked';?>/>
  393.                                  <label for="Monday"><?=fsloc("Monday")?></label>
  394.                                                                 </td>
  395.                                 <td width=100px>
  396.                                                                 <input type="hidden" name="tuesday" value="0"/>
  397.                                 <input type="checkbox" id='Tuesday' name="week_tuesday" value="1" <?php if($day[2] == 1) echo 'checked';?>/>
  398.                                 <label for="Tuesday"><?=fsloc("Tuesday")?></label>
  399.                                                                 </td>
  400.                                 <td width=100px>
  401.                                 <input type="hidden" name="wednesday" value="0"/>
  402.                                 <input type="checkbox" id='Wednesday' name="week_wednesday" value="1" <?php if($day[3] == 1) echo 'checked';?>/>
  403.                                 <label for="Wednesday"><?=fsloc("Wednesday")?></label>
  404.                                                                 </td>
  405.                                 </tr>
  406.                                 </table>
  407.  
  408.                             </div>
  409.                             <?php $day_month = get_daily_schedule($Page_Settings, 31);?>
  410.                             <div id = "monthly1" style="display:<?php echo ($date == 'Monthly') ? 'block':'none';?>">
  411.                                                                 <input type="hidden" name="month_day1" value="0"/>
  412.                                  <input type="checkbox" id='Day1' name="month_day1" value="1" <?php if (count($day_month[1]) >0) echo 'checked';?>/>
  413.                                  <label for="Day1"><?=fsloc("Day")?></label>
  414.                                                                      
  415.                                 <select name = "month_select1" id='day1_list'>
  416.                                     <?php  foreach (range(1,31) as $number)
  417.                                         {
  418.                                             $selected ='';
  419.                                             if ($number == $day_month[1][0])
  420.                                                 $selected = "selected";
  421.                                             echo "<option value='". $number . "' " . $selected . ">" . $number . "</option>";
  422.                                         }
  423.                                     ?>                            
  424.                                 </select>
  425.                             </div>
  426.                         </td>
  427.                     </tr>
  428.                     <tr align="left" class="tr_setting">
  429.                         <td class="td_setting" nowrap width='100px'>
  430.                             <input type="radio" id="weekly_radio" name="<?php echo $date;?>" value="<?php echo $date;?>" <?php if($date == 'Weekly') echo 'checked';?> onclick="javascript:show_element_by_id('weekly');"/>
  431.                             <label for="weekly_radio"><?=fsloc("Weekly")?></label>
  432.                         </td>
  433.                         <td class="td_setting" nowrap width='300px'>
  434.                             <div id ='weekly2' style="display:<?php echo ($date == 'Weekly' || $date == 'Daily') ? 'block':'none';?>">
  435.                                 <table>
  436.                                 <tr>
  437.                                 <td width=100px>
  438.                                 <input type="hidden" name="thursday" value="0"/>
  439.                                 <input type="checkbox" id='Thursday' name="week_thursday" value="1" <?php if($day[4] == 1) echo 'checked';?>/>
  440.                                 <label for="Thursday"><?=fsloc("Thursday")?></label>
  441.                                                                 </td>
  442.                                 <td width=100px>
  443.                                 <input type="hidden" name="friday" value="0"/>
  444.                                 <input type="checkbox" id='Friday' name="week_friday" value="1" <?php if($day[5] == 1) echo 'checked';?>/>
  445.                                 <label for="Friday"><?=fsloc("Friday")?></label>  
  446.                                                                 </td>
  447.                                 <td width=100px>
  448.                                 <input type="hidden" name="saturday" value="0"/>
  449.                                 <input type="checkbox" id='Saturday' name="week_saturday" value="1" <?php if($day[6] == 1) echo 'checked';?>/>
  450.                                 <label for="Saturday"><?=fsloc("Saturday")?></label>
  451.                                                                 </td>
  452.                                 </tr>
  453.                                 </table>
  454.                                     
  455.                             </div>
  456.                             <div id = "monthly2" style="display:<?php echo ($date == 'Monthly') ? 'block':'none';?>">
  457.                                 <input type="hidden" name="month_day2" value="0"/>
  458.                                  <input type="checkbox" id='Day2' name="month_day2" value="10" <?php if(count($day_month[1]) >1) echo 'checked';?>/>
  459.                                  <label for="Day2"><?=fsloc("Day")?></label>
  460.                                                                      
  461.                                 <select name = "month_select2" id='day2_list'>
  462.                                     <?php  foreach (range(1,31) as $number)
  463.                                         {
  464.                                             $selected ='';
  465.                                             if ($number == $day_month[1][1])
  466.                                                 $selected = "selected";
  467.                                             echo "<option value='". $number . "' " . $selected . ">" . $number . "</option>";
  468.                                         }
  469.                                     ?>                            
  470.                                 </select>
  471.                             </div>
  472.                         </td>
  473.                     </tr>
  474.                     <tr align="left" class="tr_setting">
  475.                         <td class="td_setting" nowrap width='100px'>
  476.                             <input type="radio" id="monthly_radio" name="<?php echo $date;?>" value="<?php echo $date;?>" <?php if($date == 'Monthly') echo 'checked';?> onclick="javascript:show_element_by_id('monthly');"/>
  477.                             <label for="monthly_radio"><?=fsloc("Monthly")?></label>
  478.                         </td>
  479.                         <td class="td_setting" nowrap width='200px'>
  480.                             <div id ='weekly3' style="display:<?php echo ($date == 'Weekly' || $date == 'Daily') ? 'block':'none';?>">
  481.                                 <table>
  482.                                 <tr>
  483.                                 <td width=100px>
  484.                                 <input type="hidden" name="sunday" value="0"/>
  485.                                 <input type="checkbox" id='Sunday' name="week_sunday" value="1" <?php if($day[7] == 1) echo 'checked';?>/>
  486.                                 <label for="Sunday"><?=fsloc("Sunday")?></label>
  487.                                                                 </td>
  488.                                 </tr>
  489.                                 </table>                
  490.                             </div>
  491.                             <div id = "monthly3" style="display:<?php echo ($date == 'Monthly') ? 'block':'none';?>">
  492.                                 <input type="hidden" name="month_day3" value="0"/>
  493.                                  <input type="checkbox" id='Day3' name="month_day3" value="20" <?php if(count($day_month[1]) > 2) echo 'checked';?>/>
  494.                                  <label for="Day3"><?=fsloc("Day")?></label>
  495.                                                                      
  496.                                 <select name = "month_select3" id='day3_list'>
  497.                                     <?php  foreach (range(1,31) as $number)
  498.                                         {
  499.                                             $selected ='';
  500.                                             if ($number == $day_month[1][2])
  501.                                                 $selected = "selected";
  502.                                             echo "<option value='". $number . "' " . $selected . ">" . $number . "</option>";
  503.                                         }
  504.                                     ?>                            
  505.                                 </select>
  506.  
  507.                             </div>
  508.                         </td>
  509.                     </tr>
  510.                 </table>
  511.                 <table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
  512.                     <?php show_section_title($Page_Settings[1][lock] . 'Start time');$time = get_start_time($Page_Settings);?>
  513.                     <tr align="left" class="tr_setting">
  514.                         <td class="td_setting" nowrap width='200px'>
  515.                             <?=fsloc("Start time (hh:mm format):")?>
  516.                         </td>
  517.                         <td class="td_setting" nowrap width='100px'>
  518.                             <input type="text" id="text_time" name="time_text" value="<?php echo (strlen($time[1]) > 0)?$time[1]:'00:00';?>" size=5>
  519.                         </td>
  520.                     </tr>    
  521.                     <tr align="left" class="tr_setting">
  522.                         <td class="td_setting" nowrap width='200px'>
  523.                             <input type="checkbox" id="time_radio1" name="time_radio" value="1" <?php echo ($time[0]==1)? 'checked':'' ?> onclick = 'javascript: dojo.byId(TIME_LIST).disabled = !dojo.byId("time_radio1").checked;'>
  524.                             <label for="time_radio1"><?=fsloc("After computer is not used for:")?></label>
  525.                         </td>
  526.                         <td class="td_setting" nowrap width='100px'>
  527.                             <select name = "time_list" id = "list_time">
  528.                                 <?php foreach(array(5,15,30,60) as $time_option)
  529.                                 {       $selected = '';    
  530.                                     if ($time[2] == $time_option)
  531.                                         $selected = 'selected';
  532.                                     $timeStr = fsloc("%d min");
  533.                                     $timeStr = str_replace("%d", $time_option, $timeStr);
  534.                                     echo '<option value = "'. $time_option . '"' . $selected. '>' . $timeStr .'</option>';
  535.                                 }
  536.                                 ?>
  537.                             </select>
  538.                         </td>
  539.                     </tr>
  540.                 </table>
  541.                 <table cellspacing="0" cellpadding="0" border="0" width="100%" class="table_settings">
  542.                     <?php show_section_title('Note');?>
  543.                     <tr align="left" class="tr_setting">
  544.                         <td class="td_setting">
  545.                             <?=fsloc("Scheduled scanning uses the currently defined manual scanning settings. All archives are scanned automatically. All viruses, worms and trojans are cleaned automatically.")?>
  546.                            </td>
  547.                     </tr>
  548.                 </table>
  549.             </td>
  550.             <td valign="top">
  551.                 <table width="200" border="0" cellpadding="0" cellspacing="0" style="margin-top: 10px;">
  552.                     <?php show_tasks_title('Last scanning report');?>
  553.                     <tr>
  554.                             <td class="table_toolbox2_content" valign="top">
  555.                             <table cellpadding="3" cellspacing="0" border="0">
  556.                                 <tr>
  557.                                     <td><img src="../pics/icon/icon_blue_arrow.gif" width="4" height="8" alt="">
  558.                                     </td>
  559.                                     <td><a href="javascript:;" onClick="open_window_max('/tree_server/scheduled_report.php');"><?php echo (is_new_report())?fsloc('New report available'):fsloc('View scanning report'); ?>...</a>
  560.                                     </td>    
  561.                                 </tr>
  562.                             </table>
  563.                         </td>
  564.                     </tr>
  565.                 </table>
  566.  
  567.             </td>
  568.         </tr>
  569.         <?php show_action_buttons($tab_name, true, false); ?>
  570.     </table>
  571. </form>