32 lines
627 B
PHP
32 lines
627 B
PHP
<?php
|
|
if (!defined('_ECRIRE_INC_VERSION')){
|
|
return;
|
|
}
|
|
|
|
|
|
function inc_bigform_verifier_dist($options = [], &$erreurs = [] ){
|
|
$options_defauts = [
|
|
'mime' => 'tout_mime',
|
|
'dimension_max' => [
|
|
'largeur' => 20000,
|
|
'hauteur' => 20000,
|
|
]
|
|
];
|
|
if (is_array($options)) {
|
|
$options = array_merge($options_defauts, $options);
|
|
} else {
|
|
$options = $options_defauts;
|
|
}
|
|
|
|
$er = [];
|
|
$verifier = charger_fonction('verifier', 'inc/');
|
|
|
|
if (!empty($_FILES)) {
|
|
foreach ($_FILES as $cle => $file) {
|
|
$verifier($file, 'fichiers', $options, $er);
|
|
if (count($er)) {
|
|
$erreurs[$cle] = implode('<br>', $er);
|
|
}
|
|
}
|
|
}
|
|
}
|