* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: cyberpaiement_retour.php,v 1.3 2004-08-31 13:59:43 x2000habouzit Exp $
+ $Id: cyberpaiement_retour.php,v 1.4 2004-09-02 21:22:19 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$montant = "$champ201 $champ202";
/* on extrait les informations sur l'utilisateur */
-$res = $globals->db->query("select a.prenom,a.nom,a.promo,a.username,FIND_IN_SET(i.flags,'femme') from auth_user_md5 as a inner join identification as i on a.matricule=i.matricule where a.user_id='$uid'");
-if (!list($prenom,$nom,$promo,$username,$femme) = mysql_fetch_row($res))
+$res = $globals->db->query("
+ SELECT a.prenom,a.nom,a.promo,l.alias,FIND_IN_SET(i.flags,'femme')
+ FROM auth_user_md5 AS a
+INNER JOIN aliases AS l ON a.user_id=l.id
+INNER JOIN identification AS i ON a.matricule=i.matricule
+ WHERE a.user_id='$uid'");
+if (!list($prenom,$nom,$promo,$forlife,$femme) = mysql_fetch_row($res))
erreur("uid invalide");
/* on extrait la reference de la commande */
$conf_text = str_replace("<montant>",$montant,$conf_text);
$conf_text = str_replace("<salutation>",$femme ? "Chère" : "Cher",$conf_text);
-$mymail = new DiogenesMailer($conf_mail,$username,$conf_title,false,$conf_mail);
+$mymail = new DiogenesMailer($conf_mail,$forlife,$conf_title,false,$conf_mail);
$mymail->setBody($conf_text);
$mymail->send();
/* on envoie les details de la transaction à telepaiement@ */
$mymail = new DiogenesMailer("webmaster","telepaiement",$conf_title,false);
$msg = "utilisateur : $prenom $nom ($uid)\n".
- "mail : $username@polytechnique.org\n\n".
+ "mail : $forlife@polytechnique.org\n\n".
"paiement : $conf_title ($conf_mail)\n".
"reference : $champ200\n".
"montant : $montant\n\n".
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: index.php,v 1.2 2004-08-31 10:03:30 x2000habouzit Exp $
+ $Id: index.php,v 1.3 2004-09-02 21:22:19 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
new_skinned_page('paiment/index.tpl', AUTH_MDP);
-require('profil.inc.php');
+require_once('profil.func.inc.php');
setlocale(LC_NUMERIC,'fr_FR');
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: sendmail.php,v 1.5 2004-08-31 10:03:28 x2000habouzit Exp $
+ $Id: sendmail.php,v 1.6 2004-09-02 21:22:18 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$FROM = "From: {$_REQUEST['from']}";
//$_REQUEST['contenu'] = chunk_split($_REQUEST['contenu'], 76, "\n"); // pas bon, ne tient pas compte des mots
$dest = $_REQUEST['to'].', '.$autre_to;
- $mymail = new DiogenesMailer($_SESSION['username'], $dest, $_REQUEST['sujet'], false, $_REQUEST['cc'], $_REQUEST['bcc']);
+ $mymail = new DiogenesMailer($_SESSION['forlife'], $dest, $_REQUEST['sujet'], false, $_REQUEST['cc'], $_REQUEST['bcc']);
$mymail->addHeader($FROM);
$mymail->setBody(wordwrap($_REQUEST['contenu'],72,"\n"));
if ($mymail->send()) {
} // ! if ($_REQUEST['to'] == '' and $_REQUEST['cc'] == '')
}
-$sql = "SELECT u.prenom, u.nom, u.promo, u.username
- FROM auth_user_md5 as u, contacts as c
- WHERE u.user_id = c.contact AND c.uid = {$_SESSION['uid']}
+$sql = "SELECT u.prenom, u.nom, u.promo, a.alias as forlife
+ FROM auth_user_md5 AS u
+ INNER JOIN contacts AS c ON (u.user_id = c.contact)
+ INNER JOIN aliases AS a ON (u.user_id=a.id AND type='a_vie')
+ WHERE c.uid = {$_SESSION['uid']}
ORDER BY u.nom, u.prenom";
$page->mysql_assign($sql, 'contacts','nb_contacts');
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: sendmail.tpl,v 1.9 2004-08-31 11:25:39 x2000habouzit Exp $
+ $Id: sendmail.tpl,v 1.10 2004-09-02 21:22:19 x2000habouzit Exp $
***************************************************************************}
<input type='text' name='from' size='45' value='{if $smarty.request.from}
{$smarty.request.from}
{else}
-"{$smarty.session.prenom} {$smarty.session.nom}" <{$smarty.session.username}@polytechnique.org>
+"{$smarty.session.prenom} {$smarty.session.nom}" <{$smarty.session.forlife}@polytechnique.org>
{/if}' />
</td>
</tr>
<tr>
<td class="titre">copie cachée :</td>
<td>
- <input type='text' name='bcc' size='45' value="{$smarty.request.bcc|default:$smarty.session.username}" />
+ <input type='text' name='bcc' size='45' value="{$smarty.request.bcc|default:$smarty.session.forlife}" />
</td>
</tr>
<tr>
<tr class="{cycle values="impair,pair"}">
{/if}
<td>
- <input type="checkbox" name="contacts[{$contact.username}]"
- value="{$contact.prenom} {$contact.nom} <{$contact.username}@polytechnique.org>"
- {if $smarty.request.contacts && $smarty.request.contacts.username}checked="checked"{/if} />
- <a href="javascript:x()" onclick="popWin('fiche.php?user={$contact.username}')">{$contact.prenom} {$contact.nom}</a> (X{$contact.promo})
+ <input type="checkbox" name="contacts[{$contact.forlife}]"
+ value="{$contact.prenom} {$contact.nom} <{$contact.forlife}@polytechnique.org>"
+ {if $smarty.request.contacts && $smarty.request.contacts.forlife}checked="checked"{/if} />
+ <a href="javascript:x()" onclick="popWin('fiche.php?user={$contact.forlife}')">{$contact.prenom} {$contact.nom}</a> (X{$contact.promo})
</td>
{if $key is odd}
</tr>