Correction des tris par défaut
This commit is contained in:
parent
16717b17bd
commit
9b84730e45
@ -27,6 +27,13 @@ $user->getrights('fichinter');
|
|||||||
$user->getrights('commande');
|
$user->getrights('commande');
|
||||||
$user->getrights('projet');
|
$user->getrights('projet');
|
||||||
|
|
||||||
|
if ($_GET["action"] == 'cstc')
|
||||||
|
{
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm = ".$_GET["pstcomm"];
|
||||||
|
$sql .= " WHERE idp = ".$_GET["pid"];
|
||||||
|
$db->query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sécurité accés client
|
* Sécurité accés client
|
||||||
@ -78,10 +85,10 @@ if ($sortorder == "")
|
|||||||
}
|
}
|
||||||
if ($sortfield == "")
|
if ($sortfield == "")
|
||||||
{
|
{
|
||||||
$sortfield="s.datec";
|
$sortfield="s.nom";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset);
|
$sql .= " ORDER BY $sortfield $sortorder, s.nom ASC " . $db->plimit($conf->liste_limit +1, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -98,11 +105,13 @@ if ($result)
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$urladd="page=$page&stcomm=$stcomm&sortfield=$sortfield&sortorder=$sortorder&begin=$begin";
|
||||||
|
|
||||||
print_barre_liste("Liste des prospects", $page, $PHP_SELF,"",$sortfield,$sortorder,'',$num);
|
print_barre_liste("Liste des prospects", $page, $PHP_SELF,"",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
print '<div align="center">';
|
print '<div align="center">';
|
||||||
|
|
||||||
print "| <A href=\"$PHP_SELF?page=$pageprev&stcomm=$stcomm&sortfield=$sortfield&sortorder=$sortorder&aclasser=$aclasser&coord=$coord\">*</A>\n| ";
|
print "| <A href=\"$PHP_SELF?page=$pageprev&stcomm=$stcomm&sortfield=$sortfield&sortorder=$sortorder\">*</A>\n| ";
|
||||||
for ($ij = 65 ; $ij < 91; $ij++) {
|
for ($ij = 65 ; $ij < 91; $ij++) {
|
||||||
print "<A href=\"$PHP_SELF?begin=" . chr($ij) . "&stcomm=$stcomm\" class=\"T3\">";
|
print "<A href=\"$PHP_SELF?begin=" . chr($ij) . "&stcomm=$stcomm\" class=\"T3\">";
|
||||||
|
|
||||||
@ -180,7 +189,7 @@ if ($result)
|
|||||||
{
|
{
|
||||||
if ($value <> $obj->fk_stcomm)
|
if ($value <> $obj->fk_stcomm)
|
||||||
{
|
{
|
||||||
print '<td><a href="fiche.php?id='.$obj->idp.'&stcomm=-1&action=cstc">';
|
print '<td><a href="prospects.php?pid='.$obj->idp.'&pstcomm='.$value.'&action=cstc&'.$urladd.'">';
|
||||||
print '<img align="absmiddle" src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/stcomm'.$value.'.png" border="0" alt="'.$alt.'">';
|
print '<img align="absmiddle" src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/stcomm'.$value.'.png" border="0" alt="'.$alt.'">';
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user