Correction nom de table societe -> llx_societe
This commit is contained in:
parent
759982f862
commit
e2edb56ff0
@ -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)
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
/* Copyright (C) 2001-2003 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
|
||||
@ -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 '<div class="titre">Bookmark</div>';
|
||||
|
||||
$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 "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print "<TR bgcolor=\"orange\">";
|
||||
print "<TD> </TD>";
|
||||
@ -86,32 +92,38 @@ if ( $db->query($sql) ) {
|
||||
print "<TD> </TD>";
|
||||
print "</TR>\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 "<TR $bc>";
|
||||
print "<TD>" . ($i + 1 + ($limit * $page)) . "</TD>";
|
||||
print "<TD align=\"center\"><b>$obj->idp</b></TD>";
|
||||
print "<TD><a href=\"index.php3?socid=$obj->idp\">$obj->nom</A></TD>\n";
|
||||
|
||||
print "<TD align=\"center\">$obj->stcomm</TD>\n";
|
||||
print "<TD>$obj->author</TD>\n";
|
||||
print "<td>".strftime("%d %b %Y %H:%M", $obj->dateb) ."</td>";
|
||||
print "<TD>[<a href=\"$PHP_SELF?action=delete&bid=$obj->bid\">Delete</A>]</TD>\n";
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
print "<TR $bc>";
|
||||
print "<TD>" . ($i + 1 + ($limit * $page)) . "</TD>";
|
||||
print "<TD align=\"center\"><b>$obj->idp</b></TD>";
|
||||
print "<TD><a href=\"index.php3?socid=$obj->idp\">$obj->nom</A></TD>\n";
|
||||
|
||||
print "<TD align=\"center\">$obj->stcomm</TD>\n";
|
||||
print "<TD>$obj->author</TD>\n";
|
||||
print "<td>".strftime("%d %b %Y %H:%M", $obj->dateb) ."</td>";
|
||||
print "<TD>[<a href=\"$PHP_SELF?action=delete&bid=$obj->bid\">Delete</A>]</TD>\n";
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
/* Copyright (C) 2001-2003 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
|
||||
@ -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 "</tr>\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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $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 "</div>";
|
||||
|
||||
|
||||
$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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user