old things
authorx2000habouzit <x2000habouzit>
Mon, 22 Nov 2004 11:34:25 +0000 (11:34 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 22 Nov 2004 11:34:25 +0000 (11:34 +0000)
htdocs/acces_wap.php [deleted file]
templates/acces_wap.tpl [deleted file]

diff --git a/htdocs/acces_wap.php b/htdocs/acces_wap.php
deleted file mode 100644 (file)
index 52378d8..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************
-        $Id: acces_wap.php,v 1.6 2004-11-22 11:15:30 x2000habouzit Exp $
- ***************************************************************************/
-
-require("xorg.inc.php");
-
-new_skinned_page('acces_wap.tpl', AUTH_MDP);
-
-if (isset($_REQUEST['op']) && $_REQUEST['op'] == "valid") {
-    // on enregistre les modifications des parametres
-    $sql="update wap set flags='";
-    if (isset($_REQUEST['actif'])) $sql.="actif,";
-    if (isset($_REQUEST['useimage'])) $sql.="useimage,";
-    if (isset($_REQUEST['ccfrom'])) $sql.="ccfrom,"; 
-    if (isset($_REQUEST['IMAPssl'])) $sql.="IMAPssl";   
-    $sql.="'";
-    if (isset($_REQUEST['screenwidth'])&&is_integer($_REQUEST['screenwidth'])) $sql.=",screenwidth = {$_REQUEST['screenwidth']}";
-    if (isset($_REQUEST['screenheight'])&&is_integer($_REQUEST['screenheight'])) $sql.=",screenheight = {$_REQUEST['screenheight']}";
-    if (isset($_REQUEST['fromaddr'])&&in_array($_REQUEST['fromaddr'],array("m4x","polytechnique","autre"))) $sql.=",fromaddr = '{$_REQUEST['fromaddr']}'";
-    if (isset($_REQUEST['otheraddr'])) $sql.=",otheraddr = '".addslashes($_REQUEST['otheraddr'])."'";
-    if (isset($_REQUEST['IMAPserver'])) $sql.=",IMAPserver = '".addslashes($_REQUEST['IMAPserver'])."'";
-    if (isset($_REQUEST['IMAPport'])&&is_integer($_REQUEST['IMAPport'])) $sql.=",IMAPport = {$_REQUEST['IMAPport']}";
-    if (isset($_REQUEST['IMAPdir'])) $sql.=",IMAPdir = '".addslashes($_REQUEST['IMAPdir'])."'";
-    $sql.=" where uid = ".$_SESSION['uid'];
-    $globals->db->query($sql);
-
-    $page->assign('OK',true);
-    $page->run('OK');
-} else { // pas de formulaire soumis
-    $sql = "SELECT  FIND_IN_SET('actif',flags) AS actif,
-                    FIND_IN_SET('useimage',flags) AS useimage,
-                    screenwidth,screenheight,fromaddr,otheraddr,
-                    FIND_IN_SET('ccfrom',flags) AS ccfrom,
-                    IMAPserver,IMAPport,IMAPdir,
-                    FIND_IN_SET('IMAPssl',flags) AS IMAPssl
-                    FROM wap WHERE uid = ".$_SESSION['uid'];
-    $result = $globals->db->query($sql);
-
-    if (mysql_num_rows($result)==0) {
-        //l'utilisateur n'a pas de profil WAP => on le crée
-        $globals->db->query("INSERT INTO wap (uid) VALUES (".$_SESSION['uid'].")");
-        $result = $globals->db->query($sql);
-    }
-
-    $page->assign('wap', mysql_fetch_assoc($result));
-    mysql_free_result($result);
-    $page->run();
-}
-?>
diff --git a/templates/acces_wap.tpl b/templates/acces_wap.tpl
deleted file mode 100644 (file)
index 0a0bcef..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-{***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************
-        $Id: acces_wap.tpl,v 1.7 2004-10-24 14:41:11 x2000habouzit Exp $
- ***************************************************************************}
-
-
-{if $OK}
-<p class="erreur">
-  Configuration du site WAP enregistrée.
-</p>
-{else}
-<h1>Paramètre du site WAP</h1>
-
-<p>
-  Tu peux utiliser certaines fonctionnalités du site Polytechnique.org sur un terminal WAP.<br />
-  (téléphone portable, PDA, ...)<br />
-  Il est disponible à l'adresse https://wap.polytechnique.org (# TODO # adresse de devel: http://wap.m4x.org/?u=prenom.nom&amp;p=passsmtp)<br />
-  <a href="docs/doc_wap.php">Pourquoi et comment</a> utiliser le site WAP de Polytechnique.org. (##TODO## à ecrire)<br />
-</p>
-<p>
-  Pour utiliser le site WAP, il faut que tu l'actives explicitement en cochant la case ci dessous.
-</p>
-{dynamic}
-<form action="{$smarty.server.REQUEST_URI}" method="post" name="wap_form">
-  <table class="bicol" cellpadding="3" summary="Paramètres généraux du site WAP">
-    <tr>
-      <th colspan="2">
-        Paramètres généraux du site WAP
-      </th>
-    </tr>
-    <tr>
-      <td class="titre">
-        Activer l'accès WAP:
-      </td>
-      <td>
-        <input type="checkbox" name="actif" {if $wap.actif}checked="checked"{/if} />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Terminal affichant les images:
-      </td>
-      <td>
-        <input type="checkbox" name="useimage" {if $wap.useimage}checked="checked"{/if} />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Largeur de l'écran (pixels):
-      </td>
-      <td>
-        <input type="text" name="screenwidth" size="4" value="{$wap.screenwidth}" />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Hauteur de l'écran (pixels):
-      </td>
-      <td>
-        <input type="text" name="screenwidth" size="4" value="{$wap.screenheight}" />
-      </td>
-    </tr>
-  </table>
-
-  <p>
-    La largeur et la hauteur de l'écran sont juste utilisé à titre <strong>indicatif</strong> pour améliorer l'affichage des photos.
-    Si vous ne les connaissez pas, vous pouvez les laisser à la valeur par défaut ou faire des essais successifs.<br />
-  </p>
-  <br />
-  <table class="bicol" cellpadding="3" summary="Envoi de mail">
-    <tr>
-      <th colspan="2">
-        Paramètres pour l'envoi de mail
-      </th>
-    </tr>
-    <tr>
-      <td class="titre">
-        Adresse de l'expéditeur:
-      </td>
-      <td>
-       <select name="fromaddr">
-          <option value="m4x" {if $wap.fromaddr eq "m4x"}selected="selected"{/if}>
-          {$smarty.session.forlife}@m4x.org
-          </option>
-          <option value="polytechnique" {if $wap.fromaddr eq "polytechnique"}selected="selected"{/if}>
-          {$smarty.session.forlife}@polytechnique.org
-          </option>
-          <option value="autre" {if $wap.fromaddr eq "autre"}selected="selected"{/if}>
-          Autre...
-          </option>
-       </select>
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        (si autre)
-      </td>
-      <td>
-        <input type="text" name="otheraddr" size="60" value="{$wap.otheraddr}" />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Mettre mon adresse en CC:
-      </td>
-      <td>
-        <input type="checkbox" name="ccfrom" {if $wap.ccfrom}checked="checked"{/if} />
-      </td>
-    </tr>
-  </table>
-  <p>
-    <br/>
-    Si votre boite mail est sur un serveur <strong>IMAP</strong>, vous pouvez activer la lecture de vos mails depuis le site WAP.
-  </p>
-  <table class="bicol" cellpadding="3" summary="Lecture des mails">
-    <tr>
-      <th colspan="2">
-        Paramètres pour la lecture des mails
-      </th>
-    </tr>
-    <tr>
-      <td class="titre">
-        Serveur IMAP:
-      </td>
-      <td>
-        <input type="text" name="IMAPserver" size="40" value="{$wap.IMAPserver}" />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Utiliser le SSL:
-      </td>
-      <td>
-        <input type="checkbox" name="IMAPssl" {if $wap.IMAPssl}checked="checked"{/if} />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Port:
-      </td>
-      <td>
-        <input type="text" name="IMAPport" size="10" value="{$wap.IMAPport}" />
-      </td>
-    </tr>
-    <tr>
-      <td class="titre">
-        Répertoire à lire:
-      </td>
-      <td>
-        <input type="text" name="IMAPdir" size="40" value="{$wap.IMAPdir}" />
-      </td>
-    </tr>
-  </table>
-  <br />
-  <div class="center">
-    <input type="hidden" name="op" value="valid" />
-    <input type="submit" value="Valider" />
-  </div>
-</form>
-{/dynamic}
-{/if}
-
-{* vim:set et sw=2 sts=2 sws=2: *}