diff --git a/htdocs/comm/addpropal.php3 b/htdocs/comm/addpropal.php3 index b0bf6421860..37a4ca26d90 100644 --- a/htdocs/comm/addpropal.php3 +++ b/htdocs/comm/addpropal.php3 @@ -25,7 +25,7 @@ require("./propal.class.php3"); $db = new Db(); -$sql = "SELECT s.nom, s.idp, s.prefix_comm FROM societe as s WHERE s.idp = $socidp;"; +$sql = "SELECT s.nom, s.idp, s.prefix_comm FROM llx_societe as s WHERE s.idp = $socidp;"; $result = $db->query($sql); if ($result) diff --git a/htdocs/comm/bookmark.php3 b/htdocs/comm/bookmark.php3 index 0d75b1b451c..227b3433678 100644 --- a/htdocs/comm/bookmark.php3 +++ b/htdocs/comm/bookmark.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * 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 @@ -18,6 +15,9 @@ * 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("./pre.inc.php3"); @@ -30,20 +30,22 @@ if ($sortfield == "") { $sortfield="idp"; } - - $yn["t"] = "oui"; $yn["f"] = "non"; $ynn["1"] = "oui"; $ynn["0"] = "non"; -if ($action == 'add') { +if ($action == 'add') +{ $sql = "INSERT INTO llx_bookmark (fk_soc, dateb, author) VALUES ($socidp, now(),'". $GLOBALS["REMOTE_USER"]."');"; - if (! $db->query($sql) ) { - print $db->error(); - } + if (! $db->query($sql) ) + { + print $db->error(); + } } -if ($action == 'delete') { + +if ($action == 'delete') +{ $sql = "DELETE FROM llx_bookmark WHERE rowid=$bid AND author = '". $GLOBALS["REMOTE_USER"]."'"; $result = $db->query($sql); } @@ -58,21 +60,25 @@ $pagenext = $page + 1; print '
Bookmark
'; $sql = "SELECT s.idp, s.nom, ".$db->pdate("b.dateb")." as dateb, st.libelle as stcomm, b.rowid as bid, b.author"; -$sql .= " FROM societe as s, c_stcomm as st, llx_bookmark as b"; +$sql .= " FROM llx_societe as s, c_stcomm as st, llx_bookmark as b"; $sql .= " WHERE b.fk_soc = s.idp AND s.fk_stcomm = st.id AND s.datea is not null"; $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset); -if ( $db->query($sql) ) { +if ( $db->query($sql) ) +{ $num = $db->num_rows(); $i = 0; - if ($sortorder == "DESC") { - $sortorder="ASC"; - } else { - $sortorder="DESC"; - } + if ($sortorder == "DESC") + { + $sortorder="ASC"; + } + else + { + $sortorder="DESC"; + } print "

"; print ""; print ""; @@ -86,32 +92,38 @@ if ( $db->query($sql) ) { print ""; print "\n"; $var=True; - while ($i < $num) { - $obj = $db->fetch_object( $i); - - $var=!$var; - $bc1="bgcolor=\"#90c090\""; - $bc2="bgcolor=\"#b0e0b0\""; - if (!$var) { - $bc=$bc1; - } else { - $bc=$bc2; + while ($i < $num) + { + $obj = $db->fetch_object( $i); + + $var=!$var; + $bc1="bgcolor=\"#90c090\""; + $bc2="bgcolor=\"#b0e0b0\""; + if (!$var) + { + $bc=$bc1; + } + else + { + $bc=$bc2; + } + print ""; + print ""; + print ""; + print "\n"; + + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + $i++; } - print ""; - print ""; - print ""; - print "\n"; - - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - $i++; - } print "
  
" . ($i + 1 + ($limit * $page)) . "$obj->idpidp\">$obj->nom$obj->stcomm$obj->author".strftime("%d %b %Y %H:%M", $obj->dateb) ."[bid\">Delete]
" . ($i + 1 + ($limit * $page)) . "$obj->idpidp\">$obj->nom$obj->stcomm$obj->author".strftime("%d %b %Y %H:%M", $obj->dateb) ."[bid\">Delete]
"; $db->free(); -} else { +} +else +{ print $db->error(); } diff --git a/htdocs/comm/facture.php3 b/htdocs/comm/facture.php3 index 5f047ae628d..10c57cc71dc 100644 --- a/htdocs/comm/facture.php3 +++ b/htdocs/comm/facture.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * 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 @@ -18,6 +15,9 @@ * 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("./pre.inc.php3"); @@ -68,7 +68,7 @@ if ($action == 'add') { } elseif ($action == 'create') { $sql = "SELECT s.nom, s.prefix_comm, s.idp, p.price, p.remise, p.tva, p.total, p.ref, ".$db->pdate("p.datep")." as dp, c.id as statut, c.label as lst"; - $sql .= " FROM societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; + $sql .= " FROM llx_societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; $sql .= " AND p.rowid = $propalid"; @@ -161,7 +161,7 @@ if ($action == 'add') { print "\n"; $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount,".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid "; - $sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp ORDER BY f.datec DESC "; + $sql .= " FROM llx_societe as s,llx_facture as f WHERE f.fk_soc = s.idp ORDER BY f.datec DESC "; if ( $db->query($sql) ) { $num = $db->num_rows(); @@ -214,7 +214,7 @@ if ($action == 'add') { if ($facid) { $sql = "SELECT s.nom,s.idp, f.amount, f.facnumber, f.rowid"; - $sql .= " FROM societe as s, llx_facture as f WHERE f.fk_soc = s.idp"; + $sql .= " FROM llx_societe as s, llx_facture as f WHERE f.fk_soc = s.idp"; $sql .= " AND f.rowid = $facid"; $result = $db->query($sql); diff --git a/htdocs/compta/paiement.php3 b/htdocs/compta/paiement.php3 index 67773137d29..ed65bdad973 100644 --- a/htdocs/compta/paiement.php3 +++ b/htdocs/compta/paiement.php3 @@ -73,7 +73,7 @@ if ($action == 'create') { $sql = "SELECT s.nom,s.idp, f.amount, f.total, f.facnumber"; - $sql .= " FROM societe as s, llx_facture as f WHERE f.fk_soc = s.idp"; + $sql .= " FROM llx_societe as s, llx_facture as f WHERE f.fk_soc = s.idp"; $sql .= " AND f.rowid = $facid"; $result = $db->query($sql); diff --git a/htdocs/fourn/contact.php3 b/htdocs/fourn/contact.php3 index d0e3afbd5af..d06f8cf841e 100644 --- a/htdocs/fourn/contact.php3 +++ b/htdocs/fourn/contact.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ * * 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 @@ -18,6 +15,9 @@ * 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("./pre.inc.php3"); @@ -75,7 +75,7 @@ print ""; $sql = "SELECT s.idp, s.nom, st.libelle as stcomm, p.idp as cidp, p.name, p.firstname, p.email, p.phone "; -$sql .= "FROM societe as s, socpeople as p, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.idp = p.fk_soc"; +$sql .= "FROM llx_societe as s, socpeople as p, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.idp = p.fk_soc"; if (strlen($stcomm)) { $sql .= " AND s.fk_stcomm=$stcomm";