Works on merge pdf with encryption
This commit is contained in:
parent
3f495ef3b5
commit
87d7badd53
@ -144,12 +144,12 @@ $formfile = new FormFile($db);
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function() {
|
$(document).ready(function() {
|
||||||
jQuery("#checkall").click(function() {
|
$("#checkall").click(function() {
|
||||||
jQuery(".checkformerge").attr('checked', true);
|
$(".checkformerge").attr('checked', true);
|
||||||
});
|
});
|
||||||
jQuery("#checknone").click(function() {
|
$("#checknone").click(function() {
|
||||||
jQuery(".checkformerge").attr('checked', false);
|
$(".checkformerge").attr('checked', false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -439,12 +439,17 @@ class FormFile
|
|||||||
$file_list=dol_dir_list($filedir,'files',0,$filter,'\.meta$'.($png?'|'.$png:''),'date',SORT_DESC);
|
$file_list=dol_dir_list($filedir,'files',0,$filter,'\.meta$'.($png?'|'.$png:''),'date',SORT_DESC);
|
||||||
|
|
||||||
// Affiche en-tete tableau si non deja affiche
|
// Affiche en-tete tableau si non deja affiche
|
||||||
if (count($file_list) && ! $headershown && !$iconPDF)
|
if (! empty($file_list) && ! $headershown && ! $iconPDF)
|
||||||
{
|
{
|
||||||
$headershown=1;
|
$headershown=1;
|
||||||
$out.= '<div class="titre">'.$titletoshow.'</div>';
|
$out.= '<div class="titre">'.$titletoshow.'</div>';
|
||||||
$out.= '<table class="border" summary="listofdocumentstable" width="100%">';
|
$out.= '<table class="border" summary="listofdocumentstable" width="100%">';
|
||||||
}
|
}
|
||||||
|
else if (empty($file_list) && ! empty($iconPDF))
|
||||||
|
{
|
||||||
|
// For ajax treatment
|
||||||
|
$out.= '<div id="gen_pdf_'.$filename.'" class="linkobject hideobject">'.img_picto('', 'refresh').'</div>'."\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Loop on each file found
|
// Loop on each file found
|
||||||
foreach($file_list as $file)
|
foreach($file_list as $file)
|
||||||
@ -458,15 +463,15 @@ class FormFile
|
|||||||
if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; }
|
if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; }
|
||||||
if ($modulepart == 'export') { $relativepath = $file["name"]; }
|
if ($modulepart == 'export') { $relativepath = $file["name"]; }
|
||||||
|
|
||||||
if (!$iconPDF) $out.= "<tr ".$bc[$var].">";
|
if (! $iconPDF) $out.= "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
// Show file name with link to download
|
// Show file name with link to download
|
||||||
if (!$iconPDF) $out.= '<td nowrap="nowrap">';
|
if (! $iconPDF) $out.= '<td nowrap="nowrap">';
|
||||||
$out.= '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
$out.= '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
||||||
$mime=dol_mimetype($relativepath,'',0);
|
$mime=dol_mimetype($relativepath,'',0);
|
||||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||||
$out.= '>';
|
$out.= '>';
|
||||||
if (!$iconPDF)
|
if (! $iconPDF)
|
||||||
{
|
{
|
||||||
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
||||||
}
|
}
|
||||||
@ -474,12 +479,15 @@ class FormFile
|
|||||||
{
|
{
|
||||||
$out.= img_pdf($file["name"],2);
|
$out.= img_pdf($file["name"],2);
|
||||||
}
|
}
|
||||||
$out.= '</a>';
|
$out.= '</a>'."\n";
|
||||||
if (!$iconPDF) $out.= '</td>';
|
if (! $iconPDF)
|
||||||
// Affiche taille fichier
|
{
|
||||||
if (!$iconPDF) $out.= '<td align="right" nowrap="nowrap">'.dol_print_size(dol_filesize($filedir."/".$file["name"])).'</td>';
|
$out.= '</td>';
|
||||||
// Affiche date fichier
|
// Show file size
|
||||||
if (!$iconPDF) $out.= '<td align="right" nowrap="nowrap">'.dol_print_date(dol_filemtime($filedir."/".$file["name"]),'dayhour').'</td>';
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size(dol_filesize($filedir."/".$file["name"])).'</td>';
|
||||||
|
// Show file date
|
||||||
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date(dol_filemtime($filedir."/".$file["name"]),'dayhour').'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($delallowed)
|
if ($delallowed)
|
||||||
{
|
{
|
||||||
@ -489,7 +497,7 @@ class FormFile
|
|||||||
$out.= '">'.img_delete().'</a></td>';
|
$out.= '">'.img_delete().'</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$iconPDF) $out.= '</tr>';
|
if (! $iconPDF) $out.= '</tr>';
|
||||||
|
|
||||||
$this->numoffiles++;
|
$this->numoffiles++;
|
||||||
}
|
}
|
||||||
|
|||||||
0
htdocs/langs/HOWTO-Translation.txt
Executable file → Normal file
0
htdocs/langs/HOWTO-Translation.txt
Executable file → Normal file
Loading…
Reference in New Issue
Block a user