Removed deprecated files
This commit is contained in:
parent
e653822537
commit
0c9273819a
@ -101,8 +101,7 @@ if ($result)
|
|||||||
print_liste_field_titre($langs->trans("Company"),"clients.php","s.nom","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),"clients.php","s.nom","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Town"),"clients.php","s.ville","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Town"),"clients.php","s.ville","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("CustomerCode"),"clients.php","s.code_client","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("CustomerCode"),"clients.php","s.code_client","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),"clients.php","datec","",$param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateCreation"),"clients.php","datec","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -112,8 +111,8 @@ if ($result)
|
|||||||
print '<input type="text" class="flat" name="search_ville" value="'.$search_ville.'" size="10">';
|
print '<input type="text" class="flat" name="search_ville" value="'.$search_ville.'" size="10">';
|
||||||
print '</td><td class="liste_titre">';
|
print '</td><td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_code" value="'.$search_code.'" size="10">';
|
print '<input type="text" class="flat" name="search_code" value="'.$search_code.'" size="10">';
|
||||||
print '</td><td class="liste_titre"> </td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'"></td>';
|
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
@ -130,19 +129,8 @@ if ($result)
|
|||||||
print '</a> <a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">'.stripslashes($obj->nom).'</a></td>';
|
print '</a> <a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">'.stripslashes($obj->nom).'</a></td>';
|
||||||
print '<td>'.$obj->ville.'</td>';
|
print '<td>'.$obj->ville.'</td>';
|
||||||
print '<td>'.$obj->code_client.'</td>';
|
print '<td>'.$obj->code_client.'</td>';
|
||||||
print '<td align="center">'.dolibarr_print_date($obj->datec).'</td>';
|
print '<td align="right">'.dolibarr_print_date($obj->datec).'</td>';
|
||||||
print '<td align="center">';
|
print "</tr>\n";
|
||||||
if (defined("MAIN_MODULE_DOSSIER") && MAIN_MODULE_DOSSIER == 1)
|
|
||||||
{
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/dossier/client/fiche.php?id='.$obj->rowid.'">';
|
|
||||||
print img_folder();
|
|
||||||
print '</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print " ";
|
|
||||||
}
|
|
||||||
print "</td></tr>\n";
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
//print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num);
|
//print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num);
|
||||||
|
|||||||
@ -18,16 +18,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/clients.php
|
\file htdocs/compta/clients.php
|
||||||
\ingroup compta
|
\ingroup compta
|
||||||
\brief Page accueil des clients
|
\brief Page accueil des clients
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("./pre.inc.php");
|
require_once("./pre.inc.php");
|
||||||
|
|
||||||
if (! $user->rights->societe->lire)
|
if (! $user->rights->societe->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||||
@ -49,22 +49,22 @@ $pagenext = $page + 1;
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
// Sécurité accés client
|
// Sécurité accés client
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'attribute_prefix')
|
if ($action == 'attribute_prefix')
|
||||||
{
|
{
|
||||||
$societe = new Societe($db, $socid);
|
$societe = new Societe($db, $socid);
|
||||||
$societe->attribute_prefix($db, $socid);
|
$societe->attribute_prefix($db, $socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'note')
|
if ($action == 'note')
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$note."' WHERE rowid=".$socid;
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$note."' WHERE rowid=".$socid;
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,18 +73,18 @@ if ($action == 'note')
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($mode == 'search') {
|
if ($mode == 'search') {
|
||||||
if ($mode-search == 'soc') {
|
if ($mode-search == 'soc') {
|
||||||
$sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s ";
|
$sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s ";
|
||||||
$sql .= " WHERE lower(s.nom) like '%".addslashes(strtolower($socname))."%'";
|
$sql .= " WHERE lower(s.nom) like '%".addslashes(strtolower($socname))."%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $db->query($sql) ) {
|
if ( $db->query($sql) ) {
|
||||||
if ( $db->num_rows() == 1) {
|
if ( $db->num_rows() == 1) {
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
$socid = $obj->rowid;
|
$socid = $obj->rowid;
|
||||||
}
|
}
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -104,39 +104,39 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc
|
|||||||
|
|
||||||
if (strlen($stcomm))
|
if (strlen($stcomm))
|
||||||
{
|
{
|
||||||
$sql .= " AND s.fk_stcomm=$stcomm";
|
$sql .= " AND s.fk_stcomm=$stcomm";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($socname)
|
if ($socname)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.nom like '%".addslashes(strtolower($socname))."%'";
|
$sql .= " AND s.nom like '%".addslashes(strtolower($socname))."%'";
|
||||||
$sortfield = "s.nom";
|
$sortfield = "s.nom";
|
||||||
$sortorder = "ASC";
|
$sortorder = "ASC";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["search_nom"])
|
if ($_GET["search_nom"])
|
||||||
{
|
{
|
||||||
$sql .= " AND s.nom like '%".addslashes(strtolower($_GET["search_nom"]))."%'";
|
$sql .= " AND s.nom like '%".addslashes(strtolower($_GET["search_nom"]))."%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["search_compta"])
|
if ($_GET["search_compta"])
|
||||||
{
|
{
|
||||||
$sql .= " AND s.code_compta like '%".addslashes($_GET["search_compta"])."%'";
|
$sql .= " AND s.code_compta like '%".addslashes($_GET["search_compta"])."%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["search_code_client"])
|
if ($_GET["search_code_client"])
|
||||||
{
|
{
|
||||||
$sql .= " AND s.code_client like '%".addslashes($_GET["search_code_client"])."%'";
|
$sql .= " AND s.code_client like '%".addslashes($_GET["search_code_client"])."%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($begin))
|
if (strlen($begin))
|
||||||
{
|
{
|
||||||
$sql .= " AND s.nom like '".addslashes($begin)."'";
|
$sql .= " AND s.nom like '".addslashes($begin)."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($socid)
|
if ($socid)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.rowid = ".$socid;
|
$sql .= " AND s.rowid = ".$socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||||
@ -144,91 +144,80 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($action == 'facturer') {
|
|
||||||
print_barre_liste("Liste des clients facturables", $page, "clients.php","",$sortfield,$sortorder,'',$num);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print_barre_liste($langs->trans("ListOfCustomers"), $page, "clients.php","",$sortfield,$sortorder,'',$num);
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
|
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder);
|
if ($action == 'facturer') {
|
||||||
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","","",'valign="center"',$sortfield,$sortorder);
|
print_barre_liste("Liste des clients facturables", $page, "clients.php","",$sortfield,$sortorder,'',$num);
|
||||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","",'align="left"',$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","","",'align="left"',$sortfield,$sortorder);
|
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec",$addu,"",'align="center"',$sortfield,$sortorder);
|
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
|
|
||||||
print '<td align="left" class="liste_titre">';
|
|
||||||
print '<input class="flat" type="text" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
|
|
||||||
|
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
|
|
||||||
print '<td align="left" class="liste_titre">';
|
|
||||||
print '<input class="flat" type="text" size="10" name="search_code_client" value="'.$_GET["search_code_client"].'">';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td align="left" class="liste_titre">';
|
|
||||||
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_compta"].'">';
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print '<td align="right" colspan="2" class="liste_titre">';
|
|
||||||
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'">';
|
|
||||||
print '</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
$var=True;
|
|
||||||
|
|
||||||
while ($i < min($num,$conf->liste_limit))
|
|
||||||
{
|
|
||||||
$obj = $db->fetch_object();
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->rowid.'">';
|
|
||||||
print img_object($langs->trans("ShowCustomer"),"company");
|
|
||||||
print ' <a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->rowid.'">'.$obj->nom.'</a></td>';
|
|
||||||
print '<td>'.$obj->ville.' </td>';
|
|
||||||
print '<td align="left">'.$obj->code_client.' </td>';
|
|
||||||
print '<td align="left">'.$obj->code_compta.' </td>';
|
|
||||||
print '<td align="center">'.dolibarr_print_date($obj->datec).'</td>';
|
|
||||||
print '<td align="center">';
|
|
||||||
if (defined("MAIN_MODULE_DOSSIER") && MAIN_MODULE_DOSSIER == 1)
|
|
||||||
{
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/dossier/client/fiche.php?id='.$obj->rowid.'">';
|
|
||||||
print img_folder();
|
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
print_barre_liste($langs->trans("ListOfCustomers"), $page, "clients.php","",$sortfield,$sortorder,'',$num);
|
||||||
print " ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|
||||||
|
print '<table class="liste" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
print "</td></tr>\n";
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder);
|
||||||
$i++;
|
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","","",'valign="center"',$sortfield,$sortorder);
|
||||||
}
|
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","",'align="left"',$sortfield,$sortorder);
|
||||||
print "</table>";
|
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","","",'align="left"',$sortfield,$sortorder);
|
||||||
$db->free();
|
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec",$addu,"",'align="right"',$sortfield,$sortorder);
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Lignes des champs de filtre
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
|
print '<td align="left" class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
|
||||||
|
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|
||||||
|
print '<td align="left" class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_code_client" value="'.$_GET["search_code_client"].'">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td align="left" class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_compta"].'">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td align="right" colspan="2" class="liste_titre">';
|
||||||
|
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" alt="'.$langs->trans("Search").'">';
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
|
||||||
|
while ($i < min($num,$conf->liste_limit))
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object();
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
|
||||||
|
print "<tr $bc[$var]>";
|
||||||
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->rowid.'">';
|
||||||
|
print img_object($langs->trans("ShowCustomer"),"company");
|
||||||
|
print ' <a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->rowid.'">'.$obj->nom.'</a></td>';
|
||||||
|
print '<td>'.$obj->ville.' </td>';
|
||||||
|
print '<td align="left">'.$obj->code_client.' </td>';
|
||||||
|
print '<td align="left">'.$obj->code_compta.' </td>';
|
||||||
|
print '<td align="right">'.dolibarr_print_date($obj->datec).'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
$db->free();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - 1.46 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -355,7 +355,7 @@ if ($result)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($num > $limit) print_barre_liste($titre ,$page, "index.php", '&begin='.$begin.'&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num,$nbtotalofrecords);
|
if ($num > $limit) print_barre_liste('' ,$page, "index.php", '&begin='.$begin.'&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num,$nbtotalofrecords, '');
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@ -1,88 +0,0 @@
|
|||||||
<?PHP
|
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/dossier/client/fiche.php
|
|
||||||
* \brief Page des dossiers clients
|
|
||||||
* \version $Id$
|
|
||||||
* \TODO Remove dossier directory and link to it on code where a test
|
|
||||||
* is made on MAIN_MODULE_DOSSIER.
|
|
||||||
*/
|
|
||||||
|
|
||||||
require("./pre.inc.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/client.class.php');
|
|
||||||
|
|
||||||
if (!$user->rights->facture->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
|
|
||||||
$facs = array();
|
|
||||||
$client = new client($db, $_GET["id"]);
|
|
||||||
$client->fetch($_GET["id"]);
|
|
||||||
$client->read_factures();
|
|
||||||
$facs = $client->factures;
|
|
||||||
|
|
||||||
llxHeader("",'Dossier', $client);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Sécurité accés client
|
|
||||||
*/
|
|
||||||
if ($user->societe_id > 0)
|
|
||||||
{
|
|
||||||
$action = '';
|
|
||||||
$socid = $user->societe_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_GET["facid"])
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
|
|
||||||
|
|
||||||
$fac = new Facture($db);
|
|
||||||
$fac->fetch($_GET["facid"]);
|
|
||||||
|
|
||||||
$file = DOL_DATA_ROOT."/facture/".$fac->ref."/".$fac->ref.".pdf";
|
|
||||||
$file_img = DOL_DATA_ROOT."/facture/".$fac->ref."/".$fac->ref.".pdf.png";
|
|
||||||
|
|
||||||
// Si image n'existe pas, on la genere
|
|
||||||
if (! file_exists($file_img))
|
|
||||||
{
|
|
||||||
$converttool="";
|
|
||||||
if (file_exists("/usr/bin/convert")) $converttool="/usr/bin/convert";
|
|
||||||
elseif (file_exists("/usr/local/bin/convert")) $converttool="/usr/local/bin/convert";
|
|
||||||
if ($converttool) {
|
|
||||||
// Si convert est dispo
|
|
||||||
//print "x $file_img $converttool $file $file_img x";
|
|
||||||
exec("$converttool $file $file_img");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists($file_img))
|
|
||||||
{
|
|
||||||
// image.php has been deleted because was a serious security hole
|
|
||||||
// All image output must be throw wrapper viewimage.php
|
|
||||||
print '<br><img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=todo&file='.urlencode($file_img).'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
|
||||||
?>
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
<?PHP
|
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
require("../../main.inc.php");
|
|
||||||
|
|
||||||
|
|
||||||
function llxHeader($head = "", $title="", $soc="") {
|
|
||||||
global $user, $conf, $langs;
|
|
||||||
$langs->load("bills");
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
top_menu($head, $title);
|
|
||||||
|
|
||||||
$menu = new Menu();
|
|
||||||
|
|
||||||
$menu->add(DOL_URL_ROOT."/comm/fiche.php?socid=".$soc->id, $soc->nom);
|
|
||||||
|
|
||||||
$menu->add(DOL_URL_ROOT."/dossier/client/fiche.php?id=".$soc->id, $langs->trans("Bills"));
|
|
||||||
|
|
||||||
if ($soc) {
|
|
||||||
foreach($soc->factures as $key=>$value)
|
|
||||||
{
|
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/dossier/client/fiche.php?id=".$soc->id."&facid=".$value[0], $value[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
left_menu($menu->liste);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
Loading…
Reference in New Issue
Block a user