Look: Modif esthétiques mineures
This commit is contained in:
parent
2cf07a0e46
commit
95220058bc
@ -19,7 +19,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -28,135 +27,135 @@ llxHeader();
|
|||||||
|
|
||||||
if ($id)
|
if ($id)
|
||||||
{
|
{
|
||||||
$title = title_url($id, $db);
|
$title = title_url($id, $db);
|
||||||
|
|
||||||
print_barre_liste($title, $page, "index.php");
|
print_barre_liste($title, $page, "index.php");
|
||||||
|
|
||||||
$sql = "SELECT products_id FROM ".OSC_DB_NAME.".products_to_categories WHERE categories_id = $id";
|
$sql = "SELECT products_id FROM ".OSC_DB_NAME.".products_to_categories WHERE categories_id = $id";
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$numprod = $db->num_rows();
|
$numprod = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$wc = "(";
|
$wc = "(";
|
||||||
while ($i < $numprod)
|
while ($i < $numprod)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
$wc .= $objp->products_id;
|
$wc .= $objp->products_id;
|
||||||
if ($i < $numprod -1)
|
if ($i < $numprod -1)
|
||||||
{
|
{
|
||||||
$wc .= ",";
|
$wc .= ",";
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$wc .=")";
|
$wc .=")";
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
// print $wc ;
|
// print $wc ;
|
||||||
|
|
||||||
if ($numprod)
|
if ($numprod)
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT l.rowid, l.title, l.oscid, l.ref, l.status FROM ".MAIN_DB_PREFIX."livre as l";
|
$sql = "SELECT l.rowid, l.title, l.oscid, l.ref, l.status FROM ".MAIN_DB_PREFIX."livre as l";
|
||||||
$sql .= " WHERE l.oscid in $wc";
|
$sql .= " WHERE l.oscid in $wc";
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
print "<tr class=\"liste_titre\"><td>".$langs->trans("Ref")."</td>";
|
print "<tr class=\"liste_titre\"><td>".$langs->trans("Ref")."</td>";
|
||||||
print_liste_field_titre("Titre","index.php", "l.title");
|
print_liste_field_titre("Titre","index.php", "l.title");
|
||||||
print '<td colspan="3"> </td>';
|
print '<td colspan="3"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?id='.$objp->rowid.'">'.$objp->ref.'</a></TD>';
|
print '<td><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?id='.$objp->rowid.'">'.$objp->ref.'</a></TD>';
|
||||||
print '<td width="70%"><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?id='.$objp->rowid.'">'.$objp->title.'</a></TD>';
|
print '<td width="70%"><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?id='.$objp->rowid.'">'.$objp->title.'</a></TD>';
|
||||||
|
|
||||||
if ($objp->status == 1)
|
if ($objp->status == 1)
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green.png" border="0"></a></td>';
|
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green.png" border="0"></a></td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_red_light.png" border="0"></a></td>';
|
print '<img src="/theme/'.$conf->theme.'/img/icon_status_red_light.png" border="0"></a></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green_light.png" border="0"></a></td>';
|
print '<img src="/theme/'.$conf->theme.'/img/icon_status_green_light.png" border="0"></a></td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<img src="/theme/'.$conf->theme.'/img/icon_status_red.png" border="0"></a></td>';
|
print '<img src="/theme/'.$conf->theme.'/img/icon_status_red.png" border="0"></a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<a href="'.OSC_CATALOG_URL.'product_info.php?products_id='.$objp->oscid.'">Fiche en ligne</a></TD>';
|
print '<a href="'.OSC_CATALOG_URL.'product_info.php?products_id='.$objp->oscid.'">Fiche en ligne</a></TD>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</TABLE>";
|
print "</TABLE>";
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Aucun produits dans cette catégorie";
|
print "Aucun produits dans cette catégorie";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
print_barre_liste("Liste des catégories", $page, "index.php");
|
print_barre_liste("Liste des catégories", $page, "index.php");
|
||||||
|
|
||||||
$sql = "SELECT c.categories_id, cd.categories_name ";
|
$sql = "SELECT c.categories_id, cd.categories_name ";
|
||||||
$sql .= " FROM ".OSC_DB_NAME.".categories as c,".OSC_DB_NAME.".categories_description as cd";
|
$sql .= " FROM ".OSC_DB_NAME.".categories as c,".OSC_DB_NAME.".categories_description as cd";
|
||||||
$sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".OSC_LANGUAGE_ID;
|
$sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".OSC_LANGUAGE_ID;
|
||||||
$sql .= " AND c.parent_id = 0";
|
$sql .= " AND c.parent_id = 0";
|
||||||
$sql .= " ORDER BY cd.categories_name ASC ";
|
$sql .= " ORDER BY cd.categories_name ASC ";
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre("Titre","index.php", "a.title");
|
print_liste_field_titre("Titre","index.php", "a.title");
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
printc($objp->categories_id,$db, 0);
|
printc($objp->categories_id,$db, 0);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</TABLE>";
|
print "</TABLE>";
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -166,45 +165,45 @@ llxFooter("<em>Dernière modification $Date$ révision $Revision$</e
|
|||||||
function printc($id, $db, $level)
|
function printc($id, $db, $level)
|
||||||
{
|
{
|
||||||
|
|
||||||
$cat = new Categorie($db);
|
$cat = new Categorie($db);
|
||||||
$cat->fetch($id);
|
$cat->fetch($id);
|
||||||
|
|
||||||
print "<TR $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
|
|
||||||
for ($i = 0 ; $i < $level ; $i++)
|
for ($i = 0 ; $i < $level ; $i++)
|
||||||
{
|
{
|
||||||
print " |--";
|
print " |--";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<a href="index.php?id='.$cat->id.'">'.$cat->name."</a></TD>\n";
|
print '<a href="index.php?id='.$cat->id.'">'.$cat->name."</a></td>\n";
|
||||||
print "</TR>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$childs = array();
|
$childs = array();
|
||||||
$childs = $cat->liste_childs_array();
|
$childs = $cat->liste_childs_array();
|
||||||
if (sizeof($childs))
|
if (sizeof($childs))
|
||||||
{
|
{
|
||||||
foreach($childs as $key => $value)
|
foreach($childs as $key => $value)
|
||||||
{
|
{
|
||||||
printc($key,$db, $level+1);
|
printc($key,$db, $level+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function title_url($id, $db)
|
function title_url($id, $db)
|
||||||
{
|
{
|
||||||
|
|
||||||
$cat = new Categorie($db);
|
$cat = new Categorie($db);
|
||||||
$cat->fetch($id);
|
$cat->fetch($id);
|
||||||
|
|
||||||
$title = $title . '<a href="index.php?id='.$cat->id.'">'. $cat->name ."</a>";
|
$title = $title . '<a href="index.php?id='.$cat->id.'">'. $cat->name ."</a>";
|
||||||
|
|
||||||
|
|
||||||
if (sizeof($cat->parent_id))
|
if (sizeof($cat->parent_id))
|
||||||
{
|
{
|
||||||
$title = title_url($cat->parent_id, $db) . " / ".$title;
|
$title = title_url($cat->parent_id, $db) . " / ".$title;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $title;
|
return $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -41,11 +41,11 @@ if (!$user->rights->produit->lire)
|
|||||||
|
|
||||||
llxHeader("","",$langs->trans("ProductsAndServices"));
|
llxHeader("","",$langs->trans("ProductsAndServices"));
|
||||||
|
|
||||||
print_titre($langs->trans("ProductsAndServicesArea"));
|
print_fiche_titre($langs->trans("ProductsAndServicesArea"));
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%">';
|
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Zone recherche produit/service
|
* Zone recherche produit/service
|
||||||
@ -65,6 +65,8 @@ print "</table></form><br>";
|
|||||||
* Nombre de produits et/ou services
|
* Nombre de produits et/ou services
|
||||||
*/
|
*/
|
||||||
$prodser = array();
|
$prodser = array();
|
||||||
|
$prodser[0][0]=$prodser[0][1]=$prodser[1][0]=$prodser[1][1]=0;
|
||||||
|
|
||||||
$sql = "SELECT count(*), fk_product_type, envente FROM ".MAIN_DB_PREFIX."product as p GROUP BY fk_product_type, envente";
|
$sql = "SELECT count(*), fk_product_type, envente FROM ".MAIN_DB_PREFIX."product as p GROUP BY fk_product_type, envente";
|
||||||
if ($db->query($sql))
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
@ -101,7 +103,7 @@ if ($conf->service->enabled)
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%">';
|
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user