* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: mescontacts_ldif.php,v 1.8 2004-08-31 19:48:46 x2000habouzit Exp $
+ $Id: mescontacts_ldif.php,v 1.9 2004-09-02 23:55:56 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
* On construit la liste des contacts, et de l'entreprise à laquelle ils appartiennent
*/
$contacts = Array();
-$req = $globals->db->query("SELECT contact AS id, date, prenom, nom, epouse, username, mobile, web, libre, promo, alias,
+$req = $globals->db->query("SELECT contact AS id, date, prenom, nom, epouse, l.alias AS forlife, mobile, web, libre, promo,
entreprise, adr1, adr2, adr3, cp, ville, gp.pays, gr.name, tel, fax,
poste, f.label AS fonction
FROM contacts AS c
LEFT JOIN auth_user_md5 AS a ON(a.user_id = c.contact)
+ INNER JOIN aliases AS l ON(a.user_id = l.id AND type='a_vie')
LEFT JOIN entreprises AS e ON(a.user_id = e.uid)
LEFT JOIN emploi_naf AS f ON(e.fonction = f.id)
LEFT JOIN geoloc_pays AS gp ON(e.pays = gp.a2)
ORDER BY contact");
while($line = mysql_fetch_assoc($req)) {
$contacts[$line['id']] = ensure_adr($line);
+ $contacts[$line['id']]['aliases'] = Array();
}
mysql_free_result($req);
+$req = $globals->db->query("SELECT a.id,a.alias
+ FROM aliases AS a
+ INNER JOIN contacts AS c ON a.id=c.contact
+ WHERE c.uid='{$_SESSION['uid']}' AND a.type!='a_vie'");
+while(list($id,$alias) = mysql_fetch_row($req)) {
+ $contacts[$id]['aliases'][] = $alias;
+}
+mysql_free_result($req);
/*
* On y ajoute les infos d'adresses
*/
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: recovery.php,v 1.2 2004-08-31 10:03:28 x2000habouzit Exp $
+ $Id: recovery.php,v 1.3 2004-09-02 23:55:56 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
// paragraphe rajouté : si la date de naissance dans la base n'existe pas, on l'update
// avec celle fournie ici en espérant que c'est la bonne
- $sql="SELECT user_id, naissance FROM auth_user_md5 WHERE username='$mailorg'";
+ $sql="SELECT user_id, naissance
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON u.user_id=a.id
+ WHERE a.alias='$mailorg'";
$result=$globals->db->query($sql);
if (list($uid,$naissance)=mysql_fetch_array($result)) {
if((strlen($naissance))<5) {
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: redirect.php,v 1.3 2004-08-31 10:03:31 x2000habouzit Exp $
+ $Id: redirect.php,v 1.4 2004-09-02 23:55:57 x2000habouzit Exp $
***************************************************************************/
// le premier non vide et éventuellement le second
// la config d'apache impose la forme suivante pour REQUEST_URI :
// REQUEST_URI = /prenom.nom(/path/fichier.hmtl)?
-list($username, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY);
+list($user, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY);
-$result = $globals->db->query("select redirecturl from auth_user_md5 where username= '$username' or alias = '$username'");
+$result = $globals->db->query("
+ SELECT redirecturl
+ FROM auth_user_md5 AS u
+INNER JOIN aliases AS a ON u.user_id=a.id
+ WHERE a.alias='$user'");
if ($result and list($url) = mysql_fetch_row($result) and $url != '') {
// on envoie un redirect (PHP met automatiquement le code de retour 302
if (!empty($path)) {
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: texify.inc.php,v 1.2 2004-08-31 11:16:48 x2000habouzit Exp $
+ $Id: texify.inc.php,v 1.3 2004-09-02 23:55:57 x2000habouzit Exp $
***************************************************************************/
/*
* Fonctions de générations de tex pour les pages de .org
* Auteur original : Pierre HABOUZIT
*
- * $Id: texify.inc.php,v 1.2 2004-08-31 11:16:48 x2000habouzit Exp $
+ * $Id: texify.inc.php,v 1.3 2004-09-02 23:55:57 x2000habouzit Exp $
*/
/** Fonction qui gère les pdflatexisations :)
global $pdf_tmp_dir;
set_time_limit(300); // timeout de 5 minutes au cas où le texte serait gros
// et pdflatex lent
- $pdf_tmp_dir=('/tmp/mescontacts_'.$_SESSION['username']);
+ $pdf_tmp_dir=('/tmp/mescontacts_'.$_SESSION['forlife']);
// fonction pour effacer le rep temporaire
function clean_tmp_dir() {
global $pdf_tmp_dir;
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: acces_wap.tpl,v 1.5 2004-08-31 11:25:38 x2000habouzit Exp $
+ $Id: acces_wap.tpl,v 1.6 2004-09-02 23:55:57 x2000habouzit Exp $
***************************************************************************}
<td>
<select name="fromaddr">
<option value="m4x" {if $wap.fromaddr eq "m4x"}selected="selected"{/if}>
- {$smarty.session.username}@m4x.org
+ {$smarty.session.forlife}@m4x.org
</option>
<option value="polytechnique" {if $wap.fromaddr eq "polytechnique"}selected="selected"{/if}>
- {$smarty.session.username}@polytechnique.org
+ {$smarty.session.forlife}@polytechnique.org
</option>
<option value="autre" {if $wap.fromaddr eq "autre"}selected="selected"{/if}>
Autre...
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: newsletter_prep.tpl,v 1.7 2004-08-31 11:25:39 x2000habouzit Exp $
+ $Id: newsletter_prep.tpl,v 1.8 2004-09-02 23:59:26 x2000habouzit Exp $
***************************************************************************}
envoyer la newsletter tel qu'elle.
</div>
<div class="center">
- <input type="text" name="test_to" size="40" value="{$smarty.session.username}@m4x.org" />
+ <input type="text" name="test_to" size="40" value="{$smarty.session.forlife}@m4x.org" />
<input type="submit" name="submit" value="Envoi Test" />
<br />
<input type="submit" name="submit" value="Envoi Definitif" style="color:red;" />
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: carva_redirect.tpl,v 1.6 2004-08-31 11:25:38 x2000habouzit Exp $
+ $Id: carva_redirect.tpl,v 1.7 2004-09-02 23:56:54 x2000habouzit Exp $
***************************************************************************}
il est possible de faire pointer
{dynamic}
{if $alias}
- les adresses <strong>http://www.carva.org/{$smarty.session.username}</strong>
+ les adresses <strong>http://www.carva.org/{$smarty.session.forlife}</strong>
et <strong>http://www.carva.org/{$alias}</strong>
{else}
- l'adresse <strong>http://www.carva.org/{$smarty.session.username}</strong>
+ l'adresse <strong>http://www.carva.org/{$smarty.session.forlife}</strong>
{/if}
{/dynamic}
vers la page WEB de ton choix. Pour de plus amples détails, consulte
<p>
{dynamic}
{if $carva}
- Actuellement, l'adresse <a href="http://www.carva.org/{$smarty.session.username}">http://www.carva.org/{$smarty.session.username}</a>
+ Actuellement, l'adresse <a href="http://www.carva.org/{$smarty.session.forlife}">http://www.carva.org/{$smarty.session.forlife}</a>
{if $alias}
ainsi que l'adresse <a href="http://www.carva.org/{$alias}">http://www.carva.org/{$alias}</a>
sont redirigées
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: doc_carva.tpl,v 1.6 2004-09-02 22:33:58 x2000bedo Exp $
+ $Id: doc_carva.tpl,v 1.7 2004-09-02 23:55:58 x2000habouzit Exp $
***************************************************************************}
Dans la lignée du service de redirection d'emails de <strong>Polytechnique.org</strong>,
il est possible de faire pointer
{if $smarty.session.alias}
- l'adresse <strong>http://www.carva.org/{dyn s=$smarty.session.username}</strong>
+ l'adresse <strong>http://www.carva.org/{dyn s=$smarty.session.forlife}</strong>
{else}
- les adresses <strong>http://www.carva.org/{dyn s=$smarty.session.username}</strong>
+ les adresses <strong>http://www.carva.org/{dyn s=$smarty.session.forlife}</strong>
et <strong>http://www.carva.org/{$smarty.session.alias}</strong> ";
{/if}
vers la page WEB de ton choix.
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: doc_emails.tpl,v 1.4 2004-08-31 11:25:39 x2000habouzit Exp $
+ $Id: doc_emails.tpl,v 1.5 2004-09-02 23:55:58 x2000habouzit Exp $
***************************************************************************}
</div>
<p>
Polytechnique.org te fournit un service de redirection de tes mails à vie. Toute ta vie, tu auras
- l'adresse <strong>{dyn s=$smarty.session.username}@polytechnique.org</strong>
+ l'adresse <strong>{dyn s=$smarty.session.forlife}@polytechnique.org</strong>
à ta disposition. Cependant, il s'agit d'une redirection, il faut donc que tu aies une boite au
lettres fonctionnelles pour recevoir ton courrier (il en existe des
<a href="{"docs/doc_gratuits.php"|url}">gratuites</a>).
<p>
Ainsi, durant toute ta vie, et malgré d'eventuels nombreux changements d'adresses réelles, tous
tes correspondants pourront toujours te contacter sur
- <strong>{dyn s=$smarty.session.username}@polytechnique.org</strong> et
- <strong>{dyn s=$smarty.session.username}@m4x.org</strong>.
+ <strong>{dyn s=$smarty.session.forlife}@polytechnique.org</strong> et
+ <strong>{dyn s=$smarty.session.forlife}@m4x.org</strong>.
</p>
<p>
L'utilisation de ce service est très simple. Sur <a href="{"emails.php"|url}">cette
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: form.valid.ml.tpl,v 1.7 2004-08-31 11:25:40 x2000habouzit Exp $
+ $Id: form.valid.ml.tpl,v 1.8 2004-09-03 00:00:22 x2000habouzit Exp $
***************************************************************************}
<tr>
<td>Demandeur :</td>
<td>
- <a href="javascript:x()" onclick="popWin('/fiche.php?user={$valid->username}')">
+ <a href="javascript:x()" onclick="popWin('/fiche.php?user={$valid->forlife}')">
{$valid->prenom} {$valid->nom}
</a>
</td>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: mescontacts_ldif.tpl,v 1.3 2004-08-31 11:25:39 x2000habouzit Exp $
+ $Id: mescontacts_ldif.tpl,v 1.4 2004-09-02 23:55:57 x2000habouzit Exp $
***************************************************************************}
{foreach item=c from=$contacts}
{******************************************************************************}
{******************************************************************************}
{if $c.epouse}
-dn: cn={"`$c.prenom` `c.epouse` (`$c.nom`)"|utf8},mail={$c.username}@polytechnique.org
+dn: cn={"`$c.prenom` `c.epouse` (`$c.nom`)"|utf8},mail={$c.forlife}@polytechnique.org
cn: {"`$c.prenom` `c.epouse`"|utf8}
{else}
-dn: cn={"`$c.prenom` `$c.nom`"|utf8},mail={$c.username}@polytechnique.org
+dn: cn={"`$c.prenom` `$c.nom`"|utf8},mail={$c.forlife}@polytechnique.org
cn: {"`$c.prenom` `$c.nom`"|utf8}
{/if}
sn: {$c.nom}
givenname: {$c.prenom|utf8}
-uid: {$c.username}
-mail: {$c.username}@polytechnique.org
-{if $c.alias}
-mailalternateaddress: {$c.alias}@polytechnique.org
-mozillasecondemail: {$c.alias}@polytechnique.org
-{/if}
+uid: {$c.forlife}
+mail: {$c.forlife}@polytechnique.org
+{foreach from=$c.aliases item=alias}
+mailalternateaddress: {$alias}@polytechnique.org
+mozillasecondemail: {$alias}@polytechnique.org
+{/foreach}
{if $c.mobile}
mobile: {$c.mobile|utf8}
cellphone: {$c.mobile|utf8}
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: preferences.tpl,v 1.6 2004-08-31 11:25:39 x2000habouzit Exp $
+ $Id: preferences.tpl,v 1.7 2004-09-02 23:56:17 x2000habouzit Exp $
***************************************************************************}
<div class="rubrique">
<a href="{"carva_redirect.php"|url}">Ma redirection de page WEB</a>
</div>
<div class="explication">
- Tu peux configurer ta redirection WEB http://www.carva.org/{dyn s=$smarty.session.username}
+ Tu peux configurer ta redirection WEB http://www.carva.org/{dyn s=$smarty.session.forlife}
</div>
</td>
<td><div class="question">