Test d'utilisation de php5-clamavlib

This commit is contained in:
Regis Houssin 2007-10-21 18:58:09 +00:00
parent 0e0e82a3e3
commit ad6b540038

View File

@ -2229,48 +2229,49 @@ class Form
{ {
global $conf,$langs; global $conf,$langs;
if ($conf->upload != 0) if ($conf->upload != 0)
{ {
print "\n\n<!-- Start form attach new file -->\n"; print "\n\n<!-- Start form attach new file -->\n";
if (! $titre) $titre=$langs->trans("AttachANewFile"); if (! $titre) $titre=$langs->trans("AttachANewFile");
print_titre($titre); print_titre($titre);
print '<form name="userfile" action="'.$url.'" enctype="multipart/form-data" method="POST">'; print '<form name="userfile" action="'.$url.'" enctype="multipart/form-data" method="POST">';
print '<table width="100%" class="noborder">'; print '<table width="100%" class="noborder">';
print '<tr><td width="50%" valign="top">'; print '<tr><td width="50%" valign="top">';
$max=$conf->upload; // En Kb $max=$conf->upload; // En Kb
$maxphp=@ini_get('upload_max_filesize'); // En inconnu $maxphp=@ini_get('upload_max_filesize'); // En inconnu
if (eregi('m$',$maxphp)) $maxphp=$maxphp*1024; if (eregi('m$',$maxphp)) $maxphp=$maxphp*1024;
if (eregi('k$',$maxphp)) $maxphp=$maxphp; if (eregi('k$',$maxphp)) $maxphp=$maxphp;
// Now $max and $maxphp are in Kb // Now $max and $maxphp are in Kb
if ($maxphp > 0) $max=min($max,$maxphp); if ($maxphp > 0) $max=min($max,$maxphp);
if ($conf->upload > 0) if ($conf->upload > 0)
{ {
print '<input type="hidden" name="max_file_size" value="'.($max*1024).'">'; print '<input type="hidden" name="max_file_size" value="'.($max*1024).'">';
} }
print '<input class="flat" type="file" name="userfile" size="70">'; print '<input class="flat" type="file" name="userfile" size="70">';
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button" name="sendit" value="'.$langs->trans("Upload").'">'; print '<input type="submit" class="button" name="sendit" value="'.$langs->trans("Upload").'">';
if ($addcancel) if ($addcancel)
{ {
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
} }
print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb").')'; print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb").')';
print "</td></tr>"; if ($conf->global->MAIN_USE_AVSCAN) print cl_info();
print "</table>"; print "</td></tr>";
print "</table>";
print '</form>'; print '</form>';
print '<br>'; print '<br>';
print "\n<!-- End form attach new file -->\n\n"; print "\n<!-- End form attach new file -->\n\n";
} }
return 1; return 1;
} }