Qual: Mise en commun dans la methode html->show_documents du code des zones d'affichages des documents PDF gnrs.
(Afin de prparer la gnration des PDF incluant le choix du model la vole).
This commit is contained in:
parent
98100f59fb
commit
58caa5e242
@ -31,15 +31,14 @@ require("./pre.inc.php");
|
|||||||
require("./fichinter.class.php");
|
require("./fichinter.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/project.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/project.class.php");
|
||||||
|
|
||||||
/*
|
// Sécurité accés client
|
||||||
* Sécurité accés client
|
|
||||||
*/
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
$socidp = $user->societe_id;
|
$socidp = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["socidp"])
|
if ($_GET["socidp"])
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom, s.idp, s.prefix_comm FROM ".MAIN_DB_PREFIX."societe as s WHERE s.idp = ".$_GET["socidp"];
|
$sql = "SELECT s.nom, s.idp, s.prefix_comm FROM ".MAIN_DB_PREFIX."societe as s WHERE s.idp = ".$_GET["socidp"];
|
||||||
@ -350,21 +349,23 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
|||||||
|
|
||||||
print '<table width="50%" cellspacing="2"><tr><td width="50%" valign="top">';
|
print '<table width="50%" cellspacing="2"><tr><td width="50%" valign="top">';
|
||||||
|
|
||||||
print_titre($langs->trans("Documents"));
|
|
||||||
print '<table width="100%" class="border">';
|
|
||||||
|
|
||||||
$file = $conf->fichinter->dir_output . "/$fichinter->ref/$fichinter->ref.pdf";
|
/*
|
||||||
$relativepath="$fichinter->ref/$fichinter->ref.pdf";
|
* Documents générés
|
||||||
|
*/
|
||||||
|
$filename=sanitize_string($fichinter->ref);
|
||||||
|
$filedir=$conf->fichinter->dir_output . "/".$fichinter->ref;
|
||||||
|
$urlsource=$_SERVER["PHP_SELF"]."?id=".$fichinter->id;
|
||||||
|
//$genallowed=$user->rights->expedition->creer;
|
||||||
|
//$delallowed=$user->rights->expedition->supprimer;
|
||||||
|
$genallowed=0;
|
||||||
|
$delallowed=0;
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
if (file_exists($file))
|
print "<br>\n";
|
||||||
{
|
$sel->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$propal->modelpdf);
|
||||||
print "<tr $bc[0]><td>Ficheinter PDF</a></td>";
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/document.php?modulepart=ficheinter&file='.urlencode($relativepath).'">'.$fichinter->ref.'.pdf</a></td>';
|
|
||||||
print '<td align="right">'.filesize($file). ' bytes</td>';
|
|
||||||
print '<td align="right">'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</table></td></tr></table>\n";
|
print "</table></td></tr></table>\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user