Fix: Correction des mauvaises utilisations des fetch_objet ou on passait un paramtre jamais utilis.
This commit is contained in:
parent
56b10d863f
commit
543c65cb84
@ -21,6 +21,8 @@
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
llxHeader();
|
||||
|
||||
/*
|
||||
@ -103,15 +105,15 @@ if ($result) {
|
||||
} else {
|
||||
$sortorder="DESC";
|
||||
}
|
||||
print '<p><table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print "<TR class=\"liste_titre\">";
|
||||
print "<TD>";
|
||||
print_liste_field_titre("Nom","contact.php","lower(p.name)", $begin);
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td>";
|
||||
print_liste_field_titre($langs->trans("Lastname"),"contact.php","lower(p.name)", $begin);
|
||||
print "</td><td>";
|
||||
print_liste_field_titre("Prénom","contact.php","lower(p.firstname)", $begin);
|
||||
print_liste_field_titre($langs->trans("Firstname"),"contact.php","lower(p.firstname)", $begin);
|
||||
print "</td><td>";
|
||||
print_liste_field_titre("Société","contact.php","lower(s.nom)", $begin);
|
||||
print '</td><td>email</td><td>Téléphone</td>';
|
||||
print_liste_field_titre($langs->trans("Company"),"contact.php","lower(s.nom)", $begin);
|
||||
print '</td><td>'.$langs->trans("Email").'</td><td>'.$langs->trans("Phone").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
$i = 0;
|
||||
@ -121,20 +123,20 @@ if ($result) {
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<TR $bc[$var]>";
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td width="13%">'.$obj->name.'</td>';
|
||||
print '<td width="13%">'.$obj->firstname.'</td>';
|
||||
|
||||
print '<TD><a href="contact.php?socid='.$obj->idp.'"><img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filter.png" border="0"></a> ';
|
||||
print "<a href=\"fiche.php?socid=$obj->idp\">$obj->nom</A></td>\n";
|
||||
print "<TD>$obj->email </TD>\n";
|
||||
print '<td><a href="contact.php?socid='.$obj->idp.'"><img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filter.png" border="0"></a> ';
|
||||
print "<a href=\"fiche.php?socid=$obj->idp\">$obj->nom</a></td>\n";
|
||||
print "<td>$obj->email </td>\n";
|
||||
print '<td>'.$obj->phone.'</td>';
|
||||
|
||||
print "</TR>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</TABLE>";
|
||||
print "</table>";
|
||||
$db->free();
|
||||
} else {
|
||||
print_barre_liste("Liste des contacts $label",$page, "contact.php");
|
||||
|
||||
@ -218,7 +218,7 @@ if ($_GET["action"] == 'create' or $_GET["action"] == 'copy')
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$obj = $db->fetch_object();
|
||||
print '<option value="'.$obj->idp;
|
||||
|
||||
if ($_GET["socid"] == $obj->idp)
|
||||
@ -464,7 +464,7 @@ else
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$objp = $db->fetch_object();
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td>".strftime("%d %B %Y",$objp->dp)."</TD>\n";
|
||||
|
||||
@ -68,7 +68,7 @@ if ($mode == 'search')
|
||||
{
|
||||
if ( $db->num_rows() == 1)
|
||||
{
|
||||
$obj = $db->fetch_object(0);
|
||||
$obj = $db->fetch_object();
|
||||
$socid = $obj->idp;
|
||||
}
|
||||
$db->free();
|
||||
@ -148,7 +148,7 @@ if ($result)
|
||||
$var=True;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$obj = $db->fetch_object();
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
@ -84,7 +84,7 @@ if ($action == 'create')
|
||||
$num = $db->num_rows();
|
||||
if ($num)
|
||||
{
|
||||
$obj = $db->fetch_object( 0);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$total = $obj->total_ttc;
|
||||
|
||||
@ -136,7 +136,7 @@ if ($action == 'create')
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objopt = $db->fetch_object($i);
|
||||
$objopt = $db->fetch_object();
|
||||
print "<option value=\"$objopt->id\">$objopt->libelle</option>\n";
|
||||
$i++;
|
||||
}
|
||||
@ -158,7 +158,7 @@ if ($action == 'create')
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objopt = $db->fetch_object( $i);
|
||||
$objopt = $db->fetch_object();
|
||||
print '<option value="'.$objopt->rowid.'"';
|
||||
if (defined("FACTURE_RIB_NUMBER") && FACTURE_RIB_NUMBER == $objopt->rowid)
|
||||
{
|
||||
@ -223,7 +223,7 @@ if ($action == '') {
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"fiche.php?facid=$objp->facid\">$objp->facnumber</a></td>\n";
|
||||
@ -238,7 +238,7 @@ if ($action == '') {
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ if ( $societe->fetch($socid) )
|
||||
}
|
||||
while ($i < $num && $i < 5)
|
||||
{
|
||||
$obj = $db->fetch_object( $i);
|
||||
$obj = $db->fetch_object();
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
@ -182,7 +182,7 @@ if ( $societe->fetch($socid) )
|
||||
$var=1;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object( $i);
|
||||
$obj = $db->fetch_object();
|
||||
$var = !$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
@ -20,8 +20,12 @@
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require("../contact.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
llxHeader();
|
||||
|
||||
/*
|
||||
@ -84,7 +88,7 @@ if ($mode == 'search') {
|
||||
|
||||
if ( $db->query($sql) ) {
|
||||
if ( $db->num_rows() == 1) {
|
||||
$obj = $db->fetch_object(0);
|
||||
$obj = $db->fetch_object();
|
||||
$socid = $obj->idp;
|
||||
}
|
||||
$db->free();
|
||||
@ -153,16 +157,16 @@ if ($result)
|
||||
{
|
||||
$sortorder="DESC";
|
||||
}
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td valign="center">';
|
||||
print_liste_field_titre("Société","index.php","s.nom");
|
||||
print "</td><td>Ville</td>";
|
||||
print_liste_field_titre($langs->trans("Company"),"index.php","s.nom");
|
||||
print '</td><td>'.$langs->trans("Town").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$obj = $db->fetch_object();
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
@ -177,7 +181,7 @@ if ($result)
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error() . ' ' . $sql;
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -90,13 +90,13 @@ if ($socid > 0) {
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$objsoc = $db->fetch_object( 0);
|
||||
$objsoc = $db->fetch_object($result);
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n";
|
||||
print "<table width=\"100%\" border=\"0\">\n";
|
||||
print "<tr><td><div class=\"titre\">Contacts pour la société : <a href=\"fiche.php?socid=$objsoc->idp\">$objsoc->nom</a></div></td>";
|
||||
print "<td align=\"center\">[<a href=\"people.php?socid=$socid&action=addcontact\">Ajouter un contact</a>]</td>";
|
||||
print '</td></tr></table>';
|
||||
@ -148,7 +148,7 @@ if ($socid > 0) {
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object( $i);
|
||||
$obj = $db->fetch_object();
|
||||
$var != $var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
@ -192,7 +192,7 @@ if ($socid > 0) {
|
||||
$result = $db->query($sql);
|
||||
$num = $db->num_rows();
|
||||
if ( $num >0 ) {
|
||||
$obj = $db->fetch_object( 0);
|
||||
$obj = $db->fetch_object();
|
||||
}
|
||||
|
||||
print "<form method=\"post\" action=\"people.php?socid=$socid\">";
|
||||
@ -236,7 +236,7 @@ if ($socid > 0) {
|
||||
if ( $db->query($sql) ) {
|
||||
$i = 0 ; $num = $db->num_rows(); $tag = True;
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object( $i);
|
||||
$obj = $db->fetch_object();
|
||||
if ($tag) {
|
||||
print "<tr bgcolor=\"e0e0e0\">";
|
||||
} else {
|
||||
|
||||
@ -56,7 +56,7 @@ if ( $db->query($sql) )
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$objp = $db->fetch_object();
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user