[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dolibarr-dev] Dolibarr OSC
From: |
Jean |
Subject: |
[Dolibarr-dev] Dolibarr OSC |
Date: |
Wed, 27 Jun 2007 17:17:10 -1000 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20070113) |
Mise à jour de
oscommerce_ws/produits/
mise à jour de product.class.php
ajout méthode add_photo_web pour import de l'image d'un produit depuis
site OSC
diff -Naur --exclude=CVS --exclude='.#*' --exclude='*~' --exclude=documents
/home/jean/projets/dolibarr_devref/dolibarr/htdocs/oscommerce_ws/produits/categories.php
/home/jean/projets/dolibarr/htdocs/oscommerce_ws/produits/categories.php
---
/home/jean/projets/dolibarr_devref/dolibarr/htdocs/oscommerce_ws/produits/categories.php
2007-06-27 10:18:20.000000000 -1000
+++ /home/jean/projets/dolibarr/htdocs/oscommerce_ws/produits/categories.php
2007-06-27 17:01:24.202745288 -1000
@@ -15,8 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: categories.php,v 1.1 2007/06/27 20:18:20 eldy Exp $
- * $Source:
/sources/dolibarr/dolibarr/htdocs/oscommerce_ws/produits/categories.php,v $
+ * $Id: skeleton_page.php,v 1.1 2007/02/11 17:50:43 eldy Exp $
+ * $Source: /sources/dolibarr/dolibarr/dev/skeletons/skeleton_page.php,v $
*/
/**
@@ -170,5 +170,5 @@
// End of page
$db->close();
-llxFooter('$Date: 2007/06/27 20:18:20 $ - $Revision: 1.1 $');
+llxFooter('$Date: 2007/02/11 17:50:43 $ - $Revision: 1.1 $');
?>
diff -Naur --exclude=CVS --exclude='.#*' --exclude='*~' --exclude=documents
/home/jean/projets/dolibarr_devref/dolibarr/htdocs/oscommerce_ws/produits/osc_categories.class.php
/home/jean/projets/dolibarr/htdocs/oscommerce_ws/produits/osc_categories.class.php
---
/home/jean/projets/dolibarr_devref/dolibarr/htdocs/oscommerce_ws/produits/osc_categories.class.php
2007-06-27 10:18:20.000000000 -1000
+++
/home/jean/projets/dolibarr/htdocs/oscommerce_ws/produits/osc_categories.class.php
2007-06-27 17:01:58.508530016 -1000
@@ -15,15 +15,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: osc_categories.class.php,v 1.1 2007/06/27 20:18:20 eldy Exp $
- * $Source:
/sources/dolibarr/dolibarr/htdocs/oscommerce_ws/produits/osc_categories.class.php,v
$
+ * $Id: Osc_Categorie.class.class.php,v 1.2 2007/03/25 03:07:46 eldy Exp $
+ * $Source:
/sources/dolibarr/dolibarr/dev/skeletons/Osc_Categorie.class.class.php,v $
*/
/**
\file dev/skeletons/Osc_Categorie.class.class.php
\ingroup core
\brief Example for class
- \version $Revision: 1.1 $
+ \version $Revision: 1.2 $
*/
// Put here all includes required by your script
diff -Naur --exclude=CVS --exclude='.#*' --exclude='*~' --exclude=documents
/home/jean/projets/dolibarr_devref/dolibarr/htdocs/oscommerce_ws/produits/OSCvente.php
/home/jean/projets/dolibarr/htdocs/oscommerce_ws/produits/OSCvente.php
---
/home/jean/projets/dolibarr_devref/dolibarr/htdocs/oscommerce_ws/produits/OSCvente.php
2007-06-27 10:18:20.000000000 -1000
+++ /home/jean/projets/dolibarr/htdocs/oscommerce_ws/produits/OSCvente.php
2007-04-20 08:31:10.000000000 -1000
@@ -15,8 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: OSCvente.php,v 1.1 2007/06/27 20:18:20 eldy Exp $
- * $Source:
/sources/dolibarr/dolibarr/htdocs/oscommerce_ws/produits/OSCvente.php,v $
+ * $Id: fiche.php,v 1.5 2007/03/16 21:26:26 JeanExp $
+ * $Source:
/sources/dolibarr/dolibarr/htdocs/oscommerce_ws/produits/fiche.php,v $
*
*/
require("./pre.inc.php");
@@ -102,11 +102,11 @@
// Création
// Set the parameters to send to the WebService
$parameters = array("prod"=>$prod);
-
- // Set the WebService URL
+
+ // Set the WebService URL
$client = new soapclient(OSCWS_DIR."ws_articles.php");
-
- // Call the WebService and store its result in $result.
+
+ // Call the WebService and store its result in $result.
$result = $client->call("create_article",$parameters );
if ($client->fault)
{
@@ -161,5 +161,5 @@
print '<a class="tabAction"
href="OSCvente.php?action=liste">'.$langs->trans("Liste").'</a>';
print "\n</div>\n";
-llxFooter('$Date: 2007/06/27 20:18:20 $ - $Revision: 1.1 $');
+llxFooter('$Date: 2007/03/16 21:26:26 $ - $Revision: 1.5 $');
?>
--- /home/jean/projets/dolibarr_devref/dolibarr/htdocs/product.class.php
2007-06-20 15:07:38.000000000 -1000
+++ /home/jean/projets/dolibarr/htdocs/product.class.php 2007-06-20
15:15:11.000000000 -1000
@@ -3,6 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <address@hidden>
* Copyright (C) 2005-2007 Regis Houssin <address@hidden>
* Copyright (C) 2006 Andre Cianfarani <address@hidden>
+ * Copyright (C) 2007 Jean Heimburger <address@hidden>
*
* 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
@@ -2252,7 +2253,7 @@
{
$dir = $sdir .'/'. get_exdir($this->id,2) . $this->id ."/";
$dir .= "photos/";
-
+
if (! file_exists($dir))
{
dolibarr_syslog("Product Create $dir");
@@ -2269,6 +2270,38 @@
}
}
+ /**
+ * \brief Déplace fichier récupéré sur internet (utilisé pour
interface avec OSC)
+ * \param sdir Répertoire destination finale
+ * \param $files url de l'image
+ * Jean Heimburger juin 2007
+ */
+ function add_photo_web($sdir, $files)
+ {
+ $dir = $sdir .'/'. get_exdir($this->id,2) . $this->id ."/";
+ $dir .= "photos/";
+
+ if (! file_exists($dir))
+ {
+ dolibarr_syslog("Product Create $dir");
+ create_exdir($dir);
+ }
+
+ if (file_exists($dir))
+ {
+ // Crée fichier en taille vignette
+ // \todo A faire
+
+ // Crée fichier en taille origine
+ $content = file_get_contents($files);
+
+ $nom = basename($files);
+ $im = fopen($dir.$nom,'wb');
+ fwrite($im, $content);
+ fclose($im);
+// }
+ }
+ }
/**
* \brief Affiche la première photo du produit