git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7522 b9a71923-0436-4b27-9f14-aed3839534dd

This commit is contained in:
rGaillard
2011-07-06 10:10:43 +00:00
parent 9ff675b1e2
commit 69f2f09dc5
4695 changed files with 0 additions and 339293 deletions
@@ -1,76 +0,0 @@
<?php
class fianet_adress_xml
{
var $type;
var $format = 1;
var $rue1;
var $rue2;
var $cpostal;
var $ville;
var $pays;
var $appartement = null;
function get_xml()
{
$xml = '';
if ($this->type != null)
{
$xml .= "\t" . '<adresse type="'.$this->type.'" format="'.$this->format.'">' . "\n";
if ($this->rue1 != '')
{
$xml .= "\t\t" . '<rue1>'.clean_invalid_char($this->rue1).'</rue1>' . "\n";
}
else
{
fianet_insert_log("fianet_adress_xml.php - get_xml() <br />\n rue1 is undefined");
return;
}
if ($this->rue2 != "")
{
$xml .= "\t\t" . '<rue2>'.clean_invalid_char($this->rue2).'</rue2>' . "\n";
}
if ($this->cpostal != "")
{
$xml .= "\t\t" . '<cpostal>'.clean_invalid_char($this->cpostal).'</cpostal>' . "\n";
}
else
{
fianet_insert_log("fianet_adress_xml.php - get_xml() <br />\n cpostal is undefined");
return;
}
if ($this->ville != "")
{
$xml .= "\t\t" . '<ville>'.clean_invalid_char($this->ville).'</ville>' . "\n";
}
else
{
fianet_insert_log("fianet_adress_xml.php - get_xml() <br />\n ville is undefined");
return;
}
if ($this->pays != "")
{
$xml .= "\t\t" . '<pays>'.clean_invalid_char($this->pays).'</pays>' . "\n";
}
else
{
fianet_insert_log("fianet_adress_xml.php - get_xml() <br />\n pays is undefined");
return;
}
if ($this->appartement != null)
{
if (var_is_object_of_class($this->appartement, 'fianet_appartment_xml'))
{
$xml .= $this->appartement->get_xml();
}
else
{
fianet_insert_log("fianet_adress_xml.php - get_xml() <br />\nAppartement is not an object of type fianet_appartment_xml");
}
}
$xml .= "\t" . '</adresse>' . "\n";
}
return ($xml);
}
}
@@ -1,44 +0,0 @@
<?php
class fianet_appartment_xml
{
var $digicode1;
var $digicode2;
var $escalier;
var $etage;
var $nporte;
var $batiment;
function get_xml()
{
$xml = '';
$xml .= "\t\t" . '<appartement>' . "\n";
if ($this->digicode1 != '')
{
$xml .= "\t\t\t" . '<digicode1>'.clean_invalid_char($this->digicode1).'</digicode1>' . "\n";
}
if ($this->digicode2 != '')
{
$xml .= "\t\t\t" . '<digicode2>'.clean_invalid_char($this->digicode2).'</digicode2>' . "\n";
}
if ($this->escalier != '')
{
$xml .= "\t\t\t" . '<escalier>'.clean_invalid_char($this->escalier).'</escalier>' . "\n";
}
if ($this->etage != '')
{
$xml .= "\t\t\t" . '<etage>'.clean_invalid_char($this->etage).'</etage>' . "\n";
}
if ($this->nporte != '')
{
$xml .= "\t\t\t" . '<nporte>'.clean_invalid_char($this->nporte).'</nporte>' . "\n";
}
if ($this->batiment != '')
{
$xml .= "\t\t\t" . '<batiment>'.clean_invalid_char($this->batiment).'</batiment>' . "\n";
}
$xml .= "\t\t" . '</appartement>' . "\n";
return ($xml);
}
}
@@ -1,13 +0,0 @@
<?php
class fianet_billing_adress_xml extends fianet_adress_xml
{
var $type = 'facturation';
function fianet_billing_adress_xml($order = null)
{
}
}
@@ -1,13 +0,0 @@
<?php
class fianet_billing_user_xml extends fianet_user_xml
{
var $type = 'facturation';
function fianet_billing_user_xml($order = null)
{
}
}
@@ -1,11 +0,0 @@
<?php
class fianet_delivery_adress_xml extends fianet_adress_xml
{
var $type = 'livraison';
function fianet_delivery_adress_xml()
{
}
}
@@ -1,11 +0,0 @@
<?php
class fianet_delivery_user_xml extends fianet_user_xml
{
var $type = 'livraison';
function fianet_delivery_user_xml($order = null)
{
}
}
@@ -1,50 +0,0 @@
<?php
class fianet_info_order_xml
{
var $siteid = 0;
var $refid = 0;
var $montant = 0;
var $devise = "EUR";
var $ip;
var $timestamp;
var $transport;
var $list;
function fianet_info_order_xml()
{
$this->list = new fianet_product_list_xml();
$this->transport = new fianet_transport_xml();
$this->siteid = FIANET_SAC_SITE_ID;
}
function get_xml()
{
$xml = '';
if (!($this->siteid != "" && $this->refid != "" && $this->montant > 0 && $this->devise != ""))
{
fianet_insert_log("fianet_info_order_xml.php - get_xml() <br />Somes values are undefined\n");
}
if ($this->transport == null)
{
fianet_insert_log("fianet_info_order_xml.php - get_xml() <br />Transport is undefined\n");
}
if ($this->list == null)
{
fianet_insert_log("fianet_info_order_xml.php - get_xml() <br />List products is undefined\n");
}
$xml .= "\t" . '<infocommande>' . "\n";
$xml .= "\t\t" . '<siteid>'.$this->siteid.'</siteid>' . "\n";
$xml .= "\t\t" . '<refid>'.$this->refid.'</refid>' . "\n";
$xml .= "\t\t" . '<montant devise="'.$this->devise.'">'.number_format($this->montant, 2, '.', '').'</montant>' . "\n";
if ($this->ip != null && $this->timestamp != null)
{
$xml .= "\t\t" . '<ip timestamp="'.$this->timestamp.'">'.$this->ip.'</ip>' . "\n";
}
$xml .= $this->transport->get_xml();
$xml .= $this->list->get_xml();
$xml .= "\t" . '</infocommande>' . "\n";
return ($xml);
}
}
@@ -1,68 +0,0 @@
<?php
class fianet_order_xml
{
var $billing_user = null;
var $billing_adress = null;
var $info_commande = null;
var $payment = null;
var $delivery_user = null;
var $delivery_adress = null;
function fianet_order_xml()
{
$this->billing_user = new fianet_billing_user_xml();
$this->billing_adress = new fianet_billing_adress_xml();
$this->info_commande = new fianet_info_order_xml();
$this->payment = new fianet_payment_xml();
}
function reset()
{
$this->billing_user = new fianet_billing_user_xml();
$this->delivery_user = null;
$this->billing_adress = new fianet_billing_adress_xml();
$this->delivery_adress = null;
$this->info_commande = new fianet_info_order_xml();
$this->payment = new fianet_payment_xml();
}
function get_xml()
{
$xml = '';
$xml .= '<control fianetmodule="'.FIANET_MODULE.'" version="'.FIANET_VERSION.'">' . "\n";
$xml .= $this->billing_user->get_xml();
$xml .= $this->billing_adress->get_xml();
if ($this->delivery_user != null)
{
if (var_is_object_of_class($this->delivery_user, 'fianet_delivery_user_xml'))
{
$xml .= $this->delivery_user->get_xml();
}
else
{
fianet_insert_log("fianet_order_xml.php - get_xml() <br />\nDelivery user is not an object of type fianet_delivery_user_xml");
}
}
if ($this->delivery_adress != null && ($this->info_commande->transport->type == 4 || $this->info_commande->transport->type == 5))
{
if (var_is_object_of_class($this->delivery_adress, 'fianet_delivery_adress_xml'))
{
$xml .= $this->delivery_adress->get_xml();
}
else
{
fianet_insert_log("fianet_order_xml.php - get_xml() <br />\nDelivery adress is not an object of type fianet_delivery_adress_xml");
}
}
$xml .= $this->info_commande->get_xml();
$xml .= $this->payment->get_xml();
$xml .= '</control>';
save_flux_xml($xml, $this->info_commande->refid);
return ($xml);
}
}
@@ -1,23 +0,0 @@
<?php
class fianet_paraobject_xml
{
var $name;
var $value;
function fianet_paraobject_xml($name, $value)
{
$this->name = $name;
$this->value = $value;
}
function get_xml()
{
$xml = "\t". '<obj>' . "\n";
$xml .= "\t\t". '<name>'.$this->name.'</name>' . "\n";
$xml .= "\t\t". '<value>'.$this->value.'</value>' . "\n";
$xml .= "\t". '</obj>' . "\n";
return ($xml);
}
}
@@ -1,76 +0,0 @@
<?php
class fianet_payment_xml
{
var $type;
var $numcb;
var $dateval;
var $bin;
var $bin4;
var $bin42;
function fianet_payment_xml($order = null)
{
}
function set_cb_number($cb, $dateval)
{
if (!eregi("^[0-9]{16}$", $cb))
{
fianet_insert_log("fianet_payment_xml.php - set_cb_number() <br />Cb number format is invalid, must be 00001111222233334444\n");
}
else if (!eregi("^[0-9]{2}/[0-9]{4}$", $dateval))
{
fianet_insert_log("fianet_payment_xml.php - set_cb_number() <br />Validity date format is invalid, must be MM/YYYY\n");
}
else
{
$crypt = new HashMD5();
$this->numcb = $crypt->hash($cb);
$this->dateval = $crypt->hash($dateval);
}
}
function get_xml()
{
$xml = '';
if ($this->type != null)
{
$xml .= "\t".'<paiement>'."\n";
$xml .= "\t\t".'<type>'.$this->type.'</type>'."\n";
if ($this->type == 'carte' || $this->type == 'paypal')
{
if ($this->numcb != null)
{
$xml .= "\t\t".'<numcb>'.$this->numcb.'</numcb>'."\n";
}
if ($this->dateval != null)
{
$xml .= "\t\t".'<dateval>'.$this->dateval.'</dateval>'."\n";
}
if ($this->bin != null)
{
$xml .= "\t\t".'<bin>'.$this->bin.'</bin>'."\n";
}
if ($this->bin4 != null)
{
$xml .= "\t\t".'<bin4>'.$this->bin4.'</bin4>'."\n";
}
if ($this->bin42 != null)
{
$xml .= "\t\t".'<bin42>'.$this->bin42.'</bin42>'."\n";
}
}
$xml .= "\t".'</paiement>'."\n";
}
else
{
fianet_insert_log("fianet_payment_xml.php - get_xml() <br />Type is undefined\n");
return;
}
return ($xml);
}
}
@@ -1,49 +0,0 @@
<?php
class fianet_product_list_xml
{
var $products_list = array();
function fianet_product_list_xml()
{
}
function add_product($product)
{
if (var_is_object_of_class($product, 'fianet_product_xml'))
{
$this->products_list[] = $product;
}
else
{
fianet_insert_log("fianet_product_list_xml.php - add_product() <br />Data are not a valid fianet_product_xml type\n");
}
}
function get_xml()
{
$xml = '';
if (count($this->products_list) > 0)
{
$xml .= "\t\t". '<list nbproduit="'.$this->count_nbproduct().'">' . "\n";
foreach ($this->products_list as $product)
{
$xml .= $product->get_xml();
}
$xml .= "\t\t". '</list>' . "\n";
}
return ($xml);
}
function count_nbproduct()
{
$n = 0;
foreach ($this->products_list as $product)
{
$n += $product->nb;
}
return ($n);
}
}
@@ -1,59 +0,0 @@
<?php
class fianet_product_xml
{
var $type;
var $ref;
var $nb = 0;
var $prixunit;
var $name;
function fianet_product_xml()
{
}
function get_xml()
{
$xml = '';
if ($this->name != null)
{
$nb = '';
$prixunit = '';
if ($this->type != null)
{
$type = ' type="'.$this->type.'"';
}
else
{
fianet_insert_log("fianet_product_xml.php - get_xml() <br />\nproduct type is missing");
return;
}
if ($this->ref != null)
{
$ref = ' ref="'.clean_invalid_char($this->ref).'"';
}
else
{
fianet_insert_log("fianet_product_xml.php - get_xml() <br />\nproduct ref is missing");
return;
}
if ($this->nb != null)
{
$nb = ' nb="'.$this->nb.'"';
}
if ($this->prixunit != null)
{
$prixunit = ' prixunit="'.number_format($this->prixunit, 2, '.', '').'"';
}
$xml .= "\t\t\t<produit$type$ref$nb$prixunit>".clean_invalid_char($this->name)."</produit>\n";
}
else
{
fianet_insert_log("fianet_product_xml.php - get_xml() <br />\nproduct name is missing");
return;
}
return ($xml);
}
}
@@ -1,36 +0,0 @@
<?php
class fianet_rnp_info_order_xml
{
var $siteid = 0;
var $refid = 0;
var $montant = 0;
var $devise = 'EUR';
var $transport;
var $list;
function fianet_rnp_info_order_xml()
{
$this->list = new fianet_product_list_xml();
$this->transport = new fianet_transport_xml();
$this->siteid = FIANET_RNP_SITE_ID;
}
function get_xml()
{
$xml = '';
if ($this->siteid == '' || $this->refid == '' || $this->montant <= 0 || $this->devise == '')
{
fianet_insert_log("fianet_rnp_info_order_xml.php - get_xml() <br />Somes values are undefined\n");
}
$xml .= "\t" . '<infocommande>' . "\n";
$xml .= "\t\t" . '<siteid>'.$this->siteid.'</siteid>' . "\n";
$xml .= "\t\t" . '<refid>'.$this->refid.'</refid>' . "\n";
$xml .= "\t\t" . '<montant devise="'.$this->devise.'">'.number_format($this->montant, 2, '.', '').'</montant>' . "\n";
$xml .= $this->transport->get_xml();
$xml .= $this->list->get_xml();
$xml .= "\t" . '</infocommande>' . "\n";
return ($xml);
}
}
@@ -1,142 +0,0 @@
<?php
class fianet_rnp_order_xml
{
var $billing_user = null;
var $billing_adress = null;
var $info_commande = null;
var $wallet = null;
var $delivery_user = null;
var $delivery_adress = null;
function fianet_rnp_order_xml()
{
$this->billing_user = new fianet_billing_user_xml();
$this->billing_adress = new fianet_billing_adress_xml();
$this->info_commande = new fianet_rnp_info_order_xml();
$this->wallet = new fianet_rnp_wallet_xml();
}
function reset()
{
$this->billing_user = new fianet_billing_user_xml();
$this->delivery_user = null;
$this->billing_adress = new fianet_billing_adress_xml();
$this->delivery_adress = null;
$this->info_commande = new fianet_rnp_info_order_xml();
$this->wallet = new fianet_rnp_wallet_xml();
}
function get_xml()
{
$xml = '';
$xml .= '<?xml version="1.0" encoding="'. FIANET_ENCODING . '" ?>' . "\n";
$xml .= '<control fianetmodule="'.FIANET_MODULE.'" version="'.FIANET_VERSION.'">' . "\n";
$xml .= $this->billing_user->get_xml();
$xml .= $this->billing_adress->get_xml();
if ($this->delivery_user != null)
{
if (var_is_object_of_class($this->delivery_user, 'fianet_delivery_user_xml'))
{
$xml .= $this->delivery_user->get_xml();
}
else
{
fianet_insert_log("fianet_rnp_order_xml.php - get_xml() <br />\nDelivery user is not an object of type fianet_delivery_user_xml");
}
}
if ($this->delivery_adress != null && ($this->info_commande->transport->type == 4 || $this->info_commande->transport->type == 5))
{
if (var_is_object_of_class($this->delivery_adress, 'fianet_delivery_adress_xml'))
{
$xml .= $this->delivery_adress->get_xml();
}
else
{
fianet_insert_log("fianet_rnp_order_xml.php - get_xml() <br />\nDelivery adress is not an object of type fianet_delivery_adress_xml");
}
}
$xml .= $this->info_commande->get_xml();
$this->wallet->generate_wallet_crypt_data($this->info_commande->refid, $this->billing_user->nom, $this->billing_user->email, $this->info_commande->montant);
$xml .= $this->wallet->get_xml();
$xml .= '</control>';
save_flux_xml($xml, $this->info_commande->refid);
return ($xml);
}
/*
Cette fonction génère le formulaire de redirection vers ReceiveAndPay
Elle prends des paramètres optionnels
url_call : url de retour sur le site marchand
url_sys : url de réponse des tags asynchrone pour le serveur ReceiveAndPay
ParamCallBack : tableau associatif des données que vous souhaitez voir retourner par le serveur ReceiveAndPay sur url_sys et url_call
typeIHM : 1 pour carte bancaire seulement, 2 pour à crédit uniquement, 3 pour les deux en même temps
enProd : mettre à true pour rediriger vers ReceiveAndPay de production
auto_send : si true : génère un javascript qui soumettra immédiatement le formulaire
*/
function get_formular($url_call = null, $url_sys = null, $ParamCallBack = array(), $typeIHM = 3, $enProd = false, $auto_send = true)
{
$flux = $this->get_xml();
$flux = clean_xml($flux);
$flux = str_replace('"', "'", $flux);
$flux = str_replace('&amp;', '&amp;amp;', $flux);
$flux = str_replace('&lt;', '&amp;lt;', $flux);
$flux = str_replace('&gt;', '&amp;gt;', $flux);
$my_hashmd5 = new HashMD5();
//$toto = html_entity_decode($flux);
//debug($toto);
$checksum = $my_hashmd5->hash(html_entity_decode($flux));
if (is_array($ParamCallBack) && count($ParamCallBack) > 0)
{
$XMLParam = new fianet_xml_paracallback_builder();
foreach ($ParamCallBack as $index => $value)
{
$XMLParam->add_param(new fianet_paraobject_xml($index, urlencode(htmlentities($value))));
}
}
if ($enProd)
{
$url = URL_RNP_PROD;
}
else
{
$url = URL_RNP_TEST;
}
$url .= URL_RNP_FRONTLINE;
$form = '';
$form .= '<form name="RnPform" action="'.$url.'" method="post">';
$form .= '<input type="hidden" name="MerchID" value="'. $this->info_commande->siteid .'">' . "\n";
$form .= '<input type="hidden" name="XMLInfo" value="'. $flux .'">' . "\n";
if ($url_call != null && $url_call != '')
{
$form .= '<input type="hidden" name="URLCall" value="'. $url_call .'">' . "\n";
}
if ($url_sys != null && $url_sys != '')
{
$form .= '<input type="hidden" name="URLSys" value="'. $url_sys .'">' . "\n";
}
if (isset($XMLParam))
{
$form .= '<input type="hidden" name="XMLParam" value="'.clean_xml(str_replace('"', "'", $XMLParam->get_xml())).'">' . "\n";
}
$form .= '<input type="hidden" name="CheckSum" value="'. $checksum .'">' . "\n";
$form .= '<input type="hidden" name="TypeIHM" value="'. $typeIHM .'">' . "\n";
$form .= '</form>';
if ($auto_send)
{
$form .= '<script>document.RnPform.submit();</script>';
}
return ($form);
}
}
@@ -1,60 +0,0 @@
<?php
class fianet_rnp_wallet_xml
{
var $version = '1.0';
var $datelivr = null;
var $datecom = null;
var $crypt = null;
var $crypt_version = '2.0';
var $order_date_time_seconds = null;
function fianet_rnp_wallet_xml()
{
//$this->datecom = "2008-05-28 14:25:31";
$this->datecom = date("Y-m-d H:i:s");
$this->order_date_time_seconds = substr($this->datecom, -2, 2);
}
function generate_wallet_crypt_data($order_id, $billing_lastname, $customer_email, $total)
{
$total = number_format($total, 2, '.', '');
$this->generate_crypt_key($order_id, $billing_lastname, $customer_email, $total);
}
function get_xml()
{
$xml = '';
$xml .= "\t" . '<wallet version="'.$this->version.'">' . "\n";
$xml .= "\t\t" . '<datelivr>'.$this->datelivr.'</datelivr>' . "\n";
$xml .= "\t\t" . '<datecom>'.$this->datecom.'</datecom>' . "\n";
$xml .= "\t\t" . '<crypt version="'.$this->crypt_version.'">'.$this->crypt.'</crypt>' . "\n";
$xml .= "\t" . '</wallet>' . "\n";
return ($xml);
}
function generate_crypt_key($order_id, $billing_lastname, $customer_email, $total)
{
if (FIANET_ENCODING == 'UTF-8')
{
$billing_lastname = utf8_decode($billing_lastname);
}
else
{
$billing_lastname = $billing_lastname;
}
$key = FIANET_RNP_KEY;
$encodingKey = new EncodingKey();
$this->crypt = $encodingKey->giveHashCode2( $key,
$this->order_date_time_seconds,
$customer_email,
$order_id,
$total,
$billing_lastname);
}
}
@@ -1,42 +0,0 @@
<?php
class fianet_transport_xml
{
var $type;
var $nom;
var $rapidite;
function fianet_transport_xml()
{
}
function get_xml()
{
$xml = '';
if ($this->type == null)
{
fianet_insert_log("fianet_transport_xml.php - get_xml() <br />\nTransport type undefined");
return;
}
if ($this->nom == null)
{
fianet_insert_log("fianet_transport_xml.php - get_xml() <br />\nTransport name undefined");
return;
}
if ($this->rapidite == null)
{
fianet_insert_log("fianet_transport_xml.php - get_xml() <br />\nTransport time undefined");
return;
}
$xml .= "\t\t". '<transport>' . "\n";
$xml .= "\t\t\t". '<type>'.$this->type.'</type>' . "\n";
$xml .= "\t\t\t". '<nom>'.clean_invalid_char($this->nom).'</nom>' . "\n";
$xml .= "\t\t\t". '<rapidite>'.$this->rapidite.'</rapidite>' . "\n";
$xml .= "\t\t". '</transport>' . "\n";
return ($xml);
}
}
@@ -1,29 +0,0 @@
<?php
class fianet_user_siteconso_xml
{
var $nb = 0;
var $ca = 0;
var $datepremcmd = null;
var $datederncmd = null;
function fianet_user_siteconso_xml()
{
}
function get_xml()
{
$xml = '';
if ($this->nb > 0)
{
$xml .= "\t\t" . '<siteconso>' . "\n";
$xml .= "\t\t\t" . '<nb>'.$this->nb.'</nb>' . "\n";
$xml .= "\t\t\t" . '<ca>'.number_format($this->ca, 2, '.', '').'</ca>' . "\n";
$xml .= "\t\t\t" . '<datepremcmd>'.$this->datepremcmd.'</datepremcmd>' . "\n";
$xml .= "\t\t\t" . '<datederncmd>'.$this->datederncmd.'</datederncmd>' . "\n";
$xml .= "\t\t" . '</siteconso>' . "\n";
}
return ($xml);
}
}
@@ -1,80 +0,0 @@
<?php
class fianet_user_xml
{
var $type;
//Qualité des clients par défaut
var $qualite = 2;
var $titre;
var $nom;
var $prenom;
var $societe;
var $telhome;
var $teloffice;
var $telmobile;
var $telfax;
var $email;
var $site_conso = null;
function set_quality_professional()
{
$this->qualite = 1;
}
function set_quality_nonprofessional()
{
$this->qualite = 2;
}
function get_xml()
{
$xml = '';
$xml .= "\t" . '<utilisateur type="'.$this->type.'" qualite="'.$this->qualite.'">' . "\n";
if ($this->titre != '')
{
if ($this->titre == 'f')
{
$this->titre = 'mme';
}
$xml .= "\t\t" . '<nom titre="'.$this->titre.'">'.clean_invalid_char($this->nom).'</nom>' . "\n";
}
else
{
$xml .= "\t\t" . '<nom>'.clean_invalid_char($this->nom).'</nom>' . "\n";
}
$xml .= "\t\t" . '<prenom>'.clean_invalid_char($this->prenom).'</prenom>' . "\n";
if ($this->societe != '')
{
$xml .= "\t\t" . '<societe>'.clean_invalid_char($this->societe).'</societe>' . "\n";
}
if ($this->telhome != '')
{
$xml .= "\t\t" . '<telhome>'.clean_invalid_char($this->telhome).'</telhome>' . "\n";
}
if ($this->teloffice != '')
{
$xml .= "\t\t" . '<teloffice>'.clean_invalid_char($this->teloffice).'</teloffice>' . "\n";
}
if ($this->telmobile != '')
{
$xml .= "\t\t" . '<telmobile>'.clean_invalid_char($this->telmobile).'</telmobile>' . "\n";
}
if ($this->telfax != '')
{
$xml .= "\t\t" . '<telfax>'.clean_invalid_char($this->telfax).'</telfax>' . "\n";
}
if ($this->email != '')
{
$xml .= "\t\t" . '<email>'.clean_invalid_char($this->email).'</email>' . "\n";
}
if ($this->site_conso != null)
{
$xml .= $this->site_conso->get_xml();
}
$xml .= "\t" . '</utilisateur>' . "\n";
return ($xml);
}
}
@@ -1,44 +0,0 @@
<?php
class fianet_xml_paracallback_builder
{
var $param_list = array();
function fianet_xml_paracallback_builder()
{
}
function add_param($param)
{
if (var_is_object_of_class($param, 'fianet_paraobject_xml'))
{
$this->param_list[] = $param;
}
else
{
fianet_insert_log("Erreur : le paramètre n'est pas un objet fianet_paraobject_xml mais un objet : ".get_class($param)."<br>");
}
}
function get_xml()
{
$xml = '';
if (count($this->param_list) > 0)
{
$xml .= '<?xml version="1.0" encoding="'.FIANET_ENCODING.'" ?>
<ParamCBack>' . "\n";
foreach ($this->param_list as $param)
{
$xml .= $param->get_xml();
}
$xml .= '</ParamCBack>' . "\n";
}
return($xml);
}
}