suppression pour melix
authorPascal Corpet <pascal.corpet@m4x.org>
Sat, 25 Jun 2005 15:23:27 +0000 (15:23 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:25 +0000 (23:29 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-748

ChangeLog
htdocs/alias.php
templates/alias.tpl

index c53b0b9..e6d71be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
 ================================================================================
+VERSION 0.9.8                                                                                                           21 Jun 2005
+
+Bug/Wish :
+
+       * Profile :
+               - User can delete his own melix.                                                                        -Car
+       
+================================================================================
 VERSION 0.9.7                                                                                                           21 Jun 2005
 
 New :
index c0e7a63..9716a21 100644 (file)
@@ -29,6 +29,17 @@ $forlife = Session::get('forlife');
 
 $page->assign('demande', AliasReq::get_request($uid));
 
+//Suppression d'un alias
+if (Env::get('suppr', false)) {
+    $globals->xdb->execute(
+       'DELETE virtual, virtual_redirect
+          FROM virtual
+     INNER JOIN virtual_redirect USING (vid)
+         WHERE alias LIKE {?} AND (redirect = {?} OR redirect = {?})',
+         Env::get('suppr'), 
+        $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2);
+}
+
 //Récupération des alias éventuellement existants
 $res = $globals->xdb->query(
         "SELECT  alias, emails_alias_pub
index 2c3980e..acce61a 100644 (file)
       </tr>
     </table>
   </form>
+  {if $actuel}
+  <form action="{$smarty.server.PHP_SELF}" method="post"
+      onsubmit="return confirm('Es-tu sûr de vouloir supprimer {$actuel} ?')">
+    <table class="bicol" cellpadding="4" summary="Suppression d'alias">
+      <tr>
+        <th>Suppression d'alias</th>
+      </tr>
+      <tr>
+        <td class="center">
+          <input type="hidden" name="suppr" value="{$actuel}" />
+          <input type="submit" value="Supprimer l'alias {$actuel}" />
+        </td>
+      </tr>
+    </table>
+  </form>
+  {/if}
 {/if}
 
 {* vim:set et sw=2 sts=2 sws=2: *}