1572 |
*/ |
*/ |
1573 |
function show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='') |
function show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='') |
1574 |
{ |
{ |
1575 |
|
// filedir = conf->...dir_ouput."/".get_exdir(id) |
1576 |
|
|
1577 |
global $langs,$bc; |
global $langs,$bc; |
1578 |
$var=true; |
$var=true; |
1579 |
|
|
1580 |
$filename = sanitize_string($filename); |
$filename = sanitize_string($filename); |
1581 |
$relativepath = "${filename}/${filename}.pdf"; |
if ($modulepart != 'expedition') $relativepath = "${filename}/${filename}.pdf"; |
1582 |
$fullpathfile = $filedir . "/" . $filename . ".pdf"; |
else $relativepath = get_exdir("${filename}")."${filename}.pdf"; |
1583 |
|
|
1584 |
$i=0; |
$i=0; |
1585 |
if (is_dir($filedir)) |
if (is_dir($filedir)) |
1634 |
if (eregi('\-detail\.pdf',$file)) print '<td nowrap>PDF Détaillé</td>'; |
if (eregi('\-detail\.pdf',$file)) print '<td nowrap>PDF Détaillé</td>'; |
1635 |
else print '<td nowrap>PDF</td>'; |
else print '<td nowrap>PDF</td>'; |
1636 |
|
|
1637 |
$relativepathdetail = "${filename}/$file"; |
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'">'.$file.'</a></td>'; |
|
|
|
|
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepathdetail).'">'.$file.'</a></td>'; |
|
1638 |
print '<td align="right">'.filesize($filedir."/".$file). ' bytes</td>'; |
print '<td align="right">'.filesize($filedir."/".$file). ' bytes</td>'; |
1639 |
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedir."/".$file)).'</td>'; |
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedir."/".$file)).'</td>'; |
1640 |
print '</tr>'; |
print '</tr>'; |