1377 |
print '<form action="'.$urlsource.'" method="post">'; |
print '<form action="'.$urlsource.'" method="post">'; |
1378 |
print '<input type="hidden" name="action" value="setpdfmodel">'; |
print '<input type="hidden" name="action" value="setpdfmodel">'; |
1379 |
} |
} |
|
|
|
1380 |
print_titre($langs->trans("Documents")); |
print_titre($langs->trans("Documents")); |
1381 |
print '<table class="border" width="100%">'; |
print '<table class="border" width="100%">'; |
1382 |
|
|
1405 |
print '</td><td align="center" colspan="2"><input class="button" type="submit" value="'.$texte.'">'; |
print '</td><td align="center" colspan="2"><input class="button" type="submit" value="'.$texte.'">'; |
1406 |
print '</td></tr>'; |
print '</td></tr>'; |
1407 |
} |
} |
1408 |
|
|
1409 |
|
$i=0; |
1410 |
if (is_dir($filedir)) |
if (is_dir($filedir)) |
1411 |
{ |
{ |
1412 |
$handle=opendir($filedir); |
$handle=opendir($filedir); |
1413 |
while (($file = readdir($handle))!==false) |
while (($file = readdir($handle))!==false) |
1414 |
{ |
{ |
1415 |
if (is_readable($filedir."/".$file) && eregi('\.pdf$',$file)) |
// Si fichier non lisible ou non .pdf, on passe au suivant |
1416 |
{ |
if (! is_readable($filedir."/".$file) || ! eregi('\.pdf$',$file)) continue; |
1417 |
print "<tr $bc[$var]>"; |
|
1418 |
if (eregi('\-detail\.pdf',$file)) print '<td nowrap>PDF Détaillé</td>'; |
print "<tr $bc[$var]>"; |
1419 |
else print '<td nowrap>PDF</td>'; |
if (eregi('\-detail\.pdf',$file)) print '<td nowrap>PDF Détaillé</td>'; |
1420 |
|
else print '<td nowrap>PDF</td>'; |
1421 |
$relativepathdetail = "${filename}/$file"; |
|
1422 |
|
$relativepathdetail = "${filename}/$file"; |
1423 |
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepathdetail).'">'.$file.'</a></td>'; |
|
1424 |
print '<td align="right">'.filesize($filedir."/".$file). ' bytes</td>'; |
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepathdetail).'">'.$file.'</a></td>'; |
1425 |
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedir."/".$file)).'</td>'; |
print '<td align="right">'.filesize($filedir."/".$file). ' bytes</td>'; |
1426 |
print '</tr>'; |
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($filedir."/".$file)).'</td>'; |
1427 |
} |
print '</tr>'; |
1428 |
|
|
1429 |
|
$i++; |
1430 |
} |
} |
1431 |
} |
} |
1432 |
|
|
1433 |
print "</table>\n"; |
print "</table>\n"; |
|
|
|
1434 |
if ($genallowed) |
if ($genallowed) |
1435 |
{ |
{ |
1436 |
print '</form>'; |
print '</form>'; |