*** empty log message ***
This commit is contained in:
parent
5e47c3f791
commit
66b02671a5
@ -48,34 +48,43 @@ print_barre_liste("Liste des contacts",$page, $PHP_SELF);
|
|||||||
$sql = "SELECT s.idp, s.nom, st.libelle as stcomm, p.idp as cidp, p.name, p.firstname, p.email, p.phone ";
|
$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 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)) {
|
if (strlen($stcomm)) // statut commercial
|
||||||
|
{
|
||||||
$sql .= " AND s.fk_stcomm=$stcomm";
|
$sql .= " AND s.fk_stcomm=$stcomm";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($begin)) {
|
if (strlen($begin)) // filtre sur la premiere lettre du nom
|
||||||
|
{
|
||||||
$sql .= " AND upper(p.name) like '$begin%'";
|
$sql .= " AND upper(p.name) like '$begin%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($contactname) {
|
if ($contactname) // acces a partir du module de recherche
|
||||||
$sql .= " AND lower(p.name) like '%".strtolower($contactname)."%'";
|
{
|
||||||
|
$sql .= " AND ( lower(p.name) like '%".strtolower($contactname)."%' OR lower(p.firstname) like '%".strtolower($contactname)."%') ";
|
||||||
$sortfield = "lower(p.name)";
|
$sortfield = "lower(p.name)";
|
||||||
$sortorder = "ASC";
|
$sortorder = "ASC";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($socid) {
|
if ($socid)
|
||||||
|
{
|
||||||
$sql .= " AND s.idp = $socid";
|
$sql .= " AND s.idp = $socid";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($sortorder == "DESC") {
|
if ($sortorder == "DESC")
|
||||||
|
{
|
||||||
$sortorder="ASC";
|
$sortorder="ASC";
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$sortorder="DESC";
|
$sortorder="DESC";
|
||||||
}
|
}
|
||||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||||
@ -87,7 +96,8 @@ if ($result) {
|
|||||||
print '<TD>Téléphone</TD><td> </td>';
|
print '<TD>Téléphone</TD><td> </td>';
|
||||||
print "</TR>\n";
|
print "</TR>\n";
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num) {
|
while ($i < $num)
|
||||||
|
{
|
||||||
$obj = $db->fetch_object( $i);
|
$obj = $db->fetch_object( $i);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -93,9 +93,12 @@ function top_menu($head) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<TD width="15%" class="menu" align="center">';
|
print '<TD width="15%" class="menu" align="center">';
|
||||||
if ($user->compta > 0) {
|
if ($user->compta > 0)
|
||||||
|
{
|
||||||
print '<A class="menu" href="/compta/">Compta</A></TD>';
|
print '<A class="menu" href="/compta/">Compta</A></TD>';
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '-';
|
print '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +126,8 @@ function top_menu($head) {
|
|||||||
print "<TR><TD valign=\"top\" align=\"right\">";
|
print "<TR><TD valign=\"top\" align=\"right\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
function left_menu($menu) {
|
function left_menu($menu)
|
||||||
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
/*
|
/*
|
||||||
* Colonne de gauche
|
* Colonne de gauche
|
||||||
@ -134,12 +138,14 @@ function left_menu($menu) {
|
|||||||
print '<TABLE border="0" width="100%" cellspacing="1" cellpadding="4">';
|
print '<TABLE border="0" width="100%" cellspacing="1" cellpadding="4">';
|
||||||
|
|
||||||
|
|
||||||
for ($i = 0 ; $i < sizeof($menu) ; $i++) {
|
for ($i = 0 ; $i < sizeof($menu) ; $i++)
|
||||||
|
{
|
||||||
|
|
||||||
print "<TR><TD class=\"barre\" valign=\"top\">";
|
print "<TR><TD class=\"barre\" valign=\"top\">";
|
||||||
print '<A class="menu" href="'.$menu[$i][0].'">'.$menu[$i][1].'</a>';
|
print '<A class="menu" href="'.$menu[$i][0].'">'.$menu[$i][1].'</a>';
|
||||||
|
|
||||||
for ($j = 2 ; $j < sizeof($menu[$i]) - 1 ; $j = $j +2) {
|
for ($j = 2 ; $j < sizeof($menu[$i]) - 1 ; $j = $j +2)
|
||||||
|
{
|
||||||
print '<br> - <a class="submenu" href="'.$menu[$i][$j].'">'.$menu[$i][$j+1].'</A>';
|
print '<br> - <a class="submenu" href="'.$menu[$i][$j].'">'.$menu[$i][$j+1].'</A>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -148,7 +154,7 @@ function left_menu($menu) {
|
|||||||
|
|
||||||
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
print "<TR><TD class=\"barre\" valign=\"top\" align=\"right\">";
|
||||||
print '<A class="menu" href="/comm/clients.php3">Societes</A>';
|
print '<A class="menu" href="/comm/clients.php3">Societes</A>';
|
||||||
print '<form action="/comm/index.php3">';
|
print '<form action="/comm/clients.php3">';
|
||||||
print '<input type="hidden" name="mode" value="search">';
|
print '<input type="hidden" name="mode" value="search">';
|
||||||
print '<input type="hidden" name="mode-search" value="soc">';
|
print '<input type="hidden" name="mode-search" value="soc">';
|
||||||
print '<input type="text" name="socname" size="8"> ';
|
print '<input type="text" name="socname" size="8"> ';
|
||||||
@ -174,7 +180,8 @@ function left_menu($menu) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function llxFooter($foot='') {
|
function llxFooter($foot='')
|
||||||
|
{
|
||||||
print "</TD></TR>";
|
print "</TD></TR>";
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user