diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php
index 3e5e3c9ad1e..12c2e68941a 100644
--- a/htdocs/fourn/contact.php
+++ b/htdocs/fourn/contact.php
@@ -36,13 +36,11 @@ $langs->load("companies");
llxHeader();
-/*
- * S�curit� acc�s client
- */
+// Security check
if ($user->societe_id > 0)
{
- $action = '';
- $socid = $user->societe_id;
+ $action = '';
+ $socid = $user->societe_id;
}
$sortfield = GETPOST("sortfield",'alpha');
@@ -59,7 +57,6 @@ $limit = $conf->liste_limit;
/*
* Mode liste
- *
*/
$sql = "SELECT s.rowid as socid, s.nom, st.libelle as stcomm, p.rowid as cidp, p.name, p.firstname, p.email, p.phone";
@@ -70,65 +67,66 @@ $sql .= " WHERE s.fk_stcomm = st.id AND s.fournisseur = 1 AND s.rowid = p.fk_soc
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if (dol_strlen($stcomm)) {
- $sql .= " AND s.fk_stcomm=$stcomm";
+ $sql .= " AND s.fk_stcomm=$stcomm";
}
if (dol_strlen($begin)) {
- $sql .= " AND p.name like '$begin%'";
+ $sql .= " AND p.name like '$begin%'";
}
if ($contactname) {
- $sql .= " AND p.name like '%".strtolower($contactname)."%'";
- $sortfield = "p.name";
- $sortorder = "ASC";
+ $sql .= " AND p.name like '%".strtolower($contactname)."%'";
+ $sortfield = "p.name";
+ $sortorder = "ASC";
}
if ($socid) {
- $sql .= " AND s.rowid = ".$socid;
+ $sql .= " AND s.rowid = ".$socid;
}
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
$result = $db->query($sql);
-if ($result) {
- $num = $db->num_rows($result);
+if ($result)
+{
+ $num = $db->num_rows($result);
- print_barre_liste($langs->trans("ListOfContacts")." (".$langs->trans("Suppliers").")",$page, "contact.php", "",$sortfield,$sortorder,"",$num);
+ print_barre_liste($langs->trans("ListOfContacts")." (".$langs->trans("Suppliers").")",$page, "contact.php", "",$sortfield,$sortorder,"",$num);
- print '
';
- print '';
- print_liste_field_titre($langs->trans("Lastname"),"contact.php","p.name", $begin, "", "", $sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Firstname"),"contact.php","p.firstname", $begin, "", "", $sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Company"),"contact.php","s.nom", $begin, "", "", $sortfield,$sortorder);
- print '| '.$langs->trans("Email").' | ';
- print ''.$langs->trans("Phone").' | ';
- print "
\n";
- $var=True;
- $i = 0;
- while ($i < min($num,$limit))
+ print '';
+ print '';
+ print_liste_field_titre($langs->trans("Lastname"),"contact.php","p.name", $begin, "", "", $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Firstname"),"contact.php","p.firstname", $begin, "", "", $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Company"),"contact.php","s.nom", $begin, "", "", $sortfield,$sortorder);
+ print '| '.$langs->trans("Email").' | ';
+ print ''.$langs->trans("Phone").' | ';
+ print "
\n";
+ $var=True;
+ $i = 0;
+ while ($i < min($num,$limit))
{
- $obj = $db->fetch_object($result);
+ $obj = $db->fetch_object($result);
- $var=!$var;
+ $var=!$var;
- print "";
+ print "
";
- print '| '.img_object($langs->trans("ShowContact"),"contact").' '.$obj->name.' | ';
- print ''.$obj->firstname.' | ';
- print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.' | ';
- print ''.$obj->email.' | ';
- print ''.$obj->phone.' | ';
+ print ''.img_object($langs->trans("ShowContact"),"contact").' '.$obj->name.' | ';
+ print ''.$obj->firstname.' | ';
+ print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.' | ';
+ print ''.$obj->email.' | ';
+ print ''.$obj->phone.' | ';
- print "
\n";
- $i++;
+ print "\n";
+ $i++;
}
- print "
";
- $db->free($result);
+ print "
";
+ $db->free($result);
}
else
{
- dol_print_error($db);
+ dol_print_error($db);
}
$db->close();
diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php
index dadf77ae459..0c311972769 100644
--- a/htdocs/fourn/fiche.php
+++ b/htdocs/fourn/fiche.php
@@ -91,7 +91,7 @@ if ( $societe->fetch($socid) )
print '';
print '';
- print '| '.$langs->trans("Name").' | ';
+ print ' | | '.$langs->trans("ThirdPartyName").' | ';
$societe->next_prev_filter="te.fournisseur = 1";
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print ' | ';
diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php
index 1db0283d895..92b212e0c58 100644
--- a/htdocs/societe/agenda.php
+++ b/htdocs/societe/agenda.php
@@ -80,7 +80,7 @@ if ($_GET["socid"])
print '';
- print '| '.$langs->trans("Name").' | ';
+ print ' | | '.$langs->trans("ThirdPartyName").' | ';
print $html->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' | ';
diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php
index 62fd38af2ca..7415187f9d6 100644
--- a/htdocs/societe/commerciaux.php
+++ b/htdocs/societe/commerciaux.php
@@ -108,7 +108,7 @@ if ($_GET["socid"])
print '';
- print '| '.$langs->trans('Name').' | ';
+ print ' | '.$langs->trans('ThirdPartyName').' | ';
print '';
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' | ';
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 8214918e0df..36f9f87ed23 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -152,7 +152,7 @@ if ($socid > 0)
print '';
// Ref
- print '| '.$langs->trans("Name").' | ';
+ print ' | '.$langs->trans("ThirdPartyName").' | ';
print '';
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' | ';
diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php
index 466db0de1cd..708c62974f5 100644
--- a/htdocs/societe/lien.php
+++ b/htdocs/societe/lien.php
@@ -111,7 +111,7 @@ if($_GET["socid"])
print '';
- print '| '.$langs->trans('Name').' | ';
+ print ' | '.$langs->trans('ThirdPartyName').' | ';
print '';
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' | ';
diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php
index 2810c949f29..dc5dcf98b8e 100644
--- a/htdocs/societe/notify/fiche.php
+++ b/htdocs/societe/notify/fiche.php
@@ -113,7 +113,7 @@ if ( $soc->fetch($soc->id) )
print '';
- print '| '.$langs->trans("Name").' | ';
+ print ' | | '.$langs->trans("ThirdPartyName").' | ';
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' | ';
diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php
index f901dca092d..326e0b31078 100644
--- a/htdocs/societe/socnote.php
+++ b/htdocs/societe/socnote.php
@@ -84,7 +84,7 @@ if ($socid > 0)
print '';
- print '| '.$langs->trans('Name').' | ';
+ print ' | '.$langs->trans('ThirdPartyName').' | ';
print '';
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' | ';
|