From 2f74e92c2b980a69e8c614448b286cfe637bdea0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Jan 2004 23:35:43 +0000 Subject: [PATCH] =?UTF-8?q?Prefix=20en=20dur=20"llx=5F"=20remplac=E9=20par?= =?UTF-8?q?=20constante=20"MAIN=5FDB=5FPREFIX".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/fiche.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index e340dd16f8b..a8d6c4b1ce8 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -70,7 +70,7 @@ if ($action == 'attribute_prefix') if ($action == 'recontact') { $dr = mktime(0, 0, 0, $remonth, $reday, $reyear); - $sql = "INSERT INTO llx_soc_recontact (fk_soc, datere, author) VALUES ($socid, $dr,'". $GLOBALS["REMOTE_USER"]."')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."soc_recontact (fk_soc, datere, author) VALUES ($socid, $dr,'". $GLOBALS["REMOTE_USER"]."')"; $result = $db->query($sql); } @@ -84,7 +84,7 @@ if ($action == 'stcomm') if ($result) { - $sql = "UPDATE llx_societe SET fk_stcomm=$stcommid WHERE idp=$socid"; + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=$stcommid WHERE idp=$socid"; $result = $db->query($sql); } else @@ -95,7 +95,7 @@ if ($action == 'stcomm') if ($actioncommid) { - $sql = "INSERT INTO llx_actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm (datea, fk_action, fk_soc, fk_user_author) VALUES ('$dateaction',$actioncommid,$socid,'" . $user->id . "')"; $result = @$db->query($sql); if (!$result) @@ -148,7 +148,7 @@ if ($socid > 0) { $societe = new Societe($db, $socid); - $sql = "SELECT s.idp as idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM llx_societe as s, c_stcomm as st, c_typent as t, c_effectif as e "; + $sql = "SELECT s.idp as idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st, ".MAIN_DB_PREFIX."c_typent as t, ".MAIN_DB_PREFIX."c_effectif as e "; $sql .= " WHERE s.fk_stcomm=st.id AND s.fk_typent = t.id AND s.fk_effectif = e.id"; if ($to == 'next') @@ -393,7 +393,7 @@ if ($socid > 0) * */ $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM llx_actioncomm as a, c_actioncomm as c, llx_user as u "; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; $sql .= " WHERE a.fk_soc = $objsoc->idp "; $sql .= " AND u.rowid = a.fk_user_author"; $sql .= " AND c.id=a.fk_action ";