Fix: bug #21894 : liens de certains munus KO

This commit is contained in:
Laurent Destailleur 2007-12-28 16:05:16 +00:00
parent 9889e4715f
commit 940bd3d924
4 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
@ -58,10 +57,11 @@ $sql .= " FROM ".OSC_DB_NAME.".orders_total as t";
$sql .= " JOIN ".OSC_DB_NAME.".orders as o ON o.orders_id = t.orders_id";
$sql .= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR(now()) ";
$sql .= " GROUP BY mois ORDER BY mois";
if ( $dbosc->query($sql) )
$result=$dbosc->query($sql);
if ($result)
{
$num = $dbosc->num_rows();
$num = $dbosc->num_rows($result);
$var=True;
$i=0;
@ -69,7 +69,7 @@ if ( $dbosc->query($sql) )
{
while ($i < $num)
{
$objp = $dbosc->fetch_object();
$objp = $dbosc->fetch_object($result);
$var=!$var;
print "<tr $bc[$var]>";
print '<td align="left">'.$objp->mois.'</td>';

View File

@ -1,5 +1,5 @@
<?PHP
/* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,26 +16,28 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
\file htdocs/boutique/master.inc.php
\file htdocs/boutique/osc_master.inc.php
\brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce
\version $Revision$
*/
require_once(DOL_DOCUMENT_ROOT ."/lib/databases/".$conf->db->type.".lib.php");
/*
* Creation objet $dbosc
*/
$dbosc = new DoliDb($conf->db->type,$conf->global->OSC_DB_HOST,$conf->global->OSC_DB_USER,$conf->global->OSC_DB_PASS,$conf->global->OSC_DB_NAME);
if (! $dbosc->connected)
{
dolibarr_print_error($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error);
exit;
dolibarr_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR);
llxHeader("",$langs->trans("OSCommerceShop"),"");
print '<div class="error">Failed to connect to oscommerce database. Check your module setup</div>';
llxFooter();
exit;
}
?>

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**