Merge branch 'platal-0.9.15'
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 21 Mar 2008 22:26:26 +0000 (23:26 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 21 Mar 2008 22:26:26 +0000 (23:26 +0100)
510 files changed:
ChangeLog
Makefile
bin/banana.feedgen.php
bin/banana.spoolgen.php
bin/connect.db.inc.php
bin/cron/axletter.send.php
bin/cron/banana.feedgen.php
bin/cron/checkdb.php
bin/cron/clean.php
bin/cron/cron_ml_moderate.php
bin/cron/cron_validations.php
bin/cron/emails.check.php
bin/cron/google_apps.php [new file with mode: 0755]
bin/cron/homonymes.php
bin/cron/notifs.birthday.php
bin/cron/notifs.send.php
bin/csv2sql.php
bin/devel/xhtml.classes.pl
bin/devel/xhtml.validate.pl
bin/emails.broken.php
bin/getuser.sh [new file with mode: 0755]
bin/lists.rpc.py
bin/newsletter.send.php
bin/search.rebuild_db.php
classes/corelogger.php
classes/csvimporter.php
classes/env.php
classes/miniwiki.php
classes/mmlist.php
classes/platal.php
classes/platalpage.php
classes/plbacktrace.php
classes/pliterator.php
classes/plmailer.php
classes/plmodule.php
classes/plprofiler.php [new file with mode: 0644]
classes/plset.php
classes/pltableeditor.php
classes/plupload.php
classes/plwizard.php
classes/s.php
classes/session.php
classes/varstream.php
classes/xdb.php
classes/xmlrpcclient.php
classes/xnet.php
configs/mails.conf
configs/platal.cron.in
configs/platal.ini
htdocs/css/ax.css
htdocs/css/bandeau.css
htdocs/css/base.css
htdocs/css/default.css
htdocs/css/espace.css
htdocs/css/humlinux.css
htdocs/css/igoogle.css [new file with mode: 0644]
htdocs/css/keynote.css
htdocs/css/linux.css
htdocs/css/liteskin.css
htdocs/css/nbviolet.css
htdocs/css/newxorg.css
htdocs/css/nl.css
htdocs/css/oldtimes.css
htdocs/css/openweb.css
htdocs/css/sharky.css
htdocs/css/spectral.css
htdocs/css/trapped.css
htdocs/css/xnet.css
htdocs/images/goodies/README [new file with mode: 0644]
htdocs/images/goodies/add-google-calendar.gif [new file with mode: 0644]
htdocs/images/goodies/add-google.gif [new file with mode: 0644]
htdocs/images/goodies/add-netvibes.gif [new file with mode: 0644]
htdocs/images/goodies/add-yahoo.gif [new file with mode: 0644]
htdocs/images/icons/world_go.gif [new file with mode: 0644]
htdocs/images/logo-xnet.png [new file with mode: 0644]
htdocs/images/skins/wiz_xnet_background.png [new file with mode: 0644]
htdocs/javascript/ajax.js
htdocs/javascript/close_on_esc.js
htdocs/javascript/do_challenge_response.js
htdocs/javascript/do_challenge_response_logged.js
htdocs/javascript/igoogle.js [new file with mode: 0644]
htdocs/javascript/motdepasse.js
htdocs/javascript/profile.js
htdocs/javascript/secure_hash.js
htdocs/javascript/wiki.js
htdocs/javascript/xorg.js
htdocs/listes_redirect.php
htdocs/webredirect.php
htdocs/xnet.php
htdocs/xorg.php
include/applis.func.inc.php
include/banana/.gitignore
include/banana/forum.inc.php
include/banana/hooks.inc.php
include/banana/ml.inc.php
include/banana/moderate.inc.php
include/emails.inc.php
include/geoloc.inc.php
include/globals.inc.php.in
include/googleapps.inc.php [new file with mode: 0644]
include/homonymes.inc.php
include/ical.inc.php
include/marketing.inc.php
include/massmailer.inc.php
include/newsletter.inc.php
include/notifs.inc.php
include/platal.inc.php
include/profil.func.inc.php
include/rss.inc.php
include/secure_hash.inc.php
include/synchro_ax.inc.php
include/user.func.inc.php
include/userset.inc.php
include/validations.inc.php
include/validations/aliases.inc.php
include/validations/broken.inc.php
include/validations/evts.inc.php
include/validations/googleapps.inc.php [new file with mode: 0644]
include/validations/homonymes.inc.php
include/validations/listes.inc.php
include/validations/marketing.inc.php
include/validations/medals.inc.php
include/validations/nl.inc.php
include/validations/nomusage.inc.php
include/validations/orange.inc.php
include/validations/paiements.inc.php
include/validations/photos.inc.php
include/validations/surveys.inc.php
include/vcard.inc.php
include/webservices/manageurs.inc.php
include/wiki.inc.php
include/wiki/engine.php
include/xnet.inc.php
include/xnet/page.inc.php
include/xnet/session.inc.php
include/xorg.inc.php
include/xorg.misc.inc.php
include/xorg/session.inc.php
modules/admin.php
modules/auth.php
modules/auth/auth.inc.php
modules/axletter.php
modules/axletter/axletter.inc.php
modules/bandeau.php
modules/carnet.php
modules/carnet/contacts.pdf.inc.php
modules/core.php
modules/email.php
modules/events.php
modules/forums.php [moved from modules/banana.php with 84% similarity]
modules/gadgets.php [new file with mode: 0644]
modules/gadgets/gadgets.inc.php [new file with mode: 0644]
modules/geoloc.php
modules/googleapps.php [new file with mode: 0644]
modules/lists.php
modules/lists/lists.inc.php
modules/marketing.php
modules/newsletter.php
modules/payment.php
modules/payment/money.inc.php
modules/payment/money/cyberpaiement.inc.php
modules/payment/money/paypal.inc.php
modules/platal.php
modules/platal/review.inc.php
modules/profile.php
modules/profile/addresses.inc.php
modules/profile/decos.inc.php
modules/profile/general.inc.php
modules/profile/groups.inc.php
modules/profile/jobs.inc.php
modules/profile/mentor.inc.php
modules/profile/page.inc.php
modules/profile/skills.inc.php
modules/register.php
modules/register/register.inc.php
modules/search.php
modules/search/classes.inc.php
modules/search/search.inc.php
modules/stats.php
modules/survey.php
modules/survey/survey.inc.php
modules/xnet.php
modules/xnetevents.php
modules/xnetevents/xnetevents.inc.php
modules/xnetgrp.php
modules/xnetgrp/mail.inc.php
modules/xnetlists.php
plugins/block.tidy.php
plugins/compiler.icon.php
plugins/compiler.iterate.php
plugins/compiler.javascript.php
plugins/function.display_address.php
plugins/function.geoloc_country.php
plugins/function.geoloc_region.php
plugins/function.select_db_table.php
plugins/function.select_nat.php
plugins/function.test_email.php
plugins/function.valid_date.php
plugins/insert.getName.php
plugins/insert.getUserName.php
plugins/modifier.date_format.php
plugins/modifier.htmlentities.php
plugins/modifier.miniwiki.php
plugins/modifier.number_format.php [moved from plugins/insert.getNbNotifs.php with 87% similarity]
plugins/modifier.uint_to_ip.php [moved from plugins/insert.mkStats.php with 75% similarity]
templates/admin/ax-xorg.tpl
templates/admin/dead_but_active.tpl [new file with mode: 0644]
templates/admin/deces_promo.tpl
templates/admin/emails_bounces_re.tpl
templates/admin/forums-promo.mail.tpl [moved from templates/mails/forums.promo.tpl with 96% similarity]
templates/admin/homonymes.tpl
templates/admin/icons.tpl
templates/admin/index.tpl
templates/admin/ipwatcher.tpl
templates/admin/logger-view.tpl
templates/admin/postfix_delayed.tpl
templates/admin/promo.tpl
templates/admin/synchro_ax.tpl
templates/admin/useredit.mail.tpl [moved from templates/admin/mail_intervention.tpl with 94% similarity]
templates/admin/utilisateurs.tpl
templates/admin/valider.tpl
templates/admin/wiki.tpl
templates/axletter/edit.tpl
templates/axletter/letter.mail.tpl [moved from templates/axletter/letter.tpl with 100% similarity]
templates/axletter/show.tpl
templates/banana/index.tpl
templates/banana/profile.tpl [deleted file]
templates/carnet/calendar.tpl
templates/carnet/index.tpl
templates/carnet/mescontacts.tpl
templates/carnet/notif.mail.tpl [new file with mode: 0644]
templates/carnet/notifs.tpl
templates/carnet/panel.tpl
templates/carnet/rss.tpl
templates/carnet/tricontacts.tpl
templates/core/403.tpl
templates/core/404.tpl
templates/core/bug.tpl
templates/core/password_prompt.tpl
templates/core/password_prompt_logged.tpl
templates/core/plset.tpl
templates/core/plwizard.tpl
templates/core/table-editor.tpl
templates/core/vcard.tpl
templates/core/wiki.help.tpl
templates/core/wiki.tpl
templates/emails/alias.tpl
templates/emails/antispam.tpl
templates/emails/broken.mail.tpl
templates/emails/broken.tpl
templates/emails/duplicated.tpl
templates/emails/index.tpl
templates/emails/lost.tpl
templates/emails/redirect.tpl
templates/emails/send.tpl
templates/emails/submit_spam.tpl
templates/emails/test.mail.tpl [moved from templates/emails/mail.test.tpl with 96% similarity]
templates/events/admin.tpl
templates/events/admin_tips.tpl
templates/events/form.tpl
templates/events/index.tpl
templates/events/preview.tpl
templates/events/rss.tpl
templates/events/submit.tpl
templates/gadgets/ig-events.tpl [new file with mode: 0644]
templates/gadgets/ig-events.xml.tpl [new file with mode: 0644]
templates/gadgets/ig-login.tpl [new file with mode: 0644]
templates/gadgets/ig-minifiche.tpl [new file with mode: 0644]
templates/gadgets/ig-search.tpl [new file with mode: 0644]
templates/gadgets/ig-search.xml.tpl [new file with mode: 0644]
templates/gadgets/ig-skin.tpl [new file with mode: 0644]
templates/geoloc/address.tpl
templates/geoloc/admin.tpl
templates/geoloc/admin_dynamap.tpl
templates/geoloc/city.tpl
templates/geoloc/country.tpl
templates/geoloc/form.address.tpl
templates/geoloc/geoloc.mail.tpl [moved from templates/geoloc/mail_geoloc.tpl with 97% similarity]
templates/geoloc/init.tpl
templates/googleapps/admin.job.tpl [new file with mode: 0644]
templates/googleapps/admin.tpl [new file with mode: 0644]
templates/googleapps/admin.user.tpl [new file with mode: 0644]
templates/googleapps/create.mail.tpl [new file with mode: 0644]
templates/googleapps/index.tpl [new file with mode: 0644]
templates/googleapps/unsuspend.mail.tpl [new file with mode: 0644]
templates/include/csv-importer.tpl
templates/include/emploi.tpl
templates/include/field.promo.tpl
templates/include/field.select.tpl
templates/include/flags.radio.tpl
templates/include/form.valid.aliases.tpl
templates/include/form.valid.broken.tpl
templates/include/form.valid.edit-evts.tpl
templates/include/form.valid.edit-listes.tpl
templates/include/form.valid.edit-nl.tpl
templates/include/form.valid.edit-paiements.tpl
templates/include/form.valid.edit-photo.tpl
templates/include/form.valid.evts.tpl
templates/include/form.valid.gapps-unsuspend.tpl [moved from templates/mails/listes.promo.tpl with 83% similarity]
templates/include/form.valid.homonymes.tpl
templates/include/form.valid.listes.tpl
templates/include/form.valid.mark.tpl
templates/include/form.valid.medals.tpl
templates/include/form.valid.nl.tpl
templates/include/form.valid.nomusage.tpl
templates/include/form.valid.orange.tpl
templates/include/form.valid.paiements.tpl
templates/include/form.valid.photos.tpl
templates/include/form.valid.surveys.tpl
templates/include/massmailer-nav.tpl
templates/include/minifiche.tpl
templates/include/plview.geoloc.tpl
templates/include/plview.minifiche.tpl
templates/include/plview.multipage.tpl
templates/include/plview.referent.tpl
templates/include/plview.trombi.tpl
templates/include/tips.tpl
templates/include/trombi.tpl
templates/lists/admin.tpl
templates/lists/admin_all.tpl
templates/lists/annu.tpl
templates/lists/archives.tpl
templates/lists/check.tpl
templates/lists/create.tpl
templates/lists/delete.tpl
templates/lists/header_listes.tpl
templates/lists/index.tpl
templates/lists/liste.inc.tpl
templates/lists/listes.inc.tpl
templates/lists/members.tpl
templates/lists/moderate.tpl
templates/lists/moderate_mail.tpl
templates/lists/moderate_sub.tpl
templates/lists/options.tpl
templates/lists/soptions.tpl
templates/marketing/broken.tpl
templates/marketing/index.tpl
templates/marketing/marketing.mail.tpl [moved from templates/marketing/mail.marketing.tpl with 90% similarity]
templates/marketing/private.tpl
templates/marketing/promo.tpl
templates/marketing/public.tpl
templates/marketing/relance.mail.tpl [moved from templates/marketing/mail.relance.tpl with 97% similarity]
templates/marketing/relance.tpl
templates/marketing/this_week.tpl
templates/marketing/volontaire.tpl
templates/newsletter/admin.tpl
templates/newsletter/edit.tpl
templates/newsletter/index.tpl
templates/newsletter/nl.mail.tpl [moved from templates/newsletter/nl.tpl with 98% similarity]
templates/newsletter/show.tpl
templates/newsletter/submit.tpl
templates/payment/index.tpl
templates/payment/retour_paypal.tpl
templates/payment/xnet.tpl
templates/platal/acces_smtp.tpl
templates/platal/changeLog.tpl
templates/platal/exit.tpl
templates/platal/filrss.tpl
templates/platal/index.tpl
templates/platal/motdepasse.success.tpl
templates/platal/motdepasse.tpl
templates/platal/preferences.tpl
templates/platal/recovery.tpl
templates/platal/review.tpl
templates/platal/skins.tpl
templates/platal/tmpPWD.success.tpl
templates/platal/webredirect.tpl
templates/profile/admin_decos.tpl
templates/profile/admin_trombino.tpl
templates/profile/adresses.address.tpl
templates/profile/adresses.tel.tpl
templates/profile/adresses.tpl
templates/profile/applis.js.tpl
templates/profile/base.tpl
templates/profile/deco.medal.tpl
templates/profile/deco.tpl
templates/profile/edit.tpl [deleted file]
templates/profile/fiche_referent.tpl
templates/profile/general.tpl
templates/profile/grades.js.tpl
templates/profile/groupesx.tpl
templates/profile/groups.tpl
templates/profile/jobs.job.tpl
templates/profile/jobs.secteur.tpl
templates/profile/jobs.tpl
templates/profile/mentor.tpl
templates/profile/nomusage.tpl
templates/profile/orange.tpl
templates/profile/profile.tpl
templates/profile/referent.tpl
templates/profile/skill.skill.tpl
templates/profile/skill.tpl
templates/profile/trombino.tpl
templates/register/breadcrumb.tpl
templates/register/end.tpl
templates/register/inscription.reussie.tpl
templates/register/inscrire.mail.tpl
templates/register/step0.tpl
templates/register/step1.tpl
templates/register/step2.tpl
templates/register/step3.tpl
templates/register/step4.tpl
templates/register/success.tpl
templates/search/adv.form.tpl
templates/search/adv.grade.form.tpl
templates/search/adv.links.tpl
templates/search/index.tpl
templates/search/quick.form.tpl
templates/search/quick.tpl
templates/skin/common.backtrace.tpl
templates/skin/common.bandeau.head.tpl
templates/skin/common.bandeau.tpl
templates/skin/common.content.tpl
templates/skin/common.devel.tpl
templates/skin/common.doctype.tpl
templates/skin/common.footer.tpl
templates/skin/common.header.tpl
templates/skin/common.menu.tpl
templates/skin/common.title.header.tpl
templates/skin/default.tpl
templates/skin/espace.tpl
templates/skin/humlinux.tpl
templates/skin/keynote.tpl
templates/skin/linux.tpl
templates/skin/liteskin.tpl
templates/skin/nbviolet.tpl
templates/skin/newxorg.tpl
templates/skin/oldtimes.tpl
templates/skin/openweb.tpl
templates/skin/register.tpl
templates/skin/sharky.tpl
templates/skin/spectral.tpl
templates/skin/trapped.tpl
templates/stats/coupure.tpl
templates/stats/evolution_inscrits.tpl
templates/stats/index.tpl
templates/stats/nb_by_promo.tpl
templates/survey/admin.tpl
templates/survey/confirm.tpl
templates/survey/edit_checkbox.tpl
templates/survey/edit_checkboxtable.tpl
templates/survey/edit_new.tpl
templates/survey/edit_newsurvey.tpl
templates/survey/edit_num.tpl
templates/survey/edit_question.tpl
templates/survey/edit_radio.tpl
templates/survey/edit_radiotable.tpl
templates/survey/edit_root.tpl
templates/survey/edit_survey.tpl
templates/survey/edit_text.tpl
templates/survey/edit_textarea.tpl
templates/survey/error.tpl
templates/survey/index.tpl
templates/survey/show_checkbox.tpl
templates/survey/show_checkboxtable.tpl
templates/survey/show_num.tpl
templates/survey/show_question.tpl
templates/survey/show_radio.tpl
templates/survey/show_radiotable.tpl
templates/survey/show_root.tpl
templates/survey/show_text.tpl
templates/survey/show_textarea.tpl
templates/survey/success.tpl
templates/xnet/admin.tpl
templates/xnet/deconnexion.tpl
templates/xnet/groupes.tpl
templates/xnet/include/descr.tpl
templates/xnet/index.tpl
templates/xnet/plan.tpl
templates/xnet/skin.tpl
templates/xnetevents/admin.tpl
templates/xnetevents/calendar.tpl
templates/xnetevents/csv.tpl
templates/xnetevents/edit.tpl
templates/xnetevents/index.tpl
templates/xnetevents/newpayment.mail.tpl [moved from templates/xnetevents/mail.new_payment.tpl with 97% similarity]
templates/xnetevents/subscribe.tpl
templates/xnetgrp/announce-admin.tpl
templates/xnetgrp/announce-edit.tpl
templates/xnetgrp/announce-rss.tpl
templates/xnetgrp/annuaire-admin.tpl
templates/xnetgrp/annuaire.tpl
templates/xnetgrp/asso.tpl
templates/xnetgrp/edit.tpl
templates/xnetgrp/form.announce.tpl
templates/xnetgrp/forum.tpl
templates/xnetgrp/inscrire.tpl
templates/xnetgrp/mail.tpl
templates/xnetgrp/membres-add.tpl
templates/xnetgrp/membres-del.tpl
templates/xnetgrp/membres-edit.tpl
templates/xnetgrp/membres-new-search.tpl
templates/xnetlists/alias-admin.tpl
templates/xnetlists/alias-create.tpl
templates/xnetlists/create.tpl
templates/xnetlists/index.tpl
templates/xnetlists/sync.tpl
upgrade/0.9.16/00_profile.sql [new file with mode: 0644]
upgrade/0.9.16/01_utf8.sql [new file with mode: 0644]
upgrade/0.9.16/02_axletter.sql [new file with mode: 0644]
upgrade/0.9.16/03_mail_storage.sql [new file with mode: 0644]
upgrade/0.9.16/04_ip.sql [new file with mode: 0644]
upgrade/0.9.16/05_xnet_announce_photo.sql [new file with mode: 0644]
upgrade/0.9.16/06_google_apps.sql [new file with mode: 0644]
upgrade/0.9.16/07_google_apps.sql [new file with mode: 0644]
upgrade/0.9.16/08_forums.sql [new file with mode: 0644]
upgrade/0.9.16/connect.db.inc.php [moved from plugins/insert.getNbIns.php with 73% similarity]
upgrade/0.9.16/update.sh [new file with mode: 0755]
upgrade/0.9.16/upgrade_lists.py [new file with mode: 0755]
upgrade/0.9.16/xnetevents.list.php [new file with mode: 0755]

index f49fb81..d9c720e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,62 @@
 ================================================================================
+VERSION 0.9.16                                                        XX XX 2008
+
+New:
+
+    * Carnet:
+        - List updated fields in notifications                             -FRU
+
+    * Core:
+        - New PlProfiler tool                                              -FRU
+        - Integration of goodies/external tools with local rss/iCal        -VZA
+        - iGoogle gadgets for latest events and directory search           -VZA
+        - Integration of Google Apps accounts                              -VZA
+
+    * Emails:
+        - Imap mail storage can be activated/deactivated from interface    -VZA
+
+    * Lists:
+        - Unsure mails are moderated                                       -FRU
+
+    * Forums:
+        - Ban system                                                       -THD
+
+Bug/Wish:
+
+    * Emails:
+        - #726: Don't send the email if an attachment can't be downloaded  -FRU
+        - #750: Fix email list in test email                               -FRU
+        - #802: Fix upload content type checking on some buggy PHP         -FRU
+
+    * Lists:
+        - #793: Show broken members on ML                                  -FRU
+
+    * Profile:
+        - #729: Fix positioning of addresses on public profile             -FRU
+        - #742: Sub domain was hidden when editing profile                 -FRU
+        - #752: Don't show vcard link on profile when the person is dead   -FRU
+        - #764: Fix mentoring edition page                                 -FRU
+        - #790: Ensure we always have a current address                    -FRU
+
+    * Search:
+        - #741: Mentor search in advanced search                           -FRU
+
+    * XnetEvent:
+        - #728: Update CSV                                                 -FRU
+        - #743: Don't show a warning when subscriber has no forlife        -FRU
+        - #730: XnetEvents are not synchronized with aliases               -VZA
+
+    * XnetGrp:
+        - #732: Adapt subscription text to sex                             -FRU
+        - #735: Encoding of list description in member edition form        -FRU
+        - #740: Can add a picture in the announces                         -FRU
+
+From 0.9.15 branch:
+
+    * XnetEvents:
+        - #738: Duplicated payments in certain conditions                  -FRU
+
+================================================================================
 VERSION 0.9.15                                                        08 10 2007
 
 New:
@@ -1112,8 +1170,10 @@ ACRONYMS:
     * OG : Olivier Guillaumin               <olivier.guillaumin@m4x.org>
     * PIK: Fabien Laborde       (pika)      <fabien.laborde@m4x.org>
     * SHK: Jeremy Lainé         (Sharky)    <jeremy.laine@m4x.org>
+    * THD: Thomas Deniau        (Totom)     <thomas.deniau@m4x.org>
     * VP : Vincent Palatin                  <vincent.palatin@m4x.org>
     * XdX: Alexandre Hô         (XandreX)   <alexandre.ho@m4x.org>
+    * VZA: Vincent Zanotti      (vinZ2)     <vincent.zanotti@m4x.org>
 
 ================================================================================
 vim:et:ts=4:sw=4:tw=80:enc=utf-8:
index a32cc3e..bbc1afb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@
 
 VERSNUM := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/ .*//")
 VERSTAG := $(shell grep VERSION ChangeLog | head -1 | grep 'XX' > /dev/null 2> /dev/null && echo 'beta')
+BANANA  := $(shell ( [ -d ../banana ] && echo `pwd`"/../banana" ) || echo "/home/web/dev/banana")
+
 VERSION = $(VERSNUM)$(VERSTAG)
 
 PKG_NAME = platal
@@ -35,12 +37,16 @@ q:
 ## core
 ##
 
-core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess
+core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess spool/conf
 
-spool/templates_c spool/mails_c spool/uploads:
+spool/templates_c spool/mails_c spool/uploads spool/conf spool/uploads/temp:
        mkdir -p $@
        chmod o+w $@
 
+spool/uploads/temp/.htaccess: spool/uploads/temp Makefile
+       echo "Order deny,allow" > $@
+       echo "Deny from all" >> $@
+
 htdocs/.htaccess: htdocs/.htaccess.in Makefile
        @REWRITE_BASE="/~$$(id -un)"; \
        test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE="/"; \
@@ -62,7 +68,7 @@ wiki: get-wiki build-wiki
 
 build-wiki: $(WIKI_NEEDS) | get-wiki
 
-htdocs/uploads: spool/uploads
+htdocs/uploads: spool/uploads/temp/.htaccess
        cd htdocs && ln -sf ../spool/uploads
 
 htdocs/wiki:
@@ -97,12 +103,17 @@ get-wiki:
 ## banana
 ##
 
-banana: htdocs/images/banana htdocs/css/banana.css
+banana: htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php
 htdocs/images/banana:
-       cd $(@D) && ln -sf /usr/share/banana/img $(@F)
+       cd $(@D) && ln -snf $(BANANA)/img $(@F)
 
 htdocs/css/banana.css:
-       cd $(@D) && ln -sf /usr/share/banana/css/style.css $(@F)
+       cd $(@D) && ln -snf $(BANANA)/css/style.css $(@F)
+
+include/banana/banana.inc.php:
+       cd $(@D) && find $(BANANA)/banana/ -name '*.php' -exec ln -snf {} . ";"
+
+
 
 ##
 ## jquery
@@ -114,5 +125,5 @@ htdocs/javascript/jquery.js:
 
 ################################################################################
 
-.PHONY: build dist clean wiki build-wiki banana
+.PHONY: build dist clean wiki build-wiki banana htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php
 
index b573adf..6e25f22 100755 (executable)
@@ -10,6 +10,7 @@
 
 require_once 'connect.db.inc.php';
 require_once dirname(__FILE__).'/../include/banana/ml.inc.php';
+ini_set('memory_limit', '128M');
 
 Banana::$mbox_helper = $globals->banana->mbox_helper;
 Banana::$spool_root = $globals->banana->spool_root;
index 598d9fd..4fbc479 100755 (executable)
@@ -10,6 +10,7 @@
 
 require_once 'connect.db.inc.php';
 require_once dirname(__FILE__).'/../include/banana/ml.inc.php';
+ini_set('memory_limit', '128M');
 
 Banana::$mbox_helper = $globals->banana->mbox_helper;
 Banana::$spool_root = $globals->banana->spool_root;
index 1cade25..f13dfa1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -26,6 +26,5 @@ require_once('xorg.misc.inc.php');
 
 require_once 'xdb.php';
 
-$globals->baseurl = "https://www.polytechnique.org";
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index e85167b..47366a5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 59e14e7..e85766a 100755 (executable)
@@ -10,6 +10,7 @@
 
 require_once 'connect.db.inc.php';
 require_once dirname(__FILE__).'/../../include/banana/ml.inc.php';
+ini_set('memory_limit', '128M');
 
 Banana::$mbox_helper = $globals->banana->mbox_helper;
 Banana::$spool_root = $globals->banana->spool_root;
index 7abab81..e180f80 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ee844fd..9cbc702 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index d4b581f..7642fdc 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 4cab467..6efa5ba 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -29,8 +29,27 @@ $R_PERIOD = "INTERVAL 6 HOUR"; // période de réponse moyenne de 6h
 require('./connect.db.inc.php');
 require('plmailer.php');
 
-$res = XDB::query("SELECT count(stamp), sum(stamp < NOW() - $M_PERIOD), sum(stamp < NOW() - $R_PERIOD) FROM x4dat.requests");
-list($nb,$nbold,$nbveryold) = $res->fetchOneRow();
+$res = XDB::query("SELECT  count(r.stamp), UNIX_TIMESTAMP(MIN(r.stamp)),
+                           sum(r.stamp < NOW() - $M_PERIOD), sum(r.stamp < NOW() - $R_PERIOD)
+                     FROM  x4dat.requests AS r");
+list($nb, $age, $nbold, $nbveryold) = $res->fetchOneRow();
+
+$age = (time() - intval($age)) / 86400;
+$head = "";
+if ($age > 15) {
+    $head = "[autodestruction du serveur] ";
+} elseif ($age > 7) {
+    $head = "[armageddon imminent] ";
+} elseif ($age > 5) {
+    $head = "[guerre nucléaire] ";
+} elseif ($age > 3) {
+    $head = "[ET Téléphone maison] ";
+} elseif ($age > 1) {
+    $head = "[réveil !] ";
+} elseif (!empty($nbveryold)) {
+    $head = "[urgent] ";
+}
+
 
 if (empty($nb)) {
     exit;
@@ -41,7 +60,7 @@ $plural = $nb == 1 ? "" : "s";
 $mymail = new PlMailer();
 $mymail->setFrom('validation@' . $globals->mail->domain);
 $mymail->addTo("validation@" . $globals->mail->domain);
-$mymail->setSubject((empty($nbveryold)?"":"[urgent] ")."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"
index b6aaf86..c9690c9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/bin/cron/google_apps.php b/bin/cron/google_apps.php
new file mode 100755 (executable)
index 0000000..698968e
--- /dev/null
@@ -0,0 +1,79 @@
+#!/usr/bin/php5 -q
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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                *
+ ***************************************************************************/
+
+// Updates the gapps_accounts table with Plat/al information.
+// Cleans-up the job queue, and execute post-queue hooks.
+
+require_once('../connect.db.inc.php');
+require_once('../../classes/plmailer.php');
+require_once('../../include/googleapps.inc.php');
+if (!$globals->mailstorage->googleapps_domain) {
+  exit;
+}
+
+/* Updates the l_userid parameter for newer user accounts. */
+$res = XDB::iterator(
+    "SELECT  g.g_account_name, a.id
+       FROM  gapps_accounts AS g
+  LEFT JOIN  aliases as a ON (a.alias = g.g_account_name AND a.type = 'a_vie')
+      WHERE  (g.l_userid IS NULL OR g.l_userid <= 0) AND a.id IS NOT NULL");
+while ($account = $res->next()) {
+    XDB::execute(
+        "UPDATE  gapps_accounts
+            SET  l_userid = {?}
+          WHERE  g_account_name = {?}",
+        $account['id'], $account['g_account_name']);
+}
+
+/* Emits a warning for GApps accounts without local user_id. */
+$res = XDB::iterator(
+    "SELECT  g.g_account_name
+       FROM  gapps_accounts AS g
+  LEFT JOIN  aliases as a ON (a.alias = g.g_account_name AND a.type = 'a_vie')
+      WHERE  (g.l_userid IS NULL OR g.l_userid <= 0) AND a.id IS NULL");
+while ($account = $res->next()) {
+    if (!preg_match("/^admin-/", $account['g_account_name'])) {
+        printf("Warning: GApps account '%s' has no local user_id.\n", $account['g_account_name']);
+    }
+}
+
+/* Retrieves successful job queues for post-queue processing. */
+$res = XDB::iterator(
+    "SELECT  q_id, q_recipient_id, j_type, j_parameters
+       FROM  gapps_queue
+      WHERE  p_status = 'success' AND q_recipient_id IS NOT NULL");
+while ($job = $res->next()) {
+    if ($job['j_type'] == 'u_create') {
+        post_queue_u_create($job);
+    } else if ($job['j_type'] == 'u_update') {
+        post_queue_u_update($job);
+    }
+}
+
+/* Removes successful jobs, and old failed jobs. */
+XDB::execute(
+    "DELETE  FROM gapps_queue
+      WHERE  p_status = 'success' OR
+             (p_status = 'hardfail' AND p_end_date < DATE_SUB(NOW(), INTERVAL 15 DAY))");
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
index 1530531..9cfc622 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7c54028..ca27d84 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index b48682f..ac67dc7 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -26,71 +26,18 @@ require_once("../../include/notifs.inc.php");
 
 $all = new AllNotifs();
 
-foreach($all->_data as $u) {
-    $week   = date("W - Y");
-
-    $text =  "  ".($u['sexe'] ? 'Chère' : 'Cher')." {$u['prenom']},\n\n"
-          .  "  Voici les événements survenus dans la semaine écoulée,\n"
-          .  "et depuis ta dernière visite sur le site.\n\n"
-          .  "Tu trouveras les mêmes informations sur la page :\n"
-          .  "    https://www.polytechnique.org/carnet/panel\n\n"
-          .  "------------------------------------------------------------------------\n\n";
-
-    $html  = <<<EOF
-<html>
-  <head>
-    <title>Notifications de la semaine $week</title>
-  </head>
-  <body>
-    <p>Voici les événements survenus dans la semaine écoulée, et depuis ta dernière visite sur le site.</p>
-    <p>Tu trouveras les mêmes informations sur <a href='https://www.polytechnique.org/carnet/panel'>cette page</a></p>
-EOF;
-
-    foreach($u['data'] as $cid=>$d) {
-        $text .= "  {$all->_cats[$cid][(count($d)==1)?'mail_sg':'mail']} :\n\n";
-        $html .= "<h1 style='font-size: 120%'>{$all->_cats[$cid][(count($d)==1)?'mail_sg':'mail']} :</h1>\n<ul>\n";
-
-        foreach($d as $promo=>$x) {
-            require_once('../../plugins/modifier.date_format.php');
-            $date  = smarty_modifier_date_format($x['date'], '%d %b %Y');
-            $text .= "    - (X{$x['promo']}) {$x['prenom']} {$x['nom']} le $date\n";
-            $text .= "      https://www.polytechnique.org/profile/private/{$x['bestalias']}\n\n";
-            $html .= "<li>(X{$x['promo']}) <a href='https://www.polytechnique.org/profile/private/{$x['bestalias']}'>{$x['prenom']} {$x['nom']}</a> le $date</li>\n";
-        }
-        $text .= "\n";
-        $html .= "</ul>\n";
-    }
-
-    $text .= "-- \n"
-           . "L'équipe de Polytechnique.org\n\n"
-           . "------------------------------------------------------------------------\n\n"
-           . "Tu recois ce mail car tu as activé la notification automatique \n"
-           . "par mail des événements que tu surveilles.\n\n"
-           . "Tu peux changer cette option sur :\n"
-           . "    https://www.polytechnique.org/carnet/notifs";
-    $html .= <<<EOF
-    <hr />
-    <p>L'équipe de Polytechnique.org</p>
-    <br />
-    <p>
-    Tu recois ce mail car tu as activé la notification automatique par mail des événements que tu surveilles.
-    </p>
-    <p>Tu peux changer cette option sur la <a href="https://www.polytechnique.org/carnet/notifs">page
-    de configuration des notifications</a>
-    </p>
-  </body>
-</html>
-EOF;
-
-    global $globals;
-    $mailer = new PlMailer();
-    $mailer->setFrom('Carnet Polytechnicien <support_carnet@' . $globals->mail->domain . '>');
-    $mailer->addTo("\"{$u['prenom']} {$u['nom']}\" <{$u['bestalias']}@" . $globals->mail->domain . '>');
-    $mailer->setSubject("Notifications de la semaine $week");
-    $mailer->setTxtBody($text);
-    if ($u['mail_fmt'] == 'html') { $mailer->setHtmlBody($html); }
-    $mailer->send();
+$mailer = new PlMailer('carnet/notif.mail.tpl');
+foreach ($all->_data as $u) {
+    $mailer = new PlMailer('carnet/notif.mail.tpl');
+    $mailer->assign('u', $u);
+    $mailer->assign('week', date("W - Y"));
+    $mailer->assign('cats', $all->_cats);
+    $mailer->addTo('"' . $u['prenom'] . ' ' . $u['nom'] . '" <' . $u['bestalias'] . '@polytechnique.org>');
+    $mailer->send($u['mail_fmt'] == 'html');
 }
 
+XDB::execute("DELETE FROM  watch_profile
+                    WHERE  ts < DATE_SUB(CURRENT_DATE, INTERVAL 15 DAY)");
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index b2bdee3..e768aab 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 2b66b6e..f385b03 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 #***************************************************************************
-#*  Copyright (C) 2003-2007 Polytechnique.org                              *
+#*  Copyright (C) 2003-2008 Polytechnique.org                              *
 #*  http://opensource.polytechnique.org/                                   *
 #*                                                                         *
 #*  This program is free software; you can redistribute it and/or modify   *
index 01418c8..9abba72 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #***************************************************************************
-#*  Copyright (C) 2003-2007 Polytechnique.org                              *
+#*  Copyright (C) 2003-2008 Polytechnique.org                              *
 #*  http://opensource.polytechnique.org/                                   *
 #*                                                                         *
 #*  This program is free software; you can redistribute it and/or modify   *
index 41cbcc5..9d3be0d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/bin/getuser.sh b/bin/getuser.sh
new file mode 100755 (executable)
index 0000000..30e6377
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+field=$1
+nom=$2
+promo=$3
+
+query="SELECT $field FROM auth_user_md5 AS u "
+where=""
+pos=0
+for i in $nom ; do
+  query="$query INNER JOIN search_name AS sn${pos} ON (u.user_id = sn${pos}.uid) "
+  [ "$where" != "" ] && where="$where AND"
+  where="${where} sn${pos}.token LIKE \"${i}%\""
+  pos=$((pos + 1))
+done
+if [ "${promo}" != "" ] ; then
+  [ "$where" != "" ] && where="$where AND "
+  where="${where} u.promo = $promo"
+fi
+query="${query} WHERE ${where} GROUP BY u.user_id"
+
+echo $query | mysql --default-character-set=utf8 -N x4dat
index ea7e412..aac5a23 100755 (executable)
@@ -687,10 +687,10 @@ def get_bogo_level(userdesc, perms, vhost, listname):
         if mlist.header_filter_rules == []:
             return 0
         try:
-            action = mlist.header_filter_rules[1][1]
+            action = mlist.header_filter_rules[2][1]
             return 2
         except:
-            action = mlist.header_filter_rules[0][1]
+            action = mlist.header_filter_rules[1][1]
             if action == mm_cfg.HOLD:
                 return 1
             if action == mm_cfg.DISCARD:
@@ -708,11 +708,14 @@ def set_bogo_level(userdesc, perms, vhost, listname, level):
             return 0
         hfr = []
         if int(level) is 1:
+            hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False))
             hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
         elif int(level) is 2:
+            hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False))
             hfr.append(('X-Spam-Flag: Yes, tests=bogofilter, spamicity=(0\.999999|1\.000000)', mm_cfg.DISCARD, False))
             hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
         elif int(level) is 3:
+            hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False))
             hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.DISCARD, False))
         if mlist.header_filter_rules != hfr:
             mlist.Lock()
index d6714eb..c5c8178 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 9d46bdf..3835a9d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index baadf79..8d06056 100644 (file)
@@ -77,7 +77,7 @@ class CoreLogger
 
         XDB::execute("INSERT INTO logger.sessions
                          SET uid={?}, host={?}, ip={?}, forward_ip={?}, forward_host={?}, browser={?}, suid={?}, flags={?}",
-                     $uid, $host, $ip, $forward_ip, $forward_host, $browser, $suid, $proxy);
+                     $uid, $host, ip_to_uint($ip), ip_to_uint($forward_ip), $forward_host, $browser, $suid, $proxy);
         if ($forward_ip) {
             $this->proxy_ip = $ip;
             $this->proxy_host = $host;
index 809a82c..6590df4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7448a71..e3bbd88 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index d906ad6..ab547e0 100644 (file)
@@ -84,6 +84,9 @@ class MiniWiki
         MiniWiki::Markup("/\n\n/", '</p><p>', "\n\n", "paragraphe1\n\nparagraphe2");
         MiniWiki::Markup("/\n/", ' ', "\n");
         MiniWiki::Markup("/^.*<\/p>.*<p>.*$/s", "<p>$0</p>", "$0");
+
+        // french typo rules, unbreakable spaces
+        MiniWiki::Markup("/ +([!?:;])/", "&nbsp;$1", "$0");
     }
 
     public static function WikiToHTML($wiki, $title = false)
index 0e74f09..a16b1c6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 745e059..cec37f2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index dc9358e..f3661d7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -124,7 +124,9 @@ abstract class PlatalPage extends Smarty
             $this->register_modifier('escape_html', 'escape_html');
             $this->default_modifiers = Array('@escape_html');
         }
-        $this->register_outputfilter('hide_emails');
+        if (S::i('auth') <= AUTH_PUBLIC) {
+            $this->register_outputfilter('hide_emails');
+        }
         $this->addJsLink('wiki.js');
         header("Accept-Charset: utf-8");
         if (Env::v('forceXml')) {
index e15a304..9fb80ec 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index bdaf9c5..0b5f254 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index eb26208..6b6fd0d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -38,7 +38,7 @@ class PlMail extends Smarty
         $this->template_dir  = $globals->spoolroot . "/templates/";
         $this->compile_dir   = $globals->spoolroot . "/spool/mails_c/";
         $this->config_dir    = $globals->spoolroot . "/configs/";
-
+        array_unshift($this->plugins_dir, $globals->spoolroot."/plugins/");
 
         $this->register_outputfilter(Array($this, 'mail_format'));
         $this->register_function('from',    Array($this, 'setFrom'));
@@ -47,6 +47,7 @@ class PlMail extends Smarty
         $this->register_function('bcc',     Array($this, 'addBcc'));
         $this->register_function('subject', Array($this, 'setSubject'));
         $this->register_function('add_header', Array($this, 'addHeader'));
+        $this->assign_by_ref('globals', $globals);
     }
 
     public static function &get(&$mailer, $tpl)
@@ -279,9 +280,9 @@ class PlMailer extends Mail_Mime {
             error_reporting($level);
         }
         if ($this->wiki) {
-            $this->setTxtBody(MiniWiki::WikiToText($this->wiki, true, 0, 78));
+            $this->setTxtBody(MiniWiki::WikiToText($this->wiki, false, 0, 78));
             if ($with_html) {
-                $this->setHtmlBody(MiniWiki::WikiToHtml($this->wiki, true));
+                $this->setHtmlBody('<html><body>' . MiniWiki::WikiToHtml($this->wiki, true) . '</body></html>');
             }
         }
     }
index 697b4ef..06e5da8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/classes/plprofiler.php b/classes/plprofiler.php
new file mode 100644 (file)
index 0000000..1734ff5
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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 PlProfiler
+{
+    static public function start($name, $info = "action")
+    {
+        global $globals;
+        if (!($globals->debug & DEBUG_BT)) {
+            return false;
+        }
+        if (!isset(PlBacktrace::$bt[$name])) {
+            new PlBacktrace($name);
+        }
+        PlBacktrace::$bt[$name]->start($info);
+        return true;
+    }
+
+    static public function step($name, $info = "action")
+    {
+        PlProfiler::stop($name);
+        PlProfiler::start($name, $info);
+    }
+
+    static public function stop($name)
+    {
+        global $globals;
+        if (!($globals->debug & DEBUG_BT)) {
+            return false;
+        }
+        PlBacktrace::$bt[$name]->stop();
+        return true;
+    }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
index 2338706..648d814 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index be664fd..7cfc2e8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -37,6 +37,8 @@ class PLTableEditor
     public $vars;
     // number of displayed fields
     public $nbfields;
+    // a where clause to restrict table
+    public $whereclause;
     // the field for sorting entries
     public $sortfield;
     public $sortdesc = false;
@@ -60,7 +62,8 @@ class PLTableEditor
         $this->idfield = $idfield;
         $this->sortfield = $idfield;
         $this->idfield_editable = $editid;
-        $r = XDB::iterator("SHOW COLUMNS FROM $table");
+        $this->whereclause = '1';
+        $r = XDB::iterator("SHOW FULL COLUMNS FROM $table");
         $this->vars = array();
         while ($a = $r->next()) {
             // desc will be the title of the column
@@ -94,6 +97,9 @@ class PLTableEditor
             elseif (substr($a['Type'],0,10) == 'timestamp(' || $a['Type'] == 'datetime') {
                 $a['Type'] = 'timestamp';
             }
+            elseif ($a['Comment'] == 'ip_address') {
+                $a['Type']='ip_address';
+            }
 
             $this->vars[$a['Field']] = $a;
         }
@@ -130,6 +136,10 @@ class PLTableEditor
                 $date =& $entry[$field];
                 $date = preg_replace('/([0-9]{4})-?([0-9]{2})-?([0-9]{2})/', '\3/\2/\1', $date);
             }
+            if ($descr['Type'] == 'ip_address') {
+                $ip = & $entry[$field];
+                $ip = long2ip($ip);
+            }
         }
         return $entry;
     }
@@ -164,6 +174,12 @@ class PLTableEditor
         }
     }
 
+    // add a where clause to limit table listing
+    public function set_where_clause($whereclause="1")
+    {
+        $this->whereclause = $whereclause;
+    }
+    
     // set an action when trying to delete row
     public function on_delete($action = NULL, $message = NULL)
     {
@@ -188,13 +204,13 @@ class PLTableEditor
                     $page->trig($this->delete_message);
                 } else {
                     $page->trig("L'entrée ".$id." a été supprimée.");
-                }                      
+                }
             } else {
                 $page->trig("Impossible de supprimer l'entrée.");
             }
         }
         if ($action == 'edit') {
-            $r = XDB::query("SELECT * FROM {$this->table} WHERE {$this->idfield} = {?}",$id);
+            $r = XDB::query("SELECT * FROM {$this->table} WHERE {$this->idfield} = {?} AND {$this->whereclause}",$id);
             $entry = $r->fetchOneAssoc();
             $page->assign('entry', $this->prepare_edit($entry));
             $page->assign('id', $id);
@@ -245,6 +261,9 @@ class PLTableEditor
                     elseif ($descr['Type'] == 'date') {
                         $val = preg_replace('/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/', '\3-\2-\1', $val);
                     }
+                    elseif ($descr['Type'] == 'ip_address') {
+                        $val = ip2long($val);
+                    }
                     $val = "'".addslashes($val)."'";
                 } else {
                     $cancel = true;
@@ -254,7 +273,7 @@ class PLTableEditor
             }
             if (!$cancel) {
                 if ($this->idfield_editable && ($id != Post::v($this->idfield)) && $action != 'new')
-                    XDB::execute("UPDATE {$this->table} SET {$this->idfield} = {?} WHERE {$this->idfield} = {?}", Post::v($this->idfield), $id);
+                    XDB::execute("UPDATE {$this->table} SET {$this->idfield} = {?} WHERE {$this->idfield} = {?} AND {$this->whereclause}", Post::v($this->idfield), $id);
                 XDB::execute("REPLACE INTO {$this->table} VALUES ($values)");
                 if ($id !== false)
                     $page->trig("L'entrée ".$id." a été mise à jour.");
@@ -263,7 +282,7 @@ class PLTableEditor
                     $id = XDB::insertId();
                 }
             } else
-                $page->trig("Impossible de mette à jour.");
+                $page->trig("Impossible de mettre à jour.");
             if (!$this->auto_return) {
                 return $this->apply($page, 'edit', $id);
             }
@@ -287,7 +306,7 @@ class PLTableEditor
             if (count($this->sort) > 0) {
                 $sort = 'ORDER BY ' . join($this->sort, ',');
             }
-            $it = XDB::iterator("SELECT * FROM {$this->table} $sort");
+            $it = XDB::iterator("SELECT * FROM {$this->table} WHERE {$this->whereclause} $sort");
             $this->nbfields = 0;
             foreach ($this->vars as $field => $descr)
                 if ($descr['display']) $this->nbfields++;
index bab7286..7184bbd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -30,6 +30,8 @@ class PlUpload
     private $filename;
     private $type;
 
+    static public $lastError;
+
     /** For images
      */
     private $x;
@@ -64,11 +66,29 @@ class PlUpload
     {
         if ($this->exists()) {
             $this->type = trim(mime_content_type($this->filename));
+            if ($this->type == 'text/plain') { // Workaround a bug of php 5.2.0+etch10 (mime_content_type fallback is 'text/plain')
+                $this->type = preg_replace('/;.*/', '', trim(shell_exec('file -bi ' . escapeshellarg($this->filename))));
+            }
         }
     }
 
     public function upload(array &$file)
     {
+        if (@$file['error']) {
+            PlUpload::$lastError = 'Erreur de téléchargement de ' . $file['name'] . ' : ';
+            switch ($file['error']) {
+              case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE:
+                PlUpload::$lastError .= 'le fichier est trop gros (limite : ' . ini_get('upload_max_filesize') . ')';
+                break;
+              case UPLOAD_ERR_PARTIAL: case UPLOAD_ERR_NO_FILE:
+                PlUpload::$lastError .= 'le fichier n\'a pas été transmis intégralement';
+                break;
+              default:
+                PlUpload::$lastError .= 'erreur interne';
+                break;
+            }
+            return false;
+        }
         if (!is_uploaded_file($file['tmp_name'])) {
             return false;
         } else if (!move_uploaded_file($file['tmp_name'], $this->filename)) {
@@ -211,6 +231,10 @@ class PlUpload
         $array = getimagesize($this->filename);
         $array[2] = @$map[$array[2]];
         if (!$array[2]) {
+            list($image, $type) = explode('/', $array['mime']);
+            $array[2] = $type;
+        }
+        if (!$array[2]) {
             trigger_error('unknown image type', E_USER_NOTICE);
             return null;
         }
index 78242f2..3667268 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index b8cbffa..338a437 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 4a80761..07f6fab 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7816c5f..e57b60f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 91b0d19..5bb1fef 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index b33fcb3..dfc74da 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ad8a0b7..bc30b17 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index fae0fe0..061588e 100644 (file)
@@ -36,7 +36,7 @@ from=webmaster@polytechnique.org
 to=geoloc@staff.polytechnique.org
 
 [mails_ax]
-from="Association des Anciens de l'X" <info@amicale.polytechnique.org>
+from="Amicale des Anciens de l'X" <info@amicale.polytechnique.org>
 replyto=info@amicale.polytechnique.org
 
 [payment_ready]
@@ -44,3 +44,9 @@ from="Gestion des paiements" <support@polytechnique.org>
 
 [test_email]
 from="Polytechnique.org" <support@polytechnique.org>
+
+[carnet]
+from="Carnet Polytechnicien <support_carnet@polytechnique.org>"
+
+[googleapps]
+from="Polytechnique.org" <support@polytechnique.org>
index 05de023..74f51c2 100644 (file)
@@ -30,4 +30,7 @@ WD=/home/web/prod/platal/bin/cron
 # ml moderation
 * * * * *       web     cd $WD; ./cron_ml_moderate.php > /dev/null
 
+# synchronisation google apps - plat/al
+12,42 * * * *  web     cd $WD; ./google_apps.php
+
 # vim:set noet syntax=crontab ts=8 sw=8 sts=8 enc=utf-8:
index 545ac84..b1aaf00 100644 (file)
@@ -2,6 +2,7 @@
 locale   = "fr_FR.UTF-8"
 timezone = "Europe/Paris"
 secure_domain = ""
+baseurl = "https://www.example.org/"
 
 skin = "default"
 register_skin = "register"
@@ -24,14 +25,6 @@ event_reply = ""
 [Geoloc]
 webservice_url = ""
 
-[Mail]
-domain  = ""
-domain2 = ""
-
-alias_dom  = ""
-alias_dom2 = ""
-
-
 [Lists]
 rpchost   = "localhost"
 rpcport   = 4949
@@ -41,6 +34,17 @@ vhost_sep = "_"
 
 max_mail_per_min = 400
 
+[Mail]
+domain  = ""
+domain2 = ""
+
+alias_dom  = ""
+alias_dom2 = ""
+
+[MailStorage]
+imap_active = 0
+googleapps_active = 0
+googleapps_domain = ""
 
 [Manageurs]
 authorized_ips       = "129.104.30.32 129.104.30.33 213.251.145.200"
index d1254d3..bdee05b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 5cfd3c0..eef91ce 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ff65763..ee6d3f2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index fa1589f..3207c03 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -343,58 +343,6 @@ div.long td.rt { width: 65%; }
     padding: 0 6px 0 0;
 }
 
-table.cadre_a_onglet{
-    border-width: 0;
-    padding : 0;
-    margin: 0;
-}
-
-td.conteneur_tab {
-    border-width : 1px 2px 2px 1px;
-    border-style : solid;
-    border-color : #999;
-    padding : 4px 4px 4px 4px;
-    background : #eceade;
-}
-
-#onglet {
-    display : block;
-    margin : 0;
-    padding : 0;
-}
-
-#onglet li {
-    display : block;
-    float : left;
-    padding : 0.4ex;
-    margin : 0 0.3ex -1px 0;
-    background : #D2E0E6  repeat-x 0 100%;
-    border-width : 1px 1px 0px 1px;
-    border-style : solid;
-    border-color : #999;
-    border-bottom-color : #999;
-    width: auto;
-    height: 5ex;
-    text-align: center;
-}
-
-#onglet li:hover { background : #fc3 repeat-x 0 100%; }
-
-#onglet li.actif {
-    background : #eceade;
-    border-bottom-color : #eceade;
-    font-weight: bold;
-}
-
-#onglet li a {
-    font-size: 80%;
-    font-weight : normal;
-    text-decoration : none;
-    color : #000;
-}
-
-#onglet li a:hover { text-decoration: underline; }
-#onglet li img { margin-right : 2px; }
 
 /*******************************************************************************
     7   fiche.php & fiche_referent.php
index 2ecad1c..bbb7778 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -110,33 +110,6 @@ div.contact div.long {
 }
 
 /*******************************************************************************
-    6   Profil
-        [ onglets des profils ]
-*******************************************************************************/
-
-td.conteneur_tab {
-    background-color: #eeeeff;
-    border-color: #2f006f;
-}
-
-#onglet li {
-    background-color: #ddddff;
-    border-color: #2f006f;
-}
-
-#onglet li:hover {
-    background-color: #2f006f;
-}
-
-#onglet li.actif {
-    background-color: #eeeeff;
-}
-
-#onglet li:hover a {
-    color: #fff;
-}
-
-/*******************************************************************************
     7   fiche.php
         [ cas de la fiche ]
 *******************************************************************************/
index c462e83..caf129a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/htdocs/css/igoogle.css b/htdocs/css/igoogle.css
new file mode 100644 (file)
index 0000000..4fe8ada
--- /dev/null
@@ -0,0 +1,97 @@
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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                *
+ ***************************************************************************/
+
+body {
+    font-family: "Arial", sans-serif;
+    font-size: small;
+    color: #000000;
+    background: #ffffff;
+    background-position: center;
+    margin: 0.2em 0em;
+}
+
+a:link, a:visited, a:active, a:hover { color: #003399; background: none; }
+img   { vertical-align: middle; }
+a img { border: 0px; }
+td    { vertical-align: top; }
+div.more { font-size: x-small; text-align: right; }
+
+/* Events */
+div.events ul { margin: 0; padding: 0 0.2em 0 1em; }
+div.events ul li { margin: 0.5em 0.2em; padding: 0; }
+li.unread { font-weight: bold; }
+
+/* Search gadget: frame */
+div.welcome {
+    text-align: center;
+}
+
+div.search {
+    text-align: center;
+    margin-top: 1em;
+}
+
+div.error {
+    color: red;
+    font-weight: bold;
+}
+
+/* Search gadget: result page */
+div.contact-list div.contact {
+    width: 100%;
+    text-align: left;
+    border-top: 1px solid #003399;
+    background: #F4D09C;
+    color: inherit;
+}
+
+div.grayed {
+    color: #444444;
+    font-style: italic;
+}
+
+div.grayed div.contact {
+    background: #eee;
+}
+
+div.contact div.nom {
+    font-weight: bold;
+    float: left;
+}
+
+div.contact div.autre {
+    text-align: right;
+    float: right;
+}
+
+div.contact div.long {
+    width: 100%;
+    clear: both;
+    background: white;
+    color: inherit;
+    padding-top: 1px;
+    padding-bottom: 1px;
+}
+
+div.long table { width: 100%; }
+div.long td.lt { width: 35%; }
+div.long td.rt { width: 65%; }
+
+/* vim: set et ts=4 sts=4 sw=4: */
index 93f4213..a9d35bb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -161,6 +161,10 @@ pre {
     padding: 0.3em 1.5em;
 }
 
+.pair pre {
+    background: inherit;
+}
+
 
 /*******************************************************************************
     3   Tableaux bicolores + classes utiles
@@ -356,65 +360,6 @@ div.long td.rt { width: 65%; }
     padding: 0 6px 0 0;
 }
 
-table.cadre_a_onglet{
-    border-width: 0;
-    padding : 0;
-    margin: 0;
-}
-
-td.conteneur_tab {
-    border: 1px solid #9c9c9c;
-    border-left-color: #eee;
-    padding: 8px 4px 4px 4px;
-    background : url('../images/skins/keynote_topborder.png') top repeat-x;
-}
-
-#onglet {
-    display : block;
-    margin : 0;
-    padding : 0;
-}
-
-#onglet li {
-    display : block;
-    float : left;
-    padding : 0.4ex;
-    margin: 0 0.3ex -1px 3px;
-    border: 1px solid #9c9c9c;
-    border-right: none;
-    background: #cecece;
-    width: auto;
-    height: 5ex;
-    text-align: center;
-    color: #000;
-    font-size: 80%;
-}
-
-#onglet li:hover {
-    color: #000;
-    background : #adadad;
-}
-
-#onglet li.actif {
-    color: #000;
-    background : #dedede;
-    border: 1px solid #f0f0f0;
-    border-right: none;
-    border-bottom-color: #dedede;
-    font-weight: bold;
-}
-
-#onglet li a {
-    font-weight: normal;
-    text-decoration: none;
-    color: #000;
-    background: inherit;
-    display: block;
-    width: 100%;
-    height: 100%;
-}
-#onglet li img { margin-right: 2px; }
-
 /*******************************************************************************
     7   fiche.php & fiche_referent.php
         [ cas de la fiche ]
index f0e79b5..ae46031 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index c30f053..00d5409 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -112,26 +112,6 @@ div.contact div.long {
         [ onglets des profils ]
 *******************************************************************************/
 
-div.conteneur_tab {
-    background-color: #F8EBFF;
-    border-color: #C866FA;
-    border-right-color: #660099;
-    border-bottom-color: #660099;
-}
-
-#onglet li {
-    background-color: #FDFDE9;
-    xborder-bottom: 1px solid red;
-}
-
-#onglet li.actif {
-    background-color: #F8EBFF;
-    border-top-color: #C866FA;
-    border-right-color: #C866FA;
-    border-left-color: #C866FA;
-    border-bottom-color: #F8EBFF;
-}
-
 /*******************************************************************************
     7   fiche.php
         [ cas de la fiche ]
index 7fc0ae9..508c4d2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -120,29 +120,6 @@ div.contact div.long {
         [ onglets des profils ]
 *******************************************************************************/
 
-td.conteneur_tab {
-    background: #efddff;
-    border-color: #800080;
-}
-
-#onglet li {
-    background: #ecd0ff;
-    border-color: #800080;
-}
-
-#onglet li:hover {
-    background: #c0c0c0;
-}
-
-#onglet li a:hover {
-    color: #800080;
-    text-decoration: none;
-}
-
-#onglet li.actif {
-    background: #efddff;
-}
-
 /*******************************************************************************
     7   fiche.php
         [ cas de la fiche ]
index c6fd389..80b2167 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 8eed668..3094358 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 6718e0b..34f060c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index f723a8e..8b1736d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -335,49 +335,6 @@ div.long td.rt { width: 65%; }
     padding: 0 6px 0 0;
 }
 
-table.cadre_a_onglet{
-    border-width: 0px;
-    padding : 0px;
-    margin: 0px;
-}
-
-td.conteneur_tab {
-    border-width : 1px 2px 2px 1px;
-    border-style : solid;
-    border-color : #999;
-    padding : 4px 0px 0px 4px;
-    background : #fff;
-}
-
-#onglet { display : block; margin : 0px; padding : 0px; }
-
-#onglet li {
-    display : block;
-    float : left;
-    padding : 0.5ex;
-    margin : 0px 4px -1px 0px;
-    background : #d2e0e6;
-    width: auto;
-    height: 6ex;
-    text-align: center;
-    border: 1px solid #999;
-}
-
-#onglet li:hover { background : #ffecce; }
-
-#onglet li.actif {
-    background : #fff;
-    font-weight: bold;
-    border-bottom: 1px solid #fff;
-}
-
-#onglet li a {
-    font-size: 90%;
-    font-weight : normal;
-    text-decoration : none;
-    color : #000;
-}
-
 /*******************************************************************************
     7   fiche.php & fiche_referent.php
         [ cas de la fiche ]
index ad2443a..a6de13c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 9c5ddfc..cd45846 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -122,29 +122,6 @@ div.contact div.long {
         [ onglets des profils ]
 *******************************************************************************/
 
-td.conteneur_tab {
-    border-color: #0067fe;
-    background-color: #eeffdd;
-}
-
-#onglet li {
-    border-color: #0067fe;
-    background-color: #ccddff;
-}
-
-#onglet li:hover {
-    background-color:
-}
-
-#onglet li.actif {
-    background-color: #eeffdd;
-}
-
-#onglet li a:hover {
-    color: #ff0000;
-    text-decoration: none;
-}
-
 /*******************************************************************************
     7   fiche.php
         [ cas de la fiche ]
index 8b3a917..37520da 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -146,28 +146,6 @@ div.contact div.long {
         [ onglets des profils ]
 *******************************************************************************/
 
-td.conteneur_tab {
-    background-color: #f5f0ea;
-    border-color: #707070;
-}
-
-#onglet li {
-    background: #e2d9c2;
-    border-color: #707070;
-}
-
-#onglet li:hover {
-    background-color: #8a6540;
-}
-
-#onglet li:hover a {
-    color: #f5f0ea;
-}
-
-#onglet li.actif {
-    background-color: #f5f0ea;
-}
-
 /*******************************************************************************
     7   fiche.php
         [ cas de la fiche ]
index e181a5a..4eb241d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -177,7 +177,7 @@ td#menu {
     background-color: #d0c198;
 }
 
-#menu a {
+#menu a, #menu form {
     display: block;
     padding: 0.2em 0em 0.2em 15px;
     font-size: 89%;
@@ -188,12 +188,6 @@ td#menu {
  * CLASSES
  ***************************************************************************/
 
-.breadcrumb {
-    font-weight: bold;
-    font-size: 90%;
-    padding: 0.5em 0em 0em 0.2em;
-}
-
 .erreur { color: red !important; }
 .error  { color: red !important; }
 .center { text-align: center; }
@@ -391,39 +385,41 @@ td.infos {
 /***************************************************************************
  ***************************************************************************/
 
-td.conteneur_tab {
-    border: none;
-    padding-top: 1em;
+.wizard {
+    margin-top: 0px;
+    margin-left: -1em;
 }
 
-#onglet {
-    display : block;
-    margin : 0;
-    padding : 0;
+.wizard .wiz_header {
+    height: 30px;
+    width: 635px;
+    padding: 0 2px;
+    background: url('../images/skins/wiz_xnet_background.png') bottom left no-repeat;
+    margin-bottom: 1em;
 }
 
-#onglet li {
-    display : block;
-    float : left;
-    border: none;
-    background: inherit;
-    width: auto;
+.wizard .wiz_header .wiz_tab {
+    height: 100%;
+    text-align: center;
+    font-size: 75%;
 }
 
-#onglet li.actif {
+.wizard .wiz_header .wiz_tab:hover {
+    color: #5c81aa;
     font-weight: bold;
 }
 
-#onglet li:before {
-    font-weight: normal;
-    content: '» ';
-    padding-left: 1ex;
+.wizard .wiz_header .active, .wizard .wiz_header .active:hover {
 }
 
-#onglet li:first-child:before {
-    content: '';
+.wizard .wiz_header a {
+    color: #000;
+    text-decoration: none;
+    margin-top: 2px;
+    vertical-align: bottom;
 }
 
-#onglet li img { margin-right: 2px; }
-
+.wizard .wiz_header a.active {
+    font-weight: bold;
+}
 
diff --git a/htdocs/images/goodies/README b/htdocs/images/goodies/README
new file mode 100644 (file)
index 0000000..ae70e85
--- /dev/null
@@ -0,0 +1,7 @@
+Those images have been fetched from external servers. They are *not* covered by Plat/al's GPL license.
+Please check with image owners for more information on copyrights and utilization limitations.
+
+add-google.gif:          http://gmodules.com/ig/images/plus_google.gif
+add-google-calendar.gif: http://www.google.com/calendar/images/ext/gc_button1.gif
+add-netvibes.gif:        http://www.netvibes.com/img/add2netvibes.gif
+add-yahoo:               http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif
diff --git a/htdocs/images/goodies/add-google-calendar.gif b/htdocs/images/goodies/add-google-calendar.gif
new file mode 100644 (file)
index 0000000..7884948
Binary files /dev/null and b/htdocs/images/goodies/add-google-calendar.gif differ
diff --git a/htdocs/images/goodies/add-google.gif b/htdocs/images/goodies/add-google.gif
new file mode 100644 (file)
index 0000000..43b7889
Binary files /dev/null and b/htdocs/images/goodies/add-google.gif differ
diff --git a/htdocs/images/goodies/add-netvibes.gif b/htdocs/images/goodies/add-netvibes.gif
new file mode 100644 (file)
index 0000000..6159586
Binary files /dev/null and b/htdocs/images/goodies/add-netvibes.gif differ
diff --git a/htdocs/images/goodies/add-yahoo.gif b/htdocs/images/goodies/add-yahoo.gif
new file mode 100644 (file)
index 0000000..b6f8047
Binary files /dev/null and b/htdocs/images/goodies/add-yahoo.gif differ
diff --git a/htdocs/images/icons/world_go.gif b/htdocs/images/icons/world_go.gif
new file mode 100644 (file)
index 0000000..9fad760
Binary files /dev/null and b/htdocs/images/icons/world_go.gif differ
diff --git a/htdocs/images/logo-xnet.png b/htdocs/images/logo-xnet.png
new file mode 100644 (file)
index 0000000..c071736
Binary files /dev/null and b/htdocs/images/logo-xnet.png differ
diff --git a/htdocs/images/skins/wiz_xnet_background.png b/htdocs/images/skins/wiz_xnet_background.png
new file mode 100644 (file)
index 0000000..61d695a
Binary files /dev/null and b/htdocs/images/skins/wiz_xnet_background.png differ
index bc91303..854c4ef 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index e8a490f..5cb8e09 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 1219de1..77ad253 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ea9f6e9..35805d3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/htdocs/javascript/igoogle.js b/htdocs/javascript/igoogle.js
new file mode 100644 (file)
index 0000000..abea945
--- /dev/null
@@ -0,0 +1,37 @@
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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                *
+ ***************************************************************************/
+
+function igOnLoadHandler()
+{
+    if (typeof(_IG_AdjustIFrameHeight) != 'undefined') {
+        _IG_AdjustIFrameHeight();
+    }
+}
+
+function markEventAsRead(event_id)
+{
+    _toggle(_gel("mark-read-" + event_id));
+    _gel("evt-" + event_id).setAttribute("class", "read");
+    _gel("link-" + event_id).setAttribute("href", "events/unread/" + event_id);
+    Ajax.update_html(null, "events/read/" + event_id);
+    return false;
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
index 52d9fcb..314b857 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index d93cb4d..d59a365 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ca2445f..66dca47 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************\r
- *  Copyright (C) 2003-2007 Polytechnique.org                              *\r
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *\r
  *  http://opensource.polytechnique.org/                                   *\r
  *                                                                         *\r
  *  This program is free software; you can redistribute it and/or modify   *\r
index d4e670e..cf2cc18 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 85bbb56..0e5f5d0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -155,6 +155,70 @@ function popWin(theNode,w,h) {
 }
 
 // }}}
+// {{{ function goodiesPopup()
+
+function goodiesPopup(node) {
+    if (node.href.indexOf('ical') > -1) {
+        __goodies_popup(node, __goodies_ical_sites, 'Calendrier iCal');
+    } else if (node.href.indexOf('rss') > -1 && (node.href.indexOf('xml') > -1 || node.href.indexOf('hash'))) {
+        __goodies_popup(node, __goodies_rss_sites, 'Fil rss');
+    }
+}
+
+var __goodies_ical_sites = [
+    {'url_prefix': '',
+     'img': 'images/icons/calendar_view_day.gif',
+     'title': 'Calendrier iCal'},
+    {'url_prefix': 'http://www.google.com/calendar/render?cid=',
+     'img': 'images/goodies/add-google-calendar.gif',
+     'title': 'Ajouter à Google Calendar'}
+];
+var __goodies_rss_sites = [
+    {'url_prefix': '',
+     'img': 'images/icons/feed.gif',
+     'title': 'Fil rss'},
+    {'url_prefix': 'http://fusion.google.com/add?feedurl=',
+     'img': 'images/goodies/add-google.gif',
+     'alt': 'Add to Google',
+     'title': 'Ajouter à iGoogle/Google Reader'},
+    {'url_prefix': 'http://www.netvibes.com/subscribe.php?url=',
+     'img': 'images/goodies/add-netvibes.gif',
+     'title': 'Ajouter à Netvibes'},
+    {'url_prefix': 'http://add.my.yahoo.com/content?.intl=fr&url=',
+     'img': 'images/goodies/add-yahoo.gif',
+     'alt': 'Add to My Yahoo!',
+     'title': 'Ajouter à My Yahoo!'}
+];
+
+function __goodies_popupText(url, sites) {
+    var text = '<div style="text-align: center; line-height: 2.2">';
+    for (var site in sites) {
+        var s_alt = (sites[site]["alt"] ? sites[site]["alt"] : "");
+        var s_img = sites[site]["img"];
+        var s_title = (sites[site]["title"] ? sites[site]["title"] : "");
+        var s_url = (sites[site]["url_prefix"].length > 0 ? sites[site]["url_prefix"] + escape(url) : url);
+
+        text += '<a href="' + s_url + '"><img src="' + s_img + '" title="' + s_title + '" alt="' + s_alt + '"></a><br />';
+    }
+    text += '<a href="https://www.polytechnique.org/Xorg/Goodies">Plus de bonus</a> ...</div>'
+    return text;
+}
+
+function __goodies_popup(node, sites, default_title) {
+    var mouseover_cb = function() {
+        var rss_text = __goodies_popupText(node.href, sites);
+        var rss_title = (node.title ? node.title : default_title);
+        return overlib(rss_text, CAPTION, rss_title, CLOSETEXT, 'Fermer', DELAY, 800, STICKY, WIDTH, 150);
+    }
+    var mouseout_cb = function() {
+        nd();
+    }
+
+    node.onmouseover = mouseover_cb;
+    node.onmouseout = mouseout_cb;
+}
+
+// }}}
 // {{{ function auto_links()
 
 function auto_links() {
@@ -183,6 +247,9 @@ function auto_links_nodes(nodes) {
             if (node.href.indexOf('http') < 0) {
                 node.href = 'http://' + fqdn + '/' + node.href;
             }
+            if (node.nodeName.toLowerCase() == 'a') {
+                goodiesPopup(node);
+            }
         }
         if(node.className == 'popup2') {
             node.onclick = function () { popWin(this,840,600); return false; };
index 3b9191f..739c58d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index d5ef547..cca10b1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 74f1b74..592ba18 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index c52959d..93226b9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -24,10 +24,11 @@ global $globals, $platal, $page;
 
 if (!($path = Env::v('n')) || ($path{0} < 'A' || $path{0} > 'Z')) {
 
-    $platal = new Platal('auth', 'banana', 'carnet', 'email', 'events',
+    $platal = new Platal('auth', 'carnet', 'email', 'events', 'forums',
                          'geoloc', 'lists', 'marketing', 'payment', 'platal',
                          'profile', 'register', 'search', 'stats', 'admin',
-                         'newsletter', 'axletter', 'bandeau', 'survey');
+                         'newsletter', 'axletter', 'bandeau', 'survey',
+                         'gadgets', 'googleapps');
     $platal->run();
 
     exit;
index babf28e..849adc3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 14814fd..7e05a01 100644 (file)
@@ -11,4 +11,5 @@
 /protocoleinterface.inc.php
 /spool.inc.php
 /text.func.inc.php
+/tree.inc.php
 
index 7195d1e..394ae99 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -49,7 +49,10 @@ class ForumsBanana extends Banana
         if (!S::v('core_rss_hash')) {
             Banana::$feed_active = false;
         }
-        parent::__construct($params);
+        parent::__construct($params, 'NNTP', 'PlatalBananaPage');
+        if (@$params['action'] == 'profile') {
+            Banana::$action = 'profile';
+        }
     }
 
     public function run()
@@ -116,8 +119,13 @@ class ForumsBanana extends Banana
             Banana::$page->registerPage('profile', 'Préférences', null);
         }
 
-        // Run Banana
-        return parent::run();
+        // Run Bananai
+        if (Banana::$action == 'profile') {
+            Banana::$page->run();
+            return $this->action_updateProfile();
+        } else {
+            return parent::run();
+        }
     }
 
     public function post($dest, $reply, $subject, $body)
@@ -163,6 +171,55 @@ class ForumsBanana extends Banana
             Banana::$profile['subscribe'][] = $g;
         }
     }
+
+    protected function action_updateProfile()
+    {
+        global $page, $globals;
+
+        if (!(Post::has('action') && Post::has('banananame') && Post::has('bananasig')
+        && Post::has('bananadisplay') && Post::has('bananamail')
+        && Post::has('bananaupdate') && Post::v('action')=="Enregistrer" ))
+        {
+            $req = XDB::query("
+                SELECT  nom, mail, sig,
+                        FIND_IN_SET('threads', flags),
+                        FIND_IN_SET('automaj', flags),
+                        FIND_IN_SET('xface', flags)
+                  FROM  forums.profils
+                 WHERE  uid = {?}", S::v('uid'));
+            if (!(list($nom, $mail, $sig, $disp, $maj, $xface) = $req->fetchOneRow())) {
+                $nom   = S::v('prenom').' '.S::v('nom');
+                $mail  = S::v('forlife').'@'.$globals->mail->domain;
+                $sig   = $nom.' ('.S::v('promo').')';
+                $disp  = 0;
+                $maj   = 0;
+                $xface = 0;
+            }
+            $page->assign('nom' ,  $nom);
+            $page->assign('mail',  $mail);
+            $page->assign('sig',   $sig);
+            $page->assign('disp',  $disp);
+            $page->assign('maj',   $maj);
+            $page->assign('xface', $xface);
+        } else {
+            $flags = array();
+            if (Post::b('bananadisplay')) {
+                $flags[] = 'threads';
+            }
+            if (Post::b('bananaupdate')) {
+                $flags[] = 'automaj';
+            }
+            if (Post::b('bananaxface')) {
+                $flags[] = 'xface';
+            }
+            XDB::execute("REPLACE INTO  forums.profils (uid, sig, mail, nom, flags)
+                                VALUES  ({?}, {?}, {?}, {?}, {?})",
+                         S::v('uid'), Post::v('bananasig'),
+                         Post::v('bananamail'), Post::v('banananame'),
+                         implode(',', $flags));
+        }
+        return null;
+    }
 }
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
index 7a6367e..f0a2362 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -141,7 +141,7 @@ function hook_makeLink($params)
             return $base . '/' . $params['page'];
         }
         if (@$params['action'] == 'subscribe') {
-            return $base . '/subscription';
+            return $base . '/subscribe';
         }
 
         if (!isset($params['group'])) {
@@ -150,7 +150,7 @@ function hook_makeLink($params)
         $base .= '/' . $params['group'];
     } else if (Banana::$protocole->name() == 'NNTP' && $xnet) {
         if ($feed) {
-            return 'http://www.polytechnique.org/banana' . hook_platalRSS(@$params['group']);
+            return $globals->baseurl . '/banana' . hook_platalRSS(@$params['group']);
         }
         $base = $globals->baseurl . '/' . $platal->ns . 'forum';
     } else if (Banana::$protocole->name() == 'MLArchives') {
@@ -222,6 +222,26 @@ function make_Organization()
 
 function get_banana_params(array &$get, $group = null, $action = null, $artid = null)
 {
+    if ($group == 'forums') {
+        $group = null;
+    } else if ($group == 'thread') {
+        $group = S::v('banana_group');
+    } else if ($group == 'message') {
+        $action = 'read';
+        $group  = S::v('banana_group');
+        $artid  = S::i('banana_artid');
+    } else if ($action == 'message') {
+        $action = 'read';
+        $artid  = S::i('banana_artid');
+    } else if ($group == 'subscribe' || $group == 'subscription') {
+        $group  = null;
+        $action = null;
+        $get['action'] = 'subscribe';
+    } else if ($group == 'profile') {
+        $group  = null;
+        $action = null;
+        $get['action'] = 'profile';
+    }
     if (!is_null($group)) {
         $get['group'] = $group;
     }
@@ -253,6 +273,54 @@ function get_banana_params(array &$get, $group = null, $action = null, $artid =
     }
 }
 
+class PlatalBananaPage extends BananaPage
+{
+    protected $handler;
+    protected $base;
+
+    public function __construct()
+    {
+        global $platal;
+        Banana::$withtabs = false;
+        $this->handler = 'BananaHandler';
+        $this->base    = $platal->pl_self(0);
+        parent::__construct();
+    }
+
+    protected function prepare()
+    {
+        $tpl = parent::prepare();
+        global $wiz, $page;
+        $wiz = new PlWizard('Banana', 'core/plwizard.tpl', true, false);
+        foreach ($this->pages as $name=>&$mpage) {
+            $wiz->addPage($this->handler, $mpage['text'], $name);
+        }
+        $wiz->apply($page, $this->base, $this->page);
+        return $tpl;
+    }
+}
+
+class BananaHandler
+{
+    public function __construct(PlWizard &$wiz)
+    {
+    }
+
+    public function template()
+    {
+        return 'banana/index.tpl';
+    }
+
+    public function prepare(PlatalPage &$page, $id)
+    {
+    }
+
+    public function process()
+    {
+        return PlWizard::CURRENT_PAGE;
+    }
+}
+
 function run_banana(&$page, $class, array $args)
 {
     $banana = new $class(S::v('forlife'), $args);
index 7426da0..1a5413f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
 require_once 'banana/banana.inc.php';
 require_once 'banana/hooks.inc.php';
 
+class PlatalBananaMLPage extends PlatalBananaPage
+{
+    public function __construct()
+    {
+        parent::__construct();
+        global $platal;
+        $this->handler = 'BananaMLHandler';
+        $this->base    = $platal->pl_self(1);
+    }
+}
+
+class BananaMLHandler extends BananaHandler
+{
+    public function template()
+    {
+        return 'lists/archives.tpl';
+    }
+}
+
 class MLBanana extends Banana
 {
     static public $listname;
@@ -29,7 +48,7 @@ class MLBanana extends Banana
 
     function __construct($forlife, $params = null)
     {
-               global $globals;
+        global $globals;
         Banana::$spool_root = $globals->banana->spool_root;
         Banana::$spool_boxlist = false;
         Banana::$msgedit_canattach = true;
@@ -48,7 +67,7 @@ class MLBanana extends Banana
         MLBanana::$listname = $params['listname'];
         MLBanana::$domain   = $params['domain'];
         $params['group'] = $params['listname'] . '@' . $params['domain'];
-        parent::__construct($params, 'MLArchive');
+        parent::__construct($params, 'MLArchive', 'PlatalBananaMLPage');
     }
 
     public function run()
index 4931902..8096bb1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -20,6 +20,7 @@
  ***************************************************************************/
 
 require_once 'banana/banana.inc.php';
+require_once 'banana/message.func.inc.php';
 require_once 'banana/hooks.inc.php';
 
 function hook_checkcancel($_headers)
@@ -76,8 +77,6 @@ class ModerationBanana extends Banana
     }
 }
 
-require_once('banana/page.inc.php');
-
 class ModerationPage extends BananaPage
 {
     protected function prepare()
@@ -98,9 +97,6 @@ class ModerationPage extends BananaPage
     }
 }
 
-require_once('banana/protocoleinterface.inc.php');
-require_once('banana/message.inc.php');
-
 class BananaMLInterface implements BananaProtocoleInterface
 {
     private $infos; //(list, addr, host, desc, info, diff, ins, priv, sub, own, nbsub)
index 2597086..4909b68 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -332,6 +332,7 @@ class Redirect
     {
         foreach ($this->emails as &$mail) {
             if ($mail->email == $email) {
+                check_redirect($this);
                 return $mail->cleanErrors($this->uid);
             }
         }
@@ -351,6 +352,7 @@ class Redirect
                 $mail->active   = false;
             }
         }
+        check_redirect($this);
     }
 
     // function enable() {{{2
@@ -365,6 +367,7 @@ class Redirect
                 $mail->active   = true;
                 $mail->disabled = false;
             }
+            check_redirect($this);
         }
     }
 
@@ -406,5 +409,69 @@ class Redirect
     }
 }
 
+// class MailStorage {{{1
+class MailStorage {
+    protected $uid;
+    protected $name;
+    protected $storage;
+
+    public function __construct($_uid, $_name)
+    {
+        $this->uid = $_uid;
+        $this->name = $_name;
+
+        $res = XDB::query("SELECT  mail_storage
+                             FROM  auth_user_md5
+                            WHERE  user_id = {?}", $this->uid);
+        $this->storages = new FlagSet($res->fetchOneCell());
+    }
+
+    public function disable()
+    {
+        $this->storages->rmFlag($this->name);
+        XDB::execute("UPDATE  auth_user_md5
+                         SET  mail_storage = {?}
+                       WHERE  user_id = {?}", $this->storages->flags(), $this->uid);
+        return true;
+    }
+
+    public function enable()
+    {
+        $this->storages->addFlag($this->name);
+        XDB::execute("UPDATE  auth_user_md5
+                         SET  mail_storage = {?}
+                       WHERE  user_id = {?}", $this->storages->flags(), $this->uid);
+        return true;
+    }
+
+    public function active()
+    {
+        return $this->storages->hasFlag($this->name);
+    }
+}
+
+class MailStorageIMAP extends MailStorage {
+    public function __construct($_uid)
+    {
+        parent::__construct($_uid, 'imap');
+    }
+}
+
+class MailStorageGoogleApps extends MailStorage {
+    public function __construct($_uid)
+    {
+        parent::__construct($_uid, 'googleapps');
+    }
+    
+    public function disable() {
+        $redirect = new Redirect(S::v('uid'));
+        if (!$redirect->other_active(NULL)) {
+            return false;
+        }
+        
+        return parent::disable();
+    }
+}
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index 3069c8c..51fc43c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 9bb1b54..4fc17fa 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -51,12 +51,14 @@ class PlatalGlobals
     public function __construct($sess)
     {
         $this->session   = $sess;
-
-        $base = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
-        $this->baseurl   = @trim($base.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
         $this->spoolroot = dirname(dirname(__FILE__));
 
         $this->read_config();
+        if (isset($_SERVER) && isset($_SERVER['SERVER_NAME'])) {
+            $base = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
+            $this->baseurl   = @trim($base.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
+        }
+
         $this->setlocale();
     }
 
@@ -85,6 +87,103 @@ class PlatalGlobals
     {
         $this->read_ini_file($this->spoolroot.'/configs/platal.ini');
         $this->read_ini_file($this->spoolroot.'/configs/platal.conf');
+        if (file_exists($this->spoolroot.'/spool/conf/platal.dynamic.conf')) {
+            $this->read_ini_file($this->spoolroot.'/spool/conf/platal.dynamic.conf');
+        }
+    }
+
+    /** Writes an ini file separated in categories
+     * @param filename the name of the file to write (overwrite existing)
+     * @param categories an array of categories (array of keys and values)
+     */              
+    private static function write_ini_file($filename, &$categories)
+    {
+        // [category]
+        // key = value
+        $f = fopen($filename, 'w');
+        foreach ($categories as $cat => $conf) {
+            fwrite($f, '; {{{ '.$cat."\n\n");
+            fwrite($f, '['.$cat.']'."\n\n");
+            foreach ($conf as $k => $v) {
+                fwrite($f, $k.' = "'.str_replace('"','\\"',$v).'"'."\n");
+            }
+            fwrite($f, "\n".'; }}}'."\n");
+        }
+        fwrite($f, '; vim:set syntax=dosini foldmethod=marker:'."\n");
+        fclose($f);
+    }
+
+    /** Change dynamic config file
+     * @param conf array of keys and values to add or replace
+     * @param category name of category to change
+     * 
+     * Opens the dynamic conf file and set values from conf in specified
+     * category. Updates config vars too.
+     */ 
+    public function change_dynamic_config($conf, $category = 'Core')
+    {
+        $dynamicfile = $this->spoolroot.'/spool/conf/platal.dynamic.conf';
+        if (file_exists($dynamicfile)) {
+            $array = parse_ini_file($dynamicfile, true);
+        } else {
+            $array = null;
+        }
+        if (!is_array($array)) {
+            // dynamic conf is empty
+            $array = array($category => $conf);
+        } else {
+            // looks for a category that looks the same (case insensitive)
+            $same = false;
+            foreach ($array as $m => &$c) {
+                if (strtolower($m) == strtolower($category)) {
+                    $same = $m;
+                    break;
+                }
+            }
+            if (!$same) {
+                // this category doesn't exist yet
+                $array[$category] = $conf;
+            } else {
+                // this category already exists
+                $conflower = array();
+                foreach ($conf as $k => $v) {
+                    $conflower[strtolower($k)] = $v;
+                }
+                // $conflower is now same as $conf but with lower case keys
+                // replaces values of keys that already exists
+                foreach ($array[$same] as $k => $v) {
+                    if (isset($conflower[strtolower($k)])) {
+                        $array[$same][$k] = $conflower[strtolower($k)];
+                        unset($conflower[strtolower($k)]);
+                    }
+                }
+                // add new keys
+                foreach ($conf as $k => $v) {
+                    if (isset($conflower[strtolower($k)])) {
+                        $array[$same][$k] = $v;
+                    }
+                } 
+            }
+        }
+        // writes the file over
+        PlatalGlobals::write_ini_file($dynamicfile, $array);
+        // rereads the new config to correctly set vars
+        $this->read_ini_file($dynamicfile);
+    }
+
+    public function bootstrap($conf, $callback, $category = 'Core')
+    {
+        $bootstrap = false;
+        $category = strtolower($category);
+        foreach ($conf as $key) {
+            if (!isset($this->$category->$key)) {
+                $bootstrap = true;
+                break;
+            }
+        }
+        if ($bootstrap) {
+            call_user_func($callback);
+        }
     }
 
     private function setlocale()
diff --git a/include/googleapps.inc.php b/include/googleapps.inc.php
new file mode 100644 (file)
index 0000000..f893fcd
--- /dev/null
@@ -0,0 +1,447 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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                *
+ ***************************************************************************/
+
+// Post-processes the successful Google Apps account creation queue job.
+function post_queue_u_create($job) {
+    global $globals;
+
+    // Retrieves the user parameters (userid and forlife).
+    $parameters = json_decode($job['j_parameters'], true);
+    $forlife = isset($parameters['username']) ? $parameters['username'] : null;
+    $userid = $job['q_recipient_id'];
+    if (!$forlife || !$userid) {
+        return;
+    }
+
+    // Adds a redirection to the Google Apps delivery address, if requested by
+    // the user at creation time.
+    $account = new GoogleAppsAccount($userid, $forlife);
+    if ($account->activate_mail_redirection) {
+        require_once('emails.inc.php');
+        $storage = new MailStorageGoogleApps($userid);
+        $storage->enable();
+    }
+
+    // Sends the 'account created' email to the user, with basic documentation.
+    $res = XDB::query(
+        "SELECT  FIND_IN_SET('femme', u.flags), prenom
+           FROM  auth_user_md5 AS u
+     INNER JOIN  aliases AS a ON (a.id = u.user_id)
+          WHERE  a.alias = {?}",
+        $forlife);
+    list($sexe, $prenom) = $res->fetchOneRow();
+
+    $mailer = new PlMailer('googleapps/create.mail.tpl');
+    $mailer->assign('account', $account);
+    $mailer->assign('email', $forlife . '@' . $globals->mail->domain);
+    $mailer->assign('googleapps_domain', $globals->mailstorage->googleapps_domain);
+    $mailer->assign('prenom', $prenom);
+    $mailer->assign('sexe', $sexe);
+    $mailer->send();
+}
+
+// Post-processes the successful Google Apps account update queue job.
+function post_queue_u_update($job) {
+    global $globals;
+
+    // If the u_update job was an unsuspend request, re-adds the redirection
+    // to the Google Apps delivery address, provided the account is active (it might
+    // have been deleted between the unsuspension and the post-queue processing).
+    $parameters = json_decode($job['j_parameters'], true);
+    $forlife = isset($parameters['username']) ? $parameters['username'] : null;
+    $userid = $job['q_recipient_id'];
+    if (!$forlife || !$userid) {
+        return;
+    }
+
+    if (isset($parameters['suspended']) && $parameters['suspended'] == false) {
+        require_once('emails.inc.php');
+        $account = new GoogleAppsAccount($userid, $forlife);
+        if ($account->active()) {
+            // Re-adds the email redirection (if the user did request it).
+            if ($account->activate_mail_redirection) {
+                $storage = new MailStorageGoogleApps($userid);
+                $storage->enable();
+            }
+
+            // Sends an email to the account owner.
+            $res = XDB::query(
+                "SELECT  FIND_IN_SET('femme', u.flags), prenom
+                   FROM  auth_user_md5 AS u
+             INNER JOIN  aliases AS a ON (a.id = u.user_id)
+                  WHERE  a.alias = {?}",
+                $forlife);
+            list($sexe, $prenom) = $res->fetchOneRow();
+
+            $mailer = new PlMailer('googleapps/unsuspend.mail.tpl');
+            $mailer->assign('account', $account);
+            $mailer->assign('email', $forlife . '@' . $globals->mail->domain);
+            $mailer->assign('prenom', $prenom);
+            $mailer->assign('sexe', $sexe);
+            $mailer->send();
+        }
+    }
+}
+
+// Reprensentation of an SQL-stored Google Apps account.
+// This class is the interface with the gappsd SQL tables: gappsd is the python
+// daemon which deals with Google Apps provisioning APIs.
+// TODO(vincent.zanotti): add the url of gappsd, when available.
+class GoogleAppsAccount
+{
+    // User identification: user id, and forlife.
+    private $uid;
+    public $g_account_name;
+
+    // Local account parameters.
+    public $sync_password;
+    public $activate_mail_redirection;
+
+    // Account status, obtained from Google Apps provisioning & reporting APIs.
+    public $g_account_id;
+    public $g_status;
+    public $g_suspension;
+    public $r_disk_usage;
+    public $r_creation;
+    public $r_last_login;
+    public $r_last_webmail;
+    public $reporting_date;
+
+    // Pending requests in the gappsd job queue (cf. top note).
+    public $pending_create;
+    public $pending_delete;
+    public $pending_update;
+    public $pending_update_admin;
+    public $pending_update_other;
+    public $pending_update_password;
+    public $pending_update_suspension;
+
+    // Pending requests in plat/al validation queue.
+    public $pending_validation_unsuspend;
+
+    // Constructs the account object, by retrieving all informations from the
+    // GApps account table, from GApps job queue, and from plat/al validation queue.
+    public function __construct($uid, $account_name = NULL)
+    {
+        if ($account_name == NULL) {
+            require_once 'user.func.inc.php';
+            $account_name = get_user_forlife($uid, '_silent_user_callback');
+        }
+
+        $this->uid = $uid;
+        $this->g_account_name = $account_name;
+        $this->g_status = NULL;
+
+        $res = XDB::query(
+            "SELECT  l_sync_password, l_activate_mail_redirection,
+                     g_account_name, g_account_id, g_status, g_suspension, r_disk_usage,
+                     UNIX_TIMESTAMP(r_creation) as r_creation,
+                     UNIX_TIMESTAMP(r_last_login) as r_last_login,
+                     UNIX_TIMESTAMP(r_last_webmail) as r_last_webmail
+               FROM  gapps_accounts
+              WHERE  g_account_name = {?}",
+            $account_name);
+        if ($account = $res->fetchOneAssoc()) {
+            $this->sync_password = $account['l_sync_password'];
+            $this->activate_mail_redirection = $account['l_activate_mail_redirection'];
+            $this->g_account_id = $account['g_account_id'];
+            $this->g_status = $account['g_status'];
+            $this->g_suspension = $account['g_suspension'];
+            $this->r_disk_usage = $account['r_disk_usage'];
+            $this->r_creation = $account['r_creation'];
+            $this->r_last_login = $account['r_last_webmail'];
+            $this->r_last_webmail = $account['r_last_webmail'];
+
+            $this->load_pending_counts();
+            $this->load_pending_validations();
+            if ($this->pending_update) {
+                $this->load_pending_updates();
+            }
+
+            $res = XDB::query("SELECT MAX(date) FROM gapps_reporting");
+            $this->reporting_date = $res->fetchOneCell();
+        }
+    }
+
+    // Determines if changes to the Google Account are currently waiting in the
+    // GApps job queue, and initializes the local values accordingly.
+    private function load_pending_counts()
+    {
+        $res = XDB::query(
+            "SELECT  SUM(j_type = 'u_create') AS pending_create,
+                     SUM(j_type = 'u_update') AS pending_update,
+                     SUM(j_type = 'u_delete') AS pending_delete
+               FROM  gapps_queue
+              WHERE  q_recipient_id = {?} AND
+                     p_status IN ('idle', 'active', 'softfail')
+           GROUP BY  j_type",
+            $this->uid);
+        $pending = $res->fetchOneAssoc();
+        $this->pending_create = $pending['pending_create'];
+        $this->pending_update = $pending['pending_update'];
+        $this->pending_delete = $pending['pending_delete'];
+
+        $this->pending_update_admin = false;
+        $this->pending_update_other = false;
+        $this->pending_update_password = false;
+        $this->pending_update_suspension = false;
+    }
+
+    // Checks for unsuspend requests waiting for validation in plat/al
+    // validation queue.
+    private function load_pending_validations()
+    {
+        require_once('validations.inc.php');
+        $this->pending_validation_unsuspend =
+            Validate::get_typed_requests_count($this->uid, 'gapps-unsuspend');
+    }
+
+    // Retrieves all the pending update job in the gappsd queue for the current
+    // user, and analyzes the scope of the update (ie. the fields in the user
+    // account which are going to be updated).
+    private function load_pending_updates()
+    {
+        $res = XDB::iterator(
+            "SELECT  j_parameters
+               FROM  gapps_queue
+              WHERE  q_recipient_id = {?} AND
+                     p_status IN ('idle', 'active', 'softfail') AND
+                     j_type = 'u_update'",
+            $this->uid);
+        while ($update = $res->next()) {
+            $update_data = json_decode($update["j_parameters"], true);
+
+            if (isset($update_data["suspended"])) {
+                $this->pending_update_suspension = true;
+            } elseif (isset($update_data["password"])) {
+                $this->pending_update_password = true;
+            } elseif (isset($update_data["admin"])) {
+                $this->pending_update_admin = true;
+            } else {
+                $this->pending_update_other = true;
+            }
+        }
+    }
+
+    // Creates a queue job of the @p type, for the user represented by this
+    // GoogleAppsAccount object, using @p parameters. @p parameters is supposed
+    // to be a one-dimension array of key-value mappings.
+    // The created job as a 'normal' priority, and is scheduled for immediate
+    // execution.
+    private function create_queue_job($type, $parameters) {
+        $parameters["username"] = $this->g_account_name;
+        XDB::execute(
+            "INSERT  INTO gapps_queue
+                SET  q_owner_id = {?}, q_recipient_id = {?},
+                     p_entry_date = NOW(), p_notbefore_date = NOW(),
+                     p_priority = 'normal',
+                     j_type = {?}, j_parameters = {?}",
+            S::v('uid'),
+            $this->uid,
+            $type,
+            json_encode($parameters));
+    }
+
+
+    // Returns true if the account is currently active.
+    public function active()
+    {
+        return $this->g_status == 'active';
+    }
+
+    // Returns true if the account exists in Google Apps.
+    public function provisioned()
+    {
+        return $this->g_status == 'active' or $this->g_status == 'disabled';
+    }
+
+    // Returns true if the account exists, but cannot be used (user-requested
+    // suspension, or Google-requested suspension).
+    public function suspended()
+    {
+        return $this->g_status == 'disabled';
+    }
+
+
+    // Changes the GoogleApps password.
+    public function set_password($password) {
+        if (!$this->provisioned()) {
+            return;
+        }
+
+        if (!$this->pending_update_password) {
+            $this->create_queue_job('u_update', array('password' => $password));
+            $this->pending_update_password = true;
+        }
+    }
+
+
+    // Changes the password synchronization status ("sync = true" means that the
+    // Polytechnique.org password will be replicated to the Google Apps account).
+    public function set_password_sync($sync) {
+        if (!$this->provisioned()) {
+            return;
+        }
+
+        $this->sync_password = $sync;
+        XDB::execute(
+            "UPDATE  gapps_accounts
+                SET  l_sync_password = {?}
+              WHERE  g_account_name = {?}",
+            $sync,
+            $this->g_account_name);
+    }
+
+    // Suspends the Google Apps account.
+    public function suspend() {
+        if (!$this->provisioned()) {
+            return;
+        }
+
+        if (!$this->pending_update_suspension) {
+            $this->create_queue_job('u_update', array('suspended' => true));
+            $this->pending_update_suspension = true;
+        }
+    }
+
+    // Adds an unsuspension request to the validation queue (used on user-request).
+    public function unsuspend($activate_mail_redirection = NULL) {
+        if (!$this->provisioned()) {
+            return;
+        }
+        if ($activate_mail_redirection !== NULL) {
+            $this->activate_mail_redirection = $activate_mail_redirection;
+            XDB::execute(
+                "UPDATE  gapps_accounts
+                    SET  l_activate_mail_redirection = {?}
+                  WHERE  g_account_name = {?}",
+                $activate_mail_redirection,
+                $this->g_account_name);
+        }
+
+        if (!$this->pending_update_suspension && !$this->pending_validation_unsuspend) {
+            require_once('validations.inc.php');
+            $unsuspend = new GoogleAppsUnsuspendReq($this->uid);
+            $unsuspend->submit();
+            $this->pending_validation_unsuspend = true;
+        }
+    }
+
+    // Unsuspends the Google Apps account (used on admin-request, or on validation of
+    // an user-request).
+    public function do_unsuspend() {
+        if (!$this->provisioned()) {
+            return;
+        }
+
+        if (!$this->pending_update_suspension) {
+            if ($this->sync_password) {
+                $res = XDB::query(
+                    "SELECT  password
+                       FROM  auth_user_md5
+                      WHERE  user_id = {?}",
+                    $this->uid);
+                $password = ($res->numRows() > 0 ? $res->fetchOneCell() : false);
+            } else {
+                $password = false;
+            }
+
+            if ($password) {
+                $this->create_queue_job('u_update', array('suspended' => false, 'password' => $password));
+            } else {
+                $this->create_queue_job('u_update', array('suspended' => false));
+            }
+            $this->pending_update_suspension = true;
+            return true;
+        }
+        return false;
+    }
+
+    // Creates a new Google Apps account with the @p local parameters.
+    public function create($password_sync, $password, $redirect_mails) {
+        if ($this->g_status != NULL) {
+            return;
+        }
+
+        if (!$this->pending_create) {
+            // Retrieves information on the new account.
+            $res = XDB::query(
+                "SELECT  nom, nom_usage, prenom
+                   FROM  auth_user_md5
+                  WHERE  user_id = {?}",
+                $this->uid);
+            list($nom, $nom_usage, $prenom) = $res->fetchOneRow();
+
+            // Adds an 'unprovisioned' entry in the gapps_accounts table.
+            XDB::execute(
+                "INSERT  INTO gapps_accounts
+                    SET  l_userid = {?},
+                         l_sync_password = {?},
+                         l_activate_mail_redirection = {?},
+                         g_account_name = {?},
+                         g_first_name = {?},
+                         g_last_name = {?},
+                         g_status = 'unprovisioned'",
+                $this->uid,
+                $password_sync,
+                $redirect_mails,
+                $this->g_account_name,
+                $prenom,
+                ($nom_usage ? $nom_usage : $nom));
+
+            // Adds the creation job in the GApps queue.
+            $this->create_queue_job(
+                'u_create',
+                array(
+                    'username' => $this->g_account_name,
+                    'first_name' => $prenom,
+                    'last_name' => ($nom_usage ? $nom_usage : $nom),
+                    'password' => $password,
+                ));
+
+            // Updates the GoogleAppsAccount status.
+            $this->__construct($this->uid, $this->g_account_name);
+        }
+    }
+
+
+    // Returns the status of the Google Apps account for @p user, or false
+    // when no account exists.
+    static public function account_status($uid) {
+        $res = XDB::query(
+            "SELECT  g_status
+               FROM  gapps_accounts
+              WHERE  l_userid = {?}", $uid);
+        return ($res->numRows() > 0 ? $res->fetchOneCell() : false);
+    }
+
+    // Returns true if the @p user is an administrator of the Google Apps domain.
+    static public function is_administrator($uid) {
+        $res = XDB::query(
+            "SELECT  g_admin
+               FROM  gapps_accounts
+              WHERE  l_userid = {?} AND g_status = 'active'", $uid);
+        return ($res->numRows() > 0 ? (bool)$res->fetchOneRow() : false);
+    }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
index 93406c0..52060e2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 792e860..e9b0db1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index abd8482..f6dd15d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -215,7 +215,7 @@ class Marketing
         $pass_encrypted = hash_encrypt($pass);
         $fdate    = strftime('%d %B %Y', strtotime($date));
 
-        $mymail = new PlMailer('marketing/mail.relance.tpl');
+        $mymail = new PlMailer('marketing/relance.mail.tpl');
         $mymail->assign('nbdix',      $nbx);
         $mymail->assign('fdate',      $fdate);
         $mymail->assign('lusername',  $alias);
@@ -287,7 +287,7 @@ class AnnuaireMarketing implements MarketingEngine
 
     public function getText(array $user)
     {
-        $page = new XorgPage('marketing/mail.marketing.tpl', NO_SKIN);
+        $page = new XorgPage('marketing/marketing.mail.tpl', NO_SKIN);
         $this->prepareText($page, $user);
         return $page->raw();
     }
index 530d554..07d9ee6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 0ab9899..07aac94 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -31,7 +31,7 @@ class NewsLetter extends MassMailer
 
     function __construct($id = null)
     {
-        parent::__construct('newsletter/nl.tpl', 'nl.css', 'nl/show', 'newsletter', 'newsletter_ins');
+        parent::__construct('newsletter/nl.mail.tpl', 'nl.css', 'nl/show', 'newsletter', 'newsletter_ins');
         if (isset($id)) {
             if ($id == 'last') {
                 $res = XDB::query("SELECT MAX(id) FROM newsletter WHERE bits!='new'");
index b77bd34..95ae89c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -39,9 +39,13 @@ function register_watch_op($uid, $cid, $date='', $info='')
     if (empty($date)) {
         $date = date('Y-m-d');
     };
-    XDB::execute('REPLACE INTO watch_ops (uid,cid,known,date,info) VALUES({?},{?},NOW(),{?},{?})',
-        $uid, $cid, $date, $info);
+    XDB::execute('REPLACE INTO  watch_ops (uid,cid,known,date,info)
+                        VALUES  ({?}, {?}, NOW(), {?}, {?})',
+                 $uid, $cid, $date, $info);
     if($cid == WATCH_FICHE) {
+        if ($info) {
+            register_profile_update($uid, $info);
+        }
         XDB::execute('UPDATE auth_user_md5 SET DATE=NOW() WHERE user_id={?}', $uid);
     } elseif($cid == WATCH_INSCR) {
         XDB::execute('REPLACE INTO  contacts (uid,contact)
@@ -50,6 +54,8 @@ function register_watch_op($uid, $cid, $date='', $info='')
                              WHERE  ni_id={?}', $uid);
         XDB::execute('DELETE FROM watch_nonins WHERE ni_id={?}', $uid);
     }
+    require_once 'xorg.misc.inc.php';
+    update_NbNotifs();
 }
 
 // }}}
@@ -130,29 +136,51 @@ function select_notifs($mail, $uid=null, $last=null, $iterator=true)
 }
 
 // }}}
-// {{{ function getNbNotifs
-
-function getNbNotifs()
-{
-    if (!S::has('uid')) {
-        return 0;
-    }
-    $uid       = S::v('uid', -1);
-    $watchlast = S::v('watch_last');
-
-    // selectionne les notifs de uid, sans detail sur le watcher, depuis
-    // $watchlast, meme ceux sans surveillance, non ordonnés
-    $res = select_notifs(false, $uid, $watchlast, false);
-    $n   = $res->numRows();
-    $res->free();
-    if ($n == 0) {
-        return;
+// {{{
+
+global $prf_desc;
+$prf_desc = array('nom' => 'Son patronyme',
+                  'freetext' => 'Le texte libre',
+                  'mobile' => 'Son numéro de téléphone portable',
+                  'nationalite' => 'Sa nationalité',
+                  'nick' => 'Son surnom',
+                  'web' => 'L\'adresse de son site web',
+                  'appli1' => 'Son école d\'application',
+                  'appli2' => 'Son école de post-application',
+                  'addresses' => 'Ses adresses',
+                  'section' => 'Sa section sportive',
+                  'binets' => 'La liste de ses binets',
+                  'medals' => 'Ses décorations',
+                  'cv' => 'Son Curriculum Vitae',
+                  'jobs' => 'Ses informations professionnelles',
+                  'photo' => 'Sa photographie');
+
+function get_profile_change_details($event, $limit) {
+    global $prf_desc;
+    $res = XDB::iterRow("SELECT  field
+                           FROM  watch_profile
+                          WHERE  uid = {?} AND ts > {?}
+                       ORDER BY  ts DESC",
+                         $event['uid'], $limit);
+    if ($res->total() > 0) {
+        $data = array();
+        while (list($field) = $res->next()) {
+            $data[] .= $prf_desc[$field];
+        }
+        return '<ul><li>' . implode('</li><li>', $data) . '</li></ul>';
     }
-
-    return "<a href='carnet/panel'>$n événement".($n > 1 ? 's' : '')." !</a>";
+    return null;
 }
 
 // }}}
+// {{{ function register_profile_update
+
+function register_profile_update($uid, $field) {
+    XDB::execute("REPLACE INTO  watch_profile (uid, ts, field)
+                        VALUES  ({?}, NOW(), {?})",
+                 $uid, $field);
+}
+
 // {{{ class AllNotifs
 
 class AllNotifs
@@ -208,6 +236,9 @@ class Notifs
         // depuis la semaine dernière, meme ceux sans surveillance, ordonnés
         $res = select_notifs(false, $uid, $lastweek);
         while($tmp = $res->next()) {
+            if ($tmp['cid'] == WATCH_FICHE) {
+                $tmp['data'] = get_profile_change_details($tmp, $lastweek);
+            }
             $this->_data[$tmp['cid']][$tmp['promo']][] = $tmp;
         }
 
index ad6bbe9..6bfd24f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -49,6 +49,10 @@ function __autoload($cls)
         if (substr($cls, -3, 3) == 'req') {
             @include 'validations.inc.php';
             return;
+        } else if (substr($cls, 0, 6) == 'banana') {
+            require_once 'banana/banana.inc.php';
+            Banana::load(substr($cls, 6));
+            return;
         }
         @include "$cls.inc.php";
     }
@@ -74,7 +78,8 @@ function pl_error_handler($errno, $errstr, $errfile, $errline)
             E_USER_ERROR      => "User Error",
             E_USER_WARNING    => "User Warning",
             E_USER_NOTICE     => "User Notice",
-            E_STRICT          => "Runtime Notice"
+            E_STRICT          => "Runtime Notice",
+            E_RECOVERABLE_ERROR => "Recoverable Error"
         );
     }
 
@@ -85,10 +90,11 @@ function pl_error_handler($errno, $errstr, $errfile, $errline)
         }
     }
 
+    $type = isset($errortype[$errno]) ? $errortype[$errno] : $errno;
     $errstr = utf8_encode(htmlentities($errstr));
     $GLOBALS['pl_errors'][] =
         "<div class='phperror'>".
-        "<strong>{$errortype[$errno]}</strong> <em>$errstr</em><br />".
+        "<strong>{$type}</strong> <em>$errstr</em><br />".
         "<tt>$errfile : $errline</tt>".
         "</div>";
 }
index cd493cd..8a5edbf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 22a8a2b..9dc4f86 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index dd8dd96..52a62cf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 58384d0..208272f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7a4ec0c..05da262 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -70,6 +70,13 @@ function user_clear_all_subs($user_id, $really_del=true)
 
     $mmlist = new MMList(S::v('uid'), S::v('password'));
     $mmlist->kill($alias, $really_del);
+
+    // Deactivates, when available, the Google Apps account of the user.
+    if ($globals->mailstorage->googleapps_domain) {
+        require_once 'googleapps.inc.php';
+        $account = new GoogleAppsAccount($uid, $alias);
+        $account->suspend();
+    }
 }
 
 // }}}
index a0f72b1..6392160 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -48,7 +48,7 @@ class UserSet extends PlSet
                                 'INNER JOIN groupex.membres AS gxm ON (u.user_id = gxm.uid
                                                                        AND gxm.asso_id = ' . $globals->asso('id') . ') ' : '')
                            . 'LEFT JOIN auth_user_quick AS q USING (user_id)
-                              LEFT JOIN aliases         AS a ON (a.id = u.user_id AND type = \'a_vie\')
+                              LEFT JOIN aliases         AS a ON (a.id = u.user_id AND a.type = \'a_vie\')
                               ' . $joins,
                             $where,
                             'u.user_id');
@@ -88,7 +88,7 @@ class SearchSet extends UserSet
         $qSearch = new QuickSearch('quick');
         $fields  = new SFieldGroup(true, array($qSearch));
         if ($qSearch->isEmpty()) {
-            new ThrowError('Recherche trop générale.');
+            new ThrowError('Aucun critère de recherche n\'est spécifié.');
         }
         $this->score = $qSearch->get_score_statement();
         $pwhere = $fields->get_where_statement();
@@ -110,7 +110,7 @@ class SearchSet extends UserSet
                                                       'u.promo DESC, NomSortKey, prenom')));
     }
 
-    private function getAdvanced()
+    private function getAdvanced($join, $where)
     {
         global $globals;
         $this->advanced = true;
@@ -374,5 +374,47 @@ class GeolocView implements PlView
     }
 }
 
+class GadgetView implements PlView
+{
+    public function __construct(PlSet &$set, $data, array $params)
+    {
+        $this->set =& $set;
+    }
+
+    public function fields()
+    {
+        return "u.user_id AS id,
+                u.*, a.alias AS forlife," .
+                (S::logged() ? "q.profile_mobile AS mobile, " : "IF(q.profile_mobile_pub = 'public', q.profile_mobile, NULL) as mobile, ") .
+               "u.perms != 'pending' AS inscrit,
+                u.perms != 'pending' AS wasinscrit,
+                u.deces != 0 AS dcd, u.deces,
+                FIND_IN_SET('femme', u.flags) AS sexe,
+                adr.city, gp.a2, gp.pays AS countrytxt, gr.name AS region" .
+                (S::logged() ? ", c.contact AS contact" : '');
+    }
+
+    public function joins()
+    {
+        return  "LEFT JOIN  adresses       AS adr ON (u.user_id = adr.uid AND FIND_IN_SET('active', adr.statut)".(S::logged() ? "" : " AND adr.pub = 'public'").")
+                 LEFT JOIN  geoloc_pays    AS gp  ON (adr.country = gp.a2)
+                 LEFT JOIN  geoloc_region  AS gr  ON (adr.country = gr.a2 AND adr.region = gr.region)" .
+                (S::logged() ?
+                 "LEFT JOIN  contacts       AS c   On (c.contact = u.user_id AND c.uid = " . S::v('uid') . ")"
+                 : "");
+    }
+
+    public function apply(PlatalPage &$page)
+    {
+        $page->assign_by_ref('set',
+          $this->set->get($this->fields(), $this->joins(), null, null, null, 5, 0));
+    }
+
+    public function args()
+    {
+        return null;
+    }
+}
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index 536975f..1b05e67 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -115,6 +115,8 @@ abstract class Validate
         XDB::execute('INSERT INTO requests (user_id, type, data, stamp) VALUES ({?}, {?}, {?}, {?})',
                 $this->uid, $this->type, $this, $this->stamp);
 
+        global $globals;
+        update_NbValid();
         return true;
     }
 
@@ -138,12 +140,14 @@ abstract class Validate
     public function clean()
     {
         if ($this->unique) {
-            return XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?}',
-                    $this->uid, $this->type);
+            $success = XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?}',
+                                    $this->uid, $this->type);
         } else {
-            return XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?} AND stamp={?}',
-                    $this->uid, $this->type, $this->stamp);
+            $success =  XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?} AND stamp={?}',
+                                      $this->uid, $this->type, $this->stamp);
         }
+        update_NbValid();
+        return $success;
     }
 
     // }}}
@@ -309,6 +313,17 @@ abstract class Validate
     }
 
     // }}}
+    // {{{ function get_typed_requests_count()
+
+    /** same as get_typed_requests() but return the count of available requests.
+     */
+    static public function get_typed_requests_count($uid, $type)
+    {
+        $res = XDB::query('SELECT COUNT(data) FROM requests WHERE user_id={?} and type={?}', $uid, $type);
+        return $res->fetchOneCell();
+    }
+
+    // }}}
     // {{{ function _mail_body
 
     abstract protected function _mail_body($isok);
index 6ff67a0..0377694 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 3ae1ed3..f521865 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -39,7 +39,7 @@ class BrokenReq extends Validate
     public $rules = "Accepter si l'adresse mail parait correcte, et pas absurde (ou si le marketeur est de confiance).
     Si le demandeur marque sa propre adresse mail, refuser dans tous les cas.
     Si l'adresse proposée est surveillée, refuser.
-    Si le compte associé est désactivé, étudier le cas en fonction de la raison de la désactivation";
+    Si le compte associé est désactivé, étudier le cas en fonction de la raison de la désactivation.";
     // }}}
     // {{{ constructor
 
@@ -102,7 +102,7 @@ class BrokenReq extends Validate
 
         XDB::execute("UPDATE  emails AS e
                   INNER JOIN  aliases AS a ON (a.id = e.uid)
-                         SET  e.flags = 'active'
+                         SET  e.flags = 'active', panne_level = 2
                        WHERE  a.alias = {?} AND e.email = {?}", $this->m_forlife, $this->m_email);
         if (XDB::affectedRows() > 0) {
             $this->m_reactive = true;
@@ -116,7 +116,7 @@ class BrokenReq extends Validate
                              . "N'hésite pas à aller gérer toi-même tes redirections en te rendant à la page :\n"
                              . "https://www.polytechnique.org/emails/redirect\n"
                              . "Si tu as perdu ton mot de passe d'accès au site, tu peux également effectuer la procédure de récupération à l'adresse :\n"
-                             . "https://www.polytechnique.org/recovery\n"
+                             . "https://www.polytechnique.org/recovery\n\n"
                              . "-- \nTrès Cordialement,\nL'Équipe de Polytechnique.org\n"));
             $mailer->send();
             return true;
@@ -150,7 +150,7 @@ class BrokenReq extends Validate
               . $reason . "\n\n"
               . "L'adresse {$this->m_email} nous a été communiquée, veux-tu que cette adresse devienne ta nouvelle "
               . "adresse de redirection ? Si oui, envoie nous des informations qui "
-              . "nous permettront de nous assurer de ton identité (par exemple ta date de naissance et ta promotion)\n"
+              . "nous permettront de nous assurer de ton identité (par exemple ta date de naissance et ta promotion).\n\n"
               . "-- \nTrès Cordialement,\nL'Équipe de Polytechnique.org\n";
         $body = wordwrap($body, 78);
         $mailer = new PlMailer();
index ed22c95..a1a3985 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/include/validations/googleapps.inc.php b/include/validations/googleapps.inc.php
new file mode 100644 (file)
index 0000000..7413d73
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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 GoogleAppsUnsuspendReq extends Validate
+{
+    private $account;
+    public $rules = "Bien faire attention à la raison de la suspension. Si le compte a été suspendu par Google,
+                  alors la raison s'affichera (mais seulement 24-48h après la suspension).
+                  Si l'utilisateur a désactivé lui-même son compte, la raison sera toujours vierge.";
+
+    public function __construct($_uid)
+    {
+        parent::__construct($_uid, true, 'gapps-unsuspend');
+    }
+
+    public function sendmail($isok)
+    {
+        // Using overloading to prevent the validation from sending emails, as a valid
+        // unsuspend will automatically generate an email when commited through
+        // the Google Apps provisioning API.
+        if (!$isok) {
+            parent::sendmail($isok);
+        }
+    }
+
+    public function formu()
+    {
+        return 'include/form.valid.gapps-unsuspend.tpl';
+    }
+
+    protected function _mail_subj()
+    {
+        return "[Polytechnique.org] Demande de réactivation de ton compte Google Apps";
+    }
+
+    protected function _mail_body($isok)
+    {
+        if (!$isok) {
+            return "  La demande que tu avais faite de réactivation de compte Google Apps a été refusée.";
+        }
+    }
+
+    public function commit()
+    {
+        require_once dirname(__FILE__) . '/../googleapps.inc.php';
+        $account = new GoogleAppsAccount($this->uid, $this->forlife);
+        return $account->do_unsuspend();
+    }
+
+    public function suspension_reason()
+    {
+        $res = XDB::query(
+            "SELECT  g_suspension
+               FROM  gapps_accounts
+              WHERE  g_account_name = {?}",
+            $this->forlife);
+        return $res->fetchOneCell();
+    }
+}
+
+/* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 foldmethod=marker enc=utf-8: */
+?>
index b88586c..ac9de91 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ffa56ee..47471e4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -112,7 +112,7 @@ class ListeReq extends Validate
                                   $this->owners, $this->members);
         $liste = strtolower($this->liste);
         if ($ret) {
-            foreach(Array($liste, $liste."-owner", $liste."-admin", $liste."-bounces") as $l) {
+            foreach(Array($liste, $liste."-owner", $liste."-admin", $liste."-bounces", $liste."-unsubscribe") as $l) {
                 XDB::execute("INSERT INTO aliases (alias,type) VALUES({?}, 'liste')", $l);
             }
         }
index adf3fd0..c9bb7e3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7e65dc5..98d14d2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -100,7 +100,11 @@ class MedalReq extends Validate
 
     public function commit ()
     {
-        return XDB::execute('REPLACE INTO profile_medals_sub VALUES({?}, {?}, {?})', $this->uid, $this->mid, $this->gid);
+        require_once 'notifs.inc.php';
+        register_watch_op($this->uid, WATCH_FICHE, 'medals');
+        return XDB::execute('REPLACE INTO  profile_medals_sub
+                                   VALUES  ({?}, {?}, {?})',
+                            $this->uid, $this->mid, $this->gid);
     }
 
     // }}}
index fe4114e..74ff546 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 5c01b0c..26181b6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -92,6 +92,13 @@ class UsageReq extends Validate
             if ($this->nom_usage) {
                 $res .= "\n\n  Les alias {$this->alias}@{$globals->mail->domain} et @{$globals->mail->domain2} sont maintenant à ta disposition !";
             }
+            if ($globals->mailstorage->googleapps_domain) {
+                require_once 'googleapps.inc.php';
+                $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+                if ($account->active()) {
+                    $res .= "\n\n  Si tu utilises Google Apps, tu peux changer ton nom d'usage sur https://mail.google.com/a/polytechnique.org/#settings/accounts";
+                }
+            }
             return $res;
         } else {
             return "  La demande de changement de nom d'usage que tu avais faite a été refusée.";
@@ -103,6 +110,8 @@ class UsageReq extends Validate
 
     public function commit()
     {
+        require_once 'notifs.inc.php';
+        register_watch_op($this->uid, WATCH_FICHE, 'nom');
         require_once('user.func.inc.php');
         $this->bestalias = set_new_usage($this->uid, $this->nom_usage, $this->alias);
         return true;
index f734421..1cf625c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -58,7 +58,7 @@ class OrangeReq extends Validate
 
     protected function _mail_subj()
     {
-        return "[Polytechnique.org/ORANGE] Changement de nom de promo de sortie";
+        return "[Polytechnique.org/ORANGE] Changement de promo de sortie";
     }
 
     // }}}
index f6c5964..5d9347d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -193,7 +193,7 @@ class PayReq extends Validate
                 }
                 $topay = $u['montant'] - $u['paid'];
                 if ($topay > 0) {
-                    $mailer = new PlMailer('xnetevents/mail.new_payment.tpl');
+                    $mailer = new PlMailer('xnetevents/newpayment.mail.tpl');
                     $mailer->assign('asso', $nom);
                     $mailer->assign('diminutif', $diminutif);
                     $mailer->assign('evt', $evt);
index c62cff7..26f45f8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -137,11 +137,11 @@ class PhotoReq extends Validate
 
     public function commit()
     {
+        require_once 'notifs.inc.php';
         XDB::execute('REPLACE INTO  photo (uid, attachmime, attach, x, y)
                             VALUES  ({?},{?},{?},{?},{?})',
                      $this->uid, $this->mimetype, $this->data, $this->x, $this->y);
-        require_once('notifs.inc.php');
-        register_watch_op($this->uid, WATCH_FICHE);
+        register_watch_op($this->uid, WATCH_FICHE, 'photo');
         return true;
     }
 
index c0be8bb..5a519b4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 1a84dc8..ebda6af 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 628fb27..3c7f3b5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index e374515..906c0e1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index dfd587f..e7a45a9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 8e13153..e9689e3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 554690f..c9ec661 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -96,7 +96,7 @@ class XnetPage extends PlatalPage
             if ($perms->hasFlag('groupannu')) {
                 $sub['annuaire du groupe'] = "$dim/annuaire";
                 $sub['trombinoscope'] = "$dim/trombi";
-                $sub['carte'] = "$dim/geoloc";
+                $sub['planisphère'] = "$dim/geoloc";
             }
             if ($perms->hasFlag('groupmember')) {
                 if ($globals->asso('forum')) {
index 175a031..ef6c733 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -35,7 +35,7 @@ class XnetSession
                 $returl = "http://{$_SERVER['SERVER_NAME']}".substr($_SERVER['REQUEST_URI'], 0, $i);
             else
                 $returl = "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
-            $url  = "https://www.polytechnique.org/auth-groupex.php";
+            $url  = "https://www.polytechnique.org/auth-groupex";
             $url .= "?session=" . session_id();
             $url .= "&challenge=" . S::v('challenge');
             $url .= "&pass=" . md5(S::v('challenge') . $globals->xnet->secret);
index e0ca4bb..0d4274c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -23,6 +23,8 @@ require_once('platal.inc.php');
 require_once('globals.inc.php');
 require_once('xorg/session.inc.php');
 $globals = new PlatalGlobals('XorgSession');
+$globals->bootstrap(array('NbIns'), 'update_NbIns');
+$globals->bootstrap(array('NbValid'), 'update_NbValid');
 
 // {{{ class XorgPage
 
index 96db292..2c8c88a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -228,6 +228,25 @@ function make_forlife($prenom, $nom, $promo)
     return $forlife;
 }
 
+/** Convert ip to uint (to store it in a database)
+ */
+function ip_to_uint($ip)
+{
+    return ip2long($ip);
+}
+
+/** Convert uint to ip (to build a human understandable ip)
+ */
+function uint_to_ip($uint)
+{
+    return long2ip($uint);
+}
+
+
+/******************************************************************************
+ * Security functions
+ *****************************************************************************/
+
 function check_ip($level)
 {
     if (empty($_SERVER['REMOTE_ADDR'])) {
@@ -240,7 +259,7 @@ function check_ip($level)
         }
         $ips[] = $_SERVER['REMOTE_ADDR'];
         foreach ($ips as &$ip) {
-            $ip = "ip LIKE " . XDB::escape($ip);
+            $ip = "ip = " . ip_to_uint($ip);
         }
         $res = XDB::query('SELECT  state
                              FROM  ip_watch
@@ -301,5 +320,35 @@ function send_warning_mail($title)
     $mailer->send();
 }
 
+
+/******************************************************************************
+ * Dynamic configuration update/edition stuff
+ *****************************************************************************/
+
+function update_NbIns()
+{
+    global $globals;
+    $res = XDB::query("SELECT  COUNT(*)
+                         FROM  auth_user_md5
+                        WHERE  perms IN ('admin','user') AND deces=0");
+    $cnt = $res->fetchOneCell();
+    $globals->change_dynamic_config(array('NbIns' => $cnt));
+}
+
+function update_NbValid()
+{
+    global $globals;
+    $res = XDB::query("SELECT  COUNT(*)
+                         FROM  requests");
+    $globals->change_dynamic_config(array('NbValid' => $res->fetchOneCell()));
+}
+
+function update_NbNotifs()
+{
+    require_once 'notifs.inc.php';
+    $n = select_notifs(false, S::i('uid'), S::v('watch_last'), false);
+    $_SESSION['notifs'] = $n->numRows();
+}
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index 3e368e4..62f5d30 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -307,6 +307,7 @@ function start_connexion ($uid, $identified)
         send_warning_mail($mail_subject);
     }
     set_skin();
+    update_NbNotifs();
     check_redirect();
     return true;
 }
@@ -316,13 +317,13 @@ function start_connexion ($uid, $identified)
 function set_skin()
 {
     global $globals;
-    if (S::logged() && !S::has('skin')) {
+    if (S::logged() && (!S::has('skin') || S::has('suid'))) {
         $uid = S::v('uid');
-    $res = XDB::query("SELECT  skin_tpl
-                             FROM  auth_user_quick AS a
-                       INNER JOIN  skins           AS s ON a.skin = s.id
-                            WHERE  user_id = {?} AND skin_tpl != ''", $uid);
-    if ($_SESSION['skin'] = $res->fetchOneCell()) {
+        $res = XDB::query("SELECT  skin_tpl
+                          FROM  auth_user_quick AS a
+                          INNER JOIN  skins           AS s ON a.skin = s.id
+                          WHERE  user_id = {?} AND skin_tpl != ''", $uid);
+        if ($_SESSION['skin'] = $res->fetchOneCell()) {
             return;
         }
     }
index 8c72aef..c122a7f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -27,6 +27,7 @@ class AdminModule extends PLModule
             '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'),
@@ -351,6 +352,7 @@ class AdminModule extends PLModule
 
     function handler_user(&$page, $login = false)
     {
+        global $globals;
         $page->changeTpl('admin/utilisateurs.tpl');
         $page->assign('xorg_title','Polytechnique.org - Administration - Edit/Su/Log');
         require_once("emails.inc.php");
@@ -553,11 +555,14 @@ class AdminModule extends PLModule
                             $res = XDB::query($watch);
                             $new_fields = $res->fetchOneAssoc();
 
-                            $mailer = new PlMailer("admin/mail_intervention.tpl");
+                            $mailer = new PlMailer("admin/useredit.mail.tpl");
                             $mailer->assign("user", S::v('forlife'));
                             $mailer->assign('old', $old_fields);
                             $mailer->assign('new', $new_fields);
                             $mailer->send();
+                            
+                            // update number of subscribers (perms or deceased may have changed)
+                            update_NbIns();
 
                             $page->trig("updaté correctement.");
                         }
@@ -576,17 +581,53 @@ class AdminModule extends PLModule
                                       LEFT JOIN aliases       AS a ON (a.id = u.user_id AND type= 'a_vie')
                                           WHERE u.user_id = {?}", $mr['user_id']);
                         $mr = $r->fetchOneAssoc();
+
+                        // If GoogleApps is enabled, the user did choose to use synchronized passwords,
+                        // and the password was changed, updates the Google Apps password as well.
+                        if ($globals->mailstorage->googleapps_domain && Env::v('newpass_clair') != "********") {
+                            require_once 'googleapps.inc.php';
+                            $account = new GoogleAppsAccount($mr['user_id'], $mr['forlife']);
+                            if ($account->active() && $account->sync_password) {
+                                $account->set_password($pass_encrypted);
+                            }
+                        }
+
+                        // If GoogleApps is enabled, and the user is now disabled, disables the Google Apps account as well.
+                        if ($globals->mailstorage->googleapps_domain &&
+                            $new_fields['perms'] == 'disabled' &&
+                            $new_fields['perms'] != $old_fields['perms']) {
+                            require_once 'googleapps.inc.php';
+                            $account = new GoogleAppsAccount($mr['user_id'], $mr['forlife']);
+                            $account->suspend();
+                        }
                         break;
 
                     // DELETE FROM auth_user_md5
                     case "u_kill":
                         user_clear_all_subs($mr['user_id']);
+                        // update number of subscribers (perms or deceased may have changed)
+                        update_NbIns();
                         $page->trig("'{$mr['user_id']}' a été désinscrit !");
-                        $mailer = new PlMailer("admin/mail_intervention.tpl");
+                        $mailer = new PlMailer("admin/useredit.mail.tpl");
                         $mailer->assign("user", S::v('forlife'));
-                        $mailer->assign("query", "\nUtilisateur $login désinscrit");
+                        $mailer->assign("deletion", true);
                         $mailer->send();
                         break;
+
+                    case "b_edit":
+                        XDB::execute("DELETE FROM forums.innd WHERE uid = {?}", $mr['user_id']);
+                        if (Env::v('write_perm') != "" || Env::v('read_perm') != ""  || Env::v('commentaire') != "" ) {
+                          XDB::execute("INSERT INTO forums.innd
+                                                SET ipmin = '0',
+                                                    ipmax = '4294967295',
+                                                    write_perm = {?},
+                                                    read_perm = {?},
+                                                    comment = {?},
+                                                    priority = '200',
+                                                    uid = {?}",
+                                       Env::v('write_perm'), Env::v('read_perm'), Env::v('comment'), $mr['user_id']);
+                        }
+                        break;
                 }
             }
 
@@ -615,6 +656,13 @@ class AdminModule extends PLModule
             }
 
             $page->assign('mr',$mr);
+
+            // Bans forums
+            $res = XDB::query("SELECT  write_perm, read_perm, comment
+                                 FROM  forums.innd
+                                WHERE  uid = {?}", $mr['user_id']);
+            $bans = $res->fetchOneAssoc();
+            $page->assign('bans', $bans);
         }
     }
 
@@ -788,6 +836,21 @@ class AdminModule extends PLModule
         $page->assign('decedes', $res);
     }
 
+    function handler_dead_but_active(&$page) {
+        $page->changeTpl('admin/dead_but_active.tpl');
+        $page->assign('xorg_title','Polytechnique.org - Administration - Décédés');
+
+        $res = XDB::iterator(
+                "SELECT  u.promo, u.nom, u.prenom, u.deces, u.matricule_ax, a.alias, DATE(MAX(s.start)) AS last
+                   FROM  auth_user_md5 AS u
+              LEFT JOIN  aliases AS a ON (a.id = u.user_id AND a.type = 'a_vie')
+              LEFT JOIN  logger.sessions AS s ON (s.uid = u.user_id AND suid = 0)
+                  WHERE  perms IN ('admin', 'user') AND deces <> 0
+               GROUP BY  u.user_id
+               ORDER BY  u.promo, u.nom");
+        $page->assign('dead', $res);
+    }
+
     function handler_synchro_ax(&$page, $user = null, $action = null) {
         $page->changeTpl('admin/synchro_ax.tpl');
         $page->assign('xorg_title','Polytechnique.org - Administration - Synchro AX');
@@ -896,6 +959,7 @@ class AdminModule extends PLModule
         $table_editor->describe('ext','extension du screenshot',false);
         $table_editor->apply($page, $action, $id);
     }
+
     function handler_postfix_blacklist(&$page, $action = 'list', $id = null) {
         $page->assign('xorg_title','Polytechnique.org - Administration - Postfix : Blacklist');
         $page->assign('title', 'Blacklist de postfix');
@@ -1034,19 +1098,20 @@ class AdminModule extends PLModule
             if (trim(Post::v('ipN')) != '') {
                 Xdb::execute('INSERT IGNORE INTO ip_watch (ip, state, detection, last, uid, description)
                                           VALUES ({?}, {?}, CURDATE(), NOW(), {?}, {?})',
-                             trim(Post::v('ipN')), Post::v('stateN'), S::i('uid'), Post::v('descriptionN'));
+                             ip_to_uint(trim(Post::v('ipN'))), Post::v('stateN'), S::i('uid'), Post::v('descriptionN'));
             };
             break;
 
         case 'edit':
             Xdb::execute('UPDATE ip_watch
                              SET state = {?}, last = NOW(), uid = {?}, description = {?}
-                           WHERE ip = {?}', Post::v('stateN'), S::i('uid'), Post::v('descriptionN'), Post::v('ipN'));
+                           WHERE ip = {?}', Post::v('stateN'), S::i('uid'), Post::v('descriptionN'),
+                          ip_to_uint(Post::v('ipN')));
             break;
 
         default:
             if ($action == 'delete' && !is_null($ip)) {
-                Xdb::execute('DELETE FROM emails_watch WHERE ip = {?}', $ip);
+                Xdb::execute('DELETE FROM ip_watch WHERE ip = {?}', ip_to_uint($ip));
             }
         }
         if ($action != 'create' && $action != 'edit') {
@@ -1070,6 +1135,7 @@ class AdminModule extends PLModule
             $table = array();
             $props = array();
             while (list($ip, $host, $date, $state, $forlife) = $it->next()) {
+                $ip = uint_to_ip($ip);
                 if (count($props) == 0 || $props['ip'] != $ip) {
                     if (count($props) > 0) {
                         $table[] = $props;
@@ -1097,7 +1163,7 @@ class AdminModule extends PLModule
                      WHERE  w.ip = {?}
                   GROUP BY  a2.alias
                   ORDER BY  a2.alias";
-            $it = Xdb::iterRow($sql, $ip);
+            $it = Xdb::iterRow($sql, ip_to_uint($ip));
 
             $props = array();
             while (list($detection, $state, $last, $description, $edit, $forlife, $host) = $it->next()) {
index 6e669cb..ca07e32 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 9fd9c69..f87dd03 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7c8c936..67833e8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 386eb26..a82eb64 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -33,7 +33,7 @@ class AXLetter extends MassMailer
 
     function __construct($id)
     {
-        parent::__construct('axletter/letter.tpl', 'ax.css', 'ax/show', 'axletter', 'axletter_ins');
+        parent::__construct('axletter/letter.mail.tpl', 'ax.css', 'ax/show', 'axletter', 'axletter_ins');
         $this->_head = '<cher> <prenom>,';
 
         if (!is_array($id)) {
@@ -45,7 +45,7 @@ class AXLetter extends MassMailer
             } else {
                 $res = XDB::query("SELECT  *
                                      FROM  axletter
-                                    WHERE  id = {?} OR shortname = {?}", $id, $id);
+                                    WHERE  id = {?} OR short_name = {?}", $id, $id);
             }
             if (!$res->numRows()) {
                 $this->_id = null;
@@ -223,7 +223,7 @@ class AXLetter extends MassMailer
 
     static public function listSent()
     {
-        $res = XDB::query("SELECT  IF(shortname IS NULL, id, shortname) as id, date, subject AS titre
+        $res = XDB::query("SELECT  IF(short_name IS NULL, id, short_name) as id, date, subject AS titre
                              FROM  axletter
                             WHERE  NOT (FIND_IN_SET('new', bits))
                          ORDER BY  date DESC");
@@ -232,7 +232,7 @@ class AXLetter extends MassMailer
 
     static public function listAll()
     {
-        $res = XDB::query("SELECT  IF(shortname IS NULL, id, shortname) as id, date, subject AS titre
+        $res = XDB::query("SELECT  IF(short_name IS NULL, id, short_name) as id, date, subject AS titre
                              FROM  axletter
                          ORDER BY  date DESC");
         return $res->fetchAllAssoc();
index 87fa509..24d38be 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index dfc2d6d..4dbb162 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -66,6 +66,7 @@ class CarnetModule extends PLModule
 
         if (Get::has('read')) {
             $_SESSION['watch_last'] = Get::v('read');
+            update_NbNotifs();
             pl_redirect('carnet/panel');
         }
 
index ceb6ca9..0ef1509 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ac99545..4e98a8f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 27fbdd7..caff12b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -65,14 +65,21 @@ class EmailModule extends PLModule
               ORDER BY  LENGTH(alias)";
         $page->assign('aliases', XDB::iterator($sql, $uid));
 
-               $homonyme = XDB::query("SELECT alias FROM aliases INNER JOIN homonymes ON (id = homonyme_id) WHERE user_id = {?} AND type = 'homonyme'", $uid);
-               $page->assign('homonyme', $homonyme->fetchOneCell());
-               
+    $homonyme = XDB::query("SELECT alias FROM aliases INNER JOIN homonymes ON (id = homonyme_id) WHERE user_id = {?} AND type = 'homonyme'", $uid);
+    $page->assign('homonyme', $homonyme->fetchOneCell());
+
+        // Affichage des redirections de l'utilisateur.
         $sql = "SELECT email
                 FROM emails
                 WHERE uid = {?} AND FIND_IN_SET('active', flags)";
         $page->assign('mails', XDB::iterator($sql, $uid));
 
+        // Affichage des backends actifs de stockage des emails.
+        $sql = "SELECT  mail_storage
+                  FROM  auth_user_md5
+                 WHERE  user_id = {?}";
+        $storages = XDB::query($sql, $uid)->fetchOneCell();
+        $page->assign('storage', explode(',', $storages));
 
         // on regarde si l'utilisateur a un alias et si oui on l'affiche !
         $forlife = S::v('forlife');
@@ -210,20 +217,40 @@ class EmailModule extends PLModule
             $retour = $redirect->delete_email($email);
             $page->assign('retour', $retour);
         }
-               
-               if ($action == 'active' && $email) {
-                       $redirect->modify_one_email($email, true);
-               }
-               
-               if ($action == 'inactive' && $email) {
-                       $redirect->modify_one_email($email, false);
-               }
-               
-               if ($action == 'rewrite' && $email) {
-                       $rewrite = @func_get_arg(3);
-                       $redirect->modify_one_email_redirect($email, $rewrite);
-               }
-               
+
+        if ($action == 'active' && $email) {
+            $redirect->modify_one_email($email, true);
+        }
+
+        if ($action == 'inactive' && $email) {
+            $redirect->modify_one_email($email, false);
+        }
+
+        if ($action == 'rewrite' && $email) {
+            $rewrite = @func_get_arg(3);
+            $redirect->modify_one_email_redirect($email, $rewrite);
+        }
+
+        if ($action == 'storage') {
+            if ($email == 'imap') {
+                $storage = new MailStorageIMAP(S::v('uid'));
+            } else if ($email == 'googleapps') {
+                $storage = new MailStorageGoogleApps(S::v('uid'));
+            } else {
+                $storage = NULL;
+            }
+
+            if ($storage) {
+                $subaction = @func_get_arg(3);
+                if ($subaction == 'active') {
+                    $storage->enable();
+                }
+                if ($subaction == 'inactive') {
+                    $storage->disable();
+                }
+            }
+        }
+
         if (Env::has('emailop')) {
             $actifs = Env::v('emails_actifs', Array());
             print_r(Env::v('emails_rewrite'));
@@ -255,8 +282,18 @@ class EmailModule extends PLModule
                    FROM  aliases
                   WHERE  id={?} AND (type='a_vie' OR type='alias')
                ORDER BY  !FIND_IN_SET('usage',flags), LENGTH(alias)", $uid);
+
         $page->assign('alias', $res->fetchAllAssoc());
         $page->assign('emails',$redirect->emails);
+
+        $res = XDB::query(
+                "SELECT  mail_storage
+                   FROM  auth_user_md5
+                  WHERE  user_id = {?}", $uid);
+        $page->assign('storage', explode(',', $res->fetchOneCell()));
+
+        require_once 'googleapps.inc.php';
+        $page->assign('googleapps', GoogleAppsAccount::account_status($uid));
     }
 
     function handler_antispam(&$page, $statut_filtre = null)
@@ -338,52 +375,57 @@ class EmailModule extends PLModule
                 return join(', ', $ret);
             }
 
+            $error = false;
             foreach ($_FILES as &$file) {
                 if ($file['name'] && !PlUpload::get($file, S::v('forlife'), 'emails.send', false)) {
-                    $page->trig("Impossible de télécharger '" . pl_entities($file['name']) . "'");
+                    $page->trig(PlUpload::$lastError);
+                    $error = true;
+                    break;
                 }
             }
 
-            XDB::execute("DELETE FROM  email_send_save
-                                WHERE  uid = {?}", S::i('uid'));
-
-            $to2  = getEmails(Env::v('to_contacts'));
-            $cc2  = getEmails(Env::v('cc_contacts'));
-            $txt  = str_replace('^M', '', Env::v('contenu'));
-            $to   = Env::v('to');
-            $subj = Env::v('sujet');
-            $from = Env::v('from');
-            $cc   = trim(Env::v('cc'));
-            $bcc  = trim(Env::v('bcc'));
-
-            if (empty($to) && empty($cc) && empty($to2) && empty($bcc) && empty($cc2)) {
-                $page->trig("Indique au moins un destinataire.");
-                $page->assign('uploaded_f', PlUpload::listFilenames(S::v('forlife'), 'emails.send'));
-            } else {
-                $mymail = new PlMailer();
-                $mymail->setFrom($from);
-                $mymail->setSubject($subj);
-                if (!empty($to))  { $mymail->addTo($to); }
-                if (!empty($cc))  { $mymail->addCc($cc); }
-                if (!empty($bcc)) { $mymail->addBcc($bcc); }
-                if (!empty($to2)) { $mymail->addTo($to2); }
-                if (!empty($cc2)) { $mymail->addCc($cc2); }
-                $files =& PlUpload::listFiles(S::v('forlife'), 'emails.send');
-                foreach ($files as $name=>&$upload) {
-                    $mymail->addUploadAttachment($upload, $name);
-                }
-                if (Env::v('nowiki')) {
-                    $mymail->setTxtBody(wordwrap($txt, 78, "\n"));
-                } else {
-                    $mymail->setWikiBody($txt);
-                }
-                if ($mymail->send()) {
-                    $page->trig("Ton mail a bien été envoyé.");
-                    $_REQUEST = array('bcc' => S::v('bestalias').'@'.$globals->mail->domain);
-                    PlUpload::clear(S::v('forlife'), 'emails.send');
-                } else {
-                    $page->trig("Erreur lors de l'envoi du courriel, réessaye.");
+            if (!$error) {
+                XDB::execute("DELETE FROM  email_send_save
+                                    WHERE  uid = {?}", S::i('uid'));
+
+                $to2  = getEmails(Env::v('to_contacts'));
+                $cc2  = getEmails(Env::v('cc_contacts'));
+                $txt  = str_replace('^M', '', Env::v('contenu'));
+                $to   = Env::v('to');
+                $subj = Env::v('sujet');
+                $from = Env::v('from');
+                $cc   = trim(Env::v('cc'));
+                $bcc  = trim(Env::v('bcc'));
+
+                if (empty($to) && empty($cc) && empty($to2) && empty($bcc) && empty($cc2)) {
+                    $page->trig("Indique au moins un destinataire.");
                     $page->assign('uploaded_f', PlUpload::listFilenames(S::v('forlife'), 'emails.send'));
+                } else {
+                    $mymail = new PlMailer();
+                    $mymail->setFrom($from);
+                    $mymail->setSubject($subj);
+                    if (!empty($to))  { $mymail->addTo($to); }
+                    if (!empty($cc))  { $mymail->addCc($cc); }
+                    if (!empty($bcc)) { $mymail->addBcc($bcc); }
+                    if (!empty($to2)) { $mymail->addTo($to2); }
+                    if (!empty($cc2)) { $mymail->addCc($cc2); }
+                    $files =& PlUpload::listFiles(S::v('forlife'), 'emails.send');
+                    foreach ($files as $name=>&$upload) {
+                        $mymail->addUploadAttachment($upload, $name);
+                    }
+                    if (Env::v('nowiki')) {
+                        $mymail->setTxtBody(wordwrap($txt, 78, "\n"));
+                    } else {
+                        $mymail->setWikiBody($txt);
+                    }
+                    if ($mymail->send()) {
+                        $page->trig("Ton mail a bien été envoyé.");
+                        $_REQUEST = array('bcc' => S::v('bestalias').'@'.$globals->mail->domain);
+                        PlUpload::clear(S::v('forlife'), 'emails.send');
+                    } else {
+                        $page->trig("Erreur lors de l'envoi du courriel, réessaye.");
+                        $page->assign('uploaded_f', PlUpload::listFilenames(S::v('forlife'), 'emails.send'));
+                    }
                 }
             }
         } else {
@@ -407,7 +449,7 @@ class EmailModule extends PLModule
                   WHERE  c.uid = {?}
                  ORDER BY u.nom, u.prenom", S::v('uid'));
         $page->assign('contacts', $res->fetchAllAssoc());
-        $page->assign('maxsize', ini_get('post_max_size') . 'o');
+        $page->assign('maxsize', ini_get('upload_max_filesize') . 'o');
     }
 
     function handler_test(&$page, $forlife = null)
@@ -416,7 +458,7 @@ class EmailModule extends PLModule
         if (!S::has_perms() || !$forlife) {
             $forlife = S::v('bestalias');
         }
-        $mailer = new PlMailer('emails/mail.test.tpl');
+        $mailer = new PlMailer('emails/test.mail.tpl');
         $mailer->assign('email', $forlife . '@' . $globals->mail->domain);
         $iterator = XDB::iterator("SELECT  email
                                      FROM  emails AS e
@@ -621,12 +663,12 @@ L'équipe d'administration <support@" . $globals->mail->domain . '>';
         $page->changeTpl('emails/lost.tpl');
 
         $page->assign('lost_emails', XDB::iterator('
-                                       SELECT u.user_id,       a.alias
-                                       FROM auth_user_md5 AS u
-                                               INNER JOIN aliases AS a ON (a.id = u.user_id AND a.type = "a_vie")
-                                               LEFT JOIN emails AS e ON (u.user_id=e.uid AND FIND_IN_SET("active",e.flags))
-                                       WHERE e.uid IS NULL AND u.deces = 0
-                                       ORDER BY u.promo DESC, u.nom, u.prenom'));
+          SELECT u.user_id, a.alias
+          FROM auth_user_md5 AS u
+            INNER JOIN aliases AS a ON (a.id = u.user_id AND a.type = "a_vie")
+            LEFT JOIN emails AS e ON (u.user_id=e.uid AND FIND_IN_SET("active",e.flags))
+          WHERE e.uid IS NULL AND u.deces = 0
+          ORDER BY u.promo DESC, u.nom, u.prenom'));
     }
 }
 
index 2103a17..0495075 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -81,43 +81,6 @@ class EventsModule extends PLModule
         return $res->fetchOneAssoc();
     }
 
-    private function get_events($where, $order, array &$array, $name)
-    {
-        // affichage des evenements
-        // annonces promos triées par présence d'une limite sur les promos
-        // puis par dates croissantes d'expiration
-        $promo = S::v('promo');
-        $uid   = S::i('uid');
-        $sql = "SELECT  e.id,e.titre, ev.user_id IS NULL AS nonlu
-                  FROM  evenements    AS e
-            LEFT JOIN   evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
-                 WHERE  FIND_IN_SET('valide', e.flags) AND peremption >= NOW()
-                        AND (e.promo_min = 0 || e.promo_min <= {?})
-                        AND (e.promo_max = 0 || e.promo_max >= {?})
-                        AND $where
-              ORDER BY  $order";
-        $sum = XDB::iterator($sql, $uid, $promo, $promo);
-        if (!$sum->total()) {
-            return false;
-        }
-        $sql = "SELECT  e.id,e.titre,e.texte,e.post_id,a.user_id,a.nom,a.prenom,a.promo,l.alias AS forlife,
-                        p.x, p.y, p.attach IS NOT NULL AS img, FIND_IN_SET('wiki', e.flags) AS wiki
-                  FROM  evenements       AS e
-             LEFT JOIN  evenements_photo AS p ON (e.id = p.eid)
-            INNER JOIN  auth_user_md5    AS a ON e.user_id=a.user_id
-            INNER JOIN  aliases          AS l ON ( a.user_id=l.id AND l.type='a_vie' )
-             LEFT JOIN  evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
-                 WHERE  FIND_IN_SET('valide', e.flags) AND peremption >= NOW()
-                        AND (e.promo_min = 0 || e.promo_min <= {?})
-                        AND (e.promo_max = 0 || e.promo_max >= {?})
-                        AND ev.user_id IS NULL
-                        AND $where
-              ORDER BY  $order";
-        $evt = XDB::iterator($sql, $uid, $promo, $promo);
-        $array[$name] = array('events' => $evt, 'summary' => $sum);
-        return true;
-    }
-
     private function upload_image(PlatalPage &$page, PlUpload &$upload)
     {
         if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) {
@@ -198,18 +161,41 @@ class EventsModule extends PLModule
         }
 
         $array = array();
-        $this->get_events('FIND_IN_SET(\'important\', e.flags)', 'e.creation_date DESC', $array, 'important');
-        $this->get_events('e.creation_date > DATE_SUB(CURDATE(), INTERVAL 2 DAY)
-                          AND NOT FIND_IN_SET(\'important\', e.flags)',
-                          'e.creation_date DESC', $array, 'news');
-        $this->get_events('e.peremption < DATE_ADD(CURDATE(), INTERVAL 2 DAY)
-                          AND e.creation_date <= DATE_SUB(CURDATE(), INTERVAL 2 DAY)
-                          AND NOT FIND_IN_SET(\'important\', e.flags)',
-                          'e.peremption, e.creation_date DESC', $array, 'end');
-        $this->get_events('e.peremption >= DATE_ADD(CURDATE(), INTERVAL 2 DAY)
-                          AND e.creation_date <= DATE_SUB(CURDATE(), INTERVAL 2 DAY)
-                          AND NOT FIND_IN_SET(\'important\', e.flags)',
-                          'e.peremption, e.creation_date DESC', $array, 'body');
+        $it = XDB::iterator("SELECT  e.id,e.titre,e.texte,e.post_id,a.user_id,a.nom,a.prenom,a.promo,l.alias AS forlife,
+                                     p.x, p.y, p.attach IS NOT NULL AS img, FIND_IN_SET('wiki', e.flags) AS wiki,
+                                     FIND_IN_SET('important', e.flags) AS important,
+                                     e.creation_date > DATE_SUB(CURDATE(), INTERVAL 2 DAY) AS news,
+                                     e.peremption < DATE_ADD(CURDATE(), INTERVAL 2 DAY) AS end,
+                                     ev.user_id IS NULL AS nonlu
+                               FROM  evenements       AS e
+                          LEFT JOIN  evenements_photo AS p ON (e.id = p.eid)
+                         INNER JOIN  auth_user_md5    AS a ON e.user_id=a.user_id
+                         INNER JOIN  aliases          AS l ON ( a.user_id=l.id AND l.type='a_vie' )
+                          LEFT JOIN  evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
+                              WHERE  FIND_IN_SET('valide', e.flags) AND peremption >= NOW()
+                                     AND (e.promo_min = 0 || e.promo_min <= {?})
+                                     AND (e.promo_max = 0 || e.promo_max >= {?})
+                           ORDER BY  important DESC, news DESC, end DESC, e.peremption, e.creation_date DESC",
+                            S::i('uid'), S::i('promo'), S::i('promo'));
+        $cats = array('important', 'news', 'end', 'body');
+        $body  = $it->next();
+        foreach ($cats as $cat) {
+            $data = array();
+            if (!$body) {
+                continue;
+            }
+            do {
+                if ($cat == 'body' || $body[$cat]) {
+                    $data[] = $body;
+                } else {
+                    break;
+                }
+                $body = $it->next();
+            } while ($body);
+            if (!empty($data)) {
+                $array[$cat] = $data;
+            }
+        }
         $page->assign_by_ref('events', $array);
     }
 
@@ -487,7 +473,7 @@ class EventsModule extends PLModule
                             FIND_IN_SET('valide', e.flags) AS fvalide,
                             FIND_IN_SET('archive', e.flags) AS farch,
                             u.promo, u.nom, u.prenom, a.alias AS forlife,
-                            FIND_IN_SET('wiki', flags) AS wiki
+                            FIND_IN_SET('wiki', e.flags) AS wiki
                       FROM  evenements    AS e
                 INNER JOIN  auth_user_md5 AS u ON(e.user_id = u.user_id)
                 INNER JOIN  aliases AS a ON (u.user_id = a.id AND a.type='a_vie')
similarity index 84%
rename from modules/banana.php
rename to modules/forums.php
index 640012d..f61d801 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 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 BananaModule extends PLModule
+class ForumsModule extends PLModule
 {
     function handlers()
     {
         return array(
             'banana'              => $this->make_hook('banana', AUTH_COOKIE),
-            'banana/profile'      => $this->make_hook('profile', AUTH_MDP),
-            'banana/subscription' => $this->make_hook('subscription', AUTH_COOKIE),
             'banana/rss'          => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
+            'admin/forums'   => $this->make_hook('forums_bans', AUTH_MDP, 'admin'),
         );
     }
 
@@ -45,7 +44,7 @@ class BananaModule extends PLModule
                                  FROM  auth_user_md5 WHERE promo={?}", $promo);
             list($effau, $effid) = $res->fetchOneRow();
             if (5*$effau>$effid) { // + de 20% d'inscrits
-                $mymail = new PlMailer('mails/forums.promo.tpl');
+                $mymail = new PlMailer('admin/forums-promo.mail.tpl');
                 $mymail->assign('promo', $promo);
                 $mymail->send();
             }
@@ -79,7 +78,7 @@ class BananaModule extends PLModule
 
         if (!(Post::has('action') && Post::has('banananame') && Post::has('bananasig')
         && Post::has('bananadisplay') && Post::has('bananamail')
-        && Post::has('bananaupdate') && Post::v('action')=="OK" ))
+        && Post::has('bananaupdate') && Post::v('action')=="Enregistrer" ))
         {
             $req = XDB::query("
                 SELECT  nom, mail, sig,
@@ -121,15 +120,6 @@ class BananaModule extends PLModule
         }
     }
 
-    function handler_subscription(&$page)
-    {
-        $page->changeTpl('banana/index.tpl');
-        $page->assign('xorg_title','Polytechnique.org - Forums & PA');
-
-        require_once 'banana/forum.inc.php';
-        run_banana($page, 'ForumsBanana', Array('action' => 'subscribe'));
-    }
-
     function handler_rss(&$page, $group, $alias, $hash, $file = null)
     {
         if (is_null($file)) {
@@ -155,6 +145,21 @@ class BananaModule extends PLModule
         exit;
     }
 
+    function handler_forums_bans(&$page, $action = 'list', $id = null)
+    {
+        $page->assign('xorg_title','Polytechnique.org - Administration - Bannissements des forums');
+        $page->assign('title', 'Gestion des mises au ban');
+        $table_editor = new PLTableEditor('admin/forums','forums.innd','id_innd');
+        $table_editor->describe('ipmin','min plage IP',true);
+        $table_editor->describe('ipmax','max plage IP',true);
+        $table_editor->describe('uid','utilisateur',true);
+        $table_editor->describe('write_perm','perm. poster',true);
+        $table_editor->describe('read_perm','perm. lire',true);
+        $table_editor->describe('priority','priorite',true);
+        $table_editor->describe('comment','commentaire',true);
+        $table_editor->apply($page, $action, $id);
+    }
+
     static function run_banana(&$page, $params = null)
     {
         $page->changeTpl('banana/index.tpl');
diff --git a/modules/gadgets.php b/modules/gadgets.php
new file mode 100644 (file)
index 0000000..0a90079
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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 GadgetsModule extends PLModule
+{
+    function handlers()
+    {
+        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-search.xml' => $this->make_hook('ig_search_xml', AUTH_PUBLIC, 'user', NO_HTTPS),
+            'gadgets/ig-search'     => $this->make_hook('ig_search', AUTH_PUBLIC),
+        );
+    }
+
+    function handler_ig_events_xml(&$page) {
+        require_once 'gadgets/gadgets.inc.php';
+        init_igoogle_xml('gadgets/ig-events.xml.tpl');
+    }
+
+    function handler_ig_events(&$page) {
+        require_once 'gadgets/gadgets.inc.php';
+        init_igoogle_html('gadgets/ig-events.tpl', AUTH_COOKIE);
+
+        $events = XDB::iterator(
+            'SELECT  SQL_CALC_FOUND_ROWS
+                     e.id, e.titre, UNIX_TIMESTAMP(e.creation_date) AS creation_date,
+                     IF(u.nom_usage = "", u.nom, u.nom_usage) AS nom, u.prenom, u.promo,
+                     ev.user_id IS NULL AS nonlu
+               FROM  evenements AS e
+         INNER JOIN  auth_user_md5 AS u ON e.user_id = u.user_id
+          LEFT JOIN  evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
+              WHERE  FIND_IN_SET("valide", e.flags) AND peremption >= NOW()
+                     AND (e.promo_min = 0 || e.promo_min <= {?})
+                     AND (e.promo_max = 0 || e.promo_max >= {?})
+           ORDER BY  e.creation_date DESC
+              LIMIT  {?}',
+            S::i('uid'), S::i('promo'), S::i('promo'), 5);
+        $page->assign('events', $events);
+        $page->assign('event_count', XDB::query("SELECT FOUND_ROWS()")->fetchOneCell());
+    }
+
+    function handler_ig_search_xml(&$page) {
+        require_once 'gadgets/gadgets.inc.php';
+        init_igoogle_xml('gadgets/ig-search.xml.tpl');
+    }
+
+    function handler_ig_search(&$page)
+    {
+        if (Env::has('quick') && Env::s('quick') != '') {
+            require_once 'userset.inc.php';
+            $view = new SearchSet(true);
+            $view->addMod('gadget', 'Gadget', true);
+            $view->apply(null, $page);
+
+            $nb_tot = $view->count();
+            $page->assign('result_count', $nb_tot);
+
+            if (!S::logged() && $nb_tot > $globals->search->public_max) {
+                $page->assign('error', 'Votre recherche a généré trop de résultats pour un affichage public.');
+            } elseif ($nb_tot > $globals->search->private_max) {
+                $page->assign('error', 'Recherche trop générale.');
+            } elseif (empty($nb_tot)) {
+                $page->assign('error', 'Il n\'existe personne correspondant à ces critères dans la base !');
+            }
+        }
+
+        require_once 'gadgets/gadgets.inc.php';
+        init_igoogle_html('gadgets/ig-search.tpl', AUTH_PUBLIC);
+    }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
diff --git a/modules/gadgets/gadgets.inc.php b/modules/gadgets/gadgets.inc.php
new file mode 100644 (file)
index 0000000..613c2df
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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                *
+ ***************************************************************************/
+
+// iGoogle gadgets helpers.
+function init_igoogle_xml($template)
+{
+    global $page;
+    $page->changeTpl($template, NO_SKIN);
+
+    header('Content-Type: application/xml; charset=utf-8');
+}
+
+function init_igoogle_html($template, $auth = AUTH_PUBLIC)
+{
+    global $page;
+    $page->changeTpl('gadgets/ig-skin.tpl', NO_SKIN);
+    $page->register_modifier('escape_html', 'escape_html');
+    $page->default_modifiers = Array('@escape_html');
+    header('Accept-Charset: utf-8');
+
+    // Adds external JavaScript libraries provided by iGoogle to the page.
+    if (Env::has('libs')) {
+        $libs = split(',', Env::s('libs'));
+        foreach ($libs as $lib) {
+            if (preg_match('@^[a-z0-9/._-]+$@i', $lib) && !preg_match('@([.][.])|([.]/)|(//)@', $lib)) {
+                $page->append('gadget_js', 'https://www.google.com/ig/f/' . $lib);
+            }
+        }
+    }
+
+    // Redirects the user to the login pagin if required.
+    if ($auth >  S::v('auth', AUTH_PUBLIC)) {
+        $page->assign('gadget_tpl', 'gadgets/ig-login.tpl');
+        return false;
+    }
+
+    $page->assign('gadget_tpl', $template);
+    return true;
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
index b085d4f..86bfbc9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
diff --git a/modules/googleapps.php b/modules/googleapps.php
new file mode 100644 (file)
index 0000000..f02053b
--- /dev/null
@@ -0,0 +1,222 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2008 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 GoogleAppsModule extends PLModule
+{
+    function handlers()
+    {
+        global $globals;
+        if (!$globals->mailstorage->googleapps_domain) {
+            return array();
+        }
+
+        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'),
+            'admin/googleapps/user' => $this->make_hook('admin_user', AUTH_MDP, 'admin'),
+        );
+    }
+
+    function handler_index(&$page, $action = null, $subaction = null)
+    {
+        require_once("emails.inc.php");
+        require_once("googleapps.inc.php");
+        $page->changeTpl('googleapps/index.tpl');
+        $page->addJsLink('motdepasse.js');
+        $page->assign('xorg_title', 'Polytechnique.org - Compte Google Apps');
+
+        $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+
+        // Fills up the 'is Google Apps redirection active' variable.
+        $page->assign('redirect_active', false);
+        $page->assign('redirect_unique', true);
+
+        if ($account->active()) {
+            $redirect = new Redirect(S::v('uid'));
+            $page->assign('redirect_unique', !$redirect->other_active(NULL));
+
+            $storage = new MailStorageGoogleApps(S::v('uid'));
+            $page->assign('redirect_active', $storage->active());
+        }
+
+        // Updates the Google Apps account as required.
+        if ($action) {
+            if ($action == 'password') {
+                if ($subaction == 'sync') {
+                    $account->set_password_sync(true);
+                    $account->set_password(S::v('password'));
+                    $page->trig("Ton mot de passe Google Apps sera dorénavant synchronisé avec ton mot de passe Polytechnique.org.");
+                } else if ($subaction == 'nosync') {
+                    $account->set_password_sync(false);
+                } else if (Post::has('response2') && !$account->sync_password) {
+                    $account->set_password(Post::v('response2'));
+                }
+            }
+
+            if ($action == 'suspend' && Post::has('suspend') && $account->active()) {
+                if ($account->pending_update_suspension) {
+                    $page->trig("Ton compte est déjà en cours de désactivation.");
+                } else {
+                    $storage = new MailStorageGoogleApps(S::v('uid'));
+                    if ($storage->disable()) {
+                        $account->suspend();
+                        $page->trig("Ton compte Google Apps est dorénavant désactivé.");
+                    } else {
+                        $page->trig("Ton compte Google Apps est ta seule adresse de redirection. Ton compte ne peux pas être désactivé.");
+                    }
+                }
+            } elseif ($action == 'unsuspend' && Post::has('unsuspend') && $account->suspended()) {
+                $account->unsuspend(Post::b('redirect_mails', true));
+                $page->trig("Ta demande de réactivation a bien été prise en compte.");
+            }
+
+            if ($action == 'create') {
+                $page->assign('has_password_sync', Get::has('password_sync'));
+                $page->assign('password_sync', Get::b('password_sync', true));
+            }
+            if ($action == 'create' && Post::has('password_sync') && Post::has('redirect_mails')) {
+                $password_sync = Post::b('password_sync');
+                $redirect_mails = Post::b('redirect_mails');
+                if ($password_sync) {
+                    $password = S::v('password');
+                } else {
+                    $password = Post::v('response2');
+                }
+
+                $account->create($password_sync, $password, $redirect_mails);
+                $page->trig("La demande de création de ton compte Google Apps a bien été enregistrée.");
+            }
+        }
+
+        $page->assign('account', $account);
+    }
+
+    function handler_admin(&$page, $action = null) {
+        require_once("googleapps.inc.php");
+        $page->changeTpl('googleapps/admin.tpl');
+        $page->assign('xorg_title', 'Polytechnique.org - Administration Google Apps');
+        $page->assign('googleapps_admin', GoogleAppsAccount::is_administrator(S::v('uid')));
+
+        if ($action == 'ack') {
+            $qid = @func_get_arg(2);
+            if ($qid) {
+                XDB::execute(
+                    "DELETE FROM  gapps_queue
+                           WHERE  q_id = {?} AND p_status = 'hardfail'", $qid);
+                $page->trig("La requête échouée a bien été retirée.");
+            }
+        }
+
+        // Retrieves latest pending administrative requests from the gappsd queue.
+        $res = XDB::iterator(
+            "SELECT  q_id, q_recipient_id, a.alias, j_type, j_parameters,
+                     UNIX_TIMESTAMP(q.p_entry_date) AS p_entry_date
+               FROM  gapps_queue AS q
+          LEFT JOIN  aliases AS a ON (a.id = q_recipient_id AND a.type = 'a_vie')
+              WHERE  p_status IN ('idle', 'active', 'softfail') AND
+                     p_admin_request IS TRUE
+           ORDER BY  p_entry_date");
+        while ($request = $res->next()) {
+            $j_parameters = json_decode($request['j_parameters'], true);
+            unset($j_parameters['username']);
+            $parameters = array_keys($j_parameters);
+            $request['parameters'] = implode(', ', $parameters);
+
+            $page->append('admin_requests', $request);
+        }
+
+        // Retrieves latest failed requests from the gappsd queue.
+        $res = XDB::iterator(
+            "SELECT  q.q_id, q.q_recipient_id, a.alias, q.j_type, q.r_result,
+                     UNIX_TIMESTAMP(q.p_entry_date) AS p_entry_date
+               FROM  gapps_queue AS q
+          LEFT JOIN  aliases AS a ON (a.id = q.q_recipient_id AND a.type = 'a_vie')
+              WHERE  q.p_status = 'hardfail'
+           ORDER BY  p_entry_date DESC
+              LIMIT  20");
+        $page->assign('failed_requests', $res);
+    }
+
+    function handler_admin_job(&$page, $job = null) {
+        require_once("googleapps.inc.php");
+        $page->changeTpl('googleapps/admin.job.tpl');
+        $page->assign('xorg_title', 'Polytechnique.org - Administration Google Apps');
+        $page->assign('googleapps_admin', GoogleAppsAccount::is_administrator(S::v('uid')));
+
+        if ($job) {
+            $res = XDB::query(
+                "SELECT  q.*, ao.alias AS q_owner, ar.alias AS q_recipient
+                   FROM  gapps_queue AS q
+              LEFT JOIN  aliases AS ao ON (ao.id = q.q_owner_id AND ao.type = 'a_vie')
+              LEFT JOIN  aliases AS ar ON (ar.id = q.q_recipient_id AND ar.type = 'a_vie')
+                  WHERE  q_id = {?}", $job);
+            $sql_job = $res->fetchOneAssoc();
+            $sql_job['decoded_parameters'] = var_export(json_decode($sql_job['j_parameters'], true), true);
+            $page->assign('job', $sql_job);
+        }
+    }
+
+    function handler_admin_user(&$page, $user = null, $action = null) {
+        require_once("emails.inc.php");
+        require_once("googleapps.inc.php");
+        $page->changeTpl('googleapps/admin.user.tpl');
+        $page->assign('xorg_title', 'Polytechnique.org - Administration Google Apps');
+        $page->assign('googleapps_admin', GoogleAppsAccount::is_administrator(S::v('uid')));
+
+        if (!$user && Post::has('login')) {
+            $user = Post::v('login');
+        }
+        if ($user && !is_numeric($user)) {
+            $res = XDB::query("SELECT id FROM aliases WHERE alias = {?} AND type != 'homonyme'", $user);
+            $user = $res->fetchOneCell();
+        }
+
+        if ($user) {
+            $account = new GoogleAppsAccount($user);
+            $storage = new MailStorageGoogleApps($user);
+
+            // Force synchronization of plat/al and Google Apps passwords.
+            if ($action == 'forcesync' && $account->sync_password) {
+                $res = XDB::query("SELECT password FROM auth_user_md5 WHERE user_id = {?}", $user);
+                $account->set_password($res->fetchOneCell());
+                $page->trig('Le mot de passe a été synchronisé.');
+            }
+
+            // Displays basic account information.
+            $page->assign('account', $account);
+            $page->assign('admin_account', GoogleAppsAccount::is_administrator($user));
+            $page->assign('googleapps_storage', $storage->active());
+            $page->assign('user', $user);
+
+            // Retrieves user's pending requests.
+            $res = XDB::iterator(
+                "SELECT  q_id, q_recipient_id, p_status, j_type, UNIX_TIMESTAMP(p_entry_date) AS p_entry_date
+                   FROM  gapps_queue
+                  WHERE  q_recipient_id = {?}
+               ORDER BY  p_entry_date DESC", $user);
+            $page->assign('requests', $res);
+        }
+    }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
index 14769a3..a1629c0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -681,7 +681,7 @@ class ListsModule extends PLModule
         $page->changeTpl('lists/delete.tpl');
         if (Post::v('valid') == 'OUI') {
             if ($this->client->delete_list($liste, Post::b('del_archive'))) {
-                foreach (array('', '-owner', '-admin', '-bounces') as $app) {
+                foreach (array('', '-owner', '-admin', '-bounces', '-unsubscribe') as $app) {
                     XDB::execute("DELETE FROM  $table
                                         WHERE  type={?} AND alias={?}",
                                  $type, $liste.$app.$domain);
index 0a3cfd5..15858ce 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -29,21 +29,24 @@ function list_sort_owners(&$members, $tri_promo = true) {
     foreach($members as $mem) {
         list($m, $dom) = explode('@',$mem);
         if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
-            $res = XDB::query('SELECT  prenom,IF(nom_usage="", nom, nom_usage), promo
-                                           FROM  auth_user_md5 AS u
-                                     INNER JOIN  aliases AS a ON u.user_id = a.id
-                                          WHERE  a.alias = {?}', $m);
-            if(list($prenom, $nom, $promo) = $res->fetchOneRow()) {
+            $res = XDB::query('SELECT  prenom, IF(nom_usage="", nom, nom_usage), promo, e.uid IS NULL
+                                 FROM  auth_user_md5 AS u
+                           INNER JOIN  aliases AS a ON u.user_id = a.id
+                            LEFT JOIN  emails AS e ON ( e.flags = \'active\' AND e.uid = u.user_id)
+                                WHERE  a.alias = {?}
+                             GROUP BY  u.user_id', $m);
+            if(list($prenom, $nom, $promo, $broken) = $res->fetchOneRow()) {
                 $key = $tri_promo ? $promo : strtoupper($nom{0});
-                $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $m, 'p' => (!$tri_promo ? $promo : null));
+                $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $m, 'p' => (!$tri_promo ? $promo : null), 'b' => $broken);
             } else {
-                $membres[0][] = Array('l' => $mem);
+                $membres[0][] = Array('l' => $mem, 'b' => $broken);
             }
         } else {
             $res = XDB::query('SELECT m2.uid,
                                       IF(m2.origine="X", u.prenom, m1.prenom) AS prenom,
                                       IF(m2.origine="X", u.nom, m1.nom) AS nom,
-                                      IF(m2.origine="X", u.promo, "non-X") AS promo
+                                      IF(m2.origine="X", u.promo, "non-X") AS promo,
+                                      0
                                  FROM groupex.membres AS m1
                             LEFT JOIN groupex.membres AS m2 ON(m1.email=m2.email AND m2.asso_id={?})
                             LEFT JOIN auth_user_md5   AS u  ON(m2.origine = "X" AND m2.uid = u.user_id)
index 8c648d0..997865e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 3abc1ee..4a3c75c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7835f44..11926f9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 6aa0d2a..65cdf6a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 6d2b5f6..407fa18 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index ffd561f..48e740f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 0824f2b..0fb4c19 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -185,6 +185,8 @@ class PlatalModule extends PLModule
 
     function handler_password(&$page)
     {
+        global $globals;
+
         if (Post::has('response2'))  {
             require_once 'secure_hash.inc.php';
 
@@ -195,6 +197,16 @@ class PlatalModule extends PLModule
                            WHERE  user_id={?}', $password,
                            S::v('uid'));
 
+            // If GoogleApps is enabled, and the user did choose to use synchronized passwords,
+            // updates the Google Apps password as well.
+            if ($globals->mailstorage->googleapps_domain) {
+                require_once 'googleapps.inc.php';
+                $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+                if ($account->active() && $account->sync_password) {
+                    $account->set_password($password);
+                }
+            }
+
             $log =& S::v('log');
             $log->log('passwd', '');
 
@@ -331,6 +343,7 @@ Adresse de secours : " . Post::v('email') : ""));
 
     function handler_tmpPWD(&$page, $certif = null)
     {
+        global $globals;
         XDB::execute('DELETE FROM perte_pass
                                       WHERE DATE_SUB(NOW(), INTERVAL 380 MINUTE) > created');
 
@@ -344,11 +357,22 @@ Adresse de secours : " . Post::v('email') : ""));
         $uid = $ligne["uid"];
         if (Post::has('response2')) {
             $password = Post::v('response2');
-            $logger   = new CoreLogger($uid);
             XDB::query('UPDATE  auth_user_md5 SET password={?}
                                    WHERE  user_id={?} AND perms IN("admin","user")',
                                  $password, $uid);
             XDB::query('DELETE FROM perte_pass WHERE certificat={?}', $certif);
+
+            // If GoogleApps is enabled, and the user did choose to use synchronized passwords,
+            // updates the Google Apps password as well.
+            if ($globals->mailstorage->googleapps_domain) {
+                require_once 'googleapps.inc.php';
+                $account = new GoogleAppsAccount($uid);
+                if ($account->active() && $account->sync_password) {
+                    $account->set_password($password);
+                }
+            }
+
+            $logger = new CoreLogger($uid);
             $logger->log("passwd","");
             $page->changeTpl('platal/tmpPWD.success.tpl');
         } else {
index d43a164..96e6aab 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 1346856..fc6bd7d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -145,19 +145,23 @@ class ProfileModule extends PLModule
                 }
             }
         } elseif (Env::v('suppr')) {
-            XDB::execute('DELETE FROM photo WHERE uid = {?}',
-                                   S::v('uid'));
-            XDB::execute('DELETE FROM requests
-                                     WHERE user_id = {?} AND type="photo"',
-                                   S::v('uid'));
+            XDB::execute('DELETE FROM  photo
+                                WHERE  uid = {?}',
+                         S::v('uid'));
+            XDB::execute('DELETE FROM  requests
+                                WHERE  user_id = {?} AND type="photo"',
+                         S::v('uid'));
+            update_NbValid();
         } elseif (Env::v('cancel')) {
-            $sql = XDB::query('DELETE FROM requests
-                                        WHERE user_id={?} AND type="photo"',
-                                        S::v('uid'));
+            $sql = XDB::query('DELETE FROM  requests
+                                     WHERE  user_id={?} AND type="photo"',
+                              S::v('uid'));
+            update_NbValid();
         }
 
-        $sql = XDB::query('SELECT COUNT(*) FROM requests
-                            WHERE user_id={?} AND type="photo"',
+        $sql = XDB::query('SELECT  COUNT(*)
+                             FROM  requests
+                            WHERE  user_id={?} AND type="photo"',
                           S::v('uid'));
         $page->assign('submited', $sql->fetchOneCell());
         $page->assign('has_trombi_x', file_exists($trombi_x));
index 0717bb6..2fe7a8d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -76,15 +76,19 @@ class ProfileAddress extends ProfileGeoloc
             }
         }
         $current = 0;
+        $success = true;
         foreach ($value as $key=>&$adr) {
             if (@$adr['current']) {
                 $current++;
             }
         }
-        if (!$init && $current != 1 && count($value) > 0) {
+        if ($current == 0 && count($value) > 0) {
+            foreach ($value as $key=>&$adr) {
+                $adr['current'] = true;
+                break;
+            }
+        } else if ($current > 1) {
             $success = false;
-        } else {
-            $success = true;
         }
         foreach ($value as $key=>&$adr) {
             $ls = true;
@@ -172,6 +176,7 @@ class ProfileAddresses extends ProfilePage
     {
         parent::__construct($wiz);
         $this->settings['addresses'] = new ProfileAddress();
+        $this->watched['addresses'] = true;
     }
 
     protected function _fetchData()
index ab1d9fd..0753966 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -92,6 +92,7 @@ class ProfileDecos extends ProfilePage
         parent::__construct($wiz);
         $this->settings['medals'] = new ProfileDeco();
         $this->settings['medals_pub'] = new ProfilePub();
+        $this->watched['medals'] = true;
     }
 
     protected function _fetchData()
index f106838..ac81f59 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -117,6 +117,8 @@ class ProfileGeneral extends ProfilePage
         $this->settings['appli1']
                                   = $this->settings['appli2']
                                   = new ProfileAppli();
+        $this->watched= array('nom' => true, 'freetext' => true, 'mobile' => true, 'web' => true,
+                       'appli1' => true, 'appli2' => true, 'nationalite' => true, 'nick' => true);
     }
 
     protected function _fetchData()
index 83d89f3..cd2b705 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -103,6 +103,7 @@ class ProfileGroups extends ProfilePage
         parent::__construct($wiz);
         $this->settings['section']  = new ProfileSection();
         $this->settings['binets']   = new ProfileGroup('binets', 'user_id', 'binet_id');
+        $this->watched['section'] = $this->watched['binets'] = true;
     }
 
     public function _prepare(PlatalPage &$page, $id)
index 35be716..33690c4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -130,6 +130,7 @@ class ProfileJobs extends ProfilePage
         parent::__construct($wiz);
         $this->settings['cv'] = null;
         $this->settings['jobs'] = new ProfileJob();
+        $this->watched['cv'] = $this->watched['jobs'] = true;
     }
 
     protected function _fetchData()
index 5ab9095..d1509a8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -130,7 +130,7 @@ class ProfileMentor extends ProfilePage
                              FROM  mentor
                             WHERE  uid = {?}",
                           S::i('uid'));
-        $this->value['expertise'] = $res->fetchOneCell();
+        $this->values['expertise'] = $res->fetchOneCell();
     }
 
     protected function _saveData()
index 96344b8..e259f1e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -172,7 +172,7 @@ abstract class ProfileGeoloc implements ProfileSetting
             } else if (@$address['parsevalid']) {
                 $address = array_merge($address, cut_address(@$address['text']));
                 $address['checked'] = true;
-                $mailer = new PlMailer('geoloc/mail_geoloc.tpl');
+                $mailer = new PlMailer('geoloc/geoloc.mail.tpl');
                 $mailer->assign('text', get_address_text($address));
                 $mailer->assign('geoloc', $geotxt);
                 $mailer->send();
@@ -201,6 +201,7 @@ abstract class ProfilePage implements PlWizardPage
     protected $settings = array();  // A set ProfileSetting objects
     protected $errors   = array();  // A set of boolean with the value check errors
     protected $changed  = array();  // A set of boolean indicating wether the value has been changed
+    protected $watched  = array();  // A set of boolean indicating the fields that are watched
 
     public $orig     = array();
     public $values   = array();
@@ -240,10 +241,14 @@ abstract class ProfilePage implements PlWizardPage
 
     protected function saveData()
     {
+        require_once 'notifs.inc.php';
         foreach ($this->settings as $field=>&$setting) {
             if (!is_null($setting) && $this->changed[$field]) {
                 $setting->save($this, $field, $this->values[$field]);
             }
+            if ($this->changed[$field] && @$this->watched[$field]) {
+                register_profile_update(S::i('uid'), $field);
+            }
         }
         $this->_saveData();
 
@@ -251,7 +256,6 @@ abstract class ProfilePage implements PlWizardPage
         XDB::execute('REPLACE INTO  user_changes
                                SET  user_id = {?}', S::v('uid'));
         if (!S::has('suid')) {
-            require_once 'notifs.inc.php';
             register_watch_op(S::i('uid'), WATCH_FICHE);
         }
         global $platal;
index bfaa7fb..8f0ec5e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 457235a..973993f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -144,10 +144,14 @@ class RegisterModule extends PLModule
                             "valide, en particulier, il ne peut pas être renvoyé vers lui-même.";
                     }
                     $birth = trim(Env::v('naissance'));
-                    if (!preg_match('/^[0-3][0-9][01][0-9][12][90][0-9][0-9]$/', $birth)) {
+                    if (!preg_match('@^[0-3]?\d/[01]?\d/(19|20)?\d{2}$@', $birth)) {
                         $err[] = "La 'Date de naissance' n'est pas correcte.";
                     } else {
-                        $year  = (int)substr($birth, 4, 4);
+                        $birth = explode('/', $birth, 3);
+                        for ($i = 0; $i < 3; $i++)
+                            $birth[$i] = intval($birth[$i]);
+                        if ($birth[2] < 100) $birth[2] += 1900;
+                        $year  = $birth[2];
                         $promo = (int)$sub_state['promo'];
                         if ($year > $promo - 15 || $year < $promo - 30) {
                             $err[] = "La 'Date de naissance' n'est pas correcte.";
@@ -181,10 +185,8 @@ class RegisterModule extends PLModule
                     if (isset($err)) {
                         $err = join('<br />', $err);
                     } else {
-                        $sub_state['naissance'] = sprintf("%s-%s-%s",
-                                                          substr($birth,4,4),
-                                                          substr($birth,2,2),
-                                                          substr($birth,0,2));
+                        $sub_state['naissance'] = sprintf("%04d-%02d-%02d",
+                                                          intval($birth[2]), intval($birth[1]), intval($birth[0]));
                         if ($sub_state['naissance_ini'] != '0000-00-00' && $sub_state['naissance'] != $sub_state['naissance_ini']) {
                             $alert .= "Date de naissance incorrecte à l'inscription - ";
                         }
@@ -313,6 +315,9 @@ class RegisterModule extends PLModule
         require_once('user.func.inc.php');
         user_reindex($uid);
 
+        // update number of subscribers (perms has changed)
+        update_NbIns();
+
         if (!start_connexion($uid, false)) {
             return PL_FORBIDDEN;
         }
@@ -322,16 +327,20 @@ class RegisterModule extends PLModule
         /************* envoi d'un mail au démarcheur ***************/
         /***********************************************************/
         $res = XDB::iterRow(
-                "SELECT  DISTINCT sa.alias, IF(s.nom_usage,s.nom_usage,s.nom) AS nom,
-                         s.prenom, FIND_IN_SET('femme', s.flags) AS femme
+                "SELECT  sa.alias, IF(s.nom_usage,s.nom_usage,s.nom) AS nom,
+                         s.prenom, FIND_IN_SET('femme', s.flags) AS femme,
+                         GROUP_CONCAT(m.email) AS mails, MAX(m.last) AS dateDernier
                    FROM  register_marketing AS m
              INNER JOIN  auth_user_md5      AS s  ON ( m.sender = s.user_id )
              INNER JOIN  aliases            AS sa ON ( sa.id = m.sender
                                                        AND FIND_IN_SET('bestalias', sa.flags) )
-                  WHERE  m.uid = {?}", $uid);
+                  WHERE  m.uid = {?}
+               GROUP BY  m.sender", $uid);
         XDB::execute("UPDATE register_mstats SET success=NOW() WHERE uid={?}", $uid);
 
-        while (list($salias, $snom, $sprenom, $sfemme) = $res->next()) {
+        $market = array();
+        while (list($salias, $snom, $sprenom, $sfemme, $mails, $dateDernier) = $res->next()) {
+            $market[] = " - par $snom $sprenom sur $mails (le plus récemment le $dateDernier)";
             $mymail = new PlMailer();
             $mymail->setSubject("$prenom $nom s'est inscrit à Polytechnique.org !");
             $mymail->setFrom('"Marketing Polytechnique.org" <register@' . $globals->mail->domain . '>');
@@ -362,7 +371,10 @@ class RegisterModule extends PLModule
                  . " - email     : $email\n"
                  . " - sexe      : $femme\n"
                  . " - ip        : {$logger->ip} ({$logger->host})\n"
-                 . ($logger->proxy_ip ? " - proxy     : {$logger->proxy_ip} ({$logger->proxy_host})\n" : "");
+                 . ($logger->proxy_ip ? " - proxy     : {$logger->proxy_ip} ({$logger->proxy_host})\n" : "")
+                 . "\n\n"
+                 . "Les marketings suivants avaient été effectués :\n"
+                 . implode("\n", $market);
             $mymail->setTxtBody($msg);
             $mymail->send();
         }
@@ -375,6 +387,7 @@ class RegisterModule extends PLModule
 
     function handler_success(&$page)
     {
+        global $globals;
         $page->changeTpl('register/success.tpl');
 
         $_SESSION['sub_state'] = array('step' => 5);
@@ -385,6 +398,17 @@ class RegisterModule extends PLModule
                                      WHERE user_id={?}', $password,
                                    S::v('uid'));
 
+            // If GoogleApps is enabled, and the user did choose to use synchronized passwords,
+            // and if the (stupid) user has decided to user /register/success another time,
+            // updates the Google Apps password as well.
+            if ($globals->mailstorage->googleapps_domain) {
+                require_once 'googleapps.inc.php';
+                $account = new GoogleAppsAccount(S::v('uid'), S::v('forlife'));
+                if ($account->active() && $account->sync_password) {
+                    $account->set_password($password);
+                }
+            }
+
             $log = S::v('log');
             $log->log('passwd', '');
 
@@ -457,6 +481,11 @@ class RegisterModule extends PLModule
                 $client->subscribe($sub);
             }
         }
+        if (Post::v('imap')) {
+            require_once 'emails.inc.php';
+            $storage = new MailStorageIMAP(S::v('uid'));
+            $storage->enable();
+        }
 
         pl_redirect('profile/edit');
     }
index bd7dd83..4253147 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index f58c7e1..f74b4f5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -143,9 +143,9 @@ class SearchModule extends PLModule
             if (!S::logged() && $nb_tot > $globals->search->public_max) {
                 new ThrowError('Votre recherche a généré trop de résultats pour un affichage public.');
             } elseif ($nb_tot > $globals->search->private_max) {
-                new ThrowError('Recherche trop générale');
+                new ThrowError('Recherche trop générale. Une <a href="search/adv">recherche avancée</a> permet de préciser la recherche.');
             } elseif (empty($nb_tot)) {
-                new ThrowError('il n\'existe personne correspondant à ces critères dans la base !');
+                new ThrowError('Il n\'existe personne correspondant à ces critères dans la base !');
             }
         } else {
             $page->assign('formulaire',1);
@@ -204,7 +204,7 @@ class SearchModule extends PLModule
             $nb_tot = $view->count();
             if ($nb_tot > $globals->search->private_max) {
                 $this->form_prepare();
-                new ThrowError('Recherche trop générale');
+                new ThrowError('Recherche trop générale.');
             }
         }
 
index 8a27101..ea58298 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -307,8 +307,8 @@ class QuickSearch extends SField
             $where[] = 'ems.email = ' . XDB::escape($this->email);
         }
         if (!empty($this->ip)) {
-            $ip = XDB::escape($this->ip);
-            $where[] = "( ls.ip = $ip OR ls.forward_ip = $ip )";
+            $ip = ip_to_uint($this->ip);
+            $where[] = "( ls.ip = $ip OR ls.forward_ip = $ip ) AND ls.suid = 0";
         }
 
         return join(" AND ", $where);
@@ -755,6 +755,11 @@ class SFieldGroup
     {
         $this->fields = $_fields;
         $this->and    = $_and;
+        foreach ($this->fields as $key=>&$field) {
+            if (is_null($field)) {
+                unset($this->fields[$key]);
+            }
+        }
     }
 
     // }}}
@@ -764,7 +769,9 @@ class SFieldGroup
     {
         $b = true;
         for ($i=0 ; $b && $i<count($this->fields) ; $i++) {
-            $b = $b && $this->fields[$i]->too_large();
+            if (!is_null($this->fields[$i])) {
+                $b = $b && $this->fields[$i]->too_large();
+            }
         }
         return $b;
     }
index f4de2ab..0d23a78 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -41,6 +41,11 @@ function advancedSearchFromInput()
     $womanField      = new RefSField('woman',array('FIND_IN_SET(\'femme\',u.flags)+1'),'','','');
     $subscriberField = new RefSField('subscriber',array('!(u.perms IN (\'admin\',\'user\'))+1'),'','','');
     $aliveField      = new RefSField('alive',array('(u.deces!=0)+1'),'','','');
+    if (Env::v('only_referent') == 'on') {
+        $referentField = new RefSField('only_referent', array('"on"'), 'mentor', 'mt', 'mt.expertise != "" AND mt.uid=u.user_id');
+    } else {
+        $referentField = null;
+    }
 
     if (!Env::i('cityid')) {
         $townField      = new RefSField('city',array('ac.city'),'adresses','ac',getadr_join('ac'),false);
@@ -70,7 +75,7 @@ function advancedSearchFromInput()
 
     return array(
                 $nameField, $firstnameField, $nicknameField, $promo1Field,
-                $promo2Field, $womanField, $subscriberField, $aliveField,
+                $promo2Field, $womanField, $subscriberField, $aliveField, $referentField,
                 $townField, $countryField, $regionField, $mapField, $entrepriseField,
                 $posteField, $secteurField, $cvField, $natField, $binetField,
                 $groupexField, $sectionField, $schoolField, $diplomaField,
index 58ee7d1..6d97fcd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -69,7 +69,7 @@ class StatsModule extends PLModule
                             ".(-($jours+1)).") AS jour,
                          COUNT(user_id) AS nb
                    FROM  auth_user_md5
-                  WHERE  perms IN ('admin','user')
+                  WHERE  perms IN ('admin','user') AND deces = 0
                GROUP BY  jour");
 
         //genere des donnees compatibles avec GNUPLOT
@@ -125,7 +125,7 @@ EOF2;
     {
         if ($promo == 'all') {
             // date de départ
-            $depart = 1920;
+            $depart = 1930;
 
             //recupere le nombre d'inscriptions par jour sur la plage concernée
             $res = XDB::iterRow(
@@ -164,7 +164,7 @@ set timefmt "%d/%m/%y"
 set xr [$depart:$fin]
 set yr [0:100]
 
-set title "Nombre d'inscrits par promotion depuis $depart."
+set title "Proportion d'inscrits par promotion depuis $depart, en %."
 
 plot "-" using 1:2 title 'inscrits' with boxes;
 {$inscrits}
@@ -175,11 +175,11 @@ EOF2;
             //nombre de jours sur le graph
             $jours = 365;
             define('DUREEJOUR',24*3600);
-            $res = XDB::query("SELECT min(TO_DAYS(date_ins)-TO_DAYS(now()))
-                                           FROM auth_user_md5
-                                          WHERE promo = {?}
-                                                AND perms IN ('admin', 'user')",
-                                        $promo);
+            $res = XDB::query(
+                    "SELECT  min(TO_DAYS(date_ins)-TO_DAYS(now()))
+                       FROM  auth_user_md5
+                      WHERE  promo = {?} AND perms IN ('admin', 'user') AND deces = 0",
+                    $promo);
             $jours = -$res->fetchOneCell();
 
             //recupere le nombre d'inscriptions par jour sur la plage concernée
@@ -189,7 +189,7 @@ EOF2;
                                 ".(-($jours+1)).") AS jour,
                              COUNT(user_id) AS nb
                        FROM  auth_user_md5
-                      WHERE  promo = {?} AND perms IN ('admin','user')
+                      WHERE  promo = {?} AND perms IN ('admin','user') AND deces = 0
                    GROUP BY  jour", $promo);
 
             //genere des donnees compatibles avec GNUPLOT
@@ -249,7 +249,7 @@ EOF2;
         $res = XDB::iterRow(
                 "SELECT  promo,COUNT(*)
                    FROM  auth_user_md5
-                  WHERE  promo > 1900 AND perms IN ('admin','user')
+                  WHERE  promo > 1900 AND perms IN ('admin','user') AND deces = 0
                GROUP BY  promo
                ORDER BY  promo");
         $max=0; $min=3000;
index 65ed987..ff3bb05 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -331,7 +331,7 @@ class SurveyModule extends PLModule
                     $this->show_error($page, "", 'survey/edit', $errors);
                 } else {
                     if (S::has('survey_id')) {
-                        $this->show_confirm($page, "Veuillez confirmer l'enregistrement des modifications apportées à ce sondage", 'edit', array('action' => 'valid'));
+                        $this->show_confirm($page, "Veuillez confirmer l'enregistrement des modifications apportées à ce sondage.", 'edit', array('action' => 'valid'));
                     } else {
                         $this->show_confirm($page, "Veuillez confirmer l'envoi de cette proposition de sondage.", 'edit', array('action' => 'valid'));
                     }
index 29aba9a..89d674b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index d57101a..d592f5b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 6cf3828..3910dbc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -97,6 +97,7 @@ class XnetEventsModule extends PLModule
             XDB::execute("DELETE FROM requests
                                     WHERE type = 'paiements' AND data LIKE {?}",
                                    PayReq::same_event($eid, $globals->asso('id')));
+            update_NbValid();
         }
 
         if ($action == 'archive') {
@@ -243,7 +244,7 @@ class XnetEventsModule extends PLModule
                 XDB::execute(
                     "DELETE FROM  groupex.evenements_participants
                            WHERE  eid = {?} AND uid = {?} AND item_id = {?}",
-                    $eid, S::v("uid"), $j);            
+                    $eid, S::v("uid"), $j);
                 $updated = $eid;
             }
             $total += $nb;
@@ -283,6 +284,7 @@ class XnetEventsModule extends PLModule
         $page->assign('admin', $admin);
         $page->assign('moments', $evt['moments']);
         $page->assign('money', $evt['money']);
+        $page->assign('telepayment', $evt['paiement_id']);
         $page->assign('tout', !Env::v('item_id', false));
     }
 
@@ -354,7 +356,8 @@ class XnetEventsModule extends PLModule
 
         if (Post::v('intitule')) {
             require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php';
-            $short_name = event_change_shortname($page, $infos['short_name'],
+            $short_name = event_change_shortname($page, $eid,
+                                                 $infos['short_name'],
                                                  Env::v('short_name', ''));
             if ($short_name != Env::v('short_name')) {
                 $error = true;
@@ -554,14 +557,14 @@ class XnetEventsModule extends PLModule
                                  GROUP BY uid",
                                             $member['uid'], $evt['eid']);
                 $u = $res->fetchOneAssoc();
-                $u = $u['cnt'] ? null : $u['nb'];
+                $u = $u['cnt'] ? $u['nb'] : null;
                 subscribe_lists_event($u, $member['uid'], $evt);
             }
 
             $evt = get_event_detail($eid, $item_id);
         }
 
-        $page->assign('evt', $evt);
+        $page->assign_by_ref('evt', $evt);
         $page->assign('tout', is_null($item_id));
 
         if (count($evt['moments'])) {
index 3cb304e..b1822da 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -110,7 +110,7 @@ function get_event_detail($eid, $item_id = false, $asso_id = null)
 // }}}
 
 // {{{ function get_event_participants()
-function get_event_participants($evt, $item_id, $tri, $limit = '') {
+function get_event_participants(&$evt, $item_id, $tri, $limit = '') {
     global $globals;
 
     if (Env::has('initiale')) {
@@ -155,6 +155,10 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') {
     $tab = array();
     $user = 0;
 
+    $evt['adminpaid'] = 0;
+    $evt['telepaid']  = 0;
+    $evt['topay']     = 0;
+    $evt['paid']      = 0;
     while ($u = $res->next()) {
         if ($u['nb'] == 0) {
             continue;
@@ -169,8 +173,8 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') {
                 $pay_id, $u['uid']);
             $montants = $res_->fetchColumn();
             foreach ($montants as $m) {
-                    $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", ".");
-                    $u['paid'] += trim($p);
+                $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", ".");
+                $u['paid'] += trim($p);
             }
         }
         $u['telepayment'] = $u['paid'] - $u['adminpaid'];
@@ -185,6 +189,10 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') {
             $u['montant'] += $i['montant']*$i['nb'];
         }
         $tab[] = $u;
+        $evt['telepaid']  += $u['telepayment'];
+        $evt['adminpaid'] += $u['adminpaid'];
+        $evt['paid']      += $u['paid'];
+        $evt['topay']     += $u['montant'];
     }
     return $tab;
 }
@@ -199,7 +207,7 @@ function subscribe_lists_event($participate, $uid, $evt)
     $participant_list = $evt['participant_list'];
     $absent_list      = $evt['absent_list'];
 
-    $email = get_user_forlife($uid);
+    $email = get_user_forlife($uid, '_silent_user_callback');
 
     if ($email) {
         $email .= '@'.$globals->mail->domain;
@@ -242,7 +250,7 @@ function subscribe_lists_event($participate, $uid, $evt)
 }
 // }}}
 
-function event_change_shortname(&$page, $old, $new)
+function event_change_shortname(&$page, $eid, $old, $new)
 {
     global $globals;
 
@@ -299,7 +307,7 @@ function event_change_shortname(&$page, $old, $new)
              LEFT JOIN groupex.membres AS m ON (ep.uid = m.uid)
              LEFT JOIN auth_user_md5   AS u ON (u.user_id = ep.uid)
              LEFT JOIN aliases         AS a ON (a.id = ep.uid AND a.type = 'a_vie')
-                 WHERE ep.eid = {?}
+                 WHERE ep.eid = {?} AND ep.nb > 0
               GROUP BY ep.uid)",
               $lastid, '@'.$globals->mail->domain, $eid);
 
@@ -310,12 +318,12 @@ function event_change_shortname(&$page, $old, $new)
         XDB::execute("INSERT INTO virtual_redirect (
             SELECT {?} AS vid, IF(u.nom IS NULL, m.email, CONCAT(a.alias, {?})) AS redirect
                   FROM groupex.membres AS m
-             LEFT JOIN groupex.evenements_participants AS ep ON (ep.uid = m.uid)
+             LEFT JOIN groupex.evenements_participants AS ep ON (ep.uid = m.uid AND ep.eid = {?})
              LEFT JOIN auth_user_md5   AS u ON (u.user_id = m.uid)
              LEFT JOIN aliases         AS a ON (a.id = m.uid AND a.type = 'a_vie')
                  WHERE m.asso_id = {?} AND ep.uid IS NULL
               GROUP BY m.uid)",
-             $lastid, "@".$globals->mail->domain, $globals->asso('id'));
+             $lastid, "@".$globals->mail->domain, $eid, $globals->asso('id'));
 
         return $new;
     }
index b017540..794fdc7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -104,6 +104,7 @@ class XnetGrpModule extends PLModule
             '%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'),
         );
     }
@@ -134,7 +135,8 @@ class XnetGrpModule extends PLModule
                             Env::i('unread'), S::i('uid'));
                 pl_redirect("#art" . Env::i('unread'));
             }
-            $arts = XDB::iterator("SELECT a.*, u.nom, u.prenom, u.promo, l.alias AS forlife
+            $arts = XDB::iterator("SELECT a.*, u.nom, u.prenom, u.promo, l.alias AS forlife,
+                                          FIND_IN_SET('photo', a.flags) AS photo
                                      FROM groupex.announces AS a
                                INNER JOIN auth_user_md5 AS u USING(user_id)
                                INNER JOIN aliases AS l ON (u.user_id = l.id AND l.type = 'a_vie')
@@ -155,7 +157,7 @@ class XnetGrpModule extends PLModule
                                    S::i('uid'), $globals->asso('id'), S::i('promo'), S::i('promo'));
             $page->assign('article_index', $index);
         } else {
-            $arts = XDB::iterator("SELECT a.*, u.nom, u.prenom, u.promo
+            $arts = XDB::iterator("SELECT a.*, u.nom, u.prenom, u.promo, FIND_IN_SET('photo', a.flags) AS photo
                                      FROM groupex.announces AS a
                                INNER JOIN auth_user_md5 AS u USING(user_id)
                                     WHERE asso_id = {?} AND peremption >= CURRENT_DATE()
@@ -165,10 +167,10 @@ class XnetGrpModule extends PLModule
 
         if (!S::has('core_rss_hash')) {
             $page->setRssLink("Polytechnique.net :: {$globals->asso("nom")} :: News publiques",
-                              "rss/rss.xml");
+                              $platal->ns . "rss/rss.xml");
         } else {
             $page->setRssLink("Polytechnique.net :: {$globals->asso("nom")} :: News",
-                              'rss/'.S::v('forlife') .'/'.S::v('core_rss_hash').'/rss.xml');
+                              $platal->ns . 'rss/'.S::v('forlife') .'/'.S::v('core_rss_hash').'/rss.xml');
         }
 
         $page->assign('articles', $arts);
@@ -476,19 +478,17 @@ class XnetGrpModule extends PLModule
 
         if (!is_null($u) && may_update()) {
             $page->assign('u', $u);
-            $res = XDB::query("SELECT nom, prenom, promo, user_id
-                                           FROM auth_user_md5 AS u
-                                     INNER JOIN aliases AS al ON (al.id = u.user_id
-                                                                  AND al.type != 'liste')
-                                          WHERE al.alias = {?}", $u);
+            $res = XDB::query("SELECT  u.nom, u.prenom, u.promo, u.user_id, FIND_IN_SET('femme', u.flags)
+                                 FROM  auth_user_md5 AS u
+                           INNER JOIN  aliases AS al ON (al.id = u.user_id AND al.type != 'liste')
+                                WHERE  al.alias = {?}", $u);
 
-            if (list($nom, $prenom, $promo, $uid) = $res->fetchOneRow()) {
+            if (list($nom, $prenom, $promo, $uid, $sexe) = $res->fetchOneRow()) {
                 $res = XDB::query("SELECT  COUNT(*)
-                                               FROM  groupex.membres AS m
-                                         INNER JOIN  aliases  AS a ON (m.uid = a.id
-                                                                       AND a.type != 'homonyme')
-                                              WHERE  a.alias = {?} AND m.asso_id = {?}",
-                                            $u, $globals->asso('id'));
+                                     FROM  groupex.membres AS m
+                               INNER JOIN  aliases  AS a ON (m.uid = a.id AND a.type != 'homonyme')
+                                    WHERE  a.alias = {?} AND m.asso_id = {?}",
+                                  $u, $globals->asso('id'));
                 $n   = $res->fetchOneCell();
                 if ($n) {
                     $page->kill("$prenom $nom est déjà membre du groupe !");
@@ -496,15 +496,15 @@ class XnetGrpModule extends PLModule
                 }
                 elseif (Env::has('accept'))
                 {
-                    XDB::execute("INSERT INTO groupex.membres
-                                            VALUES ({?}, {?}, 'membre', 'X', NULL, NULL, NULL, NULL, NULL)",
+                    XDB::execute("INSERT INTO  groupex.membres (asso_id, uid)
+                                       VALUES  ({?}, {?})",
                                             $globals->asso('id'), $uid);
                     $mailer = new PlMailer();
                     $mailer->addTo("$u@polytechnique.org");
                     $mailer->setFrom('"'.S::v('prenom').' '.S::v('nom')
                                      .'" <'.S::v('forlife').'@polytechnique.org>');
                     $mailer->setSubject('['.$globals->asso('nom').'] Demande d\'inscription');
-                    $message = "Cher Camarade,\n"
+                    $message = ($sexe ? 'Chère' : 'Cher') . " Camarade,\n"
                              . "\n"
                              . "  Suite à ta demande d'adhésion à ".$globals->asso('nom').",\n"
                              . "j'ai le plaisir de t'annoncer que ton inscription a été validée !\n"
@@ -513,7 +513,7 @@ class XnetGrpModule extends PLModule
                              . "{$_SESSION["prenom"]} {$_SESSION["nom"]}.";
                     $mailer->setTxtBody($message);
                     $mailer->send();
-                    $page->kill("$prenom $nom a bien été inscrit");
+                    $page->kill("$prenom $nom a bien été inscrit" . ($sexe ? 'e' : '') . ".");
                 }
                 elseif (Env::has('refuse'))
                 {
@@ -609,7 +609,7 @@ class XnetGrpModule extends PLModule
                 break;
             }
         }
-        pl_redirect("");
+        http_redirect($_SERVER['HTTP_REFERER']);
     }
 
     function handler_admin_annuaire(&$page)
@@ -688,7 +688,7 @@ class XnetGrpModule extends PLModule
                            WHERE  a.alias={?}', $globals->asso('id'), $forlife);
                 pl_redirect("member/$forlife");
             } else {
-                $page->trig($email." n'est pas un alias polytechnique.org valide");
+                $page->trig($email." n'est pas un alias polytechnique.org valide.");
             }
         } else {
             require_once 'xorg.misc.inc.php';
@@ -1030,7 +1030,8 @@ class XnetGrpModule extends PLModule
 
         if ($uid) {
             $rss = XDB::iterator("SELECT a.id, a.titre, a.texte, a.contacts, a.create_date,
-                                         IF(u2.nom_usage != '', u2.nom_usage, u2.nom) AS nom, u2.prenom, u2.promo
+                                         IF(u2.nom_usage != '', u2.nom_usage, u2.nom) AS nom, u2.prenom, u2.promo,
+                                         FIND_IN_SET('photo', a.flags) AS photo
                                    FROM auth_user_md5 AS u
                              INNER JOIN groupex.announces AS a ON ( (a.promo_min = 0 OR a.promo_min <= u.promo)
                                                                   AND (a.promo_max = 0 OR a.promo_max <= u.promo))
@@ -1049,6 +1050,48 @@ class XnetGrpModule extends PLModule
         $page->assign('rss', $rss);
     }
 
+    private function upload_image(PlatalPage &$page, PlUpload &$upload)
+    {
+        if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) {
+            return true;
+        }
+        if (!$upload->upload($_FILES['image'])  && !$upload->download(Env::v('image_url'))) {
+            $page->trig('Impossible de télécharger l\'image');
+            return false;
+        } elseif (!$upload->isType('image')) {
+            $page->trig('Le fichier n\'est pas une image valide au format JPEG, GIF ou PNG.');
+            $upload->rm();
+            return false;
+        } elseif (!$upload->resizeImage(200, 300, 100, 100, 32284)) {
+            $page->trig('Impossible de retraiter l\'image');
+            return false;
+        }
+        return true;
+    }
+
+    function handler_photo_announce(&$page, $eid = null) {
+        if ($eid) {
+            $res = XDB::query("SELECT * FROM groupex.announces_photo WHERE eid = {?}", $eid);
+            if ($res->numRows()) {
+                $photo = $res->fetchOneAssoc();
+                header('Content-Type: image/' . $photo['attachmime']);
+                echo $photo['attach'];
+                exit;
+            }
+        } else {
+            $upload = new PlUpload(S::v('forlife'), 'xnetannounce');
+            if ($upload->exists() && $upload->isType('image')) {
+                header('Content-Type: ' . $upload->contentType());
+                echo $upload->getContents();
+                exit;
+            }
+        }
+        global $globals;
+        header('Content-Type: image/png');
+        echo file_get_contents($globals->spoolroot . '/htdocs/images/logo.png');
+        exit;
+    }
+
     function handler_edit_announce(&$page, $aid = null)
     {
         global $globals, $platal;
@@ -1056,7 +1099,8 @@ class XnetGrpModule extends PLModule
         $page->assign('new', is_null($aid));
         $art = array();
 
-        if (Post::v('valid') == 'Visualiser' || Post::v('valid') == 'Enregistrer') {
+        if (Post::v('valid') == 'Visualiser' || Post::v('valid') == 'Enregistrer'
+            || Post::v('valid') == 'Supprimer l\'image' || Post::v('valid') == 'Pas d\'image') {
             if (!is_null($aid)) {
                 $art['id'] = $aid;
             }
@@ -1074,6 +1118,8 @@ class XnetGrpModule extends PLModule
             $art['xorg']       = Post::has('xorg');
             $art['nl']         = Post::has('nl');
             $art['event']      = Post::v('event');
+            $upload     = new PlUpload(S::v('forlife'), 'xnetannounce');
+            $this->upload_image($page, $upload);
 
             $art['contact_html'] = $art['contacts'];
             if ($art['event']) {
@@ -1093,36 +1139,65 @@ class XnetGrpModule extends PLModule
                 $page->trig("L'article doit avoir un titre et un contenu");
                 Post::kill('valid');
             }
+
+            if (Post::v('valid') == 'Supprimer l\'image') {
+                $upload->rm();
+                Post::kill('valid');
+            }
+            $art['photo'] = $upload->exists() || Post::i('photo');
+            if (Post::v('valid') == 'Pas d\'image' && !is_null($aid)) {
+                XDB::query("DELETE FROM groupex.announces_photo WHERE eid = {?}", $aid);
+                $upload->rm();
+                Post::kill('valid');
+                $art['photo'] = false;
+            }
         }
 
         if (Post::v('valid') == 'Enregistrer') {
             $promo_min = ($art['public'] ? 0 : $art['promo_min']);
             $promo_max = ($art['public'] ? 0 : $art['promo_max']);
+            $flags = array();
+            if ($art['public']) {
+                $flags[] = 'public';
+            }
+            if ($art['photo']) {
+                $flags[] = 'photo';
+            }
+            $flags = implode(',', $flags);
             if (is_null($aid)) {
                 $fulltext = $art['texte'];
                 if (!empty($art['contact_html'])) {
                     $fulltext .= "\n\n'''Contacts :'''\\\\\n" . $art['contact_html'];
                 }
-                $post = null;
+                $post = null;/*
                 if ($globals->asso('forum')) {
                     require_once 'banana/forum.inc.php';
                     $banana = new ForumsBanana(S::v('forlife'));
                     $post = $banana->post($globals->asso('forum'), null,
                                           $art['titre'], MiniWiki::wikiToText($fulltext, false, 0, 80));
-                }
+                }*/
                 XDB::query("INSERT INTO groupex.announces
                                  (user_id, asso_id, create_date, titre, texte, contacts,
                                    peremption, promo_min, promo_max, flags, post_id)
                             VALUES ({?}, {?}, NOW(), {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?})",
                            S::i('uid'), $globals->asso('id'), $art['titre'], $art['texte'], $art['contact_html'],
-                           $art['peremption'], $promo_min, $promo_max, $art['public'] ? 'public' : '', $post);
+                           $art['peremption'], $promo_min, $promo_max, $flags, $post);
                 $aid = XDB::insertId();
+                if ($art['photo']) {
+                    list($imgx, $imgy, $imgtype) = $upload->imageInfo();
+                    XDB::execute("INSERT INTO groupex.announces_photo
+                                          SET eid = {?}, attachmime = {?}, x = {?}, y = {?}, attach = {?}",
+                                 $aid, $imgtype, $imgx, $imgy, $upload->getContents());
+                }
                 if ($art['xorg']) {
                     require_once('validations.inc.php');
                     $article = new EvtReq("[{$globals->asso('nom')}] " . $art['titre'], $fulltext,
-                                    $art['promo_min'], $art['promo_max'], $art['peremption'], "", S::v('uid'));
+                                    $art['promo_min'], $art['promo_max'], $art['peremption'], "", S::v('uid'),
+                                    $upload);
                     $article->submit();
                     $page->trig("L'affichage sur la page d'accueil de Polytechnique.org est en attente de validation");
+                } else if ($upload && $upload->exists()) {
+                    $upload->rm();
                 }
                 if ($art['nl']) {
                     require_once('validations.inc.php');
@@ -1137,8 +1212,15 @@ class XnetGrpModule extends PLModule
                                    promo_min={?}, promo_max={?}, flags={?}
                              WHERE id={?} AND asso_id={?}",
                            $art['titre'], $art['texte'], $art['contacts'], $art['peremption'],
-                           $promo_min, $promo_max,  $art['public'] ? 'public' : '',
+                           $promo_min, $promo_max,  $flags,
                            $art['id'], $globals->asso('id'));
+                if ($art['photo'] && $upload->exists()) {
+                    list($imgx, $imgy, $imgtype) = $upload->imageInfo();
+                    XDB::execute("REPLACE INTO groupex.announces_photo
+                                          SET eid = {?}, attachmime = {?}, x = {?}, y = {?}, attach = {?}",
+                                 $aid, $imgtype, $imgx, $imgy, $upload->getContents());
+                    $upload->rm();
+                }
             }
         }
         if (Post::v('valid') == 'Enregistrer' || Post::v('valid') == 'Annuler') {
@@ -1147,7 +1229,8 @@ class XnetGrpModule extends PLModule
 
         if (empty($art) && !is_null($aid)) {
             $res = XDB::query("SELECT a.*, u.nom, u.prenom, u.promo, l.alias AS forlife,
-                                      FIND_IN_SET('public', a.flags) AS public
+                                      FIND_IN_SET('public', a.flags) AS public,
+                                      FIND_IN_SET('photo', a.flags) AS photo
                                  FROM groupex.announces AS a
                            INNER JOIN auth_user_md5 AS u USING(user_id)
                            INNER JOIN aliases AS l ON (l.id = u.user_id AND l.type = 'a_vie')
@@ -1173,6 +1256,7 @@ class XnetGrpModule extends PLModule
 
         $art['contact_html'] = @MiniWiki::WikiToHTML($art['contact_html']);
         $page->assign('art', $art);
+        $page->assign_by_ref('upload', $upload);
     }
 
     function handler_admin_announce(&$page)
index d20ec27..a998e99 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 1c7405a..ab86ee6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -164,27 +164,15 @@ class XnetListsModule extends ListsModule
                         ."<a href='mailto:support@m4x.org'>support@m4x.org</a>");
             return;
         }
-        XDB::execute('INSERT INTO x4dat.virtual (alias,type)
-                                VALUES({?},{?})', $liste.'@'.$dom, 'list');
-        XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect)
-                                VALUES ({?}, {?})', XDB::insertId(),
-                               "$red+post@listes.polytechnique.org");
-        XDB::execute('INSERT INTO x4dat.virtual (alias,type)
-                                VALUES({?},{?})', $liste.'-owner@'.$dom, 'list');
-        XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect)
-                                VALUES ({?}, {?})', XDB::insertId(),
-                               "$red+owner@listes.polytechnique.org");
-        XDB::execute('INSERT INTO x4dat.virtual (alias,type)
-                                VALUES({?},{?})', $liste.'-admin@'.$dom, 'list');
-        XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect)
-                                VALUES ({?}, {?})', XDB::insertId(),
-                               "$red+admin@listes.polytechnique.org");
-        XDB::execute('INSERT INTO x4dat.virtual (alias,type)
-                                VALUES({?},{?})', $liste.'-bounces@'.$dom, 'list');
-        XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect)
-                                VALUES ({?}, {?})', XDB::insertId(),
-                                "$red+bounces@listes.polytechnique.org");
-
+        foreach (array('', 'owner', 'admin', 'bounces', 'unsubscribe') as $app) {
+            $mdir = $app == '' ? '+post' : '+' . $app;
+            $app  = '-' . $app;
+            XDB::execute('INSERT INTO x4dat.virtual (alias,type)
+                                    VALUES({?},{?})', $liste. $app . '@'.$dom, 'list');
+            XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect)
+                                    VALUES ({?}, {?})', XDB::insertId(),
+                                   $red . $mdir . '@listes.polytechnique.org');
+        }
         pl_redirect('lists/admin/'.$liste);
     }
 
index ffa414c..d74de2f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 330ac2a..c675903 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -24,8 +24,12 @@ function smarty_compiler_icon($tag_attrs, &$compiler)
 {
     extract($compiler->_parse_attrs($tag_attrs));
 
+    $alt = 'alt=""';
+    
     if (isset($title)) {
-        $title = 'title="'. pl_entities(trim($title, '\'"'), ENT_QUOTES).'" ';
+        $title = pl_entities(trim($title, '\'"'), ENT_QUOTES);
+        $alt = 'alt="'.$title.'"';
+        $title = 'title="'. $title.'" ';
     }
 
     $name = pl_entities(trim($name, '\'"'), ENT_QUOTES);
@@ -35,7 +39,7 @@ function smarty_compiler_icon($tag_attrs, &$compiler)
         $name = $globals->baseurl . '/' . $name;
     }
 
-    return "?><img src='$name' alt='' $title /><?php";
+    return "?><img src='$name' $alt $title /><?php";
 }
 
 /* vim: set expandtab enc=utf-8: */
index d4ca681..1ab1a01 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index da41a11..b17d370 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index b755e92..07ce7c3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -67,9 +67,9 @@ function smarty_function_display_address($param, &$smarty)
     if ($param['titre'])
     {
         if ($param['titre_div'])
-            $txthtml .= "<div class='titre'>".$param['titre'].$map."</div>\n";
+            $txthtml .= "<div class='titre'>".pl_entity_decode($param['titre'])."&nbsp;".$map."</div>\n";
         else
-            $txthtml .= "<em>".$param['titre']."</em>".$map."<br />\n";
+            $txthtml .= "<em>".pl_entity_decode($param['titre'])."&nbsp;</em>".$map."<br />\n";
     }
     foreach ($lines as $line)
     {
index fee2b21..b3960c7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index e7a3a69..5064bdf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index eef9e1d..41d1bae 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 6628003..bc0401c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7cf3049..d9e68ff 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index bceb752..8613c3a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 7ca815b..bd7ac0f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index cacb67a..08dd7df 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 8c22bcc..7714f16 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index 6da382c..01dae76 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
index d437c3f..aef58da 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
similarity index 87%
rename from plugins/insert.getNbNotifs.php
rename to plugins/modifier.number_format.php
index 3da1aad..4b09833 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 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                *
  ***************************************************************************/
 
-
-function smarty_insert_getNbNotifs($params, &$smarty)
+function smarty_modifier_number_format($string, $decimal = 0)
 {
-    if(S::logged()) {
-       require_once('notifs.inc.php');
-       return getNbNotifs();
-    }
+    return number_format($string, $decimal, ',', '.');
 }
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
similarity index 75%
rename from plugins/insert.mkStats.php
rename to plugins/modifier.uint_to_ip.php
index 0133eee..a7076fa 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 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                *
  ***************************************************************************/
 
-
-/*
- * Smarty plugin
- * -------------------------------------------------------------
- * File:     insert.mkStats.php
- * Type:     insert
- * Name:     mkStats
- * Purpose:
- * -------------------------------------------------------------
- */
-function smarty_insert_mkStats($params, &$smarty)
+function smarty_modifier_uint_to_ip($string)
 {
-    $res = XDB::query('select count(*) from requests');
-    $cnt = $res->fetchOneCell();
-    return ($cnt ? $cnt : '-');
+    return uint_to_ip($string);
 }
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index a8627bb..98e4bec 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
diff --git a/templates/admin/dead_but_active.tpl b/templates/admin/dead_but_active.tpl
new file mode 100644 (file)
index 0000000..b7ecb11
--- /dev/null
@@ -0,0 +1,55 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Décédés encore actifs</h1>
+
+<p>
+  Liste des polytechniciens décédés, mais dont le compte est encore actif
+  (veufs/veuves, ...).
+</p>
+
+<table class="bicol">
+  <tr>
+    <th>Promo</th>
+    <th colspan="2">État civil</th>
+    <th>Décès</th>
+    <th>Dernière activité</th>
+  </tr>
+  {iterate from=$dead item=d}
+  <tr class="{cycle values="impair,pair"}">
+    <td style="text-align: center">{$d.promo}</td>
+    <td>
+      <a href="profile/{$d.alias}" class="popup2">{icon name=user_suit title='Afficher la fiche'}</a>
+      <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$d.matricule_ax}">{*
+        *}{icon name=user_gray title="fiche AX"}</a>
+      <a href="admin/user/{$d.alias}">{icon name=wrench title='Administrer user'}</a>
+    </td>
+    <td>{$d.prenom} {$d.nom}</td>
+    <td style="text-align: center">{$d.deces}</td>
+    <td style="text-align: center">
+      {if $d.last gt $d.deces}<strong>{$d.last}</strong>{elseif $d.last}{$d.last}{else}-{/if}
+    </td>
+  </tr>
+  {/iterate}
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 8b6cf4c..889d2a0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -35,7 +35,7 @@
       </td>
       <td><input type="submit" value="&lt;"  name="sub01" /></td>
       <td>
-        Promotion :
+        Promotion&nbsp;:
         <input type="text" name="promo" value="{$promo}" size="4" maxlength="4" />
         <input type="submit" value="GO" />
       </td>
index c8f3a54..fc71ae8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -24,7 +24,7 @@
 <h1>Regexps pour les détections de bounces</h1>
 
 <p>
-Rappel sur les niveaux :
+Rappel sur les niveaux&nbsp;:
 </p>
 <ul>
   <li>0: IGNORE == ignorer le bounce</li>
similarity index 96%
rename from templates/mails/forums.promo.tpl
rename to templates/admin/forums-promo.mail.tpl
index 10d88eb..9f1c04e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 386065a..1b71bfa 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a79dc42..1b1064e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a9acab2..13f0d5d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                    *}
-{*  Copyright (C) 2003-2007 Polytechnique.org               *}
+{*  Copyright (C) 2003-2008 Polytechnique.org               *}
 {*  http://opensource.polytechnique.org/                  *}
 {*                                    *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -26,7 +26,7 @@
   <tr><th>Système</th></tr>
   <tr class="impair">
     <td>
-      <strong>Postfix :</strong>&nbsp;&nbsp;
+      <strong>Postfix&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/postfix/blacklist">Blacklist</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/postfix/whitelist">Whitelist</a>
@@ -38,7 +38,7 @@
   </tr>
   <tr class="pair">
     <td>
-      <strong>Sécurité :</strong>&nbsp;&nbsp;
+      <strong>Sécurité&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/logger">Logs des sessions</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/logger/actions">Actions</a>
@@ -58,7 +58,7 @@
   <tr><th>Contenu du site</th></tr>
   <tr class="impair">
     <td>
-      <strong>Utilisateurs :</strong>&nbsp;&nbsp;
+      <strong>Utilisateurs&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/promo">Ajout</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/user">Edit/Su/Logs</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;      
       <a href="admin/deaths">Décès</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
+      <a href="admin/dead-but-active">Décédés actifs</a>
+      &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/synchro_ax">Synchro AX</a>
     </td>
   </tr>
   <tr class="pair">
     <td>
-      <strong>Infos dynamiques :</strong>&nbsp;&nbsp;
+      <strong>Infos dynamiques&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/downtime">Coupures</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/mx/broken">MX défaillants</a>
@@ -86,7 +88,7 @@
   </tr>
   <tr class="impair">
     <td>
-      <strong>Champs profil :</strong>&nbsp;&nbsp;
+      <strong>Champs profil&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/formations">Formations</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/binets">Binets</a>
   </tr>
   <tr class="pair">
     <td>
-      <strong>Newsletter :</strong>&nbsp;&nbsp;
+      <strong>Newsletter&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/newsletter">Liste</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/newsletter/categories">Catégories</a>      
   </tr>
   <tr class="impair">
     <td>
-      <strong>Administrer :</strong>&nbsp;&nbsp;
+      <strong>Administrer&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/auth-groupes-x">Auth Groupes X</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/lists">Listes</a>
   </tr>
   <tr class="pair">
     <td>
-      <strong>Valider demandes :</strong>&nbsp;&nbsp;
+      <strong>Valider demandes&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/validate">Valider</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/events">Événements</a>
   </tr>
   <tr class="impair">
     <td>
-      <strong>Trésorerie :</strong>&nbsp;&nbsp;
+      <strong>Trésorerie&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/payments">Paiements</a>
     </td>
   </tr>
   <tr class="pair">
     <td>
-      <strong>Géoloc :</strong>&nbsp;&nbsp;
+      <strong>Géoloc&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/geoloc">Synchro</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/geoloc/dynamap">Dynamap</a>
   </tr>
   <tr class="impair">
     <td>
-      <strong>Wiki :</strong>&nbsp;&nbsp;
+      <strong>Wiki&nbsp;:</strong>&nbsp;&nbsp;
       <a href="admin/wiki">Pages et permissions</a>
     </td>
   </tr>
   <tr class="pair">
     <td>
-      <strong>AX-Letter :</strong>&nbsp;&nbsp;
+      <strong>AX-Letter&nbsp;:</strong>&nbsp;&nbsp;
       <a href="ax/edit">Edition</a>
       &nbsp;&nbsp;|&nbsp;&nbsp;
       <a href="admin/axletter">Inscriptions et Permissions</a>
   </tr>
   <tr class="impair">
     <td>
-      <strong>Sondages :</strong>&nbsp;&nbsp;
+      <strong>Sondages&nbsp;:</strong>&nbsp;&nbsp;
       <a href="survey/admin">Gestion des sondages</a>
     </td>
   </tr>
+  <tr class="pair">
+    <td>
+      <strong>Forums&nbsp;:</strong>&nbsp;&nbsp;
+      <a href="admin/forums">Gestion des mises au ban</a>
+    </td>
+  </tr>
 </table>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 00934e6..947c86c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index bb1da63..aefc855 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {if $session.forward_ip}
 <tr class="pair">
   <td class="titre">Hôte</td>
-  <td><em>{$session.forward_host}</em> <tt>IP: {$session.forward_ip}</tt></td>
+  <td><em>{$session.forward_host}</em> <tt>IP: {$session.forward_ip|uint_to_ip}</tt></td>
 </tr>
 <tr class="pair">
   <td class="titre">Proxy</td>
-  <td><em>{$session.host}</em> <tt>IP: {$session.ip}</tt></td>
+  <td><em>{$session.host}</em> <tt>IP: {$session.ip|uint_to_ip}</tt></td>
 </tr>
 {else}
 <tr class="pair">
   <td class="titre">{if $session.flags}Proxy{else}Hôte{/if}</td>
-  <td><em>{$session.host}</em> <tt>IP: {$session.ip}</tt></td>
+  <td><em>{$session.host}</em> <tt>IP: {$session.ip|uint_to_ip}</tt></td>
 </tr>
 {/if}
 <tr class="impair">
index bff52d6..a39e482 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 4a4d51e..d92c1c5 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -26,7 +26,7 @@
 <table class="tinybicol">
   <tr>
     <td class="center">
-      <strong>Promotion :</strong>
+      <strong>Promotion&nbsp;:</strong>
       <input type="text" size="4" name="promo" value="{$promo}" /><br />
       <input type="submit" name="valid_promo" value="Ajouter des membres" />
       <input type="submit" name="valid_promo" value="Mettre à jour les matricules AX" />
index c8adc6e..b2961f1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -54,7 +54,7 @@
 <strong>ATTENTION !  Cet utilisateur n'a pas accepté la synchronisation</strong>
 </div>
 {/if}
-<div>Les fiches de cet utilisateur :
+<div>Les fiches de cet utilisateur&nbsp;:
 <ul>
 <li><a href='profile/{$x.user_id}' class='popup2'>polytechnique.org</a></li>
 <li><a href='http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$x.matricule_ax}'>polytechniciens.com</a></li>
@@ -89,7 +89,7 @@ Adresses
 {if $adr.remove}
     Effacer l'adresse {$adr.adrid}.
 {else}
-    {if $adr.adrid}Modifier l'adresse {$adr.adrid} :{else}Ajouter l'adresse :{/if}
+    {if $adr.adrid}Modifier l'adresse {$adr.adrid}&nbsp;:{else}Ajouter l'adresse&nbsp;:{/if}
   {include file='geoloc/address.tpl' address=$adr no_div=1 for="`$x.prenom` `$x.nom`"}
 {/if}
 </td></tr>
@@ -105,26 +105,26 @@ Emplois
 {if $pro.remove}
     Effacer l'emploi {$pro.entrid}.
 {else}
-    {if $pro.entrid || $pro.entrid === 0}Modifier l'emploi {$pro.entrid} :{else}Ajouter l'emploi :{/if}
+    {if $pro.entrid || $pro.entrid === 0}Modifier l'emploi {$pro.entrid}&nbsp;:{else}Ajouter l'emploi&nbsp;:{/if}
     {if $pro.entreprise}
     <div>
-      <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong>
+      <em>Entreprise/Organisme&nbsp;: </em> <strong>{$pro.entreprise}</strong>
     </div>
     {/if}
     {if $pro.secteur}
     <div>
-      <em>Secteur : </em>
+      <em>Secteur&nbsp;: </em>
       <strong>{$pro.secteur}{if $pro.ss_secteur} ({$pro.ss_secteur}){/if}</strong>
     </div>
     {/if}
     {if $pro.fonction}
     <div>
-      <em>Fonction : </em> <strong>{$pro.fonction}</strong>
+      <em>Fonction&nbsp;: </em> <strong>{$pro.fonction}</strong>
     </div>
     {/if}
     {if $pro.poste}
     <div>
-      <em>Poste : </em> <strong>{$pro.poste}</strong>
+      <em>Poste&nbsp;: </em> <strong>{$pro.poste}</strong>
     </div>
     {/if}
   {include file='geoloc/address.tpl' address=$pro no_div=1 for=$pro.entreprise}
similarity index 94%
rename from templates/admin/mail_intervention.tpl
rename to templates/admin/useredit.mail.tpl
index d1e423b..b1d394f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -26,6 +26,9 @@
 {to addr=#to#}
 {subject text="INTERVENTION de $user"}
 {elseif $mail_part eq 'wiki'}
+{if $deletion}
+L'utilisateur {$user} a été désinscrit.
+{else}
 Le profil du camarade {$old.prenom} {$old.nom} ({$old.promo}) a été édité.\\
 Les champs suivants ont été changés :
 {foreach from=$old item=value key=field}
@@ -41,5 +44,6 @@ Et ceux qui n'ont pas changé :
 {/if}
 {/foreach}
 {/if}
+{/if}
 
 {* vim:set et sw=2 sts=2 sws=2: *}
index 07e7fe7..c4bdc62 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -46,7 +46,7 @@
     {if !$smarty.request.login && !$mr.forlife}
     <tr class="pair">
       <td class="center">
-        Il est possible d'entrer ici n'importe quelle adresse mail : redirection, melix, ou alias.
+        Il est possible d'entrer ici n'importe quelle adresse mail&nbsp;: redirection, melix, ou alias.
       </td>
     </tr>
     {/if}
@@ -70,7 +70,7 @@
 {if $mr}
 
 <p class="smaller">
-Derniére connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
+Dernière connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
 depuis <strong>{$host}</strong>
 </p>
 
@@ -103,6 +103,15 @@ function clean_fwd(fwd) {
   document.forms.fwds.clean_fwd.value = fwd;
   document.forms.fwds.submit();
 }
+function ban_write()
+{
+    document.forms.bans.write_perm.value = "!xorg.*";
+}
+function ban_read()
+{
+    document.forms.bans.read_perm.value = "!xorg.*";
+}
+
 // ]]>
 </script>
 {/literal}
@@ -188,7 +197,7 @@ function clean_fwd(fwd) {
       <td>
         <input type="text" name="naissanceN" size="12" maxlength="10" value="{$mr.naissance}" />
         {if $mr.naissance_ini neq '0000-00-00' && $mr.naissance neq $mr.naissance_ini}
-          <span class="erreur smaller">({icon name=error}Date de naissance connue : {$mr.naissance_ini})</span>
+          <span class="erreur smaller">({icon name=error}Date de naissance connue&nbsp;: {$mr.naissance_ini})</span>
         {elseif $mr.naiss_err}
           <span class="erreur smaller">({icon name=error}Date de naissance incohérente)</span>
         {/if}
@@ -211,7 +220,7 @@ function clean_fwd(fwd) {
         <input type="text" name="promoN" size="4" maxlength="4" value="{$mr.promo}" />
       </td>
     </tr>
-    <tr class "impair">
+    <tr class="impair">
       <td class="titre">
         Surveillance
       </td>
@@ -307,9 +316,53 @@ Pour ceci changer ses permissions en 'disabled'.
   </table>
 </form>
 
-<p>
-<strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
-</p>
+<p><strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong></p>
+
+<form id="bans" method="post" action="admin/user">
+  <table cellspacing="0" cellpadding="2" class="tinybicol">
+    <tr>
+      <th colspan="4">
+        Permissions sur les forums
+      </th>
+    </tr>
+    <tr class="impair">
+      <td class="titre">
+        Poster
+      </td>
+      <td>
+        <input type="text" name="write_perm" size="32" maxlength="255" value="{$bans.write_perm}" />
+      </td>
+      <td class="action">
+        <a href="javascript:ban_write()">Bannir</a>
+      </td>
+    </tr>
+    <tr class="pair">
+      <td class="titre">
+        Lire
+      </td>
+      <td>
+        <input type="text" name="read_perm" size="32" maxlength="255" value="{$bans.read_perm}" />
+      </td>
+      <td class="action">
+        <a href="javascript:ban_read()">Bannir</a>
+      </td>
+    </tr>
+    <tr class="impair">
+      <td class="titre">
+        Commentaire
+      </td>
+      <td colspan="2">
+        <input type="text" name="comment" size="40" maxlength="255" value="{$bans.comment}" />
+      </td>
+    </tr>
+    <tr class="center">
+      <td colspan="3">
+        <input type="hidden" name="user_id" value="{$mr.user_id}" />
+        <input type="submit" name="b_edit" value="Modifier" />
+      </td>
+    </tr>
+  </table>
+</form>
 
 {javascript name="ajax"}
 {test_email forlife=$mr.forlife}
index f2cd60b..3f226f3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {*  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               *}
 {*                                                                        *}
 {**************************************************************************}
 
+{javascript name="jquery"}
+<script type="text/javascript">//<![CDATA[
+{literal}
+function activateField(name, id, obj) {
+  $("#" + name + "_" + id).show();
+  return true;
+}
+{/literal}
+//]]></script>
+
 <h1>Validation</h1>
+
 
 {if $vit->total()}
 
   {include file=$valid->formu()}
   {if $valid->editor()}
   <tr>
+    <th colspan="2">
+     {if $preview_id neq $valid->id()}
+      <div style="float: left">
+        <a href="javascript:activateField('edit', '{$valid->id()}')">{icon name="add"}</a>
+      </div>
+      {/if}
+      Editer
+    </th>
+  </tr>
+  <tr {if $preview_id neq $valid->id()}style="display: none"{/if} id="edit_{$valid->id()}">
     <td colspan="2" class="center">
-      {if $preview_id == $valid->id()}
-      <form enctype="multipart/form-data" action="{$platal->pl_self()}#valid{$valid->id()}" method="post">
+      <form enctype="multipart/form-data" action="{$platal->pl_self(0)}/edit/{$valid->id()}#valid{$valid->id()}" method="post">
         <div>
           {include file=$valid->editor()}
           <input type="hidden" name="uid"    value="{$valid->uid}" />
           <input type="submit" name="edit"   value="Editer" />
         </div>
       </form>
-      {else}
-      <span class="smaller">
-        <a href="admin/validate/edit/{$valid->id()}#valid{$valid->id()}">{icon name=page_edit}Editer cette demande avant validation</a>
-      </span>
-      {/if}
     </td>
   </tr>
   {/if}
-  <tr><th colspan='2'>Commentaires</th></tr>
+  <tr>
+    <th colspan='2'>
+      {if $valid->comments|@count eq 0}
+      <div style="float: left">
+        <a href="javascript:activateField('comment', '{$valid->id()}')">{icon name="add"}</a>
+      </div>
+      {/if}
+      Commentaires
+    </th>
+  </tr>
   {foreach from=$valid->comments item=c}
   <tr class="{cycle values="impair,pair"}">
     <td class="titre">
     <td>{$c[1]|nl2br}</td>
   </tr>
   {/foreach}
-  <tr>
+  <tr {if $valid->comments|@count eq 0}style="display: none"{/if} id="comment_{$valid->id()}">
     <td colspan='2' class='center'>
       <form action="admin/validate" method="post">
         <div>
     <td colspan='2' {popup caption="Règles de validation" text=$valid->ruleText()}>
       <form action="admin/validate" method="post">
         <div>
-          Réponse préremplie :
+          Réponse préremplie&nbsp;:
           <select onchange="this.form.comm.value=this.value">
             <option value=""></option>
             {foreach from=$valid->answers() item=automatic_answer}
           <a href="admin/validate/answers">{icon name="page_edit" title="Editer les réponses automatiques"}</a>
         </div>
         <div class='center'>
-          Ajouté dans l'email :<br />
+          Ajouté dans l'email&nbsp;:<br />
           <textarea rows="5" cols="50" name="comm"></textarea><br />
 
           <input type="hidden" name="uid"    value="{$valid->uid}" />
 {/if}
 
 <p>
-  Afficher seulement les validation suivantes :
+  Afficher seulement les validation suivantes&nbsp;:
 </p>
 
 <form action="admin/validate" method="post">
index 6dbf01a..c8257f3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -68,6 +68,7 @@
 {/literal}
 
 <p class="center">
+   <a href="Site/AllRecentChanges?action=rss&user={$smarty.session.forlife}&hash={$smarty.session.core_rss_hash}" style="display:block;float:right" title="Changements">{icon name=feed title='fil rss'}</a>
    {icon name=magnifier} <a href="Site/AllRecentChanges">Voir les changements récents</a>
 </p>
 
       {$perm.edit}
     </td>
     <td class="action" style="margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; height: 20px">
-      <a href="admin/wiki/rename/{$cat}.{$page}" onclick="var newname=prompt('Déplacer la page {$cat}.{$page} vers :', '{$cat}.{$page}'); if (!newname) return false; this.href += '/'+newname;">{icon name=book_next title='déplacer'}</a>
+      <a href="admin/wiki/rename/{$cat}.{$page}" onclick="var newname=prompt('Déplacer la page {$cat}.{$page} vers&nbsp;:', '{$cat}.{$page}'); if (!newname) return false; this.href += '/'+newname;">{icon name=book_next title='déplacer'}</a>
       <a href="admin/wiki/delete/{$cat}.{$page}" onclick="return confirm('Supprimer la page {$cat}.{$page} ?');">{icon name=cross title='supprimer'}</a>
       <input type="checkbox" name="{$cat}/{$page}"/>
     </td>
   </tr>
   <tr class="pair">
     <td>
-      Attribue les permissions aux pages cochées :
+      Attribue les permissions aux pages cochées&nbsp;:
     </td>
     <td>
       <select name="read">
 </form>
 
 <p class="smaller">
-  * : les pages marquées d'une astérisque sont actuellement disponibles en cache (accès plus rapide)
+  *&nbsp;: les pages marquées d'une astérisque sont actuellement disponibles en cache (accès plus rapide)
 </p>
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index cbffd84..dbff9f9 100644 (file)
   {/if}
 
   <fieldset>
-    <legend>Sujet du mail : <input type="text" name="subject" value="{$subject}" size="60"/></legend>
+    <legend>Sujet du mail&nbsp;: <input type="text" name="subject" value="{$subject}" size="60"/></legend>
     <p class="center">
       <a href="wiki_help" class="popup3">
         {icon name=information title="Syntaxe wiki"} Voir les marqueurs de mise en forme autorisés
       </a><br />
-      <strong>Titre : </strong><input type="text" name="title" value="{$title}" size="60" /><br />
+      <strong>Titre&nbsp;: </strong><input type="text" name="title" value="{$title}" size="60" /><br />
       <textarea name="body" rows="30" cols="78">{$body}</textarea><br />
-      <strong>Signature : </strong><input type="text" name="signature" value="{$signature}" size="60" />
+      <strong>Signature&nbsp;: </strong><input type="text" name="signature" value="{$signature}" size="60" />
     </p>
   </fieldset>
 
index 08a46c6..c85689b 100644 (file)
@@ -54,6 +54,6 @@
       {include file="axletter/letter.tpl"}
     </td>
   </tr>
-</fieldset>
+</table>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index fd6691b..daf0057 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<br />
+{if isset($banana|smarty:nodefaults)}
 {$banana|smarty:nodefaults}
+{else}
 
+{if !$smarty.post.action}
+<p class="normal">
+  Tu peux régler quelques paramètres qui apparaîtront sur les messages lorsque
+  tu posteras sur les forums. Cela ne te permettra pas d'être anonyme, puisque
+  tout le monde pourra remonter à ton identité en regardant ta fiche. L'objectif
+  est simplement de permettre plus de convivialité.
+</p>
+<p class="normal">
+  Tu pourras voir dans les forums les nouveaux messages mis en valeur (en
+  général en gras). Si tu consultes les forums régulièrement, tu peux en avoir
+  assez de voir tout le contenu du forum&nbsp;: la dernière option te permet de
+  n'afficher que les fils de discussion contenant des messages lus.
+</p>
+
+<form action="banana/profile" method="post">
+  <table class="bicol" cellpadding="3" cellspacing="0" summary="Configuration de Banana">
+    <tr>
+      <th colspan="2">Profil Banana</th>
+    </tr>
+    <tr>
+      <td class="titre">Nom</td>
+      <td><input type="text" name="banananame" value="{$nom}" /></td>
+    </tr>
+    <tr>
+      <td class="titre">Adresse électronique</td>
+      <td><input type="text" name="bananamail" value="{$mail}" /></td>
+    </tr>
+    <tr>
+      <td class="titre">Signature</td>
+      <td><textarea name="bananasig" cols="50" rows="4">{$sig}</textarea></td>
+    </tr>
+    <tr class="pair">
+      <td class="titre">Affichage des fils de discussion</td>
+      <td>
+        <input type="radio" name="bananadisplay" value="0"
+               {if !$disp}checked="checked"{/if} /> Afficher tous les messages <br />
+        <input type="radio" name="bananadisplay" value="1"
+               {if $disp}checked="checked"{/if} /> Afficher seulement les fils de discussion contenant des messages non lus
+      </td>
+    </tr>
+    <tr class="pair">
+      <td class="titre">Mise à jour des messages non lus</td>
+      <td>
+        <input type="radio" name="bananaupdate" value="1"
+               {if $maj}checked="checked"{/if} /> Automatique<br />
+        <input type="radio" name="bananaupdate" value="0"
+               {if !$maj}checked="checked"{/if} /> Manuelle
+      </td>
+    </tr>
+    <tr class="pair">
+      <td class="titre" colspan="2">
+        <input type="checkbox" {if $xface}checked="checked"{/if} name="bananaxface" id="xface" />
+        <label for="xface">Afficher mon X-Face plutôt que ma photo si il est disponible</label>
+      </td>
+    </tr>
+  </table>
+  <div class="center"><input type="submit" name="action" value="Enregistrer" /></div>
+</form>
+{else}
+<p class="normal">
+  Ton profil est enregistré !!!
+</p>
+{/if}
+{/if}
+{if !$it_is_xnet}
 <p class="smaller">
   {icon name="lightbulb" title="Astuce"}Astuce&nbsp;:
   Tu peux également consulter les fora en utilisant un client NNTP tel que
   Outlook Express ou Thunderbird.<br />N'hésite pas à <a href="password/smtp?doc=nntp">
   consulter la documentation et à activer ton accès</a> pour utiliser ce service.
 </p>
+{/if}
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/banana/profile.tpl b/templates/banana/profile.tpl
deleted file mode 100644 (file)
index bb97abd..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-{**************************************************************************}
-{*                                                                        *}
-{*  Copyright (C) 2003-2007 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               *}
-{*                                                                        *}
-{**************************************************************************}
-
-<br />
-
-<table class="cadre_a_onglet" cellpadding="0" cellspacing="0" width="100%">
-  <tr>
-    <td>
-      <ul id="onglet">
-        <li class="actif">Préférences</li>
-        <li><a href="banana/subscription">Abonnements</a></li>
-        <li><a href="banana">Les Forums</a></li>
-      </ul>
-    </td>
-  </tr>
-  <tr>
-    <td class="conteneur_tab">
-
-{if !$smarty.post.action}
-
-      <p class="normal">
-        Tu peux régler quelques paramètres qui apparaîtront sur les messages lorsque
-        tu posteras sur les forums. Cela ne te permettra pas d'être anonyme, puisque
-        tout le monde pourra remonter à ton identité en regardant ta fiche. L'objectif
-        est simplement de permettre plus de convivialité.
-      </p>
-      <p class="normal">
-        Tu pourras voir dans les forums les nouveaux messages mis en valeur (en
-        général en gras). Si tu consultes les forums régulièrement, tu peux en avoir
-        assez de voir tout le contenu du forum : la dernière option te permet de
-        n'afficher que les fils de discussion contenant des messages lus.
-      </p>
-
-      <form action="banana/profile" method="post">
-        <table class="bicol" cellpadding="3" cellspacing="0" summary="Configuration de Banana">
-          <tr>
-            <th colspan="2">Profil Banana</th>
-          </tr>
-          <tr>
-            <td class="titre">Nom</td>
-            <td><input type="text" name="banananame" value="{$nom}" /></td>
-          </tr>
-          <tr>
-            <td class="titre">Adresse électronique</td>
-            <td><input type="text" name="bananamail" value="{$mail}" /></td>
-          </tr>
-          <tr>
-            <td class="titre">Signature</td>
-            <td><textarea name="bananasig" cols="50" rows="4">{$sig}</textarea></td>
-          </tr>
-          <tr class="pair">
-            <td class="titre">Affichage des fils de discussion</td>
-            <td>
-              <input type="radio" name="bananadisplay" value="0"
-              {if !$disp}checked="checked"{/if} /> Afficher tous
-              les messages
-              <br />
-              <input type="radio" name="bananadisplay" value="1"
-              {if $disp}checked="checked"{/if} /> Afficher
-              seulement les fils de discussion contenant des messages non lus
-            </td>
-          </tr>
-          <tr class="pair">
-            <td class="titre">Mise à jour des messages non lus</td>
-            <td>
-              <input type="radio" name="bananaupdate" value="1"
-              {if $maj}checked="checked"{/if} /> Automatique
-              <br />
-              <input type="radio" name="bananaupdate" value="0"
-              {if !$maj}checked="checked"{/if} /> Manuelle
-            </td>
-          </tr>
-          <tr class="pair">
-            <td class="titre" colspan="2">
-              <input type="checkbox" {if $xface}checked="checked"{/if} name="bananaxface" id="xface" />
-              <label for="xface">Afficher mon X-Face plutôt que ma photo si il est disponible</label>
-            </td>
-          </tr>
-        </table>
-        <div class="center"><input type="submit" name="action" value="Enregistrer" /></div>
-      </form>
-
-{else}
-      <p class="normal">
-        Ton profil est enregistré !!!
-      </p>
-{/if}
-
-    </td>
-  </tr>
-</table>
-
-<p class="smaller">
-  {icon name="lightbulb" title="Astuce"}Astuce&nbsp;:
-  Tu peux également consulter les fora en utilisant un client NNTP tel que
-  Outlook Express ou Thunderbird.<br />N'hésite pas à <a href="password/smtp?doc=nntp">
-  consulter la documentation et à activer ton accès</a> pour utiliser ce service.
-</p>
-
-
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index a705606..73dec2e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}\r
 {*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}\r
 {*  http://opensource.polytechnique.org/                                  *}\r
 {*                                                                        *}\r
 {*  This program is free software; you can redistribute it and/or modify  *}\r
index 2b23b25..b16445f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -54,7 +54,7 @@
   <tr>
     <th colspan="2">
       {if $smarty.session.core_rss_hash}
-      <a href='carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml' style="display:block;float:right">
+      <a href="carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Notifications">
         {icon name=feed title='fil rss'}
       </a>
       {else}
index f28c1bf..65c9ef9 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -27,7 +27,7 @@
 </h1>
 
 <div>
-Ajouter la personne suivante à ma liste de contacts :
+Ajouter la personne suivante à ma liste de contacts&nbsp;:
 <div style="float: right">
 <form id="add_user" action="carnet/contacts" method="post">
   <div>
@@ -46,33 +46,33 @@ Ajouter la personne suivante à ma liste de contacts :
 </div>
 </div>
 <p style="clear: both">
-  Tu peux également rajouter des camarades dans tes contacts lors d'une recherche dans l'annuaire 
+  Tu peux également rajouter des camarades dans tes contacts lors d'une recherche dans l'annuaire&nbsp;
   il te suffit de cliquer sur l'icône {icon name=add} en face de son nom dans les résultats !
 </p>  
 
 {if $plset_count || $smarty.request.quick}
 <p>
-Pour récupérer ta liste de contacts dans un PDF imprimable :<br />
+Pour récupérer ta liste de contacts dans un PDF imprimable&nbsp;:<br />
 (attention, les photos font beaucoup grossir les fichiers !)
 </p>
 <ul>
-  <li>avec les photos :
+  <li>avec les photos&nbsp;:
   [<a href="carnet/contacts/pdf/promo/photos/mescontacts.pdf" class='popup'><strong>tri par promo</strong></a>]
   [<a href="carnet/contacts/pdf/photos/mescontacts.pdf" class='popup'><strong>tri par noms</strong></a>]
   </li>
-  <li>sans les photos :
+  <li>sans les photos&nbsp;:
   [<a href="carnet/contacts/pdf/promo/mescontacts.pdf" class='popup'><strong>tri par promo</strong></a>]
   [<a href="carnet/contacts/pdf/mescontacts.pdf" class='popup'><strong>tri par noms</strong></a>]
   </li>
 </ul>
 
 <p>
-  Tu peux télécharger des informations sur tes contacts :
+  Tu peux télécharger des informations sur tes contacts&nbsp;:
 </p>
 <ul>
   <li>
     {icon name=calendar_view_day title='Anniversaires'} 
-    <a href="carnet/contacts/ical/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/anniv-x.ics">
+    <a href="carnet/contacts/ical/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/anniv-x.ics" title="Anniversaires">
       Le calendrier des anniversaires
     </a>
   </li>
@@ -95,7 +95,7 @@ Pour récupérer ta liste de contacts dans un PDF imprimable :<br />
       </div>
     </form>
   </div>
-  Tu peux faire une recherche sur tes contacts :
+  Tu peux faire une recherche sur tes contacts&nbsp;:
 </p>
 
 {include file="core/plset.tpl"}
diff --git a/templates/carnet/notif.mail.tpl b/templates/carnet/notif.mail.tpl
new file mode 100644 (file)
index 0000000..3f132e2
--- /dev/null
@@ -0,0 +1,53 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="carnet"}
+{if $mail_part eq 'head'}
+{from full=#from#}
+{subject text="Notifications de la semaine `$week`"}
+{if isset(#replyto#)}{add_header name='Reply-To' value=#replyto#}{/if}
+{if isset(#retpath#)}{add_header name='Return-Path' value=#retpath#}{/if}
+{elseif $mail_part eq 'wiki'}
+{if $u.sexe}Chère{else}Cher{/if} {$u.prenom},
+
+Voici les événements survenus dans la semaine écoulée, et depuis ta dernière visite sur le site.
+
+Tu trouveras les mêmes informations sur [[https://www.polytechnique.org/carnet/panel|cette page]].
+
+{foreach from=$u.data key=cid item=d}
+
+!{if $d|@count eq 1}{$cats[$cid].mail_sg}{else}{$cats[$cid].mail}{/if}&nbsp;:
+
+{foreach from=$d key=promo item=x}
+* (X{$x.promo}), le {$x.date|date_format:"%d %b %Y"}, [[https://www.polytechnique.org/profile/private/{$x.bestalias}|{$x.prenom} {$x.nom}]]
+{/foreach}
+
+{/foreach}
+-- 
+L'Équipe de Polytechnique.org
+
+'''''Note&nbsp;:'''''  Tu reçois ce mail ce mail car tu as activé la notification automatique par mail des événements que tu surveilles.\\
+Tu peux changer cette options sur la [[https://www.polytechnique.org/carnet/notifs|page de configuration des notifications]].
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 8b2ba3d..1df6000 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -67,14 +67,14 @@ S'il n'y a rien à te signaler le mail ne t'est pas envoyé.</p>
 <h2>Surveiller des promos</h2>
 
 <p>
-Attention : pour les promos, tu n'es pas notifié des événements trop fréquents (par exemple les changements de fiche).
+Attention&nbsp;: pour les promos, tu n'es pas notifié des événements trop fréquents (par exemple les changements de fiche).
 </p>
 
 <form action="carnet/notifs/" method="post">
   <fieldset>
     <legend>Ajouter une promo</legend>
     Tu peux surveiller des promos (mettre la promo sur 4 chiffres),
-    ou des plages de promos (par ex. 1990-1992) : <br />
+    ou des plages de promos (par ex. 1990-1992)&nbsp;: <br />
     <input type='text' name='promo' />
     <input type='submit' name='add_promo' value='ajouter'
       onclick="this.form.action += 'add_promo/' + this.form.promo.value;" />
@@ -84,7 +84,7 @@ Attention : pour les promos, tu n'es pas notifié des événements trop fréquen
     {if $watch->promos()|@count eq 0}
     <p>Tu ne surveilles actuellement aucune promo.</p>
     {else}
-    <p>Tu surveilles les promos suivantes :</p>
+    <p>Tu surveilles les promos suivantes&nbsp;:</p>
     <ul>
       {foreach from=$watch->promos() item=p}
       <li>{if $p.0 eq $p.1}{$p.0}{else}{$p.0} à {$p.1}{/if}</li>
@@ -110,7 +110,7 @@ et cliquer sur les icones {icon name=add} pour les ajouter à cette liste.
     {if $watch->nonins()|@count eq 0}
     Tu ne surveilles actuellement aucun non-inscrit.
     {elseif $watch->nonins()|@count}
-    Tu surveilles {if $watch->nonins()|@count eq 1}le non-inscrit{else}les non-inscrits{/if} :
+    Tu surveilles {if $watch->nonins()|@count eq 1}le non-inscrit{else}les non-inscrits{/if}&nbsp;:
     <ul>
     {foreach from=$watch->nonins() item=p}
     <li>
index f11f063..f7baa37 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -39,19 +39,19 @@ Il faut pour cela se rendre sur la page de <a href='carnet/notifs'>configuration
 
 <div class="right">
 {if $smarty.session.core_rss_hash}
-<a href='carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml'>{icon name=feed title='fil rss'}</a>
+<a href="carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
 {/if}
 </div>
 
 {foreach from=$notifs->_data item=c key=cid}
 <h2>{if ($c|@count) > 1}
-{$notifs->_cats[$cid].mail} :
+{$notifs->_cats[$cid].mail}&nbsp;:
 {else}
   {foreach from=$c item=promo}
     {if ($promo|@count) > 1}
-      {$notifs->_cats[$cid].mail} :
+      {$notifs->_cats[$cid].mail}&nbsp;:
     {else}
-      {$notifs->_cats[$cid].mail_sg} :
+      {$notifs->_cats[$cid].mail_sg}&nbsp;:
     {/if}
   {/foreach}
 {/if}</h2>
@@ -62,7 +62,7 @@ Il faut pour cela se rendre sur la page de <a href='carnet/notifs'>configuration
   {foreach from=$c key=p item=promo}
   {section name=row loop=$promo}
   <tr {if ( $promo[row].known > $smarty.session.watch_last ) || ( $promo[row].date eq $today ) }style="font-weight: bold"{/if}>
-    <td class='titre' style="width:15%">{if $smarty.section.row.first}{$p}{/if}</td>
+    <td class='titre' style="width:15%" {if $promo[row].data}rowspan="2"{/if}>{if $smarty.section.row.first}{$p}{/if}</td>
     <td>
       {if $promo[row].inscrit}
       <a href="profile/{$promo[row].bestalias}" class="popup2">
@@ -76,9 +76,12 @@ Il faut pour cela se rendre sur la page de <a href='carnet/notifs'>configuration
       {$promo[row].prenom} {$promo[row].nom}
       {/if}
     </td>
-    <td style="width:25%">
+    <td style="width:25%" {if $promo[row].data}rowspan="2"{/if}>
       {$promo[row].date|date_format}
     </td>
+    {if $promo[row].data}
+    <tr><td>{$promo[row].data|smarty:nodefaults}</td></tr>
+    {/if}
   </tr>
   {/section}
   {/foreach}
index 6dbf65d..d279c87 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -42,6 +42,7 @@
       <link>{#globals.baseurl#}/profile/private/{$x.bestalias}</link>
       <guid isPermaLink="false">carnet{$x.known}{$cid}{$x.bestalias}</guid>
       <description><![CDATA[
+        {if $x.data}{$x.prenom} {$x.nom} a mis à jours les données suivantes&nbsp;:<br />{$x.data}<br />{/if}
         {if !$x.contact and !$x.dcd}
         <a href="{#globals.baseurl#}/carnet/contacts?action=ajouter&amp;user={$x.bestalias}">
           {icon name=add title="Ajouter" full=true} Ajouter &agrave; mes contacts
index f225bb6..9f4872c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 
 <p>
-Trier par :
+Trier par&nbsp;:
 {if ($order eq 'nom') and not($smarty.request.inv)}
 [<a href='carnet/contacts?order=nom&amp;trombi={$smarty.request.trombi}&amp;inv=1'><strong>nom <img src='images/dn.png' alt='decr.' /></strong></a>]
 {else}
index 9723fba..b00c7b4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index b78d9af..a606b54 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -23,7 +23,7 @@
 <h1 class="erreur">Cette page n'existe pas !!!</h1>
 
 {if $near}
-<p>L'adresse suivante semble correspondre à ta demande :<br />
+<p>L'adresse suivante semble correspondre à ta demande&nbsp;:<br />
 {icon name="lightbulb" title="Cherchais-tu ?"} <a href="{$globals->baseurl}/{$near}">{$globals->baseurl}/{$near}</a>
 </p>
 {/if}
index 4430739..fae29f6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}\r
 {*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}\r
 {*  http://opensource.polytechnique.org/                                  *}\r
 {*                                                                        *}\r
 {*  This program is free software; you can redistribute it and/or modify  *}\r
@@ -51,8 +51,14 @@ function fillContent()
 \r
 <div style="width:800px;height:600px">\r
 {if $bug_sent}\r
-<script type="text/javascript">window.close();</script>\r
-{/if}\r
+<p class="erreur">\r
+  Ton message a bien été envoyé au support de Polytechnique.org, tu devrais en\r
+  recevoir une copie d'ici quelques minutes. Nous allons le traiter et y répondre\r
+  dans les plus brefs délais.\r
+</p>\r
+\r
+<div class="center"><input type="submit" onclick="window.close()" name="close" value="Fermer" /></div>\r
+{else}\r
 <form action="send_bug" method="post" onsubmit="cleanContent()">\r
   <h1>Signaler un bug ou demander une amélioration</h1>\r
   <div style="margin-left:10%;margin-right:10%">\r
@@ -61,12 +67,12 @@ function fillContent()
       <option value="wish">Souhait</option>\r
       <option value="help">Aide/Dépannage</option>\r
     </select>\r
-    &nbsp;&nbsp;Sujet : <input type="text" name="item_summary" id="flyspray_title" value="sur la page {$smarty.server.HTTP_REFERER}" size="50" maxlength="100"/>\r
+    &nbsp;&nbsp;Sujet&nbsp;: <input type="text" name="item_summary" id="flyspray_title" value="sur la page {$smarty.server.HTTP_REFERER}" size="50" maxlength="100"/>\r
     <textarea name="detailed_desc" id="flyspray_detail" cols="70" rows="10" style="width:100%;margin-top:10px;margin-bottom:10px;height:400px;display:block;" onFocus="cleanContent()" onBlur="fillContent()"></textarea>\r
     <input type="hidden" name="page" value="{$smarty.server.HTTP_REFERER|default:$smarty.request.page}" />\r
     <div class="center">\r
-      <input type="button" value="Fermer" onclick="window.close()"/>\r
-      <input type="submit" name="send" value="Signaler le bug"/>\r
+      <input type="button" value="Abandonner" onclick="window.close()"/>\r
+      <input type="submit" name="send" value="Envoyer"/>\r
     </div>\r
   </div>\r
 </form>\r
@@ -74,5 +80,6 @@ function fillContent()
   fillContent();\r
 </script>\r
 </div>\r
+{/if}\r
 \r
 {* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}\r
index daa4b50..c65f3b2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -62,6 +62,13 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
 </ul>
 {/if}
 
+{if $smarty.request.response}<!-- failed login code //-->
+<br />
+<div class="erreur">
+  Erreur d'identification. Essaie à nouveau !
+</div>
+{/if}
+
 <br />
 
 <form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;" style="display: none">
@@ -75,7 +82,7 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
     </tr>
     <tr style="white-space: nowrap">
       <td class="titre">
-        Adresse email :
+        Adresse email&nbsp;:
       </td>
       <td>
         <input type="text" name="username" size="20" maxlength="50" value="{insert name="getUserName"}" />&nbsp;@&nbsp;<select name="domain">
@@ -97,20 +104,25 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
     </tr>
     <tr>
       <td></td>
-      <td {popup caption='Connexion permanente' width='300' text='Coche cette case pour être automatiquement reconnu à ta prochaine connexion
-        depuis cet ordinateur.<br />
-        Il n\'est pas conseillé de cocher la case si cette machine n\'est pas <b>strictement</b> personnelle'}>
+      <td>
         <input type="checkbox" name="remember" id="remember" /><label for="remember">Garder l'accès aux services après déconnexion</label>
       </td>
     </tr>
     <tr>
+      <td></td>
+      <td>
+        Coche la case ci-dessus pour être automatiquement reconnu lors de ta prochaine connexion depuis cet ordinateur.
+        Il n'est pas conseillé de la cocher si cette machine n'est pas <b>strictement</b> personnelle.
+      </td>
+    </tr>
+    <tr>
       <td colspan="2">
       <table width="100%"><tr>
       <td>
-        <a href="recovery">mot de passe perdu ?</a>
+        <a href="recovery">Mot de passe perdu ?</a>
       </td>
       <td class="right">
-        <input type="submit" name="submitbtn" value="Envoyer" />
+        <input type="submit" name="submitbtn" value="Me connecter" />
       </td>
       </tr></table>
       </td>
@@ -155,13 +167,6 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
   {/if}
 </div>
 
-{if $smarty.request.response}<!-- failed login code //-->
-<br />
-<div class="erreur">
-  Erreur d'identification. Essaie à nouveau !
-</div>
-{/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>
index 9d8cec6..54a8aed 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 9aff0a7..75a8628 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 7cdcceb..0222eb0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index fa2c465..7bd9a4f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -44,7 +44,7 @@
 <tr class="impair">
   <td colspan="{$t->nbfields}">
     <strong>
-      Nouvelles entrées : <a href="{$t->pl}/new">Manuellement</a> &bull; <a href="{$t->pl}/massadd">Depuis un CSV</a>
+      Nouvelles entrées&nbsp;: <a href="{$t->pl}/new">Manuellement</a> &bull; <a href="{$t->pl}/massadd">Depuis un CSV</a>
     </strong>
   </td>
   <td class="right">
@@ -64,6 +64,8 @@
       <span class="smaller">{$myrow.$myfield|date_format:"%x %X"}</span>
     {elseif $myval.Type eq 'checkbox'}
       <input type="checkbox" disabled="disabled"{if $myrow.$myfield} checked="checked"{/if}/>
+    {elseif $myval.Type eq 'ip_address'}
+      {$myrow.$myfield|uint_to_ip}
     {else}
       {$myrow.$myfield}
     {/if}
index 7fbcbe9..c3e3097 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index fa417cb..216c6d9 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 1fece25..8a76fa3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 1d98bd6..24f5060 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -47,7 +47,7 @@
             " />
       </td>
       <td>
-        Ton alias est actuellement : <strong>{$actuel}</strong>. Il est pour l'instant
+        Ton alias est actuellement&nbsp;: <strong>{$actuel}</strong>. Il est pour l'instant
         <span id="mail_public">{if $mail_public}public et apparaît donc sur ta fiche.{else}privé et n'apparaît nulle part sur le site.{/if}</span>
       </td>
     </tr>
 
   {if $actuel}
   <p>
-  <strong>Note : tu as déjà l'alias {$actuel}, or tu ne peux avoir qu'un seul alias à la fois.
+  <strong>Note&nbsp;: tu as déjà l'alias {$actuel}, or tu ne peux avoir qu'un seul alias à la fois.
     Si tu effectues une nouvelle demande l'ancien alias sera effacé.</strong>
   </p>
   {/if}
 
   {if $demande}
   <p>
-  <strong>Note : tu as déjà effectué une demande pour {$demande->alias}, dont le traitement est
+  <strong>Note&nbsp;: tu as déjà effectué une demande pour {$demande->alias}, dont le traitement est
     en cours. Si tu souhaites modifier ceci refais une demande, sinon ce n'est pas la peine.</strong>
   </p>
   {/if}
@@ -87,7 +87,7 @@
         <th>Demande d'alias</th>
       </tr>
       <tr>
-        <td>Alias demandé :</td>
+        <td>Alias demandé&nbsp;:</td>
       </tr>
       <tr>
         <td><input type="text" name="alias" value="{$r_alias}" />@{#globals.mail.alias_dom#} et @{#globals.mail.alias_dom2#}</td>
         </td>
       </tr>
       <tr>
-        <td>Brève explication :</td>
+        <td>Brève explication&nbsp;:</td>
       </tr>
       <tr>
         <td><textarea rows="5" cols="50" name="raison">{$r_raison}</textarea></td>
index a57bf27..9f27486 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -32,7 +32,7 @@
   {/literal}
 </script>
   <fieldset>
-    <legend><strong>Choisis ton propre réglage :</strong></legend>
+    <legend><strong>Choisis ton propre réglage&nbsp;:</strong></legend>
     <input id='s0' type='radio' name='statut_filtre' value='0' {if $filtre eq 0}checked="checked"{/if} onclick="Ajax.update_html(null, '{$globals->baseurl}/emails/antispam/'+this.value, bogoUpdated)" />
     <label for='s0'>(1) le filtre anti-spam n'agit pas sur tes mails</label>
     <br />
index 795a746..de28765 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -30,7 +30,7 @@ Bonjour !
   Nous t'écrivons car lors de l'envoi de la lettre d'information mensuelle
 de Polytechnique.org à ton adresse polytechnicienne :
 
-    {$x.alias}@{#globals.mail.domain#},
+    {$x.alias}@{$globals->mail->domain},
 
 l'adresse {$email}, sur laquelle tu rediriges ton courrier, ne fonctionnait pas.
 
index e2cfab8..3d9f4f5 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index d942a0b..eb9571d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 08e1322..636b1c8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -28,7 +28,7 @@
   function bestaliasUpdated() {
     showTempMessage('bestalias-msg', "Le changement a bien été effectué.", true);
   }
-</script>      
+</script>
 {/literal}
 <table class="bicol">
   <tr>
@@ -36,7 +36,7 @@
   </tr>
   <tr class="impair">
     <td>
-      Tes adresses polytechniciennes sont :<br /><br />
+      Tes adresses polytechniciennes sont&nbsp;:<br /><br />
         <div>
           {iterate from=$aliases item=a}
           <input type='radio' {if $a.best}checked="checked"{/if} name='best' value='{$a.alias}' onclick='Ajax.update_html(null,"{$globals->baseurl}/emails/best/{$a.alias}",bestaliasUpdated)' />
@@ -92,16 +92,27 @@ ton homonyme et toi-même ne disposeraient plus que des adresses de la forme pre
       </p>
       {else}
       Actuellement, tout courrier électronique qui t'y est adressé, est envoyé
-      {if $mails->total() eq 1} à l'adresse {else} aux adresses {/if}
+      {if $mails->total() eq 1} à l'adresse{else} aux adresses{/if}&nbsp;:
       <ul>
         {iterate from=$mails item=m}
         <li><strong>{$m.email}</strong></li>
         {/iterate}
       </ul>
       {/if}
+      {if count($storage) neq 0}
+      Ton courrier est également stocké sur {if count($storage) eq 1}le compte suivant{else} les comptes suivants{/if}&nbsp;:
+      <ul>
+        {if in_array('googleapps', $storage)}
+        <li><a href="googleapps"><strong>Compte Google Apps / GMail de Polytechnique.org</strong></a></li>
+        {/if}
+        {if in_array('imap', $storage)}
+        <li><a href="Xorg/IMAP"><strong>Accès de secours aux emails (IMAP)</strong></a></li>
+        {/if}
+      </ul>
+      {/if}
       {test_email}
       Si tu souhaites <strong>modifier ce reroutage de ton courrier,</strong>
-      <a href="emails/redirect">il te suffit de te rendre ici !</a>
+      <a href="emails/redirect">il te suffit de te rendre ici&nbsp;!</a>
     </td>
   </tr>
 </table>
@@ -131,7 +142,7 @@ ton homonyme et toi-même ne disposeraient plus que des adresses de la forme pre
 
 <table class="bicol">
   <tr>
-    <th>Un alias sympathique : {#globals.mail.alias_dom#} !</th>
+    <th>Un alias sympathique&nbsp;: {#globals.mail.alias_dom#} !</th>
   </tr>
   <tr class="impair">
     <td>
index 7e8c04e..1e12c51 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e642d44..dec1119 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -41,7 +41,7 @@
     Tes adresses de redirection
   </h1>
   <p>
-  Tu configures ici les adresses emails vers lesquelles tes adresses (listées ci-dessous) sont dirigées :
+  Tu configures ici les adresses emails vers lesquelles tes adresses (listées ci-dessous) sont dirigées&nbsp;:
   </p>
   <ul>
     {if $melix}
@@ -66,7 +66,7 @@
   </p>
   <p>
     Enfin, la <strong>réécriture</strong> consiste à substituer à ton adresse email habituelle
-    (adresse wanadoo, yahoo, free, ou autre) ton adresse {#globals.mail.domain#} ou
+    (adresse gmail, orange, free, ou autre) ton adresse {#globals.mail.domain#} ou
     {#globals.mail.domain2#} dans l'adresse d'expédition de tes messages, lorsque le courrier
     passe par nos serveurs. Ceci arrive lorsque tu écris à un camarade sur son adresse {#globals.mail.domain#} ou
     {#globals.mail.domain2#}, ou lorsque tu utilises notre
         </td>
       </tr>
       {/foreach}
+      {if $googleapps eq 'active'}
+      <tr class="{cycle values="pair,impair"}">
+        <td><strong>Compte GMail / Google Apps</strong></td>
+        <td>
+          <input type="checkbox" value="googleapps" disabled="disabled"
+                 {if in_array('googleapps', $storage)}checked="checked"{/if} />
+        </td>
+        <td>-</td>
+        <td>
+          <a href="emails/redirect#googleapps">{icon name=information title="Plus d'informations"}</a>
+        </td>
+      </tr>
+      {/if}
       <script type="text/javascript">activeEnable(); showRemove();</script>
       <tr class="{cycle values="pair,impair"}"><td colspan="4">
         <form action="emails/redirect" method="post">
         <div>
           &nbsp;<br />
-          Ajouter une adresse email :
+          Ajouter une adresse email&nbsp;:
           <input type="text" size="35" maxlength="60" name="email" value="" />
           &nbsp;&nbsp;<input type="submit" value="ajouter" name="emailop" />
         </div>
 </fieldset>
 {/if}
 
+{* TODO(vincent.zanotti): remove the following block of code when both IMAP and GApps will be active. *}
+{if in_array('imap', $storage) neq 0 or #globals.mailstorage.imap_active# or hasPerm('admin')}
+  {assign var=has_imap value=true}
+{else}
+  {assign var=has_imap value=false}
+{/if}
+{if $googleapps or #globals.mailstorage.googleapps_active# or hasPerm('admin')}
+  {assign var=has_googleapps value=true}
+{else}
+  {assign var=has_googleapps value=false}
+{/if}
+
+{if $has_imap or $has_googleapps}
+<h1>Tes comptes de stockage de courrier</h1>
+{/if}
+{if $has_imap}
+<p>
+  Polytechnique.org te propose de conserver les mails que tu reçois, pendant une durée limitée (environ 30 jours).
+  Grâce à ce service, tu disposes d'une sauvegarde de tes mails en secours, au cas où, par exemple, tu effacerais
+  un mail par erreur.<br />
+  <strong>Attention :</strong> il ne s'agit que d'un service de secours, dont la disponibilité n'est pas garantie.
+</p>
+
+<table class="bicol" summary="Compte de stockage">
+  <col width="75%" />
+  <col width="25%" />
+  <tr>
+    <th colspan="2">Compte de stockage</th>
+  </tr>
+  <tr class="pair">
+    <td>
+      <a href="Xorg/IMAP">
+        <strong>Accès de secours aux emails (IMAP)</strong>
+      </a><br />Hébergé par Polytechnique.org
+    </td>
+    <td style="text-align: center; vertical-align: middle">
+      <form action="emails/redirect/storage/imap/{if in_array('imap', $storage)}inactive{else}active{/if}" method="post">
+        {if in_array('imap', $storage)}
+        <input type="submit" value="Désactiver" />
+        {else}
+        <input type="submit" value="Activer" />
+        {/if}
+      </form>
+    </td>
+  </tr>
+</table>
+{/if}
+
+{if $has_googleapps}
+<br />
+<p>
+  Grâce à un partenariat avec Google, Polytechnique.org te propose également un compte
+  <b>Google Apps</b>, qui te permet de disposer des services Google (GMail pour
+  tes emails, Google Calendar, Google Docs, ...) sur une adresse polytechnique.org.
+</p>
+
+<table class="bicol" summary="Compte de stockage" id="googleapps">
+  <col width="75%" />
+  <col width="25%" />
+  <tr>
+    <th colspan="2">Compte de stockage</th>
+  </tr>
+  <tr class="pair">
+    {if $googleapps eq 'active'}
+    <td>
+      <a href="googleapps">
+        <strong>Redirection des emails vers GMail / Google Apps</strong>
+      </a><br />Hébergé par Google
+    </td>
+    <td style="text-align: center; vertical-align: middle">
+      <form action="emails/redirect/storage/googleapps/{if in_array('googleapps', $storage)}inactive{else}active{/if}" method="post">
+        {if in_array('googleapps', $storage)}
+        <input type="submit" value="Désactiver" />
+        {else}
+        <input type="submit" value="Activer" />
+        {/if}
+      </form>
+    </td>
+    {else}
+    <td colspan="2">
+      {if $googleapps eq 'disabled'}
+      Ton compte Google Apps est actuellement inactif.<br />
+      {else}
+      Tu n'as pas encore de compte Google Apps sur Polytechnique.org.<br />
+      {/if}
+      <a href="googleapps">Plus d'informations &hellip;</a>
+    </td>
+    {/if}
+  </tr>
+</table>
+{/if}
+
 {if $eleve}
 <h1>Pour les Élèves (non encore diplômés)</h1>
 <p>
 </p>
 <p>
   Si tu utilises le service POP de poly pour récupérer tes mails dans ton logiciel de courrier,
-  l'équipe de Polytechnique.org te conseille de rediriger :
+  l'équipe de Polytechnique.org te conseille de rediriger&nbsp;:
 </p>
 <ul>
   <li>«prenom.nom»@polytechnique.edu vers {$smarty.session.forlife}@{#globals.mail.domain#}&nbsp;;</li>
index 1e81a6b..9219ee2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
     </div>
     <div id="preview">
       <div id="preview_pv" style="display: none">
-        <strong>Aperçu du mail :</strong>
+        <strong>Aperçu du mail&nbsp;:</strong>
         <div id="mail_preview">
         </div>
         <div class="center">
index bdcf56a..cb932f6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <p>
   Pour soumettre un (non-)spam mal détecté par notre <a href="emails/antispam">antispam</a>, il suffit d'enregistrer
   les sources (regarde dans la documentation de ton client mail dans la liste ci-dessous) du mail en tant que fichier
-  depuis ton client mail, puis de soumettre ce fichier à l'interface ci-dessus en sélectionnant l'action adaptée :
+  depuis ton client mail, puis de soumettre ce fichier à l'interface ci-dessus en sélectionnant l'action adaptée&nbsp;:
 </p>
 <ul>
-  <li><strong>spam</strong> : pour soumettre un spam mal reconnu&nbsp;;</li>
-  <li><strong>nonspam</strong> : pour soumettre un mail légitime mal reconnu.</li>
+  <li><strong>spam</strong>&nbsp;: pour soumettre un spam mal reconnu&nbsp;;</li>
+  <li><strong>nonspam</strong>&nbsp;: pour soumettre un mail légitime mal reconnu.</li>
 </ul>
 
 {include wiki=Xorg.Mails part=clients}
similarity index 96%
rename from templates/emails/mail.test.tpl
rename to templates/emails/test.mail.tpl
index bfb355d..c761fa1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -30,7 +30,7 @@
 
 Tu reçois ce mail car tu as demandé la confirmation du bon fonctionnement de ton adresse polytechnicienne {$email}.
 {if $redirects->total() gt 1}Si toutes tes redirections fonctionnent correctement tu devrais recevoir une copie de ce mail
-des boîtes suivantes :
+dans les boîtes suivantes :
 {iterate from=$redirects item=mail}
 * {$mail.email}
 {/iterate}
index bb95087..8584e48 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -23,7 +23,7 @@
 
 
 <h1>
-  Gestion des événements :
+  Gestion des événements&nbsp;:
   [&nbsp;
   {if $arch || $action eq 'edit'}
   <a href="admin/events">Actualités</a>
index 81fb294..feb1e81 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 24aa19e..5a224d0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
         </div>
         {/if}
         <div style="clear: both">
-          Choisir un fichier : <input type="file" name="image" id="image" /><br />
-          Indiquer une adresse : <input type="text" name="image_url" id="image_url" value="" />
+          Choisir un fichier&nbsp;: <input type="file" name="image" id="image" /><br />
+          Indiquer une adresse&nbsp;: <input type="text" name="image_url" id="image_url" value="" />
         </div>
       </td>
     </tr>
     </tr>
     <tr class="pair">
       <td colspan="2">
-        Tu peux limiter la visibilité de ton annonce aux camarades de certaines promotions :
+        Tu peux limiter la visibilité de ton annonce aux camarades de certaines promotions&nbsp;:
       </td>
     </tr>
     {include file="include/field.promo.tpl"}
     <tr class="pair">
       <td colspan="2">
-        Choisis la date d'expiration de ton annonce :
+        Choisis la date d'expiration de ton annonce&nbsp;:
       </td>
     </tr>
     <tr>
index 72424d3..226a6a9 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -93,7 +93,7 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
       <td class="half titre" style="height: 18px; padding-top: 1px; padding-bottom: 1px;">
         {if $smarty.foreach.events.first}
         {if $smarty.session.core_rss_hash}
-        <a href='rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml' style="display:block;float:right">
+        <a href="rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Annonces">
           {icon name=feed title='fil rss'}
         </a>
         {else}
@@ -113,7 +113,7 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
         {/if}
       </td>
     </tr>
-    {iterate item=ev from=$evenement.summary}
+    {foreach item=ev from=$evenement}
     <tr class="impair">
       <td class="half">
         &bull;
@@ -127,7 +127,7 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
       </td>
     </tr>
     {assign var="has_evts" value=true}
-    {/iterate}
+    {/foreach}
     {/foreach}
     {if !$has_evts}
     <tr>
@@ -155,7 +155,8 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
   </script>
  
   {foreach from=$events key=category item=evenement}
-  {iterate item=ev from=$evenement.events}
+  {foreach item=ev from=$evenement}
+  {if $ev.nonlu}
   <div id="content-evt{$ev.id}">
   <br />
 
@@ -225,11 +226,12 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
     </tr>
   </table>
   </div>
-  {/iterate}
+  {/if}
+  {/foreach}
   {/foreach}
 
   <p class="smaller">
-  Nota Bene : les informations présentées ici n'engagent que leurs auteurs
+  Nota Bene&nbsp;: les informations présentées ici n'engagent que leurs auteurs
   respectifs et sont publiées à leur initiative. L'association Polytechnique.org
   ne pourrait en aucun cas être tenue responsable de la nature des propos relatés
   sur cet espace d'expression et d'information. Elle se réserve le droit de
index 1fa82b8..465d757 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 {if trim($titre) || trim($texte)}
 <table class="bicol">
-  <tr><th><em>Aperçu de : </em>{$titre|nl2br}</th></tr>
+  <tr><th><em>Aperçu de&nbsp;: </em>{$titre|nl2br}</th></tr>
   <tr class="pair"><td>{$texte|miniwiki|smarty:nodefaults}</td></tr>
 </table>
 {/if}
index 1d2aab9..e54037f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index ca00e24..54df094 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
diff --git a/templates/gadgets/ig-events.tpl b/templates/gadgets/ig-events.tpl
new file mode 100644 (file)
index 0000000..b6ab0c6
--- /dev/null
@@ -0,0 +1,51 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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 class="events">
+  <ul>
+  {iterate from=$events item=ev}
+    <li class="{if $ev.nonlu}unread{else}read{/if}" id="evt-{$ev.id}">
+      {if $ev.nonlu}
+      <div  id="mark-read-{$ev.id}" style="float: right">
+        <a href="events/read/{$ev.id}" target="_top" onclick="return markEventAsRead({$ev.id})">{*
+          *}{icon name=tick title="Marquer comme lu"}</a>
+      </div>
+      {/if}
+      <a href="events{if !$ev.nonlu}/unread/{$ev.id}{else}#newsid{$ev.id}{/if}" target="_blank" id="link-{$ev.id}"
+         title="Ajouté le {$ev.creation_date|date_format} par {$ev.prenom} {$ev.nom} (X{$ev.promo})">
+        {tidy}
+          {$ev.titre|nl2br}
+        {/tidy}
+      </a>
+    </li>
+  {assign var="has_evts" value=true}
+  {/iterate}
+  {if !$has_evts}
+    <li><em>Aucun article actuellement.</em></li>
+  {/if}
+  </ul>
+</div>
+<div class="more">
+  <a href="events" target="_blank">{$event_count} événements au total</a> &gt;&gt;&gt;
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/gadgets/ig-events.xml.tpl b/templates/gadgets/ig-events.xml.tpl
new file mode 100644 (file)
index 0000000..f077f08
--- /dev/null
@@ -0,0 +1,35 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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"?>
+<Module>
+  <ModulePrefs title="Polytechnique.org - Événements"
+    title_url="https://www.polytechnique.org/events" scrolling="false"
+    description="Les dernières annonces du site Polytechnique.org."
+    author="Polytechnique.org" author_email="support+gadgets@polytechnique.org">
+    <Locale lang="fr" />
+    <Require feature="dynamic-height" />
+  </ModulePrefs>
+  <Content type="url" href="{$globals->baseurl}/gadgets/ig-events" />
+</Module>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/gadgets/ig-login.tpl b/templates/gadgets/ig-login.tpl
new file mode 100644 (file)
index 0000000..6a0d9d7
--- /dev/null
@@ -0,0 +1,34 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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 style="text-align: center">
+  <img src="images/skins/default_headlogo.jpg" /><br />
+  <b>Polytechnique.org</b>
+</div>
+<div style="text-align: center" id="connect">
+  <a href="login" target="_blank">Me connecter !</a><br />
+  <a href="javascript:window.location.reload()">
+    Je suis déjà connecté à Polytechnique.Org.
+  </a>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/gadgets/ig-minifiche.tpl b/templates/gadgets/ig-minifiche.tpl
new file mode 100644 (file)
index 0000000..b04a21d
--- /dev/null
@@ -0,0 +1,82 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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 !$c.inscrit || $c.dcd}<div class='grayed'>{/if}
+<div class="contact" {if $c.inscrit}{if $smarty.session.auth ge AUTH_COOKIE}title="Fiche mise à jour le {$c.date|date_format}"{/if}{/if}>
+  <div class="nom">
+    {if $c.sexe}&bull;{/if}
+    {if !$c.dcd && $c.inscrit}<a href="profile/{$c.forlife}" class="popup2">{/if}
+    {if $c.nom_usage}{$c.nom_usage} {$c.prenom}<br />({$c.nom}){else}{$c.nom} {$c.prenom}{/if}
+    {if !$c.dcd && $c.inscrit}</a>{/if}
+  </div>
+  <div class="autre">
+    {if $c.iso3166}
+    <img src='images/flags/{$c.iso3166}.gif' alt='{$c.nat}' height='11' title='{$c.nat}' />&nbsp;
+    {/if}
+    (X {$c.promo})
+    {if $c.dcd}décédé{if $c.sexe}e{/if} le {$c.deces|date_format}{/if}
+    {if $smarty.session.auth ge AUTH_COOKIE}
+    {if !$c.wasinscrit && !$c.dcd}
+      {if $show_action eq ajouter}
+        <a href="carnet/notifs/add_nonins/{$c.user_id}" target="_top">{*
+        *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
+      {else}
+        <a href="carnet/notifs/del_nonins/{$c.user_id}" target="_top">{*
+        *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
+      {/if}
+    {elseif $c.wasinscrit && !$c.dcd}
+        <a href="vcard/{$c.forlife}.vcf">{*
+        *}{icon name=vcard title="Afficher la carte de visite"}</a>
+      {if $show_action eq ajouter}
+        <a href="carnet/contacts?action={$show_action}&amp;user={$c.forlife}" target="_top">{*
+        *}{icon name=add title="Ajouter à mes contacts"}</a>
+      {else}
+        <a href="carnet/contacts?action={$show_action}&amp;user={$c.forlife}" target="_top">{*
+        *}{icon name=cross title="Retirer de mes contacts"}</a>
+      {/if}
+    {/if}
+    {/if}
+  </div>
+  <div class="long">
+  {if $c.wasinscrit}
+    {if $c.mobile || $c.countrytxt || $c.city}
+    <table cellspacing="0" cellpadding="0">
+      {if $c.countrytxt || $c.city}
+      <tr>
+        <td class="lt">Géographie:</td>
+        <td class="rt">{$c.city}{if $c.city && $c.countrytxt}, {/if}{$c.countrytxt}</td>
+      </tr>
+      {/if}
+      {if $c.mobile && !$c.dcd}
+      <tr>
+        <td class="lt">Mobile:</td>
+        <td class="rt">{$c.mobile}</td>
+      </tr>
+      {/if}
+    </table>
+    {/if}
+  {/if}
+  </div>
+</div>
+{if !$c.inscrit || $c.dcd}</div>{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/gadgets/ig-search.tpl b/templates/gadgets/ig-search.tpl
new file mode 100644 (file)
index 0000000..67fdd83
--- /dev/null
@@ -0,0 +1,56 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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 $error}
+<div class="error">{$error}</div>
+{elseif $set}
+<div class="contact-list">
+{iterate from=$set item=res}
+  {if $res.contact}
+  {include file="gadgets/ig-minifiche.tpl" c=$res show_action="retirer"}
+  {else}
+  {include file="gadgets/ig-minifiche.tpl" c=$res show_action="ajouter"}
+  {/if}
+{/iterate}
+</div>
+<div class="more">
+  <a href="search?quick={$smarty.request.quick}" target="_blank">{$result_count} résultats au total</a> &gt;&gt;&gt;
+</div>
+{else}
+<div class="welcome">
+  <img src="images/skins/default_headlogo.jpg" alt="Logo Polytechnique.org" />
+</div>
+{/if}
+
+<div class="search">
+  <form method="get" action="gadgets/ig-search">
+    <input name="extern_js" type="hidden" value="{$smarty.request.extern_js}" />
+    <input name="libs" type="hidden" value="{$smarty.request.libs}" />
+    <input name="mid" type="hidden" value="{$smarty.request.mid}" />
+    <input name="parent" type="hidden" value="{$smarty.request.parent}" /><br />
+    <input name="synd" type="hidden" value="{$smarty.request.synd}" />
+    <input name="quick" type="text" value="{$smarty.request.quick}" /><br />
+    <input value="Chercher sur Polytechnique.org" type="submit" />
+  </form>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/gadgets/ig-search.xml.tpl b/templates/gadgets/ig-search.xml.tpl
new file mode 100644 (file)
index 0000000..ae4eae4
--- /dev/null
@@ -0,0 +1,35 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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"?>
+<Module>
+  <ModulePrefs title="Polytechnique.org - Annuaire"
+    title_url="https://www.polytechnique.org/search" scrolling="false"
+    description="Outil de recherche rapide de l'annuaire de Polytechnique.org."
+    author="Polytechnique.org" author_email="support+gadgets@polytechnique.org">
+    <Locale lang="fr" />
+    <Require feature="dynamic-height" />
+  </ModulePrefs>
+  <Content type="url" href="{$globals->baseurl}/gadgets/ig-search" />
+</Module>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/gadgets/ig-skin.tpl b/templates/gadgets/ig-skin.tpl
new file mode 100644 (file)
index 0000000..050c14c
--- /dev/null
@@ -0,0 +1,41 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{include file="skin/common.doctype.tpl"}
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <link rel="stylesheet" type="text/css" href="css/base.css" media="all"/>
+    <link rel="stylesheet" type="text/css" href="css/igoogle.css" media="all"/>
+    <script type="text/javascript" src="javascript/ajax.js"></script>
+    <script type="text/javascript" src="javascript/base.js"></script>
+    <script type="text/javascript" src="javascript/igoogle.js"></script>
+    <script type="text/javascript" src="javascript/xorg.js"></script>
+    {foreach from=$gadget_js item=js}
+    <script type="text/javascript" src="{$js}"></script>
+    {/foreach}
+    <script type="text/javascript">var platal_baseurl = "{$globals->baseurl}/";</script>
+  </head>
+  <body onload="igOnLoadHandler();">
+{if $gadget_tpl}{include file=$gadget_tpl}{/if}
+  </body>
+</html>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 4651a24..07a227a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index c1a4285..70b4a8d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -30,7 +30,7 @@
 
 <form action='admin/geoloc' method='post'>
 <p>
-La ville dont l'id est : <input size="6" name="id" />
+La ville dont l'id est&nbsp;: <input size="6" name="id" />
 </p>
 </form>
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index c23d92d..a16a54e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index de51c16..03395e6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}\r
 {*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}\r
 {*  http://opensource.polytechnique.org/                                  *}\r
 {*                                                                        *}\r
 {*  This program is free software; you can redistribute it and/or modify  *}\r
index c0e82c9..6debb08 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}\r
 {*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}\r
 {*  http://opensource.polytechnique.org/                                  *}\r
 {*                                                                        *}\r
 {*  This program is free software; you can redistribute it and/or modify  *}\r
index 666f779..63389f7 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
similarity index 97%
rename from templates/geoloc/mail_geoloc.tpl
rename to templates/geoloc/geoloc.mail.tpl
index 4b74f32..64a1c2e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index bcd8e87..f7d88fc 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
diff --git a/templates/googleapps/admin.job.tpl b/templates/googleapps/admin.job.tpl
new file mode 100644 (file)
index 0000000..56638c9
--- /dev/null
@@ -0,0 +1,86 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Requête de la queue Google Apps</h1>
+
+{if $job}
+<table class="bicol">
+  <col width="50%" />
+  <col width="50%" />
+  <tr>
+    <th style="text-align: left" colspan="2">Queue id: {$job.q_id}</th>
+  </tr>
+
+  <tr class="impair">
+    <td class="titre">Propriétaire</td><td>{if $job.q_owner}{$job.q_owner}{else}<em>none</em>{/if}</td>
+  </tr>
+  <tr class="impair">
+    <td class="titre">Destinataire</td><td>{if $job.q_recipient}{$job.q_recipient}{else}<em>none</em>{/if}</td>
+  </tr>
+
+  <tr class="pair">
+    <td class="titre">Statut</td><td><code>{$job.p_status}</code></td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Priorité</td><td><code>{$job.p_priority}</code></td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Requête administrateur ?</td><td>{if $job.p_admin_request}oui{else}non{/if}</td>
+  </tr>
+
+  <tr class="impair">
+    <td class="titre">Entrée dans la queue</td><td>{$job.p_entry_date}</td>
+  </tr>
+  <tr class="impair">
+    <td class="titre">Date d'activation</td><td>{$job.p_notbefore_date}</td>
+  </tr>
+  <tr class="impair">
+    <td class="titre">Début de traitement</td><td>{if $job.p_start_date}{$job.p_start_date}{else}<em>none</em>{/if}</td>
+  </tr>
+  <tr class="impair">
+    <td class="titre">Fin de traitement</td><td>{if $job.p_end_date}{$job.p_end_date}{else}<em>none</em>{/if}</td>
+  </tr>
+
+  <tr class="pair">
+    <td class="titre">Erreurs récupérables</td><td>{$job.r_softfail_count}</td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Dernière erreur récupérable</td><td><code>{if $job.r_softfail_date}{$job.r_softfail_date}{else}<em>none</em>{/if}</code></td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Résultat du traitement</td><td><code>{if $job.r_result}{$job.r_result}{else}<em>none</em>{/if}</code></td>
+  </tr>
+
+  <tr class="impair">
+    <td class="titre">Type de requête</td><td><code>{$job.j_type}</code></td>
+  </tr>
+  <tr class="impair">
+    <td class="titre">Paramètres</td><td><pre>{$job.decoded_parameters}</pre></td>
+  </tr>
+</table>
+{else}
+<p><strong>Aucune requête n'a été trouvée.</strong></p>
+{/if}
+
+<p>Retourner à la <a href="admin/googleapps">page d'administration de Google Apps</a>.</p>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/googleapps/admin.tpl b/templates/googleapps/admin.tpl
new file mode 100644 (file)
index 0000000..67e9ccb
--- /dev/null
@@ -0,0 +1,100 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Gestion des utilisateurs</h1>
+
+<form method="post" action="admin/googleapps/user">
+<table class="tinybicol" cellspacing="0" cellpadding="2">
+  <tr>
+    <th>Administrer un utilisateur (Google Apps)</th>
+  </tr>
+  <tr>
+    <td class="center"><input type="text" name="login" size="40" maxlength="255" value="" /></td>
+  </tr>
+  <tr>
+    <td class="center"><input type="submit" value="Valider" /></td>
+  </tr>
+</table>
+</form>
+
+<h1>Queue de requêtes vers Google Apps</h1>
+
+<p>
+  Requête nécessitant <a href="Equipe/Infra-GoogleApps#admin-cli">l'intervention manuelle</a>
+  d'un administrateur Google Apps {if $googleapps_admin}(tu en es un){/if}&nbsp;:
+</p>
+<table class="bicol" style="text-align: center">
+  <tr>
+    <th>qid</th>
+    <th>date</th>
+    <th>recipient</th>
+    <th>type</th>
+    <th>parameters</th>
+  </tr>
+  {foreach from=$admin_requests item=r}
+  <tr class="{cycle values="impair,pair"}">
+    <td><a href="admin/googleapps/job/{$r.q_id}">{$r.q_id}</a></td>
+    <td>{$r.p_entry_date|date_format:"%Y-%m-%d %H:%M"}</td>
+    <td>{if $r.alias}<a href="admin/googleapps/user/{$r.alias}">{$r.alias}</a>{else}-{/if}</td>
+    <td>{$r.j_type}</td>
+    <td>{$r.parameters}</td>
+  </tr>
+  {/foreach}
+</table>
+
+<p>
+  Requêtes ayant échoué récemment (plus d'information dans la <a href="Equipe/Infra-GoogleApps">documentation</a>) :
+</p>
+<table class="bicol" style="text-align: center">
+  <tr>
+    <th>qid</th>
+    <th>date</th>
+    <th>recipient</th>
+    <th>type</th>
+    <th>reason</th>
+    <th></th>
+  </tr>
+  {iterate from=$failed_requests item=r}
+  <tr class="{cycle values="impair,pair"}">
+    <td><a href="admin/googleapps/job/{$r.q_id}">{$r.q_id}</a></td>
+    <td>{$r.p_entry_date|date_format:"%Y-%m-%d %H:%M"}</td>
+    <td>{if $r.alias}<a href="admin/googleapps/user/{$r.alias}">{$r.alias}</a>{else}-{/if}</td>
+    <td>{$r.j_type}</td>
+    <td><code>{$r.r_result}</code></td>
+    <td><a href="admin/googleapps/ack/{$r.q_id}">{icon name=cross title="Retirer cet échec"}</a></td>
+  </tr>
+  {/iterate}
+</table>
+
+<h1>Statistiques d'utilisation de Google Apps</h1>
+
+<div style="text-align: center">
+  <img src="images/googleapps/activity-monthly.png" alt="Activité Google Apps - 1 mois" width="500 height="250" />
+  <br /><em>Utilisation des comptes Google Apps sur les 31 derniers jours</em>.
+</div>
+
+<div style="text-align: center">
+  <img src="images/googleapps/activity-yearly.png" alt="Activité Google Apps - 1 an" width="500 height="250" />
+  <br /><em>Utilisation des comptes Google Apps sur les 12 derniers mois</em>.
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/googleapps/admin.user.tpl b/templates/googleapps/admin.user.tpl
new file mode 100644 (file)
index 0000000..cb2af6f
--- /dev/null
@@ -0,0 +1,105 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Compte Google Apps</h1>
+
+{if $account}
+{assign var=a value=$account}
+<table class="bicol">
+  <col width="50%" />
+  <col width="50%" />
+  <tr>
+    <th colspan="2" style="text-align: left">
+      <div style="float: left; text-align: left">
+        Compte = {$a->g_account_name}
+      </div>
+      <div style="float: right; text-align: right">
+        Google id = {$a->g_account_id}<br />
+        Plat/al id = {$user}
+      </div>
+    </th>
+  </tr>
+
+  <tr class="impair">
+    <td class="titre">Statut du compte</td>
+    <td>
+      <strong>{$a->g_status}</strong>
+      {if $admin_account}<br /><strong>Compte administrateur de Google Apps</strong>{/if}
+    </td>
+  </tr>
+  {if $a->suspended()}
+  <tr class="impair">
+    <td class="titre">Raison de suspension</td><td>{$a->g_suspension}</td>
+  </tr>
+  {/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>
+  </tr>
+  <tr class="impair">
+    <td class="titre">Redirection des mails</td><td>{if $googleapps_storage}activée{else}désactivee{/if}</td>
+  </tr>
+
+  <tr class="pair">
+    <td class="titre">Date de création</td><td>{$a->r_creation|date_format:"%Y-%m-%d"}</td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Dernière connexion</td><td>{$a->r_last_login|date_format:"%Y-%m-%d"}</td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Dernière utilisation du webmail</td><td>{$a->r_last_webmail|date_format:"%Y-%m-%d"}</td>
+  </tr>
+  <tr class="pair">
+    <td class="titre">Utilisation du quota mail</td><td>{$a->r_disk_usage/1024/1024|string_format:"%.2f"}MB</td>
+  </tr>
+</table><br />
+
+<table class="bicol" style="text-align: center">
+  <tr>
+    <th colspan="4" style="text-align: left">Requêtes en attente</th>
+  </tr>
+  <tr>
+    <th>qid</th>
+    <th>date</th>
+    <th>statut</th>
+    <th>type</th>
+  </tr>
+  {iterate from=$requests item=r}
+  <tr class="{cycle values="impair,pair"}">
+    <td><a href="admin/googleapps/job/{$r.q_id}">{$r.q_id}</a></td>
+    <td>{$r.p_entry_date|date_format:"%Y-%m-%d %H:%M"}</td>
+    <td>{$r.p_status}</td>
+    <td>{$r.j_type}</td>
+  </tr>
+  {/iterate}
+</table>
+{else}
+<p><strong>Aucun utilisateur n'a été trouvé.</strong></p>
+{/if}
+
+<p>Retourner à la <a href="admin/googleapps">page d'administration de Google Apps</a>.</p>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/googleapps/create.mail.tpl b/templates/googleapps/create.mail.tpl
new file mode 100644 (file)
index 0000000..fac8a07
--- /dev/null
@@ -0,0 +1,55 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="googleapps"}
+{if $mail_part eq 'head'}
+{from full=#from#}
+{to addr=$email}
+{cc full=#from#}
+{subject text="[Polytechnique.org] Création de ton compte Google Apps"}
+{elseif $mail_part eq 'wiki'}
+{if $sexe}Chère{else}Cher{/if} {$prenom},
+
+Ton compte Google Apps pour Polytechnique.org vient d'être crée.
+
+Tu peux accèder aux services offerts par Google Apps aux adresses suivantes:
+* [[http://google.polytechnique.org/|iGoogle, le portail des services Google Apps]] ;
+{if $account->activate_mail_redirection}
+* [[https://mail.google.com/a/{$googleapps_domain}/|GMail, pour accéder à tes emails Polytechnique.org]] ;
+{/if}
+* [[https://www.polytechnique.org/googleapps|Polytechnique.org, pour modifier les préférences de ton compte Google Apps]].
+
+Ton nom d'utilisateur pour ces services Google est '''{$account->g_account_name}'''
+{if $account->sync_password}
+et ton mot de passe est celui de Polytechnique.org.
+{else}
+et ton mot de passe est celui que tu as choisi lors de ta demande de compte.
+{/if}
+
+Tu trouveras plus d'informations dans la [[https://www.polytechnique.org/Xorg/GoogleApps|documentation]] sur Polytechnique.org.
+
+Cordialement,\\
+-- \\
+L'équipe de Polytechnique.org
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
diff --git a/templates/googleapps/index.tpl b/templates/googleapps/index.tpl
new file mode 100644 (file)
index 0000000..da046f3
--- /dev/null
@@ -0,0 +1,400 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Ton compte Google Apps / Polytechnique.org</h1>
+
+<p>Polytechnique.org te fournit un compte <b>Google Apps</b> qui te permet de disposer
+  des applications web de Google (<a href="http://mail.google.com/a/polytechnique.org/">GMail</a>,
+  <a href="http://www.google.com/calendar/hosted/polytechnique.org/">Google Calendar</a>,
+  <a href="http://docs.google.com/a/polytechnique.org/">Google Docs</a>, et bien d'autres)
+  sur ton adresse Polytechnique.org habituelle (<a href="Xorg/GoogleApps">plus d'informations</a>).
+</p>
+
+{if !$account->g_status}
+<p>Tu peux créer ton compte <i>Google Apps / Polytechnique.org</i> en utilisant le
+  formulaire ci-dessous.
+</p>
+<p><b>Attention :</b> ce compte Google Apps est hébergé par <b>Google</b>, et non
+  par Polytechnique.org. Nous te déconseillons d'y ranger des informations
+  confidentielles ou sensibles !<br />&nbsp;
+</p>
+
+<table class="bicol" id="create">
+  <col width="8%" />
+  <col width="92%" />
+  <tr>
+    <th colspan="2">Création d'un compte Google Apps</th>
+  </tr>
+
+  {if !$has_password_sync}
+    <form action="googleapps/create" method="get">
+    <tr class="impair">
+      <td colspan="2"><b>Mot de passe du compte :</b></td>
+    </tr>
+    <tr class="impair">
+      <td style="text-align: center">
+        <input type="radio" name="password_sync" value="1" checked="checked" id="pwsync_true" />
+      </td>
+      <td>
+        <label for="pwsync_true">Utiliser le même mot de passe pour Google Apps et Polytechnique.org.</label><br />
+        <span style="font-size: smaller; font-style: italic;">
+          Tes futurs changements de mot de passe seront synchronisés avec ton compte Google Apps.
+          Ton mot de passe ne sera jamais transmis non-chiffré par Polytechnique.org.
+        </span>
+      </td>
+    </tr>
+    <tr class="impair">
+      <td style="text-align: center">
+        <input type="radio" name="password_sync" value="0" id="pwsync_false" />
+      </td>
+      <td>
+        <label for="pwsync_false">Utiliser un mot de passe différent pour Google Apps.</label>
+      </td>
+    </tr>
+    <tr class="impair">
+      <td colspan="2" style="text-align: center">
+        <input type="submit" value="Continuer &gt;&gt;" />
+      </td>
+    </tr>
+    </form>
+  {else}
+    <tr class="impair">
+      <td colspan="2"><b>Mot de passe du compte :</b></td>
+    </tr>
+    {if $password_sync}
+      <tr class="impair">
+        <td></td>
+        <td>
+          Tu as choisi d'avoir le même mot de passe pour Google Apps et Polytechnique.org.<br />
+          Tu peux encore choisir d'utiliser des <a href="googleapps/create?password_sync=0">mots de passe différents</a>.
+        </td>
+      </tr>
+    {else}
+      <tr class="impair">
+        <td></td>
+        <td>Tu as choisi d'avoir un nouveau mot de passe pour ton compte Google Apps :</td>
+      </tr>
+      <tr class="impair">
+        <td colspan="2">
+          <form action="#" method="post" id="changepass">
+          <table class="tinybicol">
+            <tr>
+              <td class="titre">Nouveau mot de passe</td>
+              <td><input type="password" name="nouveau" onfocus="document.forms.changepass2.password_sync[1].checked = true;" /></td>
+            </tr>
+            <tr>
+              <td class="titre">Vérification</td>
+              <td><input type="password" name="nouveau2" onfocus="document.forms.changepass2.password_sync[1].checked = true;" /></td>
+            </tr>
+          </table>
+          </form>
+        </td>
+      </tr>
+      <tr class="impair">
+        <td></td>
+        <td>
+          Tu peux encore choisir d'<a href="googleapps/create?password_sync=1">avoir des mots de passes synchronisés</a>.
+        </td>
+      </tr>
+    {/if}
+
+    <form action="googleapps/create" method="post" id="changepass2">
+    <tr class="pair">
+      <td colspan="2"><b>Redirection des emails :</b></td>
+    </tr>
+    <tr class="pair">
+      <td style="text-align: center">
+        <input type="radio" name="redirect_mails" value="1" checked="checked" id="redirection_true" />
+      </td>
+      <td>
+        <label for="redirection_true">Rediriger mes emails vers mon compte Google Apps.</label><br />
+        <span style="font-size: smaller;">
+          Tes emails <i>Polytechnique.org</i> seront redirigés vers ton webmail <i>GMail</i> de Google Apps,
+          en plus d'être redirigés vers tes adresses actuelles.<br /><br />
+          <b>Attention : ton compte Google Apps est hébergé par <i>Google, Inc.</i></b><br />
+          Nous te déconseillons donc de rediriger tes emails vers Google Apps si tu utilises tes adresses Polytechnique.org
+          à des fin professionnelles ou pour des communications confidentielles.
+        </span>
+      </td>
+    </tr>
+    <tr class="pair">
+      <td style="text-align: center">
+        <input type="radio" name="redirect_mails" value="0" id="redirection_false" />
+      </td>
+      <td>
+        <label for="redirection_false">Ne <i>pas</i> rediriger mes emails vers mon compte Google Apps.</label><br />
+        <span style="font-size: smaller;">
+        </span>
+      </td>
+    </tr>
+
+    <tr class="impair">
+      <td colspan="2" style="text-align:center">
+        <input type="hidden" name="password_sync" value="{$password_sync}" />
+        {if $password_sync}
+          <input type="submit" value="Créer mon compte !" />
+        {else}
+          <input type="hidden" name="response2"  value="" />
+          <input type="submit" value="Créer mon compte !" onclick="EnCryptedResponse(); return false;" />
+        {/if}
+      </td>
+    </tr>
+    </form>
+  {/if}
+</table>
+
+{elseif $account->g_status eq 'unprovisioned' or $account->pending_create}
+<br />
+<table class="bicol" id="status">
+  <tr>
+    <th>État de ton compte</th>
+  </tr>
+  <tr class="impair">
+    <td>
+      Ton compte Google Apps est en cours de création.<br />
+      Tu recevras un email dès que l'opération sera terminée.
+    </td>
+  </tr>
+</table>
+
+{elseif $account->pending_delete}
+<br />
+<table class="bicol" id="status">
+  <tr>
+    <th>État de ton compte</th>
+  </tr>
+  <tr class="impair">
+    <td>
+      Ton compte Google Apps est en cours de suppression.
+    </td>
+  </tr>
+</table>
+
+{elseif $account->suspended() or $account->pending_update_suspension}
+<br />
+<table class="bicol" id="status">
+  <tr>
+    <th>État de ton compte</th>
+  </tr>
+  <tr class="impair">
+    <td>
+      Ton compte Google Apps est actuellement <b>désactivé</b>. Tu ne reçois donc plus aucun
+      message sur ce compte.
+    </td>
+  </tr>
+  {if $account->pending_validation_unsuspend or ($account->suspended() and $account->pending_update_suspension)}
+  <tr class="pair">
+    <td>
+      La réactivation de ton compte est en attente de validation.<br />
+      Tu recevras un email dès que l'opération sera terminée.
+    </td>
+  </tr>
+  {elseif !$account->suspended() and $account->pending_update_suspension}
+  <tr class="pair">
+    <td>
+      Les opérations de désactivation de ton compte Google Apps ne sont pas terminées, tu ne peux donc pas encore demander sa réactivation.
+    </td>
+  </tr>
+  {else}
+  {if $account->g_suspension}
+  <tr class="pair">
+    <td>
+      Ton compte est actuellement suspendu pour la raison suivante: <em>{$account->g_suspension}</em>.
+    </td>
+  </tr>
+  {/if}
+  <tr class="impair">
+    <td>
+      La réactivation de ton compte est soumise à une validation manuelle par un administrateur de Polytechnique.org.
+      Ton compte réactivé contiendra toutes tes anciennes données.
+      <br /><br />
+      <div class="center">
+        <form action="googleapps/unsuspend" method="post">
+          <input type="hidden" name="redirect_mails" value="1" />
+          <input type="submit" name="unsuspend" value="Réactiver mon compte Google Apps et y rediriger mes emails" />
+        </form>
+        <br />
+        <form action="googleapps/unsuspend" method="post">
+          <input type="hidden" name="redirect_mails" value="0" />
+          <input type="submit" name="unsuspend" value="Réactiver mon compte Google Apps et ne pas y rediriger mes emails" />
+        </form>
+      </div><br />
+      Tu pourras toujours <a href="emails/redirect">changer la redirection de tes emails</a> plus tard.
+    </td>
+  </tr>
+  {/if}
+</table>
+
+{else}
+<p>Tu peux utiliser ces services :</p>
+<ul>
+  <li>Soit en passant par la <a href="http://google.polytechnique.org/">la page d'accueil Google de Polytechnique.org</a> ;</li>
+  <li>Soit en utilisant directement les différents services :
+    <ul>
+      <li>Pour tes mails, sur le <a href="http://mail.google.com/a/polytechnique.org/">GMail de Polytechnique.org</a> ;</li>
+      <li>Pour ton calendrier, sur <a href="http://www.google.com/calendar/hosted/polytechnique.org/">Google Calendar</a> ;</li>
+      <li>Pour tes documents, sur <a href="http://docs.google.com/a/polytechnique.org/">Google Docs</a>.</li>
+    </ul>
+  </li>
+</ul>
+
+<table class="bicol" id="status">
+  <tr>
+    <th>É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>
+  </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 de mails.</td>
+  </tr>
+  {/if}
+  <tr class="impair">
+    {if $redirect_active and $redirect_unique}
+    <td>
+      Ta seule adresse de redirection de tes mails 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>
+      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 mails 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>
+</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>
+  </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>
+  {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">Choisir d'avoir des mots de passe indépendants</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 :
+    </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>
+  {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></td>
+                <td><input type="submit" value="Changer" onclick="EnCryptedResponse(); return false;" /></td>
+              </tr>
+            </table>
+          </form>
+          <form action="googleapps/password#password" method="post" id="changepass2">
+            <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>
+  {/if}
+  {/if}
+</table>
+<br />
+
+<table class="bicol" id="emails">
+  <tr>
+    <th>Redirection des emails vers Google Apps</th>
+  </tr>
+
+  <tr class="impair">
+    {if $redirect_active and !$redirect_unique}
+    <td>Tu reçois tes emails Polytechnique.org entre autres sur ton compte mail Google Apps.</td>
+    {elseif $redirect_active}
+    <td>Tu ne reçois tes emails Polytechnique.org <em>que</em> sur ton compte mail Google Apps.</td>
+    {else}
+    <td>Tu ne reçois <em>pas</em> tes emails Polytechnique.org sur ton compte mail Google Apps.</td>
+    {/if}
+  </tr>
+  <tr class="pair">
+    <td class="center"><a href="emails/redirect">Changer mes redirections mail</a></td>
+  </tr>
+</table>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/googleapps/unsuspend.mail.tpl b/templates/googleapps/unsuspend.mail.tpl
new file mode 100644 (file)
index 0000000..5e43939
--- /dev/null
@@ -0,0 +1,47 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="googleapps"}
+{if $mail_part eq 'head'}
+{from full=#from#}
+{to addr=$email}
+{cc full=#from#}
+{subject text="[Polytechnique.org] Réactivation de ton compte Google Apps"}
+{elseif $mail_part eq 'wiki'}
+{if $sexe}Chère{else}Cher{/if} {$prenom},
+
+Ton compte Google Apps pour Polytechnique.org vient d'être réactivé.\\
+Ton nom d'utilisateur pour ces services Google est '''{$account->g_account_name}'''
+{if $account->sync_password}
+et ton mot de passe est celui de Polytechnique.org.
+{else}
+et ton mot de passe est celui que tu as choisi lors de ta demande de compte.
+{/if}
+
+Tu trouvera plus d'information dans la [[https://www.polytechnique.org/Xorg/GoogleApps|documentation]] sur Polytechnique.org.
+
+Cordialement,\\
+-- \\
+L'équipe de Polytechnique.org
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
index 59e79fb..506f4ef 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {/literal}
 //]]></script>
 <form action="{$csv_path}" method="post" id="csv_form">
-<table class="cadre_a_onglet" cellpadding="0" cellspacing="0" style="width: 98%; margin-left:1%;">
-  <tr>
-    <td>
-      <ul id="onglet">
-        {if $csv_page eq 'source'}
-        <li class="actif">1 - Choisir<br />la source</li>
-        {else}
-        <li><a href="{$csv_path}" onclick="return gotoPage('source');">1 - Choisir<br />la source</a></li>
-        {/if}
-        {if $csv_page eq 'values'}
-        <li class="actif">2 - Définir<br />les valeurs</li>
-        {elseif $smarty.session.csv}
-        <li><a href="{$csv_path}" onclick="return gotoPage('values');">2 - Définir<br />les valeurs</a></li>
-        {else}
-        <li>2 - Définir<br />les valeurs</li>
-        {/if}
-        {if $csv_page eq 'valid'}
-        <li class="actif">3 - Vérifier<br />et valider</li>
-        {elseif $csv_action}
-        <li><a href="{$csv_path}" onclick="return gotoPage('valid');">3 - Vérifier<br />et valider</a></li>
-        {else}
-        <li>3 - Vérifier<br />et valider</li>
-        {/if}
-      </ul>
-    </td>
-  </tr>
-  <tr>
-    <td class="conteneur_tab">
-      <table style="width: 100%">
-        <tr>
-          <td>
+  <div class="center" style="padding-bottom: 1em">
+    Import d'un CSV&nbsp;:
     {if $csv_page eq 'source'}
-      <textarea name="csv_source" rows="20" cols="80">{$smarty.session.csv|default:$smarty.session.csv_source}</textarea><br />
-      Entrez les données sous la forme suivante (avec
-      <input type="text" name="csv_separator" value="{$smarty.session.csv_separator|default:";"}" maxlength="1" size="1" />
-      comme séparateur) :<br/>
-      <pre class="center">TITRE1{$smarty.session.csv_separator|default:";"}TITRE2{$smarty.session.csv_separator|default:";"}...
+    <span class="erreur">Choisir la source</span>
+    {else}
+    <a href="{$csv_path}" onclick="return gotoPage('source');">Choisir la source</a>
+    {/if}
+    »
+    {if $csv_page eq 'values'}
+    <span class="erreur">Définir les valeurs</span>
+    {elseif $smarty.session.csv}
+    <a href="{$csv_path}" onclick="return gotoPage('values');">Définir les valeurs</a>
+    {else}
+    Définir les valeurs
+    {/if}
+    »
+    {if $csv_page eq 'valid'}
+    <span class="erreur">Vérifier et valider</span>
+    {elseif $csv_action}
+    <a href="{$csv_path}" onclick="return gotoPage('valid');">Vérifier et valider</a>
+    {else}
+    Vérifier et valider
+    {/if}
+  </div>
+  {if $csv_page eq 'source'}
+  <div>
+    <textarea name="csv_source" rows="20" cols="80">{$smarty.session.csv|default:$smarty.session.csv_source}</textarea><br />
+    Entrez les données sous la forme suivante (avec
+    <input type="text" name="csv_separator" value="{$smarty.session.csv_separator|default:";"}" maxlength="1" size="1" />
+    comme séparateur)&nbsp;:<br/>
+    <pre class="center">TITRE1{$smarty.session.csv_separator|default:";"}TITRE2{$smarty.session.csv_separator|default:";"}...
 val1_1{$smarty.session.csv_separator|default:";"}val1_2{$smarty.session.csv_separator|default:";"}...
 val2_1{$smarty.session.csv_separator|default:";"}val2_2{$smarty.session.csv_separator|default:";"}...
 val3_1{$smarty.session.csv_separator|default:";"}val3_2{$smarty.session.csv_separator|default:";"}...</pre>
-    {elseif $csv_page eq 'values'}
+  </div>
+  {elseif $csv_page eq 'values'}
   <div class="center">
-    Action à effectuer si l'entrée existe 
+    Action à effectuer si l'entrée existe&nbsp;
     <select name="csv_action" onchange="this.form.submit()">
       <option value="insert" {if $smarty.session.csv_action eq 'insert'}selected="selected"{/if}>
         ne rien faire
@@ -228,12 +223,9 @@ val3_1{$smarty.session.csv_separator|default:";"}val3_2{$smarty.session.csv_sepa
   Les données ont été ajoutées.
   {/if}
   {/if}
-    </td>
-  </tr>
 
   {if !$csv_done}
-  <tr>
-    <td class="center">
+  <div class="center">
     <input type="hidden" name="csv_page" value="{$csv_page}" />
     <input type="hidden" id="csv_next_page" name="csv_next_page" value="{$csv_page}" />
     {if $csv_page eq 'source'}
@@ -243,13 +235,8 @@ val3_1{$smarty.session.csv_separator|default:";"}val3_2{$smarty.session.csv_sepa
     {elseif $csv_page eq 'valid'}
     <input type="submit" name="csv_valid" value="Valider" />
     {/if}
-    </td>
-  </tr>
+  </div>
   {/if}
-  </table>
-    </td>
-  </tr>
-</table>
 </form>
 
 {* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}
index 682da0b..65abc3c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 0f9e4d0..f0fdfae 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
       min = document.getElementById(prefix + 'promo_min').value; 
       max = document.getElementById(prefix + 'promo_max').value; 
       if (isNaN(min) || (min != 0 && (min < 1900 || min > 2020))) { 
-        range.innerHTML = '<span class="erreur">La promotion minimum n\'est pas valide</span>'; 
+        range.innerHTML = '<span class="erreur">La promotion minimum n\'est pas valide.</span>';
         return false; 
       } else if (isNaN(max) || (max != 0 && (max < 1900  || max > 2020))) { 
-        range.innerHTML = '<span class="erreur">La promotion maximum n\'est pas valide</span>'; 
+        range.innerHTML = '<span class="erreur">La promotion maximum n\'est pas valide.</span>';
         return false; 
       } else if (max != 0 && min != 0 && max < min) { 
-        range.innerHTML = '<span class="erreur">L\'intervalle de promotion est inversé</span>'; 
+        range.innerHTML = '<span class="erreur">L\'intervalle de promotion est inversé.</span>';
         return false; 
       } else if (max == 0 && min == 0) { 
-        range.innerHTML = 'L\'annonce est destinée à toutes les promotions'; 
+        range.innerHTML = 'L\'annonce est destinée à toutes les promotions.';
       } else if (max == 0) { 
-        range.innerHTML = 'L\'annonce est destinée aux promotions plus jeunes que ' + min + ' (incluse)'; 
+        range.innerHTML = 'L\'annonce est destinée aux promotions plus jeunes que ' + min + ' (incluse).';
       } else if (min == 0) { 
-        range.innerHTML = "L\'annonce est destinée aux promotions plus anciennes que " + max + ' (incluse)'; 
+        range.innerHTML = "L\'annonce est destinée aux promotions plus anciennes que " + max + ' (incluse).';
       } else if (min == max - 1) {
-        range.innerHTML = "L\'annonce est destinée aux promotions " + min + " et " + max
+        range.innerHTML = "L\'annonce est destinée aux promotions " + min + " et " + max + ".";
       } else if (min == max) {
-        range.innerHTML = "L\'annonce est destinée à la promotion " + min;
+        range.innerHTML = "L\'annonce est destinée à la promotion " + min + ".";
       } else { 
-        range.innerHTML = "L\'annonce est destinée aux promotions de " + min + " à " + max + ' (incluses)'; 
+        range.innerHTML = "L\'annonce est destinée aux promotions de " + min + " à " + max + ' (incluses).';
       } 
       return true; 
     } 
@@ -64,7 +64,7 @@
       <input type="text" name="{$min_field_name|default:"promo_min"}" id="{$prefix}promo_min"
              size="4" maxlength="4" value="{$promo_min|default:0}" 
              onkeyup="return updateRange();" onchange="return updateRange();" /> incluse 
-      &nbsp;<span class="smaller">(ex : 1980)</span> 
+      &nbsp;<span class="smaller">(ex&nbsp;: 1980)</span> 
     </td> 
   </tr> 
   <tr id="{$prefix}promo_max_tr" class="impair"> 
@@ -73,7 +73,7 @@
       <input type="text" name="{$max_field_name|default:"promo_max"}" id="{$prefix}promo_max"
              size="4" maxlength="4" value="{$promo_max|default:0}" 
              onkeyup="return updateRange();" onchange="return updateRange();" /> incluse 
-      &nbsp;<span class="smaller">(ex : 2000)</span> 
+      &nbsp;<span class="smaller">(ex&nbsp;: 2000)</span> 
     </td> 
   </tr> 
   <tr id="{$prefix}promo_range_tr" class="impair"> 
index 6da1c39..7f99db9 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index d8f3f8a..9cf5cf0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index f0e6b23..155f26a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
   <td>{$valid->alias}</td>
 </tr>
 <tr class="pair">
-  <td class="titre">Visibilité :</td>
+  <td class="titre">Visibilité&nbsp;:</td>
   <td>{$valid->public}</td>
 </tr>
 <tr class="pair">
-  <td class="titre">Motif :</td>
+  <td class="titre">Motif&nbsp;:</td>
   <td>{$valid->raison|nl2br}</td>
 </tr>
 
index 4964034..2fc87a6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index b696299..90a9555 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a47d250..2fe9af2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index f4bd369..7524ee2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 1fe24e1..712391f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 73f2763..84b9943 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 680c2e0..ef75dfa 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
similarity index 83%
rename from templates/mails/listes.promo.tpl
rename to templates/include/form.valid.gapps-unsuspend.tpl
index c502b20..cd163d3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-{config_load file="mails.conf" section="listes_promo"}
-{if $mail_part eq 'head'}
-{from full=#from#}
-{to addr=#to#}
-{subject text="Création de la liste promo $promo"}
-{elseif $mail_part eq 'text'}
 
-Création de la liste promo {$promo} à faire !
-{/if}
+<tr class="pair">
+  <td class="titre">Motif de la suspension :</td>
+  <td>{$valid->suspension_reason()|default:"-none-"|nl2br}</td>
+</tr>
+
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 90c424e..c9ceb0c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {**************************************************************************}
 
 <tr class="pair">
-  <td class="titre">Adresse litigieuse :</td>
+  <td class="titre">Adresse litigieuse&nbsp;:</td>
   <td>
     {$valid->loginbis}@polytechnique.org
   </td>
 </tr>
 <tr class="pair">
-  <td class="titre">Homonymes :</td>
+  <td class="titre">Homonymes&nbsp;:</td>
   <td>
     {foreach from=$valid->homonymes_forlife item=o}
     <a href='profile/{$o}' class='popup2'>{$o}</a>
index 3805ecb..9777f2d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 46a9298..346a5fb 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 {if $valid->m_relance neq '0000-00-00' && $valid->m_relance neq ''}
   <tr class="pair">
-    <td class="titre">Dernière relance le :</td>
+    <td class="titre">Dernière relance le&nbsp;:</td>
     <td>{$valid->m_relance|date_format}</td>
   </tr>
 {/if}
index a37ded7..86db5df 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 
 <tr class="pair">
-  <td class="titre">Médaille :</td>
+  <td class="titre">Médaille&nbsp;:</td>
   <td>{$valid->medal_name()}</td>
 </tr>
 
index 955875b..38456a4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 1685a5c..8f09dd7 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 0a5acd0..1cc4d8f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 4e895b3..ef3628c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 2952dfd..88f1bbd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 203ce3e..ec4ad5a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index ac68c62..61d6779 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index f37c8fe..4fa451b 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index dc79563..46789da 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index f366b26..2527d2f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e8bd8ff..348a72d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -49,7 +49,7 @@
 {capture name=order}
 {if $plset_count > 1}
 <div>
-  Trier par :
+  Trier par&nbsp;:
   {foreach from=$orders key=name item=sort}
   [
   {if $name eq $order}
index 60190e3..14606ed 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -39,7 +39,7 @@
     <div class="long"> 
      <table cellspacing="0" cellpadding="0"> 
       <tr> 
-        <td class="lt">Expertise :</td> 
+        <td class="lt">Expertise&nbsp;:</td> 
         <td class="rt" colspan="2">{$p.expertise|nl2br}</td> 
       </tr> 
      </table> 
index 97f44c1..1015f5f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index d274923..334fdbf 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 91a0c3e..e49bf6f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index b511363..09bfad5 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -65,13 +65,13 @@ mails de marketing. Une fois inscrits à Polytechnique.org, l'inscription à la
     <tr class="{cycle values="pair,impair"}">
       <td>{$login}</td>
       <td>
-        Camarade :
+        Camarade&nbsp;:
         <select name="mk_uid[{$login}]">
         {iterate from=$it item=user}
           <option value="{$user.user_id}">{$user.prenom} {$user.nom} (X{$user.promo})</option>
         {/iterate}
         </select><br />
-        Action<a href="{$platal->pl_self()}#action_desc">*</a> :
+        Action<a href="{$platal->pl_self()}#action_desc">*</a>&nbsp;:
         <select name="mk_action[{$login}]" onchange="showEmail(this.value, '{$login}');">
           <option value="none">Aucune</option>
           <option value="marketu">Envoyer un mail en ton nom</option>
@@ -79,7 +79,7 @@ mails de marketing. Une fois inscrits à Polytechnique.org, l'inscription à la
           <option value="sub">Lui proposer l'inscription</option>
         </select><br />
         <span id="mk_s_mail[{$login}]" style="display: none">
-          Email : <input type="text" name="mk_email[{$login}]" value="" />
+          Email&nbsp;: <input type="text" name="mk_email[{$login}]" value="" />
         </span>
       </td>
     </tr>
index d81582f..58d0019 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 4b51f26..3b2ae96 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
     <td>
       {if $details.sub>1}
       Tu es inscrit sur la liste.<br />
-      Te désinscrire :
+      Te désinscrire&nbsp;:
       <a href='{$platal->pl_self(1)}?del=1'>{icon name=cross title="me désinscrire"}</a>
       {elseif $details.sub eq 1}
       Ta demande d'inscription est en cours de validation.
       {else}
       Tu n'es pas inscrit.<br />
-      Demander ton inscription :
+      Demander ton inscription&nbsp;:
       <a href="{$platal->pl_self(1)}?add=1">{icon name=add title="demander mon inscription"}</a>
       {/if}
     </td>
index 229715e..fae9304 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 9dfc96b..609b2f8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a1d2938..c9e816f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -34,7 +34,7 @@
 <p>
 N'importe qui peut faire la demande de création d'une mailing-list, il suffit pour cela d'être au
 moins 4 polytechniciens inscrits sur le site, et de fournir les informations suivantes concernant la
-liste :
+liste&nbsp;:
 </p>
 
 <form action='lists/create' method='post'>
@@ -49,17 +49,17 @@ liste :
       </td>
     </tr>
     <tr>
-      <td class='titre'>Sujet (bref) :</td>
+      <td class='titre'>Sujet (bref)&nbsp;:</td>
       <td>
         <input type='text' name='desc' size='50' value="{$smarty.post.desc}" />
       </td>
     </tr>
     <tr>
-      <td class='titre'>Propriétés :</td>
+      <td class='titre'>Propriétés&nbsp;:</td>
       <td>
         <table style='width: 100%'>
           <tr>
-            <td>visibilité :</td>
+            <td>visibilité&nbsp;:</td>
             <td><input type='radio' name='advertise' value='0'
               {if $smarty.post.advertise eq 0 && $smarty.post}checked='checked'{/if} />publique</td>
             <td><input type='radio' name='advertise' value='1'
@@ -67,7 +67,7 @@ liste :
             <td></td>
           </tr>
           <tr>
-            <td>diffusion :</td>
+            <td>diffusion&nbsp;:</td>
             <td><input type='radio' name='modlevel' value='0'
               {if !$smarty.post.modlevel}checked='checked'{/if} />libre</td>
             <td><input type='radio' name='modlevel' value='1'
@@ -76,7 +76,7 @@ liste :
               {if $smarty.post.modlevel eq 2}checked='checked'{/if} />modérée</td>
           </tr>
           <tr>
-            <td>inscription :</td>
+            <td>inscription&nbsp;:</td>
             <td><input type='radio' name='inslevel' value='0'
               {if $smarty.post.inslevel eq 0 && $smarty.post}checked='checked'{/if} />libre</td>
             <td><input type='radio' name='inslevel' value='1'
@@ -116,7 +116,7 @@ liste :
   <p>
   La création de la liste sera soumise à un contrôle manuel avant d'être validée. Ce contrôle a
   pour but notamment de vérifier qu'il n'y aura pas ambiguité entre les membres de la liste et son
-  identité. Exemple : n'importe qui ne peut pas ouvrir pointgamma@polytechnique.org, il ne suffit
+  identité. Exemple&nbsp;: n'importe qui ne peut pas ouvrir pointgamma@polytechnique.org, il ne suffit
   pas d'être le premier à le demander.
   </p>
   <p>
index 8870961..0c7b69d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -45,7 +45,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     <tr class='impair'>
       <td>
         Veux tu réellement détruire la liste {$details.addr} ?<br />
-        Pour valider ton choix, écris en majuscules (sans espace) « OUI » :
+        Pour valider ton choix, écris en majuscules (sans espace) « OUI »&nbsp;:
         <input type='text' size='3' maxlength='3' name="valid" />
       </td>
     </tr>
index d5b4e2d..8e64aa8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -27,7 +27,7 @@
     </td>
   </tr>
   <tr>
-    <td><strong>Liste {$platal->argv[1]} :</strong></td>
+    <td><strong>Liste {$platal->argv[1]}&nbsp;:</strong></td>
     <td>
       {if $on neq members}
       [<a href='{$platal->ns}lists/members/{$platal->argv[1]}'>liste des membres</a>]
@@ -48,7 +48,7 @@
   </tr>
   {if $details.own || hasPerms('admin,groupadmin')}
   <tr>
-    <td><strong>Administrer la liste :</strong></td>
+    <td><strong>Administrer la liste&nbsp;:</strong></td>
     <td>
       {if $on neq moderate}
       [<a href='{$platal->ns}lists/moderate/{$platal->argv[1]}'>modération</a>]
@@ -76,7 +76,7 @@
   {if hasPerms('admin,groupadmin')}
 
   <tr>
-    <td><strong>Administrer (avancé) :</strong></td>
+    <td><strong>Administrer (avancé)&nbsp;:</strong></td>
     <td>
       {if $on neq soptions}
       [<a href='{$platal->ns}lists/soptions/{$platal->argv[1]}'>options avancées</a>]
index d5d5f2a..731a570 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 <h2>La diffusion sur une liste de diffusion</h2>
 <p>
-La diffusion a trois niveaux de modération.  La diffusion peut être :
+La diffusion a trois niveaux de modération.  La diffusion peut être&nbsp;:
 </p>
 <ul>
-  <li><strong>libre :</strong> tout le monde peut y envoyer des mails, la diffusion y est
+  <li><strong>libre&nbsp;:</strong> tout le monde peut y envoyer des mails, la diffusion y est
   immédiate&nbsp;;</li>
-  <li><strong>restreinte :</strong> les membres de la liste peuvent envoyer librement des mails,
+  <li><strong>restreinte&nbsp;:</strong> les membres de la liste peuvent envoyer librement des mails,
   les extérieurs sont modérés&nbsp;;</li>
-  <li><strong>modérée :</strong> l'envoi d'un mail à la liste est alors filtré par des
+  <li><strong>modérée&nbsp;:</strong> l'envoi d'un mail à la liste est alors filtré par des
   modérateurs, eux seuls peuvent accepter un message envoyé à la liste.</li>
 </ul>
 
@@ -78,7 +78,7 @@ thématique particulière.
 {assign var="has_private" value=false}
 {include file='lists/listes.inc.tpl' lists=$member}
 
-<p class="smaller">Attention : lorsqu'une liste à laquelle tu es abonné est privée, l'icône {icon name=weather_cloudy} est affichée en début de ligne. Si tu t'en désinscris, il ne te sera pas possible de t'y abonner de nouveau sans l'action d'un modérateur.</p>
+<p class="smaller">Attention&nbsp;: lorsqu'une liste à laquelle tu es abonné est privée, l'icône {icon name=weather_cloudy} est affichée en début de ligne. Si tu t'en désinscris, il ne te sera pas possible de t'y abonner de nouveau sans l'action d'un modérateur.</p>
 {/if}
 <h1>Listes de diffusion publiques auxquelles tu peux t'inscrire</h1>
 
@@ -98,7 +98,7 @@ Les listes de diffusion publiques sont visibles par tous les X inscrits à Polyt
       <th colspan='2'>Inscription à une liste de diffusion promo</th>
     </tr>
     <tr>
-      <td class='titre'>Promotion :</td>
+      <td class='titre'>Promotion&nbsp;:</td>
       <td>
         <input type='text' size='4' maxlength='4' name='promo_add' />
         &nbsp;
index d4d3d10..a6ae99e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
         onclick="return (is_IE || Ajax.update_html('list_{$liste.list}', '{$platal->ns}lists/ajax/{$liste.list}?mid={$m.id}&amp;mdel=1'));">
       {icon name=delete title="Spam"}
     </a>
-    De : {$m.sender}<br />
+    De&nbsp;: {$m.sender}<br />
     <a href='{$platal->ns}lists/moderate/{$liste.list}?mid={$m.id}'>
       {icon name=magnifier title="Voir le message"}
     </a>
-    Sujet : {$m.subj|hdc|smarty:nodefaults|default:"[pas de sujet]"}<br />
+    Sujet&nbsp;: {$m.subj|hdc|smarty:nodefaults|default:"[pas de sujet]"}<br />
   {/foreach}
   </span>
   {/if}
index e12bcac..71cec2b 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 884c427..9b6a851 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
     <td>
       {if $details.sub>1}
       Tu es inscrit sur la liste.<br />
-      Te désinscrire :
+      Te désinscrire&nbsp;:
       <a href='{$platal->pl_self(1)}?del=1'>{icon name=cross title="me désinsiscrire"}</a>
       {elseif $details.sub eq 1}
       Ta demande d'inscription est en cours de validation.
       {else}
       Tu n'es pas inscrit.<br />
-      Demander ton inscription :
+      Demander ton inscription&nbsp;:
       <a href="{$platal->pl_self(1)}?add=1">{icon name=add title="demander mon inscription"}</a>
       {/if}
     </td>
@@ -95,6 +95,7 @@
     </td>
     <td>
       {if $promo && strpos($x.l, '@') === false}
+      {if $x.b}<a href="marketing/broken/{$x.l}">{icon name=error}</a>{/if}
       <a href="profile/{$x.l}" class="popup2">{$x.n}</a>
       {elseif $x.x}
       <a href="{$platal->ns}member/{$x.x}">{$x.n}</a>
     </td>
     <td>
       {if $promo && strpos($x.l, '@') === false}
+      {if $x.b}<a href="marketing/broken/{$x.l}">{icon name=error}</a>{/if}
       <a href="profile/{$x.l}" class="popup2">{$x.n}</a>
       {elseif $x.x}
       <a href="{$platal->ns}member/{$x.x}">{$x.n}</a>
index 1c7c78d..6243b85 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 166c88e..bf5cc59 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -34,7 +34,7 @@
       <th class='titre'>Modérer le mail</th>
     </tr>
     <tr>
-      <td>raison (pour les refus) :
+      <td>raison (pour les refus)&nbsp;:
         <textarea cols='50' rows='10' name='reason' id='raison'>
 -- 
 {$smarty.session.prenom} {$smarty.session.nom} (X{$smarty.session.promo})
@@ -62,7 +62,7 @@
   </ul>
 </form>
 <p>
-En cas de refus, le mail envoyé à l'auteur du mail que tu modères actuellement sera de la forme suivante :
+En cas de refus, le mail envoyé à l'auteur du mail que tu modères actuellement sera de la forme suivante&nbsp;:
 </p>
 <pre>{$msg|utf8_encode}</pre>
 
index 17cc7d7..f0a6c85 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -25,7 +25,7 @@
 <form method='post' action='{$platal->pl_self(1)}'>
   <table class='tinybicol' cellpadding='0' cellspacing='0'>
     <tr>
-      <th class='titre'>refuser l'inscription de :</th>
+      <th class='titre'>refuser l'inscription de&nbsp;:</th>
     </tr>
     <tr>
       <td>{$del_user.name}</td>
index c8b6fa3..e30ddc8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -38,7 +38,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     <tr><th colspan='2'>Options de la liste {$details.addr}</th></tr>
     <tr class='impair'>
       <td>
-        <strong>description courte :</strong><br />
+        <strong>description courte&nbsp;:</strong><br />
         <span class='smaller'>une courte phrase pour décrire la liste.</span>
       </td>
       <td>
@@ -47,7 +47,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='impair'>
       <td>
-        <strong>description longue :</strong><br />
+        <strong>description longue&nbsp;:</strong><br />
         <span class='smaller'>une description plus longue de la liste.</span>
       </td>
       <td>
@@ -56,7 +56,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='pair'>
       <td>
-        <strong>message de bienvenue :</strong><br />
+        <strong>message de bienvenue&nbsp;:</strong><br />
         <span class='smaller'>un texte de bienvenue incorporé au mail envoyé aux nouveaux
          abonnés à la liste.</span>
       </td>
@@ -66,7 +66,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='impair'>
       <td>
-        <strong>message d'adieu :</strong><br />
+        <strong>message d'adieu&nbsp;:</strong><br />
         <span class='smaller'>un texte d'au revoir incorporé au mail de départ envoyé aux
           utilisateurs qui se désinscrivent.  Ce mail peut être désactivé.</span>
       </td>
@@ -79,7 +79,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     <tr><th colspan='2'>Options avancées de la liste {$details.addr}</th></tr>
     <tr class='impair'>
     <td>
-        <strong>ajout dans le sujet :</strong><br />
+        <strong>ajout dans le sujet&nbsp;:</strong><br />
         <span class='smaller'>Un préfixe (optionnel) ajouté dans le sujet de chaque mail envoyé sur la liste te permet de trier plus facilement ton courrier.</span>
       </td>
       <td>
@@ -88,7 +88,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='impair'>
       <td>
-        <strong>notification de (dés)abonnement :</strong><br />
+        <strong>notification de (dés)abonnement&nbsp;:</strong><br />
         <span class='smaller'>notifier les modérateurs des inscriptions/désinscriptions d'utilisateurs sur cette liste.</span>
       </td>
       <td>
@@ -98,7 +98,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='impair'>
       <td>
-        <strong>diffusion :</strong>
+        <strong>diffusion&nbsp;:</strong>
       </td>
       <td>
         <input type='radio' name='moderate' value='0'
@@ -114,7 +114,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='impair'>
       <td>
-        <strong>inscription libre ou modérée :</strong><br />
+        <strong>inscription libre ou modérée&nbsp;:</strong><br />
         <span class='smaller'>détermine si les inscriptions à la liste sont modérées ou non.</span>
       </td>
       <td>
@@ -124,7 +124,7 @@ Tu n'es pas administrateur de la liste, mais du site.
     </tr>
     <tr class='impair'>
       <td>
-        <strong>antispam :</strong><br />
+        <strong>antispam&nbsp;:</strong><br />
         <span class='smaller'>détermine la politique de l'antispam sur cette liste.</span>
       </td>
       <td>
@@ -158,7 +158,7 @@ Les envois des personnes utilisant ces adresses ne sont pas modérés.
 </p>
 
 <p class='erreur'>
-Attention, cette liste est à utiliser pour des non-X ou des non-inscrits à la liste :
+Attention, cette liste est à utiliser pour des non-X ou des non-inscrits à la liste&nbsp;:
 </p>
 <p>
 les X inscrits à la liste doivent ajouter leurs adresses usuelles parmis leurs adresses de
index afbcc90..6ec4f38 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -32,7 +32,7 @@
     <tr><th colspan='2'>Options de la liste {$details.addr}</th></tr>
     <tr class='impair'>
       <td>
-        <strong>msg_header :</strong><br />
+        <strong>msg_header&nbsp;:</strong><br />
         <span class='smaller'>ajouté au début de tous les messages.</span>
       </td>
       <td>
@@ -41,7 +41,7 @@
     </tr>
     <tr class='impair'>
       <td>
-        <strong>msg_footer :</strong><br />
+        <strong>msg_footer&nbsp;:</strong><br />
         <span class='smaller'>ajouté à la fin de tous les messages.</span>
       </td>
       <td>
@@ -51,7 +51,7 @@
     <tr><th colspan='2'>Options avancées de la liste {$details.addr}</th></tr>
     <tr class='impair'>
       <td>
-        <strong>visibilité :</strong><br />
+        <strong>visibilité&nbsp;:</strong><br />
         <span class='smaller'>si coché, la liste sera listée dans la page de l'ensemble des listes.
           (les listes d'admin doivent être décochées)</span>
       </td>
@@ -62,7 +62,7 @@
     </tr>
     <tr class='pair'>
       <td>
-        <strong>archive :</strong><br />
+        <strong>archive&nbsp;:</strong><br />
         <span class='smaller'>Liste archivée ?</span>
       </td>
       <td>
@@ -72,7 +72,7 @@
     </tr>
     <tr class='impair'>
       <td>
-        <strong>max_message_size :</strong><br />
+        <strong>max_message_size&nbsp;:</strong><br />
         <span class='smaller'>Taille maximale des posts en Ko:</span>
       </td>
       <td>
index 80266d5..330e8a4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
   <table class="bicol" summary="Fiche camarade">
     <tr><th colspan="2">Proposition d'adresse pour<br />{$user.nom} {$user.prenom} (X{$user.promo})</th></tr>
     <tr class="pair">
-      <td>Adresse email :</td>
+      <td>Adresse email&nbsp;:</td>
       <td>
         <input type="text" name="mail" size="30" maxlength="50" value="{$smarty.post.mail}" />
       </td>
     </tr>
     {if $user.email}
     <tr class="impair">
-      <td>Explication :</td>
+      <td>Explication&nbsp;:</td>
       <td><textarea name="comment" cols="50" rows="4">{$smarty.post.comment}</textarea></td>
     </tr>
     {/if}
index d11eb5f..692c963 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <br />
 
 <p>
-Nombre d'X vivants d'après notre base de données : {$stats.vivants}<br />
-Nombre d'X vivants inscrits à Polytechnique.org : {$stats.inscrits}<br />
-Soit un pourcentage d'inscrits de : {$stats.ins_rate} %<br />
+Nombre d'X vivants d'après notre base de données&nbsp;: {$stats.vivants}<br />
+Nombre d'X vivants inscrits à Polytechnique.org&nbsp;: {$stats.inscrits}<br />
+Soit un pourcentage d'inscrits de&nbsp;: {$stats.ins_rate} %<br />
 </p>
 
 <p>
-Parmi ceux-ci :<br />
-Nombre d'X vivants depuis 1972 d'après notre base de données : {$stats.vivants72}<br />
-Nombre d'X vivants depuis 1972 inscrits à Polytechnique.org : {$stats.inscrits72}<br />
-Soit un pourcentage d'inscrits de : {$stats.ins72_rate} % <br />
+Parmi ceux-ci&nbsp;:<br />
+Nombre d'X vivants depuis 1972 d'après notre base de données&nbsp;: {$stats.vivants72}<br />
+Nombre d'X vivants depuis 1972 inscrits à Polytechnique.org&nbsp;: {$stats.inscrits72}<br />
+Soit un pourcentage d'inscrits de&nbsp;: {$stats.ins72_rate} % <br />
 </p>
 
 <p>
-Nombre de Polytechniciennes vivantes : {$stats.vivantes}<br />
-Nombre de Polytechniciennes vivantes et inscrites : {$stats.inscrites} <br />
-Soit un pourcentage d'inscrites de : {$stats.inse_rate} % <br />
+Nombre de Polytechniciennes vivantes&nbsp;: {$stats.vivantes}<br />
+Nombre de Polytechniciennes vivantes et inscrites&nbsp;: {$stats.inscrites} <br />
+Soit un pourcentage d'inscrites de&nbsp;: {$stats.inse_rate} % <br />
 </p>
 
 <p>
-Nombre d'<a href="marketing/this_week">inscrits ces 7 derniers jours</a> : {$nbInsSem}<br />
-Nombre d'<a href="marketing/relance">inscriptions en cours</a> (2ème phase non terminée) : {$nbInsEnCours} <br />
-Nombre d'envois marketing effectués n'ayant pas abouti : {$nbInsMarket}<br />
-Nombre d'envois marketing ayant abouti cette semaine : {$nbInsMarkOK}
+Nombre d'<a href="marketing/this_week">inscrits ces 7 derniers jours</a>&nbsp;: {$nbInsSem}<br />
+Nombre d'<a href="marketing/relance">inscriptions en cours</a> (2ème phase non terminée)&nbsp;: {$nbInsEnCours} <br />
+Nombre d'envois marketing effectués n'ayant pas abouti&nbsp;: {$nbInsMarket}<br />
+Nombre d'envois marketing ayant abouti cette semaine&nbsp;: {$nbInsMarkOK}
 </p>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
similarity index 90%
rename from templates/marketing/mail.marketing.tpl
rename to templates/marketing/marketing.mail.tpl
index cdd9581..ea7f0de 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -27,7 +27,7 @@
 {#globals.baseurl#}/register/%%hash%%
 ==========================================================
 
-Il ne te faut que 5 minutes sur https://www.polytechnique.org/ pour rejoindre la communauté polytechnicienne sur le web grâce aux services de Polytechnique.org dont profitent déjà {$num_users} camarades. Cela te permettera, entre autres, de contacter un X en connaissant seulement son nom et son prénom et de bénéficier à vie d'une adresse prestigieuse {$u.forlife}@polytechnique.org et de son alias discret {$u.forlife}@m4x.org (m4x = mail for X).
+Il ne te faut que 5 minutes sur https://www.polytechnique.org/ pour rejoindre la communauté polytechnicienne sur le web grâce aux services de Polytechnique.org dont profitent déjà {$num_users} camarades. Cela te permettra, entre autres, de contacter un X en connaissant seulement son nom et son prénom et de bénéficier à vie d'une adresse prestigieuse {$u.forlife}@polytechnique.org et de son alias discret {$u.forlife}@m4x.org (m4x = mail for X).
 
 Pas de nouvelle boîte aux lettres à relever, il suffit de la rediriger vers ton adresse personnelle et/ou professionnelle que tu indiques et que tu peux changer à ta guise, sans que tes correspondants n'aient à actualiser leur carnet d'adresses.
 
index c74cba1..b09926c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 <h2>Matricules</h2>
 
-Matricule polytechnique.org : {$matricule}
+Matricule polytechnique.org&nbsp;: {$matricule}
 {if $matricule_X}
 <br />
-Matricule &Eacute;cole (à rentrer lors de l'inscription) : <strong>{$matricule_X}</strong>
+Matricule &Eacute;cole (à rentrer lors de l'inscription)&nbsp;: <strong>{$matricule_X}</strong>
 {/if}
 
 {if $pending}
index b87c3d8..c887968 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -60,7 +60,7 @@
         {if $it.dern_rel && $it.dern_rel != '0000-00-00'}
         Relance le: {$it.dern_rel}
         {elseif $it.email}
-        En cours : {$it.email}
+        En cours&nbsp;: {$it.email}
         {else}
         -
         {/if}
index 17564b9..34f98f4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -75,17 +75,17 @@ peut sans aucun doute l'aider à se décider !
 
 <form method="post" action="{$platal->path}">
   <table class="bicol" summary="Fiche camarade">
-    <tr class="impair"><td>Nom :</td><td>{$nom}</td></tr>
-    <tr class="pair"><td>Prénom :</td><td>{$prenom}</td></tr>
-    <tr class="impair"><td>Promo :</td><td>{$promo}</td></tr>
+    <tr class="impair"><td>Nom&nbsp;:</td><td>{$nom}</td></tr>
+    <tr class="pair"><td>Prénom&nbsp;:</td><td>{$prenom}</td></tr>
+    <tr class="impair"><td>Promo&nbsp;:</td><td>{$promo}</td></tr>
     <tr class="pair">
-      <td>Adresse email :</td>
+      <td>Adresse email&nbsp;:</td>
       <td>
         <input type="text" name="mail" size="30" maxlength="50" />
       </td>
     </tr>
     <tr class="impair">
-      <td>Nous lui écrirons :</td>
+      <td>Nous lui écrirons&nbsp;:</td>
       <td>
         <input type="radio" name="origine" value="user" checked="checked" /> en ton nom<br />
         <input type="radio" name="origine" value="staff" /> au nom de l'équipe Polytechnique.org
similarity index 97%
rename from templates/marketing/mail.relance.tpl
rename to templates/marketing/relance.mail.tpl
index ada168a..d682032 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 277f99f..2fe9508 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 5747a28..946a8ce 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 5146c96..3195411 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -23,7 +23,7 @@
 <h1>Marketing volontaire</h1>
 
 <p>
-Choix de la promo :
+Choix de la promo&nbsp;:
 </p>
 <p>
 {foreach from=$promos item=p}
index 0c2d8c4..ccf6a48 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index fbbd359..ce58eea 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -52,7 +52,7 @@
       </td>
       <td>
         <input type='text' size='16' name='shortname' value="{$nl->_shortname}" />
-        <span class="smaller">(Ex : 2006-06 pour la NL de juin 2006)</span>
+        <span class="smaller">(Ex&nbsp;: 2006-06 pour la NL de juin 2006)</span>
       </td>
     </tr>
     <tr>
     <td>
       Créer un nouvel article ...
     </td>
-    <td style='vertical-align:middle; border-left: 1px gray solid'>
-      [<a href="admin/newsletter/edit/{$nl->_id}/new#edit">créer</a>]
+    <td style='vertical-align:middle; border-left: 1px gray solid' class="center">
+      <a href="admin/newsletter/edit/{$nl->_id}/new#edit">{icon name=add title="créer"}</a>
     </td>
   </tr>
   {foreach from=$nl->_arts item=arts key=cat}
   {foreach from=$arts item=art}
   <tr class="{cycle values="impair,pair"}">
     <td>
-      <pre>{$art->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)|smarty:nodefaults}</pre>
+      <pre>{$art->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)}</pre>
     </td>
     <td style='vertical-align:middle; border-left: 1px gray solid'>
-      <strong>Pos: {$art->_pos}</strong><br />
-      [<a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit">edit</a>]<br />
-      [<a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/delete">delete</a>]
+      <small><strong>Pos: {$art->_pos}</strong></small><br />
+      <a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit">{icon name="page_edit" title="Editer"}</a>
+      <a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/delete">{icon name="delete" title="Supprimer"}</a>
     </td>
   </tr>
   {/foreach}
index c6653a9..72b3a8f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
similarity index 98%
rename from templates/newsletter/nl.tpl
rename to templates/newsletter/nl.mail.tpl
index 8649a13..a9771cf 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 3d5fcc5..8cb9332 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -47,7 +47,7 @@
   <tr><th>{$nl->title(true)}</th></tr>
   <tr>
     <td>
-      {include file="newsletter/nl.tpl"}
+      {include file="newsletter/nl.mail.tpl"}
     </td>
   </tr>
 </table>
index 6c76b9e..5d3dbb9 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index c354c6b..834c768 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -102,12 +102,6 @@ function payment_submit(form)
 </script>
 
 <form method="post" action="{$platal->pl_self()}">
-  <p> Si tu ne souhaites pas utiliser notre interface de
-  télépaiement, tu peux virer directement la somme de ton choix sur notre compte
-  <strong>30004 00314 00010016782 60</strong>. Nous veillerons à ce que ton paiement parvienne à
-  son destinataire.  Pense toutefois à le préciser dans le motif du
-  versement.
-  <br /><br />
   </p>
   <table class="bicol">
     <tr>
@@ -157,7 +151,7 @@ function payment_submit(form)
 </form>
 
 {if $transactions}
-<p class="descr">Tu as déjà effectué des paiements pour cette transaction :</p>
+<p class="descr">Tu as déjà effectué des paiements pour cette transaction&nbsp;:</p>
 <table class="bicol">
 <tr><th>Date</th><th>Montant</th></tr>
 {iterate from=$transactions item=t}
index 8b9dc35..40df8fe 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -21,7 +21,7 @@
 {**************************************************************************}
 
 
-<h1>Télépaiments</h1>
+<h1>Télépaiements</h1>
 
 {if $erreur}
 <p>Aucun paiement n'a été effectué.</p>
index 076c1fa..ebcd950 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Gestion des télépaiements </h1>
+<h1>{$asso.nom}&nbsp;: Gestion des télépaiements </h1>
 
 <p class="descr">
-Voici la liste des paiements en ligne possible pour le groupe {$asso.nom}
+Voici la liste des paiements en ligne possible pour le groupe {$asso.nom} :
 </p>
 
 {foreach from=$titres item=p}
@@ -48,7 +48,7 @@ Voici la liste des paiements en ligne possible pour le groupe {$asso.nom}
       {elseif $ev.topay eq $ev.paid}
       Tu as déjà réglé l'intégralité de ton inscription ({$ev.topay}&euro;).
       {else}
-      Tu as réglé {$ev.paid}&euro; alors que tu n'en devais que {$ev.topay}&euro;
+      Tu as réglé {$ev.paid}&euro; alors que tu n'en devais que {$ev.topay}&euro;.
       {/if}
     {else}
     <a href="{$platal->ns}events/sub/{$ev.eid}">Tu peux t'inscire à cet événement.</a>
@@ -127,7 +127,7 @@ Voici la liste des paiements en ligne possible pour le groupe {$asso.nom}
   </tr>
   {elseif $smarty.foreach.people.first}
   <tr>
-    <td colspan="6" class="center">Personne n'a encore payé pour ce télépaiement</td>
+    <td colspan="6" class="center">Personne n'a encore payé pour ce télépaiement.</td>
   </tr>
   {else}
   <tr class="pair">
index 38e1927..df4bf67 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
     pw1 = document.forms.smtppass_form.smtppass1.value;
     pw2 = document.forms.smtppass_form.smtppass2.value;
     if (pw1 != pw2) {
-      alert ("\nErreur : les deux champs ne sont pas identiques !");
+      alert ("\nErreur&nbsp;: les deux champs ne sont pas identiques !");
       exit;
       return false;
     }
     if (pw1.length < 6) {
-      alert ("\nErreur : le nouveau mot de passe doit faire au moins 6 caractères !");
+      alert ("\nErreur&nbsp;: le nouveau mot de passe doit faire au moins 6 caractères !");
       exit;
       return false;
     }
@@ -65,7 +65,7 @@
   <table class="tinybicol" cellpadding="3" summary="Définition du mot de passe">
     <tr>
       <td class="titre">
-        Mot de passe (15 caractères maximum) :
+        Mot de passe (15 caractères maximum)&nbsp;:
       </td>
       <td>
         <input type="password" size="15" maxlength="15" name="smtppass1" />
@@ -73,7 +73,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Retape-le une fois (pour vérification) :
+        Retape-le une fois (pour vérification)&nbsp;:
       </td>
       <td>
         <input type="password" size="15" maxlength="15" name="smtppass2" />
index 67008f6..e5574be 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 46079c2..1542b68 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index b0f0808..c7968ff 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 </form>
 
 {else}
-En voici les adresses :
+En voici les adresses&nbsp;:
 <ul>
   <li>
-  Anonces sur la page d'entrée :
-  <a href='rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml'>{icon name=feed title='fil rss'}</a>
+  Anonces sur la page d'entrée&nbsp;:
+  <a href="rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" title="Annonces">{icon name=feed title='fil rss'}</a>
   </li>
   <li>
-  Ton carnet polytechnicien :
-  <a href='carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml'>{icon name=feed title='fil rss'}</a>
+  Ton carnet polytechnicien&nbsp;:
+  <a href="carnet/rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
   </li>
 </ul>
 <p>
index 11b4bbf..1230abf 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -67,7 +67,7 @@
 
 <br />
 
-<p><strong>Dans tous les cas,</strong> vous pouvez :</p>
+<p><strong>Dans tous les cas,</strong> vous pouvez&nbsp;:</p>
 <ul>
   <li class="spaced">
     <strong><a href="search"> rechercher un ancien élève ou un
index fe76f13..44dd82e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 1681812..6bd037b 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -44,7 +44,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Nouveau mot de passe :
+        Nouveau mot de passe&nbsp;:
       </td>
       <td>
         <input type="password" size="10" maxlength="10" name="nouveau" />
@@ -52,7 +52,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Retape-le une fois :
+        Retape-le une fois&nbsp;:
       </td>
       <td>
         <input type="password" size="10" maxlength="10" name="nouveau2" />
index 6def596..ba93ab2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 30925e5..b025472 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -73,7 +73,7 @@ Si tu n'accèdes pas à ton mail dans les 6 heures, sollicite un nouveau certifi
     </tr>
     <tr>
       <td class="titre">
-        Login :<br />
+        Login&nbsp;:<br />
         <span class="smaller">"prenom.nom" ou "prenom.nom.promo"</span>
       </td>
       <td>
@@ -82,7 +82,7 @@ Si tu n'accèdes pas à ton mail dans les 6 heures, sollicite un nouveau certifi
     </tr>
     <tr>
       <td class="titre">
-        Date de naissance :<br />
+        Date de naissance&nbsp;:<br />
         <span class="smaller">format JJMMAAAA soit 01032000<br />pour 1<sup>er</sup> mars 2000</span>
       </td>
       <td>
@@ -91,7 +91,7 @@ Si tu n'accèdes pas à ton mail dans les 6 heures, sollicite un nouveau certifi
     </tr>
     <tr>
       <td class="titre">
-        Adresse électronique : <span class="smaller">(facultatif)</span>
+        Adresse électronique&nbsp;: <span class="smaller">(facultatif)</span>
       </td>
       <td>
         <input type="text" size="20" maxlength="50" name="email" />
index 1b91280..3e0b48d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 574ad23..08a8eb4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -25,7 +25,7 @@
 <p>
 Tu n'aimes pas les couleurs ou l'apparence de {#globals.core.sitename#} ? Normal, les goûts et les
 couleurs, ça ne se discute pas. Certains préfèrent une page sérieuse, d'autres plus
-fantaisiste. A toi de voir :)
+fantaisiste. A toi de voir&nbsp;:)
 </p>
 <p>
 Note aux utilisateurs du navigateur Netscape 4.x ou équivalent.
index 69a1c18..e91eead 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 442f58b..6d3da9c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 9f69ac3..722ebd8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index b7fe9a1..c3c29c8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 36d9672..c0b7287 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 0939b09..60c0391 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 250922c..810a3af 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a0237b5..83cbfba 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 10cc795..dba4c05 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e6eb14e..6cf8339 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 32de043..33226f6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
diff --git a/templates/profile/edit.tpl b/templates/profile/edit.tpl
deleted file mode 100644 (file)
index 64b78bc..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-{**************************************************************************}
-{*                                                                        *}
-{*  Copyright (C) 2003-2007 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 $etat_naissance}
-{include file="profil/naissance.tpl"}
-{/if}
-{if $etat_naissance == '' || $etat_naissance == 'ok'}
-
-{foreach from=$errs item=e}
-<p class="erreur">{$e}</p>
-{/foreach}
-
-<p>
-Tu peux consulter <a href="profile/{$smarty.session.forlife}" class="popup2">l'état actuel de ta fiche</a>
-telle qu'elle apparaîtra pour un camarade, ou telle qu'elle apparaîtra dans l'annuaire de
-l'<a href="profile/{$smarty.session.forlife}?view=ax" class="popup2">AX</a>
-ou à <a href="profile/{$smarty.session.forlife}?view=public" class="popup2">tout le monde</a>.</p>
-
-<form action="profile/edit/{$onglet}" method="post" id="prof_annu">
-  <table class="cadre_a_onglet" cellpadding="0" cellspacing="0" style="width: 98%; margin-left:1%;">
-    <tr>
-      <td>
-        <ul id='onglet'>
-          {foreach from=$onglets key=o item=i}
-          {if $o eq $onglet}
-          <li class="actif">{$i|nl2br}</li>
-          {else}
-          <li><a href="profile/edit/{$o}">{$i|nl2br}</a></li>
-          {/if}
-          {/foreach}
-        </ul>
-        <input type="hidden" value="" name="adresse_flag" />
-      </td>
-    </tr>
-    <tr>
-      <td class="conteneur_tab">
-        <table style="width:100%">
-          <tr>
-            <td colspan="2">
-              {include file=$onglet_tpl}
-            </td>
-          </tr>
-          <tr class="center">
-            <td>
-              <input type="submit" value="Valider ces modifications" name="modifier" />
-            </td>
-            <td>
-              <input type="submit" value="Valider et passer au prochain onglet" name="suivant" />
-            </td>
-          </tr>
-        </table>
-      </td>
-    </tr>
-  </table>
-</form>
-{/if}
-
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 5155351..44e4e16 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
   {if $expertise != '' || $secteurs|count || $pays|count }
   <div id="part">
-    <h2>Informations de référent :</h2>
+    <h2>Informations de référent&nbsp;:</h2>
     {if $expertise}
     <div class="rubrique_referent">
-      <em>Expertise : </em><br />
+      <em>Expertise&nbsp;: </em><br />
       <span>{$expertise|nl2br}</span>
     </div>
     {/if}
     {if $secteurs|count}
     <div class="rubrique_referent">
-      <em>Secteurs :</em><br />
+      <em>Secteurs&nbsp;:</em><br />
       <ul>
         {foreach from=$secteurs item="secteur" key="i"}
         <li>{$secteur}{if $ss_secteurs.$i != ''} ({$ss_secteurs.$i}){/if}</li>
@@ -52,7 +52,7 @@
     {/if}
     {if $pays|count}
     <div class="rubrique_referent">
-      <em>Pays :</em>
+      <em>Pays&nbsp;:</em>
       <ul>
         {foreach from=$pays item="pays_i"}
         <li>{$pays_i}</li>
@@ -68,7 +68,7 @@
     {foreach from=$adr_pro item="address" key="i"}
     <h2>{$address.entreprise}</h2>
     {include file="include/emploi.tpl" address=$address}
-    {include file="geoloc/address.tpl" address=$address titre="Adresse : " for=$address.entreprise}
+    {include file="geoloc/address.tpl" address=$address titre="Adresse&nbsp;: " for=$address.entreprise}
 
     <div class="spacer">&nbsp;</div>
   {/foreach}
@@ -76,7 +76,7 @@
 
   {if $cv}
   <div class="part">
-    <h2>Curriculum Vitae : </h2>
+    <h2>Curriculum Vitae&nbsp;: </h2>
     <div style="padding: 0 2ex">{$cv|smarty:nodefaults}</div>
   </div>
   {/if}
index 37ca92d..ebde068 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -21,7 +21,7 @@
 {**************************************************************************}
 
 <table class="bicol" style="margin-bottom: 1em"
-  summary="Profil : Informations générales">
+  summary="Profil&nbsp;: Informations générales">
   <tr>
     <th colspan="2">
       <div class="flags" style="float: left">
 
 {if !$no_private_key}
 <table class="bicol"  style="margin-bottom: 1em"
-  summary="Profil : Informations générales">
+  summary="Profil&nbsp;: Informations générales">
   <tr>
     <th>
       Synchronisation avec l'AX
index 57ac91d..d674f0c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 2e25072..5861ded 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 5f76ed4..29829cd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
   </tr>
   {if $mygroups->total()}
   <tr class="pair">
-    <td colspan="2">Tu es actuellement dans les groupes suivants :</td>
+    <td colspan="2">Tu es actuellement dans les groupes suivants&nbsp;:</td>
   </tr>
   {/if}
   {assign var=grp_admin value=false}
index 2ebfe7b..b4e5f3a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -72,7 +72,7 @@
     <tr>
       <td class="titre">Sous-Secteur d'activité</td>
       <td id="{$jobid}_ss_secteur">
-        <input type="hidden" name="{$jobpref}[ss_secteur]" value="{$job.ss_secteur|default='-1'}" />
+        <input type="hidden" name="{$jobpref}[ss_secteur]" value="{$job.ss_secteur|default:'-1'}" />
       </td> 
     </tr>
     <tr>
index dac620c..5a22d5a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 759221d..3bfa587 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 69943b2..1944c38 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
     <td id="countries">
       {foreach from=$countries item=country key=i}
       <div id="countries_{$i}" style="clear: both; margin-bottom: 0.7em">
-        <div style="float: left; width: 50%">{$country}</div>
+        <a style="display: block; float: right"
+           href="javascript:removeCountry('{$i}')">{icon name=cross title="Supprimer ce pays"}</a>
+        <div class="titre">{$country}</div>
         <input type="hidden" name="countries[{$i}]" value="{$country}" />
-        <a href="javascript:removeCountry('{$i}')">{icon name=cross title="Supprimer ce pays"}</a>
       </div>
       {/foreach}
     </td>
         <a href="javascript:removeSecteur('{$s}', '{$ss}')" style="display: block; float: right">
           {icon name=cross title="Supprimer ce secteur"}
         </a>
-        <input type="hidden" name="secteurs[' + s + '][' + ss + ']" value="{$ss_sect}" />
+        <input type="hidden" name="secteurs[{$s}][{$ss}]" value="{$ss_sect}" />
         {$ss_sect}
       </div>
       {/foreach}
index 92960d2..9b813df 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -114,7 +114,7 @@ utiliser une adresse personnalisée, il faut se tourner vers
             <input type="radio" name="reason" value="divorce" id="reason_div" onclick="this.form.other_reason.value=''" /><label for="reason_div">Divorce</label><br />
           {/if}
           <input type="radio" name="reason" value="raccourci" id="reason_rac" onclick="this.form.other_reason.value=''" /><label for="reason_rac">Nom d'état civil simplifié, le nom officiel étant trop long</label><br />
-          <input type="radio" name="reason" value="other" id="reason_oth" /><label for="reason_oth">Autre :</label><br />
+          <input type="radio" name="reason" value="other" id="reason_oth" /><label for="reason_oth">Autre&nbsp;:</label><br />
           <input type="text" name="other_reason" onfocus="document.getElementById('reason_oth').checked='checked'" size="60" />
         </td>
       </tr>
index ae08eff..fac9b52 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 43c3e9b..24b7972 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -39,29 +39,31 @@ function chgMainWinLoc(strPage)
 //]]></script>
 {/literal}
 
-{if $logged and $x.forlife eq $smarty.session.forlife}
-[<a href="javascript:chgMainWinLoc('profile/edit')">Modifier ma fiche</a>]
-{/if}
-
 <div id="fiche">
   <div id="photo" class="part">
     {if $photo_url}<img alt="Photo de {$x.forlife}" src="{$photo_url}" width="{$x.x}"/>{/if}
-    {if $logged}
-      {if $x.section}<div><em class="intitule">Section : </em><span>{$x.section}</span></div>{/if}
-      {if $x.binets_join}<div><em class="intitule">Binet(s) : </em><span>{$x.binets_join}</span></div>{/if}
-      {if $x.gpxs_join}<div><em class="intitule">Groupe(s) et institution(s) X : </em><span><br/>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
+    {if $logged && ( $x.section|smarty:nodefaults || $x.binets_join|smarty:nodefaults || $x.gpxs_join|smarty:nodefaults)}
+      <h2>A l'X...</h2>
+      {if $x.section}<div><em class="intitule">Section&nbsp;: </em><span>{$x.section}</span></div>{/if}
+      {if $x.binets_join}<div><em class="intitule">Binet(s)&nbsp;: </em><span>{$x.binets_join}</span></div>{/if}
+      {if $x.gpxs_join}<div><em class="intitule">Groupe(s) et institution(s) X&nbsp;: </em><span><br/>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
+    {/if}
+    {if $x.freetext}
+    <h2>Commentaires&nbsp;:</h2>
+    <span>{$x.freetext|miniwiki|smarty:nodefaults}</span>
     {/if}
-    {if $x.web}<div><em class="intitule">Site Web : </em><br /><a href="{$x.web}" class='popup'>{$x.web}</a></div>{/if}
-    {if $x.freetext}<div><em class="intitule">Commentaires : </em><br /><span>{$x.freetext|miniwiki|smarty:nodefaults}</span></div>{/if}
   </div>
   <div id="fiche_identite" class="part">
     <div class="civilite">
       {if $x.sexe}&bull;{/if}
       {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
       {if $logged}
-      {if $x.nickname} (alias {$x.nickname}){/if}&nbsp;
-      <a href="vcard/{$x.forlife}.vcf">{*
-        *}{icon name=vcard title="Afficher la carte de visite"}</a>
+      {if $x.nickname} (alias {$x.nickname}){/if}
+      {/if}
+      {if $x.web}&nbsp;<a href="{$x.web}">{icon name="world_go" title="Site Web"}</a>{/if}
+      {if $logged}
+      &nbsp;{if !$x.dcd}<a href="vcard/{$x.forlife}.vcf">{*
+        *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
       {if !$x.is_contact}
       <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}')">
         {icon name=add title="Ajouter à mes contacts"}</a>
@@ -73,6 +75,9 @@ function chgMainWinLoc(strPage)
       <a href="javascript:chgMainWinLoc('admin/user/{$x.forlife}')">
         {icon name=wrench title="administrer user"}</a>
       {/if}
+      {if $x.forlife eq $smarty.session.forlife}
+      <a href="javascript:chgMainWinLoc('profile/edit')">{icon name="user_edit" title="Modifier ma fiche"}</a>
+      {/if}
       {/if}
     </div>
     {if $logged}
@@ -106,7 +111,7 @@ function chgMainWinLoc(strPage)
       {/if}
       {if $x.mobile}
       <div class="mob">
-        <em class="intitule">Mobile : </em>{$x.mobile}
+        <em class="intitule">Mobile&nbsp;: </em>{$x.mobile}
       </div>
       {/if}
       <div class='spacer'></div>
@@ -130,41 +135,41 @@ function chgMainWinLoc(strPage)
   </div>
   {if $x.adr}
   <div class="part">
-    <h2>Contact : </h2>
-    {foreach from=$x.adr item="address" key="i" name=adresses}
-      {if $i is odd}
+    <h2>Contact&nbsp;: </h2>
+    {foreach from=$x.adr item="address" name=adresses}
+      {if $smarty.foreach.adresses.iteration is even}
         {assign var=pos value="right"}
       {else}
         {assign var=pos value="left"}
       {/if}
       {if $address.active}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle :"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {elseif $address.secondaire}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire :"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {else}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale :"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {/if}
-      {if $i is odd}<div class="spacer"></div>{/if}
+      {if $smarty.foreach.adresses.iteration is even}<div class="spacer"></div>{/if}
     {/foreach}
   </div>
   {/if}
   {if $x.adr_pro}
   <div class="part">
-    <h2>Informations professionnelles :</h2>
+    <h2>Informations professionnelles&nbsp;:</h2>
     {foreach from=$x.adr_pro item="address" key="i"}
       {if $i neq 0}<hr />{/if}
       {include file="include/emploi.tpl" address=$address}
-      {include file="geoloc/address.tpl" address=$address titre="Adresse : " for=$address.entreprise pos="left"}
+      {include file="geoloc/address.tpl" address=$address titre="Adresse&nbsp;: " for=$address.entreprise pos="left"}
       <div class="spacer">&nbsp;</div>
     {/foreach}
   </div>
   {/if}
   {if $x.medals}
   <div class="part">
-    <h2>Distinctions : </h2>
+    <h2>Distinctions&nbsp;: </h2>
     {foreach from=$x.medals item=m}
     <div class="medal_frame">
       <img src="profile/medal/{$m.id}" width="24" alt="{$m.medal}" title="{$m.medal}" style='float: left;' />
@@ -178,14 +183,16 @@ function chgMainWinLoc(strPage)
   {/if}
   {if $logged && $x.cv}
   <div class="part">
-    <h2>Curriculum Vitae :</h2>
+    <h2>Curriculum Vitae&nbsp;:</h2>
     {$x.cv|miniwiki:title|smarty:nodefaults}
   </div>
   {/if}
   {if !$logged}
   <div class="part">
+    <small>
     Cette fiche est publique et visible par tout internaute,<br />
     vous pouvez aussi voir <a href="profile/private/{$x.forlife}?display=light">celle&nbsp;réservée&nbsp;aux&nbsp;X</a>.
+    </small>
   </div>
   {/if}
   <div class="spacer"></div>
index 99c2891..3798294 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 2dae743..6d940dd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 28aba2b..d88ca68 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e7732ab..3b23f6b 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -68,7 +68,7 @@
     </tr>
     <tr>
       <td {if !$submited}colspan="2"{/if} class="center">
-        Si tu ne souhaites plus montrer cette photo tu peux aussi l'effacer en la remplaçant par : <br />
+        Si tu ne souhaites plus montrer cette photo tu peux aussi l'effacer en la remplaçant par&nbsp;: <br />
         {if $has_trombi_x}
         <input type="submit" value="Trombino de l'X" name="trombi" /><br />
         {/if}
@@ -76,7 +76,7 @@
       </td>
       {if $submited}
       <td class="center">
-        Tu peux annuler ta soumission et garder ta photo actuelle : <br />
+        Tu peux annuler ta soumission et garder ta photo actuelle&nbsp;: <br />
         <input type="submit" value="Annuler ta soumission" name="cancel" />
       </td>
       {/if}
@@ -95,7 +95,7 @@
         </p>
         <p>
         Si elle est sur Internet, choisis la seconde solution et nos robots iront la télécharger
-        directement où il faut :-)
+        directement où il faut&nbsp;:-)
         </p>
       </td>
     </tr>
index 2c8579f..b7ab7c7 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 {assign var="step" value=$smarty.session.sub_state.step}
 <div class="descr center">
-  <strong>Procédure d'inscription :</strong>
+  <strong>Procédure d'inscription&nbsp;:</strong>
   {if !$step}<span class="erreur">{/if}Charte{if !$step}</span>{/if} »
   {if $step eq 1 || $step eq 2}<span class="erreur">{/if}Identification{if $step eq 1 || $step eq 2}</span>{/if} »
   {if $step eq 4 || $step eq 3}<span class="erreur">{/if}Pré-Inscription{if $step eq 4 || $step eq 3}</span>{/if} »
index 2333220..44ab0c9 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <h1>:'(</h1>
 
 <p class="erreur">
-Une erreur est survenue lors de ton inscription ...
+Une erreur est survenue lors de ton inscription...
 </p>
 <p>
-Contacte nous au plus vite, en nous indiquant ce nombre : {$uid} sur 
+Contacte nous au plus vite, en nous indiquant ce nombre&nbsp;: {$uid} à l'adresse 
 <a href="mailto:support@{#globals.mail.domain#}">support@{#globals.mail.domain#}</a>
 </p>
 
index 89f4dd9..5b52eee 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 43106d1..bad7df1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {elseif $mail_part eq 'text'}
 Bonjour,
 
-Ton inscription sur Polytechnique.org est presque terminée, un clic sur le lien ci-dessous et c'est fini.
+Ton inscription sur Polytechnique.org est presque terminée !
 
-Après activation, tes paramètres seront :
+Après activation, tes paramètres de connexion seront :
 
 login        : {$mailorg}
 mot de passe : {$pass}
 
-Rends-toi sur la page web suivante afin d'activer ta pré-inscription, et de changer ton mot de passe en quelque chose de plus facile à mémoriser :
+Nous te proposerons de remplacer ce mot de passe temporaire par un mot de passe de ton choix.
+
+Rends-toi maintenant sur la page web suivante afin d'activer ta pré-inscription :
 
 {$baseurl}/register/end/{$hash}
 
-Si en cliquant dessus tu n'y arrives pas, copie intégralement l'adresse dans la barre de ton navigateur.
+Si en cliquant dessus tu n'y arrives pas, copie intégralement ce lien dans la barre d'adresse de ton navigateur.
 
-Nous espérons que tu profiteras pleinement des services en ligne de Polytechnique.org : s'ils te convainquent, n'oublie pas d'en parler aux camarades autour de toi !
+Nous espérons que tu profiteras pleinement des services en ligne de Polytechnique.org ; s'ils te convainquent, n'oublie pas d'en parler aux camarades autour de toi !
 
 Bien cordialement,
-Polytechnique.org
-"Le portail des élèves & anciens élèves de l'Ecole polytechnique"
+L'équipe de Polytechnique.org,
+Le portail des élèves et anciens élèves de l'École polytechnique
 {/if}
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 3b7c80d..97d2b03 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <h1>Conditions générales</h1>
 
 <p>
-L'enregistrement se déroule <strong>en deux étapes</strong> :
+L'enregistrement se déroule <strong>en deux étapes</strong>&nbsp;:
 </p>
 <ul>
   <li>
-  la pré-inscription quit te prendra moins de 5 minutes ;
+  tu te pré-inscris, ce qui te prendra moins de 5 minutes ;
   </li>
   <li>
-  suivi d'un envoi d'un mail de notre part (immédiat !) qui te permettra
-  de te connecter au site !
+  nous t'envoyons immédiatement un email qui te permettra
+  de te connecter au site.
   </li>
 </ul>
 
index 4bdd8f3..4da0c4c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -26,7 +26,7 @@
 
 <form action="register" method="post">
   <p>
-    Avant toute chose, il te faut nous donner ta promotion :
+    Avant toute chose, il te faut nous donner ta promotion&nbsp;:
   </p>
   <table class="tinybicol">
     <tr>
@@ -36,7 +36,7 @@
     </tr>
     <tr>
       <td>
-        Donne ta promotion sur 4 chiffres 
+        Donne ta promotion sur 4 chiffres&nbsp;
         <input type="text" size="4" maxlength="4" name="promo" value="{$smarty.post.promo}" />
       </td>
     </tr>
index a460a37..acb6553 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -37,7 +37,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Matricule X :
+        Matricule X&nbsp;:
       </td>
       <td>
         <input type="text" size="6" maxlength="6" name="mat" 
@@ -54,7 +54,7 @@
         {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 est du type&nbsp;:
         {if $promo < 1999}
         {math equation="(promo + 1) % 100" promo=$promo}0XXX
         {else}
index 5f06921..487fd9a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <form action="register" method="post">
   {if $smarty.session.sub_state.mailorg2}
   <p>
-  Tu n'as pour le moment aucun homonyme dans notre base de données, nous allons
+  Tu n'as pour le moment aucun homonyme dans notre base de données. Nous allons
   donc te donner l'adresse <strong>{$smarty.session.sub_state.bestalias}@{#globals.mail.domain#}</strong>,
   en plus de ton adresse à vie <strong>{$smarty.session.sub_state.forlife}@{#globals.mail.domain#}</strong>.
-  Sache que tu peux perdre l'adresse <strong>{$smarty.session.sub_state.bestalias}@{#globals.mail.domain#}</strong> 
-  si un homonyme s'inscrit (même si cela reste assez rare).
+  Note que tu pourrais perdre l'adresse <strong>{$smarty.session.sub_state.bestalias}@{#globals.mail.domain#}</strong> 
+  si un homonyme s'inscrivait &mdash; cela reste assez rare.
   </p>
   {else}
   <p>
-  Tu as déjà un homonyme inscrit dans notre base de données mais dans une autre promotion, nous allons
+  Tu as déjà un homonyme inscrit dans notre base de données, dans une autre promotion. Nous allons
   donc te donner l'adresse <strong>{$smarty.session.sub_state.bestalias}@{#globals.mail.domain#}</strong>, en plus
   de ton adresse à vie <strong>{$smarty.session.sub_state.forlife}@{#globals.mail.domain#}</strong>.
   </p>
   {/if}
   
   <p>
-  Ces adresses sont des redirections vers des adresses e-mail de ton choix.
-  Indique-s-en un pour commencer (tu pourras indiquer les autres une fois l'inscription terminée) et pouvoir
-  terminer ton inscription.
+  Ces adresses sont des redirections vers une ou plusieurs adresses e-mail de ton choix.
+  Indiques-en une pour terminer ton inscription. Tu pourras la modifier ou ajouter d'autres
+  adresses une fois inscrit.
   </p>
   <p>
-  Attention, il doit <strong>impérativement être correct</strong> pour que nous puissions 
-  t'envoyer ton mot de passe.
+  Attention, cette adresse doit <strong>impérativement être valide</strong> pour que nous puissions 
+  t'envoyer tes informations de connexion.
   </p>
 
   <table class="bicol">
@@ -62,7 +62,7 @@
     <tr>
       <td class="titre">
         E-mail<br />
-        <span class="smaller">(Première redirection)</span>
+        <span class="smaller">(adresse de ton choix pour reçevoir tes emails)</span>
       </td>
       <td>
         <input type="text" size="35" maxlength="50" name="email" value="{$smarty.post.email}" />
     <tr>
       <td class="titre">
         Date de naissance<br />
-        <span class="smaller">(Format JJMMAAAA)</span>
+        <span class="smaller">jour/mois/année</span>
       </td>
       <td>
-        <input type="text" size="8" maxlength="8" name="naissance"  value="{$smarty.post.naissance}" />
-        (demandée si perte de mot de passe)
+        <input type="text" size="10" maxlength="10" name="naissance"  value="{$smarty.post.naissance}" />
+        (demandée si tu perds ton mot de passe)
       </td>
     </tr>
     <tr>
index a983477..8c32b7e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 La pré-inscription que tu viens de soumettre a été enregistrée.
 </p>
 <p>
-Les instructions te permettant notamment d'activer ton e-mail
-<strong>{$smarty.session.sub_state.forlife}@{#globals.mail.domain#}</strong>, ainsi que ton mot de passe pour
+Les instructions te permettant de valider ton inscription et ton mot de passe pour
 accéder au site viennent de t'être envoyés à l'adresse <strong>{$smarty.session.sub_state.email}</strong>.
 </p>
 <p>
-Tu n'as que quelques jours pour suivre ces instructions après quoi la pré-inscription
-est effacée automatiquement de nos bases et il faut tout recommencer.
+Tu n'as que quelques jours pour suivre ces instructions. Ensuite, la pré-inscription
+est effacée automatiquement de notre base de données et il faut tout recommencer.
 </p>
 <p>
 Si tu ne reçois rien, vérifie bien l'adresse <strong>{$smarty.session.sub_state.email}</strong>.
+En particulier, vérifie si l'e-mail n'a pas été rejeté par ton filtre anti-spam. L'adresse
+d'expéditeur est <code>register@polytechnique.org</code>.
 </p>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 04256a0..01b75b8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 <h1>Bravo !!!</h1>
 
 <p>
-Tu as maintenant accès au site !!!<br />
+Tu as maintenant accès au site !<br />
 Ton adresse électronique à vie <strong>{$smarty.session.forlife}@{#globals.mail.domain#}</strong> est déjà ouverte, essaie-la !
 </p>
 <p class="smaller">
-  <strong>Remarque :</strong> m4x.org est un domaine "discret" qui veut dire "mail for X" et
+  <strong>Remarque&nbsp;:</strong> m4x.org est un domaine "discret" qui veut dire "mail for X" et
   qui comporte exactement les mêmes adresses que le domaine polytechnique.org.
 </p>
 
@@ -45,7 +45,7 @@ ton mot de passe a bien été mis à jour !
 {else}
 
 <p>
-Tu as recu un mot de passe par défaut, si tu souhaites en changer, tu peux le faire ici :
+Tu as reçu un mot de passe par défaut, si tu souhaites en changer, tu peux le faire ici&nbsp;:
 </p>
 
 <form action="register/success" method="post" id="changepass">
@@ -57,7 +57,7 @@ Tu as recu un mot de passe par défaut, si tu souhaites en changer, tu peux le f
     </tr>
     <tr>
       <td class="titre">
-        Nouveau mot de passe :
+        Nouveau mot de passe&nbsp;:
       </td>
       <td>
         <input type="password" size="10" maxlength="10" name="nouveau" />
@@ -65,7 +65,7 @@ Tu as recu un mot de passe par défaut, si tu souhaites en changer, tu peux le f
     </tr>
     <tr>
       <td class="titre">
-        Retape-le une fois :
+        Retape-le une fois&nbsp;:
       </td>
       <td>
         <input type="password" size="10" maxlength="10" name="nouveau2" />
@@ -84,10 +84,10 @@ Tu as recu un mot de passe par défaut, si tu souhaites en changer, tu peux le f
 </form>
 
 <p class="smaller">
-<strong>N'oublie pas :</strong> si tu perds ton mot de passe, nous n'avons aucun engagement, en
-particulier en termes de rapidité, mais pas seulement, à te redonner accès au
-site. Cela peut prendre plusieurs semaines, les pertes de mot de passe sont
-traitées avec la priorité minimale.
+<strong>N'oublie pas&nbsp;:</strong> en cas de perte de ton mot de passe,
+il existe une procédure de récupération automatique ; mais elle nécessite
+que ton adresse email sur le site soit toujours valable. Dans le cas contraire,
+il te faudra contacter l'équipe support.
 </p>
 
 {/if}
@@ -96,18 +96,18 @@ traitées avec la priorité minimale.
 
 <form action='register/save' method='post'>
   <p>
-  Pour rejoindre la communauté des X sur le web, nous te convions le plus vivement à remplir ton profil !!!
+  Pour rejoindre la communauté des X sur le web, nous t'invitons vivement à remplir ton profil !
   </p>
 
   <p>
-  Cette fonctionnalité n'est pas du tout redondante avec l'annuaire de l'AX, car nous pouvons synchroniser pour toi
-  les données qu'il contient :
+  Cet annuaire n'est pas redondant avec l'annuaire de l'AX ; il est synchronisé automatiquement,
+  d'une manière que tu choisis&nbsp;:
   </p>
 
   <dl>
     <dt><input type="checkbox" value="1" checked="checked" name="send_to_ax" disabled="disabled" /> vers l'AX</dt>
     <dd>
-      tu peux choisir dans ton profil sur Polytechnique.org d'automatiquement transmettre à l'AX des parties de ta fiche,
+      tu peux choisir dans ton profil sur Polytechnique.org de transmettre automatiquement à l'AX certains éléments de ta fiche,
       au fur et à mesure que tu les modifies.
       (Les données transmises seront <strong>uniquement</strong> celles que tu as décidé de transmettre).
     </dd>
@@ -136,16 +136,20 @@ traitées avec la priorité minimale.
       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><input type='checkbox' value='1' checked="checked" name='imap' />imap</dt>
+    <dd>
+      d'avoir un accès de secours aux 30 derniers jours de mail reçus sur ton adresse Polytechnique.org.
+    </dd>
   </dl>
 
   {if $lists|@count neq 0}
   <p>
-    Des camarades souhaitent que tu t'inscrives aux listes suivantes :
+    Des camarades souhaitent que tu t'inscrives aux listes suivantes&nbsp;:
   </p>
 
   <dl>
     {foreach from=$lists key=list item=details}
-    <dt><input type='checkbox' value='1' checked="checked" name="sub_ml[{$list}]" /> {$list}* : {$details.desc}</dt>
+    <dt><input type='checkbox' value='1' checked="checked" name="sub_ml[{$list}]" /> {$list}*&nbsp;: {$details.desc}</dt>
     {if $details.info}
     <dd>
       {$details.info|nl2br}
index f579515..a48eb0a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -27,7 +27,7 @@
 <script type="text/javascript">// <!-- 
         var baseurl = platal_baseurl + "search/";
         {literal}
-        // display an autocomplete row : blabla (nb of found matches)
+        // display an autocomplete row&nbsp;: blabla (nb of found matches)
         function make_format_autocomplete(block) {
           return function(row) {
               regexp = new RegExp('(' + RegExp.escape(block.value) + ')', 'i');
index e7150c3..2372f6d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 3b238c5..dd13ea1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e78b7f8..93d1855 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 00a7118..af2e360 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e3e2aea..bb12b39 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 <p>
 La ligne de recherche ci-dessus accepte non seulement des mélanges de <strong>noms</strong> et de <strong>prénoms</strong>...
-mais elle accepte de plus la syntaxe suivante pour les <strong>promotions</strong> :
+mais elle accepte de plus la syntaxe suivante pour les <strong>promotions</strong>&nbsp;:
 </p>
 <ul>
-  <li><code>1990</code> : signifie appartient à la promotion 1990&nbsp;;</li>
-  <li><code>1990-2000</code> : signifie sur la promotion 1990 à 2000&nbsp;;</li>
-  <li><code>&lt;1990</code> : signifie promotions inférieures ou égales à 1990&nbsp;;</li>
-  <li><code>&gt;1990</code> : signifie promotions supérieures ou égales à 1990.</li>
+  <li><code>1990</code>&nbsp;: signifie appartient à la promotion 1990&nbsp;;</li>
+  <li><code>1990-2000</code>&nbsp;: signifie sur la promotion 1990 à 2000&nbsp;;</li>
+  <li><code>&lt;1990</code>&nbsp;: signifie promotions inférieures ou égales à 1990&nbsp;;</li>
+  <li><code>&gt;1990</code>&nbsp;: signifie promotions supérieures ou égales à 1990.</li>
 </ul>
 <p>
-Ainsi, rechercher tous les "Dupont" sur les promotions 1980 à 1990 et sur la promotion 2000 se fait avec la recherche :
+Ainsi, rechercher tous les "Dupont" sur les promotions 1980 à 1990 et sur la promotion 2000 se fait avec la recherche&nbsp;:
 <code>Dupont 1980-1990 2000</code>
 </p>
 
@@ -82,7 +82,7 @@ Ainsi, rechercher tous les "Dupont" sur les promotions 1980 à 1990 et sur la pr
 Parfois on ne sait plus si le nom qu'on recherche s'écrit « Lenormand », « Le Normand » ou « Le-Normand »...
 </p>
 <p>
-Pour éviter ce genre d'écueils, il suffit de chercher : <code>Le Normand</code><br />
+Pour éviter ce genre d'écueils, il suffit de chercher&nbsp;: <code>Le Normand</code><br />
 En effet, le moteur de recherche va alors chercher tous les utilisateurs dont le nom 
 contient 'Le' <strong>et</strong> 'Normand' sans distinction de casse et sans tenir compte des accents.
 </p>
@@ -94,7 +94,7 @@ notre base de données.
 {if hasPerm('user')}
 <h2>Raccourcis...</h2>
 <p>
-  Un certain nombre de raccourcis permettent d'accéder plus rapidement au contenu du site :
+  Un certain nombre de raccourcis permettent d'accéder plus rapidement au contenu du site&nbsp;:
   <ul>
     <li><code>fiche:prenom.nom.promo</code> ouvre la fiche du camarade indiquée&nbsp;;</li>
     <li><code>ref:prenom.nom.promo</code> ouvre la fiche référent du camarade indiquée&nbsp;;</li>
@@ -131,9 +131,8 @@ notre base de données.
 //]]></script>
 {/if}
 
-<h2>Polytechniciens des promotions 1919 et précédentes</h2>
-<p>Notre base de données ne contient que les polytechniciens depuis la promotion 1920. Pour effectuer des recherches dans les
-promotions précédentes, il faut utiliser l'<a href="http://bibli.polytechnique.fr/F/?func=file&amp;file_name=find-b&amp;local_base=BCXC2">annuaire en ligne de la bibliothèque de
-l'École</a>.</p>
+<h2>Polytechniciens des promotions 1920 et précédentes</h2>
+<p>Notre base de données ne contient que les polytechniciens depuis la promotion 1921. Pour effectuer des recherches dans les
+promotions précédentes, il faut utiliser l'<a href="http://bibli.polytechnique.fr/F/?func=file&amp;file_name=find-b&amp;local_base=BCXC2">annuaire en ligne de la bibliothèque de l'École</a>.</p>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 2e29454..7df0dee 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -24,7 +24,7 @@
 <div class="backtrace">
   <h1>
     {if $trace->error}<span style="color: #f00">{/if}
-    Exécution de {$bt_name} : {$trace->traces|@count} actions en {$trace->totaltime|string_format:"%.3f"}s (hover-me pour la trace)
+    Exécution de {$bt_name}&nbsp;: {$trace->traces|@count} actions en {$trace->totaltime|string_format:"%.3f"}s (hover-me pour la trace)
     {if $trace->error}</span>{/if}
   </h1>
   <div class="hide">
index 424d5aa..102a8d0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}\r
 {*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}\r
 {*  http://opensource.polytechnique.org/                                  *}\r
 {*                                                                        *}\r
 {*  This program is free software; you can redistribute it and/or modify  *}\r
index b146fad..56f6f31 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<!-- Pour récupérer ce bandeau sur votre site :
+<!-- Pour récupérer ce bandeau sur votre site&nbsp;:
   incluez le fichier http://www.polytechnique.org/bandeau dans vos php
   ou http://www.polytechnique.org/bandeau/login pour profiter du login
   automatique. Et rajoutez à la liste de css de vos pages
   http://www.polytechnique.org/bandeau.css.
   Pour avoir l'icone, pour des raisons de sécurité il n'y a pas d'accès
-  direct, il faut alors rediriger bandeau/icone.png vers celle du site :
+  direct, il faut alors rediriger bandeau/icone.png vers celle du site&nbsp;:
   http://www.polytechnique.org/bandeau/icone.png -->
 
 {if !$login && $smarty.session.auth}
index 87887f5..d9d1907 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 868f138..65889e4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -29,7 +29,7 @@
     Validation:
     <a href="http://jigsaw.w3.org/css-validator/validator?uri={#globals.baseurl#}/valid.html">CSS</a>
     &nbsp;&nbsp;|&nbsp;&nbsp;
-    références :
+    références&nbsp;:
     <a href="http://www.w3schools.com/xhtml/xhtml_reference.asp">XHTML</a>
     <a href="http://www.w3schools.com/css/css_reference.asp">CSS2</a>
   </div>
index 4003f46..587ec39 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index f4228b7..c090d37 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -21,7 +21,7 @@
 {**************************************************************************}
 
 <div>
-  Plat/al <a href="changelog">{#globals.version#}</a> - Copyright © 1999-2007 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
+  Plat/al <a href="changelog">{#globals.version#}</a> - Copyright © 1999-2008 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
   &nbsp;-&nbsp;
   <a href="Reference/Convention-AX">Lien avec l'AX</a>
   &nbsp;-&nbsp;
index f4ccbcf..da39c5e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -25,6 +25,7 @@
     <meta name="keywords" content="Ecole polytechnique, anciens eleves, portail, alumni, AX, X, routage, reroutage, e-mail, email, mail" />
     <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
     <link rel="icon" href="/images/favicon.png" type="image/png" />
+    <link rel="apple-touch-icon" href="images/logo.png" type="image/png" />
     <link rel="index"  href="" />
     <link rel="author" href="changelog" />
     <link rel="search" href="search" />
@@ -68,6 +69,6 @@
     {$xorg_extra_header|smarty:nodefaults}
     {/if}
 
-    <title>{$xorg_title|default:"Polytechnique.org : le site des élèves et anciens élèves de l'École polytechnique"}</title>
+    <title>{$xorg_title|default:"Polytechnique.org&nbsp;: le site des élèves et anciens élèves de l'École polytechnique"}</title>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 40971ea..afe97a0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -30,7 +30,6 @@
 <div class="menu_item"><a href="search">Annuaire de l'X</a></div>
 <div class="menu_item"><a href="http://www.polytechnique.net/">Associations X</a></div>
 <div class="menu_item"><a href="http://www.manageurs.com/">Recrutement</a></div>
-<div class="menu_item"><a href="survey">Sondages</a></div>
 
 <div class="menu_title">Informations</div>
 <div class="menu_item"><a href="Equipe/APropos">A propos du site</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 class="impair">
-    <td><a href="admin/validate">{insert name="mkStats"}</a></td>
+    <td>
+      <a href="admin/validate">
+      {if $globals->core->NbValid|smarty:nodefaults eq 0}-{else}{$globals->core->NbValid|default:'-'}{/if}
+      </a>
+    </td>
   </tr>
 </table>
 {/if}
index fd4585d..4b96a0d 100644 (file)
@@ -1,42 +1,47 @@
-{**************************************************************************}\r
-{*                                                                        *}\r
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}\r
-{*  http://opensource.polytechnique.org/                                  *}\r
-{*                                                                        *}\r
-{*  This program is free software; you can redistribute it and/or modify  *}\r
-{*  it under the terms of the GNU General Public License as published by  *}\r
-{*  the Free Software Foundation; either version 2 of the License, or     *}\r
-{*  (at your option) any later version.                                   *}\r
-{*                                                                        *}\r
-{*  This program is distributed in the hope that it will be useful,       *}\r
-{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}\r
-{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}\r
-{*  GNU General Public License for more details.                          *}\r
-{*                                                                        *}\r
-{*  You should have received a copy of the GNU General Public License     *}\r
-{*  along with this program; if not, write to the Free Software           *}\r
-{*  Foundation, Inc.,                                                     *}\r
-{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}\r
-{*                                                                        *}\r
-{**************************************************************************}\r
-          <table>\r
-            <tr>\r
-              <td class="date-heure">\r
-                <script type="text/javascript">\r
-                  <!--\r
-                  document.write(getNow());\r
-                  //-->\r
-                </script>\r
-              </td>\r
-              <td class="inscrits">\r
-                {insert name="getNbIns"} polytechniciens sur le web\r
-                <form action="search" method="get">\r
-                    <div>\r
-                        <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}'"/>                        \r
-                    </div>\r
-                </form>\r
-                {insert name="getNbNotifs"}\r
-              </td>\r
-            </tr>\r
-          </table>\r
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 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               *}
+{*                                                                        *}
+{**************************************************************************}
+          <table>
+            <tr>
+              <td class="date-heure">
+                <script type="text/javascript">
+                  <!--
+                  document.write(getNow());
+                  //-->
+                </script>
+              </td>
+              <td class="inscrits">
+                {$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}'"/>
+                    </div>
+                </form>
+                {if $smarty.session.auth gt AUTH_PUBLIC && $smarty.session.notifs}
+                <a href="carnet/panel">{$smarty.session.notifs} événement{if $smarty.session.notifs gt 1}s{/if}</a>
+                {/if}
+              </td>
+            </tr>
+          </table>
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index f0496bf..67096d0 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a81f38e..d7f74cc 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 5ae3ce3..4c98b24 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 35bffa9..fb21d00 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 319307c..0bf94c1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index c4d671a..aae8664 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 13290bf..bee60d7 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e81232c..41a54c4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 6b6d862..dce826d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 2387b22..b634ca7 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 7ec1859..74049ab 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 640b6a7..4696bc4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index cad2865..9144454 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 2c1d2d9..cee1f4e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e4409bd..e58d81e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 463d60d..5f1b2a3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index b1a1ef4..9c6c7cc 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 91e7aca..5e5552a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -23,7 +23,7 @@
 <h1>Inscrits par promo</h1>
 
 <p>
-Voici le nombre d'inscrits par promo :
+Voici le nombre d'inscrits par promo&nbsp;:
 </p>
 
 <table class="bicol" cellpadding="3" cellspacing="0" summary="Statistiques">
index 3845c95..efe98fc 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 30586e2..957e5ed 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -19,7 +19,7 @@
 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
 {*                                                                        *}
 {**************************************************************************}
-<h1>Sondages : confirmation</h1>
+<h1>Sondages&nbsp;: confirmation</h1>
 
 <form action="{$survey_formaction}" method="post">
   {if is_array($survey_formhidden)}
index 0aa1422..db03ee6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a5dfb56..71cab1c 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index f5bfece..c6350f2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index e07fd90..94375a3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a3fda5f..f18f17f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 41527ed..3c3a64a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 2e5b206..3282556 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 048f89e..71accdb 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index cfeea7b..38661c4 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -68,7 +68,7 @@
     <tr id="ln_promo_exp">
       <td></td>
       <td class="smaller">
-        Exemple : 1954,1986-1989,-1942,2000-&nbsp;&nbsp;&nbsp;restreindra le sondage &#224; toutes les promotions suivantes :<br/>
+        Exemple&nbsp;: 1954,1986-1989,-1942,2000-&nbsp;&nbsp;&nbsp;restreindra le sondage &#224; toutes les promotions suivantes&nbsp;:<br/>
         1954, 1986 &#224; 1989, toutes jusqu'à 1942 et toutes à partir 2000 (les bornes sont syst&#233;matiquement incluses)
       </td>
     </tr>
index 786218d..dca5faa 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -19,7 +19,7 @@
 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
 {*                                                                        *}
 {**************************************************************************}
-<h1>Sondage : {if $survey_type == 'root'}nouveau sondage{else}nouvelle question{/if}</h1>
+<h1>Sondage&nbsp;: {if $survey_type == 'root'}nouveau sondage{else}nouvelle question{/if}</h1>
 
 <form action="{$survey_formaction}" method="post">
   <input type="hidden" name="survey_action" value="{$survey_action}"/>
index a3fda5f..f18f17f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index a3fda5f..f18f17f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 695e714..21e5c22 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -19,7 +19,7 @@
 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
 {*                                                                        *}
 {**************************************************************************}
-<h1>Sondages : erreur</h1>
+<h1>Sondages&nbsp;: erreur</h1>
 
 {if !is_null($survey_errors) && is_array($survey_errors)}
 <table class="bicol">
index ec96dc9..3479967 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index d4b06a5..fe025dc 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -23,7 +23,7 @@
 {if $survey_resultmode}
   <ul>
   {foreach item=sresult from=$squestion.result}
-    <li>{$squestion.choices[$sresult.answer]} : {$sresult.count*100/$survey.votes|string_format:"%.1f"}% ({$sresult.count} votes)</li>
+    <li>{$squestion.choices[$sresult.answer]}&nbsp;: {$sresult.count*100/$survey.votes|string_format:"%.1f"}% ({$sresult.count} votes)</li>
   {/foreach}
   </ul>
 {else}
index 9c24e4d..47f8682 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index ef77377..3896067 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index c30b8ba..7c3aced 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 02dd20c..2b6e21d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -23,7 +23,7 @@
 {if $survey_resultmode}
   <ul>
   {foreach item=sresult from=$squestion.result}
-    <li>{$squestion.choices[$sresult.answer]} : {$sresult.count*100/$survey.votes|string_format:"%.1f"}% ({$sresult.count} votes)</li>
+    <li>{$squestion.choices[$sresult.answer]}&nbsp;: {$sresult.count*100/$survey.votes|string_format:"%.1f"}% ({$sresult.count} votes)</li>
   {/foreach}
   </ul>
 {else}
index 39448cf..060bcf6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 5a91c95..8e6c20b 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>Sondage : {$survey.title}</h1>
+<h1>Sondage&nbsp;: {$survey.title}</h1>
 <form action="survey/vote{if $survey_votemode}/{$survey.id}{/if}" method='post'>
 <table style="width: 100%">
   <tr>
         <td colspan="2">{$survey.description}</td>
       </tr>
       <tr>
-        <td class="titre">Fin du sondage :</td>
+        <td class="titre">Fin du sondage&nbsp;:</td>
         <td>{$survey.end|date_format:"%x"}</td>
       </tr>
       <tr>
-        <td class="titre">Type de sondage :</td>
+        <td class="titre">Type de sondage&nbsp;:</td>
         <td>{$survey_modes[$survey.mode]}</td>
       </tr>
       {if $survey.mode != Survey::MODE_ALL} 
       <tr>
-        <td class="titre">Promotions :</td> 
+        <td class="titre">Promotions&nbsp;:</td> 
         <td>
           {if $survey.promos eq "#"} 
           erreur 
index b44d1fa..80b078a 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -21,7 +21,7 @@
 {**************************************************************************}
 
 {if $survey_resultmode}
-  Quelques r&#233;ponses donn&#233;es par les personnes sond&#233;es :
+  Quelques r&#233;ponses donn&#233;es par les personnes sond&#233;es&nbsp;:
   <ul>
   {foreach item=sresult from=$squestion.result}
     <li>{$sresult.answer}</li>
index aca9599..a8d0302 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -21,7 +21,7 @@
 {**************************************************************************}
 
 {if $survey_resultmode}
-  Quelques r&#233;ponses donn&#233;es par les personnes sond&#233;es :
+  Quelques r&#233;ponses donn&#233;es par les personnes sond&#233;es&nbsp;:
   <ul>
   {foreach item=sresult from=$squestion.result}
     <li>{$sresult.answer}</li>
index 3262927..2eb9aa3 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -19,7 +19,7 @@
 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
 {*                                                                        *}
 {**************************************************************************}
-<h1>Sondages : succ&#232;s</h1>
+<h1>Sondages&nbsp;: succ&#232;s</h1>
 
 {if $survey_message neq ""}
   {$survey_message}
index e2d9db9..b495608 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -37,7 +37,7 @@
 <form action="admin" method="post">
   <p class="descr">
   Pour ajouter un groupe, choisir ici le diminutif qu'il va utiliser,
-  tu seras ensuite redirigé vers une page te permettant d'éditer le groupe :
+  tu seras ensuite redirigé vers une page te permettant d'éditer le groupe&nbsp;:
   </p>
   <div class="center">
     <input type="text" name="diminutif" value="{$smarty.request.diminutif}" />
index 4fd256e..1a9ebc1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 5b9198c..c706a8f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 102899c..938c4ce 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -53,10 +53,10 @@ cliquant <a href= "http://www.polytechnique.fr/eleves/binets.php">ici</a>.
 {elseif $cat eq institutions}
 
 <p class="descr">
-De nombreux organismes officiels sont liés à l'École polytechnique : le collège de l'École
+De nombreux organismes officiels sont liés à l'École polytechnique&nbsp;: le collège de l'École
 polytechnique, l'amicale des anciens élèves, le site des X sur le web Polytechnique.org, etc...
 Cette liste n'est pas exhaustive. Vous pouvez découvrir chacun de ces organismes en cliquant sur les
-liens correspondants :
+liens correspondants&nbsp;:
 </p>
 
 {elseif $cat eq promotions}
@@ -64,7 +64,7 @@ liens correspondants :
 <p class="descr">
 Quelques promotions de polytechniciens ont mis au point leur propre site web, qui permet aux élèves
 de ces promotions d'organiser des repas promos, de faire partager des souvenirs photographiques, de
-se retrouver sur internet... En voici des exemples :
+se retrouver sur internet... En voici des exemples&nbsp;:
 </p>
 
 {/if}
index 09e35f5..c825ef8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 8a700c0..f882ccb 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 54974af..9cd5883 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -27,6 +27,7 @@
 
     <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
     <link rel="icon" href="images/favicon.png" type="image/png" />
+    <link rel="apple-touch-icon" href="images/logo-xnet.png" type="image/png" />
 
     <link rel="stylesheet" type="text/css" href="css/xnet.css" media="screen" />
 
@@ -96,7 +97,7 @@
             </td>
             {if $xnet_type}
             <td style="width: 280px">
-              <img src="images/texte_{$xnet_type}.jpg" alt="{$xnet_type}" width="280" height="96" />
+              <a href="{if $xnet_type eq plan}plan{else}groups/{$xnet_type}{/if}"><img src="images/texte_{$xnet_type}.jpg" alt="{$xnet_type}" width="280" height="96" /></a>
             </td>
             {if $asso}
             <td class="logo">
 
       {if $menu && !$simple}
       <tr>
-        <td id="menu" rowspan="2">
+        <td id="menu">
           {foreach from=$menu key=title item=submenu}
             {if $title neq 'no_title'}<h1>{$title}</h1>{/if}
             {foreach from=$submenu key=tit item=url}
               {/if}
             {/foreach}
           {/foreach}
-        </td>
-        <td class="breadcrumb">
           {if $asso && ($is_admin ||
-                        ($smarty.session.suid && ($smarty.session.suid.perms->hasFlag('admin') ||
-                                                  $smarty.session.suid.may_update[$asso.id])))}
-          <div style="float: right">
-            <form method="post" action="{$platal->ns}change_rights">
-              <div style="display: inline">
-                <small>voir le site en tant que...
-                <select name="right" onchange="this.form.submit()" style="margin: 0; padding: 0">
-                  {if hasPerm('admin') || ($smarty.session.suid && $smarty.session.suid.perms->hasFlag('admin'))}
-                  <option value="admin" {if hasPerm('admin')}selected="selected"{/if}>Administrateur</option>
-                  {/if}
-                  <option value="anim" {if $is_admin && !hasPerm('admin')}selected="selected"{/if}>Animateur</option>
-                  <option value="member" {if !$is_admin && $is_member}selected="selected"{/if}>Membre</option>
-                  <option value="logged" {if !$is_admin && !$is_member}selected="selected"{/if}>Non-membre</option>
-                </select>
-                </small>
-              </div>
-            </form>
-          </div>
-          {/if}
-          <a href=".">X.net</a> »
-          {if $asso}
-            <a href="groups/{$asso.cat}">{$asso.cat|cat_pp}</a> »
-            {if $asso.dom}
-              <a href="groups/{$asso.cat}/{$asso.dom}">{$asso.domnom}</a> »
-            {/if}
-            {$asso.nom}
-          {elseif $cat}
-            <a href="groups/{$cat}">{$cat|cat_pp}</a> »
-            {if $dom || !$doms}
-              {if $cat eq 'promotions'}
-                Choix de la promotion
-              {else}
-                Choix de l'Asso
-              {/if}
-            {else}
-              Choix du domaine
-            {/if}
-          {elseif $wikipage}
-            <a href="Xnet">Documentation</a>
+                      ($smarty.session.suid && ($smarty.session.suid.perms->hasFlag('admin') ||
+                                                $smarty.session.suid.may_update[$asso.id])))}
+          <h1>Voir le site comme...</h1>
+          <form method="post" action="{$platal->ns}change_rights">
+            <div>
+              <select name="right" onchange="this.form.submit()" style="margin: 0; padding: 0">
+                {if hasPerm('admin') || ($smarty.session.suid && $smarty.session.suid.perms->hasFlag('admin'))}
+                <option value="admin" {if hasPerm('admin')}selected="selected"{/if}>Administrateur</option>
+                {/if}
+                <option value="anim" {if $is_admin && !hasPerm('admin')}selected="selected"{/if}>Animateur</option>
+                <option value="member" {if !$is_admin && $is_member}selected="selected"{/if}>Membre</option>
+                <option value="logged" {if !$is_admin && !$is_member}selected="selected"{/if}>Non-membre</option>
+              </select>
+            </div>
+          </form>
           {/if}
         </td>
-      </tr>
-      <tr>
         <td id="body">
           {include file="skin/common.content.tpl"}
         </td>
             <td id="perso">
               {list_all_my_groups}
               {if !$smarty.session.auth}
-                <div>Me connecter :</div>
+                <div>Me connecter&nbsp;:</div>
                 <a class='gp' href="login/{if $platal->pl_self() eq 'exit'}index{else}{$platal->pl_self()}{/if}">polytechnicien</a>
                 {if $platal->pl_self() neq 'exit'}
                   {javascript name=jquery}
             - <a href="send_bug" class="popup_840x600">signaler un bug</a>
           {/if}
           <br />
-          © Copyright 2000-2007 <a href="http://x-org.polytechnique.org/">Association Polytechnique.org</a>
+          © Copyright 2000-2008 <a href="http://x-org.polytechnique.org/">Association Polytechnique.org</a>
         </td>
       </tr>
     {/if}
     </table>
 </body>
+ </body>
 </html>
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 3a86804..a5422e6 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : <a href='{$platal->ns}events'>Evénements</a> </h1>
+<h1>{$asso.nom}&nbsp;: <a href='{$platal->ns}events'>Événements</a> </h1>
 
 <p>
 L'événement {$evt.intitule}
@@ -29,7 +29,7 @@ L'événement {$evt.intitule}
 {if $evt.titre || count($moments) eq 0}
 comptera {$evt.nb_tot} personne{if $evt.nb_tot > 1}s{/if}.
 {else}
-({$evt.nb} personne{if $evt.nb > 1}s{/if} ont réalisé leur inscription).
+({$evt.nb} personne{if $evt.nb > 1}s ont réalisé leur{else} a réalisé son{/if} inscription).
 {/if}
 </p>
 
@@ -70,7 +70,7 @@ function remplitAuto(mail) {
 
 {if $oublis}
 <p class="erreur">
-Ils ont payé mais ont oublié de s'inscrire :
+Ils ont payé mais ont oublié de s'inscrire&nbsp;:
 </p>
 
 <table summary="payé mais non inscrits" class="tinybicol">
@@ -84,7 +84,11 @@ Ils ont payé mais ont oublié de s'inscrire :
   <tr class="pair">
     <td>
       <a href="" {if $is_admin}onclick="return remplitAuto('{$m.email}')"{/if}>
-      {$m.prenom} {$m.nom}
+        {if !$m.prenom && !$m.nom}
+        {$m.email}
+        {else}
+        {$m.prenom} {$m.nom}
+        {/if}
       </a>
     </td>
     <td>{$m.promo}</td>
@@ -138,7 +142,7 @@ Ils ont payé mais ont oublié de s'inscrire :
   <tr>
     <td>
       {if $is_admin}<a href="javascript:remplitAuto('{$m.email}')">{/if}
-        {if $m.femme}&bull;{/if}{$m.prenom} {$m.nom}
+        {if $m.femme}&bull;{/if}{if !$m.prenom && !$m.nom}{$m.email}{else}{$m.prenom} {$m.nom}{/if}
       {if $is_admin}</a>{/if}
     </td>
     <td>{$m.promo}</td>
@@ -174,6 +178,18 @@ Ils ont payé mais ont oublié de s'inscrire :
     {/if}
   </tr>
   {/foreach}
+  {if $is_admin && $evt.money}
+  <tr>
+    {assign var=cols value=$moments|@count}
+    <td colspan="{$cols+3}" class="right"><strong>Total</strong></td>
+    <td>{$evt.topay}&euro;</td>
+    {if $evt.paiement_id}
+    <td>{$evt.telepaid|default:0}&euro;</td>
+    <td>{$evt.adminpaid|default:0}&euro;</td>
+    {/if}
+    <td>{$evt.paid}&euro;</td>
+  </tr>
+  {/if}
 </table>
 
 <p class="descr">
@@ -223,15 +239,15 @@ Donne ici son mail, ainsi que le nombre de participants.
   <p class="descr">
     <input type="hidden" name="adm" value="nbs" />
 
-    Mail: <input name="mail" size="20" />
+    Mail&nbsp;: <input name="mail" size="20" />
 
     {if $platal->argv[2]}
-    {$evt.titre}: <input name="nb[{$platal->argv[2]}]" size="1" value="1" />
+    {$evt.titre}&nbsp;: <input name="nb[{$platal->argv[2]}]" size="1" value="1" />
     {else}
     {foreach from=$moments item=m}
-    {$m.titre}: <input name="nb[{$m.item_id}]" size="1" value="1"/>
+    {$m.titre}&nbsp;: <input name="nb[{$m.item_id}]" size="1" value="1"/>
     {foreachelse}
-    Nombre: <input name="nb[1]" size="1" value="1" />
+    Nombre&nbsp;: <input name="nb[1]" size="1" value="1" />
     {/foreach}
     {/if}
     <input type="submit" />
@@ -249,14 +265,14 @@ entrer un montant négatif.
 </p>
 
 <p class="descr">
-Note que tu peux cliquer sur les noms des membres pour remplir automatiquement la case ci-dessous
+Note que tu peux cliquer sur les noms des membres pour remplir automatiquement la case ci-dessous.
 </p>
 
 <form action="{$platal->pl_self()}" method="post" id="montant">
   <p class="descr">
   <input type="hidden" name="adm" value="prix" />
-  Mail: <input name="mail" size="20" />
-  montant: <input name="montant" size="3" value="0,00" /> &euro;
+  Mail&nbsp;: <input name="mail" size="20" />
+  montant&nbsp;: <input name="montant" size="3" value="0,00" /> &euro;
   <input type="submit" />
   </p>
 </form>
index 2b60638..7ae6a65 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index c1e3fc1..1aab7e1 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 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               *}
 {*                                                                        *}
 {**************************************************************************}
-Nom;Prénom;Promotion{if $tout}{foreach from=$moments item=m};{$m.titre}{/foreach}{if $admin && $money};À payer;Payé{/if}{else};Nombre{/if}
+Nom;Prénom;Promotion{if $tout}{foreach from=$moments item=m};{$m.titre}{/foreach}{if $admin && $money};À payer;{if
+$telepayment}Télépaiement;Liquide/Chèque;{/if}Payé{/if}{else};Nombre{/if}
 
 {if $participants}
 {foreach from=$participants item=m}
 
 ;
-{$m.nom};{$m.prenom};{$m.promo}{if $tout}{foreach from=$moments item=i};{$m[$i.item_id]}{/foreach}{if $admin && $money};{$m.montant};{$m.paid}{/if}{else};{$m.nb}{/if}
+{$m.nom};{$m.prenom};{$m.promo}{if $tout}{foreach from=$moments item=i};{$m[$i.item_id]}{/foreach}{if $admin &&
+$money};{$m.montant};{if $telepayment}{$m.telepayment};{$m.adminpaid};{/if}{$m.paid}{/if}{else};{$m.nb}{/if}
 
 {/foreach}
 ;
index 929c725..5a208cc 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -35,7 +35,7 @@ function deadlineChange(box)
 {/literal}
 </script>
 
-<h1>{$asso.nom} : {$evt.intitule|default:"Nouvel événement"}</h1>
+<h1>{$asso.nom}&nbsp;: {$evt.intitule|default:"Nouvel événement"}</h1>
 
 <p class="descr">
   Un événement peut être une réunion, un séminaire, une conférence, un voyage promo,
@@ -45,16 +45,24 @@ function deadlineChange(box)
 <p class="descr">
   Tu as la possibilité, pour un événement donné, de distinguer plusieurs "moments"
   distincts. Par exemple, dans le cas d'une réunion suivie d'un dîner, il peut être
-  utile de comptabiliser les présents à la réunion d'une part, et de compter ceux
+  utile de comptabiliser les présents à la réunion d'une part et de compter ceux
   qui s'inscrivent au repas d'autre part (en général certains participants à la réunion
   ne restent pas pour le dîner...), de sorte que tu sauras combien de chaises prévoir
-  pour le premier "moment" (la réunion), et pour combien de personnes réserver le
+  pour le premier "moment" (la réunion) et pour combien de personnes réserver le
   restaurant.
 </p>
 
 <hr />
 <h2>Description de l'événement</h2>
 
+{if $evt.eid}
+<p class='erreur'>
+  <strong>Attention :</strong> si tu souhaites modifier la structure d'un événement alors
+  que des personnes y sont déjà inscrites, contacte préalablement
+  <a href='mailto:contact@polytechnique.org'>l'équipe de Polytechnique.org</a>.
+</p>
+{/if}
+
 <form method="post" action="{$platal->ns}events/edit/{$url_ref}">
   <table class='bicol' cellspacing='0' cellpadding='0'>
     <colgroup>
@@ -118,17 +126,17 @@ function deadlineChange(box)
         Options&nbsp;:
       </td>
       <td>
-        Montrer la liste des inscrits aux membres :
+        Montrer la liste des inscrits aux membres&nbsp;:
         <input type="radio" name="show_participants" value="1" {if $evt.show_participants}checked="checked"{/if} /> oui
         <input type="radio" name="show_participants" value="0" {if !$evt.show_participants}checked="checked"{/if}/> non
 
         <br />
-        Autoriser les non-membres :
+        Autoriser les non-membres&nbsp;:
         <input type="radio" name="accept_nonmembre" value="1" {if $evt.accept_nonmembre}checked="checked"{/if} /> oui
         <input type="radio" name="accept_nonmembre" value="0" {if !$evt.accept_nonmembre}checked="checked"{/if}/> non
 
         <br />
-        Autoriser les invités :
+        Autoriser les invités&nbsp;:
         <input type="radio" name="noinvite" value="0" {if !$evt.noinvite}checked="checked"{/if} /> oui
         <input type="radio" name="noinvite" value="1" {if $evt.noinvite}checked="checked"{/if}/> non
       </td>
@@ -148,7 +156,7 @@ function deadlineChange(box)
     </tr>
     <tr id="new_pay" style="display:none">
       <td colspan="2">
-        Il faut que tu définisses le texte du mail de confirmation de paiement. Pour ceci, tu peux adapter le modèle qui suit :
+        Il faut que tu définisses le texte du mail de confirmation de paiement. Pour ceci, tu peux adapter le modèle qui suit&nbsp;:
         <ul>
           <li><strong>Remplace les crochets</strong> ([...]) par le texte que tu désires y voir apparaître</li>
           <li>&lt;salutation&gt;, &lt;prenom&gt;, &lt;nom&gt; et &lt;montant&gt; seront <strong>automatiquement</strong> remplacés par les informations adaptées</li>
@@ -192,7 +200,7 @@ A très bientôt,
     </colgroup>
     <tr>
       <td class='titre'>
-        Début :
+        Début&nbsp;:
       </td>
       <td>
         le {html_select_date prefix='deb_' end_year='+5' day_value_format='%02d'
@@ -203,7 +211,7 @@ A très bientôt,
     </tr>
     <tr>
       <td class='titre'>
-        Fin :
+        Fin&nbsp;:
       </td>
       <td>
         le {html_select_date prefix='fin_' end_year='+5' day_value_format='%02d'
@@ -219,15 +227,15 @@ A très bientôt,
       <th colspan="2">Moment {$i}</th>
     </tr>
     <tr>
-      <td class="titre">Intitulé :</td>
+      <td class="titre">Intitulé&nbsp;:</td>
       <td><input type="text" name="titre{$i}" value="{$moment.titre}" size="45" maxlength="100" /></td>
     </tr>
     <tr>
-      <td class="titre">Détails pratiques :</td>
+      <td class="titre">Détails pratiques&nbsp;:</td>
       <td><textarea name="details{$i}" rows="6" cols="45">{$moment.details}</textarea></td>
     </tr>
     <tr>
-      <td class="titre">Tarif :<br /><small>(par participant)</small></td>
+      <td class="titre">Tarif&nbsp;:<br /><small>(par participant)</small></td>
       <td><input type="text" name="montant{$i}" value="{if $moment.montant}{$moment.montant|replace:".":","}{else}0,00{/if}" size="7" maxlength="7" /> &#8364; <small>(0 si gratuit)</small></td>
     </tr>
   {/foreach}
index a676d8d..c577130 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {**************************************************************************}
 
 {if !$is_admin}
-<h1>{$asso.nom} : Evénements</h1>
+<h1>{$asso.nom}&nbsp;: Événements</h1>
 {else}
 <h1>
-  {$asso.nom} 
-  {if $archive}[<a href="{$platal->ns}events">Evénements</a>] {else}Evénements {/if}
+  {$asso.nom}&nbsp;
+  {if $archive}[<a href="{$platal->ns}events">Événements</a>] {else}Événements {/if}
   {if $archive}Archives {else}[<a href="{$platal->ns}events/archive">Archives</a>] {/if}
 </h1>
 
@@ -91,7 +91,7 @@
   </tr>
 
   <tr>
-    <td class="titre">date :</td>
+    <td class="titre">Date&nbsp;:</td>
     <td>
       {if $e.fin and $e.fin neq $e.debut}
         {if $e.debut_day eq $e.fin_day}
   </tr>
 
   <tr>
-    <td class="titre">annonceur :</td>
+    <td class="titre">Annonceur&nbsp;:</td>
     <td>
       <a href='https://www.polytechnique.org/profile/{$e.alias}' class='popup2'>{$e.prenom} {$e.nom} ({$e.promo})</a>
     </td>
 
   {if $is_admin || $e.show_participants || ($e.deadline_inscription && $e.inscr_open)}
   <tr>
-    <td class="titre">Informations :</td>
+    <td class="titre">Informations&nbsp;:</td>
     <td class='actions'>
       {if $is_admin || $e.show_participants}
       <a href="{$platal->ns}events/admin/{$e.short_name|default:$e.eid}">
 
   <tr>
     <td class="titre">
-      État inscription
+      État inscription&nbsp;:
       {if $e.inscr_open}
         <input type="hidden" name="evt_{counter}" value="{$e.eid}" />
       {/if}
         Tu viendras seul
         {else}
         Tu viendras avec {$m.nb-1} personne{if $m.nb > 2}s{/if}
-        {/if} à <em>{$m.titre}</em><br />
+        {/if} à <em>{$m.titre}</em>.<br />
         {/foreach}
       {/if}
 
         Tu dois payer {$e.topay|replace:'.':','}&nbsp;&euro;.
         {elseif $e.paid < $e.topay}
         Tu dois encore payer {math equation="a-b" a=$e.topay b=$e.paid|replace:'.':','}&nbsp;&euro;
-        (tu as déjà payé {$e.paid|replace:'.':','}&nbsp;&euro;)
+        (tu as déjà payé {$e.paid|replace:'.':','}&nbsp;&euro;).
         {else}
         Tu as déjà payé les {$e.paid|replace:'.':','}&nbsp;&euro; de ton inscription.
         {/if}
 
 {if $evenements}
 <p class="descr">
-  En cliquant sur l'icône {icon name=calendar_view_day title="Événement iCal"} associée à un événement
+  En cliquant sur l'icône {icon name=calendar_view_day title="Événement iCal"} associée à un événement,
   tu peux télécharger la version iCal de l'événement qui permet de l'ajouter dans ton agenda électronique.
 </p>
 {/if}
similarity index 97%
rename from templates/xnetevents/mail.new_payment.tpl
rename to templates/xnetevents/newpayment.mail.tpl
index 6278e99..99722cd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index 6c81694..e0c9e5d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Evénement {$event.intitule}</h1>
+<h1>{$asso.nom}&nbsp;: Evénement {$event.intitule}</h1>
 
 <p>
   [<a href="{$platal->ns}events">Revenir à la liste des événements</a>]
@@ -42,7 +42,7 @@
   </strong>
   et a été proposé par
   <a href='https://www.polytechnique.org/profile/{$event.alias}' class='popup2'>
-    {$event.prenom} {$event.nom} ({$event.promo})
+    {$event.prenom} {$event.nom} ({$event.promo}).
   </a>
 </p>
 
@@ -93,7 +93,7 @@
           {elseif $m.nb eq 1}
             Je viendrai{if !$event.noinvite} seul{/if}.
           {else}
-            Je viendrai avec {$m.nb} personne{if $m.nb > 2}s{/if}
+            Je viendrai avec {$m.nb} personne{if $m.nb > 2}s{/if}.
           {/if}
         {/if}
       </td>
           Tu dois payer {$event.topay|replace:'.':','}&nbsp;&euro;.
           {elseif $event.paid < $event.topay}
           Tu dois encore payer {math equation="a-b" a=$event.topay b=$event.paid|replace:'.':','}&nbsp;&euro;
-          (tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro;)
+          (tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro;).
           {else} 
           Tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro; pour ton inscription.
           {/if}
           {elseif $validation && $event.paid < $event.topay}
           <br />Le télépaiement pour cet événement est en instance de validation&nbsp;:<br />
           <input type="checkbox" name="notify_payment" {if $event.notify_payment}checked="checked"{/if} id="notify" />
-          <label for="notify">être prévenu lorsque le télépaiment pour cet événement sera disponible</label>
+          <label for="notify">être prévenu lorsque le télépaiment pour cet événement sera disponible.</label>
           {/if}
         </div>
         {else}
         Rien à payer
         {if $event.paid > 0}
-        (tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro;)
+        (tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro;).
         {/if}.
         {/if}
       </td>
index a58ff06..1e4ee15 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Administration des announces</h1>
+<h1>{$asso.nom}&nbsp;: Administration des announces</h1>
 
 <table class="bicol">
   <tr>
@@ -41,7 +41,7 @@
   <tr>
     <td colspan="3" class="center">
       <a href="{$platal->ns}announce/new">
-        {icon name=add title="Nouvelle annonce"} Ecrire une nouvelle annonce
+        {icon name=add title="Nouvelle annonce"} Écrire une nouvelle annonce.
       </a>
     </td>
   </tr>
index 7af72fe..cb3cc54 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -32,7 +32,7 @@ function visibilityChange(box)
 }
 {/literal}
 </script>
-<h1>{$asso.nom} : Edition d'une annonce</h1>
+<h1>{$asso.nom}&nbsp;: Édition d'une annonce</h1>
 
 {if $art.texte}
 <div>
@@ -41,18 +41,18 @@ function visibilityChange(box)
 </div>
 {/if}
 
-<form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}">
+<form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}" enctype="multipart/form-data">
 <div>
   <table class="bicol">
     <tr>
-      <th colspan="2">Editer une annonce</th>
+      <th colspan="2">Éditer une annonce</th>
     </tr>
     <tr class="pair">
-      <td class="titre">Titre :</td>
+      <td class="titre">Titre&nbsp;:</td>
       <td><input type="text" name="titre" value="{$art.titre}" size="50" maxlength="200" /></td>
     </tr>
     <tr>
-      <td class="titre">Contenu de l'annonce :</td>
+      <td class="titre">Contenu de l'annonce&nbsp;:</td>
       <td>
         <small>
           Le contenu est destiné à recevoir la descriptioin de ce qui est annoncé.
@@ -76,14 +76,14 @@ function visibilityChange(box)
           {/literal}
         </script>
         <small>
-          Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de ligne.
+          Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de lignes.
           Tu en es déjà à <input type='text' name='texte_count' size="4"/> caractères.
           Si tu veux proposer cette annonce pour la Lettre Mensuelle, il faut te limiter à 8 lignes.
         </small>
       </td>
     </tr>
     <tr style="border-top: 1px solid gray">
-      <td class="titre">Contacts :</td>
+      <td class="titre">Contacts&nbsp;:</td>
       <td>
         <small>
           La section "contacts" sert à noter les informations telles que les adresses mails de contact, les sites web.
@@ -98,9 +98,33 @@ function visibilityChange(box)
       </td>
     </tr>
     <tr style="border-top: 1px solid gray">
+      <td class="titre">Illustration&nbsp;:</td>
+      <td>
+        {if $art.id && $art.photo}
+        <div style="float: left; text-align: center">
+          <em>Image actuelle</em><br />
+          <img src="{$platal->ns}announce/photo/{$art.id}" alt="Image actuelle" /><br />
+          <input type="submit" name="valid" value="Pas d'image" />
+          <input type="hidden" name="photo" value="1" />
+        </div>
+        {/if}
+        {if $upload && $upload->exists()}
+        <div style="float: right; text-align: center">
+          <em>Nouvelle image</em><br />
+          <img src="{$platal->ns}announce/photo" alt="Nouvelle Image" /><br />
+          <input type="submit" name="valid" value="Supprimer l'image" />
+        </div>
+        {/if}
+        <div style="clear: both">
+          Choisir un fichier&nbsp;: <input type="file" name="image" id="image" /><br />
+          Indiquer une adresse&nbsp;: <input type="text" name="image_url" id="image_url" value="" />
+        </div>
+      </td>
+    </tr>
+    <tr style="border-top: 1px solid gray">
       <td colspan="2" class="center">
         <a href="wiki_help/notitle" class="popup3">
-          {icon name=information title="Syntaxe wiki"} Voir la liste des marqueurs de mise en forme autorisés
+          {icon name=information title="Syntaxe wiki"} Voir la liste des marqueurs de mise en forme autorisés.
         </a>
       </td>
     </tr>
@@ -109,19 +133,19 @@ function visibilityChange(box)
 
   <table class="tinybicol">
     <tr>
-      <td class="titre">Date de péremption :</td>
+      <td class="titre">Date de péremption&nbsp;:</td>
       <td>
         {valid_date name="peremption" value=$art.peremption}
       </td>
     </tr>
     {if $events}
     <tr>
-      <td class="titre">Attacher à un événement :</td>
+      <td class="titre">Attacher à un événement&nbsp;:</td>
       <td>
         <select name="event">
           <option value="" {if !$art.event}selected="selected"{/if}>-- Aucun --</option>
           {iterate item=evt from=$events}
-          <option value="{$evt.short_name|default:$evt.eid}" 
+          <option value="{$evt.short_name|default:$evt.eid}"
             {if $art.event eq $evt.short_name|default:$evt.eid}selected="selected"{/if}>
             {$evt.intitule}
           </option>
@@ -131,10 +155,10 @@ function visibilityChange(box)
     </tr>
     {/if}
     <tr>
-      <td class="titre">Visibilité :</td>
+      <td class="titre">Visibilité&nbsp;:</td>
       <td>
         <input type="checkbox" name="public" {if $art.public}checked="checked"{/if} onchange="visibilityChange(this)" />
-        Rendre cette annonce publique
+        Rendre cette annonce publique.
       </td>
     </tr>
     <tr id="promo_titre" {if $art.public}style="display: none"{/if}>
@@ -167,7 +191,7 @@ function visibilityChange(box)
     <tr class="pair">
       <td colspan="2">
         <small>Les demandes de publication sont soumises à validation par l'équipe
-        de Polytechnique.org</small>
+        de Polytechnique.org.</small>
       </td>
     </tr>
     {/if}
@@ -179,7 +203,7 @@ function visibilityChange(box)
     {/if}
     <input type="submit" name="valid" value="Visualiser" /><br />
     {if $art.texte}
-    <input type="submit" name="valid" value="Enregistrer" /> 
+    <input type="submit" name="valid" value="Enregistrer" />
     {if !$new}
     <input type="submit" name="valid" value="Annuler" />
     {/if}
index 4d1b517..caec126 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
       <title>{$line.titre|strip_tags}</title>
       <guid isPermaLink="false">{$line.id}</guid>
       <link>{#globals.baseurl#}/{$asso.diminutif}/#art{$line.id}</link>
-      <description><![CDATA[{$line.texte|miniwiki}{if $line.contacts}<br/><br/><strong>Contacts :</strong><br/>{$line.contacts|miniwiki}{/if}]]></description>
+      <description><![CDATA[
+        {if $line.photo}
+        <div style="float: left; padding-right: 0.5em">
+          <img src="{#globals.baseurl#}/{$asso.diminutif}/announce/photo/{$line.id}" alt="{$line.titre|strip_tags}" />
+        </div>
+        {/if}
+        <div>{$line.texte|miniwiki}{if $line.contacts}<br/><br/><strong>Contacts&nbsp;:</strong><br/>{$line.contacts|miniwiki}{/if}</div>]]></description>
       <author>{$line.prenom} {$line.nom} (X{$line.promo})</author>
       <pubDate>{$line.create_date|rss_date}</pubDate>
     </item>
index d94faf8..bccc36f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -32,7 +32,7 @@
   {/foreach}
 </ul>
 
-<h2>non Polytechniciens</h2>
+<h2>Non polytechniciens</h2>
 <ul>
   {foreach from=$not_in_group_ext item=n}
   <li>{$n} [<a href='{$platal->ns}member/new/{$n}' class='popup'>l'inscrire</a>]</li>
@@ -41,7 +41,7 @@
   {/foreach}
 </ul>
 
-<h2>Comparer une liste et l'annuaire</h2>
+<h1>Comparer une liste et l'annuaire</h1>
 
 <table cellspacing="2" cellpadding="0" class="tiny">
   <tr>
index 28bdbd7..8b42863 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Annuaire du groupe </h1>
+<h1>{$asso.nom}&nbsp;: Annuaire du groupe </h1>
 
 <p class="descr">
-Le groupe {$asso.nom} compte {$nb_tot} membres.
+Le groupe {$asso.nom} compte {$nb_tot} membres&nbsp;:
 </p>
 
-<p class="descr">
-Les membres extérieurs du groupe sont intégrés à cette liste, et repérés par l'inscription 'extérieur' dans la colonne promotion.
-</p>
-
-<p class="descr">
-Tu peux également :
-</p>
 <ul class="descr">
   {if $is_admin}
   <li>
@@ -44,7 +37,7 @@ Tu peux également :
   <li>
     <a href="{$platal->ns}admin/annuaire">
       {icon name=wand title="Synchroniser"} 
-      Synchroniser annuaire et Listes de diffusion
+      Synchroniser annuaire et listes de diffusion
     </a>
   </li>
   {/if}
@@ -63,7 +56,7 @@ Tu peux également :
 
 <p class="center">
 [<a href="{$platal->ns}annuaire?order={$smarty.request.order}" {if !$only_admin}class="erreur"{/if}>tous les membres</a>]
-[<a href="{$platal->ns}annuaire?order={$smarty.request.order}&amp;admin=1" {if $only_admin}class="erreur"{/if}>administrateurs</a>]<br/>
+[<a href="{$platal->ns}annuaire?order={$smarty.request.order}&amp;admin=1" {if $only_admin}class="erreur"{/if}>animateurs</a>]<br/>
 {foreach from=$alphabet item=c}
 {if $c}
 [<a href="{$platal->ns}annuaire?{$group}={$c}&amp;order={$smarty.request.order}{if $only_admin}&amp;admin=1{/if}"{if $request_group eq $c} class="erreur"{/if}>{$c}</a>]
@@ -141,7 +134,7 @@ Tu peux également :
 
 {if $broken}
 <p class="smaller">
-  {icon name=error} : Un camarade signalé par ce symbole n'a plus d'adresse de redirection et ne peut donc
+  {icon name=error}&nbsp;: Un camarade signalé par ce symbole n'a plus d'adresse de redirection et ne peut donc
   plus être contacté via son adresse polytechnique.org. Si tu connais sa nouvelle adresse, tu peux nous la communiquer en
   cliquant sur le symbole.
 </p>
index d1f72af..4175ea8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Accueil</h1>
+<h1>{$asso.nom}&nbsp;: Accueil</h1>
 
 <table cellpadding="0" cellspacing="0" class='tiny'>
   {if $asso.site}
@@ -62,7 +62,7 @@
   {if !$is_member && $is_logged && $asso.inscriptible && $xnet_type != 'promotions'}
   <tr>
     <td class="titre">
-      M'inscrire :
+      M'inscrire&nbsp;:
     </td>
     <td>
       <a href="{if $asso.sub_url}{$asso.sub_url}{else}{$platal->ns}subscribe{/if}">m'inscrire</a>
@@ -71,7 +71,7 @@
   {elseif $is_member}
   <tr>
     <td class="titre">
-      Me désinscrire :
+      Me désinscrire&nbsp;:
     </td>
     <td>
       <a href="{if $asso.unsub_url}{$asso.unsub_url}{else}{$platal->ns}unsubscribe{/if}">me désinscrire</a>
 
 <p style="text-align: justify;">
 <small>
-<em>Nota Bene :</em> les informations présentées ici n'engagent que leurs auteurs
+<em>Nota Bene&nbsp;:</em> les informations présentées ici n'engagent que leurs auteurs
 respectifs et sont publiées à leur initiative. L'association Polytechnique.org
 ne pourrait en aucun cas être tenue responsable de la nature des propos relatés
 sur cet espace d'expression et d'information. Elle se réserve le droit de
index bf0dfe0..9049117 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Éditer l'accueil</h1>
+<h1>{$asso.nom}&nbsp;: Éditer l'accueil</h1>
 
 <form method="post" action="{$platal->ns}edit" enctype="multipart/form-data">
   {if $super}
   <table cellpadding="0" cellspacing="0" class='tiny'>
     <tr>
       <td class="titre">
-        Nom:
+        Nom&nbsp;:
       </td>
       <td>
         <input type="text" size="40" value="{$asso.nom}" name="nom" />
@@ -35,7 +35,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Diminutif:
+        Diminutif&nbsp;:
       </td>
       <td>
         <input type="text" size="40" value="{$asso.diminutif}" name="diminutif" />
@@ -43,7 +43,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Domaine DNS:
+        Domaine DNS&nbsp;:
       </td>
       <td>
         <input type="text" size="40" value="{$asso.mail_domain}" name="mail_domain" />
@@ -51,7 +51,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Catégorie :
+        Catégorie&nbsp;:
       </td>
       <td>
         <select name="cat">
@@ -64,7 +64,7 @@
     </tr>
     <tr>
       <td class="titre">
-        Domaine:
+        Domaine&nbsp;:
       </td>
       <td>
         <select name="dom">
@@ -81,7 +81,7 @@
   <table cellpadding="0" cellspacing="0" class='tiny'>
     <tr>
       <td class="titre">
-        Logo:
+        Logo&nbsp;:
       </td>
       <td>
         <input type="file" name="logo" />
@@ -90,7 +90,7 @@
 
     <tr>
       <td class="titre">
-        Site Web:
+        Site web&nbsp;:
       </td>
       <td>
         <input type="text" size="40" value="{$asso.site}" name="site" />
@@ -99,7 +99,7 @@
 
     <tr>
       <td class="titre">
-        Contact:
+        Contact&nbsp;:
       </td>
       <td>
         <input type="text" size="40" name="resp" value="{$asso.resp}" />
 
     <tr>
       <td class="titre">
-        Adresse mail:
+        Adresse mail&nbsp;:
       </td>
       <td>
         <input type="text" size="40" name="mail" value="{$asso.mail}" />
 
     <tr>
       <td class="titre">
-        Forum:
+        Forum&nbsp;:
       </td>
       <td>
         <input type="text" size="40" name="forum" value="{$asso.forum}" />
 
     <tr>
       <td class="titre">
-        Inscription possible:
+        Inscription possible&nbsp;:
       </td>
       <td>
         <input type="radio" value="1" id="inscr_yes"
 
     <tr>
       <td class="titre">
-        Lien pour l'inscription:<br />
+        Lien pour l'inscription&nbsp;:<br />
         <em>laisser vide par défaut</em>
       </td>
       <td>
 
     <tr>
       <td class="titre">
-        Lien pour la désinscription:<br/>
+        Lien pour la désinscription&nbsp;:<br/>
         <em>laisser vide par défaut</em>
       </td>
       <td>
     <div id="preview_descr" style="display: none; text-align: justify"></div>
     <br />
     <a href="wiki_help" class="popup3">
-      {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée pour la description
+      {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée pour la description.
     </a>
     <textarea name="descr" cols="70" rows="15" id="descr"
               {if !$asso.wiki_desc && $asso.descr}class="error"{/if}>{$asso.descr}</textarea>
index fecbd7d..961bd54 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 <table class="tinybicol" id="art{$art.id}">
   <tr>
-    <th>
+    <th {if $art.photo}colspan="2"{/if}>
       {if $is_logged && !$admin}
       <div style="float: right">
         {if $is_admin}
       </div>
       {/if}
       {tidy}
-      {if $admin}Aperçu de : {/if}{$art.titre}
+      {if $admin}Aperçu de&nbsp;: {/if}{$art.titre}
       {/tidy}
     </th>
   </tr>
   <tr>
+    {if $art.photo}
+    <td rowspan="{if ($is_logged || $admin) && $art.contacts}3{else}2{/if}" style="width: 100px">
+      <img src="{$platal->ns}announce/photo/{$art.id}" alt="{$art.titre}" style="width: 100px" /> 
+    </td>
+    {/if}
     <td style="padding-bottom: 1em">
       {$art.texte|miniwiki|smarty:nodefaults}
     </td>
   </tr>
   {if ($is_logged || $admin) && $art.contacts}
   <tr class="pair">
-    <td class="titre">Contacts :</td>
+    <td class="titre">Contacts&nbsp;:</td>
   </tr>
   <tr class="pair">
     <td style="padding-left: 20px">
@@ -58,7 +63,7 @@
   </tr>
   {/if}
   <tr class="pair">
-    <td>
+    <td {if $art.photo}colspan="2"{/if}>
       <div style="float: right">
       <small>
         Annonce proposée par
index e36412b..17d200e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Forum</h1>
+<h1>{$asso.nom}&nbsp;: Forum</h1>
 
 {$banana|smarty:nodefaults}
 
 <p>
   Cette page utilise les <a href="https://www.polytechnique.org/banana/profile">préférences</a> de Polytechnique.org.<br />
   Tu peux également retrouver tous les forums en te rendant à la rubrique
-  <a href="https://www.polytechnique.org/banana">Forums &amp; PA</a>
+  <a href="https://www.polytechnique.org/banana">Forums &amp; PA</a>.
 </p>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 1a9c303..6306877 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -25,7 +25,7 @@
 {if $u && $is_admin && $show_form}
 
 <h2>
-  Demande de la part de : {$prenom} {$nom} (X{$promo})
+  Demande de la part de&nbsp;: {$prenom} {$nom} (X{$promo})
   <a href="https://www.polytechnique.org/profile/{$u}">Voir sa fiche</a>
 </h2>
 <form action="{$platal->ns}subscribe/{$u}" method="post">
 <p class="descr">
 Pour t'inscrire à {$asso.nom}, il te faut en demander l'autorisation aux animateurs du groupe via le
 formulaire ci-dessous. Vérifie et corrige au besoin les différents champs, puis clique sur
-[&nbsp;m'inscrire&nbsp;]
+[&nbsp;M'inscrire&nbsp;!&nbsp;].
 </p>
 <form action="{$platal->ns}subscribe" method="post">
   <p class="descr">
-  <strong>OUI, je souhaite être inscrit au groupe {$asso.nom}</strong>
+  <strong>OUI, je souhaite être inscrit au groupe {$asso.nom}.</strong>
   </p>
   <p class="descr">
-  Indique ci-après <strong>tes motivations</strong> qui seront communiquées aux animateurs du groupe :
+  Indique ci-après <strong>tes motivations</strong> qui seront communiquées aux animateurs du groupe&nbsp;:
   </p> <textarea cols=80 rows=12 name="message">
 Chers Camarades,
 
@@ -69,7 +69,7 @@ Bien cordialement,
 {$smarty.session.prenom} {$smarty.session.nom} (X{$smarty.session.promo})
 
 --
-Ma fiche sur Polytechnique.org :
+Ma fiche sur Polytechnique.org&nbsp;:
 https://www.polytechnique.org/profile/{$smarty.session.forlife}
 </textarea>
   <div class="center">
index 911201b..88d4a3e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {**************************************************************************}
 
 
-<h1>{$asso.nom} : Envoyer un mail</h1>
+<h1>{$asso.nom}&nbsp;: Envoyer un mail</h1>
 
 <p class="descr">
-Ton message peut être personnalisé : si tu rentres les mots &lt;cher&gt;, &lt;prenom&gt;,
+Ton message peut être personnalisé&nbsp;: si tu rentres les mots &lt;cher&gt;, &lt;prenom&gt;,
 &lt;nom&gt;, ces mots seront remplacés, pour chacun des destinataires, par "cher" accordé au
 masculin ou féminin, par son prénom, ou son nom.
 </p>
@@ -45,17 +45,17 @@ masculin ou féminin, par son prénom, ou son nom.
 <form action="{$platal->ns}mail" method="post" enctype="multipart/form-data">
   <table class='bicol'>
     <tr>
-      <th colspan="2">Ecrire un mail :</th>
+      <th colspan="2">Écrire un mail&nbsp;:</th>
     </tr>
     <tr>
-      <td class="titre">Expéditeur :</td>
+      <td class="titre">Expéditeur&nbsp;:</td>
       <td>
         <input type="text" name="from" size="55" maxlength="70"
           value="{if $smarty.request.from}{$smarty.request.from}{else}&quot;{$smarty.session.prenom} {$smarty.session.nom}&quot; <{$smarty.session.bestalias}@polytechnique.org>{/if}" />
       </td>
     </tr>
     <tr>
-      <td class="titre">Répondre à :</td>
+      <td class="titre">Répondre à&nbsp;:</td>
       <td>
         <input type="text" name="replyto" size="55" maxlength="70" value="{$smarty.request.replyto}" />
       </td>
@@ -97,7 +97,7 @@ masculin ou féminin, par son prénom, ou son nom.
     </tr>
     <tr>
       <td class="titre">
-        Sujet :
+        Sujet&nbsp;:
       </td>
       <td><input type="text" name="sujet" value="{$smarty.request.sujet|default:"remplir le sujet ..."}" size=55 maxlength=70></td>
     </tr>
index 75ea89f..7b674d2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -52,13 +52,13 @@ function searchX()
 {/literal}
 //]]></script>
 
-<h1>{$asso.nom} : Ajout d'un membre</h1>
+<h1>{$asso.nom}&nbsp;: Ajout d'un membre</h1>
 
 <form method="post" action="{$platal->ns}member/new/">
   <ul class='descr'>
     <li>
       Pour ajouter un X dans ton groupe, il suffit d'entrer ici une de ses
-      adresses mail @polytechnique.org. Sil n'est pas inscrit à Polytechnique.org
+      adresses mail @polytechnique.org. S'il n'est pas inscrit à Polytechnique.org
       coche la case qui se trouve sous le formulaire et indique ses noms, prénoms et
       promotions.
     </li>
@@ -79,19 +79,19 @@ function searchX()
     <tr>
       <td colspan="2">
         <input type="checkbox" id="x" name="x" onchange="xStateChange(this);" />
-        <label for="x">Coche cette case si il s'agit d'un X non inscrit à Polytechnique.org</label>
+        <label for="x">Coche cette case si il s'agit d'un X non inscrit à Polytechnique.org.</label>
       </td>
     </tr>
     <tr id="xnom" style="display: none">
-      <td class="titre">Nom :</td>
+      <td class="titre">Nom&nbsp;:</td>
       <td><input type="text" id="nom" name="nom" size="20" value="" onkeyup="searchX();" /></td>
     </tr>
     <tr id="xprenom" style="display: none">
-      <td class="titre">Prénom :</td>
+      <td class="titre">Prénom&nbsp;:</td>
       <td><input type="text" id="prenom" name="prenom" size="20" value="" onkeyup="searchX();" /></td>
     </tr>
     <tr id="xpromo" style="display: none">
-      <td class="titre">Promotion :</td>
+      <td class="titre">Promotion&nbsp;:</td>
       <td><input type="text" id="promo" name="promo" size="4" value="" onkeyup="searchX();" /></td>
     </tr>
     <tr id="xsearch" style="display: none" class="pair">
index 2bc0ecb..ad51b2e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 {else}
  
-<h1>{$asso.nom} : gestion des membres</h1>
+<h1>{$asso.nom}&nbsp;: gestion des membres</h1>
 
 <h2>
-  Suppression du membre : {$user.prenom} {$user.nom}
+  Suppression du membre&nbsp;: {$user.prenom} {$user.nom}
 </h2>
 
 
   <div class="center">
     <p class="descr">
     {if $self}
-    Etes-vous sûr de vouloir vous désinscrire du groupe {$asso.nom} et de toutes
+    Êtes-vous sûr de vouloir vous désinscrire du groupe {$asso.nom} et de toutes
     les listes de diffusion associées ?
     {else}
-    Etes-vous sûr de vouloir supprimer {$user.prenom} {$user.nom} du groupe,
-    lui retirer tous les droits associés à son statut de membre,
+    Êtes-vous sûr de vouloir supprimer {$user.prenom} {$user.nom} du groupe,
+    lui retirer tous les droits associés à son statut de membre
     et le désabonner de toutes les listes de diffusion du groupe ?
     {/if}
     </p>
index 7b3bb5f..23db813 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -40,7 +40,7 @@
 {/literal}
 </script>
 
-<h1>{$asso.nom} : gestion des membres</h1>
+<h1>{$asso.nom}&nbsp;: gestion des membres</h1>
 
 <p>
 [<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
@@ -72,7 +72,7 @@
     {if $user.origine neq X}
     <tr class="impair">
       <td class="titre">
-        Type d'utilisateur :
+        Type d'utilisateur&nbsp;:
       </td>
       <td>
         <select name="origine" onchange="showInformations(this); return true">
@@ -83,7 +83,7 @@
     </tr>
     <tr id="prenom" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
       <td class="titre">
-        Prénom :
+        Prénom&nbsp;:
       </td>
       <td>
         <input type="text" value="{$user.prenom}" name="prenom" size="40" />
@@ -91,7 +91,7 @@
     </tr>
     <tr class="impair">
       <td class="titre">
-        Nom :
+        Nom&nbsp;:
       </td>
       <td>
         <input type="text" value="{$user.nom}" name="nom" size="40" />
@@ -99,7 +99,7 @@
     </tr>
     <tr id="sexe" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
       <td class="titre">
-        Sexe :
+        Sexe&nbsp;:
       </td>
       <td>
         <select name="sexe">
     <tr id="make_X" {if $user.origine eq "groupe"}style="display: none"{/if}>
       <td colspan="2">
         <span id="make_X_cb">
-          <input type="checkbox" name="is_x" id="is_x" onchange="showXInput(this);" />
+          <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" />
           <label for="is_x">coche cette case si il s'agit d'un X</label>
         </span>
         <span id="make_X_login" style="display: none">
       <td>
         <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
       </td>
-      <td>{$liste.desc}</td>
+      <td>{$liste.desc|smarty:nodefaults}</td>
       <td class='right'>{$liste.nbsub}</td>
     </tr>
     {foreachelse}
index 701f8f3..f2d7cfd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {**************************************************************************}
 
   {if !$choix}
-  Les critères de recherche ne sont pas assez précis
+  Les critères de recherche ne sont pas assez précis.
   {elseif !$choix->total()}
-  Aucun camarade non-inscrit ne correspond aux informations fournies
+  Aucun camarade non-inscrit ne correspond aux informations fournies.
   {elseif $choix->total()}
-  Camarades correspondants :
+  Camarades correspondants&nbsp;:
   <select name="userid" onchange="document.getElementById('marketing').style.display = (this.value == 0 ? 'none' : '')">
     <option value="0"></option>
     {iterate item=x from=$choix}
@@ -37,8 +37,8 @@
         onchange="document.getElementById('from').style.display = (this.checked ? '' : 'none')"/>
     Lui envoyer un marketing
     <select name="market_from" id="from">
-      <option value="user" selected="selected">de ta part</option>
-      <option value="staff">de la part de Polytechnique.org</option>
+      <option value="user" selected="selected">de ta part.</option>
+      <option value="staff">de la part de Polytechnique.org.</option>
     </select>
   </span>
   {/if}
index 22159b5..1b25671 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
index cad04ca..a22df5f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 <h1>Création d'un alias</h1>
 <p class='descr'>
-Les alias sont concus pour répondre aux problèmes suivants :
+Les alias sont conçus pour répondre aux problèmes suivants&nbsp;:
 </p>
 <ul class='descr'>
   <li>
-  redirections pour les postes des gens au sein du groupe : par exemple il est pratique d'avoir un alias
-  president@..., ou bien tresorier@... qui pointent tout le temps vers la bonne personne du groupe.
-  Une sorte d'adresse de «redirection à vie».
+  redirections pour les postes des gens au sein du groupe&nbsp;: par exemple il est pratique d'avoir un alias
+  president@... ou bien tresorier@... qui pointent tout le temps vers la bonne personne du groupe.
+  Une sorte d'adresse de «redirection à vie» ;
   </li>
   <li>
-  listes de diffusions pour de petits nombres de personnes (bureau@ ...)
+  listes de diffusions pour de petits nombres de personnes (bureau@ ...) ;
   </li>
   <li>
-  listes à vie courte (liste créée pour l'organisation d'un évenement ponctuel par exemple)
+  listes à vie courte (liste créée pour l'organisation d'un évenement ponctuel par exemple) ;
   </li>
   <li>
   fédérer plusieurs listes/alias sous un même nom (ce que ne peuvent faire les listes de diffusion).
@@ -42,7 +42,7 @@ Les alias sont concus pour répondre aux problèmes suivants :
 </ul>
 
 <p class='descr'>
-Pour les autres besoins de communications (notament pour un grand nombre de personnes, et pour bénéficier des outils
+Pour les autres besoins de communications (notament pour un grand nombre de personnes et pour bénéficier des outils
 de modération), il est recommandé de créer <a href="{$platal->ns}lists/create">une liste de diffusion</a>.
 </p>
 <form action='{$platal->ns}alias/create' method='post'>
index ff27b2e..3e92715 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom} : Création d'une liste de diffusion</h1>
+<h1>{$asso.nom}&nbsp;: Création d'une liste de diffusion</h1>
 
 <p class="descr">
-<strong>Note :</strong> Les listes de diffusion sont un outil particulièrement adapté pour des
-échanges entre 6 personnes, ou plus (newsletter, débat interne au groupe ...). En revanche, elles
+<strong>Note&nbsp;:</strong> les listes de diffusion sont un outil particulièrement adapté pour des
+échanges entre 6 personnes ou plus (newsletter, débat interne au groupe ...). En revanche, elles
 s'avèrent peu praticables pour des discussions plus restreintes.  Il est alors préférable
 d'utiliser <a href="{$platal->ns}alias/create">un alias</a>, à la gestion beaucoup plus souple.
 </p>
@@ -36,63 +36,74 @@ Si tu as besoin de cette fonctionnalité, il faut alors <strong>impérativement<
 <form action='{$platal->ns}lists/create' method='post'>
   <table class="large">
     <tr>
-      <th colspan='2'>Caractéristiques de la Liste</th>
+      <th colspan='4'>Caractéristiques de la Liste</th>
     </tr>
     <tr>
       <td><strong>Addresse&nbsp;souhaitée&nbsp;:</strong></td>
-      <td>
+      <td colspan='3'>
         <input type='text' name='liste' value='{$smarty.post.liste}' />@{$asso.mail_domain}
       </td>
     </tr>
     <tr>
-      <td><strong>Sujet (bref) :</strong></td>
-      <td>
+      <td><strong>Sujet (bref)&nbsp;:</strong></td>
+      <td colspan='3'>
         <input type='text' name='desc' size='40' value="{$smarty.post.desc}" />
       </td>
     </tr>
     <tr>
-      <td><strong>Propriétés :</strong></td>
-      <td>
-        <table style='width: 100%' class="normal">
-          <tr>
-            <td>visibilité :</td>
-            <td>
-              <input type='radio' name='advertise' value='0'
-              {if $smarty.post.advertise && $smarty.post}checked='checked'{/if} />publique
-            </td>
-            <td>
-              <input type='radio' name='advertise' value='1'
-              {if !$smarty.post.advertise || !$smarty.post}checked='checked'{/if} />privée
-            </td>
-            <td></td>
-          </tr>
-          <tr>
-            <td>diffusion :</td>
-            <td>
-              <input type='radio' name='modlevel' value='0'
-              {if !$smarty.post.modlevel}checked='checked'{/if} />libre
-            </td>
-            <td>
-              <input type='radio' name='modlevel' value='1'
-              {if $smarty.post.modlevel eq 1}checked='checked'{/if} />restreinte
-            </td>
-            <td><input type='radio' name='modlevel' value='2'
-              {if $smarty.post.modlevel eq 2}checked='checked'{/if} />modérée
-            </td>
-          </tr>
-          <tr>
-            <td>inscription :</td>
-            <td>
-              <input type='radio' name='inslevel' value='0'
-              {if !$smarty.post.inslevel && $smarty.post}checked='checked'{/if} />libre
-            </td>
-            <td>
-              <input type='radio' name='inslevel' value='1'
-              {if $smarty.post.inslevel || !$smarty.post}checked='checked'{/if} />modérée
-            </td>
-            <td></td>
-          </tr>
-        </table>
+      <td style="border: 0; border-right: 1px solid gray"><strong>Propriétés&nbsp;:</strong></td>
+      <td colspan='3' style="border: 0"></td>
+    </tr>
+    <tr>
+      <td style="border: 0; border-right: 1px solid gray">
+        visibilité&nbsp;:<br/><span style='font-size: xx-small;'>
+        (qui peut la voir dans la liste des listes&nbsp;?)</span>
+      </td>
+      <td style="border: 0">
+        <label><input type='radio' name='advertise' value='0'
+        {if $smarty.post.advertise && $smarty.post}checked='checked'{/if} />publique<br/>
+        <span style='font-size: xx-small;'>(tous les membres)</span></label>
+      </td>
+      <td colspan='2' style="border: 0">
+        <label><input type='radio' name='advertise' value='1'
+        {if !$smarty.post.advertise || !$smarty.post}checked='checked'{/if} />privée<br/>
+        <span style='font-size: xx-small;'>(seuls ceux inscrits à cette liste)</span></label>
+      </td>
+    </tr>
+    <tr>
+      <td style="border: 0; border-right: 1px solid gray">
+        diffusion&nbsp;:<br/><span style='font-size: xx-small;'>
+        (l'envoi d'un mail à cette liste est-il modéré&nbsp;?)</span>
+      </td>
+      <td style="border: 0">
+        <label><input type='radio' name='modlevel' value='0'
+        {if !$smarty.post.modlevel}checked='checked'{/if} />libre<br/><small>(non)</small></label>
+      </td>
+      <td style="border: 0">
+        <label><input type='radio' name='modlevel' value='1'
+        {if $smarty.post.modlevel eq 1}checked='checked'{/if} />restreinte<br/>
+        <small>(oui, si l'expéditeur n'appartient pas à la liste)</small></label>
+      </td>
+      <td style="border: 0">
+        <label><input type='radio' name='modlevel' value='2'
+        {if $smarty.post.modlevel eq 2}checked='checked'{/if} />modérée<br/>
+        <small>(oui, tout le temps)</small></label>
+      </td>
+    </tr>
+    <tr>
+      <td style="border: 0; border-right: 1px solid gray">
+        inscription&nbsp;:<br/><span style='font-size: xx-small;'>
+        (l'inscription à cette liste est-elle modérée&nbsp;?)</span>
+      </td>
+      <td style="border: 0">
+        <label><input type='radio' name='inslevel' value='0'
+        {if !$smarty.post.inslevel && $smarty.post}checked='checked'{/if} />libre<br/>
+        <small>(non)</small></label>
+      </td>
+      <td colspan='2' style="border: 0">
+        <label><input type='radio' name='inslevel' value='1'
+        {if $smarty.post.inslevel || !$smarty.post}checked='checked'{/if} />modérée<br/>
+        <small>(oui)</small></label>
       </td>
     </tr>
   </table>
index cc3beef..f2ad857 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -33,9 +33,9 @@
 
 {else}
 
-<h1>{$asso.nom} : Listes de diffusion</h1>
+<h1>{$asso.nom}&nbsp;: Listes de diffusion</h1>
 
-<h2>Listes de diffusion du groupe {$asso.nom} :</h2>
+<h2>Listes de diffusion du groupe {$asso.nom}&nbsp;:</h2>
 
 <p class="descr">
 Une liste dont <strong>la diffusion</strong> est modérée est une liste dont les mails sont validés
@@ -100,12 +100,12 @@ croix verte te permet de t'inscrire, après accord des responsables si l'inscrip
 </table>
 
 <p class="descr">
-{icon name=wrench title="Modérateur"} tu es {if $smarty.session.femme}modératrice{else}moderateur{/if} sur cette liste<br />
+{icon name=wrench title="Modérateur"} tu es {if $smarty.session.femme}modératrice{else}moderateur{/if} sur cette liste.<br />
 {icon name=weather_cloudy title="Liste privée"} cette liste est invisible aux non-membres de la liste. S'en désabonner
 t'empêcherait de t'y réabonner par la suite sans l'aide d'un administrateur.
 </p>
         
-<h2>Voici les alias existants pour le groupe {$asso.nom} :</h2>
+<h2>Voici les alias existants pour le groupe {$asso.nom}&nbsp;:</h2>
 
 <table cellspacing="0" cellpadding="0" class='large'>
   <tr>
index c0cf255..8cfad99 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
diff --git a/upgrade/0.9.16/00_profile.sql b/upgrade/0.9.16/00_profile.sql
new file mode 100644 (file)
index 0000000..8e37d18
--- /dev/null
@@ -0,0 +1,13 @@
+create table watch_profile (
+  uid int(5) unsigned not null,
+  ts timestamp not null default CURRENT_TIMESTAMP,
+  field enum('nom', 'freetext', 'mobile', 'nationalite', 'nick', 'web', 'appli1', 'appli2',
+             'addresses', 'section', 'binets', 'medals', 'cv', 'jobs', 'photo'),
+
+  primary key field (uid, field)
+) charset=utf8;
+
+
+alter table auth_user_quick change column profile_freetext profile_freetext mediumtext;
+
+# vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/01_utf8.sql b/upgrade/0.9.16/01_utf8.sql
new file mode 100644 (file)
index 0000000..dc4b3ab
--- /dev/null
@@ -0,0 +1,2 @@
+ALTER DATABASE `x4dat` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+
diff --git a/upgrade/0.9.16/02_axletter.sql b/upgrade/0.9.16/02_axletter.sql
new file mode 100644 (file)
index 0000000..175996c
--- /dev/null
@@ -0,0 +1,3 @@
+alter table axletter change column shortname short_name varchar(16) unique key;
+
+# vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/03_mail_storage.sql b/upgrade/0.9.16/03_mail_storage.sql
new file mode 100644 (file)
index 0000000..9542977
--- /dev/null
@@ -0,0 +1,4 @@
+ALTER TABLE auth_user_md5 ADD COLUMN mail_storage SET('imap', 'googleapps') DEFAULT '' NOT NULL AFTER smtppass;
+UPDATE auth_user_md5 SET mail_storage = 'imap';
+
+# vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/04_ip.sql b/upgrade/0.9.16/04_ip.sql
new file mode 100644 (file)
index 0000000..4fcd93a
--- /dev/null
@@ -0,0 +1,42 @@
+USE logger;
+
+ALTER TABLE sessions
+ADD COLUMN ip2 INT(11) UNSIGNED NOT NULL,
+ADD COLUMN forward_ip2 INT(11) UNSIGNED DEFAULT NULL;
+
+UPDATE sessions
+   SET ip2 = SUBSTRING_INDEX(ip, ".", 1) * 256 * 256 * 256
+           + SUBSTRING_INDEX(SUBSTRING_INDEX(ip, ".", 2), ".", -1) * 256 * 256
+           + SUBSTRING_INDEX(SUBSTRING_INDEX(ip, ".", 3), ".", -1) * 256
+           + SUBSTRING_INDEX(ip, ".", -1),
+       forward_ip2 = SUBSTRING_INDEX(forward_ip, ".", 1) * 256 * 256 * 256
+                   + SUBSTRING_INDEX(SUBSTRING_INDEX(forward_ip, ".", 2), ".", -1) * 256 * 256
+                   + SUBSTRING_INDEX(SUBSTRING_INDEX(forward_ip, ".", 3), ".", -1) * 256
+                   + SUBSTRING_INDEX(forward_ip, ".", -1);
+
+ALTER TABLE sessions
+DROP COLUMN ip,
+DROP COLUMN forward_ip,
+CHANGE COLUMN ip2 ip INT(11) UNSIGNED NOT NULL,
+CHANGE COLUMN forward_ip2 forward_ip INT(11) UNSIGNED DEFAULT NULL,
+ADD INDEX ip (ip),
+ADD INDEX forward_ip (forward_ip);
+
+USE x4dat;
+
+ALTER TABLE ip_watch
+ADD COLUMN ip2 INT(11) UNSIGNED NOT NULL;
+
+UPDATE ip_watch
+   SET ip2 = SUBSTRING_INDEX(ip, ".", 1) * 256 * 256 * 256
+           + SUBSTRING_INDEX(SUBSTRING_INDEX(ip, ".", 2), ".", -1) * 256 * 256
+           + SUBSTRING_INDEX(SUBSTRING_INDEX(ip, ".", 3), ".", -1) * 256
+           + SUBSTRING_INDEX(ip, ".", -1);
+
+ALTER TABLE ip_watch
+DROP PRIMARY KEY,
+DROP COLUMN ip,
+CHANGE COLUMN ip2 ip INT(11) UNSIGNED NOT NULL,
+ADD PRIMARY KEY ip (ip);
+
+# vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/05_xnet_announce_photo.sql b/upgrade/0.9.16/05_xnet_announce_photo.sql
new file mode 100644 (file)
index 0000000..97d3d40
--- /dev/null
@@ -0,0 +1,16 @@
+use groupex;
+
+CREATE TABLE `announces_photo` (
+  `eid` smallint(4) unsigned NOT NULL,
+  `attachmime` enum('jpeg','png','gif') NOT NULL default 'jpeg',
+  `attach` blob NOT NULL,
+  `x` smallint(5) unsigned NOT NULL default '0',
+  `y` smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (`eid`)
+) CHARSET=utf8;
+
+alter table groupex.announces change column flags flags set('public', 'photo') not null;
+
+use x4dat;
+
+# vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/06_google_apps.sql b/upgrade/0.9.16/06_google_apps.sql
new file mode 100644 (file)
index 0000000..1ad53f3
--- /dev/null
@@ -0,0 +1,86 @@
+-- This SQL table comes from the 'gapps-daemon' project.
+
+-- Table `gapps_reporting`.
+-- The table contains daily statistics of the Google Apps domain. They are
+-- obtained with the Summary and Actvity reports of the Google Apps Reorting
+-- API.
+CREATE TABLE IF NOT EXISTS `gapps_reporting` (
+  date DATE NOT NULL,
+  num_accounts INTEGER  UNSIGNED DEFAULT NULL,
+  count_1_day_actives INTEGER UNSIGNED DEFAULT NULL,
+  count_7_day_actives INTEGER UNSIGNED DEFAULT NULL,
+  count_14_day_actives INTEGER UNSIGNED DEFAULT NULL,
+  count_30_day_actives INTEGER UNSIGNED DEFAULT NULL,
+  count_30_day_idle INTEGER UNSIGNED DEFAULT NULL,
+  count_60_day_idle INTEGER UNSIGNED DEFAULT NULL,
+  count_90_day_idle INTEGER UNSIGNED DEFAULT NULL,
+  usage_in_bytes BIGINT UNSIGNED DEFAULT NULL,
+  quota_in_mb INTEGER  UNSIGNED DEFAULT NULL,
+  PRIMARY KEY(date)
+) CHARSET=utf8;
+
+-- Table `gapps_accounts`.
+-- Holds the Google Apps account list, ie. a list of all registered accounts on
+-- the Google Apps domain.
+CREATE TABLE IF NOT EXISTS `gapps_accounts` (
+  -- Application-specific fields.
+  l_userid SMALLINT UNSIGNED DEFAULT NULL,
+  l_sync_password BOOL DEFAULT TRUE,
+  l_activate_mail_redirection BOOL DEFAULT TRUE,
+
+  -- Shared fields.
+  g_account_id CHAR(16) DEFAULT NULL,
+  g_account_name VARCHAR(256) NOT NULL,
+  g_first_name VARCHAR(40) NOT NULL,
+  g_last_name VARCHAR(40) NOT NULL,
+  g_status ENUM('unprovisioned', 'disabled', 'active') DEFAULT 'unprovisioned',
+  g_admin BOOL DEFAULT NULL,
+  g_suspension VARCHAR(256) DEFAULT NULL,
+
+  -- Google-owned fields.
+  r_disk_usage BIGINT DEFAULT NULL,
+  r_creation DATE DEFAULT NULL,
+  r_last_login DATE DEFAULT NULL,
+  r_last_webmail DATE DEFAULT NULL,
+
+  -- Indexes.
+  PRIMARY KEY(g_account_name),
+  INDEX l_userid(l_userid)
+) CHARSET=utf8;
+
+-- Table `gapps_queue`.
+-- Holds queued API requests that are to be processed by the gappsd. It also
+-- includes processed but not yet acknowledged requests.
+CREATE TABLE IF NOT EXISTS `gapps_queue` (
+  -- Queue identification fields.
+  q_id INT NOT NULL AUTO_INCREMENT,
+  q_owner_id SMALLINT DEFAULT NULL,
+  q_recipient_id SMALLINT DEFAULT NULL,
+
+  -- Queue management information.
+  p_entry_date DATETIME NOT NULL,
+  p_notbefore_date DATETIME NOT NULL,
+  p_start_date DATETIME DEFAULT NULL,
+  p_end_date DATETIME DEFAULT NULL,
+  p_status ENUM('idle', 'active', 'success', 'hardfail', 'softfail') DEFAULT 'idle' NOT NULL,
+  p_priority ENUM('immediate', 'normal', 'offline') DEFAULT 'offline' NOT NULL,
+  p_admin_request BOOLEAN DEFAULT false NOT NULL,
+
+  -- Job content fields.
+  j_type ENUM('r_activity', 'r_accounts', 'u_create', 'u_delete', 'u_update', 'u_sync') NOT NULL,
+  j_parameters TEXT DEFAULT NULL,
+
+  -- Job execution result fields.
+  r_softfail_date DATETIME DEFAULT NULL,
+  r_softfail_count SMALLINT DEFAULT 0 NOT NULL,
+  r_result VARCHAR(256) DEFAULT NULL,
+
+  -- Indexes.
+  PRIMARY KEY(q_id),
+  INDEX q_owner_id(q_owner_id),
+  INDEX q_recipient_id(q_recipient_id),
+  INDEX p_status(p_status),
+  INDEX p_priority(p_priority)
+) CHARSET=utf8;
+
+-- vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/07_google_apps.sql b/upgrade/0.9.16/07_google_apps.sql
new file mode 100644 (file)
index 0000000..c5942f0
--- /dev/null
@@ -0,0 +1,3 @@
+ALTER TABLE `requests_answers` MODIFY `category` enum('alias','liste','usage','photo','evts', 'gapps-unsuspend', 'marketing','orange','homonyme','nl','paiements','medal','broken','surveys') NOT NULL default 'alias';
+
+# vim:set syntax=mysql:
diff --git a/upgrade/0.9.16/08_forums.sql b/upgrade/0.9.16/08_forums.sql
new file mode 100644 (file)
index 0000000..f208a2a
--- /dev/null
@@ -0,0 +1,13 @@
+CREATE TABLE `forums.innd` (
+  `id_innd` int(10) unsigned NOT NULL auto_increment,
+  `ipmin` int(10) unsigned default '0' COMMENT 'ip_address',
+  `ipmax` int(10) unsigned default '4294967295' COMMENT 'ip_address',
+  `uid` smallint(5) unsigned default NULL,
+  `read_perm` varchar(100) default '!*',
+  `write_perm` varchar(100) default '!*',
+  `priority` tinyint(1) unsigned default '255',
+  `comment` text,
+  PRIMARY KEY  (`id_innd`)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO `forums.innd` VALUES (1,0,4294967295,NULL,'xorg.*,!xorg.prive.*','xorg.*,!xorg.prive.*,!xorg.pa.emploi',0,'par defaut pour tous');
similarity index 73%
rename from plugins/insert.getNbIns.php
rename to upgrade/0.9.16/connect.db.inc.php
index f19ff89..2e66895 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 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                *
  ***************************************************************************/
 
-/*
- * Smarty plugin
- * -------------------------------------------------------------
- * File:     insert.getNbIns.php
- * Type:     insert
- * Name:     getNbIns
- * Purpose:
- * -------------------------------------------------------------
- */
-function smarty_insert_getNbIns($params, &$smarty)
-{
-    $res = XDB::query("SELECT COUNT(*) FROM auth_user_md5 WHERE perms IN ('admin','user') AND deces=0");
-    $cnt = $res->fetchOneCell();
-    return number_format($cnt, 0, ",", ".");
-}
+ini_set('include_path', dirname(__FILE__).'/../../include:' . dirname(__FILE__).'/../../classes:/usr/share/php');
+
+require_once 'xorg.inc.php';
+require_once 'xdb.php';
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
diff --git a/upgrade/0.9.16/update.sh b/upgrade/0.9.16/update.sh
new file mode 100755 (executable)
index 0000000..b38d294
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+echo "Upgrading bogofilter settings for ML"
+sudo -u list ./upgrade_lists.py
+
+mailman_stop
+mailman_templates
+mailman_start
+
+###########################################################
+
+echo "fixing the xnetevents aliases (this may be a long operation)"
+
+./xnetevents.list.php
+
+###########################################################
+
+echo "upgrading the database"
+
+for sql in *.sql
+do
+    echo -n $sql
+    $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+    echo .
+done
+
+###########################################################
+
+echo "we will now upgrade the search table (this may be a long operation)
+
+please hit ^D to continue
+"
+
+cat
+
+pushd ../../bin
+./search.rebuild_db.php
+popd
+
+###########################################################
+
diff --git a/upgrade/0.9.16/upgrade_lists.py b/upgrade/0.9.16/upgrade_lists.py
new file mode 100755 (executable)
index 0000000..d521f8b
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+import sys
+sys.path.append('/usr/lib/mailman/bin')
+import paths
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import mm_cfg
+
+def get_bogo_level(mlist):
+  """ Retreive the old style bogo level """
+  try:
+    if mlist.header_filter_rules == []:
+      return 0
+    try:
+      action = mlist.header_filter_rules[1][1]
+      return 2
+    except:
+      action = mlist.header_filter_rules[0][1]
+      if action == mm_cfg.HOLD:
+        return 1
+      elif action == mm_cfg.DISCARD:
+        return 3
+  except:
+    return 0
+
+def set_bogo_level(mlist, level):
+  """ Convert bogo level to the new level structure """
+  if level == 0:
+    return
+  hfr = []
+  if level == 1:
+    hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False))
+    hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
+  elif level == 2:
+    hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False))
+    hfr.append(('X-Spam-Flag: Yes, tests=bogofilter, spamicity=(0\.999999|1\.000000)', mm_cfg.DISCARD, False))
+    hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
+  elif level == 3:
+    hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False))
+    hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.DISCARD, False))
+  mlist.Lock()
+  mlist.header_filter_rules = hfr
+  mlist.Save()
+  mlist.Unlock()
+
+
+names = Utils.list_names()
+names.sort()
+for name in names:
+  mlist = MailList.MailList(name, lock=0)
+  set_bogo_level(mlist, get_bogo_level(mlist))
+
diff --git a/upgrade/0.9.16/xnetevents.list.php b/upgrade/0.9.16/xnetevents.list.php
new file mode 100755 (executable)
index 0000000..60dab53
--- /dev/null
@@ -0,0 +1,66 @@
+#!/usr/bin/php5
+<?php
+
+global $globals;
+require_once 'connect.db.inc.php';
+
+// Fetches the list of existing xnetevents aliases.
+$events = XDB::iterRow(
+    "SELECT  e.eid, e.asso_id, e.short_name, al.vid, pl.vid
+       FROM  groupex.evenements AS e
+  LEFT JOIN  virtual AS al ON (al.type = 'evt' AND al.alias = CONCAT(short_name, {?}))
+  LEFT JOIN  virtual AS pl ON (pl.type = 'evt' AND pl.alias = CONCAT(short_name, {?}))
+      WHERE  al.vid IS NOT NULL AND pl.vid IS NOT NULL
+   ORDER BY  e.eid",
+    '-absents@'.$globals->xnet->evts_domain,
+    '-participants@'.$globals->xnet->evts_domain);
+
+// Fixes the alias recipients for each list.
+while (list($eid, $asso_id, $shortname, $absent_vid, $participant_vid) = $events->next()) {
+    $recipient_count = array();
+    foreach (array($absent_vid, $participant_vid) as $vid) {
+        $res = XDB::query("SELECT COUNT(*) FROM  virtual_redirect WHERE vid = {?}", $vid);
+        $recipient_count[$vid] = $res->fetchOneCell();
+    }
+
+    // Updates the alias for participants.
+    XDB::execute("DELETE FROM virtual_redirect WHERE vid = {?}", $participant_vid);
+    XDB::execute(
+        "INSERT INTO  virtual_redirect (
+              SELECT  {?} AS vid, IF(u.nom IS NULL, m.email, CONCAT(a.alias, {?})) AS redirect
+                FROM  groupex.evenements_participants AS ep
+           LEFT JOIN  groupex.membres AS m ON (ep.uid = m.uid)
+           LEFT JOIN  auth_user_md5   AS u ON (u.user_id = ep.uid)
+           LEFT JOIN  aliases         AS a ON (a.id = ep.uid AND a.type = 'a_vie')
+               WHERE  ep.eid = {?} AND ep.nb > 0
+            GROUP BY  ep.uid)",
+        $participant_vid, '@'.$globals->mail->domain, $eid);
+
+    // Updates the alias for absents.
+    XDB::execute("DELETE FROM virtual_redirect WHERE vid = {?}", $absent_vid);
+    XDB::execute(
+        "INSERT INTO  virtual_redirect (
+              SELECT  {?} AS vid, IF(u.nom IS NULL, m.email, CONCAT(a.alias, {?})) AS redirect
+                FROM  groupex.membres AS m
+           LEFT JOIN  groupex.evenements_participants AS ep ON (ep.uid = m.uid AND ep.eid = {?})
+           LEFT JOIN  auth_user_md5   AS u ON (u.user_id = m.uid)
+           LEFT JOIN  aliases         AS a ON (a.id = m.uid AND a.type = 'a_vie')
+               WHERE  m.asso_id = {?} AND ep.uid IS NULL
+            GROUP BY  m.uid)",
+        $absent_vid, "@".$globals->mail->domain, $eid, $asso_id);
+
+    // Lists alias recipient count changes.
+    $new_recipient_count = array();
+    foreach (array($absent_vid, $participant_vid) as $vid) {
+        $res = XDB::query("SELECT COUNT(*) FROM  virtual_redirect WHERE vid = {?}", $vid);
+        $new_recipient_count[$vid] = $res->fetchOneCell();
+    }
+
+    if ($new_recipient_count[$absent_vid] != $recipient_count[$absent_vid] ||
+        $new_recipient_count[$participant_vid] != $recipient_count[$participant_vid]) {
+        printf("  Fixed aliases for event %d (%s): absent list %d -> %d, participant list %d -> %d\n",
+               $eid, $shortname,
+               $recipient_count[$absent_vid], $new_recipient_count[$absent_vid],
+               $recipient_count[$participant_vid], $new_recipient_count[$participant_vid]);
+    }
+}