* Copyright (C) 2007 Laurent Destailleur * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ */ require("./pre.inc.php"); $langs->load("companies"); llxHeader(); if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; print_barre_liste("Liste des articles de la boutique web", $page, "index.php"); set_magic_quotes_runtime(0); //WebService Client. require_once(NUSOAP_PATH."nusoap.php"); require_once("../includes/configure.php"); // Set the parameters to send to the WebService $parameters = array(); // Set the WebService URL $client = new nusoap_client(OSCWS_DIR."ws_articles.php"); if ($client) { $client->soap_defencoding='UTF-8'; } $result = $client->call("get_listearticles",$parameters ); if ($client->fault) { dol_print_error('',"erreur de connexion "); } elseif (!($err = $client->getError()) ) { $num=0; if ($result) $num = sizeof($result); $var=True; $i=0; // un produit osc $OscProd = new Osc_Product($db); if ($num > 0) { print ""; print ''; print ""; print ""; print ""; print ""; print ""; print ''; print ''; print ''; print "\n"; while ($i < $num) { $var=!$var; $prodid = $OscProd->get_productid($result[$i][OSC_id]); print ""; print '\n"; print '\n"; print ''; print "\n"; print "\n"; print '\n"; print '\n"; if ($prodid) $lib = "modifier"; else $lib = "importer"; print '\n"; print ''."\n"; $i++; } print "
idRefProductIdTitreGroupeStockStatusImporter
'.$result[$i][OSC_id]."'.$result[$i][model]."'.$prodid.'".$result[$i][name]."".$result[$i][manufacturer]."'.$result[$i][quantity]."'.$result[$i][status]."".$lib."

"; } else { dol_print_error('',"Aucun article trouvé"); } } else { print $client->getHTTPBody($client->response); } print ""; llxFooter('$Date$ - $Revision$'); ?>