From f057316be370687dc8904d2ba310fad8709230ca Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Fri, 5 Oct 2007 22:56:38 +0200 Subject: [PATCH] Indentation Signed-off-by: Florent Bruneau --- modules/payment/money.inc.php | 4 +- modules/payment/money/cyberpaiement.inc.php | 58 ++++++++--------- modules/payment/money/paypal.inc.php | 98 ++++++++++++++--------------- 3 files changed, 80 insertions(+), 80 deletions(-) diff --git a/modules/payment/money.inc.php b/modules/payment/money.inc.php index 4a46fc7..6aa0d2a 100644 --- a/modules/payment/money.inc.php +++ b/modules/payment/money.inc.php @@ -43,9 +43,9 @@ class Payment global $globals; $r = $ref==-1 ? $globals->money->mpay_def_id : $ref; $res = XDB::query("SELECT id, text, url, flags, mail, montant_min, montant_max, montant_def, asso_id - FROM {$globals->money->mpay_tprefix}paiements WHERE id={?}", $r); + FROM {$globals->money->mpay_tprefix}paiements WHERE id={?}", $r); list($this->id, $this->text, $this->url, $flags, $this->mail, - $this->montant_min, $this->montant_max, $this->montant_def, $this->asso_id) = $res->fetchOneRow(); + $this->montant_min, $this->montant_max, $this->montant_def, $this->asso_id) = $res->fetchOneRow(); $this->montant_min = (float)$this->montant_min; $this->montant_max = (float)$this->montant_max; diff --git a/modules/payment/money/cyberpaiement.inc.php b/modules/payment/money/cyberpaiement.inc.php index d031c9e..11e7ad8 100644 --- a/modules/payment/money/cyberpaiement.inc.php +++ b/modules/payment/money/cyberpaiement.inc.php @@ -42,8 +42,8 @@ class CyberPayment function prepareform(&$pay) { - // toute la doc se trouve sur - // http://www.cyberpaiement.tm.fr/donnees.htm + // toute la doc se trouve sur + // http://www.cyberpaiement.tm.fr/donnees.htm global $globals, $platal; @@ -52,7 +52,7 @@ class CyberPayment $req = XDB::query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom FROM auth_user_md5 WHERE user_id = {?}",S::v('uid')); - $name = $req->fetchOneCell(); + $name = $req->fetchOneCell(); // on constuit la reference de la transaction require_once 'xorg.misc.inc.php'; @@ -60,32 +60,32 @@ class CyberPayment $fullref = substr("$prefix-xorg-{$pay->id}",-15); $this->urlform = "https://ecom.cimetz.com/telepaie/cgishell.exe/epaie01.exe"; - $this->infos['commercant'] = Array( - 'CHAMP000' => 510879, - 'CHAMP001' => 5965, - 'CHAMP002' => 5429159012, - 'CHAMP003' => "I", - 'CHAMP004' => "Polytechnique.org", - 'CHAMP005' => $roboturl, - 'CHAMP006' => "Polytechnique.org", - 'CHAMP007' => $globals->baseurl . '/' . $platal->ns, - 'CHAMP008' => $pay->mail); - $this->infos['client'] = Array( - 'CHAMP100' => $name, - 'CHAMP101' => S::v('prenom'), - 'CHAMP102' => '.', - 'CHAMP103' => '.', - 'CHAMP104' => S::v('bestalias').'@' . $globals->mail->domain, - 'CHAMP106' => '.', - 'CHAMP107' => '.', - 'CHAMP108' => '.', - 'CHAMP109' => '.', - 'CHAMP110' => '.'); - $this->infos['commande'] = Array( - 'CHAMP200' => $fullref, - 'CHAMP201' => $this->val, - 'CHAMP202' => "EUR"); - $this->infos['divers'] = Array('CHAMP900' => '01'); + $this->infos['commercant'] = Array( + 'CHAMP000' => 510879, + 'CHAMP001' => 5965, + 'CHAMP002' => 5429159012, + 'CHAMP003' => "I", + 'CHAMP004' => "Polytechnique.org", + 'CHAMP005' => $roboturl, + 'CHAMP006' => "Polytechnique.org", + 'CHAMP007' => $globals->baseurl . '/' . $platal->ns, + 'CHAMP008' => $pay->mail); + $this->infos['client'] = Array( + 'CHAMP100' => $name, + 'CHAMP101' => S::v('prenom'), + 'CHAMP102' => '.', + 'CHAMP103' => '.', + 'CHAMP104' => S::v('bestalias').'@' . $globals->mail->domain, + 'CHAMP106' => '.', + 'CHAMP107' => '.', + 'CHAMP108' => '.', + 'CHAMP109' => '.', + 'CHAMP110' => '.'); + $this->infos['commande'] = Array( + 'CHAMP200' => $fullref, + 'CHAMP201' => $this->val, + 'CHAMP202' => "EUR"); + $this->infos['divers'] = Array('CHAMP900' => '01'); } // }}} diff --git a/modules/payment/money/paypal.inc.php b/modules/payment/money/paypal.inc.php index fb7fab4..5f454a3 100644 --- a/modules/payment/money/paypal.inc.php +++ b/modules/payment/money/paypal.inc.php @@ -35,7 +35,7 @@ class PayPal function PayPal($val) { - $this->val_number = $val; + $this->val_number = $val; } // }}} @@ -43,63 +43,63 @@ class PayPal function prepareform(&$pay) { - // toute la doc sur : - // https://www.paypal.com/fr_FR/pdf/integration_guide.pdf - // attention : le renvoi automatique ne fonctionne que si - // on oblige les gens à créer un compte paypal - // nous ne l'utilisons pas ; il faut donc que l'utilisateur - // revienne sur le site + // toute la doc sur : + // https://www.paypal.com/fr_FR/pdf/integration_guide.pdf + // attention : le renvoi automatique ne fonctionne que si + // on oblige les gens à créer un compte paypal + // nous ne l'utilisons pas ; il faut donc que l'utilisateur + // revienne sur le site global $globals, $platal; - $this->urlform = 'https://'.$globals->money->paypal_site.'/cgi-bin/webscr'; + $this->urlform = 'https://'.$globals->money->paypal_site.'/cgi-bin/webscr'; $req = XDB::query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom - FROM auth_user_md5 - WHERE user_id = {?}",S::v('uid')); - $name = $req->fetchOneCell(); + FROM auth_user_md5 + WHERE user_id = {?}",S::v('uid')); + $name = $req->fetchOneCell(); $roboturl = str_replace("https://","http://",$globals->baseurl) . '/' . $platal->ns . "payment/paypal_return/".S::v('uid')."?comment=".urlencode(Env::v('comment')); - $this->infos = Array(); - - $this->infos['commercant'] = Array( - 'business' => $globals->money->paypal_compte, - 'rm' => 2, - 'return' => $roboturl, - 'cn' => 'Commentaires', - 'no_shipping' => 1, + $this->infos = Array(); + + $this->infos['commercant'] = Array( + 'business' => $globals->money->paypal_compte, + 'rm' => 2, + 'return' => $roboturl, + 'cn' => 'Commentaires', + 'no_shipping' => 1, 'cbt' => empty($GLOBALS['IS_XNET_SITE']) ? - 'Revenir sur polytechnique.org' : - 'Revenir sur polytechnique.net'); - - $info_client = Array( - 'first_name' => S::v('prenom'), - 'last_name' => $name, - 'email' => S::v('bestalias').'@' . $globals->mail->domain); - - $res = XDB::query( - "SELECT a.adr1 AS address1, a.adr2 AS address2, - a.city, a.postcode AS zip, a.country, - IF(t.tel, t.tel, q.profile_mobile) AS night_phone_b - FROM auth_user_quick AS q - LEFT JOIN adresses AS a ON (q.user_id = a.uid AND FIND_IN_SET('active', a.statut)) + 'Revenir sur polytechnique.org' : + 'Revenir sur polytechnique.net'); + + $info_client = Array( + 'first_name' => S::v('prenom'), + 'last_name' => $name, + 'email' => S::v('bestalias').'@' . $globals->mail->domain); + + $res = XDB::query( + "SELECT a.adr1 AS address1, a.adr2 AS address2, + a.city, a.postcode AS zip, a.country, + IF(t.tel, t.tel, q.profile_mobile) AS night_phone_b + FROM auth_user_quick AS q + LEFT JOIN adresses AS a ON (q.user_id = a.uid AND FIND_IN_SET('active', a.statut)) LEFT JOIN tels AS t ON (t.uid = a.uid AND t.adrid = a.adrid) - WHERE q.user_id = {?} - LIMIT 1", S::v('uid')); - $this->infos['client'] = array_merge($info_client, $res->fetchOneAssoc()); - - // on constuit la reference de la transaction - require_once 'xorg.misc.inc.php'; - $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id(); - $fullref = substr("$prefix-xorg-{$pay->id}",-15); - - $this->infos['commande'] = Array( - 'item_name' => $pay->text, - 'amount' => $this->val_number, - 'currency_code' => 'EUR', - 'custom' => $fullref); - - $this->infos['divers'] = Array('cmd' => '_xclick'); + WHERE q.user_id = {?} + LIMIT 1", S::v('uid')); + $this->infos['client'] = array_merge($info_client, $res->fetchOneAssoc()); + + // on constuit la reference de la transaction + require_once 'xorg.misc.inc.php'; + $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id(); + $fullref = substr("$prefix-xorg-{$pay->id}",-15); + + $this->infos['commande'] = Array( + 'item_name' => $pay->text, + 'amount' => $this->val_number, + 'currency_code' => 'EUR', + 'custom' => $fullref); + + $this->infos['divers'] = Array('cmd' => '_xclick'); } // }}} -- 2.1.4