Ajout DOL_URL_ROOT
This commit is contained in:
parent
6780ae54d7
commit
5f7027c316
@ -118,7 +118,7 @@ if ($result)
|
|||||||
print '<TD><a href="'.DOL_URL_ROOT.'/comm/people.php3?contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->name.'</a></TD>';
|
print '<TD><a href="'.DOL_URL_ROOT.'/comm/people.php3?contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->name.'</a></TD>';
|
||||||
print "<TD>$obj->firstname</TD>";
|
print "<TD>$obj->firstname</TD>";
|
||||||
|
|
||||||
print '<TD><a href="contact.php3?socid='.$obj->idp.'"><img src="/theme/'.$conf->theme.'/img/filter.png" border="0" alt="filtrer"></a> ';
|
print '<TD><a href="contact.php3?socid='.$obj->idp.'"><img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filter.png" border="0" alt="filtrer"></a> ';
|
||||||
print "<a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
print "<a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
||||||
|
|
||||||
print '<td><a href="action/fiche.php3?action=create&actionid=4&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->email.'</a> </td>';
|
print '<td><a href="action/fiche.php3?action=create&actionid=4&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->email.'</a> </td>';
|
||||||
|
|||||||
@ -25,8 +25,6 @@ require("../contact.class.php3");
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$db = new Db();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sécurité accés client
|
* Sécurité accés client
|
||||||
*/
|
*/
|
||||||
@ -152,7 +150,7 @@ if ($socid > 0) {
|
|||||||
|
|
||||||
print "<tr><td><div class=\"titre\">Fiche fournisseur : $objsoc->nom</div></td>";
|
print "<tr><td><div class=\"titre\">Fiche fournisseur : $objsoc->nom</div></td>";
|
||||||
|
|
||||||
print '<td><a href="facture/fiche.php3?action=create&socid='.$objsoc->idp.'">Nouvelle Facture <img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Nouvelle facture"></a></td>';
|
print '<td><a href="facture/fiche.php3?action=create&socid='.$objsoc->idp.'">Nouvelle Facture <img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Nouvelle facture"></a></td>';
|
||||||
|
|
||||||
print "<td align=\"center\">[<a href=\"../soc.php3?socid=$objsoc->idp&action=edit\">Editer</a>]</td>";
|
print "<td align=\"center\">[<a href=\"../soc.php3?socid=$objsoc->idp&action=edit\">Editer</a>]</td>";
|
||||||
|
|
||||||
|
|||||||
@ -90,85 +90,89 @@ if ($mode == 'search') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mode Liste
|
* Mode Liste
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($sortorder == "")
|
if ($sortorder == "")
|
||||||
|
{
|
||||||
|
$sortorder="ASC";
|
||||||
|
}
|
||||||
|
if ($sortfield == "")
|
||||||
|
{
|
||||||
|
$sortfield="nom";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print_barre_liste("Liste des fournisseurs",$page, $PHP_SELF);
|
||||||
|
|
||||||
|
$sql = "SELECT s.idp, s.nom, s.ville,".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm FROM llx_societe as s, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.fournisseur=1";
|
||||||
|
|
||||||
|
if (strlen($stcomm)) {
|
||||||
|
$sql .= " AND s.fk_stcomm=$stcomm";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($socidp) {
|
||||||
|
$sql .= " AND s.idp=$socidp";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($begin)) {
|
||||||
|
$sql .= " AND upper(s.nom) like '$begin%'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($socname) {
|
||||||
|
$sql .= " AND lower(s.nom) like '%".strtolower($socname)."%'";
|
||||||
|
$sortfield = "lower(s.nom)";
|
||||||
|
$sortorder = "ASC";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
if ($sortorder == "DESC") {
|
||||||
|
$sortorder="ASC";
|
||||||
|
} else {
|
||||||
|
$sortorder="DESC";
|
||||||
|
}
|
||||||
|
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||||
|
print '<TR class="liste_titre"><td>';
|
||||||
|
print_liste_field_titre("Société",$PHP_SELF,"s.nom");
|
||||||
|
print "</td><TD>Ville</TD>";
|
||||||
|
print "<td colspan=\"2\"> </td>";
|
||||||
|
print "</TR>\n";
|
||||||
|
$var=True;
|
||||||
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$sortorder="ASC";
|
|
||||||
}
|
|
||||||
if ($sortfield == "")
|
|
||||||
{
|
|
||||||
$sortfield="nom";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste("Liste des fournisseurs",$page, $PHP_SELF);
|
|
||||||
|
|
||||||
$sql = "SELECT s.idp, s.nom, s.ville,".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm FROM llx_societe as s, c_stcomm as st WHERE s.fk_stcomm = st.id AND s.fournisseur=1";
|
|
||||||
|
|
||||||
if (strlen($stcomm)) {
|
|
||||||
$sql .= " AND s.fk_stcomm=$stcomm";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($socidp) {
|
|
||||||
$sql .= " AND s.idp=$socidp";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen($begin)) {
|
|
||||||
$sql .= " AND upper(s.nom) like '$begin%'";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($socname) {
|
|
||||||
$sql .= " AND lower(s.nom) like '%".strtolower($socname)."%'";
|
|
||||||
$sortfield = "lower(s.nom)";
|
|
||||||
$sortorder = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
|
||||||
|
|
||||||
$result = $db->query($sql);
|
|
||||||
if ($result) {
|
|
||||||
$num = $db->num_rows();
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
if ($sortorder == "DESC") {
|
|
||||||
$sortorder="ASC";
|
|
||||||
} else {
|
|
||||||
$sortorder="DESC";
|
|
||||||
}
|
|
||||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
|
||||||
print '<TR class="liste_titre"><td>';
|
|
||||||
print_liste_field_titre("Société",$PHP_SELF,"s.nom");
|
|
||||||
print "</td><TD>Ville</TD>";
|
|
||||||
print "<td colspan=\"2\"> </td>";
|
|
||||||
print "</TR>\n";
|
|
||||||
$var=True;
|
|
||||||
while ($i < $num) {
|
|
||||||
$obj = $db->fetch_object( $i);
|
$obj = $db->fetch_object( $i);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<TR $bc[$var]>";
|
print "<TR $bc[$var]>";
|
||||||
print "<TD><a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
print "<TD><a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</A></td>\n";
|
||||||
print "<TD>".$obj->ville."</TD>\n";
|
print "<TD>".$obj->ville."</TD>\n";
|
||||||
|
|
||||||
print "<TD align=\"center\">$obj->prefix_comm </TD>\n";
|
print "<TD align=\"center\">$obj->prefix_comm </TD>\n";
|
||||||
|
|
||||||
print '<td><a href="facture/fiche.php3?action=create&socid='.$obj->idp.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Nouvelle facture"></a></td>';
|
print '<td><a href="facture/fiche.php3?action=create&socid='.$obj->idp.'"><img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Nouvelle facture"></a></td>';
|
||||||
|
|
||||||
print "</TR>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</TABLE>";
|
print "</table>";
|
||||||
$db->free();
|
$db->free();
|
||||||
} else {
|
}
|
||||||
print $db->error();
|
else
|
||||||
}
|
{
|
||||||
|
print $db->error();
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user