<script nonce="<?php echo CSP_NONCE; ?>" type="text/javascript">
var upload_options =
{
	ajaxData:
	{
		album_id: <?php echo $tpl['upload']['album_id']; ?>,
		anticsrf: '<?php echo $tpl['anticsrf'](); ?>',
		from_admin: 1,
		section: 'upload',
		temp_dir: '<?php echo $tpl['upload']['temp_dir']; ?>'
	},
	ajaxScript: '<?php echo $tpl['gallery']['path']; ?>/ajax.php',
	albumSelected: true,
	fileExts: <?php echo $tpl['php2js']($tpl['upload']['fileexts']); ?>,
	fileTypes: <?php echo $tpl['php2js']($tpl['upload']['filetypes']); ?>,
	maxFileSize: <?php echo $tpl['config']('upload_maxfilesize') * 1024 * 1024; ?>,
	maxHeight: <?php echo $tpl['config']('upload_maxheight'); ?>,
	maxTotalFiles: <?php echo $tpl['upload']['max_total_files']; ?>,
	maxTotalSize: <?php echo $tpl['upload_totalsize'](); ?>,
	maxWidth: <?php echo $tpl['config']('upload_maxwidth'); ?>,
	sliceSize: <?php echo $tpl['upload_slicesize'](); ?>,
	text:
	{
		decimalSeparator: "<?php echo $tpl['php2js'](__(',')); ?>",
		failed: "<?php echo $tpl['php2js'](__('Échec de l\'envoi du fichier.')); ?>",
		files: "<?php echo $tpl['php2js'](__('%s fichiers')); ?>",
		sizeUnits:
		[
			"<?php echo $tpl['php2js'](__('%s octets')); ?>",
			"<?php echo $tpl['php2js'](__('%s Ko')); ?>",
			"<?php echo $tpl['php2js'](__('%s Mo')); ?>",
			"<?php echo $tpl['php2js'](__('%s Go')); ?>"
		],
		success: "<?php echo $tpl['php2js'](__('Envoi effectué.')); ?>",
		warning:
		{
			filename: "<?php echo $tpl['php2js'](__('Nom de fichier incorrect.')); ?>",
			filesize: "<?php echo $tpl['php2js'](__('Poids du fichier trop grand.')); ?>",
			filetype: "<?php echo $tpl['php2js'](__('Type de fichier non valide.')); ?>",
			imagesize: "<?php echo $tpl['php2js'](__('Dimensions trop grandes.')); ?>",
			imagevalid: "<?php echo $tpl['php2js'](__('Image non valide.')); ?>",
			totalfiles: "<?php echo $tpl['php2js'](__('Nombre maximum de fichiers atteint.')); ?>",
			totalsize: "<?php echo $tpl['php2js'](__('Poids maximum atteint.')); ?>"
		}
	}
};
var upload_classic = document.getElementById('upload_classic');
if (upload_classic)
{
	upload_classic.style.display = 'none';
	document.getElementById('upload').style.display = 'block';
	document.getElementById('upload_form').removeAttribute('enctype');
}
</script>