mails.php + css simplifications
authorx2000habouzit <x2000habouzit>
Wed, 11 Feb 2004 15:35:31 +0000 (15:35 +0000)
committerx2000habouzit <x2000habouzit>
Wed, 11 Feb 2004 15:35:31 +0000 (15:35 +0000)
18 files changed:
etat_migration
htdocs/css/default.css
htdocs/emails.php [new file with mode: 0644]
templates/docs/doc_nn.tpl
templates/docs/doc_nntp.tpl
templates/docs/doc_oe.tpl
templates/docs/index.tpl
templates/emails.tpl [new file with mode: 0644]
templates/include/form.valid.aliases.tpl
templates/include/form.valid.epouses.tpl
templates/include/form.valid.ml.tpl
templates/include/form.valid.photos.tpl
templates/include/form.valid.sondages.tpl
templates/include/liste_domaines.tpl
templates/password_prompt.tpl
templates/password_prompt_logged.tpl
templates/trezo/gere_operations.tpl
templates/trezo/index.tpl

index ab5d65d..17f4d4a 100644 (file)
@@ -68,7 +68,6 @@ Etat  | Ancien nom                                                              | Nouveau nom
          | sondage/titre.php                                             | 
          | sondage/validation.php                                        | 
 ------+-[ emails ... ]----------------------------+----------------
-         | emails.php                                                            | 
          | routage-mail.php                                              | 
 ------+-[ inscription + mdp ]---------------------+----------------
          | inscrire.php                                                          | 
@@ -174,6 +173,7 @@ xx    | docs/doc_ssl.php                                              | -
 xx       | docs/index.php                                                        | -
 xx       | domaineperso.php                                              | -
 xx       | dons.php                                                              | -
+xx       | emails.php                                                            | -
 xx       | ethique.php                                                           | docs/ethique.php
 xx       | exit.php                                                              | -
 xx       | faq.php                                                                       | docs/faq.php
index 16c2ff0..5896c6f 100644 (file)
@@ -26,6 +26,8 @@ li    { padding-left: 3px; padding-right: 3px; text-align: justify; }
 hr    { width: 90%; text-align: center }
 
 .center { text-align: center; }
+.right  { text-align: right; }
+.middle { vertical-align: middle; }
 
 /**: II. :**/
 
@@ -94,6 +96,8 @@ p.smaller, div.smaller {
     font-style: italic;
 }
 
+td.half { width: 50%; padding: 4px; }
+
 /**: III. :**/
 
 table.bicol {
@@ -241,4 +245,4 @@ table.tinybicol td.info, table.bicol td.info {
     vertical-align: top;
 }
 /* vim: set et ts=4 sts=4 sw=4: */
-/* $Id: default.css,v 1.13 2004-02-04 22:47:45 x2000habouzit Exp $ */
+/* $Id: default.css,v 1.14 2004-02-11 15:35:32 x2000habouzit Exp $ */
diff --git a/htdocs/emails.php b/htdocs/emails.php
new file mode 100644 (file)
index 0000000..0bc5187
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+require("auto.prepend.inc.php");
+new_skinned_page('emails.tpl',AUTH_COOKIE);
+
+// on regarde si on a affaire à un homonyme
+$res = mysql_query("SELECT username!=loginbis AND loginbis!='',alias FROM auth_user_md5 WHERE username = '".$_SESSION["username"]."'");
+list($is_homonyme,$alias) = mysql_fetch_row($res);
+mysql_free_result($res);
+$page->assign('is_homonyme', $is_homonyme);
+$page->assign('alias', $alias);
+
+
+$sql = "SELECT email
+        FROM emails
+        WHERE uid = {$_SESSION["uid"]} AND num != 0 AND (FIND_IN_SET('active', flags) OR FIND_IN_SET('filtre', flags))";
+$page->mysql_assign($sql, 'mails', 'nb_mails');
+
+
+// on regarde si l'utilisateur a un alias et si oui on l'affiche !
+$sql = "SELECT domain FROM groupex.aliases WHERE id=12 AND email like '".$_SESSION['username']."'";
+$result = mysql_query($sql);
+if ($result && list($aliases) = mysql_fetch_row($result))
+    $page->assign('melix', substr($aliases,0,-3));
+mysql_free_result($result);
+
+$page->display();
+?> 
index d8922cb..fb1d06d 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: doc_nn.tpl,v 1.4 2004-02-11 13:15:34 x2000habouzit Exp $ *}
+{* $Id: doc_nn.tpl,v 1.5 2004-02-11 15:35:32 x2000habouzit Exp $ *}
 
 <p class="normal">
     [<a href="{"docs/doc_nn.php?doc=smtp"|url}">Configuration du smtp</a>]
@@ -93,7 +93,7 @@
       correspondre à l'écran ci-contre.
                </p>
   </td>
-  <td style="width:50%">
+  <td class="half">
     <p class="normal">
       2. Dans la partie <strong>Serveur de courrier sortant</strong>, indique
                        <code>ssl.polytechnique.org</code> dans le champ <strong>Serveur de
index 722cfa7..c161bce 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: doc_nntp.tpl,v 1.3 2004-02-11 13:15:34 x2000habouzit Exp $ *}
+{* $Id: doc_nntp.tpl,v 1.4 2004-02-11 15:35:32 x2000habouzit Exp $ *}
 
 <div class="rubrique">Les forums de Polytechnique.org</div>
 <p class="normal">
@@ -88,7 +88,9 @@
 <ul>
   <li><strong>Serveur</strong> : <code>ssl.polytechnique.org</code></li>
   <li>Utiliser une connexion <strong>s&eacute;curis&eacute;e</strong> (SSL, port 563)</li>
-  <li style="text-align:justify;">Ce serveur demande &agrave; ce que tu t'identifies : utilise ton identifiant (prenom.nom) et le mot de passe que tu as choisi pour le service SMTP/NNTP.</li>
+  <li>
+    Ce serveur demande &agrave; ce que tu t'identifies : utilise ton identifiant (prenom.nom) et le mot de passe que tu as choisi pour le service SMTP/NNTP.
+  </li>
 </ul>
 <p class="normal">
   La configuration pas à pas, images à l'appui :
index 5add7fa..82fb234 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: doc_oe.tpl,v 1.4 2004-02-11 13:15:34 x2000habouzit Exp $ *}
+{* $Id: doc_oe.tpl,v 1.5 2004-02-11 15:35:32 x2000habouzit Exp $ *}
 
 <p class="normal">
   [<a href="{"docs/doc_oe.php?doc=smtp"|url}">Configuration du smtp</a>]
 
 <table summary="Quatrième étape" cellpadding="5">
 <tr> 
-  <td style="verical-align: middle; width:220px">
+  <td style="width:220px" class="middle">
     <p class="normal">
       1. Dans l'onglet <strong>&quot;Serveurs&quot;</strong>, indique 
       <strong>ssl.polytechnique.org</strong> comme serveur SMTP
@@ -260,7 +260,7 @@ Et maintenant quelques remarques :
   </td>
 </tr>
 <tr>
-  <td style="width:50%">
+  <td class="half">
       1. Dans le menu principal d'Outlook Express, choisis le sous-menu 
       <strong>&quot;Comptes&quot;</strong>.
   </td>
@@ -278,7 +278,7 @@ Et maintenant quelques remarques :
   </td>
 </tr>
 <tr>
-  <td style="width:50%">
+  <td class="half">
       1. Un compte est désigné par un nom de serveur. Il est possible que tu aies une liste
       vide la première fois que tu ouvres cette boite.
       Ici tu vois à quoi tu devras arriver en fin de configuration.
@@ -299,7 +299,7 @@ Et maintenant quelques remarques :
   </td>
 </tr>
 <tr>
-  <td style="width:50%">
+  <td class="half">
       1. Tu vas alors arriver à l'écran de configuration suivant
       (après avoir éventuellement du cliquer plusieurs fois sur <strong>suivant</strong>).
   </td>
index 4b05ea8..7f45151 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: index.tpl,v 1.4 2004-02-11 13:15:34 x2000habouzit Exp $ *}
+{* $Id: index.tpl,v 1.5 2004-02-11 15:35:32 x2000habouzit Exp $ *}
 
 <div class="rubrique">
   Documentations et Aides diverses
@@ -10,7 +10,7 @@
     </th>
 </tr>
 <tr class="impair">
-    <td style="width:50%">
+    <td class="half">
        <div class="lien">
            <a href="doc_emails.php">Mes adresses de redirection</a>
        </div>
@@ -80,7 +80,7 @@
     </td>
 </tr>
 <tr class="pair">
-    <td style="width:50%">
+    <td class="half">
        <div class="lien">
            <a href="doc_smtp.php">SMTP sécurisé</a>
        </div>
     </th>
 </tr>
 <tr class="impair">
-  <td style="width:50%">
+  <td class="half">
        <div class="lien">
            <a href="doc_oe.php">Outlook Express</a>
        </div>
diff --git a/templates/emails.tpl b/templates/emails.tpl
new file mode 100644 (file)
index 0000000..f518425
--- /dev/null
@@ -0,0 +1,115 @@
+{* $Id: emails.tpl,v 1.1 2004-02-11 15:35:32 x2000habouzit Exp $ *}
+
+<div class="rubrique">
+Gestion de mes courriers électroniques
+</div>
+
+{dynamic}
+
+<table class="bicol">
+  <tr>
+    <th>Mes adresses polytechniciennes à vie {if !$is_homonyme}*{/if}</th>
+  </tr>
+  <tr class="impair">
+    <td>
+      Tes adresses polytechniciennes sont
+      <strong>{$smarty.session.username}@polytechnique.org</strong> et
+      <strong>{$smarty.session.username}@m4x.org</strong>
+      (M4X signifie <em>mail for X</em>, son intérêt est de te doter d'une adresse à vie
+      moins "voyante" que l'adresse @polytechnique.org).
+      {if $alias}
+      Tu disposes également des adresses {$alias}@polytechnique.org et {$alias}@m4x.org
+      {/if}
+    </td>
+  </tr>
+  <tr class="pair">
+    <td>
+      Elles seront prochainement <strong>complétées d'une adresse @polytechnique.edu</strong>,
+      plus lisible dans les pays du monde où "Polytechnique" n'évoque pas grand chose,
+      .edu étant le suffixe propre aux universités et établissements d'enseignement supérieur.
+      </p>
+    </td>
+  </tr>
+</table>
+
+<br />
+
+<table class="bicol">
+  <tr>
+    <th>Où est-ce que je reçois le courrier qui m'y est adressé ?</th>
+  </tr>
+  <tr>
+    <td>
+      Actuellement, tout courrier électronique qui t'y est adressé, est envoyé
+      {if $nb_mails eq 1} à l'adresse {else} aux adresses {/if}
+      {section name=mail loop=$mails}
+      <strong>{$mails[mail].email}</strong>{if $smarty.section.mail.last}.{else}, {/if}
+      {/section}
+      <br />
+      Si tu souhaites <strong>modifier ce reroutage de ton courrier,</strong>
+      <a href="{"routage-mail.php"|url}">il te suffit de te rendre ici !</a>
+    </td>
+  </tr>
+</table>
+
+<br />
+
+<table class="bicol">
+  <tr>
+    <th colspan="2">Antivirus, antispam</td>
+  </tr>
+  <tr>
+    <td class="half">
+      Tous les courriers qui te sont envoyés sur tes adresses polytechniciennes sont
+      <strong>filtrés par un logiciel antivirus</strong> très performant. Il te protège de ces
+      vers très gênants, qui se propagent souvent par le courrier électronique.
+    </td>
+    <td class="half">
+      De même, un <strong>service antispam évolué</strong> est en place. Tu peux lui demander
+      de te débarrasser des spams que tu reçois. Pour en savoir plus, et l'activer,
+      <a href="antispam.php">c'est très simple, suis ce lien </a>!
+      <br />
+    </td>
+  </tr>
+</table>
+
+<br />
+
+<table class="bicol">
+  <tr>
+    <th>Un alias sympatique : melix !</th>
+  </tr>
+  <tr class="impair">
+    <td>
+      Tu peux ouvrir en supplément une adresse synonyme de ton adresse @polytechnique.org, 
+      sur les domaines @melix.org et @melix.net (melix = Mél X).
+    </td>
+  </tr>
+  <tr class="pair">
+    <td>
+      {if $melix}
+      Tu disposes à l'heure actuelle des adresses <strong>{$melix}net</strong> et <strong>{$melix}org</strong>.
+      Pour <strong>demander à la place un autre alias melix</strong>,
+      <a href="alias.php">il te suffit de te rendre ici</a>
+      {else}
+      A l'heure actuelle <strong>tu n'as pas activé d'adresse melix</strong>.
+      Si tu souhaites le faire, <a href="alias.php">il te suffit de venir ici</a>
+      {/if}
+    </td>
+  </tr>
+</table>
+
+
+{if !$is_homonyme}
+<p class="smaller">
+* Tu les garderas toute ta vie, sauf si un jour un homonyme d'une autre promotion
+s'inscrit à Polytechnique.org (les cas d'homonymie sont <em>très</em> rares),
+auquel cas ces adresses deviendraient
+{$smarty.session.username}{$smarty.session.promo|regex_replace:"/^../":""}@polytechnique.org et
+{$smarty.session.username}{$smarty.session.promo|regex_replace:"/^../":""}@m4x.org
+</p>
+{/if}
+
+{/dynamic}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
index de46392..cd07356 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.aliases.tpl,v 1.2 2004-02-07 17:18:16 x2000habouzit Exp $ *}
+{* $Id: form.valid.aliases.tpl,v 1.3 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
@@ -24,7 +24,7 @@
   </td>
 </tr>
 <tr>
-  <td style="vertical-align: middle;">
+  <td class="middle">
     <input type="submit" name="submit" value="Accepter" />
     <br /><br />
     <input type="submit" name="submit" value="Refuser" />
index 54dcf81..48c40de 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.epouses.tpl,v 1.1 2004-02-07 17:26:29 x2000habouzit Exp $ *}
+{* $Id: form.valid.epouses.tpl,v 1.2 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
@@ -32,7 +32,7 @@
 </tr>
 {/if}
 <tr>
-  <td style="vertical-align: middle;">
+  <td class="middle">
     <input type="submit" name="submit" value="Accepter" />
     <br /><br />
     <input type="submit" name="submit" value="Refuser" />
index a00779b..455bcaa 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.ml.tpl,v 1.1 2004-02-07 18:04:56 x2000habouzit Exp $ *}
+{* $Id: form.valid.ml.tpl,v 1.2 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
@@ -49,7 +49,7 @@
   <td>{$valid->membres_txt}</td>
 </tr>
 <tr>
-  <td style="border-top:1px dotted inherit; vertical-align: middle;">
+  <td class="middle" style="border-top:1px dotted inherit">
     <input type="submit" name="submit" value="Accepter" />
     <br /><br />
     <input type="submit" name="submit" value="Refuser" />
index d95c70a..e03e498 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.photos.tpl,v 1.1 2004-02-07 18:32:41 x2000habouzit Exp $ *}
+{* $Id: form.valid.photos.tpl,v 1.2 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
   </td>
 </tr>
 <tr>
-  <td style="vertical-align: middle;" colspan="2">
+  <td class="middle" colspan="2">
     <img src="{"getphoto.php?x=$valid->username"|url}" style="width:110px;" alt=" [ PHOTO ] " />
     <img src="{"getphoto.php?x=$valid->username&amp;req=true"|url}" style="width:110px;" alt=" [ PHOTO ] " />
   </td>
 </tr>
 <tr>
-  <td style="vertical-align: middle;">
+  <td class="middle">
     <input type="submit" name="submit" value="Accepter" />
     <br /><br />
     <input type="submit" name="submit" value="Refuser" />
index dec7261..d024241 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: form.valid.sondages.tpl,v 1.1 2004-02-08 12:38:26 x2000habouzit Exp $ *}
+{* $Id: form.valid.sondages.tpl,v 1.2 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.PHP_SELF}" method="POST">
 <input type="hidden" name="uid" value="{$valid->uid}" />
@@ -28,7 +28,7 @@
   </td>
 </tr>
 <tr>
-  <td style="vertical-align: middle;">
+  <td class="middle">
       <input type="submit" name="submit" value="Accepter" />
       <br /><br />
       <input type="submit" name="submit" value="Refuser" />
index b9e5881..2d246dc 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: liste_domaines.tpl,v 1.1 2004-02-04 19:47:47 x2000habouzit Exp $ *}
+{* $Id: liste_domaines.tpl,v 1.2 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 {dynamic}
 {$result}
@@ -14,12 +14,12 @@ Administrer le routage email sur ton(tes) domaine(s)
   Cependant, prends bien note que cette administration se fera bientôt depuis le site www.polytechnique.net.
 </p>
 
-<p style="text-align: right;">
+<div class="right">
 {foreach item=dom from=$domaines}
   <a href="{"domaine.php?domaine=$dom"|escape:"url"|url}">{$dom}</a>
   <br />
 {/foreach}
-</p>
+</div>
 {/if}
 
 {/dynamic}
index 94d200f..aca628a 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: password_prompt.tpl,v 1.11 2004-02-04 22:14:12 x2000habouzit Exp $ *}
+{* $Id: password_prompt.tpl,v 1.12 2004-02-11 15:35:32 x2000habouzit Exp $ *}
 <noscript>
   <span class="erreur">
     Ton navigateur n'accepte pas le javaScript !!
@@ -68,7 +68,7 @@ Si tu n'es pas {insert name="getName" script="insert.password.inc.php"}, change
         <img src="{"images/pi.png"|url}" alt=" [ ? ] " />
         <a href="{"recovery.php"|url}">J'ai perdu mon mot de passe</a>
       </td>
-      <td style="text-align:right;">
+      <td class="right">
         <input type="submit" name="submitbtn" value="Envoyer" />
       </td>
     </tr>
index 0f31147..bb0e005 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: password_prompt_logged.tpl,v 1.8 2004-02-04 19:47:47 x2000habouzit Exp $ *}
+{* $Id: password_prompt_logged.tpl,v 1.9 2004-02-11 15:35:32 x2000habouzit Exp $ *}
 
 <div class="center">
   <table summary="Accès sécurisé" style="width: 90%;">
@@ -33,7 +33,7 @@
         <img src="{"images/pi.png"|url}" alt=" [ ? ] ">
         <a href="{"recovery.php"|url}">J'ai perdu mon mot de passe</a>
       </td>
-      <td style="text-align:right;">
+      <td class="right">
         <input  type="submit" name="submitbtn" value="Envoyer" />
       </td>
     </tr>
index 744aed6..213e17e 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: gere_operations.tpl,v 1.2 2004-02-11 13:15:35 x2000habouzit Exp $ *}
+{* $Id: gere_operations.tpl,v 1.3 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 {dynamic}
 
@@ -66,7 +66,7 @@
   <th>Solde en début de mois</th>
 </tr>
 <tr>
-  <td style="text-align:right">{$from_solde}</td>
+  <td class="right">{$from_solde}</td>
 </tr>
 </table>
 
     <td>{$op.id}</td>
     <td>{$op.date|date_format:"%d/%m/%Y"}</td>
     <td>{$op.label}</td>
-    <td style="text-align:right">{$op.debit}</td>
-    <td style="text-align:right">{$op.credit}</td>
+    <td class="right">{$op.debit}</td>
+    <td class="right">{$op.credit}</td>
     <td>
       <form method="POST" action="{$smarty.server.PHP_SELF}">
         <input type="hidden" name="operation_id" value="{$op.id}" />
   <th>Solde en fin de mois</th>
 </tr>
 <tr>
-  <td style="text-align:right">{$to_solde}</td>
+  <td class="right">{$to_solde}</td>
 </tr>
 </table>
 
index c576fd2..ca38374 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: index.tpl,v 1.2 2004-02-11 13:15:35 x2000habouzit Exp $ *}
+{* $Id: index.tpl,v 1.3 2004-02-11 15:35:33 x2000habouzit Exp $ *}
 
 {dynamic}
 
@@ -11,7 +11,7 @@
   <th>Solde en début de mois</th>
 </tr>
 <tr>
-  <td style="text-align:right">{$from_solde}</td>
+  <td class="right">{$from_solde}</td>
 </tr>
 </table>
 
@@ -28,8 +28,8 @@
   <tr class="{cycle values="impair,pair"}">
     <td>{$op.date|date_format:"%d/%m/%Y"}</td>
     <td>{$op.label}</td>
-    <td style="text-align:right">{$op.debit}</td>
-    <td style="text-align:right">{$op.credit}</td>
+    <td class="right">{$op.debit}</td>
+    <td class="right">{$op.credit}</td>
   </tr>
 {/foreach}
 </table>
@@ -41,7 +41,7 @@
   <th>Solde en fin de mois</th>
 </tr>
 <tr>
-  <td style="text-align:right">{$to_solde}</td>
+  <td class="right">{$to_solde}</td>
 </tr>
 </table>