- $ftpl->fillin("FILE",$virt_path);
- $ftpl->fillin("FILE_NAME",$file);
- $ftpl->fillin("SIZE",$stat[7]);
- $ftpl->fillin("DATE",strftime($config->{'timeformat'},localtime($stat[9])));
- $ftpl->fillin("URL",equal_url($config->{'httproot'},$virt_path));
-
- $ftpl->parse_if_block("not_readable",not -r $phys_path);
- $ftpl->parse_if_block("binary",-B $phys_path);
- $ftpl->parse_if_block("readonly",not -w $phys_path);
+ $ftpl->fillin('FILE',$virt_path);
+ $ftpl->fillin('FILE_NAME',encode_entities($file));
+ $ftpl->fillin('SIZE',$stat[7]);
+ $ftpl->fillin('DATE',encode_entities(strftime($config->{'timeformat'},localtime($stat[9]))));
+ $ftpl->fillin('URL',equal_url(encode_entities($config->{'httproot'}),$virt_path));