orth + bug 356 nom d'usage pour les paiements
authorx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 12 Oct 2005 06:35:56 +0000 (06:35 +0000)
committerx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 12 Oct 2005 06:35:56 +0000 (06:35 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@93 839d8a87-29fc-0310-9880-83ba4fa771e5

include/money/cyberpaiement.inc.php
include/money/paypal.inc.php
templates/profil.tpl
templates/profil/general.tpl

index f9b3e26..ffe502c 100644 (file)
@@ -54,6 +54,8 @@ class CyberPayment
         if (Cookie::has(session_name())) {
             $returnurl .= "?".SID;
         }
+       $req = $globals->xdb->query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom FROM auth_user_md5 WHERE user_id = {?}",Session::get('uid'));
+       $name = $req->fetchOneCell();
 
         // on constuit la reference de la transaction
         $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id();
@@ -71,7 +73,7 @@ class CyberPayment
                'CHAMP007' => $globals->baseurl,
                'CHAMP008' => $pay->mail);
        $this->infos['client'] = Array(
-               'CHAMP100' => Session::get('nom'),
+               'CHAMP100' => $name,
                'CHAMP101' => Session::get('prenom'),
                'CHAMP102' => '.',
                'CHAMP103' => '.',
index 63634c5..bac5a75 100644 (file)
@@ -52,6 +52,8 @@ class PayPal
         global $globals;
 
        $this->urlform = 'https://'.$globals->money->paypal_site.'/cgi-bin/webscr';
+       $req = $globals->xdb->query("SELECT IF(nom_usage!='', nom_usage, nom) AS nom FROM auth_user_md5 WHERE user_id = {?}",Session::get('uid'));
+       $name = $req->fetchOneCell();
 
         $roboturl = str_replace("https://","http://",$globals->baseurl)
             ."/paiement/paypal_retour.php?uid="
@@ -69,7 +71,7 @@ class PayPal
        
        $info_client = Array(
                'first_name' => Session::get('prenom'),
-               'last_name'  => Session::get('nom'),
+               'last_name'  => $name,
                'email'      => Session::get('bestalias').'@polytechnique.org');
                
        $res = $globals->xdb->query(
index 6a37f1e..7558397 100644 (file)
@@ -30,8 +30,8 @@
 {/foreach}
 
 <p>Tu peux consulter <a href="{rel}/fiche.php?user={$smarty.session.forlife}" class="popup2">l'état actuel de ta fiche</a>
-tel qu'elle apparaîtra pour un camarade,
-ou <a href="{rel}/fiche.php?user={$smarty.session.forlife}&amp;public=1" class="popup2">tel</a> qu'elle apparaîtra à tout le monde.</p>
+telle qu'elle apparaîtra pour un camarade,
+ou <a href="{rel}/fiche.php?user={$smarty.session.forlife}&amp;public=1" class="popup2">telle</a> qu'elle apparaîtra à tout le monde.</p>
 
 <form action="{$smarty.server.PHP_SELF}" method="post" id="prof_annu">
   <table class="cadre_a_onglet" cellpadding="0" cellspacing="0" style="width: 98%; margin-left:1%;">
index 68c45c8..3ce7be6 100644 (file)
       </th>
     </tr>
     <tr>
-      <td class"col">
+      <td class="col">
         Le service annuaire de l'<a href='http://www.polytechniciens.com'>AX</a> met à jour l'annuaire papier à partir des informations que tu lui envoies. Tu peux choisir ici de récupérer directement ces données pour l'annuaire en ligne.
       </td>
     </tr>