Fix: add virus alert
This commit is contained in:
parent
68240ca997
commit
3388e4ad37
@ -77,7 +77,8 @@ if ($_POST['addfile'] || $_POST['addfilehtml'])
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$message = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$message = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
@ -86,10 +87,16 @@ if ($_POST['addfile'] || $_POST['addfilehtml'])
|
|||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$message = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,9 +53,9 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
}
|
}
|
||||||
else if (is_numeric($resupload) && $resupload == -99)
|
else if (is_numeric($resupload) && $resupload == -99)
|
||||||
{
|
{
|
||||||
// Echec transfert (virus ?)
|
// File infected by a virus
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith");
|
$langs->load("errors");
|
||||||
$mesg.= '</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -77,17 +77,24 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Files infected by a virus
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$langs->load("errors");
|
||||||
// print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
}
|
}
|
||||||
|
else if ($result < 0)
|
||||||
|
{
|
||||||
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
// print_r($_FILES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -377,7 +377,8 @@ if ($_POST['addfile'])
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
@ -387,7 +388,13 @@ if ($_POST['addfile'])
|
|||||||
// Add file in list of files in session
|
// Add file in list of files in session
|
||||||
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
|||||||
@ -77,17 +77,24 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
{
|
if ($result > 0)
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
{
|
||||||
//print_r($_FILES);
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
//print_r($_FILES);
|
||||||
else
|
}
|
||||||
{
|
else if ($result == -99)
|
||||||
// Echec transfert (fichier d<>passant la limite ?)
|
{
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
// Files infected by a virus
|
||||||
// print_r($_FILES);
|
$langs->load("errors");
|
||||||
}
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
|
{
|
||||||
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
// print_r($_FILES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,16 +80,23 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
|
//print_r($_FILES);
|
||||||
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
//print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
}
|
// print_r($_FILES);
|
||||||
else
|
|
||||||
{
|
|
||||||
// Echec transfert (fichier dépassant la limite ?)
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
|
||||||
// print_r($_FILES);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -717,7 +717,8 @@ if ($_POST['addfile'])
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
@ -726,7 +727,13 @@ if ($_POST['addfile'])
|
|||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
|||||||
@ -1140,7 +1140,8 @@ if ($_POST['addfile'])
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['addedfile']['tmp_name'], $upload_dir . "/" . $_FILES['addedfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
@ -1149,7 +1150,13 @@ if ($_POST['addfile'])
|
|||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
$formmail->add_attached_files($upload_dir . "/" . $_FILES['addedfile']['name'],$_FILES['addedfile']['name'],$_FILES['addedfile']['type']);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
|||||||
@ -79,16 +79,23 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier d<>passant la limite ?)
|
// Files infected by a virus
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$langs->load("errors");
|
||||||
// print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
|
{
|
||||||
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,23 +73,30 @@ $modulepart='contract';
|
|||||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Creation r<EFBFBD>pertoire si n'existe pas
|
* Creation repertoire si n'existe pas
|
||||||
*/
|
*/
|
||||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier d<>passant la limite ?)
|
// Files infected by a virus
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$langs->load("errors");
|
||||||
// print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
}
|
}
|
||||||
|
else if ($result < 0)
|
||||||
|
{
|
||||||
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
// print_r($_FILES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -105,6 +105,12 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
$result=$ecmdir->changeNbOfFiles('+');
|
$result=$ecmdir->changeNbOfFiles('+');
|
||||||
}
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// File infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
else if ($result < 0)
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
@ -112,12 +118,6 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// File infected by a virus
|
|
||||||
$langs->load("errors");
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith",$result).'</div>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -56,17 +56,18 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// File infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
else if ($result < 0)
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier d?passant la limite ?)
|
// Echec transfert (fichier d?passant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Fichier infect? par un virus
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith",$result).'</div>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -110,6 +110,12 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
$result=$ecmdir->changeNbOfFiles('+');
|
$result=$ecmdir->changeNbOfFiles('+');
|
||||||
}
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// File infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
else if ($result < 0)
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
@ -117,12 +123,6 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// File infected by a virus
|
|
||||||
$langs->load("errors");
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith",$result).'</div>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -70,23 +70,30 @@ $modulepart='fichinter';
|
|||||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Creation r<EFBFBD>pertoire si n'existe pas
|
* Creation repertoire si n'existe pas
|
||||||
*/
|
*/
|
||||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier d<>passant la limite ?)
|
// Files infected by a virus
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$langs->load("errors");
|
||||||
// print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
}
|
}
|
||||||
|
else if ($result < 0)
|
||||||
|
{
|
||||||
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
// print_r($_FILES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,16 +82,23 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
|
//print_r($_FILES);
|
||||||
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
//print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
}
|
// print_r($_FILES);
|
||||||
else
|
|
||||||
{
|
|
||||||
// Echec transfert (fichier dépassant la limite ?)
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
|
||||||
// print_r($_FILES);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,15 +73,22 @@ if ($_POST['sendit'] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . '/' . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans('FileTransferComplete').'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans('ErrorFileNotUploaded').'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,6 +109,12 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
$result=$ecmdir->changeNbOfFiles('+');
|
$result=$ecmdir->changeNbOfFiles('+');
|
||||||
}
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// File infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
else if ($result < 0)
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
@ -116,12 +122,6 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// File infected by a virus
|
|
||||||
$langs->load("errors");
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith",$result).'</div>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -183,6 +183,13 @@ class mailing_peche extends MailingTargets
|
|||||||
|
|
||||||
dol_syslog(get_class($this)."::add_to_target mailing ".$cpt." targets found");
|
dol_syslog(get_class($this)."::add_to_target mailing ".$cpt." targets found");
|
||||||
}
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$this->error = $langs->trans("ErrorFileIsInfectedWithAVirus");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
else if ($result < 0)
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
@ -190,12 +197,6 @@ class mailing_peche extends MailingTargets
|
|||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Fichier infecte par un virus
|
|
||||||
$this->error = $langs->trans("ErrorFileIsInfectedWith",$result);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::add_to_target($mailing_id, $cibles);
|
return parent::add_to_target($mailing_id, $cibles);
|
||||||
|
|||||||
@ -57,3 +57,4 @@ ErrorContactEMail=A technical error occured. Please, contact administrator to fo
|
|||||||
ErrorWrongValueForField=Wrong value for field number <b>%s</b> (value '<b>%s</b>' does not match regex rule <b>%s</b>)
|
ErrorWrongValueForField=Wrong value for field number <b>%s</b> (value '<b>%s</b>' does not match regex rule <b>%s</b>)
|
||||||
ErrorsOnXLines=Errors on <b>%s</b> source lines
|
ErrorsOnXLines=Errors on <b>%s</b> source lines
|
||||||
WarningsOnXLines=Warnings on <b>%s</b> source lines
|
WarningsOnXLines=Warnings on <b>%s</b> source lines
|
||||||
|
ErrorFileIsInfectedWithAVirus=This file is infected by a virus!
|
||||||
@ -16,7 +16,6 @@ ErrorFailedToChangePassword=Failed to change password
|
|||||||
ErrorLoginDoesNotExists=User with login <b>%s</b> could not be found.
|
ErrorLoginDoesNotExists=User with login <b>%s</b> could not be found.
|
||||||
ErrorLoginHasNoEmail=This user has no email address. Process aborted.
|
ErrorLoginHasNoEmail=This user has no email address. Process aborted.
|
||||||
ErrorBadValueForCode=Bad value types for code. Try again with a new value...
|
ErrorBadValueForCode=Bad value types for code. Try again with a new value...
|
||||||
ErrorFileIsInfectedWith=This file is infected with %s
|
|
||||||
SecurityCode=Security code
|
SecurityCode=Security code
|
||||||
Calendar=Calendar
|
Calendar=Calendar
|
||||||
AddTrip=Add trip
|
AddTrip=Add trip
|
||||||
|
|||||||
@ -57,4 +57,5 @@ ErrorPasswordsMustMatch=Les 2 mots de passe saisis doivent correspondre
|
|||||||
ErrorContactEMail=Une erreur technique est apparue. Merci de contacter l'administrateur à l'email suivant <b>%s</b> en lui indiquant le code erreur <b>%s</b> dans votre message ou mieux en fournissant une copie d'écran de cette page.
|
ErrorContactEMail=Une erreur technique est apparue. Merci de contacter l'administrateur à l'email suivant <b>%s</b> en lui indiquant le code erreur <b>%s</b> dans votre message ou mieux en fournissant une copie d'écran de cette page.
|
||||||
ErrorWrongValueForField=Mauvaise valeur pour le champ numéro <b>%s</b> (la valeur '<b>%s</b>' ne respecte pas la règle <b>%s</b>)
|
ErrorWrongValueForField=Mauvaise valeur pour le champ numéro <b>%s</b> (la valeur '<b>%s</b>' ne respecte pas la règle <b>%s</b>)
|
||||||
ErrorsOnXLines=Erreurs sur <b>%s</b> lignes sources
|
ErrorsOnXLines=Erreurs sur <b>%s</b> lignes sources
|
||||||
WarningsOnXLines=Alertes sur <b>%s</b> lignes sources
|
WarningsOnXLines=Alertes sur <b>%s</b> lignes sources
|
||||||
|
ErrorFileIsInfectedWithAVirus=Ce fichier est infecté par un virus !
|
||||||
@ -16,7 +16,6 @@ ErrorFailedToChangePassword=Echec de modification du mot de passe
|
|||||||
ErrorLoginDoesNotExists=Le compte utilisateur de login <b>%s</b> n'a pu être trouvé.
|
ErrorLoginDoesNotExists=Le compte utilisateur de login <b>%s</b> n'a pu être trouvé.
|
||||||
ErrorLoginHasNoEmail=Cet utilisateur n'a pas d'email. Impossible de continuer.
|
ErrorLoginHasNoEmail=Cet utilisateur n'a pas d'email. Impossible de continuer.
|
||||||
ErrorBadValueForCode=Mauvaise valeur saisie pour le code. Réessayer avec une nouvelle valeur...
|
ErrorBadValueForCode=Mauvaise valeur saisie pour le code. Réessayer avec une nouvelle valeur...
|
||||||
ErrorFileIsInfectedWith=Ce fichier est infecté par %s
|
|
||||||
SecurityCode=Code sécurité
|
SecurityCode=Code sécurité
|
||||||
Calendar=Calendrier
|
Calendar=Calendrier
|
||||||
AddTrip=Créer déplacement
|
AddTrip=Créer déplacement
|
||||||
|
|||||||
@ -84,17 +84,24 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
|
||||||
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else if ($result == -99)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Files infected by a virus
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$langs->load("errors");
|
||||||
// print_r($_FILES);
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
}
|
}
|
||||||
|
else if ($result < 0)
|
||||||
|
{
|
||||||
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
|
// print_r($_FILES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -83,17 +83,18 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
|
else if ($result == -99)
|
||||||
|
{
|
||||||
|
// Files infected by a virus
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
||||||
|
}
|
||||||
else if ($result < 0)
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Fichier infecte par un virus
|
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith",$result).'</div>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user