From b119294626729be317df85293d34803c628a06be Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 21 Oct 2007 20:40:43 +0000 Subject: [PATCH] Test d'utilisation de php5-clamavlib --- htdocs/admin/security_other.php | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 8c5491cae82..87522846cc8 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -64,6 +64,19 @@ else if ($_GET["action"] == 'disable_captcha') exit; } +if ($_GET["action"] == 'activate_avscan') +{ + dolibarr_set_const($db, "MAIN_USE_AVSCAN", '1'); + Header("Location: security_other.php"); + exit; +} +else if ($_GET["action"] == 'disable_avscan') +{ + dolibarr_del_const($db, "MAIN_USE_AVSCAN"); + Header("Location: security_other.php"); + exit; +} + /* * Affichage onglet @@ -169,6 +182,49 @@ print ""; print ""; print ''; +// Enable AV scanner +$var=!$var; +print ""; +print ''.$langs->trans("UseAvToScanUploadedFiles"); +if($conf->global->MAIN_USE_AVSCAN == 1) +{ + print '
'; + // Clamav + if (function_exists("cl_scanfile")) + { + print cl_info(); + } +} +print ''; +print ''; +if($conf->global->MAIN_USE_AVSCAN == 1) +{ + print img_tick(); +} +print ''; +print ''; +if (function_exists("cl_scanfile")) // Clamav +{ + if ($conf->global->MAIN_USE_AVSCAN == 0) + { + print ''.$langs->trans("Activate").''; + } + if($conf->global->MAIN_USE_AVSCAN == 1) + { + print ''.$langs->trans("Disable").''; + } +} +else +{ + $html = new Form($db); + $desc = $html->textwithwarning('',$langs->transnoentities("EnablePhpAVModuleDesc"),1); + print $desc; +} +print ""; + +print ""; +print ''; + print ''; print '';