doxygen
This commit is contained in:
parent
433cc236a6
commit
3731419531
@ -18,11 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/comm/clients.php
|
\file htdocs/comm/clients.php
|
||||||
\ingroup commercial, societe
|
\ingroup commercial, societe
|
||||||
\brief Liste des clients
|
\brief Liste des clients
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
@ -69,9 +69,9 @@ if ($search_code) $sql .= " AND s.code_client like '%".addslashes(strtolower($s
|
|||||||
|
|
||||||
if ($socname)
|
if ($socname)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.nom like '%".addslashes(strtolower($socname))."%'";
|
$sql .= " AND s.nom like '%".addslashes(strtolower($socname))."%'";
|
||||||
$sortfield = "s.nom";
|
$sortfield = "s.nom";
|
||||||
$sortorder = "ASC";
|
$sortorder = "ASC";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
@ -87,72 +87,72 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1,
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_ville=".$search_ville;
|
$param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_ville=".$search_ville;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<form method="get" action="clients.php">'."\n";
|
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
print '<table class="liste">'."\n";
|
print '<table class="liste">'."\n";
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Company"),"clients.php","s.nom","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),"clients.php","s.nom","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Town"),"clients.php","s.ville","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Town"),"clients.php","s.ville","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("CustomerCode"),"clients.php","s.code_client","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("CustomerCode"),"clients.php","s.code_client","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),"clients.php","datec","",$param,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateCreation"),"clients.php","datec","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_nom" value="'.$search_nom.'">';
|
print '<input type="text" class="flat" name="search_nom" value="'.$search_nom.'">';
|
||||||
print '</td><td class="liste_titre">';
|
print '</td><td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_ville" value="'.$search_ville.'" size="10">';
|
print '<input type="text" class="flat" name="search_ville" value="'.$search_ville.'" size="10">';
|
||||||
print '</td><td class="liste_titre">';
|
print '</td><td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_code" value="'.$search_code.'" size="10">';
|
print '<input type="text" class="flat" name="search_code" value="'.$search_code.'" size="10">';
|
||||||
print '</td><td class="liste_titre"> </td>';
|
print '</td><td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="center"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'"></td>';
|
print '<td class="liste_titre" align="center"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
while ($i < min($num,$conf->liste_limit))
|
while ($i < min($num,$conf->liste_limit))
|
||||||
{
|
|
||||||
$obj = $db->fetch_object($result);
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">';
|
|
||||||
print img_object($langs->trans("ShowCustomer"),"company");
|
|
||||||
print '</a> <a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">'.stripslashes($obj->nom).'</a></td>';
|
|
||||||
print '<td>'.$obj->ville.'</td>';
|
|
||||||
print '<td>'.$obj->code_client.'</td>';
|
|
||||||
print '<td align="center">'.dolibarr_print_date($obj->datec).'</td>';
|
|
||||||
print '<td align="center">';
|
|
||||||
if (defined("MAIN_MODULE_DOSSIER") && MAIN_MODULE_DOSSIER == 1)
|
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/dossier/client/fiche.php?id='.$obj->rowid.'">';
|
$obj = $db->fetch_object($result);
|
||||||
print img_folder();
|
|
||||||
print '</a>';
|
$var=!$var;
|
||||||
|
|
||||||
|
print "<tr $bc[$var]>";
|
||||||
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">';
|
||||||
|
print img_object($langs->trans("ShowCustomer"),"company");
|
||||||
|
print '</a> <a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->rowid.'">'.stripslashes($obj->nom).'</a></td>';
|
||||||
|
print '<td>'.$obj->ville.'</td>';
|
||||||
|
print '<td>'.$obj->code_client.'</td>';
|
||||||
|
print '<td align="center">'.dolibarr_print_date($obj->datec).'</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
if (defined("MAIN_MODULE_DOSSIER") && MAIN_MODULE_DOSSIER == 1)
|
||||||
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/dossier/client/fiche.php?id='.$obj->rowid.'">';
|
||||||
|
print img_folder();
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print " ";
|
||||||
|
}
|
||||||
|
print "</td></tr>\n";
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
else
|
//print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num);
|
||||||
{
|
print "</table>\n";
|
||||||
print " ";
|
print "</form>\n";
|
||||||
}
|
$db->free($result);
|
||||||
print "</td></tr>\n";
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
//print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num);
|
|
||||||
print "</table>\n";
|
|
||||||
print "</form>\n";
|
|
||||||
$db->free($result);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user