Jean-Marc Coic <jean-marc.coic@m4x.org>
Pascal Corpet <pascal.corpet@m4x.org>
Guillaume Gommard <guillaume.gommard@m4x.org>
+ Stéphane Jacob <stephane.jacob@m4x.org>
Fabien Laborde <fabien.laborde@m4x.org>
Jeremy Lainé <jeremy.laine@m4x.org>
Olivier Le Floch <olivier.le-floch@m4x.org>
Raphael Marichez <raphael.marichez@m4x.org>
Vincent Palatin <vincent.palatin@m4x.org>
+ Vincent Zanotti <vincent.zanotti@m4x.org>
XML-RPC stuff :
================================================================================
+VERSION 0.10.1 XX XX XXXX
+
+From 0.10.0 branch:
+
+ * Auth:
+ - Fix use of deprecated PlLogger in password recovery -JAC
+
+ * Lists:
+ - #942: Fix missing MLs in ML listing -FRU
+ - #943: Fix adding member to a list -FRU
+
+ * Profile:
+ - Fix malformed query leading to error when adding an address -FRU
+
+ * XnetGrp:
+ - #861: Fix adding non-registered X with compound name to a group -JAC
+
+================================================================================
VERSION 0.10.0 11 12 2008
New:
##
core:
- [ -d core ] || ( git submodule init && git submodule update )
+ [ -d core/.git ] || ( git submodule init && git submodule update )
make -C core all
##
openid: get-openid spool/openid/store
# There is no obvious way to automatically use the latest version
+OPENID_VERSION = 2.1.3
get-openid:
@if ! test -d include/Auth; then \
- wget http://openidenabled.com/files/php-openid/packages/php-openid-2.1.2.tar.bz2; \
- tar -xjf php-openid-2.1.2.tar.bz2; \
- mv php-openid-2.1.2/Auth include/; \
- rm php-openid-2.1.2.tar.bz2; \
- rm -r php-openid-2.1.2; \
+ wget http://openidenabled.com/files/php-openid/packages/php-openid-$(OPENID_VERSION).tar.bz2; \
+ tar -xjf php-openid-$(OPENID_VERSION).tar.bz2; \
+ mv php-openid-$(OPENID_VERSION)/Auth include/; \
+ rm php-openid-$(OPENID_VERSION).tar.bz2; \
+ rm -r php-openid-$(OPENID_VERSION); \
fi
spool/openid/store:
mkdir -p $@
chmod o+w $@
-
##
## banana
##
--- /dev/null
+#!/usr/bin/env python
+#***************************************************************************
+#* Copyright (C) 2003-2009 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 *
+#***************************************************************************/
+
+"""Checks that a working copy of plat/al has all the latest security patches
+applied. It uses the local SECURITY file to determine the list of mandatory
+patches.
+
+Important notice: do not execute this script directly from an automatic checkout
+of plat/al. It would be extremely unwise to execute it with root privileges from
+a place where everybody can change it !
+
+Usage (-w updates the local .htaccess to disable guilty working copies):
+ check_security_fixes.py [-w] -b REFERENCE_PLATAL PLATAL_TO_CHECK ...
+"""
+
+import optparse
+import os
+import re
+import sys
+import time
+
+
+class WorkingCopy(object):
+ """Helper class for analyzing the state of a working copy, and eventually
+ disabling it if an issue is found.
+
+ It disables the local checkout by updating its .htaccess file to deny all
+ requests with an explicit message which states how to fix the issue.
+ """
+
+ CORE_SECURITY_FILE = 'core/SECURITY'
+ MASTER_SECURITY_FILE = 'SECURITY'
+ SECURITY_FIX_RE = re.compile('^-[0-9]{4}')
+
+ HTACCESS_FILE = 'htdocs/.htaccess'
+ HTACCESS_TEMPLATE = 'Deny from all\nErrorDocument 403 "%s"\n'
+ HTACCESS_MTIME_DELTA = 86400 * 365 * 10
+ ERROR_MESSAGE_LINE = '<li>%s</li>\n'
+ ERROR_MESSAGE_TEMPLATE = """
+ Your local checkout of plat/al has been disabled for security reasons. It
+ appears that several critical flaws known in the plat/al codebase have not
+ been patched in your working copy. These flaws are listed below:
+ <ul>%s</ul>
+
+ Please have a look at the SECURITY and core/SECURITY files in any recent
+ plat/al checkout to get more details on which commits did fix those flaws.
+ <br/><br/>
+
+ <em>Note:</em> you can re-enable your working copy by typing
+ <code>make</code> in the root directory of your checkout (usually in
+ <code>~/dev/platal</code>).
+ """
+
+ def __init__(self, reference_path, checkout_path):
+ self.reference_path = reference_path
+ self.checkout_path = checkout_path
+
+ def GetPartialSecurityDiff(self, security_file):
+ """Diffs the reference and a local SECURITY file to find missing security
+ fixes. It filters out the diff result to extract the list of fixes."""
+
+ ref_file = os.path.join(self.reference_path, security_file)
+ wc_file = os.path.join(self.checkout_path, security_file)
+
+ diff = os.popen('diff -NBwu0 %s %s' % (ref_file, wc_file))
+ for line in diff.readlines():
+ if self.SECURITY_FIX_RE.match(line):
+ yield line[1:-1]
+
+ def GetSecurityDiff(self):
+ """Retrieves the missing security patches for various parts of plat/al."""
+
+ missing_fixes = []
+ missing_fixes.extend(self.GetPartialSecurityDiff(self.CORE_SECURITY_FILE))
+ missing_fixes.extend(self.GetPartialSecurityDiff(self.MASTER_SECURITY_FILE))
+ return missing_fixes
+
+ def GetErrorMessage(self, missing_fixes):
+ """Returns a the .htaccess HTML error message.
+
+ It builds an HTML message explaining why the working copy was disabled, how
+ to fix the underlying issues, and how to re-enable it."""
+
+ fixes_list = map(lambda item: self.ERROR_MESSAGE_LINE % item, missing_fixes)
+ return self.ERROR_MESSAGE_TEMPLATE % '\n'.join(fixes_list)
+
+ def Write403Htaccess(self, html_content):
+ """Updates the .htaccess to disable all requests, using |html_content| as
+ the error message. It also sets a modification time in the past to ensure
+ that any subsquent call to 'make' on the wc will actually overwrite the
+ .htaccess file."""
+
+ htaccess = os.path.join(self.checkout_path, self.HTACCESS_FILE)
+ ht_fd = open(htaccess, 'w')
+ ht_fd.write(self.HTACCESS_TEMPLATE % (html_content
+ .replace('\\', '\\\\')
+ .replace('"', '\\"')
+ .replace('\n', '\\\n')))
+ ht_fd.close()
+
+ mtime = time.time() - self.HTACCESS_MTIME_DELTA
+ os.utime(htaccess, (mtime, mtime))
+
+ def CheckAndDisableWorkingCopy(self, disable_when_flawed):
+ """Checks that the local working copy is in a sane state. If not, warns the
+ user by printing a message to the console, and disables the wc if
+ |disable_when_flawed| is set to true."""
+
+ missing_fixes = self.GetSecurityDiff()
+ if len(missing_fixes):
+ # Warn the user on the standard output.
+ print "Found %d missing security fixes in %s:" % (len(missing_fixes),
+ self.checkout_path)
+ for issue in missing_fixes:
+ print " * %s" % issue
+
+ # Disable the working copy.
+ if disable_when_flawed:
+ print "Disabling working copy in %s." % self.checkout_path
+ self.Write403Htaccess(self.GetErrorMessage(missing_fixes))
+
+def SelfCheckIsLatestVersion(base_path):
+ """Checks that this script is the latest available by comparing itself to
+ the reference script in |base_path|. It is important to do that check as
+ most deployment will want to execute this script with root privileges,
+ which implies that this script is deployed in a safe directory, and not
+ just executed from an automatically updated checkout of plat/al (how
+ unsafe would that be ...)."""
+
+ base_script = os.path.join(base_path, 'bin/check_security_fixes.py')
+ local_script = os.path.abspath(sys.argv[0])
+
+ if os.system('diff -q %s %s' % (base_script, local_script)) != 0:
+ sys.stderr.write('Please upgrade this script to the latest version.\n')
+
+def main():
+ parser = optparse.OptionParser()
+ parser.add_option('-b', '--base_path', action='store', dest='base_path')
+ parser.add_option('-w', '--write_htaccess', action='store_true',
+ dest='write_htaccess', default=False)
+ (options, args) = parser.parse_args()
+
+ if options.base_path is None:
+ print "Error: option --base_path (or -b) is required for the script to run."
+ sys.exit(1)
+ if not os.path.exists(os.path.join(options.base_path,
+ WorkingCopy.MASTER_SECURITY_FILE)):
+ print "The base plat/al (%s) is too old to be used." % options.base_path
+ sys.exit(1)
+
+ SelfCheckIsLatestVersion(options.base_path)
+ for platal in args:
+ wc = WorkingCopy(options.base_path, platal)
+ wc.CheckAndDisableWorkingCopy(options.write_htaccess)
+
+if __name__ == '__main__':
+ main()
+
+# vim:set et sw=2 sts=2 sws=2 enc=utf-8:
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
// send feedback to the mailing list owners
if ($client->handle_request($list, $mid, $action, utf8_decode($reason))) {
$sent_mails += $count;
- $texte = "le message suivant :\n\n"
+ $texte = "Le message suivant :\n\n"
. " Auteur: {$mail['sender']}\n"
. " Sujet : « {$mail['subj']} »\n"
. " Date : ".strftime("le %d %b %Y à %H:%M:%S", (int)$mail['stamp'])."\n\n"
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$age = (time() - intval($age)) / 86400;
$head = "";
if ($age > 15) {
- $head = "[autodestruction du serveur] ";
+ $head = "[Autodestruction du serveur] ";
} elseif ($age > 7) {
- $head = "[armageddon imminent] ";
+ $head = "[Armageddon imminent] ";
} elseif ($age > 5) {
- $head = "[guerre nucléaire] ";
+ $head = "[Guerre nucléaire] ";
} elseif ($age > 3) {
$head = "[ET Téléphone maison] ";
} elseif ($age > 1) {
- $head = "[réveil !] ";
+ $head = "[Réveil !] ";
} elseif (!empty($nbveryold)) {
- $head = "[urgent] ";
+ $head = "[Urgent] ";
}
$mymail = new PlMailer();
$mymail->setFrom('validation@' . $globals->mail->domain);
$mymail->addTo("validation@" . $globals->mail->domain);
-$mymail->setSubject($head . "il y a $nb validation$plural non effectuée$plural");
+$mymail->setSubject($head . "Il y a $nb validation$plural non effectuée$plural");
$message =
- "il y a $nb validation$plural à effectuer \n"
+ "Il y a $nb validation$plural à effectuer\n"
.(empty($nbold)?"":"dont $nbold depuis le dernier mail !!!\n")
.(empty($nbveryold)?"":"et dont *$nbveryold* ".($nbveryold == 1 ? "est" : "sont")." en retard de plus de 6h !!!")
."\n"
GROUP BY type
ORDER BY type");
while (list($type, $nb) = $res->next()) {
- $message .= "- $type: $nb\n";
+ $message .= "- $type : $nb\n";
}
$message = wordwrap($message,78);
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#! /usr/bin/perl -w
#***************************************************************************
-#* Copyright (C) 2003-2008 Polytechnique.org *
+#* Copyright (C) 2003-2009 Polytechnique.org *
#* http://opensource.polytechnique.org/ *
#* *
#* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/perl
#***************************************************************************
-#* Copyright (C) 2003-2008 Polytechnique.org *
+#* Copyright (C) 2003-2009 Polytechnique.org *
#* http://opensource.polytechnique.org/ *
#* *
#* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/env python
#***************************************************************************
-#* Copyright (C) 2004-2008 polytechnique.org *
+#* Copyright (C) 2004-2009 polytechnique.org *
#* http://opensource.polytechnique.org/ *
#* *
#* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/env python2.5
# -*- coding: utf-8 -*-
#***************************************************************************
-#* Copyright (C) 2004-2008 polytechnique.org *
+#* Copyright (C) 2004-2009 Polytechnique.org *
#* http://opensource.polytechnique.org/ *
#* *
#* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
}
if ($gp) {
- $res = XDB::query('SELECT a.*, d.nom AS domnom,
- FIND_IN_SET(\'wiki_desc\', a.flags) AS wiki_desc,
- FIND_IN_SET(\'notif_unsub\', a.flags) AS notif_unsub
+ $res = XDB::query("SELECT a.*, d.nom AS domnom,
+ FIND_IN_SET('wiki_desc', a.flags) AS wiki_desc,
+ FIND_IN_SET('notif_unsub', a.flags) AS notif_unsub,
+ FIND_IN_SET('has_ml', a.flags) AS has_ml
FROM groupex.asso AS a
LEFT JOIN groupex.dom AS d ON d.id = a.dom
- WHERE diminutif = {?}', $gp);
+ WHERE diminutif = {?}",
+ $gp);
if (!($aid = $res->fetchOneAssoc())) {
$aid = array();
}
<?php
/*
- * Copyright (C) 2003-2004 Polytechnique.org
+ * Copyright (C) 2003-2009 Polytechnique.org
* http://opensource.polytechnique.org/
*
* This program is free software; you can redistribute it and/or modify
$this->uid, $this->session);
}
+ public function isValid($uid) {
+ return $uid == $this->uid;
+ }
/** Logs an action and its related data.
*
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
{
global $globals;
+ if (!$login) {
+ throw new UserNotFoundException();
+ }
+
// If $data is an integer, fetches directly the result.
if (is_numeric($login)) {
$res = XDB::query("SELECT user_id FROM auth_user_md5 WHERE user_id = {?}", $login);
$this->perm_flags = self::makePerms($this->perms);
}
+ // Return the password of the user
+ public function password()
+ {
+ return XDB::fetchOneCell('SELECT u.password
+ FROM auth_user_md5 AS u
+ WHERE u.user_id = {?}', $this->id());
+ }
+
// Return permission flags for a given permission level.
public static function makePerms($perms)
{
public static function _default_user_callback($login, $results)
{
$result_count = count($results);
- if ($result_count == 0 || !S::has_perms()) {
+ if ($result_count == 0 || !S::admin()) {
Platal::page()->trigError("Il n'y a pas d'utilisateur avec l'identifiant : $login");
} else {
Platal::page()->trigError("Il y a $result_count utilisateurs avec cet identifiant : " . join(', ', $results));
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$sub['créer une liste'] = "$dim/lists/create";
$sub['créer un alias'] = "$dim/alias/create";
}
- if (S::has_perms()) {
+ if (S::admin()) {
$sub['gérer les groupes'] = array('href' => 'admin', 'style' => 'color: gray;');
$sub['clear cache'] = array('href' => 'purge_cache?token=' . S::v('xsrf_token'), 'style' => 'color: gray;');
}
$menu['Administrer'] = $sub;
- } elseif (S::has_perms()) {
+ } elseif (S::admin()) {
$sub = array();
$sub['gérer les groupes'] = 'admin';
$sub['clear cache'] = 'purge_cache?token=' . S::v('xsrf_token');
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
return false;
} elseif ($lose) {
$may_update[$asso_id] = false;
- } elseif (S::has_perms() || (S::has('suid') && $force)) {
+ } elseif (S::admin() || (S::has('suid') && $force)) {
$may_update[$asso_id] = true;
} elseif (!isset($may_update[$asso_id]) || $force) {
$res = XDB::query("SELECT perms
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
private function tryCookie()
{
S::kill('auth_by_cookie');
- if (Cookie::v('ORGaccess') == '' || !Cookie::has('ORGuid')) {
+ if (Cookie::v('access') == '' || !Cookie::has('uid')) {
return -1;
}
$res = XDB::query('SELECT user_id, password
FROM auth_user_md5
WHERE user_id = {?} AND perms IN(\'admin\', \'user\')',
- Cookie::i('ORGuid'));
+ Cookie::i('uid'));
if ($res->numRows() != 0) {
list($uid, $password) = $res->fetchOneRow();
require_once 'secure_hash.inc.php';
$expected_value = hash_encrypt($password);
- if ($expected_value == Cookie::v('ORGaccess')) {
+ if ($expected_value == Cookie::v('access')) {
S::set('auth_by_cookie', $uid);
return 0;
} else {
}
}
if ($response != $expected_response) {
+ if (!S::logged()) {
+ Platal::page()->trigError('Mot de passe ou nom d\'utilisateur invalide');
+ } else {
+ Platal::page()->trigError('Mot de passe invalide');
+ }
S::logger($uid)->log('auth_fail', 'bad password');
return null;
}
return $uid;
}
+ Platal::page()->trigError('Mot de passe ou nom d\'utilisateur invalide');
return null;
}
if (!S::has('suid')) {
if (Post::has('domain')) {
if (($domain = Post::v('domain', 'login')) == 'alias') {
- setcookie('ORGdomain', "alias", (time() + 25920000), '/', '', 0);
+ Cookie::set('domain', 'alias', 300);
} else {
- setcookie('ORGdomain', '', (time() - 3600), '/', '', 0);
+ Cookie::kill('domain');
}
- // pour que la modification soit effective dans le reste de la page
- $_COOKIE['ORGdomain'] = $domain;
}
}
S::kill('challenge');
}
if ($level == AUTH_SUID) {
S::set('auth', AUTH_MDP);
- unset($_SESSION['log']);
}
// Retrieves main user properties.
} else {
$logger = S::logger($uid);
$logger->saveLastSession();
- setcookie('ORGuid', $uid, (time() + 25920000), '/', '', 0);
+ Cookie::set('uid', $uid, 300);
if (S::i('auth_by_cookie') == $uid || Post::v('remember', 'false') == 'true') {
- $cookie = hash_encrypt($sess['password']);
- setcookie('ORGaccess', $cookie, (time() + 25920000), '/', '', 0);
- if (S::i('auth_by_cookie') != $uid) {
- $logger->log("cookie_on");
- }
+ $this->setAccessCookie(false, S::i('auth_by_cookie') != $uid);
} else {
- setcookie('ORGaccess', '', time() - 3600, '/', '', 0);
- $logger->log("cookie_off");
+ $this->killAccessCookie();
}
}
return null;
}
- public function makePerms($perm)
+ protected function makePerms($perm, $is_admin)
{
$flags = new PlFlagSet();
if ($perm == 'disabled' || $perm == 'ext') {
$n = select_notifs(false, S::i('uid'), S::v('watch_last'), false);
S::set('notifs', $n->numRows());
}
+
+ public function setAccessCookie($replace = false, $log = true) {
+ if (S::has('suid') || ($replace && !Cookie::blank('access'))) {
+ return;
+ }
+ require_once('secure_hash.inc.php');
+ Cookie::set('access', hash_encrypt(S::v('password')), 300, true);
+ if ($log) {
+ S::logger()->log('cookie_on');
+ }
+ }
+
+ public function killAccessCookie($log = true) {
+ Cookie::kill('access');
+ if ($log) {
+ S::logger()->log('cookie_off');
+ }
+ }
+
+ public function killLoginFormCookies() {
+ Cookie::kill('uid');
+ Cookie::kill('domain');
+ }
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
-Subproject commit 2b1ac5abd3eafffdc01beb88a90ca0ba88c6ad18
+Subproject commit 31ac496f284cd21164e05d1472ad1ceca9fe1095
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
var new_pass = hash_encrypt(document.forms.login.password.value);
var old_pass = MD5(document.forms.login.password.value);
- str = readCookie('ORGuid') + ":" +
+ str = document.forms.loginsub.username.value + ":" +
hash_encrypt(document.forms.login.password.value) + ":" +
document.forms.loginsub.challenge.value;
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************\r
- * Copyright (C) 2003-2008 Polytechnique.org *\r
+ * Copyright (C) 2003-2009 Polytechnique.org *\r
* http://opensource.polytechnique.org/ *\r
* *\r
* This program is free software; you can redistribute it and/or modify *\r
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
url = document.URL;
fqdn = url.replace(/^https?:\/\/([^\/]*)\/.*$/,'$1');
light = (url.indexOf('display=light') > url.indexOf('?'));
+ resource_page = (url.indexOf('rss') > -1 || url.indexOf('ical') > -1);
$("a,link").each(
function(i) {
href = 'http://' + fqdn + '/' + href;
}
}
- if (this.nodeName.toLowerCase() == 'a') {
+ if (this.nodeName.toLowerCase() == 'a' && !resource_page) {
if (rss && href.indexOf('prefs/rss') < 0 && (href.indexOf('xml') > -1 || href.indexOf('hash'))) {
goodiesPopup(this, __goodies_rss);
} else if (ical) {
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
'geoloc', 'lists', 'marketing', 'payment', 'platal',
'profile', 'register', 'search', 'stats', 'admin',
'newsletter', 'axletter', 'bandeau', 'survey',
- 'gadgets', 'googleapps', 'poison', 'openid');
+ 'gadgets', 'googleapps', 'poison', 'openid', 'reminder');
if (!($path = Env::v('n')) || ($path{0} < 'A' || $path{0} > 'Z')) {
$platal->run();
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function hook_checkcancel($_headers)
{
- return ($_headers['x-org-id'] == S::v('hruid') or S::has_perms());
+ return ($_headers['x-org-id'] == S::v('hruid') or S::admin());
}
class ForumsBanana extends Banana
array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
Banana::$nntp_host = 'news://web_' . $user->login()
. ":{$globals->banana->password}@{$globals->banana->server}:{$globals->banana->port}/";
- if (S::has_perms()) {
+ if (S::admin()) {
Banana::$msgshow_mimeparts[] = 'source';
}
Banana::$debug_nntp = ($globals->debug & DEBUG_BT);
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
global $globals;
$perms = S::v('perms');
$group = $globals->asso('nom');
- if (S::has_perms()) {
+ if (S::admin()) {
return "Administrateur de Polytechnique.org";
} else if ($group && $perms->hasFlag('groupadmin')) {
return "Animateur de $group";
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
Banana::$debug_smarty = ($globals->debug & DEBUG_SMARTY);
Banana::$mbox_helper = $globals->banana->mbox_helper;
Banana::$feed_updateOnDemand = true;
- if (S::has_perms()) {
+ if (S::admin()) {
Banana::$msgshow_mimeparts[] = 'source';
}
array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function hook_checkcancel($_headers)
{
- return ($_headers['x-org-id'] == S::v('hruid') or S::has_perms());
+ return ($_headers['x-org-id'] == S::v('hruid') or S::admin());
}
function hook_makeLink($params)
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
public function clean_errors()
{
- if (!S::has_perms()) {
+ if (!S::admin()) {
return false;
}
$this->panne = 0;
// IMAP storage is always visible to administrators, and is allowed for
// everyone when the service is marked as 'active'.
- if ($globals->mailstorage->imap_active || S::has_perms()) {
+ if ($globals->mailstorage->imap_active || S::admin()) {
$storages[] = 'imap';
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function get_address_infos($txt)
{
global $globals;
+
$url = $globals->geoloc->webservice_url."address.php?precise=1&txt=" . urlencode($txt);
- if (!($f = @fopen($url, 'r'))) return false;
+ if ($globals->debug & DEBUG_BT) {
+ if (!isset(PlBacktrace::$bt['Geoloc'])) {
+ new PlBacktrace('Geoloc');
+ }
+ PlBacktrace::$bt['Geoloc']->start($url);
+ }
+ $f = @fopen($url, 'r');
+ if ($f === false) {
+ if ($globals->debug & DEBUG_BT) {
+ PlBacktrace::$bt['Geoloc']->stop(0, 'Can\'t fetch result');
+ }
+ return false;
+ }
$keys = explode('|',fgets($f));
$vals = explode('|',fgets($f));
+ if ($globals->debug & DEBUG_BT) {
+ $data = array();
+ for ($i = 0 ; $i < count($keys) ; ++$i) {
+ $data[] = array($keys[$i], $vals[$i]);
+ }
+ PlBacktrace::$bt['Geoloc']->stop(count($keys), null, $data);
+ }
$infos = empty_address();
foreach ($keys as $i=>$key) {
if($vals[$i]) {
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
public $r_last_webmail;
public $reporting_date;
+ // Nicknames (aliases) registered for that user, lazily loaded.
+ public $nicknames;
+
// Pending requests in the gappsd job queue (cf. top note).
public $pending_create;
public $pending_delete;
return $this->g_status == 'disabled';
}
+ // Loads and returns the list of nicknames for the user.
+ public function nicknames()
+ {
+ if ($this->nicknames == null) {
+ $res = XDB::query(
+ "SELECT g_nickname
+ FROM gapps_nicknames
+ WHERE g_account_name = {?}
+ ORDER BY g_nickname",
+ $this->g_account_name);
+ $this->nicknames = $res->fetchColumn();
+ }
+ return $this->nicknames;
+ }
+
// Changes the GoogleApps password.
public function set_password($password) {
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
+// {{{ class MailNotFound
+
+class MailNotFound extends Exception {
+}
+
+// }}}
+
// {{{ class MassMailer
abstract class MassMailer
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
}
$res = XDB::query("SELECT * FROM newsletter WHERE bits='new'");
}
+ if ($res->numRows() != 1) {
+ throw new MailNotFound();
+ }
$nl = $res->fetchOneAssoc();
$this->_id = $nl['id'];
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+// Base class for a reminder; it offers the factory for creating valid reminders
+// tailored for a given user, as well as base methods for reminder impls.
+// Sub-classes should define at least the abstract methods, and the static
+// IsCandidate method (prototype: (User &$user)).
+//
+// Usage:
+// // Instantiates and returns a valid Reminder object for the user.
+// $reminder = Reminder::GetCandidateReminder($user);
+//
+// // Returns the named Reminder object.
+// $reminder = Reminder::GetByName($user, 'ax_letter');
+abstract class Reminder
+{
+ // Details about the reminder.
+ public $name;
+ protected $type_id;
+ protected $weight;
+ protected $remind_delay_yes;
+ protected $remind_delay_no;
+ protected $remind_delay_dismiss;
+
+ // Details about the user.
+ protected $user;
+ protected $current_status;
+ protected $last_ask;
+
+ // Constructs the Reminder object from a mandatory User instance, a list of
+ // key-value pairs from the `reminder_type` and `reminder` tables.
+ function __construct(User &$user, array $type)
+ {
+ $this->user = &$user;
+
+ $this->type_id = $type['type_id'];
+ $this->name = $type['name'];
+ $this->weight = $type['weight'];
+ $this->remind_delay_yes = $type['remind_delay_yes'];
+ $this->remind_delay_no = $type['remind_delay_no'];
+ $this->remind_delay_dismiss = $type['remind_delay_dismiss'];
+
+ if (isset($type['status'])) {
+ $this->current_status = $type['status'];
+ }
+ if (isset($type['remind_last'])) {
+ $this->last_ask = $type['remind_last'];
+ }
+ }
+
+ // Updates (or creates) the reminder line for the pair (|user|, |reminder_id|)
+ // using the |status| as status, and the |next_ask| as the delay between now
+ // and the next ask (if any).
+ private static function UpdateStatus($user_id, $type_id, $status, $next_ask)
+ {
+ XDB::execute('REPLACE INTO reminder
+ SET uid = {?}, type_id = {?}, status = {?},
+ remind_last = NOW(), remind_next = FROM_UNIXTIME({?})',
+ $user_id, $type_id, $status,
+ ($next_ask > 0 ? time() + $next_ask * 24 * 60 * 60 : null));
+ }
+
+ // Updates the status of the reminder for the current user.
+ protected function UpdateOnYes()
+ {
+ $this->UpdateStatus($this->user->id(), $this->type_id,
+ 'yes', $this->remind_delay_yes);
+ }
+ protected function UpdateOnNo()
+ {
+ $this->UpdateStatus($this->user->id(), $this->type_id,
+ 'no', $this->remind_delay_no);
+ }
+ protected function UpdateOnDismiss()
+ {
+ $this->UpdateStatus($this->user->id(), $this->type_id,
+ 'dismiss', $this->remind_delay_dismiss);
+ }
+
+ // Display and http handling helpers --------------------------------------
+
+ // Handles a hit on the reminder onebox (for links made using the GetBaseUrl
+ // method below).
+ abstract public function HandleAction($action);
+
+ // Displays the reminder as a standalone html snippet. It should be used
+ // when the reminder is the only output of a page.
+ public function DisplayStandalone(&$page)
+ {
+ header('Content-Type: text/html; charset=utf-8');
+ $page->changeTpl('reminder/base.tpl', NO_SKIN);
+ $this->Prepare($page);
+ }
+
+ // Prepares the display by assigning template variables.
+ public function Prepare(&$page)
+ {
+ $page->assign_by_ref('reminder', $this);
+ }
+
+ // Returns the name of the inner template, or null if a simple text obtained
+ // from GetText should be printed.
+ public function template() { return null; }
+
+ // Returns the text to display in the onebox, or null if a
+ public function text() { return ''; }
+
+ // Returns the title of the onebox.
+ public function title() { return ''; }
+
+ // Should return true if this onebox needs to be considered as a warning and
+ // not just as a subscription offer.
+ public function warning() { return false; }
+
+ // Returns the base url for the reminder module.
+ public function baseurl()
+ {
+ return 'ajax/reminder/' . $this->name;
+ }
+
+ // Static status update methods -------------------------------------------
+
+ // Marks the candidate reminder as having been accepted for user |user_id|.
+ // It is intended to be used when a reminder box has been bypassed, and when
+ // it should behave as if the user had clicked on 'yes'.
+ protected static function MarkCandidateAsAccepted($user_id, $candidate)
+ {
+ Reminder::UpdateStatus($user_id, $candidate['type_id'],
+ 'yes', $candidate['remind_delay_yes']);
+ }
+
+ // Static factories -------------------------------------------------------
+
+ // Returns a chosen class using the user data from |user|, and from the database.
+ public static function GetCandidateReminder(User &$user)
+ {
+ $res = XDB::query('SELECT rt.*, r.status, r.remind_last
+ FROM reminder_type AS rt
+ LEFT JOIN reminder AS r ON (rt.type_id = r.type_id AND r.uid = {?})
+ WHERE r.uid IS NULL OR r.remind_next < NOW()',
+ $user->id());
+ $candidates = $res->fetchAllAssoc();
+
+ $weight_map = create_function('$a', 'return $a["weight"];');
+ while (count($candidates) > 0) {
+ $position = rand(1, array_sum(array_map($weight_map, $candidates)));
+ foreach ($candidates as $key => $candidate) {
+ $position -= $candidate['weight'];
+ if ($position <= 0) {
+ $class = self::GetClassName($candidate['name']);
+ if ($class && call_user_func(array($class, 'IsCandidate'), $user, $candidate)) {
+ return new $class($user, $candidate);
+ }
+ unset($candidates[$key]);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ // Returns an instantiation of the reminder class which name is |name|, using
+ // user data from |user|, and from the database.
+ public static function GetByName(User &$user, $name)
+ {
+ if (!($class = self::GetClassName($name))) {
+ return null;
+ }
+
+ $res = XDB::query('SELECT rt.*, r.status, r.remind_last
+ FROM reminder_type AS rt
+ LEFT JOIN reminder AS r ON (rt.type_id = r.type_id AND r.uid = {?})
+ WHERE rt.name = {?}',
+ $user->id(), $name);
+ if ($res->numRows() > 0) {
+ return new $class($user, $res->fetchOneAssoc());
+ }
+
+ return null;
+ }
+
+ // Computes the name of the class for reminder named |name|, and preloads
+ // the class.
+ private static function GetClassName($name)
+ {
+ include_once "reminder/$name.inc.php";
+ $class = 'Reminder' . str_replace(' ', '', ucwords(str_replace('_', ' ', $name)));
+ return (class_exists($class) ? $class : null);
+ }
+}
+
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderAxLetter extends Reminder
+{
+ public function HandleAction($action)
+ {
+ if ($action == 'yes') {
+ Platal::load('axletter', 'axletter.inc.php');
+ AXLetter::subscribe();
+ $this->UpdateOnYes();
+ }
+
+ if ($action == 'dismiss') {
+ $this->UpdateOnDismiss();
+ }
+
+ if ($action == 'no') {
+ $this->UpdateOnNo();
+ }
+ }
+
+ public function text()
+ {
+ return "La lettre de l'AX te permet de recevoir régulièrement les
+ informations importantes de l'AX.";
+ }
+ public function title()
+ {
+ return "Inscription à la lettre de l'AX";
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ Platal::load('axletter', 'axletter.inc.php');
+ $isSubscribed = AXLetter::subscriptionState();
+ if ($isSubscribed) {
+ Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
+ }
+ return !$isSubscribed;
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderEmailBackup extends Reminder
+{
+ public function HandleAction($action)
+ {
+ if ($action == 'yes') {
+ require_once 'emails.inc.php';
+ $storage = new EmailStorage($this->user, 'imap');
+ $storage->activate();
+
+ $this->UpdateOnYes();
+ }
+
+ if ($action == 'dismiss') {
+ $this->UpdateOnDismiss();
+ }
+
+ if ($action == 'no') {
+ $this->UpdateOnNo();
+ }
+ }
+
+ public function text()
+ {
+ return "Tu peux bénéficier d'une sauvegarde des emails. Cela permet
+ d'avoir un accès de secours aux 30 derniers jours d'emails reçus
+ sur ton adresse Polytechnique.org.";
+ }
+ public function title()
+ {
+ return 'Sauvegarde de tes emails';
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ require_once 'emails.inc.php';
+ $storage = new EmailStorage($user, 'imap');
+ if ($storage->active) {
+ Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
+ }
+ return !$storage->active;
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderEmailWarning extends Reminder
+{
+ public function HandleAction($action)
+ {
+ if ($action == 'dismiss') {
+ $this->UpdateOnDismiss();
+ }
+ }
+
+ public function template()
+ {
+ return 'reminder/email_warning.tpl';
+ }
+ public function title()
+ {
+ return "Problème avec ta redirections d'emails";
+ }
+ public function warning()
+ {
+ return true;
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ return count(S::v('mx_failures', array())) > 0;
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderGapps extends Reminder
+{
+ public function HandleAction($action)
+ {
+ switch ($action) {
+ case 'yes':
+ $this->UpdateOnYes();
+ pl_redirect('googleapps');
+ break;
+
+ case 'dismiss':
+ $this->UpdateOnDismiss();
+ break;
+
+ case 'no':
+ $this->UpdateOnNo();
+ break;
+ }
+ }
+
+ public function text()
+ {
+ return "Polytechnique.org te fournit un compte Google Apps qui te permet
+ de disposer des applications web de Google (GMail, Google Calendar,
+ Google Docs, et bien d'autres) sur ton adresse Polytechnique.org
+ habituelle (en savoir plus).";
+ }
+ public function title()
+ {
+ return "Création d'un compte Google Apps";
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ require_once 'googleapps.inc.php';
+ $isSubscribed = GoogleAppsAccount::account_status($user->id());
+ if ($isSubscribed) {
+ Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
+ }
+ return !$isSubscribed;
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderMl extends Reminder
+{
+ public function HandleAction($action)
+ {
+ switch ($action) {
+ case 'suscribe':
+ S::assert_xsrf_token();
+ $subs = array_keys(Post::v('sub_ml'));
+ $current_domain = null;
+
+ $res = XDB::iterRow("SELECT sub, domain
+ FROM register_subs
+ WHERE uid = {?} AND type = 'list'
+ ORDER BY domain",
+ S::i('uid'));
+ while (list($sub, $domain) = $res->next()) {
+ if (array_shift($subs) == "$sub@$domain") {
+ list($sub, $domain) = explode('@', $list);
+ if ($domain != $current_domain) {
+ $current_domain = $domain;
+ $client = new MMList(S::v('uid'), S::v('password'), $domain);
+ }
+ $client->subscribe($sub);
+ }
+ }
+
+ $this->UpdateOnYes();
+ pl_redirect('lists');
+ break;
+
+ case 'dismiss':
+ $this->UpdateOnDismiss();
+ break;
+
+ case 'no':
+ $this->UpdateOnNo();
+ break;
+ }
+ }
+
+ public function Prepare(&$page)
+ {
+ parent::Prepare($page);
+
+ $res = XDB::iterRow("SELECT sub, domain
+ FROM register_subs
+ WHERE uid = {?} AND type = 'list'
+ ORDER BY domain",
+ S::i('uid'));
+ $current_domain = null;
+ $lists = array();
+ while (list($sub, $domain) = $res->next()) {
+ if ($current_domain != $domain) {
+ $current_domain = $domain;
+ $client = new MMList(S::v('uid'), S::v('password'), $domain);
+ }
+ list($details, ) = $client->get_members($sub);
+ $lists["$sub@$domain"] = $details;
+ }
+ $page->assign_by_ref('lists', $lists);
+ }
+
+ public function template()
+ {
+ return 'reminder/ml.tpl';
+ }
+ public function title()
+ {
+ return "Inscription aux listes de diffusion";
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ $res = XDB::query("SELECT COUNT(*) AS lists
+ FROM register_subs
+ WHERE uid = {?} AND type = 'list'",
+ $user->id());
+
+ $mlCount = $res->fetchOneCell();
+ if (!$mlCount) {
+ Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
+ }
+ return ($mlCount > 0);
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderNl extends Reminder
+{
+ public function HandleAction($action)
+ {
+ if ($action == 'yes') {
+ require_once 'newsletter.inc.php';
+ Newsletter::subscribe();
+ $this->UpdateOnYes();
+ }
+
+ if ($action == 'dismiss') {
+ $this->UpdateOnDismiss();
+ }
+
+ if ($action == 'no') {
+ $this->UpdateOnNo();
+ }
+ }
+
+ public function text()
+ {
+ return "La lettre mensuelle de Polytechnique.org te permet de recevoir
+ chaque mois des informations sur les activités et nouvelles de la
+ communauté des X.";
+ }
+ public function title()
+ {
+ return "Inscription à la lettre mensuelle";
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ require_once 'newsletter.inc.php';
+ $isSubscribed = Newsletter::subscriptionState();
+ if ($isSubscribed) {
+ Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
+ }
+ return !$isSubscribed;
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderNoRedirection extends Reminder
+{
+ public function HandleAction($action)
+ {
+ if ($action == 'dismiss') {
+ $this->UpdateOnDismiss();
+ }
+ }
+
+ public function template()
+ {
+ return 'reminder/no_redirection.tpl';
+ }
+ public function title()
+ {
+ return "Problème avec ta redirection d'emails";
+ }
+ public function warning()
+ {
+ return true;
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ return S::v('no_redirect');
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderProfileUpdate extends Reminder
+{
+ public function HandleAction($action)
+ {
+ switch ($action) {
+ case 'dismiss':
+ $this->UpdateOnDismiss();
+ break;
+
+ case 'profile':
+ $this->UpdateOnDismiss();
+ pl_redirect('profile/edit');
+ break;
+
+ case 'photo':
+ $this->UpdateOnDismiss();
+ pl_redirect('photo/change');
+ break;
+
+ case 'geoloc':
+ $this->UpdateOnDismiss();
+ pl_redirect('profile/edit/adresses');
+ break;
+ }
+ }
+
+ public function Prepare(&$page)
+ {
+ parent::Prepare($page);
+
+ $res = XDB::query('SELECT date < DATE_SUB(NOW(), INTERVAL 365 DAY) AS is_profile_old,
+ date AS profile_date, LENGTH(p.attach) > 0 AS photo
+ FROM auth_user_md5 AS u
+ LEFT JOIN photo AS p ON (u.user_id = p.uid)
+ WHERE user_id = {?}',
+ $this->user->id());
+ list($is_profile_old, $profile_date, $has_photo) = $res->fetchOneRow();
+
+ $page->assign('profile_incitation', $is_profile_old);
+ $page->assign('profile_last_update', $profile_date);
+ $page->assign('photo_incitation', $has_photo);
+
+ require_once 'geoloc.inc.php';
+ $res = localize_addresses($this->user->id());
+ $page->assign('geocoding_incitation', count($res));
+
+ $page->assign('incitations_count',
+ ($is_profile_old ? 1 : 0) +
+ ($has_photo ? 0 : 1) +
+ (count($res) > 0 ? 1 : 0));
+ }
+
+ public function template()
+ {
+ return 'reminder/profile_update.tpl';
+ }
+ public function title()
+ {
+ return "Mise à jour de ton profil";
+ }
+ public function warning()
+ {
+ return true;
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ $res = XDB::query('SELECT date < DATE_SUB(NOW(), INTERVAL 365 DAY) AS is_profile_old,
+ p.attach AS photo
+ FROM auth_user_md5 AS u
+ LEFT JOIN photo AS p ON (u.user_id = p.uid)
+ WHERE user_id = {?}',
+ $user->id());
+ list($is_profile_old, $has_photo) = $res->fetchOneRow();
+ require_once 'geoloc.inc.php';
+ $res = localize_addresses($user->id());
+
+ return (count($res) || !$has_photo || $is_profile_old);
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderPromotionMl extends Reminder
+{
+ public function HandleAction($action)
+ {
+ switch ($action) {
+ case 'yes':
+ $res = XDB::query('SELECT id
+ FROM groupex.asso
+ WHERE diminutif = {?}',
+ S::v('promo'));
+ $asso_id = $res->fetchOneCell();
+ XDB::execute('REPLACE INTO groupex.membres (uid, asso_id)
+ VALUES ({?}, {?})',
+ S::v('uid'), $asso_id);
+ $mmlist = new MMList(S::v('uid'), S::v('password'));
+ $mmlist->subscribe('promo' . S::v('promo'));
+
+ $this->UpdateOnYes();
+ break;
+
+ case 'dismiss':
+ $this->UpdateOnDismiss();
+ break;
+
+ case 'no':
+ $this->UpdateOnNo();
+ break;
+ }
+ }
+
+ public function text()
+ {
+ return "La liste de diffusion de ta promotion permet de recevoir les
+ informations plus spécifiques de ta promotion pour pouvoir
+ participer plus facilement aux événements qu'elle organise. Tu
+ seras aussi inscrit dans le groupe de la promotion " .
+ $this->user->promo() . '.';
+ }
+ public function title()
+ {
+ return "Inscription à la liste de diffusion de ta promotion";
+ }
+
+ public static function IsCandidate(User &$user, $candidate)
+ {
+ // We only test if the user is in her promotion group for it is too
+ // expensive to check if she is in the corresponding ML as well.
+ $res = XDB::query('SELECT COUNT(*)
+ FROM groupex.membres
+ WHERE uid = {?} AND asso_id = (SELECT id
+ FROM groupex.asso
+ WHERE diminutif = {?})',
+ $user->id(), S::v('promo'));
+
+ $mlCount = $res->fetchOneCell();
+ if ($mlCount) {
+ Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
+ }
+ return ($mlCount == 0);
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function kill_sessions()
{
- assert(S::has_perms());
+ assert(S::admin());
shell_exec('sudo -u root ' . dirname(dirname(__FILE__)) . '/bin/kill_sessions.sh');
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
// Pro
if (!empty($user['adr_pro'])) {
foreach ($user['adr_pro'] as $pro) {
- $street = array($adr['adr1']);
+ $street = array($pro['adr1']);
if (!empty($pro['adr2'])) {
$street[] = $pro['adr2'];
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'phpinfo' => $this->make_hook('phpinfo', AUTH_MDP, 'admin'),
- 'admin' => $this->make_hook('default', AUTH_MDP, 'admin'),
- 'admin/ax-xorg' => $this->make_hook('ax_xorg', AUTH_MDP, 'admin'),
- 'admin/dead-but-active' => $this->make_hook('dead_but_active', AUTH_MDP, 'admin'),
- 'admin/deaths' => $this->make_hook('deaths', AUTH_MDP, 'admin'),
- 'admin/downtime' => $this->make_hook('downtime', AUTH_MDP, 'admin'),
- 'admin/homonyms' => $this->make_hook('homonyms', AUTH_MDP, 'admin'),
- 'admin/logger' => $this->make_hook('logger', AUTH_MDP, 'admin'),
- 'admin/logger/actions' => $this->make_hook('logger_actions', AUTH_MDP, 'admin'),
- 'admin/postfix/blacklist' => $this->make_hook('postfix_blacklist', AUTH_MDP, 'admin'),
- 'admin/postfix/delayed' => $this->make_hook('postfix_delayed', AUTH_MDP, 'admin'),
+ 'phpinfo' => $this->make_hook('phpinfo', AUTH_MDP, 'admin'),
+ 'admin' => $this->make_hook('default', AUTH_MDP, 'admin'),
+ 'admin/ax-xorg' => $this->make_hook('ax_xorg', AUTH_MDP, 'admin'),
+ 'admin/dead-but-active' => $this->make_hook('dead_but_active', AUTH_MDP, 'admin'),
+ 'admin/deaths' => $this->make_hook('deaths', AUTH_MDP, 'admin'),
+ 'admin/downtime' => $this->make_hook('downtime', AUTH_MDP, 'admin'),
+ 'admin/homonyms' => $this->make_hook('homonyms', AUTH_MDP, 'admin'),
+ 'admin/logger' => $this->make_hook('logger', AUTH_MDP, 'admin'),
+ 'admin/logger/actions' => $this->make_hook('logger_actions', AUTH_MDP, 'admin'),
+ 'admin/postfix/blacklist' => $this->make_hook('postfix_blacklist', AUTH_MDP, 'admin'),
+ 'admin/postfix/delayed' => $this->make_hook('postfix_delayed', AUTH_MDP, 'admin'),
'admin/postfix/regexp_bounces' => $this->make_hook('postfix_regexpsbounces', AUTH_MDP, 'admin'),
- 'admin/postfix/whitelist' => $this->make_hook('postfix_whitelist', AUTH_MDP, 'admin'),
- 'admin/mx/broken' => $this->make_hook('mx_broken', AUTH_MDP, 'admin'),
- 'admin/skins' => $this->make_hook('skins', AUTH_MDP, 'admin'),
- 'admin/synchro_ax' => $this->make_hook('synchro_ax', AUTH_MDP, 'admin'),
- 'admin/user' => $this->make_hook('user', AUTH_MDP, 'admin'),
- 'admin/promo' => $this->make_hook('promo', AUTH_MDP, 'admin'),
- 'admin/validate' => $this->make_hook('validate', AUTH_MDP, 'admin'),
- 'admin/validate/answers' => $this->make_hook('validate_answers', AUTH_MDP, 'admin'),
- 'admin/wiki' => $this->make_hook('wiki', AUTH_MDP, 'admin'),
- 'admin/ipwatch' => $this->make_hook('ipwatch', AUTH_MDP, 'admin'),
- 'admin/icons' => $this->make_hook('icons', AUTH_MDP, 'admin'),
- 'admin/accounts' => $this->make_hook('accounts', AUTH_MDP, 'admin'),
+ 'admin/postfix/whitelist' => $this->make_hook('postfix_whitelist', AUTH_MDP, 'admin'),
+ 'admin/mx/broken' => $this->make_hook('mx_broken', AUTH_MDP, 'admin'),
+ 'admin/skins' => $this->make_hook('skins', AUTH_MDP, 'admin'),
+ 'admin/synchro_ax' => $this->make_hook('synchro_ax', AUTH_MDP, 'admin'),
+ 'admin/user' => $this->make_hook('user', AUTH_MDP, 'admin'),
+ 'admin/promo' => $this->make_hook('promo', AUTH_MDP, 'admin'),
+ 'admin/validate' => $this->make_hook('validate', AUTH_MDP, 'admin'),
+ 'admin/validate/answers' => $this->make_hook('validate_answers', AUTH_MDP, 'admin'),
+ 'admin/wiki' => $this->make_hook('wiki', AUTH_MDP, 'admin'),
+ 'admin/ipwatch' => $this->make_hook('ipwatch', AUTH_MDP, 'admin'),
+ 'admin/icons' => $this->make_hook('icons', AUTH_MDP, 'admin'),
+ 'admin/accounts' => $this->make_hook('accounts', AUTH_MDP, 'admin'),
);
}
$sql = XDB::iterator(
"SELECT crc, nb, update_time, create_time,
- FIND_IN_SET('del', release) AS del,
- FIND_IN_SET('ok', release) AS ok
- FROM postfix_mailseen
+ FIND_IN_SET('del', p.release) AS del,
+ FIND_IN_SET('ok', p.release) AS ok
+ FROM postfix_mailseen AS p
WHERE nb >= 30
- ORDER BY release != ''");
+ ORDER BY p.release != ''");
$page->assign_by_ref('mails', $sql);
}
// however suits our needs.
if ($perms == 'disabled' && $old_fields['perms'] != 'disabled') {
kill_sessions();
+
+ // Also serve a reminder to the admin: disabling an account
+ // does not deactivate email forwarding.
+ $page->trigWarning("N'oubliez pas, le cas échéant, de désactiver les redirections et le compte GoogleApps de l'utilisateur.");
}
// Updates the user profile with the new values.
user_reindex($user->id());
$new_fields = XDB::query($watch_query, $user->id())->fetchOneAssoc();
+ // Redacts the password in the notification, to avoid transmitting
+ // sensitive information by email.
+ $new_fields['password'] = ($old_fields['password'] != $new_fields['password'] ? 'new' : 'old');
+ $old_fields['password'] = 'old';
+
+ // Notifies the admins of the profile update.
$mailer = new PlMailer("admin/useredit.mail.tpl");
$mailer->assign("admin", S::user()->login());
$mailer->assign("user", $user->login());
$account->set_password($pass_encrypted);
}
}
-
- // If the update did disable the user account, disables
- // the Google Apps account as well.
- if ($new_fields['perms'] == 'disabled' && $new_fields['perms'] != $old_fields['perms']) {
- require_once 'googleapps.inc.php';
- $account = new GoogleAppsAccount($user);
- $account->suspend();
- }
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'groupex/donne-chall.php'
- => $this->make_hook('chall', AUTH_PUBLIC),
- 'groupex/export-econfiance.php'
- => $this->make_hook('econf', AUTH_PUBLIC, 'user', NO_HTTPS),
-
- 'webservices/manageurs.php'
- => $this->make_hook('manageurs', AUTH_PUBLIC, 'user', NO_HTTPS),
-
- 'auth-redirect.php' => $this->make_hook('redirect', AUTH_COOKIE),
- 'auth-groupex.php' => $this->make_hook('groupex_old', AUTH_COOKIE),
- 'auth-groupex' => $this->make_hook('groupex', AUTH_COOKIE),
- 'admin/auth-groupes-x' => $this->make_hook('admin_authgroupesx', AUTH_MDP, 'admin'),
+ 'groupex/donne-chall.php' => $this->make_hook('chall', AUTH_PUBLIC),
+ 'groupex/export-econfiance.php' => $this->make_hook('econf', AUTH_PUBLIC, 'user', NO_HTTPS),
+
+ 'webservices/manageurs.php' => $this->make_hook('manageurs', AUTH_PUBLIC, 'user', NO_HTTPS),
+
+ 'auth-redirect.php' => $this->make_hook('redirect', AUTH_COOKIE),
+ 'auth-groupex.php' => $this->make_hook('groupex_old', AUTH_COOKIE),
+ 'auth-groupex' => $this->make_hook('groupex', AUTH_COOKIE),
+ 'admin/auth-groupes-x' => $this->make_hook('admin_authgroupesx', AUTH_MDP, 'admin'),
);
}
$gpex_url .= "&PHPSESSID=" . $_GET["session"];
}
- /* a-t-on besoin d'ajouter le http:// ? */
+ // Normalize the return URL.
if (!preg_match("/^(http|https):\/\/.*/",$gpex_url)) {
$gpex_url = "http://$gpex_url";
}
$gpex_challenge = $_GET["challenge"];
- // mise à jour de l'heure et de la machine de dernier login sauf quand on est en suid
+ // Update the last login information (unless the user is in SUID).
$uid = S::i('uid');
if (!isset($_SESSION['suid'])) {
global $platal;
- S::logger(uid)->log('connexion_auth_ext', $platal->path);
+ S::logger($uid)->log('connexion_auth_ext', $platal->path);
}
- /* on parcourt les entrees de groupes_auth */
+ // Iterate over the auth token to find which one did sign the request.
$res = XDB::iterRow('SELECT privkey, name, datafields, returnurls FROM groupesx_auth');
-
while (list($privkey,$name,$datafields,$returnurls) = $res->next()) {
if (md5($gpex_challenge.$privkey) == $gpex_pass) {
$returnurls = trim($returnurls);
+ // We check that the return url matches a per-key regexp to prevent
+ // replay attacks (more exactly to force replay attacks to redirect
+ // the user to the real GroupeX website, which defeats the attack).
if (empty($returnurls) || @preg_match($returnurls, $gpex_url)) {
$returl = $gpex_url . gpex_make_params($gpex_challenge, $privkey, $datafields, $charset);
http_redirect($returl);
+ } else if (S::admin()) {
+ $page->kill("La requête d'authentification a échouée (url de retour invalide).");
}
}
}
- /* si on n'a pas trouvé, on renvoit sur x.org */
- http_redirect('https://www.polytechnique.org/');
+ // Otherwise (if no valid request was found, or if the return URL is not
+ // acceptable), the user is redirected back to our homepage.
+ pl_redirect('/');
}
function handler_admin_authgroupesx(&$page, $action = 'list', $id = null)
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
foreach ($fieldarr as $val) {
// Determine the requested value, and add it to the answer.
if ($val == 'perms') {
- $params .= gpex_prepare_param($val, S::has_perms() ? 'admin' : 'user', $tohash, $charset);
+ $params .= gpex_prepare_param($val, S::admin() ? 'admin' : 'user', $tohash, $charset);
} else if ($val == 'forlife') {
$params .= gpex_prepare_param($val, S::v('hruid'), $tohash, $charset);
} else if (S::has($val)) {
$perms = $res->fetchOneCell();
} else {
// if no group asked, return main rights
- $perms = S::has_perms() ? 'admin' : 'membre';
+ $perms = S::admin() ? 'admin' : 'membre';
}
$params .= gpex_prepare_param($val, $perms, $tohash, $charset);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'ax' => $this->make_hook('index', AUTH_COOKIE),
+ 'ax' => $this->make_hook('index', AUTH_COOKIE),
'ax/out' => $this->make_hook('out', AUTH_PUBLIC),
'ax/show' => $this->make_hook('show', AUTH_COOKIE),
'ax/edit' => $this->make_hook('submit', AUTH_MDP),
'ax/edit/cancel' => $this->make_hook('cancel', AUTH_MDP),
'ax/edit/valid' => $this->make_hook('valid', AUTH_MDP),
- 'admin/axletter' => $this->make_hook('admin', AUTH_MDP, 'admin'),
+ 'admin/axletter' => $this->make_hook('admin', AUTH_MDP, 'admin'),
);
}
$page->assign('echeance_time', $echeance_time);
$page->assign('saved', $saved);
$page->assign('new', $new);
- $page->assign('is_xorg', S::has_perms());
+ $page->assign('is_xorg', S::admin());
if (!$saved) {
$select = '';
return;
}
- $page->kill("L'envoi de l'annonce {$al->title()} est annulé");
+ $page->killSuccess("L'envoi de l'annonce {$al->title()} est annulé.");
}
function handler_valid(&$page, $force = null)
return;
}
- $page->kill("L'envoi de l'annonce aura lieu dans l'heure qui vient.");
+ $page->killSuccess("L'envoi de l'annonce aura lieu dans l'heure qui vient.");
}
function handler_show(&$page, $nid = 'last')
$this->load('axletter.inc.php');
$page->changeTpl('axletter/show.tpl');
- $nl = new AXLetter($nid);
- if (Get::has('text')) {
- $nl->toText($page, S::v('prenom'), S::v('nom'), S::v('femme'));
- } else {
- $nl->toHtml($page, S::v('prenom'), S::v('nom'), S::v('femme'));
- }
- if (Post::has('send')) {
- $nl->sendTo(S::user()->login(), S::user()->bestEmail(),
- S::v('prenom'), S::v('nom'),
- S::v('femme'), S::v('mail_fmt') != 'texte');
+ try {
+ $nl = new AXLetter($nid);
+ if (Get::has('text')) {
+ $nl->toText($page, S::v('prenom'), S::v('nom'), S::v('femme'));
+ } else {
+ $nl->toHtml($page, S::v('prenom'), S::v('nom'), S::v('femme'));
+ }
+ if (Post::has('send')) {
+ $nl->sendTo(S::user()->login(), S::user()->bestEmail(),
+ S::v('prenom'), S::v('nom'),
+ S::v('femme'), S::v('mail_fmt') != 'texte');
+ }
+ } catch (MailNotFound $e) {
+ return PL_NOT_FOUND;
}
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
WHERE id = {?} OR short_name = {?}", $id, $id);
}
if (!$res->numRows()) {
- $this->_id = null;
- return;
+ throw new MailNotFound();
}
$id = $res->fetchOneRow();
}
static public function hasPerms()
{
- if (S::has_perms()) {
+ if (S::admin()) {
return true;
}
- $res = XDB::query("SELECT 1
+ $res = XDB::query("SELECT COUNT(*)
FROM axletter_rights
WHERE user_id = {?}", S::i('uid'));
- return $res->fetchOneCell();
+ return ($res->fetchOneCell() > 0);
}
static public function grantPerms($uid)
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'bandeau/icone.png' => $this->make_hook('icone',AUTH_PUBLIC, 'user', NO_HTTPS),
- 'bandeau' => $this->make_hook('html', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'bandeau.css' => $this->make_hook('css', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'bandeau/icone.png' => $this->make_hook('icone', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'bandeau' => $this->make_hook('html', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'bandeau.css' => $this->make_hook('css', AUTH_PUBLIC, 'user', NO_HTTPS),
);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
'carnet/notifs' => $this->make_hook('notifs', AUTH_COOKIE),
'carnet/contacts' => $this->make_hook('contacts', AUTH_COOKIE),
- 'carnet/contacts/pdf' => $this->make_hook('pdf', AUTH_COOKIE, 'user', NO_HTTPS),
+ 'carnet/contacts/pdf' => $this->make_hook('pdf', AUTH_COOKIE),
+ 'carnet/contacts/vcard' => $this->make_hook('vcard', AUTH_COOKIE),
'carnet/contacts/ical' => $this->make_hook('ical', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'carnet/contacts/vcard' => $this->make_hook('vcard', AUTH_COOKIE, 'user', NO_HTTPS),
'carnet/rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
);
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'emails' => $this->make_hook('emails', AUTH_COOKIE),
- 'emails/alias' => $this->make_hook('alias', AUTH_MDP),
- 'emails/antispam' => $this->make_hook('antispam', AUTH_MDP),
- 'emails/broken' => $this->make_hook('broken', AUTH_COOKIE),
- 'emails/redirect' => $this->make_hook('redirect', AUTH_MDP),
- 'emails/send' => $this->make_hook('send', AUTH_MDP),
- 'emails/antispam/submit' => $this->make_hook('submit', AUTH_COOKIE),
- 'emails/test' => $this->make_hook('test', AUTH_COOKIE, 'user', NO_AUTH),
-
- 'emails/rewrite/in' => $this->make_hook('rewrite_in', AUTH_PUBLIC),
- 'emails/rewrite/out' => $this->make_hook('rewrite_out', AUTH_PUBLIC),
-
- 'emails/imap/in' => $this->make_hook('imap_in', AUTH_PUBLIC),
-
- 'admin/emails/duplicated' => $this->make_hook('duplicated', AUTH_MDP, 'admin'),
- 'admin/emails/watch' => $this->make_hook('duplicated', AUTH_MDP, 'admin'),
- 'admin/emails/lost' => $this->make_hook('lost', AUTH_MDP, 'admin'),
+ 'emails' => $this->make_hook('emails', AUTH_COOKIE),
+ 'emails/alias' => $this->make_hook('alias', AUTH_MDP),
+ 'emails/antispam' => $this->make_hook('antispam', AUTH_MDP),
+ 'emails/broken' => $this->make_hook('broken', AUTH_COOKIE),
+ 'emails/redirect' => $this->make_hook('redirect', AUTH_MDP),
+ 'emails/send' => $this->make_hook('send', AUTH_MDP),
+ 'emails/antispam/submit' => $this->make_hook('submit', AUTH_COOKIE),
+ 'emails/test' => $this->make_hook('test', AUTH_COOKIE, 'user', NO_AUTH),
+
+ 'emails/rewrite/in' => $this->make_hook('rewrite_in', AUTH_PUBLIC),
+ 'emails/rewrite/out' => $this->make_hook('rewrite_out', AUTH_PUBLIC),
+
+ 'emails/imap/in' => $this->make_hook('imap_in', AUTH_PUBLIC),
+
+ 'admin/emails/duplicated' => $this->make_hook('duplicated', AUTH_MDP, 'admin'),
+ 'admin/emails/watch' => $this->make_hook('duplicated', AUTH_MDP, 'admin'),
+ 'admin/emails/lost' => $this->make_hook('lost', AUTH_MDP, 'admin'),
);
}
$email = str_replace(' ', '+', $email);
// Apply email redirection change requests.
+ $result = SUCCESS;
if ($action == 'remove' && $email) {
- $retour = $redirect->delete_email($email);
+ $result = $redirect->delete_email($email);
}
if ($action == 'active' && $email) {
$actifs = Env::v('emails_actifs', Array());
print_r(Env::v('emails_rewrite'));
if (Env::v('emailop') == "ajouter" && Env::has('email')) {
- $retour = $redirect->add_email(Env::v('email'));
+ $result = $redirect->add_email(Env::v('email'));
} elseif (empty($actifs)) {
- $retour = ERROR_INACTIVE_REDIRECTION;
+ $result = ERROR_INACTIVE_REDIRECTION;
} elseif (is_array($actifs)) {
- $retour = $redirect->modify_email($actifs, Env::v('emails_rewrite', Array()));
+ $result = $redirect->modify_email($actifs, Env::v('emails_rewrite', Array()));
}
}
- switch ($retour) {
+ switch ($result) {
case ERROR_INACTIVE_REDIRECTION:
$page->trigError('Tu ne peux pas avoir aucune adresse de redirection active, sinon ton adresse '
. $user->forlifeEmail() . ' ne fonctionnerait plus.');
}
// Retrieves the User object for the test email recipient.
- if (S::has_perms() && $hruid) {
+ if (S::admin() && $hruid) {
$user = User::getSilent($hruid);
} else {
$user = S::user();
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'events' => $this->make_hook('ev', AUTH_COOKIE),
- 'rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'events/preview' => $this->make_hook('preview', AUTH_PUBLIC, 'user', NO_AUTH),
- 'events/photo' => $this->make_hook('photo', AUTH_PUBLIC),
- 'events/submit' => $this->make_hook('ev_submit', AUTH_MDP),
- 'admin/events' => $this->make_hook('admin_events', AUTH_MDP, 'admin'),
-
- 'ajax/tips' => $this->make_hook('tips', AUTH_COOKIE, 'user', NO_AUTH),
- 'admin/tips' => $this->make_hook('admin_tips', AUTH_MDP, 'admin'),
+ 'events' => $this->make_hook('ev', AUTH_COOKIE),
+ 'rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'events/preview' => $this->make_hook('preview', AUTH_PUBLIC, 'user', NO_AUTH),
+ 'events/photo' => $this->make_hook('photo', AUTH_PUBLIC),
+ 'events/submit' => $this->make_hook('ev_submit', AUTH_MDP),
+ 'admin/events' => $this->make_hook('admin_events', AUTH_MDP, 'admin'),
+
+ 'ajax/tips' => $this->make_hook('tips', AUTH_COOKIE, 'user', NO_AUTH),
+ 'admin/tips' => $this->make_hook('admin_tips', AUTH_MDP, 'admin'),
);
}
$page->addJsLink('ajax.js');
$page->assign('tips', $this->get_tips());
- // Profile update (appears when profile is > 400d old), and birthday
- // oneboxes.
- $res = XDB::query(
- "SELECT date < DATE_SUB(NOW(), INTERVAL 400 DAY) AS is_profile_old,
- MONTH(naissance) = MONTH(NOW()) AND DAYOFMONTH(naissance) = DAYOFMONTH(NOW()) AS is_birthday,
- date AS profile_date, YEAR(NOW()) - YEAR(naissance) AS age
- FROM auth_user_md5
- WHERE user_id = {?}", S::user()->id());
- list($is_profile_old, $is_birthday, $profile_date, $age) = $res->fetchOneRow();
-
- if ($is_profile_old) {
- $page->assign('fiche_incitation', $profile_date);
- }
- if ($is_birthday) {
- $page->assign('birthday', $age);
+ // Adds a reminder onebox to the page.
+ $user = S::user();
+ require_once 'reminder.inc.php';
+ if (($reminder = Reminder::GetCandidateReminder($user))) {
+ $reminder->Prepare($page);
}
- // No-photo onebox.
- $res = XDB::query("SELECT COUNT(*) FROM photo WHERE uid = {?}", S::user()->id());
- $page->assign('photo_incitation', $res->fetchOneCell() == 0);
-
- // Geo-location onebox.
- require_once 'geoloc.inc.php';
- $res = localize_addresses(S::user()->id());
- $page->assign('geoloc_incitation', count($res));
+ // Wishes "Happy birthday" when required
+ $res = XDB::query(
+ 'SELECT MONTH(naissance) = MONTH(NOW())
+ AND DAYOFMONTH(naissance) = DAYOFMONTH(NOW()) AS is_birthday
+ FROM auth_user_md5
+ WHERE user_id = {?}',
+ $user->id());
+ $page->assign('birthday', $res->fetchOneCell());
// Direct link to the RSS feed, when available.
if (S::rssActivated()) {
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'banana' => $this->make_hook('banana', AUTH_COOKIE),
- 'banana/rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'admin/forums' => $this->make_hook('forums_bans', AUTH_MDP, 'admin'),
+ 'banana' => $this->make_hook('banana', AUTH_COOKIE),
+ 'banana/rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'admin/forums' => $this->make_hook('forums_bans', AUTH_MDP, 'admin'),
);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
{
return array(
'gadgets/ig-events.xml' => $this->make_hook('ig_events_xml', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'gadgets/ig-events' => $this->make_hook('ig_events', AUTH_PUBLIC),
+ 'gadgets/ig-events' => $this->make_hook('ig_events', AUTH_PUBLIC),
'gadgets/ig-search.xml' => $this->make_hook('ig_search_xml', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'gadgets/ig-search' => $this->make_hook('ig_search', AUTH_PUBLIC),
+ 'gadgets/ig-search' => $this->make_hook('ig_search', AUTH_PUBLIC),
);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'geoloc' => $this->make_hook('default', AUTH_COOKIE),
- 'admin/geoloc' => $this->make_hook('admin', AUTH_MDP, 'admin'),
+ 'geoloc' => $this->make_hook('default', AUTH_COOKIE),
+ 'admin/geoloc' => $this->make_hook('admin', AUTH_MDP, 'admin'),
'admin/geoloc/dynamap' => $this->make_hook('admin_dynamap', AUTH_MDP, 'admin'),
);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
}
return array(
- 'googleapps' => $this->make_hook('index', AUTH_MDP),
- 'admin/googleapps' => $this->make_hook('admin', AUTH_MDP. 'admin'),
- 'admin/googleapps/job' => $this->make_hook('admin_job', AUTH_MDP, 'admin'),
+ 'googleapps' => $this->make_hook('index', AUTH_MDP),
+ 'admin/googleapps' => $this->make_hook('admin', AUTH_MDP, 'admin'),
+ 'admin/googleapps/job' => $this->make_hook('admin_job', AUTH_MDP, 'admin'),
'admin/googleapps/user' => $this->make_hook('admin_user', AUTH_MDP, 'admin'),
);
}
- function handler_index(&$page, $action = null, $subaction = null)
+ function handler_index(&$page, $action = null)
{
require_once("emails.inc.php");
require_once("googleapps.inc.php");
// Updates the Google Apps account as required.
if ($action) {
- if ($action == 'password') {
- if ($subaction == 'sync') {
+ if ($action == 'password' && Post::has('pwsync')) {
+ S::assert_xsrf_token();
+ if (Post::v('pwsync') == 'sync') {
$account->set_password_sync(true);
$account->set_password(S::v('password'));
- pl_redirect('googleapps#password');
- } else if ($subaction == 'nosync') {
+ } else {
$account->set_password_sync(false);
- } else if (Post::has('response2') && !$account->sync_password) {
- S::assert_xsrf_token();
- $account->set_password(Post::v('response2'));
}
+ } elseif ($action == 'password' && Post::has('response2') && !$account->sync_password) {
+ S::assert_xsrf_token();
+ $account->set_password(Post::v('response2'));
}
if ($action == 'suspend' && Post::has('suspend') && $account->active()) {
}
}
- function handler_admin_user(&$page, $user = null, $action = null) {
+ function handler_admin_user(&$page, $user = null) {
require_once("emails.inc.php");
require_once("googleapps.inc.php");
$page->changeTpl('googleapps/admin.user.tpl');
$account = new GoogleAppsAccount($user);
$storage = new EmailStorage($user, 'googleapps');
- // Force synchronization of plat/al and Google Apps passwords.
- if ($action == 'forcesync' && $account->sync_password) {
+ // Apply requested actions.
+ if (Post::has('suspend') && $account->active() && !$account->pending_update_suspension) {
+ S::assert_xsrf_token();
+ $account->suspend();
+ $page->trigSuccess('Le compte est en cours de suspension.');
+ } else if (Post::has('unsuspend') && $account->suspended() && !$account->pending_update_suspension) {
+ S::assert_xsrf_token();
+ $account->do_unsuspend();
+ $page->trigSuccess('Le compte est en cours de réactivation.');
+ } else if (Post::has('forcesync') && $account->active() && $account->sync_password) {
+ $res = XDB::query("SELECT password FROM auth_user_md5 WHERE user_id = {?}", $user->id());
+ $account->set_password($res->fetchOneCell());
+ $page->trigSuccess('Le mot de passe est en cours de synchronisation.');
+ } else if (Post::has('sync') && $account->active()) {
$res = XDB::query("SELECT password FROM auth_user_md5 WHERE user_id = {?}", $user->id());
$account->set_password($res->fetchOneCell());
- $page->trigSuccess('Le mot de passe a été synchronisé.');
+ $account->set_password_sync(true);
+ } else if (Post::has('nosync') && $account->active()) {
+ $account->set_password_sync(false);
}
// Displays basic account information.
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
{
return array(
'lists' => $this->make_hook('lists', AUTH_MDP),
- 'lists/ajax' => $this->make_hook('ajax', AUTH_MDP, 'user', NO_AUTH),
+ 'lists/ajax' => $this->make_hook('ajax', AUTH_MDP, 'user', NO_AUTH),
'lists/create' => $this->make_hook('create', AUTH_MDP),
'lists/members' => $this->make_hook('members', AUTH_COOKIE),
'lists/soptions' => $this->make_hook('soptions', AUTH_MDP),
'lists/check' => $this->make_hook('check', AUTH_MDP),
- 'admin/lists' => $this->make_hook('admin_all', AUTH_MDP, 'admin'),
+ 'admin/lists' => $this->make_hook('admin_all', AUTH_MDP, 'admin'),
);
}
$msg = str_replace("%(listname)s", $liste, $msg);
$page->assign('msg', $msg);
return;
+ } elseif (Get::has('mid') && Env::has('mok')) {
+ $page->changeTpl('lists/moderate_mail.tpl');
+ require_once('banana/moderate.inc.php');
+ $params = array('listname' => $liste, 'domain' => $domain,
+ 'artid' => Get::i('mid'), 'part' => Get::v('part'), 'action' => Get::v('action'));
+ $params['client'] = $this->client;
+ run_banana($page, 'ModerationBanana', $params);
+
+ $msg = file_get_contents('/etc/mailman/fr/accept.txt');
+ $msg = str_replace("%(adminaddr)s", "$liste-owner@{$domain}", $msg);
+ $msg = str_replace("%(request)s", "<< SUJET DU MAIL >>", $msg);
+ $msg = str_replace("%(reason)s", "<< TON EXPLICATION >>", $msg);
+ $msg = str_replace("%(listname)s", $liste, $msg);
+ $page->assign('msg', $msg);
+ return;
}
$mail = $this->moderate_mail($domain, $liste, Env::i('mid'));
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
foreach($members as $mem) {
list($m, $dom) = explode('@', $mem);
$info = list_fetch_name($mem);
- if (is_null($info['uid'])) {
+ if (!isset($info['uid']) || is_null($info['uid'])) {
$membres[0][] = array('l' => $mem, 'p' => (!$tri_promo ? 'inconnue' : null));
} else {
$uid = $info['uid'];
// }}}
// {{{ function list_sort_members
-function list_sort_members(&$members, $tri_promo = true)
+function list_sort_members($members, $tri_promo = true)
{
- return list_sort_owners(list_extract_members($members), $tri_promo);
+ $m = list_extract_members($members);
+ return list_sort_owners($m, $tri_promo);
}
// }}}
--- /dev/null
+Vous avez envoyé un message à la liste de diffusion {{{LIST}}} :
+
+ %(request)s
+
+Le modérateur a souhaité diffuser votre message vers les abonnés à
+la liste.
+
+ "%(reason)s"
+
+Toute question ou commentaire doit être adressé aux modérateurs de la
+liste à cette adresse :
+
+ {{{ALIST}}}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'nl' => $this->make_hook('nl', AUTH_COOKIE),
- 'nl/show' => $this->make_hook('nl_show', AUTH_COOKIE),
- 'nl/submit' => $this->make_hook('nl_submit', AUTH_MDP),
- 'admin/newsletter' => $this->make_hook('admin_nl', AUTH_MDP, 'admin'),
- 'admin/newsletter/categories' => $this->make_hook('admin_nl_cat', AUTH_MDP, 'admin'),
+ 'nl' => $this->make_hook('nl', AUTH_COOKIE),
+ 'nl/show' => $this->make_hook('nl_show', AUTH_COOKIE),
+ 'nl/submit' => $this->make_hook('nl_submit', AUTH_MDP),
+ 'admin/newsletter' => $this->make_hook('admin_nl', AUTH_MDP, 'admin'),
+ 'admin/newsletter/categories' => $this->make_hook('admin_nl_cat', AUTH_MDP, 'admin'),
'admin/newsletter/edit' => $this->make_hook('admin_nl_edit', AUTH_MDP, 'admin'),
);
}
require_once 'newsletter.inc.php';
- $nl = new NewsLetter($nid);
- if (Get::has('text')) {
- $nl->toText($page, S::v('prenom'), S::v('nom'), S::v('femme'));
- } else {
- $nl->toHtml($page, S::v('prenom'), S::v('nom'), S::v('femme'));
- }
- if (Post::has('send')) {
- $res = XDB::query("SELECT hash FROM newsletter_ins WHERE user_id = {?}", S::i('uid'));
- $nl->sendTo(S::user()->login(), S::user()->bestEmail(),
- S::v('prenom'), S::v('nom'),
- S::v('femme'), S::v('mail_fmt') != 'texte',
- $res->fetchOneCell());
+ try {
+ $nl = new NewsLetter($nid);
+ if (Get::has('text')) {
+ $nl->toText($page, S::v('prenom'), S::v('nom'), S::v('femme'));
+ } else {
+ $nl->toHtml($page, S::v('prenom'), S::v('nom'), S::v('femme'));
+ }
+ if (Post::has('send')) {
+ $res = XDB::query("SELECT hash
+ FROM newsletter_ins
+ WHERE user_id = {?}",
+ S::i('uid'));
+ $nl->sendTo(S::user()->login(), S::user()->bestEmail(),
+ S::v('prenom'), S::v('nom'),
+ S::v('femme'), S::v('mail_fmt') != 'texte',
+ $res->fetchOneCell());
+ }
+ } catch (MailNotFound $e) {
+ return PL_NOT_FOUND;
}
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'openid' => $this->make_hook('openid', AUTH_PUBLIC),
- 'openid/trust' => $this->make_hook('trust', AUTH_COOKIE),
- 'openid/trusted' => $this->make_hook('trusted', AUTH_MDP),
- 'admin/openid/trusted' => $this->make_hook('admin_trusted', AUTH_MDP),
- 'openid/idp_xrds' => $this->make_hook('idp_xrds', AUTH_PUBLIC),
- 'openid/user_xrds' => $this->make_hook('user_xrds', AUTH_PUBLIC),
- 'openid/melix' => $this->make_hook('melix', AUTH_PUBLIC),
+ 'openid' => $this->make_hook('openid', AUTH_PUBLIC),
+ 'openid/melix' => $this->make_hook('melix', AUTH_PUBLIC),
+ 'openid/xrds' => $this->make_hook('xrds', AUTH_PUBLIC),
+ 'openid/trust' => $this->make_hook('trust', AUTH_MDP),
+ 'openid/trusted' => $this->make_hook('trusted', AUTH_MDP),
+ 'admin/openid/trusted' => $this->make_hook('admin_trusted', AUTH_MDP, 'admin'),
);
}
- function handler_openid(&$page, $x = null)
+ function handler_openid(&$page, $login = null)
{
$this->load('openid.inc.php');
+ $requested_user = User::getSilent($login);
+ $server = new OpenId();
// Spec §4.1.2: if "openid.mode" is absent, we SHOULD assume that
- // the request is not an OpenId message
- if (!array_key_exists('openid_mode', $_REQUEST)) {
- return $this->render_discovery_page($page, get_user($x));
+ // the request is not an OpenId message.
+ if (!$server->IsOpenIdRequest()) {
+ if ($requested_user) {
+ $server->RenderDiscoveryPage($page, $requested_user);
+ return;
+ } else {
+ pl_redirect('Xorg/OpenId');
+ }
+ exit;
}
- // Now, deal with the OpenId message
- $server = init_openid_server();
- $request = $server->decodeRequest();
-
- // In modes 'checkid_immediate' and 'checkid_setup', the request
- // needs some logic and can not be automatically answered by the server
-
- // Immediate mode
- if ($request->mode == 'checkid_immediate') {
+ // Initializes the OpenId environment from the request.
+ $server->Initialize();
+
+ // In modes 'checkid_immediate' and 'checkid_setup', we need to check
+ // by ourselves that we want to allow the user to be authenticated.
+ // Otherwise it can simply be forwarded to the Server object.
+ if ($server->IsAuthorizationRequest()) {
+ $authorized = S::logged() &&
+ $server->IsUserAuthorized(S::user()) &&
+ $server->IsEndpointTrusted(S::user());
+
+ if ($authorized) {
+ // TODO(vzanotti): SReg requests are currently not honored if
+ // the website is already trusted. We may want to redirect SReg
+ // requests to /openid/trust, to allow the user to choose.
+ $server->AnswerRequest(true);
+ } else if ($server->IsImmediateRequest()) {
+ $server->AnswerRequest(false);
+ } else {
+ // The user is currently not authorized to get her authorization
+ // request approved. Two possibilities:
+ // * the endpoint is not yet trusted => redirect to openid/trust
+ // * the user is not logged in => log in the user.
+ //
+ // The second case requires a special handling when the request
+ // was POSTed, as our current log in mechanism does not preserve
+ // POST arguments.
+ $openid_args = $server->GetQueryStringForRequest();
+ if (S::logged()) {
+ pl_redirect('openid/trust', $openid_args);
+ } else if (Post::has('openid_mode')) {
+ pl_redirect('openid', $openid_args);
+ } else {
+ return PL_DO_AUTH;
+ }
+ }
+ } else {
+ $server->HandleRequest();
+ }
- // We deny immediate requests, unless:
- // - the user identifier is known by the RP
- // - the user is logged in
- // - the user identifier matches the user logged in
- // - the user has whitelisted the site
- $answer = !$request->idSelect()
- && S::logged()
- && $request->identity == S::user()->login()
- && is_trusted_site(S::user(), $request->trust_root);
- $response =& $request->answer($answer);
+ // All requests should have been answered at this point. The best here
+ // is to get the user back to a safe page.
+ pl_redirect('');
+ }
- // Setup mode
- } else if ($request->mode == 'checkid_setup') {
+ function handler_melix(&$page, $login = null)
+ {
+ $this->load('openid.inc.php');
- // We redirect to a page where the user will authenticate
- // and confirm the use of his/her OpenId
- // The request is saved in session before redirecting
- S::set('openid_request', serialize($request));
- pl_redirect('openid/trust');
- return;
+ global $globals;
+ $melix = ($login ? $login . '@' . $globals->mail->alias_dom : null);
- // Other requests can be automatically handled by the server
+ if ($melix && ($requested_user = User::getSilent($melix))) {
+ $server = new OpenId();
+ $server->RenderDiscoveryPage($page, $requested_user);
} else {
- $response =& $server->handleRequest($request);
+ pl_redirect('Xorg/OpenId');
}
-
- $webresponse =& $server->encodeResponse($response);
- $this->render_openid_response($webresponse);
}
- function handler_trust(&$page, $x = null)
+ function handler_xrds(&$page, $login = null)
{
$this->load('openid.inc.php');
+ $requested_user = User::getSilent($login);
+ $server = new OpenId();
- // Recover request in session
- $request = S::v('openid_request');
- if (is_null($request)) {
- // There is no authentication information, something went wrong
- pl_redirect('/');
- return;
+ if (!$login) {
+ $server->RenderMainXrdsPage($page);
+ } else if ($requested_user) {
+ $server->RenderUserXrdsPage($page, $requested_user);
+ } else {
+ return PL_NOT_FOUND;
}
+ }
- require_once 'Auth/OpenID/Server.php';
- $request = unserialize($request);
-
- $server = init_openid_server();
+ function handler_trust(&$page)
+ {
+ $this->load('openid.inc.php');
+ $server = new OpenId();
$user = S::user();
- $identity = null;
- $claimed_id = null;
- // Set the identity to the user currently logged in
- // if an OP Identifier was initially used
- if ($request->identity == Auth_OpenID_IDENTIFIER_SELECT) {
- $identity = $user->hruid;
- $claimed_id = get_user_openid_url($user);
- // Check that the identity matches the user currently logged in
- // if an User Identifier was initially used
- } else if ($request->identity != $user->hruid) {
- $response =& $request->answer(false);
- $webresponse =& $server->encodeResponse($response);
- $this->render_openid_response($webresponse);
- return;
+ // Initializes the OpenId environment from the request.
+ if (!$server->Initialize() || !$server->IsAuthorizationRequest()) {
+ $page->kill("Ta requête OpenID a échoué, merci de réessayer.");
}
- // Prepare Simple Registration response fields
- require_once 'Auth/OpenID/SReg.php';
- $sreg_request = Auth_OpenID_SRegRequest::fromOpenIDRequest($request);
- $sreg_response = Auth_OpenID_SRegResponse::extractResponse($sreg_request, get_sreg_data($user));
+ // Prepares the SREG data, if any is required.
+ $sreg_response = $server->GetSRegDataForRequest($user);
- $whitelisted = is_trusted_site($user, $request->trust_root);
-
- // Ask the user for confirmation
- if (!$whitelisted && $_SERVER['REQUEST_METHOD'] != 'POST') {
+ // Asks the user about her trust level of the current request, if not
+ // done yet.
+ if (!Post::has('trust_accept') && !Post::has('trust_cancel')) {
$page->changeTpl('openid/trust.tpl');
- $page->assign('relying_party', $request->trust_root);
- $page->assign_by_ref('sreg_data', $sreg_response->data);
- return;
- }
-
- // At this point $_SERVER['REQUEST_METHOD'] == 'POST'
+ $page->assign('openid_query', $server->GetQueryStringForRequest());
+ $page->assign('relying_party', $server->GetEndpoint());
+ $page->assign('sreg_data', $sreg_response->contents());
- // Add 'always trusted' sites to whitelist
- if (isset($_POST['trust']) && @$_POST['always']) {
- add_trusted_site($user, $request->trust_root);
+ return;
}
- // Answer to the Relying Party
- if ($whitelisted || isset($_POST['trust'])) {
- S::kill('openid_request');
- $response =& $request->answer(true, null, $identity, $claimed_id);
-
- // Add the simple registration response values to the OpenID
- // response message.
- $sreg_response->toMessage($response->fields);
-
- } else { // !$whitelisted && !isset($_POST['trust'])
- S::kill('openid_request');
- $response =& $request->answer(false);
+ // Interprets the form results, and updates the user whitelist.
+ S::assert_xsrf_token();
+ $trusted = $server->UpdateEndpointTrust(
+ $user,
+ Post::b('trust_accept') && !Post::b('trust_cancel'),
+ Post::b('trust_always'));
+
+ // Finally answers the request.
+ if ($server->IsUserAuthorized($user) && $trusted) {
+ $server->AnswerRequest(
+ true, $user, Post::b('trust_sreg') ? $sreg_response : null);
+ } else {
+ $server->AnswerRequest(false);
}
-
- $webresponse =& $server->encodeResponse($response);
- $this->render_openid_response($webresponse);
}
function handler_trusted(&$page, $action = 'list', $id = null)
$page->assign('readonly', true);
$table_editor->apply($page, $action, $id);
}
-
- function handler_idp_xrds(&$page)
- {
- $this->load('openid.inc.php');
- header('Content-type: application/xrds+xml');
- $page->changeTpl('openid/idp_xrds.tpl', NO_SKIN);
- $page->assign('type2', Auth_OpenID_TYPE_2_0_IDP);
- $page->assign('sreg', Auth_OpenID_SREG_URI);
- $page->assign('provider', get_openid_url());
- }
-
- function handler_user_xrds(&$page, $x = null)
- {
- $this->load('openid.inc.php');
-
- $user = get_user($x);
- if (is_null($user)) {
- return PL_NOT_FOUND;
- }
-
- header('Content-type: application/xrds+xml');
- $page->changeTpl('openid/user_xrds.tpl', NO_SKIN);
- $page->assign('type2', Auth_OpenID_TYPE_2_0);
- $page->assign('type1', Auth_OpenID_TYPE_1_1);
- $page->assign('sreg', Auth_OpenID_SREG_URI);
- $page->assign('provider', get_openid_url());
- $page->assign('local_id', $user->hruid);
- }
-
- function handler_melix(&$page, $x = null)
- {
- $this->load('openid.inc.php');
- $user = get_user_by_alias($x);
-
- // This will redirect to the canonic URL, which was not used
- // if this hook was triggered
- return $this->render_discovery_page(&$page, $user);
- }
-
- //--------------------------------------------------------------------//
-
- function render_discovery_page(&$page, $user)
- {
-
- // Show the documentation if this is not the OpenId page of an user
- if (is_null($user)) {
- pl_redirect('Xorg/OpenId');
- }
-
- // Redirect to the canonic URL if we are using an alias
- // There might be a risk of redirection loop here
- // if $_SERVER was not exactly what we expect
- $current_url = 'http' . (empty($_SERVER['HTTPS']) ? '' : 's') . '://'
- . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
- $canonic_url = get_user_openid_url($user);
- if ($current_url != $canonic_url) {
- http_redirect($canonic_url);
- }
-
- // Include X-XRDS-Location response-header for Yadis discovery
- header('X-XRDS-Location: ' . get_user_xrds_url($user));
-
- $page->changeTpl('openid/openid.tpl');
- $page->setTitle($user->fullName());
- // Set the <link> tags for HTML-Based Discovery
- $page->addLink('openid.server openid2.provider', get_openid_url());
- $page->addLink('openid.delegate openid2.local_id', $user->hruid);
- $page->assign_by_ref('user', $user);
-
- return;
- }
-
- function render_openid_response($webresponse)
- {
- if ($webresponse->code != AUTH_OPENID_HTTP_OK) {
- header(sprintf("HTTP/1.1 %d ", $webresponse->code),
- true, $webresponse->code);
- }
- foreach ($webresponse->headers as $k => $v) {
- header("$k: $v");
- }
- header('Connection: close');
- print $webresponse->body;
- exit;
- }
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
-?>
\ No newline at end of file
+?>
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once "Auth/OpenID/Discover.php";
+require_once 'Auth/OpenID/Discover.php';
-function init_openid_server()
+// An helper class for using plat/al as an OpenId Identity Provider.
+class OpenId
{
- // Initialize a filesystem-based store
- $store_location = dirname(__FILE__) . '/../../spool/openid/store';
- require_once "Auth/OpenID/FileStore.php";
- $store = new Auth_OpenID_FileStore($store_location);
-
- // Create an OpenId server
- require_once 'Auth/OpenID/Server.php';
- return new Auth_OpenID_Server($store, get_openid_url());
-}
+ private $base_url; // Base url for all OpenId operations.
+ private $spool_store; // Location of the spool storage for OpenID.
-function get_openid_url()
-{
- global $globals;
- return $globals->baseurl . '/openid';
-}
+ private $server = null; // Auth::OpenId::Server object.
+ private $request = null; // Request extracted by the Server object.
+
+ public function __construct()
+ {
+ global $globals;
-function get_user($x) {
- if (is_null($x)) {
- return null;
+ $this->base_url = $globals->baseurl . '/openid';
+ $this->spool_store = $globals->spoolroot . '/spool/openid/store';
}
- $user = User::getSilent($x);
- return $user ? $user : null;
-}
+ // Initializes an OpenId Server object; it will use a defined spool-based
+ // directory to store OpenID secrets. Returns true on success.
+ public function Initialize()
+ {
+ require_once 'Auth/OpenID/FileStore.php';
+ require_once 'Auth/OpenID/Server.php';
-function get_user_by_alias($x) {
- if (is_null($x)) {
- return null;
- }
- // TODO such a function should probably be provided in the User class
- // or at least not here
- $res = XDB::query('SELECT u.user_id
- FROM auth_user_md5 AS u
- INNER JOIN auth_user_quick AS q USING(user_id)
- INNER JOIN aliases AS a ON (a.id = u.user_id AND type != \'homonyme\')
- WHERE u.perms IN(\'admin\', \'user\')
- AND q.emails_alias_pub = \'public\'
- AND a.alias = {?}',
- $x);
- if (list($uid) = $res->fetchOneRow()) {
- $user = User::getSilent($uid);
- }
- return $user ? $user : null;
+ $store = new Auth_OpenID_FileStore($this->spool_store);
+ $this->server = new Auth_OpenID_Server($store, $this->base_url);
+ $this->request = $this->server->decodeRequest();
-}
+ return !is_a($this->request, 'Auth_OpenID_ServerError');
+ }
-function get_user_openid_url($user)
-{
- if (is_null($user)) {
- return null;
+ // Authorization logic helpers ---------------------------------------------
+
+ // Returns true iff the current request is a valid openid request.
+ public function IsOpenIdRequest()
+ {
+ return Env::has('openid_mode');
}
- global $globals;
- return $globals->baseurl . '/openid/' . $user->hruid;
-}
-function get_idp_xrds_url()
-{
- global $globals;
- return $globals->baseurl . '/openid/idp_xrds';
-}
+ // Returns true iff the request needs to be handled directly by the calling
+ // code (ie. the current user needs to be authorized).
+ public function IsAuthorizationRequest()
+ {
+ return $this->request->mode == 'checkid_immediate' ||
+ $this->request->mode == 'checkid_setup';
+ }
-function get_user_xrds_url($user)
-{
- if (is_null($user)) {
- return null;
+ // Returns true iff the request requires an immediate answer (no user
+ // interaction is allowed).
+ public function IsImmediateRequest()
+ {
+ return $this->request->mode == 'checkid_immediate';
}
- global $globals;
- return $globals->baseurl . '/openid/user_xrds/' . $user->hruid;
-}
-function get_sreg_data($user)
-{
- if (is_null($user)) {
- return null;
- }
- return array('fullname' => $user->fullName(),
- 'nickname' => $user->displayName(),
- 'dob' => null,
- 'email' => $user->bestEmail(),
- 'gender' => $user->isFemale() ? 'F' : 'M',
- 'postcode' => null,
- 'country' => null,
- 'language' => null,
- 'timezone' => null);
-}
+ // Returns true iff the logged-in user is authorized for the current request.
+ // It checks that the user is logged in, and has the authorization to use
+ // that identity.
+ public function IsUserAuthorized(User $user)
+ {
+ return $user && ($user->login() == $this->request->identity ||
+ $this->request->idSelect());
+ }
-function is_trusted_site($user, $url)
-{
- $res = XDB::query('SELECT COUNT(*)
- FROM openid_trusted
- WHERE (user_id = {?} OR user_id IS NULL)
- AND url = {?}',
- $user->id(), $url);
- return $res->fetchOneCell() > 0;
-}
+ // SimpleRegistration helpers ----------------------------------------------
-function add_trusted_site($user, $url)
-{
- XDB::execute("INSERT IGNORE INTO openid_trusted
- SET user_id={?}, url={?}",
- $user->id(), $url);
+ // Determines which SREG data are requested by the endpoint, and returns them.
+ public function GetSRegDataForRequest(User &$user)
+ {
+ require_once 'Auth/OpenID/SReg.php';
+
+ // Other common SReg fields we could fill are:
+ // dob, country, language, timezone.
+ $sreg_request = Auth_OpenID_SRegRequest::fromOpenIDRequest($this->request);
+ return Auth_OpenID_SRegResponse::extractResponse($sreg_request, array(
+ 'fullname' => $user->fullName(),
+ 'nickname' => $user->displayName(),
+ 'email' => $user->bestEmail(),
+ 'gender' => $user->isFemale() ? 'F' : 'M',
+ ));
+ }
+
+ // Handling and answering helpers ------------------------------------------
+
+ // Answers the current request, and renders the response. Appends the |sreg|
+ // data when not null.
+ public function AnswerRequest($is_authorized, $user = null, $sreg_data = null)
+ {
+ // Creates the response.
+ if ($is_authorized && $this->request->idSelect() && $user) {
+ $response = $this->request->answer(
+ $is_authorized, null, $user->login(), $this->GetUserUrl($user));
+ } else {
+ $response = $this->request->answer($is_authorized);
+ }
+
+ // Clobbers response, and get it back to the Relaying Party.
+ if ($sreg_data) {
+ $sreg_data->toMessage($response->fields);
+ }
+ $this->RenderResponse($response);
+ }
+
+ // Automatically handles the request without any user interaction.
+ public function HandleRequest()
+ {
+ $response = $this->server->handleRequest($this->request);
+ $this->RenderResponse($response);
+ }
+
+ // Trust management helpers ------------------------------------------------
+
+ // Returns true iff the current endpoint is currently trusted by |user|.
+ public function IsEndpointTrusted(User $user)
+ {
+ $res = XDB::query(
+ "SELECT COUNT(*)
+ FROM openid_trusted
+ WHERE (user_id = {?} OR user_id IS NULL) AND url = {?}",
+ $user->id(), $this->request->trust_root);
+ return ($res->fetchOneCell() > 0);
+ }
+
+ // Updates the trust level for the given endpoint, based on the value pf
+ // |trusted| and |permanent_trust| (the latter is ignored when the former
+ // value is false). Returns true iff the current endpoint is trusted.
+ public function UpdateEndpointTrust(User &$user, $trusted, $permanent_trust) {
+ $initial_trust = $this->IsEndpointTrusted($user);
+ if (!$initial_trust && $trusted && $permanent_trust) {
+ XDB::execute(
+ "INSERT IGNORE INTO openid_trusted
+ SET user_id = {?}, url = {?}",
+ $user->id(), $this->request->trust_root);
+ }
+
+ return ($initial_trust || $trusted);
+ }
+
+ // Page renderers ----------------------------------------------------------
+
+ // Renders the OpenId discovery page for |user|.
+ public function RenderDiscoveryPage(&$page, User &$user)
+ {
+ $page->changeTpl('openid/openid.tpl');
+ $page->setTitle($user->fullName());
+ $page->addLink('openid.server openid2.provider', $this->base_url);
+ $page->addLink('openid.delegate openid2.local_id', $user->login());
+ $page->assign_by_ref('user', $user);
+
+ // Include the X-XRDS-Location header for Yadis discovery.
+ header('X-XRDS-Location: ' . $this->GetUserXrdsUrl($user));
+ }
+
+ // Renders the main XRDS page.
+ public function RenderMainXrdsPage(&$page)
+ {
+ header('Content-type: application/xrds+xml');
+ $page->changeTpl('openid/idp_xrds.tpl', NO_SKIN);
+ $page->assign('type2', Auth_OpenID_TYPE_2_0_IDP);
+ $page->assign('sreg', Auth_OpenID_SREG_URI);
+ $page->assign('provider', $this->base_url);
+ }
+
+ // Renders the XRDS page of |user|.
+ public function RenderUserXrdsPage(&$page, User &$user)
+ {
+ header('Content-type: application/xrds+xml');
+ $page->changeTpl('openid/user_xrds.tpl', NO_SKIN);
+ $page->assign('type2', Auth_OpenID_TYPE_2_0);
+ $page->assign('type1', Auth_OpenID_TYPE_1_1);
+ $page->assign('sreg', Auth_OpenID_SREG_URI);
+ $page->assign('provider', $this->base_url);
+ $page->assign('local_id', $user->login());
+ }
+
+ // Renders the OpenId response for the HTTP client.
+ public function RenderResponse($response)
+ {
+ if ($response) {
+ $web_response = $this->server->encodeResponse($response);
+ header(sprintf('%s %d', $_SERVER['SERVER_PROTOCOL'], $web_response->code),
+ true, $web_response->code);
+
+ foreach ($web_response->headers as $key => $value) {
+ header(sprintf('%s: %s', $key, $value));
+ }
+
+ header('Connection: close');
+ print $web_response->body;
+ }
+ exit;
+ }
+
+ // URL providers -----------------------------------------------------------
+
+ // Returns the OpenId identity URL of the requested user.
+ private function GetUserUrl(User &$user)
+ {
+ return $this->base_url . '/' . $user->login();
+ }
+
+ // Returns the private XRDS page of a user.
+ private function GetUserXrdsUrl(User &$user)
+ {
+ return $this->base_url . '/xrds/' . $user->login();
+ }
+
+ // Returns the endpoint in the current request.
+ public function GetEndpoint()
+ {
+ return $this->request->trust_root;
+ }
+
+ // Extracts the OpenId arguments available in the current request, and
+ // builds a query string with them.
+ public function GetQueryStringForRequest()
+ {
+ foreach (Auth_OpenID::getQuery() as $key => $value) {
+ if (strpos($key, 'openid.') === 0) {
+ $args[$key] = $value;
+ }
+ }
+
+ return http_build_query($args);
+ }
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
-?>
\ No newline at end of file
+?>
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'payment' => $this->make_hook('payment', AUTH_MDP),
- 'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC, 'user', NO_HTTPS),
- '%grp/paiement' => $this->make_hook('xnet_payment', AUTH_MDP),
- '%grp/payment' => $this->make_hook('xnet_payment', AUTH_MDP),
- '%grp/payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'payment' => $this->make_hook('payment', AUTH_MDP),
+ 'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC, 'user', NO_HTTPS),
+ 'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC, 'user', NO_HTTPS),
+ '%grp/paiement' => $this->make_hook('xnet_payment', AUTH_MDP),
+ '%grp/payment' => $this->make_hook('xnet_payment', AUTH_MDP),
+ '%grp/payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC, 'user', NO_HTTPS),
'%grp/payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC, 'user', NO_HTTPS),
- 'admin/payments' => $this->make_hook('admin', AUTH_MDP, 'admin'),
+ 'admin/payments' => $this->make_hook('admin', AUTH_MDP, 'admin'),
);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'index' => $this->make_hook('index', AUTH_PUBLIC),
- 'cacert.pem' => $this->make_hook('cacert', AUTH_PUBLIC),
- 'changelog' => $this->make_hook('changelog', AUTH_PUBLIC),
+ 'index' => $this->make_hook('index', AUTH_PUBLIC),
+ 'cacert.pem' => $this->make_hook('cacert', AUTH_PUBLIC),
+ 'changelog' => $this->make_hook('changelog', AUTH_PUBLIC),
// Preferences thingies
- 'prefs' => $this->make_hook('prefs', AUTH_COOKIE),
- 'prefs/rss' => $this->make_hook('prefs_rss', AUTH_COOKIE),
- 'prefs/webredirect'
- => $this->make_hook('webredir', AUTH_MDP),
- 'prefs/skin' => $this->make_hook('skin', AUTH_COOKIE),
+ 'prefs' => $this->make_hook('prefs', AUTH_COOKIE),
+ 'prefs/rss' => $this->make_hook('prefs_rss', AUTH_COOKIE),
+ 'prefs/webredirect' => $this->make_hook('webredir', AUTH_MDP),
+ 'prefs/skin' => $this->make_hook('skin', AUTH_COOKIE),
// password related thingies
- 'password' => $this->make_hook('password', AUTH_MDP),
- 'tmpPWD' => $this->make_hook('tmpPWD', AUTH_PUBLIC),
- 'password/smtp' => $this->make_hook('smtppass', AUTH_MDP),
- 'recovery' => $this->make_hook('recovery', AUTH_PUBLIC),
- 'exit' => $this->make_hook('exit', AUTH_PUBLIC),
- 'review' => $this->make_hook('review', AUTH_PUBLIC),
- 'deconnexion.php' => $this->make_hook('exit', AUTH_PUBLIC),
+ 'password' => $this->make_hook('password', AUTH_MDP),
+ 'tmpPWD' => $this->make_hook('tmpPWD', AUTH_PUBLIC),
+ 'password/smtp' => $this->make_hook('smtppass', AUTH_MDP),
+ 'recovery' => $this->make_hook('recovery', AUTH_PUBLIC),
+ 'exit' => $this->make_hook('exit', AUTH_PUBLIC),
+ 'review' => $this->make_hook('review', AUTH_PUBLIC),
+ 'deconnexion.php' => $this->make_hook('exit', AUTH_PUBLIC),
);
}
{
// Include X-XRDS-Location response-header for Yadis discovery
global $globals;
- header('X-XRDS-Location: ' . $globals->baseurl . '/openid/idp_xrds');
+ header('X-XRDS-Location: ' . $globals->baseurl . '/openid/xrds');
// Redirect to the suitable page
if (S::logged()) {
}
}
- $log =& S::v('log');
- S::logger()->log('passwd', '');
-
- if (Cookie::v('ORGaccess')) {
- setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0);
- S::logger()->log('cookie_on', '');
- }
+ S::logger()->log('passwd');
+ Platal::session()->setAccessCookie(true);
$page->changeTpl('platal/motdepasse.success.tpl');
$page->run();
}
if ($level == 'forget' || $level == 'forgetall') {
- setcookie('ORGaccess', '', time() - 3600, '/', '', 0);
- Cookie::kill('ORGaccess');
- S::logger()->log("cookie_off");
+ Platal::session()->killAccessCookie();
}
if ($level == 'forgetuid' || $level == 'forgetall') {
- setcookie('ORGuid', '', time() - 3600, '/', '', 0);
- Cookie::kill('ORGuid');
- setcookie('ORGdomain', '', time() - 3600, '/', '', 0);
- Cookie::kill('ORGdomain');
+ Platal::session()->killLoginFormCookies();
}
if (S::logged()) {
- $ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
- S::logger()->log('deconnexion', $ref);
+ S::logger()->log('deconnexion', @$_SERVER['HTTP_REFERER']);
+ Platal::session()->destroy();
}
- Platal::session()->destroy();
if (Get::has('redirect')) {
http_redirect(rawurldecode(Get::v('redirect')));
{
// Include X-XRDS-Location response-header for Yadis discovery
global $globals;
- header('X-XRDS-Location: ' . $globals->baseurl . '/openid/idp_xrds');
+ header('X-XRDS-Location: ' . $globals->baseurl . '/openid/xrds');
$this->load('review.inc.php');
$dom = 'Review';
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'photo' => $this->make_hook('photo', AUTH_PUBLIC),
- 'photo/change' => $this->make_hook('photo_change', AUTH_MDP),
-
- 'fiche.php' => $this->make_hook('fiche', AUTH_PUBLIC),
- 'profile' => $this->make_hook('profile', AUTH_PUBLIC),
- 'profile/private' => $this->make_hook('profile', AUTH_COOKIE),
- 'profile/ax' => $this->make_hook('ax', AUTH_COOKIE, 'admin'),
- 'profile/edit' => $this->make_hook('p_edit', AUTH_MDP),
- 'profile/ajax/address' => $this->make_hook('ajax_address', AUTH_COOKIE, 'user', NO_AUTH),
- 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH),
- 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH),
- 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH),
- 'profile/ajax/secteur' => $this->make_hook('ajax_secteur', AUTH_COOKIE, 'user', NO_AUTH),
- 'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH),
- 'javascript/applis.js' => $this->make_hook('applis_js', AUTH_COOKIE),
- 'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE),
- 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC),
- 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP),
- 'profile/usage' => $this->make_hook('p_usage', AUTH_MDP),
-
- 'referent' => $this->make_hook('referent', AUTH_COOKIE),
- 'emploi' => $this->make_hook('ref_search', AUTH_COOKIE),
- 'referent/search' => $this->make_hook('ref_search', AUTH_COOKIE),
- 'referent/ssect' => $this->make_hook('ref_sect', AUTH_COOKIE, 'user', NO_AUTH),
- 'referent/country' => $this->make_hook('ref_country', AUTH_COOKIE, 'user', NO_AUTH),
-
- 'groupes-x' => $this->make_hook('xnet', AUTH_COOKIE),
-
- 'vcard' => $this->make_hook('vcard', AUTH_COOKIE, 'user', NO_HTTPS),
- 'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'),
- 'admin/medals' => $this->make_hook('admin_medals', AUTH_MDP, 'admin'),
- 'admin/formations' => $this->make_hook('admin_formations', AUTH_MDP, 'admin'),
- 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'),
- 'admin/secteurs' => $this->make_hook('admin_secteurs', AUTH_MDP, 'admin'),
- 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'),
- 'admin/ss_secteurs' => $this->make_hook('admin_ss_secteurs', AUTH_MDP, 'admin'),
- 'admin/fonctions' => $this->make_hook('admin_fonctions', AUTH_MDP, 'admin'),
+ 'photo' => $this->make_hook('photo', AUTH_PUBLIC),
+ 'photo/change' => $this->make_hook('photo_change', AUTH_MDP),
+
+ 'fiche.php' => $this->make_hook('fiche', AUTH_PUBLIC),
+ 'profile' => $this->make_hook('profile', AUTH_PUBLIC),
+ 'profile/private' => $this->make_hook('profile', AUTH_COOKIE),
+ 'profile/ax' => $this->make_hook('ax', AUTH_COOKIE, 'admin'),
+ 'profile/edit' => $this->make_hook('p_edit', AUTH_MDP),
+ 'profile/ajax/address' => $this->make_hook('ajax_address', AUTH_COOKIE, 'user', NO_AUTH),
+ 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH),
+ 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH),
+ 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH),
+ 'profile/ajax/secteur' => $this->make_hook('ajax_secteur', AUTH_COOKIE, 'user', NO_AUTH),
+ 'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH),
+ 'javascript/applis.js' => $this->make_hook('applis_js', AUTH_COOKIE),
+ 'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE),
+ 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC),
+ 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP),
+ 'profile/usage' => $this->make_hook('p_usage', AUTH_MDP),
+
+ 'referent' => $this->make_hook('referent', AUTH_COOKIE),
+ 'emploi' => $this->make_hook('ref_search', AUTH_COOKIE),
+ 'referent/search' => $this->make_hook('ref_search', AUTH_COOKIE),
+ 'referent/ssect' => $this->make_hook('ref_sect', AUTH_COOKIE, 'user', NO_AUTH),
+ 'referent/country' => $this->make_hook('ref_country', AUTH_COOKIE, 'user', NO_AUTH),
+
+ 'groupes-x' => $this->make_hook('xnet', AUTH_COOKIE),
+
+ 'vcard' => $this->make_hook('vcard', AUTH_COOKIE),
+ 'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'),
+ 'admin/medals' => $this->make_hook('admin_medals', AUTH_MDP, 'admin'),
+ 'admin/formations' => $this->make_hook('admin_formations', AUTH_MDP, 'admin'),
+ 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'),
+ 'admin/secteurs' => $this->make_hook('admin_secteurs', AUTH_MDP, 'admin'),
+ 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'),
+ 'admin/ss_secteurs' => $this->make_hook('admin_ss_secteurs', AUTH_MDP, 'admin'),
+ 'admin/fonctions' => $this->make_hook('admin_fonctions', AUTH_MDP, 'admin'),
);
}
WHERE user_id = {?} AND naissance = '0000-00-00'", S::i('uid'));
if ($res->numRows()) {
$page->trigWarning("Ta date de naissance n'est pas renseignée, ce qui t'empêcheras de réaliser"
- . " la procédure de récupération de mot de passe si un jour tu le perdais");
+ . " la procédure de récupération de mot de passe si un jour tu le perdais.");
}
$page->setTitle('Mon Profil');
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$msg .= "Les marketings suivants avaient été effectués :\n"
. implode("\n", $market);
} else {
- $msg .= "$prenom $nom n'a jamais reçu d\'email de marketing.";
+ $msg .= "$prenom $nom n'a jamais reçu d'email de marketing.";
}
$mymail->setTxtBody($msg);
$mymail->send();
}
}
- $log = S::v('log');
- S::logger()->log('passwd', '');
-
- if (Cookie::v('ORGaccess')) {
- require_once('secure_hash.inc.php');
- setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0);
- S::logger()->log('cookie_on', '');
- }
+ S::logger()->log('passwd');
+ Platal::session()->setAccessCookie(true);
$page->assign('mdpok', true);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2009 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 *
+ ***************************************************************************/
+
+class ReminderModule extends PLModule
+{
+ function handlers()
+ {
+ return array(
+ 'ajax/reminder' => $this->make_hook('reminder', AUTH_COOKIE),
+ );
+ }
+
+ function handler_reminder(&$page, $reminder_name = null, $action = null)
+ {
+ require_once 'reminder.inc.php';
+ $user = S::user();
+
+ // If no reminder name was passed, or if we don't know that reminder name,
+ // just drop the request.
+ if (!$reminder_name ||
+ !($reminder = Reminder::GetByName($user, $reminder_name))) {
+ return PL_NOT_FOUND;
+ }
+
+ // Otherwise, the request is dispatched, and a new reminder, if any, is
+ // displayed.
+ $reminder->HandleAction($action);
+
+ if (($new_reminder = Reminder::GetCandidateReminder($user))) {
+ $new_reminder->DisplayStandalone($page);
+ } else {
+ exit;
+ }
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'search' => $this->make_hook('quick', AUTH_PUBLIC),
- 'search/adv' => $this->make_hook('advanced', AUTH_COOKIE),
+ 'search' => $this->make_hook('quick', AUTH_PUBLIC),
+ 'search/adv' => $this->make_hook('advanced', AUTH_COOKIE),
'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC),
- 'search/autocomplete' => $this->make_hook('autocomplete', AUTH_COOKIE, 'user', NO_AUTH),
- 'search/list' => $this->make_hook('list', AUTH_COOKIE, 'user', NO_AUTH),
+ 'search/autocomplete' => $this->make_hook('autocomplete', AUTH_COOKIE, 'user', NO_AUTH),
+ 'search/list' => $this->make_hook('list', AUTH_COOKIE, 'user', NO_AUTH),
);
}
S::logger()->log('search', 'quick=' . $quick);
}
$list = 'profile|prf|fiche|fic|referent|ref|mentor';
- if (S::has_perms()) {
+ if (S::admin()) {
$list .= '|admin|adm|ax';
}
if (preg_match('/^(' . $list . '):([-a-z]+(\.[-a-z]+(\.\d{2,4})?)?)$/', replace_accent($quick), $matches)) {
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$s = replace_accent(trim($this->value));
$r = $s = str_replace('*','%',$s);
- if (S::has_perms() && strpos($s, '@') !== false) {
+ if (S::admin() && strpos($s, '@') !== false) {
$this->email = $s;
- } else if (S::has_perms() && preg_match('/[0-9]+\.([0-9]+|%)\.([0-9]+|%)\.([0-9]+|%)/', $s)) {
+ } else if (S::admin() && preg_match('/[0-9]+\.([0-9]+|%)\.([0-9]+|%)\.([0-9]+|%)/', $s)) {
$this->ip = $s;
}
if ($this->email || $this->ip) {
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'stats' => $this->make_hook('stats', AUTH_COOKIE),
- 'stats/evolution' => $this->make_hook('evolution', AUTH_COOKIE),
- 'stats/graph' => $this->make_hook('graph', AUTH_COOKIE),
- 'stats/graph/evolution'
- => $this->make_hook('graph_evo', AUTH_COOKIE),
- 'stats/promos' => $this->make_hook('promos', AUTH_COOKIE),
- 'stats/profile' => $this->make_hook('profile', AUTH_COOKIE),
-
- 'stats/coupures' => $this->make_hook('coupures', AUTH_PUBLIC),
+ 'stats' => $this->make_hook('stats', AUTH_COOKIE),
+ 'stats/evolution' => $this->make_hook('evolution', AUTH_COOKIE),
+ 'stats/graph' => $this->make_hook('graph', AUTH_COOKIE),
+ 'stats/graph/evolution' => $this->make_hook('graph_evo', AUTH_COOKIE),
+ 'stats/promos' => $this->make_hook('promos', AUTH_COOKIE),
+ 'stats/profile' => $this->make_hook('profile', AUTH_COOKIE),
+
+ 'stats/coupures' => $this->make_hook('coupures', AUTH_PUBLIC),
);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'survey' => $this->make_hook('index', AUTH_PUBLIC),
- 'survey/vote' => $this->make_hook('vote', AUTH_PUBLIC),
- 'survey/result' => $this->make_hook('result', AUTH_PUBLIC),
- 'survey/edit' => $this->make_hook('edit', AUTH_COOKIE),
- 'survey/ajax' => $this->make_hook('ajax', AUTH_COOKIE),
- 'survey/admin' => $this->make_hook('admin', AUTH_MDP, 'admin'),
- 'survey/admin/edit' => $this->make_hook('adminEdit', AUTH_MDP, 'admin'),
+ 'survey' => $this->make_hook('index', AUTH_PUBLIC),
+ 'survey/vote' => $this->make_hook('vote', AUTH_PUBLIC),
+ 'survey/result' => $this->make_hook('result', AUTH_PUBLIC),
+ 'survey/edit' => $this->make_hook('edit', AUTH_COOKIE),
+ 'survey/ajax' => $this->make_hook('ajax', AUTH_COOKIE),
+ 'survey/admin' => $this->make_hook('admin', AUTH_MDP, 'admin'),
+ 'survey/admin/edit' => $this->make_hook('adminEdit', AUTH_MDP, 'admin'),
'survey/admin/valid' => $this->make_hook('adminValidate', AUTH_MDP, 'admin'),
- 'survey/admin/del' => $this->make_hook('adminDelete', AUTH_MDP, 'admin'),
+ 'survey/admin/del' => $this->make_hook('adminDelete', AUTH_MDP, 'admin'),
);
}
// }}}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- 'index' => $this->make_hook('index', AUTH_PUBLIC),
- 'exit' => $this->make_hook('exit', AUTH_PUBLIC),
-
- 'admin' => $this->make_hook('admin', AUTH_MDP, 'admin'),
- 'groups' => $this->make_hook('groups', AUTH_PUBLIC),
- 'groupes.php' => $this->make_hook('groups2', AUTH_PUBLIC),
- 'plan' => $this->make_hook('plan', AUTH_PUBLIC),
- 'photo' => $this->make_hook('photo', AUTH_MDP),
- 'autologin' => $this->make_hook('autologin', AUTH_MDP),
+ 'index' => $this->make_hook('index', AUTH_PUBLIC),
+ 'exit' => $this->make_hook('exit', AUTH_PUBLIC),
+
+ 'admin' => $this->make_hook('admin', AUTH_MDP, 'admin'),
+ 'groups' => $this->make_hook('groups', AUTH_PUBLIC),
+ 'groupes.php' => $this->make_hook('groups2', AUTH_PUBLIC),
+ 'plan' => $this->make_hook('plan', AUTH_PUBLIC),
+ 'photo' => $this->make_hook('photo', AUTH_MDP),
+ 'autologin' => $this->make_hook('autologin', AUTH_MDP),
);
}
if (Post::has('diminutif')) {
S::assert_xsrf_token();
- XDB::query('INSERT INTO groupex.asso (id,diminutif)
- VALUES(NULL,{?})', Post::v('diminutif'));
- pl_redirect('../'.Post::v('diminutif').'/edit');
+ $res = XDB::query('SELECT COUNT(*)
+ FROM groupex.asso
+ WHERE diminutif = {?}',
+ Post::v('diminutif'));
+
+ if ($res->fetchOneCell() == 0) {
+ XDB::execute('INSERT INTO groupex.asso (id, diminutif)
+ VALUES (NULL, {?})',
+ Post::v('diminutif'));
+ pl_redirect('../' . Post::v('diminutif') . '/edit');
+ } else {
+ $page->trigError('Le diminutif demandé est déjà pris.');
+ }
}
- $res = XDB::query('SELECT nom,diminutif FROM groupex.asso ORDER by NOM');
+ $res = XDB::query('SELECT nom, diminutif
+ FROM groupex.asso
+ ORDER BY nom');
$page->assign('assos', $res->fetchAllAssoc());
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$page->assign('archive', $archive);
$evenements = XDB::iterator(
- "SELECT e.*, LEFT(10, e.debut) AS debut_day, LEFT(10, e.fin) AS fin_day,
+ "SELECT e.*, LEFT(10, e.debut) AS first_day, LEFT(10, e.fin) AS last_day,
IF(e.deadline_inscription, e.deadline_inscription >= LEFT(NOW(), 10),
1) AS inscr_open, e.deadline_inscription,
u.nom, u.prenom, u.promo, a.alias,
$evts = array();
$undisplayed_events = 0;
+ $this->load('xnetevents.inc.php');
while ($e = $evenements->next()) {
if (!is_member() && !may_update() && !$e['accept_nonmembre']) {
$e['paid'] += trim($p);
}
+ make_event_date($e);
+
if (Env::has('updated') && $e['eid'] == Env::i('updated')) {
$page->assign('updated', $e);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
"SELECT SUM(nb) AS nb_tot, COUNT(DISTINCT ep.uid) AS nb, e.*,
IF(e.deadline_inscription, e.deadline_inscription >= LEFT(NOW(), 10),
1) AS inscr_open,
- LEFT(10, e.debut) AS debut_day, LEFT(10, e.fin) AS fin_day,
+ LEFT(10, e.debut) AS first_day, LEFT(10, e.fin) AS last_day,
LEFT(NOW(), 10) AS now,
ei.titre,
al.vid AS absent_list, pl.vid AS participant_list,
$evt['telepaid'] += trim($p);
}
+ make_event_date($evt);
+
return $evt;
}
}
// }}}
+// {{{ function event_change_shortname()
function event_change_shortname(&$page, $eid, $old, $new)
{
global $globals;
et qu'il ne contient que des lettres non accentuées,
des chiffres ou les caractères - et .");
return $old;
+ } elseif ($new && ctype_digit($new)) {
+ $page->trigError("Le raccourci demandé ne peut être accepté car il
+ ne contient que des chiffres. Rajoute-lui par exemple
+ une lettre.");
+ return $old;
}
//vérifier que l'alias n'est pas déja pris
// cannot happen
return $old;
}
+// }}}
+
+// {{{ function make_event_date()
+function make_event_date(&$e)
+{
+ $start = strtotime($e['debut']);
+ $end = strtotime($e['fin']);
+ $first_day = strtotime($e['first_day']);
+ $last_day = strtotime($e['last_day']);
+ unset($e['debut'], $e['fin'], $e['first_day'], $e['last_day']);
+
+ $date = "";
+ if ($start && $end != $start) {
+ if ($first_day == $last_day) {
+ $date .= "le " . strftime("%d %B %Y", $start) . " de "
+ . strftime("%H:%M", $start) . " à " . strftime("%H:%M", $end);
+ } else {
+ $date .= "du " . strftime("%d %B %Y à %H:%M", $start)
+ . "\nau " . strftime("%d %B %Y à %H:%M", $end);
+ }
+ } else {
+ $date .= "le " . strftime("%d %B %Y à %H:%M", $start);
+ }
+ $e['date'] = $date;
+}
+// }}}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- '%grp' => $this->make_hook('index', AUTH_PUBLIC),
- '%grp/asso.php' => $this->make_hook('index', AUTH_PUBLIC),
- '%grp/logo' => $this->make_hook('logo', AUTH_PUBLIC),
- '%grp/site' => $this->make_hook('site', AUTH_PUBLIC),
- '%grp/edit' => $this->make_hook('edit', AUTH_MDP, 'groupadmin'),
- '%grp/mail' => $this->make_hook('mail', AUTH_MDP, 'groupadmin'),
- '%grp/forum' => $this->make_hook('forum', AUTH_MDP, 'groupmember'),
- '%grp/annuaire' => $this->make_hook('annuaire', AUTH_MDP, 'groupannu'),
- '%grp/annuaire/vcard' => $this->make_hook('vcard', AUTH_MDP, 'groupmember:groupannu'),
- '%grp/annuaire/csv' => $this->make_hook('csv', AUTH_MDP, 'groupmember:groupannu'),
- '%grp/trombi' => $this->make_hook('trombi', AUTH_MDP, 'groupannu'),
- '%grp/geoloc' => $this->make_hook('geoloc', AUTH_MDP, 'groupannu'),
- '%grp/subscribe' => $this->make_hook('subscribe', AUTH_MDP),
- '%grp/subscribe/valid' => $this->make_hook('subscribe_valid', AUTH_MDP, 'groupadmin'),
- '%grp/unsubscribe' => $this->make_hook('unsubscribe', AUTH_MDP, 'groupmember'),
-
- '%grp/change_rights' => $this->make_hook('change_rights', AUTH_MDP),
-
- '%grp/admin/annuaire'
- => $this->make_hook('admin_annuaire', AUTH_MDP, 'groupadmin'),
-
- '%grp/member'
- => $this->make_hook('admin_member', AUTH_MDP, 'groupadmin'),
- '%grp/member/new'
- => $this->make_hook('admin_member_new', AUTH_MDP, 'groupadmin'),
- '%grp/member/new/ajax'
- => $this->make_hook('admin_member_new_ajax', AUTH_MDP, 'user', NO_AUTH),
- '%grp/member/del'
- => $this->make_hook('admin_member_del', AUTH_MDP, 'groupadmin'),
-
- '%grp/rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
- '%grp/announce/new' => $this->make_hook('edit_announce', AUTH_MDP, 'groupadmin'),
- '%grp/announce/edit' => $this->make_hook('edit_announce', AUTH_MDP, 'groupadmin'),
- '%grp/announce/photo' => $this->make_hook('photo_announce', AUTH_PUBLIC),
- '%grp/admin/announces' => $this->make_hook('admin_announce', AUTH_MDP, 'groupadmin'),
+ '%grp' => $this->make_hook('index', AUTH_PUBLIC),
+ '%grp/asso.php' => $this->make_hook('index', AUTH_PUBLIC),
+ '%grp/logo' => $this->make_hook('logo', AUTH_PUBLIC),
+ '%grp/site' => $this->make_hook('site', AUTH_PUBLIC),
+ '%grp/edit' => $this->make_hook('edit', AUTH_MDP, 'groupadmin'),
+ '%grp/mail' => $this->make_hook('mail', AUTH_MDP, 'groupadmin'),
+ '%grp/forum' => $this->make_hook('forum', AUTH_MDP, 'groupmember'),
+ '%grp/annuaire' => $this->make_hook('annuaire', AUTH_MDP, 'groupannu'),
+ '%grp/annuaire/vcard' => $this->make_hook('vcard', AUTH_MDP, 'groupmember:groupannu'),
+ '%grp/annuaire/csv' => $this->make_hook('csv', AUTH_MDP, 'groupmember:groupannu'),
+ '%grp/trombi' => $this->make_hook('trombi', AUTH_MDP, 'groupannu'),
+ '%grp/geoloc' => $this->make_hook('geoloc', AUTH_MDP, 'groupannu'),
+ '%grp/subscribe' => $this->make_hook('subscribe', AUTH_MDP),
+ '%grp/subscribe/valid' => $this->make_hook('subscribe_valid', AUTH_MDP, 'groupadmin'),
+ '%grp/unsubscribe' => $this->make_hook('unsubscribe', AUTH_MDP, 'groupmember'),
+
+ '%grp/change_rights' => $this->make_hook('change_rights', AUTH_MDP),
+ '%grp/admin/annuaire' => $this->make_hook('admin_annuaire', AUTH_MDP, 'groupadmin'),
+ '%grp/member' => $this->make_hook('admin_member', AUTH_MDP, 'groupadmin'),
+ '%grp/member/new' => $this->make_hook('admin_member_new', AUTH_MDP, 'groupadmin'),
+ '%grp/member/new/ajax' => $this->make_hook('admin_member_new_ajax', AUTH_MDP, 'user', NO_AUTH),
+ '%grp/member/del' => $this->make_hook('admin_member_del', AUTH_MDP, 'groupadmin'),
+
+ '%grp/rss' => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
+ '%grp/announce/new' => $this->make_hook('edit_announce', AUTH_MDP, 'groupadmin'),
+ '%grp/announce/edit' => $this->make_hook('edit_announce', AUTH_MDP, 'groupadmin'),
+ '%grp/announce/photo' => $this->make_hook('photo_announce', AUTH_PUBLIC),
+ '%grp/admin/announces' => $this->make_hook('admin_announce', AUTH_MDP, 'groupadmin'),
);
}
} else {
$site = "";
}
- if (S::has_perms()) {
+ if (S::admin()) {
if (Post::v('mail_domain') && (strstr(Post::v('mail_domain'), '.') === false)) {
$page->trigError("le domaine doit être un FQDN (aucune modif effectuée) !!!");
return;
pl_redirect('../'.Post::v('diminutif', $globals->asso('diminutif')).'/edit');
}
- if (S::has_perms()) {
+ if (S::admin()) {
$dom = XDB::iterator('SELECT * FROM groupex.dom ORDER BY nom');
$page->assign('dom', $dom);
$page->assign('super', true);
$this->load('mail.inc.php');
set_time_limit(120);
$tos = get_all_redirects($mbr, $mls, $mmlist);
+
$upload = PlUpload::get($_FILES['uploaded'], S::user()->login(), 'xnet.emails', true);
+ if (!$upload && @$_FILES['uploaded']['name'] && PlUpload::$lastError != null) {
+ $page->trigError(PlUpload::$lastError);
+ return;
+ }
+
send_xnet_mails($from, $sujet, $body, Env::v('wiki'), $tos, Post::v('replyto'), $upload, @$_FILES['uploaded']['name']);
if ($upload) {
$upload->rm();
}
- $page->kill("Email envoyé !");
+ $page->killSuccess("Email envoyé !");
$page->assign('sent', true);
}
}
$mailer->setSubject('['.$globals->asso('nom').'] Demande d\'inscription annulée');
$mailer->setTxtBody(Env::v('motif'));
$mailer->send();
- $page->kill("La demande de {$user->fullName()} a bien été refusée.");
+ $page->killSuccess("La demande de {$user->fullName()} a bien été refusée.");
} else {
$page->assign('show_form', true);
$page->assign('reason', $reason);
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function handlers()
{
return array(
- '%grp/lists' => $this->make_hook('lists', AUTH_MDP, 'groupmember'),
- '%grp/lists/create' => $this->make_hook('create', AUTH_MDP, 'groupmember'),
+ '%grp/lists' => $this->make_hook('lists', AUTH_MDP, 'groupmember'),
+ '%grp/lists/create' => $this->make_hook('create', AUTH_MDP, 'groupmember'),
- '%grp/lists/members' => $this->make_hook('members', AUTH_COOKIE),
- '%grp/lists/csv' => $this->make_hook('csv', AUTH_COOKIE),
- '%grp/lists/annu' => $this->make_hook('annu', AUTH_COOKIE),
- '%grp/lists/archives' => $this->make_hook('archives', AUTH_COOKIE),
- '%grp/lists/archives/rss' => $this->make_hook('rss', AUTH_PUBLIC),
+ '%grp/lists/members' => $this->make_hook('members', AUTH_COOKIE),
+ '%grp/lists/csv' => $this->make_hook('csv', AUTH_COOKIE),
+ '%grp/lists/annu' => $this->make_hook('annu', AUTH_COOKIE),
+ '%grp/lists/archives' => $this->make_hook('archives', AUTH_COOKIE),
+ '%grp/lists/archives/rss' => $this->make_hook('rss', AUTH_PUBLIC),
- '%grp/lists/moderate' => $this->make_hook('moderate', AUTH_MDP),
- '%grp/lists/admin' => $this->make_hook('admin', AUTH_MDP),
- '%grp/lists/options' => $this->make_hook('options', AUTH_MDP),
- '%grp/lists/delete' => $this->make_hook('delete', AUTH_MDP),
+ '%grp/lists/moderate' => $this->make_hook('moderate', AUTH_MDP),
+ '%grp/lists/admin' => $this->make_hook('admin', AUTH_MDP),
+ '%grp/lists/options' => $this->make_hook('options', AUTH_MDP),
+ '%grp/lists/delete' => $this->make_hook('delete', AUTH_MDP),
- '%grp/lists/soptions' => $this->make_hook('soptions', AUTH_MDP),
- '%grp/lists/check' => $this->make_hook('check', AUTH_MDP),
- '%grp/lists/sync' => $this->make_hook('sync', AUTH_MDP),
+ '%grp/lists/soptions' => $this->make_hook('soptions', AUTH_MDP),
+ '%grp/lists/check' => $this->make_hook('check', AUTH_MDP),
+ '%grp/lists/sync' => $this->make_hook('sync', AUTH_MDP),
- '%grp/alias/admin' => $this->make_hook('aadmin', AUTH_MDP, 'groupadmin'),
- '%grp/alias/create' => $this->make_hook('acreate', AUTH_MDP, 'groupadmin'),
+ '%grp/alias/admin' => $this->make_hook('aadmin', AUTH_MDP, 'groupadmin'),
+ '%grp/alias/create' => $this->make_hook('acreate', AUTH_MDP, 'groupadmin'),
/* hack: lists uses that */
- 'profile' => $this->make_hook('profile', AUTH_PUBLIC),
+ 'profile' => $this->make_hook('profile', AUTH_PUBLIC),
);
}
}
$listes = $this->client->get_lists();
- $page->assign('listes',$listes);
+ $page->assign('listes', $listes);
$alias = XDB::iterator(
'SELECT alias,type
$page->assign('alias', $alias);
$page->assign('may_update', may_update());
+
+ if (count($listes) > 0 && !$globals->asso('has_ml')) {
+ XDB::execute("UPDATE groupex.asso
+ SET flags = CONCAT_WS(',', IF(flags = '', NULL, flags), 'has_ml')
+ WHERE id = {?}",
+ $globals->asso('id'));
+ }
}
function handler_create(&$page)
VALUES ({?}, {?})', XDB::insertId(),
$red . $mdir . '@listes.polytechnique.org');
}
+
+ XDB::execute("UPDATE groupex.asso
+ SET flags = CONCAT_WS(',', IF(flags = '', NULL, flags), 'has_ml')
+ WHERE id = {?}",
+ $globals->asso('id'));
+
pl_redirect('lists/admin/'.$liste);
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
function smarty_insert_getName()
{
- $uid = Cookie::v('ORGuid', -1);
+ $uid = Cookie::v('uid', -1);
if ($uid < 0) {
return "";
}
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
{
global $globals;
- $id = Cookie::i('ORGuid', -1);
+ $id = Cookie::i('uid', -1);
$id = S::v($_SESSION['uid'], $id);
if ($id<0) {
return "";
}
- if (Cookie::v('ORGdomain', 'login') != 'alias') {
- $res = XDB::query("SELECT alias FROM aliases
- WHERE id={?} AND (type IN ('a_vie','alias') AND FIND_IN_SET('bestalias', flags))", $id);
- return $res->fetchOneCell();
+ if (Cookie::v('domain', 'login') != 'alias') {
+ $res = XDB::query("SELECT alias FROM aliases
+ WHERE id={?} AND (type IN ('a_vie','alias') AND FIND_IN_SET('bestalias', flags))", $id);
+ return $res->fetchOneCell();
} else {
- $res = XDB::query("
- SELECT v.alias
- FROM virtual AS v
- INNER JOIN virtual_redirect USING(vid)
- INNER JOIN aliases AS a ON(id={?} AND a.type='a_vie')
- WHERE redirect = CONCAT(a.alias, {?})
- OR redirect = CONCAT(a.alias, {?})",
- $id, "@".$globals->mail->domain, "@".$globals->mail->domain2);
- $alias = $res->fetchOneCell();
- return substr($alias, 0, strpos($alias, "@"));
+ $res = XDB::query("
+ SELECT v.alias
+ FROM virtual AS v
+ INNER JOIN virtual_redirect USING(vid)
+ INNER JOIN aliases AS a ON(id={?} AND a.type='a_vie')
+ WHERE redirect = CONCAT(a.alias, {?})
+ OR redirect = CONCAT(a.alias, {?})",
+ $id, "@".$globals->mail->domain, "@".$globals->mail->domain2);
+ $alias = $res->fetchOneCell();
+ return substr($alias, 0, strpos($alias, "@"));
}
return $login;
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<form action="admin/deaths" method="post">
- <table class="tinybicol">
+ <table class="bicol">
<tr>
<td>
<input type="submit" value="GO" style="visibility: hidden" />
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<a href="admin/downtime">Coupures</a>
|
<a href="admin/icons">Icônes</a>
+ |
+ <a href="sql_errors">Erreurs MySQL</a>
</td>
</tr>
</td>
</tr>
<tr class="pair">
- <td class="titre">Newletter</td>
+ <td class="titre">Newsletter</td>
<td>
<a href="admin/newsletter">Liste</a>
|
<tr class="impair">
<td class="titre">AX-Letter</td>
<td>
- <a href="ax/edit">Edition</a>
+ <a href="ax/edit">Édition</a>
|
- <a href="admin/axletter">Inscriptions et Permissions</a>
+ <a href="admin/axletter">Inscriptions et permissions</a>
</td>
</tr>
<tr class="pair">
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}\r
{* *}\r
-{* Copyright (C) 2003-2008 Polytechnique.org *}\r
+{* Copyright (C) 2003-2009 Polytechnique.org *}\r
{* http://opensource.polytechnique.org/ *}\r
{* *}\r
{* This program is free software; you can redistribute it and/or modify *}\r
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
</p>
{/if}
-{if $smarty.request.response}<!-- failed login code //-->
-{include core=triggers.tpl text="Erreur d'identification. Essaie à nouveau !" type="errors"}
-<br />
-{/if}
-
<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;" style="display: none">
<table class="bicol" cellpadding="4" summary="Formulaire de login">
<tr>
<input type="text" name="username" size="20" maxlength="50" value="{insert name="getUserName"}" /> @ <select name="domain">
<option value="login">{#globals.mail.domain#} / {#globals.mail.domain2#}</option>
<option value="alias" {if $smarty.cookies.ORGdomain eq alias}selected="selected"{/if}>
- {#globals.mail.alias_dom#} / {#globals.mail.alias_dom2#}
+ {#globals.mail.alias_dom#} / {#globals.mail.alias_dom2#}
</option>
- {$smarty.cookies.domain}
</select>
</td>
</tr>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* *}
{**************************************************************************}
+<h1>{icon name=error} Page sécurisée</h1>
-<div class="center">
- <table>
- <tr>
- <td>
- {icon name=error}
- </td>
- <td>
- <span class="smaller">
- <strong>
- Pour des raisons de <span class="erreur">sécurité</span>, il est obligatoire de taper ton mot de passe, même
- avec l'accès permanent, pour certaines opérations sensibles.
- </strong>
- </span>
- </td>
- <td>
- {icon name=error}
- </td>
- </tr>
- </table>
+<div>
+ La page que tu as demandée est classée comme sensible. Il est nécessaire de taper ton mot de passe
+ pour y accéder, même avec l'accès permanent activé.
</div>
<br />
<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit='doChallengeResponse(); return false;'>
- <table class="tinybicol" cellpadding="4" summary="Formulaire de login">
+ <table class="bicol" cellpadding="4" summary="Formulaire de login">
+ <tr>
+ <td class="titre">
+ Nom d'utilisateur :
+ </td>
+ <td>{$smarty.session.hruid}</td>
+ <td class="right" rowspan="3" style="vertical-align: middle">
+ <input type="submit" name="submitbtn" value="Envoyer" />
+ </td>
+ </tr>
<tr>
<td class="titre">
Mot de passe :
<input type="password" name="password" size="10" maxlength="256" />
<a href="recovery">Perdu ?</a>
</td>
- <td class="right" rowspan="2" style="vertical-align: middle">
- <input type="submit" name="submitbtn" value="Envoyer" />
- </td>
</tr>
<tr>
<td {popup caption='Connexion permanente' width='300' text='Décoche cette case pour que le site oublie ce navigateur.<br />
</table>
</form>
<br />
-{if $smarty.request.response}<!-- failed login code -->
-{include core=triggers.tpl text="Erreur d'identification. Essaie à nouveau !" type="errors"}
-{/if}
<!-- Set up the form with the challenge value and an empty reply value -->
<form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
<div>
{xsrf_token_field}
<input type="hidden" name="challenge" value="{$smarty.session.challenge}" />
- <input type="hidden" name="username" value="{$smarty.cookies.ORGuid}" />
+ <input type="hidden" name="username" value="{$smarty.session.uid}" />
<input type="hidden" name="xorpass" value="" />
<input type="hidden" name="remember" value="" />
<input type="hidden" name="response" value="" />
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
correspondant si tu veux que nous puissions te répondre.
</p>
{elseif $x && $x.nb_mails}
-<h2>Patte Cassée</h2>
+<h2>Patte cassée</h2>
<p>
Ton correspondant a à l'heure actuelle <span class="erreur">{$x.nb_mails} adresse(s) email(s) de redirection active(s)
en dehors de celle que tu nous as communiquée</span>. Cela ne veut pas forcément dire qu'il les avait
<a href="emails/broken/warn/{$email}?token={xsrf_token}">clique sur ce lien</a>.
</p>
{elseif $x}
-<h2>Patte Cassée</h2>
+<h2>Patte cassée</h2>
<p>
Désolé, mais ton correspondant, {$x.prenom} {$x.nom} (X{$x.promo}),
n'a actuellement <span class="erreur">aucune adresse email de redirection
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<p>
<small>{icon name=information title="Envoi d'email"} Pour envoyer un email, tu peux soit le faire depuis l'interface
- ci-dessous, soit utiliser <a href="Xorg/SMTPSecurise">notre serveur d'envoi SMTP<a>.</small>
+ ci-dessous, soit utiliser <a href="Xorg/SMTPSecurise">notre serveur d'envoi SMTP</a>.</small>
</p>
<form action="emails/send" method="post" enctype="multipart/form-data" id="form_mail" onsubmit="return check(this);">
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
</div>
{/if}
-{if $smarty.session.no_redirect}
-<div class="errors">
- <ul>
- <li>
- Tu n'as plus de redirection valide ce qui rend ton adresse Polytechnique.org
- inutilisable. Rends-toi au plus vite sur <a href="emails/redirect">la page de
- gestion des emails</a> pour corriger ce problème.
- </li>
- </ul>
-</div>
-{/if}
-
-{if $smarty.session.mx_failures|@count}
-<div class="warnings">
- {icon name=error} Des problèmes sont actuellement recontrés sur tes redirections suivantes :
- <ul>
- {foreach from=$smarty.session.mx_failures item=mail}
- <li>
- <span class="erreur">{$mail.mail}</span> :
- <span class="explication">{$mail.text}</span>
- </li>
- {/foreach}
- </ul>
- <div style="text-align: center"><a href="emails/redirect">Gérer mes adresses de redirection</a></div>
-</div>
-{/if}
-
-{if $fiche_incitation || $photo_incitation || ($geoloc_incitation > 0)}
-<div class="warnings">
- <ul>
-{if $fiche_incitation}
- <li>
- La dernière mise à jour de ta
- <a href="profile/{$smarty.session.hruid}" class="popup2">fiche</a>
- date du {$fiche_incitation|date_format}.
- Il est possible qu'elle ne soit pas à jour.
- Si tu souhaites la modifier, <a href="profile/edit">clique ici !</a>
- </li>
-{/if}
-
-{if $photo_incitation}
- <li>
- Tu n'as pas mis de photo de toi sur ta fiche, c'est dommage.
- Clique <a href="photo/change">ici</a> si tu souhaites en ajouter une.
- </li>
-{/if}
-
-{if $geoloc_incitation > 0}
- <li>
- Parmi tes adresses, il y en a {$geoloc_incitation} que nous n'avons pas pu localiser.
- Clique <a href="profile/edit/adresses">ici</a> pour rectifier.
- </li>
-{/if}
- </ul>
-</div>
+{if $reminder}
+{include file="reminder/base.tpl"}
+{else}
+{include file="include/tips.tpl" full=true}
{/if}
-{include file="include/tips.tpl" full=true}
-
<table class="tinybicol" id="menu-evts">
{foreach from=$events name=events key=category item=evenement}
<tr class="pair" style="height: 18px">
-->
{/literal}
</script>
-
+
{foreach from=$events key=category item=evenement}
{foreach item=ev from=$evenement}
{if $ev.nonlu}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}\r
{* *}\r
-{* Copyright (C) 2003-2008 Polytechnique.org *}\r
+{* Copyright (C) 2003-2009 Polytechnique.org *}\r
{* http://opensource.polytechnique.org/ *}\r
{* *}\r
{* This program is free software; you can redistribute it and/or modify *}\r
{**************************************************************************}\r
{* *}\r
-{* Copyright (C) 2003-2008 Polytechnique.org *}\r
+{* Copyright (C) 2003-2009 Polytechnique.org *}\r
{* http://opensource.polytechnique.org/ *}\r
{* *}\r
{* This program is free software; you can redistribute it and/or modify *}\r
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h1>Compte Google Apps</h1>
-{if $account}
+{if $account && $account->provisioned()}
{assign var=a value=$account}
<table class="bicol">
<col width="50%" />
{/if}
<tr class="impair">
<td class="titre">Mots de passes synchronisés</td>
- <td>
- {if $a->sync_password}
- oui (<a href="admin/googleapps/user/{$a->g_account_name}/forcesync">lancer une synchronisation</a>)
- {else}non{/if}
- </td>
+ <td>{if $a->sync_password}oui{else}non{/if}</td>
</tr>
<tr class="impair">
<td class="titre">Redirection des emails</td><td>{if $googleapps_storage}activée{else}désactivee{/if}</td>
<tr class="pair">
<td class="titre">Utilisation du quota d'emails</td><td>{$a->r_disk_usage/1024/1024|string_format:"%.2f"}MB</td>
</tr>
+
+ <tr class="impair">
+ <td class="titre">Alias email du compte</td>
+ <td>{foreach from=$a->nicknames() item=nickname}{$nickname}<br />{/foreach}{$a->g_account_name}</td>
+ </tr>
</table><br />
+<form action="admin/googleapps/user/{$a->g_account_name}" method="post">
+ {xsrf_token_field}
+ <table class="bicol">
+ <tr>
+ <th colspan="2" style="text-align: left">Actions sur le compte</th>
+ </tr>
+
+ <tr class="impair">
+ <td colspan="2" class="titre">Statut du compte</td>
+ </tr>
+ <tr class="impair">
+ <td> </td>
+ <td>
+ {if $a->pending_update_suspension}
+ <div class="erreur smaller">Le statut du compte est en cours de changement. Aucune opération n'est possible.</div>
+ {elseif $a->active()}
+ <input type="submit" name="suspend" value="Suspendre le compte" />
+ {elseif $a->suspended()}
+ <input type="submit" name="unsuspend" value="Réactiver le compte" />
+ {/if}
+ </td>
+ </tr>
+
+ <tr class="pair">
+ <td colspan="2" class="titre">Mot de passe</td>
+ </tr>
+ <tr class="pair">
+ <td> </td>
+ <td>
+ {if !$a->active()}
+ <div class="erreur smaller">Aucune opération n'est possible sur un compte inactif.</div>
+ {elseif $a->pending_update_password}
+ <div class="erreur smaller">Le mot de passe du compte est en cours de changement. Aucune opération n'est possible.</div>
+ {elseif $a->sync_password}
+ <input type="submit" name="forcesync" value="Synchroniser les mots de passes maintenant" />
+ <input type="submit" name="nosync" value="Désactiver la synchronisation automatique" />
+ {else}
+ <input type="submit" name="sync" value="Activer la synchronisation automatique" />
+ {/if}
+ </td>
+ </tr>
+ </table><br />
+</form>
+
<table class="bicol" style="text-align: center">
<tr>
<th colspan="4" style="text-align: left">Requêtes en attente</th>
</tr>
{/iterate}
</table>
+{elseif $account}
+<p><strong>Cet utilisateur n'a pas de compte Google Apps.</strong></p>
{else}
<p><strong>Aucun utilisateur n'a été trouvé.</strong></p>
{/if}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<table class="bicol" id="status">
<tr>
- <th>État de ton compte</th>
+ <th colspan="2">État de ton compte</th>
</tr>
<tr class="impair">
- <td>Ton compte <b>{$account->g_account_name}</b> existe{if $account->r_creation} depuis le {$account->r_creation|date_format:"%d/%m/%Y"}{/if}.</td>
+ <td colspan="2">Ton compte <b>{$account->g_account_name}</b> existe{if $account->r_creation} depuis le {$account->r_creation|date_format:"%d/%m/%Y"}{/if}.</td>
</tr>
{if $account->reporting_date and $account->r_disk_usage}
<tr class="pair">
- <td>Au {$account->reporting_date|date_format:"%d %B %Y"}, tu avais {$account->r_disk_usage/1024/1024|string_format:"%.1f"} Mo d'emails.</td>
+ <td colspan="2">Au {$account->reporting_date|date_format:"%d %B %Y"}, tu avais {$account->r_disk_usage/1024/1024|string_format:"%.1f"} Mo d'emails.</td>
</tr>
{/if}
+ {if $redirect_active and $redirect_unique}
<tr class="impair">
- {if $redirect_active and $redirect_unique}
- <td>
+ <td class="middle">{icon name=error}</td>
+ <td class="smaller">
Ta seule adresse de redirection de tes emails est celle de ton compte Google Apps.<br />
Si tu souhaites désactiver celui-ci, tu dois d'abord <a href="emails/redirect">ajouter une nouvelle adresse de redirection</a>.
</td>
- {else}
- <td>
+ </tr>
+ {else}
+ <tr class="impair">
+ <td colspan="2">
Si tu ne souhaites plus utiliser ton compte, tu peux le désactiver :<br /><br />
<div class="center">
<form action="googleapps/suspend" method="post">
<input type="submit" name="suspend" value="Désactiver mon compte Google Apps" />
</form>
</div>
- <div style="margin-top: 0.5em">
- {icon name=error} Une fois ton compte désactivé, tu ne pourras plus accéder à tes emails sur Google Apps.<br />
- {icon name=information} La réactivation est possible, mais nécessite d'être validée par un administrateur.
- </div>
</td>
- {/if}
</tr>
+ <tr class="impair">
+ <td class="middle">{icon name=error}</td>
+ <td class="smaller">
+ Une fois ton compte désactivé, tu ne pourras plus accéder à tes emails sur Google Apps.
+ La réactivation est possible, mais nécessite d'être validée par un administrateur.
+ </td>
+ </tr>
+ {/if}
</table>
<br />
<table class="bicol" id="password">
<tr>
- <th>Ton mot de passe Google Apps</th>
- </tr>
- {if $account->sync_password}
- <tr class="impair">
- <td>
- Le mot de passe de ton compte Google Apps est actuellement celui que tu utilises pour
- Polytechnique.org. Tu peux :
- </td>
+ <th colspan="2">Ton mot de passe Google Apps</th>
</tr>
{if $account->pending_update_password}
<tr class="pair">
- <td><div class="erreur">
+ <td class="middle">{icon name=error}</td>
+ <td><div class="erreur smaller">
Ton mot de passe est en cours de changement.<br />
Tu pourras à nouveau le modifier d'ici quelques secondes.
</div></td>
</tr>
+
{else}
- <tr class="impair">
- <td>
- <ul style="margin-top: 0">
- <li><a href="password">Changer ce mot de passe commun</a></li>
- <li><a href="googleapps/password/nosync#password">Ne plus répercuter les changements de mot de passe vers Google Apps</a></li>
- </ul>
- </td>
- </tr>
- {/if}
- {else}
- <tr class="impair">
- <td>
- Tu as actuellement deux mots de passes indépendants (pour ton compte Polytechnique.org et pour ton compte Google Apps).
- Tu peux :
+ <tr class="pair">
+ <td></td><td>
+ <form action="googleapps/password" method="post">
+ {xsrf_token_field}
+ <label>
+ <input type="radio" name="pwsync" value="sync" onchange="this.form.submit();"
+ {if $account->sync_password}checked="checked" {/if}/>
+ Utiliser le même mot de passe pour Polytechnique.org et Google Apps.</label><br />
+ <label>
+ <input type="radio" name="pwsync" value="nosync" onchange="this.form.submit();"
+ {if !$account->sync_password}checked="checked" {/if}/>
+ Utiliser deux mots de passes différents pour Polytechnique.org et Google Apps.</label><br />
+ </form>
</td>
</tr>
- {if $account->pending_update_password}
- <tr class="pair">
- <td><div class="erreur">
- Ton mot de passe est en cours de changement.<br />
- Tu pourras à nouveau le modifier d'ici quelques secondes.
- </div></td>
- </tr>
+ {if $account->sync_password}
+ <tr class="impair"><td colspan="2">
+ Tes mots de passes Polytechnique.org et Google Apps sont identiques et synchronisés.
+ <div class="center"><a href="password">Changer ce mot de passe commun</a></div>
+ </td></tr>
+
{else}
- <tr class="impair">
- <td>
- <ul style="margin-top: 0">
- <li style="margin-bottom: 1em">
- <a href="googleapps/password/sync">Choisir d'utiliser le même mot de passe pour les deux comptes.</a><br />
- Attention, cette opération changera ton mot de passe Google Apps.
- </li>
- <li>
- Changer le mot de passe de ton compte Google Apps :<br /><br />
- <form action="googleapps/password#password" method="post" id="changepass">
- <table class="tinybicol">
- <tr>
- <td class="titre">Nouveau mot de passe</td>
- <td><input type="password" name="nouveau" /></td>
- </tr>
- <tr>
- <td class="titre">Vérification</td>
- <td><input type="password" name="nouveau2" /></td>
- </tr>
- <tr>
- <td class="titre">Sécurité</td>
- <td>{checkpasswd prompt="nouveau" submit="create_account" text="Changer mon mot de passe"}</td>
- </tr>
- <tr>
- <td></td>
- <td><input type="submit" name="create_account" value="Changer" onclick="EnCryptedResponse(); return false;" /></td>
- </tr>
- </table>
- </form>
- <form action="googleapps/password#password" method="post" id="changepass2">
- {xsrf_token_field}
- <input type="hidden" name="response2" value="" />
- </form><br />
- Pour une sécurité optimale, ton mot de passe circule de manière sécurisée (https).
- Il est chiffré irréversiblement sur nos serveurs, ainsi que sur ceux de Google.
- </li>
- </ul>
- </td>
- </tr>
+ <tr class="impair"><td colspan="2">
+ Changer le mot de passe de ton compte Google Apps :<br /><br />
+ <form action="googleapps/password" method="post" id="changepass">
+ <table class="bicol">
+ <tr>
+ <td class="titre">Nouveau mot de passe</td>
+ <td><input type="password" name="nouveau" /></td>
+ </tr>
+ <tr>
+ <td class="titre">Vérification</td>
+ <td><input type="password" name="nouveau2" /></td>
+ </tr>
+ <tr>
+ <td class="titre">Sécurité</td>
+ <td>{checkpasswd prompt="nouveau" submit="create_account" text="Changer mon mot de passe"}</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input type="submit" name="create_account" value="Changer" onclick="EnCryptedResponse(); return false;" /></td>
+ </tr>
+ </table>
+ </form>
+ <form action="googleapps/password" method="post" id="changepass2">
+ {xsrf_token_field}
+ <input type="hidden" name="response2" value="" />
+ </form><br />
+ Pour une sécurité optimale, ton mot de passe circule de manière sécurisée (https).
+ Il est chiffré irréversiblement sur nos serveurs, ainsi que sur ceux de Google.
+ </td></tr>
{/if}
{/if}
</table>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<td class="lt">Profession :</td>
<td class="rt">
{if $c.job_web}<a href="{$c.job_web}">{$c.entreprise}</a>{else}{$c.entreprise}{/if}
- {if $c.secteur}({$c.secteur}){/if} {if $c.fonction}<br />{$c.fonction}{/if}
+ {if $c.secteur} ({$c.secteur}){/if}{if $c.fonction}<br />{$c.fonction}{/if}
</td>
</tr>
{/if}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
</p>
<p>
{if $relance eq '0000-00-00'}
-il n'a jamais été relancé.
+Il n'a jamais été relancé.
{else}
-sa dernière relance date du {$relance|date_format}
+Sa dernière relance date du {$relance|date_format}.
{/if}
</p>
-<p>[<a href='{$path}/insrel?token={xsrf_token}'>le relancer</a>]</p>
+<p>[<a href='{$path}/insrel?token={xsrf_token}'>Le relancer</a>]</p>
{/if}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS
xmlns:xrds="xri://$xrds"
</Service>
</XRD>
</xrds:XRDS>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h1>Page d'identité OpenId de {$user->fullName()}</h1>
-<p>OpenID est un système d'authentification décentralisé. Cette page permet
-à des sites web tiers d'identifier {$user->displayName()}, grâce à son compte
+<p>OpenID est un système d'authentification décentralisé. Cette page permet
+à des sites web tiers d'identifier {$user->displayName()}, grâce à son compte
Polytechnique.org.<p>
-<p><a href="Xorg/OpenId">En savoir plus sur OpenId</a></p>
\ No newline at end of file
+<p><a href="Xorg/OpenId">En savoir plus sur OpenId</a></p>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h1>Demande d'identification OpenId</h1>
-<p>Le site <strong>{$relying_party}</strong> demande à confirmer votre identité.</p>
+<p>Un site tiers demande à confirmer ton identité OpenId.
+ {if $sreg_data}
+ De plus, il a demandé à recevoir un certain nombre d'informations
+ te concernant.
+ {/if}
+ Merci de nous indiquer ton choix.
+</p><br />
-{if $sreg_data neq null}
-<p>Les informations suivantes lui seront transmises :</p>
-<ul>
-{foreach from=$sreg_data key=field item=value}
-<li><i>{$field}</i> : {$value}</li>
-{/foreach}
-</ul>
-{/if}
+<form method="POST" action="openid/trust?{$openid_query}">
+ {xsrf_token_field}
+ <table class="bicol">
+ <tr><th colspan="2">Souhaitez-vous confirmer votre identité ?</th></tr>
+ <tr class="impair">
+ <td>Adresse du site :</td>
+ <td><strong>{$relying_party}</strong></td>
+ </tr>
+ {if $sreg_data}
+ <tr class="impair">
+ <td>Informations demandées :</td>
+ <td><ul style="margin-top: 0">
+ {foreach from=$sreg_data key=field item=value}
+ <li><strong>{$field}</strong> ({$value})</li>
+ {/foreach}
+ </ul></td>
+ </tr>
+ {/if}
-<p><strong>Souhaitez-vous confirmer votre identité ?</strong></p>
+ <tr class="pair">
+ <td></td>
+ <td>
+ <label><input type="checkbox" name="trust_always" />
+ Toujours faire confiance à ce site.</label><br />
+ {if $sreg_data}
+ <label><input type="checkbox" checked="checked" name="trust_sreg" />
+ Envoyer les données ci-dessus au site.</label><br />
+ {/if}
+ </td>
+ </tr>
+ <tr class="impair center"><td colspan="2">
+ <input type="submit" name="trust_accept" value="Confirmer" />
+ <input type="submit" name="trust_cancel" value="Annuler" />
+ </td></tr>
+ </table>
+</form>
-<div class="form">
- <form method="post" action="openid/trust">
- <input type="checkbox" name="always" /> Toujours faire confiance à ce site<br />
- <input type="submit" name="trust" value="Confirmer" />
- <input type="submit" value="Annuler" />
- </form>
-</div>
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS
xmlns:xrds="xri://$xrds"
</Service>
</XRD>
</xrds:XRDS>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<p>{$texte|nl2br}</p>
{/if}
-<p>[<a href='payment'>retour aux Télépaiements</a>]</p>
+<p>[<a href="https://www.polytechnique.org/payment">retour aux Télépaiements</a>]</p>
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
Tu es inscrit à cet événements.
{if $ev.topay > $ev.paid}
<a href="{$platal->ns}payment/{$p.id}?montant={math equation="a-b" a=$ev.topay b=$ev.paid}">
- Tu dois encore payer {math equation="a-b" a=$ev.topay b=$ev.paid}€
+ Tu dois encore payer {math equation="a-b" a=$ev.topay b=$ev.paid}€.
</a>
{elseif $ev.topay eq $ev.paid}
Tu as déjà réglé l'intégralité de ton inscription ({$ev.topay}€).
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
fantaisiste. A toi de voir :)
</p>
<p>
-Note aux utilisateurs du navigateur Netscape 4.x ou équivalent.
-La fonctionalité "skins" n'est hélas pas compatible avec ces navigateurs
-qui ne respectent pas les standards du web. <br />
-Pour profiter de toutes les fonctionnalités de {#globals.core.sitename#},
-nous te conseillons de télécharger une version récente de ton navigateur.
-</p>
-<p>
Pour toute information complémentaire, n'hésite pas à écrire à
<a href="mailto:support@{#globals.mail.domain#}?subject=navigateur">support@{#globals.mail.domain#}</a>
</p>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
Après activation, tes paramètres de connexion seront :
-login : {$mailorg}
+identifiant : {$mailorg}
mot de passe : {$pass}
Nous te proposerons de remplacer ce mot de passe temporaire par un mot de passe de ton choix.
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{math equation="(promo % 100) + 100" promo=$promo}532)<br />
{/if}
Voir sur le GU ou un bulletin de solde pour trouver cette information<br /><br />
- Pour les élèves étrangers voie 2, il est du type :
+ Pour les élèves étrangers voie 2, il peut être aussi du type :
{if $promo < 1999}
{math equation="(promo + 1) % 100" promo=$promo}0XXX
{else}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
de recevoir les informations plus spécifiques de ta promotion pour pouvoir participer plus facilement aux événements
qu'elle organise. Nous t'inscrivons donc dans le groupe de la promotion {$smarty.session.promo}.
</dd>
- <dt><label><input type='checkbox' value='1' checked="checked" name='imap' />imap</label></dt>
+ <dt><label><input type='checkbox' value='1' checked="checked" name='imap' /> sauvegarde des emails</label></dt>
<dd>
d'avoir un accès de secours aux 30 derniers jours d'emails reçus sur ton adresse Polytechnique.org.
</dd>
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
+<div id="reminder">
+ <fieldset class="warnings">
+ <legend>
+ {if $reminder->warning()}{icon name=error}{else}{icon name=information}{/if}
+ {$reminder->title()}
+ </legend>
+
+ {if $reminder->template()}
+ {include file=$reminder->template()}
+ {else}
+ <div style="margin-bottom: 0.5em">
+ {$reminder->text()}
+ </div>
+ <div class="center">
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/yes'); return false" style="text-decoration: none">
+ {icon name=add} M'inscrire
+ </a> -
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/no'); return false" style="text-decoration: none">
+ {icon name=delete} Ne pas m'inscrire
+ </a> -
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/dismiss'); return false" style="text-decoration: none">
+ {icon name=cross} Décider plus tard
+ </a>
+ </div>
+ {/if}
+ </fieldset>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
+Des problèmes sont actuellement recontrés sur tes redirections suivantes :
+<ul>
+ {foreach from=$smarty.session.mx_failures item=mail}
+ <li>
+ <span class="erreur">{$mail.mail}</span> :
+ <span class="explication">{$mail.text}</span>
+ </li>
+ {/foreach}
+</ul>
+<div style="text-align: center"><a href="emails/redirect">Gérer mes adresses de redirection</a></div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
+<form action="{$reminder->baseurl()}/suscribe" method="post">
+ {xsrf_token_field}
+ Des camarades souhaitent que tu t'inscrives aux listes suivantes :
+ <dl>
+ {foreach from=$lists key=list item=details}
+ <dt>
+ <label>
+ <input type='checkbox' value='1' checked="checked" name="sub_ml[{$list}]" />
+ {$list}* : {$details.desc}
+ </label>
+ </dt>
+ {if $details.info}
+ <dd>
+ {$details.info|nl2br}
+ </dd>
+ {/if}
+ {/foreach}
+ </dl>
+
+ <div class="center">
+ <input type="submit" value="M'inscrire aux listes" /> -
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/no'); return false" style="text-decoration: none">
+ {icon name=delete} Ne pas m'inscrire
+ </a> -
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/dismiss'); return false" style="text-decoration: none">
+ {icon name=cross} Décider plus tard
+ </a>
+ </div>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
+Tu n'as plus de redirection valide ce qui rend ton adresse Polytechnique.org
+inutilisable. Rends-toi au plus vite sur <a href="emails/redirect">la page de
+gestion des emails</a> pour corriger ce problème.
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2009 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 *}
+{* *}
+{**************************************************************************}
+
+{if $profile_incitation}
+ La dernière mise à jour de ta <a href="profile/{$smarty.session.hruid}" class="popup2">fiche</a>
+ date du {$profile_last_update|date_format}. Il est possible qu'elle ne soit pas à jour.
+ Si tu souhaites la modifier,
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/profile'); return false" style="text-decoration: none">
+ clique ici !</a>
+{elseif $photo_incitation}
+ Tu n'as pas mis de photo de toi sur ta fiche, c'est dommage. Clique
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/photo'); return false" style="text-decoration: none">
+ ici</a> si tu souhaites en ajouter une.
+{elseif $geocoding_incitation > 0}
+ Parmi tes adresses, il y en a {$geocoding_incitation} que nous n'avons pas pu localiser. Clique
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/geoloc'); return false" style="text-decoration: none">
+ ici</a> pour rectifier.
+{/if}
+
+<div class="right">
+ <a href="" onclick="Ajax.update_html('reminder', '{$reminder->baseurl()}/dismiss'); return false" style="text-decoration: none">
+ {icon name=cross} Mettre à jour plus tard
+ </a>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<table class="bicol" cellpadding="3" summary="Recherche">
<tr>
<th colspan="2">
- Recherche avancée [<a href="search"><<< Recherche simple</a>]
+ Recherche avancée [<a href="search">Revenir à la Recherche simple</a>]
</th>
</tr>
<tr>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{if $smarty.session.auth ge AUTH_COOKIE}
<tr>
<th colspan="2">
- Recherche simple <span class="noprint">[<a href="search/adv">>>> Recherche avancée</a>]</span>
+ Recherche simple
</th>
</tr>
<tr>
</td>
</tr>
<tr class="noprint">
- <td style="width: 78%">
+ <td style="width: 60%">
<input type="checkbox" name="with_soundex" id="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} /> <label for="with_soundex">Activer la recherche par proximité sonore.</label>
<br /><input type='checkbox' name='order' id="order" value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} /> <label for="order">Mettre les fiches modifiées récemment en premier.</label>
<br /><input type='checkbox' name='nonins' id="nonins" {if $smarty.request.nonins}checked='checked'{/if} value='1' /> <label for="nonins">Chercher uniquement des non inscrits.</label>
</td>
{else}
<tr class="noprint">
- <td style="width: 78%">
+ <td style="width: 60%">
<input type='text' name="quick" value="{$smarty.request.quick}" style="width: 98%" /><br />
</td>
{/if}
- <td class="right" style="vertical-align: middle">
- <input type="submit" value="Chercher" />
+ <td class="right">
+ [<a href="search/adv">Recherche avancée</a>]
+ <br /><br /><input type="submit" value="Chercher" />
</td>
</tr>
</table>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h2>Raccourcis...</h2>
<p>
Un certain nombre de raccourcis permettent d'accéder plus rapidement au contenu du site :
- <ul>
- <li><code>fiche:prenom.nom.promo</code> ouvre la fiche du camarade indiquée ;</li>
- <li><code>ref:prenom.nom.promo</code> ouvre la fiche référent du camarade indiquée ;</li>
- <li><code>doc:phrase</code> recherche <em>phrase</em> dans la documentation du site ;</li>
- {if hasPerm('admin')}
- <li><code>admin:prenom.nom.promo</code> ouvre la fiche d'administration du camarade indiquée ;</li>
- <li><code>ax:prenom.nom.promo</code> ouvre la fiche ax du camarade concerné.</li>
- {/if}
- </ul>
</p>
+<ul>
+ <li><code>fiche:prenom.nom.promo</code> ouvre la fiche du camarade indiquée ;</li>
+ <li><code>ref:prenom.nom.promo</code> ouvre la fiche référent du camarade indiquée ;</li>
+ <li><code>doc:phrase</code> recherche <em>phrase</em> dans la documentation du site ;</li>
+ {if hasPerm('admin')}
+ <li><code>admin:prenom.nom.promo</code> ouvre la fiche d'administration du camarade indiquée ;</li>
+ <li><code>ax:prenom.nom.promo</code> ouvre la fiche ax du camarade concerné.</li>
+ {/if}
+</ul>
<p>
Ces raccourcis fonctionnement également depuis le lien de recherche rapide disponible sur toutes les pages
{**************************************************************************}\r
{* *}\r
-{* Copyright (C) 2003-2008 Polytechnique.org *}\r
+{* Copyright (C) 2003-2009 Polytechnique.org *}\r
{* http://opensource.polytechnique.org/ *}\r
{* *}\r
{* This program is free software; you can redistribute it and/or modify *}\r
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
<div>
- Plat/al <a href="changelog">{#globals.version#}</a> - Copyright © 1999-2008 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
+ Plat/al <a href="changelog">{#globals.version#}</a> - Copyright © 1999-2009 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
-
<a href="Reference/Convention-AX">Lien avec l'AX</a>
-
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<div class="menu_item"><a href="http://support.polytechnique.org">Support</a></div>
<table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
- <tr><th>Valid</th></tr>
+ <tr><th>Validations</th></tr>
<tr class="impair">
<td>
<a href="admin/validate">
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{$globals->core->NbIns|number_format} polytechniciens sur le web
<form action="search" method="get">
<div>
- <input type="text" size="30" name="quick" class="quick_search"
- value="{$smarty.request.quick|default:"recherche dans l'annuaire"}"
- onfocus="if (this.value == '{$smarty.request.quick|default:"recherche dans l'annuaire"|escape:javascript}') this.value=''"
- onblur="if (this.value == '') this.value='{$smarty.request.quick|default:"recherche dans l'annuaire"|escape:javascript}'"/>
+ <input type="text" size="20" name="quick" id="quick" class="quick_search"
+ value="{$smarty.request.quick|default:"Recherche dans l'annuaire"}"
+ onfocus="if (this.value === 'Recherche dans l\'annuaire') this.value='';
+ $('#quick_button').show()"
+ onblur="if (this.value === '') this.value='{$smarty.request.quick|default:"Recherche dans l'annuaire"|escape:javascript}'
+ $('#quick_button').hide()"/>
+ <button id="quick_button" type="submit" style="display: none"
+ onclick="if ($('#quick').val() === 'Recherche dans l\'annuaire') $('#quick').val('')">
+ OK
+ </button>
</div>
</form>
{if $smarty.session.auth gt AUTH_PUBLIC && $smarty.session.notifs}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
- <a href="send_bug/{ $smarty.server.REQUEST_URI }" class="popup_840x600">signaler un bug</a>
{/if}
<br />
- Plat/al {#globals.version#} - © Copyright 2000-2008 <a href="http://x-org.polytechnique.org/">Association Polytechnique.org</a>
+ Plat/al {#globals.version#} - © Copyright 2000-2009 <a href="http://x-org.polytechnique.org/">Association Polytechnique.org</a>
<div class="pem">
<a href="{$globals->baseurl}/pem/{$platal->pl_self()|replace:'/':'_'}/200">Liste1</a>
<a href="{$globals->baseurl}/pem/{$platal->pl_self()|replace:'/':'_'}/400">Liste2</a>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h1>{$asso.nom} : <a href='{$platal->ns}events'>Événements</a> </h1>
<p>
-L'événement {$evt.intitule}
-{if $evt.titre} - {$evt.titre}
-{/if}
-{if $evt.titre || count($moments) eq 1}
-comptera {$evt.nb_tot} personne{if $evt.nb_tot > 1}s{/if}.
-{else}
-({$evt.nb} personne{if $evt.nb > 1}s ont réalisé leur{else} a réalisé son{/if} inscription).
-{/if}
+ {if $evt.titre || count($moments) eq 1}
+ {$evt.nb_tot} personne{if $evt.nb_tot > 1}s ont réalisé leur {else} a réalisé son {/if}
+ {else}
+ {$evt.nb} personne{if $evt.nb > 1}s ont réalisé leur{else} a réalisé son {/if}
+ {/if}
+ inscription à l'événement {$evt.intitule} {if $evt.titre}- {$evt.titre} {/if}
+ qui aura lieu {$evt.date}.
</p>
{if $evt.participant_list && $is_admin}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software, you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
--
{$smarty.session.prenom} {$smarty.session.nom}{/if}</textarea><br />
- Page internet de l'événement : <input size="40" name="site" value="{$paiement_site|default:$asso.site|default:$globals->baseurl|cat:'/'|cat:$platal->ns}" /><br />
+ {assign var='asso_url' value=$globals->baseurl|cat:'/'|cat:$platal->ns}
+ Page internet de l'événement : <input size="40" name="site" value="{$paiement_site|default:$asso.site|default:$asso_url}" /><br />
Le nouveau paiement sera activé automatiquement après validation par le trésorier de Polytechnique.org,
ce qui sera fait sous peu.
<script type="text/javascript">//<![CDATA[
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<tr>
<td class="titre">Date :</td>
- <td>
- {if $e.fin and $e.fin neq $e.debut}
- {if $e.debut_day eq $e.fin_day}
- le {$e.debut|date_format:"%d %B %Y"} de {$e.debut|date_format:"%H:%M"} à {$e.fin|date_format:"%H:%M"}
- {else}
- du {$e.debut|date_format:"%d %B %Y à %H:%M"}<br />
- au {$e.fin|date_format:"%d %B %Y à %H:%M"}
- {/if}
- {else}
- le {$e.debut|date_format:"%d %B %Y à %H:%M"}
- {/if}
- </td>
+ <td>{$e.date}</td>
</tr>
<tr>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
Cet événement a lieu
<strong>
{if $event.fin and $event.fin neq $event.debut}
- {if $event.debut_day eq $event.fin_day}
+ {if $event.first_day eq $event.last_day}
le {$event.debut|date_format:"%d %B %Y"} de {$event.debut|date_format:"%H:%M"} à {$event.fin|date_format:"%H:%M"}
{else}
du {$event.debut|date_format:"%d %B %Y à %H:%M"}<br />
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* *}
{**************************************************************************}
-<h1>{$asso.nom} : Administration des announces</h1>
+<h1>{$asso.nom} : Administration des annonces</h1>
<table class="bicol">
<tr>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software, you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
Ajouter un membre
</a>
</li>
+ {if $asso.has_ml}
<li>
<a href="{$platal->ns}admin/annuaire">
{icon name=wand title="Synchroniser"}
</a>
</li>
{/if}
+ {/if}
<li>
<a href="{$platal->ns}annuaire/csv/{$asso.diminutif}.csv">
{icon name=page_excel title="Fichier Excel"}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{elseif $smarty.post.inscrire}
<p class="descr">
-<strong>Ta demande d'inscription a bien été envoyée !</strong> Tu seras averti par email de la suite qui lui sera donnée.
+<strong>Ta demande d'inscription a bien été envoyée !</strong> Tu seras averti{if $user->isFemale()}e{/if} par email de la suite qui lui sera donnée.
<p>
<p class="descr">[<a href="{$platal->ns}">Retour à la page d'accueil de {$asso.nom}</a>]</p>
</textarea>
<div class="center">
<input type="submit" name="inscrire" value="M'inscrire !" />
-
- <input type="reset" value="Annuler" />
</div>
</form>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
(insérer le texte...)
Le bureau du groupe {$asso.nom}.
-{/if}
- </textarea>
+{/if}</textarea>
</td>
</tr>
<tr>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
</table>
</form>
+{literal}
+<script type="text/javascript">
+ $("#email").focus();
+</script>
+{/literal}
+
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<h2>
Édition du profil de {if "`$user.prenom` `$user.nom`"|trim}{$user.prenom} {$user.nom}{else}{$user.email}{/if}
{if $user.origine eq 'X'}
- (X{$user.promo})
+ (X{$user.promo})
<a href="https://www.polytechnique.org/profile/{$user.alias}">{icon name=user_suit title="fiche"}</a>
{/if}
<a href="{$platal->ns}member/del/{$user.email}">{icon name=delete title="Suppression du compte"}</a>
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2008 Polytechnique.org *}
+{* Copyright (C) 2003-2009 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
--- /dev/null
+DROP TABLE IF EXISTS reminder_type;
+
+CREATE TABLE IF NOT EXISTS reminder_type (
+ type_id INT NOT NULL AUTO_INCREMENT,
+ name VARCHAR(255) NOT NULL,
+ weight INT NOT NULL,
+ remind_delay_yes INT NOT NULL DEFAULT 0,
+ remind_delay_no INT NOT NULL DEFAULT 0,
+ remind_delay_dismiss INT NOT NULL DEFAULT 0,
+ PRIMARY KEY(type_id),
+ UNIQUE KEY(name)
+) CHARSET=utf8;
+
+INSERT INTO reminder_type (name, weight, remind_delay_yes, remind_delay_no, remind_delay_dismiss)
+ VALUES ('email_warning', 100, 0, 0, 7),
+ ('no_redirection', 100, 0, 0, 1),
+ ('profile_update', 90, 0, 0, 2),
+ ('nl', 80, 0, 365, 7),
+ ('promotion_ml', 70, 0, 365, 7),
+ ('ml', 70, 0, 0, 7),
+ ('email_backup', 60, 0, 365, 7),
+ ('gapps', 50, 0, 365, 7),
+ ('ax_letter', 50, 0, 365, 14);
+
+DROP TABLE IF EXISTS reminder;
+
+CREATE TABLE IF NOT EXISTS reminder (
+ uid INT NOT NULL,
+ type_id INT NOT NULL,
+ status ENUM('yes', 'no', 'dismiss') NOT NULL,
+ remind_last TIMESTAMP NOT NULL,
+ remind_next TIMESTAMP NULL,
+ PRIMARY KEY(uid, type_id)
+) CHARSET=utf8;
+
+-- vim:set syntax=mysql:
--- /dev/null
+ALTER TABLE groupex.asso CHANGE COLUMN flags flags SET('wiki_desc', 'notif_unsub', 'has_ml') NOT NULL;
+
+-- vim:set syntax=mysql:
<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *