18 require_once dirname(__FILE__).
'/../../form_question_rule/form_question_rule_edit_fns.inc';
19 require_once SQ_SYSTEM_ROOT.
'/core/attributes/option_list/option_list.inc';
20 require_once SQ_DATA_PATH.
'/private/conf/tools.inc';
47 function paintRule(&$asset, &$o, $prefix, $rule_data, $write_access)
49 $default_option = Array (
50 1 => translate(
'core_form_rule_file_virus_check_true'),
51 2 => translate(
'core_form_rule_file_virus_check_false'),
55 if(!SQ_TOOL_VIRUS_CHECKER_ENABLED || !file_exists(SQ_TOOL_VIRUS_CHECKER_PATH)) {
56 $warning =
'<p class="sq-backend-warning">'.translate(
'core_form_rule_file_virus_check_warning').
'</p>';
61 $o->openField(translate(
'core_form_rule_file_virus_check_enable'));
63 echo translate(
'core_form_rule_file_virus_check_'.(array_get_index($rule_data,
'value', TRUE) ?
'true' :
'false'));
70 $o->openField(translate(
'core_form_rule_file_virus_check_enable'));
72 combo_box($prefix.
'[check_virus]', $default_option, FALSE, array_get_index($rule_data,
'check_virus', 1));
79 $o->openField(translate(
'core_form_rule_file_virus_check_indicator_content_customise'));
80 text_box($prefix.
'[indicator_content]', array_get_index($rule_data,
'indicator_content',
''), 30);
83 $o->openField(translate(
'core_form_rule_file_virus_check_indicator_class_customise'));
84 text_box($prefix.
'[indicator_class]', array_get_index($rule_data,
'indicator_class',
''), 30);
87 $o->sectionNote(translate(
'core_form_rule_file_virus_check_note'));
103 if (!isset($_POST[$prefix]))
return false;
104 $check_virus = array_get_index($_POST[$prefix],
'check_virus', null);
105 $rule_data[
'check_virus'] = $check_virus;
107 $indicator_content = array_get_index($_POST[$prefix],
'indicator_content', null);
108 $rule_data[
'indicator_content'] = $indicator_content;
110 $indicator_class = array_get_index($_POST[$prefix],
'indicator_class', null);
111 $rule_data[
'indicator_class'] = $indicator_class;