--- /dev/null
+Polytechnique.org TEAM :
+
+ Pierre Habouzit <pierre.habouzit@m4x.org> project manager
+ Jean Sébastien Bedo <jean-sebastien.bedo@m4x.org>
+ Florent Bruneau <florent.bruneau@m4x.org>
+ Sophie Charbonnier <sophie.charbonnier@m4x.org>
+ Yann Chevalier <yann.chevalier@m4x.org>
+ Jean-Marc Coic <jean-marc.coic@m4x.org>
+ Pascal Corpet <pascal.corpet@m4x.org>
+ Guillaume Gommard <guillaume.gommard@m4x.org>
+ Jeremy Lainé <jeremy.laine@m4x.org>
+ Raphael Marichez <raphael.marichez@m4x.org>
+ Vincent Palatin <vincent.palatin@m4x.org>
+
+
+XML-RPC stuff :
+ Dan Libby <dan@libby.com> http://xmlrpc-epi.sourceforge.net/
+ Marc Boeren <mboeren@php.net> http://fr2.php.net/xml-rpc
+
+Smarty Trimwhitespace prefilter :
+ Monte Ohrt <monte@ispi.net> http://smarty.incutio.com/?page=SmartyTips
+
+Some of the icons :
+ David Vignoni <dave@icon-king.com> http://www.icon-king.com/
+
+OverLib :
+ Erik Bosrup http://www.bosrup.com/web/overlib/
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null
+================================================================================
+VERSION 0.9.8 21 Jun 2005
+
+New :
+
+ * Admin :
+ - Synchronisations with geoloc.org. -Car
+
+Bug/Wish :
+
+ * Admin :
+ - #323: admin link in fiche opens out of the popup. -Car
+ - #324: admin can modify the usage name. -Car
+
+ * Profile :
+ - User can delete his own melix. -Car
+ - #328,329: bug fixes and direct acess to public fiche. -Car
+
+ * Lists :
+ - #318: Deletion of email with + in aliases. -Car
+
+================================================================================
+VERSION 0.9.7 21 Jun 2005
+
+New :
+
+ * Profile :
+ - Address parser. -Car
+
+ * Search :
+ - Nickname are used in fast search. -Car
+ - Firefox searchplugin for quick search. -Car
+
+ * Xnet :
+ - Events management. -Car
+ - Events using paiements. -Car
+ - Sending mail to all the participants/absents of an event. -Car
+
+Bug/Wish :
+
+ * Core :
+ - #78,302: accept spaces in login. -Car
+
+ * Fiche :
+ - #308: organizing layout. -Car
+
+ * Lists :
+ - #23: multiple inscriptions. -Car
+
+ * Xnet :
+ - #311,312: private members list. -Car
+ - Inscription in a group with no admin. -Car
+
+Fixes (from 0.9.6 branch) :
+
+ * Core :
+ - #316: locale was not set correctly. dates are in french again. -MC
+
+ * Search :
+ - #307: fix bad escaping in advanced search. -MC
+
+ * Xnet :
+ - Have a connection link even on index page. -MC
+ - Deleting and securing deletion of empty aliases. -Car
+ - #314: fix bad links to categories -Car
+
+================================================================================
+VERSION 0.9.6 07 May 2005
+
+New :
+
+ * Profile :
+ - Stayed down students (orange) management. -Car
+
+ * Search :
+ - Last improvements (clean code for search now !). -MC
+
+ * Stats :
+ - Drop mail stats pages (buggy and not accurate anymore). -MC
+
+ * Polytechnique.net in now in plat/al ! -MC
+
+Bug/Wish :
+
+ * Admin :
+ - #298: On su exit, go back to SU page on the given account. -MC
+ - #300: Notify hotliners for validation comments. -Car
+ - #301: Some design issues solved for validation. -MC
+
+ * Misc :
+ - #290: Date display with no preceding 0. -Car
+
+ * Profile :
+ - #299: Be more specific wrt given name for women. -MC
+
+Fixes (from 0.9.5 branch) :
+
+ * Search :
+ - #304: Next/Prev links were missing if #pages was 2. -MC
+
+================================================================================
+VERSION 0.9.5 07 Apr 2005
+
+New :
+
+ * Core :
+ - Improve login/exit wrt cookie. -MC
+
+ * Docs :
+ - use of secure SMTP on a pocket PC. -Car
+
+ * Fiche :
+ - A public fiche is now available for visitors. -Car
+
+ * Money :
+ - lighter code and support for a PayPal account. -Car
+
+ * Profile :
+ - One can choose precisely which fields appear on his public fiche. -Car
+ - Accents and special chars in name and first name -Car
+ - Spouse name extended to usage name. -Car
+
+ * Register :
+ - Already subscribed members now have a warning. -MC
+
+ * Search :
+ - Public searches display more information. -Car
+
+Bug/Wish :
+
+ * Admin :
+ - #291: change bestalias when alias disappear. -Car
+
+ * Core :
+ - #279, #281: permanent connexion explanations. -MC/Car
+
+ * Fiche :
+ - #289: hide empty photos in public fiche. -Car
+
+ * Misc :
+ - #283,285,286,287: text modifications in docs and index page. -Car
+
+ * Profile :
+ - #278: professionnal email and web site. -Car
+
+ * Search :
+ - #82: Search by fonction and post for jobs. -Car
+ - #109, 288: Lots of sorting methods for search. -Car
+ - #270: Private/public flags are now used for search. -Car
+
+Fixes (from 0.9.4 branch) :
+
+ * Lists :
+ - Owner can now delete their list. -MC
+
+================================================================================
+VERSION 0.9.4 24 Jan 2005
+
+New :
+
+ * Banana :
+ - Total rework, it's now a real library, exit from plat/al. -MC
+
+ * Contacts :
+ - Brand new PDF of the contact list (using FPDF). -MC
+ - Even include Photos in the PDF (kludgy !). -MC
+
+ * Core :
+ - New SQL access API : gain in security and code factorization. -MC
+ - Drop good old mysql_assign, iterators are nicer. -MC
+ - Drop magic_quote_gpc (DB API takes care of it itself). -MC
+ - Drop cache algorithm (was complex for no gain). -MC
+ - Enhancements wrt COOKIE. -MC/Car
+ - More homogenous date formating (use %x / %X everywhere). -MC
+ - No more .head.tpl. (thanks to JM for the tip). -MC
+ - Strip unnecessary spaces from templates at compile time. -MC
+ - Allow users to choose email formats globally. -Car
+ - Crons are now handled from plat/al with a global crontab file. -MC
+
+ * Notifications :
+ - Use Pascal's work to enable a simple, nicer html mail. -MC
+ - Use the new RSS engine to provide a feed of the panel. -MC
+
+ * Photo Submission :
+ - Rework of the form. -MC
+ - Photo is resized on the fly, instead of dropping too big images. -MC
+
+ * Registration :
+ - Brand new. -MC
+
+ * Skins :
+ - Openweb : update. -MC
+
+ * Validation :
+ - Quite a lot of rewrite, simplifications. -MC
+
+Bug/Wish :
+
+ * Contacts :
+ - #180: Change the list order using name, promo or last change date.-Car
+
+ * Core :
+ - #153: rework the RSS engine. -MC
+ - #145: Use melix address to log in. -Car
+ - #212: Various font-sizes fixed. -Car
+ - #245: Use PEAR::Date to avoid 1970-2038 php limitations. -MC
+ - #258: Netscape4 Warning. -MC
+
+ * Emails :
+ - #229: Possibility to show our melix address. -Car
+
+ * Events :
+ - #238: Links and Mailto are now active. -Car
+
+ * Fiche :
+ - #218: Quit fiche using Escape key. -Car
+
+ * Marketing :
+ - #256, #255: Mail are now correctly sent. -MC/Car
+
+ * Misc :
+ - #65: Broken links. -MC
+
+ * Notifications :
+ - #63: Birthdays are now in the notifications ! -MC
+ - #215: The notifications use singular or plural. -Car
+ - #232: Add a link to the fiche. -MC/Car
+
+ * Profile :
+ - #65: Add professionnal cellphone. -Car
+ - #170: Remove region display for french departments. -Car
+ - #204: Add nicknames (searchable too). -MC
+ - #210: Add medals and orders. -MC
+
+ * Search :
+ - #249, #251, #253: Some tweaks to be more accurate. -MC
+
+ * Stats :
+ - #261: Stats of registrations over the time. -Car
+
+ * Validations :
+ - #137: Now possible to add comments without any action. -MC
+ - #191, #256: Marketing now uses the validation process. -MC
+ - #267: Newsletter uses the validation process too. -MC
+
+================================================================================
+VERSION 0.9.3 27 Dec 2004
+
+New :
+
+ * Core :
+ - Members can be disabled. It deletes volatile datas. -MC
+ - Start the new work on modules (XOrgHook). -MC
+ - XOrgMenu class to deal with Menu entries. -MC
+ - Lots of includes renames, rewrites, beautifuling. -MC
+ - Try to avoid the unreadable {"..."|url} modifier, use {rel}/. -MC
+ - Use a real .conf file, and no more .php's for configuration. -MC
+ - Make raw access to POST/GET/... disappear. -MC
+
+ * Distribution :
+ - Do not modify PHP include path from auto.prepend.inc.php. -SHK
+ - Add install.d/apache.conf with a sample Apache config file. -SHK
+ - Add Makefile to generate distribution tarballs. -SHK
+ - Generate xorg.config.inc.php using "make". -SHK
+ - Add a basic README file. -SHK
+
+ * Lists :
+ - Moderators are now allowed to change the moderation level. -MC
+
+ * Mails :
+ - Use HermesMailer. -MC
+ - Create a script to treats NL bounces. -MC
+
+ * Money : standalone module. -MC
+
+ * Skins :
+ - New skin : openweb. -MC
+ - No more annoying submit button, onclick is used to submit. -MC
+ - This is the first autonom module of the site ! -MC
+
+ * Stats :
+ - Better y-range for graphs. -MC
+
+ * WebRedirect (was: Carva) : now standalone. -MC
+
+Bug/Wish :
+
+ * Admin :
+ - #186: Users are reachable by melix, redirects, aliases... -MC
+
+ * Bestalias :
+ - #206: Use only the bestalias and the forlife in vcard and fiche. -MC
+ - #207: Enable for the user the choice of his prefered alias. -MC
+
+ * Core :
+ - #183,185: Implement perms levels : 'pending'+'disabled'. -MC
+ - #154: Birth fields are now of type DATE. -MC
+
+ * Fiche :
+ - #83,208,222: New fiche. -MC
+
+ * Lists :
+ - #86: Yet another old old wish : lists archives are online ! -MC
+ - #144: Users can subscribe from members/trombi page too. -MC
+ - #184: Owners can now delete their lists. -MC
+ - #231: Add a link to the user's fiche on moderation page. -MC
+
+ * Newsletter :
+ - #242: Newsletter is standalone. -MC
+
+ * Search :
+ - #56: Search on referent. -JS
+ - #189: Selection of diplomas depends on schools. -JS
+ - #195: Better heuristic for google like (thanks OG). -MC
+ - #203: New fields in search (alive, subscriber, free). -JS
+
+ * User Interface :
+ - #211: All imgs in the skins are links to login.php. -MC
+
+
+Fixes (from 0.9.2 branch) :
+
+ * Search :
+ - enable mod_date_sort again. -MC
+
+
+================================================================================
+VERSION 0.9.2 14 Nov 2004
+
+New :
+
+ * Carnet : Brand new. -MC
+
+ * Core :
+ - Creation of the Plugin class. -MC
+ - Now only use iso3166 countries, no more `nationalites`. -MC
+
+ * Contacts :
+ - Trombino of the contacts is available. -MC
+
+ * Search+Contacts :
+ - Nicer icons. -MC
+
+ * Skins :
+ - Various updates. -FRU
+
+Bug/Wish :
+
+ * Docs :
+ - #156: Exit Netscape4 (no more supported), Mozilla enters. -MC
+
+ * Carnet :
+ - #29,147: Possible to watch subscribings, deaths, `fiche` modifs. -MC
+
+ * Core :
+ - #135: First instance of the plugin class : class Trombi. -MC
+ - #158: A photo change updates last `fiche` edition stamp. -MC
+ - #100,199: Kludge to determine if a link is popup or not. -MC
+
+ * Lists :
+ - #138: Refusal message is shown on mail moderation page. -MC
+ - #161: Now supports non-X natively. -MC
+
+ * Search :
+ - #112,113,126,133,167,171: google like search + some rewrite. -MC
+
+ * Search+Contacts :
+ - #122: Women now have a • (no more dirty gender icons). -MC
+ - #124: Homeland is now a flag. -MC
+ - #164: Married women are now well sorted (by their spouse name). -MC
+
+ * Stats :
+ - #8,134: Return of the stats pages. -VP
+
+Fixes (from 0.9.1 branch) :
+
+ * Lists :
+ - Better mails to -owners for reject/discard ops. -MC
+ - Mailman is case sensitive, goto lowercase. -MC
+
+
+================================================================================
+VERSION 0.9.1 25 Oct 2004
+
+New :
+
+ * Lists :
+ - Auto-moderate/discard mails detected as SPAM by bogofilter. -MC
+ - Improve header/subject decoding. -MC
+ - Alpha-sort on listes/admin.php + msgs for each operations. -MC
+ - 1-click moderation for accept and reject cases. -MC
+
+ * Usability :
+ - #99: All <a><img ... /></a> now have title. -MC
+
+ * NewsLetter :
+ - Brand New NewsLetter module. -MC
+ - Convert old archive to new model. -FAL
+
+ * Search+Contacts :
+ - Added gender icons. -MC
+ - Better things done for married women. -MC
+ - Deceased members and non-subscribers special treatments. -MC
+ - Mobile is now printed too. -MC
+ - People names are clickable. -MC
+ - Unified template. -JS
+
+ * Skins:
+ - Liteskin. -XdX
+
+Fixes (from 0.9.0 branch) :
+
+ * Lists :
+ - Corrects problem about mails that have non text/* parts. -MC
+ - Rpc daemon can live everywhere. -MC
+ - Moderation : refusing/rejecting a mail informs other moderators. -MC
+
+ * Fiche + Search :
+ - Corrects bad handling of firms. -MC
+ - We used the bad table to search functions names. -MC
+
+ * Skins :
+ - Minor updates. -FRU
+
+================================================================================
+VERSION 0.9.0 15 Oct 2004
+
+New :
+
+ * First Public Release. -PoT
+
+================================================================================
+ACRONYMS :
+
+ * PoT : Polytechnique.org TEAM (see Authors).
+
+ * Car : Pascal Corpet (Caribou) <pascal.corpet@m4x.org>
+ * FAL : Raphaël Marichez (Falco) <raphael.marichez@m4x.org>
+ * FRU : Florent Bruneau (fruneau) <florent.bruneau@m4x.org>
+ * JS : Jean Sébastien Bedo <jean-sebastien.bedo@m4x.org>
+ * MC : Pierre Habouzit (MadCoder) <pierre.habouzit@m4x.org>
+ * OG : Olivier Guillaumin <olivier.guillaumin@m4x.org>
+ * SHK : Jeremy Lainé (Sharky) <jeremy.laine@m4x.org>
+ * VP : Vincent Palatin <vincent.palatin@m4x.org>
+ * XdX : Alexandre Hô (XandreX) <alexandre.ho@m4x.org>
+
+================================================================================
+vim:noet:ts=4:sw=4:tw=80:
--- /dev/null
+# $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
+################################################################################
+# definitions
+
+VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//")
+
+PKG_NAME = platal
+PKG_DIST = $(PKG_NAME)-$(VERSION)
+PKG_FILES = AUTHORS ChangeLog COPYING README Makefile
+PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade
+
+VCS_FILTER = ! -name .arch-ids ! -name CVS
+
+################################################################################
+# global targets
+
+all: build
+
+headers:
+ headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \
+ `find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' `
+
+build: pkg-build
+
+dist: clean pkg-dist
+
+bzdist: clean pkg-bzdist
+
+clean:
+ rm -rf include/platal/globals.inc.php
+ rm -f htdocs/banana/banana.css htdocs/valid.html include/banana htdocs/banana/img htdocs/banana/xface.php
+
+%: %.in Makefile
+ sed -e 's,@VERSION@,$(VERSION),g' $< > $@
+
+################################################################################
+# devel targets
+templates_c:
+ mkdir templates_c
+ chmod o+w templates_c
+
+htdocs/valid.html:
+ touch templates_c/valid.html
+ ln -sf ../templates_c/valid.html htdocs/valid.html
+
+devel: build templates_c htdocs/valid.html
+
+
+################################################################################
+# diogenes package targets
+
+pkg-build: include/platal/globals.inc.php
+
+$(PKG_DIST): pkg-build
+ mkdir $(PKG_DIST)
+ cp -a $(PKG_FILES) $(PKG_DIST)
+ for dir in `find $(PKG_DIRS) -type d $(VCS_FILTER)`; \
+ do \
+ mkdir -p $(PKG_DIST)/$$dir; \
+ find $$dir -type f -maxdepth 1 -exec cp {} $(PKG_DIST)/$$dir \; ; \
+ done
+
+pkg-dist: $(PKG_DIST)
+ rm -f $(PKG_DIST).tar.gz
+ tar czf $(PKG_DIST).tar.gz $(PKG_DIST)
+ rm -rf $(PKG_DIST)
+
+pkg-bzdist: $(PKG_DIST)
+ rm -f $(PKG_DIST).tar.bz2
+ tar cjf $(PKG_DIST).tar.bz2 $(PKG_DIST)
+ rm -rf $(PKG_DIST)
+
+.PHONY: build dist clean pkg-build pkg-dist
+
--- /dev/null
+Notes for plat/al, a platform for alumni services
+
+PRESENTATION
+------------
+
+plat/al is the platform used by Polytechnique.org [1], the alumni site of
+Ecole Polytechnique [2], France. This package is a suite of web applications
+geared towards alumni websites. This is used to deliver services to more than
+12.000 registered alumni on Polytechnique.org.
+
+More information can be found on the plat/al project page [3].
+
+[1] Polytechnique.org http://www.polytechnique.org/
+[2] Ecole Polytechnique http://www.polytechnique.edu/
+[3] plat/al project http://opensource.polytechnique.org/platal/
+
+
+REQUIREMENTS
+------------
+
+First of all you will need a webserver. If you do not currently have a
+webserver, you might consider taking a look at the Apache webserver :
+
+ http://httpd.apache/org/
+
+plat/al is written in PHP so you need PHP support for your webserver. You
+can find PHP here :
+
+ http://www.php.net/
+
+plat/al makes use of the Smarty template engine which can be found here :
+
+ http://smarty.php.net/
+
+plat/al also makes heavy use of the Diogenes library, libdiogenes which lives
+here :
+
+ http://opensource.polytechnique.org/libdiogenes/
+
+You will need to have access to a MySQL server. If you do not currently have a
+MySQL server running, you can download it here :
+
+ http://www.mysql.com/
+
+
+BUILDING
+--------
+
+To build plat/al, simply run "make" from the toplevel directory.
+
--- /dev/null
+#! /usr/bin/php4
+<?php
+/********************************************************************************
+ * spoolgen.php : spool generation
+ * --------------
+ *
+ * This file is part of the banana distribution
+ * Copyright: See COPYING files that comes with this distribution
+ ********************************************************************************/
+
+require_once('connect.db.inc.php');
+require_once('banana/banana.inc.php');
+
+class MyBanana extends Banana
+{
+ function MyBanana()
+ {
+ global $globals;
+ $this->host = "http://{$globals->banana->web_user}:{$globals->banana->web_pass}@{$globals->banana->server}:{$globals->banana->port}/";
+ parent::Banana();
+ }
+
+ function createAllSpool()
+ {
+ $this->_require('groups');
+ $this->_require('spool');
+ $this->_require('misc');
+
+ $groups = new BananaGroups(BANANA_GROUP_ALL);
+
+ foreach (array_keys($groups->overview) as $g) {
+ print "Generating spool for $g : ";
+ $spool = new BananaSpool($g);
+ print "done.\n";
+ unset($spool);
+ }
+ $this->nntp->quit();
+ }
+}
+
+$banana = new MyBanana();
+$banana->createAllSpool();
+system("chown -R www-data:www-data /var/spool/banana");
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+ini_set('include_path','/usr/share/php:../include:../../include');
+
+require('xorg.inc.php');
+require('xorg.misc.inc.php');
+
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+/*
+ * verifie qu'il n'y a pas d'incoherences dans les tables de jointures
+ *
+*/
+
+require('./connect.db.inc.php');
+require("Console/Getopt.php");
+
+function check($sql, $commentaire='') {
+ $res = mysql_query($sql);
+ if ($err = mysql_error()) echo $err;
+ if (mysql_num_rows($res)>0) {
+ echo "Erreur pour la verification : $commentaire\n$sql\n\n";
+ echo "|";
+ while($col = mysql_fetch_field($res)) echo "\t".$col->name."\t|";
+ echo "\n";
+
+ while ($arr = mysql_fetch_row($res)) {
+ echo "|";
+ foreach ($arr as $val) echo "\t$val\t|";
+ echo "\n";
+ }
+ echo "\n";
+ }
+}
+
+function info($sql,$commentaire='') {
+ global $opt_verbose;
+ if ($opt_verbose)
+ check($sql,$commentaire);
+}
+
+/* on parse les options */
+$opts = Console_GetOpt::getopt($argv, "v");
+$opt_verbose=false;
+
+if ( PEAR::isError($opts) ) {
+ echo $opts->getMessage();
+} else {
+ $opts = $opts[0];
+ foreach ( $opts as $opt) {
+ switch ($opt[0]) {
+ case "v":
+ $opt_verbose=true;
+ echo "Mode verbeux\n";
+ break;
+ }
+ }
+}
+
+/* validite de adresses */
+check("select uid, adrid from adresses where FIND_IN_SET('pro',statut)","Utilisateurs ayant encore une adresse pro dans leurs adresses");
+check("select uid, adrid from adresses group by uid having count(adrid) > 7", "Utilisateurs ayant trop d'adresses");
+
+/* Validite de entreprises */
+check("select uid, entrid from entreprises group by uid having count(entrid) > 2","Utilisateurs ayant trop d'entreprises");
+
+/* Validite des tables de langues, competences, mentoring*/
+check("select uid, lid from langues_ins group by uid having count(lid) > 10","Utilisateurs ayant trop de langues");
+check("select uid, cid from competences_ins group by uid having count(cid) > 20","Utilisateurs ayant trop de competences");
+
+/* validite de aliases */
+check("SELECT a.*
+ FROM aliases AS a
+ LEFT JOIN auth_user_md5 AS u ON u.user_id=a.id
+ WHERE (a.type='alias' OR a.type='a_vie') AND u.prenom is null");
+
+/* validite de applis_ins */
+check("select a.* from applis_ins as a left join auth_user_md5 as u on u.user_id=a.uid where u.prenom is null");
+check("select a.* from applis_ins as a left join applis_def as ad on ad.id=a.aid where ad.text is null");
+
+/* validite de binet_users */
+check("select b.* from binets_ins as b left join auth_user_md5 as u on u.user_id=b.user_id where u.prenom is null");
+check("select b.* from binets_ins as b left join binets_def as bd on bd.id=b.binet_id where bd.text is null");
+
+/* validite de contacts */
+check("select c.* from contacts as c left join auth_user_md5 as u on u.user_id=c.uid where u.prenom is null");
+check("select c.* from contacts as c left join auth_user_md5 as u on u.user_id=c.contact where u.prenom is null");
+
+/* validite de emails */
+check("select e.* from emails as e left join auth_user_md5 as u on u.user_id=e.uid where e.uid and u.prenom is null");
+
+/* validite de forums */
+check("select f.* from forums.abos as f left join auth_user_md5 as u on u.user_id=f.uid where u.prenom is null");
+check("select f.* from forums.abos as f left join forums.list as fd on fd.fid=f.fid where fd.nom is null");
+check("select f.* from forums.respofaqs as f left join forums.list as fd on fd.fid=f.fid where fd.nom is null");
+check("select f.* from forums.respofaqs as f left join auth_user_md5 as u on u.user_id=f.uid where u.prenom is null");
+
+/* validite de groupesx_ins */
+check("select g.* from groupesx_ins as g left join auth_user_md5 as u on u.user_id=g.guid where u.prenom is null");
+check("select g.* from groupesx_ins as g left join groupesx_def as gd on g.gid=g.gid where gd.text is null");
+
+/* validite de photo */
+check("select p.* from photo as p left join auth_user_md5 as u on u.user_id=p.uid where u.prenom is null");
+
+/* validite des champ pays et region */
+check("SELECT a.uid, a.country FROM adresses AS a LEFT JOIN geoloc_pays AS gp ON a.country = gp.a2 WHERE gp.pays IS NULL","donne la liste des pays dans les profils qui n'ont pas d'entree correspondante dans geoloc_pays");
+check("SELECT a.uid, a.country, a.region FROM adresses AS a LEFT JOIN geoloc_region AS gr ON (a.country = gr.a2 AND a.region = gr.region) WHERE a.region != '' AND gr.name IS NULL","donne la liste des regions dans les profils qui n'ont pas d'entree correspondante dans geoloc_region");
+
+/* donne la liste des gens pour qui on a fait du marketing mais qui se sont inscrits depuis (nettoyage de envoidirect) */
+info("select e.matricule,e.nom,e.prenom,e.promo from envoidirect as e inner join auth_user_md5 as a on (e.matricule = a.matricule and a.perms = 'user') order by promo,nom;");
+
+/* donne la liste des emails qui apparaissent 2 fois dans la table emails pour des personnes différentes */
+info("SELECT a1.alias, a2.alias, e1.email, e2.flags
+ FROM emails AS e1
+ INNER JOIN emails AS e2 ON(e1.email = e2.email AND e1.uid!=e2.uid AND
+ (e1.uid<e2.uid OR NOT FIND_IN_SET(e2.flags,'active'))
+ )
+ INNER JOIN aliases AS a1 ON(a1.id=e1.uid AND a1.type='a_vie')
+ INNER JOIN aliases AS a2 ON(a2.id=e2.uid AND a2.type='a_vie')
+ INNER JOIN auth_user_md5 AS u1 ON(a1.id=u1.user_id)
+ INNER JOIN auth_user_md5 AS u2 ON(a2.id=u2.user_id)
+ WHERE FIND_IN_SET(e1.flags,'active') AND u1.nom!=u2.nom_usage AND u2.nom!=u1.nom_usage
+ ORDER BY a1.alias",
+ "donne la liste des emails qui apparaissent 2 fois dans la table emails pour des personnes différentes");
+
+/* vérif que tous les inscrits ont bien au moins un email actif */
+check("SELECT u.user_id, a.alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id = a.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",
+ "donne les inscrits qui n'ont pas d'email actif");
+
+/* donne la liste des homonymes qui ont un alias égal à leur loginbis depuis plus d'un mois */
+check("SELECT a.alias AS username, b.alias AS loginbis, b.expire
+ FROM aliases AS a
+ INNER JOIN aliases AS b ON ( a.id=b.id AND b.type != 'homonyme' and b.expire < NOW() )
+ WHERE a.type = 'a_vie'",
+ "donne la liste des homonymes qui ont un alias égal à leur loginbis depuis plus d'un mois, il est temps de supprimer leur alias");
+
+/* verifie qu'il n'y a pas de gens qui recrivent sur un alias qu'ils n'ont plus */
+
+check("SELECT a.alias AS a_un_pb, email, rewrite AS broken
+ FROM aliases AS a
+ INNER JOIN emails AS e ON (a.id=e.uid AND rewrite!='')
+ LEFT JOIN aliases AS b ON (b.id=a.id AND rewrite LIKE CONCAT(b.alias,'@%') AND b.type!='homonyme')
+ WHERE a.type='a_vie' AND b.type IS NULL","gens qui ont des rewrite sur un alias perdu");
+
+/* validite du champ matricule_ax de la table auth_user_md5 */
+check("SELECT matricule,nom,prenom,matricule_ax,COUNT(matricule_ax) AS c
+ FROM auth_user_md5
+ WHERE matricule_ax != '0'
+ GROUP BY matricule_ax
+ having c > 1", "à chaque personne de l'annuaire de l'AX (identification_ax) doit correspondre AU PLUS UNE personne de notre annuaire (auth_user_md5) -> si ce n'est pas le cas il faut regarder en manuel ce qui ne va pas !");
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require('./connect.db.inc.php');
+
+function query ($sql) {
+ global $globals;
+ $globals->xdb->execute($sql);
+ if (mysql_errno() != 0) {
+ echo "error in \"$sql\" :\n", mysql_error(),"\n";
+ }
+}
+
+// la table des notifs est nettoyée
+$eight_days_ago = date("YmdHis",mktime() - 8*24*60*60);
+query("DELETE FROM watch_ops WHERE known<$eight_days_ago");
+
+query("DELETE FROM register_pending WHERE TO_DAYS(NOW()) - TO_DAYS(date) >= 365");
+query("delete from register_pending WHERE hash = 'INSCRIT'");
+
+// quelques tables sont triées pour que la lecture triée soit plus facile
+query("alter table applis_def order by text");
+query("alter table binets_def order by text");
+query("alter table groupesx_def order by text");
+query("alter table secteur order by text");
+query("alter table sections order by text");
+
+
+?>
--- /dev/null
+../connect.db.inc.php
\ No newline at end of file
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+/* vim: set sw=4 ts=4 sts=4 tw=100:
+ * vérifie qu'il n'y a pas de validations en cours, et maile si c'est le cas
+*/
+
+$M_PERIOD = "INTERVAL 3 HOUR"; // période d'envoi des mails de 3h
+$R_PERIOD = "INTERVAL 6 HOUR"; // période de réponse moyenne de 6h
+
+require('./connect.db.inc.php');
+require('diogenes/diogenes.hermes.inc.php');
+
+$res = $globals->xdb->query("SELECT count(stamp), sum(stamp < NOW() - $M_PERIOD), sum(stamp < NOW() - $R_PERIOD) FROM x4dat.requests");
+list($nb,$nbold,$nbveryold) = $res->fetchOneRow();
+
+if (empty($nb)) {
+ exit;
+}
+
+$mymail = new HermesMailer();
+$mymail->setFrom('validation@polytechnique.org');
+$mymail->addTo("validation@polytechnique.org");
+$mymail->setSubject((empty($nbveryold)?"":"[urgent] ")."il y a $nb validations non effectuées");
+
+$message =
+ "il y a $nb validation à effectuer \n"
+ .(empty($nbold)?"":"dont $nbold depuis le dernier mail !!!\n")
+ .(empty($nbveryold)?"":"et dont *$nbveryold* sont en retard de plus de 6h !!!")
+ ."\n"
+ ."https://www.polytechnique.org/admin/valider.php\n";
+
+$message = wordwrap($message,78);
+$mymail->setTxtBody($message);
+$mymail->send();
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+/* vim: set sw=4 ts=4 sts=4 tw=100:
+ * crée des demandes de validation pour les kill d'alias
+ * une demande 10 jours avant pour un warning, puis une autre pour le robot
+*/
+
+$W_PERIOD = "INTERVAL 7 DAY"; // temps d'envoi du warning avant la deadline
+
+require('./connect.db.inc.php');
+
+$resRobot = $globals->xdb->iterator("SELECT id, alias, expire FROM aliases WHERE (expire = NOW() + $W_PERIOD OR expire <= NOW()) AND type = 'alias'");
+
+if ($resRobot->total()) {
+ require_once('validations/homonymes.inc.php');
+ while ($old = $resRobot->next()) {
+ $res = $globals->xdb->query("SELECT alias AS forlife FROM homonymes INNER JOIN aliases ON(user_id = id) WHERE homonyme_id = {?} AND type='a_vie'", $old['id']);
+ $forlifes = $res->fetchColumn();
+ $req = new HomonymeReq($old['id'], $old['alias'], $forlifes, $old['expire'] > date("Y-m-d"));
+ $req->submit();
+ }
+}
+
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require('./connect.db.inc.php');
+
+$date = date('Y-m-d', time() + 7 * 24*60*60);
+$stamp = date('Ymd000000');
+$like = date('%-m-d', time() + 7 * 24*60*60);
+
+$globals->db->query("INSERT INTO watch_ops (uid, cid, known, date)
+ SELECT user_id, 4, $stamp, '$date'
+ FROM auth_user_md5
+ WHERE naissance LIKE '$like' AND deces=0");
+
+
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('./connect.db.inc.php');
+require_once("../../include/notifs.inc.php");
+require_once("diogenes/diogenes.hermes.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"
+ . " {$globals->baseurl}/carnet/panel.php\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='{$globals->baseurl}/carnet/panel.php'>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 .= " {$globals->baseurl}/fiche.php?user={$x['bestalias']}\n\n";
+ $html .= "<li>(X{$x['promo']}) <a href='{$globals->baseurl}/fiche.php?user={$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"
+ . " {$globals->baseurl}/carnet/notifs.php";
+ $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="{$globals->baseurl}/carnet/notifs.php">page
+ de configuration des notifications</a>
+ </p>
+ </body>
+</html>
+EOF;
+
+ $mailer = new HermesMailer();
+ $mailer->setFrom("Carnet Polytechnicien <support_carnet@polytechnique.org>");
+ $mailer->addTo("\"{$u['prenom']} {$u['nom']}\" <{$u['bestalias']}@polytechnique.org>");
+ $mailer->setSubject("Notifications de la semaine $week");
+ $mailer->setTxtBody($text);
+ if ($u['mail_fmt'] == 'html') { $mailer->setHtmlBody($html); }
+ $mailer->send();
+}
+
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+require('./connect.db.inc.php');
+$MESSAGE = '';
+
+// ---------------------------------------
+
+$res = $globals->xdb->iterRow(
+ "SELECT a.alias, u.promo, email
+ FROM auth_user_md5 AS u
+ LEFT JOIN aliases AS a ON( u.user_id=a.id AND a.type='a_vie' )
+ LEFT JOIN emails AS e ON( e.uid = u.user_id AND NOT FIND_IN_SET('filter',e.flags) )
+ WHERE u.date_ins > {?}
+ GROUP BY alias
+ ORDER BY promo", date("Ymd000000", strtotime ("last Monday")));
+if ($a = $res->total()) {
+ $MESSAGE.="$a INSCRIPTIONS CONFIRMEES:\n";
+ while (list($usern,$promo,$mail) = $res->next()) {
+ $MESSAGE.="X$promo, $usern, $mail\n";
+ }
+}
+
+// ---------------------------------------
+
+$res = $globals->xdb->iterRow(
+ "SELECT hash, forlife, email, date
+ FROM register_pending
+ WHERE hash != 'INSCRIT'
+ ORDER BY date");
+if ($b = $res->total()) {
+ $MESSAGE.="\n$b INSCRIPTIONS NON CONFIRMEES:\n";
+ while (list($code, $usern, $mail, $quand) = $res->next()) {
+ $MESSAGE.="$quand, $usern,\n $mail";
+ $MESSAGE.="\n";
+ $MESSAGE.="https://www.polytechnique.org/register/end.php?hash=$code\n";
+ }
+}
+
+// ---------------------------------------
+
+$res = $globals->xdb->query('SELECT COUNT(DISTINCT uid), COUNT(*) FROM register_marketing');
+list($a, $b) = $res->fetchOneRow();
+$MESSAGE .= "\n$c INSCRIPTIONS SOLICITÉES :\n";
+$MESSAGE .= " $a utilisateurs\n $b adresses mails\n";
+
+// ---------------------------------------
+
+$MESSAGE .= "\n\n";
+
+require_once('diogenes/diogenes.hermes.inc.php');
+$mailer = new HermesMailer();
+$mailer->setSubject("$a confirmées, $b en attente et $c sollicitées");
+$mailer->setFrom('register@polytechnique.org');
+$mailer->addTo('register@polytechnique.org');
+$mailer->addCc('jean-michel.yolin+register@polytechnique.org');
+$mailer->setTxtBody($MESSAGE);
+$mailer->send();
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require('./connect.db.inc.php');
+
+$res = $globals->xdb->iterRow('SELECT matricule,nom1,nom2,nom3,prenom1,prenom2,promo FROM recherche');
+
+while (list($matricule,$nom1,$nom2,$nom3,$prenom1,$prenom2,$promo) = $res->next()) {
+ $globals->xdb->execute(
+ "INSERT INTO recherche_soundex (matricule,nom1_soundex,nom2_soundex,nom3_soundex,prenom1_soundex,prenom2_soundex,promo)
+ VALUES ({?},{?},{?},{?},{?},{?},{?})",
+ $matricule, soundex_fr($nom1), soundex_fr($nom2), soundex_fr($nom3), soundex_fr($prenom1), soundex_fr($prenom2), $promo);
+}
+
+?>
--- /dev/null
+#!/bin/sh
+catfiles=""
+zcatfiles=""
+base=/var/log/mail.log
+#base=/var/log/maillog
+
+for i in `seq 7 -1 0`; do
+ [ -f $base.$i ] && catfiles="$catfiles $base.$i"
+ [ -f $base.$i.gz ] && zcatfiles="$zcatfiles $base.$i.gz"
+done
+[ -f $base ] && catfiles="$catfiles $base"
+
+# on fait le cat
+[ -n "$zcatfiles" ] && zcat $zcatfiles
+[ -n "$catfiles" ] && cat $catfiles
+
--- /dev/null
+#!/bin/bash
+
+SCRIPTSDIR=`dirname $0`
+STATSDIR=/home/web/stats
+
+DATE=$(date "+%d" -d "1 day ago")
+DATE2=$(date "+%m%d%y" -d "1 day ago")
+
+ANNEE=$(date "+%Y")
+
+#génère les données
+#atsar -H -n$DATE | grep access | grep -v https > /tmp/access.dat
+atsar -S -P -n$DATE | grep ':' > /tmp/load.dat
+atsar -S -u -n$DATE | grep all > /tmp/cpu.dat
+atsar -S -d -n$DATE | grep disk00 > /tmp/disk.dat
+atsar -S -r -n$DATE | grep M | tr -d "MK" > /tmp/mem.dat
+atsar -S -l -n$DATE | grep eth0 > /tmp/eth0.dat
+atsar -S -L -n$DATE | grep eth0 > /tmp/eth0err.dat
+atsar -S -t -n$DATE | grep -v -i linux | grep '\.' > /tmp/tcp.dat
+atsar -S -U -n$DATE | grep -v -i linux | grep '\.' > /tmp/udp.dat
+awk '{ if (i!=6) {a+=$2; b+=$3; c+=$4; d+=$5; e+=$6; f+=$7; i++} else { print $1,a,b,c,d,e,f; i=a=b=c=d=e=f=0; } }' $STATSDIR/nbmails > /tmp/nbmails
+mysql x4dat --skip-column-names -B -e "SELECT promo,COUNT(*) FROM auth_user_md5 WHERE (promo > 1950) and (perms in ('user','admin')) GROUP BY promo" > /tmp/promo
+
+mysql x4dat --skip-column-names -B > /tmp/promo2 << EOF
+create temporary table countx type = HEAP select promo,count(*) as nb FROM auth_user_md5 WHERE (promo > 1940) and (deces = '0000-00-00') and not(perms='ext') GROUP BY promo;
+create temporary table countinscrits type = HEAP select promo,count(*) as nb FROM auth_user_md5 WHERE (promo > 1940) and (deces = '0000-00-00') and (perms in ('admin','user')) GROUP BY promo;
+select x.promo, ins.nb*100/x.nb from countx as x, countinscrits as ins where x.promo = ins.promo;
+EOF
+
+#Inscrits (depuis le début)
+gnuplot <<EOF
+set output "$STATSDIR/graph-nb.png"
+set term png small
+set size 640/480
+set xdata time
+set timefmt "%m/%d/%y"
+set format x "%m/%y"
+set yr [0:]
+set title "Nombre d'inscrits depuis Juillet 2000"
+set key left
+plot "$STATSDIR/nbinscrits" using 1:2 title 'inscrits' with lines;
+EOF
+
+#[OK] load
+gnuplot <<EOF
+set output "$STATSDIR/graph-load.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:]
+plot "/tmp/load.dat" using 1:5 title 'load1' with lines, "/tmp/load.dat" using 1:6 title 'load5' with lines, "/tmp/load.dat" using 1:7 title 'load15' with lines
+EOF
+
+#[OK] %usr %sys %nice
+gnuplot <<EOF
+set output "$STATSDIR/graph-cpu.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:100]
+plot "/tmp/cpu.dat" using 1:6 title '%idle' with lines, "/tmp/cpu.dat" using 1:4 title '%sys' with lines, "/tmp/cpu.dat" using 1:5 title '%nice' with lines, "/tmp/cpu.dat" using 1:3 title '%usr' with lines
+EOF
+
+#[OK] pswch/s
+gnuplot <<EOF
+set output "$STATSDIR/graph-pswch.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:]
+plot "/tmp/load.dat" using 1:2 title 'pswch/s' with lines;
+EOF
+
+#[OK] memfree swpfree cached
+gnuplot <<EOF
+set output "$STATSDIR/graph-mem.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:]
+plot "/tmp/mem.dat" using 1:3 title 'memfree' with lines, "/tmp/mem.dat" using 1:6 title 'cached' with lines, "/tmp/mem.dat" using 1:8 title 'swapfree' with lines;
+EOF
+
+#[OK] eth0: inbyt/s eth0: otbyt/s
+gnuplot <<EOF
+set output "$STATSDIR/graph-bp.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:]
+plot "/tmp/eth0.dat" using 1:4 title 'input' with lines, "/tmp/eth0.dat" using 1:5 title 'output' with lines
+EOF
+
+#[OK] eth0: coll/s
+gnuplot <<EOF
+set output "$STATSDIR/graph-coll.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:10]
+plot "/tmp/eth0err.dat" using 1:4 title 'coll/s' with lines
+EOF
+
+#[OK] _tcp_: nowopen socknow _udp_: socknow
+gnuplot <<EOF
+set output "$STATSDIR/graph-sockets.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:]
+set key left
+plot "/tmp/tcp.dat" using 1:6 title 'TCPopen' with lines,"/tmp/tcp.dat" using 1:7 title 'TCPnow' with lines, "/tmp/udp.dat" using 1:6 title 'UDPopen' with lines
+EOF
+
+#[OK] DISK: rdwr/s
+gnuplot <<EOF
+set output "$STATSDIR/graph-disk.png"
+set term png small
+set size 640/480
+set timefmt "%H:%M:%S"
+set format x "%Hh"
+set xdata time
+set yr [0:]
+plot "/tmp/disk.dat" using 1:3 title 'rdwr/s' with lines
+EOF
+
+#[OK] promo
+gnuplot <<EOF
+set output "$STATSDIR/graph-promo.png"
+set term png small
+set title "Nombre d'inscrits par promotion (a partir de 1950)"
+set size 640/480
+plot "/tmp/promo" using 1:2 title '' with boxes
+EOF
+
+#[OK] promo2
+gnuplot <<EOF
+max100(x)=(x>100)?100:x
+set output "$STATSDIR/graph-promo2.png"
+set term png small
+set title "Pourcentage d'inscrits par promotion (a partir de 1940)"
+set size 640/480
+set yr [0:100]
+set xr [1940:$ANNEE]
+plot "/tmp/promo2" using 1:2 title '' with boxes
+EOF
+#plot "/tmp/promo2" using 1:(max100(\$2)) title '' with boxes
+
+rm -f /tmp/cpu.dat /tmp/load.dat /tmp/disk.dat /tmp/mem.dat /tmp/eth0.dat /tmp/eth0err.dat /tmp/tcp.dat /tmp/udp.dat /tmp/nbmails /tmp/promo /tmp/promo2
--- /dev/null
+#!/usr/bin/env python
+#***************************************************************************
+#* Copyright (C) 2004 polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************
+
+import base64, MySQLdb, os, getopt, sys, MySQLdb.converters, sha, signal
+
+sys.path.append('/usr/lib/mailman/bin')
+
+from pwd import getpwnam
+from grp import getgrnam
+
+from SimpleXMLRPCServer import SimpleXMLRPCServer
+from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
+
+import paths
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import Message
+from Mailman import Errors
+from Mailman import mm_cfg
+from Mailman import i18n
+from Mailman.UserDesc import UserDesc
+from Mailman.ListAdmin import readMessage
+from email.Iterators import typed_subpart_iterator
+
+
+uid = getpwnam(mm_cfg.MAILMAN_USER)[2]
+gid = getgrnam(mm_cfg.MAILMAN_GROUP)[2]
+
+if not os.getuid():
+ os.setregid(gid,gid)
+ os.setreuid(uid,uid)
+
+if ( os.getuid() is not uid ) or ( os.getgid() is not gid):
+ sys.exit(0)
+
+
+for listname in Utils.list_names():
+ try:
+ mlist = MailList.MailList(listname,lock=0)
+ except:
+ print 'ERROR for '+listname
+ continue
+ try:
+ mlist.Lock()
+
+ ############################################
+ # do treatement here
+ ############################################
+
+ mlist.Save()
+ mlist.Unlock()
+ print 'OK for '+listname
+ except:
+ print 'ERROR for '+listname
+ continue
+
+print 'DONE'
+
+# vim:set et:
--- /dev/null
+#!/bin/zsh
+
+chdir ${1:-.}
+
+dirs=(bin configs htdocs hooks include plugins scripts templates)
+opts=(-type f -not -path '*CVS*' -not -name '.cvsignore' -not -path '*.arch*' -not -path '*TESTS*')
+
+diff -u <(cat install.d/**/files|sort) <(find $dirs $opts|sort) \
+ | grep '^[-+][a-z]' | sed -e 's,^+,Orphaned: ,;s,^-,Missing : ,'
--- /dev/null
+#!/usr/bin/php
+<?php
+ foreach($argv as $i=>$file) {
+ if($i == 0) continue;
+ $fp = fopen($file,'r');
+ $fc = fread($fp,filesize($file));
+ fclose($fp);
+
+ preg_match_all('!(""".*?""")!s', $fc, $res);
+ if(count($res[1])) {
+ $fp = fopen($file.'.py','w');
+ foreach($res[1] as $l) {
+ fwrite($fp,'_('.stripslashes($l).")\n");
+ }
+ fclose($fp);
+ }
+ }
+?>
--- /dev/null
+#! /usr/bin/perl -w
+#***************************************************************************
+#* Copyright (C) 2003-2004 Polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************
+
+
+use strict;
+my %classes;
+my %styles;
+
+my $red="\e[1;37;31m";
+my $yel="\e[1;37;33m";
+my $blu="\e[1;37;34m";
+my $whi="\e[1;37;16m";
+my $gra="\e[0m";
+
+
+sub parse_dir($) {
+ my $dir = shift;
+ my @dirs;
+ opendir DIR,$dir;
+ while(my $a = readdir DIR) {
+ if( -d $dir."/".$a ) {
+ push @dirs,$dir."/".$a unless($a eq '.' or $a eq '..' or $a eq 'CVS');
+ } else {
+ &parse_file($dir."/".$a) if($a =~ /\.(php|tpl|htm[l]?)$/i);
+ }
+ }
+ closedir DIR;
+ foreach $dir (@dirs) { &parse_dir($dir); }
+}
+
+sub parse_file($) {
+ my $file = shift;
+ open FILE,"<$file";
+ my $text = join '',(<FILE>);
+ $text =~ s/[\s\t\n]+/ /g;
+ &get_classes($file,$text);
+ close FILE;
+}
+
+sub get_classes($$) {
+ my $file = shift;
+ my $text = shift;
+ while ($text =~ /<( *[^\/](?:->|[^>])*) *>(.*)$/) {
+ &parse_tag($file,$1);
+ $text = $2;
+ }
+}
+
+sub class_add($$) {
+ my $file = shift;
+ my $tag = shift;
+ my $class = shift;
+ if (defined($classes{"$tag.$class"})) {
+ $classes{"$tag.$class"} .= " $file";
+ } else {
+ $classes{"$tag.$class"} = $file;
+ }
+}
+
+sub parse_tag($$) {
+ my $file = shift;
+ my $tag = shift;
+
+ # tag interdits en xhtml
+ print STDERR "${red}XHTML error: ${yel}<$1> (majuscules) ${blu}($file)${gra}\n"
+ if($tag =~ /^((?:[A-Z]+[a-z]*)+)( |$)/);
+ print STDERR "${red}XHTML error: ${yel}<$1> ${blu}($file)${gra}\n"
+ if($tag =~ /^(b|i|u|big|small|font|center)( |$)/);
+ print STDERR "${red}XHTML error: ${yel}<$1> sans '/' ${blu}($file)${gra}\n"
+ if($tag =~ /^(br|hr|img|link|input)( [^\/]*)?$/);
+
+ print STDERR "${red}XHTML error: ${yel}attribut $1 sans = ${blu}($file)${gra}\n"
+ if($tag =~ / (checked|disabled|multiple|readonly)( |$)/);
+ print STDERR "${red}XHTML error: ${yel}attribut $1 ${blu}($file)${gra}\n"
+ if($tag =~ / (align|width|border|color|valign)=/);
+
+ # récupération des classes utilisées ...
+ if($tag =~ /^(\w+).* class=('{[^}]*}'|"{[^}]*}"|'[^{}']*'|"[^{}"]*")/) {
+ my $t = lc($1);
+ $2 =~ /^['"](.*)['"]$/;
+ my $c = lc($1);
+ if($c =~ /^{ ?cycle.* values=('[^']*'|"[^"]*")/) {
+ my @cycle = split /['",]/,$1;
+ foreach my $cl (@cycle) {
+ &class_add($file,$t,$cl) if($cl);
+ }
+ } else {
+ &class_add($file,$t,$c);
+ }
+ }
+
+ #récupération des styles utilisés ...
+ if($tag =~ /^(\w+).* style=('{[^}]*}'|"{[^}]*}"|'[^{}']*'|"[^{}"]*")/) {
+ my $t = lc($1);
+ $2 =~ /^['"](.*)['"]$/;
+ my $s = lc($1);
+ if (defined($styles{"$t => $s"})) {
+ $styles{"$t => $s"} .= " $file";
+ } else {
+ $styles{"$t => $s"} = $file;
+ }
+ }
+}
+
+foreach my $dir (@ARGV) {
+ &parse_dir($dir);
+}
+
+print "\n$blu..:: Classes ::..$gra\n\n";
+foreach my $key (sort(keys(%classes))) {
+ print $key,"\n";
+}
+
+print "\n$blu..:: Styles ::..$gra\n\n";
+foreach my $key (sort(keys(%styles))) {
+ print $key,"\t",$whi,$styles{$key},$gra,"\n";
+}
+
+print "\n";
+
+# vim:set et ts=4 sts=4 sw=4:
--- /dev/null
+#!/usr/bin/perl
+#***************************************************************************
+#* Copyright (C) 2003-2004 Polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************/
+
+use LWP::UserAgent;
+use HTTP::Request::Common 'POST';
+
+print LWP::UserAgent
+ ->new
+ ->request(
+ POST 'http://murphy.polytechnique.org/w3c-markup-validator/check',
+ Content_Type => 'form-data',
+ Content => [
+ output => 'xml',
+ uploaded_file => [$ARGV[0]],
+ ]
+ )->as_string;
+
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+ini_set('include_path', '../include:/usr/share/php');
+
+require_once('../include/xorg.inc.php');
+require_once('../include/emails.inc.php');
+
+$opts = getopt('i:');
+if (($opts['i'] && $opts['i'] == '-') || empty($opts['i'])) {
+ $file = 'php://stdin';
+} else {
+ $file = $opts['i'];
+}
+
+$emails = split("\n", file_get_contents($file));
+foreach ($emails as $_email) {
+ $email = valide_email($_email);
+ if (empty($email) || $email=='@') {
+ continue;
+ }
+
+ $sel = $globals->xdb->query(
+ "SELECT e1.uid, e1.panne != 0 AS panne, count(e2.uid) AS nb_mails, u.nom, u.prenom, u.promo, a.alias
+ FROM emails AS e1
+ LEFT JOIN emails AS e2 ON (e1.uid = e2.uid AND FIND_IN_SET('active', e2.flags) AND e1.email != e2.email)
+ INNER JOIN auth_user_md5 AS u ON (e1.uid = u.user_id)
+ INNER JOIN aliases AS a ON (u.user_id = a.id AND FIND_IN_SET('bestalias',a.flags))
+ WHERE e1.email = {?}
+ GROUP BY e1.uid", $email);
+ if ($x = $sel->fetchOneAssoc()) {
+ if (!$x['panne']) {
+ $globals->xdb->execute("UPDATE emails SET panne=NOW() WHERE email = {?}", $email);
+ }
+
+ if (empty($x['nb_mails'])) {
+ echo "$email : seule adresse active de {$x['prenom']} {$x['nom']}\n";
+ } else {
+ $message = " Bonjour !
+
+ Nous t'écrivons car lors de l'envoi de la lettre d'information mensuelle
+de Polytechnique.org à ton adresse polytechnicienne :
+
+ {$x['alias']}@polytechnique.org,
+
+l'adresse {$email}, sur laquelle tu rediriges ton courrier, ne
+fonctionnait pas.
+
+ Estimant que cette information serait susceptible de t'intéresser, nous
+avons préféré t'en informer. Il n'est pas impossible qu'il ne s'agisse que
+d'une panne temporaire. Si tu souhaites changer la liste des adresses sur
+lesquelles tu reçois le courrier qui t'es envoyé à ton adresse
+polytechnicienne, il te suffit de te rendre sur la page :
+
+ {$globals->baseurl}/emails/redirect.php
+
+
+ A bientôt sur Polytechnique.org !
+ L'équipe d'administration <support@polytechnique.org>
+
+---------------------------------------------------------------------------
+
+ PS : si jamais tu ne disposes plus du mot de passe te permettant
+d'accéder au site, rends toi sur la page
+
+ {$globals->baseurl}/recovery.php
+
+elle te permettra de créer un nouveau mot de passe après avoir rentré ton
+login ({$x['alias']}) et ta date de naissance !";
+
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $mail = new HermesMailer();
+ $mail->setFrom('"Polytechnique.org" <support@polytechnique.org>');
+ $mail->addTo("\"{$x['prenom']} {$x['nom']}\" <{$x['alias']}@polytechnique.org>");
+ $mail->setSubject("Une de tes adresse de redirection Polytechnique.org ne marche plus !!");
+ $mail->setTxtBody($message);
+ $mail->send();
+ echo "$email : mail envoyé\n";
+ }
+ } else {
+ echo "$email : cette addresse n'est pas dans la base\n";
+ }
+}
+
+?>
--- /dev/null
+#! /bin/ash
+
+TEMPLATES='/etc/mailman/xorg'
+URL='http://listes.polytechnique.org'
+TARGET="/var/lib/mailman/lists/$1/fr"
+
+MBOX=${1#*_}
+FQDN=${1%%_*}
+
+ALIST="${MBOX}-owner@${FQDN}"
+LIST="${MBOX}@${FQDN}"
+UIST="${MBOX}_${FQDN}"
+ADMIN="$URL/admin/$UIST"
+MEMBERS="$URL/members/$UIST"
+MODERATE="$URL/moderate/$UIST"
+
+mkdir -p "$TARGET"
+
+for tpl in $TEMPLATES/*txt
+do
+ cat $tpl \
+ | sed -e "s,{{{ALIST}}},$ALIST,g ; s,{{{LIST}}},$LIST,g ; s,{{{ADMIN}}},$ADMIN,g ; s,{{{MEMBERS}}},$MEMBERS,g ; s,{{{MODERATE}}},$MODERATE,g" \
+ > "$TARGET/${tpl#$TEMPLATES/}"
+done
+
--- /dev/null
+#! /bin/perl -w
+#
+use strict;
+################################################################################
+# the RCFILE is the first arg
+#
+my $rcfile = shift;
+#
+################################################################################
+# the list prefix is the second one
+#
+my $list = shift;
+#
+################################################################################
+# CONSTANTS
+#
+my $spool = "/var/spool/platal/archives/";
+my $tmpbox = "mytmpbox.mbox";
+
+my %conv;
+$conv{'Jan'} = "01";
+$conv{'Feb'} = "02";
+$conv{'Mar'} = "03";
+$conv{'Apr'} = "04";
+$conv{'May'} = "05";
+$conv{'Jun'} = "06";
+$conv{'Jul'} = "07";
+$conv{'Aug'} = "08";
+$conv{'Sep'} = "09";
+$conv{'Oct'} = "10";
+$conv{'Nov'} = "11";
+$conv{'Dec'} = "12";
+#
+################################################################################
+# local vars
+#
+my $mail = "";
+my $line = "";
+my $odir = "";
+
+my $y = '';
+my $m = '';
+#
+################################################################################
+
+while(<>) {
+ $line = $_;
+
+ ##
+ ## Do we start a new mail ?
+ ##
+ if($line =~ /^From +[^@ ]*@[^@ ]* +[a-z]* +([a-z]*) +\d* +\d*:\d*:\d* +(\d*)$/i) {
+ if ($conv{$1} ne $m || $y ne $2) {
+ if($odir) {
+ ##
+ ## If we are here, then we just finished a month.
+ ## -> we close the file, and exec mhonarc on the stuff
+ ##
+ close FILE;
+ $odir = $spool.$list."/$y/$m";
+ system("mkdir -p $odir") unless (-d $odir);
+ system("mhonarc -add -outdir $odir -rcfile $rcfile $tmpbox");
+ } else {
+ # dummy init
+ $odir = 1;
+ }
+
+ $m = $conv{$1};
+ $y = $2;
+ open FILE,"> $tmpbox";
+ }
+ }
+
+ print FILE $line;
+}
+
+if($odir) {
+ close FILE;
+ unlink $tmpbox;
+}
--- /dev/null
+#! /bin/sh
+
+SPOOL=/var/spool/platal/archives/
+OUTDIR="${SPOOL}/$1/`date +'%Y/%m/'`"
+RCFILE=../install.d/lists/platal.mrc
+
+[ -d "$OUTDIR" ] || mkdir -p "$OUTDIR"
+exec mhonarc -add -outdir "$OUTDIR" -rcfile "$RCFILE"
--- /dev/null
+#!/usr/bin/env python
+#***************************************************************************
+#* Copyright (C) 2004 polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************
+
+import base64, MySQLdb, os, getopt, sys, sha, signal, re, shutil, ConfigParser
+import MySQLdb.converters
+import SocketServer
+
+sys.path.append('/usr/lib/mailman/bin')
+
+from pwd import getpwnam
+from grp import getgrnam
+
+from SimpleXMLRPCServer import SimpleXMLRPCServer
+from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
+
+import paths
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import Message
+from Mailman import Errors
+from Mailman import mm_cfg
+from Mailman import i18n
+from Mailman.UserDesc import UserDesc
+from Mailman.ListAdmin import readMessage
+from email.Iterators import typed_subpart_iterator
+from threading import Lock
+
+class AuthFailed(Exception): pass
+
+################################################################################
+#
+# CONFIG
+#
+#------------------------------------------------
+
+config = ConfigParser.ConfigParser()
+config.read(os.path.dirname(__file__)+'/../configs/platal.conf')
+
+def get_config(sec,val,default=None):
+ try:
+ return config.get(sec, val)[1:-1]
+ except ConfigParser.NoOptionError, e:
+ if default is None:
+ print e
+ sys.exit(1)
+ else:
+ return default
+
+BASEURL = get_config('Core', 'baseurl')
+MYSQL_USER = get_config('Core', 'dbuser')
+MYSQL_PASS = get_config('Core', 'dbpwd')
+
+PLATAL_DOMAIN = get_config('Mail', 'domain')
+PLATAL_DOMAIN2 = get_config('Mail', 'domain2', '')
+
+ML_OWNER = get_config('Lists', 'admin_owner')
+VHOST_SEP = get_config('Lists', 'vhost_sep', '_')
+ON_CREATE_CMD = get_config('Lists', 'on_create', '')
+
+################################################################################
+#
+# CLASSES
+#
+#------------------------------------------------
+# Manage Basic authentication
+#
+
+class BasicAuthXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
+
+ """XMLRPC Request Handler
+ This request handler is used to provide BASIC HTTP user authentication.
+ It first overloads the do_POST() function, authenticates the user, then
+ calls the super.do_POST().
+
+ Moreover, we override _dispatch, so that we call functions with as first
+ argument a UserDesc taken from the database, containing name, email and perms
+ """
+
+ def _dispatch(self,method,params):
+ # TODO: subclass in SimpleXMLRPCDispatcher and not here.
+ new_params = list(params)
+ new_params.insert(0,self.data[2])
+ new_params.insert(0,self.data[1])
+ new_params.insert(0,self.data[0])
+ return self.server._dispatch(method,new_params)
+
+ def do_POST(self):
+ try:
+ _, auth = self.headers["authorization"].split()
+ uid, md5 = base64.decodestring(auth).strip().split(':')
+ vhost = self.path.split('/')[1].lower()
+ self.data = self.getUser(uid,md5,vhost)
+ if self.data is None:
+ raise AuthFailed
+ # Call super.do_POST() to do the actual work
+ SimpleXMLRPCRequestHandler.do_POST(self)
+ except:
+ self.send_response(401)
+ self.end_headers()
+
+ def getUser(self, uid, md5, vhost):
+ res = mysql_fetchone ("""SELECT CONCAT(u.prenom, ' ',u.nom),a.alias,u.perms
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( a.id=u.user_id AND a.type='a_vie' )
+ WHERE u.user_id = '%s' AND u.password = '%s' AND u.perms IN ('admin','user')
+ LIMIT 1""" %( uid, md5 ) )
+ if res:
+ name,forlife,perms = res
+ if vhost != PLATAL_DOMAIN:
+ res = mysql_fetchone ("""SELECT uid
+ FROM groupex.membres AS m
+ INNER JOIN groupex.asso AS a ON (m.asso_id = a.id)
+ WHERE perms='admin' AND uid='%s' AND mail_domain='%s'""" %( uid , vhost ) )
+ if res: perms= 'admin'
+ userdesc = UserDesc(forlife+'@'+PLATAL_DOMAIN, name, None, 0)
+ return (userdesc,perms,vhost)
+ else:
+ return None
+
+################################################################################
+#
+# XML RPC STUFF
+#
+#-------------------------------------------------------------------------------
+# helpers
+#
+
+def connectDB():
+ db = MySQLdb.connect(
+ db='x4dat',
+ user=MYSQL_USER,
+ passwd=MYSQL_PASS,
+ unix_socket='/var/run/mysqld/mysqld.sock')
+ db.ping()
+ return db.cursor()
+
+def mysql_fetchone(query):
+ ret = None
+ try:
+ lock.acquire()
+ mysql.execute(query)
+ if int(mysql.rowcount) > 0:
+ ret = mysql.fetchone()
+ finally:
+ lock.release()
+ return ret
+
+def is_owner(userdesc,perms,mlist):
+ return ( perms == 'admin' and ML_OWNER in mlist.owner ) or ( userdesc.address in mlist.owner )
+
+def is_admin_on(userdesc,perms,mlist):
+ return ( perms == 'admin' ) or ( userdesc.address in mlist.owner )
+
+
+def quote(s,is_header=False):
+ if is_header:
+ h = Utils.oneline(s,'iso-8859-1')
+ else:
+ h = s
+ h = str('').join(re.split('[\x00-\x1f]+', s))
+ return Utils.uquote(h.replace('&','&').replace('>','>').replace('<','<'))
+
+def to_forlife(email):
+ try:
+ mbox,fqdn = email.split('@')
+ except:
+ mbox = email
+ fqdn = PLATAL_DOMAIN
+ if ( fqdn == PLATAL_DOMAIN ) or ( fqdn == PLATAL_DOMAIN2 ):
+ res = mysql_fetchone("""SELECT CONCAT(f.alias,'@%s'), CONCAT(u.prenom,' ',u.nom)
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS f ON (f.id=u.user_id AND f.type='a_vie')
+ INNER JOIN aliases AS a ON (a.id=u.user_id AND a.alias='%s' AND a.type!='homonyme')
+ WHERE u.perms IN ('admin','user')
+ LIMIT 1""" %( PLATAL_DOMAIN, mbox ) )
+ if res:
+ return res
+ else:
+ return (None,None)
+ return (email,mbox)
+
+##
+# see /usr/lib/mailman/bin/rmlist
+##
+def remove_it(listname, filename):
+ if os.path.islink(filename) or os.path.isfile(filename):
+ os.unlink(filename)
+ elif os.path.isdir(filename):
+ shutil.rmtree(filename)
+
+#-------------------------------------------------------------------------------
+# helpers on lists
+#
+
+def get_list_info(userdesc,perms,mlist,front_page=0):
+ members = mlist.getRegularMemberKeys()
+ is_member = userdesc.address in members
+ is_admin = ML_OWNER in mlist.owner
+ is_owner = ( perms == 'admin' and is_admin ) or ( userdesc.address in mlist.owner )
+ if mlist.advertised or is_member or is_owner or (not front_page and perms == 'admin'):
+ is_pending = False
+ if not is_member and (mlist.subscribe_policy > 1):
+ try:
+ mlist.Lock()
+ for id in mlist.GetSubscriptionIds():
+ if userdesc.address == mlist.GetRecord(id)[1]:
+ is_pending = 1
+ break
+ mlist.Unlock()
+ except:
+ mlist.Unlock()
+ return 0
+
+ host = mlist.internal_name().split(VHOST_SEP)[0].lower()
+ details = {
+ 'list' : mlist.real_name,
+ 'addr' : mlist.real_name.lower() + '@' + host,
+ 'host' : host,
+ 'desc' : quote(mlist.description),
+ 'info' : quote(mlist.info),
+ 'diff' : (mlist.default_member_moderation>0) + (mlist.generic_nonmember_action>0),
+ 'ins' : mlist.subscribe_policy > 1,
+ 'priv' : (1-mlist.advertised)+2*is_admin,
+ 'sub' : 2*is_member + is_pending,
+ 'own' : is_owner,
+ 'nbsub': len(members)
+ }
+ return (details,members)
+ return 0
+
+def get_options(userdesc,perms,vhost,listname,opts):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ options = { }
+ for (k,v) in mlist.__dict__.iteritems():
+ if k in opts:
+ if type(v) is str:
+ options[k] = quote(v)
+ else: options[k] = v
+ details = get_list_info(userdesc,perms,mlist)[0]
+ return (details,options)
+ except:
+ return 0
+
+def set_options(userdesc,perms,vhost,listname,opts,vals):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ mlist.Lock()
+ for (k,v) in vals.iteritems():
+ if k not in opts:
+ continue
+ if k == 'default_member_moderation':
+ for member in mlist.getMembers():
+ mlist.setMemberOption(member, mm_cfg.Moderate, int(v))
+ t = type(mlist.__dict__[k])
+ if t is bool: mlist.__dict__[k] = bool(v)
+ elif t is int: mlist.__dict__[k] = int(v)
+ elif t is str: mlist.__dict__[k] = Utils.uncanonstr(v,'fr')
+ else: mlist.__dict__[k] = v
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ return 0
+
+#-------------------------------------------------------------------------------
+# users procedures for [ index.php ]
+#
+
+def get_lists(userdesc,perms,vhost,email=None):
+ if email is None:
+ udesc = userdesc
+ else:
+ udesc = UserDesc(email, email, None, 0)
+ prefix = vhost.lower()+VHOST_SEP
+ names = Utils.list_names()
+ names.sort()
+ result = []
+ for name in names:
+ if not name.startswith(prefix):
+ continue
+ try:
+ mlist = MailList.MailList(name,lock=0)
+ except:
+ continue
+ try:
+ details = get_list_info(udesc,perms,mlist,(email is None and vhost == PLATAL_DOMAIN))[0]
+ result.append(details)
+ except:
+ continue
+ return result
+
+def subscribe(userdesc,perms,vhost,listname):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ mlist.Lock()
+ if ( mlist.subscribe_policy in (0,1) ) or is_owner(userdesc,perms,mlist):
+ mlist.ApprovedAddMember(userdesc)
+ result = 2
+ else:
+ result = 1
+ try:
+ mlist.AddMember(userdesc)
+ except Errors.MMNeedApproval:
+ pass
+ mlist.Save()
+ except:
+ result = 0
+ mlist.Unlock()
+ return result
+
+def unsubscribe(userdesc,perms,vhost,listname):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ mlist.Lock()
+ mlist.ApprovedDeleteMember(userdesc.address)
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ return 0
+
+#-------------------------------------------------------------------------------
+# users procedures for [ index.php ]
+#
+
+def get_members(userdesc,perms,vhost,listname):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ details,members = get_list_info(userdesc,perms,mlist)
+ members.sort()
+ members = map(lambda member: (quote(mlist.getMemberName(member)) or '', member), members)
+ return (details,members,mlist.owner)
+ except:
+ return 0
+
+#-------------------------------------------------------------------------------
+# users procedures for [ trombi.php ]
+#
+
+def get_members_limit(userdesc,perms,vhost,listname,page,nb_per_page):
+ try:
+ members = get_members(userdesc,perms,vhost,listname.lower())[1]
+ except:
+ return 0
+ i = int(page) * int(nb_per_page)
+ return (len(members), members[i:i+int(nb_per_page)])
+
+def get_owners(userdesc,perms,vhost,listname):
+ try:
+ details,members,owners = get_members(userdesc,perms,vhost,listname.lower())
+ except:
+ return 0
+ return (details,owners)
+
+#-------------------------------------------------------------------------------
+# owners procedures [ admin.php ]
+#
+
+def mass_subscribe(userdesc,perms,vhost,listname,users):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+
+ members = mlist.getRegularMemberKeys()
+ added = []
+ mlist.Lock()
+ for user in users:
+ email, name = to_forlife(user)
+ if ( email is None ) or ( email in members ):
+ continue
+ userd = UserDesc(email, name, None, 0)
+ mlist.ApprovedAddMember(userd)
+ added.append( (quote(userd.fullname), userd.address) )
+ mlist.Save()
+ except:
+ pass
+ mlist.Unlock()
+ return added
+
+def mass_unsubscribe(userdesc,perms,vhost,listname,users):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+
+ mlist.Lock()
+ map(lambda user: mlist.ApprovedDeleteMember(user), users)
+ mlist.Save()
+ except:
+ pass
+ mlist.Unlock()
+ return users
+
+def add_owner(userdesc,perms,vhost,listname,user):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ email = to_forlife(user)[0]
+ if email is None:
+ return 0
+ if email not in mlist.owner:
+ mlist.Lock()
+ mlist.owner.append(email)
+ mlist.Save()
+ except:
+ pass
+ mlist.Unlock()
+ return True
+
+def del_owner(userdesc,perms,vhost,listname,user):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ if len(mlist.owner) < 2:
+ return 0
+ mlist.Lock()
+ mlist.owner.remove(user)
+ mlist.Save()
+ except:
+ pass
+ mlist.Unlock()
+ return True
+
+#-------------------------------------------------------------------------------
+# owners procedures [ admin.php ]
+#
+
+def get_pending_ops(userdesc,perms,vhost,listname):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+
+ mlist.Lock()
+
+ subs = []
+ seen = []
+ dosave = False
+ for id in mlist.GetSubscriptionIds():
+ time, addr, fullname, passwd, digest, lang = mlist.GetRecord(id)
+ if addr in seen:
+ mlist.HandleRequest(id, mm_cfg.DISCARD)
+ dosave = True
+ continue
+ seen.append(addr)
+ try:
+ login = re.match("^[^.]*\.[^.]*\.\d\d\d\d$", addr.split('@')[0]).group()
+ subs.append({'id': id, 'name': quote(fullname), 'addr': addr, 'login': login })
+ except:
+ subs.append({'id': id, 'name': quote(fullname), 'addr': addr })
+
+ helds = []
+ for id in mlist.GetHeldMessageIds():
+ ptime, sender, subject, reason, filename, msgdata = mlist.GetRecord(id)
+ try:
+ size = os.path.getsize(os.path.join(mm_cfg.DATA_DIR, filename))
+ except OSError, e:
+ if e.errno <> errno.ENOENT: raise
+ continue
+ helds.append({
+ 'id' : id,
+ 'sender': quote(sender, True),
+ 'size' : size,
+ 'subj' : quote(subject, True),
+ 'stamp' : ptime
+ })
+ if dosave: mlist.Save()
+ mlist.Unlock()
+ except:
+ mlist.Unlock()
+ return 0
+ return (subs,helds)
+
+
+def handle_request(userdesc,perms,vhost,listname,id,value,comment):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ mlist.Lock()
+ mlist.HandleRequest(int(id),int(value),comment)
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ return 0
+
+
+def get_pending_mail(userdesc,perms,vhost,listname,id,raw=0):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ mlist.Lock()
+ ptime, sender, subject, reason, filename, msgdata = mlist.GetRecord(int(id))
+ fpath = os.path.join(mm_cfg.DATA_DIR, filename)
+ size = os.path.getsize(fpath)
+ msg = readMessage(fpath)
+ mlist.Unlock()
+
+ if raw:
+ return str(msg)
+ results = []
+ for part in typed_subpart_iterator(msg,'text','plain'):
+ c = part.get_payload()
+ if c is not None: results.append (c)
+ results = map(lambda x: quote(x), results)
+ return {'id' : id,
+ 'sender': quote(sender, True),
+ 'size' : size,
+ 'subj' : quote(subject, True),
+ 'stamp' : ptime,
+ 'parts' : results }
+ except:
+ mlist.Unlock()
+ return 0
+
+#-------------------------------------------------------------------------------
+# owner options [ options.php ]
+#
+
+owner_opts = ['accept_these_nonmembers', 'admin_notify_mchanges', 'description', \
+ 'default_member_moderation', 'generic_nonmember_action', 'info', \
+ 'subject_prefix', 'goodbye_msg', 'send_goodbye_msg', 'subscribe_policy', \
+ 'welcome_msg']
+
+def get_owner_options(userdesc,perms,vhost,listname):
+ return get_options(userdesc,perms,vhost,listname.lower(),owner_opts)
+
+def set_owner_options(userdesc,perms,vhost,listname,values):
+ return set_options(userdesc,perms,vhost,listname.lower(),owner_opts,values)
+
+def add_to_wl(userdesc,perms,vhost,listname,addr):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ mlist.Lock()
+ mlist.accept_these_nonmembers.append(addr)
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ return 0
+
+def del_from_wl(userdesc,perms,vhost,listname,addr):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ mlist.Lock()
+ mlist.accept_these_nonmembers.remove(addr)
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ return 0
+
+def get_bogo_level(userdesc,perms,vhost,listname):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ if mlist.header_filter_rules == []:
+ return 0
+ action = mlist.header_filter_rules[0][1]
+ if action == mm_cfg.HOLD:
+ return 1
+ if action == mm_cfg.DISCARD:
+ return 2
+ except:
+ return 0
+
+def set_bogo_level(userdesc,perms,vhost,listname,level):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ hfr = []
+ if int(level) is 1:
+ hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
+ elif int(level) is 2:
+ hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.DISCARD, False))
+ if mlist.header_filter_rules != hfr:
+ mlist.Lock()
+ mlist.header_filter_rules = hfr
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ return 0
+
+#-------------------------------------------------------------------------------
+# admin procedures [ soptions.php ]
+#
+
+admin_opts = [ 'advertised', 'archive', \
+ 'max_message_size', 'msg_footer', 'msg_header']
+
+def get_admin_options(userdesc,perms,vhost,listname):
+ if perms != 'admin':
+ return 0
+ return get_options(userdesc,perms,vhost,listname.lower(),admin_opts)
+
+def set_admin_options(userdesc,perms,vhost,listname,values):
+ if perms != 'admin':
+ return 0
+ return set_options(userdesc,perms,vhost,listname.lower(),admin_opts,values)
+
+#-------------------------------------------------------------------------------
+# admin procedures [ check.php ]
+#
+
+check_opts = {
+ 'acceptable_aliases' : '',
+ 'admin_immed_notify' : True,
+ 'administrivia' : True,
+ 'anonymous_list' : False,
+ 'autorespond_admin' : False,
+ 'autorespond_postings' : False,
+ 'autorespond_requests' : False,
+ 'available_languages' : ['fr'],
+ 'ban_list' : [],
+ 'bounce_matching_headers' : '',
+ 'bounce_processing' : False,
+ 'convert_html_to_plaintext' : False,
+ 'digestable' : False,
+ 'digest_is_default' : False,
+ 'discard_these_nonmembers' : [],
+ 'emergency' : False,
+ 'encode_ascii_prefixes' : 2,
+ 'filter_content' : False,
+ 'first_strip_reply_to' : False,
+ 'forward_auto_discards' : True,
+ 'hold_these_nonmembers' : [],
+ 'host_name' : 'listes.polytechnique.org',
+ 'include_list_post_header' : False,
+ 'include_rfc2369_headers' : False,
+ 'max_num_recipients' : 0,
+ 'new_member_options' : 256,
+ 'nondigestable' : True,
+ 'obscure_addresses' : True,
+ 'preferred_language' : 'fr',
+ 'reject_these_nonmembers' : [],
+ 'reply_goes_to_list' : 0,
+ 'reply_to_address' : '',
+ 'require_explicit_destination' : False,
+ 'send_reminders' : 0,
+ 'send_welcome_msg' : True,
+ 'topics_enabled' : False,
+ 'umbrella_list' : False,
+ 'unsubscribe_policy' : 0,
+}
+
+def check_options(userdesc,perms,vhost,listname,correct=False):
+ try:
+ mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(),lock=0)
+ except:
+ return 0
+ try:
+ if perms != 'admin': return 0
+ if correct:
+ mlist.Lock()
+ options = { }
+ for (k,v) in check_opts.iteritems():
+ if mlist.__dict__[k] != v:
+ options[k] = v,mlist.__dict__[k]
+ if correct: mlist.__dict__[k] = v
+ if mlist.real_name.lower() != listname:
+ options['real_name'] = listname, mlist.real_name
+ if correct: mlist.real_name = listname
+ if correct:
+ mlist.Save()
+ mlist.Unlock()
+ details = get_list_info(userdesc,perms,mlist)[0]
+ return (details,options)
+ except:
+ if correct: mlist.Unlock()
+ return 0
+
+#-------------------------------------------------------------------------------
+# super-admin procedures
+#
+
+def get_all_lists(userdesc,perms,vhost):
+ prefix = vhost.lower()+VHOST_SEP
+ names = Utils.list_names()
+ names.sort()
+ result = []
+ for name in names:
+ if not name.startswith(prefix):
+ continue
+ result.append(name.replace(prefix,''))
+ return result
+
+def create_list(userdesc,perms,vhost,listname,desc,advertise,modlevel,inslevel,owners,members):
+ if perms != 'admin':
+ return 0
+ name = vhost.lower()+VHOST_SEP+listname.lower();
+ if Utils.list_exists(name):
+ return 0
+
+ owner = []
+ for o in owners:
+ email = to_forlife(o)[0]
+ if email is not None:
+ owner.append(email)
+ if len(owner) is 0:
+ return 0
+
+ mlist = MailList.MailList()
+ try:
+ oldmask = os.umask(002)
+ pw = sha.new('foobar').hexdigest()
+
+ try:
+ mlist.Create(name, owner[0], pw)
+ finally:
+ os.umask(oldmask)
+
+ mlist.real_name = listname
+ mlist.host_name = 'listes.polytechnique.org'
+ mlist.description = desc
+
+ mlist.advertised = int(advertise) is 0
+ mlist.default_member_moderation = int(modlevel) is 2
+ mlist.generic_nonmember_action = int(modlevel) > 0
+ mlist.subscribe_policy = 2 * (int(inslevel) is 1)
+ mlist.admin_notify_mchanges = (mlist.subscribe_policy or mlist.generic_nonmember_action or mlist.default_member_moderation or not mlist.advertised)
+
+ mlist.owner = owner
+
+ mlist.subject_prefix = '['+listname+'] '
+ mlist.max_message_size = 0
+
+ mlist.msg_footer = "_______________________________________________\n" \
+ + "Liste de diffusion %(real_name)s\n"
+
+ mlist.header_filter_rules = []
+ mlist.header_filter_rules.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
+
+ mlist.Save()
+
+ mlist.Unlock()
+
+ check_options(userdesc,perms,vhost,listname.lower(),True)
+ mass_subscribe(userdesc,perms,vhost,listname.lower(),members)
+
+ # avoid the "-1 mail to moderate" bug
+ mlist = MailList.MailList(name)
+ mlist._UpdateRecords()
+ mlist.Save()
+ mlist.Unlock()
+ if ON_CREATE_CMD != '':
+ try: os.system(ON_CREATE_CMD + ' ' + name)
+ except: pass
+ except:
+ try:
+ mlist.Unlock()
+ except:
+ pass
+ return 0
+ return 1
+
+def delete_list(userdesc,perms,vhost,listname,del_archives=0):
+ lname = vhost+VHOST_SEP+listname.lower()
+ try:
+ mlist = MailList.MailList(lname,lock=0)
+ except:
+ return 0
+ try:
+ if not is_admin_on(userdesc, perms, mlist):
+ return 0
+ # remove the list
+ REMOVABLES = [ os.path.join('lists', lname), ]
+ # remove stalled locks
+ for filename in os.listdir(mm_cfg.LOCK_DIR):
+ fn_lname = filename.split('.')[0]
+ if fn_lname == lname:
+ REMOVABLES.append(os.path.join(mm_cfg.LOCK_DIR, filename))
+ # remove archives ?
+ if del_archives:
+ REMOVABLES.extend([
+ os.path.join('archives', 'private', lname),
+ os.path.join('archives', 'private', lname+'.mbox'),
+ os.path.join('archives', 'public', lname),
+ os.path.join('archives', 'public', lname+'.mbox')
+ ])
+ map(lambda dir: remove_it(lname, os.path.join(mm_cfg.VAR_PREFIX, dir)), REMOVABLES)
+ return 1
+ except:
+ return 0
+
+def kill(userdesc,perms,vhost,alias,del_from_promo):
+ exclude = []
+ if not del_from_promo:
+ exclude.append(PLATAL_DOMAIN+VHOST_SEP+'promo'+alias[-4:])
+ for list in Utils.list_names():
+ if list in exclude: continue
+ try:
+ mlist = MailList.MailList(list,lock=0)
+ except:
+ continue
+ try:
+ mlist.Lock()
+ mlist.ApprovedDeleteMember(alias+'@'+PLATAL_DOMAIN,None,0,0)
+ mlist.Save()
+ mlist.Unlock()
+ except:
+ mlist.Unlock()
+ return 1
+
+
+#-------------------------------------------------------------------------------
+# server
+#
+class FastXMLRPCServer(SocketServer.ThreadingMixIn, SimpleXMLRPCServer):
+ allow_reuse_address = True
+
+################################################################################
+#
+# INIT
+#
+#-------------------------------------------------------------------------------
+# use Mailman user and group (not root)
+# fork in background if asked to
+#
+
+uid = getpwnam(mm_cfg.MAILMAN_USER)[2]
+gid = getgrnam(mm_cfg.MAILMAN_GROUP)[2]
+
+if not os.getuid():
+ os.setregid(gid,gid)
+ os.setreuid(uid,uid)
+
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
+
+if ( os.getuid() is not uid ) or ( os.getgid() is not gid):
+ sys.exit(0)
+
+opts, args = getopt.getopt(sys.argv[1:], 'f')
+for o, a in opts:
+ if o == '-f' and os.fork():
+ sys.exit(0)
+
+i18n.set_language('fr')
+mysql = connectDB()
+lock = Lock()
+
+#-------------------------------------------------------------------------------
+# server
+#
+server = FastXMLRPCServer(("localhost", 4949), BasicAuthXMLRPCRequestHandler)
+
+# index.php
+server.register_function(get_lists)
+server.register_function(subscribe)
+server.register_function(unsubscribe)
+# members.php
+server.register_function(get_members)
+# trombi.php
+server.register_function(get_members_limit)
+server.register_function(get_owners)
+# admin.php
+server.register_function(mass_subscribe)
+server.register_function(mass_unsubscribe)
+server.register_function(add_owner)
+server.register_function(del_owner)
+# moderate.php
+server.register_function(get_pending_ops)
+server.register_function(handle_request)
+server.register_function(get_pending_mail)
+# options.php
+server.register_function(get_owner_options)
+server.register_function(set_owner_options)
+server.register_function(add_to_wl)
+server.register_function(del_from_wl)
+server.register_function(get_bogo_level)
+server.register_function(set_bogo_level)
+# soptions.php
+server.register_function(get_admin_options)
+server.register_function(set_admin_options)
+# check.php
+server.register_function(check_options)
+# create + del
+server.register_function(get_all_lists)
+server.register_function(create_list)
+server.register_function(delete_list)
+# utilisateurs.php
+server.register_function(kill)
+
+server.serve_forever()
+
+# vim:set et:
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require('./connect.db.inc.php');
+require("newsletter.inc.php");
+
+$opt = getopt('i:h');
+
+if(empty($opt['i']) || isset($opt['h'])) {
+ echo <<<EOF
+usage: send_nl.php -i nl_id
+ sends the NewsLetter of id "id"
+EOF;
+ exit;
+}
+
+$id = intval($opt['i']);
+$nl = new NewsLetter($id);
+$nl->setSent();
+
+while(true) {
+ $res = $globals->xdb->iterRow(
+ "SELECT ni.user_id, a.alias,
+ u.prenom, IF(u.nom_usage='', u.nom, u.nom_usage),
+ FIND_IN_SET('femme', u.flags),
+ q.core_mail_fmt AS pref
+ FROM newsletter_ins AS ni
+ INNER JOIN auth_user_md5 AS u USING(user_id)
+ INNER JOIN auth_user_quick AS q ON(q.user_id = u.user_id)
+ INNER JOIN aliases AS a ON(u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
+ WHERE ni.last<{?}
+ LIMIT 60", $id);
+ if (!$res->total()) { exit; }
+
+ $sent = Array();
+ while (list($uid, $bestalias, $prenom, $nom, $sexe, $fmt) = $res->next()) {
+ $sent[] = "user_id='$uid'";
+ $nl->sendTo($prenom, $nom, $bestalias, $sexe, $fmt=='html');
+ }
+ $globals->xdb->execute('UPDATE newsletter_ins SET last={?} WHERE '.implode(' OR ', $sent), $id);
+ sleep(60);
+}
+
+?>
--- /dev/null
+#!/usr/bin/php4 -q
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require('./connect.db.inc.php');
+require('user.func.inc.php');
+
+ini_set('memory_limit', "16M");
+$globals->xdb->execute('DELETE FROM search_name');
+
+$res = $globals->xdb->iterRow('SELECT auth_user_md5.user_id, nom, prenom, nom_usage, profile_nick FROM auth_user_md5 LEFT JOIN auth_user_quick USING(user_id)');
+$i = 0;
+$muls = array(1,1,1,0.2);
+while ($tmp = $res->next()) {
+ $uid = array_shift($tmp);
+ _user_reindex($uid, $tmp, $muls);
+ printf ("%02.2f %%\n", ++$i*100/$res->total());
+}
+
+?>
--- /dev/null
+#!/bin/ash
+# vim:set syntax=sh:
+
+export LANG=C
+
+UID="$1"
+ALIAS="$2"
+PASS="$3"
+
+[ -n "$UID" ] || {
+ echo "uid vide"
+ exit 75 # TEMPFAIL
+}
+
+[ -n "$ALIAS" ] || {
+ echo "alias vide"
+ exit 75 # TEMPFAIL
+}
+
+TO=`mysql -u web -h localhost --password="$3" -B -N x4dat -e \
+ "UPDATE emails SET last=NOW() WHERE uid = '$UID' AND FIND_IN_SET('active',flags) AND uid != 0; \
+ SELECT email FROM emails WHERE uid = '$UID' AND FIND_IN_SET('active',flags) AND uid != 0"`
+[ $? -eq 0 ] || {
+ echo "MySQL error for $UID"
+ exit 75 # TEMPFAIL
+}
+[ -n "$TO" ] || {
+ exec cat > /dev/null
+}
+
+OURSENDER=`echo "${ALIAS}__${SENDER}" | sed -e s/@/__/`@bounces.m4x.org
+exec /usr/lib/sendmail -oi -V+= -f "${OURSENDER}" $TO
--- /dev/null
+#! /usr/bin/python
+# set:encoding=iso-8859-1:
+
+import asyncore
+import email
+import os, re, sys
+
+from email import Message, MIMEText, MIMEMultipart
+from email.Iterators import typed_subpart_iterator, _structure
+from smtpd import PureProxy
+
+import ConfigParser
+import MySQLdb
+
+IGNORE = 0
+NOTICE = 1
+ERROR = 2
+
+FROM_PORT = 20024
+TO_HOST = 'olympe.madism.org'
+TO_PORT = 25
+
+
+################################################################################
+#
+# Functions
+#
+#-------------------------------------------------------------------------------
+
+config = ConfigParser.ConfigParser()
+config.read(os.path.dirname(__file__)+'/../configs/platal.conf')
+
+def get_config(sec,val,default=None):
+ try:
+ return config.get(sec, val)[1:-1]
+ except ConfigParser.NoOptionError, e:
+ if default is None:
+ print e
+ sys.exit(1)
+ else:
+ return default
+
+def connectDB():
+ db = MySQLdb.connect(
+ db = 'x4dat',
+ user = get_config('Core', 'dbuser'),
+ passwd = get_config('Core', 'dbpwd'),
+ unix_socket='/var/run/mysqld/mysqld.sock')
+ db.ping()
+ return db.cursor()
+
+def msg_of_str(data): return email.message_from_string(data, _class=BounceMessage)
+
+################################################################################
+#
+# Classes
+#
+#-------------------------------------------------------------------------------
+
+class BounceMessage(Message.Message):
+ def body(self):
+ """this method returns the part that is commonely designed as the 'body'
+
+ for the multipart mails, we go into the first part that have non multipart childs, and then :
+ we return its first text/plain part if it exsists
+ else we return the first text/* part if it exists
+ else we return None else
+
+ for non multipart mails, we just return the current payload
+ """
+ if self.is_multipart():
+ _body = self
+ while _body.get_payload(0).is_multipart():
+ _body = _body.get_payload(0)
+
+ buffer = None
+ for part in typed_subpart_iterator(_body):
+ if part.get_content_subtype() == 'plain':
+ return part.get_payload(decode=True)
+ if buffer is None:
+ buffer = part
+ return buffer.get_payload(decode=True)
+ return self.get_payload(decode=True)
+
+ def _qmail_attached_mail(self):
+ """qmail is a dumb MTA that put the mail that has bounced RAW into the bounce message,
+ instead of making a traditionnal message/rfc822 attachement like any other MTA
+
+ it seems to be designed like this :
+
+ =============================================
+ [...QMAIL crap...]
+ --- Below this line is a copy of the message.
+
+ Return-Path: <...>
+ [rest of the embeded mail]
+ =============================================
+
+ so we just cut the qmail crap, and build a new message from the rest.
+
+ may DJB burn into coder's hell
+ """
+ msg = self.get_payload(decode=True)
+ pos = msg.find("\n--- Below this line is a copy of the message.")
+ if pos is -1:
+ return None
+ pos = msg.find("Return-Path:", pos)
+ return msg_of_str(msg[pos:])
+
+ def attached_mail(self):
+ """returns the attached mail that bounced, if it exists.
+ we try this :
+
+ is the mail multipart ?
+ Yes :
+ (1) return the first message/rfc822 part.
+ (2) return the first text/rfc822-headers part (AOHell)
+ (3) return None (may be a vacation + some disclaimer in attachment)
+ No:
+ try to return the qmail-style embeded mail (but may be a vacation)
+ """
+ if self.is_multipart():
+ for part in typed_subpart_iterator(self, 'message', 'rfc822'):
+ return part
+ for part in typed_subpart_iterator(self, 'text', 'rfc822-headers'):
+ return part
+ return None
+ return self._qmail_attached_mail()
+
+ def error_level(self):
+ """determine the level of an error:
+ IGNORE == drop the mail
+ NOTICE == vacation, or any informative message we want to forward as is
+ ERROR == errors, that we want to handle
+ """
+
+ body = self.body()
+ if not body:
+ return (IGNORE, '')
+
+ mysql.execute ( "SELECT lvl,re,text FROM emails_bounces_re ORDER BY pos" )
+ nb = int(mysql.rowcount)
+ for x in range(0,nb):
+ row = mysql.fetchone()
+ if re.compile(str(row[1]), re.I | re.M).search(body):
+ return (int(row[0]), str(row[2]))
+
+ return (NOTICE, '')
+
+ def forge_error(self, alias, dest, txt):
+ """we have to do our little treatments for the broken mail,
+ and then we create an informative message for the original SENDER to :
+ - explain to him what happened (the detailed error)
+ - try to guess if the user may or may not have had the mail (by another leg)
+ - if no other leg, give an information to the SENDER on how he can give to us a real good leg
+ and attach any sensible information about the original mail (@see attached_mail)
+ """
+
+ mysql.execute("SELECT id FROM aliases WHERE alias='%s' AND type IN ('alias', 'a_vie') LIMIT 1" % (alias))
+ if int(mysql.rowcount) is not 1:
+ return None
+ uid = mysql.fetchone()[0]
+ mysql.execute("UPDATE emails SET panne = NOW() WHERE uid='%s' AND email='%s'" % (uid, dest))
+ mysql.execute("REPLACE INTO emails_broken (uid,email) VALUES(%s, '%s')" % (uid, dest))
+ mysql.execute("""SELECT COUNT(*),
+ IFNULL(SUM(panne=0 OR (last!=0 AND ( TO_DAYS(NOW())-TO_DAYS(last) )>7 AND panne<last)), 0),
+ IFNULL(SUM(panne!=0 AND last!=0 AND ( TO_DAYS(NOW())-TO_DAYS(last) )<7 AND panne<last) , 0),
+ IFNULL(SUM(panne!=0 AND (last=0 OR ( TO_DAYS(NOW())-TO_DAYS(last) )<1)) , 0)
+ FROM emails
+ WHERE FIND_IN_SET('active', flags) AND uid=%s AND email!='%s'""" % (uid, dest))
+
+ nb_act, nb_ok, nb_may, nb_bad = map(lambda x: int(x), mysql.fetchone())
+
+ txt = "Une des adresses de redirection de %s\n" % (alias) \
+ + "a généré une erreur (qui peut être temporaire) :\n" \
+ + "------------------------------------------------------------\n" \
+ + "%s\n" % (txt) \
+ + "------------------------------------------------------------\n\n"
+
+ if nb_ok + nb_may is 0:
+ txt += "Toutes les adresses de redirection de ce correspondant\n" \
+ + "sont cassées à l'heure actuelle.\n\n" \
+ + "Prière de prévenir votre correspondant par d'autres moyens\n" \
+ + "pour lui signaler ce problème et qu'il puisse le corriger !!!"
+ elif nb_ok is 0:
+ txt += "Ce correspondant possède néanmoins %i autre(s) adresse(s) active(s)\n" % (nb_may) \
+ + "en erreur, mais ayant recu des mails dans les 7 derniers jours,\n" \
+ + "sans -- pour le moment -- avoir créé la moindre nouvelle erreur.\n\n" \
+ + "Ces adresses sont donc peut-être valides.\n"
+ else:
+ txt += "Ce correspondant a en ce moment %i autre(s) adresse(s) valide(s).\n" % (nb_ok) \
+ + "Rien ne prouve cependant qu'elles étaient actives \n" \
+ + "au moment de l'envoi qui a échoué."
+
+ msg = MIMEMultipart.MIMEMultipart()
+ msg['Subject'] = self['Subject']
+
+ attach = self.attached_mail()
+ if attach is not None:
+ txt += "\nCi-joint le mail dont la livraison a échoué\n"
+ msg.attach(MIMEText.MIMEText(txt))
+ msg.attach(attach)
+ else:
+ msg.attach(MIMEText.MIMEText(txt))
+
+ return msg
+
+ def to_bounce(self, alias, dest):
+ """this function returns a new Message, the one we really want to send.
+
+ alias holds one valide plat/al alias of the user
+
+ Case 0: the error is IGNORE : return None
+ Case 1: the error is NOTICE : we just return self
+ Case 2: we have a REAL error: use forge_error
+ """
+ lvl, txt = self.error_level()
+
+ if lvl is IGNORE: return None
+ elif lvl is NOTICE: return self
+ elif lvl is ERROR : return self.forge_error(alias, dest, txt)
+ else: raise
+
+
+class BounceProxy(PureProxy):
+ def __init__(self, localaddr, remoteaddr):
+ PureProxy.__init__(self, localaddr, remoteaddr)
+ self._rcpt_re = re.compile(r'^([^_]*)__(.*)__([^_+=]*)\+(.*)=([^_+=]*)@bounces.m4x.org$')
+
+
+ def process_rcpt(self, rcpttos):
+ for to in rcpttos:
+ m = self._rcpt_re.match(to)
+ if m is None: continue
+ return ( m.group(1), m.group(2)+'@'+m.group(3), m.group(4)+'@'+m.group(5) )
+ return None
+
+
+ def process_message(self, peer, mailfrom, rcpttos, data):
+ try:
+ alias, sender, dest = self.process_rcpt(rcpttos)
+ bounce = msg_of_str(data).to_bounce(alias, dest)
+ if bounce is not None:
+ bounce['From'] = """"Serveur de courier Polytechnique.org" <MAILER-DAEMON@bounces.m4x.org>"""
+ bounce['To'] = sender
+ self._deliver("MAILER-DAEMON@bounces.m4x.org", [sender], bounce.as_string())
+ except:
+ pass
+ # SPAM or broken msg, we just drop it
+ return None
+
+
+################################################################################
+#
+# Main
+#
+#-------------------------------------------------------------------------------
+
+mysql = connectDB()
+Proxy = BounceProxy(('127.0.0.1', FROM_PORT), (TO_HOST, TO_PORT))
+asyncore.loop()
+
--- /dev/null
+<?
+/* Bandeau de publicité sur la page de login */
+$pub_nbLig = 2 ;
+$pub_nbCol = 2 ;
+
+// Liens apparaissant toujours
+$pub_tjs = array(
+ "motdepassemd5.php" => "Changer mon mot de passe" ,
+ "dons.php" => "Faire un don à l'association Polytechnique.org"
+ ) ;
+
+// Liens apparaissant de façon aléatoire
+$pub_rnd = array(
+ "newsletter/show.php?nid=last" => "Afficher la dernière newsletter" ,
+ "http://asso.polytechnique.org" => "Vers les autres sites polytechniciens" ,
+ "trombipromo.php?xpromo={$_SESSION["promo"]}" => "Voir le trombi de ma promo" ,
+ "banana/" => "Un petit tour du côté des forums !!"
+ ) ;
+?>
--- /dev/null
+[marketing_relance]
+from=Pre-Inscription <register@polytechnique.org>
+
+[inscrire]
+from="Pre-Inscription" <register@polytechnique.org>
+
+[forums_promo]
+from=Forums <forums@polytechnique.org>
+to=news@polytechnique.org
+
+[listes_promo]
+from=web@polytechnique.org
+to=web@polytechnique.org
+
+[polyedu_error]
+from=support+edu@polytechnique.org
+to=support@polytechnique.org
+
+[inscription]
+from=support@polytechnique.org
--- /dev/null
+MAILTO=root
+PATH=/bin:/usr/bin:/usr/local/bin:/home/web/bin
+WD=/home/web/prod/platal/bin/cron
+
+# db
+0 5 * * * web cd $WD; ./clean.php
+0 21 * * 1-6 web cd $WD; ./checkdb.php | mail -e -s "verifications sur la BDD de plat/al" br@m4x.org
+0 21 * * 0 web cd $WD; ./checkdb.php -v | mail -e -s "verifications verbose sur la BDD de plat/al" br@m4x.org
+
+# inscription report
+0 6 * * 1 web cd $WD; ./rapports_inscription.php
+
+# notifs
+0 2 * * * web cd $WD; ./notifs.birthday.php
+0 4 * * 6 web cd $WD; ./notifs.send.php
+
+# validations
+0 */3 * * * web cd $WD; ./cron_validations.php
+
+# homonymes
+0 0 4 * * * web cd $WD; ./homonymes.php
+# vim:set noet syntax=crontab ts=8 sw=8 sts=8:
--- /dev/null
+config()
+ function used to create new config entries in $globals.
+ usually, a module need to create a ....Config class to store the defaults.
+
+menu()
+ function used to add entries to $globals->menu
+
+subscribe($forlife, $uid, $promo, $pass)
+ triggered when a user subscription is sucessfull
+
+prefs()
+ function used to add boxes in htdocs/preferences.php
+ must return a dictionnary : url, title, text, weight.
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class SkinConfig
+
+class BananaConfig
+{
+ var $server = 'localhost';
+ var $port = 119;
+ var $password = '***';
+ var $web_user = '***';
+ var $web_pass = '***';
+
+ var $table_prefix = 'banana_';
+}
+
+// }}}
+
+function banana_config()
+{
+ global $globals;
+ $globals->banana = new BananaConfig;
+}
+
+// }}}
+// {{{ menu HOOK
+
+function banana_menu()
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 10, 'Forums & PA', 'banana/');
+}
+
+// }}}
+// {{{ subscribe HOOK
+
+function banana_subscribe($forlife, $uid, $promo, $password)
+{
+ global $globals;
+
+ $cible = array('xorg.general','xorg.pa.emploi','xorg.pa.divers','xorg.pa.logements');
+ $p_for = "xorg.promo.x$promo";
+
+ // récupération de l'id du forum promo
+ $res = $globals->xdb->query("SELECT fid FROM forums.list WHERE nom={?}", $p_for);
+ if ($res->numRows()) {
+ $cible[] = $p_for;
+ } else { // pas de forum promo, il faut le créer
+ $res = $globals->xdb->query("SELECT SUM(perms IN ('admin','user') AND deces=0),COUNT(*)
+ FROM auth_user_md5 WHERE promo={?}", $promo);
+ list($effau, $effid) = $res->fetchOneRow();
+ if (5*$effau>$effid) { // + de 20% d'inscrits
+ require_once("xorg.mailer.inc.php");
+ $mymail = new XOrgMailer('forums.promo.tpl');
+ $mymail->assign('promo', $promo);
+ $mymail->send();
+ }
+ }
+
+ while (list ($key, $val) = each ($cible)) {
+ $globals->xdb->execute("INSERT INTO forums.abos (fid,uid)
+ SELECT fid,{?} FROM forums.list WHERE nom={?}", $uid, $val);
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class SkinConfig
+
+class MailConfig
+{
+ var $domain = '';
+ var $domain2 = '';
+
+ var $alias_dom = '';
+ var $alias_dom2 = '';
+
+ var $send_form = true;
+
+ function shorter_domain()
+ {
+ if (empty($this->domain2) || strlen($this->domain2)>strlen($this->domain)) {
+ return $this->domain;
+ } else {
+ return $this->domain2;
+ }
+ }
+}
+
+// }}}
+
+function emails_config()
+{
+ global $globals;
+ $globals->mail = new MailConfig;
+}
+// }}}
+// {{{ menu HOOK
+
+function emails_menu()
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 00, 'Mes emails', 'emails.php');
+
+ if ($globals->mail->send_form) {
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 00, 'Envoyer un mail', 'emails/send.php');
+ }
+
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 40, 'Patte cassée', 'emails/broken.php');
+
+}
+
+// }}}
+// {{{ prefs HOOK
+
+function emails_prefs()
+{
+ global $globals;
+
+ $res[] = Array(
+ 'url' => 'emails.php',
+ 'title' => 'Mes adresses de redirection',
+ 'text' => 'Tu peux configurer tes différentes redirections de mails ici.',
+ 'weight' => 10
+ );
+
+ if ($globals->mail->alias_dom) {
+ $res [] = Array(
+ 'url' => 'alias.php',
+ 'title' => 'Mon alias mail @'.$globals->mail->alias_dom,
+ 'text' => "Pour choisir un alias @{$globals->mail->alias_dom}/{$globals->mail->alias_dom2} (en choisir un nouveau annule l'ancien).",
+ 'weight' => 20
+ );
+ }
+
+
+ return $res;
+}
+
+// }}}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+// {{{ class ListsConfig
+
+class ListsConfig
+{
+ var $rpchost = 'localhost';
+ var $rpcport = 4949;
+
+ var $spool = '/var/spool/platal/archives/';
+
+ var $admin_owner = '';
+ var $vhost_sep = '_';
+}
+
+// }}}
+
+function lists_config()
+{
+ global $globals;
+ $globals->lists = new ListsConfig;
+}
+
+// }}}
+// {{{ menu HOOK
+
+function lists_menu()
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 20, 'Listes de diffusion', 'listes/');
+}
+
+// }}}
+// {{{ subscribe HOOK
+
+function lists_subscribe($forlife, $uid, $promo, $password)
+{
+ require_once('lists.inc.php');
+ $client =& lists_xmlrpc($uid, $password);
+ $client->subscribe("promo$promo");
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+// {{{ class ManageursConfig
+
+class ManageursConfig
+{
+ var $authorized_ips = '129.104.30.32 129.104.30.33 213.251.145.200';
+ var $manageurs_cipher_key = '';
+ var $manageurs_pass = '';
+}
+
+// }}}
+
+function manageurs_config()
+{
+ global $globals;
+ $globals->manageurs = new ManageursConfig;
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class MoneyConfig
+
+class MoneyConfig
+{
+ var $mpay_enable = true;
+ var $mpay_def_id = 0;
+ var $mpay_def_meth = 0;
+ var $mpay_tprefix = 'paiement.';
+ var $paypal_site = '';
+ var $paypal_compte = '';
+}
+
+// }}}
+
+function money_config()
+{
+ global $globals;
+ $globals->money = new MoneyConfig;
+}
+
+// }}}
+// {{{ menu HOOK
+
+
+function money_menu()
+{
+ global $globals;
+ if ($globals->money->mpay_enable) {
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 30, 'Micropaiements', 'paiement/');
+ }
+}
+
+// }}}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class SkinConfig
+
+class NLConfig
+{
+ var $from = "Lettre Mensuelle <null@example.org>";
+ var $replyto = "";
+ var $retpath = "";
+}
+
+// }}}
+
+function newsletter_config() {
+ global $globals;
+ $globals->newsletter = new NLConfig;
+}
+
+// }}}
+// {{{ menu HOOK
+
+function newsletter_menu()
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_INFOS, 0, 'Lettres mensuelles', 'newsletter/');
+}
+
+// }}}
+// {{{ subscribe HOOK
+
+function newsletter_subscribe($forlife, $uid, $promo, $password)
+{
+ require_once('newsletter.inc.php');
+ subscribe_nl($uid);
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class SearchConfig
+
+class SearchConfig
+{
+ var $public_max = 25;
+ var $private_max = 800;
+
+ var $per_page = 20;
+}
+
+// }}}
+
+function search_config()
+{
+ global $globals;
+ $globals->search = new SearchConfig;
+}
+
+// }}}
+// {{{ menu HOOK
+
+function search_menu()
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 00, 'Annuaire', 'search.php');
+ $globals->menu->addPublicEntry(XOM_EXT, 00, 'Annuaire de l\'X', 'search.php');
+}
+
+// }}}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class SkinConfig
+
+class SkinConfig
+{
+ var $enable = 1;
+ var $def_id = 1;
+ var $def_tpl = 'default.tpl';
+}
+
+// }}}
+
+function skin_config()
+{
+ global $globals;
+ $globals->skin = new SkinConfig;
+}
+
+// }}}
+// {{{ prefs hook
+
+function skin_prefs()
+{
+ global $globals;
+ if (empty($globals->skin->enable)) {
+ return null;
+ }
+ return Array(
+ Array(
+ 'url' => 'skins.php',
+ 'title' => 'Apparence du site (skins)',
+ 'text' => 'Tu peux changer les couleurs et les images du site.',
+ 'weight' => 70
+ )
+ );
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+
+function tmp_menu()
+{
+ global $globals;
+
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 10, 'Mon profil', 'profil.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 20, 'Mes contacts', 'carnet/mescontacts.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 30, 'Mon carnet', 'carnet/');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 40, 'Mon mot de passe', 'motdepassemd5.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 50, 'Mes préférences', 'preferences.php');
+
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 10, 'Trombi/Site promo', 'trombipromo.php');
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 20, 'Conseil Pro.', 'referent.php');
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 30, 'Groupes X', 'http://www.polytechnique.net/plan.php');
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 40, 'Web Polytechnicien', 'http://www.polytechnique.net/');
+
+ $globals->menu->addPrivateEntry(XOM_INFOS, 10, 'Documentations', 'docs/');
+ $globals->menu->addPrivateEntry(XOM_INFOS, 20, 'Nous contacter', 'docs/contacts.php');
+ $globals->menu->addPrivateEntry(XOM_INFOS, 30, 'Emploi', 'http://www.manageurs.com/');
+
+ $globals->menu->addPrivateEntry(XOM_ADMIN, 00, 'Marketing', 'marketing/');
+ $globals->menu->addPrivateEntry(XOM_ADMIN, 10, 'Administration', 'admin/');
+ $globals->menu->addPrivateEntry(XOM_ADMIN, 20, 'Clear cache', 'clear_all_cache.php');
+
+ $globals->menu->addPublicEntry(XOM_US, 00, 'Me connecter !', 'login.php');
+ $globals->menu->addPublicEntry(XOM_US, 10, 'M\'inscrire', 'register/');
+ $globals->menu->addPublicEntry(XOM_US, 20, 'Pourquoi m\'inscrire ?', 'docs/services.php');
+
+ $globals->menu->addPublicEntry(XOM_EXT, 10, 'Associations X', 'http://www.polytechnique.net/');
+ $globals->menu->addPublicEntry(XOM_EXT, 20, 'Recrutement', 'http://www.manageurs.com/');
+
+ $globals->menu->addPublicEntry(XOM_INFOS, 00, 'A propos du site', 'docs/apropos.php');
+ $globals->menu->addPublicEntry(XOM_INFOS, 10, 'Nous contacter', 'docs/contacts.php');
+ $globals->menu->addPublicEntry(XOM_INFOS, 20, 'FAQ', 'docs/faq.php');
+}
+
+// {{{ subscribe HOOK
+
+function tmp_subscribe($forlife, $uid, $promo, $password)
+{
+
+ require_once('notifs.inc.php');
+ register_watch_op($uid, WATCH_INSCR);
+ inscription_notifs_base($uid);
+}
+
+// }}}
+// {{{ prfs hook
+
+function tmp_prefs()
+{
+ $fmt = Session::get('mail_fmt', 'html') == 'html' ? 'texte' : 'html';
+ $fmt2 = Session::get('mail_fmt', 'html') == 'html' ? 'texte' : 'HTML';
+ return Array(
+ Array(
+ 'url' => 'preferences.php?mail_fmt='.$fmt,
+ 'title' => 'Recevoir les mails en format '.$fmt2,
+ 'text' => 'Tu recois les mails envoyés par le site (lettre mensuelle, carnet, ...) de préférence <strong>sous forme de '
+ .Session::get('mail_fmt', 'html').'</strong>',
+ 'weight' => 80
+ ),
+ Array(
+ 'url' => 'preferences.php?rss='.(intval(Session::get('core_rss_hash')=='')),
+ 'title' => (Session::get('core_rss_hash') ? 'désactiver' : 'activer').' les fils rss',
+ 'text' => 'Ceci te permet d\'utiliser les fils rss du site. Attention, désactiver puis réactiver les fils en change les URL !',
+ 'weight' => 90
+ )
+ );
+}
+
+// }}}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class WebRedirConfig
+
+class WebRedirConfig
+{
+ var $domain = '';
+}
+
+// }}}
+
+function webredirect_config()
+{
+ global $globals;
+ $globals->webredirect = new WebRedirConfig;
+}
+
+// }}}
+// {{{ prefs hook
+
+function webredirect_prefs()
+{
+ $text = "Tu peux configurer tes redirections WEB http://www.carva.org/" . Session::get('bestalias');
+ if (Session::get('forlife') != Session::get('bestalias')) {
+ $text .= ' et http://www.carva.org/'.Session::get('forlife');
+ }
+
+ return Array(
+ Array(
+ 'url' => 'webredirect.php',
+ 'title' => 'Ma redirection de page WEB',
+ 'text' => $text,
+ 'weight' => 60
+ )
+ );
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ config HOOK
+
+// {{{ class SkinConfig
+
+class XnetConfig
+{
+ var $secret = '';
+ var $evts_domain = '';
+}
+
+// }}}
+
+function xnet_config()
+{
+ global $globals;
+ $globals->xnet = new XnetConfig;
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+ new_admin_page('xnet/admin.tpl');
+ $page->useMenu();
+
+ if (Get::has('del')) {
+ $res = $globals->xdb->query('SELECT id, nom, mail_domain FROM groupex.asso WHERE diminutif={?}', Get::get('del'));
+ list($id, $nom, $domain) = $res->fetchOneRow();
+ $page->assign('nom', $nom);
+ if ($id && Post::has('del')) {
+ $globals->xdb->query('DELETE FROM groupex.membres WHERE asso_id={?}', $id);
+ $page->trig('membres supprimés');
+
+ if ($domain) {
+ $globals->xdb->query('DELETE FROM virtual_domains WHERE domain={?}', $domain);
+ $globals->xdb->query('DELETE FROM virtual, virtual_redirect
+ USING virtual INNER JOIN virtual_redirect USING (vid)
+ WHERE alias LIKE {?}', '%@'.$domain);
+ $page->trig('suppression des alias mails');
+
+ require_once('lists.inc.php');
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $domain);
+ if ($listes = $client->get_lists()) {
+ foreach ($listes as $l) {
+ $client->delete_list($l['list'], true);
+ }
+ $page->trig('mail lists surpprimées');
+ }
+ }
+
+ $globals->xdb->query('DELETE FROM groupex.asso WHERE id={?}', $id);
+ $page->trig("Groupe $nom supprimé");
+ Get::kill('del');
+ }
+ if (!$id) {
+ Get::kill('del');
+ }
+ }
+
+ if (Post::has('diminutif')) {
+ $globals->xdb->query('INSERT INTO groupex.asso (id,diminutif) VALUES(NULL,{?})', Post::get('diminutif'));
+ header('Location: '.Post::get('diminutif').'/edit.php');
+ }
+
+ $res = $globals->xdb->query('SELECT nom,diminutif FROM groupex.asso ORDER by NOM');
+ $page->assign('assos', $res->fetchAllAssoc());
+
+ $page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/apropos.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/article12.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/article16.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/creation-groupex.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+?>
--- /dev/null
+div.exa_form{
+ text-align: center;
+ background-color: #d8d4c8;
+ max-width: 400px;
+ margin: 0px 0px 10px 0px;
+ padding: 5px;
+ border: 3px solid #cfd8de;
+}
+
+div.nb_results{
+ background-color: #cfd8de;
+ color: #000000;
+ border: 1px solid #d8d4c8;
+ margin-bottom: 10px;
+ padding: 3px;
+}
+
+div.exa_form div{
+ margin: 5px;
+}
+
+table.exa_data{
+ width: 100%;
+}
+td.exa_left{
+ vertical-align: top;
+ width: 30%;
+ padding: 5px;
+}
+td.exa_right{
+ padding: 5px;
+ vertical-align: top;
+}
+
+div.exa_groupe{
+ /*max-width: 30ex;*/
+ margin-bottom: 20px;
+ /*border: 1px solid #ACF;*/
+}
+div.exa_groupe div.titre{
+ border: 0px none #000;
+ border-bottom: 1px solid #000;
+ padding: 0px 0px 3px 5px;
+ margin: 0px 5px 2px 5px;
+}
+div.exa_categorie {
+}
+div.exa_spelling{
+}
+
+div.exa_keywords{
+}
+
+div.exa_result{
+ border: 1px solid #333;
+ margin-bottom: 10px;
+ width: 100%;
+}
+div.exa_result div.header, div.field{
+ background-color: #F4D09C;
+ padding: 3px;
+}
+div.exa_result div.field{
+ background-color: inherit;/*#AACCFF;*/
+}
+div.header span{}
--- /dev/null
+../../htdocs/css/lists.archives.css
\ No newline at end of file
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+body {
+ background-color: #F2E9D0;
+ margin-left: 0;
+ margin-top: 0;
+ color: #505050;
+ border-top: 1px;
+}
+
+table, body {
+ font-size: 10pt;
+ font-family: "Bitstream vera sans","Verdana",sans-serif;
+}
+
+input,textarea,select,option,tt,pre {
+ font-size: 10pt;
+}
+
+a, a:link, a:visited { text-decoration: none ; color: #5c81aa; }
+
+a img { border: none; }
+img { vertical-align: middle; }
+td { vertical-align: top; }
+
+h1 { font-size: 150%; }
+h2 { font-size: 130%; }
+
+/***************************************************************************
+ * DEBUG
+ ***************************************************************************/
+
+#dev {
+ width: 100%;
+ text-align: center;
+ padding: 1px;
+
+ font-size: 10pt;
+ font-weight: bold;
+}
+
+#db-trace div.hide { display: none; }
+#db-trace:hover div.hide { display: block }
+#db-trace h1 { margin: 0px; }
+
+/***************************************************************************
+ * LAYOUT
+ ***************************************************************************/
+
+table#layout {
+ width: 765px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+tr#top td {
+ vertical-align: middle;
+}
+
+td#credits {
+ text-align: center;
+ font-size: 90%;
+ font-weight: bold;
+}
+
+td#perso div {
+ font-weight: bold;
+ font-size: 90%;
+ padding: 2px 1em;
+}
+
+td#perso a.gp {
+ display: block;
+ margin: 2px 1em;
+ font-weight: bold;
+ font-size: 85%;
+ float: left;
+ text-align: center;
+}
+
+td#search {
+ text-align: right;
+ width: 300px;
+}
+
+#content {
+ width: 100%;
+}
+
+td#menu {
+ width: 150px;
+ padding-right: 1em;
+ font-family: "Trebuchet MS", "Arial",sans-serif;
+ font-weight: bold;
+}
+
+#menu h1 {
+ padding: 0.5em 0em 0.6em 0em;
+ font-size: 90%;
+ text-align: center;
+ background: url('../images/barre.png') bottom left no-repeat;
+}
+
+#menu a {
+ display: block;
+ padding: 0.2em 0em 0.2em 15px;
+ font-size: 90%;
+ background: url('../images/puce.png') no-repeat center left;
+}
+
+/***************************************************************************
+ * CLASSES
+ ***************************************************************************/
+
+div.breadcrumb {
+ font-weight: bold;
+ font-size: 90%;
+ padding: 0.5em 0em;
+}
+
+.erreur { color: red !important; }
+.error { color: red !important; }
+.center { text-align: center; }
+.right { text-align: right; }
+
+.descr {
+ text-align: justify;
+ font-size: 90%;
+}
+p.descr {
+ padding-left: 7px;
+ padding-right: 7px;
+}
+
+table { border-collapse: collapse; }
+
+table.links {
+ width: 100%;
+ margin: 0.4em 0em;
+}
+
+table.links td {
+ padding: 0em 0.5em;
+}
+
+table.links a {
+ background: url('../images/puce.png') no-repeat center left;
+ padding-left: 15px;
+ font-weight: bold;
+}
+
+table td.titre {
+ font-weight: bold;
+ white-space: nowrap;
+}
+
+table.tiny, table.tinybicol { width: 70%; margin-left: 15%; border: 2px solid gray; }
+table.large, table.bicol { width: 96%; margin-left: 2%; border: 2px solid gray; }
+
+table.tiny td, table.tinybicol td, table.large td, table.bicol td {
+ border: 1px solid gray;
+ padding: 2px;
+}
+table.tiny th, table.tinybicol th, table.large th, table.bicol th {
+ border: 1px solid gray;
+ border-top-width: 2px;
+ border-bottom-width: 2px;
+ padding: 2px;
+}
+
+table.normal td { border: none; }
+
+th { background: #d0c198; }
+
+/***************************************************************************
+ * Special pages
+ ***************************************************************************/
+
+table#liste td.fourth {
+ width: 25%;
+}
+
+table#liste td.listec a {
+ display: block;
+ text-align: center;
+}
+
+table#liste td.liste a {
+ display: block;
+ text-align: right;
+}
+
+table#liste td.liste a.cat {
+ background: #d0c198;
+ margin: 15px 0px 10px 0px;
+ padding: 3px;
+ text-align: center;
+ font-weight: bold;
+ font-size: 90%;
+}
+
+table#liste td.liste a:hover, table#liste td.listec a:hover {
+ background: #d0c198;
+}
+
+/***************************************************************************
+ ***************************************************************************/
+
+div.cat {
+ background: #d0c198;
+ text-align: center;
+ font-weight: bold;
+ font-size: 90%;
+ padding: 2px;
+ width: 180px;
+ margin: 4px 0px;
+}
+
+div.sel { background-color: #5c81aa; color: #d0c198; }
+div.sel a { color: #d0c198; }
+
+td.oval, td.oval2 {
+ color: #d0c198;
+ height: 50px;
+ text-align: center;
+ vertical-align: middle !important;
+ font-weight: bold;
+}
+td.oval {
+ background: url("../images/oval.png") no-repeat top center;
+ width: 130px;
+ padding: 4px 12px;
+}
+td.oval2 {
+ background: url("../images/oval2.png") no-repeat top center;
+ width: 160px;
+ padding: 4px 10px;
+
+}
+
+.oval a, .oval2 a { color: #d0c198; }
+
+#content td.oval, #content td.oval2 {
+ font-size: 90%;
+ font-family: "Trebuchet MS", sans-serif;
+ letter-spacing: -0.5px;
+}
+
+/***************************************************************************
+ ***************************************************************************/
+
+td.infos {
+ height: 30px;
+ text-align: center;
+ font-family: "Bitstream Vera Sans","Arial",sans-serif;
+ color: #505050;
+}
+
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ XnetSession::destroy();
+
+ new_page('xnet/deconnexion.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+
+?>
--- /dev/null
+<?php
+ header("Location: https://www.polytechnique.org/fiche.php?user=".$_GET['user']);
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+new_groupadmin_page('xnet/groupe/alias-admin.tpl');
+
+if (!Get::has('liste')) {
+ header("Location: listes.php");
+}
+
+$lfull = strtolower(Get::get('liste'));
+
+if (Env::has('add_member')) {
+ $add = Env::get('add_member');
+ if(strstr($add, '@')) {
+ list($mbox,$dom) = split('@', strtolower($add));
+ } else {
+ $mbox = $add;
+ $dom = 'm4x.org';
+ }
+ if($dom == 'polytechnique.org' || $dom == 'm4x.org') {
+ $res = $globals->xdb->query(
+ "SELECT a.alias, b.alias
+ FROM x4dat.aliases AS a
+ LEFT JOIN x4dat.aliases AS b ON (a.id=b.id AND b.type = 'a_vie')
+ WHERE a.alias={?} AND a.type!='homonyme'", $mbox);
+ if (list($alias, $blias) = $res->fetchOneRow()) {
+ $alias = empty($blias) ? $alias : $blias;
+ $globals->xdb->query(
+ "INSERT INTO x4dat.virtual_redirect (vid,redirect)
+ SELECT vid, {?}
+ FROM x4dat.virtual
+ WHERE alias={?}", "$alias@m4x.org", $lfull);
+ $page->trig("$alias@m4x.org ajouté");
+ } else {
+ $page->trig("$mbox@polytechnique.org n'existe pas.");
+ }
+ } else {
+ $globals->xdb->query(
+ "INSERT INTO x4dat.virtual_redirect (vid,redirect)
+ SELECT vid,{?}
+ FROM x4dat.virtual
+ WHERE alias={?}", "$mbox@$dom", $lfull);
+ $page->trig("$mbox@$dom ajouté");
+ }
+}
+
+if (Env::has('del_member')) {
+ $globals->xdb->query(
+ "DELETE FROM x4dat.virtual_redirect
+ USING x4dat.virtual_redirect
+ INNER JOIN x4dat.virtual USING(vid)
+ WHERE redirect={?} AND alias={?}", Env::get('del_member'), $lfull);
+ header("Location: ?liste=$lfull");
+}
+
+$res = $globals->xdb->iterator(
+ "SELECT redirect
+ FROM x4dat.virtual_redirect AS vr
+ INNER JOIN x4dat.virtual AS v USING(vid)
+ WHERE v.alias={?}
+ ORDER BY redirect", $lfull);
+$page->assign('mem', $res);
+
+$page->run();
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+new_groupadmin_page('xnet/groupe/alias-create.tpl');
+
+if(Post::has('submit')) {
+ if (!Post::has('liste')) {
+ $page->trig_run('champs «addresse souhaitée» vide');
+ }
+ $liste = Post::get('liste');
+ if (!preg_match("/^[a-zA-Z0-9\-]*$/", $liste)) {
+ $page->trig_run('le nom de l\'alias ne doit contenir que des lettres, chiffres et tirets');
+ }
+
+ $new = $liste.'@'.$globals->asso('mail_domain');
+ $res = $globals->xdb->query('SELECT COUNT(*) FROM x4dat.virtual WHERE alias={?}', $new);
+ $n = $res->fetchOneCell();
+ if($n) {
+ $page->trig_run('cet alias est déjà pris');
+ }
+
+ $globals->xdb->query('INSERT INTO x4dat.virtual (alias,type) VALUES({?}, "user")', $new);
+ header("Location: alias-admin.php?liste=$new");
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+define('NB_PER_PAGE', 25);
+
+if ($globals->asso('pub') == 'public')
+ new_group_page('xnet/groupe/annuaire.tpl');
+else
+ new_groupadmin_page('xnet/groupe/annuaire.tpl');
+
+$page->assign('admin', may_update());
+
+$tri = (Env::get('order') == 'alpha' ? 'promo, nom, prenom' : 'nom, prenom, promo');
+$res = $globals->xdb->iterRow(
+ 'SELECT UPPER(SUBSTRING(IF(m.origine="X",IF(u.nom_usage<>"", u.nom_usage, u.nom),m.nom), 1, 1)) as letter, COUNT(*)
+ FROM groupex.membres AS m
+ LEFT JOIN auth_user_md5 AS u ON ( u.user_id = m.uid )
+ WHERE asso_id = {?}
+ GROUP BY letter
+ ORDER BY letter', $globals->asso('id'));
+$alphabet = array();
+$nb_tot = 0;
+while (list($char, $nb) = $res->next()) {
+ $alphabet[] = $char;
+ $nb_tot += $nb;
+ if (Env::has('initiale') && $char == strtoupper(Env::get('initiale'))) {
+ $tot = $nb;
+ }
+}
+$page->assign('alphabet', $alphabet);
+$page->assign('nb_tot', $nb_tot);
+
+$ofs = Env::getInt('offset');
+$tot = Env::get('initiale') ? $tot : $nb_tot;
+$nbp = intval(($tot-1)/NB_PER_PAGE);
+$links = array();
+if ($ofs) {
+ $links['précédent'] = $ofs-1;
+}
+for ($i = 0; $i <= $nbp; $i++) {
+ $links[(string)($i+1)] = $i;
+}
+if ($ofs < $nbp) {
+ $links['suivant'] = $ofs+1;
+}
+if (count($links)>1) {
+ $page->assign('links', $links);
+}
+
+$ini = Env::has('initiale') ? 'AND IF(m.origine="X",IF(u.nom_usage<>"", u.nom_usage, u.nom),m.nom) LIKE "'.addslashes(Env::get('initiale')).'%"' : '';
+$ann = $globals->xdb->iterator(
+ "SELECT IF(m.origine='X',IF(u.nom_usage<>'', u.nom_usage, u.nom) ,m.nom) AS nom,
+ IF(m.origine='X',u.prenom,m.prenom) AS prenom,
+ IF(m.origine='X',u.promo,'extérieur') AS promo,
+ IF(m.origine='X',a.alias,m.email) AS email,
+ IF(m.origine='X',FIND_IN_SET('femme', u.flags),0) AS femme,
+ m.perms='admin' AS admin,
+ m.origine='X' AS x
+ FROM groupex.membres AS m
+ 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 = {?} $ini
+ ORDER BY $tri
+ LIMIT {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE);
+
+
+$page->assign('ann', $ann);
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+
+require 'xnet.inc.php';
+
+new_page('xnet/groupe/asso.tpl', AUTH_PUBLIC);
+$page->useMenu();
+$page->setType($globals->asso('cat'));
+$page->assign('is_member', is_member());
+$page->assign('logged', logged());
+
+$page->assign('asso', $globals->asso());
+if (!$globals->asso('id')) {
+ header("Location: ../");
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+
+ require 'xnet.inc.php';
+ new_groupadmin_page('xnet/groupe/edit.tpl');
+
+ if (Post::has('submit')) {
+ if (has_perms()) {
+ $globals->xdb->execute(
+ "UPDATE groupex.asso
+ SET nom={?}, diminutif={?}, cat={?}, dom={?}, descr={?}, site={?}, mail={?}, resp={?}, forum={?}, mail_domain={?}, ax={?}, pub={?}, sub_url={?}
+ WHERE id={?}",
+ Post::get('nom'), Post::get('diminutif'), Post::get('cat'), Post::getInt('dom'),
+ Post::get('descr'), Post::get('site'), Post::get('mail'), Post::get('resp'),
+ Post::get('forum'), Post::get('mail_domain'), Post::has('ax'), Post::has('pub')?'private':'public', Post::get('sub_url'), $globals->asso('id'));
+ if (Post::get('mail_domain')) {
+ $globals->xdb->execute('INSERT INTO virtual_domains (domain) VALUES({?})', Post::get('mail_domain'));
+ }
+ } else {
+ $globals->xdb->execute(
+ "UPDATE groupex.asso
+ SET descr={?}, site={?}, mail={?}, resp={?}, forum={?}, ax={?}, pub= {?}, sub_url={?}
+ WHERE id={?}",
+ Post::get('descr'), Post::get('site'), Post::get('mail'), Post::get('resp'),
+ Post::get('forum'), Post::has('ax'), Post::has('pub')?'private':'public', Post::get('sub_url'), $globals->asso('id'));
+ }
+
+ if ($_FILES['logo']['name']) {
+ $logo = file_get_contents($_FILES['logo']['tmp_name']);
+ $mime = $_FILES['logo']['type'];
+ $globals->xdb->execute('UPDATE groupex.asso SET logo={?}, logo_mime={?} WHERE id={?}', $logo, $mime, $globals->asso('id'));
+ }
+
+ header('Location: ../'.Post::get('diminutif', $globals->asso('diminutif')).'/edit.php');
+ }
+
+ if (has_perms()) {
+ $dom = $globals->xdb->iterator('SELECT * FROM groupex.dom ORDER BY nom');
+ $page->assign('dom', $dom);
+ $page->assign('super', true);
+ }
+ $page->run();
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+new_group_page('xnet/groupe/evenements.tpl');
+
+$page->assign('logged', logged());
+$page->assign('admin', may_update());
+
+$moments = range(1, 4);
+$page->assign('moments', $moments);
+
+$page->assign('eid', Env::get('eid'));
+
+if ($eid = Env::get('eid')) {
+ $res = $globals->xdb->query("SELECT asso_id, short_name FROM groupex.evenements WHERE eid = {?}", $eid);
+ $infos = $res->fetchOneAssoc();
+ if ($infos['asso_id'] != $globals->asso('id')) {
+ unset($eid);
+ unset($infos);
+ }
+}
+
+if (may_update() && Post::get('intitule')) {
+ $short_name = Env::get('short_name');
+ //Quelques vérifications sur l'alias (caractères spéciaux)
+ if ($short_name && !preg_match( "/^[a-zA-Z0-9\-.]{3,20}$/", $short_name)) {
+ $page->trig("Le raccourci demandé n'est pas valide.
+ Vérifie qu'il comporte entre 3 et 20 caractères
+ et qu'il ne contient que des lettres non accentuées,
+ des chiffres ou les caractères - et .");
+ $short_name = $infos['short_name'];
+ $page->assign('get_form', true);
+ }
+ //vérifier que l'alias n'est pas déja pris
+ if ($short_name && $short_name != $infos['short_name']) {
+ $res = $globals->xdb->query('SELECT COUNT(*) FROM virtual WHERE alias LIKE {?}', $short_name."-%");
+ if ($res->fetchOneCell() > 0) {
+ $page->trig("Le raccourci demandé est déjà utilisé. Choisis en un autre.");
+ $short_name = $infos['short_name'];
+ $page->assign('get_form', true);
+ }
+ }
+ if ($short_name && $infos['short_name'] && $short_name != $infos['short_name']) {
+ $globals->xdb->execute("UPDATE virtual SET alias = REPLACE(alias, {?}, {?}) WHERE type = 'evt' AND alias LIKE {?}",
+ $infos['short_name'], $short_name, $infos['short_name']."-%");
+ } elseif ($short_name && !$infos['short_name']) {
+ $globals->xdb->execute("INSERT INTO virtual SET type = 'evt', alias = {?}", $short_name."-participants@".$globals->xnet->evts_domain);
+ $res = $globals->xdb->query("SELECT LAST_INSERT_ID()");
+ $globals->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 = {?}
+ GROUP BY ep.uid)",
+ $res->fetchOneCell(), "@".$globals->mail->domain, $eid);
+
+ $globals->xdb->execute("INSERT INTO virtual SET type = 'evt', alias = {?}", $short_name."-absents@".$globals->xnet->evts_domain);
+ $res = $globals->xdb->query("SELECT LAST_INSERT_ID()");
+ $globals->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 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)",
+ $res->fetchOneCell(), "@".$globals->mail->domain, $globals->asso('id'));
+ } elseif (!$short_name && $infos['short_name']) {
+ $globals->xdb->execute("DELETE virtual, virtual_redirect FROM virtual LEFT JOIN virtual_redirect USING(vid) WHERE virtual.alias LIKE {?}",
+ $infos['short_name']."-%");
+ }
+
+ $globals->xdb->execute("REPLACE INTO groupex.evenements
+ SET eid={?}, asso_id={?}, organisateur_uid={?}, intitule={?},
+ paiement_id = {?}, descriptif = {?},
+ debut = {?}, fin = {?},
+ membres_only = {?}, advertise = {?}, show_participants = {?}, short_name = {?}",
+ $eid, $globals->asso('id'), Session::get('uid'), Post::get('intitule'),
+ (Post::get('paiement')>0)?Post::get('paiement'):NULL, Post::get('descriptif'),
+ Post::get('deb_Year')."-".Post::get('deb_Month')."-".Post::get('deb_Day')." ".Post::get('deb_Hour').":".Post::get('deb_Minute').":00",
+ Post::get('fin_Year')."-".Post::get('fin_Month')."-".Post::get('fin_Day')." ".Post::get('fin_Hour').":".Post::get('fin_Minute').":00",
+ Post::get('membres_only'), Post::get('advertise'), Post::get('show_participants'), $short_name, $eid);
+
+ if (!$eid) {
+ $res = $globals->xdb->query("SELECT LAST_INSERT_ID()");
+ $eid = $res->fetchOneCell();
+ }
+ $nb_moments = 0;
+ $money_defaut = 0;
+ foreach ($moments as $i) if (Post::get('titre'.$i)) {
+ $nb_moments++;
+ if (!($money_defaut > 0)) $money_defaut = strtr(Post::get('montant'.$i), ',', '.');
+ $globals->xdb->execute("
+ REPLACE INTO groupex.evenements_items VALUES (
+ {?}, {?},
+ {?}, {?}, {?})",
+ $eid, $i,
+ Post::get('titre'.$i), Post::get('details'.$i), strtr(Post::get('montant'.$i), ',', '.'));
+ } else {
+ $globals->xdb->execute("DELETE FROM groupex.evenements_items WHERE eid = {?} AND item_id = {?}", $eid, $i);
+ }
+
+ // request for a new payment
+ if (Post::get('paiement') == -1 && $money_defaut >= 0) {
+ require_once ('validations.inc.php');
+ $p = new PayReq(Session::get('uid'), Post::get('intitule')." - ".$globals->asso('nom'), Post::get('site'), $money_defaut, Post::get('confirmation'),0, 999, $globals->asso('id'), $eid);
+ $p->submit();
+ }
+
+ // events with no sub-event
+ if ($nb_moments == 0)
+ $globals->xdb->execute("INSERT INTO groupex.evenements_items VALUES ({?}, {?}, '', '', 0)", $eid, 1);
+}
+
+if (may_update() && Env::has('sup') && $eid) {
+ // deletes the event
+ $globals->xdb->execute("DELETE FROM groupex.evenements WHERE eid = {?} AND asso_id = {?}", $eid, $globals->asso('id'));
+ // deletes the event items
+ $globals->xdb->execute("DELETE FROM groupex.evenements_items WHERE eid = {?}", $eid);
+ // deletes the event participants
+ $globals->xdb->execute("DELETE FROM groupex.evenements_participants WHERE eid = {?}", $eid);
+ // deletes the event mailing aliases
+ if ($infos['short_name'])
+ $globals->xdb->execute("DELETE FROM virtual WHERE type = 'evt' AND alias LIKE {?}", $infos['short_name']."-%");
+}
+
+if (may_update() && (Env::has('add') || (Env::has('mod') && $eid))) {
+ $page->assign('get_form', true);
+ $res = $globals->xdb->iterator
+ ("SELECT id, text FROM {$globals->money->mpay_tprefix}paiements WHERE asso_id = {?}", $globals->asso('id'));
+ $paiements = array();
+ while ($a = $res->next()) $paiements[$a['id']] = $a['text'];
+ $page->assign('paiements', $paiements);
+}
+
+if ($eid) {
+ $res = $globals->xdb->query(
+ "SELECT eid, intitule, descriptif, debut, fin, membres_only, advertise, show_participants, paiement_id, short_name
+ FROM groupex.evenements
+ WHERE eid = {?}", $eid);
+ $evt = $res->fetchOneAssoc();
+ $page->assign('evt', $evt);
+}
+
+if (may_update() && Env::has('mod') && $eid) {
+ $res = $globals->xdb->iterator(
+ "SELECT item_id, titre, details, montant
+ FROM groupex.evenements_items AS ei
+ INNER JOIN groupex.evenements AS e ON(e.eid = ei.eid)
+ WHERE e.eid = {?}
+ ORDER BY item_id", $eid);
+ $items = array();
+ while ($item = $res->next()) $items[$item['item_id']] = $item;
+ $page->assign('items', $items);
+} else {
+
+ $evenements = $globals->xdb->iterator(
+ "SELECT e.eid, e.intitule, e.descriptif, e.debut, e.fin, e.show_participants, u.nom, u.prenom, u.promo, a.alias, MAX(ep.nb)>=1 AS inscrit,
+ e.short_name
+ FROM groupex.evenements AS e
+ INNER JOIN x4dat.auth_user_md5 AS u ON u.user_id = e.organisateur_uid
+ LEFT JOIN x4dat.aliases AS a ON (a.type = 'a_vie' AND a.id = u.user_id)
+ LEFT JOIN groupex.evenements_participants AS ep ON (ep.eid = e.eid AND ep.uid = {?})
+ WHERE asso_id = {?}
+ GROUP BY e.eid
+ ORDER BY debut",Session::get('uid'),$globals->asso('id'));
+
+ $page->assign('evenements', $evenements);
+
+ $page->assign('nb_evt', $evenements->total());
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+define('NB_PER_PAGE', 25);
+
+require_once('xnet/evenements.php');
+
+$evt = get_event_detail(Env::get('eid'), Env::get('item_id'));
+
+// the event doesn't exist or doesn't belong to this assoif (!$evt)
+if (!$evt)
+ header("Location: evenements.php");
+
+if ($evt['show_participants'])
+ new_group_page('xnet/groupe/evt-admin.tpl');
+else
+ new_groupadmin_page('xnet/groupe/evt-admin.tpl');
+
+$admin = may_update();
+
+// select a member from his mail
+if ($admin && Env::get('adm') && Env::get('mail')) {
+ if (strpos(Env::get('mail'), '@') === false)
+ $res = $globals->xdb->query(
+ "SELECT m.uid
+ FROM groupex.membres AS m
+ INNER JOIN aliases AS a ON (a.id = m.uid)
+ WHERE a.alias = {?}",
+ Env::get('mail'));
+ else
+ $res = $globals->xdb->query(
+ "SELECT m.uid
+ FROM groupex.membres AS m
+ WHERE m.email = {?} AND m.asso_id = {?}",
+ Env::get('mail'), $globals->asso('id'));
+ $member = $res->fetchOneCell();
+ if (!$member) $page->trig("Membre introuvable");
+}
+
+// change the price paid by a participant
+if ($admin && Env::get('adm') == 'prix' && $member) {
+ $globals->xdb->execute("UPDATE groupex.evenements_participants SET paid = IF(paid + {?} > 0, paid + {?}, 0) WHERE uid = {?} AND eid = {?}",
+ strtr(Env::get('montant'), ',', '.'),
+ strtr(Env::get('montant'), ',', '.'),
+ $member, Env::get('eid'));
+}
+
+// change the number of personns coming with a participant
+if ($admin && Env::get('adm') == 'nbs' && $member) {
+ $res = $globals->xdb->query("SELECT paid FROM groupex.evenements_participants WHERE uid = {?} AND eid = {?}", $member, Env::get('eid'));
+ $paid = $res->fetchOneCell();
+ $participate = false;
+ foreach ($evt['moments'] as $m) if (Env::has('nb'.$m['item_id'])) {
+ $nb = Env::getInt('nb'.$m['item_id'], 0);
+ if ($nb < 0) $nb = 0;
+ if ($nb) {
+ $participate = true;
+ if (!$paid) $paid = 0;
+ $globals->xdb->execute("REPLACE INTO groupex.evenements_participants VALUES ({?}, {?}, {?}, {?}, {?})",
+ Env::get('eid'), $member, $m['item_id'], $nb, $paid);
+ }
+ else
+ $globals->xdb->execute("DELETE FROM groupex.evenements_participants WHERE uid = {?} AND eid = {?} AND item_id = {?}", $member, Env::get('eid'), $m['item_id']);
+ }
+ if ($participate)
+ subscribe_lists_event(true, $member, $evt['participant_list'], $evt['absent_list']);
+ else {
+ $res = $globals->xdb->query("SELECT uid FROM groupex.evenements_participants WHERE uid = {?} AND eid = {?}", $member, Env::get('eid'));
+ $u = $res->fetchOneCell();
+ subscribe_lists_event($u, $member, $evt['participant_list'], $evt['absent_list']);
+ }
+}
+
+$page->assign('admin', $admin);
+$page->assign('evt', $evt);
+$page->assign('url_page', Env::get('PHP_SELF')."?eid=".Env::get('eid').(Env::has('item_id')?("&item_id=".Env::getInt('item_id')):''));
+$page->assign('tout', !Env::has('item_id'));
+
+if (count($evt['moments']) > 1) $page->assign('moments', $evt['moments']);
+$page->assign('money', $evt['money']);
+
+$tri = (Env::get('order') == 'alpha' ? 'promo, nom, prenom' : 'nom, prenom, promo');
+$whereitemid = Env::has('item_id')?('AND ep.item_id = '.Env::getInt('item_id', 1)):'';
+$res = $globals->xdb->iterRow(
+ 'SELECT UPPER(SUBSTRING(IF(u.nom IS NULL,m.nom,IF(u.nom_usage<>"", u.nom_usage, u.nom)), 1, 1)), COUNT(DISTINCT ep.uid)
+ FROM groupex.evenements_participants AS ep
+ INNER JOIN groupex.evenements AS e ON (ep.eid = e.eid)
+ LEFT JOIN groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id)
+ LEFT JOIN auth_user_md5 AS u ON ( u.user_id = ep.uid )
+ WHERE ep.eid = {?} '.$whereitemid.'
+ GROUP BY UPPER(SUBSTRING(IF(u.nom IS NULL,m.nom,u.nom), 1, 1))', Env::get('eid'));
+
+$alphabet = array();
+$nb_tot = 0;
+while (list($char, $nb) = $res->next()) {
+ $alphabet[ord($char)] = $char;
+ $nb_tot += $nb;
+ if (Env::has('initiale') && $char == strtoupper(Env::get('initiale'))) {
+ $tot = $nb;
+ }
+}
+ksort($alphabet);
+$page->assign('alphabet', $alphabet);
+
+$ofs = Env::getInt('offset');
+$tot = Env::get('initiale') ? $tot : $nb_tot;
+$nbp = intval(($tot-1)/NB_PER_PAGE);
+$links = array();
+if ($ofs) {
+ $links['précédent'] = $ofs-1;
+}
+for ($i = 0; $i <= $nbp; $i++) {
+ $links[(string)($i+1)] = $i;
+}
+if ($ofs < $nbp) {
+ $links['suivant'] = $ofs+1;
+}
+if (count($links)>1) {
+ $page->assign('links', $links);
+}
+
+$ini = Env::has('initiale') ? 'AND IF(u.nom IS NULL,m.nom,IF(u.nom_usage<>"", u.nom_usage, u.nom)) LIKE "'.addslashes(Env::get('initiale')).'%"' : '';
+
+$participants = get_event_participants(Env::get('eid'), Env::get('item_id'), $ini, $tri, "LIMIT ".($ofs*NB_PER_PAGE).", ".NB_PER_PAGE, $evt['money'] && $admin, $evt['paiement_id']);
+
+if ($evt['paiement_id']) {
+ $res = $globals->xdb->iterator(
+ "SELECT IF(u.nom_usage<>'', u.nom_usage, u.nom) AS nom, u.prenom,
+ u.promo, a.alias AS email, t.montant
+ FROM {$globals->money->mpay_tprefix}transactions AS t
+ INNER JOIN auth_user_md5 AS u ON(t.uid = u.user_id)
+ INNER JOIN aliases AS a ON (a.id = t.uid AND a.type='a_vie' )
+ LEFT JOIN groupex.evenements_participants AS ep ON(ep.uid = t.uid AND ep.eid = {?})
+ WHERE t.ref = {?} AND ep.uid IS NULL",
+ $evt['eid'], $evt['paiement_id']);
+ $page->assign('oublis', $res->total());
+ $page->assign('oubliinscription', $res);
+}
+
+
+$page->assign('participants', $participants);
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require 'xnet.inc.php';
+
+require_once('xnet/evenements.php');
+
+$evt = get_event_detail(Env::get('eid'), Env::get('item_id'));
+
+header("Content-type: text/x-csv");
+header("Pragma: ");
+header("Cache-Control: ");
+new_nonhtml_page('xnet/groupe/evt-csv.tpl');
+
+if ($evt) {
+
+ $admin = may_update();
+
+ $tri = (Env::get('order') == 'alpha' ? 'promo, nom, prenom' : 'nom, prenom, promo');
+
+ $ini = Env::has('initiale') ? 'AND IF(u.nom IS NULL,m.nom,IF(u.nom_usage<>"", u.nom_usage, u.nom)) LIKE "'.addslashes(Env::get('initiale')).'%"' : '';
+
+ $participants = get_event_participants(Env::get('eid'), Env::get('item_id'), $ini, $tri, "", $evt['money'] && $admin, $evt['paiement_id']);
+
+ $page->assign('participants', $participants);
+ $page->assign('admin', $admin);
+ $page->assign('moments', $evt['moments']);
+ $page->assign('money', $evt['money']);
+ $page->assign('tout', !Env::get('item_id', false));
+}
+
+$page->run();
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+
+require 'xnet.inc.php';
+
+new_group_page('xnet/groupe/evt-detail.tpl');
+
+if (!Env::get("eid"))
+ header("Location: evenements.php");
+
+$may_participate = !$members_only || is_member() || may_update();
+$page->assign('may_participate', $may_participate);
+
+if (Env::get('ins')) {
+ $total = 0;
+ for ($i=1; Env::has('item_id'.$i); $i++)
+ $total += (Env::get('item_'.Env::get('item_id'.$i)) > 0)?Env::get('item_'.Env::get('item_id'.$i)):0;
+
+ $participate = $total > 0;
+ $res = $globals->xdb->query("SELECT paid FROM groupex.evenements_participants WHERE eid = {?} AND uid = {?}", Env::get("eid"), Session::get("uid"));
+ $paid = $res->fetchOneCell();
+ if (!$paid) $paid = 0;
+
+ // prevent desinscription if there is a manual paiement
+ if (!$participate && $paid) {
+ $page->trig("Impossible de te désinscrire complètement parce que tu as fait un paiement par chèque ou par liquide. Contacte un administrateur du groupe si tu es sûr de ne pas venir");
+ $participate = true;
+ $page->assign('no_ins', true);
+ } else
+ for ($i=1; Env::has('item_id'.$i); $i++)
+ {
+ $j = Env::get('item_id'.$i);
+ $nb = Env::get('item_'.$j);
+ if ($nb == '+') $nb = Env::get('itemnb_'.$j)+1;
+ if ($nb > 0) {
+ $globals->xdb->execute(
+ "REPLACE INTO groupex.evenements_participants
+ VALUES ({?}, {?}, {?}, {?}, {?})",
+ Env::get("eid"), Session::get("uid"), $j, $nb, $paid);
+ } else {
+ $globals->xdb->execute(
+ "DELETE FROM groupex.evenements_participants
+ WHERE eid = {?} AND uid = {?} AND item_id = {?}",
+ Env::get("eid"), Session::get("uid"), $j);
+ }
+ }
+}
+
+require_once('xnet/evenements.php');
+$evt = get_event_detail(Env::get('eid'));
+if (Env::has('ins')) {
+ subscribe_lists_event($participate, Session::get("uid"), $evt['participant_list'], $evt['absent_list']);
+}
+
+$page->assign('participate', $participate);
+$page->assign('evt', $evt);
+
+$moments = $globals->xdb->iterator(
+ "SELECT titre, i.item_id, details, montant, nb
+ FROM groupex.evenements_items AS i
+ LEFT JOIN groupex.evenements_participants AS p
+ ON(i.eid = p.eid AND i.item_id = p.item_id AND uid = {?})
+ WHERE i.eid = {?}",
+ Session::get('uid'), Env::get('eid'));
+
+$page->assign('moments', $moments);
+
+if (!$paid) {
+ $res = $globals->xdb->query("SELECT paid FROM groupex.evenements_participants WHERE eid = {?} AND uid = {?}", Env::get("eid"), Session::get("uid"));
+ $paid = $res->fetchOneCell();
+ $page->assign('paid_manual', $paid);
+}
+if ($evt['paiement_id']) {
+ $res = $globals->xdb->query(
+ "SELECT montant
+ FROM {$globals->money->mpay_tprefix}transactions AS t
+ WHERE ref = {?} AND uid = {?}",
+ $evt['paiement_id'], Session::getInt('uid', -1));
+ $montants = $res->fetchColumn();
+ foreach ($montants as $m) {
+ $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", ".");
+ $paid += trim($p);
+ }
+}
+$page->assign('paid', $paid);
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+$res = $globals->xdb->query("SELECT logo, logo_mime FROM groupex.asso WHERE id = {?}", $globals->asso('id'));
+list($logo, $logo_mime) = $res->fetchOneRow();
+
+if (!empty($logo)) {
+ header("Content-type: $mime");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified:" . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Pragma: no-cache");
+ echo $logo;
+} else {
+ header("Content-type: image/jpeg");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified:" . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Pragma: no-cache");
+ readfile("../images/dflt_carre.jpg");
+}
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+new_page('xnet/groupe/inscrire.tpl', AUTH_MDP);
+$page->useMenu();
+$page->setType($globals->asso('cat'));
+$page->assign('asso', $globals->asso());
+$page->assign('admin', may_update());
+
+
+if (Env::has('u') && may_update()) {
+ $u = Env::get('u');
+ $res = $globals->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);
+
+ if (list($nom, $prenom, $promo, $uid) = $res->fetchOneRow())
+ {
+ $res = $globals->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'));
+ $n = $res->fetchOneCell();
+ if ($n)
+ {
+ $page->trig_run("$prenom $nom est déjà membre du groupe !");
+ }
+ elseif (Env::has('accept'))
+ {
+ $globals->xdb->execute("INSERT INTO groupex.membres VALUES ({?}, {?}, 'membre', 'X', NULL, NULL, NULL, NULL)", $globals->asso('id'), $uid);
+ require_once 'diogenes/diogenes.hermes.inc.php';
+ $mailer = new HermesMailer();
+ $mailer->addTo("$u@polytechnique.org");
+ $mailer->setFrom('"'.Session::get('prenom').' '.Session::get('nom').'" <'.Session::get('forlife').'@polytechnique.org>');
+ $mailer->setSubject('['.$globals->asso('nom').'] Demande d\'inscription');
+ $message = "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 bien été validée !\n"
+ . "\n"
+ . "Bien cordialement,\n"
+ . "{$_SESSION["prenom"]} {$_SESSION["nom"]}.";
+ $mailer->setTxtBody($message);
+ $mailer->send();
+ $page->kill("$prenom $nom a bien été inscrit");
+ }
+ elseif (Env::has('refuse'))
+ {
+ require_once 'diogenes/diogenes.hermes.inc.php';
+ $mailer = new HermesMailer();
+ $mailer->addTo("$u@polytechnique.org");
+ $mailer->setFrom('"'.Session::get('prenom').' '.Session::get('nom').'" <'.Session::get('forlife').'@polytechnique.org>');
+ $mailer->setSubject('['.$globals->asso('nom').'] Demande d\'inscription annulée');
+ $mailer->setTxtBody(Env::get('motif'));
+ $mailer->send();
+ $page->kill("la demande $prenom $nom a bien été refusée");
+ }
+ else
+ {
+ $page->assign('show_form', true);
+ $page->gassign('prenom');
+ $page->gassign('nom');
+ $page->gassign('promo');
+ $page->gassign('uid');
+ }
+ }
+ else
+ {
+ $page->kill("utilisateur invalide");
+ }
+} elseif (is_member()) {
+ $page->kill("tu es déjà membre !");
+} elseif (Post::has('inscrire')) {
+
+ $res = $globals->xdb->query('SELECT IF(m.email IS NULL, CONCAT(al.alias,"@polytechnique.org"), m.email)
+ FROM groupex.membres AS m
+ INNER JOIN aliases AS al ON (al.type = "a_vie" AND al.id = m.uid)
+ WHERE perms="admin" AND m.asso_id = {?}', $globals->asso('id'));
+ $emails = $res->fetchColumn();
+ $to = implode(',', $emails);
+
+ $append = "\n"
+ . "-- \n"
+ . "Ce message a été envoyé suite à la demande d'inscription de\n"
+ . Session::get('prenom').' '.Session::get('nom').' (X'.Session::get('promo').")\n"
+ . "Via le site www.polytechnique.net. Tu peux choisir de valider ou\n"
+ . "de refuser sa demande d'inscription depuis la page :\n"
+ . "http://www.polytechnique.net/".$globals->asso("diminutif")."/inscrire.php?u=".Session::get('forlife')."\n"
+ . "\n"
+ . "En cas de problème, contacter l'équipe de Polytechnique.org\n"
+ . "à l'adresse : support@polytechnique.org\n";
+
+ if (!$to) {
+ $to = $globals->asso("mail").", support@polytechnique.org";
+ $append = "\n-- \nLe groupe ".$globals->asso("nom")." n'a pas d'administrateur, l'équipe de Polytechnique.org a été prévenue et va rapidement résoudre ce problème.\n";
+ }
+
+ require_once 'diogenes/diogenes.hermes.inc.php';
+ $mailer = new HermesMailer();
+ $mailer->addTo($to);
+ $mailer->setFrom('"'.Session::get('prenom').' '.Session::get('nom').'" <'.Session::get('forlife').'@polytechnique.org>');
+ $mailer->setSubject('['.$globals->asso('nom').'] Demande d\'inscription');
+ $mailer->setTxtBody(Post::get('message').$append);
+ $mailer->send();
+}
+
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+$domain = $globals->asso('mail_domain');
+
+new_group_page('listes/admin.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/admin.php');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+$domain = $globals->asso('mail_domain');
+
+new_group_page('listes/archives.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/archives.php');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: index.php');
+$liste = strtolower(Env::get('liste'));
+
+new_groupadmin_page('listes/check.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/check.php');
+
+?>
--- /dev/null
+<?php
+require 'xnet.inc.php';
+
+new_groupadmin_page('xnet/groupe/listes-create.tpl');
+$page->assign('force_list_super', may_update());
+
+if (Post::has('submit')) {
+ if (!Post::has('liste')) {
+ $page->trig_run('champs «addresse souhaitée» vide');
+ }
+
+ $liste = Post::get('liste');
+
+ if (!preg_match("/^[a-zA-Z0-9\-]*$/", $liste)) {
+ $page->trig_run('le nom de la liste ne doit contenir que des lettres, chiffres et tirets');
+ }
+
+ $new = $liste.'@'.$globals->asso('mail_domain');
+ $res = $globals->xdb->query('SELECT COUNT(*) FROM x4dat.virtual WHERE alias={?}', $new);
+ $n = $res->fetchOneCell();
+
+ if($n) {
+ $page->trig_run('cet alias est déjà pris');
+ }
+ if(!Post::get('desc')) {
+ $page->trig_run('le sujet est vide');
+ }
+
+ require('xml-rpc-client.inc.php');
+ require_once('lists.inc.php');
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+ $ret = $client->create_list($liste, Post::get('desc'), Post::get('advertise'), Post::get('modlevel'), Post::get('inslevel'), array(Session::get('forlife')), array());
+
+ $dom = strtolower($globals->asso("mail_domain"));
+ $red = $dom.'_'.$liste;
+
+ if($ret) {
+ $globals->xdb->execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'@'.$dom, 'list');
+ $globals->xdb->execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) VALUES ({?}, {?})', mysql_insert_id(), "$red+post@listes.polytechnique.org");
+ $globals->xdb->execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'-owner@'.$dom, 'list');
+ $globals->xdb->execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) VALUES ({?}, {?})', mysql_insert_id(), "$red+owner@listes.polytechnique.org");
+ $globals->xdb->execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'-admin@'.$dom, 'list');
+ $globals->xdb->execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) VALUES ({?}, {?})', mysql_insert_id(), "$red+admin@listes.polytechnique.org");
+ $globals->xdb->execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'-bounces@'.$dom, 'list');
+ $globals->xdb->execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) VALUES ({?}, {?})', mysql_insert_id(), "$red+bounces@listes.polytechnique.org");
+ header("Location: listes-admin.php?liste=$liste");
+ } else {
+ $page->kill("Un problème est survenu, contacter <a href='mailto:support@m4x.org'>support@m4x.org</a>");
+ }
+}
+
+$page->run()
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_group_page('listes/delete.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/delete.php');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_group_page('listes/members.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/members.php');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+$domain = $globals->asso('mail_domain');
+
+if (preg_match("!(?:[a-z0-9]+\\.)?{".$globals->asso('mail_domain')."}_(.*)!", $liste, $matches)) {
+ header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}");
+}
+
+new_group_page('listes/moderate.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/moderate.php');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_group_page('listes/options.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/options.php');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_groupadmin_page('listes/soptions.tpl');
+$page->assign('force_list_super', may_update());
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/soptions.php');
+
+?>
--- /dev/null
+<?php
+
+require_once 'xnet.inc.php';
+
+new_group_page('xnet/groupe/listes.tpl');
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+
+
+if(Get::has('del')) {
+ $client->unsubscribe(Get::get('del'));
+ header('Location: listes.php');
+}
+if(Get::has('add')) {
+ $client->subscribe(Get::get('add'));
+ header('Location: listes.php');
+}
+if(Post::has('promo_add')) {
+ $promo = Post::getInt('promo_add');
+ if ($promo>=1900 and $promo<2100) {
+ $client->subscribe("promo$promo");
+ } else {
+ $page->trig("promo incorrecte, il faut une promo sur 4 chiffres.");
+ }
+}
+
+
+if (Post::has('del_alias') && may_update()) {
+ $alias = Post::get('del_alias');
+ // prevent group admin from erasing aliases from other groups
+ $alias = substr($alias, 0, strpos($alias, '@')).'@'.$globals->asso('mail_domain');
+ $globals->xdb->query(
+ 'DELETE FROM x4dat.virtual_redirect, x4dat.virtual
+ USING x4dat.virtual AS v
+ LEFT JOIN x4dat.virtual_redirect USING(vid)
+ WHERE v.alias={?}', $alias);
+ $page->trig(Post::get('del_alias')." supprimé !");
+}
+
+$listes = $client->get_lists();
+$page->assign('listes',$listes);
+
+$alias = $globals->xdb->iterator(
+ 'SELECT alias,type
+ FROM x4dat.virtual
+ WHERE alias
+ LIKE {?} AND type="user"
+ ORDER BY alias', '%@'.$globals->asso('mail_domain'));
+$page->assign('alias', $alias);
+
+$page->assign('may_update', may_update());
+
+$page->run();
+?>
--- /dev/null
+<?php
+ require_once 'xnet.inc.php';
+ require_once 'lists.inc.php';
+
+ new_groupadmin_page('xnet/groupe/mail.tpl');
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+ $page->assign('listes', $client->get_lists());
+
+ $alias = $globals->xdb->query("SELECT alias FROM virtual WHERE alias LIKE {?} AND type='user' ORDER BY alias", '%@'.$globals->asso("mail_domain"));
+ $page->assign('alias', $alias->fetchColumn());
+
+ if (Post::has('send')) {
+ $from = Post::get('from');
+ $sujet = Post::get('sujet');
+ $body = Post::get('body');
+
+ $mls = array_keys(Env::getMixed('ml', array()));
+ $als = array_keys(Env::getMixed('al', array()));
+
+ require_once 'xnet/mail.inc.php';
+ $tos = get_all_redirects(Post::has('membres'), $mls, $als, $client);
+ send_xnet_mails($from, $sujet, $body, $tos);
+ $page->kill("Mail envoyé !");
+ $page->assign('sent', true);
+ }
+
+ $page->run();
+?>
--- /dev/null
+<?php
+
+ require 'xnet.inc.php';
+
+ function get_infos($email)
+ {
+ global $globals;
+
+ $email = strtolower($email);
+ if (strpos($email, '@') === false) {
+ $email .= '@m4x.org';
+ }
+ list($mbox,$dom) = split('@', $email);
+
+ if ($dom == 'polytechnique.org' || $dom == 'm4x.org') {
+ $res = $globals->xdb->query(
+ "SELECT user_id AS uid, u.promo, IF(u.nom_usage<>'', u.nom_usage, u.nom) as nom, u.prenom, b.alias,
+ CONCAT(b.alias, '@m4x.org') AS email,
+ CONCAT(b.alias, '@polytechnique.org') AS email2,
+ m.perms='admin' AS perms, m.origine
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( u.user_id = a.id AND a.type != 'homonyme' )
+ INNER JOIN aliases AS b ON ( u.user_id = b.id AND b.type = 'a_vie' )
+ INNER JOIN groupex.membres AS m ON ( m.uid = u.user_id AND asso_id={?})
+ WHERE a.alias = {?} AND u.user_id < 50000", $globals->asso('id'), $mbox);
+ $user = $res->fetchOneAssoc();
+ } else {
+ $res = $globals->xdb->query(
+ "SELECT uid, nom, prenom, email, email AS email2, perms='admin', origine
+ FROM groupex.membres
+ WHERE email = {?} AND asso_id = {?}", $email, $globals->asso('id'));
+ $user = $res->fetchOneAssoc();
+ }
+
+ return $user;
+ }
+
+ if (Env::has('new'))
+ {
+ new_groupadmin_page('xnet/groupe/membres-add.tpl');
+ $x = (Env::get('new') == 'x');
+
+ if (Post::has('email')) {
+ if ($x) {
+ require_once 'user.func.inc.php';
+ if ($forlife = get_user_forlife(Post::get('email'))) {
+ $globals->xdb->execute(
+ 'INSERT INTO groupex.membres (uid,asso_id,origine)
+ SELECT user_id,{?},"X"
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id = a.id)
+ WHERE a.alias={?}', $globals->asso('id'), $forlife);
+ header('Location: ?edit='.$forlife);
+ }
+ } else {
+ $email = Post::get('email');
+ if (isvalid_email($email)) {
+ $res = $globals->xdb->query('SELECT MAX(uid)+1 FROM groupex.membres');
+ $uid = max(intval($res->fetchOneCell()), 50001);
+ $globals->xdb->execute('INSERT INTO groupex.membres (uid,asso_id,origine,email) VALUES({?},{?},"ext",{?})',
+ $uid, $globals->asso('id'), $email);
+ header('Location: ?edit='.$email);
+ } else {
+ $page->trig("« <strong>$email</strong> » n'est pas une adresse mail valide");
+ }
+ }
+ }
+ }
+ elseif (Env::has('edit'))
+ {
+ new_groupadmin_page('xnet/groupe/membres-edit.tpl');
+
+ $user = get_infos(Env::get('edit'));
+ if (empty($user)) { header("Location: annuaire.php"); }
+
+ require 'lists.inc.php';
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+
+ if (Post::has('change')) {
+
+ if ($user['origine'] != 'X')
+ {
+ $globals->xdb->query('UPDATE groupex.membres SET prenom={?}, nom={?}, email={?} WHERE uid={?} AND asso_id={?}',
+ Post::get('prenom'), Post::get('nom'), Post::get('email'), $user['uid'], $globals->asso('id'));
+ $user['nom'] = Post::get('nom');
+ $user['prenom'] = Post::get('prenom');
+ $user['email'] = Post::get('email');
+ $user['email2'] = Post::get('email');
+ }
+
+ $perms = Post::getInt('is_admin');
+ if ($user['perms'] != $perms) {
+ $globals->xdb->query('UPDATE groupex.membres SET perms={?} WHERE uid={?} AND asso_id={?}',
+ $perms ? 'admin' : 'membre', $user['uid'], $globals->asso('id'));
+ $user['perms'] = $perms;
+ $page->trig('permissions modifiées');
+ }
+
+ foreach (Env::getMixed('ml1',array()) as $ml => $state) {
+ $ask = empty($_REQUEST['ml2'][$ml]) ? 0 : 2;
+ if ($ask == $state) continue;
+ if ($state == '1') {
+ $page->trig("{$user['prenom']} {$user['nom']} a actuellement une demande d'inscription en cours sur <strong>$ml@</strong> !!!");
+ } elseif ($ask) {
+ $client->mass_subscribe($ml, Array($user['email2']));
+ $page->trig("{$user['prenom']} {$user['nom']} a été abonné à $ml@");
+ } else {
+ $client->mass_unsubscribe($ml, Array($user['email2']));
+ $page->trig("{$user['prenom']} {$user['nom']} a été désabonné de $ml@");
+ }
+ }
+
+ foreach (Env::getMixed('ml3', array()) as $ml => $state) {
+ $ask = !empty($_REQUEST['ml4'][$ml]);
+ if($state == $ask) continue;
+ if($ask) {
+ $globals->xdb->query("INSERT INTO virtual_redirect (vid,redirect)
+ SELECT vid,{?} FROM virtual WHERE alias={?}",
+ $user['email'], $ml);
+ $page->trig("{$user['prenom']} {$user['nom']} a été abonné à $ml");
+ } else {
+ $globals->xdb->query("DELETE FROM virtual_redirect
+ USING virtual_redirect
+ INNER JOIN virtual USING(vid)
+ WHERE redirect={?} AND alias={?}", $user['email'], $ml);
+ $page->trig("{$user['prenom']} {$user['nom']} a été désabonné de $ml");
+ }
+ }
+ }
+
+ $page->assign('user', $user);
+ $listes = $client->get_lists($user['email2']);
+ $page->assign('listes', $listes);
+
+ $res = $globals->xdb->query(
+ 'SELECT alias, redirect IS NOT NULL as sub
+ FROM virtual AS v
+ LEFT JOIN virtual_redirect AS vr ON(v.vid=vr.vid AND redirect={?})
+ WHERE alias LIKE {?} AND type="user"', $user['email'], '%@'.$globals->asso('mail_domain'));
+ $page->assign('alias', $res->fetchAllAssoc());
+ }
+ elseif (Env::has('del'))
+ {
+ new_groupadmin_page('xnet/groupe/membres-del.tpl');
+ $user = get_infos(Env::get('del'));
+ if (empty($user)) { header("Location: annuaire.php"); }
+ $page->assign('user', $user);
+
+ if (Post::has('confirm')) {
+ if ($domain = $globals->asso('mail_domain')) {
+
+ require 'lists.inc.php';
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $domain);
+ $listes = $client->get_lists($user['email2']);
+
+ foreach ($listes as $liste) {
+ if ($liste['sub'] == 2) {
+ $client->mass_unsubscribe($liste['list'], Array($user['email2']));
+ $page->trig("{$user['prenom']} {$user['nom']} a été désinscrit de {$liste['list']}");
+ } elseif ($liste['sub']) {
+ $page->trig("{$user['prenom']} {$user['nom']} a une demande d'inscription en cours sur la liste {$liste['list']}@ !");
+ }
+ }
+
+ $globals->xdb->execute(
+ "DELETE FROM virtual_redirect
+ USING virtual_redirect
+ INNER JOIN virtual USING(vid)
+ WHERE redirect={?} AND alias LIKE {?}", $user['email'], '%@'.$domain);
+ if (mysql_affected_rows()) {
+ $page->trig("{$user['prenom']} {$user['nom']} a été désabonné des alias du groupe !");
+ }
+ }
+
+ $globals->xdb->execute(
+ "DELETE FROM groupex.membres WHERE uid={?} AND asso_id={?}",
+ $user['uid'], $globals->asso('id'));
+ $page->trig("{$user['prenom']} {$user['nom']} a été retiré du groupe !");
+ }
+ }
+ else
+ {
+ header("Location: annuaire.php");
+ }
+
+ $page->run();
+
+?>
--- /dev/null
+<?php
+
+require 'xnet.inc.php';
+
+new_group_page('xnet/groupe/telepaiement.tpl');
+
+$res = $globals->xdb->query("SELECT id, text FROM {$globals->money->mpay_tprefix}paiements WHERE asso_id = {?}", $globals->asso('id'));
+$tit = $res->fetchAllAssoc();
+$page->assign('titres', $tit);
+
+if (may_update()) {
+ $trans = array();
+ foreach($tit as $foo) {
+ $pid = $foo['id'];
+ $res = $globals->xdb->query(
+ "SELECT IF(u.nom_usage<>'', u.nom_usage, u.nom) as nom, u.prenom, u.promo, a.alias, timestamp, montant
+ FROM {$globals->money->mpay_tprefix}transactions AS t
+ INNER JOIN auth_user_md5 AS u ON ( t.uid = u.user_id )
+ INNER JOIN aliases AS a ON ( t.uid = a.id AND a.type='a_vie' )
+ WHERE ref = {?}
+ ORDER BY timestamp DESC", $pid);
+ $trans[$pid] = $res->fetchAllAssoc();
+ }
+ $page->assign('trans', $trans);
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ if (!($cat = Get::get('cat'))) {
+ header("Location:index.php");
+ exit;
+ }
+
+ $_GET['cat'] = strtolower($cat);
+
+ new_page('xnet/groupes.tpl', AUTH_PUBLIC);
+
+ $res = $globals->xdb->query("SELECT id,nom FROM groupex.dom WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat);
+ $doms = $res->fetchAllAssoc();
+ $page->assign('doms', $doms);
+
+ if (empty($doms)) {
+ $res = $globals->xdb->iterator("SELECT diminutif, nom FROM groupex.asso WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat);
+ } elseif (Get::has('dom')) {
+ $res = $globals->xdb->iterator("SELECT diminutif, nom FROM groupex.asso WHERE FIND_IN_SET({?}, cat) AND dom={?} ORDER BY nom", $cat, Get::getInt('dom'));
+ } else {
+ $res = null;
+ }
+ $page->assign('gps', $res);
+
+ $page->useMenu();
+ $page->setType($cat);
+ $page->run();
+?>
--- /dev/null
+../../htdocs/images/ajouter.gif
\ No newline at end of file
--- /dev/null
+../../htdocs/images/ax.png
\ No newline at end of file
--- /dev/null
+../../htdocs/images/flag.png
\ No newline at end of file
--- /dev/null
+../../htdocs/images/loupe.gif
\ No newline at end of file
--- /dev/null
+../../htdocs/images/mail.png
\ No newline at end of file
--- /dev/null
+../../htdocs/images/retirer.gif
\ No newline at end of file
--- /dev/null
+../../htdocs/images/vcard.png
\ No newline at end of file
--- /dev/null
+../../htdocs/images/x.png
\ No newline at end of file
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/index.tpl', AUTH_PUBLIC);
+ $page->run();
+?>
--- /dev/null
+../htdocs/javascript
\ No newline at end of file
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ if (logged()) {
+ header("Location: index.php");
+ }
+
+ new_page('index.tpl', AUTH_MDP);
+ $page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/manuel.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/plan.tpl', AUTH_PUBLIC);
+ $page->setType('plan');
+
+ $res = $globals->xdb->iterator(
+ 'SELECT dom.id, dom.nom as domnom, asso.diminutif, asso.nom
+ FROM groupex.dom
+ INNER JOIN groupex.asso ON dom.id = asso.dom
+ WHERE FIND_IN_SET("GroupesX", dom.cat) AND FIND_IN_SET("GroupesX", asso.cat)
+ ORDER BY dom.nom, asso.nom');
+ $groupesx = array();
+ while ($tmp = $res->next()) { $groupesx[$tmp['id']][] = $tmp; }
+ $page->assign('groupesx', $groupesx);
+
+ $res = $globals->xdb->iterator(
+ 'SELECT dom.id, dom.nom as domnom, asso.diminutif, asso.nom
+ FROM groupex.dom
+ INNER JOIN groupex.asso ON dom.id = asso.dom
+ WHERE FIND_IN_SET("Binets", dom.cat) AND FIND_IN_SET("Binets", asso.cat)
+ ORDER BY dom.nom, asso.nom');
+ $binets = array();
+ while ($tmp = $res->next()) { $binets[$tmp['id']][] = $tmp; }
+ $page->assign('binets', $binets);
+
+ $res = $globals->xdb->iterator(
+ 'SELECT asso.diminutif, asso.nom
+ FROM groupex.asso
+ WHERE cat LIKE "%Promotions%"
+ ORDER BY diminutif');
+ $page->assign('promos', $res);
+
+ $res = $globals->xdb->iterator(
+ 'SELECT asso.diminutif, asso.nom
+ FROM groupex.asso
+ WHERE FIND_IN_SET("Institutions", cat)
+ ORDER BY diminutif');
+ $page->assign('inst', $res);
+
+ $page->run();
+?>
--- /dev/null
+<?php
+
+require 'xnet.inc.php';
+require_once 'exalead/exalead.parser.inc.php';
+
+new_page('xnet/recherche.tpl', AUTH_PUBLIC);
+$page->setType('recherche');
+$page->useMenu();
+$page->addCssLink('exalead.css');
+
+
+$query_exa = "http://murphy:10000/cgi/poly.net_devel";
+
+$exalead = new Exalead($query_exa);
+
+if ($exalead->query('query')) {
+ $page->assign_by_ref('exalead_data', $exalead->data);
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+ require 'xnet.inc.php';
+
+ new_page('xnet/services.tpl', AUTH_PUBLIC);
+ $page->useMenu();
+ $page->run();
+?>
--- /dev/null
+<?php
+
+ini_set("include_path", "../../:./simpletest/:".ini_get('include_path'));
+define('PATH', dirname(__FILE__));
+
+require_once('unit_tester.php');
+require_once('mock_objects.php');
+require_once('reporter.php');
+require_once('xorg.globals.inc.php');
+XorgGlobals::init();
+
+$reporter = new HtmlReporter();
+?>
--- /dev/null
+<?php
+require_once("__init__.php");
+
+require_once('shell_tester.php');
+require_once('mock_objects.php');
+
+class MyReporter extends SimpleReporter {
+ function MyReporter() {
+ HtmlReporter::sendNoCacheHeaders();
+ $this->SimpleReporter();
+ }
+
+ function paintFooter($test_name) {
+ global $tfile;
+ $class = $this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green";
+ print "<div class='$class'>";
+ print "<h1><a href='".basename($tfile)."'>$test_name</a> (";
+ print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount();
+ print ")</h1>\n";
+ print "<strong>" . $this->getPassCount() . "</strong> passes | ";
+ print "<strong>" . $this->getFailCount() . "</strong> fails | ";
+ print "<strong>" . $this->getExceptionCount() . "</strong> exceptions.";
+ print "</div>\n";
+ flush();
+ }
+}
+
+echo <<<EOF
+<html>
+ <head>
+ <title>ALL TESTS</title>
+ <style type="text/css">
+ body { padding: 0px; margin: 0px;}
+ div { float: left; color: white; padding: 1ex; border: 1px dashed white; }
+ h1 { padding: 0px; margin: 0px; font-size: 120%; }
+ a , a:visited { color: inherit; }
+ .red { background-color: red; }
+ .green { background-color: green; }
+
+ </style>
+ </head>
+ <body>
+EOF;
+
+foreach (glob(PATH.'/*_*.php') as $tfile) {
+ $reporter = new MyReporter;
+ require_once($tfile);
+}
+
+print "</body>\n</html>\n";
+?>
--- /dev/null
+Simple Test
+===========
+You probably got this package from...
+http://sourceforge.net/projects/simpletest/
+
+If there is no licence agreement with this package please download
+a version from the location above. You must read and accept that
+licence to use this software. The file is titled simply LICENSE.
+
+What is it? It's a framework for unit testing, web site testing and
+mock objects for PHP 4.3+.
+
+If you have used JUnit you will find this PHP unit testing version very
+similar. Also included is a mock objects and server stubs generator.
+The stubs can have return values set for different arguments, can have
+sequences set also by arguments and can return items by reference.
+The mocks inherit all of this functionality and can also have
+expectations set, again in sequences and for different arguments.
+
+A web tester similar in concept to JWebUnit is also included. There is no
+JavaScript or tables support, but forms, authentication and cookies are
+handled. Frames will be supported soon.
+
+You are not tied to just using SimpleTest, though. The mocks and stubs
+will work with other test frameworks and SimpleTest can use other
+framework's (PHPUnit, PEAR::PhpUnit) test cases as it's own. The
+web browser part of the web tester can also be used independently either
+in other testers or as part of a scripting solution.
+
+You can see a release schedule at
+http://www.lastcraft.com/overview.php which is also copied to the
+documentation folder with this release. The user interface is minimal
+in the extreme, but a lot of information flows from the test suite.
+After version 1.0 we will release a better web UI, but we are leaving XUL
+and GTk versions to volunteers as everybody has their own opinion
+on a good GUI, and we don't want to discourage development by shipping
+one with the toolkit.
+
+If you are extending the toolkit or wish to bundle parts of the toolkit
+with your own software, you can see a full PHPDoc API on sourceforge
+as http://simpletest.sourceforge.net/.
+
+You are looking at a Beta release.
+
+The unit tester and mock object generator are tested and have already
+been used to test several systems. The web tester portion still lacks
+frames support, but is mostly stable. Documentaion is currently lacking,
+but should be improved for a version 1.0 release.
+
+The unit tests for SimpleTest itself can be run here...
+
+simpletest/test/unit_tests.php
+
+And tests involving live network connections as well are here...
+
+simpletest/test/all_tests.php
+
+The full tests read some test data from the LastCraft site. If the site
+is down or has been modified for a later version then you will get
+spurious errors. A unit_tests.php failure on the other hand would be
+very serious. As far as we know we haven't yet managed to check in any
+test failures so please correct us if you find one.
+
+Even if all of the tests run please verify that your existing test suites
+also function as expected. If they don't see the file...
+
+simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE
+
+This contains information on interface changes. It also points out
+deprecated interfaces so you should read this even if all of
+your current tests appear to run.
+
+You can find a tutorial on http://www.lastcraft.com/first_test_tutorial.php to
+get you started and hopefully this material will eventually become included
+with the project documentation. There is a documentation folder, but it is
+just a subset of the material on Sourceforge.
+
+If you download and use and possibly even extend this tool, please let us
+know. Any feedback, even bad, is always welcome and we will work to get
+your suggestions into the version one release. Ideally please send your
+comments to...
+
+simpletest-support@lists.sourceforge.net
+
+...so that others can read them too. We usually try to respond within 48
+hours.
+
+There is no change log as yet except at sourceforge. You can visit the
+release notes to see the completed TODO list after each cycle and also the
+status of any bugs, but if the bug is recent then it will be fixed in CVS only.
+The CVS check-ins always have all the tests passing and so CVS snapshots should
+be pretty usable, although the code may not look so good internally.
+
+Oh, yes. It is called "Simple" because it should be simple to
+use. We intend to add a complete set of tools for a test first
+and "test as you code" type of development. "Simple" does not
+mean "Lite" in this context.
+
+Thanks to everyone who has sent comments and offered suggestions, they
+really are invaluable.
+
+Thanks to the advanced PHP forum on SitePoint. It is the place to be right
+now.
+
+Authors are Marcus Baker, Jason Sweat and Harry Feucks.
+
+yours, Marcus Baker
+--
+marcus@lastcraft.com
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: authentication.php,v 1.8 2004/07/28 16:42:08 lastcraft Exp $
+ */
+ /**
+ * include http class
+ */
+ require_once(dirname(__FILE__) . '/http.php');
+
+ /**
+ * Represents a single security realm's identity.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleRealm {
+ var $_type;
+ var $_root;
+ var $_username;
+ var $_password;
+
+ /**
+ * Starts with the initial entry directory.
+ * @param string $type Authentication type for this
+ * realm. Only Basic authentication
+ * is currently supported.
+ * @param SimpleUrl $url Somewhere in realm.
+ * @access public
+ */
+ function SimpleRealm($type, $url) {
+ $this->_type = $type;
+ $this->_root = $url->getBasePath();
+ $this->_username = false;
+ $this->_password = false;
+ }
+
+ /**
+ * Adds another location to the realm.
+ * @param SimpleUrl $url Somewhere in realm.
+ * @access public
+ */
+ function stretch($url) {
+ $this->_root = $this->_getCommonPath($this->_root, $url->getPath());
+ }
+
+ /**
+ * Finds the common starting path.
+ * @param string $first Path to compare.
+ * @param string $second Path to compare.
+ * @return string Common directories.
+ * @access private
+ */
+ function _getCommonPath($first, $second) {
+ $first = explode('/', $first);
+ $second = explode('/', $second);
+ for ($i = 0; $i < min(count($first), count($second)); $i++) {
+ if ($first[$i] != $second[$i]) {
+ return implode('/', array_slice($first, 0, $i)) . '/';
+ }
+ }
+ return implode('/', $first) . '/';
+ }
+
+ /**
+ * Sets the identity to try within this realm.
+ * @param string $username Username in authentication dialog.
+ * @param string $username Password in authentication dialog.
+ * @access public
+ */
+ function setIdentity($username, $password) {
+ $this->_username = $username;
+ $this->_password = $password;
+ }
+
+ /**
+ * Accessor for current identity.
+ * @return string Last succesful username.
+ * @access public
+ */
+ function getUsername() {
+ return $this->_username;
+ }
+
+ /**
+ * Accessor for current identity.
+ * @return string Last succesful password.
+ * @access public
+ */
+ function getPassword() {
+ return $this->_password;
+ }
+
+ /**
+ * Test to see if the URL is within the directory
+ * tree of the realm.
+ * @param SimpleUrl $url URL to test.
+ * @return boolean True if subpath.
+ * @access public
+ */
+ function isWithin($url) {
+ return (strpos($url->getBasePath(), $this->_root) === 0);
+ }
+ }
+
+ /**
+ * Manages security realms.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleAuthenticator {
+ var $_realms;
+
+ /**
+ * Starts with no realms set up.
+ * @access public
+ */
+ function SimpleAuthenticator() {
+ $this->_realms = array();
+ }
+
+ /**
+ * Adds a new realm centered the current URL.
+ * Browsers vary wildly on their behaviour in this
+ * regard. Mozilla ignores the realm and presents
+ * only when challenged, wasting bandwidth. IE
+ * just carries on presenting until a new challenge
+ * occours. SimpleTest tries to follow the spirit of
+ * the original standards committee and treats the
+ * base URL as the root of a file tree shaped realm.
+ * @param SimpleUrl $url Base of realm.
+ * @param string $type Authentication type for this
+ * realm. Only Basic authentication
+ * is currently supported.
+ * @param string $realm Name of realm.
+ * @access public
+ */
+ function addRealm($url, $type, $realm) {
+ $this->_realms[$url->getHost()][$realm] = new SimpleRealm($type, $url);
+ }
+
+ /**
+ * Sets the current identity to be presented
+ * against that realm.
+ * @param string $host Server hosting realm.
+ * @param string $realm Name of realm.
+ * @param string $username Username for realm.
+ * @param string $password Password for realm.
+ * @access public
+ */
+ function setIdentityForRealm($host, $realm, $username, $password) {
+ if (isset($this->_realms[$host][$realm])) {
+ $this->_realms[$host][$realm]->setIdentity($username, $password);
+ }
+ }
+
+ /**
+ * Finds the name of the realm by comparing URLs.
+ * @param SimpleUrl $url URL to test.
+ * @return SimpleRealm Name of realm.
+ * @access private
+ */
+ function _findRealmFromUrl($url) {
+ if (! isset($this->_realms[$url->getHost()])) {
+ return false;
+ }
+ foreach ($this->_realms[$url->getHost()] as $name => $realm) {
+ if ($realm->isWithin($url)) {
+ return $realm;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Presents the appropriate headers for this location.
+ * @param SimpleHttpRequest $request Request to modify.
+ * @param SimpleUrl $url Base of realm.
+ * @access public
+ */
+ function addHeaders(&$request, $url) {
+ if ($url->getUsername() && $url->getPassword()) {
+ $username = $url->getUsername();
+ $password = $url->getPassword();
+ } elseif ($realm = $this->_findRealmFromUrl($url)) {
+ $username = $realm->getUsername();
+ $password = $realm->getPassword();
+ } else {
+ return;
+ }
+ $this->addBasicHeaders($request, $username, $password);
+ }
+
+ /**
+ * Presents the appropriate headers for this
+ * location for basic authentication.
+ * @param SimpleHttpRequest $request Request to modify.
+ * @param string $username Username for realm.
+ * @param string $password Password for realm.
+ * @access public
+ * @static
+ */
+ function addBasicHeaders(&$request, $username, $password) {
+ if ($username && $password) {
+ $request->addHeaderLine(
+ 'Authorization: Basic ' . base64_encode("$username:$password"));
+ }
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: browser.php,v 1.133 2004/08/18 23:10:19 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/options.php');
+ require_once(dirname(__FILE__) . '/http.php');
+ require_once(dirname(__FILE__) . '/page.php');
+ require_once(dirname(__FILE__) . '/frames.php');
+ require_once(dirname(__FILE__) . '/user_agent.php');
+ /**#@-*/
+
+ /**
+ * Browser history list.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleBrowserHistory {
+ var $_sequence;
+ var $_position;
+
+ /**
+ * Starts empty.
+ * @access public
+ */
+ function SimpleBrowserHistory() {
+ $this->_sequence = array();
+ $this->_position = -1;
+ }
+
+ /**
+ * Test for no entries yet.
+ * @return boolean True if empty.
+ * @access private
+ */
+ function _isEmpty() {
+ return ($this->_position == -1);
+ }
+
+ /**
+ * Test for being at the beginning.
+ * @return boolean True if first.
+ * @access private
+ */
+ function _atBeginning() {
+ return ($this->_position == 0) && ! $this->_isEmpty();
+ }
+
+ /**
+ * Test for being at the last entry.
+ * @return boolean True if last.
+ * @access private
+ */
+ function _atEnd() {
+ return ($this->_position + 1 >= count($this->_sequence)) && ! $this->_isEmpty();
+ }
+
+ /**
+ * Adds a successfully fetched page to the history.
+ * @param string $method GET or POST.
+ * @param SimpleUrl $url URL of fetch.
+ * @param array $parameters Any post data with the fetch.
+ * @access public
+ */
+ function recordEntry($method, $url, $parameters) {
+ $this->_dropFuture();
+ array_push(
+ $this->_sequence,
+ array('method' => $method, 'url' => $url, 'parameters' => $parameters));
+ $this->_position++;
+ }
+
+ /**
+ * Last fetching method for current history
+ * position.
+ * @return string GET or POST for this point in
+ * the history.
+ * @access public
+ */
+ function getMethod() {
+ if ($this->_isEmpty()) {
+ return false;
+ }
+ return $this->_sequence[$this->_position]['method'];
+ }
+
+ /**
+ * Last fully qualified URL for current history
+ * position.
+ * @return SimpleUrl URL for this position.
+ * @access public
+ */
+ function getUrl() {
+ if ($this->_isEmpty()) {
+ return false;
+ }
+ return $this->_sequence[$this->_position]['url'];
+ }
+
+ /**
+ * Parameters of last fetch from current history
+ * position.
+ * @return array Hash of post parameters.
+ * @access public
+ */
+ function getParameters() {
+ if ($this->_isEmpty()) {
+ return false;
+ }
+ return $this->_sequence[$this->_position]['parameters'];
+ }
+
+ /**
+ * Step back one place in the history. Stops at
+ * the first page.
+ * @return boolean True if any previous entries.
+ * @access public
+ */
+ function back() {
+ if ($this->_isEmpty() || $this->_atBeginning()) {
+ return false;
+ }
+ $this->_position--;
+ return true;
+ }
+
+ /**
+ * Step forward one place. If already at the
+ * latest entry then nothing will happen.
+ * @return boolean True if any future entries.
+ * @access public
+ */
+ function forward() {
+ if ($this->_isEmpty() || $this->_atEnd()) {
+ return false;
+ }
+ $this->_position++;
+ return true;
+ }
+
+ /**
+ * Ditches all future entries beyond the current
+ * point.
+ * @access private
+ */
+ function _dropFuture() {
+ if ($this->_isEmpty()) {
+ return;
+ }
+ while (! $this->_atEnd()) {
+ array_pop($this->_sequence);
+ }
+ }
+ }
+
+ /**
+ * Simulated web browser. This is an aggregate of
+ * the user agent, the HTML parsing, request history
+ * and the last header set.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleBrowser {
+ var $_user_agent;
+ var $_page;
+ var $_history;
+ var $_ignore_frames;
+
+ /**
+ * Starts with a fresh browser with no
+ * cookie or any other state information. The
+ * exception is that a default proxy will be
+ * set up if specified in the options.
+ * @access public
+ */
+ function SimpleBrowser() {
+ $this->_user_agent = &$this->_createUserAgent();
+ $this->_user_agent->useProxy(
+ SimpleTestOptions::getDefaultProxy(),
+ SimpleTestOptions::getDefaultProxyUsername(),
+ SimpleTestOptions::getDefaultProxyPassword());
+ $this->_page = &new SimplePage();
+ $this->_history = &$this->_createHistory();
+ $this->_ignore_frames = false;
+ }
+
+ /**
+ * Creates the underlying user agent.
+ * @return SimpleFetcher Content fetcher.
+ * @access protected
+ */
+ function &_createUserAgent() {
+ return new SimpleUserAgent();
+ }
+
+ /**
+ * Creates a new empty history list.
+ * @return SimpleBrowserHistory New list.
+ * @access protected
+ */
+ function &_createHistory() {
+ return new SimpleBrowserHistory();
+ }
+
+ /**
+ * Disables frames support. Frames will not be fetched
+ * and the frameset page will be used instead.
+ * @access public
+ */
+ function ignoreFrames() {
+ $this->_ignore_frames = true;
+ }
+
+ /**
+ * Enables frames support. Frames will be fetched from
+ * now on.
+ * @access public
+ */
+ function useFrames() {
+ $this->_ignore_frames = false;
+ }
+
+ /**
+ * Parses the raw content into a page. Will load further
+ * frame pages unless frames are disabled.
+ * @param SimpleHttpResponse $response Response from fetch.
+ * @return SimplePage Parsed HTML.
+ * @access protected
+ */
+ function &_parse($response) {
+ $builder = &new SimplePageBuilder();
+ $page = &$builder->parse($response);
+ if ($this->_ignore_frames || ! $page->hasFrames()) {
+ return $page;
+ }
+ $frameset = &new SimpleFrameset($page);
+ foreach ($page->getFrameset() as $key => $url) {
+ $frame = &$this->_fetch('GET', $url, array());
+ $frameset->addFrame($frame, $key);
+ }
+ return $frameset;
+ }
+
+ /**
+ * Fetches a page.
+ * @param string $method GET or POST.
+ * @param string/SimpleUrl $url Target to fetch as string.
+ * @param hash $parameters POST parameters.
+ * @return SimplePage Parsed page.
+ * @access private
+ */
+ function &_fetch($method, $url, $parameters) {
+ $response = &$this->_user_agent->fetchResponse($method, $url, $parameters);
+ if ($response->isError()) {
+ return new SimplePage($response);
+ }
+ return $this->_parse($response);
+ }
+
+ /**
+ * Fetches a page or a single frame if that is the current
+ * focus.
+ * @param string $method GET or POST.
+ * @param string/SimpleUrl $url Target to fetch as string.
+ * @param hash $parameters POST parameters.
+ * @return string Raw content of page.
+ * @access private
+ */
+ function _load($method, $url, $parameters = false) {
+ $frame = $url->getTarget();
+ if (! $frame || (strtolower($frame) == '_top')) {
+ return $this->_loadPage($method, $url, $parameters);
+ }
+ return $this->_loadFrame(array($frame), $method, $url, $parameters);
+ }
+
+ /**
+ * Fetches a page and makes it the current page/frame.
+ * @param string $method GET or POST.
+ * @param string/SimpleUrl $url Target to fetch as string.
+ * @param hash $parameters POST parameters.
+ * @return string Raw content of page.
+ * @access private
+ */
+ function _loadPage($method, $url, $parameters = false) {
+ $this->_page = &$this->_fetch(strtoupper($method), $url, $parameters);
+ $this->_history->recordEntry(
+ $this->_page->getMethod(),
+ $this->_page->getUrl(),
+ $this->_page->getRequestData());
+ return $this->_page->getRaw();
+ }
+
+ /**
+ * Fetches a frame into the existing frameset replacing the
+ * original.
+ * @param array $frames List of names to drill down.
+ * @param string $method GET or POST.
+ * @param string/SimpleUrl $url Target to fetch as string.
+ * @param hash $parameters POST parameters.
+ * @return string Raw content of page.
+ * @access private
+ */
+ function _loadFrame($frames, $method, $url, $parameters = false) {
+ $page = &$this->_fetch(strtoupper($method), $url, $parameters);
+ $this->_page->setFrame($frames, $page);
+ }
+
+ /**
+ * Removes expired and temporary cookies as if
+ * the browser was closed and re-opened.
+ * @param string/integer $date Time when session restarted.
+ * If omitted then all persistent
+ * cookies are kept.
+ * @access public
+ */
+ function restartSession($date = false) {
+ $this->_user_agent->restartSession($date);
+ }
+
+ /**
+ * Adds a header to every fetch.
+ * @param string $header Header line to add to every
+ * request until cleared.
+ * @access public
+ */
+ function addHeader($header) {
+ $this->_user_agent->addHeader($header);
+ }
+
+ /**
+ * Ages the cookies by the specified time.
+ * @param integer $interval Amount in seconds.
+ * @access public
+ */
+ function ageCookies($interval) {
+ $this->_user_agent->ageCookies($interval);
+ }
+
+ /**
+ * Sets an additional cookie. If a cookie has
+ * the same name and path it is replaced.
+ * @param string $name Cookie key.
+ * @param string $value Value of cookie.
+ * @param string $host Host upon which the cookie is valid.
+ * @param string $path Cookie path if not host wide.
+ * @param string $expiry Expiry date.
+ * @access public
+ */
+ function setCookie($name, $value, $host = false, $path = '/', $expiry = false) {
+ $this->_user_agent->setCookie($name, $value, $host, $path, $expiry);
+ }
+
+ /**
+ * Reads the most specific cookie value from the
+ * browser cookies.
+ * @param string $host Host to search.
+ * @param string $path Applicable path.
+ * @param string $name Name of cookie to read.
+ * @return string False if not present, else the
+ * value as a string.
+ * @access public
+ */
+ function getCookieValue($host, $path, $name) {
+ return $this->_user_agent->getCookieValue($host, $path, $name);
+ }
+
+ /**
+ * Reads the current cookies for the current URL.
+ * @param string $name Key of cookie to find.
+ * @return string Null if there is no current URL, false
+ * if the cookie is not set.
+ * @access public
+ */
+ function getCurrentCookieValue($name) {
+ return $this->_user_agent->getBaseCookieValue($name, $this->_page->getUrl());
+ }
+
+ /**
+ * Sets the maximum number of redirects before
+ * a page will be loaded anyway.
+ * @param integer $max Most hops allowed.
+ * @access public
+ */
+ function setMaximumRedirects($max) {
+ $this->_user_agent->setMaximumRedirects($max);
+ }
+
+ /**
+ * Sets the socket timeout for opening a connection.
+ * @param integer $timeout Maximum time in seconds.
+ * @access public
+ */
+ function setConnectionTimeout($timeout) {
+ $this->_user_agent->setConnectionTimeout($timeout);
+ }
+
+ /**
+ * Sets proxy to use on all requests for when
+ * testing from behind a firewall. Set URL
+ * to false to disable.
+ * @param string $proxy Proxy URL.
+ * @param string $username Proxy username for authentication.
+ * @param string $password Proxy password for authentication.
+ * @access public
+ */
+ function useProxy($proxy, $username = false, $password = false) {
+ $this->_user_agent->useProxy($proxy, $username, $password);
+ }
+
+ /**
+ * Fetches the page content with a HEAD request.
+ * Will affect cookies, but will not change the base URL.
+ * @param string/SimpleUrl $url Target to fetch as string.
+ * @param hash $parameters Additional parameters for GET request.
+ * @return boolean True if successful.
+ * @access public
+ */
+ function head($url, $parameters = false) {
+ if (! is_object($url)) {
+ $url = new SimpleUrl($url);
+ }
+ if ($this->getUrl()) {
+ $url = $url->makeAbsolute($this->getUrl());
+ }
+ $response = &$this->_user_agent->fetchResponse(
+ 'HEAD',
+ $url,
+ $parameters);
+ return ! $response->isError();
+ }
+
+ /**
+ * Fetches the page content with a simple GET request.
+ * @param string/SimpleUrl $url Target to fetch.
+ * @param hash $parameters Additional parameters for GET request.
+ * @return string Content of page or false.
+ * @access public
+ */
+ function get($url, $parameters = false) {
+ if (! is_object($url)) {
+ $url = new SimpleUrl($url);
+ }
+ if ($this->getUrl()) {
+ $url = $url->makeAbsolute($this->getUrl());
+ }
+ return $this->_load('GET', $url, $parameters);
+ }
+
+ /**
+ * Fetches the page content with a POST request.
+ * @param string/SimpleUrl $url Target to fetch as string.
+ * @param hash $parameters POST parameters.
+ * @return string Content of page.
+ * @access public
+ */
+ function post($url, $parameters = false) {
+ if (! is_object($url)) {
+ $url = new SimpleUrl($url);
+ }
+ if ($this->getUrl()) {
+ $url = $url->makeAbsolute($this->getUrl());
+ }
+ return $this->_load('POST', $url, $parameters);
+ }
+
+ /**
+ * Equivalent to hitting the retry button on the
+ * browser. Will attempt to repeat the page fetch. If
+ * there is no history to repeat it will give false.
+ * @return string/boolean Content if fetch succeeded
+ * else false.
+ * @access public
+ */
+ function retry() {
+ $frames = $this->_page->getFrameFocus();
+ if (count($frames) > 0) {
+ $this->_loadFrame(
+ $frames,
+ $this->_page->getMethod(),
+ $this->_page->getUrl(),
+ $this->_page->getRequestData());
+ return $this->_page->getRaw();
+ }
+ if ($method = $this->_history->getMethod()) {
+ $this->_page = &$this->_fetch(
+ $method,
+ $this->_history->getUrl(),
+ $this->_history->getParameters());
+ return $this->_page->getRaw();
+ }
+ return false;
+ }
+
+ /**
+ * Equivalent to hitting the back button on the
+ * browser. The browser history is unchanged on
+ * failure.
+ * @return boolean True if history entry and
+ * fetch succeeded
+ * @access public
+ */
+ function back() {
+ if (! $this->_history->back()) {
+ return false;
+ }
+ $content = $this->retry();
+ if (! $content) {
+ $this->_history->forward();
+ }
+ return $content;
+ }
+
+ /**
+ * Equivalent to hitting the forward button on the
+ * browser. The browser history is unchanged on
+ * failure.
+ * @return boolean True if history entry and
+ * fetch succeeded
+ * @access public
+ */
+ function forward() {
+ if (! $this->_history->forward()) {
+ return false;
+ }
+ $content = $this->retry();
+ if (! $content) {
+ $this->_history->back();
+ }
+ return $content;
+ }
+
+ /**
+ * Retries a request after setting the authentication
+ * for the current realm.
+ * @param string $username Username for realm.
+ * @param string $password Password for realm.
+ * @return boolean True if successful fetch. Note
+ * that authentication may still have
+ * failed.
+ * @access public
+ */
+ function authenticate($username, $password) {
+ if (! $this->_page->getRealm()) {
+ return false;
+ }
+ $url = $this->_page->getUrl();
+ if (! $url) {
+ return false;
+ }
+ $this->_user_agent->setIdentity(
+ $url->getHost(),
+ $this->_page->getRealm(),
+ $username,
+ $password);
+ return $this->retry();
+ }
+
+ /**
+ * Accessor for a breakdown of the frameset.
+ * @return array Hash tree of frames by name
+ * or index if no name.
+ * @access public
+ */
+ function getFrames() {
+ return $this->_page->getFrames();
+ }
+
+ /**
+ * Accessor for current frame focus. Will be
+ * false if no frame has focus.
+ * @return integer/string/boolean Label if any, otherwise
+ * the position in the frameset
+ * or false if none.
+ * @access public
+ */
+ function getFrameFocus() {
+ return $this->_page->getFrameFocus();
+ }
+
+ /**
+ * Sets the focus by index. The integer index starts from 1.
+ * @param integer $choice Chosen frame.
+ * @return boolean True if frame exists.
+ * @access public
+ */
+ function setFrameFocusByIndex($choice) {
+ return $this->_page->setFrameFocusByIndex($choice);
+ }
+
+ /**
+ * Sets the focus by name.
+ * @param string $name Chosen frame.
+ * @return boolean True if frame exists.
+ * @access public
+ */
+ function setFrameFocus($name) {
+ return $this->_page->setFrameFocus($name);
+ }
+
+ /**
+ * Clears the frame focus. All frames will be searched
+ * for content.
+ * @access public
+ */
+ function clearFrameFocus() {
+ return $this->_page->clearFrameFocus();
+ }
+
+ /**
+ * Accessor for last error.
+ * @return string Error from last response.
+ * @access public
+ */
+ function getTransportError() {
+ return $this->_page->getTransportError();
+ }
+
+ /**
+ * Accessor for current MIME type.
+ * @return string MIME type as string; e.g. 'text/html'
+ * @access public
+ */
+ function getMimeType() {
+ return $this->_page->getMimeType();
+ }
+
+ /**
+ * Accessor for last response code.
+ * @return integer Last HTTP response code received.
+ * @access public
+ */
+ function getResponseCode() {
+ return $this->_page->getResponseCode();
+ }
+
+ /**
+ * Accessor for last Authentication type. Only valid
+ * straight after a challenge (401).
+ * @return string Description of challenge type.
+ * @access public
+ */
+ function getAuthentication() {
+ return $this->_page->getAuthentication();
+ }
+
+ /**
+ * Accessor for last Authentication realm. Only valid
+ * straight after a challenge (401).
+ * @return string Name of security realm.
+ * @access public
+ */
+ function getRealm() {
+ return $this->_page->getRealm();
+ }
+
+ /**
+ * Accessor for current URL of page or frame if
+ * focused.
+ * @return string Location of current page or frame as
+ * a string.
+ */
+ function getUrl() {
+ $url = $this->_page->getUrl();
+ return $url ? $url->asString() : false;
+ }
+
+ /**
+ * Accessor for raw bytes sent down the wire.
+ * @return string Original text sent.
+ * @access public
+ */
+ function getRequest() {
+ return $this->_page->getRequest();
+ }
+
+ /**
+ * Accessor for raw page information.
+ * @return string Original text content of web page.
+ * @access public
+ */
+ function getContent() {
+ return $this->_page->getRaw();
+ }
+
+ /**
+ * Accessor for raw header information.
+ * @return string Header block.
+ * @access public
+ */
+ function getHeaders() {
+ return $this->_page->getHeaders();
+ }
+
+ /**
+ * Accessor for parsed title.
+ * @return string Title or false if no title is present.
+ * @access public
+ */
+ function getTitle() {
+ return $this->_page->getTitle();
+ }
+
+ /**
+ * Accessor for a list of all fixed links in current page.
+ * @return array List of urls with scheme of
+ * http or https and hostname.
+ * @access public
+ */
+ function getAbsoluteUrls() {
+ return $this->_page->getAbsoluteUrls();
+ }
+
+ /**
+ * Accessor for a list of all relative links.
+ * @return array List of urls without hostname.
+ * @access public
+ */
+ function getRelativeUrls() {
+ return $this->_page->getRelativeUrls();
+ }
+
+ /**
+ * Sets all form fields with that name.
+ * @param string $name Name of field in forms.
+ * @param string $value New value of field.
+ * @return boolean True if field exists, otherwise false.
+ * @access public
+ */
+ function setField($name, $value) {
+ return $this->_page->setField($name, $value);
+ }
+
+ /**
+ * Sets all form fields with that name.
+ * @param string/integer $id Id of field in forms.
+ * @param string $value New value of field.
+ * @return boolean True if field exists, otherwise false.
+ * @access public
+ */
+ function setFieldById($id, $value) {
+ return $this->_page->setFieldById($id, $value);
+ }
+
+ /**
+ * Accessor for a form element value within the page.
+ * Finds the first match.
+ * @param string $name Field name.
+ * @return string/boolean A string if the field is
+ * present, false if unchecked
+ * and null if missing.
+ * @access public
+ */
+ function getField($name) {
+ return $this->_page->getField($name);
+ }
+
+ /**
+ * Accessor for a form element value within the page.
+ * @param string/integer $id Id of field in forms.
+ * @return string/boolean A string if the field is
+ * present, false if unchecked
+ * and null if missing.
+ * @access public
+ */
+ function getFieldById($id) {
+ return $this->_page->getFieldById($id);
+ }
+
+ /**
+ * Clicks the submit button by label. The owning
+ * form will be submitted by this.
+ * @param string $label Button label. An unlabeled
+ * button can be triggered by 'Submit'.
+ * @return boolean True on success.
+ * @access public
+ */
+ function clickSubmit($label = 'Submit') {
+ if (! ($form = &$this->_page->getFormBySubmitLabel($label))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submitButtonByLabel($label));
+ }
+
+ /**
+ * Clicks the submit button by name attribute. The owning
+ * form will be submitted by this.
+ * @param string $name Button name.
+ * @return boolean True on success.
+ * @access public
+ */
+ function clickSubmitByName($name) {
+ if (! ($form = &$this->_page->getFormBySubmitName($name))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submitButtonByName($name));
+ }
+
+ /**
+ * Clicks the submit button by ID attribute of the button
+ * itself. The owning form will be submitted by this.
+ * @param string $id Button ID.
+ * @return boolean True on success.
+ * @access public
+ */
+ function clickSubmitById($id) {
+ if (! ($form = &$this->_page->getFormBySubmitId($id))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submitButtonById($id));
+ }
+
+ /**
+ * Clicks the submit image by some kind of label. Usually
+ * the alt tag or the nearest equivalent. The owning
+ * form will be submitted by this. Clicking outside of
+ * the boundary of the coordinates will result in
+ * a failure.
+ * @param string $label ID attribute of button.
+ * @param integer $x X-coordinate of imaginary click.
+ * @param integer $y Y-coordinate of imaginary click.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickImage($label, $x = 1, $y = 1) {
+ if (! ($form = &$this->_page->getFormByImageLabel($label))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submitImageByLabel($label, $x, $y));
+ }
+
+ /**
+ * Clicks the submit image by the name. Usually
+ * the alt tag or the nearest equivalent. The owning
+ * form will be submitted by this. Clicking outside of
+ * the boundary of the coordinates will result in
+ * a failure.
+ * @param string $name Name attribute of button.
+ * @param integer $x X-coordinate of imaginary click.
+ * @param integer $y Y-coordinate of imaginary click.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickImageByName($name, $x = 1, $y = 1) {
+ if (! ($form = &$this->_page->getFormByImageName($name))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submitImageByName($name, $x, $y));
+ }
+
+ /**
+ * Clicks the submit image by ID attribute. The owning
+ * form will be submitted by this. Clicking outside of
+ * the boundary of the coordinates will result in
+ * a failure.
+ * @param integer/string $id ID attribute of button.
+ * @param integer $x X-coordinate of imaginary click.
+ * @param integer $y Y-coordinate of imaginary click.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickImageById($id, $x = 1, $y = 1) {
+ if (! ($form = &$this->_page->getFormByImageId($id))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submitImageById($id, $x, $y));
+ }
+
+ /**
+ * Submits a form by the ID.
+ * @param string $id The form ID. No submit button value
+ * will be sent.
+ * @return boolean True on success.
+ * @access public
+ */
+ function submitFormById($id) {
+ if (! ($form = &$this->_page->getFormById($id))) {
+ return false;
+ }
+ return $this->_load(
+ $form->getMethod(),
+ $form->getAction(),
+ $form->submit());
+ }
+
+ /**
+ * Follows a link by label. Will click the first link
+ * found with this link text by default, or a later
+ * one if an index is given. The match ignores case and
+ * white space issues.
+ * @param string $label Text between the anchor tags.
+ * @param integer $index Link position counting from zero.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function clickLink($label, $index = 0) {
+ $urls = $this->_page->getUrlsByLabel($label);
+ if (count($urls) == 0) {
+ return false;
+ }
+ if (count($urls) < $index + 1) {
+ return false;
+ }
+ $this->_load('GET', $urls[$index]);
+ return true;
+ }
+
+ /**
+ * Tests to see if a link is present by label.
+ * @param string $label Text of value attribute.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function isLink($label) {
+ return (count($this->_page->getUrlsByLabel($label)) > 0);
+ }
+
+ /**
+ * Follows a link by id attribute.
+ * @param string $id ID attribute value.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function clickLinkById($id) {
+ if (! ($url = $this->_page->getUrlById($id))) {
+ return false;
+ }
+ $this->_load('GET', $url);
+ return true;
+ }
+
+ /**
+ * Tests to see if a link is present by ID attribute.
+ * @param string $id Text of id attribute.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function isLinkById($id) {
+ return (boolean)$this->_page->getUrlById($id);
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: dumper.php,v 1.20 2004/08/15 02:24:38 lastcraft Exp $
+ */
+ /**
+ * does type matter
+ */
+ define('TYPE_MATTERS', true);
+
+ /**
+ * Displays variables as text and does diffs.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleDumper {
+
+ /**
+ * Do nothing constructor.
+ */
+ function SimpleDumper() {
+ }
+
+ /**
+ * Renders a variable in a shorter form than print_r().
+ * @param mixed $value Variable to render as a string.
+ * @return string Human readable string form.
+ * @access public
+ */
+ function describeValue($value) {
+ $type = $this->getType($value);
+ switch($type) {
+ case "Null":
+ return "NULL";
+ case "Boolean":
+ return "Boolean: " . ($value ? "true" : "false");
+ case "Array":
+ return "Array: " . count($value) . " items";
+ case "Object":
+ return "Object: of " . get_class($value);
+ case "String":
+ return "String: " . $this->clipString($value, 100);
+ default:
+ return "$type: $value";
+ }
+ return "Unknown";
+ }
+
+ /**
+ * Gets the string representation of a type.
+ * @param mixed $value Variable to check against.
+ * @return string Type.
+ * @access public
+ */
+ function getType($value) {
+ if (! isset($value)) {
+ return "Null";
+ } elseif (is_bool($value)) {
+ return "Boolean";
+ } elseif (is_string($value)) {
+ return "String";
+ } elseif (is_integer($value)) {
+ return "Integer";
+ } elseif (is_float($value)) {
+ return "Float";
+ } elseif (is_array($value)) {
+ return "Array";
+ } elseif (is_resource($value)) {
+ return "Resource";
+ } elseif (is_object($value)) {
+ return "Object";
+ }
+ return "Unknown";
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between two variables. Uses a
+ * dynamic call.
+ * @param mixed $first First variable.
+ * @param mixed $second Value to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Description of difference.
+ * @access public
+ */
+ function describeDifference($first, $second, $identical = false) {
+ if ($identical) {
+ if (! $this->_isTypeMatch($first, $second)) {
+ return "with type mismatch as [" . $this->describeValue($first) .
+ "] does not match [" . $this->describeValue($second) . "]";
+ }
+ }
+ $type = $this->getType($first);
+ if ($type == "Unknown") {
+ return "with unknown type";
+ }
+ $method = '_describe' . $type . 'Difference';
+ return $this->$method($first, $second, $identical);
+ }
+
+ /**
+ * Tests to see if types match.
+ * @param mixed $first First variable.
+ * @param mixed $second Value to compare with.
+ * @return boolean True if matches.
+ * @access private
+ */
+ function _isTypeMatch($first, $second) {
+ return ($this->getType($first) == $this->getType($second));
+ }
+
+ /**
+ * Clips a string to a maximum length.
+ * @param string $value String to truncate.
+ * @param integer $size Minimum string size to show.
+ * @param integer $position Centre of string section.
+ * @return string Shortened version.
+ * @access public
+ */
+ function clipString($value, $size, $position = 0) {
+ $length = strlen($value);
+ if ($length <= $size) {
+ return $value;
+ }
+ $position = min($position, $length);
+ $start = ($size/2 > $position ? 0 : $position - $size/2);
+ if ($start + $size > $length) {
+ $start = $length - $size;
+ }
+ $value = substr($value, $start, $size);
+ return ($start > 0 ? "..." : "") . $value . ($start + $size < $length ? "..." : "");
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between two variables. The minimal
+ * version.
+ * @param null $first First value.
+ * @param mixed $second Value to compare with.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeGenericDifference($first, $second) {
+ return "as [" . $this->describeValue($first) .
+ "] does not match [" .
+ $this->describeValue($second) . "]";
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between a null and another variable.
+ * @param null $first First null.
+ * @param mixed $second Null to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeNullDifference($first, $second, $identical) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between a boolean and another variable.
+ * @param boolean $first First boolean.
+ * @param mixed $second Boolean to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeBooleanDifference($first, $second, $identical) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between a string and another variable.
+ * @param string $first First string.
+ * @param mixed $second String to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeStringDifference($first, $second, $identical) {
+ if (is_object($second) || is_array($second)) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+ $position = $this->_stringDiffersAt($first, $second);
+ $message = "at character $position";
+ $message .= " with [" .
+ $this->clipString($first, 100, $position) . "] and [" .
+ $this->clipString($second, 100, $position) . "]";
+ return $message;
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between an integer and another variable.
+ * @param integer $first First number.
+ * @param mixed $second Number to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeIntegerDifference($first, $second, $identical) {
+ if (is_object($second) || is_array($second)) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+ return "because [" . $this->describeValue($first) .
+ "] differs from [" .
+ $this->describeValue($second) . "] by " .
+ abs($first - $second);
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between two floating point numbers.
+ * @param float $first First float.
+ * @param mixed $second Float to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeFloatDifference($first, $second, $identical) {
+ if (is_object($second) || is_array($second)) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+ return "because " . $this->describeValue($first) .
+ "] differs from [" .
+ $this->describeValue($second) . "]";
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between two arrays.
+ * @param array $first First array.
+ * @param mixed $second Array to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeArrayDifference($first, $second, $identical) {
+ if (! is_array($second)) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+ if (array_keys($first) !== array_keys($second)) {
+ return "as key list [" .
+ implode(", ", array_keys($first)) . "] does not match key list [" .
+ implode(", ", array_keys($second)) . "]";
+ }
+ foreach (array_keys($first) as $key) {
+ if ($identical && ($first[$key] === $second[$key])) {
+ continue;
+ }
+ if (! $identical && ($first[$key] == $second[$key])) {
+ continue;
+ }
+ return "with member [$key] " . $this->describeDifference(
+ $first[$key],
+ $second[$key],
+ $identical);
+ }
+ return "";
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between a resource and another variable.
+ * @param resource $first First resource.
+ * @param mixed $second Resource to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeResourceDifference($first, $second, $identical) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+
+ /**
+ * Creates a human readable description of the
+ * difference between two objects.
+ * @param object $first First object.
+ * @param mixed $second Object to compare with.
+ * @param boolean $identical If true then type anomolies count.
+ * @return string Human readable description.
+ * @access private
+ */
+ function _describeObjectDifference($first, $second, $identical) {
+ if (! is_object($second)) {
+ return $this->_describeGenericDifference($first, $second);
+ }
+ return $this->_describeArrayDifference(
+ get_object_vars($first),
+ get_object_vars($second),
+ $identical);
+ }
+
+ /**
+ * Find the first character position that differs
+ * in two strings by binary chop.
+ * @param string $first First string.
+ * @param string $second String to compare with.
+ * @return integer Position of first differing
+ * character.
+ * @access private
+ */
+ function _stringDiffersAt($first, $second) {
+ if (! $first || ! $second) {
+ return 0;
+ }
+ if (strlen($first) < strlen($second)) {
+ list($first, $second) = array($second, $first);
+ }
+ $position = 0;
+ $step = strlen($first);
+ while ($step > 1) {
+ $step = (integer)(($step + 1)/2);
+ if (strncmp($first, $second, $position + $step) == 0) {
+ $position += $step;
+ }
+ }
+ return $position;
+ }
+
+ /**
+ * Sends a formatted dump of a variable to a string.
+ * @param mixed $variable Variable to display.
+ * @return string Output from print_r().
+ * @access public
+ * @static
+ */
+ function dump($variable) {
+ ob_start();
+ print_r($variable);
+ $formatted = ob_get_contents();
+ ob_end_clean();
+ return $formatted;
+ }
+
+ /**
+ * Extracts the last assertion that was not within
+ * Simpletest itself. The name must start with "assert".
+ * @param array $stack List of stack frames.
+ * @param string $format String formatting.
+ * @param string $prefix Prefix of method to search for.
+ * @access public
+ * @static
+ */
+ function getFormattedAssertionLine($stack, $format = '%d', $prefix = 'assert') {
+ foreach ($stack as $frame) {
+ if (substr(@dirname($frame['file']), -10) == 'simpletest') {
+ continue;
+ }
+ if (strncmp($frame['function'], $prefix, strlen($prefix)) == 0) {
+ return sprintf($format, $frame['line']);
+ }
+ }
+ return '';
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: errors.php,v 1.12 2004/08/08 13:16:00 lastcraft Exp $
+ */
+ /** @ignore - PHP5 compatibility fix. */
+ if (! defined('E_STRICT')) {
+ define('E_STRICT', 2048);
+ }
+
+ /**
+ * Singleton error queue used to record trapped
+ * errors.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleErrorQueue {
+ var $_queue;
+
+ /**
+ * Starts with an empty queue.
+ * @access public
+ */
+ function SimpleErrorQueue() {
+ $this->clear();
+ }
+
+ /**
+ * Adds an error to the front of the queue.
+ * @param $severity PHP error code.
+ * @param $message Text of error.
+ * @param $filename File error occoured in.
+ * @param $line Line number of error.
+ * @param $super_globals Hash of PHP super global arrays.
+ * @access public
+ */
+ function add($severity, $message, $filename, $line, $super_globals) {
+ array_push(
+ $this->_queue,
+ array($severity, $message, $filename, $line, $super_globals));
+ }
+
+ /**
+ * Pulls the earliest error from the queue.
+ * @return False if none, or a list of error
+ * information. Elements are: severity
+ * as the PHP error code, the error message,
+ * the file with the error, the line number
+ * and a list of PHP super global arrays.
+ * @access public
+ */
+ function extract() {
+ if (count($this->_queue)) {
+ return array_shift($this->_queue);
+ }
+ return false;
+ }
+
+ /**
+ * Discards the contents of the error queue.
+ * @access public
+ */
+ function clear() {
+ $this->_queue = array();
+ }
+
+ /**
+ * Tests to see if the queue is empty.
+ * @return True if empty.
+ */
+ function isEmpty() {
+ return (count($this->_queue) == 0);
+ }
+
+ /**
+ * Global access to a single error queue.
+ * @return Global error queue object.
+ * @access public
+ * @static
+ */
+ function &instance() {
+ static $queue = false;
+ if (! $queue) {
+ $queue = new SimpleErrorQueue();
+ }
+ return $queue;
+ }
+
+ /**
+ * Converst an error code into it's string
+ * representation.
+ * @param $severity PHP integer error code.
+ * @return String version of error code.
+ * @access public
+ * @static
+ */
+ function getSeverityAsString($severity) {
+ static $map = array(
+ E_STRICT => 'E_STRICT',
+ E_ERROR => 'E_ERROR',
+ E_WARNING => 'E_WARNING',
+ E_PARSE => 'E_PARSE',
+ E_NOTICE => 'E_NOTICE',
+ E_CORE_ERROR => 'E_CORE_ERROR',
+ E_CORE_WARNING => 'E_CORE_WARNING',
+ E_COMPILE_ERROR => 'E_COMPILE_ERROR',
+ E_COMPILE_WARNING => 'E_COMPILE_WARNING',
+ E_USER_ERROR => 'E_USER_ERROR',
+ E_USER_WARNING => 'E_USER_WARNING',
+ E_USER_NOTICE => 'E_USER_NOTICE');
+ return $map[$severity];
+ }
+ }
+
+ /**
+ * Error handler that simply stashes any errors into the global
+ * error queue. Simulates the existing behaviour with respect to
+ * logging errors, but this feature may be removed in future.
+ * @param $severity PHP error code.
+ * @param $message Text of error.
+ * @param $filename File error occoured in.
+ * @param $line Line number of error.
+ * @param $super_globals Hash of PHP super global arrays.
+ * @static
+ * @access public
+ */
+ function simpleTestErrorHandler($severity, $message, $filename, $line, $super_globals) {
+ restore_error_handler();
+ if (ini_get('log_errors')) {
+ $label = SimpleErrorQueue::getSeverityAsString($severity);
+ error_log("$label: $message in $filename on line $line");
+ }
+ if ($severity = $severity & error_reporting()) {
+ $queue = &SimpleErrorQueue::instance();
+ $queue->add($severity, $message, $filename, $line, $super_globals);
+ }
+ set_error_handler('simpleTestErrorHandler');
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: expectation.php,v 1.31 2004/08/10 00:05:26 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/dumper.php');
+ require_once(dirname(__FILE__) . '/options.php');
+ /**#@-*/
+
+ /**
+ * Assertion that can display failure information.
+ * Also includes various helper methods.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @abstract
+ */
+ class SimpleExpectation {
+ var $_dumper;
+ var $_message;
+
+ /**
+ * Creates a dumper for displaying values and sets
+ * the test message.
+ * @param string $message Customised message on failure.
+ */
+ function SimpleExpectation($message = '%s') {
+ $this->_dumper = &new SimpleDumper();
+ $this->_message = $message;
+ }
+
+ /**
+ * Tests the expectation. True if correct.
+ * @param mixed $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ * @abstract
+ */
+ function test($compare) {
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ * @abstract
+ */
+ function testMessage($compare) {
+ }
+
+ /**
+ * Overlays the generated message onto the stored user
+ * message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function overlayMessage($compare) {
+ return sprintf($this->_message, $this->testMessage($compare));
+ }
+
+ /**
+ * Accessor for the dumper.
+ * @return SimpleDumper Current value dumper.
+ * @access protected
+ */
+ function &_getDumper() {
+ return $this->_dumper;
+ }
+ }
+
+ /**
+ * Test for equality.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class EqualExpectation extends SimpleExpectation {
+ var $_value;
+
+ /**
+ * Sets the value to compare against.
+ * @param mixed $value Test value to match.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function EqualExpectation($value, $message = '%s') {
+ $this->SimpleExpectation($message);
+ $this->_value = $value;
+ }
+
+ /**
+ * Tests the expectation. True if it matches the
+ * held value.
+ * @param mixed $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return (($this->_value == $compare) && ($compare == $this->_value));
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ if ($this->test($compare)) {
+ return "Equal expectation [" . $this->_dumper->describeValue($this->_value) . "]";
+ } else {
+ return "Equal expectation fails " .
+ $this->_dumper->describeDifference($this->_value, $compare);
+ }
+ }
+
+ /**
+ * Accessor for comparison value.
+ * @return mixed Held value to compare with.
+ * @access protected
+ */
+ function _getValue() {
+ return $this->_value;
+ }
+ }
+
+ /**
+ * Test for inequality.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NotEqualExpectation extends EqualExpectation {
+
+ /**
+ * Sets the value to compare against.
+ * @param mixed $value Test value to match.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function NotEqualExpectation($value, $message = '%s') {
+ $this->EqualExpectation($value, $message);
+ }
+
+ /**
+ * Tests the expectation. True if it differs from the
+ * held value.
+ * @param mixed $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return ! parent::test($compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ if ($this->test($compare)) {
+ return "Not equal expectation passes " .
+ $dumper->describeDifference($this->_getValue(), $compare);
+ } else {
+ return "Not equal expectation fails [" .
+ $dumper->describeValue($this->_getValue()) .
+ "] matches";
+ }
+ }
+ }
+
+ /**
+ * Test for identity.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class IdenticalExpectation extends EqualExpectation {
+
+ /**
+ * Sets the value to compare against.
+ * @param mixed $value Test value to match.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function IdenticalExpectation($value, $message = '%s') {
+ $this->EqualExpectation($value, $message);
+ }
+
+ /**
+ * Tests the expectation. True if it exactly
+ * matches the held value.
+ * @param mixed $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return SimpleTestCompatibility::isIdentical($this->_getValue(), $compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ if ($this->test($compare)) {
+ return "Identical expectation [" . $dumper->describeValue($this->_getValue()) . "]";
+ } else {
+ return "Identical expectation [" . $dumper->describeValue($this->_getValue()) .
+ "] fails with [" .
+ $this->_dumper->describeValue($compare) . "] " .
+ $this->_dumper->describeDifference(
+ $this->_getValue(),
+ $compare,
+ TYPE_MATTERS);
+ }
+ }
+ }
+
+ /**
+ * Test for non-identity.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NotIdenticalExpectation extends IdenticalExpectation {
+
+ /**
+ * Sets the value to compare against.
+ * @param mixed $value Test value to match.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function NotIdenticalExpectation($value, $message = '%s') {
+ $this->IdenticalExpectation($value, $message);
+ }
+
+ /**
+ * Tests the expectation. True if it differs from the
+ * held value.
+ * @param mixed $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return ! parent::test($compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ if ($this->test($compare)) {
+ return "Not identical expectation passes " .
+ $dumper->describeDifference($this->_getValue(), $compare, TYPE_MATTERS);
+ } else {
+ return "Not identical expectation [" . $dumper->describeValue($this->_getValue()) . "] matches";
+ }
+ }
+ }
+
+ /**
+ * Test for a pattern using Perl regex rules.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class WantedPatternExpectation extends SimpleExpectation {
+ var $_pattern;
+
+ /**
+ * Sets the value to compare against.
+ * @param string $pattern Pattern to search for.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function WantedPatternExpectation($pattern, $message = '%s') {
+ $this->SimpleExpectation($message);
+ $this->_pattern = $pattern;
+ }
+
+ /**
+ * Accessor for the pattern.
+ * @return string Perl regex as string.
+ * @access protected
+ */
+ function _getPattern() {
+ return $this->_pattern;
+ }
+
+ /**
+ * Tests the expectation. True if the Perl regex
+ * matches the comparison value.
+ * @param string $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return (boolean)preg_match($this->_getPattern(), $compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ if ($this->test($compare)) {
+ return $this->_decribePatternMatch($this->_getPattern(), $compare);
+ } else {
+ $dumper = &$this->_getDumper();
+ return "Pattern [" . $this->_getPattern() .
+ "] not detected in [" .
+ $dumper->describeValue($compare) . "]";
+ }
+ }
+
+ /**
+ * Describes a pattern match including the string
+ * found and it's position.
+ * @param string $pattern Regex to match against.
+ * @param string $subject Subject to search.
+ * @access protected
+ */
+ function _decribePatternMatch($pattern, $subject) {
+ preg_match($pattern, $subject, $matches);
+ $position = strpos($subject, $matches[0]);
+ $dumper = &$this->_getDumper();
+ return "Pattern [$pattern] detected at [$position] in [" .
+ $dumper->describeValue($subject) . "] as [" .
+ $matches[0] . "] in region [" .
+ $dumper->clipString($subject, 40, $position) . "]";
+ }
+ }
+
+ /**
+ * Fail if a pattern is detected within the
+ * comparison.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class UnwantedPatternExpectation extends WantedPatternExpectation {
+
+ /**
+ * Sets the reject pattern
+ * @param string $pattern Pattern to search for.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function UnwantedPatternExpectation($pattern, $message = '%s') {
+ $this->WantedPatternExpectation($pattern, $message);
+ }
+
+ /**
+ * Tests the expectation. False if the Perl regex
+ * matches the comparison value.
+ * @param string $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return ! parent::test($compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param string $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ if ($this->test($compare)) {
+ $dumper = &$this->_getDumper();
+ return "Pattern [" . $this->_getPattern() .
+ "] not detected in [" .
+ $dumper->describeValue($compare) . "]";
+ } else {
+ return $this->_decribePatternMatch($this->_getPattern(), $compare);
+ }
+ }
+ }
+
+ /**
+ * Tests either type or class name if it's an object.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class IsAExpectation extends SimpleExpectation {
+ var $_type;
+
+ /**
+ * Sets the type to compare with.
+ * @param string $type Type or class name.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function IsAExpectation($type, $message = '%s') {
+ $this->SimpleExpectation($message);
+ $this->_type = $type;
+ }
+
+ /**
+ * Accessor for type to check against.
+ * @return string Type or class name.
+ * @access protected
+ */
+ function getType() {
+ return $this->_type;
+ }
+
+ /**
+ * Tests the expectation. True if the type or
+ * class matches the string value.
+ * @param string $compare Comparison value.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ if (is_object($compare)) {
+ return SimpleTestCompatibility::isA($compare, $this->_type);
+ } else {
+ return (strtolower(gettype($compare)) == $this->_canonicalType($this->_type));
+ }
+ }
+
+ /**
+ * Coerces type name into a gettype() match.
+ * @param string $type User type.
+ * @return string Simpler type.
+ * @access private
+ */
+ function _canonicalType($type) {
+ $type = strtolower($type);
+ $map = array(
+ 'bool' => 'boolean',
+ 'float' => 'double',
+ 'real' => 'double',
+ 'int' => 'integer');
+ if (isset($map[$type])) {
+ $type = $map[$type];
+ }
+ return $type;
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ return "Value [" . $dumper->describeValue($compare) .
+ "] should be type [" . $this->_type . "]";
+ }
+ }
+
+ /**
+ * Tests either type or class name if it's an object.
+ * Will succeed if the type does not match.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NotAExpectation extends IsAExpectation {
+ var $_type;
+
+ /**
+ * Sets the type to compare with.
+ * @param string $type Type or class name.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function NotAExpectation($type, $message = '%s') {
+ $this->IsAExpectation($type, $message);
+ }
+
+ /**
+ * Tests the expectation. False if the type or
+ * class matches the string value.
+ * @param string $compare Comparison value.
+ * @return boolean True if different.
+ * @access public
+ */
+ function test($compare) {
+ return ! parent::test($compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ return "Value [" . $dumper->describeValue($compare) .
+ "] should not be type [" . $this->_getType() . "]";
+ }
+ }
+
+ /**
+ * Tests for existance of a method in an object
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class MethodExistsExpectation extends SimpleExpectation {
+ var $_method;
+
+ /**
+ * Sets the value to compare against.
+ * @param string $method Method to check.
+ * @param string $message Customised message on failure.
+ * @access public
+ * @return void
+ */
+ function MethodExistsExpectation($method, $message = '%s') {
+ $this->SimpleExpectation($message);
+ $this->_method = &$method;
+ }
+
+ /**
+ * Tests the expectation. True if the method exists in the test object.
+ * @param string $compare Comparison method name.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ return (boolean)(is_object($compare) && method_exists($compare, $this->_method));
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ if (! is_object($compare)) {
+ return 'No method on non-object [' . $dumper->describeValue($compare) . ']';
+ }
+ $method = $this->_method;
+ return "Object [" . $dumper->describeValue($compare) .
+ "] should contain method [$method]";
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * adapter for SimpleTest to use PEAR PHPUnit test cases
+ * @package SimpleTest
+ * @subpackage Extensions
+ * @version $Id: pear_test_case.php,v 1.3 2004/04/23 03:11:56 jsweat Exp $
+ */
+
+ /**#@+
+ * include SimpleTest files
+ */
+ require_once dirname(__FILE__).DIRECTORY_SEPARATOR
+ .'..'.DIRECTORY_SEPARATOR .'unit_tester.php';
+ require_once dirname(__FILE__).DIRECTORY_SEPARATOR
+ .'..'.DIRECTORY_SEPARATOR .'expectation.php';
+ /**#@-*/
+
+ /**
+ * Adapter for PEAR PHPUnit test case to allow
+ * legacy PEAR test cases to be used with SimpleTest.
+ * @package SimpleTest
+ * @subpackage Extensions
+ */
+ class PHPUnit_TestCase extends SimpleTestCase {
+ var $_loosely_typed;
+
+ /**
+ * Constructor. Sets the test name.
+ * @param $label Test name to display.
+ * @public
+ */
+ function PHPUnit_TestCase($label = false) {
+ $this->SimpleTestCase($label);
+ $this->_loosely_typed = false;
+ }
+
+ /**
+ * Will test straight equality if set to loose
+ * typing, or identity if not.
+ * @param $first First value.
+ * @param $second Comparison value.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertEquals($first, $second, $message = "%s", $delta = 0) {
+ if ($this->_loosely_typed) {
+ $expectation = &new EqualExpectation($first);
+ } else {
+ $expectation = &new IdenticalExpectation($first);
+ }
+ $this->assertExpectation($expectation, $second, $message);
+ }
+
+ /**
+ * Passes if the value tested is not null.
+ * @param $value Value to test against.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertNotNull($value, $message = "%s") {
+ parent::assertTrue(isset($value), $message);
+ }
+
+ /**
+ * Passes if the value tested is null.
+ * @param $value Value to test against.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertNull($value, $message = "%s") {
+ parent::assertTrue(!isset($value), $message);
+ }
+
+ /**
+ * In PHP5 the identity test tests for the same
+ * object. THis is a reference test in PHP4.
+ * @param $first First object handle.
+ * @param $second Hopefully the same handle.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertSame($first, $second, $message = "%s") {
+ $this->assertExpectation(new IdenticalExpectation($first), $second, $message);
+ }
+
+ /**
+ * In PHP5 the identity test tests for the same
+ * object. THis is a reference test in PHP4.
+ * @param $first First object handle.
+ * @param $second Hopefully a different handle.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertNotSame($first, $second, $message = "%s") {
+ $this->assertExpectation(new NotIdenticalExpectation($first), $second, $message);
+ }
+
+ /**
+ * Sends pass if the test condition resolves true,
+ * a fail otherwise.
+ * @param $condition Condition to test true.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertTrue($condition, $message = "%s") {
+ parent::assertTrue($condition, $message);
+ }
+
+ /**
+ * Sends pass if the test condition resolves false,
+ * a fail otherwise.
+ * @param $condition Condition to test false.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertFalse($condition, $message = "%s") {
+ parent::assertTrue(!$condition, $message);
+ }
+
+ /**
+ * Tests a regex match. Needs refactoring.
+ * @param $pattern Regex to match.
+ * @param $subject String to search in.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertRegExp($pattern, $subject, $message = "%s") {
+ $this->assertExpectation(
+ new WantedPatternExpectation($pattern),
+ $subject,
+ $message);
+ }
+
+ /**
+ * Tests the type of a value.
+ * @param $value Value to take type of.
+ * @param $type Hoped for type.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertType($value, $type, $message = "%s") {
+ parent::assertTrue(gettype($value) == strtolower($type), $message);
+ }
+
+ /**
+ * Sets equality operation to act as a simple equal
+ * comparison only, allowing a broader range of
+ * matches.
+ * @param $loosely_typed True for broader comparison.
+ * @public
+ */
+ function setLooselyTyped($loosely_typed) {
+ $this->_loosely_typed = $loosely_typed;
+ }
+
+ /**
+ * For progress indication during
+ * a test amongst other things.
+ * @return Usually one.
+ * @public
+ */
+ function countTestCases() {
+ return $this->getSize();
+ }
+
+ /**
+ * Accessor for name, normally just the class
+ * name.
+ * @public
+ */
+ function getName() {
+ return $this->getLabel();
+ }
+
+ /**
+ * Does nothing. For compatibility only.
+ * @param $name Dummy
+ * @public
+ */
+ function setName($name) {
+ }
+ }
+?>
--- /dev/null
+<?php
+ /**
+ * adapter for SimpleTest to use PHPUnit test cases
+ * @package SimpleTest
+ * @subpackage Extensions
+ * @version $Id: phpunit_test_case.php,v 1.3 2004/04/23 03:11:56 jsweat Exp $
+ */
+
+ /**#@+
+ * include SimpleTest files
+ */
+ require_once dirname(__FILE__).DIRECTORY_SEPARATOR
+ .'..'.DIRECTORY_SEPARATOR . 'unit_tester.php';
+ require_once dirname(__FILE__).DIRECTORY_SEPARATOR
+ .'..'.DIRECTORY_SEPARATOR . 'expectation.php';
+ /**#@-*/
+
+ /**
+ * Adapter for sourceforge PHPUnit test case to allow
+ * legacy test cases to be used with SimpleTest.
+ * @package SimpleTest
+ * @subpackage Extensions
+ */
+ class TestCase extends SimpleTestCase {
+
+ /**
+ * Constructor. Sets the test name.
+ * @param $label Test name to display.
+ * @public
+ */
+ function TestCase($label) {
+ $this->SimpleTestCase($label);
+ }
+
+ /**
+ * Sends pass if the test condition resolves true,
+ * a fail otherwise.
+ * @param $condition Condition to test true.
+ * @param $message Message to display.
+ * @public
+ */
+ function assert($condition, $message = false) {
+ parent::assertTrue($condition, $message);
+ }
+
+ /**
+ * Will test straight equality if set to loose
+ * typing, or identity if not.
+ * @param $first First value.
+ * @param $second Comparison value.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertEquals($first, $second, $message = false) {
+ $this->assertExpectation(
+ new EqualExpectation($first),
+ $second,
+ $message);
+ }
+
+ /**
+ * Will test straight equality if set to loose
+ * typing, or identity if not.
+ * @param $first First value.
+ * @param $second Comparison value.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertEqualsMultilineStrings($first, $second, $message = false) {
+ $this->assertExpectation(
+ new EqualExpectation($first),
+ $second,
+ $message);
+ }
+
+ /**
+ * Tests a regex match.
+ * @param $pattern Regex to match.
+ * @param $subject String to search in.
+ * @param $message Message to display.
+ * @public
+ */
+ function assertRegexp($pattern, $subject, $message = false) {
+ $this->assertExpectation(
+ new WantedPatternExpectation($pattern),
+ $subject,
+ $message);
+ }
+
+ /**
+ * Sends an error which we interpret as a fail
+ * with a different message for compatibility.
+ * @param $message Message to display.
+ * @public
+ */
+ function error($message) {
+ parent::assertTrue(false, "Error triggered [$message]");
+ }
+
+ /**
+ * Accessor for name.
+ * @public
+ */
+ function name() {
+ return $this->getLabel();
+ }
+ }
+?>
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest.
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: form.php,v 1.4 2004/08/19 00:05:52 lastcraft Exp $
+ */
+
+ /**#@+
+ * include SimpleTest files
+ */
+ require_once(dirname(__FILE__) . '/tag.php');
+ /**#@-*/
+
+ /**
+ * Form tag class to hold widget values.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleForm {
+ var $_method;
+ var $_action;
+ var $_default_target;
+ var $_id;
+ var $_buttons;
+ var $_images;
+ var $_widgets;
+
+ /**
+ * Starts with no held controls/widgets.
+ * @param SimpleTag $tag Form tag to read.
+ * @param SimpleUrl $url Location of holding page.
+ */
+ function SimpleForm($tag, $url) {
+ $this->_method = $tag->getAttribute('method');
+ $this->_action = $this->_createAction($tag->getAttribute('action'), $url);
+ $this->_default_target = false;
+ $this->_id = $tag->getAttribute('id');
+ $this->_buttons = array();
+ $this->_images = array();
+ $this->_widgets = array();
+ }
+
+ /**
+ * Sets the frame target within a frameset.
+ * @param string $frame Name of frame.
+ * @access public
+ */
+ function setDefaultTarget($frame) {
+ $this->_default_target = $frame;
+ }
+
+ /**
+ * Accessor for form action.
+ * @return string Either get or post.
+ * @access public
+ */
+ function getMethod() {
+ return ($this->_method ? strtolower($this->_method) : 'get');
+ }
+
+ /**
+ * Combined action attribute with current location
+ * to get an absolute form target.
+ * @param string $action Action attribute from form tag.
+ * @param SimpleUrl $base Page location.
+ * @return SimpleUrl Absolute form target.
+ */
+ function _createAction($action, $base) {
+ if ($action === false) {
+ return $base;
+ }
+ if ($action === true) {
+ $url = new SimpleUrl('');
+ } else {
+ $url = new SimpleUrl($action);
+ }
+ return $url->makeAbsolute($base);
+ }
+
+ /**
+ * Absolute URL of the target.
+ * @return SimpleUrl URL target.
+ * @access public
+ */
+ function getAction() {
+ $url = $this->_action;
+ if ($this->_default_target && ! $url->getTarget()) {
+ $url->setTarget($this->_default_target);
+ }
+ return $url;
+ }
+
+ /**
+ * ID field of form for unique identification.
+ * @return string Unique tag ID.
+ * @access public
+ */
+ function getId() {
+ return $this->_id;
+ }
+
+ /**
+ * Adds a tag contents to the form.
+ * @param SimpleWidget $tag Input tag to add.
+ * @access public
+ */
+ function addWidget($tag) {
+ if (strtolower($tag->getAttribute('type')) == 'submit') {
+ $this->_buttons[] = &$tag;
+ } elseif (strtolower($tag->getAttribute('type')) == 'image') {
+ $this->_images[] = &$tag;
+ } else {
+ if ($tag->getName()) {
+ $this->_setWidget($tag);
+ }
+ }
+ }
+
+ /**
+ * Sets the widget into the form, grouping radio
+ * buttons if any.
+ * @param SimpleWidget $tag Incoming form control.
+ * @access private
+ */
+ function _setWidget($tag) {
+ if (strtolower($tag->getAttribute('type')) == 'radio') {
+ $this->_addRadioButton($tag);
+ } elseif (strtolower($tag->getAttribute('type')) == 'checkbox') {
+ $this->_addCheckbox($tag);
+ } else {
+ $this->_widgets[$tag->getName()] = &$tag;
+ }
+ }
+
+ /**
+ * Adds a radio button, building a group if necessary.
+ * @param SimpleRadioButtonTag $tag Incoming form control.
+ * @access private
+ */
+ function _addRadioButton($tag) {
+ if (! isset($this->_widgets[$tag->getName()])) {
+ $this->_widgets[$tag->getName()] = &new SimpleRadioGroup();
+ }
+ $this->_widgets[$tag->getName()]->addWidget($tag);
+ }
+
+ /**
+ * Adds a checkbox, making it a group on a repeated name.
+ * @param SimpleCheckboxTag $tag Incoming form control.
+ * @access private
+ */
+ function _addCheckbox($tag) {
+ if (! isset($this->_widgets[$tag->getName()])) {
+ $this->_widgets[$tag->getName()] = &$tag;
+ } elseif (! SimpleTestCompatibility::isA($this->_widgets[$tag->getName()], 'SimpleCheckboxGroup')) {
+ $previous = &$this->_widgets[$tag->getName()];
+ $this->_widgets[$tag->getName()] = &new SimpleCheckboxGroup();
+ $this->_widgets[$tag->getName()]->addWidget($previous);
+ $this->_widgets[$tag->getName()]->addWidget($tag);
+ } else {
+ $this->_widgets[$tag->getName()]->addWidget($tag);
+ }
+ }
+
+ /**
+ * Extracts current value from form.
+ * @param string $name Keyed by widget name.
+ * @return string Value as string or null
+ * if not set.
+ * @access public
+ */
+ function getValue($name) {
+ if (isset($this->_widgets[$name])) {
+ return $this->_widgets[$name]->getValue();
+ }
+ foreach ($this->_buttons as $button) {
+ if ($button->getName() == $name) {
+ return $button->getValue();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Extracts current value from form by the ID.
+ * @param string/integer $id Keyed by widget ID attribute.
+ * @return string Value as string or null
+ * if not set.
+ * @access public
+ */
+ function getValueById($id) {
+ foreach ($this->_widgets as $widget) {
+ if ($widget->getAttribute('id') == $id) {
+ return $widget->getValue();
+ }
+ }
+ foreach ($this->_buttons as $button) {
+ if ($button->getAttribute('id') == $id) {
+ return $button->getValue();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets a widget value within the form.
+ * @param string $name Name of widget tag.
+ * @param string $value Value to input into the widget.
+ * @return boolean True if value is legal, false
+ * otherwise. If the field is not
+ * present, nothing will be set.
+ * @access public
+ */
+ function setField($name, $value) {
+ if (isset($this->_widgets[$name])) {
+ return $this->_widgets[$name]->setValue($value);
+ }
+ return false;
+ }
+
+ /**
+ * Sets a widget value within the form by using the ID.
+ * @param string/integer $id Name of widget tag.
+ * @param string $value Value to input into the widget.
+ * @return boolean True if value is legal, false
+ * otherwise. If the field is not
+ * present, nothing will be set.
+ * @access public
+ */
+ function setFieldById($id, $value) {
+ foreach (array_keys($this->_widgets) as $name) {
+ if ($this->_widgets[$name]->getAttribute('id') == $id) {
+ return $this->setField($name, $value);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Reads the current form values as a hash
+ * of submitted parameters. Repeated parameters
+ * appear as a list.
+ * @return hash Submitted values.
+ * @access public
+ */
+ function getValues() {
+ $values = array();
+ foreach (array_keys($this->_widgets) as $name) {
+ $new = $this->_widgets[$name]->getValue();
+ if (is_string($new)) {
+ $values[$name] = $new;
+ } elseif (is_array($new)) {
+ $values[$name] = $new;
+ }
+ }
+ return $values;
+ }
+
+ /**
+ * Test to see if a form has a submit button with this
+ * name attribute.
+ * @param string $name Name to look for.
+ * @return boolean True if present.
+ * @access public
+ */
+ function hasSubmitName($name) {
+ foreach ($this->_buttons as $button) {
+ if ($button->getName() == $name) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test to see if a form has a submit button with this
+ * value attribute.
+ * @param string $label Button label to search for.
+ * @return boolean True if present.
+ * @access public
+ */
+ function hasSubmitLabel($label) {
+ foreach ($this->_buttons as $button) {
+ if ($button->getLabel() == $label) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test to see if a form has a submit button with this
+ * ID attribute.
+ * @param string $id Button ID attribute to search for.
+ * @return boolean True if present.
+ * @access public
+ */
+ function hasSubmitId($id) {
+ foreach ($this->_buttons as $button) {
+ if ($button->getAttribute('id') == $id) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test to see if a form has a submit button with this
+ * name attribute.
+ * @param string $label Button alt attribute to search for
+ * or nearest equivalent.
+ * @return boolean True if present.
+ * @access public
+ */
+ function hasImageLabel($label) {
+ foreach ($this->_images as $image) {
+ if ($image->getLabel() == $label) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test to see if a form has a submittable image with this
+ * field name.
+ * @param string $name Image name to search for.
+ * @return boolean True if present.
+ * @access public
+ */
+ function hasImageName($name) {
+ foreach ($this->_images as $image) {
+ if ($image->getName() == $name) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Test to see if a form has a submittable image with this
+ * ID attribute.
+ * @param string $id Button ID attribute to search for.
+ * @return boolean True if present.
+ * @access public
+ */
+ function hasImageId($id) {
+ foreach ($this->_images as $image) {
+ if ($image->getAttribute('id') == $id) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the submit values for a named button.
+ * @param string $name Button label to search for.
+ * @return hash Submitted values or false
+ * if there is no such button in the
+ * form.
+ * @access public
+ */
+ function submitButtonByName($name) {
+ foreach ($this->_buttons as $button) {
+ if ($button->getName() == $name) {
+ return array_merge(
+ $button->getSubmitValues(),
+ $this->getValues());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the submit values for a named button.
+ * @param string $label Button label to search for.
+ * @return hash Submitted values or false
+ * if there is no such button in the
+ * form.
+ * @access public
+ */
+ function submitButtonByLabel($label) {
+ foreach ($this->_buttons as $button) {
+ if ($button->getLabel() == $label) {
+ return array_merge(
+ $button->getSubmitValues(),
+ $this->getValues());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the submit values for a button identified by the ID.
+ * @param string $id Button ID attribute to search for.
+ * @return hash Submitted values or false
+ * if there is no such button in the
+ * form.
+ * @access public
+ */
+ function submitButtonById($id) {
+ foreach ($this->_buttons as $button) {
+ if ($button->getAttribute('id') == $id) {
+ return array_merge(
+ $button->getSubmitValues(),
+ $this->getValues());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the submit values for an image identified by the alt
+ * tag or nearest equivalent.
+ * @param string $label Button label to search for.
+ * @param integer $x X-coordinate of click.
+ * @param integer $y Y-coordinate of click.
+ * @return hash Submitted values or false
+ * if there is no such button in the
+ * form.
+ * @access public
+ */
+ function submitImageByLabel($label, $x, $y) {
+ foreach ($this->_images as $image) {
+ if ($image->getAttribute('alt') == $label) {
+ return array_merge(
+ $image->getSubmitValues($x, $y),
+ $this->getValues());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the submit values for an image identified by the ID.
+ * @param string $name Image name to search for.
+ * @param integer $x X-coordinate of click.
+ * @param integer $y Y-coordinate of click.
+ * @return hash Submitted values or false
+ * if there is no such button in the
+ * form.
+ * @access public
+ */
+ function submitImageByName($name, $x, $y) {
+ foreach ($this->_images as $image) {
+ if ($image->getName() == $name) {
+ return array_merge(
+ $image->getSubmitValues($x, $y),
+ $this->getValues());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the submit values for an image identified by the ID.
+ * @param string/integer $id Button ID attribute to search for.
+ * @param integer $x X-coordinate of click.
+ * @param integer $y Y-coordinate of click.
+ * @return hash Submitted values or false
+ * if there is no such button in the
+ * form.
+ * @access public
+ */
+ function submitImageById($id, $x, $y) {
+ foreach ($this->_images as $image) {
+ if ($image->getAttribute('id') == $id) {
+ return array_merge(
+ $image->getSubmitValues($x, $y),
+ $this->getValues());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Simply submits the form without the submit button
+ * value. Used when there is only one button or it
+ * is unimportant.
+ * @return hash Submitted values.
+ * @access public
+ */
+ function submit() {
+ return $this->getValues();
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: frames.php,v 1.28 2004/08/18 23:10:19 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/page.php');
+ require_once(dirname(__FILE__) . '/user_agent.php');
+ /**#@-*/
+
+ /**
+ * A composite page. Wraps a frameset page and
+ * adds subframes. The original page will be
+ * mostly ignored. Implements the SimplePage
+ * interface so as to be interchangeable.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleFrameset {
+ var $_frameset;
+ var $_frames;
+ var $_focus;
+ var $_names;
+
+ /**
+ * Stashes the frameset page. Will make use of the
+ * browser to fetch the sub frames recursively.
+ * @param SimplePage $page Frameset page.
+ */
+ function SimpleFrameset(&$page) {
+ $this->_frameset = &$page;
+ $this->_frames = array();
+ $this->_focus = false;
+ $this->_names = array();
+ }
+
+ /**
+ * Adds a parsed page to the frameset.
+ * @param SimplePage $page Frame page.
+ * @param string $name Name of frame in frameset.
+ * @access public
+ */
+ function addFrame(&$page, $name = false) {
+ $this->_frames[] = &$page;
+ if ($name) {
+ $this->_names[$name] = count($this->_frames) - 1;
+ }
+ }
+
+ /**
+ * Replaces existing frame with another. If the
+ * frame is nested, then the call is passed down
+ * one level.
+ * @param array $path Path of frame in frameset.
+ * @param SimplePage $page Frame source.
+ * @access public
+ */
+ function setFrame($path, &$page) {
+ $name = array_shift($path);
+ if (isset($this->_names[$name])) {
+ $index = $this->_names[$name];
+ } else {
+ $index = $name - 1;
+ }
+ if (count($path) == 0) {
+ $this->_frames[$index] = &$page;
+ return;
+ }
+ $this->_frames[$index]->setFrame($path, $page);
+ }
+
+ /**
+ * Accessor for current frame focus. Will be
+ * false if no frame has focus. Will have the nested
+ * frame focus if any.
+ * @return array Labels or indexes of nested frames.
+ * @access public
+ */
+ function getFrameFocus() {
+ if ($this->_focus === false) {
+ return array();
+ }
+ return array_merge(
+ array($this->_getPublicNameFromIndex($this->_focus)),
+ $this->_frames[$this->_focus]->getFrameFocus());
+ }
+
+ /**
+ * Turns an internal array index into the frames list
+ * into a public name, or if none, then a one offset
+ * index.
+ * @param integer $subject Internal index.
+ * @return integer/string Public name.
+ * @access private
+ */
+ function _getPublicNameFromIndex($subject) {
+ foreach ($this->_names as $name => $index) {
+ if ($subject == $index) {
+ return $name;
+ }
+ }
+ return $subject + 1;
+ }
+
+ /**
+ * Sets the focus by index. The integer index starts from 1.
+ * If already focused and the target frame also has frames,
+ * then the nested frame will be focused.
+ * @param integer $choice Chosen frame.
+ * @return boolean True if frame exists.
+ * @access public
+ */
+ function setFrameFocusByIndex($choice) {
+ if (is_integer($this->_focus)) {
+ if ($this->_frames[$this->_focus]->hasFrames()) {
+ return $this->_frames[$this->_focus]->setFrameFocusByIndex($choice);
+ }
+ }
+ if (($choice < 1) || ($choice > count($this->_frames))) {
+ return false;
+ }
+ $this->_focus = $choice - 1;
+ return true;
+ }
+
+ /**
+ * Sets the focus by name. If already focused and the
+ * target frame also has frames, then the nested frame
+ * will be focused.
+ * @param string $name Chosen frame.
+ * @return boolean True if frame exists.
+ * @access public
+ */
+ function setFrameFocus($name) {
+ if (is_integer($this->_focus)) {
+ if ($this->_frames[$this->_focus]->hasFrames()) {
+ return $this->_frames[$this->_focus]->setFrameFocus($name);
+ }
+ }
+ if (in_array($name, array_keys($this->_names))) {
+ $this->_focus = $this->_names[$name];
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Clears the frame focus.
+ * @access public
+ */
+ function clearFrameFocus() {
+ $this->_focus = false;
+ $this->_clearNestedFramesFocus();
+ }
+
+ /**
+ * Clears the frame focus for any nested frames.
+ * @access private
+ */
+ function _clearNestedFramesFocus() {
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $this->_frames[$i]->clearFrameFocus();
+ }
+ }
+
+ /**
+ * Test for the presence of a frameset.
+ * @return boolean Always true.
+ * @access public
+ */
+ function hasFrames() {
+ return true;
+ }
+
+ /**
+ * Accessor for frames information.
+ * @return array/string Recursive hash of frame URL strings.
+ * The key is either a numerical
+ * index or the name attribute.
+ * @access public
+ */
+ function getFrames() {
+ $report = array();
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $report[$this->_getPublicNameFromIndex($i)] =
+ $this->_frames[$i]->getFrames();
+ }
+ return $report;
+ }
+
+ /**
+ * Accessor for raw text of either all the pages or
+ * the frame in focus.
+ * @return string Raw unparsed content.
+ * @access public
+ */
+ function getRaw() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getRaw();
+ }
+ $raw = '';
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $raw .= $this->_frames[$i]->getRaw();
+ }
+ return $raw;
+ }
+
+ /**
+ * Accessor for last error.
+ * @return string Error from last response.
+ * @access public
+ */
+ function getTransportError() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getTransportError();
+ }
+ return $this->_frameset->getTransportError();
+ }
+
+ /**
+ * Request method used to fetch this frame.
+ * @return string GET, POST or HEAD.
+ * @access public
+ */
+ function getMethod() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getMethod();
+ }
+ return $this->_frameset->getMethod();
+ }
+
+ /**
+ * Original resource name.
+ * @return SimpleUrl Current url.
+ * @access public
+ */
+ function getUrl() {
+ if (is_integer($this->_focus)) {
+ $url = $this->_frames[$this->_focus]->getUrl();
+ $url->setTarget($this->_getPublicNameFromIndex($this->_focus));
+ } else {
+ $url = $this->_frameset->getUrl();
+ }
+ return $url;
+ }
+
+ /**
+ * Original request data.
+ * @return mixed Sent content.
+ * @access public
+ */
+ function getRequestData() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getRequestData();
+ }
+ return $this->_frameset->getRequestData();
+ }
+
+ /**
+ * Accessor for current MIME type.
+ * @return string MIME type as string; e.g. 'text/html'
+ * @access public
+ */
+ function getMimeType() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getMimeType();
+ }
+ return $this->_frameset->getMimeType();
+ }
+
+ /**
+ * Accessor for last response code.
+ * @return integer Last HTTP response code received.
+ * @access public
+ */
+ function getResponseCode() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getResponseCode();
+ }
+ return $this->_frameset->getResponseCode();
+ }
+
+ /**
+ * Accessor for last Authentication type. Only valid
+ * straight after a challenge (401).
+ * @return string Description of challenge type.
+ * @access public
+ */
+ function getAuthentication() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getAuthentication();
+ }
+ return $this->_frameset->getAuthentication();
+ }
+
+ /**
+ * Accessor for last Authentication realm. Only valid
+ * straight after a challenge (401).
+ * @return string Name of security realm.
+ * @access public
+ */
+ function getRealm() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getRealm();
+ }
+ return $this->_frameset->getRealm();
+ }
+
+ /**
+ * Accessor for outgoing header information.
+ * @return string Header block.
+ * @access public
+ */
+ function getRequest() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getRequest();
+ }
+ return $this->_frameset->getRequest();
+ }
+
+ /**
+ * Accessor for raw header information.
+ * @return string Header block.
+ * @access public
+ */
+ function getHeaders() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getHeaders();
+ }
+ return $this->_frameset->getHeaders();
+ }
+
+ /**
+ * Accessor for parsed title.
+ * @return string Title or false if no title is present.
+ * @access public
+ */
+ function getTitle() {
+ return $this->_frameset->getTitle();
+ }
+
+ /**
+ * Accessor for a list of all fixed links.
+ * @return array List of urls with scheme of
+ * http or https and hostname.
+ * @access public
+ */
+ function getAbsoluteUrls() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getAbsoluteUrls();
+ }
+ $urls = array();
+ foreach ($this->_frames as $frame) {
+ $urls = array_merge($urls, $frame->getAbsoluteUrls());
+ }
+ return array_values(array_unique($urls));
+ }
+
+ /**
+ * Accessor for a list of all relative links.
+ * @return array List of urls without hostname.
+ * @access public
+ */
+ function getRelativeUrls() {
+ if (is_integer($this->_focus)) {
+ return $this->_frames[$this->_focus]->getRelativeUrls();
+ }
+ $urls = array();
+ foreach ($this->_frames as $frame) {
+ $urls = array_merge($urls, $frame->getRelativeUrls());
+ }
+ return array_values(array_unique($urls));
+ }
+
+ /**
+ * Accessor for URLs by the link label. Label will match
+ * regardess of whitespace issues and case.
+ * @param string $label Text of link.
+ * @return array List of links with that label.
+ * @access public
+ */
+ function getUrlsByLabel($label) {
+ if (is_integer($this->_focus)) {
+ return $this->_tagUrlsWithFrame(
+ $this->_frames[$this->_focus]->getUrlsByLabel($label),
+ $this->_focus);
+ }
+ $urls = array();
+ foreach ($this->_frames as $index => $frame) {
+ $urls = array_merge(
+ $urls,
+ $this->_tagUrlsWithFrame(
+ $frame->getUrlsByLabel($label),
+ $index));
+ }
+ return $urls;
+ }
+
+ /**
+ * Accessor for a URL by the id attribute. If in a frameset
+ * then the first link found with that ID attribute is
+ * returned only. Focus on a frame if you want one from
+ * a specific part of the frameset.
+ * @param string $id Id attribute of link.
+ * @return string URL with that id.
+ * @access public
+ */
+ function getUrlById($id) {
+ foreach ($this->_frames as $index => $frame) {
+ if ($url = $frame->getUrlById($id)) {
+ if (! $url->gettarget()) {
+ $url->setTarget($this->_getPublicNameFromIndex($index));
+ }
+ return $url;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Attaches the intended frame index to a list of URLs.
+ * @param array $urls List of SimpleUrls.
+ * @param string $frame Name of frame or index.
+ * @return array List of tagged URLs.
+ * @access private
+ */
+ function _tagUrlsWithFrame($urls, $frame) {
+ $tagged = array();
+ foreach ($urls as $url) {
+ if (! $url->getTarget()) {
+ $url->setTarget($this->_getPublicNameFromIndex($frame));
+ }
+ $tagged[] = $url;
+ }
+ return $tagged;
+ }
+
+ /**
+ * Finds a held form by button label. Will only
+ * search correctly built forms. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $label Button label, default 'Submit'.
+ * @return SimpleForm Form object containing the button.
+ * @access public
+ */
+ function &getFormBySubmitLabel($label) {
+ return $this->_findForm('getFormBySubmitLabel', $label);
+ }
+
+ /**
+ * Finds a held form by button label. Will only
+ * search correctly built forms. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $name Button name attribute.
+ * @return SimpleForm Form object containing the button.
+ * @access public
+ */
+ function &getFormBySubmitName($name) {
+ return $this->_findForm('getFormBySubmitName', $name);
+ }
+
+ /**
+ * Finds a held form by button id. Will only
+ * search correctly built forms. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $id Button ID attribute.
+ * @return SimpleForm Form object containing the button.
+ * @access public
+ */
+ function &getFormBySubmitId($id) {
+ return $this->_findForm('getFormBySubmitId', $id);
+ }
+
+ /**
+ * Finds a held form by image label. Will only
+ * search correctly built forms. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $label Usually the alt attribute.
+ * @return SimpleForm Form object containing the image.
+ * @access public
+ */
+ function &getFormByImageLabel($label) {
+ return $this->_findForm('getFormByImageLabel', $label);
+ }
+
+ /**
+ * Finds a held form by image button id. Will only
+ * search correctly built forms. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $name Image name.
+ * @return SimpleForm Form object containing the image.
+ * @access public
+ */
+ function &getFormByImageName($name) {
+ return $this->_findForm('getFormByImageName', $name);
+ }
+
+ /**
+ * Finds a held form by image button id. Will only
+ * search correctly built forms. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $id Image ID attribute.
+ * @return SimpleForm Form object containing the image.
+ * @access public
+ */
+ function &getFormByImageId($id) {
+ return $this->_findForm('getFormByImageId', $id);
+ }
+
+ /**
+ * Finds a held form by the form ID. A way of
+ * identifying a specific form when we have control
+ * of the HTML code. The first form found
+ * either within the focused frame, or across frames,
+ * will be the one returned.
+ * @param string $id Form label.
+ * @return SimpleForm Form object containing the matching ID.
+ * @access public
+ */
+ function &getFormById($id) {
+ return $this->_findForm('getFormById', $id);
+ }
+
+ /**
+ * General form finder. Will search all the frames or
+ * just the one in focus.
+ * @param string $method Method to use to find in a page.
+ * @param string $attribute Label, name or ID.
+ * @return SimpleForm Form object containing the matching ID.
+ * @access private
+ */
+ function &_findForm($method, $attribute) {
+ if (is_integer($this->_focus)) {
+ return $this->_findFormInFrame(
+ $this->_frames[$this->_focus],
+ $this->_focus,
+ $method,
+ $attribute);
+ }
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $form = &$this->_findFormInFrame(
+ $this->_frames[$i],
+ $i,
+ $method,
+ $attribute);
+ if ($form) {
+ return $form;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a form in a page using a form finding method. Will
+ * also tag the form with the frame name it belongs in.
+ * @param SimplePage $page Page content of frame.
+ * @param integer $index Internal frame representation.
+ * @param string $method Method to use to find in a page.
+ * @param string $attribute Label, name or ID.
+ * @return SimpleForm Form object containing the matching ID.
+ * @access private
+ */
+ function &_findFormInFrame(&$page, $index, $method, $attribute) {
+ $form = &$this->_frames[$index]->$method($attribute);
+ if (isset($form)) {
+ $form->setDefaultTarget($this->_getPublicNameFromIndex($index));
+ }
+ return $form;
+ }
+
+ /**
+ * Sets a field on each form in which the field is
+ * available.
+ * @param string $name Field name.
+ * @param string $value Value to set field to.
+ * @return boolean True if value is valid.
+ * @access public
+ */
+ function setField($name, $value) {
+ if (is_integer($this->_focus)) {
+ $this->_frames[$this->_focus]->setField($name, $value);
+ } else {
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $this->_frames[$i]->setField($name, $value);
+ }
+ }
+ }
+
+ /**
+ * Sets a field on the form in which the unique field is
+ * available.
+ * @param string/integer $id Field ID attribute.
+ * @param string $value Value to set field to.
+ * @return boolean True if value is valid.
+ * @access public
+ */
+ function setFieldById($id, $value) {
+ if (is_integer($this->_focus)) {
+ $this->_frames[$this->_focus]->setFieldById($id, $value);
+ } else {
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $this->_frames[$i]->setFieldById($id, $value);
+ }
+ }
+ }
+
+ /**
+ * Accessor for a form element value within a frameset.
+ * Finds the first match amongst the frames.
+ * @param string $name Field name.
+ * @return string/boolean A string if the field is
+ * present, false if unchecked
+ * and null if missing.
+ * @access public
+ */
+ function getField($name) {
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $value = $this->_frames[$i]->getField($name);
+ if (isset($value)) {
+ return $value;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Accessor for a form element value within a page.
+ * Finds the first match.
+ * @param string/integer $id Field ID attribute.
+ * @return string/boolean A string if the field is
+ * present, false if unchecked
+ * and null if missing.
+ * @access public
+ */
+ function getFieldById($id) {
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $value = $this->_frames[$i]->getFieldById($id);
+ if (isset($value)) {
+ return $value;
+ }
+ }
+ return null;
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: http.php,v 1.94 2004/06/30 22:13:07 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/socket.php');
+ require_once(dirname(__FILE__) . '/url.php');
+ /**#@-*/
+
+ /**
+ * Cookie data holder. Cookie rules are full of pretty
+ * arbitary stuff. I have used...
+ * http://wp.netscape.com/newsref/std/cookie_spec.html
+ * http://www.cookiecentral.com/faq/
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleCookie {
+ var $_host;
+ var $_name;
+ var $_value;
+ var $_path;
+ var $_expiry;
+ var $_is_secure;
+
+ /**
+ * Constructor. Sets the stored values.
+ * @param string $name Cookie key.
+ * @param string $value Value of cookie.
+ * @param string $path Cookie path if not host wide.
+ * @param string $expiry Expiry date as string.
+ * @param boolean $is_secure Currently ignored.
+ */
+ function SimpleCookie($name, $value = false, $path = false, $expiry = false, $is_secure = false) {
+ $this->_host = false;
+ $this->_name = $name;
+ $this->_value = $value;
+ $this->_path = ($path ? $this->_fixPath($path) : "/");
+ $this->_expiry = false;
+ if (is_string($expiry)) {
+ $this->_expiry = strtotime($expiry);
+ } elseif (is_integer($expiry)) {
+ $this->_expiry = $expiry;
+ }
+ $this->_is_secure = $is_secure;
+ }
+
+ /**
+ * Sets the host. The cookie rules determine
+ * that the first two parts are taken for
+ * certain TLDs and three for others. If the
+ * new host does not match these rules then the
+ * call will fail.
+ * @param string $host New hostname.
+ * @return boolean True if hostname is valid.
+ * @access public
+ */
+ function setHost($host) {
+ if ($host = $this->_truncateHost($host)) {
+ $this->_host = $host;
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for the truncated host to which this
+ * cookie applies.
+ * @return string Truncated hostname.
+ * @access public
+ */
+ function getHost() {
+ return $this->_host;
+ }
+
+ /**
+ * Test for a cookie being valid for a host name.
+ * @param string $host Host to test against.
+ * @return boolean True if the cookie would be valid
+ * here.
+ */
+ function isValidHost($host) {
+ return ($this->_truncateHost($host) === $this->getHost());
+ }
+
+ /**
+ * Extracts just the domain part that determines a
+ * cookie's host validity.
+ * @param string $host Host name to truncate.
+ * @return string Domain or false on a bad host.
+ * @access private
+ */
+ function _truncateHost($host) {
+ if (preg_match('/[a-z\-]+\.(com|edu|net|org|gov|mil|int)$/i', $host, $matches)) {
+ return $matches[0];
+ } elseif (preg_match('/[a-z\-]+\.[a-z\-]+\.[a-z\-]+$/i', $host, $matches)) {
+ return $matches[0];
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for name.
+ * @return string Cookie key.
+ * @access public
+ */
+ function getName() {
+ return $this->_name;
+ }
+
+ /**
+ * Accessor for value. A deleted cookie will
+ * have an empty string for this.
+ * @return string Cookie value.
+ * @access public
+ */
+ function getValue() {
+ return $this->_value;
+ }
+
+ /**
+ * Accessor for path.
+ * @return string Valid cookie path.
+ * @access public
+ */
+ function getPath() {
+ return $this->_path;
+ }
+
+ /**
+ * Tests a path to see if the cookie applies
+ * there. The test path must be longer or
+ * equal to the cookie path.
+ * @param string $path Path to test against.
+ * @return boolean True if cookie valid here.
+ * @access public
+ */
+ function isValidPath($path) {
+ return (strncmp(
+ $this->_fixPath($path),
+ $this->getPath(),
+ strlen($this->getPath())) == 0);
+ }
+
+ /**
+ * Accessor for expiry.
+ * @return string Expiry string.
+ * @access public
+ */
+ function getExpiry() {
+ if (! $this->_expiry) {
+ return false;
+ }
+ return gmdate("D, d M Y H:i:s", $this->_expiry) . " GMT";
+ }
+
+ /**
+ * Test to see if cookie is expired against
+ * the cookie format time or timestamp.
+ * Will give true for a session cookie.
+ * @param integer/string $now Time to test against. Result
+ * will be false if this time
+ * is later than the cookie expiry.
+ * Can be either a timestamp integer
+ * or a cookie format date.
+ * @access public
+ */
+ function isExpired($now) {
+ if (! $this->_expiry) {
+ return true;
+ }
+ if (is_string($now)) {
+ $now = strtotime($now);
+ }
+ return ($this->_expiry < $now);
+ }
+
+ /**
+ * Ages the cookie by the specified number of
+ * seconds.
+ * @param integer $interval In seconds.
+ * @public
+ */
+ function agePrematurely($interval) {
+ if ($this->_expiry) {
+ $this->_expiry -= $interval;
+ }
+ }
+
+ /**
+ * Accessor for the secure flag.
+ * @return boolean True if cookie needs SSL.
+ * @access public
+ */
+ function isSecure() {
+ return $this->_is_secure;
+ }
+
+ /**
+ * Adds a trailing and leading slash to the path
+ * if missing.
+ * @param string $path Path to fix.
+ * @access private
+ */
+ function _fixPath($path) {
+ if (substr($path, 0, 1) != '/') {
+ $path = '/' . $path;
+ }
+ if (substr($path, -1, 1) != '/') {
+ $path .= '/';
+ }
+ return $path;
+ }
+ }
+
+ /**
+ * Creates HTTP headers for the end point of
+ * a HTTP request.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleRoute {
+ var $_url;
+
+ /**
+ * Sets the target URL.
+ * @param SimpleUrl $url URL as object.
+ * @access public
+ */
+ function SimpleRoute($url) {
+ $this->_url = $url;
+ }
+
+ /**
+ * Resource name.
+ * @return SimpleUrl Current url.
+ * @access protected
+ */
+ function getUrl() {
+ return $this->_url;
+ }
+
+ /**
+ * Creates the first line which is the actual request.
+ * @param string $method HTTP request method, usually GET.
+ * @return string Request line content.
+ * @access protected
+ */
+ function _getRequestLine($method) {
+ return $method . ' ' . $this->_url->getPath() .
+ $this->_url->getEncodedRequest() . ' HTTP/1.0';
+ }
+
+ /**
+ * Creates the host part of the request.
+ * @return string Host line content.
+ * @access protected
+ */
+ function _getHostLine() {
+ $line = 'Host: ' . $this->_url->getHost();
+ if ($this->_url->getPort()) {
+ $line .= ':' . $this->_url->getPort();
+ }
+ return $line;
+ }
+
+ /**
+ * Opens a socket to the route.
+ * @param string $method HTTP request method, usually GET.
+ * @param integer $timeout Connection timeout.
+ * @return SimpleSocket New socket.
+ * @access public
+ */
+ function &createConnection($method, $timeout) {
+ $default_port = ('https' == $this->_url->getScheme()) ? 443 : 80;
+ $socket = &$this->_createSocket(
+ $this->_url->getScheme() ? $this->_url->getScheme() : 'http',
+ $this->_url->getHost(),
+ $this->_url->getPort() ? $this->_url->getPort() : $default_port,
+ $timeout);
+ if (! $socket->isError()) {
+ $socket->write($this->_getRequestLine($method) . "\r\n");
+ $socket->write($this->_getHostLine() . "\r\n");
+ $socket->write("Connection: close\r\n");
+ }
+ return $socket;
+ }
+
+ /**
+ * Factory for socket.
+ * @param string $scheme Protocol to use.
+ * @param string $host Hostname to connect to.
+ * @param integer $port Remote port.
+ * @param integer $timeout Connection timeout.
+ * @return SimpleSocket/SimpleSecureSocket New socket.
+ * @access protected
+ */
+ function &_createSocket($scheme, $host, $port, $timeout) {
+ if (in_array($scheme, array('https'))) {
+ return new SimpleSecureSocket($host, $port, $timeout);
+ }
+ return new SimpleSocket($host, $port, $timeout);
+ }
+ }
+
+ /**
+ * Creates HTTP headers for the end point of
+ * a HTTP request via a proxy server.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleProxyRoute extends SimpleRoute {
+ var $_proxy;
+ var $_username;
+ var $_password;
+
+ /**
+ * Stashes the proxy address.
+ * @param SimpleUrl $url URL as object.
+ * @param string $proxy Proxy URL.
+ * @param string $username Username for autentication.
+ * @param string $password Password for autentication.
+ * @access public
+ */
+ function SimpleProxyRoute($url, $proxy, $username = false, $password = false) {
+ $this->SimpleRoute($url);
+ $this->_proxy = $proxy;
+ $this->_username = $username;
+ $this->_password = $password;
+ }
+
+ /**
+ * Creates the first line which is the actual request.
+ * @param string $method HTTP request method, usually GET.
+ * @param SimpleUrl $url URL as object.
+ * @return string Request line content.
+ * @access protected
+ */
+ function _getRequestLine($method) {
+ $url = $this->getUrl();
+ $scheme = $url->getScheme() ? $url->getScheme() : 'http';
+ $port = $url->getPort() ? ':' . $url->getPort() : '';
+ return $method . ' ' . $scheme . '://' . $url->getHost() . $port .
+ $url->getPath() . $url->getEncodedRequest() . ' HTTP/1.0';
+ }
+
+ /**
+ * Creates the host part of the request.
+ * @param SimpleUrl $url URL as object.
+ * @return string Host line content.
+ * @access protected
+ */
+ function _getHostLine() {
+ $host = 'Host: ' . $this->_proxy->getHost();
+ $port = $this->_proxy->getPort() ? $this->_proxy->getPort() : 8080;
+ return "$host:$port";
+ }
+
+ /**
+ * Opens a socket to the route.
+ * @param string $method HTTP request method, usually GET.
+ * @param integer $timeout Connection timeout.
+ * @return SimpleSocket New socket.
+ * @access public
+ */
+ function &createConnection($method, $timeout) {
+ $socket = &$this->_createSocket(
+ $this->_proxy->getScheme() ? $this->_proxy->getScheme() : 'http',
+ $this->_proxy->getHost(),
+ $this->_proxy->getPort() ? $this->_proxy->getPort() : 8080,
+ $timeout);
+ if (! $socket->isError()) {
+ $socket->write($this->_getRequestLine($method) . "\r\n");
+ $socket->write($this->_getHostLine() . "\r\n");
+ if ($this->_username && $this->_password) {
+ $socket->write('Proxy-Authorization: Basic ' .
+ base64_encode($this->_username . ':' . $this->_password) .
+ "\r\n");
+ }
+ $socket->write("Connection: close\r\n");
+ }
+ return $socket;
+ }
+ }
+
+ /**
+ * HTTP request for a web page. Factory for
+ * HttpResponse object.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleHttpRequest {
+ var $_route;
+ var $_method;
+ var $_content;
+ var $_headers;
+ var $_cookies;
+
+ /**
+ * Saves the URL ready for fetching.
+ * @param SimpleRoute $route Request route.
+ * @param string $method HTTP request method,
+ * usually GET.
+ * @param string $content Content to send with request.
+ * @access public
+ */
+ function SimpleHttpRequest(&$route, $method, $content = '') {
+ $this->_route = &$route;
+ $this->_method = $method;
+ $this->_content = $content;
+ $this->_headers = array();
+ $this->_cookies = array();
+ }
+
+ /**
+ * Fetches the content and parses the headers.
+ * @param integer $timeout Connection timeout.
+ * @return SimpleHttpResponse A response which may only have
+ * an error.
+ * @access public
+ */
+ function &fetch($timeout) {
+ $socket = &$this->_route->createConnection($this->_method, $timeout);
+ if ($socket->isError()) {
+ return $this->_createResponse($socket);
+ }
+ $this->_dispatchRequest($socket, $this->_method, $this->_content);
+ return $this->_createResponse($socket);
+ }
+
+ /**
+ * Sends the headers.
+ * @param SimpleSocket $socket Open socket.
+ * @param string $method HTTP request method,
+ * usually GET.
+ * @param string $content Content to send with request.
+ * @access protected
+ */
+ function _dispatchRequest(&$socket, $method, $content) {
+ if ($content) {
+ $socket->write("Content-Length: " . strlen($content) . "\r\n");
+ $socket->write("Content-Type: application/x-www-form-urlencoded\r\n");
+ }
+ foreach ($this->_headers as $header_line) {
+ $socket->write($header_line . "\r\n");
+ }
+ if (count($this->_cookies) > 0) {
+ $socket->write("Cookie: " . $this->_marshallCookies($this->_cookies) . "\r\n");
+ }
+ $socket->write("\r\n");
+ if ($content) {
+ $socket->write($content);
+ }
+ }
+
+ /**
+ * Adds a header line to the request.
+ * @param string $header_line Text of header line.
+ * @access public
+ */
+ function addHeaderLine($header_line) {
+ $this->_headers[] = $header_line;
+ }
+
+ /**
+ * Adds a cookie to the request.
+ * @param SimpleCookie $cookie Additional cookie.
+ * @access public
+ */
+ function setCookie($cookie) {
+ $this->_cookies[] = $cookie;
+ }
+
+ /**
+ * Serialises the cookie hash ready for
+ * transmission.
+ * @param hash $cookies Parsed cookies.
+ * @return array Cookies in header form.
+ * @access private
+ */
+ function _marshallCookies($cookies) {
+ $cookie_pairs = array();
+ foreach ($cookies as $cookie) {
+ $cookie_pairs[] = $cookie->getName() . "=" . $cookie->getValue();
+ }
+ return implode(";", $cookie_pairs);
+ }
+
+ /**
+ * Wraps the socket in a response parser.
+ * @param SimpleSocket $socket Responding socket.
+ * @return SimpleHttpResponse Parsed response object.
+ * @access protected
+ */
+ function &_createResponse(&$socket) {
+ return new SimpleHttpResponse(
+ $socket,
+ $this->_method,
+ $this->_route->getUrl(),
+ $this->_content);
+ }
+ }
+
+ /**
+ * Request with data to send. Usually PUT or POST.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleHttpPostRequest extends SimpleHttpRequest {
+
+ /**
+ * Cretaes an HTML form request.
+ * @param SimpleRoute $route Request target.
+ * @param array $parameters Content to send.
+ * @access public
+ */
+ function SimpleHttpPostRequest($route, $parameters) {
+ $this->SimpleHttpRequest($route, 'POST', $parameters);
+ }
+
+ /**
+ * Sends the headers.
+ * @param SimpleSocket $socket Open socket.
+ * @param string $method HTTP request method,
+ * usually GET.
+ * @param string $content Content to send with request.
+ * @access protected
+ */
+ function _dispatchRequest(&$socket, $method, $content) {
+ parent::_dispatchRequest(
+ $socket,
+ $method,
+ SimpleUrl::encodeRequest($content));
+ }
+ }
+
+ /**
+ * Collection of header lines in the response.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleHttpHeaders {
+ var $_raw_headers;
+ var $_response_code;
+ var $_http_version;
+ var $_mime_type;
+ var $_location;
+ var $_cookies;
+ var $_authentication;
+ var $_realm;
+
+ /**
+ * Parses the incoming header block.
+ * @param string $headers Header block.
+ * @access public
+ */
+ function SimpleHttpHeaders($headers) {
+ $this->_raw_headers = $headers;
+ $this->_response_code = false;
+ $this->_http_version = false;
+ $this->_mime_type = '';
+ $this->_location = false;
+ $this->_cookies = array();
+ $this->_authentication = false;
+ $this->_realm = false;
+ foreach (split("\r\n", $headers) as $header_line) {
+ $this->_parseHeaderLine($header_line);
+ }
+ }
+
+ /**
+ * Accessor for parsed HTTP protocol version.
+ * @return integer HTTP error code.
+ * @access public
+ */
+ function getHttpVersion() {
+ return $this->_http_version;
+ }
+
+ /**
+ * Accessor for raw header block.
+ * @return string All headers as raw string.
+ * @access public
+ */
+ function getRaw() {
+ return $this->_raw_headers;
+ }
+
+ /**
+ * Accessor for parsed HTTP error code.
+ * @return integer HTTP error code.
+ * @access public
+ */
+ function getResponseCode() {
+ return (integer)$this->_response_code;
+ }
+
+ /**
+ * Returns the redirected URL or false if
+ * no redirection.
+ * @return string URL or false for none.
+ * @access public
+ */
+ function getLocation() {
+ return $this->_location;
+ }
+
+ /**
+ * Test to see if the response is a valid redirect.
+ * @return boolean True if valid redirect.
+ * @access public
+ */
+ function isRedirect() {
+ return in_array($this->_response_code, array(301, 302, 303, 307)) &&
+ (boolean)$this->getLocation();
+ }
+
+ /**
+ * Test to see if the response is an authentication
+ * challenge.
+ * @return boolean True if challenge.
+ * @access public
+ */
+ function isChallenge() {
+ return ($this->_response_code == 401) &&
+ (boolean)$this->_authentication &&
+ (boolean)$this->_realm;
+ }
+
+ /**
+ * Accessor for MIME type header information.
+ * @return string MIME type.
+ * @access public
+ */
+ function getMimeType() {
+ return $this->_mime_type;
+ }
+
+ /**
+ * Accessor for authentication type.
+ * @return string Type.
+ * @access public
+ */
+ function getAuthentication() {
+ return $this->_authentication;
+ }
+
+ /**
+ * Accessor for security realm.
+ * @return string Realm.
+ * @access public
+ */
+ function getRealm() {
+ return $this->_realm;
+ }
+
+ /**
+ * Accessor for any new cookies.
+ * @return array List of new cookies.
+ * @access public
+ */
+ function getNewCookies() {
+ return $this->_cookies;
+ }
+
+ /**
+ * Called on each header line to accumulate the held
+ * data within the class.
+ * @param string $header_line One line of header.
+ * @access protected
+ */
+ function _parseHeaderLine($header_line) {
+ if (preg_match('/HTTP\/(\d+\.\d+)\s+(.*?)\s/i', $header_line, $matches)) {
+ $this->_http_version = $matches[1];
+ $this->_response_code = $matches[2];
+ }
+ if (preg_match('/Content-type:\s*(.*)/i', $header_line, $matches)) {
+ $this->_mime_type = trim($matches[1]);
+ }
+ if (preg_match('/Location:\s*(.*)/i', $header_line, $matches)) {
+ $this->_location = trim($matches[1]);
+ }
+ if (preg_match('/Set-cookie:(.*)/i', $header_line, $matches)) {
+ $this->_cookies[] = $this->_parseCookie($matches[1]);
+ }
+ if (preg_match('/WWW-Authenticate:\s+(\S+)\s+realm=\"(.*?)\"/i', $header_line, $matches)) {
+ $this->_authentication = $matches[1];
+ $this->_realm = trim($matches[2]);
+ }
+ }
+
+ /**
+ * Parse the Set-cookie content.
+ * @param string $cookie_line Text after "Set-cookie:"
+ * @return SimpleCookie New cookie object.
+ * @access private
+ */
+ function _parseCookie($cookie_line) {
+ $parts = split(";", $cookie_line);
+ $cookie = array();
+ preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie);
+ foreach ($parts as $part) {
+ if (preg_match('/\s*(.*?)\s*=(.*)/', $part, $matches)) {
+ $cookie[$matches[1]] = trim($matches[2]);
+ }
+ }
+ return new SimpleCookie(
+ $cookie[1],
+ trim($cookie[2]),
+ isset($cookie["path"]) ? $cookie["path"] : "",
+ isset($cookie["expires"]) ? $cookie["expires"] : false);
+ }
+ }
+
+ /**
+ * Basic HTTP response.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleHttpResponse extends StickyError {
+ var $_method;
+ var $_url;
+ var $_request_data;
+ var $_sent;
+ var $_content;
+ var $_headers;
+
+ /**
+ * Constructor. Reads and parses the incoming
+ * content and headers.
+ * @param SimpleSocket $socket Network connection to fetch
+ * response text from.
+ * @param string $method HTTP request method.
+ * @param SimpleUrl $url Resource name.
+ * @param mixed $request_data Record of content sent.
+ * @access public
+ */
+ function SimpleHttpResponse(&$socket, $method, $url, $request_data = '') {
+ $this->StickyError();
+ $this->_method = $method;
+ $this->_url = $url;
+ $this->_request_data = $request_data;
+ $this->_sent = $socket->getSent();
+ $this->_content = false;
+ $raw = $this->_readAll($socket);
+ if ($socket->isError()) {
+ $this->_setError('Error reading socket [' . $socket->getError() . ']');
+ return;
+ }
+ $this->_parse($raw);
+ }
+
+ /**
+ * Splits up the headers and the rest of the content.
+ * @param string $raw Content to parse.
+ * @access private
+ */
+ function _parse($raw) {
+ if (! $raw) {
+ $this->_setError('Nothing fetched');
+ $this->_headers = &new SimpleHttpHeaders('');
+ } elseif (! strstr($raw, "\r\n\r\n")) {
+ $this->_setError('Could not parse headers');
+ $this->_headers = &new SimpleHttpHeaders($raw);
+ } else {
+ list($headers, $this->_content) = split("\r\n\r\n", $raw, 2);
+ $this->_headers = &new SimpleHttpHeaders($headers);
+ }
+ }
+
+ /**
+ * Original request method.
+ * @return string GET, POST or HEAD.
+ * @access public
+ */
+ function getMethod() {
+ return $this->_method;
+ }
+
+ /**
+ * Resource name.
+ * @return SimpleUrl Current url.
+ * @access public
+ */
+ function getUrl() {
+ return $this->_url;
+ }
+
+ /**
+ * Original request data.
+ * @return mixed Sent content.
+ * @access public
+ */
+ function getRequestData() {
+ return $this->_request_data;
+ }
+
+ /**
+ * Raw request that was sent down the wire.
+ * @return string Bytes actually sent.
+ * @access public
+ */
+ function getSent() {
+ return $this->_sent;
+ }
+
+ /**
+ * Accessor for the content after the last
+ * header line.
+ * @return string All content.
+ * @access public
+ */
+ function getContent() {
+ return $this->_content;
+ }
+
+ /**
+ * Accessor for header block. The response is the
+ * combination of this and the content.
+ * @return SimpleHeaders Wrapped header block.
+ * @access public
+ */
+ function getHeaders() {
+ return $this->_headers;
+ }
+
+ /**
+ * Accessor for any new cookies.
+ * @return array List of new cookies.
+ * @access public
+ */
+ function getNewCookies() {
+ return $this->_headers->getNewCookies();
+ }
+
+ /**
+ * Reads the whole of the socket output into a
+ * single string.
+ * @param SimpleSocket $socket Unread socket.
+ * @return string Raw output if successful
+ * else false.
+ * @access private
+ */
+ function _readAll(&$socket) {
+ $all = '';
+ while (! $this->_isLastPacket($next = $socket->read())) {
+ $all .= $next;
+ }
+ return $all;
+ }
+
+ /**
+ * Test to see if the packet from the socket is the
+ * last one.
+ * @param string $packet Chunk to interpret.
+ * @return boolean True if empty or EOF.
+ * @access private
+ */
+ function _isLastPacket($packet) {
+ if (is_string($packet)) {
+ return $packet === '';
+ }
+ return ! $packet;
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage MockObjects
+ * @version $Id: mock_objects.php,v 1.49 2004/08/18 19:10:54 lastcraft Exp $
+ */
+
+ /**#@+
+ * include SimpleTest files
+ */
+ require_once(dirname(__FILE__) . '/expectation.php');
+ require_once(dirname(__FILE__) . '/options.php');
+ require_once(dirname(__FILE__) . '/dumper.php');
+ /**#@-*/
+
+ /**
+ * Default character simpletest will substitute for any value
+ */
+ define('MOCK_WILDCARD', '*');
+
+ /**
+ * A wildcard expectation always matches.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class WildcardExpectation extends SimpleExpectation {
+
+ /**
+ * Chains constructor only.
+ * @access public
+ */
+ function WildcardExpectation() {
+ $this->SimpleExpectation();
+ }
+
+ /**
+ * Tests the expectation. Always true.
+ * @param mixed $compare Ignored.
+ * @return boolean True.
+ * @access public
+ */
+ function test($compare) {
+ return true;
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ return 'Wildcard always matches [' . $dumper->describeValue($compare) . ']';
+ }
+ }
+
+ /**
+ * Parameter comparison assertion.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class ParametersExpectation extends SimpleExpectation {
+ var $_expected;
+
+ /**
+ * Sets the expected parameter list.
+ * @param array $parameters Array of parameters including
+ * those that are wildcarded.
+ * If the value is not an array
+ * then it is considered to match any.
+ * @param mixed $wildcard Any parameter matching this
+ * will always match.
+ * @param string $message Customised message on failure.
+ * @access public
+ */
+ function ParametersExpectation($expected = false, $message = '%s') {
+ $this->SimpleExpectation($message);
+ $this->_expected = $expected;
+ }
+
+ /**
+ * Tests the assertion. True if correct.
+ * @param array $parameters Comparison values.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($parameters) {
+ if (! is_array($this->_expected)) {
+ return true;
+ }
+ if (count($this->_expected) != count($parameters)) {
+ return false;
+ }
+ for ($i = 0; $i < count($this->_expected); $i++) {
+ if (! $this->_testParameter($parameters[$i], $this->_expected[$i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Tests an individual parameter.
+ * @param mixed $parameter Value to test.
+ * @param mixed $expected Comparison value.
+ * @return boolean True if expectation
+ * fulfilled.
+ * @access private
+ */
+ function _testParameter($parameter, $expected) {
+ $comparison = $this->_coerceToExpectation($expected);
+ return $comparison->test($parameter);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param array $comparison Incoming parameter list.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($parameters) {
+ if ($this->test($parameters)) {
+ return "Expectation of " . count($this->_expected) .
+ " arguments of [" . $this->_renderArguments($this->_expected) .
+ "] is correct";
+ } else {
+ return $this->_describeDifference($this->_expected, $parameters);
+ }
+ }
+
+ /**
+ * Message to display if expectation differs from
+ * the parameters actually received.
+ * @param array $expected Expected parameters as list.
+ * @param array $parameters Actual parameters received.
+ * @return string Description of difference.
+ * @access private
+ */
+ function _describeDifference($expected, $parameters) {
+ if (count($expected) != count($parameters)) {
+ return "Expected " . count($expected) .
+ " arguments of [" . $this->_renderArguments($expected) .
+ "] but got " . count($parameters) .
+ " arguments of [" . $this->_renderArguments($parameters) . "]";
+ }
+ $messages = array();
+ for ($i = 0; $i < count($expected); $i++) {
+ $comparison = $this->_coerceToExpectation($expected[$i]);
+ if (! $comparison->test($parameters[$i])) {
+ $messages[] = "parameter " . ($i + 1) . " with [" .
+ $comparison->overlayMessage($parameters[$i]) . "]";
+ }
+ }
+ return "Parameter expectation differs at " . implode(" and ", $messages);
+ }
+
+ /**
+ * Creates an identical expectation if the
+ * object/value is not already some type
+ * of expectation.
+ * @param mixed $expected Expected value.
+ * @return SimpleExpectation Expectation object.
+ * @access private
+ */
+ function _coerceToExpectation($expected) {
+ if (SimpleTestCompatibility::isA($expected, 'SimpleExpectation')) {
+ return $expected;
+ }
+ return new IdenticalExpectation($expected);
+ }
+
+ /**
+ * Renders the argument list as a string for
+ * messages.
+ * @param array $args Incoming arguments.
+ * @return string Simple description of type and value.
+ * @access private
+ */
+ function _renderArguments($args) {
+ $descriptions = array();
+ if (is_array($args)) {
+ foreach ($args as $arg) {
+ $dumper = &new SimpleDumper();
+ $descriptions[] = $dumper->describeValue($arg);
+ }
+ }
+ return implode(', ', $descriptions);
+ }
+ }
+
+ /**
+ * Confirms that the number of calls on a method is as expected.
+ */
+ class CallCountExpectation extends SimpleExpectation {
+ var $_method;
+ var $_count;
+
+ /**
+ * Stashes the method and expected count for later
+ * reporting.
+ * @param string $method Name of method to confirm against.
+ * @param integer $count Expected number of calls.
+ * @param string $message Custom error message.
+ */
+ function CallCountExpectation($method, $count, $message = '%s') {
+ $this->_method = $method;
+ $this->_count = $count;
+ $this->SimpleExpectation($message);
+ }
+
+ /**
+ * Tests the assertion. True if correct.
+ * @param integer $compare Measured call count.
+ * @return boolean True if expected.
+ * @access public
+ */
+ function test($compare) {
+ return ($this->_count == $compare);
+ }
+
+ /**
+ * Reports the comparison.
+ * @param integer $compare Measured call count.
+ * @return string Message to show.
+ * @access public
+ */
+ function testMessage($compare) {
+ return 'Expected call count for [' . $this->_method .
+ '] was [' . $this->_count .
+ '] got [' . $compare . ']';
+ }
+ }
+
+ /**
+ * Confirms that the number of calls on a method is as expected.
+ */
+ class MinimumCallCountExpectation extends SimpleExpectation {
+ var $_method;
+ var $_count;
+
+ /**
+ * Stashes the method and expected count for later
+ * reporting.
+ * @param string $method Name of method to confirm against.
+ * @param integer $count Minimum number of calls.
+ * @param string $message Custom error message.
+ */
+ function MinimumCallCountExpectation($method, $count, $message = '%s') {
+ $this->_method = $method;
+ $this->_count = $count;
+ $this->SimpleExpectation($message);
+ }
+
+ /**
+ * Tests the assertion. True if correct.
+ * @param integer $compare Measured call count.
+ * @return boolean True if enough.
+ * @access public
+ */
+ function test($compare) {
+ return ($this->_count <= $compare);
+ }
+
+ /**
+ * Reports the comparison.
+ * @param integer $compare Measured call count.
+ * @return string Message to show.
+ * @access public
+ */
+ function testMessage($compare) {
+ return 'Minimum call count for [' . $this->_method .
+ '] was [' . $this->_count .
+ '] got [' . $compare . ']';
+ }
+ }
+
+ /**
+ * Confirms that the number of calls on a method is as expected.
+ */
+ class MaximumCallCountExpectation extends SimpleExpectation {
+ var $_method;
+ var $_count;
+
+ /**
+ * Stashes the method and expected count for later
+ * reporting.
+ * @param string $method Name of method to confirm against.
+ * @param integer $count Minimum number of calls.
+ * @param string $message Custom error message.
+ */
+ function MaximumCallCountExpectation($method, $count, $message = '%s') {
+ $this->_method = $method;
+ $this->_count = $count;
+ $this->SimpleExpectation($message);
+ }
+
+ /**
+ * Tests the assertion. True if correct.
+ * @param integer $compare Measured call count.
+ * @return boolean True if not over.
+ * @access public
+ */
+ function test($compare) {
+ return ($this->_count >= $compare);
+ }
+
+ /**
+ * Reports the comparison.
+ * @param integer $compare Measured call count.
+ * @return string Message to show.
+ * @access public
+ */
+ function testMessage($compare) {
+ return 'Miximum call count for [' . $this->_method .
+ '] was [' . $this->_count .
+ '] got [' . $compare . ']';
+ }
+ }
+
+ /**
+ * Retrieves values and references by searching the
+ * parameter lists until a match is found.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class CallMap {
+ var $_map;
+
+ /**
+ * Creates an empty call map.
+ * @access public
+ */
+ function CallMap() {
+ $this->_map = array();
+ }
+
+ /**
+ * Stashes a value against a method call.
+ * @param array $parameters Arguments including wildcards.
+ * @param mixed $value Value copied into the map.
+ * @access public
+ */
+ function addValue($parameters, $value) {
+ $this->addReference($parameters, $value);
+ }
+
+ /**
+ * Stashes a reference against a method call.
+ * @param array $parameters Array of arguments (including wildcards).
+ * @param mixed $reference Array reference placed in the map.
+ * @access public
+ */
+ function addReference($parameters, &$reference) {
+ $place = count($this->_map);
+ $this->_map[$place] = array();
+ $this->_map[$place]["params"] = new ParametersExpectation($parameters);
+ $this->_map[$place]["content"] = &$reference;
+ }
+
+ /**
+ * Searches the call list for a matching parameter
+ * set. Returned by reference.
+ * @param array $parameters Parameters to search by
+ * without wildcards.
+ * @return object Object held in the first matching
+ * slot, otherwise null.
+ * @access public
+ */
+ function &findFirstMatch($parameters) {
+ $slot = $this->_findFirstSlot($parameters);
+ if (!isset($slot)) {
+ return null;
+ }
+ return $slot["content"];
+ }
+
+ /**
+ * Searches the call list for a matching parameter
+ * set. True if successful.
+ * @param array $parameters Parameters to search by
+ * without wildcards.
+ * @return boolean True if a match is present.
+ * @access public
+ */
+ function isMatch($parameters) {
+ return ($this->_findFirstSlot($parameters) != null);
+ }
+
+ /**
+ * Searches the map for a matching item.
+ * @param array $parameters Parameters to search by
+ * without wildcards.
+ * @return array Reference to slot or null.
+ * @access private
+ */
+ function &_findFirstSlot($parameters) {
+ for ($i = 0; $i < count($this->_map); $i++) {
+ if ($this->_map[$i]["params"]->test($parameters)) {
+ return $this->_map[$i];
+ }
+ }
+ return null;
+ }
+ }
+
+ /**
+ * An empty collection of methods that can have their
+ * return values set. Used for prototyping.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class SimpleStub {
+ var $_wildcard;
+ var $_is_strict;
+ var $_returns;
+ var $_return_sequence;
+ var $_call_counts;
+
+ /**
+ * Sets up the wildcard and everything else empty.
+ * @param mixed $wildcard Parameter matching wildcard.
+ * @param boolean $is_strict Enables method name checks.
+ * @access public
+ */
+ function SimpleStub($wildcard, $is_strict = true) {
+ $this->_wildcard = $wildcard;
+ $this->_is_strict = $is_strict;
+ $this->_returns = array();
+ $this->_return_sequence = array();
+ $this->_call_counts = array();
+ }
+
+ /**
+ * Replaces wildcard matches with wildcard
+ * expectations in the argument list.
+ * @param array $args Raw argument list.
+ * @return array Argument list with
+ * expectations.
+ * @access private
+ */
+ function _replaceWildcards($args) {
+ if ($args === false) {
+ return false;
+ }
+ for ($i = 0; $i < count($args); $i++) {
+ if ($args[$i] === $this->_wildcard) {
+ $args[$i] = new WildcardExpectation();
+ }
+ }
+ return $args;
+ }
+
+ /**
+ * Returns the expected value for the method name.
+ * @param string $method Name of method to simulate.
+ * @param array $args Arguments as an array.
+ * @return mixed Stored return.
+ * @access private
+ */
+ function &_invoke($method, $args) {
+ $method = strtolower($method);
+ $step = $this->getCallCount($method);
+ $this->_addCall($method, $args);
+ return $this->_getReturn($method, $args, $step);
+ }
+
+ /**
+ * Triggers a PHP error if the method is not part
+ * of this object.
+ * @param string $method Name of method.
+ * @param string $task Description of task attempt.
+ * @access protected
+ */
+ function _dieOnNoMethod($method, $task) {
+ if ($this->_is_strict && !method_exists($this, $method)) {
+ trigger_error(
+ "Cannot $task as no ${method}() in class " . get_class($this),
+ E_USER_ERROR);
+ }
+ }
+
+ /**
+ * Adds one to the call count of a method.
+ * @param string $method Method called.
+ * @param array $args Arguments as an array.
+ * @access protected
+ */
+ function _addCall($method, $args) {
+ if (!isset($this->_call_counts[$method])) {
+ $this->_call_counts[$method] = 0;
+ }
+ $this->_call_counts[$method]++;
+ }
+
+ /**
+ * Fetches the call count of a method so far.
+ * @param string $method Method name called.
+ * @return Number of calls so far.
+ * @access public
+ */
+ function getCallCount($method) {
+ $this->_dieOnNoMethod($method, "get call count");
+ $method = strtolower($method);
+ if (! isset($this->_call_counts[$method])) {
+ return 0;
+ }
+ return $this->_call_counts[$method];
+ }
+
+ /**
+ * Sets a return for a parameter list that will
+ * be passed by value for all calls to this method.
+ * @param string $method Method name.
+ * @param mixed $value Result of call passed by value.
+ * @param array $args List of parameters to match
+ * including wildcards.
+ * @access public
+ */
+ function setReturnValue($method, $value, $args = false) {
+ $this->_dieOnNoMethod($method, "set return value");
+ $args = $this->_replaceWildcards($args);
+ $method = strtolower($method);
+ if (! isset($this->_returns[$method])) {
+ $this->_returns[$method] = new CallMap();
+ }
+ $this->_returns[$method]->addValue($args, $value);
+ }
+
+ /**
+ * Sets a return for a parameter list that will
+ * be passed by value only when the required call count
+ * is reached.
+ * @param integer $timing Number of calls in the future
+ * to which the result applies. If
+ * not set then all calls will return
+ * the value.
+ * @param string $method Method name.
+ * @param mixed $value Result of call passed by value.
+ * @param array $args List of parameters to match
+ * including wildcards.
+ * @access public
+ */
+ function setReturnValueAt($timing, $method, $value, $args = false) {
+ $this->_dieOnNoMethod($method, "set return value sequence");
+ $args = $this->_replaceWildcards($args);
+ $method = strtolower($method);
+ if (! isset($this->_return_sequence[$method])) {
+ $this->_return_sequence[$method] = array();
+ }
+ if (! isset($this->_return_sequence[$method][$timing])) {
+ $this->_return_sequence[$method][$timing] = new CallMap();
+ }
+ $this->_return_sequence[$method][$timing]->addValue($args, $value);
+ }
+
+ /**
+ * Sets a return for a parameter list that will
+ * be passed by reference for all calls.
+ * @param string $method Method name.
+ * @param mixed $reference Result of the call will be this object.
+ * @param array $args List of parameters to match
+ * including wildcards.
+ * @access public
+ */
+ function setReturnReference($method, &$reference, $args = false) {
+ $this->_dieOnNoMethod($method, "set return reference");
+ $args = $this->_replaceWildcards($args);
+ $method = strtolower($method);
+ if (! isset($this->_returns[$method])) {
+ $this->_returns[$method] = new CallMap();
+ }
+ $this->_returns[$method]->addReference($args, $reference);
+ }
+
+ /**
+ * Sets a return for a parameter list that will
+ * be passed by value only when the required call count
+ * is reached.
+ * @param integer $timing Number of calls in the future
+ * to which the result applies. If
+ * not set then all calls will return
+ * the value.
+ * @param string $method Method name.
+ * @param mixed $reference Result of the call will be this object.
+ * @param array $args List of parameters to match
+ * including wildcards.
+ * @access public
+ */
+ function setReturnReferenceAt($timing, $method, &$reference, $args = false) {
+ $this->_dieOnNoMethod($method, "set return reference sequence");
+ $args = $this->_replaceWildcards($args);
+ $method = strtolower($method);
+ if (! isset($this->_return_sequence[$method])) {
+ $this->_return_sequence[$method] = array();
+ }
+ if (! isset($this->_return_sequence[$method][$timing])) {
+ $this->_return_sequence[$method][$timing] = new CallMap();
+ }
+ $this->_return_sequence[$method][$timing]->addReference($args, $reference);
+ }
+
+ /**
+ * Finds the return value matching the incoming
+ * arguments. If there is no matching value found
+ * then an error is triggered.
+ * @param string $method Method name.
+ * @param array $args Calling arguments.
+ * @param integer $step Current position in the
+ * call history.
+ * @return mixed Stored return.
+ * @access protected
+ */
+ function &_getReturn($method, $args, $step) {
+ if (isset($this->_return_sequence[$method][$step])) {
+ if ($this->_return_sequence[$method][$step]->isMatch($args)) {
+ return $this->_return_sequence[$method][$step]->findFirstMatch($args);
+ }
+ }
+ if (isset($this->_returns[$method])) {
+ return $this->_returns[$method]->findFirstMatch($args);
+ }
+ return null;
+ }
+ }
+
+ /**
+ * An empty collection of methods that can have their
+ * return values set and expectations made of the
+ * calls upon them. The mock will assert the
+ * expectations against it's attached test case in
+ * addition to the server stub behaviour.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class SimpleMock extends SimpleStub {
+ var $_test;
+ var $_expected_counts;
+ var $_max_counts;
+ var $_expected_args;
+ var $_expected_args_at;
+
+ /**
+ * Creates an empty return list and expectation list.
+ * All call counts are set to zero.
+ * @param SimpleTestCase $test Test case to test expectations in.
+ * @param mixed $wildcard Parameter matching wildcard.
+ * @param boolean $is_strict Enables method name checks on
+ * expectations.
+ * @access public
+ */
+ function SimpleMock(&$test, $wildcard, $is_strict = true) {
+ $this->SimpleStub($wildcard, $is_strict);
+ if (! $test) {
+ trigger_error('No unit tester for mock object', E_USER_ERROR);
+ return;
+ }
+ $this->_test = &$test;
+ $this->_expected_counts = array();
+ $this->_max_counts = array();
+ $this->_expected_args = array();
+ $this->_expected_args_at = array();
+ }
+
+ /**
+ * Accessor for attached unit test so that when
+ * subclassed, new expectations can be added easily.
+ * @return SimpleTestCase Unit test passed in constructor.
+ * @access public
+ */
+ function &getTest() {
+ return $this->_test;
+ }
+
+ /**
+ * Die if bad arguments array is passed
+ * @param mixed $args The arguments value to be checked.
+ * @param string $task Description of task attempt.
+ * @return boolean Valid arguments
+ * @access private
+ */
+ function _checkArgumentsIsArray($args, $task) {
+ if (! is_array($args)) {
+ trigger_error(
+ "Cannot $task as \$args parameter is not an array",
+ E_USER_ERROR);
+ }
+ }
+
+ /**
+ * Sets up an expected call with a set of
+ * expected parameters in that call. All
+ * calls will be compared to these expectations
+ * regardless of when the call is made.
+ * @param string $method Method call to test.
+ * @param array $args Expected parameters for the call
+ * including wildcards.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectArguments($method, $args, $message = '%s') {
+ $this->_dieOnNoMethod($method, 'set expected arguments');
+ $this->_checkArgumentsIsArray($args, 'set expected arguments');
+ $args = $this->_replaceWildcards($args);
+ $message .= Mock::getExpectationLine(' at line [%d]');
+ $this->_expected_args[strtolower($method)] =
+ new ParametersExpectation($args, $message);
+ }
+
+ /**
+ * Sets up an expected call with a set of
+ * expected parameters in that call. The
+ * expected call count will be adjusted if it
+ * is set too low to reach this call.
+ * @param integer $timing Number of calls in the future at
+ * which to test. Next call is 0.
+ * @param string $method Method call to test.
+ * @param array $args Expected parameters for the call
+ * including wildcards.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectArgumentsAt($timing, $method, $args, $message = '%s') {
+ $this->_dieOnNoMethod($method, "set expected arguments at time");
+ $this->_checkArgumentsIsArray($args, "set expected arguments");
+ $args = $this->_replaceWildcards($args);
+ if (! isset($this->_expected_args_at[$timing])) {
+ $this->_expected_args_at[$timing] = array();
+ }
+ $method = strtolower($method);
+ $message .= Mock::getExpectationLine(' at line [%d]');
+ $this->_expected_args_at[$timing][$method] =
+ new ParametersExpectation($args, $message);
+ }
+
+ /**
+ * Sets an expectation for the number of times
+ * a method will be called. The tally method
+ * is used to check this.
+ * @param string $method Method call to test.
+ * @param integer $count Number of times it should
+ * have been called at tally.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectCallCount($method, $count, $message = '%s') {
+ $this->_dieOnNoMethod($method, "set expected call count");
+ $message .= Mock::getExpectationLine(' at line [%d]');
+ $this->_expected_counts[strtolower($method)] =
+ new CallCountExpectation($method, $count, $message);
+ }
+
+ /**
+ * Sets the number of times a method may be called
+ * before a test failure is triggered.
+ * @param string $method Method call to test.
+ * @param integer $count Most number of times it should
+ * have been called.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectMaximumCallCount($method, $count, $message = '%s') {
+ $this->_dieOnNoMethod($method, "set maximum call count");
+ $message .= Mock::getExpectationLine(' at line [%d]');
+ $this->_max_counts[strtolower($method)] =
+ new MaximumCallCountExpectation($method, $count, $message);
+ }
+
+ /**
+ * Sets the number of times to call a method to prevent
+ * a failure on the tally.
+ * @param string $method Method call to test.
+ * @param integer $count Least number of times it should
+ * have been called.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectMinimumCallCount($method, $count, $message = '%s') {
+ $this->_dieOnNoMethod($method, "set minimum call count");
+ $message .= Mock::getExpectationLine(' at line [%d]');
+ $this->_expected_counts[strtolower($method)] =
+ new MinimumCallCountExpectation($method, $count, $message);
+ }
+
+ /**
+ * Convenience method for barring a method
+ * call.
+ * @param string $method Method call to ban.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectNever($method, $message = '%s') {
+ $this->expectMaximumCallCount($method, 0, $message);
+ }
+
+ /**
+ * Convenience method for a single method
+ * call.
+ * @param string $method Method call to track.
+ * @param array $args Expected argument list or
+ * false for any arguments.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectOnce($method, $args = false, $message = '%s') {
+ $this->expectCallCount($method, 1, $message);
+ if ($args !== false) {
+ $this->expectArguments($method, $args, $message);
+ }
+ }
+
+ /**
+ * Convenience method for requiring a method
+ * call.
+ * @param string $method Method call to track.
+ * @param array $args Expected argument list or
+ * false for any arguments.
+ * @param string $message Overridden message.
+ * @access public
+ */
+ function expectAtLeastOnce($method, $args = false, $message = '%s') {
+ $this->expectMinimumCallCount($method, 1, $message);
+ if ($args !== false) {
+ $this->expectArguments($method, $args, $message);
+ }
+ }
+
+ /**
+ * Totals up the call counts and triggers a test
+ * assertion if a test is present for expected
+ * call counts.
+ * This method must be called explicitly for the call
+ * count assertions to be triggered.
+ * @access public
+ */
+ function tally() {
+ foreach ($this->_expected_counts as $method => $expectation) {
+ $this->_assertTrue(
+ $expectation->test($this->getCallCount($method)),
+ $expectation->overlayMessage($this->getCallCount($method)));
+ }
+ }
+
+ /**
+ * Returns the expected value for the method name
+ * and checks expectations. Will generate any
+ * test assertions as a result of expectations
+ * if there is a test present.
+ * @param string $method Name of method to simulate.
+ * @param array $args Arguments as an array.
+ * @return mixed Stored return.
+ * @access private
+ */
+ function &_invoke($method, $args) {
+ $method = strtolower($method);
+ $step = $this->getCallCount($method);
+ $this->_addCall($method, $args);
+ $this->_checkExpectations($method, $args, $step);
+ return $this->_getReturn($method, $args, $step);
+ }
+
+ /**
+ * Tests the arguments against expectations.
+ * @param string $method Method to check.
+ * @param array $args Argument list to match.
+ * @param integer $timing The position of this call
+ * in the call history.
+ * @access private
+ */
+ function _checkExpectations($method, $args, $timing) {
+ if (isset($this->_max_counts[$method])) {
+ if (! $this->_max_counts[$method]->test($timing + 1)) {
+ $this->_assertTrue(
+ false,
+ $this->_max_counts[$method]->overlayMessage($timing + 1));
+ }
+ }
+ if (isset($this->_expected_args_at[$timing][$method])) {
+ $this->_assertTrue(
+ $this->_expected_args_at[$timing][$method]->test($args),
+ "Mock method [$method] at [$timing] -> " .
+ $this->_expected_args_at[$timing][$method]->overlayMessage($args));
+ } elseif (isset($this->_expected_args[$method])) {
+ $this->_assertTrue(
+ $this->_expected_args[$method]->test($args),
+ "Mock method [$method] -> " . $this->_expected_args[$method]->overlayMessage($args));
+ }
+ }
+
+ /**
+ * Triggers an assertion on the held test case.
+ * Should be overridden when using another test
+ * framework other than the SimpleTest one if the
+ * assertion method has a different name.
+ * @param boolean $assertion True will pass.
+ * @param string $message Message that will go with
+ * the test event.
+ * @access protected
+ */
+ function _assertTrue($assertion, $message) {
+ $this->_test->assertTrue($assertion, $message);
+ }
+ }
+
+ /**
+ * Static methods only service class for code generation of
+ * server stubs.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class Stub {
+
+ /**
+ * Factory for server stub classes.
+ */
+ function Stub() {
+ trigger_error('Stub factory methods are class only.');
+ }
+
+ /**
+ * Clones a class' interface and creates a stub version
+ * that can have return values set.
+ * @param string $class Class to clone.
+ * @param string $stub_class New class name. Default is
+ * the old name with "Stub"
+ * prepended.
+ * @param array $methods Additional methods to add beyond
+ * those in th cloned class. Use this
+ * to emulate the dynamic addition of
+ * methods in the cloned class or when
+ * the class hasn't been written yet.
+ * @static
+ * @access public
+ */
+ function generate($class, $stub_class = false, $methods = false) {
+ if (! class_exists($class)) {
+ return false;
+ }
+ if (! $stub_class) {
+ $stub_class = "Stub" . $class;
+ }
+ if (class_exists($stub_class)) {
+ return false;
+ }
+ return eval(Stub::_createClassCode(
+ $class,
+ $stub_class,
+ $methods ? $methods : array()) . " return true;");
+ }
+
+ /**
+ * The new server stub class code in string form.
+ * @param string $class Class to clone.
+ * @param string $mock_class New class name.
+ * @param array $methods Additional methods.
+ * @static
+ * @access private
+ */
+ function _createClassCode($class, $stub_class, $methods) {
+ $stub_base = SimpleTestOptions::getStubBaseClass();
+ $code = "class $stub_class extends $stub_base {\n";
+ $code .= " function $stub_class(\$wildcard = MOCK_WILDCARD) {\n";
+ $code .= " \$this->$stub_base(\$wildcard);\n";
+ $code .= " }\n";
+ $code .= Stub::_createHandlerCode($class, $stub_base, $methods);
+ $code .= "}\n";
+ return $code;
+ }
+
+ /**
+ * Creates code within a class to generate replaced
+ * methods. All methods call the _invoke() handler
+ * with the method name and the arguments in an
+ * array.
+ * @param string $class Class to clone.
+ * @param string $base Base class with methods that
+ * cannot be cloned.
+ * @param array $methods Additional methods.
+ * @static
+ * @access private
+ */
+ function _createHandlerCode($class, $base, $methods) {
+ $code = "";
+ $methods = array_merge($methods, get_class_methods($class));
+ foreach ($methods as $method) {
+ if (($method == '__construct') || ($method == '__clone')) {
+ continue;
+ }
+ if (in_array($method, get_class_methods($base))) {
+ continue;
+ }
+ $code .= " function &$method() {\n";
+ $code .= " \$args = func_get_args();\n";
+ $code .= " return \$this->_invoke(\"$method\", \$args);\n";
+ $code .= " }\n";
+ }
+ return $code;
+ }
+ }
+
+ /**
+ * Static methods only service class for code generation of
+ * mock objects.
+ * @package SimpleTest
+ * @subpackage MockObjects
+ */
+ class Mock {
+
+ /**
+ * Factory for mock object classes.
+ * @access public
+ */
+ function Mock() {
+ trigger_error("Mock factory methods are class only.");
+ }
+
+ /**
+ * Clones a class' interface and creates a mock version
+ * that can have return values and expectations set.
+ * @param string $class Class to clone.
+ * @param string $mock_class New class name. Default is
+ * the old name with "Mock"
+ * prepended.
+ * @param array $methods Additional methods to add beyond
+ * those in th cloned class. Use this
+ * to emulate the dynamic addition of
+ * methods in the cloned class or when
+ * the class hasn't been written yet.
+ * @static
+ * @access public
+ */
+ function generate($class, $mock_class = false, $methods = false) {
+ if (! class_exists($class)) {
+ return false;
+ }
+ if (! $mock_class) {
+ $mock_class = "Mock" . $class;
+ }
+ if (class_exists($mock_class)) {
+ return false;
+ }
+ return eval(Mock::_createClassCode(
+ $class,
+ $mock_class,
+ $methods ? $methods : array()) . " return true;");
+ }
+
+ /**
+ * Generates a version of a class with selected
+ * methods mocked only. Inherits the old class
+ * and chains the mock methods of an aggregated
+ * mock object.
+ * @param string $class Class to clone.
+ * @param string $mock_class New class name.
+ * @param array $methods Methods to be overridden
+ * with mock versions.
+ * @static
+ * @access public
+ */
+ function generatePartial($class, $mock_class, $methods) {
+ if (! class_exists($class)) {
+ return false;
+ }
+ if (class_exists($mock_class)) {
+ trigger_error("Partial mock class [$mock_class] already exists");
+ return false;
+ }
+ return eval(Mock::_extendClassCode($class, $mock_class, $methods));
+ }
+
+ /**
+ * The new mock class code as a string.
+ * @param string $class Class to clone.
+ * @param string $mock_class New class name.
+ * @param array $methods Additional methods.
+ * @return string Code for new mock class.
+ * @static
+ * @access private
+ */
+ function _createClassCode($class, $mock_class, $methods) {
+ $mock_base = SimpleTestOptions::getMockBaseClass();
+ $code = "class $mock_class extends $mock_base {\n";
+ $code .= " function $mock_class(&\$test, \$wildcard = MOCK_WILDCARD) {\n";
+ $code .= " \$this->$mock_base(\$test, \$wildcard);\n";
+ $code .= " }\n";
+ $code .= Stub::_createHandlerCode($class, $mock_base, $methods);
+ $code .= "}\n";
+ return $code;
+ }
+
+ /**
+ * The extension class code as a string. The class
+ * composites a mock object and chains mocked methods
+ * to it.
+ * @param string $class Class to extend.
+ * @param string $mock_class New class name.
+ * @param array $methods Mocked methods.
+ * @return string Code for a new class.
+ * @static
+ * @access private
+ */
+ function _extendClassCode($class, $mock_class, $methods) {
+ $mock_base = SimpleTestOptions::getMockBaseClass();
+ $code = "class $mock_class extends $class {\n";
+ $code .= " var \$_mock;\n";
+ $code .= Mock::_addMethodList($methods);
+ $code .= "\n";
+ $code .= " function $mock_class(&\$test, \$wildcard = MOCK_WILDCARD) {\n";
+ $code .= " \$this->_mock = &new $mock_base(\$test, \$wildcard, false);\n";
+ $code .= " }\n";
+ $code .= Mock::_chainMockReturns();
+ $code .= Mock::_chainMockExpectations();
+ $code .= Mock::_overrideMethods($methods);
+ $code .= SimpleTestOptions::getPartialMockCode();
+ $code .= "}\n";
+ return $code;
+ }
+
+ /**
+ * Creates a list of mocked methods for error checking.
+ * @param array $methods Mocked methods.
+ * @return string Code for a method list.
+ * @access private
+ */
+ function _addMethodList($methods) {
+ return " var \$_mocked_methods = array('" .
+ implode("', '", $methods) . "');\n";
+ }
+
+ /**
+ * Creates code to abandon the expectation if not mocked.
+ * @param string $alias Parameter name of method name.
+ * @return string Code for bail out.
+ * @access private
+ */
+ function _bailOutIfNotMocked($alias) {
+ $code = " if (! in_array($alias, \$this->_mocked_methods)) {\n";
+ $code .= " trigger_error('Method [$alias] is not mocked');\n";
+ $code .= " return;\n";
+ $code .= " }\n";
+ return $code;
+ }
+
+ /**
+ * Creates source code for chaining to the composited
+ * mock object.
+ * @return string Code for mock set up.
+ * @access private
+ */
+ function _chainMockReturns() {
+ $code = " function setReturnValue(\$method, \$value, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->setReturnValue(\$method, \$value, \$args);\n";
+ $code .= " }\n";
+ $code .= " function setReturnValueAt(\$timing, \$method, \$value, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->setReturnValueAt(\$timing, \$method, \$value, \$args);\n";
+ $code .= " }\n";
+ $code .= " function setReturnReference(\$method, &\$ref, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->setReturnReference(\$method, \$ref, \$args);\n";
+ $code .= " }\n";
+ $code .= " function setReturnReferenceAt(\$timing, \$method, &\$ref, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->setReturnReferenceAt(\$timing, \$method, \$ref, \$args);\n";
+ $code .= " }\n";
+ return $code;
+ }
+
+ /**
+ * Creates source code for chaining to an aggregated
+ * mock object.
+ * @return string Code for expectations.
+ * @access private
+ */
+ function _chainMockExpectations() {
+ $code = " function expectArguments(\$method, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectArguments(\$method, \$args);\n";
+ $code .= " }\n";
+ $code .= " function expectArgumentsAt(\$timing, \$method, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectArgumentsAt(\$timing, \$method, \$args);\n";
+ $code .= " }\n";
+ $code .= " function expectCallCount(\$method, \$count) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectCallCount(\$method, \$count);\n";
+ $code .= " }\n";
+ $code .= " function expectMaximumCallCount(\$method, \$count) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectMaximumCallCount(\$method, \$count);\n";
+ $code .= " }\n";
+ $code .= " function expectMinimumCallCount(\$method, \$count) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectMinimumCallCount(\$method, \$count);\n";
+ $code .= " }\n";
+ $code .= " function expectNever(\$method) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectNever(\$method);\n";
+ $code .= " }\n";
+ $code .= " function expectOnce(\$method, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectOnce(\$method, \$args);\n";
+ $code .= " }\n";
+ $code .= " function expectAtLeastOnce(\$method, \$args = false) {\n";
+ $code .= Mock::_bailOutIfNotMocked("\$method");
+ $code .= " \$this->_mock->expectAtLeastOnce(\$method, \$args);\n";
+ $code .= " }\n";
+ $code .= " function tally() {\n";
+ $code .= " \$this->_mock->tally();\n";
+ $code .= " }\n";
+ return $code;
+ }
+
+ /**
+ * Creates source code to override a list of methods
+ * with mock versions.
+ * @param array $methods Methods to be overridden
+ * with mock versions.
+ * @return string Code for overridden chains.
+ * @access private
+ */
+ function _overrideMethods($methods) {
+ $code = "";
+ foreach ($methods as $method) {
+ $code .= " function &$method() {\n";
+ $code .= " \$args = func_get_args();\n";
+ $code .= " return \$this->_mock->_invoke(\"$method\", \$args);\n";
+ $code .= " }\n";
+ }
+ return $code;
+ }
+
+ /**
+ * Uses a stack trace to find the line of an assertion.
+ * @param string $format String formatting.
+ * @param array $stack Stack frames top most first. Only
+ * needed if not using the PHP
+ * backtrace function.
+ * @return string Line number of first assert*
+ * method embedded in format string.
+ * @access public
+ * @static
+ */
+ function getExpectationLine($format = '%d', $stack = false) {
+ if ($stack === false) {
+ $stack = SimpleTestCompatibility::getStackTrace();
+ }
+ return SimpleDumper::getFormattedAssertionLine($stack, $format, 'expect');
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @version $Id: options.php,v 1.28 2004/08/18 16:24:00 lastcraft Exp $
+ */
+
+ /**
+ * Static global directives and options.
+ * @package SimpleTest
+ */
+ class SimpleTestOptions {
+
+ /**
+ * Reads the SimpleTest version from the release file.
+ * @return string Version string.
+ * @static
+ * @access public
+ */
+ function getVersion() {
+ $content = file(dirname(__FILE__) . '/VERSION');
+ return trim($content[0]);
+ }
+
+ /**
+ * Sets the name of a test case to ignore, usually
+ * because the class is an abstract case that should
+ * not be run.
+ * @param string $class Add a class to ignore.
+ * @static
+ * @access public
+ */
+ function ignore($class) {
+ $registry = &SimpleTestOptions::_getRegistry();
+ $registry['IgnoreList'][] = strtolower($class);
+ }
+
+ /**
+ * Test to see if a test case is in the ignore
+ * list.
+ * @param string $class Class name to test.
+ * @return boolean True if should not be run.
+ * @access public
+ * @static
+ */
+ function isIgnored($class) {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return in_array(strtolower($class), $registry['IgnoreList']);
+ }
+
+ /**
+ * The base class name is settable here. This is the
+ * class that a new stub will inherited from.
+ * To modify the generated stubs simply extend the
+ * SimpleStub class and set it's name
+ * with this method before any stubs are generated.
+ * @param string $stub_base Server stub class to use.
+ * @static
+ * @access public
+ */
+ function setStubBaseClass($stub_base) {
+ $registry = &SimpleTestOptions::_getRegistry();
+ $registry['StubBaseClass'] = $stub_base;
+ }
+
+ /**
+ * Accessor for the currently set stub base class.
+ * @return string Class name to inherit from.
+ * @static
+ * @access public
+ */
+ function getStubBaseClass() {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return $registry['StubBaseClass'];
+ }
+
+ /**
+ * The base class name is settable here. This is the
+ * class that a new mock will inherited from.
+ * To modify the generated mocks simply extend the
+ * SimpleMock class and set it's name
+ * with this method before any mocks are generated.
+ * @param string $mock_base Mock base class to use.
+ * @static
+ * @access public
+ */
+ function setMockBaseClass($mock_base) {
+ $registry = &SimpleTestOptions::_getRegistry();
+ $registry['MockBaseClass'] = $mock_base;
+ }
+
+ /**
+ * Accessor for the currently set mock base class.
+ * @return string Class name to inherit from.
+ * @static
+ * @access public
+ */
+ function getMockBaseClass() {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return $registry['MockBaseClass'];
+ }
+
+ /**
+ * Adds additional mock code.
+ * @param string $code Extra code that can be added
+ * to the partial mocks for
+ * extra functionality. Useful
+ * when a test tool has overridden
+ * the mock base classes.
+ * @access public
+ */
+ function addPartialMockCode($code = '') {
+ $registry = &SimpleTestOptions::_getRegistry();
+ $registry['AdditionalPartialMockCode'] = $code;
+ }
+
+ /**
+ * Accessor for additional partial mock code.
+ * @return string Extra code.
+ * @access public
+ */
+ function getPartialMockCode() {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return $registry['AdditionalPartialMockCode'];
+ }
+
+ /**
+ * Sets proxy to use on all requests for when
+ * testing from behind a firewall. Set host
+ * to false to disable. This will take effect
+ * if there are no other proxy settings.
+ * @param string $proxy Proxy host as URL.
+ * @param string $username Proxy username for authentication.
+ * @param string $password Proxy password for authentication.
+ * @access public
+ */
+ function useProxy($proxy, $username = false, $password = false) {
+ $registry = &SimpleTestOptions::_getRegistry();
+ $registry['DefaultProxy'] = $proxy;
+ $registry['DefaultProxyUsername'] = $username;
+ $registry['DefaultProxyPassword'] = $password;
+ }
+
+ /**
+ * Accessor for default proxy host.
+ * @return string Proxy URL.
+ * @access public
+ */
+ function getDefaultProxy() {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return $registry['DefaultProxy'];
+ }
+
+ /**
+ * Accessor for default proxy username.
+ * @return string Proxy username for authentication.
+ * @access public
+ */
+ function getDefaultProxyUsername() {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return $registry['DefaultProxyUsername'];
+ }
+
+ /**
+ * Accessor for default proxy password.
+ * @return string Proxy password for authentication.
+ * @access public
+ */
+ function getDefaultProxyPassword() {
+ $registry = &SimpleTestOptions::_getRegistry();
+ return $registry['DefaultProxyPassword'];
+ }
+
+ /**
+ * Accessor for global registry of options.
+ * @return hash All stored values.
+ * @access private
+ * @static
+ */
+ function &_getRegistry() {
+ static $registry = false;
+ if (! $registry) {
+ $registry = SimpleTestOptions::_getDefaults();
+ }
+ return $registry;
+ }
+
+ /**
+ * Constant default values.
+ * @return hash All registry defaults.
+ * @access private
+ * @static
+ */
+ function _getDefaults() {
+ return array(
+ 'StubBaseClass' => 'SimpleStub',
+ 'MockBaseClass' => 'SimpleMock',
+ 'IgnoreList' => array(),
+ 'AdditionalPartialMockCode' => '',
+ 'DefaultProxy' => false,
+ 'DefaultProxyUsername' => false,
+ 'DefaultProxyPassword' => false);
+ }
+ }
+
+ /**
+ * Static methods for compatibility between different
+ * PHP versions.
+ * @package SimpleTest
+ */
+ class SimpleTestCompatibility {
+
+ /**
+ * Identity test. Drops back to equality for PHP5
+ * objects as the === operator counts as the
+ * stronger reference constraint.
+ * @param mixed $first Test subject.
+ * @param mixed $second Comparison object.
+ * @access public
+ * @static
+ */
+ function isIdentical($first, $second) {
+ if (version_compare(phpversion(), '5') >= 0) {
+ if (gettype($first) != gettype($second)) {
+ return false;
+ }
+ if ($first != $second) {
+ return false;
+ }
+ if (is_object($first) && is_object($second)) {
+ return (get_class($first) == get_class($second));
+ }
+ if (is_array($first) && is_array($second)) {
+ if (array_keys($first) != array_keys($second)) {
+ return false;
+ }
+ foreach (array_keys($first) as $key) {
+ if (! SimpleTestCompatibility::isIdentical($first[$key], $second[$key])) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ return ($first === $second);
+ }
+
+ /**
+ * Test to see if an object is a member of a
+ * class hiearchy.
+ * @param object $object Object to test.
+ * @param string $class Root name of hiearchy.
+ * @access public
+ * @static
+ */
+ function isA($object, $class) {
+ if (version_compare(phpversion(), '5') >= 0) {
+ if (! class_exists($class)) {
+ return false;
+ }
+ eval("\$is_a = \$object instanceof $class;");
+ return $is_a;
+ }
+ if (function_exists('is_a')) {
+ return is_a($object, $class);
+ }
+ return ((strtolower($class) == get_class($object))
+ or (is_subclass_of($object, $class)));
+ }
+
+ /**
+ * Sets a socket timeout for each chunk.
+ * @param resource $handle Socket handle.
+ * @param integer $timeout Limit in seconds.
+ * @access public
+ * @static
+ */
+ function setTimeout($handle, $timeout) {
+ stream_set_timeout($handle, $timeout, 0);
+ }
+
+ /**
+ * Gets the current stack trace topmost first.
+ * @return array List of stack frames.
+ * @access public
+ * @static
+ */
+ function getStackTrace() {
+ if (function_exists('debug_backtrace')) {
+ return array_reverse(debug_backtrace());
+ }
+ return array();
+ }
+ }
+?>
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: page.php,v 1.99 2004/08/18 23:10:19 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/http.php');
+ require_once(dirname(__FILE__) . '/parser.php');
+ require_once(dirname(__FILE__) . '/tag.php');
+ require_once(dirname(__FILE__) . '/form.php');
+ /**#@-*/
+
+ /**
+ * SAX event handler. Maintains a list of
+ * open tags and dispatches them as they close.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimplePageBuilder extends SimpleSaxListener {
+ var $_tags;
+ var $_page;
+
+ /**
+ * Sets the builder up empty.
+ * @access public
+ */
+ function SimplePageBuilder() {
+ $this->SimpleSaxListener();
+ }
+
+ /**
+ * Reads the raw content and send events
+ * into the page to be built.
+ * @param $response SimpleHttpResponse Fetched response.
+ * @return SimplePage Newly parsed page.
+ * @access public
+ */
+ function parse($response) {
+ $this->_tags = array();
+ $this->_page = &$this->_createPage($response);
+ $parser = &$this->_createParser();
+ $parser->parse($response->getContent());
+ return $this->_page;
+ }
+
+ /**
+ * Creates an empty page.
+ * @return SimplePage New unparsed page.
+ * @access protected
+ */
+ function &_createPage($response) {
+ return new SimplePage($response);
+ }
+
+ /**
+ * Creates the parser used with the builder.
+ * @return SimpleSaxParser Parser to generate events for
+ * the builder.
+ * @access protected
+ */
+ function &_createParser() {
+ return new SimpleSaxParser($this);
+ }
+
+ /**
+ * Start of element event. Opens a new tag.
+ * @param string $name Element name.
+ * @param hash $attributes Attributes without content
+ * are marked as true.
+ * @return boolean False on parse error.
+ * @access public
+ */
+ function startElement($name, $attributes) {
+ $tag = &$this->_createTag($name, $attributes);
+ if ($name == 'form') {
+ $this->_page->acceptFormStart($tag);
+ return true;
+ }
+ if ($name == 'frameset') {
+ $this->_page->acceptFramesetStart($tag);
+ return true;
+ }
+ if ($name == 'frame') {
+ $this->_page->acceptFrame($tag);
+ return true;
+ }
+ if ($tag->expectEndTag()) {
+ $this->_openTag($tag);
+ return true;
+ }
+ $this->_page->acceptTag($tag);
+ return true;
+ }
+
+ /**
+ * End of element event.
+ * @param string $name Element name.
+ * @return boolean False on parse error.
+ * @access public
+ */
+ function endElement($name) {
+ if ($name == 'form') {
+ $this->_page->acceptFormEnd();
+ return true;
+ }
+ if ($name == 'frameset') {
+ $this->_page->acceptFramesetEnd();
+ return true;
+ }
+ if (isset($this->_tags[$name]) && (count($this->_tags[$name]) > 0)) {
+ $tag = array_pop($this->_tags[$name]);
+ $this->_addContentTagToOpenTags($tag);
+ $this->_page->acceptTag($tag);
+ return true;
+ }
+ return true;
+ }
+
+ /**
+ * Unparsed, but relevant data. The data is added
+ * to every open tag.
+ * @param string $text May include unparsed tags.
+ * @return boolean False on parse error.
+ * @access public
+ */
+ function addContent($text) {
+ foreach (array_keys($this->_tags) as $name) {
+ for ($i = 0; $i < count($this->_tags[$name]); $i++) {
+ $this->_tags[$name][$i]->addContent($text);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Parsed relevant data. The parsed tag is added
+ * to every open tag.
+ * @param SimpleTag $tag May include unparsed tags.
+ * @access private
+ */
+ function _addContentTagToOpenTags(&$tag) {
+ if (! in_array($tag->getTagName(), array('option'))) {
+ return;
+ }
+ foreach (array_keys($this->_tags) as $name) {
+ for ($i = 0; $i < count($this->_tags[$name]); $i++) {
+ $this->_tags[$name][$i]->addTag($tag);
+ }
+ }
+ }
+
+ /**
+ * Opens a tag for receiving content. Multiple tags
+ * will be receiving input at the same time.
+ * @param SimpleTag $tag New content tag.
+ * @access private
+ */
+ function _openTag(&$tag) {
+ $name = $tag->getTagName();
+ if (! in_array($name, array_keys($this->_tags))) {
+ $this->_tags[$name] = array();
+ }
+ array_push($this->_tags[$name], $tag);
+ }
+
+ /**
+ * Factory for the tag objects. Creates the
+ * appropriate tag object for the incoming tag name.
+ * @param string $name HTML tag name.
+ * @param hash $attributes Element attributes.
+ * @return SimpleTag Tag object.
+ * @access protected
+ */
+ function &_createTag($name, $attributes) {
+ if ($name == 'a') {
+ return new SimpleAnchorTag($attributes);
+ } elseif ($name == 'title') {
+ return new SimpleTitleTag($attributes);
+ } elseif ($name == 'input') {
+ return $this->_createInputTag($attributes);
+ } elseif ($name == 'button') {
+ return new SimpleButtonTag($attributes);
+ } elseif ($name == 'textarea') {
+ return new SimpleTextAreaTag($attributes);
+ } elseif ($name == 'select') {
+ return $this->_createSelectionTag($attributes);
+ } elseif ($name == 'option') {
+ return new SimpleOptionTag($attributes);
+ } elseif ($name == 'form') {
+ return new SimpleFormTag($attributes);
+ } elseif ($name == 'frame') {
+ return new SimpleFrameTag($attributes);
+ }
+ return new SimpleTag($name, $attributes);
+ }
+
+ /**
+ * Factory for selection fields.
+ * @param hash $attributes Element attributes.
+ * @return SimpleTag Tag object.
+ * @access protected
+ */
+ function &_createSelectionTag($attributes) {
+ if (isset($attributes['multiple'])) {
+ return new MultipleSelectionTag($attributes);
+ }
+ return new SimpleSelectionTag($attributes);
+ }
+
+ /**
+ * Factory for input tags.
+ * @param hash $attributes Element attributes.
+ * @return SimpleTag Tag object.
+ * @access protected
+ */
+ function &_createInputTag($attributes) {
+ if (! isset($attributes['type'])) {
+ return new SimpleTextTag($attributes);
+ }
+ if ($attributes['type'] == 'submit') {
+ return new SimpleSubmitTag($attributes);
+ } elseif ($attributes['type'] == 'image') {
+ return new SimpleImageSubmitTag($attributes);
+ } elseif ($attributes['type'] == 'checkbox') {
+ return new SimpleCheckboxTag($attributes);
+ } elseif ($attributes['type'] == 'radio') {
+ return new SimpleRadioButtonTag($attributes);
+ } else {
+ return new SimpleTextTag($attributes);
+ }
+ }
+ }
+
+ /**
+ * A wrapper for a web page.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimplePage {
+ var $_links;
+ var $_title;
+ var $_open_forms;
+ var $_complete_forms;
+ var $_frameset;
+ var $_frames;
+ var $_frameset_nesting_level;
+ var $_transport_error;
+ var $_raw;
+ var $_sent;
+ var $_headers;
+ var $_method;
+ var $_url;
+ var $_request_data;
+
+ /**
+ * Parses a page ready to access it's contents.
+ * @param SimpleHttpResponse $response Result of HTTP fetch.
+ * @access public
+ */
+ function SimplePage($response = false) {
+ $this->_links = array();
+ $this->_title = false;
+ $this->_open_forms = array();
+ $this->_complete_forms = array();
+ $this->_frameset = false;
+ $this->_frames = array();
+ $this->_frameset_nesting_level = 0;
+ if ($response) {
+ $this->_extractResponse($response);
+ } else {
+ $this->_noResponse();
+ }
+ }
+
+ /**
+ * Extracts all of the response information.
+ * @param SimpleHttpResponse $response Response being parsed.
+ * @access private
+ */
+ function _extractResponse($response) {
+ $this->_transport_error = $response->getError();
+ $this->_raw = $response->getContent();
+ $this->_sent = $response->getSent();
+ $this->_headers = $response->getHeaders();
+ $this->_method = $response->getMethod();
+ $this->_url = $response->getUrl();
+ $this->_request_data = $response->getRequestData();
+ }
+
+ /**
+ * Sets up a missng response.
+ * @access private
+ */
+ function _noResponse() {
+ $this->_transport_error = 'No page fetched yet';
+ $this->_raw = false;
+ $this->_sent = false;
+ $this->_headers = false;
+ $this->_method = 'GET';
+ $this->_url = false;
+ $this->_request_data = false;
+ }
+
+ /**
+ * Original request as bytes sent down the wire.
+ * @return mixed Sent content.
+ * @access public
+ */
+ function getRequest() {
+ return $this->_sent;
+ }
+
+ /**
+ * Accessor for raw text of page.
+ * @return string Raw unparsed content.
+ * @access public
+ */
+ function getRaw() {
+ return $this->_raw;
+ }
+
+ /**
+ * Accessor for raw headers of page.
+ * @return string Header block as text.
+ * @access public
+ */
+ function getHeaders() {
+ if ($this->_headers) {
+ return $this->_headers->getRaw();
+ }
+ return false;
+ }
+
+ /**
+ * Original request method.
+ * @return string GET, POST or HEAD.
+ * @access public
+ */
+ function getMethod() {
+ return $this->_method;
+ }
+
+ /**
+ * Original resource name.
+ * @return SimpleUrl Current url.
+ * @access public
+ */
+ function getUrl() {
+ return $this->_url;
+ }
+
+ /**
+ * Original request data.
+ * @return mixed Sent content.
+ * @access public
+ */
+ function getRequestData() {
+ return $this->_request_data;
+ }
+
+ /**
+ * Accessor for last error.
+ * @return string Error from last response.
+ * @access public
+ */
+ function getTransportError() {
+ return $this->_transport_error;
+ }
+
+ /**
+ * Accessor for current MIME type.
+ * @return string MIME type as string; e.g. 'text/html'
+ * @access public
+ */
+ function getMimeType() {
+ if ($this->_headers) {
+ return $this->_headers->getMimeType();
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for HTTP response code.
+ * @return integer HTTP response code received.
+ * @access public
+ */
+ function getResponseCode() {
+ if ($this->_headers) {
+ return $this->_headers->getResponseCode();
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for last Authentication type. Only valid
+ * straight after a challenge (401).
+ * @return string Description of challenge type.
+ * @access public
+ */
+ function getAuthentication() {
+ if ($this->_headers) {
+ return $this->_headers->getAuthentication();
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for last Authentication realm. Only valid
+ * straight after a challenge (401).
+ * @return string Name of security realm.
+ * @access public
+ */
+ function getRealm() {
+ if ($this->_headers) {
+ return $this->_headers->getRealm();
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for current frame focus. Will be
+ * false as no frames.
+ * @return array Always empty.
+ * @access public
+ */
+ function getFrameFocus() {
+ return array();
+ }
+
+ /**
+ * Sets the focus by index. The integer index starts from 1.
+ * @param integer $choice Chosen frame.
+ * @return boolean Always false.
+ * @access public
+ */
+ function setFrameFocusByIndex($choice) {
+ return false;
+ }
+
+ /**
+ * Sets the focus by name. Always fails for a leaf page.
+ * @param string $name Chosen frame.
+ * @return boolean False as no frames.
+ * @access public
+ */
+ function setFrameFocus($name) {
+ return false;
+ }
+
+ /**
+ * Clears the frame focus. Does nothing for a leaf page.
+ * @access public
+ */
+ function clearFrameFocus() {
+ }
+
+ /**
+ * Adds a tag to the page.
+ * @param SimpleTag $tag Tag to accept.
+ * @access public
+ */
+ function acceptTag(&$tag) {
+ if ($tag->getTagName() == "a") {
+ $this->_addLink($tag);
+ } elseif ($tag->getTagName() == "title") {
+ $this->_setTitle($tag);
+ } elseif ($this->_isFormElement($tag->getTagName())) {
+ for ($i = 0; $i < count($this->_open_forms); $i++) {
+ $this->_open_forms[$i]->addWidget($tag);
+ }
+ }
+ }
+
+ /**
+ * Tests to see if a tag is a possible form
+ * element.
+ * @param string $name HTML element name.
+ * @return boolean True if form element.
+ * @access private
+ */
+ function _isFormElement($name) {
+ return in_array($name, array('input', 'button', 'textarea', 'select'));
+ }
+
+ /**
+ * Opens a form. New widgets go here.
+ * @param SimpleFormTag $tag Tag to accept.
+ * @access public
+ */
+ function acceptFormStart(&$tag) {
+ $this->_open_forms[] = &new SimpleForm($tag, $this->getUrl());
+ }
+
+ /**
+ * Closes the most recently opened form.
+ * @access public
+ */
+ function acceptFormEnd() {
+ if (count($this->_open_forms)) {
+ $this->_complete_forms[] = array_pop($this->_open_forms);
+ }
+ }
+
+ /**
+ * Opens a frameset. A frameset may contain nested
+ * frameset tags.
+ * @param SimpleFramesetTag $tag Tag to accept.
+ * @access public
+ */
+ function acceptFramesetStart(&$tag) {
+ if (! $this->_isLoadingFrames()) {
+ $this->_frameset = &$tag;
+ }
+ $this->_frameset_nesting_level++;
+ }
+
+ /**
+ * Closes the most recently opened frameset.
+ * @access public
+ */
+ function acceptFramesetEnd() {
+ if ($this->_isLoadingFrames()) {
+ $this->_frameset_nesting_level--;
+ }
+ }
+
+ /**
+ * Takes a single frame tag and stashes it in
+ * the current frame set.
+ * @param SimpleFrameTag $tag Tag to accept.
+ * @access public
+ */
+ function acceptFrame(&$tag) {
+ if ($this->_isLoadingFrames()) {
+ if ($tag->getAttribute('src')) {
+ $this->_frames[] = &$tag;
+ }
+ }
+ }
+
+ /**
+ * Test to see if in the middle of reading
+ * a frameset.
+ * @return boolean True if inframeset.
+ * @access private
+ */
+ function _isLoadingFrames() {
+ if (! $this->_frameset) {
+ return false;
+ }
+ return ($this->_frameset_nesting_level > 0);
+ }
+
+ /**
+ * Test to see if link is an absolute one.
+ * @param string $url Url to test.
+ * @return boolean True if absolute.
+ * @access protected
+ */
+ function _linkIsAbsolute($url) {
+ $parsed = new SimpleUrl($url);
+ return (boolean)($parsed->getScheme() && $parsed->getHost());
+ }
+
+ /**
+ * Adds a link to the page.
+ * @param SimpleAnchorTag $tag Link to accept.
+ * @access protected
+ */
+ function _addLink($tag) {
+ $this->_links[] = $tag;
+ }
+
+ /**
+ * Test for the presence of a frameset.
+ * @return boolean True if frameset.
+ * @access public
+ */
+ function hasFrames() {
+ return (boolean)$this->_frameset;
+ }
+
+ /**
+ * Accessor for frame name and source URL for every frame that
+ * will need to be loaded. Immediate children only.
+ * @return boolean/array False if no frameset or
+ * otherwise a hash of frame URLs.
+ * The key is either a numerical
+ * base one index or the name attribute.
+ * @access public
+ */
+ function getFrameset() {
+ if (! $this->_frameset) {
+ return false;
+ }
+ $urls = array();
+ for ($i = 0; $i < count($this->_frames); $i++) {
+ $name = $this->_frames[$i]->getAttribute('name');
+ $url = new SimpleUrl($this->_frames[$i]->getAttribute('src'));
+ $urls[$name ? $name : $i + 1] = $url->makeAbsolute($this->getUrl());
+ }
+ return $urls;
+ }
+
+ /**
+ * Fetches a list of loaded frames.
+ * @return array/string Just the URL for a single
+ * page.
+ * @access public
+ */
+ function getFrames() {
+ $url = $this->getUrl();
+ return $url->asString();
+ }
+
+ /**
+ * Accessor for a list of all fixed links.
+ * @return array List of urls with scheme of
+ * http or https and hostname.
+ * @access public
+ */
+ function getAbsoluteUrls() {
+ $all = array();
+ foreach ($this->_links as $link) {
+ if ($this->_linkIsAbsolute($link->getHref())) {
+ $all[] = $link->getHref();
+ }
+ }
+ return $all;
+ }
+
+ /**
+ * Accessor for a list of all relative links.
+ * @return array List of urls without hostname.
+ * @access public
+ */
+ function getRelativeUrls() {
+ $all = array();
+ foreach ($this->_links as $link) {
+ if (! $this->_linkIsAbsolute($link->getHref())) {
+ $all[] = $link->getHref();
+ }
+ }
+ return $all;
+ }
+
+ /**
+ * Space at the ends will be stripped and space in
+ * between is reduced to one space.
+ * @param string $html Typical HTML code.
+ * @return string Content as big string.
+ * @access private
+ */
+ function _normalise($html) {
+ return preg_replace('/\S\s+\S/', ' ', strtolower(trim($html)));
+ }
+
+ /**
+ * Matches strings regardles of varying whitespace.
+ * @param string $first First to match with.
+ * @param string $second Second to match against.
+ * @return boolean True if matches even with
+ * whitespace differences.
+ * @access private
+ */
+ function _isNormalMatch($first, $second) {
+ return ($this->_normalise($first) == $this->_normalise($second));
+ }
+
+ /**
+ * Accessor for URLs by the link label. Label will match
+ * regardess of whitespace issues and case.
+ * @param string $label Text of link.
+ * @return array List of links with that label.
+ * @access public
+ */
+ function getUrlsByLabel($label) {
+ $matches = array();
+ foreach ($this->_links as $link) {
+ if ($this->_isNormalMatch($link->getContent(), $label)) {
+ $matches[] = $this->_getUrlFromLink($link);
+ }
+ }
+ return $matches;
+ }
+
+ /**
+ * Accessor for a URL by the id attribute.
+ * @param string $id Id attribute of link.
+ * @return SimpleUrl URL with that id of false if none.
+ * @access public
+ */
+ function getUrlById($id) {
+ foreach ($this->_links as $link) {
+ if ($link->getAttribute('id') === (string)$id) {
+ return $this->_getUrlFromLink($link);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Converts a link into a target URL.
+ * @param SimpleAnchor $link Parsed link.
+ * @return SimpleUrl URL with frame target if any.
+ * @access private
+ */
+ function _getUrlFromLink($link) {
+ $url = $this->_makeAbsolute($link->getHref());
+ if ($link->getAttribute('target')) {
+ $url->setTarget($link->getAttribute('target'));
+ }
+ return $url;
+ }
+
+ /**
+ * Expands expandomatic URLs into fully qualified
+ * URLs.
+ * @param SimpleUrl $url Relative URL.
+ * @return SimpleUrl Absolute URL.
+ * @access protected
+ */
+ function _makeAbsolute($url) {
+ if (! is_object($url)) {
+ $url = new SimpleUrl($url);
+ }
+ return $url->makeAbsolute($this->getUrl());
+ }
+
+ /**
+ * Sets the title tag contents.
+ * @param SimpleTitleTag $tag Title of page.
+ * @access protected
+ */
+ function _setTitle(&$tag) {
+ $this->_title = &$tag;
+ }
+
+ /**
+ * Accessor for parsed title.
+ * @return string Title or false if no title is present.
+ * @access public
+ */
+ function getTitle() {
+ if ($this->_title) {
+ return $this->_title->getContent();
+ }
+ return false;
+ }
+
+ /**
+ * Finds a held form by button label. Will only
+ * search correctly built forms.
+ * @param string $label Button label, default 'Submit'.
+ * @return SimpleForm Form object containing the button.
+ * @access public
+ */
+ function &getFormBySubmitLabel($label) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->hasSubmitLabel($label)) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a held form by button label. Will only
+ * search correctly built forms.
+ * @param string $name Button name attribute.
+ * @return SimpleForm Form object containing the button.
+ * @access public
+ */
+ function &getFormBySubmitName($name) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->hasSubmitName($name)) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a held form by button id. Will only
+ * search correctly built forms.
+ * @param string $id Button ID attribute.
+ * @return SimpleForm Form object containing the button.
+ * @access public
+ */
+ function &getFormBySubmitId($id) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->hasSubmitId($id)) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a held form by image label. Will only
+ * search correctly built forms.
+ * @param string $label Usually the alt attribute.
+ * @return SimpleForm Form object containing the image.
+ * @access public
+ */
+ function &getFormByImageLabel($label) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->hasImageLabel($label)) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a held form by image button id. Will only
+ * search correctly built forms.
+ * @param string $name Image name.
+ * @return SimpleForm Form object containing the image.
+ * @access public
+ */
+ function &getFormByImageName($name) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->hasImageName($name)) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a held form by image button id. Will only
+ * search correctly built forms.
+ * @param string $id Image ID attribute.
+ * @return SimpleForm Form object containing the image.
+ * @access public
+ */
+ function &getFormByImageId($id) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->hasImageId($id)) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds a held form by the form ID. A way of
+ * identifying a specific form when we have control
+ * of the HTML code.
+ * @param string $id Form label.
+ * @return SimpleForm Form object containing the matching ID.
+ * @access public
+ */
+ function &getFormById($id) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->getId() == $id) {
+ return $this->_complete_forms[$i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets a field on each form in which the field is
+ * available.
+ * @param string $name Field name.
+ * @param string $value Value to set field to.
+ * @return boolean True if value is valid.
+ * @access public
+ */
+ function setField($name, $value) {
+ $is_set = false;
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->setField($name, $value)) {
+ $is_set = true;
+ }
+ }
+ return $is_set;
+ }
+
+ /**
+ * Sets a field on the form in which the unique field is
+ * available.
+ * @param string/integer $id Field ID attribute.
+ * @param string $value Value to set field to.
+ * @return boolean True if value is valid.
+ * @access public
+ */
+ function setFieldById($id, $value) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ if ($this->_complete_forms[$i]->setFieldById($id, $value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for a form element value within a page.
+ * Finds the first match.
+ * @param string $name Field name.
+ * @return string/boolean A string if the field is
+ * present, false if unchecked
+ * and null if missing.
+ * @access public
+ */
+ function getField($name) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ $value = $this->_complete_forms[$i]->getValue($name);
+ if (isset($value)) {
+ return $value;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Accessor for a form element value within a page.
+ * Finds the first match.
+ * @param string/integer $id Field ID attribute.
+ * @return string/boolean A string if the field is
+ * present, false if unchecked
+ * and null if missing.
+ * @access public
+ */
+ function getFieldById($id) {
+ for ($i = 0; $i < count($this->_complete_forms); $i++) {
+ $value = $this->_complete_forms[$i]->getValueById($id);
+ if (isset($value)) {
+ return $value;
+ }
+ }
+ return null;
+ }
+ }
+?>
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage MockObjects
+ * @version $Id: parser.php,v 1.61 2004/08/11 16:14:37 lastcraft Exp $
+ */
+
+ /**#@+
+ * Lexer mode stack constants
+ */
+ define("LEXER_ENTER", 1);
+ define("LEXER_MATCHED", 2);
+ define("LEXER_UNMATCHED", 3);
+ define("LEXER_EXIT", 4);
+ define("LEXER_SPECIAL", 5);
+ /**#@-*/
+
+ /**
+ * Compounded regular expression. Any of
+ * the contained patterns could match and
+ * when one does it's label is returned.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class ParallelRegex {
+ var $_patterns;
+ var $_labels;
+ var $_regex;
+ var $_case;
+
+ /**
+ * Constructor. Starts with no patterns.
+ * @param boolean $case True for case sensitive, false
+ * for insensitive.
+ * @access public
+ */
+ function ParallelRegex($case) {
+ $this->_case = $case;
+ $this->_patterns = array();
+ $this->_labels = array();
+ $this->_regex = null;
+ }
+
+ /**
+ * Adds a pattern with an optional label.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $label Label of regex to be returned
+ * on a match.
+ * @access public
+ */
+ function addPattern($pattern, $label = true) {
+ $count = count($this->_patterns);
+ $this->_patterns[$count] = $pattern;
+ $this->_labels[$count] = $label;
+ $this->_regex = null;
+ }
+
+ /**
+ * Attempts to match all patterns at once against
+ * a string.
+ * @param string $subject String to match against.
+ * @param string $match First matched portion of
+ * subject.
+ * @return boolean True on success.
+ * @access public
+ */
+ function match($subject, &$match) {
+ if (count($this->_patterns) == 0) {
+ return false;
+ }
+ if (! preg_match($this->_getCompoundedRegex(), $subject, $matches)) {
+ $match = '';
+ return false;
+ }
+ $match = $matches[0];
+ for ($i = 1; $i < count($matches); $i++) {
+ if ($matches[$i]) {
+ return $this->_labels[$i - 1];
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Compounds the patterns into a single
+ * regular expression separated with the
+ * "or" operator. Caches the regex.
+ * Will automatically escape (, ) and / tokens.
+ * @param array $patterns List of patterns in order.
+ * @access private
+ */
+ function _getCompoundedRegex() {
+ if ($this->_regex == null) {
+ for ($i = 0; $i < count($this->_patterns); $i++) {
+ $this->_patterns[$i] = '(' . str_replace(
+ array('/', '(', ')'),
+ array('\/', '\(', '\)'),
+ $this->_patterns[$i]) . ')';
+ }
+ $this->_regex = "/" . implode("|", $this->_patterns) . "/" . $this->_getPerlMatchingFlags();
+ }
+ return $this->_regex;
+ }
+
+ /**
+ * Accessor for perl regex mode flags to use.
+ * @return string Perl regex flags.
+ * @access private
+ */
+ function _getPerlMatchingFlags() {
+ return ($this->_case ? "msS" : "msSi");
+ }
+ }
+
+ /**
+ * States for a stack machine.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleStateStack {
+ var $_stack;
+
+ /**
+ * Constructor. Starts in named state.
+ * @param string $start Starting state name.
+ * @access public
+ */
+ function SimpleStateStack($start) {
+ $this->_stack = array($start);
+ }
+
+ /**
+ * Accessor for current state.
+ * @return string State.
+ * @access public
+ */
+ function getCurrent() {
+ return $this->_stack[count($this->_stack) - 1];
+ }
+
+ /**
+ * Adds a state to the stack and sets it
+ * to be the current state.
+ * @param string $state New state.
+ * @access public
+ */
+ function enter($state) {
+ array_push($this->_stack, $state);
+ }
+
+ /**
+ * Leaves the current state and reverts
+ * to the previous one.
+ * @return boolean False if we drop off
+ * the bottom of the list.
+ * @access public
+ */
+ function leave() {
+ if (count($this->_stack) == 1) {
+ return false;
+ }
+ array_pop($this->_stack);
+ return true;
+ }
+ }
+
+ /**
+ * Accepts text and breaks it into tokens.
+ * Some optimisation to make the sure the
+ * content is only scanned by the PHP regex
+ * parser once. Lexer modes must not start
+ * with leading underscores.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleLexer {
+ var $_regexes;
+ var $_parser;
+ var $_mode;
+ var $_mode_handlers;
+ var $_case;
+
+ /**
+ * Sets up the lexer in case insensitive matching
+ * by default.
+ * @param SimpleSaxParser $parser Handling strategy by
+ * reference.
+ * @param string $start Starting handler.
+ * @param boolean $case True for case sensitive.
+ * @access public
+ */
+ function SimpleLexer(&$parser, $start = "accept", $case = false) {
+ $this->_case = $case;
+ $this->_regexes = array();
+ $this->_parser = &$parser;
+ $this->_mode = &new SimpleStateStack($start);
+ $this->_mode_handlers = array($start => $start);
+ }
+
+ /**
+ * Adds a token search pattern for a particular
+ * parsing mode. The pattern does not change the
+ * current mode.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Should only apply this
+ * pattern when dealing with
+ * this type of input.
+ * @access public
+ */
+ function addPattern($pattern, $mode = "accept") {
+ if (! isset($this->_regexes[$mode])) {
+ $this->_regexes[$mode] = new ParallelRegex($this->_case);
+ }
+ $this->_regexes[$mode]->addPattern($pattern);
+ if (! isset($this->_mode_handlers[$mode])) {
+ $this->_mode_handlers[$mode] = $mode;
+ }
+ }
+
+ /**
+ * Adds a pattern that will enter a new parsing
+ * mode. Useful for entering parenthesis, strings,
+ * tags, etc.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Should only apply this
+ * pattern when dealing with
+ * this type of input.
+ * @param string $new_mode Change parsing to this new
+ * nested mode.
+ * @access public
+ */
+ function addEntryPattern($pattern, $mode, $new_mode) {
+ if (! isset($this->_regexes[$mode])) {
+ $this->_regexes[$mode] = new ParallelRegex($this->_case);
+ }
+ $this->_regexes[$mode]->addPattern($pattern, $new_mode);
+ if (! isset($this->_mode_handlers[$new_mode])) {
+ $this->_mode_handlers[$new_mode] = $new_mode;
+ }
+ }
+
+ /**
+ * Adds a pattern that will exit the current mode
+ * and re-enter the previous one.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Mode to leave.
+ * @access public
+ */
+ function addExitPattern($pattern, $mode) {
+ if (! isset($this->_regexes[$mode])) {
+ $this->_regexes[$mode] = new ParallelRegex($this->_case);
+ }
+ $this->_regexes[$mode]->addPattern($pattern, "__exit");
+ if (! isset($this->_mode_handlers[$mode])) {
+ $this->_mode_handlers[$mode] = $mode;
+ }
+ }
+
+ /**
+ * Adds a pattern that has a special mode. Acts as an entry
+ * and exit pattern in one go, effectively calling a special
+ * parser handler for this token only.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Should only apply this
+ * pattern when dealing with
+ * this type of input.
+ * @param string $special Use this mode for this one token.
+ * @access public
+ */
+ function addSpecialPattern($pattern, $mode, $special) {
+ if (! isset($this->_regexes[$mode])) {
+ $this->_regexes[$mode] = new ParallelRegex($this->_case);
+ }
+ $this->_regexes[$mode]->addPattern($pattern, "_$special");
+ if (! isset($this->_mode_handlers[$special])) {
+ $this->_mode_handlers[$special] = $special;
+ }
+ }
+
+ /**
+ * Adds a mapping from a mode to another handler.
+ * @param string $mode Mode to be remapped.
+ * @param string $handler New target handler.
+ * @access public
+ */
+ function mapHandler($mode, $handler) {
+ $this->_mode_handlers[$mode] = $handler;
+ }
+
+ /**
+ * Splits the page text into tokens. Will fail
+ * if the handlers report an error or if no
+ * content is consumed. If successful then each
+ * unparsed and parsed token invokes a call to the
+ * held listener.
+ * @param string $raw Raw HTML text.
+ * @return boolean True on success, else false.
+ * @access public
+ */
+ function parse($raw) {
+ if (! isset($this->_parser)) {
+ return false;
+ }
+ $length = strlen($raw);
+ while (is_array($parsed = $this->_reduce($raw))) {
+ list($raw, $unmatched, $matched, $mode) = $parsed;
+ if (! $this->_dispatchTokens($unmatched, $matched, $mode)) {
+ return false;
+ }
+ if ($raw === '') {
+ return true;
+ }
+ if (strlen($raw) == $length) {
+ return false;
+ }
+ $length = strlen($raw);
+ }
+ if (! $parsed) {
+ return false;
+ }
+ return $this->_invokeParser($raw, LEXER_UNMATCHED);
+ }
+
+ /**
+ * Sends the matched token and any leading unmatched
+ * text to the parser changing the lexer to a new
+ * mode if one is listed.
+ * @param string $unmatched Unmatched leading portion.
+ * @param string $matched Actual token match.
+ * @param string $mode Mode after match. A boolean
+ * false mode causes no change.
+ * @return boolean False if there was any error
+ * from the parser.
+ * @access private
+ */
+ function _dispatchTokens($unmatched, $matched, $mode = false) {
+ if (! $this->_invokeParser($unmatched, LEXER_UNMATCHED)) {
+ return false;
+ }
+ if (is_bool($mode)) {
+ return $this->_invokeParser($matched, LEXER_MATCHED);
+ }
+ if ($this->_isModeEnd($mode)) {
+ if (! $this->_invokeParser($matched, LEXER_EXIT)) {
+ return false;
+ }
+ return $this->_mode->leave();
+ }
+ if ($this->_isSpecialMode($mode)) {
+ $this->_mode->enter($this->_decodeSpecial($mode));
+ if (! $this->_invokeParser($matched, LEXER_SPECIAL)) {
+ return false;
+ }
+ return $this->_mode->leave();
+ }
+ $this->_mode->enter($mode);
+ return $this->_invokeParser($matched, LEXER_ENTER);
+ }
+
+ /**
+ * Tests to see if the new mode is actually to leave
+ * the current mode and pop an item from the matching
+ * mode stack.
+ * @param string $mode Mode to test.
+ * @return boolean True if this is the exit mode.
+ * @access private
+ */
+ function _isModeEnd($mode) {
+ return ($mode === "__exit");
+ }
+
+ /**
+ * Test to see if the mode is one where this mode
+ * is entered for this token only and automatically
+ * leaves immediately afterwoods.
+ * @param string $mode Mode to test.
+ * @return boolean True if this is the exit mode.
+ * @access private
+ */
+ function _isSpecialMode($mode) {
+ return (strncmp($mode, "_", 1) == 0);
+ }
+
+ /**
+ * Strips the magic underscore marking single token
+ * modes.
+ * @param string $mode Mode to decode.
+ * @return string Underlying mode name.
+ * @access private
+ */
+ function _decodeSpecial($mode) {
+ return substr($mode, 1);
+ }
+
+ /**
+ * Calls the parser method named after the current
+ * mode. Empty content will be ignored. The lexer
+ * has a parser handler for each mode in the lexer.
+ * @param string $content Text parsed.
+ * @param boolean $is_match Token is recognised rather
+ * than unparsed data.
+ * @access private
+ */
+ function _invokeParser($content, $is_match) {
+ if (($content === '') || ($content === false)) {
+ return true;
+ }
+ $handler = $this->_mode_handlers[$this->_mode->getCurrent()];
+ return $this->_parser->$handler($content, $is_match);
+ }
+
+ /**
+ * Tries to match a chunk of text and if successful
+ * removes the recognised chunk and any leading
+ * unparsed data. Empty strings will not be matched.
+ * @param string $raw The subject to parse. This is the
+ * content that will be eaten.
+ * @return array Three item list of unparsed
+ * content followed by the
+ * recognised token and finally the
+ * action the parser is to take.
+ * True if no match, false if there
+ * is a parsing error.
+ * @access private
+ */
+ function _reduce($raw) {
+ if ($action = $this->_regexes[$this->_mode->getCurrent()]->match($raw, $match)) {
+ $unparsed_character_count = strpos($raw, $match);
+ $unparsed = substr($raw, 0, $unparsed_character_count);
+ $raw = substr($raw, $unparsed_character_count + strlen($match));
+ return array($raw, $unparsed, $match, $action);
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Converts HTML tokens into selected SAX events.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleSaxParser {
+ var $_lexer;
+ var $_listener;
+ var $_tag;
+ var $_attributes;
+ var $_current_attribute;
+
+ /**
+ * Sets the listener.
+ * @param SimpleSaxListener $listener SAX event handler.
+ * @access public
+ */
+ function SimpleSaxParser(&$listener) {
+ $this->_listener = &$listener;
+ $this->_lexer = &$this->createLexer($this);
+ $this->_tag = '';
+ $this->_attributes = array();
+ $this->_current_attribute = '';
+ }
+
+ /**
+ * Runs the content through the lexer which
+ * should call back to the acceptors.
+ * @param string $raw Page text to parse.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function parse($raw) {
+ return $this->_lexer->parse($raw);
+ }
+
+ /**
+ * Sets up the matching lexer. Starts in 'text' mode.
+ * @param SimpleSaxParser $parser Event generator, usually $self.
+ * @return SimpleLexer Lexer suitable for this parser.
+ * @access public
+ * @static
+ */
+ function &createLexer(&$parser) {
+ $lexer = &new SimpleLexer($parser, 'text');
+ $lexer->mapHandler('text', 'acceptTextToken');
+ SimpleSaxParser::_addSkipping($lexer);
+ foreach (SimpleSaxParser::_getParsedTags() as $tag) {
+ SimpleSaxParser::_addTag($lexer, $tag);
+ }
+ SimpleSaxParser::_addInTagTokens($lexer);
+ return $lexer;
+ }
+
+ /**
+ * List of parsed tags. Others are ignored.
+ * @return array List of searched for tags.
+ * @access private
+ */
+ function _getParsedTags() {
+ return array('a', 'title', 'form', 'input', 'button', 'textarea', 'select',
+ 'option', 'frameset', 'frame');
+ }
+
+ /**
+ * The lexer has to skip certain sections such
+ * as server code, client code and styles.
+ * @param SimpleLexer $lexer Lexer to add patterns to.
+ * @access private
+ * @static
+ */
+ function _addSkipping(&$lexer) {
+ $lexer->mapHandler('css', 'ignore');
+ $lexer->addEntryPattern('<style', 'text', 'css');
+ $lexer->addExitPattern('</style>', 'css');
+ $lexer->mapHandler('js', 'ignore');
+ $lexer->addEntryPattern('<script', 'text', 'js');
+ $lexer->addExitPattern('</script>', 'js');
+ $lexer->mapHandler('comment', 'ignore');
+ $lexer->addEntryPattern('<!--', 'text', 'comment');
+ $lexer->addExitPattern('-->', 'comment');
+ }
+
+ /**
+ * Pattern matches to start and end a tag.
+ * @param SimpleLexer $lexer Lexer to add patterns to.
+ * @param string $tag Name of tag to scan for.
+ * @access private
+ * @static
+ */
+ function _addTag(&$lexer, $tag) {
+ $lexer->addSpecialPattern("</$tag>", 'text', 'acceptEndToken');
+ $lexer->addEntryPattern("<$tag", 'text', 'tag');
+ }
+
+ /**
+ * Pattern matches to parse the inside of a tag
+ * including the attributes and their quoting.
+ * @param SimpleLexer $lexer Lexer to add patterns to.
+ * @access private
+ * @static
+ */
+ function _addInTagTokens(&$lexer) {
+ $lexer->mapHandler('tag', 'acceptStartToken');
+ $lexer->addSpecialPattern('\s+', 'tag', 'ignore');
+ SimpleSaxParser::_addAttributeTokens($lexer);
+ $lexer->addExitPattern('>', 'tag');
+ }
+
+ /**
+ * Matches attributes that are either single quoted,
+ * double quoted or unquoted.
+ * @param SimpleLexer $lexer Lexer to add patterns to.
+ * @access private
+ * @static
+ */
+ function _addAttributeTokens(&$lexer) {
+ $lexer->mapHandler('dq_attribute', 'acceptAttributeToken');
+ $lexer->addEntryPattern('=\s*"', 'tag', 'dq_attribute');
+ $lexer->addPattern("\\\\\"", 'dq_attribute');
+ $lexer->addExitPattern('"', 'dq_attribute');
+ $lexer->mapHandler('sq_attribute', 'acceptAttributeToken');
+ $lexer->addEntryPattern("=\s*'", 'tag', 'sq_attribute');
+ $lexer->addPattern("\\\\'", 'sq_attribute');
+ $lexer->addExitPattern("'", 'sq_attribute');
+ $lexer->mapHandler('uq_attribute', 'acceptAttributeToken');
+ $lexer->addSpecialPattern('=\s*[^>\s]*', 'tag', 'uq_attribute');
+ }
+
+ /**
+ * Accepts a token from the tag mode. If the
+ * starting element completes then the element
+ * is dispatched and the current attributes
+ * set back to empty. The element or attribute
+ * name is converted to lower case.
+ * @param string $token Incoming characters.
+ * @param integer $event Lexer event type.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function acceptStartToken($token, $event) {
+ if ($event == LEXER_ENTER) {
+ $this->_tag = strtolower(substr($token, 1));
+ return true;
+ }
+ if ($event == LEXER_EXIT) {
+ $success = $this->_listener->startElement(
+ $this->_tag,
+ $this->_attributes);
+ $this->_tag = "";
+ $this->_attributes = array();
+ return $success;
+ }
+ if ($token != "=") {
+ $this->_current_attribute = strtolower($this->_decodeHtml($token));
+ $this->_attributes[$this->_current_attribute] = "";
+ }
+ return true;
+ }
+
+ /**
+ * Accepts a token from the end tag mode.
+ * The element name is converted to lower case.
+ * @param string $token Incoming characters.
+ * @param integer $event Lexer event type.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function acceptEndToken($token, $event) {
+ if (! preg_match('/<\/(.*)>/', $token, $matches)) {
+ return false;
+ }
+ return $this->_listener->endElement(strtolower($matches[1]));
+ }
+
+ /**
+ * Part of the tag data.
+ * @param string $token Incoming characters.
+ * @param integer $event Lexer event type.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function acceptAttributeToken($token, $event) {
+ if ($event == LEXER_UNMATCHED) {
+ $this->_attributes[$this->_current_attribute] .=
+ $this->_decodeHtml($token);
+ }
+ if ($event == LEXER_SPECIAL) {
+ $this->_attributes[$this->_current_attribute] .=
+ preg_replace('/^=\s*/' , '', $this->_decodeHtml($token));
+ }
+ return true;
+ }
+
+ /**
+ * A character entity.
+ * @param string $token Incoming characters.
+ * @param integer $event Lexer event type.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function acceptEntityToken($token, $event) {
+ }
+
+ /**
+ * Character data between tags regarded as
+ * important.
+ * @param string $token Incoming characters.
+ * @param integer $event Lexer event type.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function acceptTextToken($token, $event) {
+ return $this->_listener->addContent($token);
+ }
+
+ /**
+ * Incoming data to be ignored.
+ * @param string $token Incoming characters.
+ * @param integer $event Lexer event type.
+ * @return boolean False if parse error.
+ * @access public
+ */
+ function ignore($token, $event) {
+ return true;
+ }
+
+ /**
+ * Decodes any HTML entities.
+ * @param string $html Incoming HTML.
+ * @return string Outgoing plain text.
+ * @access private
+ */
+ function _decodeHtml($html) {
+ return strtr(
+ $html,
+ array_flip(get_html_translation_table(HTML_ENTITIES)));
+ }
+ }
+
+ /**
+ * SAX event handler.
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @abstract
+ */
+ class SimpleSaxListener {
+
+ /**
+ * Sets the document to write to.
+ * @access public
+ */
+ function SimpleSaxListener() {
+ }
+
+ /**
+ * Start of element event.
+ * @param string $name Element name.
+ * @param hash $attributes Name value pairs.
+ * Attributes without content
+ * are marked as true.
+ * @return boolean False on parse error.
+ * @access public
+ */
+ function startElement($name, $attributes) {
+ }
+
+ /**
+ * End of element event.
+ * @param string $name Element name.
+ * @return boolean False on parse error.
+ * @access public
+ */
+ function endElement($name) {
+ }
+
+ /**
+ * Unparsed, but relevant data.
+ * @param string $text May include unparsed tags.
+ * @return boolean False on parse error.
+ * @access public
+ */
+ function addContent($text) {
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: remote.php,v 1.11 2004/08/04 22:09:39 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/browser.php');
+ require_once(dirname(__FILE__) . '/xml.php');
+ require_once(dirname(__FILE__) . '/simple_test.php');
+ /**#@-*/
+
+ /**
+ * Runs an XML formated test on a remote server.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class RemoteTestCase {
+ var $_url;
+ var $_dry_url;
+ var $_size;
+
+ /**
+ * Sets the location of the remote test.
+ * @param string $url Test location.
+ * @param string $dry_url Location for dry run.
+ * @access public
+ */
+ function RemoteTestCase($url, $dry_url = false) {
+ $this->_url = $url;
+ $this->_dry_url = $dry_url ? $dry_url : $url;
+ $this->_size = false;
+ }
+
+ /**
+ * Accessor for the test name for subclasses.
+ * @return string Name of the test.
+ * @access public
+ */
+ function getLabel() {
+ return $this->_url;
+ }
+
+ /**
+ * Runs the top level test for this class. Currently
+ * reads the data as a single chunk. I'll fix this
+ * once I have added iteration to the browser.
+ * @param SimpleReporter $reporter Target of test results.
+ * @returns boolean True if no failures.
+ * @access public
+ */
+ function run(&$reporter) {
+ $browser = &$this->_createBrowser();
+ $xml = $browser->get($this->_url);
+ if (! $xml) {
+ trigger_error('Cannot read remote test URL [' . $this->_url . ']');
+ return false;
+ }
+ $parser = &$this->_createParser($reporter);
+ if (! $parser->parse($xml)) {
+ trigger_error('Cannot parse incoming XML from [' . $this->_url . ']');
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Creates a new web browser object for fetching
+ * the XML report.
+ * @return SimpleBrowser New browser.
+ * @access protected
+ */
+ function &_createBrowser() {
+ return new SimpleBrowser();
+ }
+
+ /**
+ * Creates the XML parser.
+ * @param SimpleReporter $reporter Target of test results.
+ * @return SimpleTestXmlListener XML reader.
+ * @access protected
+ */
+ function &_createParser(&$reporter) {
+ return new SimpleTestXmlParser($reporter);
+ }
+
+ /**
+ * Accessor for the number of subtests.
+ * @return integer Number of test cases.
+ * @access public
+ */
+ function getSize() {
+ if ($this->_size === false) {
+ $browser = &$this->_createBrowser();
+ $xml = $browser->get($this->_dry_url);
+ if (! $xml) {
+ trigger_error('Cannot read remote test URL [' . $this->_dry_url . ']');
+ return false;
+ }
+ $reporter = &new SimpleReporter();
+ $parser = &$this->_createParser($reporter);
+ if (! $parser->parse($xml)) {
+ trigger_error('Cannot parse incoming XML from [' . $this->_dry_url . ']');
+ return false;
+ }
+ $this->_size = $reporter->getTestCaseCount();
+ }
+ return $this->_size;
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: reporter.php,v 1.31 2004/08/04 22:09:39 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/scorer.php');
+ /**#@-*/
+
+ /**
+ * Sample minimal test displayer. Generates only
+ * failure messages and a pass count.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class HtmlReporter extends SimpleReporter {
+
+ /**
+ * Does nothing yet. The first output will
+ * be sent on the first test start. For use
+ * by a web browser.
+ * @access public
+ */
+ function HtmlReporter() {
+ $this->SimpleReporter();
+ }
+
+ /**
+ * Paints the top of the web page setting the
+ * title to the name of the starting test.
+ * @param string $test_name Name class of test.
+ * @access public
+ */
+ function paintHeader($test_name) {
+ $this->sendNoCacheHeaders();
+ print "<html>\n<head>\n<title>$test_name</title>\n";
+ print "<style type=\"text/css\">\n";
+ print $this->_getCss() . "\n";
+ print "</style>\n";
+ print "</head>\n<body>\n";
+ print "<h1>$test_name</h1>\n";
+ flush();
+ }
+
+ /**
+ * Send the headers necessary to ensure the page is
+ * reloaded on every request. Otherwise you could be
+ * scratching your head over out of date test data.
+ * @access public
+ * @static
+ */
+ function sendNoCacheHeaders() {
+ if (! headers_sent()) {
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
+ }
+ }
+
+ /**
+ * Paints the CSS. Add additional styles here.
+ * @return string CSS code as text.
+ * @access protected
+ */
+ function _getCss() {
+ return ".fail { color: red; } pre { background-color: lightgray; }";
+ }
+
+ /**
+ * Paints the end of the test with a summary of
+ * the passes and failures.
+ * @param string $test_name Name class of test.
+ * @access public
+ */
+ function paintFooter($test_name) {
+ $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green");
+ print "<div style=\"";
+ print "padding: 8px; margin-top: 1em; background-color: $colour; color: white;";
+ print "\">";
+ print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount();
+ print " test cases complete:\n";
+ print "<strong>" . $this->getPassCount() . "</strong> passes, ";
+ print "<strong>" . $this->getFailCount() . "</strong> fails and ";
+ print "<strong>" . $this->getExceptionCount() . "</strong> exceptions.";
+ print "</div>\n";
+ print "</body>\n</html>\n";
+ }
+
+ /**
+ * Paints the test failure with a breadcrumbs
+ * trail of the nesting test suites below the
+ * top level test.
+ * @param string $message Failure message displayed in
+ * the context of the other tests.
+ * @access public
+ */
+ function paintFail($message) {
+ parent::paintFail($message);
+ print "<span class=\"fail\">Fail</span>: ";
+ $breadcrumb = $this->getTestList();
+ array_shift($breadcrumb);
+ print implode(" -> ", $breadcrumb);
+ print " -> " . htmlentities($message) . "<br />\n";
+ }
+
+ /**
+ * Paints a PHP error or exception.
+ * @param string $message Message is ignored.
+ * @access public
+ * @abstract
+ */
+ function paintException($message) {
+ parent::paintException($message);
+ print "<span class=\"fail\">Exception</span>: ";
+ $breadcrumb = $this->getTestList();
+ array_shift($breadcrumb);
+ print implode(" -> ", $breadcrumb);
+ print " -> <strong>" . htmlentities($message) . "</strong><br />\n";
+ }
+
+ /**
+ * Paints formatted text such as dumped variables.
+ * @param string $message Text to show.
+ * @access public
+ */
+ function paintFormattedMessage($message) {
+ echo '<pre>', htmlentities($message), '</pre>';
+ }
+ }
+
+ /**
+ * Sample minimal test displayer. Generates only
+ * failure messages and a pass count. For command
+ * line use. I've tried to make it look like JUnit,
+ * but I wanted to output the errors as they arrived
+ * which meant dropping the dots.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class TextReporter extends SimpleReporter {
+
+ /**
+ * Does nothing yet. The first output will
+ * be sent on the first test start.
+ * @access public
+ */
+ function TextReporter() {
+ $this->SimpleReporter();
+ }
+
+ /**
+ * Paints the title only.
+ * @param string $test_name Name class of test.
+ * @access public
+ */
+ function paintHeader($test_name) {
+ if (!SimpleReporter::inCli()) {
+ header('Content-type: text/plain');
+ }
+ print "$test_name\n";
+ flush();
+ }
+
+ /**
+ * Paints the end of the test with a summary of
+ * the passes and failures.
+ * @param string $test_name Name class of test.
+ * @access public
+ */
+ function paintFooter($test_name) {
+ if ($this->getFailCount() + $this->getExceptionCount() == 0) {
+ print "OK\n";
+ } else {
+ print "FAILURES!!!\n";
+ }
+ print "Test cases run: " . $this->getTestCaseProgress() .
+ "/" . $this->getTestCaseCount() .
+ ", Passes: " . $this->getPassCount() .
+ ", Failures: " . $this->getFailCount() .
+ ", Exceptions: " . $this->getExceptionCount() . "\n";
+
+ }
+
+ /**
+ * Paints the test failure as a stack trace.
+ * @param string $message Failure message displayed in
+ * the context of the other tests.
+ * @access public
+ */
+ function paintFail($message) {
+ parent::paintFail($message);
+ print $this->getFailCount() . ") $message\n";
+ $breadcrumb = $this->getTestList();
+ array_shift($breadcrumb);
+ print "\tin " . implode("\n\tin ", array_reverse($breadcrumb));
+ print "\n";
+ }
+
+ /**
+ * Paints a PHP error or exception.
+ * @param string $message Message is ignored.
+ * @access public
+ * @abstract
+ */
+ function paintException($message) {
+ parent::paintException($message);
+ print "Exception " . $this->getExceptionCount() . "!\n$message\n";
+ }
+
+ /**
+ * Paints formatted text such as dumped variables.
+ * @param string $message Text to show.
+ * @access public
+ */
+ function paintFormattedMessage($message) {
+ print "$message\n";
+ flush();
+ }
+ }
+?>
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: scorer.php,v 1.2 2004/08/04 23:48:51 lastcraft Exp $
+ */
+
+ /**
+ * Can recieve test events and display them. Display
+ * is achieved by making display methods available
+ * and visiting the incoming event.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @abstract
+ */
+ class SimpleScorer {
+ var $_passes;
+ var $_fails;
+ var $_exceptions;
+ var $_is_dry_run;
+
+ /**
+ * Starts the test run with no results.
+ * @access public
+ */
+ function SimpleScorer() {
+ $this->_passes = 0;
+ $this->_fails = 0;
+ $this->_exceptions = 0;
+ $this->_is_dry_run = false;
+ }
+
+ /**
+ * Signals that the next evaluation will be a dry
+ * run. That is, the structure events will be
+ * recorded, but no tests will be run.
+ */
+ function makeDry($is_dry = true) {
+ $this->_is_dry_run = $is_dry;
+ }
+
+ /**
+ * Invokes a single test method on the test case.
+ * This call back allows the reporter to decide if
+ * it actually wants to run the test.
+ * @param SimpleRunner $runner Test case to run test on.
+ * @param string $method Name of test method.
+ * @access public
+ */
+ function invoke(&$runner, $method) {
+ if (! $this->_is_dry_run) {
+ $runner->invoke($method);
+ }
+ }
+
+ /**
+ * Accessor for current status. Will be false
+ * if there have been any failures or exceptions.
+ * Used for command line tools.
+ * @return boolean True if no failures.
+ * @access public
+ */
+ function getStatus() {
+ if ($this->_exceptions + $this->_fails > 0) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Paints the start of a test method.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintMethodStart($test_name) {
+ }
+
+ /**
+ * Paints the end of a test method.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintMethodEnd($test_name) {
+ }
+
+ /**
+ * Paints the start of a test case.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintCaseStart($test_name) {
+ }
+
+ /**
+ * Paints the end of a test case.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintCaseEnd($test_name) {
+ }
+
+ /**
+ * Paints the start of a group test.
+ * @param string $test_name Name of test or other label.
+ * @param integer $size Number of test cases starting.
+ * @access public
+ */
+ function paintGroupStart($test_name, $size) {
+ }
+
+ /**
+ * Paints the end of a group test.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintGroupEnd($test_name) {
+ }
+
+ /**
+ * Increments the pass count.
+ * @param string $message Message is ignored.
+ * @access public
+ */
+ function paintPass($message) {
+ $this->_passes++;
+ }
+
+ /**
+ * Increments the fail count.
+ * @param string $message Message is ignored.
+ * @access public
+ */
+ function paintFail($message) {
+ $this->_fails++;
+ }
+
+ /**
+ * Deals with PHP 4 throwing an error.
+ * @param string $message Text of error formatted by
+ * the test case.
+ * @access public
+ */
+ function paintError($message) {
+ $this->paintException($message);
+ }
+
+ /**
+ * Deals with PHP 5 throwing an exception
+ * This isn't really implemented yet.
+ * @param Exception $exception Object thrown.
+ * @access public
+ */
+ function paintException($exception) {
+ $this->_exceptions++;
+ }
+
+ /**
+ * Accessor for the number of passes so far.
+ * @return integer Number of passes.
+ * @access public
+ */
+ function getPassCount() {
+ return $this->_passes;
+ }
+
+ /**
+ * Accessor for the number of fails so far.
+ * @return integer Number of fails.
+ * @access public
+ */
+ function getFailCount() {
+ return $this->_fails;
+ }
+
+ /**
+ * Accessor for the number of untrapped errors
+ * so far.
+ * @return integer Number of exceptions.
+ * @access public
+ */
+ function getExceptionCount() {
+ return $this->_exceptions;
+ }
+
+ /**
+ * Paints a simple supplementary message.
+ * @param string $message Text to display.
+ * @access public
+ */
+ function paintMessage($message) {
+ }
+
+ /**
+ * Paints a formatted ASCII message such as a
+ * variable dump.
+ * @param string $message Text to display.
+ * @access public
+ */
+ function paintFormattedMessage($message) {
+ }
+
+ /**
+ * By default just ignores user generated events.
+ * @param string $type Event type as text.
+ * @param mixed $payload Message or object.
+ * @access public
+ */
+ function paintSignal($type, &$payload) {
+ }
+ }
+
+ /**
+ * Recipient of generated test messages that can display
+ * page footers and headers. Also keeps track of the
+ * test nesting. This is the main base class on which
+ * to build the finished test (page based) displays.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleReporter extends SimpleScorer {
+ var $_test_stack;
+ var $_size;
+ var $_progress;
+
+ /**
+ * Starts the display with no results in.
+ * @access public
+ */
+ function SimpleReporter() {
+ $this->SimpleScorer();
+ $this->_test_stack = array();
+ $this->_size = null;
+ $this->_progress = 0;
+ }
+
+ /**
+ * Paints the start of a group test. Will also paint
+ * the page header and footer if this is the
+ * first test. Will stash the size if the first
+ * start.
+ * @param string $test_name Name of test that is starting.
+ * @param integer $size Number of test cases starting.
+ * @access public
+ */
+ function paintGroupStart($test_name, $size) {
+ if (! isset($this->_size)) {
+ $this->_size = $size;
+ }
+ if (count($this->_test_stack) == 0) {
+ $this->paintHeader($test_name);
+ }
+ $this->_test_stack[] = $test_name;
+ }
+
+ /**
+ * Paints the end of a group test. Will paint the page
+ * footer if the stack of tests has unwound.
+ * @param string $test_name Name of test that is ending.
+ * @param integer $progress Number of test cases ending.
+ * @access public
+ */
+ function paintGroupEnd($test_name) {
+ array_pop($this->_test_stack);
+ if (count($this->_test_stack) == 0) {
+ $this->paintFooter($test_name);
+ }
+ }
+
+ /**
+ * Paints the start of a test case. Will also paint
+ * the page header and footer if this is the
+ * first test. Will stash the size if the first
+ * start.
+ * @param string $test_name Name of test that is starting.
+ * @access public
+ */
+ function paintCaseStart($test_name) {
+ if (! isset($this->_size)) {
+ $this->_size = 1;
+ }
+ if (count($this->_test_stack) == 0) {
+ $this->paintHeader($test_name);
+ }
+ $this->_test_stack[] = $test_name;
+ }
+
+ /**
+ * Paints the end of a test case. Will paint the page
+ * footer if the stack of tests has unwound.
+ * @param string $test_name Name of test that is ending.
+ * @access public
+ */
+ function paintCaseEnd($test_name) {
+ $this->_progress++;
+ array_pop($this->_test_stack);
+ if (count($this->_test_stack) == 0) {
+ $this->paintFooter($test_name);
+ }
+ }
+
+ /**
+ * Paints the start of a test method.
+ * @param string $test_name Name of test that is starting.
+ * @access public
+ */
+ function paintMethodStart($test_name) {
+ $this->_test_stack[] = $test_name;
+ }
+
+ /**
+ * Paints the end of a test method. Will paint the page
+ * footer if the stack of tests has unwound.
+ * @param string $test_name Name of test that is ending.
+ * @access public
+ */
+ function paintMethodEnd($test_name) {
+ array_pop($this->_test_stack);
+ }
+
+ /**
+ * Paints the test document header.
+ * @param string $test_name First test top level
+ * to start.
+ * @access public
+ * @abstract
+ */
+ function paintHeader($test_name) {
+ }
+
+ /**
+ * Paints the test document footer.
+ * @param string $test_name The top level test.
+ * @access public
+ * @abstract
+ */
+ function paintFooter($test_name) {
+ }
+
+ /**
+ * Accessor for internal test stack. For
+ * subclasses that need to see the whole test
+ * history for display purposes.
+ * @return array List of methods in nesting order.
+ * @access public
+ */
+ function getTestList() {
+ return $this->_test_stack;
+ }
+
+ /**
+ * Accessor for total test size in number
+ * of test cases. Null until the first
+ * test is started.
+ * @return integer Total number of cases at start.
+ * @access public
+ */
+ function getTestCaseCount() {
+ return $this->_size;
+ }
+
+ /**
+ * Accessor for the number of test cases
+ * completed so far.
+ * @return integer Number of ended cases.
+ * @access public
+ */
+ function getTestCaseProgress() {
+ return $this->_progress;
+ }
+
+ /**
+ * Static check for running in the comand line.
+ * @return boolean True if CLI.
+ * @access public
+ * @static
+ */
+ function inCli() {
+ return php_sapi_name() == 'cli';
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: shell_tester.php,v 1.14 2004/08/17 18:18:32 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/simple_test.php');
+ /**#@-*/
+
+ /**
+ * Wrapper for exec() functionality.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleShell {
+ var $_output;
+
+ /**
+ * Executes the shell comand and stashes the output.
+ * @access public
+ */
+ function SimpleShell() {
+ $this->_output = false;
+ }
+
+ /**
+ * Actually runs the command. Does not trap the
+ * error stream output as this need PHP 4.3+.
+ * @param string $command The actual command line
+ * to run.
+ * @return integer Exit code.
+ * @access public
+ */
+ function execute($command) {
+ $this->_output = false;
+ exec($command, $this->_output, $ret);
+ return $ret;
+ }
+
+ /**
+ * Accessor for the last output.
+ * @return string Output as text.
+ * @access public
+ */
+ function getOutput() {
+ return implode("\n", $this->_output);
+ }
+
+ /**
+ * Accessor for the last output.
+ * @return array Output as array of lines.
+ * @access public
+ */
+ function getOutputAsList() {
+ return $this->_output;
+ }
+ }
+
+ /**
+ * Test case for testing of command line scripts and
+ * utilities. Usually scripts taht are external to the
+ * PHP code, but support it in some way.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class ShellTestCase extends SimpleTestCase {
+ var $_current_shell;
+ var $_last_status;
+ var $_last_command;
+
+ /**
+ * Creates an empty test case. Should be subclassed
+ * with test methods for a functional test case.
+ * @param string $label Name of test case. Will use
+ * the class name if none specified.
+ * @access public
+ */
+ function ShellTestCase($label = false) {
+ $this->SimpleTestCase($label);
+ $this->_current_shell = &$this->_createShell();
+ $this->_last_status = false;
+ $this->_last_command = '';
+ }
+
+ /**
+ * Executes a command and buffers the results.
+ * @param string $command Command to run.
+ * @return boolean True if zero exit code.
+ * @access public
+ */
+ function execute($command) {
+ $shell = &$this->_getShell();
+ $this->_last_status = $shell->execute($command);
+ $this->_last_command = $command;
+ return ($this->_last_status === 0);
+ }
+
+ /**
+ * Dumps the output of the last command.
+ * @access public
+ */
+ function dumpOutput() {
+ $this->dump($this->getOutput());
+ }
+
+ /**
+ * Accessor for the last output.
+ * @return string Output as text.
+ * @access public
+ */
+ function getOutput() {
+ $shell = &$this->_getShell();
+ return $shell->getOutput();
+ }
+
+ /**
+ * Accessor for the last output.
+ * @return array Output as array of lines.
+ * @access public
+ */
+ function getOutputAsList() {
+ $shell = &$this->_getShell();
+ return $shell->getOutputAsList();
+ }
+
+ /**
+ * Tests the last status code from the shell.
+ * @param integer $status Expected status of last
+ * command.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertExitCode($status, $message = "%s") {
+ $message = sprintf($message, "Expected status code of [$status] from [" .
+ $this->_last_command . "], but got [" .
+ $this->_last_status . "]");
+ return $this->assertTrue($status === $this->_last_status, $message);
+ }
+
+ /**
+ * Attempt to exactly match the combined STDERR and
+ * STDOUT output.
+ * @param string $expected Expected output.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertOutput($expected, $message = "%s") {
+ $shell = &$this->_getShell();
+ return $this->assertExpectation(
+ new EqualExpectation($expected),
+ $shell->getOutput(),
+ $message);
+ }
+
+ /**
+ * Scans the output for a Perl regex. If found
+ * anywhere it passes, else it fails.
+ * @param string $pattern Regex to search for.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertOutputPattern($pattern, $message = "%s") {
+ $shell = &$this->_getShell();
+ return $this->assertExpectation(
+ new WantedPatternExpectation($pattern),
+ $shell->getOutput(),
+ $message);
+ }
+
+ /**
+ * If a Perl regex is found anywhere in the current
+ * output then a failure is generated, else a pass.
+ * @param string $pattern Regex to search for.
+ * @param $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertNoOutputPattern($pattern, $message = "%s") {
+ $shell = &$this->_getShell();
+ return $this->assertExpectation(
+ new UnwantedPatternExpectation($pattern),
+ $shell->getOutput(),
+ $message);
+ }
+
+ /**
+ * File existence check.
+ * @param string $path Full filename and path.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertFileExists($path, $message = "%s") {
+ $message = sprintf($message, "File [$path] should exist");
+ return $this->assertTrue(file_exists($path), $message);
+ }
+
+ /**
+ * File non-existence check.
+ * @param string $path Full filename and path.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertFileNotExists($path, $message = "%s") {
+ $message = sprintf($message, "File [$path] should not exist");
+ return $this->assertFalse(file_exists($path), $message);
+ }
+
+ /**
+ * Scans a file for a Perl regex. If found
+ * anywhere it passes, else it fails.
+ * @param string $pattern Regex to search for.
+ * @param string $path Full filename and path.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertFilePattern($pattern, $path, $message = "%s") {
+ $shell = &$this->_getShell();
+ return $this->assertExpectation(
+ new WantedPatternExpectation($pattern),
+ implode('', file($path)),
+ $message);
+ }
+
+ /**
+ * If a Perl regex is found anywhere in the named
+ * file then a failure is generated, else a pass.
+ * @param string $pattern Regex to search for.
+ * @param string $path Full filename and path.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertNoFilePattern($pattern, $path, $message = "%s") {
+ $shell = &$this->_getShell();
+ return $this->assertExpectation(
+ new UnwantedPatternExpectation($pattern),
+ implode('', file($path)),
+ $message);
+ }
+
+ /**
+ * Accessor for current shell. Used for testing the
+ * the tester itself.
+ * @return Shell Current shell.
+ * @access protected
+ */
+ function &_getShell() {
+ return $this->_current_shell;
+ }
+
+ /**
+ * Factory for the shell to run the command on.
+ * @return Shell New shell object.
+ * @access protected
+ */
+ function &_createShell() {
+ return new SimpleShell();
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: simple_test.php,v 1.71 2004/08/21 00:38:04 lastcraft Exp $
+ */
+
+ /**#@+
+ * Includes SimpleTest files and defined the root constant
+ * for dependent libraries.
+ */
+ require_once(dirname(__FILE__) . '/errors.php');
+ require_once(dirname(__FILE__) . '/options.php');
+ require_once(dirname(__FILE__) . '/scorer.php');
+ require_once(dirname(__FILE__) . '/expectation.php');
+ require_once(dirname(__FILE__) . '/dumper.php');
+ if (! defined('SIMPLE_TEST')) {
+ define('SIMPLE_TEST', dirname(__FILE__) . '/');
+ }
+ /**#@-*/
+
+ /**
+ * The standard runner. Will run every method starting
+ * with test as well as the setUp() and tearDown()
+ * before and after each test method. Basically the
+ * Mediator pattern.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleRunner {
+ var $_test_case;
+ var $_scorer;
+
+ /**
+ * Takes in the test case and reporter to mediate between.
+ * @param SimpleTestCase $test_case Test case to run.
+ * @param SimpleScorer $scorer Reporter to receive events.
+ */
+ function SimpleRunner(&$test_case, &$scorer) {
+ $this->_test_case = &$test_case;
+ $this->_scorer = &$scorer;
+ }
+
+ /**
+ * Accessor for test case being run.
+ * @return SimpleTestCase Test case.
+ * @access protected
+ */
+ function &_getTestCase() {
+ return $this->_test_case;
+ }
+
+ /**
+ * Runs the test methods in the test case.
+ * @param SimpleTest $test_case Test case to run test on.
+ * @param string $method Name of test method.
+ * @access public
+ */
+ function run() {
+ $methods = get_class_methods(get_class($this->_test_case));
+ foreach ($methods as $method) {
+ if (! $this->_isTest($method)) {
+ continue;
+ }
+ if ($this->_isConstructor($method)) {
+ continue;
+ }
+ $this->_scorer->paintMethodStart($method);
+ $this->_scorer->invoke($this, $method);
+ $this->_scorer->paintMethodEnd($method);
+ }
+ }
+
+ /**
+ * Tests to see if the method is the constructor and
+ * so should be ignored.
+ * @param string $method Method name to try.
+ * @return boolean True if constructor.
+ * @access protected
+ */
+ function _isConstructor($method) {
+ return SimpleTestCompatibility::isA(
+ $this->_test_case,
+ strtolower($method));
+ }
+
+ /**
+ * Tests to see if the method is a test that should
+ * be run. Currently any method that starts with 'test'
+ * is a candidate.
+ * @param string $method Method name to try.
+ * @return boolean True if test method.
+ * @access protected
+ */
+ function _isTest($method) {
+ return strtolower(substr($method, 0, 4)) == 'test';
+ }
+
+ /**
+ * Invokes a test method and buffered with setUp()
+ * and tearDown() calls.
+ * @param string $method Test method to call.
+ * @access public
+ */
+ function invoke($method) {
+ $this->_test_case->before();
+ $this->_test_case->setUp();
+ $this->_test_case->$method();
+ $this->_test_case->tearDown();
+ $this->_test_case->after();
+ }
+
+ /**
+ * Paints the start of a test method.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintMethodStart($test_name) {
+ $this->_scorer->paintMethodStart($test_name);
+ }
+
+ /**
+ * Paints the end of a test method.
+ * @param string $test_name Name of test or other label.
+ * @access public
+ */
+ function paintMethodEnd($test_name) {
+ $this->_scorer->paintMethodEnd($test_name);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param string $message Message is ignored.
+ * @access public
+ */
+ function paintPass($message) {
+ $this->_scorer->paintPass($message);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param string $message Message is ignored.
+ * @access public
+ */
+ function paintFail($message) {
+ $this->_scorer->paintFail($message);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param string $message Text of error formatted by
+ * the test case.
+ * @access public
+ */
+ function paintError($message) {
+ $this->_scorer->paintError($message);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param Exception $exception Object thrown.
+ * @access public
+ */
+ function paintException($exception) {
+ $this->_scorer->paintException($exception);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param string $message Text to display.
+ * @access public
+ */
+ function paintMessage($message) {
+ $this->_scorer->paintMessage($message);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param string $message Text to display.
+ * @access public
+ */
+ function paintFormattedMessage($message) {
+ $this->_scorer->paintFormattedMessage($message);
+ }
+
+ /**
+ * Chains to the wrapped reporter.
+ * @param string $type Event type as text.
+ * @param mixed $payload Message or object.
+ * @return boolean Should return false if this
+ * type of signal should fail the
+ * test suite.
+ * @access public
+ */
+ function paintSignal($type, &$payload) {
+ $this->_scorer->paintSignal($type, $payload);
+ }
+ }
+
+ /**
+ * Extension that traps errors into an error queue.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleErrorTrappingRunner extends SimpleRunner {
+
+ /**
+ * Takes in the test case and reporter to mediate between.
+ * @param SimpleTestCase $test_case Test case to run.
+ * @param SimpleScorer $scorer Reporter to receive events.
+ */
+ function SimpleErrorTrappingRunner(&$test_case, &$scorer) {
+ $this->SimpleRunner($test_case, $scorer);
+ }
+
+ /**
+ * Invokes a test method and dispatches any
+ * untrapped errors. Called back from
+ * the visiting runner.
+ * @param string $method Test method to call.
+ * @access public
+ */
+ function invoke($method) {
+ set_error_handler('simpleTestErrorHandler');
+ parent::invoke($method);
+ $queue = &SimpleErrorQueue::instance();
+ while (list($severity, $message, $file, $line, $globals) = $queue->extract()) {
+ $test_case = &$this->_getTestCase();
+ $test_case->error($severity, $message, $file, $line, $globals);
+ }
+ restore_error_handler();
+ }
+ }
+
+ /**
+ * Basic test case. This is the smallest unit of a test
+ * suite. It searches for
+ * all methods that start with the the string "test" and
+ * runs them. Working test cases extend this class.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleTestCase {
+ var $_label;
+ var $_runner;
+
+ /**
+ * Sets up the test with no display.
+ * @param string $label If no test name is given then
+ * the class name is used.
+ * @access public
+ */
+ function SimpleTestCase($label = false) {
+ $this->_label = $label ? $label : get_class($this);
+ $this->_runner = false;
+ }
+
+ /**
+ * Accessor for the test name for subclasses.
+ * @return string Name of the test.
+ * @access public
+ * @static
+ */
+ function getLabel() {
+ return $this->_label;
+ }
+
+ /**
+ * Can modify the incoming reporter so as to run
+ * the tests differently. This version simply
+ * passes it straight through.
+ * @param SimpleReporter $reporter Incoming observer.
+ * @return SimpleReporter
+ * @access protected
+ */
+ function &_createRunner(&$reporter) {
+ return new SimpleErrorTrappingRunner($this, $reporter);
+ }
+
+ /**
+ * Uses reflection to run every method within itself
+ * starting with the string "test".
+ * @param SimpleReporter $reporter Current test reporter.
+ * @access public
+ */
+ function run(&$reporter) {
+ $reporter->paintCaseStart($this->getLabel());
+ $this->_runner = &$this->_createRunner($reporter);
+ $this->_runner->run();
+ $reporter->paintCaseEnd($this->getLabel());
+ return $reporter->getStatus();
+ }
+
+ /**
+ * Runs test case specific code before the user setUp().
+ * For extension writers not wanting to interfere with setUp().
+ * @access protected
+ */
+ function before() {
+ }
+
+ /**
+ * Runs test case specific code after the user tearDown().
+ * For extension writers not wanting to interfere with user tests.
+ * @access protected
+ */
+ function after() {
+ }
+
+ /**
+ * Sets up unit test wide variables at the start
+ * of each test method. To be overridden in
+ * actual user test cases.
+ * @access public
+ */
+ function setUp() {
+ }
+
+ /**
+ * Clears the data set in the setUp() method call.
+ * To be overridden by the user in actual user test cases.
+ * @access public
+ */
+ function tearDown() {
+ }
+
+ /**
+ * Sends a pass event with a message.
+ * @param string $message Message to send.
+ * @access public
+ */
+ function pass($message = "Pass") {
+ $this->_runner->paintPass($message . $this->getAssertionLine(' at line [%d]'));
+ }
+
+ /**
+ * Sends a fail event with a message.
+ * @param string $message Message to send.
+ * @access public
+ */
+ function fail($message = "Fail") {
+ $this->_runner->paintFail($message . $this->getAssertionLine(' at line [%d]'));
+ }
+
+ /**
+ * Formats a PHP error and dispatches it to the
+ * runner.
+ * @param integer $severity PHP error code.
+ * @param string $message Text of error.
+ * @param string $file File error occoured in.
+ * @param integer $line Line number of error.
+ * @param hash $globals PHP super global arrays.
+ * @access public
+ */
+ function error($severity, $message, $file, $line, $globals) {
+ $severity = SimpleErrorQueue::getSeverityAsString($severity);
+ $this->_runner->paintError(
+ "Unexpected PHP error [$message] severity [$severity] in [$file] line [$line]");
+ }
+
+ /**
+ * Sends a user defined event to the test runner.
+ * This is for small scale extension where
+ * both the test case and either the runner or
+ * display are subclassed.
+ * @param string $type Type of event.
+ * @param mixed $payload Object or message to deliver.
+ * @access public
+ */
+ function signal($type, &$payload) {
+ $this->_runner->paintSignal($type, $payload);
+ }
+
+ /**
+ * Cancels any outstanding errors.
+ * @access public
+ */
+ function swallowErrors() {
+ $queue = &SimpleErrorQueue::instance();
+ $queue->clear();
+ }
+
+ /**
+ * Runs an expectation directly, for extending the
+ * tests with new expectation classes.
+ * @param SimpleExpectation $expectation Expectation subclass.
+ * @param mixed $test_value Value to compare.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertExpectation(&$expectation, $test_value, $message = '%s') {
+ return $this->assertTrue(
+ $expectation->test($test_value),
+ sprintf($message, $expectation->overlayMessage($test_value)));
+ }
+
+ /**
+ * Called from within the test methods to register
+ * passes and failures.
+ * @param boolean $result Pass on true.
+ * @param string $message Message to display describing
+ * the test state.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertTrue($result, $message = false) {
+ if (! $message) {
+ $message = 'True assertion got ' . ($result ? 'True' : 'False');
+ }
+ if ($result) {
+ $this->pass($message);
+ return true;
+ } else {
+ $this->fail($message);
+ return false;
+ }
+ }
+
+ /**
+ * Will be true on false and vice versa. False
+ * is the PHP definition of false, so that null,
+ * empty strings, zero and an empty array all count
+ * as false.
+ * @param boolean $result Pass on false.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertFalse($result, $message = false) {
+ if (! $message) {
+ $message = 'False assertion got ' . ($result ? 'True' : 'False');
+ }
+ return ! $this->assertTrue(! $result, $message);
+ }
+
+ /**
+ * Uses a stack trace to find the line of an assertion.
+ * @param string $format String formatting.
+ * @param array $stack Stack frames top most first. Only
+ * needed if not using the PHP
+ * backtrace function.
+ * @return string Line number of first assert*
+ * method embedded in format string.
+ * @access public
+ */
+ function getAssertionLine($format = '%d', $stack = false) {
+ if ($stack === false) {
+ $stack = SimpleTestCompatibility::getStackTrace();
+ }
+ return SimpleDumper::getFormattedAssertionLine($stack, $format);
+ }
+
+ /**
+ * Sends a formatted dump of a variable to the
+ * test suite for those emergency debugging
+ * situations.
+ * @param mixed $variable Variable to display.
+ * @param string $message Message to display.
+ * @return mixed The original variable.
+ * @access public
+ */
+ function dump($variable, $message = false) {
+ $formatted = SimpleDumper::dump($variable);
+ if ($message) {
+ $formatted = $message . "\n" . $formatted;
+ }
+ $this->_runner->paintFormattedMessage($formatted);
+ return $variable;
+ }
+
+ /**
+ * Dispatches a text message straight to the
+ * test suite. Useful for status bar displays.
+ * @param string $message Message to show.
+ * @access public
+ */
+ function sendMessage($message) {
+ $this->_runner->PaintMessage($message);
+ }
+
+ /**
+ * Accessor for the number of subtests.
+ * @return integer Number of test cases.
+ * @access public
+ * @static
+ */
+ function getSize() {
+ return 1;
+ }
+ }
+
+ /**
+ * This is a composite test class for combining
+ * test cases and other RunnableTest classes into
+ * a group test.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class GroupTest {
+ var $_label;
+ var $_test_cases;
+
+ /**
+ * Sets the name of the test suite.
+ * @param string $label Name sent at the start and end
+ * of the test.
+ * @access public
+ */
+ function GroupTest($label) {
+ $this->_label = $label;
+ $this->_test_cases = array();
+ }
+
+ /**
+ * Accessor for the test name for subclasses.
+ * @return string Name of the test.
+ * @access public
+ */
+ function getLabel() {
+ return $this->_label;
+ }
+
+ /**
+ * Adds a test into the suite. Can be either a group
+ * test or some other unit test.
+ * @param SimpleTestCase $test_case Suite or individual test
+ * case implementing the
+ * runnable test interface.
+ * @access public
+ */
+ function addTestCase(&$test_case) {
+ $this->_test_cases[] = &$test_case;
+ }
+
+ /**
+ * Adds a test into the suite by class name. The class will
+ * be instantiated as needed.
+ * @param SimpleTestCase $test_case Suite or individual test
+ * case implementing the
+ * runnable test interface.
+ * @access public
+ */
+ function addTestClass($class) {
+ $this->_test_cases[] = $class;
+ }
+
+ /**
+ * Builds a group test from a library of test cases.
+ * The new group is composed into this one.
+ * @param string $test_file File name of library with
+ * test case classes.
+ * @access public
+ */
+ function addTestFile($test_file) {
+ $existing_classes = get_declared_classes();
+ require($test_file);
+ $group = new GroupTest($test_file);
+ foreach (get_declared_classes() as $class) {
+ if (in_array($class, $existing_classes)) {
+ continue;
+ }
+ if (! $this->_isTestCase($class)) {
+ continue;
+ }
+ if (SimpleTestOptions::isIgnored($class)) {
+ continue;
+ }
+ $group->addTestClass($class);
+ }
+ $this->addTestCase($group);
+ }
+
+ /**
+ * Test to see if a class is derived from the
+ * TestCase class.
+ * @param string $class Class name.
+ * @access private
+ */
+ function _isTestCase($class) {
+ while ($class = get_parent_class($class)) {
+ if (strtolower($class) == "simpletestcase") {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Invokes run() on all of the held test cases, instantiating
+ * them if necessary.
+ * @param SimpleReporter $reporter Current test reporter.
+ * @access public
+ */
+ function run(&$reporter) {
+ $reporter->paintGroupStart($this->getLabel(), $this->getSize());
+ for ($i = 0; $i < count($this->_test_cases); $i++) {
+ if (is_string($this->_test_cases[$i])) {
+ $class = $this->_test_cases[$i];
+ $test = &new $class();
+ $test->run($reporter);
+ } else {
+ $this->_test_cases[$i]->run($reporter);
+ }
+ }
+ $reporter->paintGroupEnd($this->getLabel());
+ return $reporter->getStatus();
+ }
+
+ /**
+ * Number of contained test cases.
+ * @return integer Total count of cases in the group.
+ * @access public
+ */
+ function getSize() {
+ $count = 0;
+ foreach ($this->_test_cases as $case) {
+ if (is_string($case)) {
+ $count++;
+ } else {
+ $count += $case->getSize();
+ }
+ }
+ return $count;
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage MockObjects
+ * @version $Id: socket.php,v 1.21 2004/06/30 22:13:08 lastcraft Exp $
+ */
+
+ /**#@+
+ * include SimpleTest files
+ */
+ require_once(dirname(__FILE__) . '/options.php');
+ /**#@-*/
+
+ /**
+ * Stashes an error for later. Useful for constructors
+ * until PHP gets exceptions.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class StickyError {
+ var $_error = 'Constructor not chained';
+
+ /**
+ * Sets the error to empty.
+ * @access public
+ */
+ function StickyError() {
+ $this->_clearError();
+ }
+
+ /**
+ * Test for an outstanding error.
+ * @return boolean True if there is an error.
+ * @access public
+ */
+ function isError() {
+ return ($this->_error != '');
+ }
+
+ /**
+ * Accessor for an outstanding error.
+ * @return string Empty string if no error otherwise
+ * the error message.
+ * @access public
+ */
+ function getError() {
+ return $this->_error;
+ }
+
+ /**
+ * Sets the internal error.
+ * @param string Error message to stash.
+ * @access protected
+ */
+ function _setError($error) {
+ $this->_error = $error;
+ }
+
+ /**
+ * Resets the error state to no error.
+ * @access protected
+ */
+ function _clearError() {
+ $this->_setError('');
+ }
+ }
+
+ /**
+ * Wrapper for TCP/IP socket.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleSocket extends StickyError {
+ var $_handle;
+ var $_is_open;
+ var $_sent;
+
+ /**
+ * Opens a socket for reading and writing.
+ * @param string $host Hostname to send request to.
+ * @param integer $port Port on remote machine to open.
+ * @param integer $timeout Connection timeout in seconds.
+ * @access public
+ */
+ function SimpleSocket($host, $port, $timeout) {
+ $this->StickyError();
+ $this->_is_open = false;
+ $this->_sent = '';
+ if (! ($this->_handle = $this->_openSocket($host, $port, $error_number, $error, $timeout))) {
+ $this->_setError("Cannot open [$host:$port] with [$error] within [$timeout] seconds");
+ return;
+ }
+ $this->_is_open = true;
+ SimpleTestCompatibility::setTimeout($this->_handle, $timeout);
+ }
+
+ /**
+ * Writes some data to the socket and saves alocal copy.
+ * @param string $message String to send to socket.
+ * @return boolean True if successful.
+ * @access public
+ */
+ function write($message) {
+ if ($this->isError() || ! $this->isOpen()) {
+ return false;
+ }
+ $count = fwrite($this->_handle, $message);
+ if (! $count) {
+ if ($count === false) {
+ $this->_setError('Cannot write to socket');
+ $this->close();
+ }
+ return false;
+ }
+ fflush($this->_handle);
+ $this->_sent .= $message;
+ return true;
+ }
+
+ /**
+ * Reads data from the socket.
+ * @param integer $block_size Size of chunk to read.
+ * @return integer Incoming bytes. False
+ * on error.
+ * @access public
+ */
+ function read($block_size = 255) {
+ if ($this->isError() || ! $this->isOpen()) {
+ return false;
+ }
+ $raw = fread($this->_handle, $block_size);
+ if ($raw === false) {
+ $this->_setError('Cannot read from socket');
+ $this->close();
+ }
+ return $raw;
+ }
+
+ /**
+ * Accessor for socket open state.
+ * @return boolean True if open.
+ * @access public
+ */
+ function isOpen() {
+ return $this->_is_open;
+ }
+
+ /**
+ * Closes the socket preventing further reads.
+ * Cannot be reopened once closed.
+ * @return boolean True if successful.
+ * @access public
+ */
+ function close() {
+ $this->_is_open = false;
+ return fclose($this->_handle);
+ }
+
+ /**
+ * Accessor for content so far.
+ * @return string Bytes sent only.
+ * @access public
+ */
+ function getSent() {
+ return $this->_sent;
+ }
+
+ /**
+ * Actually opens the low level socket.
+ * @param string $host Host to connect to.
+ * @param integer $port Port on host.
+ * @param integer $error_number Recipient of error code.
+ * @param string $error Recipoent of error message.
+ * @param integer $timeout Maximum time to wait for connection.
+ * @access protected
+ */
+ function _openSocket($host, $port, &$error_number, &$error, $timeout) {
+ return @fsockopen($host, $port, $error_number, $error, $timeout);
+ }
+ }
+
+ /**
+ * Wrapper for TCP/IP socket over TLS.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleSecureSocket extends SimpleSocket {
+
+ /**
+ * Opens a secure socket for reading and writing.
+ * @param string $host Hostname to send request to.
+ * @param integer $port Port on remote machine to open.
+ * @param integer $timeout Connection timeout in seconds.
+ * @access public
+ */
+ function SimpleSecureSocket($host, $port, $timeout) {
+ $this->SimpleSocket($host, $port, $timeout);
+ }
+
+ /**
+ * Actually opens the low level socket.
+ * @param string $host Host to connect to.
+ * @param integer $port Port on host.
+ * @param integer $error_number Recipient of error code.
+ * @param string $error Recipient of error message.
+ * @param integer $timeout Maximum time to wait for connection.
+ * @access protected
+ */
+ function _openSocket($host, $port, &$error_number, &$error, $timeout) {
+ return parent::_openSocket("tls://$host", $port, $error_number, $error, $timeout);
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest.
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: tag.php,v 1.65 2004/08/18 23:10:19 lastcraft Exp $
+ */
+
+ /**#@+
+ * include SimpleTest files
+ */
+ require_once(dirname(__FILE__) . '/options.php');
+ /**#@-*/
+
+ /**
+ * HTML or XML tag.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleTag {
+ var $_name;
+ var $_attributes;
+ var $_content;
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param string $name Tag name.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleTag($name, $attributes) {
+ $this->_name = $name;
+ $this->_attributes = $this->_keysToLowerCase($attributes);
+ $this->_content = '';
+ }
+
+ /**
+ * Make the keys lower case for case insensitive look-ups.
+ * @param hash $map Hash to convert.
+ * @return hash Unchanged values, but keys lower case.
+ * @access private
+ */
+ function _keysToLowerCase($map) {
+ $lower = array();
+ foreach ($map as $key => $value) {
+ $lower[strtolower($key)] = $value;
+ }
+ return $lower;
+ }
+
+ /**
+ * Check to see if the tag can have both start and
+ * end tags with content in between.
+ * @return boolean True if content allowed.
+ * @access public
+ */
+ function expectEndTag() {
+ return true;
+ }
+
+ /**
+ * Appends string content to the current content.
+ * @param string $content Additional text.
+ * @access public
+ */
+ function addContent($content) {
+ $this->_content .= (string)$content;
+ }
+
+ /**
+ * Adds an enclosed tag to the content.
+ * @param SimpleTag $tag New tag.
+ * @access public
+ */
+ function addTag(&$tag) {
+ }
+
+ /**
+ * Accessor for tag name.
+ * @return string Name of tag.
+ * @access public
+ */
+ function getTagName() {
+ return $this->_name;
+ }
+
+ /**
+ * List oflegal child elements.
+ * @return array List of element names.
+ * @access public
+ */
+ function getChildElements() {
+ return array();
+ }
+
+ /**
+ * Accessor for an attribute.
+ * @param string $label Attribute name.
+ * @return string Attribute value.
+ * @access public
+ */
+ function getAttribute($label) {
+ $label = strtolower($label);
+ if (! isset($this->_attributes[$label])) {
+ return false;
+ }
+ if ($this->_attributes[$label] === '') {
+ return true;
+ }
+ return (string)$this->_attributes[$label];
+ }
+
+ /**
+ * Sets an attribute.
+ * @param string $label Attribute name.
+ * @return string $value New attribute value.
+ * @access protected
+ */
+ function _setAttribute($label, $value) {
+ $this->_attributes[strtolower($label)] = $value;
+ }
+
+ /**
+ * Accessor for the whole content so far.
+ * @return string Content as big string.
+ * @access public
+ */
+ function getContent() {
+ return $this->_content;
+ }
+ }
+
+ /**
+ * Page title.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleTitleTag extends SimpleTag {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleTitleTag($attributes) {
+ $this->SimpleTag('title', $attributes);
+ }
+ }
+
+ /**
+ * Link.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleAnchorTag extends SimpleTag {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleAnchorTag($attributes) {
+ $this->SimpleTag('a', $attributes);
+ }
+
+ /**
+ * Accessor for URL as string.
+ * @return string Coerced as string.
+ * @access public
+ */
+ function getHref() {
+ $url = $this->getAttribute('href');
+ if (is_bool($url)) {
+ $url = '';
+ }
+ return $url;
+ }
+ }
+
+ /**
+ * Form element.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleWidget extends SimpleTag {
+ var $_value;
+ var $_is_set;
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param string $name Tag name.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleWidget($name, $attributes) {
+ $this->SimpleTag($name, $attributes);
+ $this->_value = false;
+ $this->_is_set = false;
+ }
+
+ /**
+ * Accessor for name submitted as the key in
+ * GET/POST variables hash.
+ * @return string Parsed value.
+ * @access public
+ */
+ function getName() {
+ return $this->getAttribute('name');
+ }
+
+ /**
+ * Accessor for default value parsed with the tag.
+ * @return string Parsed value.
+ * @access public
+ */
+ function getDefault() {
+ $default = $this->getAttribute('value');
+ if ($default === true) {
+ $default = '';
+ }
+ if ($default === false) {
+ $default = '';
+ }
+ return $default;
+ }
+
+ /**
+ * Accessor for currently set value or default if
+ * none.
+ * @return string Value set by form or default
+ * if none.
+ * @access public
+ */
+ function getValue() {
+ if (! $this->_is_set) {
+ return $this->getDefault();
+ }
+ return $this->_value;
+ }
+
+ /**
+ * Sets the current form element value.
+ * @param string $value New value.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ $this->_value = $value;
+ $this->_is_set = true;
+ return true;
+ }
+
+ /**
+ * Resets the form element value back to the
+ * default.
+ * @access public
+ */
+ function resetValue() {
+ $this->_is_set = false;
+ }
+ }
+
+ /**
+ * Text, password and hidden field.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleTextTag extends SimpleWidget {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleTextTag($attributes) {
+ $this->SimpleWidget('input', $attributes);
+ if ($this->getAttribute('value') === false) {
+ $this->_setAttribute('value', '');
+ }
+ }
+
+ /**
+ * Tag contains no content.
+ * @return boolean False.
+ * @access public
+ */
+ function expectEndTag() {
+ return false;
+ }
+
+ /**
+ * Sets the current form element value. Cannot
+ * change the value of a hidden field.
+ * @param string $value New value.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ if ($this->getAttribute('type') == 'hidden') {
+ return false;
+ }
+ return parent::setValue($value);
+ }
+ }
+
+ /**
+ * Submit button as input tag.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleSubmitTag extends SimpleWidget {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleSubmitTag($attributes) {
+ $this->SimpleWidget('input', $attributes);
+ if ($this->getAttribute('name') === false) {
+ $this->_setAttribute('name', 'submit');
+ }
+ if ($this->getAttribute('value') === false) {
+ $this->_setAttribute('value', 'Submit');
+ }
+ }
+
+ /**
+ * Tag contains no end element.
+ * @return boolean False.
+ * @access public
+ */
+ function expectEndTag() {
+ return false;
+ }
+
+ /**
+ * Disables the setting of the button value.
+ * @param string $value Ignored.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ return false;
+ }
+
+ /**
+ * Value of browser visible text.
+ * @return string Visible label.
+ * @access public
+ */
+ function getLabel() {
+ return $this->getValue();
+ }
+
+ /**
+ * Gets the values submitted as a form.
+ * @return array Hash of name and values.
+ * @access public
+ */
+ function getSubmitValues() {
+ return array($this->getName() => $this->getValue());
+ }
+ }
+
+ /**
+ * Image button as input tag.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleImageSubmitTag extends SimpleWidget {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleImageSubmitTag($attributes) {
+ $this->SimpleWidget('input', $attributes);
+ }
+
+ /**
+ * Tag contains no end element.
+ * @return boolean False.
+ * @access public
+ */
+ function expectEndTag() {
+ return false;
+ }
+
+ /**
+ * Disables the setting of the button value.
+ * @param string $value Ignored.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ return false;
+ }
+
+ /**
+ * Value of browser visible text.
+ * @return string Visible label.
+ * @access public
+ */
+ function getLabel() {
+ if ($this->getAttribute('title')) {
+ return $this->getAttribute('title');
+ }
+ return $this->getAttribute('alt');
+ }
+
+ /**
+ * Gets the values submitted as a form.
+ * @return array Hash of name and values.
+ * @access public
+ */
+ function getSubmitValues($x, $y) {
+ return array(
+ $this->getName() . '.x' => $x,
+ $this->getName() . '.y' => $y);
+ }
+ }
+
+ /**
+ * Submit button as button tag.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleButtonTag extends SimpleWidget {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * Defaults are very browser dependent.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleButtonTag($attributes) {
+ $this->SimpleWidget('button', $attributes);
+ }
+
+ /**
+ * Check to see if the tag can have both start and
+ * end tags with content in between.
+ * @return boolean True if content allowed.
+ * @access public
+ */
+ function expectEndTag() {
+ return true;
+ }
+
+ /**
+ * Disables the setting of the button value.
+ * @param string $value Ignored.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ return false;
+ }
+
+ /**
+ * Value of browser visible text.
+ * @return string Visible label.
+ * @access public
+ */
+ function getLabel() {
+ return $this->getContent();
+ }
+
+ /**
+ * Gets the values submitted as a form. Gone
+ * for the Mozilla defaults values.
+ * @return array Hash of name and values.
+ * @access public
+ */
+ function getSubmitValues() {
+ if ($this->getAttribute('name') === false) {
+ return array();
+ }
+ if ($this->getAttribute('value') === false) {
+ return array($this->getName() => '');
+ }
+ return array($this->getName() => $this->getValue());
+ }
+ }
+
+ /**
+ * Content tag for text area.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleTextAreaTag extends SimpleWidget {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleTextAreaTag($attributes) {
+ $this->SimpleWidget('textarea', $attributes);
+ }
+
+ /**
+ * Accessor for starting value.
+ * @return string Parsed value.
+ * @access public
+ */
+ function getDefault() {
+ if ($this->_wrapIsEnabled()) {
+ return wordwrap(
+ $this->getContent(),
+ (integer)$this->getAttribute('cols'),
+ "\n");
+ }
+ return $this->getContent();
+ }
+
+ /**
+ * Applies word wrapping if needed.
+ * @param string $value New value.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ if ($this->_wrapIsEnabled()) {
+ $value = wordwrap(
+ $value,
+ (integer)$this->getAttribute('cols'),
+ "\n");
+ }
+ return parent::setValue($value);
+ }
+
+ /**
+ * Test to see if text should be wrapped.
+ * @return boolean True if wrapping on.
+ * @access private
+ */
+ function _wrapIsEnabled() {
+ if ($this->getAttribute('cols')) {
+ $wrap = $this->getAttribute('wrap');
+ if (($wrap == 'physical') || ($wrap == 'hard')) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Checkbox widget.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleCheckboxTag extends SimpleWidget {
+
+ /**
+ * Starts with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleCheckboxTag($attributes) {
+ $this->SimpleWidget('input', $attributes);
+ if ($this->getAttribute('value') === false) {
+ $this->_setAttribute('value', 'on');
+ }
+ }
+
+ /**
+ * Tag contains no content.
+ * @return boolean False.
+ * @access public
+ */
+ function expectEndTag() {
+ return false;
+ }
+
+ /**
+ * The only allowed value in the one in the
+ * "value" attribute. The default for this
+ * attribute is "on".
+ * @param string $value New value.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ if ($value === false) {
+ return parent::setValue($value);
+ }
+ if ($value != $this->getAttribute('value')) {
+ return false;
+ }
+ return parent::setValue($value);
+ }
+
+ /**
+ * Accessor for starting value. The default
+ * value is "on".
+ * @return string Parsed value.
+ * @access public
+ */
+ function getDefault() {
+ if ($this->getAttribute('checked')) {
+ return $this->getAttribute('value');
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Drop down widget.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleSelectionTag extends SimpleWidget {
+ var $_options;
+ var $_choice;
+
+ /**
+ * Starts with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleSelectionTag($attributes) {
+ $this->SimpleWidget('select', $attributes);
+ $this->_options = array();
+ $this->_choice = false;
+ }
+
+ /**
+ * Adds an option tag to a selection field.
+ * @param SimpleOptionTag $tag New option.
+ * @access public
+ */
+ function addTag(&$tag) {
+ if ($tag->getTagName() == 'option') {
+ $this->_options[] = &$tag;
+ }
+ }
+
+ /**
+ * Text within the selection element is ignored.
+ * @param string $content Ignored.
+ * @access public
+ */
+ function addContent($content) {
+ }
+
+ /**
+ * Scans options for defaults. If none, then
+ * the first option is selected.
+ * @return string Selected field.
+ * @access public
+ */
+ function getDefault() {
+ for ($i = 0; $i < count($this->_options); $i++) {
+ if ($this->_options[$i]->getAttribute('selected')) {
+ return $this->_options[$i]->getDefault();
+ }
+ }
+ if (count($this->_options) > 0) {
+ return $this->_options[0]->getDefault();
+ }
+ return '';
+ }
+
+ /**
+ * Can only set allowed values.
+ * @param string $value New choice.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ for ($i = 0; $i < count($this->_options); $i++) {
+ if ($this->_options[$i]->getContent() === $value) {
+ $this->_choice = $i;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for current selection value.
+ * @return string Value attribute or
+ * content of opton.
+ * @access public
+ */
+ function getValue() {
+ if ($this->_choice === false) {
+ return $this->getDefault();
+ }
+ return $this->_options[$this->_choice]->getValue();
+ }
+ }
+
+ /**
+ * Drop down widget.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class MultipleSelectionTag extends SimpleWidget {
+ var $_options;
+ var $_values;
+
+ /**
+ * Starts with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function MultipleSelectionTag($attributes) {
+ $this->SimpleWidget('select', $attributes);
+ $this->_options = array();
+ $this->_values = false;
+ }
+
+ /**
+ * Adds an option tag to a selection field.
+ * @param SimpleOptionTag $tag New option.
+ * @access public
+ */
+ function addTag(&$tag) {
+ if ($tag->getTagName() == 'option') {
+ $this->_options[] = &$tag;
+ }
+ }
+
+ /**
+ * Text within the selection element is ignored.
+ * @param string $content Ignored.
+ * @access public
+ */
+ function addContent($content) {
+ }
+
+ /**
+ * Scans options for defaults to populate the
+ * value array().
+ * @return array Selected fields.
+ * @access public
+ */
+ function getDefault() {
+ $default = array();
+ for ($i = 0; $i < count($this->_options); $i++) {
+ if ($this->_options[$i]->getAttribute('selected')) {
+ $default[] = $this->_options[$i]->getDefault();
+ }
+ }
+ return $default;
+ }
+
+ /**
+ * Can only set allowed values.
+ * @param array $values New choices.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($values) {
+ foreach ($values as $value) {
+ $is_option = false;
+ for ($i = 0; $i < count($this->_options); $i++) {
+ if ($this->_options[$i]->getContent() == $value) {
+ $is_option = true;
+ break;
+ }
+ }
+ if (! $is_option) {
+ return false;
+ }
+ }
+ $this->_values = $values;
+ return true;
+ }
+
+ /**
+ * Accessor for current selection value.
+ * @return array List of currently set options.
+ * @access public
+ */
+ function getValue() {
+ if ($this->_values === false) {
+ return $this->getDefault();
+ }
+ return $this->_values;
+ }
+ }
+
+ /**
+ * Option for selection field.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleOptionTag extends SimpleWidget {
+
+ /**
+ * Stashes the attributes.
+ */
+ function SimpleOptionTag($attributes) {
+ $this->SimpleWidget('option', $attributes);
+ }
+
+ /**
+ * Does nothing.
+ * @param string $value Ignored.
+ * @return boolean Not allowed.
+ * @access public
+ */
+ function setValue($value) {
+ return false;
+ }
+
+ /**
+ * Accessor for starting value. Will be set to
+ * the option label if no value exists.
+ * @return string Parsed value.
+ * @access public
+ */
+ function getDefault() {
+ if ($this->getAttribute('value') === false) {
+ return $this->getContent();
+ }
+ return $this->getAttribute('value');
+ }
+ }
+
+ /**
+ * Radio button.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleRadioButtonTag extends SimpleWidget {
+
+ /**
+ * Stashes the attributes.
+ */
+ function SimpleRadioButtonTag($attributes) {
+ $this->SimpleWidget('input', $attributes);
+ if ($this->getAttribute('value') === false) {
+ $this->_setAttribute('value', 'on');
+ }
+ }
+
+ /**
+ * Tag contains no content.
+ * @return boolean False.
+ * @access public
+ */
+ function expectEndTag() {
+ return false;
+ }
+
+ /**
+ * The only allowed value in the one in the
+ * "value" attribute.
+ * @param string $value New value.
+ * @return boolean True if allowed.
+ * @access public
+ */
+ function setValue($value) {
+ if ($value === false) {
+ return parent::setValue($value);
+ }
+ if ($value != $this->getAttribute('value')) {
+ return false;
+ }
+ return parent::setValue($value);
+ }
+
+ /**
+ * Accessor for starting value.
+ * @return string Parsed value.
+ * @access public
+ */
+ function getDefault() {
+ if ($this->getAttribute('checked')) {
+ return $this->getAttribute('value');
+ }
+ return false;
+ }
+ }
+
+ /**
+ * A group of tags with the same name within a form.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleCheckboxGroup {
+ var $_widgets;
+
+ /**
+ * Starts empty.
+ * @access public
+ */
+ function SimpleCheckboxGroup() {
+ $this->_widgets = array();
+ }
+
+ /**
+ * Adds a tag to the group.
+ * @param SimpleWidget $widget
+ * @access public
+ */
+ function addWidget(&$widget) {
+ $this->_widgets[] = &$widget;
+ }
+
+ /**
+ * Accessor for current selected widget or false
+ * if none.
+ * @return string/array Widget values or false if none.
+ * @access public
+ */
+ function getValue() {
+ $values = array();
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ if ($this->_widgets[$i]->getValue()) {
+ $values[] = $this->_widgets[$i]->getValue();
+ }
+ }
+ return $this->_coerceValues($values);
+ }
+
+ /**
+ * Accessor for starting value that is active.
+ * @return string/array Widget values or false if none.
+ * @access public
+ */
+ function getDefault() {
+ $values = array();
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ if ($this->_widgets[$i]->getDefault()) {
+ $values[] = $this->_widgets[$i]->getDefault();
+ }
+ }
+ return $this->_coerceValues($values);
+ }
+
+ /**
+ * Accessor for current set values.
+ * @param string/array/boolean $values Either a single string, a
+ * hash or false for nothing set.
+ * @return boolean True if all values can be set.
+ * @access public
+ */
+ function setValue($values) {
+ $values = $this->_makeArray($values);
+ if (! $this->_valuesArePossible($values)) {
+ return false;
+ }
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ $possible = $this->_widgets[$i]->getAttribute('value');
+ if (in_array($this->_widgets[$i]->getAttribute('value'), $values)) {
+ $this->_widgets[$i]->setValue($possible);
+ } else {
+ $this->_widgets[$i]->setValue(false);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Tests to see if a possible value set is legal.
+ * @param string/array/boolean $values Either a single string, a
+ * hash or false for nothing set.
+ * @return boolean False if trying to set a
+ * missing value.
+ * @access private
+ */
+ function _valuesArePossible($values) {
+ $matches = array();
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ $possible = $this->_widgets[$i]->getAttribute('value');
+ if (in_array($possible, $values)) {
+ $matches[] = $possible;
+ }
+ }
+ return ($values == $matches);
+ }
+
+ /**
+ * Converts the output to an appropriate format. This means
+ * that no values is false, a single value is just that
+ * value and only two or more are contained in an array.
+ * @param array $values List of values of widgets.
+ * @return string/array/boolean Expected format for a tag.
+ * @access private
+ */
+ function _coerceValues($values) {
+ if (count($values) == 0) {
+ return false;
+ } elseif (count($values) == 1) {
+ return $values[0];
+ } else {
+ return $values;
+ }
+ }
+
+ /**
+ * Converts false or string into array. The opposite of
+ * the coercian method.
+ * @param string/array/boolean $value A single item is converted
+ * to a one item list. False
+ * gives an empty list.
+ * @return array List of values, possibly empty.
+ * @access private
+ */
+ function _makeArray($value) {
+ if ($value === false) {
+ return array();
+ }
+ if (is_string($value)) {
+ return array($value);
+ }
+ return $value;
+ }
+ }
+
+ /**
+ * A group of tags with the same name within a form.
+ * Used for radio buttons.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleRadioGroup {
+ var $_widgets;
+
+ /**
+ * Starts empty.
+ * @access public
+ */
+ function SimpleRadioGroup() {
+ $this->_widgets = array();
+ }
+
+ /**
+ * Adds a tag to the group.
+ * @param SimpleWidget $widget
+ * @access public
+ */
+ function addWidget(&$widget) {
+ $this->_widgets[] = &$widget;
+ }
+
+ /**
+ * Each tag is tried in turn until one is
+ * successfully set. The others will be
+ * unchecked if successful.
+ * @param string $value New value.
+ * @return boolean True if any allowed.
+ * @access public
+ */
+ function setValue($value) {
+ if (! $this->_valueIsPossible($value)) {
+ return false;
+ }
+ $index = false;
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ if (! $this->_widgets[$i]->setValue($value)) {
+ $this->_widgets[$i]->setValue(false);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Tests to see if a value is allowed.
+ * @param string Attempted value.
+ * @return boolean True if a valid value.
+ * @access private
+ */
+ function _valueIsPossible($value) {
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ if ($this->_widgets[$i]->getAttribute('value') == $value) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for current selected widget or false
+ * if none.
+ * @return string/boolean Value attribute or
+ * content of opton.
+ * @access public
+ */
+ function getValue() {
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ if ($this->_widgets[$i]->getValue()) {
+ return $this->_widgets[$i]->getValue();
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Accessor for starting value that is active.
+ * @return string/boolean Value of first checked
+ * widget or false if none.
+ * @access public
+ */
+ function getDefault() {
+ for ($i = 0; $i < count($this->_widgets); $i++) {
+ if ($this->_widgets[$i]->getDefault()) {
+ return $this->_widgets[$i]->getDefault();
+ }
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Tag to aid parsing the form.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleFormTag extends SimpleTag {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleFormTag($attributes) {
+ $this->SimpleTag('form', $attributes);
+ }
+ }
+
+ /**
+ * Tag to aid parsing the frames in a page.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleFrameTag extends SimpleTag {
+
+ /**
+ * Starts with a named tag with attributes only.
+ * @param hash $attributes Attribute names and
+ * string values.
+ */
+ function SimpleFrameTag($attributes) {
+ $this->SimpleTag('frame', $attributes);
+ }
+
+ /**
+ * Tag contains no content.
+ * @return boolean False.
+ * @access public
+ */
+ function expectEndTag() {
+ return false;
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: unit_tester.php,v 1.21 2004/08/25 21:00:02 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/simple_test.php');
+ require_once(dirname(__FILE__) . '/errors.php');
+ require_once(dirname(__FILE__) . '/dumper.php');
+ /**#@-*/
+
+ /**
+ * Standard unit test class for day to day testing
+ * of PHP code XP style. Adds some useful standard
+ * assertions.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class UnitTestCase extends SimpleTestCase {
+
+ /**
+ * Creates an empty test case. Should be subclassed
+ * with test methods for a functional test case.
+ * @param string $label Name of test case. Will use
+ * the class name if none specified.
+ * @access public
+ */
+ function UnitTestCase($label = false) {
+ if (! $label) {
+ $label = get_class($this);
+ }
+ $this->SimpleTestCase($label);
+ }
+
+ /**
+ * Will be true if the value is null.
+ * @param null $value Supposedly null value.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertNull($value, $message = "%s") {
+ $dumper = &new SimpleDumper();
+ $message = sprintf(
+ $message,
+ "[" . $dumper->describeValue($value) . "] should be null");
+ return $this->assertTrue(! isset($value), $message);
+ }
+
+ /**
+ * Will be true if the value is set.
+ * @param mixed $value Supposedly set value.
+ * @param string $message Message to display.
+ * @return boolean True on pass.
+ * @access public
+ */
+ function assertNotNull($value, $message = "%s") {
+ $dumper = &new SimpleDumper();
+ $message = sprintf(
+ $message,
+ "[" . $dumper->describeValue($value) . "] should not be null");
+ return $this->assertTrue(isset($value), $message);
+ }
+
+ /**
+ * Type and class test. Will pass if class
+ * matches the type name or is a subclass or
+ * if not an object, but the type is correct.
+ * @param mixed $object Object to test.
+ * @param string $type Type name as string.
+ * @param string $message Message to display.
+ * @return boolean True on pass.
+ * @access public
+ */
+ function assertIsA($object, $type, $message = "%s") {
+ return $this->assertExpectation(
+ new IsAExpectation($type),
+ $object,
+ $message);
+ }
+
+ /**
+ * Type and class mismatch test. Will pass if class
+ * name or underling type does not match the one
+ * specified.
+ * @param mixed $object Object to test.
+ * @param string $type Type name as string.
+ * @param string $message Message to display.
+ * @return boolean True on pass.
+ * @access public
+ */
+ function assertNotA($object, $type, $message = "%s") {
+ return $this->assertExpectation(
+ new NotAExpectation($type),
+ $object,
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if the two parameters have
+ * the same value only. Otherwise a fail.
+ * @param mixed $first Value to compare.
+ * @param mixed $second Value to compare.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertEqual($first, $second, $message = "%s") {
+ return $this->assertExpectation(
+ new EqualExpectation($first),
+ $second,
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if the two parameters have
+ * a different value. Otherwise a fail.
+ * @param mixed $first Value to compare.
+ * @param mixed $second Value to compare.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertNotEqual($first, $second, $message = "%s") {
+ return $this->assertExpectation(
+ new NotEqualExpectation($first),
+ $second,
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if the two parameters have
+ * the same value and same type. Otherwise a fail.
+ * @param mixed $first Value to compare.
+ * @param mixed $second Value to compare.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertIdentical($first, $second, $message = "%s") {
+ return $this->assertExpectation(
+ new IdenticalExpectation($first),
+ $second,
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if the two parameters have
+ * the different value or different type.
+ * @param mixed $first Value to compare.
+ * @param mixed $second Value to compare.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertNotIdentical($first, $second, $message = "%s") {
+ return $this->assertExpectation(
+ new NotIdenticalExpectation($first),
+ $second,
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if both parameters refer
+ * to the same object. Fail otherwise.
+ * @param mixed $first Object reference to check.
+ * @param mixed $second Hopefully the same object.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertReference(&$first, &$second, $message = "%s") {
+ $dumper = &new SimpleDumper();
+ $message = sprintf(
+ $message,
+ "[" . $dumper->describeValue($first) .
+ "] and [" . $dumper->describeValue($second) .
+ "] should reference the same object");
+ $temp = $first;
+ $first = uniqid("test");
+ $is_ref = ($first === $second);
+ $first = $temp;
+ return $this->assertTrue($is_ref, $message);
+ }
+
+ /**
+ * Will trigger a pass if both parameters refer
+ * to different objects. Fail otherwise.
+ * @param mixed $first Object reference to check.
+ * @param mixed $second Hopefully not the same object.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertCopy(&$first, &$second, $message = "%s") {
+ $dumper = &new SimpleDumper();
+ $message = sprintf(
+ $message,
+ "[" . $dumper->describeValue($first) .
+ "] and [" . $dumper->describeValue($second) .
+ "] should not be the same object");
+ $temp = $first;
+ $first = uniqid("test");
+ $is_ref = ($first === $second);
+ $first = $temp;
+ return $this->assertFalse($is_ref, $message);
+ }
+
+ /**
+ * Will trigger a pass if the Perl regex pattern
+ * is found in the subject. Fail otherwise.
+ * @param string $pattern Perl regex to look for including
+ * the regex delimiters.
+ * @param string $subject String to search in.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertWantedPattern($pattern, $subject, $message = "%s") {
+ return $this->assertExpectation(
+ new WantedPatternExpectation($pattern),
+ $subject,
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if the perl regex pattern
+ * is not present in subject. Fail if found.
+ * @param string $pattern Perl regex to look for including
+ * the regex delimiters.
+ * @param string $subject String to search in.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertNoUnwantedPattern($pattern, $subject, $message = "%s") {
+ return $this->assertExpectation(
+ new UnwantedPatternExpectation($pattern),
+ $subject,
+ $message);
+ }
+
+ /**
+ * Confirms that no errors have occoured so
+ * far in the test method.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertNoErrors($message = "%s") {
+ $queue = &SimpleErrorQueue::instance();
+ return $this->assertTrue(
+ $queue->isEmpty(),
+ sprintf($message, "Should be no errors"));
+ }
+
+ /**
+ * Confirms that an error has occoured and
+ * optionally that the error text matches exactly.
+ * @param string $expected Expected error text or
+ * false for no check.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertError($expected = false, $message = "%s") {
+ $queue = &SimpleErrorQueue::instance();
+ if ($queue->isEmpty()) {
+ $this->fail(sprintf($message, "Expected error not found"));
+ return;
+ }
+ list($severity, $content, $file, $line, $globals) = $queue->extract();
+ $severity = SimpleErrorQueue::getSeverityAsString($severity);
+ return $this->assertTrue(
+ ! $expected || ($expected == $content),
+ "Expected [$expected] in PHP error [$content] severity [$severity] in [$file] line [$line]");
+ }
+
+ /**
+ * Confirms that an error has occoured and
+ * that the error text matches a Perl regular
+ * expression.
+ * @param string $expected Perl regular expresion to
+ * match against.
+ * @param string $message Message to display.
+ * @return boolean True on pass
+ * @access public
+ */
+ function assertErrorPattern($pattern, $message = "%s") {
+ $queue = &SimpleErrorQueue::instance();
+ if ($queue->isEmpty()) {
+ $this->fail(sprintf($message, "Expected error not found"));
+ return;
+ }
+ list($severity, $content, $file, $line, $globals) = $queue->extract();
+ $severity = SimpleErrorQueue::getSeverityAsString($severity);
+ return $this->assertTrue(
+ (boolean)preg_match($pattern, $content),
+ "Expected pattern match [$pattern] in PHP error [$content] severity [$severity] in [$file] line [$line]");
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: url.php,v 1.13 2004/08/15 21:53:08 lastcraft Exp $
+ */
+
+ /**
+ * Bundle of GET/POST parameters. Can include
+ * repeated parameters.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleQueryString {
+ var $_request;
+
+ /**
+ * Starts empty.
+ * @param array $query/SimpleQueryString Hash of parameters.
+ * Multiple values are
+ * as lists on a single key.
+ * @access public
+ */
+ function SimpleQueryString($query = false) {
+ if (! $query) {
+ $query = array();
+ }
+ $this->_request = array();
+ $this->merge($query);
+ }
+
+ /**
+ * Adds a parameter to the query.
+ * @param string $key Key to add value to.
+ * @param string/array $value New data.
+ * @access public
+ */
+ function add($key, $value) {
+ if (! isset($this->_request[$key])) {
+ $this->_request[$key] = array();
+ }
+ if (is_array($value)) {
+ foreach ($value as $item) {
+ $this->_request[$key][] = $item;
+ }
+ } else {
+ $this->_request[$key][] = $value;
+ }
+ }
+
+ /**
+ * Adds a set of parameters to this query.
+ * @param array $query/SimpleQueryString Hash of parameters.
+ * Multiple values are
+ * as lists on a single key.
+ * @access public
+ */
+ function merge($query) {
+ if (is_object($query)) {
+ foreach ($query->getKeys() as $key) {
+ $this->add($key, $query->getValue($key));
+ }
+ } else {
+ foreach ($query as $key => $value) {
+ $this->add($key, $value);
+ }
+ }
+ }
+
+ /**
+ * Accessor for single value.
+ * @return string/array False if missing, string
+ * if present and array if
+ * multiple entries.
+ * @access public
+ */
+ function getValue($key) {
+ if (! isset($this->_request[$key])) {
+ return false;
+ } elseif (count($this->_request[$key]) == 1) {
+ return $this->_request[$key][0];
+ } else {
+ return $this->_request[$key];
+ }
+ }
+
+ /**
+ * Accessor for key list.
+ * @return array List of keys present.
+ * @access public
+ */
+ function getKeys() {
+ return array_keys($this->_request);
+ }
+
+ /**
+ * Gets all parameters as structured hash. Repeated
+ * values are list values.
+ * @return array Hash of keys and value sets.
+ * @access public
+ */
+ function getAll() {
+ $values = array();
+ foreach ($this->_request as $key => $value) {
+ $values[$key] = (count($value) == 1 ? $value[0] : $value);
+ }
+ return $values;
+ }
+
+ /**
+ * Renders the query string as a URL encoded
+ * request part.
+ * @return string Part of URL.
+ * @access public
+ */
+ function asString() {
+ $statements = array();
+ foreach ($this->_request as $key => $values) {
+ foreach ($values as $value) {
+ $statements[] = "$key=" . urlencode($value);
+ }
+ }
+ return implode('&', $statements);
+ }
+ }
+
+ /**
+ * URL parser to replace parse_url() PHP function which
+ * got broken in PHP 4.3.0. Adds some browser specific
+ * functionality such as expandomatic expansion.
+ * Guesses a bit trying to separate the host from
+ * the path.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleUrl {
+ var $_scheme;
+ var $_username;
+ var $_password;
+ var $_host;
+ var $_port;
+ var $_path;
+ var $_request;
+ var $_fragment;
+ var $_x;
+ var $_y;
+ var $_target;
+
+ /**
+ * Constructor. Parses URL into sections.
+ * @param string $url Incoming URL.
+ * @access public
+ */
+ function SimpleUrl($url) {
+ list($this->_x, $this->_y) = $this->_chompCoordinates($url);
+ $this->_scheme = $this->_chompScheme($url);
+ list($this->_username, $this->_password) = $this->_chompLogin($url);
+ $this->_host = $this->_chompHost($url);
+ $this->_port = false;
+ if (preg_match('/(.*?):(.*)/', $this->_host, $host_parts)) {
+ $this->_host = $host_parts[1];
+ $this->_port = (integer)$host_parts[2];
+ }
+ $this->_path = $this->_chompPath($url);
+ $this->_request = $this->_parseRequest($this->_chompRequest($url));
+ $this->_fragment = (strncmp($url, "#", 1) == 0 ? substr($url, 1) : false);
+ $this->_target = false;
+ }
+
+ /**
+ * Extracts the X, Y coordinate pair from an image map.
+ * @param string $url URL so far. The coordinates will be
+ * removed.
+ * @return array X, Y as a pair of integers.
+ * @access private
+ */
+ function _chompCoordinates(&$url) {
+ if (preg_match('/(.*)\?(\d+),(\d+)$/', $url, $matches)) {
+ $url = $matches[1];
+ return array((integer)$matches[2], (integer)$matches[3]);
+ }
+ return array(false, false);
+ }
+
+ /**
+ * Extracts the scheme part of an incoming URL.
+ * @param string $url URL so far. The scheme will be
+ * removed.
+ * @return string Scheme part or false.
+ * @access private
+ */
+ function _chompScheme(&$url) {
+ if (preg_match('/(.*?):(\/\/)(.*)/', $url, $matches)) {
+ $url = $matches[2] . $matches[3];
+ return $matches[1];
+ }
+ return false;
+ }
+
+ /**
+ * Extracts the username and password from the
+ * incoming URL. The // prefix will be reattached
+ * to the URL after the doublet is extracted.
+ * @param string $url URL so far. The username and
+ * password are removed.
+ * @return array Two item list of username and
+ * password. Will urldecode() them.
+ * @access private
+ */
+ function _chompLogin(&$url) {
+ $prefix = '';
+ if (preg_match('/(\/\/)(.*)/', $url, $matches)) {
+ $prefix = $matches[1];
+ $url = $matches[2];
+ }
+ if (preg_match('/(.*?)@(.*)/', $url, $matches)) {
+ $url = $prefix . $matches[2];
+ $parts = split(":", $matches[1]);
+ return array(
+ urldecode($parts[0]),
+ isset($parts[1]) ? urldecode($parts[1]) : false);
+ }
+ $url = $prefix . $url;
+ return array(false, false);
+ }
+
+ /**
+ * Extracts the host part of an incoming URL.
+ * Includes the port number part. Will extract
+ * the host if it starts with // or it has
+ * a top level domain or it has at least two
+ * dots.
+ * @param string $url URL so far. The host will be
+ * removed.
+ * @return string Host part guess or false.
+ * @access private
+ */
+ function _chompHost(&$url) {
+ if (preg_match('/(\/\/)(.*?)(\/.*|\?.*|#.*|$)/', $url, $matches)) {
+ $url = $matches[3];
+ return $matches[2];
+ }
+ if (preg_match('/(.*?)(\.\.\/|\.\/|\/|\?|#|$)(.*)/', $url, $matches)) {
+ if (preg_match('/[a-z0-9\-]+\.(com|edu|net|org|gov|mil|int)/i', $matches[1])) {
+ $url = $matches[2] . $matches[3];
+ return $matches[1];
+ } elseif (preg_match('/[a-z0-9\-]+\.[a-z0-9\-]+\.[a-z0-9\-]+/i', $matches[1])) {
+ $url = $matches[2] . $matches[3];
+ return $matches[1];
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Extracts the path information from the incoming
+ * URL. Strips this path from the URL.
+ * @param string $url URL so far. The host will be
+ * removed.
+ * @return string Path part or '/'.
+ * @access private
+ */
+ function _chompPath(&$url) {
+ if (preg_match('/(.*?)(\?|#|$)(.*)/', $url, $matches)) {
+ $url = $matches[2] . $matches[3];
+ return ($matches[1] ? $matches[1] : '');
+ }
+ return '';
+ }
+
+ /**
+ * Strips off the request data.
+ * @param string $url URL so far. The request will be
+ * removed.
+ * @return string Raw request part.
+ * @access private
+ */
+ function _chompRequest(&$url) {
+ if (preg_match('/\?(.*?)(#|$)(.*)/', $url, $matches)) {
+ $url = $matches[2] . $matches[3];
+ return $matches[1];
+ }
+ return '';
+ }
+
+ /**
+ * Breaks the request down into an object.
+ * @param string $raw Raw request.
+ * @return SimpleQueryString Parsed data.
+ * @access private
+ */
+ function _parseRequest($raw) {
+ $request = new SimpleQueryString();
+ foreach (split("&", $raw) as $pair) {
+ if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
+ $request->add($matches[1], urldecode($matches[2]));
+ } elseif ($pair) {
+ $request->add($pair, '');
+ }
+ }
+ return $request;
+ }
+
+ /**
+ * Accessor for protocol part.
+ * @param string $default Value to use if not present.
+ * @return string Scheme name, e.g "http".
+ * @access public
+ */
+ function getScheme($default = false) {
+ return $this->_scheme ? $this->_scheme : $default;
+ }
+
+ /**
+ * Accessor for user name.
+ * @return string Username preceding host.
+ * @access public
+ */
+ function getUsername() {
+ return $this->_username;
+ }
+
+ /**
+ * Accessor for password.
+ * @return string Password preceding host.
+ * @access public
+ */
+ function getPassword() {
+ return $this->_password;
+ }
+
+ /**
+ * Accessor for hostname and port.
+ * @param string $default Value to use if not present.
+ * @return string Hostname only.
+ * @access public
+ */
+ function getHost($default = false) {
+ return $this->_host ? $this->_host : $default;
+ }
+
+ /**
+ * Accessor for top level domain.
+ * @return string Last part of host.
+ * @access public
+ */
+ function getTld() {
+ $path_parts = pathinfo($this->getHost());
+ return (isset($path_parts['extension']) ? $path_parts['extension'] : false);
+ }
+
+ /**
+ * Accessor for port number.
+ * @return integer TCP/IP port number.
+ * @access public
+ */
+ function getPort() {
+ return $this->_port;
+ }
+
+ /**
+ * Accessor for path.
+ * @return string Full path including leading slash if implied.
+ * @access public
+ */
+ function getPath() {
+ if (! $this->_path && $this->_host) {
+ return '/';
+ }
+ return $this->_path;
+ }
+
+ /**
+ * Accessor for page if any. This may be a
+ * directory name if ambiguious.
+ * @return Page name.
+ * @access public
+ */
+ function getPage() {
+ if (! preg_match('/([^\/]*?)$/', $this->getPath(), $matches)) {
+ return false;
+ }
+ return $matches[1];
+ }
+
+ /**
+ * Gets the path to the page.
+ * @return string Path less the page.
+ * @access public
+ */
+ function getBasePath() {
+ if (! preg_match('/(.*\/)[^\/]*?$/', $this->getPath(), $matches)) {
+ return false;
+ }
+ return $matches[1];
+ }
+
+ /**
+ * Accessor for fragment at end of URL after the "#".
+ * @return string Part after "#".
+ * @access public
+ */
+ function getFragment() {
+ return $this->_fragment;
+ }
+
+ /**
+ * Accessor for horizontal image coordinate.
+ * @return integer X value.
+ * @access public
+ */
+ function getX() {
+ return $this->_x;
+ }
+
+ /**
+ * Accessor for vertical image coordinate.
+ * @return integer Y value.
+ * @access public
+ */
+ function getY() {
+ return $this->_y;
+ }
+
+ /**
+ * Accessor for current request parameters
+ * in URL string form
+ * @return string Form is string "?a=1&b=2", etc.
+ * @access public
+ */
+ function getEncodedRequest() {
+ $query = $this->_request;
+ $encoded = $query->asString();
+ if ($encoded) {
+ return "?$encoded";
+ }
+ return '';
+ }
+
+ /**
+ * Encodes parameters as HTTP request parameters.
+ * @param hash $parameters Request as hash.
+ * @return string Encoded request.
+ * @access public
+ * @static
+ */
+ function encodeRequest($parameters) {
+ if (! $parameters) {
+ return '';
+ }
+ $query = &new SimpleQueryString();
+ foreach ($parameters as $key => $value) {
+ $query->add($key, $value);
+ }
+ return $query->asString();
+ }
+
+ /**
+ * Accessor for current request parameters
+ * as an object.
+ * @return array Hash of name and value pairs. The
+ * values will be lists for repeated items.
+ * @access public
+ */
+ function getRequest() {
+ return $this->_request->getAll();
+ }
+
+ /**
+ * Adds an additional parameter to the request.
+ * @param string $key Name of parameter.
+ * @param string $value Value as string.
+ * @access public
+ */
+ function addRequestParameter($key, $value) {
+ $this->_request->add($key, $value);
+ }
+
+ /**
+ * Adds additional parameters to the request.
+ * @param hash $parameters Hash of additional parameters.
+ * @access public
+ */
+ function addRequestParameters($parameters) {
+ if ($parameters) {
+ $this->_request->merge($parameters);
+ }
+ }
+
+ /**
+ * Clears down all parameters.
+ * @access public
+ */
+ function clearRequest() {
+ $this->_request = &new SimpleQueryString();
+ }
+
+ /**
+ * Sets image coordinates. Set to flase to clear
+ * them.
+ * @param integer $x Horizontal position.
+ * @param integer $y Vertical position.
+ * @access public
+ */
+ function setCoordinates($x = false, $y = false) {
+ if (($x === false) || ($y === false)) {
+ $this->_x = $this->_y = false;
+ return;
+ }
+ $this->_x = (integer)$x;
+ $this->_y = (integer)$y;
+ }
+
+ /**
+ * Gets the frame target if present. Although
+ * not strictly part of the URL specification it
+ * acts as similarily to the browser.
+ * @return boolean/string Frame name or false if none.
+ * @access public
+ */
+ function getTarget() {
+ return $this->_target;
+ }
+
+ /**
+ * Attaches a frame target.
+ * @param string $frame Name of frame.
+ * @access public
+ */
+ function setTarget($frame) {
+ $this->_target = $frame;
+ }
+
+ /**
+ * Renders the URL back into a string.
+ * @return string URL in canonical form.
+ * @access public
+ */
+ function asString() {
+ $scheme = $identity = $host = $path = $encoded = $fragment = '';
+ if ($this->_username && $this->_password) {
+ $identity = $this->_username . ':' . $this->_password . '@';
+ }
+ if ($this->getHost()) {
+ $scheme = $this->getScheme() ? $this->getScheme() : 'http';
+ $host = $this->getHost();
+ }
+ if (substr($this->_path, 0, 1) == '/') {
+ $path = $this->normalisePath($this->_path);
+ }
+ $encoded = $this->getEncodedRequest();
+ $fragment = $this->getFragment() ? '#'. $this->getFragment() : '';
+ $coords = ($this->_x !== false) ? '?' . $this->_x . ',' . $this->_y : '';
+ return "$scheme://$identity$host$path$encoded$fragment$coords";
+ }
+
+ /**
+ * Replaces unknown sections to turn a relative
+ * URL into an absolute one. The base URL can
+ * be either a string or a SimpleUrl object.
+ * @param string/SimpleUrl $base Base URL.
+ * @access public
+ */
+ function makeAbsolute($base) {
+ if (! is_object($base)) {
+ $base = new SimpleUrl($base);
+ }
+ $scheme = $this->getScheme() ? $this->getScheme() : $base->getScheme();
+ $host = $this->getHost();
+ $port = $this->getPort() ? ':' . $this->getPort() : '';
+ $path = $this->normalisePath($this->_path);
+ if (! $host) {
+ $host = $base->getHost();
+ $port = $base->getPort() ? ':' . $base->getPort() : '';
+ if ($this->_isRelativePath($this->_path)) {
+ $path = $this->normalisePath($base->getBasePath() . $this->_path);
+ }
+ }
+ $identity = $this->_getIdentity() ? $this->_getIdentity() . '@' : '';
+ $encoded = $this->getEncodedRequest();
+ $fragment = $this->getFragment() ? '#'. $this->getFragment() : '';
+ $coords = ($this->_x !== false) ? '?' . $this->_x . ',' . $this->_y : '';
+ return new SimpleUrl("$scheme://$identity$host$port$path$encoded$fragment$coords");
+ }
+
+ /**
+ * Simple test to see if a path part is relative.
+ * @param string $path Path to test.
+ * @return boolean True if starts with a "/".
+ * @access private
+ */
+ function _isRelativePath($path) {
+ return (substr($path, 0, 1) != '/');
+ }
+
+ /**
+ * Extracts the username and password for use in rendering
+ * a URL.
+ * @return string/boolean Form of username:password@ or false.
+ * @access private
+ */
+ function _getIdentity() {
+ if ($this->_username && $this->_password) {
+ return $this->_username . ':' . $this->_password;
+ }
+ return false;
+ }
+
+ /**
+ * Replaces . and .. sections of the path.
+ * @param string $path Unoptimised path.
+ * @return string Path with dots removed if possible.
+ * @access public
+ */
+ function normalisePath($path) {
+ $path = preg_replace('|/[^/]+/\.\./|', '/', $path);
+ return preg_replace('|/\./|', '/', $path);
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: user_agent.php,v 1.38 2004/06/30 20:40:07 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/http.php');
+ require_once(dirname(__FILE__) . '/authentication.php');
+ /**#@-*/
+
+ define('DEFAULT_MAX_REDIRECTS', 3);
+ define('DEFAULT_CONNECTION_TIMEOUT', 15);
+
+ /**
+ * Repository for cookies. This stuff is a
+ * tiny bit browser dependent.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleCookieJar {
+ var $_cookies;
+
+ /**
+ * Constructor. Jar starts empty.
+ * @access public
+ */
+ function SimpleCookieJar() {
+ $this->_cookies = array();
+ }
+
+ /**
+ * Removes expired and temporary cookies as if
+ * the browser was closed and re-opened.
+ * @param string/integer $now Time to test expiry against.
+ * @access public
+ */
+ function restartSession($date = false) {
+ $surviving_cookies = array();
+ for ($i = 0; $i < count($this->_cookies); $i++) {
+ if (! $this->_cookies[$i]->getValue()) {
+ continue;
+ }
+ if (! $this->_cookies[$i]->getExpiry()) {
+ continue;
+ }
+ if ($date && $this->_cookies[$i]->isExpired($date)) {
+ continue;
+ }
+ $surviving_cookies[] = $this->_cookies[$i];
+ }
+ $this->_cookies = $surviving_cookies;
+ }
+
+ /**
+ * Ages all cookies in the cookie jar.
+ * @param integer $interval The old session is moved
+ * into the past by this number
+ * of seconds. Cookies now over
+ * age will be removed.
+ * @access public
+ */
+ function agePrematurely($interval) {
+ for ($i = 0; $i < count($this->_cookies); $i++) {
+ $this->_cookies[$i]->agePrematurely($interval);
+ }
+ }
+
+ /**
+ * Adds a cookie to the jar. This will overwrite
+ * cookies with matching host, paths and keys.
+ * @param SimpleCookie $cookie New cookie.
+ * @access public
+ */
+ function setCookie($cookie) {
+ for ($i = 0; $i < count($this->_cookies); $i++) {
+ $is_match = $this->_isMatch(
+ $cookie,
+ $this->_cookies[$i]->getHost(),
+ $this->_cookies[$i]->getPath(),
+ $this->_cookies[$i]->getName());
+ if ($is_match) {
+ $this->_cookies[$i] = $cookie;
+ return;
+ }
+ }
+ $this->_cookies[] = $cookie;
+ }
+
+ /**
+ * Fetches a hash of all valid cookies filtered
+ * by host, path and keyed by name
+ * Any cookies with missing categories will not
+ * be filtered out by that category. Expired
+ * cookies must be cleared by restarting the session.
+ * @param string $host Host name requirement.
+ * @param string $path Path encompassing cookies.
+ * @return hash Valid cookie objects keyed
+ * on the cookie name.
+ * @access public
+ */
+ function getValidCookies($host = false, $path = "/") {
+ $valid_cookies = array();
+ foreach ($this->_cookies as $cookie) {
+ if ($this->_isMatch($cookie, $host, $path, $cookie->getName())) {
+ $valid_cookies[] = $cookie;
+ }
+ }
+ return $valid_cookies;
+ }
+
+ /**
+ * Tests cookie for matching against search
+ * criteria.
+ * @param SimpleTest $cookie Cookie to test.
+ * @param string $host Host must match.
+ * @param string $path Cookie path must be shorter than
+ * this path.
+ * @param string $name Name must match.
+ * @return boolean True if matched.
+ * @access private
+ */
+ function _isMatch($cookie, $host, $path, $name) {
+ if ($cookie->getName() != $name) {
+ return false;
+ }
+ if ($host && $cookie->getHost() && !$cookie->isValidHost($host)) {
+ return false;
+ }
+ if (! $cookie->isValidPath($path)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Adds the current cookies to a request.
+ * @param SimpleHttpRequest $request Request to modify.
+ * @param SimpleUrl $url Cookie selector.
+ * @access private
+ */
+ function addHeaders(&$request, $url) {
+ $cookies = $this->getValidCookies($url->getHost(), $url->getPath());
+ foreach ($cookies as $cookie) {
+ $request->setCookie($cookie);
+ }
+ }
+ }
+
+ /**
+ * Fetches web pages whilst keeping track of
+ * cookies and authentication.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class SimpleUserAgent {
+ var $_cookie_jar;
+ var $_authenticator;
+ var $_max_redirects;
+ var $_proxy;
+ var $_proxy_username;
+ var $_proxy_password;
+ var $_connection_timeout;
+ var $_additional_headers;
+
+ /**
+ * Starts with no cookies, realms or proxies.
+ * @access public
+ */
+ function SimpleUserAgent() {
+ $this->_cookie_jar = &new SimpleCookieJar();
+ $this->_authenticator = &new SimpleAuthenticator();
+ $this->setMaximumRedirects(DEFAULT_MAX_REDIRECTS);
+ $this->_proxy = false;
+ $this->_proxy_username = false;
+ $this->_proxy_password = false;
+ $this->setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
+ $this->_additional_headers = array();
+ }
+
+ /**
+ * Removes expired and temporary cookies as if
+ * the browser was closed and re-opened.
+ * @param string/integer $date Time when session restarted.
+ * If omitted then all persistent
+ * cookies are kept.
+ * @access public
+ */
+ function restartSession($date = false) {
+ $this->_cookie_jar->restartSession($date);
+ }
+
+ /**
+ * Adds a header to every fetch.
+ * @param string $header Header line to add to every
+ * request until cleared.
+ * @access public
+ */
+ function addHeader($header) {
+ $this->_additional_headers[] = $header;
+ }
+
+ /**
+ * Ages the cookies by the specified time.
+ * @param integer $interval Amount in seconds.
+ * @access public
+ */
+ function ageCookies($interval) {
+ $this->_cookie_jar->agePrematurely($interval);
+ }
+
+ /**
+ * Sets an additional cookie. If a cookie has
+ * the same name and path it is replaced.
+ * @param string $name Cookie key.
+ * @param string $value Value of cookie.
+ * @param string $host Host upon which the cookie is valid.
+ * @param string $path Cookie path if not host wide.
+ * @param string $expiry Expiry date.
+ * @access public
+ */
+ function setCookie($name, $value, $host = false, $path = '/', $expiry = false) {
+ $cookie = new SimpleCookie($name, $value, $path, $expiry);
+ if ($host) {
+ $cookie->setHost($host);
+ }
+ $this->_cookie_jar->setCookie($cookie);
+ }
+
+ /**
+ * Reads the most specific cookie value from the
+ * browser cookies.
+ * @param string $host Host to search.
+ * @param string $path Applicable path.
+ * @param string $name Name of cookie to read.
+ * @return string False if not present, else the
+ * value as a string.
+ * @access public
+ */
+ function getCookieValue($host, $path, $name) {
+ $longest_path = '';
+ foreach ($this->_cookie_jar->getValidCookies($host, $path) as $cookie) {
+ if ($name == $cookie->getName()) {
+ if (strlen($cookie->getPath()) > strlen($longest_path)) {
+ $value = $cookie->getValue();
+ $longest_path = $cookie->getPath();
+ }
+ }
+ }
+ return (isset($value) ? $value : false);
+ }
+
+ /**
+ * Reads the current cookies within the base URL.
+ * @param string $name Key of cookie to find.
+ * @param SimpleUrl $base Base URL to search from.
+ * @return string Null if there is no base URL, false
+ * if the cookie is not set.
+ * @access public
+ */
+ function getBaseCookieValue($name, $base) {
+ if (! $base) {
+ return null;
+ }
+ return $this->getCookieValue($base->getHost(), $base->getPath(), $name);
+ }
+
+ /**
+ * Sets the socket timeout for opening a connection.
+ * @param integer $timeout Maximum time in seconds.
+ * @access public
+ */
+ function setConnectionTimeout($timeout) {
+ $this->_connection_timeout = $timeout;
+ }
+
+ /**
+ * Sets the maximum number of redirects before
+ * a page will be loaded anyway.
+ * @param integer $max Most hops allowed.
+ * @access public
+ */
+ function setMaximumRedirects($max) {
+ $this->_max_redirects = $max;
+ }
+
+ /**
+ * Sets proxy to use on all requests for when
+ * testing from behind a firewall. Set URL
+ * to false to disable.
+ * @param string $proxy Proxy URL.
+ * @param string $username Proxy username for authentication.
+ * @param string $password Proxy password for authentication.
+ * @access public
+ */
+ function useProxy($proxy, $username, $password) {
+ if (! $proxy) {
+ $this->_proxy = false;
+ return;
+ }
+ if (strncmp($proxy, 'http://', 7) != 0) {
+ $proxy = 'http://'. $proxy;
+ }
+ $this->_proxy = &new SimpleUrl($proxy);
+ $this->_proxy_username = $username;
+ $this->_proxy_password = $password;
+ }
+
+ /**
+ * Test to see if the redirect limit is passed.
+ * @param integer $redirects Count so far.
+ * @return boolean True if over.
+ * @access private
+ */
+ function _isTooManyRedirects($redirects) {
+ return ($redirects > $this->_max_redirects);
+ }
+
+ /**
+ * Sets the identity for the current realm.
+ * @param string $host Host to which realm applies.
+ * @param string $realm Full name of realm.
+ * @param string $username Username for realm.
+ * @param string $password Password for realm.
+ * @access public
+ */
+ function setIdentity($host, $realm, $username, $password) {
+ $this->_authenticator->setIdentityForRealm($host, $realm, $username, $password);
+ }
+
+ /**
+ * Fetches a URL as a response object. Will keep trying if redirected.
+ * It will also collect authentication realm information.
+ * @param string $method GET, POST, etc.
+ * @param string/SimpleUrl $url Target to fetch.
+ * @param hash $parameters Additional parameters for request.
+ * @return SimpleHttpResponse Hopefully the target page.
+ * @access public
+ */
+ function &fetchResponse($method, $url, $parameters = false) {
+ if ($method != 'POST') {
+ $url->addRequestParameters($parameters);
+ $parameters = false;
+ }
+ $response = &$this->_fetchWhileRedirected($method, $url, $parameters);
+ if ($headers = $response->getHeaders()) {
+ if ($headers->isChallenge()) {
+ $this->_authenticator->addRealm(
+ $url,
+ $headers->getAuthentication(),
+ $headers->getRealm());
+ }
+ }
+ return $response;
+ }
+
+ /**
+ * Fetches the page until no longer redirected or
+ * until the redirect limit runs out.
+ * @param string $method GET, POST, etc.
+ * @param SimpleUrl $url Target to fetch.
+ * @param hash $parameters Additional parameters for request.
+ * @return SimpleHttpResponse Hopefully the target page.
+ * @access private
+ */
+ function &_fetchWhileRedirected($method, $url, $parameters) {
+ $redirects = 0;
+ do {
+ $response = &$this->_fetch($method, $url, $parameters);
+ if ($response->isError()) {
+ return $response;
+ }
+ $headers = $response->getHeaders();
+ $location = new SimpleUrl($headers->getLocation());
+ $url = $location->makeAbsolute($url);
+ $this->_addCookiesToJar($url, $headers->getNewCookies());
+ if (! $headers->isRedirect()) {
+ break;
+ }
+ $method = 'GET';
+ $parameters = false;
+ } while (! $this->_isTooManyRedirects(++$redirects));
+ return $response;
+ }
+
+ /**
+ * Actually make the web request.
+ * @param string $method GET, POST, etc.
+ * @param SimpleUrl $url Target to fetch.
+ * @param hash $parameters Additional parameters for request.
+ * @return SimpleHttpResponse Headers and hopefully content.
+ * @access protected
+ */
+ function &_fetch($method, $url, $parameters) {
+ if (! $parameters) {
+ $parameters = array();
+ }
+ $request = &$this->_createRequest($method, $url, $parameters);
+ return $request->fetch($this->_connection_timeout);
+ }
+
+ /**
+ * Creates a full page request.
+ * @param string $method Fetching method.
+ * @param SimpleUrl $url Target to fetch as url object.
+ * @param hash $parameters POST/GET parameters.
+ * @return SimpleHttpRequest New request.
+ * @access private
+ */
+ function &_createRequest($method, $url, $parameters) {
+ $request = &$this->_createHttpRequest($method, $url, $parameters);
+ $this->_addAdditionalHeaders($request);
+ $this->_cookie_jar->addHeaders($request, $url);
+ $this->_authenticator->addHeaders($request, $url);
+ return $request;
+ }
+
+ /**
+ * Builds the appropriate HTTP request object.
+ * @param string $method Fetching method.
+ * @param SimpleUrl $url Target to fetch as url object.
+ * @param hash $parameters POST/GET parameters.
+ * @return SimpleHttpRequest New request object.
+ * @access protected
+ */
+ function &_createHttpRequest($method, $url, $parameters) {
+ if ($method == 'POST') {
+ $request = &new SimpleHttpPostRequest(
+ $this->_createRoute($url),
+ $parameters);
+ return $request;
+ }
+ if ($parameters) {
+ $url->addRequestParameters($parameters);
+ }
+ return new SimpleHttpRequest($this->_createRoute($url), $method);
+ }
+
+ /**
+ * Sets up either a direct route or via a proxy.
+ * @param SimpleUrl $url Target to fetch as url object.
+ * @return SimpleRoute Route to take to fetch URL.
+ * @access protected
+ */
+ function &_createRoute($url) {
+ if ($this->_proxy) {
+ return new SimpleProxyRoute(
+ $url,
+ $this->_proxy,
+ $this->_proxy_username,
+ $this->_proxy_password);
+ }
+ return new SimpleRoute($url);
+ }
+
+ /**
+ * Adds additional manual headers.
+ * @param SimpleHttpRequest $request Outgoing request.
+ * @access private
+ */
+ function _addAdditionalHeaders(&$request) {
+ foreach ($this->_additional_headers as $header) {
+ $request->addHeaderLine($header);
+ }
+ }
+
+ /**
+ * Extracts new cookies into the cookie jar.
+ * @param SimpleUrl $url Target to fetch as url object.
+ * @param array $cookies New cookies.
+ * @access private
+ */
+ function _addCookiesToJar($url, $cookies) {
+ foreach ($cookies as $cookie) {
+ if ($url->getHost()) {
+ $cookie->setHost($url->getHost());
+ }
+ $this->_cookie_jar->setCookie($cookie);
+ }
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * Base include file for SimpleTest.
+ * @package SimpleTest
+ * @subpackage WebTester
+ * @version $Id: web_tester.php,v 1.77 2004/08/04 23:48:51 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/simple_test.php');
+ require_once(dirname(__FILE__) . '/browser.php');
+ require_once(dirname(__FILE__) . '/page.php');
+ require_once(dirname(__FILE__) . '/expectation.php');
+ /**#@-*/
+
+ /**
+ * Test for an HTML widget value match.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class FieldExpectation extends SimpleExpectation {
+ var $_value;
+
+ /**
+ * Sets the field value to compare against.
+ * @param mixed $value Test value to match.
+ * @access public
+ */
+ function FieldExpectation($value) {
+ $this->SimpleExpectation();
+ if (is_array($value)) {
+ sort($value);
+ }
+ $this->_value = $value;
+ }
+
+ /**
+ * Tests the expectation. True if it matches
+ * a string value or an array value in any order.
+ * @param mixed $compare Comparison value. False for
+ * an unset field.
+ * @return boolean True if correct.
+ * @access public
+ */
+ function test($compare) {
+ if ($this->_value === false) {
+ return ($compare === false);
+ }
+ if ($this->_isSingle($this->_value)) {
+ return $this->_testSingle($compare);
+ }
+ if (is_array($this->_value)) {
+ return $this->_testMultiple($compare);
+ }
+ return false;
+ }
+
+ /**
+ * Tests for valid field comparisons.
+ * @param mixed $value Value to type check.
+ * @return boolean True if integer, string or float.
+ * @access private
+ */
+ function _isSingle($value) {
+ return is_string($value) || is_integer($value) || is_float($value);
+ }
+
+ /**
+ * String comparison for simple field.
+ * @param mixed $compare String to test against.
+ * @returns boolean True if matching.
+ * @access private
+ */
+ function _testSingle($compare) {
+ if (is_array($compare) && count($compare) == 1) {
+ $compare = $compare[0];
+ }
+ if (! $this->_isSingle($compare)) {
+ return false;
+ }
+ return ($this->_value == $compare);
+ }
+
+ /**
+ * List comparison for multivalue field.
+ * @param mixed $compare List in any order to test against.
+ * @returns boolean True if matching.
+ * @access private
+ */
+ function _testMultiple($compare) {
+ if (is_string($compare)) {
+ $compare = array($compare);
+ }
+ if (! is_array($compare)) {
+ return false;
+ }
+ sort($compare);
+ return ($this->_value === $compare);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Comparison value.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $dumper = &$this->_getDumper();
+ if (is_array($compare)) {
+ sort($compare);
+ }
+ if ($this->test($compare)) {
+ return "Field expectation [" . $dumper->describeValue($this->_value) . "]";
+ } else {
+ return "Field expectation [" . $dumper->describeValue($this->_value) .
+ "] fails with [" .
+ $this->_dumper->describeValue($compare) . "] " .
+ $this->_dumper->describeDifference($this->_value, $compare);
+ }
+ }
+ }
+
+ /**
+ * Test for a specific HTTP header within a header block.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class HttpHeaderExpectation extends SimpleExpectation {
+ var $_expected_header;
+ var $_expected_value;
+
+ /**
+ * Sets the field and value to compare against.
+ * @param string $header Case insenstive trimmed header name.
+ * @param string $value Optional value to compare. If not
+ * given then any value will match.
+ */
+ function HttpHeaderExpectation($header, $value = false) {
+ $this->_expected_header = $this->_normaliseHeader($header);
+ $this->_expected_value = $value;
+ }
+
+ /**
+ * Accessor for subclases.
+ * @return mixed Expectation set in constructor.
+ * @access protected
+ */
+ function _getExpectation() {
+ return $this->_expected_value;
+ }
+
+ /**
+ * Removes whitespace at ends and case variations.
+ * @param string $header Name of header.
+ * @param string Trimmed and lowecased header
+ * name.
+ * @access private
+ */
+ function _normaliseHeader($header) {
+ return strtolower(trim($header));
+ }
+
+ /**
+ * Tests the expectation. True if it matches
+ * a string value or an array value in any order.
+ * @param mixed $compare Raw header block to search.
+ * @return boolean True if header present.
+ * @access public
+ */
+ function test($compare) {
+ return is_string($this->_findHeader($compare));
+ }
+
+ /**
+ * Searches the incoming result. Will extract the matching
+ * line as text.
+ * @param mixed $compare Raw header block to search.
+ * @return string Matching header line.
+ * @access protected
+ */
+ function _findHeader($compare) {
+ $lines = split("\r\n", $compare);
+ foreach ($lines as $line) {
+ if ($this->_testHeaderLine($line)) {
+ return $line;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Compares a single header line against the expectation.
+ * @param string $line A single line to compare.
+ * @return boolean True if matched.
+ * @access private
+ */
+ function _testHeaderLine($line) {
+ if (count($parsed = split(':', $line)) < 2) {
+ return false;
+ }
+ list($header, $value) = $parsed;
+ if ($this->_normaliseHeader($header) != $this->_expected_header) {
+ return false;
+ }
+ return $this->_testHeaderValue($value, $this->_expected_value);
+ }
+
+ /**
+ * Tests the value part of the header.
+ * @param string $value Value to test.
+ * @param mixed $expected Value to test against.
+ * @return boolean True if matched.
+ * @access protected
+ */
+ function _testHeaderValue($value, $expected) {
+ if ($expected === false) {
+ return true;
+ }
+ return (trim($value) == trim($expected));
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Raw header block to search.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $expectation = $this->_expected_header;
+ if ($this->_expected_value) {
+ $expectation .= ': ' . $this->_expected_header;
+ }
+ if (is_string($line = $this->_findHeader($compare))) {
+ return "Searching for header [$expectation] found [$line]";
+ } else {
+ return "Failed to find header [$expectation]";
+ }
+ }
+ }
+
+ /**
+ * Test for a specific HTTP header within a header block that
+ * should not be found.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class HttpUnwantedHeaderExpectation extends HttpHeaderExpectation {
+ var $_expected_header;
+ var $_expected_value;
+
+ /**
+ * Sets the field and value to compare against.
+ * @param string $unwanted Case insenstive trimmed header name.
+ */
+ function HttpUnwantedHeaderExpectation($unwanted) {
+ $this->HttpHeaderExpectation($unwanted);
+ }
+
+ /**
+ * Tests that the unwanted header is not found.
+ * @param mixed $compare Raw header block to search.
+ * @return boolean True if header present.
+ * @access public
+ */
+ function test($compare) {
+ return ($this->_findHeader($compare) === false);
+ }
+
+ /**
+ * Returns a human readable test message.
+ * @param mixed $compare Raw header block to search.
+ * @return string Description of success
+ * or failure.
+ * @access public
+ */
+ function testMessage($compare) {
+ $expectation = $this->_getExpectation();
+ if (is_string($line = $this->_findHeader($compare))) {
+ return "Found unwanted header [$expectation] with [$line]";
+ } else {
+ return "Did not find unwanted header [$expectation]";
+ }
+ }
+ }
+
+ /**
+ * Test for a specific HTTP header within a header block.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class HttpHeaderPatternExpectation extends HttpHeaderExpectation {
+
+ /**
+ * Sets the field and value to compare against.
+ * @param string $header Case insenstive header name.
+ * @param string $pattern Pattern to compare value against.
+ * @access public
+ */
+ function HttpHeaderPatternExpectation($header, $pattern) {
+ $this->HttpHeaderExpectation($header, $pattern);
+ }
+
+ /**
+ * Tests the value part of the header.
+ * @param string $value Value to test.
+ * @param mixed $pattern Pattern to test against.
+ * @return boolean True if matched.
+ * @access protected
+ */
+ function _testHeaderValue($value, $expected) {
+ return (boolean)preg_match($expected, trim($value));
+ }
+ }
+
+ /**
+ * Test case for testing of web pages. Allows
+ * fetching of pages, parsing of HTML and
+ * submitting forms.
+ * @package SimpleTest
+ * @subpackage WebTester
+ */
+ class WebTestCase extends SimpleTestCase {
+ var $_browser;
+
+ /**
+ * Creates an empty test case. Should be subclassed
+ * with test methods for a functional test case.
+ * @param string $label Name of test case. Will use
+ * the class name if none specified.
+ * @access public
+ */
+ function WebTestCase($label = false) {
+ $this->SimpleTestCase($label);
+ }
+
+ /**
+ * Gets the last response error.
+ * @return string Last low level HTTP error.
+ * @access public
+ */
+ function getTransportError() {
+ return $this->_browser->getTransportError();
+ }
+
+ /**
+ * Accessor for the currently selected URL.
+ * @return string Current location or false if
+ * no page yet fetched.
+ * @access public
+ */
+ function getUrl() {
+ $this->_browser->getUrl();
+ }
+
+ /**
+ * Dumps the current request for debugging.
+ * @access public
+ */
+ function showRequest() {
+ $this->dump($this->_browser->getRequest());
+ }
+
+ /**
+ * Dumps the current HTTP headers for debugging.
+ * @access public
+ */
+ function showHeaders() {
+ $this->dump($this->_browser->getHeaders());
+ }
+
+ /**
+ * Dumps the current HTML source for debugging.
+ * @access public
+ */
+ function showSource() {
+ $this->dump($this->_browser->getContent());
+ }
+
+ /**
+ * Simulates the closing and reopening of the browser.
+ * Temporary cookies will be discarded and timed
+ * cookies will be expired if later than the
+ * specified time.
+ * @param string/integer $date Time when session restarted.
+ * If ommitted then all persistent
+ * cookies are kept. Time is either
+ * Cookie format string or timestamp.
+ * @access public
+ */
+ function restartSession($date = false) {
+ if ($date === false) {
+ $date = time();
+ }
+ $this->_browser->restartSession($date);
+ }
+
+ /**
+ * Moves cookie expiry times back into the past.
+ * Useful for testing timeouts and expiries.
+ * @param integer $interval Amount to age in seconds.
+ * @access public
+ */
+ function ageCookies($interval) {
+ $this->_browser->ageCookies($interval);
+ }
+
+ /**
+ * Gets a current browser reference for setting
+ * special expectations or for detailed
+ * examination of page fetches.
+ * @param SimpleBrowser $browser Test browser object.
+ * @access public
+ */
+ function &getBrowser() {
+ return $this->_browser;
+ }
+
+ /**
+ * Creates a new default web browser object.
+ * Will be cleared at the end of the test method.
+ * @return TestBrowser New browser.
+ * @access public
+ */
+ function &createBrowser() {
+ return new SimpleBrowser();
+ }
+
+ /**
+ * Sets up a browser for the start of each
+ * test method.
+ * @access public
+ */
+ function before() {
+ $this->_browser = &$this->createBrowser();
+ parent::before();
+ }
+
+ /**
+ * Disables frames support. Frames will not be fetched
+ * and the frameset page will be used instead.
+ * @access public
+ */
+ function ignoreFrames() {
+ $this->_browser->ignoreFrames();
+ }
+
+ /**
+ * Sets a cookie in the current browser.
+ * @param string $name Name of cookie.
+ * @param string $value Cookie value.
+ * @param string $host Host upon which the cookie is valid.
+ * @param string $path Cookie path if not host wide.
+ * @param string $expiry Expiry date.
+ * @access public
+ */
+ function setCookie($name, $value, $host = false, $path = "/", $expiry = false) {
+ $this->_browser->setCookie($name, $value, $host, $path, $expiry);
+ }
+
+ /**
+ * Adds a header to every fetch.
+ * @param string $header Header line to add to every
+ * request until cleared.
+ * @access public
+ */
+ function addHeader($header) {
+ $this->_browser->addHeader($header);
+ }
+
+ /**
+ * Sets the maximum number of redirects before
+ * the web page is loaded regardless.
+ * @param integer $max Maximum hops.
+ * @access public
+ */
+ function setMaximumRedirects($max) {
+ if (! $this->_browser) {
+ trigger_error(
+ 'Can only set maximum redirects in a test method, setUp() or tearDown()');
+ }
+ $this->_browser->setMaximumRedirects($max);
+ }
+
+ /**
+ * Sets the socket timeout for opening a connection and
+ * receiving at least one byte of information.
+ * @param integer $timeout Maximum time in seconds.
+ * @access public
+ */
+ function setConnectionTimeout($timeout) {
+ $this->_browser->setConnectionTimeout($timeout);
+ }
+
+ /**
+ * Sets proxy to use on all requests for when
+ * testing from behind a firewall. Set URL
+ * to false to disable.
+ * @param string $proxy Proxy URL.
+ * @param string $username Proxy username for authentication.
+ * @param string $password Proxy password for authentication.
+ * @access public
+ */
+ function useProxy($proxy, $username = false, $password = false) {
+ $this->_browser->useProxy($proxy, $username, $password);
+ }
+
+ /**
+ * Fetches a page into the page buffer. If
+ * there is no base for the URL then the
+ * current base URL is used. After the fetch
+ * the base URL reflects the new location.
+ * @param string $url URL to fetch.
+ * @param hash $parameters Optional additional GET data.
+ * @return boolean True on success.
+ * @access public
+ */
+ function get($url, $parameters = false) {
+ $content = $this->_browser->get($url, $parameters);
+ if ($content === false) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Fetches a page by POST into the page buffer.
+ * If there is no base for the URL then the
+ * current base URL is used. After the fetch
+ * the base URL reflects the new location.
+ * @param string $url URL to fetch.
+ * @param hash $parameters Optional additional GET data.
+ * @return boolean True on success.
+ * @access public
+ */
+ function post($url, $parameters = false) {
+ $content = $this->_browser->post($url, $parameters);
+ if ($content === false) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Does a HTTP HEAD fetch, fetching only the page
+ * headers. The current base URL is unchanged by this.
+ * @param string $url URL to fetch.
+ * @param hash $parameters Optional additional GET data.
+ * @return boolean True on success.
+ * @access public
+ */
+ function head($url, $parameters = false) {
+ return $this->_browser->head($url, $parameters);
+ }
+
+ /**
+ * Equivalent to hitting the retry button on the
+ * browser. Will attempt to repeat the page fetch.
+ * @return boolean True if fetch succeeded.
+ * @access public
+ */
+ function retry() {
+ return $this->_browser->retry();
+ }
+
+ /**
+ * Equivalent to hitting the back button on the
+ * browser.
+ * @return boolean True if history entry and
+ * fetch succeeded.
+ * @access public
+ */
+ function back() {
+ return $this->_browser->back();
+ }
+
+ /**
+ * Equivalent to hitting the forward button on the
+ * browser.
+ * @return boolean True if history entry and
+ * fetch succeeded.
+ * @access public
+ */
+ function forward() {
+ return $this->_browser->forward();
+ }
+
+ /**
+ * Retries a request after setting the authentication
+ * for the current realm.
+ * @param string $username Username for realm.
+ * @param string $password Password for realm.
+ * @return boolean True if successful fetch. Note
+ * that authentication may still have
+ * failed.
+ * @access public
+ */
+ function authenticate($username, $password) {
+ return $this->_browser->authenticate($username, $password);
+ }
+
+ /**
+ * Accessor for current frame focus. Will be
+ * false if no frame has focus.
+ * @return integer/string/boolean Label if any, otherwise
+ * the position in the frameset
+ * or false if none.
+ * @access public
+ */
+ function getFrameFocus() {
+ return $this->_browser->getFrameFocus();
+ }
+
+ /**
+ * Sets the focus by index. The integer index starts from 1.
+ * @param integer $choice Chosen frame.
+ * @return boolean True if frame exists.
+ * @access public
+ */
+ function setFrameFocusByIndex($choice) {
+ return $this->_browser->setFrameFocusByIndex($choice);
+ }
+
+ /**
+ * Sets the focus by name.
+ * @param string $name Chosen frame.
+ * @return boolean True if frame exists.
+ * @access public
+ */
+ function setFrameFocus($name) {
+ return $this->_browser->setFrameFocus($name);
+ }
+
+ /**
+ * Clears the frame focus. All frames will be searched
+ * for content.
+ * @access public
+ */
+ function clearFrameFocus() {
+ return $this->_browser->clearFrameFocus();
+ }
+
+ /**
+ * Clicks the submit button by label. The owning
+ * form will be submitted by this.
+ * @param string $label Button label. An unlabeled
+ * button can be triggered by 'Submit'.
+ * @return boolean True on success.
+ * @access public
+ */
+ function clickSubmit($label = 'Submit') {
+ return $this->_browser->clickSubmit($label);
+ }
+
+ /**
+ * Clicks the submit button by name attribute. The owning
+ * form will be submitted by this.
+ * @param string $name Name attribute of button.
+ * @return boolean True on success.
+ * @access public
+ */
+ function clickSubmitByName($name) {
+ return $this->_browser->clickSubmitByName($name);
+ }
+
+ /**
+ * Clicks the submit button by ID attribute. The owning
+ * form will be submitted by this.
+ * @param string $id ID attribute of button.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickSubmitById($id) {
+ return $this->_browser->clickSubmitById($id);
+ }
+
+ /**
+ * Clicks the submit image by some kind of label. Usually
+ * the alt tag or the nearest equivalent. The owning
+ * form will be submitted by this. Clicking outside of
+ * the boundary of the coordinates will result in
+ * a failure.
+ * @param string $label Alt attribute of button.
+ * @param integer $x X-coordinate of imaginary click.
+ * @param integer $y Y-coordinate of imaginary click.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickImage($label, $x = 1, $y = 1) {
+ return $this->_browser->clickImage($label, $x, $y);
+ }
+
+ /**
+ * Clicks the submit image by the name. Usually
+ * the alt tag or the nearest equivalent. The owning
+ * form will be submitted by this. Clicking outside of
+ * the boundary of the coordinates will result in
+ * a failure.
+ * @param string $name Name attribute of button.
+ * @param integer $x X-coordinate of imaginary click.
+ * @param integer $y Y-coordinate of imaginary click.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickImageByName($name, $x = 1, $y = 1) {
+ return $this->_browser->clickImageByName($name, $x, $y);
+ }
+
+ /**
+ * Clicks the submit image by ID attribute. The owning
+ * form will be submitted by this. Clicking outside of
+ * the boundary of the coordinates will result in
+ * a failure.
+ * @param integer/string $id ID attribute of button.
+ * @param integer $x X-coordinate of imaginary click.
+ * @param integer $y Y-coordinate of imaginary click.
+ * @return boolean True on successful submit.
+ * @access public
+ */
+ function clickImageById($id, $x = 1, $y = 1) {
+ return $this->_browser->clickImageById($id, $x, $y);
+ }
+
+ /**
+ * Submits a form by the ID.
+ * @param string $id Form ID. No button information
+ * is submitted this way.
+ * @return boolean True on success.
+ * @access public
+ */
+ function submitFormById($id) {
+ return $this->_browser->submitFormById($id);
+ }
+
+ /**
+ * Follows a link by name. Will click the first link
+ * found with this link text by default, or a later
+ * one if an index is given. Match is case insensitive
+ * with normalised space.
+ * @param string $label Text between the anchor tags.
+ * @param integer $index Link position counting from zero.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function clickLink($label, $index = 0) {
+ return $this->_browser->clickLink($label, $index);
+ }
+
+ /**
+ * Follows a link by id attribute.
+ * @param string $id ID attribute value.
+ * @return boolean True if successful.
+ * @access public
+ */
+ function clickLinkById($id) {
+ return $this->_browser->clickLinkById($id);
+ }
+
+ /**
+ * Tests for the presence of a link label. Match is
+ * case insensitive with normalised space.
+ * @param string $label Text between the anchor tags.
+ * @param string $message Message to display. Default
+ * can be embedded with %s.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function assertLink($label, $message = "%s") {
+ return $this->assertTrue(
+ $this->_browser->isLink($label),
+ sprintf($message, "Link [$label] should exist"));
+ }
+
+ /**
+ * Tests for the non-presence of a link label. Match is
+ * case insensitive with normalised space.
+ * @param string/integer $label Text between the anchor tags
+ * or ID attribute.
+ * @param string $message Message to display. Default
+ * can be embedded with %s.
+ * @return boolean True if link missing.
+ * @access public
+ */
+ function assertNoLink($label, $message = "%s") {
+ return $this->assertFalse(
+ $this->_browser->isLink($label) || $this->_browser->isLinkById($label),
+ sprintf($message, "Link [$label] should not exist"));
+ }
+
+ /**
+ * Tests for the presence of a link id attribute.
+ * @param string $id Id attribute value.
+ * @param string $message Message to display. Default
+ * can be embedded with %s.
+ * @return boolean True if link present.
+ * @access public
+ */
+ function assertLinkById($id, $message = "%s") {
+ return $this->assertTrue(
+ $this->_browser->isLinkById($id),
+ sprintf($message, "Link ID [$id] should exist"));
+ }
+
+ /**
+ * Sets all form fields with that name.
+ * @param string $name Name of field in forms.
+ * @param string $value New value of field.
+ * @return boolean True if field exists, otherwise false.
+ * @access public
+ */
+ function setField($name, $value) {
+ return $this->_browser->setField($name, $value);
+ }
+
+ /**
+ * Sets all form fields with that name.
+ * @param string/integer $id Id of field in forms.
+ * @param string $value New value of field.
+ * @return boolean True if field exists, otherwise false.
+ * @access public
+ */
+ function setFieldById($id, $value) {
+ return $this->_browser->setFieldById($id, $value);
+ }
+
+ /**
+ * Confirms that the form element is currently set
+ * to the expected value. A missing form will always
+ * fail. If no value is given then only the existence
+ * of the field is checked.
+ * @param string $name Name of field in forms.
+ * @param mixed $expected Expected string/array value or
+ * false for unset fields.
+ * @param string $message Message to display. Default
+ * can be embedded with %s.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertField($name, $expected = true, $message = "%s") {
+ $value = $this->_browser->getField($name);
+ if ($expected === true) {
+ return $this->assertTrue(
+ isset($value),
+ sprintf($message, "Field [$name] should exist"));
+ } else {
+ return $this->assertExpectation(
+ new FieldExpectation($expected),
+ $value,
+ sprintf($message, "Field [$name] should match with [%s]"));
+ }
+ }
+
+ /**
+ * Confirms that the form element is currently set
+ * to the expected value. A missing form will always
+ * fail. If no ID is given then only the existence
+ * of the field is checked.
+ * @param string/integer $id Name of field in forms.
+ * @param mixed $expected Expected string/array value or
+ * false for unset fields.
+ * @param string $message Message to display. Default
+ * can be embedded with %s.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertFieldById($id, $expected = true, $message = "%s") {
+ $value = $this->_browser->getFieldById($id);
+ if ($expected === true) {
+ return $this->assertTrue(
+ isset($value),
+ sprintf($message, "Field of ID [$id] should exist"));
+ } else {
+ return $this->assertExpectation(
+ new FieldExpectation($expected),
+ $value,
+ sprintf($message, "Field of ID [$id] should match with [%s]"));
+ }
+ }
+
+ /**
+ * Checks the response code against a list
+ * of possible values.
+ * @param array $responses Possible responses for a pass.
+ * @param string $message Message to display. Default
+ * can be embedded with %s.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertResponse($responses, $message = '%s') {
+ $responses = (is_array($responses) ? $responses : array($responses));
+ $code = $this->_browser->getResponseCode();
+ $message = sprintf($message, "Expecting response in [" .
+ implode(", ", $responses) . "] got [$code]");
+ return $this->assertTrue(in_array($code, $responses), $message);
+ }
+
+ /**
+ * Checks the mime type against a list
+ * of possible values.
+ * @param array $types Possible mime types for a pass.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertMime($types, $message = '%s') {
+ $types = (is_array($types) ? $types : array($types));
+ $type = $this->_browser->getMimeType();
+ $message = sprintf($message, "Expecting mime type in [" .
+ implode(", ", $types) . "] got [$type]");
+ return $this->assertTrue(in_array($type, $types), $message);
+ }
+
+ /**
+ * Attempt to match the authentication type within
+ * the security realm we are currently matching.
+ * @param string $authentication Usually basic.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertAuthentication($authentication = false, $message = '%s') {
+ if (! $authentication) {
+ $message = sprintf($message, "Expected any authentication type, got [" .
+ $this->_browser->getAuthentication() . "]");
+ return $this->assertTrue(
+ $this->_browser->getAuthentication(),
+ $message);
+ } else {
+ $message = sprintf($message, "Expected authentication [$authentication] got [" .
+ $this->_browser->getAuthentication() . "]");
+ return $this->assertTrue(
+ strtolower($this->_browser->getAuthentication()) == strtolower($authentication),
+ $message);
+ }
+ }
+
+ /**
+ * Checks that no authentication is necessary to view
+ * the desired page.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertNoAuthentication($message = '%s') {
+ $message = sprintf($message, "Expected no authentication type, got [" .
+ $this->_browser->getAuthentication() . "]");
+ return $this->assertFalse($this->_browser->getAuthentication(), $message);
+ }
+
+ /**
+ * Attempts to match the current security realm.
+ * @param string $realm Name of security realm.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertRealm($realm, $message = '%s') {
+ $message = sprintf($message, "Expected realm [$realm] got [" .
+ $this->_browser->getRealm() . "]");
+ return $this->assertTrue(
+ strtolower($this->_browser->getRealm()) == strtolower($realm),
+ $message);
+ }
+
+ /**
+ * Checks each header line for the required value. If no
+ * value is given then only an existence check is made.
+ * @param string $header Case insensitive header name.
+ * @param string $value Case sensitive trimmed string to
+ * match against.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertHeader($header, $value = false, $message = '%s') {
+ return $this->assertExpectation(
+ new HttpHeaderExpectation($header, $value),
+ $this->_browser->getHeaders(),
+ $message);
+ }
+
+ /**
+ * Checks each header line for the required pattern.
+ * @param string $header Case insensitive header name.
+ * @param string $pattern Pattern to match value against.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertHeaderPattern($header, $pattern, $message = '%s') {
+ return $this->assertExpectation(
+ new HttpHeaderPatternExpectation($header, $pattern),
+ $this->_browser->getHeaders(),
+ $message);
+ }
+
+ /**
+ * Confirms that the header type has not been received.
+ * Only the landing page is checked. If you want to check
+ * redirect pages, then you should limit redirects so
+ * as to capture the page you want.
+ * @param string $header Case insensitive header name.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertNoUnwantedHeader($header, $message = '%s') {
+ return $this->assertExpectation(
+ new HttpUnwantedHeaderExpectation($header),
+ $this->_browser->getHeaders(),
+ $message);
+ }
+
+ /**
+ * Tests the text between the title tags.
+ * @param string $title Expected title or empty
+ * if expecting no title.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertTitle($title = false, $message = '%s') {
+ return $this->assertTrue(
+ $title === $this->_browser->getTitle(),
+ sprintf(
+ $message,
+ "Expecting title [$title] got [" . $this->_browser->getTitle() . "]"));
+ }
+
+ /**
+ * Will trigger a pass if the Perl regex pattern
+ * is found in the raw content.
+ * @param string $pattern Perl regex to look for including
+ * the regex delimiters.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertWantedPattern($pattern, $message = '%s') {
+ return $this->assertExpectation(
+ new WantedPatternExpectation($pattern),
+ $this->_browser->getContent(),
+ $message);
+ }
+
+ /**
+ * Will trigger a pass if the perl regex pattern
+ * is not present in raw content.
+ * @param string $pattern Perl regex to look for including
+ * the regex delimiters.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertNoUnwantedPattern($pattern, $message = "%s") {
+ return $this->assertExpectation(
+ new UnwantedPatternExpectation($pattern),
+ $this->_browser->getContent(),
+ $message);
+ }
+
+ /**
+ * Checks that a cookie is set for the current page
+ * and optionally checks the value.
+ * @param string $name Name of cookie to test.
+ * @param string $expected Expected value as a string or
+ * false if any value will do.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertCookie($name, $expected = false, $message = "%s") {
+ $value = $this->_browser->getCurrentCookieValue($name);
+ if ($expected) {
+ return $this->assertTrue($value === $expected, sprintf(
+ $message,
+ "Expecting cookie [$name] value [$expected], got [$value]"));
+ } else {
+ return $this->assertTrue(
+ $value,
+ sprintf($message, "Expecting cookie [$name]"));
+ }
+ }
+
+ /**
+ * Checks that no cookie is present or that it has
+ * been successfully cleared.
+ * @param string $name Name of cookie to test.
+ * @param string $message Message to display.
+ * @return boolean True if pass.
+ * @access public
+ */
+ function assertNoCookie($name, $message = "%s") {
+ return $this->assertTrue(
+ $this->_browser->getCurrentCookieValue($name) === false,
+ sprintf($message, "Not expecting cookie [$name]"));
+ }
+ }
+?>
\ No newline at end of file
--- /dev/null
+<?php
+ /**
+ * base include file for SimpleTest
+ * @package SimpleTest
+ * @subpackage UnitTester
+ * @version $Id: xml.php,v 1.20 2004/08/04 22:09:39 lastcraft Exp $
+ */
+
+ /**#@+
+ * include other SimpleTest class files
+ */
+ require_once(dirname(__FILE__) . '/scorer.php');
+ /**#@-*/
+
+ /**
+ * Creates the XML needed for remote communication
+ * by SimpleTest.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class XmlReporter extends SimpleReporter {
+ var $_indent;
+ var $_namespace;
+
+ /**
+ * Does nothing yet.
+ * @access public
+ */
+ function XmlReporter($namespace = false, $indent = ' ') {
+ $this->SimpleReporter();
+ $this->_namespace = ($namespace ? $namespace . ':' : '');
+ $this->_indent = $indent;
+ }
+
+ /**
+ * Calculates the pretty printing indent level
+ * from the current level of nesting.
+ * @param integer $offset Extra indenting level.
+ * @return string Leading space.
+ * @access protected
+ */
+ function _getIndent($offset = 0) {
+ return str_repeat(
+ $this->_indent,
+ count($this->getTestList()) + $offset);
+ }
+
+ /**
+ * Converts character string to parsed XML
+ * entities string.
+ * @param string text Unparsed character data.
+ * @return string Parsed character data.
+ * @access public
+ */
+ function toParsedXml($text) {
+ return str_replace(
+ array('&', '<', '>', '"', '\''),
+ array('&', '<', '>', '"', '''),
+ $text);
+ }
+
+ /**
+ * Paints the start of a group test.
+ * @param string $test_name Name of test that is starting.
+ * @param integer $size Number of test cases starting.
+ * @access public
+ */
+ function paintGroupStart($test_name, $size) {
+ parent::paintGroupStart($test_name, $size);
+ print $this->_getIndent();
+ print "<" . $this->_namespace . "group size=\"$size\">\n";
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "name>" .
+ $this->toParsedXml($test_name) .
+ "</" . $this->_namespace . "name>\n";
+ }
+
+ /**
+ * Paints the end of a group test.
+ * @param string $test_name Name of test that is ending.
+ * @access public
+ */
+ function paintGroupEnd($test_name) {
+ print $this->_getIndent();
+ print "</" . $this->_namespace . "group>\n";
+ parent::paintGroupEnd($test_name);
+ }
+
+ /**
+ * Paints the start of a test case.
+ * @param string $test_name Name of test that is starting.
+ * @access public
+ */
+ function paintCaseStart($test_name) {
+ parent::paintCaseStart($test_name);
+ print $this->_getIndent();
+ print "<" . $this->_namespace . "case>\n";
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "name>" .
+ $this->toParsedXml($test_name) .
+ "</" . $this->_namespace . "name>\n";
+ }
+
+ /**
+ * Paints the end of a test case.
+ * @param string $test_name Name of test that is ending.
+ * @access public
+ */
+ function paintCaseEnd($test_name) {
+ print $this->_getIndent();
+ print "</" . $this->_namespace . "case>\n";
+ parent::paintCaseEnd($test_name);
+ }
+
+ /**
+ * Paints the start of a test method.
+ * @param string $test_name Name of test that is starting.
+ * @access public
+ */
+ function paintMethodStart($test_name) {
+ parent::paintMethodStart($test_name);
+ print $this->_getIndent();
+ print "<" . $this->_namespace . "test>\n";
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "name>" .
+ $this->toParsedXml($test_name) .
+ "</" . $this->_namespace . "name>\n";
+ }
+
+ /**
+ * Paints the end of a test method.
+ * @param string $test_name Name of test that is ending.
+ * @param integer $progress Number of test cases ending.
+ * @access public
+ */
+ function paintMethodEnd($test_name) {
+ print $this->_getIndent();
+ print "</" . $this->_namespace . "test>\n";
+ parent::paintMethodEnd($test_name);
+ }
+
+ /**
+ * Increments the pass count.
+ * @param string $message Message is ignored.
+ * @access public
+ */
+ function paintPass($message) {
+ parent::paintPass($message);
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "pass>";
+ print $this->toParsedXml($message);
+ print "</" . $this->_namespace . "pass>\n";
+ }
+
+ /**
+ * Increments the fail count.
+ * @param string $message Message is ignored.
+ * @access public
+ */
+ function paintFail($message) {
+ parent::paintFail($message);
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "fail>";
+ print $this->toParsedXml($message);
+ print "</" . $this->_namespace . "fail>\n";
+ }
+
+ /**
+ * Paints a PHP error or exception.
+ * @param string $message Message is ignored.
+ * @access public
+ * @abstract
+ */
+ function paintException($message) {
+ parent::paintException($message);
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "exception>";
+ print $this->toParsedXml($message);
+ print "</" . $this->_namespace . "exception>\n";
+ }
+
+ /**
+ * Paints a simple supplementary message.
+ * @param string $message Text to display.
+ * @access public
+ */
+ function paintMessage($message) {
+ parent::paintMessage($message);
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "message>";
+ print $this->toParsedXml($message);
+ print "</" . $this->_namespace . "message>\n";
+ }
+
+ /**
+ * Paints a formatted ASCII message such as a
+ * variable dump.
+ * @param string $message Text to display.
+ * @access public
+ */
+ function paintFormattedMessage($message) {
+ parent::paintFormattedMessage($message);
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "formatted>";
+ print "<![CDATA[$message]]>";
+ print "</" . $this->_namespace . "formatted>\n";
+ }
+
+ /**
+ * Serialises the event object.
+ * @param string $type Event type as text.
+ * @param mixed $payload Message or object.
+ * @access public
+ */
+ function paintSignal($type, &$payload) {
+ parent::paintSignal($type, $payload);
+ print $this->_getIndent(1);
+ print "<" . $this->_namespace . "signal type=\"$type\">";
+ print "<![CDATA[" . serialize($payload) . "]]>";
+ print "</" . $this->_namespace . "signal>\n";
+ }
+
+ /**
+ * Paints the test document header.
+ * @param string $test_name First test top level
+ * to start.
+ * @access public
+ * @abstract
+ */
+ function paintHeader($test_name) {
+ if (! SimpleReporter::inCli()) {
+ header('Content-type: text/xml');
+ }
+ print "<?xml version=\"1.0\"";
+ if ($this->_namespace) {
+ print " xmlns:" . $this->_namespace .
+ "=\"www.lastcraft.com/SimpleTest/Beta3/Report\"";
+ }
+ print "?>\n";
+ print "<" . $this->_namespace . "run>\n";
+ }
+
+ /**
+ * Paints the test document footer.
+ * @param string $test_name The top level test.
+ * @access public
+ * @abstract
+ */
+ function paintFooter($test_name) {
+ print "</" . $this->_namespace . "run>\n";
+ }
+ }
+
+ /**
+ * Accumulator for incoming tag. Holds the
+ * incoming test structure information for
+ * later dispatch to the reporter.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NestingXmlTag {
+ var $_name;
+ var $_attributes;
+
+ /**
+ * Sets the basic test information except
+ * the name.
+ * @param hash $attributes Name value pairs.
+ * @access public
+ */
+ function NestingXmlTag($attributes) {
+ $this->_name = false;
+ $this->_attributes = $attributes;
+ }
+
+ /**
+ * Sets the test case/method name.
+ * @param string $name Name of test.
+ * @access public
+ */
+ function setName($name) {
+ $this->_name = $name;
+ }
+
+ /**
+ * Accessor for name.
+ * @return string Name of test.
+ * @access public
+ */
+ function getName() {
+ return $this->_name;
+ }
+
+ /**
+ * Accessor for attributes.
+ * @return hash All attributes.
+ * @access protected
+ */
+ function _getAttributes() {
+ return $this->_attributes;
+ }
+ }
+
+ /**
+ * Accumulator for incoming method tag. Holds the
+ * incoming test structure information for
+ * later dispatch to the reporter.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NestingMethodTag extends NestingXmlTag {
+
+ /**
+ * Sets the basic test information except
+ * the name.
+ * @param hash $attributes Name value pairs.
+ * @access public
+ */
+ function NestingMethodTag($attributes) {
+ $this->NestingXmlTag($attributes);
+ }
+
+ /**
+ * Signals the appropriate start event on the
+ * listener.
+ * @param SimpleReporter $listener Target for events.
+ * @access public
+ */
+ function paintStart(&$listener) {
+ $listener->paintMethodStart($this->getName());
+ }
+
+ /**
+ * Signals the appropriate end event on the
+ * listener.
+ * @param SimpleReporter $listener Target for events.
+ * @access public
+ */
+ function paintEnd(&$listener) {
+ $listener->paintMethodEnd($this->getName());
+ }
+ }
+
+ /**
+ * Accumulator for incoming case tag. Holds the
+ * incoming test structure information for
+ * later dispatch to the reporter.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NestingCaseTag extends NestingXmlTag {
+
+ /**
+ * Sets the basic test information except
+ * the name.
+ * @param hash $attributes Name value pairs.
+ * @access public
+ */
+ function NestingCaseTag($attributes) {
+ $this->NestingXmlTag($attributes);
+ }
+
+ /**
+ * Signals the appropriate start event on the
+ * listener.
+ * @param SimpleReporter $listener Target for events.
+ * @access public
+ */
+ function paintStart(&$listener) {
+ $listener->paintCaseStart($this->getName());
+ }
+
+ /**
+ * Signals the appropriate end event on the
+ * listener.
+ * @param SimpleReporter $listener Target for events.
+ * @access public
+ */
+ function paintEnd(&$listener) {
+ $listener->paintCaseEnd($this->getName());
+ }
+ }
+
+ /**
+ * Accumulator for incoming group tag. Holds the
+ * incoming test structure information for
+ * later dispatch to the reporter.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class NestingGroupTag extends NestingXmlTag {
+
+ /**
+ * Sets the basic test information except
+ * the name.
+ * @param hash $attributes Name value pairs.
+ * @access public
+ */
+ function NestingGroupTag($attributes) {
+ $this->NestingXmlTag($attributes);
+ }
+
+ /**
+ * Signals the appropriate start event on the
+ * listener.
+ * @param SimpleReporter $listener Target for events.
+ * @access public
+ */
+ function paintStart(&$listener) {
+ $listener->paintGroupStart($this->getName(), $this->getSize());
+ }
+
+ /**
+ * Signals the appropriate end event on the
+ * listener.
+ * @param SimpleReporter $listener Target for events.
+ * @access public
+ */
+ function paintEnd(&$listener) {
+ $listener->paintGroupEnd($this->getName());
+ }
+
+ /**
+ * The size in the attributes.
+ * @return integer Value of size attribute or zero.
+ * @access public
+ */
+ function getSize() {
+ $attributes = $this->_getAttributes();
+ if (isset($attributes['SIZE'])) {
+ return (integer)$attributes['SIZE'];
+ }
+ return 0;
+ }
+ }
+
+ /**
+ * Parser for importing the output of the XmlReporter.
+ * Dispatches that output to another reporter.
+ * @package SimpleTest
+ * @subpackage UnitTester
+ */
+ class SimpleTestXmlParser {
+ var $_listener;
+ var $_expat;
+ var $_tag_stack;
+ var $_in_content_tag;
+ var $_content;
+ var $_attributes;
+
+ /**
+ * Loads a listener with the SimpleReporter
+ * interface.
+ * @param SimpleReporter $listener Listener of tag events.
+ * @access public
+ */
+ function SimpleTestXmlParser(&$listener) {
+ $this->_listener = &$listener;
+ $this->_expat = &$this->_createParser();
+ $this->_tag_stack = array();
+ $this->_in_content_tag = false;
+ $this->_content = '';
+ $this->_attributes = array();
+ }
+
+ /**
+ * Parses a block of XML sending the results to
+ * the listener.
+ * @param string $chunk Block of text to read.
+ * @return boolean True if valid XML.
+ * @access public
+ */
+ function parse($chunk) {
+ if (! xml_parse($this->_expat, $chunk)) {
+ trigger_error('XML parse error with ' .
+ xml_error_string(xml_get_error_code($this->_expat)));
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Sets up expat as the XML parser.
+ * @return resource Expat handle.
+ * @access protected
+ */
+ function &_createParser() {
+ $expat = xml_parser_create();
+ xml_set_object($expat, $this);
+ xml_set_element_handler($expat, '_startElement', '_endElement');
+ xml_set_character_data_handler($expat, '_addContent');
+ xml_set_default_handler($expat, '_default');
+ return $expat;
+ }
+
+ /**
+ * Opens a new test nesting level.
+ * @return NestedXmlTag The group, case or method tag
+ * to start.
+ * @access private
+ */
+ function _pushNestingTag($nested) {
+ array_unshift($this->_tag_stack, $nested);
+ }
+
+ /**
+ * Accessor for current test structure tag.
+ * @return NestedXmlTag The group, case or method tag
+ * being parsed.
+ * @access private
+ */
+ function &_getCurrentNestingTag() {
+ return $this->_tag_stack[0];
+ }
+
+ /**
+ * Ends a nesting tag.
+ * @return NestedXmlTag The group, case or method tag
+ * just finished.
+ * @access private
+ */
+ function _popNestingTag() {
+ return array_shift($this->_tag_stack);
+ }
+
+ /**
+ * Test if tag is a leaf node with only text content.
+ * @param string $tag XML tag name.
+ * @return @boolean True if leaf, false if nesting.
+ * @private
+ */
+ function _isLeaf($tag) {
+ return in_array(
+ $tag,
+ array('NAME', 'PASS', 'FAIL', 'EXCEPTION', 'MESSAGE', 'FORMATTED', 'SIGNAL'));
+ }
+
+ /**
+ * Handler for start of event element.
+ * @param resource $expat Parser handle.
+ * @param string $tag Element name.
+ * @param hash $attributes Name value pairs.
+ * Attributes without content
+ * are marked as true.
+ * @access protected
+ */
+ function _startElement($expat, $tag, $attributes) {
+ $this->_attributes = $attributes;
+ if ($tag == 'GROUP') {
+ $this->_pushNestingTag(new NestingGroupTag($attributes));
+ } elseif ($tag == 'CASE') {
+ $this->_pushNestingTag(new NestingCaseTag($attributes));
+ } elseif ($tag == 'TEST') {
+ $this->_pushNestingTag(new NestingMethodTag($attributes));
+ } elseif ($this->_isLeaf($tag)) {
+ $this->_in_content_tag = true;
+ $this->_content = '';
+ }
+ }
+
+ /**
+ * End of element event.
+ * @param resource $expat Parser handle.
+ * @param string $tag Element name.
+ * @access protected
+ */
+ function _endElement($expat, $tag) {
+ $this->_in_content_tag = false;
+ if (in_array($tag, array('GROUP', 'CASE', 'TEST'))) {
+ $nesting_tag = $this->_popNestingTag();
+ $nesting_tag->paintEnd($this->_listener);
+ } elseif ($tag == 'NAME') {
+ $nesting_tag = &$this->_getCurrentNestingTag();
+ $nesting_tag->setName($this->_content);
+ $nesting_tag->paintStart($this->_listener);
+ } elseif ($tag == 'PASS') {
+ $this->_listener->paintPass($this->_content);
+ } elseif ($tag == 'FAIL') {
+ $this->_listener->paintFail($this->_content);
+ } elseif ($tag == 'EXCEPTION') {
+ $this->_listener->paintException($this->_content);
+ } elseif ($tag == 'SIGNAL') {
+ $this->_listener->paintSignal(
+ $this->_attributes['TYPE'],
+ unserialize($this->_content));
+ } elseif ($tag == 'MESSAGE') {
+ $this->_listener->paintMessage($this->_content);
+ } elseif ($tag == 'FORMATTED') {
+ $this->_listener->paintFormattedMessage($this->_content);
+ }
+ }
+
+ /**
+ * Content between start and end elements.
+ * @param resource $expat Parser handle.
+ * @param string $text Usually output messages.
+ * @access protected
+ */
+ function _addContent($expat, $text) {
+ if ($this->_in_content_tag) {
+ $this->_content .= $text;
+ }
+ return true;
+ }
+
+ /**
+ * XML and Doctype handler. Discards all such content.
+ * @param resource $expat Parser handle.
+ * @param string $default Text of default content.
+ * @access protected
+ */
+ function _default($expat, $default) {
+ }
+ }
+?>
--- /dev/null
+<?php
+require_once("__init__.php");
+require_once('include/platal/env.inc.php');
+
+class TestOfEnv extends UnitTestCase {
+ function TestOfEnv() {
+ $this->UnitTestCase('Env access');
+ }
+
+ function test_get() {
+ $_REQUEST['foo'] = 'baz';
+ $this->assertIdentical(Env::get('foo'), 'baz');
+
+ $_REQUEST['foo'] = 123;
+ $this->assertIdentical(Env::get('foo'), '123');
+
+ $_REQUEST['foo'] = '123';
+ $this->assertIdentical(Env::get('foo'), '123');
+
+ $this->assertIdentical(Env::get('bar'), '');
+ $this->assertIdentical(Env::get('bar', 'bar'), 'bar');
+ }
+
+ function test_getMixed() {
+ $_REQUEST['foo'] = 'baz';
+ $this->assertIdentical(Env::getMixed('foo'), 'baz');
+
+ $_REQUEST['foo'] = 123;
+ $this->assertIdentical(Env::getMixed('foo'), 123);
+
+ $_REQUEST['foo'] = Array(1,'a');
+ $this->assertIdentical(Env::getMixed('foo'), Array(1,'a'));
+
+ $this->assertIdentical(Env::getMixed('bar'), null);
+ $this->assertIdentical(Env::getMixed('bar', 'bar'), 'bar');
+ }
+
+ function test_getBool() {
+ $_REQUEST['foo'] = 'baz';
+ $this->assertIdentical(Env::getBool('foo'), true);
+
+ $_REQUEST['foo'] = 123;
+ $this->assertIdentical(Env::getBool('foo'), true);
+
+ $_REQUEST['foo'] = '123';
+ $this->assertIdentical(Env::getBool('foo'), true);
+
+ $this->assertIdentical(Env::getBool('bar'), false);
+ $this->assertIdentical(Env::getBool('bar', true), true);
+ }
+
+ function test_getInt() {
+ $_REQUEST['foo'] = 'baz';
+ $this->assertIdentical(Env::getInt('foo'), 0);
+ $this->assertIdentical(Env::getInt('foo', 10), 10);
+
+ $_REQUEST['foo'] = 123;
+ $this->assertIdentical(Env::getInt('foo'), 123);
+
+ $_REQUEST['foo'] = '123';
+ $this->assertIdentical(Env::getInt('foo'), 123);
+
+ $this->assertIdentical(Env::getInt('bar'), 0);
+ $this->assertIdentical(Env::getInt('bar', 123), 123);
+ }
+
+ function test_kill() {
+ $_REQUEST['foo'] = 'baz';
+ Env::kill('foo');
+ $this->assertFalse(isset($_REQUEST['foo']));
+ }
+
+ function test_other_class() {
+ $_POST['foo'] = 'baz';
+ Post::kill('foo');
+ $this->assertFalse(isset($_POST['foo']));
+
+ $_GET['foo'] = 'baz';
+ Get::kill('foo');
+ $this->assertFalse(isset($_GET['foo']));
+ }
+}
+
+$test = &new TestOfEnv();
+$test->run($reporter);
+?>
--- /dev/null
+<?php
+require_once("__init__.php");
+require_once('include/platal/errors.inc.php');
+
+class TestOfXOrgErrors extends UnitTestCase {
+ function TestOfXOrgErrors() {
+ $this->UnitTestCase('XOrgErrors Test');
+ }
+
+ function testCreatingXOrgErrors() {
+ $errors = new XOrgErrors();
+ $this->assertIdentical($errors->errs, Array());
+ $this->assertIdentical($errors->failure, false);
+ }
+
+ function testTrig() {
+ $errors = new XOrgErrors();
+ $errors->trig("Foo error");
+ $this->assertIdentical($errors->errs, Array("Foo error"));
+ $this->assertIdentical($errors->failure, false);
+ }
+
+ function testFail() {
+ $errors = new XOrgErrors();
+ $errors->fail("Foo error");
+ $this->assertIdentical($errors->errs, Array("Foo error"));
+ $this->assertIdentical($errors->failure, true);
+ }
+}
+
+$test = &new TestOfXOrgErrors();
+$test->run($reporter);
+?>
--- /dev/null
+<?php
+require_once("__init__.php");
+require_once('include/lists.inc.php');
+
+class TestOfList extends UnitTestCase {
+ function TestOfList() {
+ $this->UnitTestCase('List functions');
+ }
+
+ function test_list_sort_owners() {
+ $l1 = Array('xavier.merlin.1998@polytechnique.org',
+ 'xavier.merlin.1991@polytechnique.org',
+ 'pierre.habouzit.2000@polytechnique.org',
+ 'yann.chevalier.2000@polytechnique.org',
+ 'foobar@baz.org');
+
+ $t = list_sort_owners($l1);
+ $this->assertIdentical($t[0][0]['l'], 'foobar@baz.org');
+
+ $t1991 = array_values($t[1991]);
+ $this->assertIdentical($t1991[0]['l'], 'xavier.merlin.1991');
+
+ $t1998 = array_values($t[1998]);
+ $this->assertIdentical($t1998[0]['l'], 'xavier.merlin.1998');
+
+ $t2000 = array_values($t[2000]);
+ $this->assertIdentical($t2000[0]['l'], 'yann.chevalier.2000');
+ $this->assertIdentical($t2000[1]['l'], 'pierre.habouzit.2000');
+
+ $t = list_sort_owners($l1, false);
+ $this->assertIdentical($t[0][0]['l'], 'foobar@baz.org');
+
+ $tC = array_values($t['C']);
+ $this->assertIdentical($tC[0]['l'], 'yann.chevalier.2000');
+
+ $tH = array_values($t['H']);
+ $this->assertIdentical($tH[0]['l'], 'pierre.habouzit.2000');
+
+ $tM = array_values($t['M']);
+ $this->assertIdentical($tM[0]['l'], 'xavier.merlin.1991');
+ $this->assertIdentical($tM[1]['l'], 'xavier.merlin.1998');
+ }
+}
+
+$test = &new TestOfList();
+$test->run($reporter);
+?>
--- /dev/null
+<?php
+require_once("__init__.php");
+require_once('include/user.func.inc.php');
+require_once('xorg/page.inc.php');
+
+Mock::generate('XorgPage');
+
+class TestOfXOrgUsers extends UnitTestCase {
+ function TestOfXOrgUsers() {
+ $this->UnitTestCase('Users functions');
+ }
+
+ function test_get_user_login() {
+ global $page;
+ $page = new MockXorgPage($this, 'index.tpl');
+ $page->expectCallCount('trig',5);
+
+
+ $login = get_user_login(18742);
+ $this->assertIdentical($login, 'pierre.habouzit.2000');
+ $login = get_user_login(100000000);
+ $this->assertIdentical($login, false);
+
+
+ $login = get_user_login("madcoder@melix.org");
+ $this->assertIdentical($login, 'pierre.habouzit.2000');
+ $login = get_user_login("madcoder@melix.net");
+ $this->assertIdentical($login, 'pierre.habouzit.2000');
+ $login = get_user_login("devnullr@melix.net");
+ $this->assertIdentical($login, false);
+
+
+ $login = get_user_login("madcoder@polytechnique.org");
+ $this->assertIdentical($login, 'madcoder');
+ $login = get_user_login("madcoder@polytechnique.org", true);
+ $this->assertIdentical($login, 'pierre.habouzit.2000');
+ $login = get_user_login("madcoder@m4x.org");
+ $this->assertIdentical($login, 'madcoder');
+ $login = get_user_login("qwerty@polytechnique.org");
+ $this->assertIdentical($login, false);
+
+
+ $login = get_user_login("pierre.habouzit.2000");
+ $this->assertIdentical($login, 'pierre.habouzit.2000');
+ $login = get_user_login("pierre.habouzit.2001");
+ $this->assertIdentical($login, false);
+
+
+ $login = get_user_login("madcoder@olympe.madism.org");
+ $this->assertIdentical($login, 'pierre.habouzit.2000');
+ $login = get_user_login("qwerty@olympe.madism.org");
+ $this->assertIdentical($login, false);
+
+ $page->tally();
+ unset($page);
+ }
+}
+
+$test = &new TestOfXOrgUsers();
+$test->run($reporter);
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('acces_smtp.tpl', AUTH_MDP);
+
+$uid = Session::getInt('uid');
+$pass = Env::get('smtppass1');
+$log = Session::getMixed('log');
+
+if ( Env::get('op') == "Valider" && Env::get('smtppass1') == Env::get('smtppass2') && strlen($pass) >= 6 ) {
+
+ $globals->xdb->execute('update auth_user_md5 set smtppass = {?} where user_id = {?}', $pass, $uid);
+ $page->trig('Mot de passe enregistré');
+ $log->log("passwd_ssl");
+
+} elseif (Env::get('op') == "Supprimer") {
+
+ $globals->xdb->execute('update auth_user_md5 set smtppass = "" where user_id = {?}', $uid);
+ $page->trig('Compte SMTP et NNTP supprimé');
+ $log->log("passwd_del");
+
+}
+
+$res = $globals->xdb->query("select IF(smtppass != '', 'actif', '') from auth_user_md5 where user_id = {?}", $uid);
+$page->assign('actif', $res->fetchOneCell());
+$page->run();
+
+// vim:et:sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/admin_trombino.tpl');
+
+$uid = Env::getInt('uid');
+$q = $globals->xdb->query(
+ "SELECT a.alias,promo
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( u.user_id = a.id AND type='a_vie' )
+ WHERE user_id = {?}", $uid);
+list($forlife, $promo) = $q->fetchOneRow();
+
+switch (Env::get('action')) {
+
+ case "ecole":
+ header("Content-type: image/jpeg");
+ readfile("/home/web/trombino/photos".$promo."/".$forlife.".jpg");
+ exit;
+ break;
+
+ case "valider":
+ $data = file_get_contents($_FILES['userfile']['tmp_name']);
+ list($x, $y) = getimagesize($_FILES['userfile']['tmp_name']);
+ $mimetype = substr($_FILES['userfile']['type'], 6);
+ unlink($_FILES['userfile']['tmp_name']);
+ $globals->xdb->execute(
+ "REPLACE INTO photo SET uid={?}, attachmime = {?}, attach={?}, x={?}, y={?}",
+ $uid, $mimetype, $data, $x, $y);
+ break;
+
+ case "supprimer":
+ $globals->xdb->execute('DELETE FROM photo WHERE uid = {?}', $uid);
+ break;
+}
+
+$page->assign('forlife', $forlife);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_page('admin/ax-xorg.tpl');
+
+// liste des différences
+$res = $globals->xdb->query(
+ 'SELECT u.promo,u.nom AS nom,u.prenom AS prenom,ia.nom AS nomax,ia.prenom AS prenomax,u.matricule AS mat,ia.matricule_ax AS matax
+ FROM auth_user_md5 AS u
+ INNER JOIN identification_ax AS ia ON u.matricule_ax = ia.matricule_ax
+ WHERE (SOUNDEX(u.nom) != SOUNDEX(ia.nom) AND SOUNDEX(CONCAT(ia.particule,u.nom)) != SOUNDEX(ia.nom)
+ AND SOUNDEX(u.nom) != SOUNDEX(ia.nom_patro) AND SOUNDEX(CONCAT(ia.particule,u.nom)) != SOUNDEX(ia.nom_patro))
+ OR u.prenom != ia.prenom OR (u.promo != ia.promo AND u.promo != ia.promo+1 AND u.promo != ia.promo-1)
+ ORDER BY u.promo,u.nom,u.prenom');
+$page->assign('diffs', $res->fetchAllAssoc());
+
+// gens à l'ax mais pas chez nous
+$res = $globals->xdb->query(
+ 'SELECT ia.promo,ia.nom,ia.nom_patro,ia.prenom
+ FROM identification_ax as ia
+ LEFT JOIN auth_user_md5 AS u ON u.matricule_ax = ia.matricule_ax
+ WHERE u.nom IS NULL');
+$page->assign('mank', $res->fetchAllAssoc());
+
+// gens chez nous et pas à l'ax
+$res = $globals->xdb->query('SELECT promo,nom,prenom FROM auth_user_md5 WHERE matricule_ax IS NULL');
+$page->assign('plus', $res->fetchAllAssoc());
+
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/deces_promo.tpl');
+
+$promo = Env::getInt('promo');
+if (Env::has('sub10')) $promo -= 10;
+if (Env::has('sub01')) $promo -= 1;
+if (Env::has('add01')) $promo += 1;
+if (Env::has('add10')) $promo += 10;
+
+$page->assign('promo',$promo);
+
+if (Env::get('valider') == "Valider") {
+ $res = $globals->xdb->iterRow("SELECT user_id,matricule,deces FROM auth_user_md5 WHERE promo = {?}", $promo);
+ while (list($uid,$mat,$deces) = $res->next()) {
+ $val = Env::get($mat);
+ if($val == $deces) continue;
+ $globals->xdb->execute('UPDATE auth_user_md5 SET deces={?} WHERE matricule = {?}', $val, $mat);
+ if($deces=='0000-00-00' or empty($deces)) {
+ require_once('notifs.inc.php');
+ register_watch_op($uid, WATCH_DEATH, $val);
+ require_once('user.func.inc.php');
+ user_clear_all_subs($uid, false); // by default, dead ppl do not loose their email
+ }
+ }
+}
+
+$res = $globals->xdb->iterator('SELECT matricule, nom, prenom, deces FROM auth_user_md5 WHERE promo = {?} ORDER BY nom,prenom', $promo);
+$page->assign('decedes', $res);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_page('admin/emails_bounces_re.tpl');
+
+if (Post::has('submit')) {
+ foreach (Env::getMixed('lvl') as $id=>$val) {
+ $globals->xdb->query(
+ "REPLACE INTO emails_bounces_re (id,pos,lvl,re,text) VALUES ({?}, {?}, {?}, {?}, {?})",
+ $id, $_POST['pos'][$id], $_POST['lvl'][$id], $_POST['re'][$id], $_POST['text'][$id]
+ );
+ }
+}
+
+$page->assign('bre', $globals->xdb->iterator("SELECT * FROM emails_bounces_re ORDER BY pos"));
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/evenements.tpl');
+
+$arch = Env::get('arch', 0);
+$evid = Post::getInt('evt_id');
+$page->assign('arch', $arch);
+
+switch(Post::get('action')) {
+ case "Proposer":
+ $globals->xdb->execute('UPDATE evenements SET titre={?}, texte={?}, peremption={?}, promo_min={?}, promo_max={?} WHERE id = {?}',
+ Post::get('titre'), Post::get('texte'), Post::get('peremption'), Post::get('promo_min'), Post::get('promo_max'), $evid);
+ break;
+
+ case "Valider":
+ $globals->xdb->execute('UPDATE evenements SET creation_date = creation_date, flags = CONCAT(flags,",valide") WHERE id = {?}', $evid);
+ break;
+
+ case "Invalider":
+ $globals->xdb->execute('UPDATE evenements SET creation_date = creation_date, flags = REPLACE(flags,"valide", "") WHERE id = {?}', $evid);
+ break;
+
+ case "Supprimer":
+ $globals->xdb->execute('DELETE from evenements WHERE id = {?}', $evid);
+ break;
+
+ case "Archiver":
+ $globals->xdb->execute('UPDATE evenements SET creation_date = creation_date, flags = CONCAT(flags,",archive") WHERE id = {?}', $evid);
+ break;
+
+ case "Desarchiver":
+ $globals->xdb->execute('UPDATE evenements SET creation_date = creation_date, flags = REPLACE(flags,"archive","") WHERE id = {?}', $evid);
+ break;
+
+ case "Editer":
+ $res = $globals->xdb->query('SELECT titre, texte, peremption, promo_min, promo_max FROM evenements WHERE id={?}', $evid);
+ list($titre, $texte, $peremption, $promo_min, $promo_max) = $res->fetchOneRow();
+ $page->assign('mode', 'edit');
+ $page->assign('titre',$titre);
+ $page->assign('texte',$texte);
+ $page->assign('promo_min',$promo_min);
+ $page->assign('promo_max',$promo_max);
+ $page->assign('peremption',$peremption);
+
+ $select = "";
+ for ($i = 1 ; $i < 30 ; $i++) {
+ $p_stamp=date("Ymd",time()+3600*24*$i);
+ $year=substr($p_stamp,0,4);
+ $month=substr($p_stamp,4,2);
+ $day=substr($p_stamp,6,2);
+
+ $select .= "<option value=\"$p_stamp\"" . (($p_stamp == strtr($peremption, array("-" => ""))) ? " selected" : "")."> $day / $month / $year</option>\n";
+ }
+ $page->assign('select',$select);
+
+ break;
+}
+
+if ($action != "Editer") {
+
+ $sql = "SELECT e.id, e.titre, e.texte,
+ DATE_FORMAT(e.creation_date,'%d/%m/%Y %T') AS creation_date,
+ DATE_FORMAT(e.peremption,'%d/%m/%Y') AS peremption,
+ e.promo_min, e.promo_max,
+ 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
+ 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')
+ WHERE ".($arch ? "" : "!")."FIND_IN_SET('archive',e.flags)
+ ORDER BY FIND_IN_SET('valide',e.flags), peremption";
+ $page->assign('evs', $globals->xdb->iterator($sql));
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/geoloc.tpl');
+require_once("geoloc.inc.php");
+
+$nb_synchro = 0;
+
+if (Env::has('id') && is_numeric(Env::get('id'))) {
+ if (synchro_city(Env::get('id'))) $nb_synchro ++;
+}
+
+if (Env::has('missinglat')) {
+ $res = $globals->xdb->iterRow("SELECT id FROM geoloc_city WHERE lat = 0 AND lon = 0");
+ while ($a = $res->next()) if (synchro_city($a[0])) $nb_synchro++;
+}
+
+if ($nb_synchro)
+ $page->trig(($nb_synchro > 1)?($nb_synchro." villes ont été synchronisées"):"Une ville a été synchronisée");
+
+$res = $globals->xdb->query("SELECT COUNT(*) FROM geoloc_city WHERE lat = 0 AND lon = 0");
+$page->assign("nb_missinglat", $res->fetchOneCell());
+
+$page->run();
+
+// vim:set et sws=4 sts=4 sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('applis_def','id');
+$editor->add_join_table('applis_ins','aid',true);
+
+$editor->describe('text','intitulé',true);
+$editor->describe('type','type',true,'set');
+$editor->describe('url','site web',false);
+
+$editor->assign('title', 'Gestion des formations');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('groupesx_auth','id');
+
+$editor->describe('name','nom',true);
+$editor->describe('privkey','clé privée',false);
+$editor->describe('datafields','champs renvoyés',true);
+
+$editor->assign('title', 'Gestion de l\'authentification centralisée');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('binets_def','id');
+
+$editor->add_join_table('binets_ins','binet_id',true);
+
+$editor->describe('text','intitulé',true);
+$editor->assign('title', 'Gestion des binets');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('coupures','id');
+
+$editor->describe('debut','date',true,'timestamp');
+$editor->describe('duree','durée',false);
+$editor->describe('resume','résumé',true);
+$editor->describe('services','services affectés',true,'set');
+$editor->describe('description','description',false,'textarea');
+
+$editor->assign('title', 'Gestion des coupures');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('profile_medals', 'id');
+
+$editor->describe('type', 'type', true, 'set');
+$editor->describe('text', 'intitulé', true);
+$editor->describe('img', 'nom de l\'image', false);
+
+$editor->assign('title', 'Gestion des Distinctions');
+
+if (Post::get('frm_id')) {
+ $page->changeTpl('admin/gerer_decos.tpl');
+
+ $mid = Post::getInt('frm_id');
+
+ if (Post::get('act') == 'del') {
+ $globals->xdb->execute('DELETE FROM profile_medals_grades WHERE mid={?} AND gid={?}', $mid, Post::getInt('gid'));
+ } elseif (Post::get('act') == 'new') {
+ $globals->xdb->execute('INSERT INTO profile_medals_grades (mid,gid) VALUES({?},{?})',
+ $mid, max(array_keys(Post::getMixed('grades', Array(0))))+1);
+ } else {
+ foreach (Post::getMixed('grades', Array()) as $gid=>$text) {
+ $globals->xdb->execute('UPDATE profile_medals_grades SET pos={?}, text={?} WHERE gid={?}', $_POST['pos'][$gid], $text, $gid);
+ }
+ }
+ $res = $globals->xdb->iterator('SELECT gid, text, pos FROM profile_medals_grades WHERE mid={?} ORDER BY pos', $mid);
+ $page->assign('grades', $res);
+}
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('groupesx_def','id');
+$editor->add_join_table('groupesx_ins','gid',true);
+
+$editor->describe('text','intitulé',true);
+$editor->describe('url','site web',false);
+
+$editor->assign('title', 'Gestion des Groupes X');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('paiement.paiements','id');
+
+$editor->add_join_table('paiement.transactions','ref',true);
+
+$editor->describe('text','intitulé',true);
+$editor->describe('url','site web',false);
+$editor->describe('montant_def','montant par défaut',false);
+$editor->describe('montant_min','montant minimum',false);
+$editor->describe('montant_max','montant maximum',false);
+$editor->describe('mail','email contact',true);
+$editor->describe('confirmation','message confirmation',false,'textarea');
+$editor->describe('flags','flags', true, 'set');
+
+$editor->assign('title', 'Gestion des télépaiements');
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('skins','id');
+$editor->describe('name','nom',true);
+$editor->describe('skin_tpl','nom du template',true);
+$editor->describe('auteur','auteur',false);
+$editor->describe('comment','commentaire',true,'textarea');
+$editor->describe('date','date',false);
+$editor->describe('ext','extension du screenshot',false);
+
+$editor->assign('title', 'Gestion des skins');
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/homonymes.tpl');
+require_once("homonymes.inc.php");
+
+$op = Env::get('op', 'list');
+$target = Env::getInt('target');
+
+if ($target) {
+ if (! list($prenom,$nom,$forlife,$loginbis) = select_if_homonyme($target)) {
+ $target=0;
+ } else {
+ $page->assign('nom',$nom);
+ $page->assign('prenom',$prenom);
+ $page->assign('forlife',$forlife);
+ $page->assign('loginbis',$loginbis);
+ }
+}
+
+$page->assign('op',$op);
+$page->assign('target',$target);
+$page->assign('baseurl',$globals->baseurl);
+
+// on a un $target valide, on prepare les mails
+if ($target) {
+
+ // on examine l'op a effectuer
+ switch ($op) {
+ case 'mail':
+ send_warning_homonyme($prenom, $nom, $forlife, $loginbis);
+ switch_bestalias($target, $loginbis);
+ $op = 'list';
+ break;
+ case 'correct':
+ switch_bestalias($target, $loginbis);
+ $globals->xdb->execute("UPDATE aliases SET type='homonyme',expire=NOW() WHERE alias={?}", $loginbis);
+ $globals->xdb->execute("REPLACE INTO homonymes (homonyme_id,user_id) VALUES({?},{?})", $target, $target);
+ send_robot_homonyme($prenom, $nom, $forlife, $loginbis);
+ $op = 'list';
+ break;
+ }
+}
+
+if ($op == 'list') {
+ $res = $globals->xdb->iterator(
+ "SELECT a.alias AS homonyme,s.id AS user_id,s.alias AS forlife,
+ promo,prenom,nom,
+ IF(h.homonyme_id=s.id, a.expire, NULL) AS expire,
+ IF(h.homonyme_id=s.id, a.type, NULL) AS type
+ FROM aliases AS a
+ LEFT JOIN homonymes AS h ON (h.homonyme_id = a.id)
+ INNER JOIN aliases AS s ON (s.id = h.user_id AND s.type='a_vie')
+ INNER JOIN auth_user_md5 AS u ON (s.id=u.user_id)
+ WHERE a.type='homonyme' OR a.expire!=''
+ ORDER BY a.alias,promo");
+ $hnymes = Array();
+ while ($tab = $res->next()) {
+ $hnymes[$tab['homonyme']][] = $tab;
+ }
+ $page->assign_by_ref('hnymes',$hnymes);
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/index.tpl');
+
+$res = $globals->xdb->iterRow("
+ SELECT h1, h2, texte, url
+ FROM admin_a AS a
+ INNER JOIN admin_h2 AS h2 USING(h2id)
+ INNER JOIN admin_h1 AS h1 USING(h1id)
+ ORDER BY h1.prio, h2.prio, a.prio");
+$index = Array();
+while(list($h1,$h2,$txt,$url) = $res->next()) {
+ $index[$h1][$h2][] = Array('txt' => $txt, 'url'=>$url);
+}
+$page->assign_by_ref('index', $index);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/lists.tpl');
+require_once('xml-rpc-client.inc.php');
+require_once('lists.inc.php');
+
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+$listes = $client->get_all_lists();
+$page->assign_by_ref('listes',$listes);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('logger-view.tpl');
+require_once('diogenes/diogenes.logger-view.inc.php');
+
+if (!Env::has('logauth')) {
+ $_REQUEST['logauth'] = 'native';
+}
+
+$logview = new DiogenesLoggerView;
+$logview->run($page);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('logger.actions','id');
+$editor->add_join_table('logger.events','action',true);
+
+$editor->describe('text','intitulé',true);
+$editor->describe('description','description',true);
+
+$editor->assign('title', 'Gestion des actions de logger');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/newsletter.tpl');
+require_once("newsletter.inc.php");
+
+if(Get::has('new')) {
+ insert_new_nl();
+ header("Location: newsletter.php");
+}
+
+$page->assign_by_ref('nl_list', get_nl_slist());
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('newsletter_cat','cid');
+
+$editor->describe('titre','intitulé',true);
+$editor->describe('pos','position',true);
+
+$editor->assign('title', 'Gestion des catégories de la newsletter');
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/newsletter_edit.tpl');
+require_once("newsletter.inc.php");
+
+$nid = Get::get('nid', 'last');
+$nl = new NewsLetter($nid);
+
+if(Get::has('del_aid')) {
+ $nl->delArticle(Get::get('del_aid'));
+ header("Location: {$_SERVER['PHP_SELF']}?nid=$nid");
+}
+
+if(Post::get('update')) {
+ $nl->_title = Post::get('title');
+ $nl->_date = Post::get('date');
+ $nl->_head = Post::get('head');
+ $nl->save();
+}
+
+if(Post::get('save')) {
+ $art = new NLArticle(Post::get('title'), Post::get('body'), Post::get('append'),
+ Get::get('edit_aid'), Post::get('cid'), Post::get('pos'));
+ $nl->saveArticle($art);
+ header("Location: {$_SERVER['PHP_SELF']}?nid=$nid");
+}
+
+if(Get::has('edit_aid')) {
+ $eaid = Get::get('edit_aid');
+ if(Post::has('aid')) {
+ $art = new NLArticle(Post::get('title'), Post::get('body'), Post::get('append'),
+ $eaid, Post::get('cid'), Post::get('pos'));
+ } else {
+ $art = $eaid<0 ? new NLArticle() : $nl->getArt($eaid);
+ }
+ $page->assign('art', $art);
+}
+
+$page->assign_by_ref('nl',$nl);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('postfix_blacklist','email',true);
+
+$editor->assign('title', 'Blacklist de postfix');
+$editor->hide_id();
+
+$editor->describe('email','email',true);
+$editor->describe('reject_text','Texte de rejet',true);
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_page('admin/postfix_delayed.tpl');
+
+
+if (Env::has('del')) {
+ $crc = Env::get('crc');
+ $globals->xdb->execute("UPDATE postfix_mailseen SET release = 'del' WHERE crc = {?}", $crc);
+ $page->trig($crc." verra tous ses mails supprimés !");
+} elseif (Env::has('ok')) {
+ $crc = Env::get('crc');
+ $globals->xdb->execute("UPDATE postfix_mailseen SET release = 'ok' WHERE crc = {?}", $crc);
+ $page->trig($crc." a le droit de passer !");
+}
+
+$sql = $globals->xdb->iterator(
+ "SELECT crc, nb, update_time, create_time,
+ FIND_IN_SET('del', release) AS del,
+ FIND_IN_SET('ok', release) AS ok
+ FROM postfix_mailseen
+ WHERE nb >= 30
+ ORDER BY release != ''");
+
+$page->assign_by_ref('mails', $sql);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_table_editor('postfix_whitelist','email',true);
+
+$editor->assign('title', 'Whitelist de postfix');
+$editor->hide_id();
+
+$editor->describe('email','email',true);
+
+$editor->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+new_admin_page('admin/synchro_ax.tpl');
+
+require_once('user.func.inc.php');
+require_once('synchro_ax.inc.php');
+
+if (Env::has('user')) {
+ $login = get_user_forlife(Env::get('user'));
+ if ($login === false) {
+ $page->kill("");
+ }
+}
+
+if (Env::has('mat')) {
+ $res = $globals->xdb->query(
+ "SELECT alias
+ FROM aliases AS a
+ INNER JOIN auth_user_md5 AS u ON (a.id=u.user_id AND a.type='a_vie')
+ WHERE matricule={?}", Env::getInt('mat'));
+ $login = $res->fetchOneCell();
+}
+
+if ($login) {
+ $new = Env::get('modif') == 'new';
+ $user = get_user_details($login, Session::getInt('uid'));
+ $userax= get_user_ax($user['user_id']);
+
+ if (Env::has('importe')) {
+
+ $adr_dels = array();
+ foreach ($user['adr'] as $adr) {
+ if (Env::has('del_address'.$adr['adrid'])) {
+ $adr_dels[] = $adr['adrid'];
+ }
+ }
+
+ $adr_adds = array();
+ foreach ($userax['adr'] as $i => $adr) {
+ if (Env::has('add_address'.$i)) {
+ $adr_adds[] = $i;
+ }
+ }
+
+ $pro_dels = array();
+ foreach ($user['adr_pro'] as $pro) {
+ if (Env::has('del_pro'.$pro['entrid'])) {
+ $pro_dels[] = $pro['entrid'];
+ }
+ }
+
+ $pro_adds = array();
+ foreach ($userax['adr_pro'] as $i => $pro) {
+ if (Env::has('add_pro'.$i)) {
+ $pro_adds[] = $i;
+ }
+ }
+
+ import_from_ax($userax, Env::has('nom_usage'), Env::has('mobile'), $adr_dels, $adr_adds, $pro_dels, $pro_adds, Env::has('nationalite'));
+
+ }
+
+ $user = get_user_details($login, Session::getInt('uid'));
+
+ if ($userax) {
+ $user['matricule_ax'] = $userax['matricule_ax'];
+ unset($userax['matricule_ax']);
+ $user['nom'] = ucwords(strtolower($user['nom']));
+ $user['nom_usage'] = ucwords(strtolower($user['nom_usage']));
+ }
+
+ $page->assign('watch_champs',array('nom', 'nom_usage', 'prenom', 'nationalite', 'mobile'));
+ $page->assign('modifiables', array(0,1,0,1,1));
+
+ $page->assign('x', $user);
+ $page->assign('ax', $userax);
+}
+$page->run();
+
+// vim:set et sts=4 sws=4 sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/utilisateurs.tpl');
+require_once("emails.inc.php");
+require_once("user.func.inc.php");
+
+if (Session::has('suid')) {
+ $page->kill("déjà en SUID !!!");
+}
+
+if (Env::has('user_id')) {
+ $login = get_user_login(Env::getInt('user_id'));
+} elseif (Env::has('login')) {
+ $login = get_user_login(Env::get('login'));
+} else {
+ $login = false;
+}
+
+if(Env::has('logs_button') && $login) {
+ header("Location: logger.php?loguser=$login&year=".date('Y')."&month=".date('m'));
+}
+
+if (Env::has('ax_button') && $login) {
+ header("Location: synchro_ax.php?user=$login");
+}
+
+if(Env::has('suid_button') && $login) {
+ $_SESSION['log']->log("suid_start", "login by ".Session::get('forlife'));
+ $_SESSION['suid'] = $_SESSION;
+ $r = $globals->xdb->query("SELECT id FROM aliases WHERE alias={?}", $login);
+ if($uid = $r->fetchOneCell()) {
+ start_connexion($uid,true);
+ header("Location: ../");
+ }
+}
+
+if ($login) {
+ $r = $globals->xdb->query("SELECT *, a.alias AS forlife
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( a.id = u.user_id AND a.alias={?} AND type!='homonyme' )", $login);
+ $mr = $r->fetchOneAssoc();
+
+ $redirect = new Redirect($mr['user_id']);
+
+ // Check if there was a submission
+ foreach($_POST as $key => $val) {
+ switch ($key) {
+ case "add_fwd":
+ $email = trim(Env::get('email'));
+ if (!isvalid_email_redirection($email)) {
+ $page->trig("invalid email $email");
+ } else {
+ $redirect->add_email($email);
+ $page->trig("Ajout de $email effectué");
+ }
+ break;
+
+ case "del_fwd":
+ if (!empty($val)) {
+ $redirect->delete_email($val);
+ }
+ break;
+
+ case "del_alias":
+ if (!empty($val)) {
+ $globals->xdb->execute("DELETE FROM aliases WHERE id={?} AND alias={?}
+ AND type!='a_vie' AND type!='homonyme'", $mr['user_id'], $val);
+ fix_bestalias($nr['user_id']);
+ $page->trig($val." a été supprimé");
+ }
+ break;
+
+ case "add_alias":
+ $globals->xdb->execute("INSERT INTO aliases (id,alias,type) VALUES ({?}, {?}, 'alias')",
+ $mr['user_id'], Env::get('email'));
+ break;
+
+ case "best":
+ // 'bestalias' is the first bit of the set : 1
+ // 255 is the max for flags (8 sets max)
+ $globals->xdb->execute("UPDATE aliases SET flags= flags & (255 - 1) WHERE id={?}", $mr['user_id']);
+ $globals->xdb->execute("UPDATE aliases
+ SET flags= flags | 1
+ WHERE id={?} AND alias={?}", $mr['user_id'], $val);
+ break;
+
+
+ // Editer un profil
+ case "u_edit":
+ $pass_md5B = Env::get('newpass_clair') != "********" ? md5(Env::get('newpass_clair')) : Env::get('passw');
+ $naiss = Env::get('naissanceN');
+ $perms = Env::get('permsN');
+ $prenm = Env::get('prenomN');
+ $nom = Env::get('nomN');
+ $promo = Env::getInt('promoN');
+ $nom = Env::get('nomN');
+ $comm = Env::get('commentN');
+
+ $query = "UPDATE auth_user_md5 SET
+ naissance = '$naiss',
+ password = '$pass_md5B',
+ perms = '$perms',
+ prenom = '".addslashes($prenm)."',
+ nom = '".addslashes($nom)."',
+ promo = $promo,
+ comment = '".addslashes($comm)."'
+ WHERE user_id = '{$mr['user_id']}'";
+ if ($globals->xdb->execute($query)) {
+ user_reindex($mr['user_id']);
+
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $mailer = new HermesMailer();
+ $mailer->setFrom("webmaster@polytechnique.org");
+ $mailer->addTo("web@polytechnique.org");
+ $mailer->setSubject("INTERVENTION ADMIN (".Session::get('forlife').")");
+ $mailer->setTxtBody(preg_replace("/[ \t]+/", ' ', $query));
+ $mailer->send();
+
+ $page->trig("updaté correctement.");
+ }
+ if (Env::get('nomusageN') != $mr['nom_usage']) {
+ require_once('nomusage.inc.php');
+ set_new_usage($mr['user_id'], Env::get('nomusageN'), make_username(Env::get('prenomN'), Env::get('nomusageN')));
+ }
+ $r = $globals->xdb->query("SELECT *, a.alias AS forlife
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id=a.id)
+ WHERE user_id = {?}", $mr['user_id']);
+ $mr = $r->fetchOneAssoc();
+ break;
+
+ // DELETE FROM auth_user_md5
+ case "u_kill":
+ user_clear_all_subs($mr['user_id']);
+ $page->trig("'{$mr['user_id']}' a été désinscrit !");
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $mailer = new HermesMailer();
+ $mailer->setFrom("webmaster@polytechnique.org");
+ $mailer->addTo("web@polytechnique.org");
+ $mailer->setSubject("INTERVENTION ADMIN (".Session::get('forlife').")");
+ $mailer->setTxtBody("\nUtilisateur $login effacé");
+ $mailer->send();
+ break;
+ }
+ }
+
+ $res = $globals->xdb->query("SELECT UNIX_TIMESTAMP(start), host
+ FROM logger.sessions
+ WHERE uid={?} AND suid=0
+ ORDER BY start DESC
+ LIMIT 1", $mr['user_id']);
+ list($lastlogin,$host) = $res->fetchOneRow();
+ $page->assign('lastlogin', $lastlogin);
+ $page->assign('host', $host);
+
+ $page->assign('aliases', $globals->xdb->iterator(
+ "SELECT alias, type='a_vie' AS for_life,FIND_IN_SET('bestalias',flags) AS best,expire
+ FROM aliases
+ WHERE id = {?} AND type!='homonyme'
+ ORDER BY type!= 'a_vie'", $mr["user_id"]));
+ $page->assign('xorgmails', $xorgmails);
+ $page->assign('email_panne', $email_panne);
+ $page->assign('emails',$redirect->emails);
+
+ $page->assign('mr',$mr);
+}
+
+$page->run();
+
+// vim:set et sws=4 sts=4 sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('admin/valider.tpl');
+require_once("validations.inc.php");
+
+if(Env::has('uid') && Env::has('type') && Env::has('stamp')) {
+ $req = Validate::get_request(Env::get('uid'), Env::get('type'), Env::get('stamp'));
+ if($req) { $req->handle_formu(); }
+}
+
+$page->assign_by_ref('vit', new ValidateIterator ());
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once('search.inc.php');
+new_skinned_page('search.tpl', AUTH_COOKIE);
+
+$page->assign('advanced',1);
+$page->assign('public_directory',0);
+require_once("applis.func.inc.php");
+require_once("geoloc.inc.php");
+
+// {{{ function form_prepare()
+
+function form_prepare()
+{
+ global $page,$globals;
+ $page->assign('formulaire',1);
+ $page->assign('choix_nats', $globals->xdb->iterator('SELECT a2 AS id,IF(nat=\'\',pays,nat) AS text FROM geoloc_pays ORDER BY text'));
+ $page->assign('choix_postes', $globals->xdb->iterator('SELECT id,fonction_fr FROM fonctions_def ORDER BY fonction_fr'));
+ $page->assign('choix_binets', $globals->xdb->iterator('SELECT id,text FROM binets_def ORDER BY text'));
+ $page->assign('choix_groupesx', $globals->xdb->iterator('SELECT id,text FROM groupesx_def ORDER BY text'));
+ $page->assign('choix_sections', $globals->xdb->iterator('SELECT id,text FROM sections ORDER BY text'));
+ $page->assign('choix_schools', $globals->xdb->iterator('SELECT id,text FROM applis_def ORDER BY text'));
+ $page->assign('choix_secteurs', $globals->xdb->iterator('SELECT id,label FROM emploi_secteur ORDER BY label'));
+
+ if (Env::has('school')) {
+ $sql = 'SELECT type FROM applis_def WHERE id='.Env::getInt('school');
+ } else {
+ $sql = 'DESCRIBE applis_def type';
+ }
+ $res = $globals->xdb->query($sql);
+ $row = $res->fetchOneRow();
+ if (Env::has('school')) {
+ $types = $row[0];
+ } else {
+ $types = explode('(',$row[1]);
+ $types = str_replace("'","",substr($types[1],0,-1));
+ }
+ $page->assign('choix_diplomas', explode(',',$types));
+}
+
+// }}}
+
+if (!Env::has('rechercher')) {
+ form_prepare();
+} else {
+
+ // {{{ function get_list()
+
+ function get_list($offset, $limit, $order) {
+ if ($with_soundex = Env::has('with_soundex')) {
+ $nameField = new RefWithSoundexSField('name',array('rn.nom1_soundex','rn.nom2_soundex','rn.nom3_soundex'),'recherche_soundex','rn','u.matricule = rn.matricule');
+ $firstnameField = new RefWithSoundexSField('firstname',array('rp.prenom1_soundex','rp.prenom2_soundex'),'recherche_soundex','rp','u.matricule = rp.matricule');
+ } else {
+ $nameField = new NameSField('name',array('u.nom','u.nom_usage'),'');
+ $firstnameField = new StringSField('firstname',array('u.prenom'),'');
+ }
+ $nicknameField = new StringSField('nickname',array('q.profile_nick'),'');
+
+ $promo1Field = new PromoSField('promo1','egal1',array('u.promo'),'');
+ $promo2Field = new PromoSField('promo2','egal2',array('u.promo'),'');
+ $womanField = new RefSField('woman',array('FIND_IN_SET(u.flags,\'femme\')+1'),'','','');
+ $subscriberField = new RefSField('subscriber',array('!(u.perms IN (\'admin\',\'user\'))+1'),'','','');
+ $aliveField = new RefSField('alive',array('(u.deces!=0)+1'),'','','');
+
+ $townField = new RefSField('city',array('av.city'),'adresses','av','u.user_id=av.uid',false);
+ $countryField = new RefSField('country',array('ap.country'),'adresses','ap','u.user_id=ap.uid');
+ $regionField = new RefSField('region',array('ar.region'),'adresses','ar','u.user_id=ar.uid');
+
+ $entrepriseField = new RefSField('entreprise',array('ee.entreprise'),'entreprises','ee','u.user_id=ee.uid',false);
+ $posteField = new RefSField('poste',array('ep.poste'),'entreprises','ep','u.user_id=ep.uid', false);
+ $fonctionField = new RefSField('fonction',array('en.fonction'),'entreprises','en','u.user_id=en.uid');
+ $secteurField = new RefSField('secteur',array('fm.secteur'),'entreprises','fm','u.user_id=fm.uid');
+ $cvField = new RefSField('cv',array('u.cv'),'','','',false);
+
+ $natField = new RefSField('nationalite',array('u.nationalite'),'','','');
+ $binetField = new RefSField('binet',array('b.binet_id'),'binets_ins','b','u.user_id=b.user_id');
+ $groupexField = new RefSField('groupex',array('g.gid'),'groupesx_ins','g','u.user_id=g.guid');
+ $sectionField = new RefSField('section',array('u.section'),'','','');
+ $schoolField = new RefSField('school',array('as.aid'),'applis_ins','`as`','u.user_id=as.uid');
+ $diplomaField = new RefSField('diploma',array('ad.type'),'applis_ins','ad','u.user_id=ad.uid');
+
+ $freeField = new RefSField('free',array('q.profile_freetext'),'','','',false);
+
+ $fields = new SFieldGroup(true, array(
+ $nameField, $firstnameField, $nicknameField, $promo1Field,
+ $promo2Field, $womanField, $subscriberField, $aliveField,
+ $townField, $countryField, $regionField, $entrepriseField,
+ $posteField, $secteurField, $cvField, $natField, $binetField,
+ $groupexField, $sectionField, $schoolField, $diplomaField,
+ $freeField, $fonctionField)
+ );
+
+
+ if ($fields->too_large()) {
+ form_prepare();
+ new ThrowError('Recherche trop générale.');
+ }
+ global $globals;
+
+ $where = $fields->get_where_statement();
+ if ($where) {
+ $where = "WHERE $where";
+ }
+ $sql = 'SELECT SQL_CALC_FOUND_ROWS DISTINCT
+ u.nom, u.prenom,
+ '.$globals->search->result_fields.'
+ c.uid AS contact,
+ w.ni_id AS watch
+ FROM auth_user_md5 AS u
+ LEFT JOIN auth_user_quick AS q USING(user_id)
+ '.$fields->get_select_statement().'
+ '.(Env::has('only_referent') ? ' INNER JOIN mentor AS m ON (m.uid = u.user_id)' : '').'
+ LEFT JOIN aliases AS a ON (u.user_id = a.id AND a.type="a_vie")
+ LEFT JOIN contacts AS c ON (c.uid='.Session::getInt('uid').' AND c.contact=u.user_id)
+ LEFT JOIN watch_nonins AS w ON (w.ni_id=u.user_id AND w.uid='.Session::getInt('uid').')
+ '.$globals->search->result_where_statement."
+ $where
+ ORDER BY ".($order?($order.', '):'')
+ .implode(',',array_filter(array($fields->get_order_statement(), 'promo DESC, NomSortKey, prenom'))).'
+ LIMIT '.($offset * $limit).','.$limit;
+ $liste = $globals->xdb->iterator($sql);
+ $res = $globals->xdb->query("SELECT FOUND_ROWS()");
+ $nb_tot = $res->fetchOneCell();
+ return Array($liste, $nb_tot);
+ }
+
+ // }}}
+
+ $search = new XOrgSearch('get_list');
+ $search->setNbLines($globals->search->per_page);
+
+ $page->assign('url_search_form', $search->make_url(Array('rechercher'=>0)));
+ $page->assign('with_soundex', Env::has('with_soundex')?"":($search->make_url(Array())."&with_soundex=1"));
+
+ $nb_tot = $search->show();
+
+ if ($nb_tot > $globals->search->private_max) {
+ form_prepare();
+ new ThrowError('Recherche trop générale');
+ }
+
+}
+
+$page->register_modifier('display_lines', 'display_lines');
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once("validations.inc.php");
+
+new_skinned_page('alias.tpl', AUTH_MDP);
+
+$uid = Session::getInt('uid');
+$forlife = Session::get('forlife');
+
+$page->assign('demande', AliasReq::get_request($uid));
+
+//Suppression d'un alias
+if (Env::get('suppr', false)) {
+ $globals->xdb->execute(
+ 'DELETE virtual, virtual_redirect
+ FROM virtual
+ INNER JOIN virtual_redirect USING (vid)
+ WHERE alias LIKE {?} AND (redirect = {?} OR redirect = {?})',
+ Env::get('suppr'),
+ $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2);
+}
+
+//Récupération des alias éventuellement existants
+$res = $globals->xdb->query(
+ "SELECT alias, emails_alias_pub
+ FROM auth_user_quick, virtual
+ INNER JOIN virtual_redirect USING(vid)
+ WHERE ( redirect={?} OR redirect= {?} )
+ AND alias LIKE '%@{$globals->mail->alias_dom}' AND user_id = {?}",
+ $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2, Session::getInt('uid'));
+list($alias, $visibility) = $res->fetchOneRow();
+$page->assign('actuel', $alias);
+
+//Si l'utilisateur vient de faire une damande
+if (Env::has('alias') and Env::has('raison')) {
+ $alias = Env::get('alias');
+ $raison = Env::get('raison');
+ $public = (Env::get('public', 'off') == 'on')?"public":"private";
+
+ $page->assign('r_alias', $alias);
+ $page->assign('r_raison', $raison);
+ if ($public == 'public') {
+ $page->assign('r_public', true);
+ }
+
+ //Quelques vérifications sur l'alias (caractères spéciaux)
+ if (!preg_match( "/^[a-zA-Z0-9\-.]{3,20}$/", $alias)) {
+ $page->trig("L'adresse demandée n'est pas valide.
+ Vérifie qu'elle comporte entre 3 et 20 caractères
+ et qu'elle ne contient que des lettres non accentuées,
+ des chiffres ou les caractères - et .");
+ $page->run('error');
+ } else {
+ //vérifier que l'alias n'est pas déja pris
+ $res = $globals->xdb->query('SELECT COUNT(*) FROM virtual WHERE alias={?}', $alias.'@'.$globals->mail->alias_dom);
+ if ($res->fetchOneCell() > 0) {
+ $page->trig("L'alias $alias@{$globals->mail->alias_dom} a déja été attribué.
+ Tu ne peux donc pas l'obtenir.");
+ $page->run('error');
+ }
+
+ //vérifier que l'alias n'est pas déja en demande
+ $it = new ValidateIterator ();
+ while($req = $it->next()) {
+ if ($req->type == "alias" and $req->alias == $alias) {
+ $page->trig("L'alias $alias@{$globals->mail->alias_dom} a déja été demandé.
+ Tu ne peux donc pas l'obtenir pour l'instant.");
+ $page->run('error');
+ }
+ }
+
+ //Insertion de la demande dans la base, écrase les requêtes précédente
+ $myalias = new AliasReq($uid, $alias, $raison, $public);
+ $myalias->submit();
+ $page->assign('success',$alias);
+ $page->run('succes');
+ }
+}
+
+// montrer son alias
+elseif ((Env::get('visible') == 'public') && ($visibility != 'public')) {
+ $globals->xdb->execute("UPDATE auth_user_quick SET emails_alias_pub = 'public' WHERE user_id = {?}", Session::getInt('uid'));
+ $visibility = 'public';
+}
+
+// cacher son alias
+elseif ((Env::get('visible') == 'private') && ($visibility != 'private')) {
+ $globals->xdb->execute("UPDATE auth_user_quick SET emails_alias_pub = 'private' WHERE user_id = {?}", Session::getInt('uid'));
+ $visibility = 'private';
+}
+
+if ($visibility == 'public') {
+ $page->assign('mail_public', true);
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('antispam.tpl', AUTH_MDP);
+require_once("emails.inc.php");
+
+$bogo = new Bogo(Session::getInt('uid'));
+
+if (Env::has('statut_filtre')) {
+ $bogo->change(Session::getInt('uid'), Env::getInt('statut_filtre'));
+}
+
+$page->assign('filtre',$bogo->level());
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$gpex_pass = $_GET["pass"];
+$gpex_url = urldecode($_GET["url"]);
+if (strpos($gpex_url, '?') === false) {
+ $gpex_url .= "?PHPSESSID=" . $_GET["session"];
+} else {
+ $gpex_url .= "&PHPSESSID=" . $_GET["session"];
+}
+/* a-t-on besoin d'ajouter le http:// ? */
+if (!preg_match("/^(http|https):\/\/.*/",$gpex_url))
+ $gpex_url = "http://$gpex_url";
+$gpex_challenge = $_GET["challenge"];
+
+require_once("xorg.inc.php");
+new_skinned_page('index.tpl',AUTH_COOKIE);
+
+// mise à jour de l'heure et de la machine de dernier login sauf quand on est en suid
+if (!isset($_SESSION['suid'])) {
+ $logger = (isset($_SESSION['log']) && $_SESSION['log']->uid==$uid) ? $_SESSION['log'] : new DiogenesCoreLogger($uid);
+ $logger->log("connexion_auth_ext",$_SERVER['PHP_SELF']);
+}
+
+/* cree le champs "auth" renvoye au Groupe X */
+function gpex_make_auth($chlg, $privkey, $datafields) {
+ global $globals;
+ $fieldarr = split(",",$datafields);
+ $tohash = "1$chlg$privkey";
+
+ while (list(,$val) = each($fieldarr)) {
+ /* on verifie qu'on n'a pas demandé une
+ variable inexistante ! */
+ if (isset($_SESSION[$val])) {
+ $tohash .= $_SESSION[$val];
+ } else if ($val == 'username') {
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", Session::getInt('uid'));
+ $min_username = $res->fetchOneCell();
+ $tohash .= $min_username;
+ }
+ }
+ $tohash .= "1";
+ return md5($tohash);
+}
+
+/* cree les parametres de l'URL de retour avec les champs demandes */
+function gpex_make_params($chlg, $privkey, $datafields) {
+ global $globals;
+ $params = "&auth=".gpex_make_auth($chlg, $privkey, $datafields);
+ $fieldarr = split(",",$datafields);
+ while (list(,$val) = each($fieldarr)) {
+ if (isset($_SESSION[$val])) {
+ $params .= "&$val=".$_SESSION[$val];
+ } else if ($val == 'username') {
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", Session::getInt('uid'));
+ $min_username = $res->fetchOneCell();
+ $params .= "&$val=".$min_username;
+ }
+ }
+ return $params;
+}
+
+/* on parcourt les entrees de groupes_auth */
+$res = $globals->xdb->iterRow('select privkey,name,datafields from groupesx_auth');
+
+while (list($privkey,$name,$datafields) = $res->next()) {
+ if (md5($gpex_challenge.$privkey) == $gpex_pass) {
+ $returl = $gpex_url.gpex_make_params($gpex_challenge,$privkey,$datafields);
+ header("Location:$returl");
+ exit(0);
+ }
+}
+
+/* si on n'a pas trouvé, on renvoit sur x.org */
+header("Location:https://www.polytechnique.org/");
+exit(0);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('index.tpl',AUTH_COOKIE);
+
+//adresse de redirection par defaut
+if (isset($_REQUEST['dest'])) $redirect=$_REQUEST['dest'];
+else $redirect="/";
+
+header("Location: ".$redirect);
+?>
--- /dev/null
+<?php
+/********************************************************************************
+* index.php : main page (newsgroups list)
+* -----------
+*
+* This file is part of the banana distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('banana/index.tpl', AUTH_COOKIE);
+$page->addCssLink('banana/css/style.css');
+require_once('banana.inc.php');
+
+$res = PlatalBanana::run();
+$page->assign_by_ref('banana', $banana);
+$page->assign('banana_res', $res);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('banana/profile.tpl', AUTH_MDP);
+
+if (!(Post::has('action') && Post::has('banananame') && Post::has('bananasig') && Post::has('bananadisplay')
+ && Post::has('bananamail') && Post::has('bananaupdate') && Post::get('action')=="OK" ))
+{
+ $req = $globals->xdb->query("
+ SELECT nom,mail,sig,if(FIND_IN_SET('threads',flags),'1','0'),
+ IF(FIND_IN_SET('automaj',flags),'1','0')
+ FROM forums.profils
+ WHERE uid = {?}", Session::getInt('uid'));
+ if (!(list($nom,$mail,$sig,$disp,$maj) = $req->fetchOneRow())) {
+ $nom = Session::get('prenom').' '.Session::get('nom');
+ $mail = Session::get('forlife').'@'.$globals->mail->domain;
+ $sig = $nom.' ('.Session::getInt('promo').')';
+ $disp = 0;
+ $maj = 0;
+ }
+ $page->assign('nom' , $nom);
+ $page->assign('mail', $mail);
+ $page->assign('sig' , $sig);
+ $page->assign('disp', $disp);
+ $page->assign('maj' , $maj);
+} else {
+ $globals->xdb->execute(
+ 'REPLACE INTO forums.profils (uid,sig,mail,nom,flags)
+ VALUES ({?},{?},{?},{?},{?})',
+ Session::getInt('uid'), Post::get('bananasig'), Post::get('bananamail'), Post::get('banananame'),
+ (Post::getBool('bananadisplay') ? 'threads,' : '') . (Post::getBool('bananaupdate') ? 'automaj' : '')
+ );
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+
+header('Content-Type: image/jpeg');
+passthru('echo '.escapeshellarg(base64_decode($_REQUEST['face'])).'|uncompface -X |convert xbm:- jpg:-');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$data = file_get_contents("/etc/ssl/xorgCA/cacert.pem","r");
+Header("Content-Type: application/x-x509-ca-cert");
+Header("Content-Length: ".strlen($data));
+echo $data;
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('carnet/index.tpl', AUTH_COOKIE);
+
+if (Session::has('core_rss_hash')) {
+ $page->assign('xorg_rss', Array("title" => "Polytechnique.org :: Carnet", "href" => "/carnet/rss.php/".Session::get('forlife')."/".Session::get('core_rss_hash').".xml"));
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("carnet/mescontacts.tpl",AUTH_COOKIE);
+require_once("applis.func.inc.php");
+
+$uid = Session::getInt('uid');
+$user = Env::get('user');
+
+switch (Env::get('action')) {
+ case 'retirer':
+ if (preg_match('/^\d+$/', $user)) {
+ if ($globals->xdb->execute('DELETE FROM contacts WHERE uid = {?} AND contact = {?}', $uid, $user))
+ {
+ $page->trig("Contact retiré !");
+ }
+ } else {
+ if ($globals->xdb->execute(
+ 'DELETE FROM contacts
+ USING contacts AS c
+ INNER JOIN aliases AS a ON (c.contact=a.id and a.type!="homonyme")
+ WHERE c.uid = {?} AND a.alias={?}', $uid, $user))
+ {
+ $page->trig("Contact retiré !");
+ }
+ }
+ break;
+
+ case 'ajouter':
+ require_once('user.func.inc.php');
+ if (($login = get_user_login($user)) !== false) {
+ if ($globals->xdb->execute(
+ 'INSERT INTO contacts (uid, contact)
+ SELECT {?}, id
+ FROM aliases
+ WHERE alias = {?}', $uid, $login))
+ {
+ $page->trig('Contact ajouté !');
+ } else {
+ $page->trig('Contact déjà dans la liste !');
+ }
+ }
+}
+
+if(Get::get('trombi')) {
+ require_once('trombi.inc.php');
+ function getList($offset,$limit) {
+ global $globals;
+ $uid = Session::getInt('uid');
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM contacts WHERE uid = {?}", $uid);
+ $total = $res->fetchOneCell();
+
+ $order = Get::get('order');
+ $orders = Array(
+ 'nom' => 'nom DESC, u.prenom, u.promo',
+ 'promo' => 'promo DESC, nom, u.prenom',
+ 'last' => 'u.date DESC, nom, u.prenom, promo');
+ if ($order != 'promo' && $order != 'last')
+ $order = 'nom';
+ $order = $orders[$order];
+ if (Get::get('inv') == '')
+ $order = str_replace(" DESC,", ",", $order);
+
+ $res = $globals->xdb->query("
+ SELECT u.prenom, IF(u.nom_usage='',u.nom,u.nom_usage) AS nom, a.alias AS forlife, u.promo
+ FROM contacts AS c
+ INNER JOIN auth_user_md5 AS u ON (u.user_id = c.contact)
+ INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie')
+ WHERE c.uid = {?}
+ ORDER BY $order
+ LIMIT {?}, {?}", $uid, $offset*$limit, $limit);
+ $list = $res->fetchAllAssoc();
+
+ return Array($total, $list);
+ }
+
+ $trombi = new Trombi('getList');
+ $trombi->setNbRows(4);
+ $page->assign_by_ref('trombi',$trombi);
+
+ $order = Get::get('order');
+ if ($order != 'promo' && $order != 'last')
+ $order = 'nom';
+ $page->assign('order', $order);
+ $page->assign('inv', Get::get('inv'));
+} else {
+
+ $order = Get::get('order');
+ $orders = Array(
+ 'nom' => 'sortkey DESC, a.prenom, a.promo',
+ 'promo' => 'promo DESC, sortkey, a.prenom',
+ 'last' => 'a.date DESC, sortkey, a.prenom, promo');
+ if ($order != 'promo' && $order != 'last')
+ $order = 'nom';
+ $page->assign('order', $order);
+ $page->assign('inv', Get::get('inv'));
+ $order = $orders[$order];
+ if (Get::get('inv') == '')
+ $order = str_replace(" DESC,", ",", $order);
+
+ $sql = "SELECT contact AS id,
+ a.*, l.alias AS forlife,
+ 1 AS inscrit,
+ a.perms != 'pending' AS wasinscrit,
+ a.deces != 0 AS dcd, a.deces, a.matricule_ax, FIND_IN_SET('femme', a.flags) AS sexe,
+ e.entreprise, es.label AS secteur, ef.fonction_fr AS fonction,
+ IF(n.nat='',n.pays,n.nat) AS nat, n.a2 AS iso3166,
+ ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type,
+ ad1.text AS app1text, ad1.url AS app1url, ai1.type AS app1type,
+ adr.city, gp.a2, gp.pays AS countrytxt, gr.name AS region,
+ IF(a.nom_usage<>'',a.nom_usage,a.nom) AS sortkey
+ FROM contacts AS c
+ INNER JOIN auth_user_md5 AS a ON (a.user_id = c.contact)
+ INNER JOIN aliases AS l ON (a.user_id = l.id AND l.type='a_vie')
+ LEFT JOIN entreprises AS e ON (e.entrid = 0 AND e.uid = a.user_id)
+ LEFT JOIN emploi_secteur AS es ON (e.secteur = es.id)
+ LEFT JOIN fonctions_def AS ef ON (e.fonction = ef.id)
+ LEFT JOIN geoloc_pays AS n ON (a.nationalite = n.a2)
+ LEFT JOIN applis_ins AS ai0 ON (a.user_id = ai0.uid AND ai0.ordre = 0)
+ LEFT JOIN applis_def AS ad0 ON (ad0.id = ai0.aid)
+ LEFT JOIN applis_ins AS ai1 ON (a.user_id = ai1.uid AND ai1.ordre = 1)
+ LEFT JOIN applis_def AS ad1 ON (ad1.id = ai1.aid)
+ LEFT JOIN adresses AS adr ON (a.user_id = adr.uid AND FIND_IN_SET('active', adr.statut))
+ 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)
+ WHERE c.uid = $uid
+ ORDER BY ".$order;
+
+ $page->assign_by_ref('citer', $globals->xdb->iterator($sql));
+}
+
+$page->run();
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('index.tpl', AUTH_COOKIE);
+require_once('contacts.pdf.inc.php');
+require_once('user.func.inc.php');
+
+$sql = "SELECT a.alias
+ FROM aliases AS a
+ INNER JOIN auth_user_md5 AS u ON ( a.id = u.user_id )
+ INNER JOIN contacts AS c ON ( a.id = c.contact )
+ WHERE c.uid = {?} AND a.type='a_vie'";
+if (Get::get('order') == "promo") {
+ $sql .= " ORDER BY u.promo, u.nom, u.prenom";
+} else {
+ $sql .= " ORDER BY u.nom, u.prenom, u.promo";
+}
+
+$citer = $globals->xdb->iterRow($sql, Session::getInt('uid'));
+$pdf = new ContactsPDF();
+
+while (list($alias) = $citer->next()) {
+ $user = get_user_details($alias);
+ $pdf->addContact($user, Env::has('photo'));
+}
+$pdf->Output();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('carnet/notifs.tpl', AUTH_COOKIE);
+require_once('notifs.inc.php');
+
+$watch = new Watch(Session::getInt('uid'));
+
+$res = $globals->xdb->query("SELECT promo_sortie FROM auth_user_md5 WHERE user_id = {?}", Session::getInt('uid', -1));
+$promo_sortie = $res->fetchOneCell();
+$page->assign('promo_sortie', $promo_sortie);
+
+if(Env::has('promo')) {
+ if(preg_match('!^ *(\d{4}) *$!', Env::get('promo'), $matches)) {
+ $p = intval($matches[1]);
+ if($p<1900 || $p>2100) {
+ $page->trig("la promo entrée est invalide");
+ } else {
+ if (Env::has('add_promo')) $watch->_promos->add($p);
+ if (Env::has('del_promo')) $watch->_promos->del($p);
+ }
+ } elseif (preg_match('!^ *(\d{4}) *- *(\d{4}) *$!', Env::get('promo'), $matches)) {
+ $p1 = intval($matches[1]);
+ $p2 = intval($matches[2]);
+ if($p1<1900 || $p1>2100) {
+ $page->trig('la première promo de la plage entrée est invalide');
+ } elseif($p2<1900 || $p2>2100) {
+ $page->trig('la seconde promo de la plage entrée est invalide');
+ } else {
+ if (Env::has('add_promo')) $watch->_promos->addRange($p1,$p2);
+ if (Env::has('del_promo')) $watch->_promos->delRange($p1,$p2);
+ }
+ } else {
+ $page->trig("La promo (ou la plage de promo) entrée est dans un format incorrect.");
+ }
+}
+
+if (Env::has('del_nonins')) $watch->_nonins->del(Env::get('del_nonins'));
+if (Env::has('add_nonins')) $watch->_nonins->add(Env::get('add_nonins'));
+if (Env::has('subs')) $watch->_subs->update('sub');
+if (Env::has('flags_contacts')) {
+ $watch->watch_contacts = Env::getBool('contacts');
+ $watch->saveFlags();
+}
+if (Env::has('flags_mail')) {
+ $watch->watch_mail = Env::getBool('mail');
+ $watch->saveFlags();
+}
+
+$page->assign_by_ref('watch', $watch);
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('carnet/panel.tpl', AUTH_COOKIE);
+require_once('notifs.inc.php');
+
+if(Get::has('read')) {
+ $_SESSION['watch_last'] = Get::get('read');
+ header("Location: panel.php");
+}
+
+$page->assign('now',date('YmdHis'));
+$notifs = new Notifs(Session::getInt('uid'), true);
+
+$page->assign('notifs', $notifs);
+$page->assign('today', date('Y-m-d'));
+
+if (Session::has('core_rss_hash')) {
+ $page->assign('xorg_rss', Array("title" => "Polytechnique.org :: Carnet", "href" => "/carnet/rss.php/".Session::get('forlife')."/".Session::get('core_rss_hash').".xml"));
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+require_once('rss.inc.php');
+require_once('notifs.inc.php');
+
+$uid = init_rss('carnet/rss.tpl');
+$notifs = new Notifs($uid, false);
+$page->assign('notifs', $notifs);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('index.tpl', AUTH_COOKIE);
+$page->clear_compiled_tpl();
+
+header("Location: " . (empty($_SERVER['HTTP_REFERER']) ? 'index.php' : $_SERVER['HTTP_REFERER']));
+
+?>
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+body {
+ font-family: "Arial", sans-serif;
+ color: #000000;
+ background: #ffffff;
+}
+
+a:link, a:visited, a:active, a:hover { color: #003399; background: none; }
+img { vertical-align: middle; }
+a img { border: 0px; }
+td { vertical-align: top; }
+li { padding-left: 3px; padding-right: 3px; text-align: justify; }
+hr { width: 90%; text-align: center }
+
+fieldset {
+ border: 1px #336699 solid;
+ background: #eeeeee;
+ color: inherit;
+
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+legend {
+ border: 1px #336699 solid;
+ background: #f4d09c;
+ color: inherit;
+
+ padding-left: 4px;
+ padding-right: 4px;
+}
+
+.center { text-align: center; }
+.right { text-align: right; }
+.middle { vertical-align: middle; }
+.smaller { font-size: smaller; font-style: italic; }
+.spacer { clear: both; }
+
+.float2 { float: left; width: 49%; }
+.float3 { float: left; width: 33%; }
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+p {
+ margin-bottom: 0.5em;
+ text-align: justify;
+}
+
+.erreur {
+ font-weight: bold;
+ color: #ff0000;
+ background: inherit;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+.erreur a:link, .erreur a:visited, .erreur a:active, .erreur a:hover {
+ color: #ff3333;
+ background: inherit;
+}
+
+h1 {
+ color: #555555;
+ background: url('/images/sk_default_titre.gif');
+ background-repeat: no-repeat;
+
+ text-indent: 0.2em;
+ text-align: left;
+ font-size: 120%;
+ font-family: "helvetica", sans-serif;
+ font-weight: bolder;
+
+ margin: 1em 0em 1em 0em;
+ padding: 0em 0em 0em 0.5em;
+}
+
+h2 {
+ padding: 0.5em 0em 0em 0em;
+ margin: 0em;
+ font-size: 100%;
+ font-weight: bold;
+}
+
+h3 {
+ margin: 0em;
+ font-weight: bold;
+ padding: 0.25em;
+ font-size: 100%;
+}
+
+p.explication, div.explication {
+ font-style: italic;
+ padding: 0em 1ex 1ex 1ex;
+}
+
+li.spaced {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ text-align: justify;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.bicol {
+ color: inherit;
+ background: #eeeeee;
+ border: 1px solid #336699;
+ border-collapse: collapse;
+ width: 98%;
+ margin-left: 1%;
+}
+table.tinybicol {
+ color: inherit;
+ background: #eeeeee;
+ border: 1px solid #336699;
+ border-collapse: collapse;
+ width: 70%;
+ margin-left: 15%;
+}
+
+table.tinybicol tr.impair, table.bicol tr.impair {}
+table.tinybicol tr.pair, table.bicol tr.pair {
+ color: inherit;
+ background: #eeeed0;
+}
+
+table.tinybicol th, table.bicol th {
+ color: #ffffff;
+ background: #336699;
+ font-weight: bold;
+ text-align: center;
+ vertical-align: middle;
+}
+table.tinybicol td, table.bicol td {
+ color: #000000;
+ background: inherit;
+}
+
+table.tinybicol td, table.bicol td { padding-left: 4px; padding-right: 4px; }
+
+td.half { width: 50%; padding: 4px; }
+td.titre {
+ color: #000000;
+ background: inherit;
+ font-weight: bold;
+}
+td.action {
+ white-space: nowrap;
+ text-align: right;
+ font-weight: bold;
+ vertical-align: middle;
+}
+td.action a { padding: 0px 2px 0px 2px; }
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+ border-bottom: 1px solid #003399;
+ border-top: 1px solid #003399;
+ width: 98%;
+ margin-left: 1%;
+}
+#skin td {
+ border-bottom: 2px solid #003399;
+ border-top: 1px solid #003499;
+ vertical-align: middle;
+}
+#skin td.skigauche {
+ background: #eeeeee;
+ color: inherit;
+ vertical-align: middle;
+}
+#skin td.skimilieu {
+ padding-left: 1em;
+ width: 100%;
+}
+#skin td.skidroite { padding: 0; }
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list {
+ width: 98%;
+ margin-left: 1%;
+}
+
+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;
+ width: 35%;
+ float: left;
+}
+
+div.contact div.appli {
+ float: left;
+}
+
+div.contact div.bits {
+ 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%; }
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+table.flags {
+ margin: 1em 0em 0em 0em;
+}
+table.flags input { margin: 0px 2px; padding: 0px; }
+
+table.flags td.texte {
+ font-size: smaller;
+ font-weight: bold;
+ padding: 3px;
+}
+table.flags td.vert {
+ background: green;
+ padding: 3px;
+ text-align: center;
+}
+table.flags td.orange {
+ background: #ff9900;
+ padding: 3px;
+ text-align: center;
+}
+table.flags td.rouge {
+ background: red;
+ padding: 3px;
+ text-align: center;
+}
+
+table.cadre_a_onglet{
+ border-width: 0;
+ padding : 0;
+ margin: 0;
+}
+
+div.conteneur_tab {
+ border-width : 1px 2px 2px 1px;
+ border-style : solid;
+ border-color : #999;
+ padding : 4px 0px 0px 4px;
+ background : #eceade;
+}
+
+#onglet {
+ display : block;
+ margin : 0;
+ padding : 0;
+ /*height : 50px;*/
+}
+
+#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-family : Arial,Helvetica,sans-serif;*/
+ 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
+ [ cas de la fiche ]
+*******************************************************************************/
+
+#fiche {
+ width: 760px;
+ font-size: 100%;
+ vertical-align: top;
+
+ border: 1px solid #369;
+}
+
+#fiche em { color: purple; }
+
+#fiche h2 {
+ color: #369;
+ padding: 0px 4px;
+ margin: 0.5em 0em;
+ font-weight: bold;
+ border-bottom: 1px dotted #369;
+}
+
+#fiche_identite {
+ padding: 5px;
+ width: 600px;
+}
+
+#photo { padding-left: 1em; }
+
+#fiche_identite div.civilite {
+ text-align: center;
+ font-weight: bold;
+ width: 80%;
+ float: left;
+}
+
+#fiche_identite div.maj {
+ float: left;
+ width: 20%;
+ font-size: 75%;
+ text-align: right;
+ clear: right;
+}
+
+#fiche_identite div.contact {
+ clear: both;
+ margin: 1em;
+ padding: 1ex;
+ background: #fff;
+ border: 1px dotted #69c;
+}
+#fiche_identite div.email {
+ clear: left;
+ float: left;
+}
+#fiche_identite div.mob {
+ float: right;
+ clear: right;
+ text-align: right;
+}
+
+#fiche_identite div.formation {
+ margin: 0em 1em;
+ clear: both;
+}
+
+div.adresse {
+ float: left;
+ width: 46%;
+ padding: 0px;
+ margin: 0px 1% 1ex 1%;
+}
+
+/* only for fiche_referent.php*/
+
+#fiche_referent{
+ padding: 10px;
+ width: 100%;
+}
+
+#fiche_referent div.rubrique_referent{
+ float: left;
+ width: 31%;
+ padding: 0px;
+ margin: 0px 1% 1ex 1%;
+
+}
+
+#fiche_referent em{color: purple;}
+#fiche_referent ul { margin: 0px; padding: 0px 1em; }
+#fiche_referent li { font-weight: bold; margin: 0px; padding: 0px; text-align: left; }
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#dev {
+ width: 100%;
+ text-align: center;
+ padding: 1px;
+
+ color: #003399;
+ background: #e0ffff;
+
+ font-family: 'Bauhaus Md BT','Bitstream Vera',sans-serif;
+ font-size: 10pt;
+ font-weight: bold;
+}
+
+#dev a { text-decoration: underline; }
+#dev a:hover { color: #003399; background: #c0e0e0; }
+
+#db-trace div.hide { display: none; }
+#db-trace:hover div.hide { display: block }
+
+#suid {
+ color: red;
+ background: #ffc0cb;
+ width: 100%;
+ font-weight: bold;
+}
+#suid td { padding: 2px; }
+#suid a { color: red; }
+
+#body {
+ width: 740px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#body-logo {
+ width: 140px;
+ border-right: 1px solid gray;
+ text-align: center;
+ font-family: "MS Sans Serif", sans-serif;
+ padding-top: 4px;
+ border-bottom: 1px solid gray;
+}
+
+#body-top {
+ border-bottom: 1px solid gray;
+ text-align: center;
+ font-size: 95%;
+ padding: 4px;
+ padding-bottom: 16px;
+ font-family: "Arial", sans-serif;
+}
+
+#body-top table { width: 100%; padding: 4px; }
+#body-top .date-heure { text-align: left; }
+#body-top .inscrits { text-align: right; }
+
+#body-bottom {
+ border-top: 1px solid gray;
+ text-align: center;
+ padding: 4px;
+ font-size: 75%;
+ font-family: "MS Sans Serif", sans-serif;
+}
+
+#body-menu {
+ width: 140px;
+ border-right: 1px solid gray;
+ text-align: center;
+ font-family: "MS Sans Serif", sans-serif;
+ font-size: 75%;
+ font-weight: bold;
+ white-space: nowrap;
+}
+
+#body-menu .menu_item {
+ padding-left: 4px;
+ padding: 2px;
+ text-align: left;
+}
+
+#body-menu .menu_title {
+ color: gray;
+ background: #eeeeee;
+ border-top: 1px solid gray;
+ border-bottom: 1px solid gray;
+ padding: 1px;
+ margin-top: 4px;
+ text-align: center;
+}
+
+#content {
+ width: 600px;
+ padding: 4px 0px 4px 16px;
+ font-size: 95%;
+ vertical-align: top;
+}
+
+div#content {
+ padding: 1em;
+ margin: 0em;
+}
+
+#content input {
+ font-size: 95%;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+a:link, a:visited, a:active, a:hover {
+ color: #0f2c57;
+ background: inherit;
+}
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+fieldset {
+ background-color: #eeeeff;
+ border: 1px #2f006f solid;
+ color: inherit;
+}
+
+legend {
+ background-color: #3f009f;
+ border: none;
+ color: #ffffff;
+}
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 a:link, h1 a:visited, h1 a:active, h1 a:hover {
+ color: #3f7ce7;
+ background: inherit;
+}
+
+h1 {
+ color: #eeeeee;
+ background-color: #000000;
+ background-image: url( "/images/sk_espace_titre.jpg");
+ background-repeat: no-repeat;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.tinybicol, table.bicol {
+ background: #eeeeff;
+ border: 1px solid #2f006f;
+ border-collapse: collapse;
+}
+
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.pair, table.bicol tr.pair { background: #ddddff; }
+table.tinybicol th, table.bicol th {
+ background-color: #2f006f;
+}
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #ccddff;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #ffffff;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-top: none;
+ border-bottom: none;
+ border-right: none;
+ border-left: none;
+}
+
+#body-top {
+ border-bottom: 2px solid #777777;
+}
+
+#body-bottom {
+ border-top: 1px solid #777777;
+}
+
+#body-menu {
+ border-right: none;
+}
+
+#body-menu .menu_title {
+ color : #ffffff;
+ background-color: #dddddd;
+ background-image: url("/images/sk_espace_menu.jpg");
+/*border-top: 1px solid #003399;*/
+ border-bottom: none;
+}
+
+#body-menu .menu_item {
+ border-right: none;
+/* padding-left: 0px;
+ text-align: left;*/
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+fieldset {
+ background-color: #eeeeee;
+}
+
+legend {
+ background-color: #dddddd;
+}
+
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 {
+ color: #000000;
+ background-color: #dddddd;
+ background-image: url( "/images/sk_humlinux_titre.jpg");
+ background-repeat: no-repeat;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #000000;
+ background: #eeeeee;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #dddddd;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#content {
+ background-image: url("/images/sk_humlinux_background.jpg");
+ background-repeat: repeat-y;
+ background-position: top;
+}
+
+#body-logo {
+ border-top: none;
+ border-bottom: none;
+ border-right: none;
+ border-left: none;
+}
+
+#body-top {
+ border-bottom: 2px solid #777777;
+}
+
+#body-bottom {
+ border-top: 1px solid #777777;
+}
+
+#body-menu {
+ border-right: none;
+}
+
+#body-menu .menu_title {
+ color : #ffffff;
+ background-color: #dddddd;
+ background-image: url("/images/sk_humlinux_menu.jpg");
+ border-top: none;
+ border-bottom: none;
+}
+
+#body-menu .menu_item {
+ border-right: none;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+fieldset {
+ background-color: #eeeeee;
+ border: 1px #777777 solid;
+ color: inherit;
+}
+
+legend {
+ background-color: #d0d0ff;
+ border: 1px #777777 solid;
+ color: inherit;
+}
+
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 a:link, h1 a:visited, h1 a:active {
+ color: #999999;
+ background: inherit;
+}
+
+h1 a:hover {
+ color: #cccccc;
+}
+
+h1 {
+ color: #eeeeee;
+ background-color: #444444;
+ background-image: url( "/images/sk_linux_titre.jpg");
+ background-repeat: repeat-x;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ background-color: #d0d0ff;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-bottom: none;
+ border-right: none;
+}
+
+#body-top {
+ border-bottom: 2px solid #777777;
+}
+
+#body-menu {
+ border-right: none;
+}
+
+#body-menu .menu_title {
+ color: #000000;
+ background-image: url("/images/sk_linux_menu.jpg");
+ border-top: none;
+ border-bottom: none;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+table.bicol+table.bicol { margin: 1ex; }
+table.bicol td.right { white-space: nowrap; }
+table.bicol td.subj { white-space: nowrap; }
+table.bicol tr:hover td { background: yellow; }
+table.bicol tr.pair:hover td { background: inherit; }
+table.bicol tr.impair:hover td { background: inherit; }
+table.bicol img { margin: 1ex; }
+td.subj a { overflow: hidden; display: block; }
+td.subj strong { overflow: hidden; display: block; }
+
+.quote {
+ font-style: italic;
+ margin: 0em 0.3em;
+ padding-left: 0.3em;
+ color: green;
+ border-left: green solid 2px;
+}
+.quote .quote {
+ color: #95b;
+ border-left: #95b solid 2px;
+}
+.quote .quote .quote {
+ color: #888;
+ border-left: #888 solid 2px;
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+body { color: #000000; }
+
+a:link { color: #3252A7; text-decoration: none; }
+a:visited { color: #3252A7; text-decoration: none; }
+a:active { color: #3252A7; text-decoration: underline; }
+a:hover { color: #0F2C57; text-decoration: none; }
+
+fieldset {
+ background-color: #fdfde9;
+ border: 1px #660099 solid;
+ color: inherit;
+}
+
+legend {
+ background-color: #ffff99;
+ border: none;
+ color: #660099;
+}
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 {
+ color: #660099;
+ background: #FFFF99;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.tinybicol, table.bicol {
+ background: #FDFDE9;
+ border: 1px solid #FFFF99;
+ border-collapse: collapse;
+}
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.impair , table.bicol tr.impair { background: #FDFDE9; }
+table.tinybicol tr.pair, table.bicol tr.pair { background: #F8EBFF; }
+table.tinybicol th, table.bicol th {
+ background: #FFFF99;
+ color: #C866FA;
+}
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+ background: #99b9d0;
+ border-top: 1px solid #305070;
+ border-bottom: none;
+}
+
+#skin td {
+ border-top: none;
+ border-bottom: 1px solid #305070;
+ vertical-align: middle;
+}
+
+#skin td.skigauche {
+ background: #99b9d0;
+}
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #80a0c0;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #99b9d0;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ 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 ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-top: 1px solid #660099;
+ border-right: 1px solid #660099;
+ border-left: 1px solid #660099;
+ border-bottom: none;
+ padding-top: 35px;
+}
+
+#body-top {
+ border-bottom: 1px solid #660099;
+}
+
+#body-bottom {
+ border-top: 1px solid #660099;
+}
+
+#body-menu {
+ border-left: 1px solid #660099;
+ border-right: 1px solid #660099;
+}
+
+#body-menu .menu_title {
+ color : #660099;
+ background: #FFFF99;
+ border-top: 1px solid #660099;
+ border-bottom: 1px solid #660099;
+}
+
+#body-menu .menu_item {
+ padding-left: 4px;
+ text-align: left;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+a:link { color: #800080; }
+a:visited { color: #800080; }
+a:active { color: #800080; }
+a:hover { color: #800080;}
+
+fieldset {
+ background-color: #f5eeff;
+ border: 1px #800080 solid;
+ color: inherit;
+}
+
+legend {
+ background-color: #ecd0ff;
+ border: 1px #800080 solid;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 a:link, h1 a:visited, h1 a:active {
+ color: #e000e0;
+ background: inherit;
+}
+
+h1 a:hover {
+ color: #ff00ff;
+ background: inherit;
+}
+
+h1 {
+ color: #ff0000;
+ background-color: #800080;
+ background-image: url( "/images/sk_nbviolet_titre.jpg");
+ background-repeat: repeat-x;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.tinybicol, table.bicol {
+ background: #ecd0ff;
+ border: 1px solid #800080;
+ border-collapse: collapse;
+}
+
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.impair, table.bicol tr.impair { background: #ecd0ff; }
+table.tinybicol tr.pair, table.bicol tr.pair { background: #efddff; }
+table.tinybicol th, table.bicol th {
+ background-color: #800080;
+}
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+ border-top: 1px solid #000000;
+ border-bottom: 1px solid #800080;
+}
+
+#skin td {
+ border-top: 1px solid #800080;
+ border-bottom: 1px solid #800080;
+}
+
+#skin td.skigauche {
+ background-color: #efddff;
+}
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #e0c0ff;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #efddff;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+div.conteneur_tab {
+ background: #efddff;
+ border-color: #800080;
+}
+
+#onglet li {
+ background: #ecd0ff;
+ border-color: #800080;
+}
+
+#onglet li.actif {
+ background: #efddff;
+}
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-bottom: none;
+ border-right: none;
+ border-left: none;
+ border-top: none;
+}
+
+#body-top {
+ border-bottom: 2px solid #cccccc;
+}
+
+#body-bottom {
+ border-top: 1px solid #003399;
+}
+
+#body-menu {
+ border-right: none;
+}
+
+#body-menu .menu_title {
+ color : #eeeeee;
+ background-color: #404040;
+ background-image: url("/images/sk_nbviolet_menu.jpg");
+ border-top: none;
+ border-bottom: none;
+}
+
+#body-menu .menu_item {
+ padding-left: 0px;
+ text-align: left;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+a:link, a:visited, a:active, a:hover {
+ color: #0f2c57;
+ background: inherit;
+}
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+#body {
+ background-image: url("/images/sk_newxorg_background.jpg");
+ background-position: top right;
+ background-repeat: repeat-y;
+}
+
+legend {
+ background-color: #ccddff;
+}
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 {
+ color: #ff9900;
+ background-color: #458bb6;
+ background-image: url( "/images/sk_newxorg_titre.jpg");
+ background-repeat: repeat-x;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #ccddff;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #ffffff;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-top: none;
+ border-bottom: none;
+ border-right: none;
+ border-left: none;
+}
+
+#body-top {
+ border-bottom: 2px solid #777777;
+}
+
+#body-bottom {
+ border-top: 1px solid #777777;
+}
+
+#body-menu {
+ border-right: 1px solid #ffffff;
+}
+
+#body-menu .menu_title {
+ color : #ff6600;
+ background-color: #ffffff;
+ background-image: url("/images/sk_newxorg_menu.jpg");
+ border-top: 1px solid #ffffff;
+ border-bottom: 1px solid #ffffff;
+}
+
+#body-menu .menu_item {
+ border-right: none;
+/* padding-left: 0px;
+ text-align: left;*/
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+div.nl {
+ margin: auto;
+ font-family: "Georgia","times new roman",serif;
+ width: 64ex;
+ text-align: justify;
+ font-size: 10pt;
+}
+
+div.nl a { text-decoration: none; }
+div.nl a:hover { text-decoration: underline; }
+
+div.nl div.title {
+ margin: 2ex auto 2ex auto;
+ padding: 1ex;
+ width: 90%;
+ border: 1px black solid;
+ font-size: 140%;
+ text-align: center;
+ color: inherit;
+ color: blue;
+ background: #eeeeee;
+ border: 2px #cccccc solid;
+}
+
+div.nl div.lnk {
+ padding: 0ex 2ex 0ex 2ex;
+ margin: 2ex 0ex 2ex 0ex;
+}
+
+div.nl div.lnk a { display: block; }
+
+div.nl h1 {
+ margin: 6ex 0ex 4ex 0ex;
+ padding: 2px 4ex 2px 0ex;
+ width: 60ex;
+ font-size: 100%;
+}
+
+div.nl h1 span {
+ text-decoration: none;
+ font-size: 140%;
+ padding: 2px 1ex 2px 1ex;
+}
+
+div.nl h2 {
+ width: 100%;
+ margin: 0ex 1ex 0ex 1ex;
+ padding: 2px 0px 2px 0px;
+ font-weight: bold;
+ font-style: italic;
+ font-size: 95%;
+}
+
+div.nl h2 span {
+ color: blue;
+ background: #eeeeee;
+ text-decoration: none;
+ padding: 2px 4px 2px 4px;
+}
+
+div.nl div.art {
+ padding: 2ex;
+ margin: 0ex 1ex 2ex 1ex;
+ width: 58ex;
+ border-top: 1px #cccccc solid;
+}
+
+div.nl div.app {
+ padding: 2ex 3ex 0ex 3ex;
+ width: 100%;
+ margin: 0ex;
+ text-align: left;
+ font-size: 95%;
+}
+
+div.nl div.intro {
+ padding: 2ex;
+}
+
+div.nl div.foot {
+ border-top: 1px #808080 dashed;
+ font-size: 95%;
+ padding: 1ex;
+ color: #808080;
+ background: inherit;
+ text-align: center;
+}
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+/*body {
+ background: #99afc1;
+ color: #000000;
+}*/
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 a:link, h1 a:active, h1 a:visited {
+ color: #70ff00;
+ background: inherit;
+}
+
+h1 a:hover {
+ color: #c0ff00;
+ background: inherit;
+}
+
+h1 {
+ color: #ffff00;
+ background-color: #0005c0;
+ background-image: url( "/images/sk_oldtimes_titre.jpg");
+ background-repeat: repeat-x;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+/*table.tinybicol, table.bicol {
+ background: #ccddff;
+ border: 1px solid #0067fe;
+ border-collapse: collapse;
+}
+
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.pair, table.bicol tr.pair { background: #ddffcc; }
+table.tinybicol th, table.bicol th {
+ background-color: #0067fe;
+}*/
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+/*div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #ccddff;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #ddffcc;
+ color: inherit;
+}*/
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-bottom: none;
+ border-right: 1px solid #305070;
+ border-left: none;
+ border-top: none;
+}
+
+#body-top {
+ border-bottom: 2px solid #777777;
+}
+
+#body-bottom {
+ border-top: 1px solid #003399;
+}
+
+#body-menu {
+ border-right: 1px solid #003399;
+}
+
+#body-menu .menu_title {
+ color : #000000;
+ background-color: #ffffff;
+ background-image: url("/images/sk_oldtimes_menu.jpg");
+ border-top: 1px solid #003399;
+ border-bottom: 1px solid #003399;
+}
+
+#body-menu .menu_item {
+ padding-left: 0px;
+ text-align: left;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+body {
+ background:#369;
+ color: #096;
+ font-family:"Trebuchet MS",Verdana,Geneva,Arial,Helvetica,sans-serif;
+ margin:2em 1%;
+ padding:0;
+ font-size: 9pt;
+}
+
+a:link, a:visited { color: #f60; background: transparent; }
+a:active, a:hover { color: #369; background: transparent; }
+
+img { vertical-align: middle; }
+a img { border: 0px; }
+td { vertical-align: top; }
+li { padding: 0em 1em; text-align: justify; }
+hr { width: 90%; margin: 1em 5%; border: 1px dotted #369; border-bottom: none; }
+
+fieldset {
+ border: 1px dotted #69c;
+ background: #fff;
+ color: inherit;
+
+ margin: 1em 0em;
+ padding: 1em;
+}
+
+legend {
+ border: 1px dotted #69c;
+ background: #d6e1ec;
+ color: inherit;
+
+ padding: 0em 1em;
+}
+
+.center { text-align: center; }
+.right { text-align: right; }
+.middle { vertical-align: middle; }
+.smaller { font-size: smaller; font-style: italic; }
+.spacer { clear: both; }
+
+.float2 { float: left; width: 48%; margin: 2px; }
+.float3 { float: left; width: 33%; }
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+p {
+ padding: 0em 1em;
+ margin-bottom: 0.5em;
+ text-align: justify;
+}
+
+.erreur {
+ font-weight: bold;
+ color: #ff0000;
+ background: inherit;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+.erreur a:link, .erreur a:visited, .erreur a:active, .erreur a:hover {
+ color: #ff3333;
+ background: inherit;
+}
+
+h1 {
+ color: #369;
+ font-size: 140%;
+ background: #f5f8fc;
+ margin: 0em;
+ border-bottom: 2px solid #369;
+ padding: 4px;
+ margin: 1em 0em;
+}
+
+h2 {
+ color: #369;
+ padding: 0px 4px;
+ margin: 0.5em 0em;
+ font-size: 110%;
+ font-weight: bold;
+ border-bottom: 1px dotted #369;
+}
+
+h3 {
+ margin: 0em;
+ font-weight: bold;
+ padding: 0.5em 0em;
+ font-size: 100%;
+}
+
+
+p.explication, div.explication {
+ font-style: italic;
+ padding: 0em 1ex 1ex 1ex;
+}
+
+li.spaced {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ text-align: justify;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.bicol {
+ border-collapse: collapse;
+ color: inherit;
+ background: #fff;
+ border: 1px solid #a2c2e1;
+ width: 98%;
+ margin-left: 1%;
+}
+table.tinybicol {
+ border-collapse: collapse;
+ color: inherit;
+ background: #fff;
+ border: 1px solid #a2c2e1;
+ width: 70%;
+ margin-left: 15%;
+}
+
+table.tinybicol tr.impair, table.bicol tr.impair {}
+table.tinybicol tr.pair, table.bicol tr.pair {
+ color: inherit;
+ background: #eee;
+}
+
+table.tinybicol th, table.bicol th {
+ color: #369;
+ background: #d6e1ec;
+ font-weight: bold;
+ text-align: center;
+ vertical-align: middle;
+ padding: 0px 4px;
+}
+table.tinybicol td, table.bicol td {
+ color: #000000;
+ background: inherit;
+ padding: 0px 4px;
+}
+
+td.half { width: 50%; padding: 4px; }
+
+td.titre {
+ color: #000000;
+ background: inherit;
+ font-weight: bold;
+}
+td.action {
+ white-space: nowrap;
+ text-align: right;
+ font-weight: bold;
+ vertical-align: middle;
+}
+td.action a { padding: 0px 2px; }
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+ border-bottom: 1px solid #a2c2e1;
+ border-top: 1px solid #a2c2e1;
+ width: 98%;
+ margin-left: 1%;
+}
+#skin td {
+ border-top: 1px solid #a2c2e1;
+ border-bottom: 1px solid #a2c2e1;
+ vertical-align: middle;
+}
+#skin td.skigauche {
+ background: #d6e1ec;
+ color: inherit;
+ vertical-align: middle;
+}
+#skin td.skimilieu {
+ padding-left: 1em;
+ width: 100%;
+}
+#skin td.skidroite { padding: 0; }
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list {
+ width: 98%;
+ margin-left: 1%;
+ border: 1px dotted #a2c2e1;
+}
+
+div.contact-list div.contact {
+ width: 100%;
+ text-align: left;
+ background: #ffecce;
+ border-top: 1px dotted black;
+ color: inherit;
+}
+
+div.grayed {
+ color: #444444;
+ font-style: italic;
+}
+
+div.grayed div.contact {
+ background: #eee;
+}
+
+div.contact div.nom {
+ font-weight: bold;
+ width: 35%;
+ float: left;
+ padding-left: 2px;
+}
+
+div.contact div.appli {
+ float: left;
+}
+
+div.contact div.bits {
+ text-align: right;
+ float: right;
+}
+
+div.contact div.long {
+ width: 100%;
+ clear: both;
+ background: #fff;
+ color: inherit;
+ padding: 1px 0px;
+}
+
+
+div.long table { width: 100%; }
+div.long td.lt { width: 35%; padding-left: 4px; }
+div.long td.rt { width: 65%; }
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+table.flags {
+ margin: 1em 0em 0em 0em;
+}
+table.flags input { margin: 0px 2px; padding: 0px; }
+
+table.flags td.texte {
+ font-size: smaller;
+ font-weight: bold;
+ padding: 3px;
+}
+table.flags td.vert {
+ background: green;
+ padding: 3px;
+ text-align: center;
+}
+table.flags td.orange {
+ background: #ff9900;
+ padding: 3px;
+ text-align: center;
+}
+table.flags td.rouge {
+ background: red;
+ padding: 3px;
+ text-align: center;
+}
+
+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 ]
+*******************************************************************************/
+
+em.intitule {
+ color: purple;
+ font-size: 90%;
+}
+
+div#body {
+ color: #000;
+ background: #fff;
+ border: 3px solid #000;
+
+ width: 800px;
+ margin: 7px;
+}
+
+#fiche {
+ width: 760px;
+ font-size: 100%;
+ vertical-align: top;
+
+ background: #f5f8fc;
+ border: 1px solid #69c;
+ margin: 20px;
+}
+
+#fiche em { color: purple; }
+
+#fiche_identite {
+ padding: 5px;
+ width: 600px;
+}
+
+#photo { padding-left: 1em; }
+
+#fiche_identite div.civilite {
+ text-align: center;
+ font-weight: bold;
+ width: 80%;
+ float: left;
+}
+
+#fiche_identite div.maj {
+ float: left;
+ width: 20%;
+ font-size: 80%;
+ text-align: right;
+ clear: right;
+}
+
+#fiche_identite div.contact {
+ clear: both;
+ margin: 1em;
+ padding: 1ex;
+ background: #fff;
+ border: 1px dotted #69c;
+}
+#fiche_identite div.email {
+ clear: left;
+ float: left;
+}
+#fiche_identite div.mob {
+ float: right;
+ clear: right;
+ text-align: right;
+}
+
+#fiche_identite div.formation {
+ margin: 0em 1em;
+}
+
+div.adresse {
+ float: left;
+ width: 48%;
+ padding: 0px;
+ margin: 0px 1% 1ex 1%;
+}
+
+div.adresse div.titre { color: purple; }
+
+/* only for fiche_referent.php*/
+
+#fiche_referent{
+ padding: 10px;
+ width: 100%;
+}
+
+#fiche_referent div.rubrique_referent{
+ float: left;
+ width: 31%;
+ padding: 0px;
+ margin: 0px 1% 1ex 1%;
+}
+
+#fiche_referent em{color: purple;}
+#fiche_referent ul { margin: 0px; padding: 0px 1em; }
+#fiche_referent li { font-weight: bold; margin: 0px; padding: 0px; text-align: left; }
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#dev {
+ width: 100%;
+ text-align: center;
+ padding: 1px;
+
+ font-family: 'Bauhaus Md BT','Bitstream Vera',sans-serif;
+ font-size: 10pt;
+ font-weight: bold;
+ color: #000;
+ background: #f5f8fc;
+}
+
+#db-trace div.hide { display: none; }
+#db-trace:hover div.hide { display: block }
+#db-trace h1 { margin: 0px; }
+
+#suid {
+ color: red;
+ background: #ffc0cb;
+ width: 100%;
+ font-weight: bold;
+}
+#suid td { padding: 2px; }
+#suid a { color: red; }
+
+table#body {
+ color: #000;
+ background: #fff;
+ border: 3px solid #000;
+
+ width: 900px;
+ margin: 1em auto;
+}
+
+#body-logo {
+ text-align: center;
+ padding: 2em 0em 0em 0em;
+}
+
+#body-top {
+ text-align: center;
+ font-size: 94%;
+ padding: 2em 2em 0em 2em;
+ padding-bottom: 16px;
+ font-family: Georgia,serif;
+}
+
+#body-top table { width: 100%; padding: 4px; }
+#body-top .date-heure { text-align: left; }
+#body-top .inscrits { text-align: right; }
+
+#body-bottom { text-align: center;}
+
+#body-menu {
+ padding: 1em 0em 2em 2em;
+ border: 0px;
+ width: 140px;
+ font-weight: bold;
+ white-space: nowrap;
+ line-height: 100%;
+}
+
+#body-menu a {
+ color: #690;
+ background: #fff;
+ border: 1px dotted #fff;
+ display: block;
+ padding: 1px 4px;
+ text-align: left;
+ font-size: 85%;
+ font-family: Bitstream Vera Sans,Verdana,sans-serif;
+ text-decoration: none;
+}
+
+#body-menu a:hover {
+ color: #690;
+ background: #eaf2db;
+ border: 1px dotted #690;
+}
+
+#body-menu .menu_title {
+ color: #f90;
+ background: #fff;
+ border-top: none;
+ border-bottom: 3px solid #f90;
+ padding: 1px;
+ text-transform: uppercase;
+ text-align: left;
+ margin: 1ex 0ex;
+}
+
+#content {
+ width: auto;
+ font-size: 100%;
+ vertical-align: top;
+
+ background: #f5f8fc;
+ border: 1px solid #69c;
+ line-height:125%;
+ padding: 0em 1em 1em 1em;
+ margin: 1em 2em 2em 2em;
+}
+
+#content-margin { width: 2em; }
+
+#content input {
+ font-size: 95%;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+div.blocunite {margin: 1em 0em 2em 0em;}
+div.blocunite_tab {margin: 0em 0em 2em 0em;}
+table.bicol td.cold,td.col {padding-right: 0.5em;}
+table.bicol td.colm {}
+table.bicol td.colg,td.col {padding-left: 0.5em;}
+table.bicol td.dcolm, td.dcolg, td.dcold {padding-bottom: 0.5em;}
+table.bicol td.dcolg {padding-left: 0.5em;}
+table.bicol td.dcold {padding-right: 0.5em;}
+table.bicol td.pflags {}
+table.bicol td.flags {padding-top: 0.5em;}
+table.bicol tr.top {vertical-align: top;}
+table.bicol span.titre {font-weight: bold;}
+table.bicol span.comm {font-size: smaller;}
+table.bicol span.nom {}
+table.bicol span.valeur {font-weight: bold;}
+table.bicol span.lien {font-size: smaller;}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+body {
+ background: #99afc1;
+ color: #000000;
+}
+fieldset {
+ border: 1px #305070 solid;
+ background: #80a0c0;
+ color: inherit;
+}
+legend {
+ border: 1px #305070 solid;
+ background: #99b9d0;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 {
+ color: #ffffff;
+ background: #657590;
+ border-top: 1px solid #305070;
+ border-bottom: 1px solid #305070;
+ font-family: "Verdana", sans-serif;
+ font-size: 100%;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.tinybicol, table.bicol {
+ background: #80a0c0;
+ border: 1px solid #305070;
+ border-collapse: collapse;
+}
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.impair , table.bicol tr.impair { background: #80a0c0; }
+table.tinybicol tr.pair, table.bicol tr.pair { background: #99b9d0; }
+table.tinybicol th, table.bicol th {
+ background: #305070;
+ color: #ffffff;
+}
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+ background: #99b9d0;
+ border-top: 1px solid #305070;
+ border-bottom: none;
+}
+
+#skin td {
+ border-top: none;
+ border-bottom: 1px solid #305070;
+ vertical-align: middle;
+}
+
+#skin td.skigauche {
+ background: #99b9d0;
+}
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #80a0c0;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #99b9d0;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-top: 1px solid #305070;
+ border-right: 1px solid #305070;
+ border-left: 1px solid #305070;
+ border-bottom: none;
+}
+
+#body-top {
+ border-bottom: 1px solid #305070;
+}
+
+#body-bottom {
+ border-top: 1px solid #305070;
+}
+
+#body-menu {
+ border-left: 1px solid #305070;
+ border-right: 1px solid #305070;
+ background-image: url("/images/sk_sharky_bubbles.png");
+ background-position: 0px 100px;
+ background-repeat: repeat-y;
+}
+
+#body-menu .menu_title {
+ color : #ffffff;
+ background: #657590;
+ border-top: 1px solid #305070;
+ border-bottom: 1px solid #305070;
+}
+
+#body-menu .menu_item {
+ padding-left: 4px;
+ text-align: left;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+fieldset {
+ background-color: #ddffcc;
+ border: 1px #0067fe solid;
+ color: inherit;
+}
+
+legend {
+ border: 1px #0067fe solid;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 a:link, h1 a:visited, h1 a:active {
+ color: #999999;
+ background: inherit;
+}
+
+h1 a:hover {
+ color: #cccccc;
+}
+
+h1 {
+ color: #eeeeee;
+ background-color: #444444;
+ background-image: url( "/images/sk_spectral_titre.jpg");
+ background-repeat: repeat-x;
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.tinybicol, table.bicol {
+ background: #ccddff;
+ border: 1px solid #0067fe;
+ border-collapse: collapse;
+}
+
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.pair, table.bicol tr.pair { background: #ddffcc; }
+table.tinybicol th, table.bicol th {
+ background-color: #0067fe;
+}
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #305070;
+ background: #ccddff;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #ddffcc;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-bottom: 1px solid #003399;
+ border-right: 1px solid #305070;
+ border-left: none;
+ border-top: none;
+}
+
+#body-top {
+ border-bottom: 1px solid #003399;
+}
+
+#body-bottom {
+ border-top: 1px solid #003399;
+}
+
+#body-menu {
+ border-right: 1px solid #003399;
+}
+
+#body-menu .menu_title {
+ color : #000000;
+ background-color: #3601ff;
+ background-image: url("/images/sk_spectral_menu.jpg");
+ background-repeat: repeat-y;
+ border-top: 1px solid #003399;
+ border-bottom: 1px solid #003399;
+}
+
+#body-menu .menu_item {
+ padding-left: 0px;
+ text-align: left;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+a:link, a:visited, a:active {
+ color: #000000;
+ background: inherit;
+}
+
+a:hover { color: #47220a; }
+
+/*******************************************************************************
+ 1 Styles par défauts
+ [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+body {
+ background-color: #ffffff;
+ background-image: url('/images/sk_trapped_monstre.jpg');
+ background-position: left bottom;
+ background-repeat: no-repeat;
+ font-family: "Arial", sans-serif;
+ color: #000000;
+}
+
+fieldset {
+ background-color: #f2e9e2;
+ border: 1px #ab8b7d solid;
+ color: inherit;
+}
+
+legend {
+ background-color: #e2d9c2;
+ border: 1px #ab8b7d solid;
+ color: inherit;
+}
+
+
+/*******************************************************************************
+ 2 Styles <p>, <div>, <span>, <li>
+ [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+h1 a:link, h1 a:visited, h1 a:active {
+ color: #eeeeee;
+ background: inherit;
+}
+
+h1 a:hover { color: #e2d9c2; }
+
+h1 {
+ color: #ffffff;
+ background-image: url("/images/sk_trapped_titre.gif");
+ background-repeat: no-repeat;
+ background-color: #200a00;
+/* text-indent: 0.2em;
+ text-align: left;
+ font-family: "helvetica", sans-serif;
+ font-weight: bolder;
+ font-size: 120%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+ padding-left: 0.5em;*/
+}
+
+/*******************************************************************************
+ 3 Tableaux bicolores + classes utiles
+ [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.tinybicol, table.bicol {
+ background-color: #f2e9e2;
+ border: 1px solid #200a00;
+ border-collapse: collapse;
+}
+
+table.tinybicol tr, table.bicol tr { }
+table.tinybicol tr.pair, table.bicol tr.pair { background-color: #e2d9c2; }
+table.tinybicol th, table.bicol th {
+ background-color: #291602;
+}
+
+table.tenybicol td, table.bicol td { color: #000000; }
+table
+
+/*******************************************************************************
+ 4 Tableau de choix de skins
+ [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+ border-top: 1px solid #000000;
+ border-bottom: 1px solid #000000;
+}
+
+#skin td {
+ border-top: 1px solid #000000;
+ border-bottom: 1px solid #000000;
+ background-color: #f2e9e2;
+}
+
+#skin td.skigauche {
+ background-color: #e2d9c2;
+}
+
+/*******************************************************************************
+ 5 Contacts
+ [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list div.contact {
+ border-top: 1px solid #000000;
+ background: #f2e9e2;
+ color: inherit;
+}
+
+div.contact div.long {
+ background: #e2d9c2;
+ color: inherit;
+}
+
+/*******************************************************************************
+ 6 Profil
+ [ onglets des profils ]
+*******************************************************************************/
+
+#onglet li {
+ background: #e2d9c2;
+}
+
+/*******************************************************************************
+ 7 fiche.php
+ [ cas de la fiche ]
+*******************************************************************************/
+
+/*******************************************************************************
+ A SKIN
+ [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#body-logo {
+ border-top: none;
+ border-bottom: 1px solid #777777;
+ border-right: 1px solid #777777;
+ border-left: none;
+ vertical-align: middle;
+}
+
+#body-top {
+ border-bottom: 1px solid #777777;
+}
+
+#body-bottom {
+ border-top: 1px solid #777777;
+ font-family: "helvetica", sans-serif;
+ font-size: x-small;
+}
+
+#body-menu {
+ font-family: "helvetica", sans-serif;
+ font-weight: bold;
+ font-size: smaller;
+ border-right: 1px solid #777777;
+}
+
+#body-menu .menu_title {
+ color : #7a614f;
+ background-color: #F2e9e2;
+ background-image: url("/images/sk_trapped_menu.jpg");
+ border-top: 1px solid #ab8b7d;
+ border-bottom: 1px solid #ab8b7d;
+ font-size: smaller;
+}
+
+#body-menu .menu_item {
+ border-right: none;
+ font-size: smaller;
+/* padding-left: 0px;
+ text-align: left;*/
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+
+if (isset($_SESSION['suid'])) { require_once('./exit.php'); }
+
+if (Get::has('forget')) {
+ setcookie('ORGaccess', '', time() - 3600, '/', '', 0);
+ Cookie::kill('ORGaccess');
+ if (isset($_SESSION['log']))
+ $_SESSION['log']->log("cookie_off");
+}
+
+if (Get::has('forgetUid')) {
+ setcookie('ORGuid', '', time() - 3600, '/', '', 0);
+ Cookie::kill('ORGuid');
+ setcookie('ORGdomain', '', time() - 3600, '/', '', 0);
+ Cookie::kill('ORGdomain');
+}
+
+if (isset($_SESSION['log'])) {
+ $ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
+ $_SESSION['log']->log('deconnexion',$ref);
+}
+
+XorgSession::destroy();
+
+new_skinned_page('deconnexion.tpl', AUTH_PUBLIC);
+
+$page->run();
+
+// vim:set et sws=4 sts=4 sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/apropos.tpl', AUTH_PUBLIC);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/charte.tpl',AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/contacts.tpl",AUTH_PUBLIC);
+$page->run(Env::get('topic'));
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/convention_ax.tpl', AUTH_PUBLIC);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_carva.tpl",AUTH_COOKIE);
+$page->run(Session::get('alias'));
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_emails.tpl",AUTH_COOKIE);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_forums.tpl",AUTH_COOKIE);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_from.tpl",AUTH_COOKIE);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_gratuits.tpl",AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_melix.tpl",AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_nn.tpl",AUTH_PUBLIC);
+$page->run(Get::get('doc'));
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_nntp.tpl",AUTH_COOKIE);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_oe.tpl",AUTH_PUBLIC);
+$page->run(Get::get('doc'));
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_patte_cassee.tpl",AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_pocketpc.tpl",AUTH_PUBLIC);
+$page->run(Get::get('doc'));
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_smtp.tpl",AUTH_COOKIE);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("docs/doc_ssl.tpl",AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/en-cours.tpl',AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/ethique.tpl',AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/faq.tpl',AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/index.tpl',AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+
+new_skinned_page('docs/plan.tpl',AUTH_PUBLIC);
+
+function page($params, $content, &$smarty) {
+ extract($params);
+
+ $ret = "<li><a href='$url'>$title</a>\n";
+
+ if(!empty($content)) {
+ $t = preg_replace("/[ \t\n]+/", " ", $content);
+ $ret .= " [<a href='#' onclick='textpopup(\"".urlencode($t) ."\")'>?</a>]\n";
+ }
+ return $ret . "</li>\n";
+}
+
+$page->register_block('page', 'page');
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('docs/services.tpl', AUTH_PUBLIC);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('dons.tpl', AUTH_COOKIE);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('emails.tpl',AUTH_COOKIE);
+
+$uid = Session::getInt('uid');
+
+if (Post::has('best')) {
+ // bestalias is the first bit : 1
+ // there will be maximum 8 bits in flags : 255
+ $globals->xdb->execute("UPDATE aliases SET flags=flags & (255 - 1) WHERE id={?}", $uid);
+ $globals->xdb->execute("UPDATE aliases SET flags=flags | 1 WHERE id={?} AND alias={?}", $uid, Post::get('best'));
+}
+
+// on regarde si on a affaire à un homonyme
+$sql = "SELECT alias, (type='a_vie') AS a_vie, FIND_IN_SET('bestalias',flags) AS best, expire
+ FROM aliases
+ WHERE id = {?} AND type!='homonyme'
+ ORDER BY LENGTH(alias)";
+$page->assign('aliases', $globals->xdb->iterator($sql, $uid));
+
+$sql = "SELECT email
+ FROM emails
+ WHERE uid = {?} AND FIND_IN_SET('active', flags)";
+$page->assign('mails', $globals->xdb->iterator($sql, $uid));
+
+
+// on regarde si l'utilisateur a un alias et si oui on l'affiche !
+$forlife = Session::get('forlife');
+$res = $globals->xdb->query(
+ "SELECT alias
+ FROM virtual AS v
+ INNER JOIN virtual_redirect AS vr USING(vid)
+ WHERE (redirect={?} OR redirect={?})
+ AND alias LIKE '%@{$globals->mail->alias_dom}'",
+ $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2);
+$page->assign('melix', $res->fetchOneCell());
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('emails/broken.tpl',AUTH_COOKIE);
+require_once('emails.inc.php');
+
+if (Get::has('email') && Get::has('action')) {
+ $email = valide_email(Get::get('email'));
+ // vérifications d'usage
+ $sel = $globals->xdb->query(
+ "SELECT e.uid, a.alias
+ FROM emails AS e
+ INNER JOIN auth_user_md5 AS u ON e.uid = u.user_id
+ INNER JOIN aliases AS a ON (e.uid = a.id AND type!='homonyme' AND FIND_IN_SET('bestalias',a.flags))
+ WHERE e.email={?}", $email);
+
+ if (list($uid, $dest) = $sel->fetchOneRow()) {
+ // envoi du mail
+ $message = "Bonjour !
+
+Ce mail a été généré automatiquement par le service de patte cassée de
+Polytechnique.org car un autre utilisateur, ".Session::get('prenom').' '.Session::get('nom').",
+nous a signalé qu'en t'envoyant un mail, il avait reçu un message d'erreur
+indiquant que ton adresse de redirection $email
+ne fonctionnait plus !
+
+Nous te suggérons de vérifier cette adresse, et le cas échéant de mettre
+à jour sur le site <{$globals->baseurl}/emails.php> tes adresses
+de redirection...
+
+Pour plus de rensignements sur le service de patte cassée, n'hésites pas à
+consulter la page <{$globals->baseurl}/emails/broken.php>.
+
+
+A bientôt sur Polytechnique.org !
+L'équipe d'administration <support@polytechnique.org>";
+
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $mail = new HermesMailer();
+ $mail->setFrom('"Polytechnique.org" <support@polytechnique.org>');
+ $mail->addTo("$dest@polytechnique.org");
+ $mail->setSubject("Une de tes adresse de redirection Polytechnique.org ne marche plus !!");
+ $mail->setTxtBody($message);
+ $mail->send();
+ $page->trig("Mail envoyé ! :o)");
+ }
+} elseif (Post::has('email')) {
+ $email = valide_email(Post::get('email'));
+ $page->assign('email',$email);
+ $sel = $globals->xdb->query(
+ "SELECT e1.uid, e1.panne != 0 AS panne, count(e2.uid) AS nb_mails, u.nom, u.prenom, u.promo
+ FROM emails as e1
+ LEFT JOIN emails as e2 ON(e1.uid = e2.uid AND FIND_IN_SET('active', e2.flags) AND e1.email != e2.email)
+ INNER JOIN auth_user_md5 as u ON(e1.uid = u.user_id)
+ WHERE e1.email = {?}
+ GROUP BY e1.uid", $email);
+ if ($x = $sel->fetchOneAssoc()) {
+ // on écrit dans la base que l'adresse est cassée
+ if (!$x['panne']) {
+ $globals->xdb->execute("UPDATE emails SET panne=NOW() WHERE email = {?}", $email);
+ }
+ $page->assign_by_ref('x', $x);
+ }
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('emails/redirect.tpl',AUTH_MDP);
+require_once("emails.inc.php");
+
+$uid = Session::getInt('uid');
+$forlife = Session::get('forlife');
+
+$redirect = new Redirect(Session::getInt('uid'));
+
+if (Env::has('emailop')) {
+ $actifs = Env::getMixed('emails_actifs', Array());
+ if (Env::get('emailop') == "retirer" && Env::has('email')) {
+ $page->assign('retour', $redirect->delete_email(Env::get('email')));
+ } elseif (Env::get('emailop') == "ajouter" && Env::has('email')) {
+ $page->assign('retour', $redirect->add_email(Env::get('email')));
+ } elseif (empty($actifs)) {
+ $page->assign('retour', ERROR_INACTIVE_REDIRECTION);
+ } elseif (is_array($actifs)) {
+ $page->assign('retour', $redirect->modify_email($actifs, Env::getMixed('emails_rewrite',Array())));
+ }
+}
+$res = $globals->xdb->query(
+ "SELECT alias
+ FROM virtual
+ INNER JOIN virtual_redirect USING(vid)
+ WHERE (redirect={?} OR redirect={?})
+ AND alias LIKE '%@{$globals->mail->alias_dom}'",
+ $forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2);
+$melix = $res->fetchOneCell();
+if ($melix) {
+ list($melix) = split('@', $melix);
+ $page->assign('melix',$melix);
+}
+
+$res = $globals->xdb->query(
+ "SELECT alias,expire
+ 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);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('emails/send.tpl',AUTH_MDP);
+
+// action si on recoit un formulaire
+if (Env::get('submit') == 'Envoyer')
+{
+ $to2 = join(', ', Env::getMixed('contacts', Array()));
+ $txt = str_replace('^M', '', Env::get('contenu'));
+ $to = Env::get('to');
+ $subj = Env::get('sujet');
+ $from = Env::get('from');
+ $cc = Env::get('cc');
+ $bcc = Env::get('bcc');
+
+ if (empty($to) && empty($cc) && empty($to2)) {
+ $page->trig("Indique au moins un destinataire.");
+ } else {
+ require_once("diogenes/diogenes.hermes.inc.php");
+
+ $mymail = new HermesMailer();
+ $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); }
+ $mymail->setTxtBody(wordwrap($txt,72,"\n"));
+ if ($mymail->send()) {
+ $page->trig("Ton mail a bien été envoyé.");
+ $_REQUEST = array('bcc' => Session::get('bestalias').'@'.$globals->mail->domain);
+ } else {
+ $page->trig("Erreur lors de l'envoi du courriel, réessaye.");
+ }
+ }
+} else {
+ $_REQUEST['bcc'] = Session::get('bestalias').'@'.$globals->mail->domain;
+}
+
+$res = $globals->xdb->query(
+ "SELECT u.prenom, u.nom, u.promo, a.alias as forlife
+ FROM auth_user_md5 AS u
+ INNER JOIN contacts AS c ON (u.user_id = c.contact)
+ INNER JOIN aliases AS a ON (u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
+ WHERE c.uid = {?}
+ ORDER BY u.nom, u.prenom", Session::getInt('uid'));
+$page->assign('contacts', $res->fetchAllAssoc());
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('evenements.tpl', AUTH_MDP);
+
+$titre = Post::get('titre');
+$texte = Post::get('texte');
+$promo_min = Post::getInt('promo_min');
+$promo_max = Post::getInt('promo_max');
+$peremption = Post::getInt('peremption');
+$validation_message = Post::get('validation_message');
+$action = Post::get('action');
+
+$page->assign('titre', $titre);
+$page->assign('texte', $texte);
+$page->assign('promo_min', $promo_min);
+$page->assign('promo_max', $promo_max);
+$page->assign('peremption', $peremption);
+$page->assign('validation_message', $validation_message);
+$page->assign('action', strtolower($action));
+
+if ($action=="Confirmer") {
+ $texte = preg_replace( "/((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "<a href=\"\\0\">\\0</a>", $texte );
+ $texte = preg_replace( "/([^,\s]+@[^,\s]+)/i", "<a href=\"mailto:\\0\">\\0</a>", $texte );
+ require_once("validations.inc.php");
+ $evtreq = new evtreq($titre, $texte, $promo_min, $promo_max,
+ $peremption, $validation_message, Session::getInt('uid'));
+ $evtreq->submit();
+ $page->assign('ok', true);
+}
+
+$select = "";
+for ($i = 1 ; $i < 30 ; $i++) {
+ $p_stamp=date("Ymd",time()+3600*24*$i);
+ $year=substr($p_stamp,0,4);
+ $month=substr($p_stamp,4,2);
+ $day=substr($p_stamp,6,2);
+
+ $select .= "<option value=\"$p_stamp\"" . (($p_stamp == strtr($peremption, array("-" => ""))) ? " selected" : "")."> $day / $month / $year</option>\n";
+}
+$page->assign('select',$select);
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('index.tpl',AUTH_MDP);
+
+if (Session::has('suid')) {
+ $a4l = Session::get('forlife');
+ $suid = Session::getMixed('suid');
+ $log = Session::getMixed('log');
+ $log->log("suid_stop", Session::get('forlife') . " by " . $suid['forlife']);
+ $_SESSION = $suid;
+ Session::kill('suid');
+ header('Location: '.$globals->baseurl.'/admin/utilisateurs.php?login='.$a4l);
+} else {
+ header("Location: login.php");
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+new_simple_page('fiche.tpl', AUTH_PUBLIC);
+require_once('user.func.inc.php');
+
+if (!Env::has('user') && !Env::has('mat')) {
+ $page->kill("cette page n'existe pas");
+}
+
+if (Env::has('user')) {
+ $login = get_user_forlife(Env::get('user'));
+ if ($login === false) {
+ $page->kill("");
+ }
+}
+
+if (Env::has('mat')) {
+ $res = $globals->xdb->query(
+ "SELECT alias
+ FROM aliases AS a
+ INNER JOIN auth_user_md5 AS u ON (a.id=u.user_id AND a.type='a_vie')
+ WHERE matricule={?}", Env::getInt('mat'));
+ $login = $res->fetchOneCell();
+ if (empty($login)) {
+ $page->kill("cette page n'existe pas");
+ }
+}
+
+$new = Env::get('modif') == 'new';
+$user = get_user_details($login, Session::getInt('uid'));
+$title = $user['prenom'] . ' ' . empty($user['nom_usage']) ? $user['nom'] : $user['nom_usage'];
+$page->assign('xorg_title', $title);
+
+// photo
+
+$photo = 'getphoto.php?x='.$user['forlife'].($new ? '&req=true' : '');
+
+if(!isset($user['y']) and !isset($user['x'])) {
+ list($user['x'], $user['y']) = getimagesize("images/none.png");
+}
+if(!isset($user['y']) or $user['y'] < 1) $user['y']=1;
+if(!isset($user['x']) or $user['x'] < 1) $user['x']=1;
+if($user['x'] > 240){
+ $user['y'] = (integer)($user['y']*240/$user['x']);
+ $user['x'] = 240;
+}
+if($user['y'] > 300){
+ $user['x'] = (integer)($user['x']*300/$user['y']);
+ $user['y'] = 300;
+}
+if($user['x'] < 160){
+ $user['y'] = (integer)($user['y']*160/$user['x']);
+ $user['x'] = 160;
+}
+
+// manage the public fiche
+$page->assign('logged', logged() && !Env::has('public'));
+if (!logged() || Env::has('public')) {
+ // hide the orange status
+ $user['promo_sortie'] = $user['promo'] + 3;
+ if ($user['mobile_pub'] != 'public') $user['mobile'] = '';
+ if ($user['web_pub'] != 'public') $user['web'] = '';
+ if ($user['freetext_pub'] != 'public') $user['freetext'] = '';
+ foreach ($user['adr'] as $i=>$adr) {
+ if ($adr['pub'] != 'public' && $adr['tel_pub'] != 'public')
+ unset($user['adr'][$i]);
+ elseif ($adr['pub'] != 'public') {
+ $user['adr'][$i]['adr1'] = '';
+ $user['adr'][$i]['adr2'] = '';
+ $user['adr'][$i]['adr3'] = '';
+ $user['adr'][$i]['city'] = '';
+ $user['adr'][$i]['postcode'] = '';
+ $user['adr'][$i]['region'] = '';
+ $user['adr'][$i]['country'] = '00';
+ $user['adr'][$i]['countrytxt'] = '';
+ }
+ elseif ($adr['tel_pub'] != 'public') {
+ $user['adr'][$i]['tel'] = '';
+ $user['adr'][$i]['fax'] = '';
+ }
+ }
+ foreach ($user['adr_pro'] as $i=>$adr) {
+ if ($adr['pub'] != 'public' && $adr['tel_pub'] != 'public' && $adr['adr_pub'] != 'public' && $adr['email_pub'] != 'public')
+ unset($user['adr_pro'][$i]);
+ else {
+ if ($adr['adr_pub'] != 'public') {
+ $user['adr_pro'][$i]['adr1'] = '';
+ $user['adr_pro'][$i]['adr2'] = '';
+ $user['adr_pro'][$i]['adr3'] = '';
+ $user['adr_pro'][$i]['city'] = '';
+ $user['adr_pro'][$i]['postcode'] = '';
+ $user['adr_pro'][$i]['region'] = '';
+ $user['adr_pro'][$i]['country'] = '00';
+ $user['adr_pro'][$i]['countrytxt'] = '';
+ }
+ if ($adr['pub'] != 'public') {
+ $user['adr_pro'][$i]['entreprise'] = '';
+ $user['adr_pro'][$i]['secteur'] = '';
+ $user['adr_pro'][$i]['fonction'] = '';
+ $user['adr_pro'][$i]['poste'] = '';
+ }
+ if ($adr['tel_pub'] != 'public') {
+ $user['adr_pro'][$i]['tel'] = '';
+ $user['adr_pro'][$i]['fax'] = '';
+ $user['adr_pro'][$i]['mobile'] = '';
+ }
+ if ($adr['email_pub'] != 'public') {
+ $user['adr_pro'][$i]['email'] = '';
+ }
+ }
+ }
+ if ($user['medals_pub'] != 'public') {
+ unset($user['medals']);
+ }
+ if ($user['photo_pub'] != 'public') {
+ $photo = "";
+ }
+}
+foreach($user['adr_pro'] as $i=>$pro) {
+ if ($pro['entreprise'] == '' && $pro['fonction'] == ''
+ && $pro['secteur'] == '' && $pro['poste'] == ''
+ && $pro['adr1'] == '' && $pro['adr2'] == '' && $pro['adr3'] == ''
+ && $pro['postcode'] == '' && $pro['city'] == '' && $pro['country'] == '00'
+ && $pro['tel'] == '' && $pro['fax'] == '' && $pro['mobile'] == ''
+ && $pro['email'] == '')
+ unset($user['adr_pro'][$i]);
+}
+if (count($user['adr_pro']) == 0) unset($user['adr_pro']);
+if (count($user['adr']) == 0) unset($user['adr']);
+$page->assign_by_ref('x', $user);
+
+$page->assign('photo_url', $photo);
+// alias virtual
+$res = $globals->xdb->query(
+ "SELECT alias
+ FROM virtual
+ INNER JOIN virtual_redirect USING(vid)
+ INNER JOIN auth_user_quick ON ( user_id = {?} AND emails_alias_pub = 'public' )
+ WHERE ( redirect={?} OR redirect={?} )
+ AND alias LIKE '%@{$globals->mail->alias_dom}'",
+ Session::getInt('uid'), $user['forlife'].'@'.$globals->mail->domain, $user['forlife'].'@'.$globals->mail->domain2);
+$page->assign('virtualalias', $res->fetchOneCell());
+
+$page->addJsLink('javascript/close_on_esc.js');
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+new_simple_page('fiche_referent.tpl',AUTH_COOKIE);
+
+if (!Env::has('user')) {
+ exit;
+}
+
+$res = $globals->xdb->query(
+ "SELECT prenom, nom, user_id, promo, cv, a.alias AS bestalias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
+ INNER JOIN aliases AS a1 ON (u.user_id=a1.id AND a1.alias = {?} AND a1.type!='homonyme')",
+ Env::get('user'));
+if ($res->numRows() != 1) {
+ exit;
+}
+
+list($prenom, $nom, $user_id, $promo, $cv, $bestalias) = $res->fetchOneRow();
+
+$page->assign('prenom', $prenom);
+$page->assign('nom', $nom);
+$page->assign('promo', $promo);
+$page->assign('cv', $cv);
+$page->assign('bestalias', $bestalias);
+
+
+//recuperation des infos professionnelles
+$res = $globals->xdb->query(
+ "SELECT e.entreprise, s.label as secteur , ss.label as ss_secteur , f.fonction_fr as fonction,
+ e.poste, e.adr1, e.adr2, e.adr3, e.postcode, e.city,
+ gp.pays, gr.name, e.tel, e.fax, e.mobile
+ FROM entreprises AS e
+ LEFT JOIN emploi_secteur AS s ON(e.secteur = s.id)
+ LEFT JOIN emploi_ss_secteur AS ss ON(e.ss_secteur = ss.id AND e.secteur = ss.secteur)
+ LEFT JOIN fonctions_def AS f ON(e.fonction = f.id)
+ LEFT JOIN geoloc_pays AS gp ON (gp.a2 = e.country)
+ LEFT JOIN geoloc_region AS gr ON (gr.a2 = e.country and gr.region = e.region)
+ WHERE e.uid = {?}
+ ORDER BY e.entrid", $user_id);
+$page->assign('adr_pro', $res->fetchAllAssoc());
+
+///// recuperations infos referent
+
+//expertise
+$res = $globals->xdb->query("SELECT expertise FROM mentor WHERE uid = {?}", $user_id);
+$page->assign('expertise', $res->fetchOneCell());
+
+//secteurs
+$secteurs = $ss_secteurs = Array();
+$res = $globals->xdb->iterRow(
+ "SELECT s.label, ss.label
+ FROM mentor_secteurs AS m
+ LEFT JOIN emploi_secteur AS s ON(m.secteur = s.id)
+ LEFT JOIN emploi_ss_secteur AS ss ON(m.secteur = ss.secteur AND m.ss_secteur = ss.id)
+ WHERE uid = {?}", $user_id);
+while (list($sec, $ssec) = $res->next()) {
+ $secteurs[] = $sec;
+ $ss_secteurs[] = $ssec;
+}
+$page->assign_by_ref('secteurs', $secteurs);
+$page->assign_by_ref('ss_secteurs', $ss_secteurs);
+
+//pays
+$res = $globals->xdb->query(
+ "SELECT gp.pays
+ FROM mentor_pays AS m
+ LEFT JOIN geoloc_pays AS gp ON(m.pid = gp.a2)
+ WHERE uid = {?}", $user_id);
+$page->assign('pays', $res->fetchColumn());
+
+$page->addJsLink('javascript/close_on_esc.js');
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2005 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 *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_nonhtml_page('', AUTH_COOKIE);
+header("Content-type: image/png");
+
+$res = $globals->xdb->iterRow('SELECT lat, lon FROM geoloc_city AS gc LEFT JOIN adresses AS a ON(gc.id = a.cityid) WHERE a.cityid IS NOT NULL GROUP BY gc.id');
+
+$img = imageCreateFromPng("../images/globe.png");
+
+$coul = imagecolorallocate($img, 0, 0, 0);
+
+while ($a = $res->next()) {
+ $x = floor(($a[1]/100000 + 180 )/360*600);
+ $y = floor((90 - $a[0]/100000)/180*300);
+ imagefilledrectangle($img, $x, $y, $x+1, $y+1, $coul);
+}
+
+imagePng($img);
+imagedestroy($img);
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2005 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 *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('geoloc/index.tpl', AUTH_COOKIE);
+
+$res = $globals->xdb->query('SELECT COUNT(DISTINCT uid) FROM adresses WHERE cityid IS NOT NULL');
+$page->assign('localises', $res->fetchOneCell());
+
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once('xorg.inc.php');
+new_skinned_page('login.tpl', AUTH_PUBLIC);
+
+if (Env::has('x')) {
+
+ $res = $globals->xdb->query("SELECT id, pub FROM aliases LEFT JOIN photo ON(id=uid) WHERE alias = {?}", Env::get('x'));
+ list($uid, $photo_pub) = $res->fetchOneRow();
+
+ if (Env::get('req') == "true" && logged()) {
+ include 'validations.inc.php';
+ $myphoto = PhotoReq::get_request($uid);
+ Header('Content-type: image/'.$myphoto->mimetype);
+ echo $myphoto->data;
+ } else {
+ $res = $globals->xdb->query(
+ "SELECT attachmime, attach
+ FROM photo
+ WHERE uid={?}", $uid);
+
+ if( (list($type,$data) = $res->fetchOneRow()) && ($photo_pub == 'public' || logged()) ) {
+ Header( "Content-type: image/$type");
+ echo $data;
+ } else {
+ Header( 'Content-type: image/png');
+ echo file_get_contents(dirname(__FILE__).'/images/none.png');
+ }
+ }
+}
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+/* Ce script donne un challenge et un numéro de session afin de permettre l'extraction de données pour eConfiance tout en procédant à une identification préalable... */
+
+session_start();
+session_register("chall");
+$_SESSION["chall"] = uniqid(rand(), 1);
+echo $_SESSION["chall"] . "\n" . session_id();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+/* Script permettant l'export de la liste des membres de la mailing list eConfiance, pour intégration par J-P Figer dans la liste des membres de X-Informatique */
+
+require_once('xorg.inc.php');
+require_once('xml-rpc-client.inc.php');
+require_once('lists.inc.php');
+
+$cle = $globals->core->econfiance;
+
+if (isset($_SESSION["chall"]) && $_SESSION["chall"] != "" && $_GET["PASS"] == md5($_SESSION["chall"].$cle)) {
+
+ $res = $globals->xdb->query("SELECT password FROM auth_user_md5 WHERE user_id=10154");
+ $pass = $res->fetchOneCell();
+
+ $client =& lists_xmlrpc(10154, $pass, "x-econfiance.polytechnique.org");
+ $members = $client->get_members('membres');
+ if(is_array($members)) {
+ $membres = Array();
+ foreach($members[1] as $member) {
+ if(preg_match('/^([^.]*.[^.]*.(\d\d\d\d))@polytechnique.org$/', $member[1], $matches)) {
+ $membres[] = "a.alias='{$matches[1]}'";
+ }
+ }
+ }
+
+ $where = join(' OR ',$membres);
+
+ $all = $globals->xdb->iterRow(
+ "SELECT u.prenom,u.nom,a.alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( u.user_id = a.id AND a.type!='homonyme' )
+ WHERE $where
+ ORDER BY nom");
+
+ $res = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n<membres>\n\n";
+
+ while (list ($prenom1,$nom1,$email1) = $all->next()) {
+ $res .= "<membre>\n";
+ $res .= "\t<nom>$nom1</nom>\n";
+ $res .= "\t<prenom>$prenom1</prenom>\n";
+ $res .= "\t<email>$email1</email>\n";
+ $res .= "</membre>\n\n";
+ }
+
+ $res .= "</membres>\n\n";
+
+ echo $res;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+/* Script permettant l'export de la liste des membres de la mailing list eConfiance, pour intégration par J-P Figer dans la liste des membres de X-Informatique */
+
+require_once('xorg.inc.php');
+require_once('xml-rpc-client.inc.php');
+require_once('lists.inc.php');
+
+$cle = $globals->core->econfiance;
+
+if (isset($_SESSION["chall"]) && $_SESSION["chall"] != "" && $_GET["PASS"] == md5($_SESSION["chall"].$cle)) {
+
+ $res = $globals->xdb->query("SELECT password FROM auth_user_md5 WHERE user_id=10154");
+ $pass = $res->fetchOneCell();
+
+ $client =& lists_xmlrpc(10154, $pass, "x-econfiance.polytechnique.org");
+ $members = $client->get_members('membres');
+ if(is_array($members)) {
+ $membres = Array();
+ foreach($members[1] as $member) {
+ if(preg_match('/^([^.]*.[^.]*.(\d\d\d\d))@polytechnique.org$/', $member[1], $matches)) {
+ $membres[] = "a.alias='{$matches[1]}'";
+ }
+ }
+ }
+
+ $where = join(' OR ',$membres);
+
+ $all = $globals->xdb->iterRow(
+ "SELECT u.prenom,u.nom,a.alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( u.user_id = a.id AND a.type!='homonyme' )
+ WHERE $where
+ ORDER BY nom");
+
+ $res = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n<membres>\n\n";
+
+ while (list ($prenom1,$nom1,$email1) = $all->next()) {
+ $res .= "<membre>\n";
+ $res .= "\t<nom>$nom1</nom>\n";
+ $res .= "\t<prenom>$prenom1</prenom>\n";
+ $res .= "\t<email>$email1</email>\n";
+ $res .= "</membre>\n\n";
+ }
+
+ $res .= "</membres>\n\n";
+
+ echo $res;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+?>
+<!DOCTYPE HTML PUBLIC "-//W4C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>Anciens eleves Polytechnique, annuaire email, etc</title>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <link href="/css/default.css" rel="stylesheet" type="text/css">
+ </head>
+ <body>
+ <table align="center" border=0 width=600>
+ <tr>
+ <td>
+ <img src="Sk/Base/logo.jpg">
+ </td>
+ <td>
+ <h1>Polytechnique.org</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <h2>Service Web temporairement interrompu</h2>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>En prévision d'une coupure de courant indépendante de
+ notre volonté, le service web est interrompu. Ceci nous permet
+ de garantir l'intégrité des données
+ stockées sur nos serveurs. La continuité du service mail
+ est assuré pendant la durée de la coupure.
+ </p>
+ <p>Nos excuses pour le dérangement occasionné et
+ à bientôt!</p>
+ <p align="right"><b>L'équipe de Polytechnique.org</b></p>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('index.tpl', AUTH_PUBLIC);
+if (logged()) {
+ header("Location: login.php");
+}
+$page->run();
+?>
--- /dev/null
+<?
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+header('Location: ../register/end.php?hash='.Env::get('ref'));
+
+?>
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function closePopup() {
+ window.close();
+}
+if (navigator.appName=="Microsoft Internet Explorer") {
+ function keyboardIE() { if (event.keyCode == 27) closePopup(); };
+ document.onkeydown = keyboardIE;
+} else {
+ function keyboardOther(e) { if (e.keyCode == 27) closePopup(); };
+ document.onkeydown = keyboardOther;
+}
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function correctUserName() {
+ var u = document.forms.login.username;
+ // login with no space
+ if (u.value.indexOf(' ') < 0) return true;
+ var mots = u.value.split(' ');
+ // jean paul.du pont -> jean-paul.du-pont
+ if (u.value.indexOf('.') > 0) { u.value = mots.join('-'); return true; }
+ // jean dupont -> jean.dupont
+ if (mots.length == 2) { u.value = mots[0]+"."+mots[1]; return true; }
+ // jean dupont 2001 -> jean.dupont.2001
+ if (mots.length == 3 && mots[2] > 1920 && mots[2] < 3000) { u.value = mots.join('.'); return true; }
+ // jean de la vallee -> jean.de-la-vallee
+ if (mots[1].toUpperCase() == 'DE') { u.value = mots[0]+"."+mots.join('-').substr(mots[0].length+1); return true; }
+ // jean paul dupont -> jean-paul.dupont
+ if (mots.length == 3 && mots[0].toUpperCase() == 'JEAN') { u.value = mots[0]+"-"+mots[1]+"."+mots[2]; return true; }
+
+ alert('Ton email ne doit pas contenir de blanc.\nLe format standard est\n\nprenom.nom.promotion\n\nSi ton nom ou ton prenom est composé,\nsépare les mots par des -');
+
+ return false;
+}
+
+function doChallengeResponse() {
+
+ if (!correctUserName()) return false;
+
+ str = document.forms.login.username.value + ":" +
+ MD5(document.forms.login.password.value) + ":" +
+ document.forms.loginsub.challenge.value;
+
+ document.forms.loginsub.response.value = MD5(str);
+ document.forms.loginsub.username.value = document.forms.login.username.value;
+ document.forms.loginsub.remember.value = document.forms.login.remember.checked;
+ document.forms.loginsub.domain.value = document.forms.login.domain.value;
+ document.forms.login.password.value = "";
+ document.forms.loginsub.submit();
+
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function readCookie(name)
+{
+ var nameEQ = name + "=";
+ var ca = document.cookie.split(';');
+ for(var i=0;i < ca.length;i++)
+ {
+ var c = ca[i];
+ while (c.charAt(0)==' ') c = c.substring(1,c.length);
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
+ }
+ return null;
+}
+
+
+function doChallengeResponse() {
+ str = readCookie('ORGuid') + ":" +
+ MD5(document.forms.login.password.value) + ":" +
+ document.forms.loginsub.challenge.value;
+
+ document.forms.loginsub.response.value = MD5(str);
+ document.forms.loginsub.remember.value = document.forms.login.remember.checked;
+ document.forms.login.password.value = "";
+ document.forms.loginsub.submit();
+}
--- /dev/null
+/*
+ * md5.jvs 1.0b 27/06/96
+ *
+ * Javascript implementation of the RSA Data Security, Inc. MD5
+ * Message-Digest Algorithm.
+ *
+ * Copyright (c) 1996 Henri Torgemane. All Rights Reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * and its documentation for any purposes and without
+ * fee is hereby granted provided that this copyright notice
+ * appears in all copies.
+ *
+ * Of course, this soft is provided "as is" without express or implied
+ * warranty of any kind.
+ *
+ */
+
+function array(n) {
+ for(i=0;i<n;i++) this[i]=0;
+ this.length=n;
+}
+
+/* Some basic logical functions had to be rewritten because of a bug in
+ * Javascript.. Just try to compute 0xffffffff >> 4 with it..
+ * Of course, these functions are slower than the original would be, but
+ * at least, they work!
+ */
+
+function integer(n) { return n%(0xffffffff+1); }
+
+function shr(a,b) {
+ a=integer(a);
+ b=integer(b);
+ if (a-0x80000000>=0) {
+ a=a%0x80000000;
+ a>>=b;
+ a+=0x40000000>>(b-1);
+ } else
+ a>>=b;
+ return a;
+}
+
+function shl1(a) {
+ a=a%0x80000000;
+ if (a&0x40000000==0x40000000)
+ {
+ a-=0x40000000;
+ a*=2;
+ a+=0x80000000;
+ } else
+ a*=2;
+ return a;
+}
+
+function shl(a,b) {
+ a=integer(a);
+ b=integer(b);
+ for (var i=0;i<b;i++) a=shl1(a);
+ return a;
+}
+
+function and(a,b) {
+ a=integer(a);
+ b=integer(b);
+ var t1=(a-0x80000000);
+ var t2=(b-0x80000000);
+ if (t1>=0)
+ if (t2>=0)
+ return ((t1&t2)+0x80000000);
+ else
+ return (t1&b);
+ else
+ if (t2>=0)
+ return (a&t2);
+ else
+ return (a&b);
+}
+
+function or(a,b) {
+ a=integer(a);
+ b=integer(b);
+ var t1=(a-0x80000000);
+ var t2=(b-0x80000000);
+ if (t1>=0)
+ if (t2>=0)
+ return ((t1|t2)+0x80000000);
+ else
+ return ((t1|b)+0x80000000);
+ else
+ if (t2>=0)
+ return ((a|t2)+0x80000000);
+ else
+ return (a|b);
+}
+
+function xor(a,b) {
+ a=integer(a);
+ b=integer(b);
+ var t1=(a-0x80000000);
+ var t2=(b-0x80000000);
+ if (t1>=0)
+ if (t2>=0)
+ return (t1^t2);
+ else
+ return ((t1^b)+0x80000000);
+ else
+ if (t2>=0)
+ return ((a^t2)+0x80000000);
+ else
+ return (a^b);
+}
+
+function not(a) {
+ a=integer(a);
+ return (0xffffffff-a);
+}
+
+/* Here begin the real algorithm */
+
+ var state = new array(4);
+ var count = new array(2);
+ count[0] = 0;
+ count[1] = 0;
+ var buffer = new array(64);
+ var transformBuffer = new array(16);
+ var digestBits = new array(16);
+
+ var S11 = 7;
+ var S12 = 12;
+ var S13 = 17;
+ var S14 = 22;
+ var S21 = 5;
+ var S22 = 9;
+ var S23 = 14;
+ var S24 = 20;
+ var S31 = 4;
+ var S32 = 11;
+ var S33 = 16;
+ var S34 = 23;
+ var S41 = 6;
+ var S42 = 10;
+ var S43 = 15;
+ var S44 = 21;
+
+ function F(x,y,z) {
+ return or(and(x,y),and(not(x),z));
+ }
+
+ function G(x,y,z) {
+ return or(and(x,z),and(y,not(z)));
+ }
+
+ function H(x,y,z) {
+ return xor(xor(x,y),z);
+ }
+
+ function I(x,y,z) {
+ return xor(y ,or(x , not(z)));
+ }
+
+ function rotateLeft(a,n) {
+ return or(shl(a, n),(shr(a,(32 - n))));
+ }
+
+ function FF(a,b,c,d,x,s,ac) {
+ a = a+F(b, c, d) + x + ac;
+ a = rotateLeft(a, s);
+ a = a+b;
+ return a;
+ }
+
+ function GG(a,b,c,d,x,s,ac) {
+ a = a+G(b, c, d) +x + ac;
+ a = rotateLeft(a, s);
+ a = a+b;
+ return a;
+ }
+
+ function HH(a,b,c,d,x,s,ac) {
+ a = a+H(b, c, d) + x + ac;
+ a = rotateLeft(a, s);
+ a = a+b;
+ return a;
+ }
+
+ function II(a,b,c,d,x,s,ac) {
+ a = a+I(b, c, d) + x + ac;
+ a = rotateLeft(a, s);
+ a = a+b;
+ return a;
+ }
+
+ function transform(buf,offset) {
+ var a=0, b=0, c=0, d=0;
+ var x = transformBuffer;
+
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+
+ for (i = 0; i < 16; i++) {
+ x[i] = and(buf[i*4+offset],0xff);
+ for (j = 1; j < 4; j++) {
+ x[i]+=shl(and(buf[i*4+j+offset] ,0xff), j * 8);
+ }
+ }
+
+ /* Round 1 */
+ a = FF ( a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
+ d = FF ( d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
+ c = FF ( c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
+ b = FF ( b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
+ a = FF ( a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
+ d = FF ( d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
+ c = FF ( c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
+ b = FF ( b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
+ a = FF ( a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
+ d = FF ( d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
+ c = FF ( c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
+ b = FF ( b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
+ a = FF ( a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
+ d = FF ( d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
+ c = FF ( c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
+ b = FF ( b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
+
+ /* Round 2 */
+ a = GG ( a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
+ d = GG ( d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
+ c = GG ( c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
+ b = GG ( b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
+ a = GG ( a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
+ d = GG ( d, a, b, c, x[10], S22, 0x2441453); /* 22 */
+ c = GG ( c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
+ b = GG ( b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
+ a = GG ( a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
+ d = GG ( d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
+ c = GG ( c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
+ b = GG ( b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
+ a = GG ( a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
+ d = GG ( d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
+ c = GG ( c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
+ b = GG ( b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
+
+ /* Round 3 */
+ a = HH ( a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
+ d = HH ( d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
+ c = HH ( c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
+ b = HH ( b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
+ a = HH ( a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
+ d = HH ( d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
+ c = HH ( c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
+ b = HH ( b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
+ a = HH ( a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
+ d = HH ( d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
+ c = HH ( c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
+ b = HH ( b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
+ a = HH ( a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
+ d = HH ( d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
+ c = HH ( c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
+ b = HH ( b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
+
+ /* Round 4 */
+ a = II ( a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
+ d = II ( d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
+ c = II ( c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
+ b = II ( b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
+ a = II ( a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
+ d = II ( d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
+ c = II ( c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
+ b = II ( b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
+ a = II ( a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
+ d = II ( d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
+ c = II ( c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
+ b = II ( b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
+ a = II ( a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
+ d = II ( d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
+ c = II ( c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
+ b = II ( b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
+
+ state[0] +=a;
+ state[1] +=b;
+ state[2] +=c;
+ state[3] +=d;
+
+ }
+
+ function init() {
+ count[0]=count[1] = 0;
+ state[0] = 0x67452301;
+ state[1] = 0xefcdab89;
+ state[2] = 0x98badcfe;
+ state[3] = 0x10325476;
+ for (i = 0; i < digestBits.length; i++)
+ digestBits[i] = 0;
+ }
+
+ function update(b) {
+ var index,i;
+
+ index = and(shr(count[0],3) , 0x3f);
+ if (count[0]<0xffffffff-7)
+ count[0] += 8;
+ else {
+ count[1]++;
+ count[0]-=0xffffffff+1;
+ count[0]+=8;
+ }
+ buffer[index] = and(b,0xff);
+ if (index >= 63) {
+ transform(buffer, 0);
+ }
+ }
+
+ function finish() {
+ var bits = new array(8);
+ var padding;
+ var i=0, index=0, padLen=0;
+
+ for (i = 0; i < 4; i++) {
+ bits[i] = and(shr(count[0],(i * 8)), 0xff);
+ }
+ for (i = 0; i < 4; i++) {
+ bits[i+4]=and(shr(count[1],(i * 8)), 0xff);
+ }
+ index = and(shr(count[0], 3) ,0x3f);
+ padLen = (index < 56) ? (56 - index) : (120 - index);
+ padding = new array(64);
+ padding[0] = 0x80;
+ for (i=0;i<padLen;i++)
+ update(padding[i]);
+ for (i=0;i<8;i++)
+ update(bits[i]);
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ digestBits[i*4+j] = and(shr(state[i], (j * 8)) , 0xff);
+ }
+ }
+ }
+
+/* End of the MD5 algorithm */
+
+function hexa(n) {
+ var hexa_h = "0123456789abcdef";
+ var hexa_c="";
+ var hexa_m=n;
+ for (hexa_i=0;hexa_i<8;hexa_i++) {
+ hexa_c=hexa_h.charAt(Math.abs(hexa_m)%16)+hexa_c;
+ hexa_m=Math.floor(hexa_m/16);
+ }
+ return hexa_c;
+}
+
+
+var ascii="01234567890123456789012345678901" +
+ " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+
+ "[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
+
+function MD5(entree)
+{
+ var l,s,k,ka,kb,kc,kd;
+
+ init();
+ for (k=0;k<entree.length;k++) {
+ l=entree.charAt(k);
+ update(ascii.lastIndexOf(l));
+ }
+ finish();
+ ka=kb=kc=kd=0;
+ for (i=0;i<4;i++) ka+=shl(digestBits[15-i], (i*8));
+ for (i=4;i<8;i++) kb+=shl(digestBits[15-i], ((i-4)*8));
+ for (i=8;i<12;i++) kc+=shl(digestBits[15-i], ((i-8)*8));
+ for (i=12;i<16;i++) kd+=shl(digestBits[15-i], ((i-12)*8));
+ s=hexa(kd)+hexa(kc)+hexa(kb)+hexa(ka);
+ return s;
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function EnCryptedResponse() {
+ pw1 = document.forms.changepass.nouveau.value;
+ pw2 = document.forms.changepass.nouveau2.value;
+ if (pw1 != pw2) {
+ alert ("\nErreur : les deux champs ne sont pas identiques !")
+ return false;
+ exit;
+ }
+ if (pw1.length < 6) {
+ alert ("\nErreur : le nouveau mot de passe doit faire au moins 6 caractères !")
+ return false;
+ exit;
+ }
+ str = MD5(document.forms.changepass.nouveau.value);
+ document.forms.changepass2.response2.value = str;
+ alert ("Le mot de passe que tu as rentré va être chiffré avant de nous parvenir par Internet ! Ainsi il ne circulera pas en clair.");
+ document.forms.changepass2.submit();
+ return true;
+}
--- /dev/null
+//\/////\r
+//\ overLIB 4.14 - You may not remove or change this notice.\r
+//\ Copyright Erik Bosrup 1998-2004. All rights reserved.\r
+//\\r
+//\ Contributors are listed on the homepage.\r
+//\ This file might be old, always check for the latest version at:\r
+//\ http://www.bosrup.com/web/overlib/\r
+//\\r
+//\ Please read the license agreement (available through the link above)\r
+//\ before using overLIB. Direct any licensing questions to erik@bosrup.com.\r
+//\\r
+//\ Do not sell this as your own work or remove this copyright notice. \r
+//\ For full details on copying or changing this script please read the\r
+//\ license agreement at the link above. Please give credit on sites that\r
+//\ use overLIB and submit changes of the script so other people can use\r
+//\ them as well.\r
+// $Revision: 1.107 $ $Date: 2004/12/26 15:34:56 $\r
+//\/////\r
+//\mini\r
+\r
+////////\r
+// PRE-INIT\r
+// Ignore these lines, configuration is below.\r
+////////\r
+var olLoaded = 0;var pmStart = 10000000; var pmUpper = 10001000; var pmCount = pmStart+1; var pmt=''; var pms = new Array(); var olInfo = new Info('4.14', 1);\r
+var FREPLACE = 0; var FBEFORE = 1; var FAFTER = 2; var FALTERNATE = 3; var FCHAIN=4;\r
+var olHideForm=0; // parameter for hiding SELECT and ActiveX elements in IE5.5+ \r
+var olHautoFlag = 0; // flags for over-riding VAUTO and HAUTO if corresponding\r
+var olVautoFlag = 0; // positioning commands are used on the command line\r
+registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass');\r
+\r
+////////\r
+// DEFAULT CONFIGURATION\r
+// Settings you want everywhere are set here. All of this can also be\r
+// changed on your html page or through an overLIB call.\r
+////////\r
+if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#CCCCFF";\r
+if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#333399";\r
+if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";\r
+if (typeof ol_capcolor=='undefined') var ol_capcolor="#FFFFFF";\r
+if (typeof ol_closecolor=='undefined') var ol_closecolor="#9999FF";\r
+if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";\r
+if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";\r
+if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";\r
+if (typeof ol_textsize=='undefined') var ol_textsize="1";\r
+if (typeof ol_captionsize=='undefined') var ol_captionsize="1";\r
+if (typeof ol_closesize=='undefined') var ol_closesize="1";\r
+if (typeof ol_width=='undefined') var ol_width="200";\r
+if (typeof ol_border=='undefined') var ol_border="1";\r
+if (typeof ol_cellpad=='undefined') var ol_cellpad=2;\r
+if (typeof ol_offsetx=='undefined') var ol_offsetx=10;\r
+if (typeof ol_offsety=='undefined') var ol_offsety=10;\r
+if (typeof ol_text=='undefined') var ol_text="Default Text";\r
+if (typeof ol_cap=='undefined') var ol_cap="";\r
+if (typeof ol_sticky=='undefined') var ol_sticky=0;\r
+if (typeof ol_background=='undefined') var ol_background="";\r
+if (typeof ol_close=='undefined') var ol_close="Close";\r
+if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;\r
+if (typeof ol_status=='undefined') var ol_status="";\r
+if (typeof ol_autostatus=='undefined') var ol_autostatus=0;\r
+if (typeof ol_height=='undefined') var ol_height=-1;\r
+if (typeof ol_snapx=='undefined') var ol_snapx=0;\r
+if (typeof ol_snapy=='undefined') var ol_snapy=0;\r
+if (typeof ol_fixx=='undefined') var ol_fixx=-1;\r
+if (typeof ol_fixy=='undefined') var ol_fixy=-1;\r
+if (typeof ol_relx=='undefined') var ol_relx=null;\r
+if (typeof ol_rely=='undefined') var ol_rely=null;\r
+if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";\r
+if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";\r
+if (typeof ol_padxl=='undefined') var ol_padxl=1;\r
+if (typeof ol_padxr=='undefined') var ol_padxr=1;\r
+if (typeof ol_padyt=='undefined') var ol_padyt=1;\r
+if (typeof ol_padyb=='undefined') var ol_padyb=1;\r
+if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;\r
+if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;\r
+if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;\r
+if (typeof ol_capicon=='undefined') var ol_capicon="";\r
+if (typeof ol_frame=='undefined') var ol_frame=self;\r
+if (typeof ol_timeout=='undefined') var ol_timeout=0;\r
+if (typeof ol_function=='undefined') var ol_function=null;\r
+if (typeof ol_delay=='undefined') var ol_delay=0;\r
+if (typeof ol_hauto=='undefined') var ol_hauto=0;\r
+if (typeof ol_vauto=='undefined') var ol_vauto=0;\r
+if (typeof ol_closeclick=='undefined') var ol_closeclick=0;\r
+if (typeof ol_wrap=='undefined') var ol_wrap=0;\r
+if (typeof ol_followmouse=='undefined') var ol_followmouse=1;\r
+if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0;\r
+if (typeof ol_closetitle=='undefined') var ol_closetitle='Close';\r
+if (typeof ol_compatmode=='undefined') var ol_compatmode=0;\r
+if (typeof ol_css=='undefined') var ol_css=CSSOFF;\r
+if (typeof ol_fgclass=='undefined') var ol_fgclass="";\r
+if (typeof ol_bgclass=='undefined') var ol_bgclass="";\r
+if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";\r
+if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";\r
+if (typeof ol_closefontclass=='undefined') var ol_closefontclass="";\r
+\r
+////////\r
+// ARRAY CONFIGURATION\r
+////////\r
+\r
+// You can use these arrays to store popup text here instead of in the html.\r
+if (typeof ol_texts=='undefined') var ol_texts = new Array("Text 0", "Text 1");\r
+if (typeof ol_caps=='undefined') var ol_caps = new Array("Caption 0", "Caption 1");\r
+\r
+////////\r
+// END OF CONFIGURATION\r
+// Don't change anything below this line, all configuration is above.\r
+////////\r
+\r
+\r
+\r
+\r
+\r
+////////\r
+// INIT\r
+////////\r
+// Runtime variables init. Don't change for config!\r
+var o3_text="";\r
+var o3_cap="";\r
+var o3_sticky=0;\r
+var o3_background="";\r
+var o3_close="Close";\r
+var o3_hpos=RIGHT;\r
+var o3_offsetx=2;\r
+var o3_offsety=2;\r
+var o3_fgcolor="";\r
+var o3_bgcolor="";\r
+var o3_textcolor="";\r
+var o3_capcolor="";\r
+var o3_closecolor="";\r
+var o3_width=100;\r
+var o3_border=1;\r
+var o3_cellpad=2;\r
+var o3_status="";\r
+var o3_autostatus=0;\r
+var o3_height=-1;\r
+var o3_snapx=0;\r
+var o3_snapy=0;\r
+var o3_fixx=-1;\r
+var o3_fixy=-1;\r
+var o3_relx=null;\r
+var o3_rely=null;\r
+var o3_fgbackground="";\r
+var o3_bgbackground="";\r
+var o3_padxl=0;\r
+var o3_padxr=0;\r
+var o3_padyt=0;\r
+var o3_padyb=0;\r
+var o3_fullhtml=0;\r
+var o3_vpos=BELOW;\r
+var o3_aboveheight=0;\r
+var o3_capicon="";\r
+var o3_textfont="Verdana,Arial,Helvetica";\r
+var o3_captionfont="Verdana,Arial,Helvetica";\r
+var o3_closefont="Verdana,Arial,Helvetica";\r
+var o3_textsize="1";\r
+var o3_captionsize="1";\r
+var o3_closesize="1";\r
+var o3_frame=self;\r
+var o3_timeout=0;\r
+var o3_timerid=0;\r
+var o3_allowmove=0;\r
+var o3_function=null; \r
+var o3_delay=0;\r
+var o3_delayid=0;\r
+var o3_hauto=0;\r
+var o3_vauto=0;\r
+var o3_closeclick=0;\r
+var o3_wrap=0;\r
+var o3_followmouse=1;\r
+var o3_mouseoff=0;\r
+var o3_closetitle='';\r
+var o3_compatmode=0;\r
+var o3_css=CSSOFF;\r
+var o3_fgclass="";\r
+var o3_bgclass="";\r
+var o3_textfontclass="";\r
+var o3_captionfontclass="";\r
+var o3_closefontclass="";\r
+\r
+// Display state variables\r
+var o3_x = 0;\r
+var o3_y = 0;\r
+var o3_showingsticky = 0;\r
+var o3_removecounter = 0;\r
+\r
+// Our layer\r
+var over = null;\r
+var fnRef, hoveringSwitch = false;\r
+var olHideDelay;\r
+\r
+// Decide browser version\r
+var isMac = (navigator.userAgent.indexOf("Mac") != -1);\r
+var olOp = (navigator.userAgent.toLowerCase().indexOf('opera') > -1 && document.createTextNode); // Opera 7\r
+var olNs4 = (navigator.appName=='Netscape' && parseInt(navigator.appVersion) == 4);\r
+var olNs6 = (document.getElementById) ? true : false;\r
+var olKq = (olNs6 && /konqueror/i.test(navigator.userAgent));\r
+var olIe4 = (document.all) ? true : false;\r
+var olIe5 = false; \r
+var olIe55 = false; // Added additional variable to identify IE5.5+\r
+var docRoot = 'document.body';\r
+\r
+// Resize fix for NS4.x to keep track of layer\r
+if (olNs4) {\r
+ var oW = window.innerWidth;\r
+ var oH = window.innerHeight;\r
+ window.onresize = function() { if (oW != window.innerWidth || oH != window.innerHeight) location.reload(); }\r
+}\r
+\r
+// Microsoft Stupidity Check(tm).\r
+if (olIe4) {\r
+ var agent = navigator.userAgent;\r
+ if (/MSIE/.test(agent)) {\r
+ var versNum = parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]);\r
+ if (versNum >= 5){\r
+ olIe5=true;\r
+ olIe55=(versNum>=5.5&&!olOp) ? true : false;\r
+ if (olNs6) olNs6=false;\r
+ }\r
+ }\r
+ if (olNs6) olIe4 = false;\r
+}\r
+\r
+// Check for compatability mode.\r
+if (document.compatMode && document.compatMode == 'CSS1Compat') {\r
+ docRoot= ((olIe4 && !olOp) ? 'document.documentElement' : docRoot);\r
+}\r
+\r
+// Add window onload handlers to indicate when all modules have been loaded\r
+// For Netscape 6+ and Mozilla, uses addEventListener method on the window object\r
+// For IE it uses the attachEvent method of the window object and for Netscape 4.x\r
+// it sets the window.onload handler to the OLonload_handler function for Bubbling\r
+if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,false);\r
+else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler);\r
+\r
+// Capture events, alt. diffuses the overlib function.\r
+var olCheckMouseCapture = true;\r
+if ((olNs4 || olNs6 || olIe4)) {\r
+ olMouseCapture();\r
+} else {\r
+ overlib = no_overlib;\r
+ nd = no_overlib;\r
+ ver3fix = true;\r
+}\r
+\r
+\r
+////////\r
+// PUBLIC FUNCTIONS\r
+////////\r
+\r
+// overlib(arg0,...,argN)\r
+// Loads parameters into global runtime variables.\r
+function overlib() {\r
+ if (!olLoaded || isExclusive(overlib.arguments)) return true;\r
+ if (olCheckMouseCapture) olMouseCapture();\r
+ if (over) {\r
+ over = (typeof over.id != 'string') ? o3_frame.document.all['overDiv'] : over;\r
+ cClick();\r
+ }\r
+\r
+ // Load defaults to runtime.\r
+ olHideDelay=0;\r
+ o3_text=ol_text;\r
+ o3_cap=ol_cap;\r
+ o3_sticky=ol_sticky;\r
+ o3_background=ol_background;\r
+ o3_close=ol_close;\r
+ o3_hpos=ol_hpos;\r
+ o3_offsetx=ol_offsetx;\r
+ o3_offsety=ol_offsety;\r
+ o3_fgcolor=ol_fgcolor;\r
+ o3_bgcolor=ol_bgcolor;\r
+ o3_textcolor=ol_textcolor;\r
+ o3_capcolor=ol_capcolor;\r
+ o3_closecolor=ol_closecolor;\r
+ o3_width=ol_width;\r
+ o3_border=ol_border;\r
+ o3_cellpad=ol_cellpad;\r
+ o3_status=ol_status;\r
+ o3_autostatus=ol_autostatus;\r
+ o3_height=ol_height;\r
+ o3_snapx=ol_snapx;\r
+ o3_snapy=ol_snapy;\r
+ o3_fixx=ol_fixx;\r
+ o3_fixy=ol_fixy;\r
+ o3_relx=ol_relx;\r
+ o3_rely=ol_rely;\r
+ o3_fgbackground=ol_fgbackground;\r
+ o3_bgbackground=ol_bgbackground;\r
+ o3_padxl=ol_padxl;\r
+ o3_padxr=ol_padxr;\r
+ o3_padyt=ol_padyt;\r
+ o3_padyb=ol_padyb;\r
+ o3_fullhtml=ol_fullhtml;\r
+ o3_vpos=ol_vpos;\r
+ o3_aboveheight=ol_aboveheight;\r
+ o3_capicon=ol_capicon;\r
+ o3_textfont=ol_textfont;\r
+ o3_captionfont=ol_captionfont;\r
+ o3_closefont=ol_closefont;\r
+ o3_textsize=ol_textsize;\r
+ o3_captionsize=ol_captionsize;\r
+ o3_closesize=ol_closesize;\r
+ o3_timeout=ol_timeout;\r
+ o3_function=ol_function;\r
+ o3_delay=ol_delay;\r
+ o3_hauto=ol_hauto;\r
+ o3_vauto=ol_vauto;\r
+ o3_closeclick=ol_closeclick;\r
+ o3_wrap=ol_wrap; \r
+ o3_followmouse=ol_followmouse;\r
+ o3_mouseoff=ol_mouseoff;\r
+ o3_closetitle=ol_closetitle;\r
+ o3_css=ol_css;\r
+ o3_compatmode=ol_compatmode;\r
+ o3_fgclass=ol_fgclass;\r
+ o3_bgclass=ol_bgclass;\r
+ o3_textfontclass=ol_textfontclass;\r
+ o3_captionfontclass=ol_captionfontclass;\r
+ o3_closefontclass=ol_closefontclass;\r
+ \r
+ setRunTimeVariables();\r
+ \r
+ fnRef = '';\r
+ \r
+ // Special for frame support, over must be reset...\r
+ o3_frame = ol_frame;\r
+ \r
+ if(!(over=createDivContainer())) return false;\r
+\r
+ parseTokens('o3_', overlib.arguments);\r
+ if (!postParseChecks()) return false;\r
+\r
+ if (o3_delay == 0) {\r
+ return runHook("olMain", FREPLACE);\r
+ } else {\r
+ o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay);\r
+ return false;\r
+ }\r
+}\r
+\r
+// Clears popups if appropriate\r
+function nd(time) {\r
+ if (olLoaded && !isExclusive()) {\r
+ hideDelay(time); // delay popup close if time specified\r
+\r
+ if (o3_removecounter >= 1) { o3_showingsticky = 0 };\r
+ \r
+ if (o3_showingsticky == 0) {\r
+ o3_allowmove = 0;\r
+ if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over);\r
+ } else {\r
+ o3_removecounter++;\r
+ }\r
+ }\r
+ \r
+ return true;\r
+}\r
+\r
+// The Close onMouseOver function for stickies\r
+function cClick() {\r
+ if (olLoaded) {\r
+ runHook("hideObject", FREPLACE, over);\r
+ o3_showingsticky = 0; \r
+ } \r
+ return false;\r
+}\r
+\r
+// Method for setting page specific defaults.\r
+function overlib_pagedefaults() {\r
+ parseTokens('ol_', overlib_pagedefaults.arguments);\r
+}\r
+\r
+\r
+////////\r
+// OVERLIB MAIN FUNCTION\r
+////////\r
+\r
+// This function decides what it is we want to display and how we want it done.\r
+function olMain() {\r
+ var layerhtml, styleType;\r
+ runHook("olMain", FBEFORE);\r
+ \r
+ if (o3_background!="" || o3_fullhtml) {\r
+ // Use background instead of box.\r
+ layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);\r
+ } else {\r
+ // They want a popup box.\r
+ styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass");\r
+\r
+ // Prepare popup background\r
+ if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\"";\r
+ if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground);\r
+\r
+ // Prepare popup colors\r
+ if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor);\r
+ if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor);\r
+\r
+ // Prepare popup height\r
+ if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height);\r
+ else o3_height = "";\r
+\r
+ // Decide which kinda box.\r
+ if (o3_cap=="") {\r
+ // Plain\r
+ layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);\r
+ } else {\r
+ // With caption\r
+ if (o3_sticky) {\r
+ // Show close text\r
+ layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close);\r
+ } else {\r
+ // No close text\r
+ layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, "");\r
+ }\r
+ }\r
+ } \r
+\r
+ // We want it to stick!\r
+ if (o3_sticky) {\r
+ if (o3_timerid > 0) {\r
+ clearTimeout(o3_timerid);\r
+ o3_timerid = 0;\r
+ }\r
+ o3_showingsticky = 1;\r
+ o3_removecounter = 0;\r
+ }\r
+\r
+ // Created a separate routine to generate the popup to make it easier\r
+ // to implement a plugin capability\r
+ if (!runHook("createPopup", FREPLACE, layerhtml)) return false;\r
+\r
+ // Prepare status bar\r
+ if (o3_autostatus > 0) {\r
+ o3_status = o3_text;\r
+ if (o3_autostatus > 1) o3_status = o3_cap;\r
+ }\r
+\r
+ // When placing the layer the first time, even stickies may be moved.\r
+ o3_allowmove = 0;\r
+\r
+ // Initiate a timer for timeout\r
+ if (o3_timeout > 0) { \r
+ if (o3_timerid > 0) clearTimeout(o3_timerid);\r
+ o3_timerid = setTimeout("cClick()", o3_timeout);\r
+ }\r
+\r
+ // Show layer\r
+ runHook("disp", FREPLACE, o3_status);\r
+ runHook("olMain", FAFTER);\r
+\r
+ return (olOp && event && event.type == 'mouseover' && !o3_status) ? '' : (o3_status != '');\r
+}\r
+\r
+////////\r
+// LAYER GENERATION FUNCTIONS\r
+////////\r
+// These functions just handle popup content with tags that should adhere to the W3C standards specification.\r
+\r
+// Makes simple table without caption\r
+function ol_content_simple(text) {\r
+ txt='<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass ? 'class="'+o3_bgclass+'"' : o3_bgcolor+' '+o3_height)+'><tr><td><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" '+(o3_fgclass ? 'class="'+o3_fgclass+'"' : o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign="TOP"'+(o3_textfontclass ? ' class="'+o3_textfontclass+'">' : '>')+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'</td></tr></table></td></tr></table>';\r
+\r
+ set_background("");\r
+ return txt;\r
+}\r
+\r
+// Makes table with caption and optional close link\r
+function ol_content_caption(text,title,close) {\r
+ var nameId;\r
+ closing="";\r
+ closeevent="onmouseover";\r
+ if (o3_closeclick==1) closeevent= (o3_closetitle ? "title='" + o3_closetitle +"'" : "") + " onclick";\r
+ if (o3_capicon!="") {\r
+ nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';\r
+ if (typeof o3_dragimg!='undefined'&&o3_dragimg) nameId=' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';\r
+ o3_capicon='<img src=\"'+o3_capicon+'\"'+nameId+' />';\r
+ }\r
+\r
+ if (close != "") \r
+ closing='<td '+(!o3_compatmode && o3_closefontclass ? 'class="'+o3_closefontclass : 'align="RIGHT')+'"><a href="javascript:return '+fnRef+'cClick();"'+((o3_compatmode && o3_closefontclass) ? ' class="' + o3_closefontclass + '" ' : ' ')+closeevent+'="return '+fnRef+'cClick();">'+(o3_closefontclass ? '' : wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass ? '' : wrapStr(1,o3_closesize,'close'))+'</a></td>';\r
+ txt='<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass ? 'class="'+o3_bgclass+'"' : o3_bgcolor+' '+o3_bgbackground+' '+o3_height)+'><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td'+(o3_captionfontclass ? ' class="'+o3_captionfontclass+'">' : '>')+(o3_captionfontclass ? '' : '<b>'+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass ? '' : wrapStr(1,o3_captionsize)+'</b>')+'</td>'+closing+'</tr></table><table width="100%" border="0" cellpadding="' + o3_cellpad + '" cellspacing="0" '+(o3_fgclass ? 'class="'+o3_fgclass+'"' : o3_fgcolor+' '+o3_fgbackground+' '+o3_height)+'><tr><td valign="TOP"'+(o3_textfontclass ? ' class="'+o3_textfontclass+'">' :'>')+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize)) + '</td></tr></table></td></tr></table>';\r
+\r
+ set_background("");\r
+ return txt;\r
+}\r
+\r
+// Sets the background picture,padding and lots more. :)\r
+function ol_content_background(text,picture,hasfullhtml) {\r
+ if (hasfullhtml) {\r
+ txt=text;\r
+ } else {\r
+ txt='<table width="'+o3_width+'" border="0" cellpadding="0" cellspacing="0" height="'+o3_height+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'+o3_padxl+'"></td><td valign="TOP" width="'+(o3_width-o3_padxl-o3_padxr)+(o3_textfontclass ? '" class="'+o3_textfontclass : '')+'">'+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+'"></td></tr></table>';\r
+ }\r
+\r
+ set_background(picture);\r
+ return txt;\r
+}\r
+\r
+// Loads a picture into the div.\r
+function set_background(pic) {\r
+ if (pic == "") {\r
+ if (olNs4) {\r
+ over.background.src = null; \r
+ } else if (over.style) {\r
+ over.style.backgroundImage = "none";\r
+ }\r
+ } else {\r
+ if (olNs4) {\r
+ over.background.src = pic;\r
+ } else if (over.style) {\r
+ over.style.width=o3_width + 'px';\r
+ over.style.backgroundImage = "url("+pic+")";\r
+ }\r
+ }\r
+}\r
+\r
+////////\r
+// HANDLING FUNCTIONS\r
+////////\r
+var olShowId=-1;\r
+\r
+// Displays the popup\r
+function disp(statustext) {\r
+ runHook("disp", FBEFORE);\r
+ \r
+ if (o3_allowmove == 0) {\r
+ runHook("placeLayer", FREPLACE);\r
+ (olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over);\r
+ o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1;\r
+ }\r
+ \r
+ runHook("disp", FAFTER);\r
+\r
+ if (statustext != "") self.status = statustext;\r
+}\r
+\r
+// Creates the actual popup structure\r
+function createPopup(lyrContent){\r
+ runHook("createPopup", FBEFORE);\r
+ \r
+ if (o3_wrap) {\r
+ var wd,ww,theObj=(olNs4 ? over : over.style);\r
+ theObj.top=theObj.left=-10000 + (!olNs4 ? 'px' : 0);\r
+ layerWrite(lyrContent);\r
+ wd = (olNs4 ? over.clip.width : over.offsetWidth);\r
+ if (wd > (ww=windowWidth())) {\r
+ lyrContent=lyrContent.replace(/\ /g, ' ');\r
+ o3_width=ww;\r
+ o3_wrap=0;\r
+ } \r
+ }\r
+\r
+ layerWrite(lyrContent);\r
+ \r
+ // Have to set o3_width for placeLayer() routine if o3_wrap is turned on\r
+ if (o3_wrap) o3_width=(olNs4 ? over.clip.width : over.offsetWidth);\r
+ \r
+ runHook("createPopup", FAFTER, lyrContent);\r
+\r
+ return true;\r
+}\r
+\r
+// Decides where we want the popup.\r
+function placeLayer() {\r
+ var placeX, placeY, widthFix = 0;\r
+ \r
+ // HORIZONTAL PLACEMENT, re-arranged to work in Safari\r
+ if (o3_frame.innerWidth) widthFix=18; \r
+ iwidth = windowWidth();\r
+\r
+ // Horizontal scroll offset\r
+ winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;\r
+\r
+ placeX = runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix);\r
+\r
+ // VERTICAL PLACEMENT, re-arranged to work in Safari\r
+ if (o3_frame.innerHeight) {\r
+ iheight=o3_frame.innerHeight;\r
+ } else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight')) { \r
+ iheight=eval('o3_frame.'+docRoot+'.clientHeight');\r
+ } \r
+\r
+ // Vertical scroll offset\r
+ scrolloffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;\r
+ placeY = runHook('verticalPlacement',FCHAIN,iheight,scrolloffset);\r
+\r
+ // Actually move the object.\r
+ repositionTo(over, placeX, placeY);\r
+}\r
+\r
+// Moves the layer\r
+function olMouseMove(e) {\r
+ var e = (e) ? e : event;\r
+\r
+ if (e.pageX) {\r
+ o3_x = e.pageX;\r
+ o3_y = e.pageY;\r
+ } else if (e.clientX) {\r
+ o3_x = eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft');\r
+ o3_y = eval('e.clientY+o3_frame.'+docRoot+'.scrollTop');\r
+ }\r
+ \r
+ if (o3_allowmove == 1) runHook("placeLayer", FREPLACE);\r
+\r
+ // MouseOut handler\r
+ if (hoveringSwitch && !olNs4 && runHook("cursorOff", FREPLACE)) {\r
+ (olHideDelay ? hideDelay(olHideDelay) : cClick());\r
+ hoveringSwitch = !hoveringSwitch;\r
+ }\r
+}\r
+\r
+// Fake function for 3.0 users.\r
+function no_overlib() { return ver3fix; }\r
+\r
+// Capture the mouse and chain other scripts.\r
+function olMouseCapture() {\r
+ capExtent = document;\r
+ var fN, str, l, k, f, mseHandler = olMouseMove;\r
+ var re = /function[ ]*(\w*)\(/;\r
+ \r
+ if (document.onmousemove || (!olIe4 && window.onmousemove)) {\r
+ if (window.onmousemove) capExtent = window;\r
+ f = capExtent.onmousemove.toString();\r
+ fN = f.match(re);\r
+\r
+ if (fN==null) {\r
+ str=f+'(e); ';\r
+ } else if (fN[1] == 'anonymous' || fN[1] == 'olMouseMove') {\r
+ olCheckMouseCapture = false;\r
+ return;\r
+ } else {\r
+ if (fN[1]) str = fN[1]+'(e); ';\r
+ else {\r
+ l=f.indexOf('{')+1;\r
+ k=f.lastIndexOf('}');\r
+ str=f.substring(l,k) + '\n';\r
+ }\r
+ }\r
+\r
+ str += 'olMouseMove(e); ';\r
+ mseHandler = new Function('e', str);\r
+ }\r
+\r
+ capExtent.onmousemove = mseHandler;\r
+ if (olNs4) capExtent.captureEvents(Event.MOUSEMOVE);\r
+}\r
+\r
+////////\r
+// PARSING FUNCTIONS\r
+////////\r
+\r
+// Does the actual command parsing.\r
+function parseTokens(pf, ar) {\r
+ // What the next argument is expected to be.\r
+ var v, mode=-1, par = (pf != 'ol_'); \r
+ var fnMark = (par && !ar.length ? 1 : 0);\r
+\r
+ for (i = 0; i < ar.length; i++) {\r
+ if (mode < 0) {\r
+ // Arg is maintext,unless its a number between pmStart and pmUpper\r
+ // then its a command.\r
+ if (typeof ar[i] == 'number' && ar[i] > pmStart && ar[i] < pmUpper) {\r
+ fnMark = (par ? 1 : 0);\r
+ i--; // backup one so that the next block can parse it\r
+ } else {\r
+ switch(pf) {\r
+ case 'ol_':\r
+ ol_text = ar[i].toString();\r
+ break;\r
+ default:\r
+ o3_text=ar[i].toString(); \r
+ }\r
+ }\r
+ mode = 0;\r
+ } else {\r
+ // Note: NS4 doesn't like switch cases with vars.\r
+ if (ar[i] >= pmCount || ar[i]==DONOTHING) { continue; }\r
+ if (ar[i]==INARRAY) { fnMark = 0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; }\r
+ if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; }\r
+ if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; }\r
+ if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; }\r
+ if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==CENTER || ar[i]==LEFT || ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); if(pf!='ol_') olHautoFlag=1; continue; }\r
+ if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; }\r
+ if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; }\r
+ if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; }\r
+ if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; }\r
+ if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; }\r
+ if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==AUTOSTATUS) { eval(pf +'autostatus=('+pf+'autostatus == 1) ? 0 : 1'); continue; }\r
+ if (ar[i]==AUTOSTATUSCAP) { eval(pf +'autostatus=('+pf+'autostatus == 2) ? 0 : 2'); continue; }\r
+ if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } // Same param again.\r
+ if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; }\r
+ if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; }\r
+ if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; }\r
+ if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; }\r
+ if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; }\r
+ if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; }\r
+ if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; }\r
+ if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; }\r
+ if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; }\r
+ if (ar[i]==BELOW || ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); if (pf!='ol_') olVautoFlag=1; continue; }\r
+ if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; }\r
+ if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function' ? v : null); }} else {fnMark = 0; v = null; if (typeof ar[i+1]!='number') v = ar[++i]; opt_FUNCTION(v); } continue; }\r
+ if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; }\r
+ if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto == 0) ? 1 : 0'); continue; }\r
+ if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto == 0) ? 1 : 0'); continue; }\r
+ if (ar[i]==CLOSECLICK) { eval(pf +'closeclick=('+pf+'closeclick == 0) ? 1 : 0'); continue; }\r
+ if (ar[i]==WRAP) { eval(pf +'wrap=('+pf+'wrap == 0) ? 1 : 0'); continue; }\r
+ if (ar[i]==FOLLOWMOUSE) { eval(pf +'followmouse=('+pf+'followmouse == 1) ? 0 : 1'); continue; }\r
+ if (ar[i]==MOUSEOFF) { eval(pf +'mouseoff=('+pf+'mouseoff==0) ? 1 : 0'); v=ar[i+1]; if (pf != 'ol_' && eval(pf+'mouseoff') && typeof v == 'number' && (v < pmStart || v > pmUpper)) olHideDelay=ar[++i]; continue; }\r
+ if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; }\r
+ if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; }\r
+ if (ar[i]==COMPATMODE) { eval(pf+'compatmode=('+pf+'compatmode==0) ? 1 : 0'); continue; }\r
+ if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; }\r
+ if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; }\r
+ i = parseCmdLine(pf, i, ar);\r
+ }\r
+ }\r
+\r
+ if (fnMark && o3_function) o3_text = o3_function();\r
+ \r
+ if ((pf == 'o3_') && o3_wrap) {\r
+ o3_width = 0;\r
+ \r
+ var tReg=/<.*\n*>/ig;\r
+ if (!tReg.test(o3_text)) o3_text = o3_text.replace(/[ ]+/g, ' ');\r
+ if (!tReg.test(o3_cap))o3_cap = o3_cap.replace(/[ ]+/g, ' ');\r
+ }\r
+ if ((pf == 'o3_') && o3_sticky) {\r
+ if (!o3_close && (o3_frame != ol_frame)) o3_close = ol_close;\r
+ if (o3_mouseoff && (o3_frame == ol_frame)) opt_NOCLOSE(' ');\r
+ }\r
+}\r
+\r
+\r
+////////\r
+// LAYER FUNCTIONS\r
+////////\r
+\r
+// Writes to a layer\r
+function layerWrite(txt) {\r
+ txt += "\n";\r
+ if (olNs4) {\r
+ var lyr = o3_frame.document.layers['overDiv'].document\r
+ lyr.write(txt)\r
+ lyr.close()\r
+ } else if (typeof over.innerHTML != 'undefined') {\r
+ if (olIe5 && isMac) over.innerHTML = '';\r
+ over.innerHTML = txt;\r
+ } else {\r
+ range = o3_frame.document.createRange();\r
+ range.setStartAfter(over);\r
+ domfrag = range.createContextualFragment(txt);\r
+ \r
+ while (over.hasChildNodes()) {\r
+ over.removeChild(over.lastChild);\r
+ }\r
+ \r
+ over.appendChild(domfrag);\r
+ }\r
+}\r
+\r
+// Make an object visible\r
+function showObject(obj) {\r
+ runHook("showObject", FBEFORE);\r
+\r
+ var theObj=(olNs4 ? obj : obj.style);\r
+ theObj.visibility = 'visible';\r
+\r
+ runHook("showObject", FAFTER);\r
+}\r
+\r
+// Hides an object\r
+function hideObject(obj) {\r
+ runHook("hideObject", FBEFORE);\r
+\r
+ var theObj=(olNs4 ? obj : obj.style);\r
+ if (olNs6 && olShowId>0) { clearTimeout(olShowId); olShowId=0; }\r
+ theObj.visibility = 'hidden';\r
+ theObj.top=theObj.left=-10000 + (!olNs4 ? 'px' : 0);\r
+\r
+ if (o3_timerid > 0) clearTimeout(o3_timerid);\r
+ if (o3_delayid > 0) clearTimeout(o3_delayid);\r
+\r
+ o3_timerid = 0;\r
+ o3_delayid = 0;\r
+ self.status = "";\r
+\r
+ if (obj.onmouseout || obj.onmouseover) {\r
+ if (olNs4) obj.releaseEvents(Event.MOUSEOUT || Event.MOUSEOVER);\r
+ obj.onmouseout = obj.onmouseover = null;\r
+ }\r
+\r
+ runHook("hideObject", FAFTER);\r
+}\r
+\r
+// Move a layer\r
+function repositionTo(obj, xL, yL) {\r
+ var theObj=(olNs4 ? obj : obj.style);\r
+ theObj.left = xL + (!olNs4 ? 'px' : 0);\r
+ theObj.top = yL + (!olNs4 ? 'px' : 0);\r
+}\r
+\r
+// Check position of cursor relative to overDiv DIVision; mouseOut function\r
+function cursorOff() {\r
+ var left = parseInt(over.style.left);\r
+ var top = parseInt(over.style.top);\r
+ var right = left + (over.offsetWidth >= parseInt(o3_width) ? over.offsetWidth : parseInt(o3_width));\r
+ var bottom = top + (over.offsetHeight >= o3_aboveheight ? over.offsetHeight : o3_aboveheight);\r
+\r
+ if (o3_x < left || o3_x > right || o3_y < top || o3_y > bottom) return true;\r
+\r
+ return false;\r
+}\r
+\r
+\r
+////////\r
+// COMMAND FUNCTIONS\r
+////////\r
+\r
+// Calls callme or the default function.\r
+function opt_FUNCTION(callme) {\r
+ o3_text = (callme ? (typeof callme=='string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() : 'No Function'));\r
+\r
+ return 0;\r
+}\r
+\r
+// Handle hovering\r
+function opt_NOCLOSE(unused) {\r
+ if (!unused) o3_close = "";\r
+\r
+ if (olNs4) {\r
+ over.captureEvents(Event.MOUSEOUT || Event.MOUSEOVER);\r
+ over.onmouseover = function () { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } }\r
+ over.onmouseout = function (e) { if (olHideDelay) hideDelay(olHideDelay); else cClick(e); }\r
+ } else {\r
+ over.onmouseover = function () {hoveringSwitch = true; if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid =0; } }\r
+ }\r
+\r
+ return 0;\r
+}\r
+\r
+// Function to scan command line arguments for multiples\r
+function opt_MULTIPLEARGS(i, args, parameter) {\r
+ var k=i, re, pV, str='';\r
+\r
+ for(k=i; k<args.length; k++) {\r
+ if(typeof args[k] == 'number' && args[k]>pmStart) break;\r
+ str += args[k] + ',';\r
+ }\r
+ if (str) str = str.substring(0,--str.length);\r
+\r
+ k--; // reduce by one so the for loop this is in works correctly\r
+ pV=(olNs4 && /cellpad/i.test(parameter)) ? str.split(',')[0] : str;\r
+ eval(parameter + '="' + pV + '"');\r
+\r
+ return k;\r
+}\r
+\r
+// Remove in texts when done.\r
+function nbspCleanup() {\r
+ if (o3_wrap) {\r
+ o3_text = o3_text.replace(/\ /g, ' ');\r
+ o3_cap = o3_cap.replace(/\ /g, ' ');\r
+ }\r
+}\r
+\r
+// Escape embedded single quotes in text strings\r
+function escSglQuote(str) {\r
+ return str.toString().replace(/'/g,"\\'");\r
+}\r
+\r
+// Onload handler for window onload event\r
+function OLonLoad_handler(e) {\r
+ var re = /\w+\(.*\)[;\s]+/g, olre = /overlib\(|nd\(|cClick\(/, fn, l, i;\r
+\r
+ if(!olLoaded) olLoaded=1;\r
+\r
+ // Remove it for Gecko based browsers\r
+ if(window.removeEventListener && e.eventPhase == 3) window.removeEventListener("load",OLonLoad_handler,false);\r
+ else if(window.detachEvent) { // and for IE and Opera 4.x but execute calls to overlib, nd, or cClick()\r
+ window.detachEvent("onload",OLonLoad_handler);\r
+ var fN = document.body.getAttribute('onload');\r
+ if (fN) {\r
+ fN=fN.toString().match(re);\r
+ if (fN && fN.length) {\r
+ for (i=0; i<fN.length; i++) {\r
+ if (/anonymous/.test(fN[i])) continue;\r
+ while((l=fN[i].search(/\)[;\s]+/)) != -1) {\r
+ fn=fN[i].substring(0,l+1);\r
+ fN[i] = fN[i].substring(l+2);\r
+ if (olre.test(fn)) eval(fn);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+// Wraps strings in Layer Generation Functions with the correct tags\r
+// endWrap true(if end tag) or false if start tag\r
+// fontSizeStr - font size string such as '1' or '10px'\r
+// whichString is being wrapped -- 'text', 'caption', or 'close'\r
+function wrapStr(endWrap,fontSizeStr,whichString) {\r
+ var fontStr, fontColor, isClose=((whichString=='close') ? 1 : 0), hasDims=/[%\-a-z]+$/.test(fontSizeStr);\r
+ fontSizeStr = (olNs4) ? (!hasDims ? fontSizeStr : '1') : fontSizeStr;\r
+ if (endWrap) return (hasDims&&!olNs4) ? (isClose ? '</span>' : '</div>') : '</font>';\r
+ else {\r
+ fontStr='o3_'+whichString+'font';\r
+ fontColor='o3_'+((whichString=='caption')? 'cap' : whichString)+'color';\r
+ return (hasDims&&!olNs4) ? (isClose ? '<span style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">' : '<div style="font-family: '+quoteMultiNameFonts(eval(fontStr))+'; color: '+eval(fontColor)+'; font-size: '+fontSizeStr+';">') : '<font face="'+eval(fontStr)+'" color="'+eval(fontColor)+'" size="'+(parseInt(fontSizeStr)>7 ? '7' : fontSizeStr)+'">';\r
+ }\r
+}\r
+\r
+// Quotes Multi word font names; needed for CSS Standards adherence in font-family\r
+function quoteMultiNameFonts(theFont) {\r
+ var v, pM=theFont.split(',');\r
+ for (var i=0; i<pM.length; i++) {\r
+ v=pM[i];\r
+ v=v.replace(/^\s+/,'').replace(/\s+$/,'');\r
+ if(/\s/.test(v) && !/['"]/.test(v)) {\r
+ v="\'"+v+"\'";\r
+ pM[i]=v;\r
+ }\r
+ }\r
+ return pM.join();\r
+}\r
+\r
+// dummy function which will be overridden \r
+function isExclusive(args) {\r
+ return false;\r
+}\r
+\r
+// function will delay close by time milliseconds\r
+function hideDelay(time) {\r
+ if (time&&!o3_delay) {\r
+ if (o3_timerid > 0) clearTimeout(o3_timerid);\r
+\r
+ o3_timerid=setTimeout("cClick()",(o3_timeout=time));\r
+ }\r
+}\r
+\r
+// Was originally in the placeLayer() routine; separated out for future ease\r
+function horizontalPlacement(browserWidth, horizontalScrollAmount, widthFix) {\r
+ var placeX, iwidth=browserWidth, winoffset=horizontalScrollAmount;\r
+ var parsedWidth = parseInt(o3_width);\r
+\r
+ if (o3_fixx > -1 || o3_relx != null) {\r
+ // Fixed position\r
+ placeX=(o3_relx != null ? ( o3_relx < 0 ? winoffset +o3_relx+ iwidth - parsedWidth - widthFix : winoffset+o3_relx) : o3_fixx);\r
+ } else { \r
+ // If HAUTO, decide what to use.\r
+ if (o3_hauto == 1) {\r
+ if ((o3_x - winoffset) > (iwidth / 2)) {\r
+ o3_hpos = LEFT;\r
+ } else {\r
+ o3_hpos = RIGHT;\r
+ }\r
+ } \r
+\r
+ // From mouse\r
+ if (o3_hpos == CENTER) { // Center\r
+ placeX = o3_x+o3_offsetx-(parsedWidth/2);\r
+\r
+ if (placeX < winoffset) placeX = winoffset;\r
+ }\r
+\r
+ if (o3_hpos == RIGHT) { // Right\r
+ placeX = o3_x+o3_offsetx;\r
+\r
+ if ((placeX+parsedWidth) > (winoffset+iwidth - widthFix)) {\r
+ placeX = iwidth+winoffset - parsedWidth - widthFix;\r
+ if (placeX < 0) placeX = 0;\r
+ }\r
+ }\r
+ if (o3_hpos == LEFT) { // Left\r
+ placeX = o3_x-o3_offsetx-parsedWidth;\r
+ if (placeX < winoffset) placeX = winoffset;\r
+ } \r
+\r
+ // Snapping!\r
+ if (o3_snapx > 1) {\r
+ var snapping = placeX % o3_snapx;\r
+\r
+ if (o3_hpos == LEFT) {\r
+ placeX = placeX - (o3_snapx+snapping);\r
+ } else {\r
+ // CENTER and RIGHT\r
+ placeX = placeX+(o3_snapx - snapping);\r
+ }\r
+\r
+ if (placeX < winoffset) placeX = winoffset;\r
+ }\r
+ } \r
+\r
+ return placeX;\r
+}\r
+\r
+// was originally in the placeLayer() routine; separated out for future ease\r
+function verticalPlacement(browserHeight,verticalScrollAmount) {\r
+ var placeY, iheight=browserHeight, scrolloffset=verticalScrollAmount;\r
+ var parsedHeight=(o3_aboveheight ? parseInt(o3_aboveheight) : (olNs4 ? over.clip.height : over.offsetHeight));\r
+\r
+ if (o3_fixy > -1 || o3_rely != null) {\r
+ // Fixed position\r
+ placeY=(o3_rely != null ? (o3_rely < 0 ? scrolloffset+o3_rely+iheight - parsedHeight : scrolloffset+o3_rely) : o3_fixy);\r
+ } else {\r
+ // If VAUTO, decide what to use.\r
+ if (o3_vauto == 1) {\r
+ if ((o3_y - scrolloffset) > (iheight / 2) && o3_vpos == BELOW && (o3_y + parsedHeight + o3_offsety - (scrolloffset + iheight) > 0)) {\r
+ o3_vpos = ABOVE;\r
+ } else if (o3_vpos == ABOVE && (o3_y - (parsedHeight + o3_offsety) - scrolloffset < 0)) {\r
+ o3_vpos = BELOW;\r
+ }\r
+ }\r
+\r
+ // From mouse\r
+ if (o3_vpos == ABOVE) {\r
+ if (o3_aboveheight == 0) o3_aboveheight = parsedHeight; \r
+\r
+ placeY = o3_y - (o3_aboveheight+o3_offsety);\r
+ if (placeY < scrolloffset) placeY = scrolloffset;\r
+ } else {\r
+ // BELOW\r
+ placeY = o3_y+o3_offsety;\r
+ } \r
+\r
+ // Snapping!\r
+ if (o3_snapy > 1) {\r
+ var snapping = placeY % o3_snapy; \r
+\r
+ if (o3_aboveheight > 0 && o3_vpos == ABOVE) {\r
+ placeY = placeY - (o3_snapy+snapping);\r
+ } else {\r
+ placeY = placeY+(o3_snapy - snapping);\r
+ } \r
+\r
+ if (placeY < scrolloffset) placeY = scrolloffset;\r
+ }\r
+ }\r
+\r
+ return placeY;\r
+}\r
+\r
+// checks positioning flags\r
+function checkPositionFlags() {\r
+ if (olHautoFlag) olHautoFlag = o3_hauto=0;\r
+ if (olVautoFlag) olVautoFlag = o3_vauto=0;\r
+ return true;\r
+}\r
+\r
+// get Browser window width\r
+function windowWidth() {\r
+ var w;\r
+ if (o3_frame.innerWidth) w=o3_frame.innerWidth;\r
+ else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth')) \r
+ w=eval('o3_frame.'+docRoot+'.clientWidth');\r
+ return w; \r
+}\r
+\r
+// create the div container for popup content if it doesn't exist\r
+function createDivContainer(id,frm,zValue) {\r
+ id = (id || 'overDiv'), frm = (frm || o3_frame), zValue = (zValue || 1000);\r
+ var objRef, divContainer = layerReference(id);\r
+\r
+ if (divContainer == null) {\r
+ if (olNs4) {\r
+ divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm);\r
+ objRef = divContainer;\r
+ } else {\r
+ var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]);\r
+ if (olIe4&&!document.getElementById) {\r
+ body.insertAdjacentHTML("beforeEnd",'<div id="'+id+'"></div>');\r
+ divContainer=layerReference(id);\r
+ } else {\r
+ divContainer = frm.document.createElement("DIV");\r
+ divContainer.id = id;\r
+ body.appendChild(divContainer);\r
+ }\r
+ objRef = divContainer.style;\r
+ }\r
+\r
+ with (objRef) {\r
+ position = 'absolute';\r
+ visibility = 'hidden';\r
+ zIndex = zValue;\r
+ }\r
+ }\r
+\r
+ return divContainer;\r
+}\r
+\r
+// get reference to a layer with ID=id\r
+function layerReference(id) {\r
+ return (olNs4 ? o3_frame.document.layers[id] : (document.all ? o3_frame.document.all[id] : o3_frame.document.getElementById(id)));\r
+}\r
+////////\r
+// PLUGIN ACTIVATION FUNCTIONS\r
+////////\r
+\r
+// Runs plugin functions to set runtime variables.\r
+function setRunTimeVariables(){\r
+ if (typeof runTime != 'undefined' && runTime.length) {\r
+ for (var k = 0; k < runTime.length; k++) {\r
+ runTime[k]();\r
+ }\r
+ }\r
+}\r
+\r
+// Runs plugin functions to parse commands.\r
+function parseCmdLine(pf, i, args) {\r
+ if (typeof cmdLine != 'undefined' && cmdLine.length) { \r
+ for (var k = 0; k < cmdLine.length; k++) { \r
+ var j = cmdLine[k](pf, i, args);\r
+ if (j >- 1) {\r
+ i = j;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+\r
+ return i;\r
+}\r
+\r
+// Runs plugin functions to do things after parse.\r
+function postParseChecks(){\r
+ if (typeof postParse != 'undefined' && postParse.length) {\r
+ for (var k = 0; k < postParse.length; k++) {\r
+ if (postParse[k]()) continue;\r
+ return false; // end now since have an error\r
+ }\r
+ }\r
+ return true;\r
+}\r
+\r
+\r
+////////\r
+// PLUGIN REGISTRATION FUNCTIONS\r
+////////\r
+\r
+// Registers commands and creates constants.\r
+function registerCommands(cmdStr) {\r
+ if (typeof cmdStr!='string') return;\r
+\r
+ var pM = cmdStr.split(',');\r
+ pms = pms.concat(pM);\r
+\r
+ for (var i = 0; i< pM.length; i++) {\r
+ eval(pM[i].toUpperCase()+'='+pmCount++);\r
+ }\r
+}\r
+\r
+// Registers no-parameter commands\r
+function registerNoParameterCommands(cmdStr) {\r
+ if (!cmdStr && typeof cmdStr!='string') return;\r
+ pmt=(!pmt) ? cmdStr : pmt + ',' + cmdStr;\r
+}\r
+\r
+// Register a function to hook at a certain point.\r
+function registerHook(fnHookTo, fnRef, hookType, optPm) {\r
+ var hookPt, last = typeof optPm;\r
+ \r
+ if (fnHookTo == 'plgIn'||fnHookTo == 'postParse') return;\r
+ if (typeof hookPts == 'undefined') hookPts = new Array();\r
+ if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();\r
+\r
+ hookPt = hookPts[fnHookTo];\r
+\r
+ if (hookType != null) {\r
+ if (hookType == FREPLACE) {\r
+ hookPt.ovload = fnRef; // replace normal overlib routine\r
+ if (fnHookTo.indexOf('ol_content_') > -1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; \r
+\r
+ } else if (hookType == FBEFORE || hookType == FAFTER) {\r
+ var hookPt=(hookType == 1 ? hookPt.before : hookPt.after);\r
+\r
+ if (typeof fnRef == 'object') {\r
+ hookPt = hookPt.concat(fnRef);\r
+ } else {\r
+ hookPt[hookPt.length++] = fnRef;\r
+ }\r
+\r
+ if (optPm) hookPt = reOrder(hookPt, fnRef, optPm);\r
+\r
+ } else if (hookType == FALTERNATE) {\r
+ if (last=='number') hookPt.alt[pms[optPm-1-pmStart]] = fnRef;\r
+ } else if (hookType == FCHAIN) {\r
+ hookPt = hookPt.chain; \r
+ if (typeof fnRef=='object') hookPt=hookPt.concat(fnRef); // add other functions \r
+ else hookPt[hookPt.length++]=fnRef;\r
+ }\r
+\r
+ return;\r
+ }\r
+}\r
+\r
+// Register a function that will set runtime variables.\r
+function registerRunTimeFunction(fn) {\r
+ if (isFunction(fn)) {\r
+ if (typeof runTime == 'undefined') runTime = new Array();\r
+ if (typeof fn == 'object') {\r
+ runTime = runTime.concat(fn);\r
+ } else {\r
+ runTime[runTime.length++] = fn;\r
+ }\r
+ }\r
+}\r
+\r
+// Register a function that will handle command parsing.\r
+function registerCmdLineFunction(fn){\r
+ if (isFunction(fn)) {\r
+ if (typeof cmdLine == 'undefined') cmdLine = new Array();\r
+ if (typeof fn == 'object') {\r
+ cmdLine = cmdLine.concat(fn);\r
+ } else {\r
+ cmdLine[cmdLine.length++] = fn;\r
+ }\r
+ }\r
+}\r
+\r
+// Register a function that does things after command parsing. \r
+function registerPostParseFunction(fn){\r
+ if (isFunction(fn)) {\r
+ if (typeof postParse == 'undefined') postParse = new Array();\r
+ if (typeof fn == 'object') {\r
+ postParse = postParse.concat(fn);\r
+ } else {\r
+ postParse[postParse.length++] = fn;\r
+ }\r
+ }\r
+}\r
+\r
+////////\r
+// PLUGIN REGISTRATION FUNCTIONS\r
+////////\r
+\r
+// Runs any hooks registered.\r
+function runHook(fnHookTo, hookType) {\r
+ var l = hookPts[fnHookTo], k, rtnVal, optPm, arS, ar = runHook.arguments;\r
+\r
+ if (hookType == FREPLACE) {\r
+ arS = argToString(ar, 2);\r
+\r
+ if (typeof l == 'undefined' || !(l = l.ovload)) return eval(fnHookTo+'('+arS+')');\r
+ else return eval('l('+arS+')');\r
+\r
+ } else if (hookType == FBEFORE || hookType == FAFTER) {\r
+ if (typeof l == 'undefined') return;\r
+ l=(hookType == 1 ? l.before : l.after);\r
+\r
+ if (!l.length) return;\r
+\r
+ arS = argToString(ar, 2);\r
+ for (var k = 0; k < l.length; k++) eval('l[k]('+arS+')'); \r
+\r
+ } else if (hookType == FALTERNATE) {\r
+ optPm = ar[2];\r
+ arS = argToString(ar, 3);\r
+\r
+ if (typeof l == 'undefined' || (l = l.alt[pms[optPm-1-pmStart]]) == 'undefined') {\r
+ return eval(fnHookTo+'('+arS+')');\r
+ } else {\r
+ return eval('l('+arS+')');\r
+ }\r
+ } else if (hookType == FCHAIN) {\r
+ arS=argToString(ar,2);\r
+ l=l.chain;\r
+\r
+ for (k=l.length; k > 0; k--) if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0)) return rtnVal;\r
+ }\r
+}\r
+\r
+////////\r
+// UTILITY FUNCTIONS\r
+////////\r
+\r
+// Checks if something is a function.\r
+function isFunction(fnRef) {\r
+ var rtn = true;\r
+\r
+ if (typeof fnRef == 'object') {\r
+ for (var i = 0; i < fnRef.length; i++) {\r
+ if (typeof fnRef[i]=='function') continue;\r
+ rtn = false;\r
+ break;\r
+ }\r
+ } else if (typeof fnRef != 'function') {\r
+ rtn = false;\r
+ }\r
+ \r
+ return rtn;\r
+}\r
+\r
+// Converts an array into an argument string for use in eval.\r
+function argToString(array, strtInd, argName) {\r
+ var jS = strtInd, aS = '', ar = array;\r
+ argName=(argName ? argName : 'ar');\r
+ \r
+ if (ar.length > jS) {\r
+ for (var k = jS; k < ar.length; k++) aS += argName+'['+k+'], ';\r
+ aS = aS.substring(0, aS.length-2);\r
+ }\r
+ \r
+ return aS;\r
+}\r
+\r
+// Places a hook in the correct position in a hook point.\r
+function reOrder(hookPt, fnRef, order) {\r
+ if (!order || typeof order == 'undefined' || typeof order == 'number') return;\r
+ \r
+ var newPt = new Array(), match;\r
+\r
+ if (typeof order=='function') {\r
+ if (typeof fnRef=='object') {\r
+ newPt = newPt.concat(fnRef);\r
+ } else {\r
+ newPt[newPt.length++]=fnRef;\r
+ }\r
+ \r
+ for (var i = 0; i < hookPt.length; i++) {\r
+ match = false;\r
+ if (typeof fnRef == 'function' && hookPt[i] == fnRef) {\r
+ continue;\r
+ } else {\r
+ for(var j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {\r
+ match = true;\r
+ break;\r
+ }\r
+ }\r
+ if (!match) newPt[newPt.length++] = hookPt[i];\r
+ }\r
+\r
+ newPt[newPt.length++] = order;\r
+\r
+ } else if (typeof order == 'object') {\r
+ if (typeof fnRef == 'object') {\r
+ newPt = newPt.concat(fnRef);\r
+ } else {\r
+ newPt[newPt.length++] = fnRef;\r
+ }\r
+ \r
+ for (var j = 0; j < hookPt.length; j++) {\r
+ match = false;\r
+ if (typeof fnRef == 'function' && hookPt[j] == fnRef) {\r
+ continue;\r
+ } else {\r
+ for (var i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {\r
+ match = true;\r
+ break;\r
+ }\r
+ }\r
+ if (!match) newPt[newPt.length++]=hookPt[j];\r
+ }\r
+\r
+ for (i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];\r
+ newPt.length = 0;\r
+ \r
+ for (var j = 0; j < hookPt.length; j++) {\r
+ match = false;\r
+ for (var i = 0; i < order.length; i++) {\r
+ if (hookPt[j] == order[i]) {\r
+ match = true;\r
+ break;\r
+ }\r
+ }\r
+ if (!match) newPt[newPt.length++] = hookPt[j];\r
+ }\r
+ newPt = newPt.concat(order);\r
+ }\r
+\r
+ for(i = 0; i < newPt.length; i++) hookPt[i] = newPt[i];\r
+\r
+ return hookPt;\r
+}\r
+\r
+////////\r
+// OBJECT CONSTRUCTORS\r
+////////\r
+\r
+// Object for handling hooks.\r
+function FunctionReference() {\r
+ this.ovload = null;\r
+ this.before = new Array();\r
+ this.after = new Array();\r
+ this.alt = new Array();\r
+ this.chain = new Array();\r
+}\r
+\r
+// Object for simple access to the overLIB version used.\r
+// Examples: simpleversion:351 major:3 minor:5 revision:1\r
+function Info(version, prerelease) {\r
+ this.version = version;\r
+ this.prerelease = prerelease;\r
+\r
+ this.simpleversion = Math.round(this.version*100);\r
+ this.major = parseInt(this.simpleversion / 100);\r
+ this.minor = parseInt(this.simpleversion / 10) - this.major * 10;\r
+ this.revision = parseInt(this.simpleversion) - this.major * 100 - this.minor * 10;\r
+ this.meets = meets;\r
+}\r
+\r
+// checks for Core Version required\r
+function meets(reqdVersion) {\r
+ return (!reqdVersion) ? false : this.simpleversion >= Math.round(100*parseFloat(reqdVersion));\r
+}\r
+\r
+\r
+////////\r
+// STANDARD REGISTRATIONS\r
+////////\r
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSOFF);\r
+registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSOFF);\r
+registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSOFF);\r
+registerHook("ol_content_simple", ol_content_simple, FALTERNATE, CSSCLASS);\r
+registerHook("ol_content_caption", ol_content_caption, FALTERNATE, CSSCLASS);\r
+registerHook("ol_content_background", ol_content_background, FALTERNATE, CSSCLASS);\r
+registerPostParseFunction(checkPositionFlags);\r
+registerHook("hideObject", nbspCleanup, FAFTER);\r
+registerHook("horizontalPlacement", horizontalPlacement, FCHAIN);\r
+registerHook("verticalPlacement", verticalPlacement, FCHAIN);\r
+if (olNs4||(olIe5&&isMac)||olKq) olLoaded=1;\r
+registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode');\r
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+/***************************************************************************
+ * MISC
+ */
+
+// {{{ function getNow()
+
+/**
+ * function used to print the client's computer datetime on the page
+ */
+function getNow() {
+ dt=new Date();
+ dy=dt.getDay();
+ mh=dt.getMonth();
+ wd=dt.getDate();
+ yr=dt.getYear();
+ if (yr<1000) yr += 1900;
+ hr=dt.getHours();
+ mi=dt.getMinutes();
+ if (mi<10)
+ time=hr+":0"+mi;
+ else
+ time=hr+":"+mi;
+ days=new Array ("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
+ months=new Array ("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");
+ return days[dy]+" "+wd+" "+months[mh]+" "+yr+"<br />"+time;
+}
+
+// }}}
+
+/***************************************************************************
+ * POPUP THINGS
+ */
+
+// {{{ function popWin()
+
+/**
+ * function that pops an anchor
+ *
+ * @param theNode anchor the anchor we are talking about
+ * @param w int the desired width for the popup
+ * @param h int the desired height for the popup
+ */
+function popWin(theNode,w,h) {
+ window.open(theNode.href, '_blank',
+ 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+w+',height='+h);
+}
+
+// }}}
+// {{{ function auto_links()
+
+/**
+ * parses an html file, and update the onclik handlers for anchors that need it.
+ *
+ * anchors :
+ * - that points to another host are opened in a new window (mimic the target=_new)
+ * - of class popup(2) or popup_###x### create real popups (no url bar, ...)
+ * This function is designed to be used in <body onload="javascript:auto_links()">
+ */
+function auto_links() {
+ nodes = document.getElementsByTagName('a');
+ fqdn = document.URL;
+ fqdn = fqdn.replace(/^https?:\/\/([^\/]*)\/.*$/,'$1');
+ for(var i=0; i<nodes.length; i++) {
+ node = nodes[i];
+ if(!node.href || node.className == 'xdx' || node.href.indexOf('mailto:') > -1 || node.href.indexOf('javascript:')>-1) continue;
+ if(node.href.indexOf(fqdn)<0 || node.className == 'popup') {
+ node.onclick = function () { window.open(this.href); return false; };
+ }
+ if(node.className == 'popup2') {
+ node.onclick = function () { popWin(this,840,600); return false; };
+ }
+ if(matches = (/^popup_([0-9]*)x([0-9]*)$/).exec(node.className)) {
+ var w = matches[1], h = matches[2];
+ node.onclick = function () { popWin(this,w,h); return false; };
+ }
+ }
+}
+
+// }}}
+
+/***************************************************************************
+ * The real OnLoad
+ */
+
+// {{{ function pa_onload
+
+function pa_onload() {
+ auto_links();
+}
+
+// }}}
+
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+ $domain = $globals->mail->domain;
+
+ new_skinned_page('listes/admin.tpl', AUTH_MDP);
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+if (Env::has('add_member')) {
+
+ require_once('user.func.inc.php');
+ $members = explode(' ', Env::get('add_member'));
+ if ($members) foreach ($members as $i => $alias) {
+ if (($login = get_user_forlife($alias)) !== false) {;
+ $members[$i] = $login;
+ }
+ }
+
+ $arr = $client->mass_subscribe($liste, $members);
+ if (is_array($arr)) {
+ foreach($arr as $addr) {
+ $page->trig("{$addr[0]} inscrit.");
+ }
+ }
+}
+
+if (Env::has('del_member')) {
+ $client->mass_unsubscribe($liste, Array(Env::get('del_member').'@'.$globals->mail->domain));
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+
+if (Env::has('add_owner')) {
+ require_once('user.func.inc.php');
+
+ $owners = explode(' ', Env::get('add_owner'));
+
+ if ($owners) foreach ($owners as $alias) {
+ if (($login = get_user_forlife($alias)) === false) {;
+ $login = $alias;
+ }
+
+ if($client->add_owner($liste, $login)) {
+ $page->trig($alias." ajouté aux modérateurs.");
+ }
+ }
+}
+
+if (Env::has('del_owner')) {
+ $client->del_owner($liste, Env::get('del_owner').'@'.$globals->mail->domain);
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+
+if(list($det,$mem,$own) = $client->get_members($liste)) {
+
+ $membres = list_sort_members($mem, $tri_promo);
+ $moderos = list_sort_owners($own, $tri_promo);
+
+ $page->assign_by_ref('details', $det);
+ $page->assign_by_ref('members', $membres);
+ $page->assign_by_ref('owners', $moderos);
+ $page->assign('np_m', count($mem));
+
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de l'administrer");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+ $domain = $globals->mail->domain;
+
+ new_skinned_page('listes/archives.tpl', AUTH_COOKIE);
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+$page->addCssLink('css/lists.archives.css');
+if (list($det) = $client->get_members($liste)) {
+ if ( substr($liste,0,5) != 'promo' && ( $det['ins'] || $det['priv'] ) && !$det['own'] && ($det['sub']<2) ) {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de la consulter");
+ } elseif (Get::has('file')) {
+ $file = Get::get('file');
+ $rep = Get::get('rep');
+ if(strstr('/', $file)!==false || !preg_match(',^\d+/\d+$,', $rep)) {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de la consulter");
+ } else {
+ $page->assign('archives', $globals->lists->spool."/{$domain}{$globals->lists->vhost_sep}$liste/$rep/$file");
+ }
+ } else {
+ $archs = Array();
+ foreach (glob($globals->lists->spool."/{$domain}{$globals->lists->vhost_sep}$liste/*/*") as $rep) {
+ if (preg_match(",/(\d*)/(\d*)$,", $rep, $matches)) {
+ $archs[intval($matches[1])][intval($matches[2])] = true;
+ }
+ }
+ $page->assign('archs', $archs);
+ $page->assign('range', range(1,12));
+ }
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de la consulter");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+
+ new_admin_page('listes/check.tpl');
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+if(Post::has('correct')) {
+ $client->check_options($liste, true);
+}
+
+if(list($details,$options) = $client->check_options($liste)) {
+ $page->assign_by_ref('details', $details);
+ $page->assign_by_ref('options', $options);
+} else {
+ $page->kill("La liste n'existe pas");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('listes/create.tpl', AUTH_MDP);
+
+$owners = preg_split("/[\r\n]+/",Post::get('owners'), -1, PREG_SPLIT_NO_EMPTY);
+$members = preg_split("/[\r\n]+/",Post::get('members'), -1, PREG_SPLIT_NO_EMPTY);
+
+if (Post::has('add_owner_sub') && Post::has('add_owner')) {
+ require_once('user.func.inc.php');
+ if (($forlife = get_user_forlife(Post::get('add_owner'))) !== false) {
+ $owners [] = $forlife;
+ }
+}
+
+if (Post::has('add_member_sub') && Post::has('add_member')) {
+ require_once('user.func.inc.php');
+ if (($forlife = get_user_forlife(Post::get('add_member'))) !== false) {
+ $members[] = $forlife;
+ }
+}
+
+ksort($owners); array_unique($owners);
+ksort($members); array_unique($members);
+
+if (Post::has('submit')) {
+
+ $liste = Post::get('liste');
+
+ if(empty($liste)) {
+ $page->trig('champs «addresse souhaitée» vide');
+ }
+ if(!preg_match("/^[a-zA-Z0-9\-]*$/", $liste)) {
+ $page->trig('le nom de la liste ne doit contenir que des lettres, chiffres et tirets');
+ }
+
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM aliases WHERE alias={?}", $liste);
+ $n = $res->fetchOneCell();
+
+ if($n) {
+ $page->trig('cet alias est déjà pris');
+ }
+
+ if(!Post::get(desc)) {
+ $page->trig('le sujet est vide');
+ }
+
+ if(!count($owners)) {
+ $page->trig('pas de gestionnaire');
+ }
+
+ if(count($members)<4) {
+ $page->trig('pas assez de membres');
+ }
+
+ if (!$page->nb_errs()) {
+ $page->assign('created', true);
+ require_once('validations.inc.php');
+ $req = new ListeReq(Session::getInt('uid'), $liste, Post::get('desc'),
+ Post::getInt('advertise'), Post::getInt('modlevel'), Post::getInt('inslevel'),
+ $owners, $members);
+ $req->submit();
+ }
+}
+
+$page->assign('owners', join("\n",$owners));
+$page->assign('members', join("\n",$members));
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+
+ new_skinned_page('listes/delete.tpl', AUTH_MDP);
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+if ( Post::get('valid') == 'OUI' && $client->delete_list($liste, Post::getBool('del_archive')) ) {
+ $page->assign('deleted', true);
+} elseif (list($details,$options) = $client->get_owner_options($liste)) {
+ $page->assign_by_ref('details', $details);
+ $page->assign_by_ref('options', $options);
+ $page->assign('bogo_level', $client->get_bogo_level($liste));
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de l'administrer");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('listes/index.tpl', AUTH_MDP);
+require_once('lists.inc.php');
+
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+
+if(Get::has('del')) {
+ $client->unsubscribe(Get::get('del'));
+ header('Location: index.php');
+}
+if(Get::has('add')) {
+ $client->subscribe(Get::get('add'));
+ header('Location: index.php');
+}
+if(Post::has('promo_add')) {
+ $promo = Post::getInt('promo_add');
+ if ($promo>=1900 and $promo<2100) {
+ $client->subscribe("promo$promo");
+ } else {
+ $page->trig("promo incorrecte, il faut une promo sur 4 chiffres.");
+ }
+}
+$listes = $client->get_lists();
+$page->assign_by_ref('listes',$listes);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+
+ new_skinned_page('listes/members.tpl', AUTH_COOKIE);
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+if(Get::has('del')) {
+ $client->unsubscribe($liste);
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+if(Get::has('add')) {
+ $client->subscribe($liste);
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+$members = $client->get_members($liste);
+
+$tri_promo = !Env::getBool('alpha');
+
+if(list($det,$mem,$own) = $members) {
+ $membres = list_sort_members($mem, $tri_promo);
+ $moderos = list_sort_owners($own, $tri_promo);
+
+ $page->assign_by_ref('details', $det);
+ $page->assign_by_ref('members', $membres);
+ $page->assign_by_ref('owners', $moderos);
+ $page->assign('nb_m', count($mem));
+
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit d'en voir les détails");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+ $domain = $globals->mail->domain;
+
+ if (preg_match("!(?:[a-z0-9]+\\.)?{$domain}_(.*)!", $liste, $matches)) {
+ header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}");
+ }
+
+ new_skinned_page('listes/moderate.tpl', AUTH_MDP);
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+$page->register_modifier('qpd','quoted_printable_decode');
+
+if(Env::has('sadd')) {
+ $client->handle_request($liste,Env::get('sadd'),4,''); /* 4 = SUBSCRIBE */
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+
+if(Post::has('sdel')) {
+ $client->handle_request($liste,Post::get('sdel'),2,Post::get('reason')); /* 2 = REJECT */
+}
+
+if(Env::has('mid')) {
+ $mid = Env::get('mid');
+ $mail = $client->get_pending_mail($liste, $mid);
+ $reason = '';
+
+ $prenom = Session::get('prenom');
+ $nom = Session::get('nom');
+
+
+ if (Env::has('mok')) {
+ $action = 1; /** 2 = ACCEPT **/
+ $subject = "Message accepté";
+ $append .= "a été accepté par $prenom $nom.\n";
+ } elseif (Env::has('mno')) {
+ $action = 2; /** 2 = REJECT **/
+ $subject = "Message refusé";
+ $reason = Post::get('reason');
+ $append = "a été refusé par $prenom $nom avec la raison :\n\n"
+ . $reason;
+ } elseif (Env::has('mdel')) {
+ $action = 3; /** 3 = DISCARD **/
+ $subject = "Message supprimé";
+ $append = "a été supprimé par $prenom $nom.\n\n"
+ . "Rappel: il ne faut utiliser cette opération que dans le cas de spams ou de virus !\n";
+ }
+
+ if (isset($action) && $client->handle_request($liste, $mid, $action, $reason)) {
+ $texte = "le message suivant :\n\n"
+ ." Auteur: {$mail['sender']}\n"
+ ." Sujet : « {$mail['subj']} »\n"
+ ." Date : ".strftime("le %d %b %Y à %H:%M:%S", (int)$mail['stamp'])."\n\n"
+ .$append;
+ require_once('diogenes/diogenes.hermes.inc.php');
+ $mailer = new HermesMailer();
+ $mailer->addTo("$liste-owner@{$domain}");
+ $mailer->setFrom("$liste-bounces@{$domain}");
+ $mailer->addHeader('Reply-To', "$liste-owner@{$domain}");
+ $mailer->setSubject($subject);
+ $mailer->setTxtBody(wordwrap($texte,72));
+ $mailer->send();
+ Get::kill('mid');
+ }
+
+ if(Get::has('mid') && is_array($mail)) {
+ $msg = file_get_contents('/etc/mailman/fr/refuse.txt');
+ $msg = str_replace("%(adminaddr)s","$liste-owner@{$domain}", $msg);
+ $msg = str_replace("%(request)s","<< SUJET DU MAIL >>", $msg);
+ $msg = str_replace("%(reason)s","<< TON EXPLICATION >>", $msg);
+ $msg = str_replace("%(listname)s","$liste", $msg);
+ $page->assign('msg', $msg);
+
+ $page->changeTpl('listes/moderate_mail.tpl');
+ $page->assign_by_ref('mail', $mail);
+ $page->run();
+ }
+
+} elseif (Env::has('sid')) {
+
+ if(list($subs,$mails) = $client->get_pending_ops($liste)) {
+ foreach($subs as $user) {
+ if ($user['id'] == Env::get('sid')) {
+ $page->changeTpl('listes/moderate_sub.tpl');
+ $page->assign('del_user',$user);
+ $page->run();
+ }
+ }
+ }
+
+}
+
+if(list($subs,$mails) = $client->get_pending_ops($liste)) {
+ $page->assign_by_ref('subs', $subs);
+ $page->assign_by_ref('mails', $mails);
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de la modérer");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+
+ new_skinned_page('listes/options.tpl', AUTH_MDP);
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+if (Post::has('submit')) {
+ $values = $_POST;
+ $client->set_bogo_level($liste, intval($values['bogo_level']));
+ switch($values['moderate']) {
+ case '0':
+ $values['generic_nonmember_action'] = 0;
+ $values['default_member_moderation'] = 0;
+ break;
+ case '1':
+ $values['generic_nonmember_action'] = 1;
+ $values['default_member_moderation'] = 0;
+ break;
+ case '2':
+ $values['generic_nonmember_action'] = 1;
+ $values['default_member_moderation'] = 1;
+ break;
+ }
+ unset($values['submit'], $values['bogo_level'], $values['moderate']);
+ $values['send_goodbye_msg'] = !empty($values['send_goodbye_msg']);
+ $values['admin_notify_mchanges'] = !empty($values['admin_notify_mchanges']);
+ $values['subscribe_policy'] = empty($values['subscribe_policy']) ? 0 : 2;
+ if (isset($values['subject_prefix'])) {
+ $values['subject_prefix'] = trim($values['subject_prefix']).' ';
+ }
+ $client->set_owner_options($liste, $values);
+} elseif (isvalid_email(Post::get('atn_add'))) {
+ $client->add_to_wl($liste, Post::get('atn_add'));
+} elseif (Get::has('atn_del')) {
+ $client->del_from_wl($liste, Get::get('atn_del'));
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+
+if(list($details,$options) = $client->get_owner_options($liste)) {
+ $page->assign_by_ref('details', $details);
+ $page->assign_by_ref('options', $options);
+ $page->assign('bogo_level', $client->get_bogo_level($liste));
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit de l'administrer");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (!$page) {
+ require_once("xorg.inc.php");
+ if (!Env::has('liste')) header('Location: index.php');
+ $liste = strtolower(Env::get('liste'));
+
+ new_admin_page('listes/soptions.tpl');
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
+
+if(Post::has('submit')) {
+ $values = $_POST;
+ unset($values['submit']);
+ $values['advertised'] = empty($values['advertised']) ? false : true;
+ $values['archive'] = empty($values['archive']) ? false : true;
+ $client->set_admin_options($liste, $values);
+}
+
+if(list($details,$options) = $client->get_admin_options($liste)) {
+ $page->assign_by_ref('details', $details);
+ $page->assign_by_ref('options', $options);
+} else {
+ $page->kill("La liste n'existe pas");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+if (!Env::has('liste')) header('Location: index.php');
+$liste = strtolower(Env::get('liste'));
+
+new_skinned_page('listes/trombi.tpl', AUTH_COOKIE);
+require_once("trombi.inc.php");
+require_once('lists.inc.php');
+
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+
+if(Get::has('del')) {
+ $client->unsubscribe($liste);
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+if(Get::has('add')) {
+ $client->subscribe($liste);
+ header("Location: {$_SERVER['PHP_SELF']}?liste=$liste");
+}
+
+function getList($offset,$limit)
+{
+ global $client, $globals;
+ $liste = Env::get('liste');
+ list($total,$members) = $client->get_members_limit($liste,$offset,$limit);
+
+ $membres = Array();
+ foreach ($members as $member) {
+ list($m) = split('@',$member[1]);
+ $res = $globals->xdb->query("SELECT prenom,IF(nom_usage='', nom, nom_usage) AS nom, promo, a.alias AS forlife
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON u.user_id = a.id
+ WHERE a.alias = {?}", $m);
+ if ($tmp = $res->fetchOneAssoc()) {
+ $membres[$tmp['nom']] = $tmp;
+ } else {
+ $membres[$member[0]] = Array('addr' => $member[0]);
+ }
+ }
+ return Array($total,$membres);
+}
+
+$owners = $client->get_owners($liste);
+
+if(is_array($owners)) {
+ $moderos = list_sort_owners($owners[1]);
+
+ $page->assign_by_ref('details', $owners[0]);
+ $page->assign_by_ref('owners', $moderos);
+
+ $trombi = new Trombi('getList');
+ $page->assign_by_ref('trombi',$trombi);
+} else {
+ $page->kill("La liste n'existe pas ou tu n'as pas le droit d'en voir les détails");
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('login.tpl', AUTH_COOKIE);
+
+$res = $globals->xdb->query('SELECT date, naissance FROM auth_user_md5 WHERE user_id={?}', Session::getInt('uid'));
+list($date, $naissance) = $res->fetchOneRow();
+
+// incitation à mettre à jour la fiche
+
+$d2 = mktime(0, 0, 0, substr($date, 5, 2), substr($date, 8, 2), substr($date, 0, 4));
+if( (time() - $d2) > 60 * 60 * 24 * 400 ) {
+ // si fiche date de + de 400j;
+ $page->assign('fiche_incitation', $date);
+}
+
+// Souhaite bon anniversaire
+
+if (substr($naissance, 5) == date("m-d")) {
+ $page->assign('birthday', date("Y") - substr($naissance, 0, 4));
+}
+
+// incitation à mettre une photo
+
+$res = $globals->xdb->query('SELECT COUNT(*) FROM photo WHERE uid={?}', Session::getInt('uid'));
+$page->assign('photo_incitation', $res->fetchOneCell() == 0);
+
+// Incitation à se géolocaliser
+require_once('geoloc.inc.php');
+$res = localize_addresses(Session::getInt('uid', -1));
+$page->assign('geoloc_incitation', count($res));
+
+// affichage de la boîte avec quelques liens
+
+require_once('login.conf.php') ;
+$pub_nbElem = $pub_nbLig * $pub_nbCol ;
+if (count($pub_tjs) <= $pub_nbElem)
+ $publicite = array_slice ($pub_tjs,0,$pub_nbElem) ;
+else
+ $publicite = $pub_tjs ;
+$nbAlea = $pub_nbElem - count($publicite) ;
+if ($nbAlea > 0) {
+ $choix = array_rand($pub_rnd,$nbAlea) ;
+ foreach ($choix as $url)
+ $publicite[$url] = $pub_rnd[$url] ;
+ }
+$publicite = array_chunk( $publicite , $pub_nbLig , true ) ;
+$page->assign_by_ref('publicite', $publicite);
+
+// ajout du lien RSS
+
+if (Session::has('core_rss_hash')) {
+ $page->assign('xorg_rss', Array("title" => "Polytechnique.org :: News", "href" => "/rss.php/".Session::get('forlife')."/".Session::get('core_rss_hash').".xml"));
+}
+
+// affichage des evenements
+// annonces promos triées par présence d'une limite sur les promos
+// puis par dates croissantes d'expiration
+$promo = Session::getInt('promo');
+$sql = "SELECT e.id,e.titre,e.texte,a.user_id,a.nom,a.prenom,a.promo,l.alias AS forlife
+ FROM evenements AS e
+ 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' )
+ WHERE FIND_IN_SET(e.flags, 'valide') AND peremption >= NOW()
+ AND (e.promo_min = 0 || e.promo_min <= {?})
+ AND (e.promo_max = 0 || e.promo_max >= {?})
+ ORDER BY (e.promo_min != 0 AND e.promo_max != 0) DESC, e.peremption";
+$page->assign('evenement', $globals->xdb->iterator($sql, $promo, $promo));
+
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('marketing/index.tpl');
+
+# Quelques statistiques
+
+$res = $globals->xdb->query(
+ "SELECT COUNT(*) AS vivants,
+ COUNT(NULLIF(perms!='pending', 0)) AS inscrits,
+ 100*COUNT(NULLIF(perms!='pending', 0))/COUNT(*) AS ins_rate,
+ COUNT(NULLIF(promo >= 1972, 0)) AS vivants72,
+ COUNT(NULLIF(promo >= 1972 AND perms!='pending', 0)) AS inscrits72,
+ 100 * COUNT(NULLIF(promo >= 1972 AND perms!='pending', 0)) /
+ COUNT(NULLIF(promo >= 1972, 0)) AS ins72_rate,
+ COUNT(NULLIF(FIND_IN_SET('femme', flags), 0)) AS vivantes,
+ COUNT(NULLIF(FIND_IN_SET('femme', flags) AND perms!='pending', 0)) AS inscrites,
+ 100 * COUNT(NULLIF(FIND_IN_SET('femme', flags) AND perms!='pending', 0)) /
+ COUNT(NULLIF(FIND_IN_SET('femme', flags), 0)) AS inse_rate
+ FROM auth_user_md5
+ WHERE deces = 0");
+$stats = $res->fetchOneAssoc();
+$page->assign('stats', $stats);
+
+$res = $globals->xdb->query("SELECT count(*) FROM auth_user_md5 WHERE date_ins > ".date('Ymd000000', strtotime('1 week ago')));
+$page->assign('nbInsSem', $res->fetchOneCell());
+
+$res = $globals->xdb->query("SELECT count(*) FROM register_pending WHERE hash != 'INSCRIT'");
+$page->assign('nbInsEnCours', $res->fetchOneCell());
+
+$res = $globals->xdb->query("SELECT count(*) FROM register_marketing");
+$page->assign('nbInsMarket', $res->fetchOneCell());
+
+$res = $globals->xdb->query("SELECT count(*) FROM register_mstats WHERE TO_DAYS(NOW()) - TO_DAYS(success) <= 7");
+$page->assign('nbInsMarkOK', $res->fetchOneCell());
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_admin_page('marketing/private.tpl');
+
+$uid = Env::get('uid');
+$res = $globals->xdb->query("SELECT nom, prenom, promo, matricule FROM auth_user_md5 WHERE user_id={?} AND perms='pending'", $uid);
+
+if (list($nom, $prenom, $promo, $matricule) = $res->fetchOneRow()) {
+ require_once('register.inc.php');
+ $matricule_X = get_X_mat($matricule);
+ $page->gassign('nom');
+ $page->gassign('prenom');
+ $page->gassign('promo');
+ $page->gassign('matricule');
+ $page->assign('matricule_X',$matricule_X);
+} else {
+ $page->kill('uid invalide');
+}
+
+if (Env::has('del')) {
+ $globals->xdb->execute('DELETE FROM register_marketing WHERE uid={?} AND email={?}', $uid, Env::get('del'));
+}
+
+if (Env::has('rel') && !Env::has('valider')) {
+ require_once('marketing.inc.php');
+ list($to, $title, $text) = mark_text_mail($uid, Env::get('rel'));
+ $from = mark_from_mail($uid, Env::get('rel'));
+ $page->assign('rel_from_user', $from);
+ $page->assign('rel_from_staff', "\"Equipe Polytechnique.org\" <register@polytechnique.org>");
+ $page->assign('rel_to', $to);
+ $page->assign('rel_title', $title);
+ $page->assign('rel_text', $text);
+}
+
+if (Env::get('valider') == 'Envoyer') {
+ require_once('marketing.inc.php');
+ mark_send_mail($uid, Env::get('rel'), Env::get('from'), Env::get('to'), Env::get('title'), Env::get('message'));
+ $page->trig("Mail envoyé");
+}
+
+if (Env::has('relance')) {
+ require_once('marketing.inc.php');
+ if (relance($uid)) {
+ $page->trig('relance faite');
+ }
+}
+
+if (Env::get('action') == 'ajouter') {
+ $globals->xdb->execute(
+ "INSERT INTO register_marketing
+ SET uid = {?}, sender = {?}, email = {?},
+ date = NOW(), type = {?}",
+ $uid, Session::get('uid'), Env::get('email'), Env::get('type'));
+}
+
+$res = $globals->xdb->iterator(
+ "SELECT r.*, a.alias
+ FROM register_marketing AS r
+ INNER JOIN aliases AS a ON (r.sender=a.id AND a.type = 'a_vie')
+ WHERE uid={?}
+ ORDER BY date", $uid);
+$page->assign('addr', $res);
+
+$res = $globals->xdb->query("SELECT date, relance FROM register_pending WHERE uid = {?}", $uid);
+if (list($pending, $relance) = $res->fetchOneCell()) {
+ $page->gassign('pending');
+ $page->gassign('relance');
+}
+
+
+$page->run();
+
+// vim:set et sw=4 sws=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+new_admin_page('marketing/promo.tpl');
+
+$promo = (integer) (isset($_REQUEST["promo"]) ? $_REQUEST["promo"] : $_SESSION["promo"]);
+$page->assign('promo', $promo);
+
+$sql = "SELECT u.user_id, u.nom, u.prenom, u.last_known_email, u.matricule_ax,
+ IF(MAX(m.last)>p.relance, MAX(m.last), p.relance) AS dern_rel, p.email
+ FROM auth_user_md5 AS u
+ LEFT JOIN register_pending AS p ON p.uid = u.user_id
+ LEFT JOIN register_marketing AS m ON m.uid = u.user_id
+ WHERE u.promo = {?} AND u.deces = 0 AND u.perms='pending'
+ GROUP BY u.user_id
+ ORDER BY nom, prenom";
+$page->assign('nonins', $globals->xdb->iterator($sql, $promo));
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('marketing/public.tpl', AUTH_COOKIE);
+
+if (! Env::has('num')) { exit; }
+
+$uid = Env::get('num');
+
+$res = $globals->xdb->query("SELECT nom, prenom, promo FROM auth_user_md5 WHERE user_id={?} AND perms='pending'", $uid);
+
+if (list($nom, $prenom, $promo) = $res->fetchOneRow()) {
+ $page->assign('prenom', $prenom);
+ $page->assign('nom', $nom);
+ $page->assign('promo', $promo);
+
+ if (Env::has('valide')) {
+ require_once('xorg.misc.inc.php');
+
+ $email = trim(Env::get('mail'));
+ $res = $globals->xdb->query('SELECT COUNT(*) FROM register_marketing WHERE uid={?} AND email={?}', $uid, $email);
+
+ if (!isvalid_email_redirection($email)) {
+ $page->trig("Email invalide !");
+ } elseif ($res->fetchOneCell()) {
+ $page->assign('already', true);
+ } else {
+ $page->assign('ok', true);
+ $globals->xdb->execute(
+ "INSERT INTO register_marketing (uid,sender,email,date,last,nb,type,hash)
+ VALUES ({?}, {?}, {?}, NOW(), 0, 0, {?}, '')",
+ $uid, Session::getInt('uid'), $email, Env::get('origine'));
+ require_once('validations.inc.php');
+ $req = new MarkReq(Session::getInt('uid'), $uid, $email, Env::get('origine')=='user');
+ $req->submit();
+ }
+ }
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('marketing/relance.tpl');
+
+/* une relance a été demandée - on envoit les mails correspondants */
+if (Post::has('relancer')) {
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM auth_user_md5 WHERE deces=0");
+ $nbdix = $res->fetchOneCell();
+
+ $sent = Array();
+ foreach (array_keys($_POST['relance']) as $uid) {
+ if ($tmp = relance($uid, $nbdix)) {
+ $sent[] = $tmp.' a été relancé';
+ }
+ }
+ $page->assign('sent', $sent);
+}
+
+$sql = "SELECT r.date, r.relance, r.uid, u.promo, u.nom, u.prenom
+ FROM register_pending AS r
+ INNER JOIN auth_user_md5 AS u ON r. uid = u.user_id
+ WHERE hash!='INSCRIT'
+ ORDER BY date DESC";
+$page->assign('relance', $globals->xdb->iterator($sql));
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('marketing/this_week.tpl');
+
+$sort = Get::get('sort') == 'promo' ? 'promo' : 'date_ins';
+
+$sql = "SELECT a.alias AS forlife, u.date_ins, u.promo, u.nom, u.prenom
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie')
+ WHERE u.date_ins > ".date("Ymd000000", strtotime ('1 week ago'))."
+ ORDER BY u.$sort DESC";
+$page->assign('ins', $globals->xdb->iterator($sql));
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_admin_page('marketing/volontaire.tpl');
+
+$res = $globals->xdb->query(
+ "SELECT
+ DISTINCT a.promo
+ FROM register_marketing AS m
+ INNER JOIN auth_user_md5 AS a ON a.user_id = m.uid
+ ORDER BY a.promo");
+$page->assign('promos', $res->fetchColumn());
+
+
+if (Env::has('promo')) {
+ $sql = "SELECT a.nom, a.prenom, a.user_id,
+ m.email, sa.alias AS forlife
+ FROM register_marketing AS m
+ INNER JOIN auth_user_md5 AS a ON a.user_id = m.uid AND a.promo = {?}
+ INNER JOIN aliases AS sa ON (m.sender = sa.id AND sa.type='a_vie')
+ ORDER BY a.nom";
+ $page->assign('addr', $globals->xdb->iterator($sql, Env::get('promo')));
+}
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+
+if (Env::has('response2')) {
+ $_SESSION['password'] = $password = Post::get('response2');
+
+ $globals->xdb->execute('UPDATE auth_user_md5 SET password={?} WHERE user_id={?}', $password, Session::getInt('uid'));
+
+ $log =& Session::getMixed('log');
+ $log->log('passwd', '');
+
+ if (Cookie::get('ORGaccess')) {
+ setcookie('ORGaccess', md5($password), (time()+25920000), '/', '' ,0);
+ }
+
+ new_skinned_page('motdepassemd5.success.tpl', AUTH_MDP);
+ $page->run();
+}
+
+new_skinned_page('motdepassemd5.tpl', AUTH_MDP);
+$page->addJsLink('javascript/md5.js');
+$page->addJsLink('javascript/motdepassemd5.js');
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('newsletter/index.tpl', AUTH_COOKIE);
+require_once("newsletter.inc.php");
+
+if(Get::has('out')) { unsubscribe_nl(); }
+if(Get::has('in')) { subscribe_nl(); }
+
+$page->assign('nls',get_nl_state());
+$page->assign_by_ref('nl_list',get_nl_list());
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('newsletter/show.tpl', AUTH_COOKIE);
+require_once("newsletter.inc.php");
+
+$nid = Get::get('nid', 'last');
+$nl = new NewsLetter($nid);
+$page->assign_by_ref('nl',$nl);
+
+if (Post::has('send')) {
+ $nl->sendTo(Session::get('prenom'), Session::get('nom'), Session::get('bestalias'), Session::get('femme'), Session::get('mail_fmt')!='text');
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('newsletter/submit.tpl', AUTH_COOKIE);
+require_once("newsletter.inc.php");
+
+if (Post::has('see')) {
+ $art = new NLArticle(Post::get('title'), Post::get('body'), Post::get('append'));
+ $page->assign('art', $art);
+} elseif (Post::has('valid')) {
+ require_once('validations.inc.php');
+ $art = new NLReq(Session::getInt('uid'), Post::get('title'), Post::get('body'), Post::get('append'));
+ $art->submit();
+
+ $page->assign('submited', true);
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once("validations.inc.php");
+require_once("xorg.misc.inc.php");
+
+new_skinned_page('nomusage.tpl', AUTH_MDP);
+
+$res = $globals->xdb->query(
+ "SELECT u.nom,u.nom_usage,u.flags,e.alias
+ FROM auth_user_md5 AS u
+ LEFT JOIN aliases AS e ON(u.user_id = e.id)
+ WHERE user_id={?} AND FIND_IN_SET('usage', e.flags)", Session::getInt('uid'));
+
+list($nom,$usage_old,$flags,$alias_old) = $res->fetchOneRow();
+$flags = new flagset($flags);
+$page->assign('usage_old', $usage_old);
+$page->assign('alias_old', $alias_old);
+
+$nom_usage = replace_accent(trim(Env::get('nom_usage')));
+$nom_usage = strtoupper($nom_usage);
+$page->assign('usage_req', $nom_usage);
+
+if (Env::has('submit') && ($nom_usage != $usage_old)) {
+ // on vient de recevoir une requete, differente de l'ancien nom d'usage
+ if ($nom_usage == $nom) {
+ $page->assign('same', true);
+ } else { // le nom de mariage est distinct du nom à l'X
+ // on calcule l'alias pour l'afficher
+ $myusage = new UsageReq(Session::getInt('uid'), $nom_usage);
+ $myusage->submit();
+ $page->assign('myusage', $myusage);
+ }
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once("validations.inc.php");
+require_once("xorg.misc.inc.php");
+
+new_skinned_page('orange.tpl', AUTH_MDP);
+
+$res = $globals->xdb->query(
+ "SELECT u.promo,u.promo_sortie
+ FROM auth_user_md5 AS u
+ WHERE user_id={?}", Session::getInt('uid'));
+
+list($promo,$promo_sortie_old) = $res->fetchOneRow();
+$page->assign('promo_sortie_old', $promo_sortie_old);
+$page->assign('promo', $promo);
+
+$promo_sortie = Env::get('promo_sortie');
+
+if ($promo_sortie) {
+ $sortie_req = false;
+ if (!is_numeric($promo_sortie) || $promo_sortie < 1000 || $promo_sortie > 9999)
+ $page->trig('L\'année de sortie doit être un nombre de quatre chiffres');
+ elseif ($promo_sortie < $promo + 3)
+ $page->trig('Trop tôt');
+ else
+ $page->assign('promo_sortie', $sortie_req = $promo_sortie);
+
+ if (Env::has('submit') && $sortie_req && ($promo_sortie_old != $sortie_req)) {
+ $myorange = new OrangeReq(Session::getInt('uid'), $sortie_req);
+ $myorange->submit();
+ $page->assign('myorange', $myorange);
+ }
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once("diogenes/diogenes.hermes.inc.php");
+
+/* sort en affichant une erreur */
+function erreur($text) {
+ $mymail = new HermesMailer();
+ $mymail->addTo("telepaiement@polytechnique.org");
+ $mymail->setFrom("webmaster@polytechnique.org");
+ $mymail->setSubject("erreur lors d'un télépaiement (CyberPaiement)");
+ $mymail->setTxtBody("\n\n".var_export($_REQUEST,true));
+ $mymail->send();
+ exit;
+}
+
+/* http://fr.wikipedia.org/wiki/Formule_de_Luhn */
+function luhn($nombre) {
+ $s = strrev($nombre);
+ $sum = 0;
+ for ($i = 0; $i < strlen($s); $i++) {
+ $dgt = $s{$i};
+ $sum += ($i % 2) ? (2*$dgt) % 9 : $dgt;
+ }
+ return $sum % 10;
+}
+
+/* calcule la clé d'acceptation a partir de 5 champs */
+function cle_accept($d1,$d2,$d3,$d4,$d5)
+{
+ $m1 = luhn($d1.$d5);
+ $m2 = luhn($d2.$d5);
+ $m3 = luhn($d3.$d5);
+ $m4 = luhn($d4.$d5);
+ $n = $m1 + $m2 + $m3 + $m4;
+ $alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ return $alpha{$n-1}.$m1.$m2.$m3.$m4;
+}
+
+/* user id */
+$uid = clean_request('uid');
+/* reference banque (numero de transaction) */
+$champ901 = clean_request('CHAMP901');
+/* cle d'acceptation */
+$champ905 = clean_request('CHAMP905');
+/* code retour */
+$champ906 = clean_request('CHAMP906');
+/* email renvoye par la banque */
+$champ104 = clean_request('CHAMP104');
+/* reference complete de la commande */
+$champ200 = clean_request('CHAMP200');
+/* montant de la transaction */
+$champ201 = clean_request('CHAMP201');
+/* devise */
+$champ202 = clean_request('CHAMP202');
+$montant = "$champ201 $champ202";
+
+/* on extrait les informations sur l'utilisateur */
+$res = $globals->xdb->query("
+ SELECT a.prenom,a.nom,a.promo,l.alias,FIND_IN_SET(a.flags,'femme')
+ FROM auth_user_md5 AS a
+INNER JOIN aliases AS l ON (a.user_id=l.id AND type!='homonyme')
+ WHERE a.user_id={?}", $uid);
+if (!list($prenom,$nom,$promo,$forlife,$femme) = $res->fetchOneRow()) {
+ erreur("uid invalide");
+}
+
+
+/* on extrait la reference de la commande */
+if (!ereg('-xorg-([0-9]+)$',$champ200,$matches)) {
+ erreur("référence de commande invalide");
+}
+
+echo ($ref = $matches[1]);
+$res = $globals->xdb->query("SELECT mail,text,confirmation FROM paiement.paiements WHERE id={?}", $ref);
+if (!list($conf_mail,$conf_title,$conf_text) = $res->fetchOneRow()) {
+ erreur("référence de commande inconnue");
+}
+
+/* on extrait le code de retour */
+if ($champ906 != "0000") {
+ $res = $globals->xdb->query("SELECT rcb.text,c.id,c.text
+ FROM paiement.codeRCB AS rcb
+ LEFT JOIN paiement.codeC AS c ON rcb.codeC=c.id
+ WHERE rcb.id='$champ906'");
+ if (list($rcb_text, $c_id, $c_text) = $res->fetchOneRow()) {
+ erreur("erreur lors du paiement : $c_text ($c_id)");
+ } else{
+ erreur("erreur inconnue lors du paiement");
+ }
+}
+
+/* on fait l'insertion en base de donnees */
+$globals->xdb->execute("INSERT INTO paiement.transactions (id,uid,ref,fullref,montant,cle)
+ VALUES ({?},{?},{?},{?},{?},{?})",
+ $champ901, $uid, $ref, $champ200, $montant, $champ905);
+
+/* on genere le mail de confirmation */
+$conf_text = str_replace("<prenom>",$prenom,$conf_text);
+$conf_text = str_replace("<nom>",$nom,$conf_text);
+$conf_text = str_replace("<promo>",$promo,$conf_text);
+$conf_text = str_replace("<montant>",$montant,$conf_text);
+$conf_text = str_replace("<salutation>",$femme ? "Chère" : "Cher",$conf_text);
+$conf_text = str_replace("<cher>",$femme ? "Chère" : "Cher",$conf_text);
+
+$mymail = new HermesMailer();
+$mymail->setFrom($conf_mail);
+$mymail->addTo("\"$prenom $nom\" <$forlife@polytechnique.org>");
+$mymail->addCc($conf_mail);
+$mymail->setSubject($conf_title);
+$mymail->setTxtBody($conf_text);
+$mymail->send();
+
+/* on envoie les details de la transaction à telepaiement@ */
+$mymail = new HermesMailer();
+$mymail->setFrom("webmaster@polytechnique.org");
+$mymail->addTo("telepaiement@polytechnique.org");
+$mymail->setSubject($conf_title);
+$msg = "utilisateur : $prenom $nom ($uid)\n".
+ "mail : $forlife@polytechnique.org\n\n".
+ "paiement : $conf_title ($conf_mail)\n".
+ "reference : $champ200\n".
+ "montant : $montant\n\n".
+ "dump de REQUEST:\n".
+ var_export($_REQUEST,true);
+$mymail->setTxtBody($msg);
+$mymail->send();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('paiement/index.tpl', AUTH_MDP);
+require_once('profil.func.inc.php');
+require_once('money.inc.php');
+
+// initialisation
+$op = Env::get('op', 'select');
+$meth = new PayMethod(Env::getInt('methode', -1));
+$pay = new Payment(Env::getInt('ref', -1));
+
+if($pay->flags->hasflag('old')){
+ $page->trig("La transaction selectionnée est périmée.");
+ $pay = new Payment();
+}
+$val = ($op=="submit" && Env::has('montant')) ? Env::get('montant') : $pay->montant_def;
+
+if (($e = $pay->check($val)) !== true) {
+ $page->trig($e);
+}
+
+if ($op=='submit') {
+ $pay->init($val, $meth);
+ $pay->prepareform($pay);
+} else {
+ $res = $globals->xdb->iterator("SELECT timestamp, montant FROM paiement.transactions WHERE uid = {?} AND ref = {?} ORDER BY timestamp DESC", Session::getInt('uid', -1), Env::getInt('ref', -1));
+
+ if ($res->total()) $page->assign('transactions', $res);
+}
+
+$page->assign('montant',$val);
+
+$page->assign('meth', $meth);
+$page->assign('pay', $pay);
+
+$page->assign('prefix',$globals->money->mpay_tprefix);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('paiement/retour_paypal.tpl', AUTH_MDP);
+require_once("diogenes/diogenes.hermes.inc.php");
+
+/* sort en affichant une erreur */
+function erreur($text, $send=true) {
+ global $page, $erreur;
+ if ($erreur) return;
+ $erreur = $text;
+ if (!$send) return;
+
+ $mymail = new HermesMailer();
+ $mymail->addTo("telepaiement@polytechnique.org");
+ $mymail->setFrom("webmaster@polytechnique.org");
+ $mymail->setSubject("erreur lors d'un télépaiement (PayPal)");
+ $mymail->setTxtBody("\n\n".var_export($_REQUEST,true));
+ $mymail->send();
+
+ $page->trig($text);
+}
+
+/* user id */
+$uid = clean_request('uid');
+/* reference banque (numero de transaction) */
+$no_transaction = clean_request('tx');
+/* token a renvoyer pour avoir plus d'information */
+$clef = clean_request('sig');
+/* code retour */
+$status = clean_request('st');
+/* raison */
+$reason = ($status == 'Pending')?clean_request('pending_reason'):clean_request('reason_code');
+/* reference complete de la commande */
+$fullref = clean_request('cm');
+/* montant de la transaction */
+$montant_nb = clean_request('amt');
+/* devise */
+$montant_dev = clean_request('cc');
+$montant = "$montant_nb $montant_dev";
+
+/* on extrait le code de retour */
+if ($status != "Completed") {
+ if ($status)
+ erreur("erreur lors du paiement : $status - $reason");
+ else
+ erreur("Paiement annulé", false);
+}
+
+/* on extrait les informations sur l'utilisateur */
+$res = $globals->xdb->query("
+ SELECT a.prenom,a.nom,a.promo,l.alias,FIND_IN_SET(a.flags,'femme')
+ FROM auth_user_md5 AS a
+INNER JOIN aliases AS l ON (a.user_id=l.id AND type!='homonyme')
+ WHERE a.user_id={?}", $uid);
+if (!list($prenom,$nom,$promo,$forlife,$femme) = $res->fetchOneRow()) {
+ erreur("uid invalide");
+}
+
+/* on extrait la reference de la commande */
+if (!ereg('-xorg-([0-9]+)$',$fullref,$matches)) {
+ erreur("référence de commande invalide");
+}
+
+$ref = $matches[1];
+$res = $globals->xdb->query("SELECT mail,text,confirmation FROM paiement.paiements WHERE id={?}", $ref);
+if (!list($conf_mail,$conf_title,$conf_text) = $res->fetchOneRow()) {
+ erreur("référence de commande inconnue");
+}
+
+/* on fait l'insertion en base de donnees */
+$globals->xdb->execute("INSERT INTO paiement.transactions (id,uid,ref,fullref,montant,cle)
+ VALUES ({?},{?},{?},{?},{?},{?})",
+ $no_transaction, $uid, $ref, $fullref, $montant, $clef);
+
+/* on genere le mail de confirmation */
+$conf_text = str_replace("<prenom>",$prenom,$conf_text);
+$conf_text = str_replace("<nom>",$nom,$conf_text);
+$conf_text = str_replace("<promo>",$promo,$conf_text);
+$conf_text = str_replace("<montant>",$montant,$conf_text);
+$conf_text = str_replace("<salutation>",$femme ? "Chère" : "Cher",$conf_text);
+$conf_text = str_replace("<cher>",$femme ? "Chère" : "Cher",$conf_text);
+
+$mymail = new HermesMailer();
+$mymail->setFrom($conf_mail);
+$mymail->addTo("\"$prenom $nom\" <$forlife@polytechnique.org>");
+$mymail->addCc($conf_mail);
+$mymail->setSubject($conf_title);
+$mymail->setTxtBody($conf_text);
+$mymail->send();
+
+/* on envoie les details de la transaction à telepaiement@ */
+$mymail = new HermesMailer();
+$mymail->setFrom("webmaster@polytechnique.org");
+$mymail->addTo("telepaiement@polytechnique.org");
+$mymail->setSubject($conf_title);
+$msg = "utilisateur : $prenom $nom ($uid)\n".
+ "mail : $forlife@polytechnique.org\n\n".
+ "paiement : $conf_title ($conf_mail)\n".
+ "reference : $no_transaction\n".
+ "montant : $montant\n\n".
+ "dump de REQUEST:\n".
+ var_export($_REQUEST,true);
+$mymail->setTxtBody($msg);
+$mymail->send();
+
+$page->assign('texte', $conf_text);
+$page->assign('erreur', $erreur);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('preferences.tpl', AUTH_COOKIE);
+
+if (Env::has('mail_fmt')) {
+ $fmt=Env::get('mail_fmt');
+ if ($fmt != 'texte') $fmt = 'html';
+ $globals->xdb->execute(" UPDATE auth_user_quick
+ SET core_mail_fmt = '$fmt'
+ WHERE user_id = {?}", Session::getInt('uid'));
+ $_SESSION['mail_fmt'] = $fmt;
+ header('Location: preferences.php');
+}
+
+if (Env::has('rss')) {
+ if (Env::getBool('rss')) {
+ $_SESSION['core_rss_hash'] = rand_url_id(16);
+ $globals->xdb->execute('UPDATE auth_user_quick SET core_rss_hash={?} WHERE user_id={?}',
+ Session::get('core_rss_hash'), Session::getInt('uid'));
+ } else {
+ $globals->xdb->execute('UPDATE auth_user_quick SET core_rss_hash="" WHERE user_id={?}', Session::getInt('uid'));
+ Session::kill('core_rss_hash');
+ }
+ header('Location: preferences.php');
+}
+
+$page->assign('prefs', $globals->hook->prefs());
+$page->run();
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('profil.tpl',AUTH_MDP);
+$page->addCssLink('css/profil.css');
+
+require_once('tabs.inc.php');
+require_once('profil.func.inc.php');
+
+if (Post::has('register_from_ax_question')) {
+ $globals->xdb->query('UPDATE auth_user_quick SET profile_from_ax = 1 WHERE user_id = {?}', Session::getInt('uid'));
+ require_once('synchro_ax.inc.php');
+ copy_from_ax(Session::getInt('uid'));
+}
+
+//on met a jour $opened_tab et $new_tab qui sont le tab du POST et le tab demande
+// Tout d'abord, quel est le tab actuel ?
+// si on vient d'un POST, old_tab etait le tab courant
+if (Env::has('old_tab') && isset($tabname_array[Env::get('old_tab')])) {
+ // on verifie que la valeur postee existe bien
+ $opened_tab = Env::get('old_tab');
+}
+$new_tab = Env::has('suivant') ? get_next_tab($opened_tab) : $opened_tab;
+
+// pour tous les tabs, la date de naissance pour verifier
+// quelle est bien rentree et la date.
+$res = $globals->xdb->query(
+ "SELECT naissance, DATE_FORMAT(date,'%d.%m.%Y')
+ FROM auth_user_md5
+ WHERE user_id={?}", Session::getInt('uid'));
+list($naissance, $date_modif_profil) = $res->fetchOneRow();
+
+// lorsqu'on n'a pas la date de naissance en base de données
+if (!$naissance) {
+ // la date de naissance n'existait pas et vient d'être soumise dans la variable
+ if (Env::has('birth')) {
+ //en cas d'erreur :
+ if (!ereg('[0-3][0-9][0-1][0-9][1][9]([0-9]{2})', Env::get('birth'))) {
+ $page->assign('etat_naissance', 'query');
+ $page->trig_run('Date de naissance incorrecte ou incohérente.');
+ }
+
+ //sinon
+ $birth = sprintf("%s-%s-%s", substr(Env::get('birth'),4,4), substr(Env::get('birth'),2,2), substr(Env::get('birth'),0,2));
+ $globals->xdb->execute("UPDATE auth_user_md5 SET naissance={?} WHERE user_id={?}", $birth, Session::getInt('uid'));
+ $page->assign('etat_naissance','ok');
+ $page->run();
+ } else {
+ $page->assign('etat_naissance','query');
+ }
+ $page->run();//on affiche le formulaire pour naissance
+}
+
+//doit-on faire un update ?
+if (Env::has('modifier') || Env::has('suivant')) {
+ require_once("profil/get_{$opened_tab}.inc.php");
+ require_once("profil/verif_{$opened_tab}.inc.php");
+
+ if($page->nb_errs()) {
+ require_once("profil/assign_{$opened_tab}.inc.php");
+ $page->assign('onglet',$opened_tab);
+ $page->assign('onglet_last',get_last_tab());
+ $page->assign('onglet_tpl',"profil/$opened_tab.tpl");
+ $page->run();
+ }
+
+ $date=date("Y-m-j");//nouvelle date de mise a jour
+
+ //On sauvegarde l'uid pour l'AX
+ /* on sauvegarde les changements dans user_changes :
+ * on a juste besoin d'insérer le user_id de la personne dans la table
+ */
+ $globals->xdb->execute('REPLACE INTO user_changes SET user_id={?}', Session::getInt('uid'));
+
+ if (!Session::has('suid')) {
+ require_once('notifs.inc.php');
+ register_watch_op(Session::getInt('uid'), WATCH_FICHE);
+ }
+
+ // mise a jour des champs relatifs au tab ouvert
+ require_once("profil/update_{$opened_tab}.inc.php");
+
+ $log =& Session::getMixed('log');
+ $log->log('profil', $opened_tab);
+ $page->assign('etat_update', 'ok');
+}
+
+require_once("profil/get_{$new_tab}.inc.php");
+require_once("profil/verif_{$new_tab}.inc.php");
+require_once("profil/assign_{$new_tab}.inc.php");
+
+$page->assign('onglet',$new_tab);
+$page->assign('onglet_last',get_last_tab());
+$page->assign('onglet_tpl',"profil/$new_tab.tpl");
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('recovery.tpl', AUTH_PUBLIC);
+
+if (Env::has('login') and Env::has('birth')) {
+ if (!ereg('[0-3][0-9][0-1][0-9][1][9]([0-9]{2})', Env::get('birth'))) {
+ $page->trig_run('Date de naissance incorrecte ou incohérente');
+ }
+ $birth = sprintf('%s-%s-%s', substr(Env::get('birth'),4,4), substr(Env::get('birth'),2,2), substr(Env::get('birth'),0,2));
+
+ $mailorg = strtok(Env::get('login'), '@');
+
+ // paragraphe rajouté : si la date de naissance dans la base n'existe pas, on l'update
+ // avec celle fournie ici en espérant que c'est la bonne
+
+ $res = $globals->xdb->query(
+ "SELECT user_id, naissance
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id=a.id AND type!='homonyme')
+ WHERE a.alias={?} AND u.perms IN ('admin','user') AND u.deces=0", $mailorg);
+ list($uid, $naissance) = $res->fetchOneRow();
+
+ if ($naissance == $birth) {
+ $page->assign('ok', true);
+
+ $url = rand_url_id();
+ $globals->xdb->execute('INSERT INTO perte_pass (certificat,uid,created) VALUES ({?},{?},NOW())', $url, $uid);
+ $res = $globals->xdb->query('SELECT email FROM emails WHERE uid = {?} AND NOT FIND_IN_SET("filter", flags)', $uid);
+ $mails = implode(', ', $res->fetchColumn());
+
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $mymail = new HermesMailer();
+ $mymail->setFrom('"Gestion des mots de passe" <support+password@polytechnique.org>');
+ $mymail->addTo($mails);
+ $mymail->setSubject('Ton certificat d\'authentification');
+ $mymail->setTxtBody("Visite la page suivante qui expire dans six heures :
+{$globals->baseurl}/tmpPWD.php?certificat=$url
+
+Si en cliquant dessus tu n'y arrives pas, copie intégralement l'adresse dans la barre de ton navigateur.
+
+--
+Polytechnique.org
+\"Le portail des élèves & anciens élèves de l'Ecole polytechnique\"".(Post::get('email') ? "
+
+Adresse de secours : \n ".Post::get('email') : "")."
+
+Mail envoyé à ".Env::get('login'));
+ $mymail->send();
+
+ // on cree un objet logger et on log l'evenement
+ $logger = $_SESSION['log'] = new DiogenesCoreLogger($uid);
+ $logger->log('recovery', $emails);
+ } else {
+ $page->trig('Pas de résultat correspondant aux champs entrés dans notre base de données.');
+ }
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+new_skinned_page('referent.tpl',AUTH_COOKIE);
+
+$nb_max_resultats_total = 100;
+$nb_max_resultats_par_page = 10;
+$show_formulaire = true;
+$page->assign_by_ref('show_formulaire', $show_formulaire);
+$page->assign('show_resultat', false);
+
+
+$secteur_selectionne = Post::get('secteur');
+$ss_secteur_selectionne = Post::get('ss_secteur');
+$pays_selectionne = Post::get('pays', '00');
+$expertise_champ = Post::get('expertise');
+
+$page->assign('pays_selectionne',$pays_selectionne);
+$page->assign('expertise_champ',$expertise_champ);
+$page->assign('secteur_selectionne',$secteur_selectionne);
+$page->assign('ss_secteur_selectionne',$ss_secteur_selectionne);
+
+//recuperation des noms de secteurs
+$res = $globals->xdb->iterRow("SELECT id, label FROM emploi_secteur");
+$secteurs[''] = '';
+while (list($tmp_id, $tmp_label) = $res->next()) {
+ $secteurs[$tmp_id] = $tmp_label;
+}
+$page->assign_by_ref('secteurs', $secteurs);
+
+//on recupere les sous-secteurs si necessaire
+$ss_secteurs[''] = '';
+if (!empty($secteur_selectionne))
+{
+ $res = $globals->xdb->iterRow("SELECT id, label FROM emploi_ss_secteur WHERE secteur = {?}", $secteur_selectionne);
+ while (list($tmp_id, $tmp_label) = $res->next()) {
+ $ss_secteurs[$tmp_id] = $tmp_label;
+ }
+}
+$page->assign_by_ref('ss_secteurs', $ss_secteurs);
+
+//recuperation des noms de pays
+$res = $globals->xdb->iterRow("SELECT a2, pays FROM geoloc_pays WHERE pays <> '' ORDER BY pays");
+$pays['00'] = '';
+while (list($tmp_id, $tmp_label) = $res->next()) {
+ $pays[$tmp_id] = $tmp_label;
+}
+$page->assign_by_ref('pays', $pays);
+
+//On vient d'un formulaire
+if (Env::has('Chercher')) {
+
+ $champ_select = 'm.uid, a.prenom, a.nom, a.promo, l.alias, m.expertise';
+ $champ_select = $champ_select.', mp.pid';
+ $champ_select = $champ_select.', ms.secteur, ms.ss_secteur';
+
+ $clause_from = ' FROM mentor AS m
+ LEFT JOIN auth_user_md5 AS a ON(m.uid = a.user_id)
+ INNER JOIN aliases AS l ON (a.user_id=l.id AND FIND_IN_SET(\'bestalias\',l.flags))
+ LEFT JOIN mentor_pays AS mp ON(m.uid = mp.uid)
+ LEFT JOIN mentor_secteurs AS ms ON(m.uid = ms.uid)';
+
+ $clause_where = '';
+
+ if ($pays_selectionne != '00') {
+ $clause_where = $clause_where." mp.pid = '".addslashes($pays_selectionne)."' AND";
+ }
+ if ($secteur_selectionne) {
+ $clause_where = $clause_where." ms.secteur = '".addslashes($secteur_selectionne)."' AND";
+ if($ss_secteur_selectionne) {
+ $clause_where = $clause_where." ms.ss_secteur = '".addslashes($ss_secteur_selectionne)."' AND";
+ }
+ }
+
+ if($expertise_champ) {
+ $clause_where = $clause_where." MATCH(m.expertise) AGAINST('".addslashes($expertise_champ)."') AND";
+ }
+
+ if($clause_where) {
+
+ $show_formulaire = false;
+ $clause_where = substr($clause_where, 0, -3); //on vire le dernier AND
+
+ $sql = "SELECT $champ_select $clause_from WHERE $clause_where GROUP BY uid ORDER BY RAND(".Session::getInt('uid').')';
+ $res = $globals->xdb->iterRow($sql);
+
+ if ($res->total() == 0) {
+ $page->assign('recherche_trop_large',true);
+ } else {
+ if (Env::has('page_courante')) {
+ $page_courante = Env::getInt('page_courante');
+ } else {
+ $page_courante = 1;
+ }
+
+ $current_uid = 0;
+ $nb_resultats = 0;
+ $page->assign('resultats',true);
+ $personnes = Array();
+ $page->assign_by_ref('personnes',$personnes);
+ while( (list($uid, $prenom, $nom, $promo, $bestalias,
+ $expertise_bd, $pays_id, $secteur_id, $ss_secteur_id) = $res->next())
+ || ($nb_resultats >= $nb_max_resultats_total)){
+ if ($current_uid != $uid) {
+ $current_uid = $uid;
+ $page_correspondante = (int)($nb_resultats / $nb_max_resultats_par_page) +1;
+ $nb_resultats++;
+ if( $page_correspondante == $page_courante){
+ $pers_trouve['nom'] = $nom;
+ $pers_trouve['prenom'] = $prenom;
+ $pers_trouve['promo'] = $promo;
+ $pers_trouve['bestalias'] = $bestalias;
+ $pers_trouve['expertise'] = $expertise_bd;
+ $personnes[] = $pers_trouve;
+ }
+ }
+ }
+ $nb_pages = (int) ($nb_resultats/$nb_max_resultats_par_page) + 1;
+ $page->assign('nb_pages_total', $nb_pages);
+ $page->assign('page_courante', $page_courante);
+ }
+ }
+}
+
+if ($show_formulaire) {
+ $res = $globals->xdb->query("SELECT count(*) FROM mentor");
+ $page->assign('mentors_number', $res->fetchOneCell());
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_simple_page('register/end.tpl', AUTH_PUBLIC);
+require_once('user.func.inc.php');
+
+if (Env::has('hash')) {
+ $res = $globals->xdb->query(
+ "SELECT r.uid, r.forlife, r.bestalias, r.mailorg2, r.password, r.email, r.naissance, u.nom, u.prenom, u.promo
+ FROM register_pending AS r
+ INNER JOIN auth_user_md5 AS u ON r.uid = u.user_id
+ WHERE hash={?} AND hash!='INSCRIT'", Env::get('hash'));
+}
+
+if ( !Env::has('hash') ||
+ !list($uid, $forlife, $bestalias, $mailorg2, $password, $email, $naissance, $nom, $prenom, $promo) = $res->fetchOneRow())
+{
+ $page->kill("<p>Cette adresse n'existe pas, ou plus, sur le serveur.</p>
+ <p>Causes probables :</p>
+ <ol>
+ <li>Vérifie que tu visites l'adresse du dernier e-mail reçu s'il y en a eu plusieurs.</li>
+ <li>Tu as peut-être mal copié l'adresse reçue par mail, vérifie-la à la main.</li>
+ <li>
+ Tu as peut-être attendu trop longtemps pour confirmer. Les
+ pré-inscriptions sont annulées tous les 30 jours.
+ </li>
+ <li>
+ Tu es en fait déjà inscrit.
+ </li>
+ </ol>");
+}
+
+
+
+/***********************************************************/
+/****************** REALLY CREATE ACCOUNT ******************/
+/***********************************************************/
+
+$globals->xdb->execute('UPDATE auth_user_md5
+ SET password={?}, perms="user", date=NOW(), naissance={?}, date_ins = NOW()
+ WHERE user_id={?}', $password, $naissance, $uid);
+$globals->xdb->execute('REPLACE INTO auth_user_quick (user_id) VALUES ({?})', $uid);
+$globals->xdb->execute('INSERT INTO aliases (id,alias,type) VALUES ({?}, {?}, "a_vie")', $uid, $forlife);
+$globals->xdb->execute('INSERT INTO aliases (id,alias,type,flags) VALUES ({?}, {?}, "alias", "bestalias")', $uid, $bestalias);
+if ($mailorg2) {
+ $globals->xdb->execute('INSERT INTO aliases (id,alias,type) VALUES ({?}, {?}, "alias")', $uid, $mailorg2);
+}
+
+require_once('emails.inc.php');
+$redirect = new Redirect($uid);
+$redirect->add_email($email);
+
+// on cree un objet logger et on log l'inscription
+$logger = new DiogenesCoreLogger($uid);
+$logger->log('inscription', $email);
+
+$globals->xdb->execute('UPDATE register_pending SET hash="INSCRIT" WHERE uid={?}', $uid);
+
+$globals->hook->subscribe($forlife, $uid, $promo, $password);
+
+require_once('xorg.mailer.inc.php');
+$mymail = new XOrgMailer('inscription.reussie.tpl');
+$mymail->assign('forlife', $forlife);
+$mymail->assign('prenom', $prenom);
+$mymail->send();
+
+start_connexion($uid,false);
+$_SESSION['auth'] = AUTH_MDP;
+
+/***********************************************************/
+/************* envoi d'un mail au démarcheur ***************/
+/***********************************************************/
+$res = $globals->xdb->iterRow(
+ "SELECT DISTINCT sa.alias, s.nom, s.prenom
+ 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);
+$globals->xdb->execute("UPDATE register_mstats SET success=NOW() WHERE uid={?}", $uid);
+
+while (list($salias, $snom, $sprenom) = $res->next()) {
+ require_once('diogenes/diogenes.hermes.inc.php');
+ $mymail = new HermesMailer();
+ $mymail->setSubject("$prenom $nom s'est inscrit à Polytechnique.org !");
+ $mymail->setFrom('"Marketing Polytechnique.org" <register@polytechnique.org>');
+ $mymail->addTo("\"$sprenom $snom\" <$salias@{$globals->mail->domain}>");
+ $msg = "Cher $sprenom,\n\n"
+ . "Nous t'écrivons pour t'informer que {$prenom} {$nom} (X{$promo}), "
+ . "que tu avais incité à s'inscrire à Polytechnique.org, "
+ . "vient à l'instant de terminer son inscription !!\n\n"
+ . "Merci de ta participation active à la reconnaissance de ce site !!!\n\n"
+ . "Bien cordialement,\n"
+ . "L'équipe Polytechnique.org";
+ $mymail->setTxtBody(wordwrap($msg, 72));
+ $mymail->send();
+}
+
+$globals->xdb->execute("DELETE FROM register_marketing WHERE uid = {?}", $uid);
+
+header('Location: success.php');
+$page->assign('uid', $uid);
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+
+$sub_state = Session::getMixed('sub_state', Array());
+if (!isset($sub_state['step'])) {
+ $sub_state['step'] = 0;
+}
+if (Get::has('back') && Get::getInt('back') < $sub_state['step']) {
+ $sub_state['step'] = max(0,Get::getInt('back'));
+}
+
+if (Env::has('hash')) {
+ $res = $globals->xdb->query(
+ "SELECT m.uid, u.promo, u.nom, u.prenom, u.matricule
+ FROM register_marketing AS m
+ INNER JOIN auth_user_md5 AS u ON u.user_id = m.uid
+ WHERE m.hash={?}", Env::get('hash'));
+ if (list($uid, $promo, $nom, $prenom, $ourmat) = $res->fetchOneRow()) {
+ $sub_state['uid'] = $uid;
+ $sub_state['hash'] = Env::get('hash');
+ $sub_state['promo'] = $promo;
+ $sub_state['nom'] = $nom;
+ $sub_state['prenom'] = $prenom;
+ $sub_state['ourmat'] = $ourmat;
+
+ $globals->xdb->execute(
+ "REPLACE INTO register_mstats (uid,sender,success)
+ SELECT m.uid, m.sender, 0
+ FROM register_marketing AS m
+ WHERE m.hash", $sub_state['hash']);
+ }
+}
+
+switch ($sub_state['step']) {
+ case 0:
+ if (Post::has('step1')) {
+ $sub_state['step'] = 1;
+ if (isset($sub_state['hash'])) {
+ $sub_state['step'] = 3;
+ require_once('register.inc.php');
+ create_aliases($sub_state);
+ }
+ }
+ break;
+
+ case 1:
+ if (Post::has('promo')) {
+ $promo = Post::getInt('promo');
+ if ($promo < 1900 || $promo > date('Y')) {
+ $err = "La promotion saisie est incorrecte !";
+ } else {
+ $sub_state['step'] = 2;
+ $sub_state['promo'] = $promo;
+ if ($promo >= 1996 && $promo<2000) {
+ $sub_state['mat'] = ($promo % 100)*10 . '???';
+ } elseif($promo >= 2000) {
+ $sub_state['mat'] = 100 + ($promo % 100) . '???';
+ }
+ }
+ }
+ break;
+
+ case 2:
+ if (count($_POST)) {
+ require_once('register.inc.php');
+ $sub_state['prenom'] = Post::get('prenom');
+ $sub_state['nom'] = Post::get('nom');
+ $sub_state['mat'] = Post::get('mat');
+ $err = check_new_user($sub_state);
+
+ if ($err !== true) { break; }
+ $err = create_aliases($sub_state);
+ if ($err === true) {
+ unset($err);
+ $sub_state['step'] = 3;
+ }
+ }
+ break;
+
+ case 3:
+ if (count($_POST)) {
+ require_once('register.inc.php');
+ if (!isvalid_email(Post::get('email'))) {
+ $err[] = "Le champ 'E-mail' n'est pas valide.";
+ } elseif (!isvalid_email_redirection(Post::get('email'))) {
+ $err[] = $sub_state['forlife']." doit renvoyer vers un email existant ".
+ "valide, en particulier, il ne peut pas être renvoyé vers lui-même.";
+ }
+ if (!preg_match('/^[0-3][0-9][01][0-9][12][90][0-9][0-9]$/', Post::get('naissance'))) {
+ $err[] = "La 'Date de naissance' n'est pas correcte.";
+ }
+
+ if (isset($err)) {
+ $err = join('<br />', $err);
+ } else {
+ $birth = Env::get('naissance');
+ $sub_state['naissance'] = sprintf("%s-%s-%s", substr($birth,4,4), substr($birth,2,2), substr($birth,0,2));
+ $sub_state['email'] = Post::get('email');
+ $sub_state['step'] = 4;
+ finish_ins($sub_state);
+ }
+ }
+ break;
+}
+
+$_SESSION['sub_state'] = $sub_state;
+new_simple_page('register/step'.intval($sub_state['step']).'.tpl', AUTH_PUBLIC);
+if (isset($err)) { $page->trig($err); }
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_simple_page('register/success.tpl', AUTH_MDP);
+
+if (Env::has('response2')) {
+ $_SESSION['password'] = $password = Post::get('response2');
+
+ $globals->xdb->execute('UPDATE auth_user_md5 SET password={?} WHERE user_id={?}', $password, Session::getInt('uid'));
+
+ $log =& Session::getMixed('log');
+ $log->log('passwd', '');
+
+ if (Cookie::get('ORGaccess')) {
+ setcookie('ORGaccess', md5($password), (time()+25920000), '/', '' ,0);
+ }
+
+ $page->assign('mdpok', true);
+}
+
+$page->addJsLink('javascript/md5.js');
+$page->addJsLink('javascript/motdepassemd5.js');
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+require_once('rss.inc.php');
+
+$uid = init_rss('rss.tpl');
+
+$rss = $globals->xdb->iterator(
+ 'SELECT e.id, e.titre, e.texte, e.creation_date
+ FROM auth_user_md5 AS u
+ INNER JOIN evenements AS e ON ( (e.promo_min = 0 || e.promo_min <= u.promo) AND (e.promo_max = 0 || e.promo_max >= u.promo) )
+ WHERE u.user_id = {?} AND FIND_IN_SET(e.flags, "valide") AND peremption >= NOW()', $uid);
+$page->assign('rss', $rss);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once("search.inc.php");
+
+new_skinned_page('search.tpl', AUTH_PUBLIC);
+if (logged()) {
+ new_skinned_page('search.tpl', AUTH_COOKIE);
+}
+
+require_once("applis.func.inc.php");
+require_once("geoloc.inc.php");
+
+$page->assign('baseurl', $globals->baseurl);
+
+if (Env::has('quick')) {
+ $page->assign('formulaire', 0);
+
+ // {{{ get_list
+ function get_list($offset, $limit, $order) {
+ global $globals;
+ $qSearch = new QuickSearch('quick');
+ $fields = new SFieldGroup(true, array($qSearch));
+
+ if ($qSearch->isempty()) {
+ new ThrowError('Recherche trop générale.');
+ }
+
+ $sql = 'SELECT SQL_CALC_FOUND_ROWS
+ UPPER(IF(u.nom!="",u.nom,u.nom_ini)) AS nom,
+ IF(u.prenom!="",u.prenom,u.prenom_ini) AS prenom,
+ '.$globals->search->result_fields.'
+ c.uid AS contact,
+ w.ni_id AS watch,
+ '.$qSearch->get_score_statement().'
+ FROM auth_user_md5 AS u
+ '.$fields->get_select_statement().'
+ LEFT JOIN auth_user_quick AS q ON (u.user_id = q.user_id)
+ LEFT JOIN aliases AS a ON (u.user_id = a.id AND a.type="a_vie")
+ LEFT JOIN contacts AS c ON (c.uid='.Session::getInt('uid').' AND c.contact=u.user_id)
+ LEFT JOIN watch_nonins AS w ON (w.ni_id=u.user_id AND w.uid='.Session::getInt('uid').')
+ '.$globals->search->result_where_statement.'
+ WHERE '.$fields->get_where_statement().(logged() && Env::has('nonins') ? ' AND u.perms="pending" AND u.deces=0' : '').'
+ GROUP BY u.user_id
+ ORDER BY '.($order?($order.', '):'')
+ .implode(',',array_filter(array($fields->get_order_statement(), 'u.promo DESC, NomSortKey, prenom'))).'
+ LIMIT '.$offset * $globals->search->per_page.','.$globals->search->per_page;
+ $list = $globals->xdb->iterator($sql);
+ $res = $globals->xdb->query("SELECT FOUND_ROWS()");
+ $nb_tot = $res->fetchOneCell();
+ return array($list, $nb_tot);
+ }
+
+ // }}}
+
+ $search = new XOrgSearch(get_list);
+ $search->setNbLines($globals->search->per_page);
+ $search->addOrder('score', 'score', false, 'pertinence', AUTH_PUBLIC, true);
+
+ $nb_tot = $search->show();
+
+ if (!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');
+ } elseif (empty($nb_tot)) {
+ new ThrowError('il n\'existe personne correspondant à ces critères dans la base !');
+ }
+
+} else {
+ $page->assign('formulaire',1);
+}
+
+$page->register_modifier('display_lines', 'display_lines');
+$page->run();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+if (!$globals->skin->enable) {
+ header('Location: index.php');
+}
+new_skinned_page('skins.tpl', AUTH_COOKIE);
+
+if (Env::has('newskin')) { // formulaire soumis, traitons les données envoyées
+ $globals->xdb->execute('UPDATE auth_user_quick SET skin={?} WHERE user_id={?}', Env::getInt('newskin'), Session::getInt('uid'));
+ set_skin();
+}
+
+$sql = "SELECT s.*,auteur,count(*) AS nb
+ FROM skins AS s
+ LEFT JOIN auth_user_quick AS a ON s.id=a.skin
+ WHERE skin_tpl != '' AND ext != ''
+ GROUP BY id ORDER BY s.date DESC";
+$page->assign_by_ref('skins', $globals->xdb->iterator($sql));
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('stats/coupure.tpl',AUTH_PUBLIC);
+
+function serv_to_str($params) {
+ $flags = explode(',',$params);
+ $trad = Array('web' => 'site web', 'mail'=> 'redirection mail',
+ 'smtp' => 'serveur sécurisé d\'envoi de mails',
+ 'nntp' => 'serveur des forums de discussion');
+ $ret = Array();
+ foreach ($flags as $flag) {
+ $ret[] = $trad[$flag];
+ }
+ return implode(', ',$ret);
+}
+
+if (Env::has('cp_id')) {
+ $res = $globals->xdb->query("SELECT UNIX_TIMESTAMP(debut) AS debut,
+ TIME_FORMAT(duree,'%kh%i') AS duree,
+ resume, description, services
+ FROM coupures
+ WHERE id = {?}", Env::getInt('cp_id'));
+ $cp = $res->fetchOneAssoc();
+}
+
+if($cp) {
+ $cp['lg_services'] = serv_to_str($cp['services']);
+ $page->assign_by_ref('cp',$cp);
+} else {
+ $beginning_date = date("Ymd", time() - 3600*24*21) . "000000";
+ $sql = "select id, UNIX_TIMESTAMP(debut) as debut, resume, services from coupures where debut > '$beginning_date' order by debut desc";
+ $page->assign('coupures', $globals->xdb->iterator($sql));
+}
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("stats/evolution_inscrits.tpl", AUTH_COOKIE);
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+
+new_skinned_page('index.tpl', AUTH_COOKIE);
+$promo = Env::getInt('promo', Session::getInt('promo'));
+
+// date de départ
+$depart = 1920;
+
+//recupere le nombre d'inscriptions par jour sur la plage concernée
+$res = $globals->xdb->iterRow(
+ "SELECT promo, SUM(perms IN ('admin', 'user')) / COUNT(*) * 100
+ FROM auth_user_md5
+ WHERE promo >= $depart AND deces = 0
+ GROUP BY promo");
+
+//genere des donnees compatibles avec GNUPLOT
+$inscrits='';
+
+// la première ligne contient le total des inscrits avant la date de départ
+list($annee, $nb) = $res->next();
+
+for ($i=$depart;$i<=date("Y");$i++) {
+ if ($annee<$i) {
+ if(!list($annee, $nb) = $res->next()) {
+ $annee = 0;
+ $nb = 0;
+ }
+ }
+ if ($nb > 0 || $i < date("Y"))
+ $inscrits .= $i." ".$nb."\n";
+}
+
+//Genere le graphique à la volée avec GNUPLOT
+header( "Content-type: image/png");
+
+$ymin = 0;
+$ymax = 100;
+
+$fin = $i+10;
+
+$gnuplot = <<<EOF2
+gnuplot <<EOF
+
+set term png small color
+set size 640/480
+set timefmt "%d/%m/%y"
+
+set xr [$depart:$fin]
+set yr [$ymin:$ymax]
+
+set title "Nombre d'inscrits par promotion depuis $depart."
+
+plot "-" using 1:2 title 'inscrits' with boxes;
+{$inscrits}
+EOF
+EOF2;
+
+passthru($gnuplot);
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+
+new_skinned_page('index.tpl', AUTH_COOKIE);
+
+//nombre de jours sur le graph
+$JOURS=Env::getInt('jours', 364);
+define('DUREEJOUR',24*3600);
+
+//recupere le nombre d'inscriptions par jour sur la plage concernée
+$res = $globals->xdb->iterRow(
+ "SELECT IF( date_ins>DATE_SUB(NOW(),INTERVAL $JOURS DAY),
+ TO_DAYS(date_ins)-TO_DAYS(NOW()),
+ ".(-($JOURS+1)).") AS jour,
+ COUNT(user_id) AS nb
+ FROM auth_user_md5
+ WHERE perms IN ('admin','user')
+ GROUP BY jour");
+
+//genere des donnees compatibles avec GNUPLOT
+$inscrits='';
+
+// la première ligne contient le total des inscrits avant la date de départ (J - $JOURS)
+list(,$init_nb) = $res->next();
+$total = $init_nb;
+
+list($numjour, $nb) = $res->next();
+
+for ($i=-$JOURS;$i<=0;$i++) {
+ if ($numjour<$i) {
+ if(!list($numjour, $nb) = $res->next()) {
+ $numjour = 0;
+ $nb = 0;
+ }
+ }
+ if ($numjour==$i) $total+=$nb;
+ $inscrits .= date('d/m/y',$i*DUREEJOUR+time())." ".$total."\n";
+}
+
+//Genere le graphique à la volée avec GNUPLOT
+header( "Content-type: image/png");
+
+$delt = ($total - $init_nb)/10;
+$ymin = round($init_nb - $delt,0);
+$ymax = round($total + $delt,0);
+
+$gnuplot = <<<EOF2
+gnuplot <<EOF
+
+set term png small color
+set size 640/480
+set xdata time
+set timefmt "%d/%m/%y"
+
+set format x "%m/%y"
+set yr [$ymin:$ymax]
+
+set title "Nombre d'inscrits"
+
+plot "-" using 1:2 title 'inscrits' with lines;
+{$inscrits}
+EOF
+EOF2;
+
+passthru($gnuplot);
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+
+new_skinned_page('index.tpl', AUTH_COOKIE);
+$promo = Env::getInt('promo', Session::getInt('promo'));
+
+//nombre de jours sur le graph
+$JOURS=364;
+define('DUREEJOUR',24*3600);
+$res = $globals->xdb->query("SELECT min(TO_DAYS(date_ins)-TO_DAYS(now())) FROM auth_user_md5 WHERE promo = {?} AND perms IN ('admin', 'user')", $promo);
+$JOURS = -$res->fetchOneCell();
+
+//recupere le nombre d'inscriptions par jour sur la plage concernée
+$res = $globals->xdb->iterRow(
+ "SELECT IF( date_ins>DATE_SUB(NOW(),INTERVAL $JOURS DAY),
+ TO_DAYS(date_ins)-TO_DAYS(NOW()),
+ ".(-($JOURS+1)).") AS jour,
+ COUNT(user_id) AS nb
+ FROM auth_user_md5
+ WHERE promo = {?} AND perms IN ('admin','user')
+ GROUP BY jour", $promo);
+
+//genere des donnees compatibles avec GNUPLOT
+$inscrits='';
+
+// la première ligne contient le total des inscrits avant la date de départ (J - $JOURS)
+list(,$init_nb) = $res->next();
+$total = $init_nb;
+
+list($numjour, $nb) = $res->next();
+
+for ($i=-$JOURS;$i<=0;$i++) {
+ if ($numjour<$i) {
+ if(!list($numjour, $nb) = $res->next()) {
+ $numjour = 0;
+ $nb = 0;
+ }
+ }
+ if ($numjour==$i) $total+=$nb;
+ $inscrits .= date('d/m/y',$i*DUREEJOUR+time())." ".$total."\n";
+}
+
+//Genere le graphique à la volée avec GNUPLOT
+header( "Content-type: image/png");
+
+$delt = ($total - $init_nb) / 10;
+$delt += ($delt < 1);
+$ymin = round($init_nb - $delt,0);
+$ymax = round($total + $delt,0);
+
+$gnuplot = <<<EOF2
+gnuplot <<EOF
+
+set term png small color
+set size 640/480
+set xdata time
+set timefmt "%d/%m/%y"
+
+set format x "%m/%y"
+set yr [$ymin:$ymax]
+
+set title "Nombre d'inscrits de la promotion $promo."
+
+plot "-" using 1:2 title 'inscrits' with lines;
+{$inscrits}e
+EOF
+EOF2;
+
+passthru($gnuplot);
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("stats/index.tpl",AUTH_PUBLIC);
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('stats/nb_by_promo.tpl', AUTH_COOKIE);
+
+$res = $globals->xdb->iterRow(
+ "SELECT promo,COUNT(*)
+ FROM auth_user_md5
+ WHERE promo > 1900 AND perms IN ('admin','user')
+ GROUP BY promo
+ ORDER BY promo");
+$max=0; $min=3000;
+
+while (list($promo,$nb) = $res->next()) {
+ $promo = intval($promo);
+ if(!isset($nbpromo[$promo/10])) {
+ $nbpromo[$promo/10] = Array('','','','','','','','','',''); // tableau de 10 cases vides
+ }
+ $nbpromo[$promo/10][$promo%10]=Array('promo' => $promo, 'nb' => $nb);
+}
+
+$page->assign_by_ref('nbs', $nbpromo);
+$page->assign('min', $min-$min % 10);
+$page->assign('max', $max+10-$max%10);
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page("stats/stats_promo.tpl", AUTH_COOKIE);
+
+$promo = Env::getInt('promo', Session::getInt('promo'));
+$page->assign('promo',$promo);
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+
+$globals->xdb->execute('DELETE FROM perte_pass WHERE DATE_SUB(NOW(), INTERVAL 380 MINUTE) > created');
+
+$certif = Env::get('certificat');
+$res = $globals->xdb->query('SELECT uid FROM perte_pass WHERE certificat={?}', $certif);
+
+if ($ligne = $res->fetchOneAssoc()) {
+ $uid = $ligne["uid"];
+ if (Post::has('response2')) {
+ $password = Post::get('response2');
+ $logger = new DiogenesCoreLogger($uid);
+ $globals->xdb->query('UPDATE auth_user_md5 SET password={?} WHERE user_id={?} AND perms IN("admin","user")', $password, $uid);
+ $globals->xdb->query('DELETE FROM perte_pass WHERE certificat={?}', $certif);
+ $logger->log("passwd","");
+ new_skinned_page('tmpPWD.success.tpl', AUTH_PUBLIC);
+ $page->run();
+ } else {
+ new_skinned_page('motdepassemd5.tpl', AUTH_PUBLIC);
+ $page->addJsLink('javascript/md5.js');
+ $page->addJsLink('javascript/motdepassemd5.js');
+ $page->run();
+ }
+} else {
+ new_skinned_page('index.tpl', AUTH_PUBLIC);
+ $page->kill("Cette adresse n'existe pas ou n'existe plus sur le serveur.");
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+require_once("money/trezo.inc.php");
+new_admin_page('trezo/gere_operations.tpl');
+
+$action = clean_request('action');
+$op_id = clean_request('op_id');
+$op_date = clean_request('op_date');
+$op_label = clean_request('op_label');
+$op_credit = clean_request('op_credit');
+$op_debit = clean_request('op_debit');
+
+$annee_sel = isset($_REQUEST['annee']) ? $_REQUEST['annee'] : date("Y");
+$mois_sel = isset($_REQUEST['mois']) ? $_REQUEST['mois'] : sprintf("%02u", date('m'));
+
+$from_date = "$annee_sel-$mois_sel-01";
+$to_date = "$annee_sel-$mois_sel-31";
+$mon_sel = $trim_fr[$mois_sel]." $annee_sel";
+
+switch($action) {
+ case "edit":
+ if ($op_id) {
+ $res = $globals->xdb->query("SELECT date,label,credit,debit FROM money_trezo WHERE id={?}", $op_id);
+ list($op_date,$op_label,$op_credit,$op_debit) = $res->fetchOneRow();
+ }
+ break;
+
+ case "update":
+ if (isDate($op_date)){
+ $mydatefr = explode("/",$op_date);
+ $mydate = $mydatefr[2]."-".$mydatefr[1]."-".$mydatefr[0];
+ } else {
+ $mydate = date("Y-m-d");
+ }
+
+ $sql = "replace into money_trezo set date='$mydate',label='".addslashes($op_label)."'";
+
+ if ($op_credit) { $sql .= ',credit='.$op_credit; }
+ if ($op_debit) { $sql .= ",debit=".$op_debit; }
+ if ($op_id) { $sql .= ",id='$op_id'"; }
+
+ $globals->xdb->execute($sql);
+ break;
+
+ case "del":
+ if ($op_id) {
+ $globals->xdb->execute("DELETE FROM money_trezo WHERE id={?}", $op_id);
+ }
+ break;
+}
+
+$page->assign('op_id', $op_id);
+$page->assign('annee_sel', $annee_sel);
+$page->assign('mois_sel', $mois_sel);
+$page->assign('op_date', $op_date);
+$page->assign('op_label', $op_label);
+$page->assign('op_debit', $op_debit);
+$page->assign('op_credit', $op_credit);
+$page->assign('mon_sel', $mon_sel);
+
+$page->assign('from_solde', solde_until($from_date));
+$page->assign('to_solde', solde_until($to_date));
+$page->assign('month_arr', $mois_fr);
+$page->assign('ops', $globals->xdb->iterator(
+ "SELECT id,date,label,credit,debit FROM money_trezo WHERE date >= {?} and date <= {?} ORDER BY date",
+ $from_date, $to_date));
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+require_once("money/trezo.inc.php");
+new_skinned_page('trezo/index.tpl', AUTH_COOKIE);
+
+//Table operations :
+//+--------+---------------+------+-----+------------+----------------+
+//| Field | Type | Null | Key | Default | Extra |
+//+--------+---------------+------+-----+------------+----------------+
+//| id | int(11) | | PRI | NULL | auto_increment |
+//| date | date | | | 0000-00-00 | |
+//| label | varchar(80) | | | | |
+//| credit | decimal(10,2) | | | 0.00 | |
+//| debit | decimal(10,2) | | | 0.00 | |
+//+--------+---------------+------+-----+------------+----------------+
+
+$annee_sel = isset($_REQUEST['annee']) ? $_REQUEST['annee'] : date("Y");
+$mois_sel = isset($_REQUEST['mois']) ? $_REQUEST['mois'] : sprintf("%02u", date('m') - (intval(date('m')-1)%3));
+
+$mois_sel_fin = sprintf("%02u",$mois_sel + 2);
+$from_date = "$annee_sel-$mois_sel-01";
+$to_date = "$annee_sel-$mois_sel_fin-31";
+$mon_sel = $trim_fr[$mois_sel]." $annee_sel";
+
+$page->assign('from_solde', solde_until($from_date));
+$page->assign('to_solde', solde_until($to_date));
+$page->assign('annee_sel', $annee_sel);
+$page->assign('mois_sel', $mois_sel);
+$page->assign('mon_sel', $mon_sel);
+$page->assign_by_ref('month_arr', $trim_fr);
+
+$page->assign('ops', $globals->xdb->iterator(
+ "SELECT date,label,credit,debit FROM money_trezo WHERE date >= {?} and date <= {?} ORDER BY date",
+ $from_date, $to_date));
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+new_skinned_page('trombino.tpl', AUTH_MDP);
+
+require_once('validations.inc.php');
+
+$trombi_x = '/home/web/trombino/photos'.Session::get('promo').'/'.Session::get('forlife').'.jpg';
+
+if (Env::has('upload')) {
+ $file = isset($_FILES['userfile']['tmp_name']) ? $_FILES['userfile']['tmp_name'] : Env::get('photo');
+ if ($data = file_get_contents($file)) {
+ if ($myphoto = new PhotoReq(Session::getInt('uid'), $data)) {
+ $myphoto->submit();
+ }
+ } else {
+ $page->trig('Fichier inexistant ou vide');
+ }
+} elseif (Env::has('trombi')) {
+ $myphoto = new PhotoReq(Session::getInt('uid'), file_get_contents($trombi_x));
+ if ($myphoto) {
+ $myphoto->commit();
+ $myphoto->clean();
+ }
+} elseif (Env::get('suppr')) {
+ $globals->xdb->execute('DELETE FROM photo WHERE uid = {?}', Session::getInt('uid'));
+ $globals->xdb->execute('DELETE FROM requests WHERE user_id = {?} AND type="photo"', Session::getInt('uid'));
+} elseif (Env::get('cancel')) {
+ $sql = $globals->xdb->query('DELETE FROM requests WHERE user_id={?} AND type="photo"', Session::getInt('uid'));
+}
+
+$sql = $globals->xdb->query('SELECT COUNT(*) FROM requests WHERE user_id={?} AND type="photo"', Session::getInt('uid'));
+$page->assign('submited', $sql->fetchOneCell());
+$page->assign('has_trombi_x', file_exists($trombi_x));
+
+$page->run();
+
+// Affichage de la page principale
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('trombipromo.tpl', AUTH_COOKIE);
+require_once("trombi.inc.php");
+
+function getList($offset,$limit) {
+ global $globals;
+
+ $xpromo = Env::getInt('xpromo');
+ $where = ( $xpromo>0 ? "WHERE promo='$xpromo'" : "" );
+
+ $res = $globals->xdb->query(
+ "SELECT COUNT(*)
+ FROM auth_user_md5 AS u
+ RIGHT JOIN photo AS p ON u.user_id=p.uid
+ $where");
+ $pnb = $res->fetchOneCell();
+
+ $res = $globals->xdb->query(
+ "SELECT promo,user_id,a.alias AS forlife,nom,prenom
+ FROM photo AS p
+ INNER JOIN auth_user_md5 AS u ON u.user_id=p.uid
+ INNER JOIN aliases AS a ON ( u.user_id=a.id AND a.type='a_vie' )
+ $where
+ ORDER BY promo,nom,prenom LIMIT {?}, {?}", $offset*$limit, $limit);
+
+ return Array($pnb, $res->fetchAllAssoc());
+}
+
+if (Env::has('xpromo')) {
+ $xpromo = Env::getInt('xpromo');
+
+ if ( $xpromo<1900 || $xpromo>date('Y') || ($xpromo == -1 && Session::get('perms')!="admin") ) {
+ $page->trig("Promotion incorrecte (saisir au format YYYY). Recommence.");
+ $page->assign('error', true);
+ } else {
+ $trombi = new Trombi('getList');
+ $trombi->hidePromo();
+ $trombi->setAdmin();
+ $page->assign_by_ref('trombi',$trombi);
+ }
+}
+
+$page->run();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_nonhtml_page('vcard.tpl', AUTH_COOKIE);
+require_once("xorg.misc.inc.php");
+require_once("user.func.inc.php");
+
+function format_adr($params, &$smarty)
+{
+ // $adr1, $adr2, $adr3, $postcode, $city, $region, $country
+ extract($params['adr']);
+ $adr = $adr1;
+ $adr = trim("$adr\n$adr2");
+ $adr = trim("$adr\n$adr3");
+ return quoted_printable_encode(";;$adr;$city;$region;$postcode;$country");
+}
+
+$page->register_modifier('qp_enc', 'quoted_printable_encode');
+$page->register_function('format_adr', 'format_adr');
+
+$login = get_user_forlife(Env::get('x'));
+$user = get_user_details($login);
+
+// alias virtual
+$res = $globals->xdb->query(
+ "SELECT alias
+ FROM virtual
+ INNER JOIN virtual_redirect USING(vid)
+ INNER JOIN auth_user_quick ON ( user_id = {?} AND emails_alias_pub = 'public' )
+ WHERE ( redirect={?} OR redirect={?} )
+ AND alias LIKE '%@{$globals->mail->alias_dom}'",
+ Session::getInt('uid'), $user['forlife'].'@'.$globals->mail->domain, $user['forlife'].'@'.$globals->mail->domain2);
+$user['virtualalias'] = $res->fetchOneCell();
+
+$page->assign_by_ref('vcard', $user);
+
+header("Pragma: ");
+header("Cache-Control: ");
+header("Content-type: text/x-vcard\n");
+header("Content-Transfer-Encoding: Quoted-Printable\n");
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.inc.php");
+new_skinned_page('webredirect.tpl', AUTH_MDP);
+
+$log =& Session::getMixed('log');
+$url = Env::get('url');
+
+if ((Env::get('submit') == 'Valider' or Env::get('submit') == 'Modifier') and Env::has('url')) {
+ if ($globals->xdb->execute('UPDATE auth_user_quick SET redirecturl = {?} WHERE user_id = {?}',
+ $url, Session::getInt('uid')))
+ {
+ $log->log('carva_add', 'http://'.Env::get('url'));
+ $page->trig("Redirection activée vers <a href='http://$url'>$url</a>");
+ } else {
+ $page->trig('Erreur de mise à jour');
+ }
+} elseif (Env::get('submit') == "Supprimer") {
+ if ($globals->xdb->execute("UPDATE auth_user_quick SET redirecturl = '' WHERE user_id = {?}", Session::getInt('uid')))
+ {
+ $log->log("carva_del", $url);
+ Post::kill('url');
+ $page->trig('Redirection supprimée');
+ } else {
+ $page->trig('Erreur de suppression');
+ }
+}
+
+
+$res = $globals->xdb->query('SELECT redirecturl FROM auth_user_quick WHERE user_id = {?}', Session::getInt('uid'));
+$page->assign('carva', $res->fetchOneCell());
+
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.inc.php');
+require_once('webservices/manageurs.server.inc.php');
+
+$ips = array_flip(split(' ',$globals->manageurs->authorized_ips));
+
+if($ips && isset($ips[$_SERVER['REMOTE_ADDR']])){
+
+ $server = xmlrpc_server_create();
+
+ xmlrpc_server_register_method($server, "get_annuaire_infos", "get_annuaire_infos");
+
+ $request = $GLOBALS['HTTP_RAW_POST_DATA'];
+
+ $response = xmlrpc_server_call_method($server, $request, null);
+ header('Content-Type: text/xml');
+ print $response;
+
+ xmlrpc_server_destroy($server);
+
+}
+
+?>
--- /dev/null
+# Mozilla/Polytechnique.org plug-in by contact@polytechnique.org
+
+<search
+ name="Polytechnique.org"
+ description="Recherche rapide X.org"
+ method="GET"
+ action="http://www.polytechnique.org/search.php"
+ update="http://www.polytechnique.org/xorg.src"
+ updateCheckDays=30
+ queryEncoding="ISO-8859-15"
+ queryCharset="ISO-8859-15">
+
+<input name="quick" user>
+</search>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+global $page;
+
+function applis_options($current=0) {
+ global $globals;
+ $html = '<option value="-1"></option>';
+ $res = $globals->xdb->iterator("select * from applis_def order by text");
+ while ($arr_appli = $res->next()) {
+ $html .= '<option value="'.$arr_appli["id"].'"';
+ if ($arr_appli["id"]==$current) $html .= " selected='selected'";
+ $html .= '>'.htmlspecialchars($arr_appli["text"])."</option>\n";
+ }
+ return $html;
+}
+/** pour appeller applis_options depuis smarty
+ */
+function _applis_options_smarty($params){
+ if(!isset($params['selected']))
+ $params['selected'] = 0;
+ return applis_options($params['selected']);
+}
+$page->register_function('applis_options','_applis_options_smarty');
+
+
+/** affiche un Array javascript contenant les types de chaque appli
+ */
+function applis_type(){
+ global $globals;
+ $html = "";
+ $res=$globals->xdb->iterRow("select type from applis_def order by text");
+ if (list($appli_type) = $res->next()) {
+ $html .= "new Array('".str_replace(",","','",$appli_type)."')";
+ }
+ while (list($appli_type) = $res->next()) {
+ $html .= ",\nnew Array('".str_replace(",","','",$appli_type)."')";
+ }
+ return $html;
+}
+$page->register_function('applis_type','applis_type');
+
+/** affiche tous les types possibles d'applis
+ */
+function applis_type_all(){
+ global $globals;
+ $res = $globals->xdb->query("show columns from applis_def like 'type'");
+ $arr_appli = $res->fetchOneAssoc();
+ return str_replace(")","",str_replace("set(","",$arr_appli["Type"]));
+}
+$page->register_function('applis_type_all','applis_type_all');
+
+/** formatte une ecole d'appli pour l'affichage
+ */
+function applis_fmt($type, $text, $url) {
+ $txt="";
+ if (($type!="Ingénieur")&&($type!="Diplôme"))
+ $txt .= $type;
+ if ($text!="Université") {
+ if ($txt) $txt .= " ";
+ if ($url)
+ $txt .= "<a href=\"$url\" onclick=\"return popup(this)\">$text</a>";
+ else
+ $txt .= $text;
+ }
+ return $txt;
+}
+function _applis_fmt($params, &$smarty) {
+ extract($params);
+ return applis_fmt($type, $text, $url);
+}
+$page->register_function('applis_fmt','_applis_fmt');
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('banana/banana.inc.php');
+
+function hook_formatDisplayHeader($_header,$_text) {
+ global $banana;
+ if ($_header == 'x-org-id') {
+ return "$_text [<a href=\"../fiche.php?user=$_text\" class='popup2'>fiche</a>]";
+ }
+}
+
+function hook_headerTranslate($hdr) {
+ if ($hdr == 'x-org-id') {
+ return 'Identité';
+ }
+}
+
+function hook_checkcancel($_headers) {
+ return ($_headers['x-org-id'] == Session::get('forlife') or has_perms());
+}
+
+class PlatalBanana extends Banana
+{
+ var $profile = Array( 'name' => '', 'sig' => '', 'org' => 'Utilisateur de Polytechnique.org',
+ 'customhdr' =>'', 'display' => 0, 'lastnews' => 0, 'locale' => 'fr_FR', 'subscribe' => array());
+
+ function PlatalBanana()
+ {
+ global $globals;
+
+ $uid = Session::getInt('uid');
+ $req = $globals->xdb->query(
+ "SELECT nom, mail, sig, FIND_IN_SET('threads',flags), FIND_IN_SET('automaj',flags)
+ FROM {$globals->banana->table_prefix}profils
+ WHERE uid={?}", $uid);
+
+ if (!(list($nom,$mail,$sig,$disp,$maj) = $req->fetchOneRow())) {
+ $nom = Session::get('prenom')." ".Session::get('nom');
+ $mail = Session::get('forlife')."@polytechnique.org";
+ $sig = $nom." (".Session::getInt('promo').")";
+ $disp = 0;
+ $maj = 1;
+ }
+ $this->profile['name'] = "$nom <$mail>";
+ $this->profile['sig'] = $sig;
+ $this->profile['display'] = $disp;
+ $this->profile['autoup'] = $maj;
+ $this->profile['lastnews'] = Session::get('banana_last');
+
+ if ($maj) {
+ $globals->xdb->execute("UPDATE auth_user_quick SET banana_last={?} WHERE user_id={?}", gmdate("YmdHis"), $uid);
+ }
+
+ $req = $globals->xdb->query(
+ "SELECT nom
+ FROM {$globals->banana->table_prefix}abos
+ LEFT JOIN {$globals->banana->table_prefix}list ON list.fid=abos.fid
+ WHERE uid={?}", $uid);
+ $this->profile['subscribe'] = $req->fetchColumn();
+
+ array_splice($this->show_hdr, count($this->show_hdr) - 2, 0, 'x-org-id');
+ array_splice($this->parse_hdr, count($this->parse_hdr) - 2, 0, 'x-org-id');
+
+ $this->host = 'news://web_'.Session::get('forlife')
+ .":{$globals->banana->password}@{$globals->banana->server}:{$globals->banana->port}/";
+
+ parent::Banana();
+ }
+
+ function run()
+ {
+ global $banana, $globals;
+
+ if (Get::get('banana') == 'updateall') {
+ $globals->xdb->execute('UPDATE auth_user_quick SET banana_last={?} WHERE user_id={?}', gmdate('YmdHis'), Session::getInt('uid'));
+ $_SESSION['banana_last'] = time();
+ header('Location: ?');
+ }
+ return Banana::run('PlatalBanana');
+ }
+
+ function action_saveSubs()
+ {
+ global $globals;
+ $uid = Session::getInt('uid');
+
+ $this->profile['subscribe'] = Array();
+ $globals->xdb->execute("DELETE FROM {$globals->banana->table_prefix}abos WHERE uid={?}", $uid);
+ if (!count($_POST['subscribe'])) {
+ return true;
+ }
+
+ $req = $globals->xdb->iterRow("SELECT fid,nom FROM {$globals->banana->table_prefix}list");
+ $fids = array();
+ while (list($fid,$fnom) = $req->next()) {
+ $fids[$fnom] = $fid;
+ }
+
+ $diff = array_diff($_POST['subscribe'], array_keys($fids));
+ foreach ($diff as $g) {
+ $globals->xdb->execute("INSERT INTO {$globals->banana->table_prefix}list (nom) VALUES ({?})", $g);
+ $fids[$g] = mysql_insert_id();
+ }
+
+ foreach ($_POST['subscribe'] as $g) {
+ $globals->xdb->execute("INSERT INTO {$globals->banana->table_prefix}abos (fid,uid) VALUES ({?},{?})", $fids[$g], $uid);
+ $this->profile['subscribe'][] = $g;
+ }
+ }
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+define ('FPDF_FONTPATH', dirname(__FILE__).'/fonts/');
+require_once('/usr/share/fpdf/fpdf.php');
+require_once('xorg.varstream.inc.php');
+
+class ContactsPDF extends FPDF
+{
+ var $col = 0;
+ var $y0;
+
+ var $title = "Mes contacts sur Polytechnique.org";
+ var $broken = false;
+ var $error = false;
+
+ function ContactsPDF()
+ {
+ parent::FPDF();
+ $this->AddFont('Vera Sans', '', 'Vera.php');
+ $this->AddFont('Vera Sans', 'I', 'VeraIt.php');
+ $this->AddFont('Vera Sans', 'B', 'VeraBd.php');
+
+ $this->AddFont('Vera Mono', '', 'VeraMono.php');
+
+ $this->SetTitle($this->title);
+ $this->SetCreator('Site Polytechnique.org');
+ $this->AddPage();
+ }
+
+ function Output()
+ {
+ Header('Pragma: public');
+ parent::Output();
+ }
+
+ function Rotate($angle,$x=-1,$y=-1)
+ {
+ if($x==-1) {
+ $x = $this->x;
+ }
+ if($y==-1) {
+ $y=$this->y;
+ }
+ if($this->angle != 0) {
+ $this->_out('Q');
+ }
+ $this->angle = $angle;
+ if($angle != 0)
+ {
+ $angle*=M_PI/180;
+ $c = cos($angle);
+ $s = sin($angle);
+ $cx = $x*$this->k;
+ $cy = ($this->h-$y)*$this->k;
+ $this->_out(sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy));
+ }
+ }
+
+ function Header()
+ {
+
+ $this->SetFont('Vera Sans', 'B', 20);
+ $this->SetTextColor(230);
+ $this->Rotate(45,55,190);
+ $this->Text(55,190,"informations limitées à un usage");
+ $this->Text(40,210,"strictement personnel et non commercial");
+ $this->Rotate(0);
+
+ $this->setLeftMargin(5);
+ $this->setRightMargin(5);
+ $this->SetFont('Vera Sans', 'B', 16);
+ $this->SetY(5);
+ $this->SetTextColor(51,102,153);
+ $this->SetDrawColor(102,153,204);
+ $this->SetLineWidth(0.2);
+ $this->SetFillColor(245, 248, 252);
+ $this->Cell(200, 10, $this->title, 1, 1, 'C', 1);
+ $this->Image(dirname(__FILE__).'/../htdocs/images/logo.png', 5, 5, 10, 10, 'png', 'https://www.polytechnique.org/');
+
+ $this->Ln(10);
+ $this->y0 = $this->GetY();
+ $this->ColSetup(false);
+ }
+
+ function Footer()
+ {
+ $this->setLeftMargin(5);
+ $this->setRightMargin(5);
+ $this->SetY(-15);
+ $this->SetFont('Vera Sans','I',8);
+ $this->SetTextColor(128);
+ $this->Cell(0, 10, 'Page '.$this->PageNo(), 0, 0, 'C');
+ }
+
+ function ColSetup($col)
+ {
+ $this->col = $col;
+ $x = 10 + $this->col * 100;
+ $this->SetLeftMargin($x);
+ $this->SetRightMargin(120 - $x);
+ $this->SetX($x);
+ $this->SetY($this->y0);
+ }
+
+ function NextCol()
+ {
+ $this->ColSetup(1 - $this->col);
+ if ($this->col == 0) { $this->AddPage(); }
+ }
+
+ function AcceptPageBreak()
+ {
+ $this->broken = true;
+ }
+
+ function Space($w=0.1, $h=0.5)
+ {
+ $x = $this->getX();
+ $y = $this->getY();
+ $this->SetLineWidth($w);
+ $this->Line($x, $y, $x+90, $y);
+ $this->Ln($h);
+ }
+
+ function TableRow($l, $r, $font = 'Sans')
+ {
+ $this->SetFont('Vera Sans', 'B', 8);
+ $y = $this->getY();
+ $x = $this->getX();
+ $this->MultiCell(25, 4, $l, '', 1);
+ $y1 = $this->getY();
+
+ $this->SetFont('Vera '.$font, '', 8);
+ $this->setY($y);
+ $first = 1;
+
+ $this->setX($x+25);
+ $this->MultiCell(65, 4, $r, '', 1);
+
+ $this->setY(max($y1, $this->getY())+0.5);
+ $this->setX($x);
+ }
+
+ function Address($a)
+ {
+ $l = "adresse\n";
+ if ($a['active']) {
+ $l .= 'actuelle';
+ } elseif ($a['secondaire']) {
+ $l .= 'secondaire';
+ } else {
+ $l .= 'principale';
+ }
+
+ $r = '';
+ $r = trim("$r\n".$a['adr1']);
+ $r = trim("$r\n".$a['adr2']);
+ $r = trim("$r\n".$a['adr3']);
+ $r = trim("$r\n".trim($a['postcode'].' '.$a['city']));
+
+ $this->TableRow($l, $r);
+
+ if ($a['tel']) {
+ $this->TableRow('Téléphone', $a['tel'], 'Mono');
+ }
+ if ($a['fax']) {
+ $this->TableRow('Fax', $a['fax'], 'Mono');
+ }
+ }
+
+ function AddressPro($a)
+ {
+ if ($a['entreprise']) {
+ $this->TableRow('Entreprise', $a['entreprise']);
+ }
+
+ if ($a['adr1'] || $a['adr2'] || $a['adr3'] || $a['postcode'] || $a['city']) {
+ $r = '';
+ $r = trim("$r\n".$a['adr1']);
+ $r = trim("$r\n".$a['adr2']);
+ $r = trim("$r\n".$a['adr3']);
+ $r = trim("$r\n".trim($a['postcode'].' '.$a['city']));
+ $this->TableRow('adresse pro', $r);
+ }
+
+ if ($a['tel']) {
+ $this->TableRow('Téléphone', $a['tel'], 'Mono');
+ }
+ if ($a['fax']) {
+ $this->TableRow('Fax', $a['fax'], 'Mono');
+ }
+ }
+
+ function Error()
+ {
+ $this->error = true;
+ }
+
+ function wordwrap($text, $maxwidth = 90) {
+ $text = trim($text);
+ if ($text==='') { return 0; }
+ $space = $this->GetStringWidth(' ');
+ $lines = explode("\n", $text);
+ $text = '';
+ $count = 0;
+
+ foreach ($lines as $line)
+ {
+ $words = preg_split('/ +/', $line);
+ $width = 0;
+
+ foreach ($words as $word)
+ {
+ $wordwidth = $this->GetStringWidth($word);
+ if ($width + $wordwidth <= $maxwidth)
+ {
+ $width += $wordwidth + $space;
+ $text .= $word.' ';
+ }
+ else
+ {
+ $width = $wordwidth + $space;
+ $text = rtrim($text)."\n".$word.'
+ ';
+ $count++;
+ }
+ }
+ $text = rtrim($text)."\n";
+ $count++;
+ }
+ $text = rtrim($text);
+ return $count;
+ }
+
+ function AddContact($x, $wp = true)
+ {
+ global $globals;
+ /* infamous hack :
+ 1- we store the current state.
+ 2- at the end, we find out if we triggered the page break,
+ -> no ? ok
+ -> yes ? then we have to create a col, and add the contact again.
+ */
+ $old = $this;
+
+ $this->SetFont('Vera Sans', '', 10);
+ $this->SetDrawColor(0);
+ $this->SetFillColor(245, 248, 252);
+ $this->SetLineWidth(0.4);
+
+ $nom = $x['prenom'].' '.($x['nom_usage'] ? "{$x['nom_usage']} ({$x['nom']})" : $x['nom'])." ({$x['promo']})";
+ $ok = false;
+
+ if ($wp) {
+ $res = $globals->xdb->query("SELECT * FROM photo WHERE attachmime IN ('jpeg','png') AND uid={?}", $x['user_id']);
+ if ($i = $res->numRows()) {
+ $old2 = $this;
+ $photo = $res->fetchOneAssoc();
+ $width = $photo['x'] * 20/$photo['y'];
+ $GLOBALS["p{$x['user_id']}"] = $photo['attach'];
+
+ $_x = $this->getX();
+ $_y = $this->getY();
+ $this->Cell(0, 20, '', '', 0, '', 1);
+ $this->Image("var://p{$x['user_id']}", $_x, $_y, $width, 20, $photo['attachmime']);
+
+ if ($this->error) {
+ $this = $old2;
+ } else {
+ $this->setX($_x);
+ $this->Cell($width, 20, '', "T");
+ $h = 20 / $this->wordwrap($nom, 90-$width);
+ $this->MultiCell(0, $h, $nom, 'T', 'C');
+ $ok = true;
+ }
+ }
+ }
+ if (!$ok) {
+ $this->MultiCell(0, 6, $nom, "T", 'C', 1);
+ }
+
+ if ($x['mobile']) {
+ $this->Space();
+ $this->TableRow('mobile', $x['mobile'], 'Mono');
+ }
+
+ foreach ($x['adr'] as $a) {
+ $this->Space();
+ $this->Address($a);
+ }
+
+ foreach ($x['adr_pro'] as $a) {
+ if ( ! ($a['entreprise'] || $a['tel'] || $a['fax']
+ || $a['adr1'] || $a['adr2'] || $a['adr3'] || $a['postcode'] || $a['city']) )
+ {
+ continue;
+ }
+ $this->Space();
+ $this->AddressPro($a);
+ }
+
+ $this->Space(0.4, 5);
+
+ if ($this->broken) {
+ $old->NextCol();
+ $old->AddContact($x, $wp);
+ $this = $old;
+ }
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.misc.inc.php");
+
+// {{{ defines
+
+define("SUCCESS", 1);
+define("ERROR_INACTIVE_REDIRECTION", 2);
+define("ERROR_INVALID_EMAIL", 3);
+define("ERROR_LOOP_EMAIL", 4);
+
+// }}}
+// {{{ function fix_bestalias()
+
+function fix_bestalias($uid)
+{
+ global $globals;
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM aliases WHERE id={?} AND FIND_IN_SET('bestalias',flags) AND type!='homonyme'", $uid);
+ if ($n = $res->fetchOneCell()) {
+ return;
+ }
+ $globals->xdb->execute("UPDATE aliases
+ SET flags=CONCAT(flags,',','bestalias')
+ WHERE id={?} AND type!='homonyme'
+ ORDER BY !FIND_IN_SET('usage',flags),alias LIKE '%.%', LENGTH(alias)
+ LIMIT 1", $uid);
+}
+
+// }}}
+// {{{ function valide_email()
+
+function valide_email($str)
+{
+ $em = trim(rtrim($str));
+ $em = str_replace('<', '', $em);
+ $em = str_replace('>', '', $em);
+ list($ident, $dom) = explode('@', $em);
+ if ($dom == $globals->mail->domain or $dom == $globals->mail->domain2) {
+ list($ident1) = explode('_', $ident);
+ list($ident) = explode('+', $ident1);
+ }
+ return $ident . '@' . $dom;
+}
+
+// }}}
+// {{{ class Bogo
+
+class Bogo
+{
+ // {{{ properties
+
+ var $state;
+ var $_states = Array('let_spams', 'tag_spams', 'drop_spams');
+
+ // }}}
+ // {{{ constructor
+
+ function Bogo($uid)
+ {
+ global $globals;
+ $res = $globals->xdb->query('SELECT email FROM emails WHERE uid={?} AND flags="filter"', $uid);
+ if ($res->numRows()) {
+ $this->state = $res->fetchOneCell();
+ } else {
+ $this->state = 'tag_spams';
+ $res = $globals->xdb->query("INSERT INTO emails (uid,email,rewrite,panne,flags)
+ VALUES ({?},'tag_spams','','0000-00-00','filter')", $uid);
+ }
+ }
+
+ // }}}
+ // {{{ function change()
+
+ function change($uid, $state)
+ {
+ global $globals;
+ $this->state = is_int($state) ? $this->_states[$state] : $state;
+ $globals->xdb->execute('UPDATE emails SET email={?} WHERE uid={?} AND flags = "filter"', $this->state, $uid);
+ }
+
+ // }}}
+ // {{{ function level()
+
+ function level()
+ { return array_search($this->state, $this->_states); }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Email
+
+class Email
+{
+ // {{{ properties
+
+ var $email;
+ var $active;
+ var $rewrite;
+ var $panne;
+
+ // }}}
+ // {{{ constructor
+
+ function Email($row)
+ {
+ list($this->email, $this->active, $this->rewrite, $this->panne) = $row;
+ }
+
+ // }}}
+ // {{{ function activate()
+
+ function activate($uid)
+ {
+ global $globals;
+ if (!$this->active) {
+ $globals->xdb->execute("UPDATE emails SET flags = 'active'
+ WHERE uid={?} AND email={?}", $uid, $this->email);
+ $_SESSION['log']->log("email_on", $this->email.($uid!=Session::getInt('uid') ? "(admin on $uid)" : ""));
+ $this->active = true;
+ }
+ }
+
+ // }}}
+ // {{{ function deactivate()
+
+ function deactivate($uid)
+ {
+ global $globals;
+ if ($this->active) {
+ $globals->xdb->execute("UPDATE emails SET flags =''
+ WHERE uid={?} AND email={?}", $uid, $this->email);
+ $_SESSION['log']->log("email_off",$this->email.($uid!=Session::getInt('uid') ? "(admin on $uid)" : "") );
+ $this->active = false;
+ }
+ }
+
+ // }}}
+ // {{{ function rewrite()
+
+ function rewrite($rew, $uid)
+ {
+ global $globals;
+ if ($this->rewrite == $rew) {
+ return;
+ }
+ $globals->xdb->execute('UPDATE emails SET rewrite={?} WHERE uid={?} AND email={?}', $rew, $uid, $this->email);
+ $this->rewrite = $rew;
+ return;
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Redirect
+
+class Redirect
+{
+ // {{{ properties
+
+ var $flag_active = 'active';
+ var $emails;
+ var $bogo;
+ var $uid;
+
+ // }}}
+ // {{{ function Redirect()
+
+ function Redirect($_uid)
+ {
+ global $globals;
+ $this->uid=$_uid;
+ $res = $globals->xdb->iterRow("
+ SELECT email, flags='active', rewrite, panne
+ FROM emails WHERE uid = {?} AND flags != 'filter'", $_uid);
+ $this->emails=Array();
+ while ($row = $res->next()) {
+ $this->emails[] = new Email($row);
+ }
+ $this->bogo = new Bogo($_uid);
+ }
+
+ // }}}
+ // {{{ function other_active()
+
+ function other_active($email)
+ {
+ foreach ($this->emails as $mail) {
+ if ($mail->email!=$email && $mail->active) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // }}}
+ // {{{ function delete_email()
+
+ function delete_email($email)
+ {
+ global $globals;
+ if (!$this->other_active($email)) {
+ return ERROR_INACTIVE_REDIRECTION;
+ }
+ $globals->xdb->execute('DELETE FROM emails WHERE uid={?} AND email={?}', $this->uid, $email);
+ $_SESSION['log']->log('email_del',$email.($this->uid!=Session::getInt('uid') ? " (admin on {$this->uid})" : ""));
+ foreach ($this->emails as $i=>$mail) {
+ if ($email==$mail->email) {
+ unset($this->emails[$i]);
+ }
+ }
+ return SUCCESS;
+ }
+
+ // }}}
+ // {{{ function add_email()
+
+ function add_email($email)
+ {
+ global $globals;
+ $email_stripped = strtolower(trim($email));
+ if (!isvalid_email($email_stripped)) {
+ return ERROR_INVALID_EMAIL;
+ }
+ if (!isvalid_email_redirection($email_stripped)) {
+ return ERROR_LOOP_EMAIL;
+ }
+ $globals->xdb->execute('REPLACE INTO emails (uid,email,flags) VALUES({?},{?},"active")', $this->uid, $email);
+ if ($logger = Session::getMixed('log', null)) { // may be absent --> step4.php
+ $logger->log('email_add',$email.($this->uid!=Session::getInt('uid') ? " (admin on {$this->uid})" : ""));
+ }
+ foreach ($this->emails as $mail) {
+ if ($mail->email == $email_stripped) {
+ return SUCCESS;
+ }
+ }
+ $this->emails[] = new Email(array($email,1,'','0000-00-00'));
+ return SUCCESS;
+ }
+
+ // }}}
+ // {{{ function modify_email()
+
+ function modify_email($emails_actifs,$emails_rewrite)
+ {
+ global $globals;
+ foreach ($this->emails as $i=>$mail) {
+ if (in_array($mail->email,$emails_actifs)) {
+ $this->emails[$i]->activate($this->uid);
+ } else {
+ $this->emails[$i]->deactivate($this->uid);
+ }
+ $this->emails[$i]->rewrite($emails_rewrite[$mail->email], $this->uid);
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+
+
+class ExaleadData{
+
+ var $query;
+ var $groups = array();
+ var $hits = array();
+ var $spellings = array();
+ var $keywords = array();
+
+ var $nhits = "";
+ var $nmatches = "";
+ var $estimated = false;
+ var $last = "";
+ var $start = "";
+ var $end = "";
+
+ function ExaleadData(){}
+
+ function setQuery($query){$this->query = $query;}
+ function addHit($hit){$this->hits[] = $hit;}
+ function addGroup($group){$this->groups[] = $group;}
+ function addSpelling($spelling){$this->spellings[] = $spelling;}
+ function addKeyword($keyword){$this->keywords[] = $keyword;}
+}
+
+class ExaleadKeyword{
+ var $name = "";
+ var $display = "";
+ var $count = "";
+ var $automatic = "";
+ var $refine_href = "";
+ var $exclude_href = "";
+ var $reset_href = "";
+
+ function ExaleadKeyword(){}
+ function clear(){
+ $name = "";
+ $display = "";
+ $count = "";
+ $automatic = "";
+ $refine_href = "";
+ $exclude_href = "";
+ $reset_href = "";
+ }
+
+ function is_normal(){
+ return empty($this->reset_href);
+ }
+
+ function is_refined(){
+ return ( (!empty($this->reset_href)) && ($this->count > 0) );
+ }
+
+ function is_excluded(){
+ return ( (!empty($this->reset_href)) && ($this->count == 0) );
+ }
+
+}
+
+class ExaleadGroup{
+
+ var $gid = "";
+ var $categories = array();
+ var $title = "";
+ var $clipped = false;
+ var $count = "";
+ var $browsed = false;
+ var $clip_href = "";
+ var $reset_href = "";
+
+ function ExaleadGroup(){}
+
+ function addCategory($category){
+ $this->categories[] = $category;
+ }
+
+ function setGid($gid){$this->gid = $gid;}
+ function setTitle($title){$this->title = $title;}
+ function setClipped($clipped){$this->clipped = $clipped;}
+ function setCount($count){$this->count = $count;}
+ function setBrowsed($browsed){$this->browsed = $browsed;}
+ function setClipHref($clip_href){$this->clip_href = $clip_href;}
+ function setResetHref($reset_href){$this->reset_href = $reset_href;}
+
+ function clear(){
+ $this->gid = "";
+ $this->categories = array();
+ $this->title = "";
+ $this->clipped = false;
+ $this->count = "";
+ $this->browsed = false;
+ $this->clip_href = "";
+ $this->reset_href = "";
+ }
+
+}
+
+class ExaleadSpelling{
+
+ var $display = "";
+ var $query_href = "";
+
+ function ExaleadSpelling(){}
+
+ function setDisplay($display){$this->display = $display;}
+ function setQueryHref($query_href){$this->query_href = $query_href;}
+
+ function clear(){
+ $this->display = "";
+ $this->query_href = "";
+ }
+}
+
+class ExaleadCategory{
+ var $name = "";
+ var $display = "";
+ var $count = "";
+ var $automatic = false;
+ var $refine_href = "";
+ var $exclude_href = "";
+ var $reset_href = "";
+ var $cref = "";
+ var $gid = "";
+ var $gcount = "";
+ var $categories = array();
+
+ function ExaleadCategory(){}
+
+ function addCategory($category){
+ $this->categories[] = $category;
+ }
+
+ function clear(){
+ $this->name = "";
+ $this->display = "";
+ $this->count = "";
+ $this->automatic = false;
+ $this->refine_href = "";
+ $this->exclude_href = "";
+ $this->reset_href = "";
+ $this->cref = "";
+ $this->gid = "";
+ $this->gcount = "";
+ }
+
+ function is_normal(){
+ return empty($this->reset_href);
+ }
+
+ function is_refined(){
+ return ( (!empty($this->reset_href)) && ($this->count > 0) );
+ }
+
+ function is_excluded(){
+ return ( (!empty($this->reset_href)) && ($this->count == 0) );
+ }
+
+}
+
+class ExaleadHit{
+ var $hitfields = array();
+ var $hitgroups = array();
+ var $actions = array();
+ var $score = "";
+ var $url = "";
+
+ function ExaleadHit(){}
+
+ function addHitField($hitfield){$this->hitfields[] = $hitfield;}
+ function addHitGroup($hitgroup){$this->hitgroups[] = $hitgroup;}
+ function addAction($action){$this->actions[] = $action;}
+
+ function clear(){
+ $this->hitfields = array();
+ $this->hitgroups = array();
+ $this->actions = array();
+ $this->score = "";
+ $this->url = "";
+ }
+}
+
+class ExaleadHitGroup{
+ var $hitcategories = array();
+ var $title = '';
+ var $gid = '';
+
+ function ExaleadHitGroup(){}
+
+ function addHitCategory($hitcategory){$this->hitcategories[] = $hitcategory;}
+
+ function clear(){
+ $this->hitcategories = array();
+ $this->title = '';
+ $this->gid = '';
+ }
+}
+
+class ExaleadHitCategory{
+ var $name = '';
+ var $display = '';
+ var $cref = '';
+ var $gid = '';
+ var $browseHref = '';
+
+ function ExaleadHitCategory(){}
+
+ function clear(){
+ $this->name = '';
+ $this->display = '';
+ $this->cref = '';
+ $this->gid = '';
+ $this->browseHref = '';
+ }
+}
+
+class ExaleadHitField{
+ var $text_segments = array();
+ var $has_text_cut = false;
+ var $name = "";
+ var $value = "";
+
+ function ExaleadHitField(){}
+
+ function addTextSegment($text_segment){$this->text_segments[] = $text_segment;}
+ function setHasTextCut($has_text_cut){$this->has_text_cut = $has_text_cut;}
+
+ function clear(){
+ $this->text_segments = array();
+ $this->has_text_cut = false;
+ $this->name = "";
+ $this->value = "";
+ }
+}
+
+class ExaleadAction{
+ var $display;
+ var $kind;
+ var $execHref;
+
+ function ExaleadAction(){}
+
+ function clear(){
+ $this->display = '';
+ $this->kind = '';
+ $this->execHref = '';
+ }
+}
+
+class ExaleadTextSegment{
+ var $text = "";
+ var $highlighted = false;
+
+ function ExaleadTextSegment(){
+ }
+
+ function setHighlighted($highlighted){$this->highlighted = $highlighted;}
+
+ function append($text){
+ $this->text .= $text;
+ }
+
+ function clear(){
+ $this->text = "";
+ $this->highlighted = false;
+ }
+}
+
+class ExaleadQuery{
+ var $query_parameters = array();
+ var $query_terms = array();
+ var $query = "";
+ var $context = "";
+ var $time = "";
+ var $interrupted = false;
+ var $browsed = false;
+
+ function ExaleadQuery(){}
+
+ function addParameter($parameter){$this->query_parameters[] = $parameter;}
+ function addTerm($term){$this->query_terms[] = $term;}
+
+ function clear(){
+ $this->query_parameters = array();
+ $this->query_terms = array();
+ $this->query = "";
+ $this->context = "";
+ $this->time = "";
+ $this->interrupted = false;
+ $this->browsed = false;
+ }
+}
+
+class ExaleadQueryParameter{
+
+ var $name = "";
+ var $value = "";
+
+ function ExaleadQueryParameter(){}
+
+ function clear(){
+ $this->name = "";
+ $this->value = "";
+ }
+}
+
+class ExaleadQueryTerm{
+
+ var $level = "";
+ var $regexp = "";
+
+ function ExaleadQueryTerm(){}
+
+ function clear(){
+ $this->regexp = "";
+ $this->level = "";
+ }
+}
+
+
+?>
--- /dev/null
+<?php
+
+require_once('exalead.class.php');
+
+function convert_url($string){
+ return str_replace('+', '%2B', $string);
+}
+
+$GLOBALS['query_all'] = 'a*';
+
+class Exalead{
+
+ var $parserId;
+
+ var $data;
+
+ var $currentGroup;
+ var $currentCategories = array();
+ var $currentSpelling;
+ var $currentHit;
+ var $currentHitField;
+ var $currentHitGroup;
+ var $currentHitCategory;
+ var $currentAction;
+ var $currentTextSegment;
+ var $currentQuery;
+ var $currentQueryTerm;
+ var $currentQueryParameter;
+ var $currentKeyword;
+
+ //url de base du produit Exalead
+ var $base_cgi = '';
+
+ // Query to dump indexed database
+ var $query_all= '';
+
+/**** Constructeur *********/
+
+
+ function Exalead($base_cgi = '', $override_query_all = ''){
+ $this->data = new ExaleadData();
+ $this->currentGroup = new ExaleadGroup();
+ $this->currentCategories = array();
+ $this->currentSpelling = new ExaleadSpelling();
+ $this->currentHit = new ExaleadHit();
+ $this->currentHitField = new ExaleadHitField();
+ $this->currentHitGroup = new ExaleadHitGroup();
+ $this->currentHitCategory = new ExaleadHitCategory();
+ $this->currentAction = new ExaleadAction();
+ $this->currentTextSegment = new ExaleadTextSegment();
+ $this->currentQuery = new ExaleadQuery();
+ $this->currentQueryTerm = new ExaleadQueryTerm();
+ $this->currentQueryParameter = new ExaleadQueryParameter();
+ $this->currentKeyword = new ExaleadKeyword();
+
+ //url de base du produit Exalead
+ $this->base_cgi = $base_cgi;
+ if(!empty($override_query_all)){
+ $this->query_all = $override_query_all;
+ }
+ else{
+ $this->query_all = $GLOBALS['query_all'];
+ }
+ }
+
+/**** Fonctions d'interface avec le cgi d'Exalead Corporate ******/
+
+ function set_base_cgi($base_cgi){
+ $this->base_cgi = $base_cgi;
+ }
+
+ //retourne vrai si une requete a été faite, faux sinon
+ function query($varname = 'query'){
+ if(!empty($_REQUEST[$varname])){
+
+ $this->first_query(stripslashes($_REQUEST[$varname]));
+ return true;
+ }
+ elseif(isset($_REQUEST['_C'])){
+
+ $this->handle_request();
+ return true;
+ }
+ return false;
+ }
+
+ //a appeller pour faire la premiere requete
+ function first_query($query, $offset = 0){
+ if(empty($this->base_cgi)) return false;
+
+ //$tmp = parse_url($this->base_cgi);
+ //$view_name = substr($tmp['path'], 5);
+ //$query_exa = $this->base_cgi."?_q=".urlencode($query)."&_f=xml2&A=-1&_vn=".$view_name;
+ $query_exa = $this->base_cgi."?_q=".urlencode($query)."&_f=xml2";
+ if($offset > 0){
+ $query_exa .= "&_s=".$offset;
+ }
+
+ $xml_response = file_get_contents($query_exa);
+ /*$xml_response = '';
+ $query_explode = parse_url($query_exa);
+
+ $fp = fsockopen("murphy.m4x.org", 10000, $errno, $errstr, 30);
+ if (!$fp) {
+ echo "$errstr ($errno)<br />\n";
+ } else {
+ $out = "GET {$query_explode['path']}?{$query_explode['query']} HTTP/1.1\r\n";
+ $out .= "Host: murphy.m4x.org:10000\r\n";
+ $out .= "Accept: text/xml\r\n";
+ $out .= "Accept-Charset: utf-8\r\n";
+ $out .= "Connection: Close\r\n\r\n";
+
+ fwrite($fp, $out);
+ $body = false;
+ while (!feof($fp)) {
+ $s = fgets($fp, 1024);
+ if ( $body )
+ $xml_response .= $s;
+ if ( $s == "\r\n" )
+ $body = true;
+ }
+ fclose($fp);
+ }*/
+ //echo $xml_response;exit;
+ $this->parse($xml_response);
+ //var_dump($this);
+ }
+
+ //pour recuperer tous les résultats d'une base indexée
+ function get_db_dump(){
+ $this->first_query($this->query_all);
+ }
+
+ function handle_request(){
+ if(empty($this->base_cgi)) return false;
+ if(empty($_REQUEST['_C'])) return false;// _C est le contexte Exalead
+ $query_exa = $this->base_cgi.'/_C='.str_replace(' ', '%20', $_REQUEST['_C']).'&_f=xml2';
+ if(!empty($_REQUEST['_s'])){
+ $query_exa .= "&_s=".((int) $_REQUEST['_s']);
+ }
+ $xml_response = file_get_contents($query_exa);
+ $this->parse($xml_response);
+ }
+
+/******** Fonctions annexes relatives au parser ********/
+
+ function createParser(){
+ $this->parserId = xml_parser_create();
+ xml_set_element_handler($this->parserId, array(&$this, "startElement"), array(&$this, "endElement"));
+ xml_set_character_data_handler($this->parserId, array(&$this, "parsePCData"));
+ }
+
+ function freeParser(){
+ xml_parser_free($this->parserId);
+ }
+
+ function parseString($string){
+ if (!xml_parse($this->parserId, $string, true)) {
+ die(sprintf("XML error: %s at line %d",
+ xml_error_string(xml_get_error_code($this->parserId)),
+ xml_get_current_line_number($this->parserId)));
+ }
+ }
+
+
+
+/******** Méthode qui lance le parser ***********/
+
+ function parse($string){
+ $this->createParser();
+ $this->parseString($string);
+ $this->freeParser();
+ }
+
+/********* fonctions spécifiques à chaque balise ******/
+
+//Ces méthodes peuvent être surchargées
+
+ function startQuery(&$attrs){
+ $this->currentQuery->query = utf8_decode($attrs['QUERY']);
+ $this->currentQuery->context = $attrs['CONTEXT'];
+ $this->currentQuery->time = $attrs['TIME'];
+ if(isset($attrs['INTERRUPTED'])) $this->currentQuery->interrupted = $attrs['INTERRUPTED'];
+ if(isset($attrs['BROWSED'])) $this->currentQuery->browsed = $attrs['BROWSED'];
+ }
+
+ function StartQueryTerm(&$attrs){
+ $this->currentQueryTerm->level = $attrs['LEVEL'];
+ $this->currentQueryTerm->regexp = utf8_decode($attrs['REGEXP']);
+ }
+
+ function startQueryParameter(&$attrs){
+ $this->currentQueryParameter->name = $attrs['NAME'];
+ if(isset($attrs['VALUE'])) $this->currentQueryParameter->value = utf8_decode($attrs['VALUE']);
+ }
+
+ function startKeyword(&$attrs){
+ if(isset($attrs['NAME'])) $this->currentKeyword->name = $attrs['NAME'];
+ $this->currentKeyword->display = utf8_decode( $attrs['DISPLAY'] );
+ $this->currentKeyword->count = $attrs['COUNT'];
+ $this->currentKeyword->automatic = $attrs['AUTOMATIC'];
+ if(isset($attrs['REFINEHREF'])) $this->currentKeyword->refine_href = convert_url($attrs['REFINEHREF']);
+ if(isset($attrs['EXCLUDEHREF'])) $this->currentKeyword->exclude_href = $attrs['EXCLUDEHREF'];
+ if(isset($attrs['RESETHREF'])) $this->currentKeyword->reset_href = $attrs['RESETHREF'];
+ }
+
+ function startHits(&$attrs){
+ $this->data->nmatches = $attrs['NMATCHES'];
+ $this->data->nhits = $attrs['NHITS'];
+ if(isset($attrs['INTERRUPTED'])) $this->data->interrupted = $attrs['INTERRUPTED'];
+ $this->data->last = $attrs['LAST'];
+ $this->data->end = $attrs['END'];
+ $this->data->start = $attrs['START'];
+ }
+
+ function startHit(&$attrs){
+ $this->currentHit->url = $attrs['URL'];
+ $this->currentHit->score = $attrs['SCORE'];
+ }
+
+ function startHitGroup(&$attrs){
+ $this->currentHitGroup->title = utf8_decode($attrs['TITLE']);
+ $this->currentHitGroup->gid = $attrs['GID'];
+ }
+
+ function startHitCategory(&$attrs){
+ $this->currentHitCategory->name = $attrs['NAME'];
+ $this->currentHitCategory->display = utf8_decode($attrs['DISPLAY']);
+ $this->currentHitCategory->cref = $attrs['CREF'];
+ $this->currentHitCategory->gid = $attrs['GID'];
+ if(isset($attrs['BROWSEHREF'])) $this->currentHitCategory->browsehref = $attrs['BROWSEHREF'];
+ }
+
+ function startAction(&$attrs){
+ $this->currentAction->display = $attrs['DISPLAY'];
+ $this->currentAction->kind = $attrs['KIND'];
+ if(isset($attrs['EXECHREF']))$this->currentAction->execHref = $attrs['EXECHREF'];
+ }
+
+ function startHitField(&$attrs){
+ $this->currentHitField->name = $attrs['NAME'];
+ if(isset($attrs['VALUE'])) $this->currentHitField->value = utf8_decode($attrs['VALUE']);
+ }
+
+ function startTextSeg(&$attrs){
+ $this->currentTextSegment->setHighlighted($attrs['HIGHLIGHTED']);
+ }
+ function startTextCut(&$attrs){}
+
+ function startSpellingSuggestionVariant(&$attrs){
+ $this->currentSpelling->setDisplay($attrs['DISPLAY']);
+ $this->currentSpelling->setQueryHref($attrs['QUERY']);
+ }
+
+ function startGroup(&$attrs){
+ $this->currentGroup->setGid(utf8_decode($attrs['GID']));
+ $this->currentGroup->setTitle(utf8_decode($attrs['TITLE']));
+ $this->currentGroup->setClipped($attrs['CLIPPED']);
+ $this->currentGroup->setCount($attrs['COUNT']);
+ $this->currentGroup->setBrowsed($attrs['BROWSED']);
+ if(isset($attrs['CLIPHREF'])) $this->currentGroup->setClipHref($attrs['CLIPHREF']);
+ if(isset($attrs['RESETHREF'])) $this->currentGroup->setResetHref($attrs['RESETHREF']);
+ }
+
+ function startCategory(&$attrs){
+ $currentCategory = new ExaleadCategory();
+ $currentCategory->name = utf8_decode($attrs['NAME']);
+ $currentCategory->display = utf8_decode($attrs['DISPLAY']);
+ $currentCategory->count = $attrs['COUNT'];
+ $currentCategory->automatic = $attrs['AUTOMATIC'];
+ $currentCategory->cref = $attrs['CREF'];
+ if(isset($attrs['REFINEHREF'])) $currentCategory->refine_href = convert_url($attrs['REFINEHREF']);
+ $currentCategory->exclude_href = '_c=-'.$currentCategory->cref;
+ if(isset($attrs['RESETHREF'])){
+ $currentCategory->reset_href = $attrs['RESETHREF'];
+ }
+ $currentCategory->gid = $attrs['GID'];
+ $currentCategory->gcount = $attrs['GCOUNT'];
+ $this->currentCategories[] = $currentCategory;
+ }
+
+ function startSearch(&$attrs){}
+
+ function startElement($parser, $name, $attrs) {
+ //echo "start $name<br />";
+ //recupération des paramètres de query
+ if($name == 'QUERY'){
+ $this->startQuery($attrs);
+ }
+ elseif($name == 'QUERYTERM'){
+ $this->startQueryTerm($attrs);
+ }
+ elseif($name == 'QUERYPARAMETER'){
+ $this->startQueryParameter($attrs);
+ }
+ //gestion des mots-clés
+ elseif($name == 'KEYWORD'){
+ $this->startKeyword($attrs);
+ }
+ //gestion des resultats
+ elseif($name == 'HITS'){
+ $this->startHits($attrs);
+ }
+ elseif($name == 'HIT'){
+ $this->startHit($attrs);
+ }
+ elseif($name == 'HITFIELD'){
+ $this->startHitField($attrs);
+ }
+ elseif($name == 'HITGROUP'){
+ $this->startHitGroup($attrs);
+ }
+ elseif($name == 'HITCATEGORY'){
+ $this->startHitCategory($attrs);
+ }
+ elseif($name == 'ACTION'){
+ $this->startAction($attrs);
+ }
+ elseif($name == 'TEXTSEG'){
+ $this->startTextSeg($attrs);
+ }
+ elseif($name == 'TEXTCUT'){
+ $this->startTextCut($attrs);
+ }
+ //gestion suggestions d'orthographe
+ elseif($name == 'SPELLINGSUGGESTIONVARIANT'){
+ $this->startSpellingSuggestionVariant($attrs);
+ }
+ //gestion des categories pour raffiner
+ elseif($name == 'GROUP'){
+ $this->startGroup($attrs);
+ }
+ elseif($name == 'CATEGORY'){
+ $this->startCategory($attrs);
+ }
+ elseif($name == 'SEARCH'){
+ $this->startSearch($attrs);
+ }
+ }
+
+ function endQuery(){
+ $this->data->query = $this->currentQuery;
+ $this->currentQuery->clear();
+ }
+ function endQueryTerm(){
+ $this->currentQuery->addTerm($this->currentQueryTerm);
+ $this->currentQueryTerm->clear();
+ }
+ function endQueryParameter(){
+ $this->currentQuery->addParameter($this->currentQueryParameter);
+ $this->currentQueryParameter->clear();
+ }
+ function endKeyword(){
+ $this->data->addKeyword($this->currentKeyword);
+ $this->currentKeyword->clear();
+ }
+ function endHits(){
+ }
+ function endHit(){
+ $this->data->addHit($this->currentHit);
+ $this->currentHit->clear();
+ }
+ function endHitGroup(){
+ $this->currentHit->addHitGroup($this->currentHitGroup);
+ $this->currentHitGroup->clear();
+ }
+ function endHitCategory(){
+ $this->currentHitGroup->addHitCategory($this->currentHitCategory);
+ $this->currentHitCategory->clear();
+ }
+ function endAction(){
+ $this->currentHit->addAction($this->currentAction);
+ $this->currentAction->clear();
+ }
+ function endHitField(){
+ $this->currentHit->addHitField($this->currentHitField);
+ $this->currentHitField->clear();
+ }
+ function endTextSeg(){
+ $this->currentHitField->addTextSegment($this->currentTextSegment);
+ $this->currentTextSegment->clear();
+ }
+ function endTextCut(){
+ $this->currentHitField->setHasTextCut(true);
+ }
+ function endSpellingSuggestionVariant(){
+ $this->data->addSpelling($this->currentSpelling);
+ $this->currentSpelling->clear();
+ }
+ function endGroup(){
+ $this->data->addGroup($this->currentGroup);
+ $this->currentGroup->clear();
+ }
+ function endCategory(){
+ //the parent element is a Group element ?
+ if(count($this->currentCategories) == 1){
+ $this->currentGroup->addCategory(array_pop($this->currentCategories));
+ }
+ else{
+ //var_dump($this->currentCategories);
+ $category = array_pop($this->currentCategories);
+ //reset($this->currentCategories);
+ end($this->currentCategories);
+ //var_dump($this->currentCategories);
+ $parentCategory = &$this->currentCategories[key($this->currentCategories)];
+ //var_dump($parentCategory);
+ $parentCategory->addCategory($category);
+ }
+ }
+ function endSearch(){
+ }
+
+
+ function endElement($parser, $name) {
+ //echo "end $name<br >";
+ if($name == 'QUERY'){
+ $this->endQuery();
+ }
+ elseif($name == 'QUERYTERM'){
+ $this->endQueryTerm();
+ }
+ elseif($name == 'QUERYPARAMETER'){
+ $this->endQueryParameter();
+ }
+ elseif($name == 'KEYWORD'){
+ $this->endKeyword();
+ }
+ elseif($name == 'HITS'){
+ $this->endHits();
+ }
+ elseif($name == 'HIT'){
+ $this->endHit();
+ }
+ elseif($name == 'HITFIELD'){
+ $this->endHitField();
+ }
+ elseif($name == 'HITGROUP'){
+ $this->endHitGroup();
+ }
+ elseif($name == 'HITCATEGORY'){
+ $this->endHitCategory();
+ }
+ elseif($name == 'ACTION'){
+ $this->endAction();
+ }
+ elseif($name == 'TEXTSEG'){
+ $this->endTextSeg();
+ }
+ elseif($name == 'TEXTCUT'){
+ $this->endTextCut();
+ }
+ //gestion suggestions d'orthographe
+ elseif($name == 'SPELLINGSUGGESTIONVARIANT'){
+ $this->endSpellingSuggestionVariant();
+ }
+ //gestion des categories pour raffiner
+ elseif($name == 'GROUP'){
+ $this->endGroup();
+ }
+ elseif($name == 'CATEGORY'){
+ $this->endCategory();
+ }
+ elseif($name == 'SEARCH'){
+ $this->endSearch();
+ }
+ }
+
+ function parsePCData($parser, $text){
+ $this->currentTextSegment->append(utf8_decode($text));
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+
+
+$exa_max_length = 15;
+
+function display_group(&$group, &$exalead_data, $keywords=false,$class = 'exa_groupe', $img_path = 'images/'){
+ $compteur = 0;
+ $titre = ($keywords)?'Mot-clés':$group->title;
+ $gid = ($keywords)?'k':$group->gid;
+ if($keywords)
+ $array = & $group;
+ else
+ $array = & $group->categories;
+?>
+<div class="exa_groupe">
+ <div class="titre"><?php echo $titre?> :</div>
+ <ul id="exa_group_<?php echo $gid?>">
+<?php
+ foreach($array as $categorie){
+ $compteur++;
+?>
+ <li class="exa_categorie" id="exa_group_<?php echo $gid.'_'.$compteur;?>">
+<?php
+ if($categorie->is_normal()){
+?>
+ <a style="text-decoration: none;"
+ href="?_C=<?php echo $exalead_data->query->context.'/'.$categorie->refine_href;?>&_f=xml2"
+ title="Afficher seulement ces résultats"
+ ><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" /><?php echo (empty($categorie->display)?$categorie->name:$categorie->display).(empty($categorie->count)?'':' ('.$categorie->count.')');?></a>
+ <a href="?_C=<?php echo $exalead_data->query->context.'/'.$categorie->exclude_href;?>&_f=xml2"
+ title="Ne pas afficher ces résultats"
+ ><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a>
+<?php
+ }
+ elseif($categorie->is_excluded()){
+?>
+ <span style="text-decoration: line-through;">
+ <a href="?_C=<?php echo $exalead_data->query->context.'/'.$categorie->reset_href;?>&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" /> <?php echo $categorie->display;?></a>
+ </span>
+<?php
+ }
+ else{
+?>
+ <strong><?php echo $categorie->display;?></strong>
+ <a href="?_C=<?php echo $exalead_data->query->context.'/'.$categorie->reset_href;?>&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a>
+<?php
+ }
+ echo '</li>';
+ }
+?>
+ </ul>
+</div>
+<?php
+}
+
+function _display_groupes($params, &$smarty){
+
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+
+ foreach($exalead_data->groups as $group){
+ display_group($group, $exalead_data);
+ }
+
+}
+
+function _display_keywords($params, &$smarty){
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+
+ display_group($exalead_data->keywords, $exalead_data, true);
+}
+
+function _exa_navigation_gauche($params, &$smarty){
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+ $res = '';
+ if($exalead_data->start > 0){
+ $debut_g = $exalead_data->start - 9;
+ $debut_d = $debut_g + 9;
+ if($debut_g < 0){
+ $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=0\">[1-10]</a>";
+ }
+ else{
+ $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=".($debut_g-1)."\">[$debut_g-$debut_d]</a>";
+ }
+ }
+ return $res;
+}
+function _exa_navigation_droite($params, &$smarty){
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+ $max = -1;
+ if(!empty($params['max'])){
+ $max = (int) $params['max'];
+ if(($max < 0) || ($max > $exalead_data->nhits)){
+ $max = $exalead_data->nhits;
+ }
+ }
+ else{
+ $max = $exalead_data->nhits;
+ }
+ $res = '';
+ if(($exalead_data->end < $max) && ($max > 10)){
+ $fin_g = $exalead_data->end + 1;
+ $fin_d = $fin_g + 10;
+ if($fin_d > $max){
+ $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=".($max-10)."\">[".($max-10)."-".($max)."]</a>";
+ }
+ else{
+ $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=$fin_g\">[".($fin_g+1)."-$fin_d]</a>";
+ }
+ }
+ return $res;
+}
+
+function _exa_navigation_barre($params, &$smarty){
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+ if(!empty($params['nb_res_per_page'])){
+ $nb_res_per_page = (int) $params['nb_res_per_page'];
+ }
+ else
+ $nb_res_per_page = 10;//10 results per page
+ if(!empty($params['max_results']) && ((int) $params['max_results'] < $exalead_data->nhits)){
+ $nb_hits = (int) $params['max_results'];
+ }
+ else{
+ $nb_hits = (int) $exalead_data->nhits;
+ }
+ $res = '';
+ $nb_numero = 5;//We want 5 links
+ $current_page = (empty($_GET['_s'])?1:1+(int) ($_GET['_s'] / $nb_res_per_page));
+ $first_number = 1;
+ if($nb_hits < ($nb_numero) * $nb_res_per_page){
+ $nb_numero = (int) ($nb_hits / $nb_res_per_page);
+ }
+ else{
+ if($current_page > ((int)$nb_numero/2))
+ $first_number = 1 + $current_page - (int)($nb_numero/2);
+ if($nb_hits < (($first_number + $nb_numero - 1) * $nb_res_per_page)){
+ $first_number = (int) ($nb_hits / $nb_res_per_page) - $nb_numero+2;
+ }
+ }
+
+ if ($current_page*$nb_res_per_page >$nb_res_per_page)
+ $res.="<a href=\"?_C={$exalead_data->query->context}&_s=".(($current_page-2)*$nb_res_per_page)."\">Precedent</a> ";
+ for($i = $first_number; $i <= $nb_numero + $first_number-1; $i++){
+ $k=$nb_res_per_page*($i-1)+1;
+ $j=$nb_res_per_page*$i;
+ if($i == $current_page){
+ $res .= "<strong>$k-$j</strong> ";
+ }
+ else{
+ $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=".(($i-1)*$nb_res_per_page)."\">$k-$j</a> ";
+ }
+ }
+ if ($current_page*10<$nb_hits)
+ $res.="<a href=\"?_C={$exalead_data->query->context}&_s=".(($current_page)*$nb_res_per_page)."\">Suivant</a>";
+ $date=false;
+ foreach($exalead_data->query->query_parameters as $parameter){
+ if($parameter->name=="_sf"){
+ if($parameter->value=="-date")
+ $date=true;
+ }
+ }
+
+ if($date)
+ $res.=" - <a href=\"?_C={$exalead_data->query->context}/_sf=relevance&_f=xml2\">[Classer par pertinence]</a>";
+ else
+ $res.=" - <a href=\"?_C={$exalead_data->query->context}/_sf=-date&_f=xml2\">[Classer par date]</a>";
+ return $res;
+}
+
+
+function _little_nav_barre($params, &$smarty){
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+ $box=false;
+ if(!empty($params['where']))
+ if($params['where']=='box')
+ $box=true;
+ $date=false;
+ foreach($exalead_data->query->query_parameters as $parameter){
+ if($parameter->name=="_sf"){
+ if($parameter->value=="-date")
+ $date=true;
+ }
+ }
+ $dizaine=10*(int)($exalead_data->start/10);
+ $res="";
+ if ($box)
+ $res .= "<table>";
+ else
+ $res.= "<table class=\"table\">";
+ $res.="<tr>";
+ if($box)
+ $res.="<td class=\"gauche\">";
+ else
+ $res .=" <td width=\"20%\" style=\"text-align: left;\">";
+ if($exalead_data->start != 0){
+ $num=$exalead_data->start-1;
+ $res .="<a href=\"?_C={$exalead_data->query->context}&_s=".$num."\">Précédent</a>";
+ }
+ $num=$exalead_data->start+1;
+ $res .= "</td>";
+ if($box){
+ $res.="<td class=\"centre\">
+ CV : ".$num." / {$exalead_data->nhits}<br />";
+ }
+ else{
+ $res.="<td width=\"60%\" style=\"text-align: center;\">
+ CV : ".$num." / {$exalead_data->nhits} -";
+ }
+ if($date)
+ $res.="<a href=\"ec_cherche_cv.php?_C={$exalead_data->query->context}/_sf=-date&_f=xml2&_s=".$dizaine."\">Retour à la recherche</a>";
+ else
+ $res.="<a href=\"ec_cherche_cv.php?_C={$exalead_data->query->context}/_sf=-relevance&_f=xml2&_s=".$dizaine."\">Retour à la recherche</a>";
+ $res .="</td>";
+ if($box)
+ $res.="<td class=\"droite\">";
+ else
+ $res .= "<td width=\"20%\" style=\"text-align: right;\">";
+ $num=$exalead_data->start+1;
+ if( $exalead_data->start+1 < $exalead_data->nhits)
+ $res .= "<a href=\"?_C={$exalead_data->query->context}&_s=".$num."\">Suivant</a>";
+ $res .="</td>
+ </tr>
+ </table>";
+ return $res;
+}
+
+//categorie = true if this line is for a category, false if this is for a keyword
+function _display_3_columns($title, $count, $refine, $exclude, $categorie){
+if ($title!='Inconnu'){
+ global $exa_max_length;
+ if($categorie) $title_exclude = 'Ne pas afficher cette catégorie';
+ else $title_exclude = 'Ne pas afficher ce mot-clé';
+ $extract = ((strlen($title) > $exa_max_length + 3)?substr($title,0,$exa_max_length).'...':$title);
+ return "<tr class=\"categ\">
+ <td>
+ <a style=\"text-decoration: none;\"
+ href=\"?_C=".$refine."&_f=xml2\"
+ title=\"$title\"
+ >$extract</a></td><td width=\"10%\">$count</td><td width=\"10%\">
+ <a href=\"?_C=".$exclude."&_f=xml2\"
+ title=\"$title_exclude\">[-]</a></td>
+ </tr>";
+}
+}
+
+//excluded = true if this line is an excluded result, = false if this line is a refined result
+//categorie = true if this line is for a category, false if this is for a keyword
+function _display_2_columns($title, $reset, $excluded, $categorie){
+ global $exa_max_length;
+ if($excluded){
+ if($categorie) $title_link = 'Afficher de nouveau cette catégorie';
+ else $title_link = 'Afficher de nouveau ce mot-clé';
+ $link = '[+]';
+ $style = 'text-decoration: line-through;';
+ } else{
+ if($categorie) $title_link = 'Voir les autres catégories';
+ else $title_link = 'Voir les autres mots-clés';
+ $link = '[-]';
+ $style = 'text-decoration: none; font-weight: bold;';
+ }
+ $extract = ((strlen($title) > $exa_max_length + 3)?substr($title,0,$exa_max_length).'...':$title);
+ return "<tr class=\"categ\">
+ <td colspan=\"2\">
+ <a style=\"$style\" href=\"?_C=".$reset."&_f=xml2\"
+ title=\"$title\">$extract</a>
+ </td>
+ <td width=\"10%\"><a style=\"$style\"
+ href=\"?_C=".$reset."&_f=xml2\"
+ title=\"$title_link\"
+ >$link</a>
+ </td>
+ </tr>";
+}
+
+function _display_resume_groupe_category(&$group, $context, $padding = ''){
+ $result = '';
+ foreach($group->categories as $categorie){
+ $title = (empty($categorie->display)?$categorie->name:$categorie->display);
+ $count = (empty($categorie->count)?'':' ('.$categorie->count.')');
+ $refine = $context.'/'.$categorie->refine_href;
+ $exclude = $context.'/'.$categorie->exclude_href;
+ $reset = $context.'/'.$categorie->reset_href;
+
+ if($categorie->display != ''){
+ if($categorie->is_normal()){
+ $result .= _display_3_columns($padding.$title, $count, $refine, $exclude, true);
+ }
+ else{
+ $result .= _display_2_columns($padding.$title, $reset, $categorie->is_excluded(), true);
+ }
+ }
+ if(count($categorie->categories) > 0){
+ $result .= _display_resume_groupe_category($categorie, $context, $padding.'-');
+ }
+ }
+ return $result;
+}
+
+/**
+* This function is used to resume database content for given group (template argument 'groupe')
+*/
+function _display_resume_groupe($params, &$smarty){
+ global $exa_max_length;
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+ if(empty($params['groupe'])){
+ return '';
+ }
+ $groupe = $params['groupe'];
+ $name = $params['display'];
+ foreach($exalead_data->groups as $group){
+ if($group->title == $groupe){
+ $result = "<table class=\"exa_resume\"><th colspan=\"3\" class=\"titre\">".gettext($name)."</th>";
+ $result .= _display_resume_groupe_category($group, $exalead_data->query->context);
+ $result .= "</table>";
+ return $result;
+ }
+ }
+}
+
+/**
+* This function is used to resume database content for keywords
+*/
+function _display_resume_keywords($params, &$smarty){
+ global $exa_max_length;
+ if(!empty($params['exalead_data'])){
+ $exalead_data = &$GLOBALS[$params['exalead_data']];
+ }
+ else{
+ $exalead_data = &$GLOBALS['exalead_data'];
+ }
+
+ //if no keywrods, do not display anything
+ if(count($exalead_data->keywords) == 0) return '';
+ $name=$params['display'];
+ $result = "<table class=\"exa_resume\"><th colspan=\"3\" class=\"titre\">".gettext($name)."</th>";
+ foreach($exalead_data->keywords as $keyword){
+ if($keyword->display != ''){
+ $title = (empty($keyword->display)?$keyword->name:$keyword->display);
+ $count = (empty($keyword->count)?'':' ('.$keyword->count.')');
+ $refine = $exalead_data->query->context.'/'.$keyword->refine_href;
+ $exclude = $exalead_data->query->context.'/'.$keyword->exclude_href;
+ $reset = $exalead_data->query->context.'/'.$keyword->reset_href;
+ if($keyword->is_normal()){
+ $result .= _display_3_columns($title, $count, $refine, $exclude, false);
+ }
+ else{
+ $result .= _display_2_columns($title, $reset, $keyword->is_excluded(), false);
+ }
+ }
+ }
+ $result .= "</table>";
+ return $result;
+}
+
+function register_smarty_exalead(&$page){
+ $page->register_function('little_nav_barre','_little_nav_barre');
+ $page->register_function('exa_display_groupes', '_display_groupes');
+ $page->register_function('exa_display_resume_groupe', '_display_resume_groupe');
+ $page->register_function('exa_display_resume_keywords', '_display_resume_keywords');
+ $page->register_function('exa_display_keywords', '_display_keywords');
+ $page->register_function('exa_navigation_gauche', '_exa_navigation_gauche');
+ $page->register_function('exa_navigation_droite', '_exa_navigation_droite');
+ $page->register_function('exa_navigation_barre', '_exa_navigation_barre');
+}
+
+if(isset($page)){
+ register_smarty_exalead($page);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function select_fonction($fonction){
+ global $globals;
+ $html = "<option value='' ". (($fonction == '0')?"selected='selected'":"") ."> </option>\n";
+
+ $res = $globals->xdb->iterRow("SELECT id, fonction_fr, FIND_IN_SET('titre', flags) from fonctions_def ORDER BY id");
+ while(list($fid, $flabel, $ftitre) = $res->next()){
+ if($ftitre)
+ $html.= "<option value='$fid' " . (($fonction == $fid)?"selected='selected'":"") . ">$flabel</option>\n";
+ else
+ $html .= "<option value=\"$fid\" " . (($fonction == $fid)?"selected='selected'":"") . ">* $flabel</option>\n";
+ }
+ return $html;
+}
+
+function _select_fonction_smarty($params){
+ return select_fonction($params['fonction']);
+}
+
+$page->register_function('select_fonction', '_select_fonction_smarty');
+?>
--- /dev/null
+
+The files here have been generated with fpdf (http://www.fpdf.org/) font tools
+from ttf-bitstream-vera fonts.
+
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSans-Roman';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-183 -236 1287 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
+$up=-104;
+$ut=70;
+$cw=array(
+ chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
+ chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
+ ','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
+ 'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
+ 'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
+ 'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
+ chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
+ chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>635,chr(167)=>500,chr(168)=>521,chr(169)=>1000,chr(170)=>471,chr(171)=>612,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
+ chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>685,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>525,chr(185)=>401,chr(186)=>471,chr(187)=>612,chr(188)=>1070,chr(189)=>1023,chr(190)=>611,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
+ chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
+ chr(220)=>732,chr(221)=>611,chr(222)=>605,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>982,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>612,chr(241)=>634,
+ chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>635,chr(255)=>592);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='Vera.z';
+$originalsize=65932;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSans-BoldOblique';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-278 -236 1401 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
+$up=-111;
+$ut=126;
+$cw=array(
+ chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
+ chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
+ ','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
+ 'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
+ 'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
+ 'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
+ chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
+ chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>456,chr(162)=>696,chr(163)=>696,chr(164)=>696,chr(165)=>696,chr(166)=>720,chr(167)=>500,chr(168)=>595,chr(169)=>1000,chr(170)=>564,chr(171)=>650,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
+ chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>725,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>582,chr(185)=>438,chr(186)=>564,chr(187)=>650,chr(188)=>1167,chr(189)=>1094,chr(190)=>724,chr(191)=>580,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
+ chr(198)=>1085,chr(199)=>734,chr(200)=>683,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>372,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>845,chr(209)=>837,chr(210)=>850,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
+ chr(220)=>812,chr(221)=>724,chr(222)=>742,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>593,chr(232)=>678,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>343,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>687,chr(241)=>712,
+ chr(242)=>687,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>652,chr(254)=>716,chr(255)=>652);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraBI.z';
+$originalsize=63208;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSans-Bold';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-199 -236 1417 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
+$up=-111;
+$ut=126;
+$cw=array(
+ chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
+ chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
+ ','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
+ 'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
+ 'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
+ 'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
+ chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
+ chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>456,chr(162)=>696,chr(163)=>696,chr(164)=>696,chr(165)=>696,chr(166)=>720,chr(167)=>500,chr(168)=>595,chr(169)=>1000,chr(170)=>564,chr(171)=>646,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
+ chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>725,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>582,chr(185)=>438,chr(186)=>564,chr(187)=>646,chr(188)=>1167,chr(189)=>1094,chr(190)=>724,chr(191)=>580,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
+ chr(198)=>1085,chr(199)=>734,chr(200)=>683,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>372,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>838,chr(209)=>837,chr(210)=>850,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
+ chr(220)=>812,chr(221)=>724,chr(222)=>738,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>593,chr(232)=>678,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>343,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>687,chr(241)=>712,
+ chr(242)=>687,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>652,chr(254)=>716,chr(255)=>652);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraBd.z';
+$originalsize=58716;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSans-Oblique';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-262 -236 1259 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
+$up=-104;
+$ut=70;
+$cw=array(
+ chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
+ chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
+ ','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
+ 'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
+ 'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
+ 'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
+ chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
+ chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>635,chr(167)=>500,chr(168)=>521,chr(169)=>1000,chr(170)=>471,chr(171)=>617,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
+ chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>685,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>525,chr(185)=>401,chr(186)=>471,chr(187)=>617,chr(188)=>1070,chr(189)=>1028,chr(190)=>611,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
+ chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
+ chr(220)=>732,chr(221)=>611,chr(222)=>608,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>995,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>612,chr(241)=>634,
+ chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>635,chr(255)=>592);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraIt.z';
+$originalsize=63684;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSansMono-BoldOb';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-73 -236 681 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
+$up=-108;
+$ut=120;
+$cw=array(
+ chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
+ chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
+ ','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
+ 'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
+ 'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
+ 'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
+ chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
+ chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
+ chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
+ chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
+ chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
+ chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraMoBI.z';
+$originalsize=55032;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSansMono-Bold';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-19 -236 606 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
+$up=-108;
+$ut=120;
+$cw=array(
+ chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
+ chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
+ ','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
+ 'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
+ 'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
+ 'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
+ chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
+ chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
+ chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
+ chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
+ chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
+ chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraMoBd.z';
+$originalsize=49052;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSansMono-Oblique';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-71 -236 691 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
+$up=-104;
+$ut=69;
+$cw=array(
+ chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
+ chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
+ ','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
+ 'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
+ 'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
+ 'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
+ chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
+ chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
+ chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
+ chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
+ chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
+ chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraMoIt.z';
+$originalsize=54508;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSansMono-Roman';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-5 -236 606 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
+$up=-104;
+$ut=69;
+$cw=array(
+ chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
+ chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
+ ','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
+ 'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
+ 'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
+ 'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
+ chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
+ chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
+ chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
+ chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
+ chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
+ chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraMono.z';
+$originalsize=49224;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSerif-Roman';
+$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-183 -236 1287 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
+$up=-104;
+$ut=65;
+$cw=array(
+ chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
+ chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
+ ','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
+ 'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
+ 'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
+ 'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
+ chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
+ chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>402,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>685,chr(167)=>500,chr(168)=>513,chr(169)=>1000,chr(170)=>475,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>500,
+ chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>695,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>527,chr(185)=>401,chr(186)=>470,chr(187)=>612,chr(188)=>1137,chr(189)=>989,chr(190)=>660,chr(191)=>536,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
+ chr(198)=>1001,chr(199)=>765,chr(200)=>730,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>395,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>807,chr(209)=>875,chr(210)=>820,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
+ chr(220)=>843,chr(221)=>660,chr(222)=>676,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>560,chr(232)=>592,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>320,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>602,chr(241)=>644,
+ chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>565,chr(254)=>640,chr(255)=>565);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraSe.z';
+$originalsize=60280;
+?>
--- /dev/null
+<?php
+$type='TrueType';
+$name='BitstreamVeraSerif-Bold';
+$desc=array('Ascent'=>939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-186 -236 1361 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
+$up=-106;
+$ut=117;
+$cw=array(
+ chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
+ chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
+ ','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
+ 'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
+ 'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
+ 'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
+ chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
+ chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>439,chr(162)=>696,chr(163)=>696,chr(164)=>696,chr(165)=>696,chr(166)=>722,chr(167)=>523,chr(168)=>563,chr(169)=>1000,chr(170)=>487,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
+ chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>730,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>568,chr(185)=>438,chr(186)=>500,chr(187)=>625,chr(188)=>1180,chr(189)=>1028,chr(190)=>714,chr(191)=>586,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
+ chr(198)=>1034,chr(199)=>796,chr(200)=>762,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>468,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>874,chr(209)=>914,chr(210)=>871,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
+ chr(220)=>872,chr(221)=>714,chr(222)=>757,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>975,chr(231)=>609,chr(232)=>636,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>380,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>667,chr(241)=>727,
+ chr(242)=>667,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>581,chr(254)=>699,chr(255)=>581);
+$enc='ISO-8859-15';
+$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 164 /Euro 166 /Scaron 168 /scaron 180 /Zcaron 184 /zcaron 188 /OE /oe /Ydieresis';
+$file='VeraSeBd.z';
+$originalsize=58736;
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+// {{{ liste les pays ou les régions d'un pays
+/** donne la liste déroulante des pays
+ * @param $current pays actuellement selectionné
+ */
+function geoloc_country($current) {
+ global $globals;
+ $res = $globals->xdb->iterRow('SELECT a2,pays FROM geoloc_pays ORDER BY pays');
+ $html = "";
+ while (list($my_id, $my_pays) = $res->next()) {
+ $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
+ $my_id, ($current==$my_id?"selected='selected'":""), $my_pays);
+ }
+ return $html;
+}
+
+function _geoloc_country_smarty($params){
+ if(!isset($params['country']))
+ return;
+ return geoloc_country($params['country']);
+}
+$page->register_function('geoloc_country', '_geoloc_country_smarty');
+
+/** donne la liste deroulante des regions pour un pays
+ * @param $pays le pays dont on veut afficher les regions
+ * @param $current la region actuellement selectionnee
+ */
+function geoloc_region($country,$current) {
+ global $globals;
+ $res = $globals->xdb->iterRow('SELECT region,name FROM geoloc_region where a2={?} ORDER BY name', $country);
+ $html = "<option value=\"\"></option>";
+ while (list($regid, $regname) = $res->next()) {
+ $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",
+ $regid, ($current==$regid?"selected='selected'":""), $regname);
+ }
+ return $html;
+
+}
+function _geoloc_region_smarty($params){
+ if(!isset($params['country']))
+ return;
+ if(!isset($params['region']))
+ return;
+ return geoloc_region($params['country'], $params['region']);
+}
+$page->register_function('geoloc_region', '_geoloc_region_smarty');
+// }}}
+
+// {{{ get_address_infos($txt)
+/** retrieve the infos on a text address
+ * store on the fly the info of the city concerned
+ * @param $txt the raw text of an address
+ */
+function get_address_infos($txt) {
+ $url ="http://www.geoloc.org/adressparser/address.php?txt=".urlencode(utf8_encode($txt));
+ if (!($f = @fopen($url, 'r'))) return false;
+ $keys = explode('|',fgets($f));
+ $vals = explode('|',fgets($f));
+ $infos = array();
+ foreach ($keys as $i=>$key) if($vals[$i]) $infos[$key] = ($key == 'sql')?$vals[$i]:utf8_decode(strtr($vals[$i], array(chr(197).chr(147) => "œ")));
+ global $globals;
+ if ($infos['sql'])
+ $globals->xdb->execute("REPLACE INTO geoloc_city VALUES ".$infos['sql']);
+ return $infos;
+}
+// }}}
+
+// {{{ get_address_text($adr)
+/** make the text of an address that can be read by a mailman
+ * @param $adr an array with all the usual fields
+ */
+function get_address_text($adr) {
+ $t = "";
+ if ($adr['adr1']) $t.= $adr['adr1'];
+ if ($adr['adr2']) $t.= "\n".$adr['adr2'];
+ if ($adr['adr3']) $t.= "\n".$adr['adr3'];
+ $l = "";
+ if ($adr['country'] == 'US' || $adr['country'] == 'CA') {
+ if ($adr['city']) $l .= $adr['city'].",\n";
+ if ($adr['region']) $l .= $adr['region']." ";
+ if ($adr['postcode']) $l .= $adr['postcode'];
+ } else {
+ if ($adr['postcode']) $l .= $adr['postcode']." ";
+ if ($adr['city']) $l .= $adr['city'];
+ }
+ if ($l) $t .= "\n".trim($l);
+ if ($adr['country'] != '00' && (!$adr['countrytxt'] || $adr['countrytxt'] == strtoupper($adr['countrytxt']))) {
+ global $globals;
+ $res = $globals->xdb->query("SELECT pays FROM geoloc_pays WHERE a2 = {?}", $adr['country']);
+ $adr['countrytxt'] = $res->fetchOneCell();
+ }
+ if ($adr['countrytxt']) $t .= "\n".$adr['countrytxt'];
+ return trim($t);
+}
+// }}}
+
+// {{{ compare_addresses_text($a, $b)
+/** compares if two address matches
+ * @param $a the raw text of an address
+ * @param $b the raw text of a complete valid address
+ */
+function compare_addresses_text($a, $b) {
+ $ta = strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $a));
+ $tb = strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $b));
+
+ $la = explode("\n", $ta);
+ $lb = explode("\n", $tb);
+
+ if (count($lb) > count($la) + 1) return false;
+ foreach ($la as $i=>$l) if (levenshtein($l, $lb[$i]) > 3) return false;
+ return true;
+}
+
+// }}}
+
+function empty_address() {
+ return Array(
+ "adr1" => "",
+ "adr2" => "",
+ "adr3" => "",
+ "cityid" => NULL,
+ "city" => "",
+ "postcode" => "",
+ "region" => "",
+ "country" => "00",
+ "countrytxt" => "");
+}
+
+// create a simple address from a text without geoloc
+function cut_address($txt) {
+ $txt = str_replace("\r\n", "\n", $txt);
+ ereg("^([^\n]*)(\n([^\n]*)(\n(.*))?)?$", trim($txt), $a);
+ return array("adr1" => trim($a[1]), "adr2" => trim($a[3]), "adr3" => trim(str_replace("\n", " ", $a[5])));
+}
+
+// {{{ localize_addresses($uid)
+/* localize all the address of a user and modify the database
+ * if the new address match with the old one
+ * @param $uid the id of the user
+ */
+function localize_addresses($uid) {
+ global $globals;
+ $res = $globals->xdb->iterator("SELECT * FROM adresses WHERE uid = {?} and (cityid IS NULL OR cityid = 0)", $uid);
+ $erreur = Array();
+
+ while ($a = $res->next()) {
+ $new = get_address_infos($ta = get_address_text($a));
+ if (compare_addresses_text($ta, get_address_text($new))) {
+ $globals->xdb->execute("UPDATE adresses SET
+ adr1 = {?}, adr2 = {?}, adr3 = {?},
+ cityid = {?}, city = {?}, postcode = {?},
+ region = {?}, country = {?}
+ WHERE uid = {?} AND adrid = {?}",
+ $new['adr1'], $new['adr2'], $new['adr3'],
+ $new['cityid'], $new['city'], $new['postcode'],
+ $new['region'], $new['country'],
+ $uid, $a['adrid']);
+ $new['store'] = true;
+ if (!$new['cityid']) $erreur[$a['adrid']] = $new;
+ } else {
+ $new['store'] = false;
+ $erreur[$a['adrid']] = $new;
+ }
+ }
+ return $erreur;
+}
+// }}}
+
+// {{{ synchro_city($id)
+/** synchronise the local geoloc_city base to geoloc.org
+ * @param $id the id of the city to synchronize
+ */
+ function synchro_city($id) {
+ $url ="http://www.geoloc.org/adressparser/cityFinder.php?method=id&id=".$id."&out=sql";
+ if (!($f = @fopen($url, 'r'))) return false;
+ $s = fgets($f);
+ global $globals;
+ if ($s)
+ return $globals->xdb->execute("REPLACE INTO geoloc_city VALUES ".$s) > 0;
+ }
+ // }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function select_if_homonyme($uid) {
+ global $globals;
+ $res = $globals->xdb->query("SELECT prenom,nom,a.alias AS forlife,h.alias AS loginbis
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (a.id=u.user_id AND a.type='a_vie')
+ INNER JOIN aliases AS h ON (h.id=u.user_id AND h.expire!='')
+ WHERE user_id = {?}", $uid);
+ return $res->fetchOneRow();
+}
+
+function send_warning_homonyme($prenom, $nom, $forlife, $loginbis) {
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $cc = "support+homonyme@polytechnique.org";
+ $FROM = "\"Support Polytechnique.org\" <$cc>";
+ $mymail = new HermesMailer();
+ $mymail->setFrom($FROM);
+ $mymail->setSubject("Dans 2 semaines, suppression de $loginbis@polytechnique.org");
+ $mymail->addTo("$prenom $nom <$forlife@polytechnique.org>");
+ $mymail->addCc($cc);
+ $mymail->setTxtBody(Env::get('mailbody'));
+ $mymail->send();
+}
+
+function send_robot_homonyme($prenom, $nom, $forlife, $loginbis) {
+ require_once("diogenes/diogenes.hermes.inc.php");
+ $cc = "support+homonyme@polytechnique.org";
+ $FROM = "\"Support Polytechnique.org\" <$cc>";
+ $mymail = new HermesMailer();
+ $mymail->setFrom($FROM);
+ $mymail->setSubject("Mise en place du robot $loginbis@polytechnique.org");
+ $mymail->addTo("$prenom $nom <$forlife@polytechnique.org>");
+ $mymail->addCc($cc);
+ $mymail->setTxtBody(Env::get('mailbody'));
+ $mymail->send();
+}
+
+function switch_bestalias($uid, $loginbis) {
+ global $globals;
+ // check if loginbis was the bestalias
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", $uid);
+ $bestalias = $res->fetchOneCell();
+ if ($bestalias && $bestalias != $loginbis) return false;
+
+ // select the shortest alias still alive
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id = {?} AND alias != {?} AND expire IS NULL ORDER BY LENGTH(alias) LIMIT 1", $uid, $loginbis);
+ $newbest = $res->fetchOneCell();
+ // change the bestalias flag
+ $globals->xdb->execute("UPDATE aliases SET flags = (flags & (255 - 1)) | IF(alias = {?}, 1, 0) WHERE id = {?}", $newbest, $uid);
+
+ return $newbest;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ import class definitions
+
+require_once("xml-rpc-client.inc.php");
+
+// }}}
+// {{{ function lists_xmlrpc
+
+function &lists_xmlrpc($uid, $pass, $fqdn=null)
+{
+ global $globals;
+
+ $dom = empty($fqdn) ? $globals->mail->domain : $fqdn;
+ $url = "http://$uid:$pass@{$globals->lists->rpchost}:{$globals->lists->rpcport}/$dom";
+ $client = new xmlrpc_client($url);
+ return $client;
+}
+
+// }}}
+// {{{ function list_sort_owners
+
+function list_sort_owners(&$members, $tri_promo = true) {
+ global $globals;
+
+ $membres = Array();
+
+ foreach($members as $mem) {
+ list($m, $dom) = split('@',$mem);
+ if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
+ $res = $globals->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()) {
+ $key = $tri_promo ? $promo : strtoupper($nom{0});
+ $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $m);
+ } else {
+ $membres[0][] = Array('l' => $mem);
+ }
+ } else {
+ $res = $globals->xdb->query('SELECT prenom, nom FROM groupex.membres WHERE email={?}', $mem);
+ if (list($prenom, $nom) = $res->fetchOneRow()) {
+ $key = $tri_promo ? 0 : strtoupper($nom{0});
+ $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $mem);
+ } else {
+ $membres[0][] = Array('l' => $mem);
+ }
+ }
+ }
+
+ ksort($membres);
+ foreach($membres as $key=>$val) ksort($membres[$key]);
+ return $membres;
+}
+
+// }}}
+// {{{ function list_sort_members
+
+function list_sort_members(&$members, $tri_promo = true) {
+ $pi1 = create_function('$arr', 'return $arr[1];');
+ return list_sort_owners(array_map($pi1, $members), $tri_promo);
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.misc.inc.php");
+
+// {{{ function mark_from_mail
+function mark_from_mail($uid, $email) {
+ global $globals;
+ $res = $globals->xdb->query(
+ "SELECT u.nom, u.prenom, a.alias
+ FROM register_marketing AS r
+ INNER JOIN auth_user_md5 AS u ON (r.sender = u.user_id)
+ INNER JOIN aliases AS a ON (a.id = r.sender AND a.type='a_vie')
+ WHERE r.uid = {?} AND r.email = {?}",
+ $uid, $email);
+ $sender = $res->fetchOneAssoc();
+ return "\"".$sender['prenom']." ".$sender['nom']."\" <".$sender['alias']."@polytechnique.org>";
+
+}
+// }}}
+
+// {{{ function mark_text_mail
+
+function mark_text_mail($uid, $email)
+{
+ global $globals;
+ $title = "Annuaire en ligne des Polytechniciens";
+
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM auth_user_md5 WHERE perms IN ('admin', 'user') and deces = 0");
+ $num_users = $res->fetchOneCell();
+
+ $res = $globals->xdb->query("SELECT flags, nom, prenom, promo FROM auth_user_md5 WHERE user_id = {?}", $uid);
+ $u = $res->fetchOneAssoc();
+
+ $mailorg = make_forlife($u['prenom'],$u['nom'],$u['promo']);
+
+ $to = "\"".$u['prenom']." ".$u['nom']."\" <".$email.">";
+
+ $titre = "Annuaire en ligne des Polytechniciens";
+ $text = " ".($u['flags']?"Chère":"Cher")." camarade,\n\n";
+ $text .= " Ta fiche n'est pas à jour dans l'annuaire des Polytechniciens sur Internet. Pour la mettre à jour, il te suffit de visiter cette page ou de copier cette adresse dans la barre de ton navigateur :\n\n";
+ $text .= "==========================================================\n";
+ $text .= $globals->baseurl."/register/?hash=%%hash%%\n";
+ $text .= "==========================================================\n\n";
+ $text .= "Il ne te faut que 5 minutes sur http://www.polytechnique.org/ pour rejoindre les $num_users camarades branchés grâce au système de reroutage de l'X et qui permet de joindre un camarade en connaissant seulement son nom et son prénom... et de bénéficier pour la vie d'une adresse prestigieuse $mailorg@polytechnique.org et son alias discret $mailorg@m4x.org (m4x = mail for X).\n\n";
+ $text .= "Pas de nouvelle boîte aux lettres à relever, il suffit de la rerouter vers ton adresse personnelle et/ou professionnelle que tu indiques et que tu peux changer tous les jours si tu veux sans imposer à tes correspondants de modifier leur carnet d'adresses...\n\n";
+ $text .= "De plus, le site web offre les services d'annuaire (recherche multi-critères), de forums, de mailing-lists. Ce portail est géré par une dizaine de jeunes camarades, avec le soutien et les conseils de nombreux X de toutes promotions, incluant notamment des camarades de la Kès des élèves de l'X et d'autres de l'AX. Les serveurs sont hébergés au sein même de l'Ecole polytechnique, sur une connexion rapide, et les services évoluent en fonction des besoins exprimés par la communauté sur Internet.\n\n";
+ $text .="N'hésite pas à transmettre ce message à tes camarades ou à nous écrire, nous proposer toute amélioration ou suggestion pour les versions prochaines du site.\n\n";
+ $text .= "A bientôt sur http://www.polytechnique.org !\n";
+ $text .= "Bien à toi,\n";
+ $text .= "%%sender%%\n\n";
+ $text .= "--\n";
+ $text .= "Polytechnique.org\n";
+ $text .= "\"Le portail des élèves & anciens élèves de l'X\"\n";
+ $text .= "http://www.polytechnique.org/\n";
+ $text .= "http://www.polytechnique.net/\n";
+ return array($to, $title, $text);
+}
+// }}}
+
+// {{{ function mark_send_mail()
+
+function mark_send_mail($uid, $email, $perso, $to='', $title='', $text='')
+{
+ require_once("diogenes/diogenes.hermes.inc.php");
+ global $globals;
+
+ $hash = rand_url_id(12);
+ $globals->xdb->execute('UPDATE register_marketing SET nb=nb+1,hash={?},last=NOW() WHERE uid={?} AND email={?}', $hash, $uid, $email);
+
+ if ($to == '')
+ list($to, $title, $text) = mark_text_mail($uid, $email);
+
+ if ($perso == 'staff')
+ $from = "\"Equipe Polytechnique.org\" <register@polytechnique.org>";
+ else
+ $from = mark_from_mail($uid, $email);
+
+ $sender = substr($from, 1, strpos($from, '"', 2)-1);
+ $text = str_replace(array("%%hash%%", "%%sender%%"), array($hash, $sender), $text);
+
+ $mailer = new HermesMailer();
+ $mailer->setFrom($from);
+ $mailer->addTo($to);
+ $mailer->setSubject($title);
+ $mailer->setTxtBody(wordwrap($text, 80));
+ $mailer->send();
+}
+
+// }}}
+// {{{ function relance
+
+function relance($uid, $nbx = -1)
+{
+ require_once('xorg.mailer.inc.php');
+ global $globals;
+
+ if ($nbx < 0) {
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM auth_user_md5 WHERE deces=0");
+ $nbx = $res->fetchOneCell();
+ }
+
+ $res = $globals->xdb->query(
+ "SELECT r.date, u.promo, u.nom, u.prenom, r.email, r.bestalias
+ FROM register_pending AS r
+ INNER JOIN auth_user_md5 AS u ON u.user_id = r.uid
+ WHERE hash!='INSCRIT' AND uid={?} AND TO_DAYS(relance) < TO_DAYS(NOW())", $uid);
+ if (!list($date, $promo, $nom, $prenom, $email, $alias) = $res->fetchOneRow()) {
+ return false;
+ }
+
+ $hash = rand_url_id(12);
+ $pass = rand_pass();
+ $pass_md5 = md5($pass);
+ $fdate = strftime('%d %B %Y', strtotime($date));
+
+ $mymail = new XOrgMailer('marketing.relance.tpl');
+ $mymail->assign('nbdix', $nbx);
+ $mymail->assign('fdate', $fdate);
+ $mymail->assign('lusername', $alias);
+ $mymail->assign('nveau_pass', $pass);
+ $mymail->assign('baseurl', $globals->baseurl);
+ $mymail->assign('lins_id', $hash);
+ $mymail->assign('lemail', $email);
+ $mymail->assign('subj', $alias.'@'.$globals->mail->domain);
+ $mymail->send();
+ $globals->xdb->execute('UPDATE register_pending SET hash={?}, password={?}, relance=NOW() WHERE uid={?}', $hash, $pass_md5, $uid);
+
+ return "$prenom $nom ($promo)";
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class Payment
+
+class Payment
+{
+ // {{{ properties
+
+ var $id;
+ var $text;
+ var $url;
+ var $flags;
+ var $mail;
+ var $montant_min;
+ var $montant_max;
+ var $montant_def;
+
+ var $api = null;
+
+ // }}}
+ // {{{ constructor
+
+ function Payment($ref=-1)
+ {
+ global $globals;
+ $r = $ref==-1 ? $globals->money->mpay_def_id : $ref;
+ $res = $globals->xdb->query("SELECT id, text, url, flags, mail, montant_min, montant_max, montant_def
+ FROM {$globals->money->mpay_tprefix}paiements WHERE id={?}", $r);
+ list($this->id, $this->text, $this->url, $flags, $this->mail,
+ $this->montant_min, $this->montant_max, $this->montant_def) = $res->fetchOneRow();
+
+ $this->montant_min = (float)$this->montant_min;
+ $this->montant_max = (float)$this->montant_max;
+ $this->flags = new Flagset($flags);
+ }
+
+ // }}}
+ // {{{ function check()
+
+ function check($value)
+ {
+ $v = (float)strtr($value, ',', '.');
+ if ($this->montant_min > $v) {
+ return "Montant inférieur au minimum autorisé ({$this->montant_min}).";
+ } elseif ($v > $this->montant_max) {
+ return "Montant supérieur au maximum autorisé ({$this->montant_max}).";
+ } else {
+ return true;
+ }
+ }
+
+ // }}}
+ // {{{ function init()
+
+ function init($val, &$meth)
+ {
+ require_once('money/'.$meth->inc);
+ $this->api = new $api($val);
+ }
+
+ // }}}
+ // {{{ function prepareform()
+
+ function prepareform()
+ {
+ return $this->api->prepareform($this);
+ }
+}
+
+// }}}
+// {{{ class PayMethod
+
+class PayMethod
+{
+ // {{{ properties
+
+ var $id;
+ var $text;
+ var $inc;
+
+ // }}}
+ // {{{ constructor
+
+ function PayMethod($id=-1)
+ {
+ global $globals;
+ $i = $id==-1 ? $globals->money->mpay_def_meth : $id;
+ $res = $globals->xdb->query("SELECT id,text,include FROM {$globals->money->mpay_tprefix}methodes WHERE id={?}", $i);
+ list($this->id, $this->text, $this->inc) = $res->fetchOneRow();
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+class CyberPayment
+{
+ // {{{ properties
+
+ var $val;
+
+ var $urlform;
+ var $nomsite = "la BP Lorraine Champagne";
+ var $infos;
+
+ // }}}
+ // {{{ constructor
+
+ function CyberPayment($val)
+ {
+ $this->val = strtr(sprintf("%.02f", (float)$val), '.', ',');
+ }
+
+ // }}}
+ // {{{ function form()
+
+ function prepareform(&$pay)
+ {
+ // toute la doc se trouve sur
+ // http://www.cyberpaiement.tm.fr/donnees.htm
+
+ global $globals;
+
+ $roboturl = str_replace("https://","http://",$globals->baseurl)
+ ."/paiement/cyberpaiement_retour.php?uid="
+ .Session::getInt('uid')
+ ."&CHAMPBPX";
+ if (Cookie::has(session_name())) {
+ $returnurl .= "?".SID;
+ }
+
+ // on constuit la reference de la transaction
+ $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id();
+ $fullref = substr("$prefix-xorg-{$pay->id}",-15);
+
+ $this->urlform = "https://ecom.cimetz.com/telepaie/cgishell.exe/epaie01.exe";
+ $this->infos['commercant'] = Array(
+ 'CHAMP000' => 510879,
+ 'CHAMP001' => 5965,
+ 'CHAMP002' => 5429159012,
+ 'CHAMP003' => "I",
+ 'CHAMP004' => "Polytechnique.org",
+ 'CHAMP005' => $roboturl,
+ 'CHAMP006' => "Polytechnique.org",
+ 'CHAMP007' => $globals->baseurl,
+ 'CHAMP008' => $pay->mail);
+ $this->infos['client'] = Array(
+ 'CHAMP100' => Session::get('nom'),
+ 'CHAMP101' => Session::get('prenom'),
+ 'CHAMP102' => '.',
+ 'CHAMP103' => '.',
+ 'CHAMP104' => Session::get('bestalias').'@polytechnique.org',
+ 'CHAMP106' => '.',
+ 'CHAMP107' => '.',
+ 'CHAMP108' => '.',
+ 'CHAMP109' => '.',
+ 'CHAMP110' => '.');
+ $this->infos['commande'] = Array(
+ 'CHAMP200' => $fullref,
+ 'CHAMP201' => $this->val,
+ 'CHAMP202' => "EUR");
+ $this->infos['divers'] = Array('CHAMP900' => '01');
+ }
+
+ // }}}
+}
+
+$api = 'CyberPayment';
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+class PayPal
+{
+ // {{{ properties
+
+ var $val_number;
+ var $urlform;
+ var $nomsite = "PayPal";
+ var $text;
+
+ var $infos;
+
+ // }}}
+ // {{{ constructor
+
+ function PayPal($val)
+ {
+ $this->val_number = $val;
+ }
+
+ // }}}
+ // {{{ function form()
+
+ function prepareform(&$pay)
+ {
+ // toute la doc sur :
+ // https://www.paypal.com/fr_FR/pdf/integration_guide.pdf
+ // attention : le renvoi automatique ne fonctionne que si
+ // on oblige les gens à créer un compte paypal
+ // nous ne l'utilisons pas ; il faut donc que l'utilisateur
+ // revienne sur le site
+ global $globals;
+
+ $this->urlform = 'https://'.$globals->money->paypal_site.'/cgi-bin/webscr';
+
+ $roboturl = str_replace("https://","http://",$globals->baseurl)
+ ."/paiement/paypal_retour.php?uid="
+ .Session::getInt('uid');
+
+ $this->infos = Array();
+
+ $this->infos['commercant'] = Array(
+ 'business' => $globals->money->paypal_compte,
+ 'rm' => 2,
+ 'return' => $roboturl,
+ 'cn' => 'Commentaires',
+ 'no_shipping' => 1,
+ 'cbt' => 'Revenir sur polytechnique.org');
+
+ $info_client = Array(
+ 'first_name' => Session::get('prenom'),
+ 'last_name' => Session::get('nom'),
+ 'email' => Session::get('bestalias').'@polytechnique.org');
+
+ $res = $globals->xdb->query(
+ "SELECT a.adr1 AS address1, a.adr2 AS address2,
+ a.city, a.postcode AS zip, a.country,
+ IF(a.tel, a.tel, q.profile_mobile) AS night_phone_b
+ FROM auth_user_quick AS q
+ LEFT JOIN adresses AS a ON (q.user_id = a.uid)
+ WHERE q.user_id = {?} AND FIND_IN_SET('active', a.statut)
+ LIMIT 1", Session::getInt('uid'));
+ $this->infos['client']=array_merge($info_client, $res->fetchOneAssoc());
+
+ // on constuit la reference de la transaction
+ $prefix = ($pay->flags->hasflag('unique')) ? str_pad("",15,"0") : rand_url_id();
+ $fullref = substr("$prefix-xorg-{$pay->id}",-15);
+
+ $this->infos['commande'] = Array(
+ 'item_name' => $pay->text,
+ 'amount' => $this->val_number,
+ 'currency_code' => 'EUR',
+ 'custom' => $fullref);
+
+ $this->infos['divers'] = Array('cmd' => '_xclick');
+
+ }
+
+ // }}}
+}
+
+$api = 'PayPal';
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+$mois_fr = array('01'=>'Janvier',
+ '02'=>'Février',
+ '03'=>'Mars',
+ '04'=>'Avril',
+ '05'=>'Mai',
+ '06'=>'Juin',
+ 'O7'=>'Juillet',
+ '08'=>'Août',
+ '09'=>'Septembre',
+ '10'=>'Octobre',
+ '11'=>'Novembre',
+ '12'=>'Decembre');
+
+
+$trim_fr = array('01'=>'Janvier-Mars',
+ '04'=>'Avril-Juin',
+ '07'=>'Juillet-Septembre',
+ '10'=>'Octobre-Decembre');
+
+
+function isDate($date)
+{
+ list($d, $m, $y) = split('[/.-]', $date);
+ $dummy = date("d/m/Y", mktime (0,0,0,$m,$d,$y));
+ $date = ereg_replace('-', '/', $date);
+ if ($dummy != $date)
+ return false;
+ else
+ return true;
+}
+
+
+function solde_until($date='')
+{
+ global $globals;
+ $sql = "SELECT SUM(credit)-SUM(debit) FROM money_trezo";
+ if (empty($date)) {
+ $res = $globals->xdb->query($sql);
+ } else {
+ $res = $globals->xdb->query($sql." WHERE date <= {?}", $date);
+ }
+ return $res->fetchOneCell();
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ requires + defines
+
+require_once("xorg.misc.inc.php");
+require_once("diogenes/diogenes.misc.inc.php");
+
+if (isset($page)) {
+ $page->addCssLink('css/nl.css');
+}
+
+define('FEMME', 1);
+define('HOMME', 0);
+
+// }}}
+// {{{ class NewsLetter
+
+class NewsLetter
+{
+ // {{{ properties
+
+ var $_id;
+ var $_date;
+ var $_title;
+ var $_head;
+ var $_cats = Array();
+ var $_arts = Array();
+
+ // }}}
+ // {{{ constructor
+
+ function NewsLetter($id=null)
+ {
+ global $globals;
+
+ if (isset($id)) {
+ if ($id == 'last') {
+ $res = $globals->xdb->query("SELECT MAX(id) FROM newsletter WHERE bits!='new'");
+ $id = $res->fetchOneCell();
+ }
+ $res = $globals->xdb->query("SELECT * FROM newsletter WHERE id={?}", $id);
+ } else {
+ $res = $globals->xdb->query("SELECT * FROM newsletter WHERE bits='new'");
+ }
+ $nl = $res->fetchOneAssoc();
+
+ $this->_id = $nl['id'];
+ $this->_date = $nl['date'];
+ $this->_title = $nl['titre'];
+ $this->_head = $nl['head'];
+
+ $res = $globals->xdb->iterRow("SELECT cid,titre FROM newsletter_cat ORDER BY pos");
+ while (list($cid, $title) = $res->next()) {
+ $this->_cats[$cid] = $title;
+ }
+
+ $res = $globals->xdb->iterRow(
+ "SELECT a.title,a.body,a.append,a.aid,a.cid,a.pos
+ FROM newsletter_art AS a
+ INNER JOIN newsletter AS n USING(id)
+ LEFT JOIN newsletter_cat AS c ON(a.cid=c.cid)
+ WHERE a.id={?}
+ ORDER BY c.pos,a.pos", $this->_id);
+ while (list($title, $body, $append, $aid, $cid, $pos) = $res->next()) {
+ $this->_arts[$cid]["a$aid"] = new NLArticle($title, $body, $append, $aid, $cid, $pos);
+ }
+ }
+
+ // }}}
+ // {{{ function setSent()
+
+ function setSent()
+ {
+ global $globals;
+ $globals->xdb->execute("UPDATE newsletter SET bits='sent' WHERE id={?}", $this->_id);
+ }
+
+ // }}}
+ // {{{ function save()
+
+ function save()
+ {
+ global $globals;
+ $globals->xdb->execute('UPDATE newsletter SET date={?},titre={?},head={?} WHERE id={?}',
+ $this->_date, $this->_title, $this->_head, $this->_id);
+ }
+
+ // }}}
+ // {{{ function title()
+
+ function title()
+ { return $this->_title; }
+
+ // }}}
+ // {{{ function head()
+
+ function head()
+ { return $this->_head; }
+
+ // }}}
+ // {{{ function getArt()
+
+ function getArt($aid)
+ {
+ foreach ($this->_arts as $key=>$artlist) {
+ if (isset($artlist["a$aid"])) {
+ return $artlist["a$aid"];
+ }
+ }
+ return null;
+ }
+
+ // }}}
+ // {{{ function saveArticle()
+
+ function saveArticle(&$a)
+ {
+ global $globals;
+ if ($a->_aid>=0) {
+ $globals->xdb->execute('REPLACE INTO newsletter_art (id,aid,cid,pos,title,body,append)
+ VALUES ({?},{?},{?},{?},{?},{?},{?})',
+ $this->_id, $a->_aid, $a->_cid, $a->_pos,
+ $a->_title, $a->_body, $a->_append);
+ $this->_arts['a'.$a->_aid] = $a;
+ } else {
+ $globals->xdb->execute(
+ 'INSERT INTO newsletter_art
+ SELECT {?},MAX(aid)+1,{?},'.($a->_pos ? intval($a->_pos) : 'MAX(pos)+1').',{?},{?},{?}
+ FROM newsletter_art AS a
+ WHERE a.id={?}',
+ $this->_id, $a->_cid, $a->_title, $a->_body, $a->_append, $this->_id);
+ $this->_arts['a'.$a->_aid] = $a;
+ }
+ }
+
+ // }}}
+ // {{{ function delArticle()
+
+ function delArticle($aid)
+ {
+ global $globals;
+ $globals->xdb->execute('DELETE FROM newsletter_art WHERE id={?} AND aid={?}', $this->_id, $aid);
+ foreach ($this->_arts as $key=>$art) {
+ unset($this->_arts[$key]["a$aid"]);
+ }
+ }
+
+ // }}}
+ // {{{ function footer
+
+ function footer($html)
+ {
+ global $globals;
+ $url = $globals->baseurl;
+
+ if ($html) {
+ return '<div class="foot">Cette lettre est envoyée à tous les Polytechniciens sur Internet par l\'intermédiaire de Polytechnique.org.</div>'
+ . '<div class="foot">'
+ . "[<a href=\"$url/newsletter/\">archives</a> | "
+ . "<a href=\"$url/newsletter/submit.php\">écrire dans la NL</a> | "
+ . "<a href=\"$url/newsletter/?out=1\">ne plus recevoir</a>]"
+ . '</div>';
+ } else {
+ return "\n\n--------------------------------------------------------------------\n"
+ . "Cette lettre est envoyée à tous les Polytechniciens sur Internet par\n"
+ . "l'intermédiaire de Polytechnique.org.\n"
+ . "\n"
+ . "archives : [$url/newsletter/]\n"
+ . "écrire : [$url/newsletter/submit.php]\n"
+ . "ne plus recevoir: [$url/newsletter/?out=1]\n";
+ }
+ }
+
+ // }}}
+ // {{{ function toText()
+
+ function toText($prenom,$nom,$sexe)
+ {
+ $res = "====================================================================\n";
+ $res .= ' '.$this->title()."\n";
+ $res .= "====================================================================\n\n";
+
+ $head = $this->head();
+ $head = str_replace('<cher>', $sexe ? 'Chère' : 'Cher', $head);
+ $head = str_replace('<prenom>', $prenom, $head);
+ $head = str_replace('<nom>', $nom, $head);
+ $head = enriched_to_text($head,false,true,2,64);
+
+ if ($head) {
+ $res .= "\n$head\n\n\n";
+ }
+
+ $i = 1;
+ foreach ($this->_arts as $cid=>$arts) {
+ $res .= "\n$i *{$this->_cats[$cid]}*\n";
+ foreach ($arts as $art) {
+ $res .= '- '.$art->title()."\n";
+ }
+ $i ++;
+ }
+ $res .= "\n\n";
+
+ foreach ($this->_arts as $cid=>$arts) {
+ $res .= "--------------------------------------------------------------------\n";
+ $res .= "*{$this->_cats[$cid]}*\n";
+ $res .= "--------------------------------------------------------------------\n\n";
+ foreach ($arts as $art) {
+ $res .= $art->toText();
+ $res .= "\n\n";
+ }
+ }
+
+ $res .= $this->footer(false);
+
+ return $res;
+ }
+
+ // }}}
+ // {{{ function toHtml()
+
+ function toHtml($prenom,$nom,$sexe,$body=false)
+ {
+ $res = '<div class="title">'.$this->title().'</div>';
+
+ $head = $this->head();
+ $head = str_replace('<cher>', $sexe ? 'Chère' : 'Cher', $head);
+ $head = str_replace('<prenom>', $prenom, $head);
+ $head = str_replace('<nom>', $nom, $head);
+ $head = enriched_to_text($head,true);
+
+ if($head) {
+ $res .= "<div class='intro'>$head</div>";
+ }
+
+ $i = 1;
+ foreach ($this->_arts as $cid=>$arts) {
+ $res .= "<div class='lnk'><a href='#cat$cid'><strong>$i. {$this->_cats[$cid]}</strong></a>";
+ foreach ($arts as $art) {
+ $res .= "<a href='#art{$art->_aid}'> - ".htmlentities($art->title())."</a>";
+ }
+ $res .= '</div>';
+ $i ++;
+ }
+
+ foreach ($this->_arts as $cid=>$arts) {
+ $res .= "<h1><a id='cat$cid'></a><span>".$this->_cats[$cid].'</span></h1>';
+ foreach($arts as $art) {
+ $res .= $art->toHtml();
+ }
+ }
+
+ $res .= $this->footer(true);
+
+ if ($body) {
+ $res = <<<EOF
+<html>
+ <head>
+ <style type="text/css">
+ <!--
+ div.nl { margin: auto; font-family: "Georgia","times new roman",serif; width: 60ex; text-align: justify; font-size: 10pt; }
+ div.title { margin: 2ex 0ex 2ex 0ex; padding: 1ex; width: 100%; font-size: 140%; text-align: center;
+ font-weight: bold; border-bottom: 3px red solid; border-top: 3px red solid; }
+
+ a[href] { text-decoration: none; }
+ a[href]:hover { text-decoration: underline; }
+
+ div.lnk { margin: 2ex 0ex 2ex 0ex; padding: 0ex 2ex 0ex 2ex; }
+ div.lnk a { display: block; }
+
+ h1 { margin: 6ex 0ex 4ex 0ex; padding: 2px 4ex 2px 0ex; width: 60ex; font-size: 100%;
+ border-bottom: 3px red solid; border-top: 3px red solid; }
+ h2 { width: 100%; margin: 0ex 1ex 0ex 1ex; padding: 2px 0px 2px 0px; font-weight: bold; font-style: italic; font-size: 95%; }
+ h1 span { font-size: 140%; padding: 2px 1ex 2px 1ex; border-bottom: 3px red solid; }
+ h2 span { padding: 2px 4px 2px 4px; border-bottom: 2px yellow solid; }
+
+ div.art { padding: 2ex; margin: 0ex 1ex 2ex 1ex; width: 58ex; border-top: 2px yellow solid; }
+ div.app { padding: 2ex 3ex 0ex 3ex; width: 100%; margin: 0ex; text-align: left; font-size: 95%; }
+ div.intro { padding: 2ex; }
+ div.foot { border-top: 1px #808080 dashed; font-size: 95%; padding: 1ex; color: #808080; background: inherit;
+ text-align: center; width: 100% }
+ -->
+ </style>
+ </head>
+ <body>
+ <div class='nl'>
+ $res
+ </div>
+ </body>
+</html>
+EOF;
+ }
+ return $res;
+ }
+
+ // }}}
+ // {{{ function sendTo()
+
+ function sendTo($prenom, $nom, $login, $sex, $html)
+ {
+ global $globals;
+ require_once('diogenes/diogenes.hermes.inc.php');
+
+ $mailer = new HermesMailer();
+ $mailer->setFrom($globals->newsletter->from);
+ $mailer->setSubject($this->title());
+ $mailer->addTo("\"$prenom $nom\" <$login@{$globals->mail->domain}>");
+ if (!empty($globals->newsletter->replyto)) {
+ $mailer->addHeader('Reply-To',$globals->newsletter->replyto);
+ }
+ if (!empty($globals->newsletter->retpath)) {
+ $mailer->addHeader('Return-Path',$globals->newsletter->retpath);
+ }
+ $mailer->setTxtBody($this->toText($prenom,$nom,$sex));
+ if ($html) {
+ $mailer->setHTMLBody($this->toHtml($prenom,$nom,$sex,true));
+ }
+ $mailer->send();
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class NLArticle
+
+class NLArticle
+{
+ // {{{ properties
+
+ var $_aid;
+ var $_cid;
+ var $_pos;
+ var $_title;
+ var $_body;
+ var $_append;
+
+ // }}}
+ // {{{ constructor
+
+ function NLArticle($title='', $body='', $append='', $aid=-1, $cid=0, $pos=0)
+ {
+ $this->_body = $body;
+ $this->_title = $title;
+ $this->_append = $append;
+ $this->_aid = $aid;
+ $this->_cid = $cid;
+ $this->_pos = $pos;
+ }
+
+ // }}}
+ // {{{ function title()
+
+ function title()
+ { return trim($this->_title); }
+
+ // }}}
+ // {{{ function body()
+
+ function body()
+ { return trim($this->_body); }
+
+ // }}}
+ // {{{ function append()
+
+ function append()
+ { return trim($this->_append); }
+
+ // }}}
+ // {{{ function toText()
+
+ function toText()
+ {
+ $title = '*'.$this->title().'*';
+ $body = enriched_to_text($this->_body,false,true);
+ $app = enriched_to_text($this->_append,false,false,4);
+ return trim("$title\n\n$body\n\n$app")."\n";
+ }
+
+ // }}}
+ // {{{ function toHtml()
+
+ function toHtml()
+ {
+ $title = "<h2><a id='art{$this->_aid}'></a><span>".htmlentities($this->title()).'</span></h2>';
+ $body = enriched_to_text($this->_body,true);
+ $app = enriched_to_text($this->_append,true);
+
+ $art = "$title\n";
+ $art .= "<div class='art'>\n$body\n";
+ if ($app) {
+ $art .= "<div class='app'>$app</div>";
+ }
+ $art .= "</div>\n";
+
+ return $art;
+ }
+
+ // }}}
+ // {{{ function check()
+
+ function check()
+ {
+ $text = enriched_to_text($this->_body);
+ $arr = explode("\n",wordwrap($text,68));
+ $c = 0;
+ foreach ($arr as $line) {
+ if (trim($line)) {
+ $c++;
+ }
+ }
+ return $c<9;
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ Functions
+
+function insert_new_nl()
+{
+ global $globals;
+ $globals->xdb->execute("INSERT INTO newsletter SET bits='new',date=NOW(),titre='to be continued'");
+}
+
+function get_nl_slist()
+{
+ global $globals;
+ $res = $globals->xdb->query("SELECT id,date,titre FROM newsletter ORDER BY date DESC");
+ return $res->fetchAllAssoc();
+}
+
+function get_nl_list()
+{
+ global $globals;
+ $res = $globals->xdb->query("SELECT id,date,titre FROM newsletter WHERE bits!='new' ORDER BY date DESC");
+ return $res->fetchAllAssoc();
+}
+
+function get_nl_state()
+{
+ global $globals;
+ $res = $globals->xdb->query('SELECT 1 FROM newsletter_ins WHERE user_id={?}', Session::getInt('uid'));
+ return $res->fetchOneCell();
+}
+
+function unsubscribe_nl()
+{
+ global $globals;
+ $globals->xdb->execute('DELETE FROM newsletter_ins WHERE user_id={?}', Session::getInt('uid'));
+}
+
+function subscribe_nl($uid=-1)
+{
+ global $globals;
+ $user = ($uid == -1) ? Session::getInt('uid') : $uid;
+ $globals->xdb->execute('REPLACE INTO newsletter_ins (user_id,last)
+ VALUES ({?}, 0)', $user);
+}
+
+function justify($text,$n)
+{
+ $arr = split("\n",wordwrap($text,$n));
+ $arr = array_map('trim',$arr);
+ $res = '';
+ foreach ($arr as $key => $line) {
+ $nxl = isset($arr[$key+1]) ? trim($arr[$key+1]) : '';
+ $nxl_split = preg_split('! +!',$nxl);
+ $nxw_len = count($nxl_split) ? strlen($nxl_split[0]) : 0;
+ $line = trim($line);
+
+ if (strlen($line)+1+$nxw_len < $n) {
+ $res .= "$line\n";
+ continue;
+ }
+
+ if (preg_match('![.:;]$!',$line)) {
+ $res .= "$line\n";
+ continue;
+ }
+
+ $tmp = preg_split('! +!',trim($line));
+ $words = count($tmp);
+ if ($words <= 1) {
+ $res .= "$line\n";
+ continue;
+ }
+
+ $len = array_sum(array_map('strlen',$tmp));
+ $empty = $n - $len;
+ $sw = floatval($empty) / floatval($words-1);
+
+ $cur = 0;
+ $l = '';
+ foreach ($tmp as $word) {
+ $l .= $word;
+ $cur += $sw + strlen($word);
+ $l = str_pad($l,intval($cur+0.5));
+ }
+ $res .= trim($l)."\n";
+ }
+ return trim($res);
+}
+
+function enriched_to_text($input,$html=false,$just=false,$indent=0,$width=68)
+{
+ $text = trim($input);
+ if ($html) {
+ $text = htmlspecialchars($text);
+ $text = str_replace('[b]','<strong>', $text);
+ $text = str_replace('[/b]','</strong>', $text);
+ $text = str_replace('[i]','<em>', $text);
+ $text = str_replace('[/i]','</em>', $text);
+ $text = str_replace('[u]','<span style="text-decoration: underline">', $text);
+ $text = str_replace('[/u]','</span>', $text);
+ $text = preg_replace('!((https?|ftp)://[^\r\n\t ]*)!','<a href="\1">\1</a>', $text);
+ $text = preg_replace('!(([a-zA-Z0-9\-_+.]*@[a-zA-Z0-9\-_+.]*)(?:\?[^\r\n\t ]*)?)!','<a href="mailto:\1">\2</a>', $text);
+ return nl2br($text);
+ } else {
+ $text = preg_replace('!\[\/?b\]!','*',$text);
+ $text = preg_replace('!\[\/?u\]!','_',$text);
+ $text = preg_replace('!\[\/?i\]!','/',$text);
+ $text = preg_replace('!((https?|ftp)://[^\r\n\t ]*)!','[\1]', $text);
+ $text = preg_replace('!(([a-zA-Z0-9\-_+.]*@[a-zA-Z0-9\-_+.]*)(?:\?[^\r\n\t ]*)?)!','[mailto:\1]', $text);
+ $text = $just ? justify($text,$width-$indent) : wordwrap($text,$width-$indent);
+ if($indent) {
+ $ind = str_pad('',$indent);
+ $text = $ind.str_replace("\n","\n$ind",$text);
+ }
+ return $text;
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function set_new_usage($uid, $usage, $alias=false) {
+ global $globals;
+
+ $globals->xdb->execute("UPDATE auth_user_md5 set nom_usage={?} WHERE user_id={?}",$usage ,$uid);
+ $globals->xdb->execute("DELETE FROM aliases WHERE FIND_IN_SET('usage',flags) AND id={?}", $uid);
+ if ($alias && $usage) {
+ $globals->xdb->execute("UPDATE aliases SET flags=flags & 255-1 WHERE id={?}", $uid);
+ $globals->xdb->execute("INSERT INTO aliases VALUES({?}, 'alias', 'usage,bestalias', {?}, null)",
+ $alias, $uid);
+ }
+ $r = $globals->xdb->query("SELECT alias FROM aliases WHERE FIND_IN_SET('bestalias', flags) AND id = {?}", $uid);
+ if ($r->fetchOneCell() == "") {
+ $globals->xdb->execute("UPDATE aliases SET flags = 1 | flags WHERE id = {?} LIMIT 1", $uid);
+ }
+ require_once 'user.func.inc.php';
+ user_reindex($uid);
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+define('WATCH_FICHE', 1);
+define('WATCH_INSCR', 2);
+define('WATCH_DEATH', 3);
+define('WATCH_BIRTH', 4);
+
+// {{{ function inscription_notifs_base
+
+function inscription_notifs_base($uid)
+{
+ global $globals;
+ $globals->xdb->execute('REPLACE INTO watch_sub (uid,cid) SELECT {?},id FROM watch_cat', $uid);
+}
+
+// }}}
+// {{{ function register_watch_op
+
+function register_watch_op($uid, $cid, $date='', $info='')
+{
+ global $globals;
+ if (empty($date)) {
+ $date = date('Y-m-d');
+ };
+ $globals->xdb->execute('REPLACE INTO watch_ops (uid,cid,known,date,info) VALUES({?},{?},NOW(),{?},{?})',
+ $uid, $cid, $date, $info);
+ if($cid == WATCH_FICHE) {
+ $globals->xdb->execute('UPDATE auth_user_md5 SET DATE=NOW() WHERE user_id={?}', $uid);
+ } elseif($cid == WATCH_INSCR) {
+ $globals->xdb->execute('REPLACE INTO contacts (uid,contact)
+ SELECT uid,ni_id
+ FROM watch_nonins
+ WHERE ni_id={?}', $uid);
+ $globals->xdb->execute('DELETE FROM watch_nonins WHERE ni_id={?}', $uid);
+ }
+}
+
+// }}}
+// {{{ function _select_notifs_base
+
+function _select_notifs_base($table, $mail, $where)
+{
+ $cases = Array(
+ 'contacts' => Array('wfield' => 'contact', 'ufield' => 'user_id', 'need_contact' => false,
+ 'freq_sql' => '',
+ 'contact_sql' => '1'
+ ),
+ 'watch_promo' => Array('wfield' => 'promo', 'ufield' => 'promo', 'need_contact' => true,
+ 'freq_sql' => ' AND ( wc.type = "basic" OR wc.type="near" AND (u.promo <= v.promo_sortie-2 AND u.promo_sortie >= v.promo+2) )',
+ 'contact_sql' => 'NOT (c.contact IS NULL)'
+ ),
+ 'watch_nonins' => Array('wfield' => 'ni_id', 'ufield' => 'user_id', 'need_contact' => false,
+ 'freq_sql' => '',
+ 'contact_sql' => '0'
+ )
+ );
+
+ $our = $cases[$table];
+ $sql = "
+ (
+ SELECT u.promo, u.prenom, IF(u.nom_usage='',u.nom,u.nom_usage) AS nom,
+ a.alias AS bestalias,
+ wo.*,
+ {$our['contact_sql']} AS contact,
+ (u.perms IN('admin','user')) AS inscrit";
+ if ($mail) {
+ $sql.=",
+ w.uid AS aid, v.prenom AS aprenom, IF(v.nom_usage='',v.nom,v.nom_usage) AS anom,
+ b.alias AS abestalias, (v.flags='femme') AS sexe, q.core_mail_fmt AS mail_fmt";
+ }
+
+ $sql .= "
+ FROM $table AS w
+ INNER JOIN auth_user_md5 AS u ON(u.{$our['ufield']} = w.{$our['wfield']})
+ INNER JOIN auth_user_quick AS q ON(q.user_id = w.uid)
+ INNER JOIN auth_user_md5 AS v ON(v.user_id = q.user_id)";
+ if ($mail) {
+ $sql .="
+ INNER JOIN aliases AS b ON(b.id = q.user_id AND FIND_IN_SET('bestalias', b.flags))";
+ }
+ if ($our['need_contact']) {
+ $sql .="
+ LEFT JOIN contacts AS c ON(c.uid = w.uid AND c.contact = u.user_id)";
+ }
+
+ $sql .="
+ INNER JOIN watch_ops AS wo ON(wo.uid = u.user_id AND ".($mail ? 'wo.known > q.watch_last' : '( wo.known > {?} OR wo.date=NOW() )').")
+ INNER JOIN watch_sub AS ws ON(ws.cid = wo.cid AND ws.uid = w.uid)
+ INNER JOIN watch_cat AS wc ON(wc.id = wo.cid{$our['freq_sql']})
+ LEFT JOIN aliases AS a ON(a.id = u.user_id AND FIND_IN_SET('bestalias', a.flags))
+ WHERE $where
+ )";
+
+ return $sql;
+}
+
+// }}}
+// {{{ function select_notifs
+
+function select_notifs($mail, $uid=null, $last=null, $iterator=true)
+{
+ global $globals;
+ $where = $mail ? 'q.watch_flags=3' : 'w.uid = {?}';
+ $sql = _select_notifs_base('contacts', $mail, $where.($mail?'':' AND (q.watch_flags=1 OR q.watch_flags=3)')) . " UNION DISTINCT ";
+ $sql .= _select_notifs_base('watch_promo', $mail, $where) . " UNION DISTINCT ";
+ $sql .= _select_notifs_base('watch_nonins', $mail, $where);
+
+ if ($iterator) {
+ return $globals->xdb->iterator($sql . ' ORDER BY cid, promo, date DESC, nom', $last, $uid, $last, $uid, $last, $uid);
+ } else {
+ return $globals->xdb->query($sql, $last, $uid, $last, $uid, $last, $uid);
+ }
+}
+
+// }}}
+// {{{ function getNbNotifs
+
+function getNbNotifs() {
+ global $globals;
+ if (!Session::has('uid')) {
+ return 0;
+ }
+ $uid = Session::getInt('uid', -1);
+ $watchlast = Session::get('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();
+ $url = smarty_modifier_url('carnet/panel.php');
+ if($n==0) { return; }
+ if($n==1) { return "<a href='$url'>1 évènement !</a>"; }
+ return "<a href='$url'>$n évènements !</a>";
+}
+
+// }}}
+// {{{ class AllNotifs
+
+class AllNotifs {
+ var $_cats = Array();
+ var $_data = Array();
+
+ function AllNotifs() {
+ global $globals;
+
+ $res = $globals->xdb->iterator("SELECT * FROM watch_cat");
+ while($tmp = $res->next()) {
+ $this->_cats[$tmp['id']] = $tmp;
+ }
+
+ // recupère tous les watchers, avec détails des watchers, a partir du watch_last de chacun, seulement ceux qui sont surveillés, ordonnés
+ $res = select_notifs(true);
+
+ while($tmp = $res->next()) {
+ $aid = $tmp['aid'];
+ if (empty($this->_data[$aid])) {
+ $this->_data[$aid] = Array("prenom" => $tmp['aprenom'], 'nom' => $tmp['anom'],
+ 'bestalias'=>$tmp['abestalias'], 'sexe' => $tmp['sexe'], 'mail_fmt' => $tmp['mail_fmt']);
+ }
+ unset($tmp['aprenom'], $tmp['anom'], $tmp['abestalias'], $tmp['aid'], $tmp['sexe'], $tmp['mail_fmt']);
+ $this->_data[$aid]['data'][$tmp['cid']][] = $tmp;
+ }
+ }
+}
+
+// }}}
+// {{{ class Notifs
+
+class Notifs {
+ var $_uid;
+ var $_cats = Array();
+ var $_data = Array();
+
+ function Notifs($uid, $up=false) {
+ global $globals;
+ $this->_uid = $uid;
+
+ $res = $globals->xdb->iterator("SELECT * FROM watch_cat");
+ while($tmp = $res->next()) {
+ $this->_cats[$tmp['id']] = $tmp;
+ }
+
+ $lastweek = date('YmdHis',mktime() - 7*24*60*60);
+
+ // recupere les notifs du watcher $uid, sans detail sur le watcher, depuis la semaine dernière, meme ceux sans surveillance, ordonnés
+ $res = select_notifs(false, $uid, $lastweek);
+ while($tmp = $res->next()) {
+ $this->_data[$tmp['cid']][$tmp['promo']][] = $tmp;
+ }
+
+ if($up) {
+ $globals->xdb->execute('UPDATE auth_user_quick SET watch_last=NOW() WHERE user_id={?}', $uid);
+ }
+ }
+}
+
+// }}}
+// {{{ class Watch
+
+class Watch {
+ var $_uid;
+ var $_promos;
+ var $_nonins;
+ var $_cats = Array();
+ var $_subs;
+ var $watch_contacts;
+ var $watch_mail;
+
+ function Watch($uid) {
+ global $globals;
+ $this->_uid = $uid;
+ $this->_promos = new PromoNotifs($uid);
+ $this->_nonins = new NoninsNotifs($uid);
+ $this->_subs = new WatchSub($uid);
+ $res = $globals->xdb->query("SELECT FIND_IN_SET('contacts',watch_flags),FIND_IN_SET('mail',watch_flags)
+ FROM auth_user_quick
+ WHERE user_id={?}", $uid);
+ list($this->watch_contacts,$this->watch_mail) = $res->fetchOneRow();
+
+ $res = $globals->xdb->iterator("SELECT * FROM watch_cat");
+ while($tmp = $res->next()) {
+ $this->_cats[$tmp['id']] = $tmp;
+ }
+ }
+
+ function saveFlags() {
+ global $globals;
+ $flags = "";
+ if($this->watch_contacts) $flags = "contacts";
+ if($this->watch_mail) $flags .= ($flags ? ',' : '')."mail";
+ $globals->xdb->execute('UPDATE auth_user_quick SET watch_flags={?} WHERE user_id={?}', $flags, $this->_uid);
+
+ }
+
+ function cats() {
+ return $this->_cats;
+ }
+
+ function subs($i) {
+ return $this->_subs->_data[$i];
+ }
+
+ function promos() {
+ return $this->_promos->toRanges();
+ }
+
+ function nonins() {
+ return $this->_nonins->_data;
+ }
+}
+
+// }}}
+// {{{ class WatchSub
+
+class WatchSub {
+ var $_uid;
+ var $_data = Array();
+
+ function WatchSub($uid) {
+ $this->_uid = $uid;
+ global $globals;
+ $res = $globals->xdb->iterRow('SELECT cid FROM watch_sub WHERE uid={?}', $uid);
+ while(list($c) = $res->next()) {
+ $this->_data[$c] = $c;
+ }
+ }
+
+ function update($ind) {
+ global $globals;
+ $this->_data = Array();
+ $globals->xdb->execute('DELETE FROM watch_sub WHERE uid={?}', $this->_uid);
+ foreach(Env::getMixed($ind) as $key=>$val) {
+ $globals->xdb->query('INSERT INTO watch_sub SELECT {?},id FROM watch_cat WHERE id={?}', $this->_uid, $key);
+ if(mysql_affected_rows()) {
+ $this->_data[$key] = $key;
+ }
+ }
+ }
+}
+
+// }}}
+// {{{ class PromoNotifs
+
+class PromoNotifs {
+ var $_uid;
+ var $_data = Array();
+
+ function PromoNotifs($uid) {
+ $this->_uid = $uid;
+ global $globals;
+ $res = $globals->xdb->iterRow('SELECT promo FROM watch_promo WHERE uid={?} ORDER BY promo', $uid);
+ while (list($p) = $res->next()) {
+ $this->_data[intval($p)] = intval($p);
+ }
+ }
+
+ function add($p) {
+ global $globals;
+ $promo = intval($p);
+ $globals->xdb->execute('REPLACE INTO watch_promo (uid,promo) VALUES({?},{?})', $this->_uid, $promo);
+ $this->_data[$promo] = $promo;
+ asort($this->_data);
+ }
+
+ function del($p) {
+ global $globals;
+ $promo = intval($p);
+ $globals->xdb->execute('DELETE FROM watch_promo WHERE uid={?} AND promo={?}', $this->_uid, $promo);
+ unset($this->_data[$promo]);
+ }
+
+ function addRange($_p1,$_p2) {
+ global $globals;
+ $p1 = intval($_p1);
+ $p2 = intval($_p2);
+ $values = Array();
+ for($i = min($p1,$p2); $i<=max($p1,$p2); $i++) {
+ $values[] = "('{$this->_uid}',$i)";
+ $this->_data[$i] = $i;
+ }
+ $globals->xdb->execute('REPLACE INTO watch_promo (uid,promo) VALUES '.join(',',$values));
+ asort($this->_data);
+ }
+
+ function delRange($_p1,$_p2) {
+ global $globals;
+ $p1 = intval($_p1);
+ $p2 = intval($_p2);
+ $where = Array();
+ for($i = min($p1,$p2); $i<=max($p1,$p2); $i++) {
+ $where[] = "promo=$i";
+ unset($this->_data[$i]);
+ }
+ $globals->xdb->execute('DELETE FROM watch_promo WHERE uid={?} AND ('.join(' OR ',$where).')', $this->_uid);
+ }
+
+ function toRanges() {
+ $ranges = Array();
+ $I = Array();
+ foreach($this->_data as $promo) {
+ if(!isset($I[0])) {
+ $I = Array($promo,$promo);
+ }
+ elseif($I[1]+1 == $promo) {
+ $I[1] ++;
+ }
+ else {
+ $ranges[] = $I;
+ $I = Array($promo,$promo);
+ }
+ }
+ if(isset($I[0])) $ranges[] = $I;
+ return $ranges;
+ }
+}
+
+// }}}
+// {{{ class NoninsNotifs
+
+class NoninsNotifs {
+ var $_uid;
+ var $_data = Array();
+
+ function NoninsNotifs($uid) {
+ global $globals;
+ $this->_uid = $uid;
+ $res = $globals->xdb->iterator("SELECT u.prenom,IF(u.nom_usage='',u.nom,u.nom_usage) AS nom, u.promo, u.user_id
+ FROM watch_nonins AS w
+ INNER JOIN auth_user_md5 AS u ON (u.user_id = w.ni_id)
+ WHERE w.uid = {?}
+ ORDER BY promo,nom", $uid);
+ while($tmp = $res->next()) {
+ $this->_data[$tmp['user_id']] = $tmp;
+ }
+ }
+
+ function del($p) {
+ global $globals;
+ unset($this->_data["$p"]);
+ $globals->xdb->execute('DELETE FROM watch_nonins WHERE uid={?} AND ni_id={?}', $this->_uid, $p);
+ }
+
+ function add($p) {
+ global $globals;
+ $globals->xdb->execute('INSERT INTO watch_nonins (uid,ni_id) VALUES({?},{?})', $this->_uid, $p);
+ $res = $globals->xdb->query('SELECT prenom,IF(nom_usage="",nom,nom_usage) AS nom,promo,user_id
+ FROM auth_user_md5
+ WHERE user_id={?}', $p);
+ $this->_data["$p"] = $res->fetchOneAssoc();
+ }
+}
+
+// }}}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function microtime_float()
+{
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+}
+$TIME_BEGIN = microtime_float();
+
+// {{{ defines
+
+$i=0;
+define("AUTH_PUBLIC", $i++);
+define("AUTH_COOKIE", $i++);
+define("AUTH_MDP", $i++);
+
+define("PERMS_EXT", "ext");
+define("PERMS_USER", "user");
+define("PERMS_ADMIN", "admin");
+
+define('SKINNED', 0);
+define('NO_SKIN', 1);
+
+require_once('platal/env.inc.php');
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ **************************************************************************/
+
+// {{{ class XOrgDB
+
+class XOrgDB
+{
+ // {{{ constructor
+
+ function XOrgDB()
+ {
+ }
+
+ // }}}
+ // {{{ function _prepare
+
+ function _prepare($args) {
+ $query = array_map(Array($this, '_db_escape'), $args);
+ $query[0] = str_replace('{?}', '%s', str_replace('%', '%%', $args[0]));
+ return call_user_func_array('sprintf', $query);
+ }
+
+ // }}}
+ // {{{ function query
+
+ function &query()
+ {
+ return new XOrgDBResult($this->_prepare(func_get_args()));
+ }
+
+ // }}}
+ // {{{ function execute()
+
+ function execute() {
+ global $globals;
+ return $globals->db->query($this->_prepare(func_get_args()));
+ }
+
+ // }}}
+ // {{{ function iterator()
+
+ function &iterator()
+ {
+ return new XOrgDBIterator($this->_prepare(func_get_args()));
+ }
+
+ // }}}
+ // {{{ function iterRow()
+
+ function &iterRow()
+ {
+ return new XOrgDBIterator($this->_prepare(func_get_args()), MYSQL_NUM);
+ }
+
+ // }}}
+ // {{{ function _db_escape
+
+ function _db_escape($var)
+ {
+ switch (gettype($var)) {
+ case 'boolean':
+ return $var ? 1 : 0;
+
+ case 'integer':
+ case 'double':
+ case 'float':
+ return $var;
+
+ case 'string':
+ return "'".addslashes($var)."'";
+
+ case 'NULL':
+ return 'NULL';
+
+ case 'object':
+ case 'array':
+ return "'".addslashes(serialize($var))."'";
+
+ default:
+ die(var_export($var, true).' is not a valid for a database entry');
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XOrgDBResult
+
+class XOrgDBResult
+{
+ // {{{ properties
+
+ var $_res;
+
+ // }}}
+ // {{{ constructor
+
+ function XOrgDBResult($query)
+ {
+ global $globals;
+ if (strpos($query, 'SQL_CALC_FOUND_ROWS') === false) {
+ $this->_res = $globals->db->query($query);
+ } else {
+ $this->_res = mysql_query($query);
+ }
+ }
+
+ // }}}
+ // {{{ destructor
+
+ function free()
+ {
+ mysql_free_result($this->_res);
+ unset($this);
+ }
+
+ // }}}
+ // {{{ function fetchRow
+
+ function _fetchRow()
+ {
+ return mysql_fetch_row($this->_res);
+ }
+
+ // }}}
+ // {{{ function fetchAssoc
+
+ function _fetchAssoc()
+ {
+ return mysql_fetch_assoc($this->_res);
+ }
+
+ // }}}
+ // {{{ function fetchAllRow
+
+ function fetchAllRow()
+ {
+ $result = Array();
+ while ($result[] = mysql_fetch_row($this->_res)) { }
+ array_pop($result);
+ $this->free();
+ return $result;
+ }
+
+ // }}}
+ // {{{ function fetchAllAssoc
+
+ function fetchAllAssoc()
+ {
+ $result = Array();
+ while ($result[] = mysql_fetch_assoc($this->_res)) { }
+ array_pop($result);
+ $this->free();
+ return $result;
+ }
+
+ // }}}
+ // {{{ function fetchOneAssoc()
+
+ function fetchOneAssoc()
+ {
+ $tmp = $this->_fetchAssoc();
+ $this->free();
+ return $tmp;
+ }
+
+ // }}}
+ // {{{ function fetchOneRow()
+
+ function fetchOneRow()
+ {
+ $tmp = $this->_fetchRow();
+ $this->free();
+ return $tmp;
+ }
+
+ // }}}
+ // {{{ function fetchOneCell()
+
+ function fetchOneCell()
+ {
+ $tmp = $this->_fetchRow();
+ $this->free();
+ return $tmp[0];
+ }
+
+ // }}}
+ // {{{ function fetchColumn()
+
+ function fetchColumn($key = 0)
+ {
+ $res = Array();
+ if (is_numeric($key)) {
+ while($tmp = $this->_fetchRow()) {
+ $res[] = $tmp[$key];
+ }
+ } else {
+ while($tmp = $this->_fetchAssoc()) {
+ $res[] = $tmp[$key];
+ }
+ }
+ $this->free();
+ return $res;
+ }
+
+ // }}}
+ // {{{ function numRows
+
+ function numRows()
+ {
+ return mysql_num_rows($this->_res);
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XOrgDBIterator
+
+class XOrgDBIterator extends XOrgIterator
+{
+ // {{{ properties
+
+ var $_result;
+ var $_pos;
+ var $_total;
+ var $_mode = MYSQL_ASSOC;
+
+ // }}}
+ // {{{ constructor
+
+ function XOrgDBIterator($query, $mode = MYSQL_ASSOC)
+ {
+ $this->_result =& new XOrgDBResult($query);
+ $this->_pos = 0;
+ $this->_total = $this->_result->numRows();
+ $this->_mode = $mode;
+ }
+
+ // }}}
+ // {{{ function next ()
+
+ function next()
+ {
+ $this->_pos ++;
+ if ($this->_pos > $this->_total) {
+ $this->_result->free();
+ unset($this);
+ return null;
+ }
+ return $this->_mode != MYSQL_ASSOC ? $this->_result->_fetchRow() : $this->_result->_fetchAssoc();
+ }
+
+ // }}}
+ // {{{ function first
+
+ function first()
+ {
+ return $this->_pos == 1;
+ }
+
+ // }}}
+ // {{{ function last
+
+ function last()
+ {
+ return $this->_last == $this->_total;
+ }
+
+ // }}}
+ // {{{ function total()
+
+ function total()
+ {
+ return $this->_total;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class Env
+
+class Env
+{
+ // {{{ function _get
+
+ function _get($key, $default)
+ {
+ return isset($_REQUEST[$key]) ? $_REQUEST[$key] : $default;
+ }
+
+ // }}}
+ // {{{ function has
+
+ function has($key)
+ {
+ return isset($_REQUEST[$key]);
+ }
+
+ // }}}
+ // {{{ function kill
+
+ function kill($key)
+ {
+ unset($_REQUEST[$key]);
+ }
+
+ // }}}
+ // {{{ function get
+
+ function get($key, $default='')
+ {
+ return (string)Env::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function &getMixed
+
+ function &getMixed($key, $default=null)
+ {
+ return Env::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getBool
+
+ function getBool($key, $default=false)
+ {
+ return (bool)Env::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getInt
+
+ function getInt($key, $default=0)
+ {
+ $i = Env::_get($key, $default);
+ return preg_match(',^[0-9]+$,', $i) ? intval($i) : $default;
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Post
+
+class Post
+{
+ // {{{ function _get
+
+ function _get($key, $default)
+ {
+ return isset($_POST[$key]) ? $_POST[$key] : $default;
+ }
+
+ // }}}
+ // {{{ function has
+
+ function has($key)
+ {
+ return isset($_POST[$key]);
+ }
+
+ // }}}
+ // {{{ function kill
+
+ function kill($key)
+ {
+ unset($_POST[$key]);
+ }
+
+ // }}}
+ // {{{ function get
+
+ function get($key, $default='')
+ {
+ return (string)Post::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function &getMixed
+
+ function &getMixed($key, $default=null)
+ {
+ return Post::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getBool
+
+ function getBool($key, $default=false)
+ {
+ return (bool)Post::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getInt
+
+ function getInt($key, $default=0)
+ {
+ $i = Post::_get($key, $default);
+ return preg_match(',^[0-9]+$,', $i) ? intval($i) : $default;
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Get
+
+class Get
+{
+ // {{{ function _get
+
+ function _get($key, $default)
+ {
+ return isset($_GET[$key]) ? $_GET[$key] : $default;
+ }
+
+ // }}}
+ // {{{ function has
+
+ function has($key)
+ {
+ return isset($_GET[$key]);
+ }
+
+ // }}}
+ // {{{ function kill
+
+ function kill($key)
+ {
+ unset($_GET[$key]);
+ }
+
+ // }}}
+ // {{{ function get
+
+ function get($key, $default='')
+ {
+ return (string)Get::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function &getMixed
+
+ function &getMixed($key, $default=null)
+ {
+ return Get::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getBool
+
+ function getBool($key, $default=false)
+ {
+ return (bool)Get::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getInt
+
+ function getInt($key, $default=0)
+ {
+ $i = Get::_get($key, $default);
+ return preg_match(',^[0-9]+$,', $i) ? intval($i) : $default;
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Session
+
+class Session
+{
+ // {{{ function _get
+
+ function _get($key, $default)
+ {
+ return isset($_SESSION[$key]) ? $_SESSION[$key] : $default;
+ }
+
+ // }}}
+ // {{{ function has
+
+ function has($key)
+ {
+ return isset($_SESSION[$key]);
+ }
+
+ // }}}
+ // {{{ function kill
+
+ function kill($key)
+ {
+ unset($_SESSION[$key]);
+ }
+
+ // }}}
+ // {{{ function get
+
+ function get($key, $default='')
+ {
+ return (string)Session::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function &getMixed
+
+ function &getMixed($key, $default=null)
+ {
+ return Session::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getBool
+
+ function getBool($key, $default=false)
+ {
+ return (bool)Session::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getInt
+
+ function getInt($key, $default=0)
+ {
+ $i = Session::_get($key, $default);
+ return preg_match(',^[0-9]+$,', $i) ? intval($i) : $default;
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Cookie
+
+class Cookie
+{
+ // {{{ function _get
+
+ function _get($key, $default)
+ {
+ return isset($_COOKIE[$key]) ? $_COOKIE[$key] : $default;
+ }
+
+ // }}}
+ // {{{ function has
+
+ function has($key)
+ {
+ return isset($_COOKIE[$key]);
+ }
+
+ // }}}
+ // {{{ function kill
+
+ function kill($key)
+ {
+ unset($_COOKIE[$key]);
+ }
+
+ // }}}
+ // {{{ function get
+
+ function get($key, $default='')
+ {
+ return (string)Cookie::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function &getMixed
+
+ function &getMixed($key, $default=null)
+ {
+ return Cookie::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getBool
+
+ function getBool($key, $default=false)
+ {
+ return (bool)Cookie::_get($key, $default);
+ }
+
+ // }}}
+ // {{{ function getInt
+
+ function getInt($key, $default=0)
+ {
+ $i = Cookie::_get($key, $default);
+ return preg_match(',^[0-9]+$,', $i) ? intval($i) : $default;
+ }
+
+ // }}}
+}
+
+// }}}
+
+function fix_gpc_magic(&$item, $key) {
+ if (is_array($item)) {
+ array_walk($item, 'fix_gpc_magic');
+ } else {
+ $item = stripslashes($item);
+ }
+}
+
+function unfix_gpc_magic(&$item, $key) {
+ if (is_array($item)) {
+ array_walk($item, 'fix_gpc_magic');
+ } else {
+ $item = addslashes($item);
+ }
+}
+
+if (ini_get("magic_quotes_gpc")) {
+ array_walk($_GET, 'fix_gpc_magic');
+ array_walk($_POST, 'fix_gpc_magic');
+ array_walk($_COOKIE, 'fix_gpc_magic');
+ array_walk($_REQUEST, 'fix_gpc_magic');
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class XOrgErrors
+
+class XOrgErrors
+{
+ // {{{ properties
+
+ var $errs = Array();
+ var $failure = false;
+
+ // }}}
+ // {{{ constructor
+
+ function XOrgErrors()
+ { }
+
+ // }}}
+ // {{{ function trig
+
+ function trig($text) {
+ $this->errs[] = $text;
+ }
+
+ // }}}
+ // {{{
+
+ function fail($text) {
+ $this->trig($text);
+ $this->failure = true;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('diogenes/diogenes.core.globals.inc.php');
+require_once('diogenes/diogenes.database.inc.php');
+require_once('platal/iterator.inc.php');
+require_once('platal/database.inc.php');
+
+// {{{ class CoreConfig
+
+class CoreConfig
+{
+ var $locale = 'fr_FR';
+}
+
+// }}}
+
+// {{{ class XorgGlobals
+
+class PlatalGlobals extends DiogenesCoreGlobals
+{
+ var $page = 'XorgPage';
+ var $session;
+ var $menu;
+ var $hook;
+
+ /** The x.org version */
+ var $version = '0.9.7';
+ var $debug = 0;
+
+ /** db params */
+ var $dbdb = 'x4dat';
+ var $dbhost = 'localhost';
+ var $dbuser = 'x4dat';
+ var $dbpwd = 'x4dat';
+
+ var $table_auth = 'auth_user_md5';
+ var $table_log_actions = 'logger.actions';
+ var $table_log_sessions = 'logger.sessions';
+ var $table_log_events = 'logger.events';
+
+ /** logger */
+ var $tauth = array('native'=>'auth_user_md5');
+ var $tlabel = array('native'=>'X.Org');
+
+ /** paths */
+ var $baseurl = 'http://localhost/xorg';
+ var $spoolroot = '/var/spool/xorg';
+ var $root = null;
+
+ function PlatalGlobals($sess)
+ {
+ $this->session = $sess;
+ }
+
+ function read_config()
+ {
+ $array = parse_ini_file($this->root.'/configs/platal.conf', true);
+ if (!is_array($array)) {
+ return;
+ }
+
+ foreach ($array as $cat=>$conf) {
+ $c = strtolower($cat);
+ foreach ($conf as $key=>$val) {
+ if ($c == 'core' && isset($this->$key)) {
+ $this->$key=$val;
+ } else {
+ $this->$c->$key = $val;
+ }
+ }
+ }
+ }
+
+ function setlocale()
+ {
+ global $globals;
+ setlocale(LC_MESSAGES, $globals->core->locale);
+ setlocale(LC_TIME, $globals->core->locale);
+ setlocale(LC_CTYPE, $globals->core->locale);
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('diogenes/diogenes.core.globals.inc.php');
+require_once('diogenes/diogenes.database.inc.php');
+require_once('platal/iterator.inc.php');
+require_once('platal/database.inc.php');
+
+// {{{ class CoreConfig
+
+class CoreConfig
+{
+ var $locale = 'fr_FR';
+}
+
+// }}}
+
+// {{{ class XorgGlobals
+
+class PlatalGlobals extends DiogenesCoreGlobals
+{
+ var $page = 'XorgPage';
+ var $session;
+ var $menu;
+ var $hook;
+
+ /** The x.org version */
+ var $version = '@VERSION@';
+ var $debug = 0;
+
+ /** db params */
+ var $dbdb = 'x4dat';
+ var $dbhost = 'localhost';
+ var $dbuser = 'x4dat';
+ var $dbpwd = 'x4dat';
+
+ var $table_auth = 'auth_user_md5';
+ var $table_log_actions = 'logger.actions';
+ var $table_log_sessions = 'logger.sessions';
+ var $table_log_events = 'logger.events';
+
+ /** logger */
+ var $tauth = array('native'=>'auth_user_md5');
+ var $tlabel = array('native'=>'X.Org');
+
+ /** paths */
+ var $baseurl = 'http://localhost/xorg';
+ var $spoolroot = '/var/spool/xorg';
+ var $root = null;
+
+ function PlatalGlobals($sess)
+ {
+ $this->session = $sess;
+ }
+
+ function read_config()
+ {
+ $array = parse_ini_file($this->root.'/configs/platal.conf', true);
+ if (!is_array($array)) {
+ return;
+ }
+
+ foreach ($array as $cat=>$conf) {
+ $c = strtolower($cat);
+ foreach ($conf as $key=>$val) {
+ if ($c == 'core' && isset($this->$key)) {
+ $this->$key=$val;
+ } else {
+ $this->$c->$key = $val;
+ }
+ }
+ }
+ }
+
+ function setlocale()
+ {
+ global $globals;
+ setlocale(LC_MESSAGES, $globals->core->locale);
+ setlocale(LC_TIME, $globals->core->locale);
+ setlocale(LC_CTYPE, $globals->core->locale);
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ **************************************************************************/
+
+// {{{ class XOrgIterator
+
+class XOrgIterator
+{
+ // {{{ function next
+
+ function &next()
+ {
+ return null;
+ }
+
+ // }}}
+ // {{{ function first
+
+ function first()
+ {
+ return false;
+ }
+
+ // }}}
+ // {{{ function last
+
+ function last()
+ {
+ return false;
+ }
+
+ // }}}
+ // {{{ function total
+
+ function total()
+ {
+ return 0;
+ }
+
+ // }}}
+
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('diogenes/diogenes.core.page.inc.php');
+require_once('platal/errors.inc.php');
+require_once('platal/smarty.plugins.inc.php');
+
+// {{{ class PlatalPage
+
+class PlatalPage extends DiogenesCorePage
+{
+ // {{{ properties
+
+ var $_page_type;
+ var $_tpl;
+ var $_errors;
+
+ // defaults
+ var $caching = false;
+ var $config_overwrite = false;
+ var $use_sub_dirs = false;
+
+ // }}}
+ // {{{ function PlatalPage()
+
+ function PlatalPage($tpl, $type=SKINNED)
+ {
+ global $globals;
+
+ $this->template_dir = $globals->spoolroot."/templates/";
+ $this->compile_dir = $globals->spoolroot."/templates_c/";
+ array_unshift($this->plugins_dir, $globals->spoolroot."/plugins/");
+ $this->config_dir = $globals->spoolroot."/configs/";
+
+ $this->compile_check = !empty($globals->debug);
+
+ if ($type == SKINNED) {
+ $this->register_modifier('escape_html', 'escape_html');
+ $this->default_modifiers[] = '@escape_html';
+ }
+
+ $this->_page_type = $type;
+ $this->_tpl = $tpl;
+ $this->_errors = new XOrgErrors;
+
+ $this->DiogenesCorePage();
+ $this->register_prefilter('at_to_globals');
+ $this->register_prefilter('trimwhitespace');
+ $this->addJsLink('javascript/xorg.js');
+
+ $this->doAuth();
+ }
+
+ // }}}
+ // {{{ function changeTpl()
+
+ function changeTpl($tpl, $type=SKINNED)
+ {
+ $this->_tpl = $tpl;
+ $this->_page_type = $type;
+ if ($type == SKINNED) {
+ $this->register_modifier('escape_html', 'escape_html');
+ $this->default_modifiers = Array('@escape_html');
+ }
+
+ $this->_page_type = $type;
+ $this->assign('xorg_tpl', $tpl);
+ }
+
+ // }}}
+ // {{{ function _run()
+
+ function _run($skin)
+ {
+ global $globals, $TIME_BEGIN;
+ $this->assign("xorg_error", $this->_errors);
+
+ if ($this->_page_type == NO_SKIN) {
+ $this->display($this->_tpl);
+ exit;
+ }
+
+ if ($globals->debug) {
+
+ if ($globals->debug & 1) {
+ $this->assign('db_trace', $globals->db->trace_format($this, 'database-debug.tpl'));
+ }
+
+ $this->assign('validate', urlencode($globals->baseurl.'/valid.html'));
+ $result = $this->fetch($skin);
+ $ttime = sprintf('Temps total: %.02fs<br />', microtime_float() - $TIME_BEGIN);
+ $replc = "<span class='erreur'>VALIDATION HTML INACTIVE</span><br />";
+
+ if ($globals->debug & 2) {
+
+ $fd = fopen($this->compile_dir."/valid.html","w");
+ fwrite($fd, $result);
+ fclose($fd);
+
+ exec($globals->spoolroot."/bin/devel/xhtml.validate.pl ".$this->compile_dir."/valid.html", $val);
+ foreach ($val as $h) {
+ if (preg_match("/^X-W3C-Validator-Errors: (\d+)$/", $h, $m)) {
+ $replc = '<span style="color: #080;">HTML OK</span><br />';
+ if ($m[1]) {
+ $replc = "<span class='erreur'><a href='http://validator.w3.org/check?uri={$globals->baseurl}"
+ ."/valid.html&ss=1#result'>{$m[1]} ERREUR(S) !!!</a></span><br />";
+ }
+ break;
+ }
+ }
+ }
+
+ echo str_replace("@HOOK@", $ttime.$replc, $result);
+ exit;
+ }
+
+ $this->display($skin);
+ exit;
+ }
+
+ // }}}
+ // {{{ function run()
+
+ function run()
+ {
+ die ("implement me");
+ }
+
+ // }}}
+ // {{{ function nb_errs()
+
+ function nb_errs()
+ {
+ return count($this->_errors->errs);
+ }
+
+ // }}}
+ // {{{ function trig()
+
+ function trig($msg)
+ {
+ $this->_errors->trig($msg);
+ }
+
+ // }}}
+ // {{{ function trig()
+
+ function trig_run($msg)
+ {
+ $this->_errors->trig($msg);
+ $this->run();
+ }
+
+ // }}}
+ // {{{ function fail()
+
+ function fail($msg)
+ {
+ $this->_errors->fail($msg);
+ }
+
+ // }}}
+ // {{{ function kill()
+
+ function kill($msg)
+ {
+ $this->fail($msg);
+ $this->run();
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ function doAuth() { }
+
+ // }}}
+ // {{{ function loadModule()
+
+ function loadModule($modname)
+ {
+ require_once("$modname.inc.php");
+ }
+
+ // }}}
+ // {{{ function addJsLink
+
+ function addJsLink($path)
+ {
+ $this->append('xorg_js', $path);
+ }
+
+ // }}}
+ // {{{ function addCssLink
+
+ function addCssLink($path)
+ {
+ $this->append('xorg_css', $path);
+ }
+
+ // }}}
+ // {{{ function gassign
+
+ function gassign($varname)
+ {
+ global $$varname;
+ $this->assign($varname, $$varname);
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('diogenes/diogenes.core.session.inc.php');
+require_once('diogenes/diogenes.misc.inc.php');
+
+// {{{ function check_perms()
+
+/** verifie si un utilisateur a les droits pour voir une page
+ ** si ce n'est pas le cas, on affiche une erreur
+ * @return void
+ */
+function check_perms()
+{
+ global $page;
+ if (!has_perms()) {
+ if ($_SESSION['log']) {
+ require_once('diogenes/diogenes.core.logger.inc.php');
+ $_SESSION['log']->log("noperms",$_SERVER['PHP_SELF']);
+ }
+ $page->kill("Tu n'as pas les permissions nécessaires pour accéder à cette page.");
+ }
+}
+
+// }}}
+// {{{ function has_perms()
+
+/** verifie si un utilisateur a les droits pour voir une page
+ ** soit parce qu'il est admin, soit il est dans une liste
+ ** supplementaire de personnes utilisées
+ * @return BOOL
+ */
+
+function has_perms()
+{
+ return logged() && Session::get('perms')==PERMS_ADMIN;
+}
+
+// }}}
+// {{{ function logged()
+
+/** renvoie true si la session existe et qu'on est loggué correctement
+ * false sinon
+ * @return bool vrai si loggué
+ * @see header2.inc.php
+ */
+function logged ()
+{
+ return Session::get('auth', AUTH_PUBLIC) >= AUTH_COOKIE;
+}
+
+// }}}
+// {{{ function identified()
+
+/** renvoie true si la session existe et qu'on est loggué correctement
+ * et qu'on a été identifié par un mot de passe depuis le début de la session
+ * false sinon
+ * @return bool vrai si loggué
+ * @see header2.inc.php
+ */
+function identified ()
+{
+ return Session::get('auth', AUTH_PUBLIC) >= AUTH_MDP;
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ function escape_html ()
+
+/**
+ * default smarty plugin, used to auto-escape dangerous html.
+ *
+ * < --> <
+ * > --> >
+ * " --> "
+ * & not followed by some entity --> &
+ */
+function escape_html($string)
+{
+ if(is_string($string)) {
+ $transtbl = Array('<' => '<', '>' => '>', '"' => '"');
+ return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)/", "&" , strtr($string, $transtbl));
+ } else {
+ return $string;
+ }
+}
+
+// }}}
+// {{{ function at_to_globals()
+
+/**
+ * helper
+ */
+
+function _to_globals($s) {
+ global $globals;
+ $t = explode('.',$s);
+ if (count($t) == 1) {
+ return var_export($globals->$t[0],true);
+ } else {
+ return var_export($globals->$t[0]->$t[1],true);
+ }
+}
+
+/**
+ * compilation plugin used to import $globals confing through #globals.foo.bar# directives
+ */
+
+function at_to_globals($tpl_source, &$smarty)
+{
+ return preg_replace('/#globals\.([a-zA-Z0-9_.]+?)#/e', '_to_globals(\'\\1\')', $tpl_source);
+}
+
+// }}}
+// {{{ function trimwhitespace
+
+function trimwhitespace($source, &$smarty)
+{
+ // Pull out the script blocks
+ preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
+ $_script_blocks = $match[0];
+ $source = preg_replace("!<script[^>]+>.*?</script>!is", '@@@SMARTY:TRIM:SCRIPT@@@', $source);
+
+ // Pull out the pre blocks
+ preg_match_all("!<pre>.*?</pre>!is", $source, $match);
+ $_pre_blocks = $match[0];
+ $source = preg_replace("!<pre>.*?</pre>!is", '@@@SMARTY:TRIM:PRE@@@', $source);
+
+ // Pull out the textarea blocks
+ preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
+ $_textarea_blocks = $match[0];
+ $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is", '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
+
+ // remove all leading spaces, tabs and carriage returns NOT
+ // preceeded by a php close tag.
+ $source = preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source);
+
+ // replace script blocks
+ foreach($_script_blocks as $curr_block) {
+ $source = preg_replace("!@@@SMARTY:TRIM:SCRIPT@@@!", $curr_block, $source, 1);
+ }
+ // replace pre blocks
+ foreach($_pre_blocks as $curr_block) {
+ $source = preg_replace("!@@@SMARTY:TRIM:PRE@@@!",$curr_block,$source,1);
+ }
+ // replace textarea blocks
+ foreach($_textarea_blocks as $curr_block) {
+ $source = preg_replace("!@@@SMARTY:TRIM:TEXTAREA@@@!",$curr_block,$source,1);
+ }
+
+ return $source;
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+
+/******************************************************************************
+ * *
+ * Original file can be found on http://xmlrpc-epi.sourceforge.net/ *
+ * in the module xmlrpc-epi-php v0.51 file samples/utils/utils.php *
+ * *
+ * The Polytechnique.org TEAM *
+ * *
+ ******************************************************************************/
+
+/*
+ This file is part of, or distributed with, libXMLRPC - a C library for
+ xml-encoded function calls.
+
+ Author: Dan Libby (dan@libby.com)
+ Epinions.com may be contacted at feedback@epinions-inc.com
+*/
+
+/*
+ Copyright 2001 Epinions, Inc.
+
+ Subject to the following 3 conditions, Epinions, Inc. permits you, free
+ of charge, to (a) use, copy, distribute, modify, perform and display this
+ software and associated documentation files (the "Software"), and (b)
+ permit others to whom the Software is furnished to do so as well.
+
+ 1) The above copyright notice and this permission notice shall be included
+ without modification in all copies or substantial portions of the
+ Software.
+
+ 2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF
+ ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY
+ IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE OR NONINFRINGEMENT.
+
+ 3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
+ SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
+ OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
+ NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
+ DAMAGES.
+
+*/
+
+/* xmlrpc utilities (xu)
+ * author: Dan Libby (dan@libby.com)
+ */
+
+/* generic function to call an http server with post method */
+function xu_query_http_post($request, $host, $uri, $port, $debug,
+ $timeout, $user, $pass, $secure=false) {
+ $response_buf = "";
+ if ($host && $uri && $port) {
+ $content_len = strlen($request);
+
+ $fsockopen = $secure ? "fsockopen_ssl" : "fsockopen";
+
+ dbg1("opening socket to host: $host, port: $port, uri: $uri", $debug);
+ $query_fd = $fsockopen($host, $port, $errno, $errstr, 10);
+
+ if ($query_fd) {
+
+ $auth = "";
+ if ($user) {
+ $auth = "Authorization: Basic " . base64_encode($user . ":" . $pass) . "\r\n";
+ }
+
+ $http_request =
+ "POST $uri HTTP/1.0\r\n" .
+ "Host: $host:$port\r\n" .
+ $auth .
+ "User-Agent: xmlrpc-epi-php/0.2 (PHP)\r\n" .
+ "Content-Type: text/xml\r\n" .
+ "Content-Length: $content_len\r\n" .
+ "Connection: Close\r\n" .
+ "\r\n" .
+ $request;
+
+ dbg1("sending http request:</h3> <xmp>\n$http_request\n</xmp>", $debug);
+
+ fputs($query_fd, $http_request, strlen($http_request));
+
+ dbg1("receiving response...", $debug);
+
+ $header_parsed = false;
+
+ while (!feof($query_fd)) {
+ $line = fgets($query_fd, 4096);
+ if (!$header_parsed) {
+ if ($line === "\r\n" || $line === "\n") {
+ $header_parsed = 1;
+ }
+ dbg2("got header - $line", $debug);
+ }
+ else {
+ $response_buf .= $line;
+ }
+ }
+
+ fclose($query_fd);
+ }
+ else {
+ dbg1("socket open failed", $debug);
+ }
+ }
+ else {
+ dbg1("missing param(s)", $debug);
+ }
+
+ dbg1("got response:</h3>. <xmp>\n$response_buf\n</xmp>\n", $debug);
+
+ return $response_buf;
+}
+
+function xu_fault_code($code, $string) {
+ return array('faultCode' => $code,
+ 'faultString' => $string);
+}
+
+
+function find_and_decode_xml($buf, $debug) {
+ if (strlen($buf)) {
+ $xml_begin = substr($buf, strpos($buf, "<?xml"));
+ if (strlen($xml_begin)) {
+
+ $retval = xmlrpc_decode($xml_begin);
+ }
+ else {
+ dbg1("xml start token not found", $debug);
+ }
+ }
+ else {
+ dbg1("no data", $debug);
+ }
+ return $retval;
+}
+
+
+/**
+ * @param params a struct containing 3 or more of these key/val pairs:
+ * @param host remote host (required)
+ * @param uri remote uri (required)
+ * @param port remote port (required)
+ * @param method name of method to call
+ * @param args arguments to send (parameters to remote xmlrpc server)
+ * @param debug debug level (0 none, 1, some, 2 more)
+ * @param timeout timeout in secs. (0 = never)
+ * @param user user name for authentication.
+ * @param pass password for authentication
+ * @param secure secure. wether to use fsockopen_ssl. (requires special php build).
+ * @param output array. xml output options. can be null. details below:
+ *
+ * output_type: return data as either php native data types or xml
+ * encoded. ifphp is used, then the other values are ignored. default = xml
+ * verbosity: determine compactness of generated xml. options are
+ * no_white_space, newlines_only, and pretty. default = pretty
+ * escaping: determine how/whether to escape certain characters. 1 or
+ * more values are allowed. If multiple, they need to be specified as
+ * a sub-array. options are: cdata, non-ascii, non-print, and
+ * markup. default = non-ascii | non-print | markup
+ * version: version of xml vocabulary to use. currently, three are
+ * supported: xmlrpc, soap 1.1, and simple. The keyword auto is also
+ * recognized to mean respond in whichever version the request came
+ * in. default = auto (when applicable), xmlrpc
+ * encoding: the encoding that the data is in. Since PHP defaults to
+ * iso-8859-1 you will usually want to use that. Change it if you know
+ * what you are doing. default=iso-8859-1
+ *
+ * example usage
+ *
+ * $output_options = array('output_type' => 'xml',
+ * 'verbosity' => 'pretty',
+ * 'escaping' => array('markup', 'non-ascii', 'non-print'),
+ * 'version' => 'xmlrpc',
+ * 'encoding' => 'utf-8'
+ * );
+ * or
+ *
+ * $output_options = array('output_type' => 'php');
+ */
+function xu_rpc_http_concise($params) {
+ $output = $host = $uri = $port = $method = $args = $debug = null;
+ $timeout = $user = $pass = $secure = $debug = null;
+
+ extract($params);
+
+ // default values
+ if(!$port) {
+ $port = 80;
+ }
+ if(!$uri) {
+ $uri = '/';
+ }
+ if(!$output) {
+ $output = array('version' => 'xmlrpc');
+ }
+
+ $response_buf = "";
+ if ($host && $uri && $port) {
+ $request_xml = xmlrpc_encode_request($method, $args, $output);
+ $response_buf = xu_query_http_post($request_xml, $host, $uri, $port, $debug,
+ $timeout, $user, $pass, $secure);
+
+ $retval = find_and_decode_xml($response_buf, $debug);
+ }
+ return $retval;
+}
+
+/* call an xmlrpc method on a remote http server. legacy support. */
+function xu_rpc_http($method, $args, $host, $uri="/", $port=80, $debug=false,
+ $timeout=0, $user=false, $pass=false, $secure=false) {
+ return xu_rpc_http_concise(
+ array(
+ 'method' => $method,
+ 'args' => $args,
+ 'host' => $host,
+ 'uri' => $uri,
+ 'port' => $port,
+ 'debug' => $debug,
+ 'timeout' => $timeout,
+ 'user' => $user,
+ 'pass' => $pass,
+ 'secure' => $secure
+ ));
+}
+
+
+
+function xu_is_fault($arg) {
+ // xmlrpc extension finally supports this.
+ return is_array($arg) ? xmlrpc_is_fault($arg) : false;
+}
+
+/* sets some http headers and prints xml */
+function xu_server_send_http_response($xml) {
+ header("Content-type: text/xml");
+ header("Content-length: " . strlen($xml) );
+ echo $xml;
+}
+
+
+function dbg($msg) {
+ echo "<h3>$msg</h3>"; flush();
+}
+function dbg1($msg, $debug_level) {
+ if ($debug_level >= 1) {
+ dbg($msg);
+ }
+}
+function dbg2($msg, $debug_level) {
+ if ($debug_level >= 2) {
+ dbg($msg);
+ }
+}
+
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once('applis.func.inc.php');
+
+function replace_ifset(&$var,$req) {
+ if (Env::has($req)){
+ $var = Env::get($req);
+ }
+}
+
+function replace_ifset_i(&$var,$req,$i) {
+ if (isset($_REQUEST[$req][$i])){
+ $var[$i] = $_REQUEST[$req][$i];
+ }
+}
+
+function replace_ifset_i_j(&$var,$req,$i,$j) {
+ if (isset($_REQUEST[$req][$j])){
+ $var[$i] = $_REQUEST[$req][$j];
+ }
+}
+
+//pour rentrer qqchose dans la base
+function put_in_db($string){
+ return trim($string);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$page->assign('adresses', $adresses);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+$res = $globals->xdb->iterator("SELECT * FROM profile_medals_grades ORDER BY mid, pos");
+$grades = Array();
+while ($tmp = $res->next()) {
+ $grades[$tmp['mid']][] = $tmp;
+}
+
+$res = $globals->xdb->iterator("SELECT * FROM profile_medals ORDER BY type, text");
+$mlist = Array();
+while ($tmp = $res->next()) {
+ $mlist[$tmp['type']][] = $tmp;
+}
+
+$trad = Array('ordre' => 'Ordres ...', 'croix' => 'Croix ...', 'militaire' => 'Médailles militaires ...',
+ 'honneur' => 'Médailles d\'honneur', 'resistance' => 'Médailles de la résistance ...', 'prix' => 'Prix ...');
+
+$page->gassign('grades');
+$page->gassign('medals');
+$page->gassign('trad');
+$page->assign('medals_pub', $medals_pub);
+$page->assign('medal_list', $mlist);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as pubprolished 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 *
+ ***************************************************************************/
+
+$page->assign('endrid',$endrid);
+$page->assign('entreprise',$entreprise);
+$page->assign('secteur',$secteur);
+$page->assign('ss_secteur',$ss_secteur);
+$page->assign('poste',$poste);
+$page->assign('fonction',$fonction);
+$page->assign('adrpro1',$adrpro1);
+$page->assign('adrpro2',$adrpro2);
+$page->assign('adrpro3',$adrpro3);
+$page->assign('postcodepro',$postcodepro);
+$page->assign('citypro',$citypro);
+$page->assign('countrypro',$countrypro);
+$page->assign('regionpro',$regionpro);
+$page->assign('telpro',$telpro);
+$page->assign('faxpro',$faxpro);
+$page->assign('mobilepro', $mobilepro);
+$page->assign('pubpro',$pubpro);
+$page->assign('adr_pubpro',$adr_pubpro);
+$page->assign('tel_pubpro',$tel_pubpro);
+$page->assign('emailpro',$emailpro);
+$page->assign('email_pubpro',$email_pubpro);
+$page->assign('webpro',$webpro);
+$page->assign('cv',$cv);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$page->assign('mobile_pub',$mobile_pub);
+$page->assign('web_pub',$web_pub);
+$page->assign('freetext_pub',$freetext_pub);
+
+$page->assign('nom', $nom);
+$page->assign('prenom', $prenom);
+$page->assign('promo', $promo);
+$page->assign('promo_sortie', $promo_sortie);
+$page->assign('nom_usage', $nom_usage);
+
+$page->assign('nationalite',$nationalite);
+
+$page->assign('mobile',$mobile);
+
+$page->assign('web',$web);
+
+$page->assign('freetext',$freetext);
+
+$page->assign('appli_id1',$appli_id1);
+$page->assign('appli_id2',$appli_id2);
+$page->assign('appli_type1',$appli_type1);
+$page->assign('appli_type2',$appli_type2);
+
+$page->assign('photo_pub',$photo_pub);
+$page->assign('nouvellephoto', $nouvellephoto);
+$page->assign('nickname', $nickname);
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$page->assign('mentor_secteur_id_new', $mentor_secteur_id_new);
+$page->assign('can_add_pays', $nb_mentor_pays < $max_mentor_pays);
+$page->assign('can_add_secteurs', $nb_mentor_secteurs < $max_mentor_secteurs);
+$page->assign('mentor_expertise', $mentor_expertise);
+$page->assign('mentor_pid', $mentor_pid);
+$page->assign('mentor_pays', $mentor_pays);
+$page->assign('mentor_sid', $mentor_sid);
+$page->assign('mentor_secteur', $mentor_secteur);
+$page->assign('mentor_ssid', $mentor_ssid);
+$page->assign('mentor_ss_secteur', $mentor_ss_secteur);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$uid = Session::getInt('uid');
+
+$res = $globals->xdb->query(
+ "SELECT text,id
+ FROM binets_ins, binets_def
+ WHERE binets_def.id=binets_ins.binet_id AND user_id={?}", $uid);
+$page->assign('binets', $res->fetchAllAssoc());
+
+$res = $globals->xdb->query(
+ "SELECT text,id
+ FROM groupesx_ins, groupesx_def
+ WHERE groupesx_def.id=groupesx_ins.gid AND guid={?}", $uid);
+$page->assign('groupesx', $res->fetchAllAssoc());
+
+$page->assign('section', $section);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$page->assign('nb_lg_max', $nb_lg_max);
+$page->assign('nb_cpro_max', $nb_cpro_max);
+$page->assign('nb_lg', $nb_lg);
+$page->assign_by_ref('langue_id', $langue_id);
+$page->assign_by_ref('langue_name', $langue_name);
+$page->assign_by_ref('langue_level', $langue_level);
+$page->assign('nb_cpro', $nb_cpro);
+$page->assign_by_ref('cpro_id', $cpro_id);
+$page->assign_by_ref('cpro_name', $cpro_name);
+$page->assign_by_ref('cpro_level', $cpro_level);
+$page->assign_by_ref('langues_levels',$langues_levels);
+$page->assign_by_ref('langues_def',$langues_def);
+$page->assign_by_ref('comppros_levels',$comppros_levels);
+$page->assign_by_ref('comppros_def',$comppros_def);
+$page->assign_by_ref('comppros_title',$comppros_title);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('geoloc.inc.php');
+
+// on limite à 6 adresses personnelles par utilisateur
+$nb_adr_max = 6; // ( = max(adrid possibles)
+
+//les adresses sont stockées dans un tableau global indéxé par adrid;
+
+function is_adr_empty($adrid){
+ $adr = &$GLOBALS['adresses'][$adrid];
+ return (
+ ($adr['adr1'] == '') && ($adr['adr2'] == '') && ($adr['adr3'] == '') &&
+ ($adr['postcode'] == '') && ($adr['city'] == '') && ($adr['country'] == '00') &&
+ ($adr['tel'] == '') && ($adr['fax'] == '')
+ );
+}
+
+function delete_address($adrid, $in_request_array = false){
+ global $globals;
+ $globals->xdb->execute("DELETE FROM adresses WHERE uid = {?} AND adrid = {?}",Session::getInt('uid', -1), $adrid);
+ if($in_request_array == true){
+ unset($_REQUEST['adrid'][$adrid]);
+ }
+ else{
+ unset($GLOBALS['adresses'][$adrid]);
+ }
+}
+
+//on verifie si on nous a demande une suppression
+$req_adrid_del = Env::getMixed('adrid_del', Array());
+for($i = 1; $i <= $nb_adr_max; $i++){
+ if( isset( $req_adrid_del[$i] ) ) {
+ delete_address($i,true);
+ }
+}
+
+//$sql_order = "ORDER BY (NOT FIND_IN_SET('active', statut)), FIND_IN_SET('temporaire', statut)";
+$sql_order = '';
+
+//recuperation des adrid
+$res = $globals->xdb->query("SELECT adrid FROM adresses WHERE uid = {?} AND NOT FIND_IN_SET('pro', statut) ".$sql_order, Session::getInt('uid', -1));
+$adrids = $res->fetchColumn();
+
+//recuperation des donnees de la bd
+$res = $globals->xdb->iterRow(
+ "SELECT
+ FIND_IN_SET('res-secondaire', statut), FIND_IN_SET('courrier', statut),
+ FIND_IN_SET('active', statut), FIND_IN_SET('temporaire', statut),
+ adr1, adr2, adr3, postcode, city, cityid,
+ a.country, region, tel, fax, pub, tel_pub,
+ gp.pays AS countrytxt
+ FROM adresses AS a INNER JOIN geoloc_pays AS gp ON(gp.a2 = a.country)
+ WHERE uid = {?} AND NOT FIND_IN_SET('pro',statut) ".$sql_order
+, Session::getInt('uid', -1)
+);
+
+$nb_adr = $res->total();
+
+for ($i = 0; $i < $nb_adr; $i++) {
+ $adrid = $adrids[$i];
+ $adresses[$adrid]['adrid'] = $adrid;
+ list(
+ $adresses[$adrid]['secondaire'], $adresses[$adrid]['courrier'],
+ $adresses[$adrid]['active'], $adresses[$adrid]['temporaire'],
+ $adresses[$adrid]['adr1'], $adresses[$adrid]['adr2'], $adresses[$adrid]['adr3'], $adresses[$adrid]['postcode'], $adresses[$adrid]['city'], $adresses[$adrid]['cityid'],
+ $adresses[$adrid]['country'], $adresses[$adrid]['region'], $adresses[$adrid]['tel'], $adresses[$adrid]['fax'],
+ $adresses[$adrid]['pub'],
+ $adresses[$adrid]['tel_pub'],$adresses[$adrid]['countrytxt']) = $res->next();
+ $adresses[$adrid]['nouvelle'] = 'modif';
+ $adresses[$adrid]['numero_formulaire'] = -1;
+ require_once('geoloc.inc.php');
+ $adresses[$adrid]['txt'] = get_address_text($adresses[$adrid]);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if (Env::has('medal_op')) {
+ if (Env::get('medal_op')=='retirer' && Env::getInt('medal_id')) {
+ $globals->xdb->execute("DELETE FROM profile_medals_sub WHERE uid = {?} AND mid = {?}", Session::getInt('uid', -1), Env::getInt('medal_id', -1));
+ }
+
+ if (Env::get('medal_op')=='ajouter' && Env::getInt('medal_id')) {
+ $globals->xdb->execute("INSERT INTO profile_medals_sub (uid,mid) VALUES ({?}, {?})", Session::getInt('uid', -1), Env::getInt('medal_id'));
+ }
+}
+if (Post::has('grade')) {
+ foreach (Post::getMixed('grade') as $mid=>$gid) {
+ $globals->xdb->execute('UPDATE profile_medals_sub SET gid={?} WHERE uid={?} AND mid={?}', $gid, Session::getInt('uid'), $mid);
+ }
+}
+
+$res = $globals->xdb->query(
+ "SELECT m.id, m.text AS medal, m.type, m.img, s.gid
+ FROM profile_medals_sub AS s
+ INNER JOIN profile_medals AS m ON ( s.mid = m.id )
+ WHERE s.uid = {?}", Session::getInt('uid', -1));
+
+$medals = $res->fetchAllAssoc();
+
+$res = $globals->xdb->query("SELECT profile_medals_pub FROM auth_user_quick WHERE user_id = {?}", Session::getInt('uid', -1));
+$medals_pub = $res->fetchOneCell();
+
+if(Env::has('modifier') || Env::has('suivant')) {
+ $medals_pub = Env::has('medals_pub')?'public':'private';
+}
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('geoloc.inc.php');
+require_once('secteur.emploi.inc.php');
+require_once('fonction.emploi.inc.php');
+
+$res = $globals->xdb->iterRow("SELECT entrid, entreprise, secteur, ss_secteur, poste, fonction,
+ adr1, adr2, adr3, postcode, city, country, region, tel, fax, mobile,
+ pub, adr_pub, tel_pub, email, email_pub, web
+ FROM entreprises
+ WHERE uid = {?} ORDER BY entrid",Session::getInt('uid', -1));
+
+$nb_res = $res->total();
+for($i = 0; $i < $nb_res ; $i++){
+ list($endrid[$i], $entreprise[$i], $secteur[$i], $ss_secteur[$i], $poste[$i], $fonction[$i],
+ $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $postcodeppro[$i], $citypro[$i], $countrypro[$i], $regionpro[$i],
+ $telpro[$i], $faxpro[$i], $mobilepro[$i], $pubpro[$i], $adr_pubpro[$i],
+ $tel_pubpro[$i], $emailpro[$i], $email_pubpro[$i], $webpro[$i]) = $res->next();
+}
+//limite dure a 2
+for($i = $nb_res; $i < 2 ; $i++){
+ $endrid[$i] = $i;
+ $entreprise[$i] = '';
+ $secteur[$i] = '';
+ $ss_secteur[$i] = '';
+ $poste[$i] = '';
+ $fonction[$i] = '0';
+ $adrpro1[$i] = '';
+ $adrpro2[$i] = '';
+ $adrpro3[$i] = '';
+ $postcodepro[$i] = '';
+ $citypro[$i] = '';
+ $countrypro[$i] = '00';
+ $regionpro[$i] = '';
+ $telpro[$i] = '';
+ $faxpro[$i] = '';
+ $mobilepro[$i] = '';
+ $pubpro[$i] = '';
+ $adr_pubpro[$i] = '';
+ $tel_pubpro[$i] = '';
+ $emailpro[$i] = '';
+ $email_pubpro[$i] = '';
+ $webpro[$i] = '';
+}
+
+//recuperation des donnees sur les secteurs :
+
+$res = $globals->xdb->iterRow("SELECT id, label FROM emploi_secteur");
+
+while(list($tmp_secteur_id, $tmp_secteur_label) = $res->next()){
+ $secteurs[$tmp_secteur_id] = $tmp_secteur_label;
+}
+
+//recuperation des donnees sur les fonctions :
+$res = $globals->xdb->iterRow("SELECT id, fonction_fr, FIND_IN_SET('titre', flags) FROM fonctions_def ORDER BY id");
+
+while(list($tmp_fonction_id, $tmp_fonction_label, $tmp_fonction_titre) = $res->next()){
+ $fonctions[$tmp_fonction_id] = $tmp_fonction_label;
+ $fonctions_titre[$tmp_fonction_id] = $tmp_fonction_titre;
+}
+
+//recuperation du CV
+$res = $globals->xdb->query("SELECT cv FROM auth_user_md5 WHERE user_id = {?}", Session::getInt('uid', -1));
+$cv = $res->fetchOneCell();
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// on ramène les données du profil connecté (uid paramètre de session)
+$sql = "SELECT u.nom, u.prenom, u.nom_ini, u.prenom_ini, u.promo, u.promo_sortie, u.nom_usage, u.nationalite,
+ q.profile_mobile, q.profile_mobile_pub, q.profile_web, q.profile_web_pub, q.profile_freetext, q.profile_freetext_pub, q.profile_nick,
+ a1.aid, a1.type, a2.aid, a2.type
+ FROM auth_user_md5 AS u
+ INNER JOIN auth_user_quick AS q USING(user_id)
+ LEFT JOIN applis_ins AS a1 ON(a1.uid = u.user_id and a1.ordre = 0)
+ LEFT JOIN applis_ins AS a2 ON(a2.uid = u.user_id and a2.ordre = 1)
+ WHERE u.user_id = {?}";
+
+$result = $globals->xdb->query($sql, Session::getInt('uid', -1));
+list($nom, $prenom, $nom_ini, $prenom_ini, $promo, $promo_sortie, $nom_usage, $nationalite,
+ $mobile, $mobile_pub, $web, $web_pub, $freetext, $freetext_pub, $nickname,
+ $appli_id1,$appli_type1, $appli_id2,$appli_type2) = $result->fetchOneRow();
+
+$result = $globals->xdb->query("SELECT pub FROM photo WHERE uid = {?}", Session::getInt('uid', -1));
+$photo_pub = $result->fetchOneCell();
+
+$nom_anc = $nom;
+$prenom_anc = $prenom;
+$nationalite_anc = $nationalite;
+$nickname_anc = $nickname;
+
+replace_ifset($nom,'nom');
+replace_ifset($prenom,'prenom');
+replace_ifset($nationalite,'nationalite');
+replace_ifset($mobile,'mobile');
+replace_ifset($web,"web");
+replace_ifset($freetext,"freetext");
+replace_ifset($appli_id1,"appli_id1");
+replace_ifset($appli_id2,"appli_id2");
+replace_ifset($appli_type1,"appli_type1");
+replace_ifset($appli_type2,"appli_type2");
+replace_ifset($nickname,"nickname");
+
+if(Env::has('modifier') || Env::has('suivant')) {
+ $mobile_pub = Env::get('mobile_pub');
+ $web_pub = Env::has('web_pub')?'public':'private';
+ $freetext_pub = Env::has('freetext_pub')?'public':'private';
+ $photo_pub = Env::has('photo_pub')?'public':'private';
+}
+
+require_once("xorg.misc.inc.php");
+ $nom = strtoupper($nom);
+ $nom_comp = replace_accent($nom);
+ $nom_anc_comp = replace_accent($nom_anc);
+
+ $prenom = make_firstname_case($prenom);
+ $prenom_comp = replace_accent($prenom);
+ $prenom_anc_comp = replace_accent($prenom_anc);
+
+// Y a-t-il une photo en attente de confirmation ?
+$sql = $globals->xdb->query("SELECT COUNT(*) FROM requests WHERE type='photo' AND user_id = {?}", Session::getInt('uid', -1));
+$nouvellephoto=$sql->fetchOneCell();
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('geoloc.inc.php');
+require_once('secteur.emploi.inc.php');
+
+$max_mentor_pays = 10;
+$max_mentor_secteurs = 10;
+
+//recuperation de l'expertise
+$res = $globals->xdb->query("SELECT expertise FROM mentor WHERE uid = {?}", Session::getInt('uid',-1));
+
+$mentor_expertise = $res->fetchOneCell();
+$mentor_expertise_bd = $mentor_expertise;
+
+//suppression eventuelle d'un pays
+if(Post::get('mentor_pays_op', '') == 'retirer') {
+ if(Post::has('mentor_pays_id')) {
+ $id_supprimee = Post::get('mentor_pays_id', '00');
+ $globals->xdb->execute("DELETE FROM mentor_pays WHERE uid = {?} AND pid = {?} LIMIT 1", Session::getInt('uid', -1), $id_supprimee);
+ }
+}
+
+//recuperation des pays
+$res = $globals->xdb->iterRow("SELECT m.pid, p.pays
+ FROM mentor_pays AS m
+ LEFT JOIN geoloc_pays AS p ON(m.pid = p.a2) WHERE m.uid = {?} LIMIT {?}", Session::getInt('uid', -1), $max_mentor_pays);
+$nb_mentor_pays = $res->total();
+$mentor_pid = $mentor_pays = Array();
+for($i = 1; $i <= $nb_mentor_pays ; $i++) list($mentor_pid[$i], $mentor_pays[$i]) = $res->next();
+
+//ajout eventuel d'un pays
+if((Post::get('mentor_pays_op', '') == 'ajouter') && ($nb_mentor_pays < $max_mentor_pays)) {
+ if(Post::get('mentor_pays_id', '00') != '00') {
+ $id_ajoutee = Post::get('mentor_pays_id', '00');
+ $globals->xdb->execute("INSERT INTO mentor_pays(uid, pid) VALUES({?}, {?})", Session::getInt('uid', -1), $id_ajoutee);
+ $nb_mentor_pays++;
+ $mentor_pid[$nb_mentor_pays] = $id_ajoutee;
+ $mentor_pays[$nb_mentor_pays] = Post::get('mentor_pays_name', '');
+ }
+}
+
+
+
+//suppression d'un secteur / ss-secteur
+if(Post::get('mentor_secteur_op', '') == 'retirer') {
+ if(Post::has('mentor_secteur_id')) {
+ $id_supprimee = Post::get('mentor_secteur_id', '');
+ $globals->xdb->execute("DELETE FROM mentor_secteurs WHERE uid = {?} AND secteur = {?} LIMIT 1", Session::getInt('uid', -1), $id_supprimee);
+ }
+}
+
+//recuperation des secteurs
+$res = $globals->xdb->iterRow("SELECT m.secteur, s.label, m.ss_secteur, ss.label
+ FROM mentor_secteurs AS m
+ LEFT JOIN emploi_secteur AS s ON(m.secteur = s.id)
+ LEFT JOIN emploi_ss_secteur AS ss ON(s.id = ss.secteur AND m.ss_secteur = ss.id)
+ WHERE m.uid = {?}
+ LIMIT {?}", Session::getInt('uid', -1), $max_mentor_pays);
+$nb_mentor_secteurs = $res->total();
+$mentor_sid = $mentor_secteur = $mentor_ssid = $mentor_ss_secteur = Array();
+for($i = 1; $i <= $nb_mentor_secteurs ; $i++)
+ list($mentor_sid[$i], $mentor_secteur[$i], $mentor_ssid[$i], $mentor_ss_secteur[$i]) = $res->next();
+
+//ajout d'un secteur
+$mentor_secteur_id_new = '';
+if((Post::get('mentor_secteur_op', '')== 'ajouter') && ($nb_mentor_secteurs < $max_mentor_secteurs)) {
+ if(Post::get('mentor_secteur_id', '') != '')
+ {
+ $sid_ajoutee = Post::get('mentor_secteur_id', '');
+ if(Post::has('mentor_ss_secteur_id'))
+ $ssid_ajoutee = Post::get('mentor_ss_secteur_id', '');
+ $globals->xdb->execute("INSERT INTO mentor_secteurs (uid, secteur, ss_secteur)
+ VALUES({?}, {?}, {?})", Session::getInt('uid', -1), $sid_ajoutee, ($ssid_ajoutee == '')?null:$ssid_ajoutee);
+ $nb_mentor_secteurs++;
+ $mentor_sid[$nb_mentor_secteurs] = $sid_ajoutee;
+ $mentor_secteur[$nb_mentor_secteurs] = Post::get('mentor_secteur_name', '');
+ $mentor_ssid[$nb_mentor_secteurs] = $ssid_ajoutee;
+ $mentor_ss_secteur[$nb_mentor_secteurs] = Post::get('mentor_ss_secteur_name', '');
+ }
+} elseif(Post::has('mentor_secteur_id_new')){
+ $mentor_secteur_id_new = Post::get('mentor_secteur_id_new', '');
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+//declaration des fonctions msarty pour les binets et groupex
+
+$sql = "SELECT section".
+ " FROM auth_user_md5 AS u".
+ " WHERE user_id = {?}";
+
+$result = $globals->xdb->query($sql, Session::getInt('uid', -1));
+$section = $result->fetchOneCell();
+
+replace_ifset($section,'section');
+
+/************* gestion des binets ************/
+if (Env::has('binet_op')) {
+ // retrait binet
+ if( (Env::get('binet_op', '')=='retirer')&&(Env::getInt('binet_id', 0) != 0)) {
+ $globals->xdb->execute("DELETE FROM binets_ins WHERE user_id = {?} AND binet_id = {?}", Session::getInt('uid', -1), Env::getInt('binet_id', -1));
+ }
+ // ajout binet
+ if (Env::get('binet_op')=="ajouter" && (Env::getInt('binet_id', 0) != 0)) {
+ $globals->xdb->execute("INSERT INTO binets_ins (user_id,binet_id) VALUES({?}, {?})", Session::getInt('uid', -1), Env::getInt('binet_id', -1));
+ }
+}
+/************* gestion des groupes X ************/
+if (Env::has('groupex_op')) {
+ // retrait groupe X
+ if (Env::get('groupex_op')=="retirer" && (Env::getInt('groupex_id', 0) != 0)) {
+ $globals->xdb->execute("DELETE FROM groupesx_ins WHERE guid = {?} AND gid = {?}", Session::getInt('uid', -1), Env::getInt('groupex_id', -1));
+ }
+ // ajout groupe X
+ if (Env::get('groupex_op')=="ajouter" && (Env::getInt('groupex_id', 0) != 0)) {
+ $globals->xdb->execute("INSERT INTO groupesx_ins (guid, gid) VALUES ({?}, {?})", Session::getInt('uid', -1), Env::getInt('groupex_id', -1));
+ }
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+if(Env::has('langue_op')){
+ if(Env::get('langue_op', '')=='retirer'){
+ $globals->xdb->execute("DELETE FROM langues_ins WHERE uid = {?} AND lid = {?}", Session::getInt('uid', -1), Env::get('langue_id', ''));
+ } elseif(Env::get('langue_op', '') == 'ajouter'){
+ if(Env::get('langue_id', '') != '')
+ $globals->xdb->execute("INSERT INTO langues_ins (uid,lid,level) VALUES ({?}, {?}, {?})", Session::getInt('uid', -1), Env::get('langue_id', ''), Env::get('langue_level', ''));
+ }
+}
+
+if(Env::has('comppros_op')){
+ if(Env::get('comppros_op', '')=='retirer'){
+ $globals->xdb->execute("DELETE FROM competences_ins WHERE uid = {?} AND cid = {?}", Session::getInt('uid', -1), Env::get('comppros_id', ''));
+ } elseif(Env::get('comppros_op', '') == 'ajouter') {
+ if(Env::get('comppros_id', '') != '')
+ $globals->xdb->execute("INSERT INTO competences_ins (uid,cid,level) VALUES({?}, {?}, {?})", Session::getInt('uid', -1), Env::get('comppros_id', ''), Env::get('comppros_level', ''));
+ }
+}
+
+// nombre maximum autorisé de langues
+$nb_lg_max = 10;
+// nombre maximum autorisé de compétences professionnelles
+$nb_cpro_max = 20;
+
+$res = $globals->xdb->iterRow("SELECT ld.id, ld.langue_fr, li.level FROM langues_ins AS li, langues_def AS ld "
+ ."WHERE (li.lid=ld.id AND li.uid= {?}) LIMIT $nb_lg_max", Session::getInt('uid', -1));
+
+$nb_lg = $res->total();
+
+for ($i = 1; $i <= $nb_lg; $i++) {
+ list($langue_id[$i], $langue_name[$i], $langue_level[$i]) = $res->next();
+}
+
+$res = $globals->xdb->iterRow("SELECT cd.id, cd.text_fr, ci.level FROM competences_ins AS ci, competences_def AS cd "
+ ."WHERE (ci.cid=cd.id AND ci.uid={?}) LIMIT $nb_cpro_max", Session::getInt('uid', -1));
+
+$nb_cpro = $res->total();
+
+for ($i = 1; $i <= $nb_cpro; $i++) {
+ list($cpro_id[$i], $cpro_name[$i], $cpro_level[$i]) = $res->next();
+}
+//Definitions des tables de correspondances id => nom
+
+$langues_levels = Array(
+ 1 => "1",
+ 2 => "2",
+ 3 => "3",
+ 4 => "4",
+ 5 => "5",
+ 6 => "6"
+);
+
+$res = $globals->xdb->iterRow("SELECT id, langue_fr FROM langues_def");
+
+while(list($tmp_lid, $tmp_lg_fr) = $res->next()){
+ $langues_def[$tmp_lid] = $tmp_lg_fr;
+}
+
+$comppros_levels = Array(
+ 'initié' => 'initié',
+ 'bonne connaissance' => 'bonne connaissance',
+ 'expert' => 'expert'
+);
+
+$res = $globals->xdb->iterRow("SELECT id, text_fr, FIND_IN_SET('titre',flags) FROM competences_def");
+
+while(list($tmp_id, $tmp_text_fr, $tmp_title) = $res->next()){
+ $comppros_def[$tmp_id] = $tmp_text_fr;
+ $comppros_title[$tmp_id] = $tmp_title;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+reset($adresses);
+
+foreach($adresses as $adrid => $adr){
+
+ if($adr['nouvelle'] != 'new'){ // test si on vient de creer cette adresse dans verif_adresse.inc.php
+
+ //construction des bits
+ $statut = "";
+ if ($adr["secondaire"]) $statut .= 'res-secondaire,';
+ if ($adr["courrier"]) $statut .= 'courrier,';
+ if ($adr["active"]) $statut .= 'active,';
+ if ($adr["temporaire"]) $statut .= 'temporaire,';
+ if (! empty($statut)) $statut = substr($statut, 0, -1);
+
+ if ($adr["nouvelle"] == 'ajout') {
+ //nouvelle adresse
+ $globals->xdb->execute("INSERT INTO adresses SET
+ adr1 = {?},
+ adr2 = {?},
+ adr3 = {?},
+ postcode = {?},
+ city = {?},
+ cityid = {?},
+ country = {?},
+ region = {?},
+ tel = {?},
+ fax = {?},
+ pub = {?},
+ tel_pub = {?},
+ datemaj = NOW(),
+ statut = {?},
+ uid = {?}, adrid = {?}",
+ $adr['adr1'],
+ $adr['adr2'],
+ $adr['adr3'],
+ $adr['postcode'],
+ $adr['city'],
+ $adr['cityid'],
+ $adr['country'],
+ $adr['region'],
+ $adr['tel'],
+ $adr['fax'],
+ $adr['pub'],
+ $adr['tel_pub'],
+ $statut,
+ Session::getInt('uid', -1), $adrid);
+ }
+
+ else{
+ //c'est une mise à jour
+ $globals->xdb->execute(
+ "UPDATE adresses SET
+ adr1 = {?},
+ adr2 = {?},
+ adr3 = {?},
+ postcode = {?},
+ city = {?},
+ cityid = {?},
+ country = {?},
+ region = {?},
+ tel = {?},
+ fax = {?},
+ pub = {?},
+ tel_pub = {?},
+ datemaj = NOW(),
+ statut = {?}
+ WHERE uid = {?} AND adrid = {?}",
+ $adr['adr1'],
+ $adr['adr2'],
+ $adr['adr3'],
+ $adr['postcode'],
+ $adr['city'],
+ $adr['cityid'],
+ $adr['country'],
+ $adr['region'],
+ $adr['tel'],
+ $adr['fax'],
+ $adr['pub'],
+ $adr['tel_pub'],
+ $statut,
+ Session::getInt('uid', -1), $adrid
+ );
+ }// fin nouvelle / ancienne adresse
+ }//fin if nouvellement crée
+}//fin foreach
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$globals->xdb->execute("UPDATE auth_user_quick SET profile_medals_pub = {?} WHERE user_id = {?}", $medals_pub, Session::getInt('uid', -1));
+
+// vim:set et sws=4 sw=4 sts=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+for($i = 0; $i < 2; $i++){
+
+ $globals->xdb->execute("REPLACE INTO entreprises(uid,entrid,entreprise,secteur,ss_secteur,poste,fonction,adr1,adr2,adr3,postcode,city,country,region,tel,fax,mobile,pub, adr_pub, tel_pub, email, email_pub, web) ".
+ "VALUES ({?}, {?}, {?}, ".
+ "{?},".
+ "{?}".
+ ", {?}, {?}, ".
+ "{?}, {?}, {?}, {?}, ".
+ "{?}, {?}, ".
+ "{?}, {?}, {?}, {?}, ".
+ "{?}, {?}, {?}, ".
+ "{?}, {?}, {?})",
+ Session::getInt('uid', -1) , $i , $entreprise[$i] ,
+ ( ($secteur[$i] == "") ? null : $secteur[$i]), //sinon un faux 0 est rentre dans la base
+ ( ($ss_secteur[$i] == "") ? null : $ss_secteur[$i]),
+ $poste[$i], $fonction[$i],
+ $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $postcodepro[$i],
+ $citypro[$i], $countrypro[$i],
+ $regionpro[$i], $telpro[$i], $faxpro[$i], $mobilepro[$i],
+ $pubpro[$i], $adr_pubpro[$i], $tel_pubpro[$i],
+ $emailpro[$i], $email_pubpro[$i], $webpro[$i]);
+}
+$globals->xdb->execute("UPDATE auth_user_md5 set cv= {?} WHERE user_id = {?}", $cv, Session::getInt('uid', -1));
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+if ($appli_id1>0)
+ $globals->xdb->execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 0", Session::getInt('uid', -1), $appli_id1, $appli_type1);
+else
+ $globals->xdb->execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=0", Session::getInt('uid', -1));
+
+if ($appli_id2>0)
+ $globals->xdb->execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 1", Session::getInt('uid', -1), $appli_id2, $appli_type2);
+else
+ $globals->xdb->execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=1", Session::getInt('uid', -1));
+
+if ($nationalite != $nationalite_anc || $nom != $nom_anc || $prenom != $prenom_anc) {
+ $sql = "UPDATE auth_user_md5
+ SET nationalite= {?},
+ nom = {?},
+ prenom = {?} WHERE user_id= {?}";
+ $globals->xdb->execute($sql, $nationalite, $nom, $prenom, Session::getInt('uid', -1));
+}
+$globals->xdb->execute(
+ "UPDATE auth_user_quick SET
+ profile_nick={?},
+ profile_mobile={?}, profile_mobile_pub={?},
+ profile_web={?}, profile_web_pub={?},
+ profile_freetext={?}, profile_freetext_pub={?}
+ WHERE user_id = {?}",
+ $nickname,
+ $mobile, $mobile_pub,
+ $web, $web_pub,
+ $freetext, $freetext_pub,
+ Session::getInt('uid', -1));
+
+if ($nickname != $nickname_anc) {
+ require_once('user.func.inc.php');
+ user_reindex(Session::getInt('uid', -1));
+}
+$globals->xdb->execute("UPDATE photo SET pub = {?} WHERE uid = {?}", $photo_pub, Session::getInt('uid', -1));
+// vim:set et sws=4 sts=4 sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+//mise a jour d'expertise si nécessaire
+
+if($mentor_expertise != $mentor_expertise_bd) {
+ $globals->xdb->execute("REPLACE INTO mentor(uid, expertise) VALUES({?}, {?})", Session::getInt('uid', -1), $mentor_expertise);
+}
+
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$sql = "UPDATE auth_user_md5 set section= {?} WHERE user_id= {?}";
+
+$globals->xdb->execute($sql, $section, Session::getInt('uid', -1));
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+//rien a faire
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+function generate_new_adrid(){
+ global $adresses;
+ if(!isset($adresses)) //aucune adresses => retourne 1
+ return 1;
+ reset($adresses);
+ $i = 0;
+ $adrid_array = Array();
+ foreach($adresses as $numero => $adr){
+ $adrid_array[$i] = $numero;
+ $i++;
+ }
+ sort($adrid_array,SORT_NUMERIC); // classe les adrid dans l'ordre croissant
+ $new_adrid = 1;
+ while(list($key,$current_adrid) = each($adrid_array)){
+ if($current_adrid == $new_adrid)
+ $new_adrid++;
+ else
+ return $new_adrid; //s'ils sont differents, il y a un trou dans la liste des adrid donc new_adrid convient
+ }
+ //si aucun convient, on retourne le plus grand des adrid actuel + 1
+ return $new_adrid;
+}
+
+function replace_ifset_adr($varname, $i){
+ $tab = Env::getMixed($varname, Array());
+ if (isset($tab[$i]))
+ $GLOBALS['adresses'][$i][$varname] = $tab[$i];
+}
+
+function get_adr_arg($varname, $i) {
+ $tab = Env::getMixed($varname, Array());
+ return $tab[$i];
+}
+
+function set_flag_adr($varname,$i){
+ $tab = Env::getMixed($varname, Array());
+ if (isset($tab[$i])){
+ $GLOBALS['adresses'][$i][$varname] = 1;
+ }
+ else
+ $GLOBALS['adresses'][$i][$varname] = '0';
+}
+
+
+function replace_address($i){
+ global $adresses;
+ if(!isset($adresses[$i])){
+ $adresses[$i]['nouvelle'] = 'ajout';
+ $adresses[$i]['adrid'] = $i;
+ }
+
+ replace_ifset_adr('secondaire', $i);
+ set_flag_adr('courrier', $i);
+ replace_ifset_adr('temporaire', $i);
+ if(Env::getInt('adrid_active', $i+1) == $i)
+ $adresses[$i]['active'] = 1;
+ else
+ $adresses[$i]['active'] = 0;
+ replace_ifset_adr('adr1', $i);
+ replace_ifset_adr('adr2', $i);
+ replace_ifset_adr('adr3', $i);
+ replace_ifset_adr('postcode', $i);
+ replace_ifset_adr('city', $i);
+ replace_ifset_adr('cityid', $i);
+ replace_ifset_adr('country', $i);
+ replace_ifset_adr('region', $i);
+ replace_ifset_adr('tel', $i);
+ replace_ifset_adr('fax', $i);
+ replace_ifset_adr('pub', $i);
+ replace_ifset_adr('tel_pub', $i);
+ if (!get_adr_arg('parsevalid', $i)) replace_ifset_adr('txt', $i);
+ $tab = Env::getMixed('numero_formulaire', Array());
+ if($tab[$i])
+ $adresses[$i]['numero_formulaire'] = $tab[$i];
+ else
+ $adresses[$i]['numero_formulaire'] = -1;
+}
+
+function geoloc_adresse($i) {
+ global $adresses;
+ $change = Env::get('change'.$i);
+ if (get_adr_arg('parsevalid', $i) || ($adresses[$i]['txt'] && $change) || (!$adresses[$i]['cityid'])) {
+ require_once('geoloc.inc.php');
+ // erases the previous address (but not the phone or pub)
+ $adresses[$i] = array_merge($adresses[$i], empty_address());
+ // localize new address
+ $new = get_address_infos($adresses[$i]['txt']);
+ if (compare_addresses_text($adresses[$i]['txt'], $geotxt = get_address_text($new)) || get_adr_arg('parsevalid', $i))
+ $adresses[$i] = array_merge($adresses[$i], $new);
+ else {
+ $adresses[$i] = array_merge($adresses[$i], cut_address($adresses[$i]['txt']));
+ $adresses[$i]['geoloc'] = $geotxt;
+ $adresses[$i]['geoloc_cityid'] = $new['cityid'];
+ }
+ }
+ $adresses[$i]['txt'] = get_address_text($adresses[$i]);
+}
+
+//remplace par les eventuelles nouvelles valeurs :
+for ($adrid = 1; $adrid <= $nb_adr_max; $adrid++) {
+ $tab = Env::getMixed('adrid', Array());
+ if(isset($tab[$adrid])){ //cet adrid etait donc present dans le formulaire
+ replace_address($adrid);
+ }
+ if (isset($adresses[$adrid]['txt']))
+ geoloc_adresse($adrid);
+}
+
+if(Env::get('old_tab', '') == 'adresses' && Env::has('modifier')){ // on ne valide que qd on vient du formulaire
+$adresses_principales = 0;
+reset($adresses);
+foreach($adresses as $adrid => $adr) {
+ //validité de chaque adresse
+ $description = (($adr['numero_formulaire'] > 0)?"Adresse n°{$adr['numero_formulaire']}":"Nouvelle adresse");
+ if (strlen(strtok($adr['adr1'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['adr1']))
+ {
+ $str_error = $str_error."Le champ '$description - Ligne 1' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adr['adr2'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['adr2']))
+ {
+ $str_error = $str_error."Le champ '$description - Ligne 2' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adr['adr3'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['adr3']))
+ {
+ $str_error = $str_error."Le champ '$description - Ligne 3' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adr['postcode'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['postcode']))
+ {
+ $str_error = $str_error."Le champ '$description - Code Postal' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adr['city'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['postcode']))
+ {
+ $str_error = $str_error."Le champ '$description - Ville' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adr['tel'],"<>{}@&#~\/:;?,!§*_`[]|%$^=\"")) < strlen($adr['tel']))
+ {
+ $str_error = $str_error."Le champ '$description - Téléphone' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adr['fax'],"<>{}@&#~\/:;?,!§*_`[]|%$^=\"")) < strlen($adr['fax']))
+ {
+ $str_error = $str_error."Le champ '$description - Fax' contient un caractère interdit.<BR />";
+ }
+ if(!$adr['secondaire']){
+ if($adresses_principales == 1){ //deja une adresse principale
+ $str_error = $str_error."Tu ne peux avoir qu'une résidence principale.<BR />";
+ $adresses_principales++;//pour eviter de repeter le message plusieurs fois
+ }
+ else $adresses_principales = 1;
+ }
+}
+
+}
+
+//on vire les adresses vides :
+if(isset($adresses)){ // s'il y en a
+ reset($adresses);
+ foreach($adresses as $adrid => $adr){
+ if(is_adr_empty($adrid)){
+ delete_address($adrid);
+ }
+ }
+}
+//on génère une éventuelle nouvelle adresse
+if (!isset($adresses) || (count($adresses) < $nb_adr_max)){
+ $adrid = generate_new_adrid();
+ $adresses[$adrid]['adrid'] = $adrid;
+ $adr = &$adresses[$adrid];
+ $adr['adr1'] = '';
+ $adr['adr2'] = '';
+ $adr['adr3'] = '';
+ $adr['postcode'] = '';
+ $adr['city'] = '';
+ $adr['country'] = '00';
+ $adr['region'] = '';
+ $adr['tel'] = '';
+ $adr['fax'] = '';
+ $adr['secondaire'] = 1;
+ $adr['courrier'] = 0;
+ $adr['active'] = 0;
+ $adr['temporaire'] = 1;
+ $adr['pub'] = 'private';
+ $adr['tel_pub'] = 'private';
+ $adr['nouvelle'] = 'new'; //n'est pas issue d'un formulaire (sert dans update_adresses...)
+}
+
+unset($adr);
+unset($adrid);
+
+//tri des adresses :
+
+reset($adresses);
+$i = 1;
+foreach($adresses as $adrid_ => $adr_){
+ if(($adresses[$adrid_]['active']) && ($adr_['nouvelle'] != 'new')){
+ $ordre_des_adrid[$i] = $adrid_;
+ $i++;
+ $est_attribuee[$adrid_] = 1;
+ }
+ else
+ $est_attribuee[$adrid_] = 0;
+}
+
+reset($adresses);
+foreach($adresses as $adrid_ => $adr_){
+ if(($adresses[$adrid_]['secondaire'] == 0) && ($est_attribuee[$adrid_] == 0) && ($adr_['nouvelle'] != 'new')){ // principale et non attribuee
+ $ordre_des_adrid[$i] = $adrid_;
+ $i++;
+ $est_attribuee[$adrid_] = 1;
+ }
+}
+
+reset($adresses);
+foreach($adresses as $adrid_ => $adr_){
+ if(($adresses[$adrid_]['temporaire'] == 0) && ($est_attribuee[$adrid_] == 0) && ($adr_['nouvelle'] != 'new')){ // permanente et non attribuee
+ $ordre_des_adrid[$i] = $adrid_;
+ $i++;
+ $est_attribuee[$adrid_] = 1;
+ }
+}
+reset($adresses);
+foreach($adresses as $adrid_ => $adr_){
+ if($est_attribuee[$adrid_] == 0){ // non attribuee
+ $ordre_des_adrid[$i] = $adrid_;
+ $i++;
+ $est_attribuee[$adrid_] = 1;
+ }
+}
+
+$nb_adr = $i - 1;
+$page->assign_by_ref('ordre_adrid',$ordre_des_adrid);
+$page->assign('nb_adr',$nb_adr+1);
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+include_once('xorg.misc.inc.php');
+
+function set_flag_i(&$var,$var_name,$i){
+ $tab = Env::getMixed($var_name, Array());
+ if(isset($tab[$i])){
+ $var[$i] = 1;
+ }
+ else
+ $var[$i] = '0';
+}
+
+for($i = 0; $i < 2; $i++){
+replace_ifset_i($entreprise,"entreprise",$i);
+replace_ifset_i($poste,"poste",$i);
+replace_ifset_i($secteur,"secteur",$i);
+replace_ifset_i($ss_secteur,"ss_secteur",$i);
+replace_ifset_i($fonction,"fonction",$i);
+
+replace_ifset_i($adrpro1,"adrpro1",$i);
+replace_ifset_i($adrpro2,"adrpro2",$i);
+replace_ifset_i($adrpro3,"adrpro3",$i);
+replace_ifset_i($postcodepro,"postcodepro",$i);
+replace_ifset_i($citypro,"citypro",$i);
+replace_ifset_i($countrypro,"countrypro",$i);
+replace_ifset_i($regionpro,"regionpro",$i);
+replace_ifset_i($telpro,"telpro",$i);
+replace_ifset_i($faxpro,"faxpro",$i);
+replace_ifset_i($mobilepro,"mobilepro",$i);
+replace_ifset_i($pubpro,"pubpro",$i);
+replace_ifset_i($adr_pubpro,"adr_pubpro",$i);
+replace_ifset_i($tel_pubpro,"tel_pubpro",$i);
+replace_ifset_i($emailpro,"emailpro",$i);
+replace_ifset_i($email_pubpro,"email_pubpro",$i);
+replace_ifset_i($webpro,"webpro",$i);
+replace_ifset($cv,"cv");
+
+// validité de l'entreprise
+$j = $i+1;
+if (strlen(strtok($entreprise[$i],"<>{}#~;!§*`[]|%^=")) < strlen($entreprise[$i]))
+{
+$str_error = $str_error."Le champ 'Entreprise $j' contient un caractère interdit.<BR />";
+}
+
+//validité du poste
+if (strlen(strtok($poste[$i],"<>{}~?!§*`|%$^=+")) < strlen($poste[$i]))
+{
+$str_error = $str_error."Le champ 'Poste $j' contient un caractère interdit.<BR />";
+}
+
+//validité du CV
+if (strlen(strtok($cv,"<>{}~§`")) < strlen($cv))
+{
+ $str_error = $str_error."Le champ 'Curriculum vitae' contient un caractère interdit.<BR />";
+}
+
+// correction du champ web si vide
+if ($webpro[$i]=="http://" or $webpro[$i] == '') {
+ $webpro[$i]='';
+} elseif (!preg_match("{^(https?|ftp)://[a-zA-Z0-9._%#+/?=&~-]+$}i", $webpro[$i])) {
+ // validité de l'url donnée dans web
+ $page->trig("URL incorrecte dans le champ 'Page web', une url doit commencer par
+ http:// ou https:// ou ftp:// et ne pas contenir de caractères interdits");
+} else {
+ $webpro[$i] = str_replace('&', '&', $webpro[$i]);
+}
+
+// validité de l'e-mail
+if ($emailpro[$i]) {
+ $emailpro[$i] = strtolower(trim($emailpro[$i]));
+ if (!isvalid_email($emailpro[$i])) {
+ $page->trig("Adresse e-mail incorrecte dans le champ 'E-mail'");
+ }
+}
+
+if (strlen(strtok($adrpro1[$i],"<>{}@~?!§*`|%$^=+")) < strlen($adrpro1[$i]))
+ {
+ $str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 1' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adrpro2[$i],"<>{}@~?!§*`|%$^=+")) < strlen($adrpro2[$i]))
+ {
+ $str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 2' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($adrpro3[$i],"<>{}@~?!§*`|%$^=+")) < strlen($adrpro3[$i]))
+ {
+ $str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 3' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($postcodepro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($postcodepro[$i]))
+ {
+ $str_error = $str_error."Le champ 'Code Postal professionnel $j' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($citypro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($citypro[$i]))
+ {
+ $str_error = $str_error."Le champ 'Ville professionnelle $j' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($telpro[$i],"<>{}@&#~\/:;?,!§*_`[]|%$^=")) < strlen($telpro[$i]))
+ {
+ $str_error = $str_error."Le champ 'Téléphone professionnel $j' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($faxpro[$i],"<>{}@&#~\/:;?,!§*_`[]|%$^=")) < strlen($faxpro[$i]))
+ {
+ $str_error = $str_error."Le champ 'Fax professionnel $j' contient un caractère interdit.<BR />";
+ }
+ if (strlen(strtok($mobilepro[$i],"<>{}@&#~\/:;?,!§*_`[]|%$^=")) < strlen($mobilepro[$i]))
+ {
+ $str_error = $str_error."Le champ 'Mobile professionnel $j' contient un caractère interdit.<BR />";
+ }
+
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function strmatch_whole_words($nouveau, $ancien) {
+ $nouveau = strtoupper($nouveau);
+ $ancien = strtoupper($ancien);
+ $len_nouveau = strlen($nouveau);
+ return (($i = strpos($ancien, $nouveau)) !== false && ($i == 0 || $ancien{$i-1} == ' ' || $ancien{$i-1} == '-') && ($i + $len_nouveau == strlen($ancien) || $ancien{$i + $len_nouveau} == ' ' || $ancien{$i+$len_nouveau} == '-'));
+}
+
+// validite du nom
+if ($nom != $nom_anc &&
+ !strmatch_whole_words($nom_comp, $nom_anc_comp) &&
+ ($nom_anc_comp == $nom_ini || !strmatch_whole_words($nom_comp, $nom_ini))) {
+ $page->trig("Le nom que tu as choisi ($nom) est trop loin de ton nom initial ($nom_ini)".(($nom_ini==$nom_anc_comp)?"":" et de ton nom précédent ($nom_anc)"));
+}
+
+// validite du prenom
+if ($prenom != $prenom_anc &&
+ !strmatch_whole_words($prenom_comp, $prenom_anc_comp) &&
+ ($prenom_anc_comp == $prenom_ini || !strmatch_whole_words($prenom_comp, $prenom_ini))) {
+ $page->trig("Le prénom que tu as choisi ($prenom) est trop loin de ton prénom initial ($prenom_ini)".(($prenom_ini==$prenom_anc_comp)?"":" et de ton prénom précédent ($prenom_anc)"));
+}
+
+// validité du mobile
+if (strlen(strtok($mobile,"<>{}@&#~\/:;?,!§*_`[]|%$^=")) < strlen($mobile)) {
+ $page->trig("Le champ 'Téléphone mobile' contient un caractère interdit.");
+}
+
+// correction du champ web si vide
+if ($web=="http://" or $web == '') {
+ $web='';
+} elseif (!preg_match("{^(https?|ftp)://[a-zA-Z0-9._%#+/?=&~-]+$}i", $web)) {
+ // validité de l'url donnée dans web
+ $page->trig("URL incorrecte dans le champ 'Page web perso', une url doit commencer par
+ http:// ou https:// ou ftp:// et ne pas contenir de caractères interdits");
+} else {
+ $web = str_replace('&', '&', $web);
+}
+
+//validité du champ libre
+if (strlen(strtok($freetext,"<>")) < strlen($freetext))
+{
+ $page->trig("Le champ 'Complément libre' contient un caractère interdit.");
+}
+
+// vim:set et sws=4 sts=4 sw=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+//au cas ou le submit du formulaire vient d'un changement du nouveau secteur
+if(Post::has('mentor_expertise')){
+ $mentor_expertise = Post::get('mentor_expertise');
+ if(!empty($mentor_expertise)){
+ if (strlen(strtok($mentor_expertise,"<>{}~§`|%$^")) < strlen($mentor_expertise)){//TODO: affiner la liste
+ $page->trig("L'expertise contient un caractère interdit.");
+ }
+ }
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+//rien a faire
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xorg.misc.inc.php';
+
+// {{{ function user_cmp
+
+function user_cmp($prenom, $nom, $_prenom, $_nom)
+{
+ $_nom = strtoupper(replace_accent($_nom));
+ $_prenom = strtoupper(replace_accent($_prenom));
+ $nom = strtoupper(replace_accent($nom));
+ $prenom = strtoupper(replace_accent($prenom));
+
+ $is_ok = strtoupper($_prenom) == strtoupper($prenom);
+
+ $tokens = preg_split("/[ \-']/", $nom, -1, PREG_SPLIT_NO_EMPTY);
+ $maxlen = 0;
+
+ foreach ($tokens as $str) {
+ $is_ok &= strpos($_nom, $str)!==false;
+ $maxlen = max($maxlen, strlen($str));
+ }
+
+ return $is_ok && ($maxlen > 2 || $maxlen == strlen($_nom));
+}
+
+// }}}
+// {{{ function get_X_mat
+function get_X_mat($ourmat)
+{
+ if (!preg_match('/^[0-9]{8}$/', $ourmat)) {
+ // le matricule de notre base doit comporter 8 chiffres
+ return 0;
+ }
+
+ $year = intval(substr($ourmat, 0, 4));
+ $rang = intval(substr($ourmat, 5, 3));
+ if ($year < 1996) {
+ return;
+ } elseif ($year < 2000) {
+ $year = intval(substr(1900 - $year, 1, 3));
+ return sprintf('%02u0%03u', $year, $rang);
+ } else {
+ $year = intval(substr(1900 - $year, 1, 3));
+ return sprintf('%03u%03u', $year, $rang);
+ }
+}
+
+// }}}
+// {{{ function check_mat
+
+function check_mat($promo, $mat, $nom, $prenom, &$ourmat, &$ourid)
+{
+ global $globals;
+ if (!preg_match('/^[0-9][0-9][0-9][0-9][0-9][0-9]$/', $mat)) {
+ return "Le matricule doit comporter 6 chiffres.";
+ }
+
+ $year = intval(substr($mat, 0, 3));
+ $rang = intval(substr($mat, 3, 3));
+ if ($year > 200) { $year /= 10; };
+ if ($year < 96) {
+ return "ton matricule est incorrect";
+ } else {
+ $ourmat = sprintf('%04u%04u', 1900+$year, $rang);
+ }
+
+ $res = $globals->xdb->query(
+ 'SELECT user_id, promo, perms IN ("admin","user"), nom, prenom
+ FROM auth_user_md5
+ WHERE matricule={?} and deces = 0', $ourmat);
+ list ($uid, $_promo, $_already, $_nom, $_prenom) = $res->fetchOneRow();
+ if ($_already) { return "tu es déjà inscrit ou ton matricule est incorrect !"; }
+ if ($_promo != $promo) { return "erreur de matricule"; }
+
+ if (!user_cmp($prenom, $nom, $_prenom, $_nom)) {
+ return "erreur dans l'identification. Réessaie, il y a une erreur quelque part !";
+ }
+
+ $ourid = $uid;
+ return true;
+}
+
+// }}}
+// {{{ function check_old_mat
+
+function check_old_mat($promo, $mat, $nom, $prenom, &$ourmat, &$ourid)
+{
+ global $globals;
+
+ $res = $globals->xdb->iterRow(
+ 'SELECT user_id, nom, prenom, matricule
+ FROM auth_user_md5
+ WHERE promo={?} AND deces=0 AND perms="pending"', $promo);
+ while (list($_uid, $_nom, $_prenom, $_mat) = $res->next()) {
+ if (user_cmp($prenom, $nom, $_prenom, $_nom)) {
+ $ourid = $_uid;
+ $ourmat = $_mat;
+ return true;
+ }
+ }
+
+ $res = $globals->xdb->iterRow(
+ 'SELECT user_id, nom, prenom, matricule, alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON (u.user_id = a.id and FIND_IN_SET("bestalias", a.flags))
+ WHERE promo={?} AND deces=0 AND perms IN ("user","admin")', $promo);
+ while (list($_uid, $_nom, $_prenom, $_mat, $alias) = $res->next()) {
+ if (user_cmp($prenom, $nom, $_prenom, $_nom)) {
+ $ourid = $_uid;
+ $ourmat = $_mat;
+ return "Tu es vraissemblablement déjà inscrit !";
+ }
+ }
+ return "erreur: vérifie que tu as bien orthographié ton nom !";
+}
+
+// }}}
+// {{{ function check_new_user
+
+function check_new_user(&$sub)
+{
+ global $globals;
+ extract($sub);
+
+ $prenom = preg_replace("/[ \t]+/", ' ', trim($prenom));
+ $prenom = make_firstname_case($prenom);
+
+ $nom = preg_replace("/[ \t]+/", ' ', trim($nom));
+ $nom = strtoupper(replace_accent($nom));
+
+ if ($promo >= 1996) {
+ $res = check_mat($promo, $mat, $nom, $prenom, $ourmat, $ourid);
+ } else {
+ $res = check_old_mat($promo, $mat, $nom, $prenom, $ourmat, $ourid);
+ }
+ if ($res !== true) { return $res; }
+
+ $sub['nom'] = $nom;
+ $sub['prenom'] = $prenom;
+ $sub['ourmat'] = $ourmat;
+ $sub['uid'] = $ourid;
+
+ return true;
+}
+
+// }}}
+// {{{ function create_aliases
+
+function create_aliases (&$sub)
+{
+ global $globals;
+ extract ($sub);
+
+ $mailorg = make_username($prenom, $nom);
+ $mailorg2 = $mailorg.sprintf(".%02u", ($promo%100));
+ $forlife = make_forlife($prenom, $nom, $promo);
+
+ $res = $globals->xdb->query('SELECT COUNT(*) FROM aliases WHERE alias={?}', $forlife);
+ if ($res->fetchOneCell() > 0) {
+ return "Tu as un homonyme dans ta promo, il faut traiter ce cas manuellement.<br />".
+ "envoie un mail à <a href=\"mailto:support@polytechnique.org\">support@polytechnique.org</a> en expliquant ta situation.";
+ }
+
+ $res = $globals->xdb->query('SELECT id, type, expire FROM aliases WHERE alias={?}', $mailorg);
+
+ if ( $res->numRows() ) {
+
+ list($h_id, $h_type, $expire) = $res->fetchOneRow();
+ $res->free();
+
+ if ( $h_type != 'homonyme' and empty($expire) ) {
+ $globals->xdb->execute('UPDATE aliases SET expire=ADDDATE(NOW(),INTERVAL 1 MONTH) WHERE alias={?}', $mailorg);
+ $globals->xdb->execute('REPLACE INTO homonymes (homonyme_id,user_id) VALUES ({?},{?})', $h_id, $h_id);
+ $globals->xdb->execute('REPLACE INTO homonymes (homonyme_id,user_id) VALUES ({?},{?})', $h_id, $uid);
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id={?} AND expire IS NULL", $h_id);
+ $als = $res->fetchColumn();
+
+ require_once('diogenes/diogenes.hermes.inc.php');
+ $mailer = new HermesMailer();
+ $mailer->setFrom('"Support Polytechnique.org" <support@polytechnique.org>');
+ $mailer->addTo("$mailorg@polytechnique.org");
+ $mailer->setSubject("perte de ton alias $mailorg dans un mois !");
+ $mailer->addCc('"Support Polytechnique.org" <support@polytechnique.org>');
+ $msg =
+ "Un homonyme s'est inscrit, nous ne pouvons donc garder ton alias '$mailorg'.\n\n".
+ "Tu gardes tout de même l'usage de cet alias pour un mois encore à compter de ce jour.\n\n".
+ "Lorsque cet alias sera désactivé, l'adresse :\n".
+ " $mailorg@polytechnique.org\n".
+ "renverra vers un robot qui indique qu'il y a plusieurs personnes portant le même nom ;\n".
+ "cela évite que l'un des homonymes reçoive des courriels destinés à l'autre.\n\n".
+ "Pour te connecter au site, tu pourras utiliser comme identifiant n'importe lequel de tes autres alias :\n".
+ " ".join(', ', $als)."\n";
+ "Commence dès aujourd'hui à communiquer à tes correspondants la nouvelle adresse que tu comptes utiliser !\n\n".
+ "En nous excusant pour le désagrément occasionné,\n".
+ "cordialement,\n".
+ "-- \n".
+ "L'équipe de Polytechnique.org\n".
+ "\"Le portail des élèves & anciens élèves de l'X\"";
+ $mailer->SetTxtBody(wordwrap($msg,72));
+ $mailer->send();
+ }
+
+ $sub['forlife'] = $forlife;
+ $sub['bestalias'] = $mailorg2;
+ $sub['mailorg2'] = null;
+ } else {
+ $sub['forlife'] = $forlife;
+ $sub['bestalias'] = $mailorg;
+ $sub['mailorg2'] = $mailorg2;
+ }
+
+ return true;
+}
+
+// }}}
+// {{{ function finish_ins
+
+function finish_ins($sub_state)
+{
+ global $globals;
+ extract($sub_state);
+
+ $pass = rand_pass();
+ $pass_md5 = md5($pass_clair);
+ $hash = rand_url_id(12);
+
+ $globals->xdb->execute('UPDATE auth_user_md5 SET last_known_email={?} WHERE matricule = {?}', $email, $mat);
+
+ $globals->xdb->execute(
+ "REPLACE INTO register_pending (uid, forlife, bestalias, mailorg2, password, email, date, relance, naissance, hash)
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?}, NOW(), 0, {?}, {?})",
+ $uid, $forlife, $bestalias, $mailorg2, $pass_md5, $email, $naissance, $hash);
+
+ require_once('xorg.mailer.inc.php');
+ $mymail = new XOrgMailer('inscrire.mail.tpl');
+ $mymail->assign('mailorg', $bestalias);
+ $mymail->assign('lemail', $email);
+ $mymail->assign('pass', $pass);
+ $mymail->assign('baseurl', $globals->baseurl);
+ $mymail->assign('hash', $hash);
+ $mymail->assign('subj', $bestalias."@polytechnique.org");
+ $mymail->send();
+}
+
+// }}}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function _rss_encode_date($d) {
+ if (preg_match('/^\d{14}$/', $d)) {
+ $t = mktime(substr($d,8,2), substr($d,10,2), substr($d,12,2), substr($d,4,2), substr($d,6,2), substr($d,0,4));
+ } else {
+ $t = strtotime($d);
+ }
+ return utf8_encode(date('r', $t));
+}
+
+function to_rss ($s)
+{
+ if(is_string($s)) {
+ return utf8_encode($s);
+ } else {
+ return $s;
+ }
+}
+
+function init_rss($template)
+{
+ global $page, $globals;
+ new_nonhtml_page($template, AUTH_PUBLIC);
+ $page->register_modifier('rss_date', '_rss_encode_date');
+ $page->default_modifiers = Array('@to_rss');
+
+ if (preg_match(',^/([^/]+)/([^/]+)\.xml$,', $_SERVER['PATH_INFO'], $m)) {
+ $alias = $m[1];
+ $hash = $m[2];
+ $res = $globals->xdb->query(
+ 'SELECT a.id
+ FROM aliases AS a
+ INNER JOIN auth_user_quick AS q ON ( a.id = q.user_id AND q.core_rss_hash = {?} )
+ WHERE a.alias = {?} AND a.type != "homonyme"', $hash, $alias);
+ $uid = $res->fetchOneCell();
+ }
+ if (empty($uid)) { exit; }
+
+ header('Content-Type: application/rss+xml; charset=utf8');
+ return $uid;
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.plugin.inc.php');
+require_once("search/classes.inc.php");
+
+// {{{ class XOrgSearch
+
+class XOrgSearch extends XOrgPlugin
+{
+ // {{{ properties
+
+ var $_get_vars = Array('offset', 'order', 'order_inv', 'rechercher');
+ var $limit = 20;
+ var $order_defaut = 'promo';
+ // type of orders : (field name, default ASC, text name, auth)
+ var $orders = array(
+ 'nom' =>array('nom,prenom', true, 'nom', AUTH_PUBLIC),
+ 'promo' =>array('promo,nom', false, 'promotion', AUTH_PUBLIC),
+ 'date_mod' =>array('u.date,nom', false, 'dernière modification', AUTH_COOKIE)
+ );
+
+ // }}}
+ // {{{ function setNbLines()
+
+ function setNbLines($lines)
+ { $this->limit = $lines; }
+
+ // }}}
+ // {{{ function setAuth()
+
+ function setAuth()
+ {
+ foreach ($this->orders as $key=>$o) {
+ if ($o[3] == AUTH_COOKIE) {
+ $this->orders[$key][3] = logged();
+ } elseif ($o[3] == AUTH_PUBLIC) {
+ $this->orders[$key][3] = true;
+ } else {
+ $this->orders[$key][3] = identified();
+ }
+ }
+ }
+
+ // }}}
+ // {{{ function addOrder()
+
+ function addOrder($name, $field, $inv_order, $text, $auth, $defaut=false)
+ {
+ // reverse the array, to get the defaut order first
+ if ($defaut)
+ $this->orders = array_reverse($this->orders);
+ $this->orders[$name] = array($field, $inv_order, $text, $auth);
+ if ($defaut) {
+ $this->orders = array_reverse($this->orders);
+ $this->order_defaut = $name;
+ }
+ }
+
+ // }}}
+ // {{{ function show()
+
+ function show()
+ {
+ $this->setAuth();
+ global $page;
+
+ $offset = intval($this->get_value('offset'));
+ $tab = $this->orders[$this->get_value('order')];
+ if (!$tab || !$tab[3]) {
+ $tab = $this->orders[$this->order_defaut];
+ }
+ $order = $tab[0];
+ $order_inv = ($this->get_value('order_inv') != '') == $tab[1];
+
+ if ($order_inv && $order)
+ $sql_order = str_replace(",", " DESC,", $order)." DESC";
+ else $sql_order = $order;
+
+ list($list, $total) = call_user_func($this->_callback, $offset, $this->limit, $sql_order);
+
+ $page_max = intval(($total-1)/$this->limit);
+
+ $links = Array();
+ if ($offset) {
+ $links[] = Array('u'=> $this->make_url(Array('offset'=>$offset-1)), 'i' => $offset-1, 'text' => 'précédent');
+ }
+ for ($i = 0; $i <= $page_max ; $i++) {
+ $links[] = Array('u'=>$this->make_url(Array('offset'=>$i)), 'i' => $i, 'text' => $i+1);
+ }
+ if ($offset < $page_max) {
+ $links[] = Array ('u' => $this->make_url(Array('offset'=>$offset+1)), 'i' => $offset+1, 'text' => 'suivant');
+ }
+
+ $page->assign('search_results', $list);
+ $page->assign('search_results_nb', $total);
+ $page->assign('search_page', $offset);
+ $page->assign('search_pages_nb', $page_max+1);
+ $page->assign('search_pages_link', $links);
+
+ $order_links = Array();
+ foreach ($this->orders as $key=>$o) if ($o[3]) {
+ $order_links[] = Array(
+ "text" => $o[2],
+ "url" => $this->make_url(Array('order' => $key, 'order_inv' => ($o[0] == $order) && ($order_inv != $o[1]))),
+ "asc" => ($o[0] == $order) && $order_inv,
+ "desc" => ($o[0] == $order) && !$order_inv
+ );
+ }
+ $page->assign('search_order_link', $order_links);
+
+ return $total;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once("xorg.misc.inc.php");
+
+// {{{ Global variables used for the search Queries
+
+$globals->search->result_fields = '
+ u.user_id, u.promo, u.matricule, u.matricule_ax,
+ if(u.nom_usage=\'\', u.nom, u.nom_usage) AS NomSortKey,
+ u.nom_usage,u.date,
+ u.deces!=0 AS dcd,u.deces,
+ u.perms IN (\'admin\',\'user\') AS inscrit,
+ u.perms != \'pending\' AS wasinscrit,
+ FIND_IN_SET(\'femme\', u.flags) AS sexe,
+ a.alias AS forlife,
+ ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type,
+ ad1.text AS app1text, ad1.url AS app1url, ai1.type AS app1type,
+ es.label AS secteur, ef.fonction_fr AS fonction,
+ IF(n.nat=\'\',n.pays,n.nat) AS nat, n.a2 AS iso3166,';
+// hide private information if not logged
+if (logged())
+ $globals->search->result_fields .='
+ q.profile_web AS web,
+ q.profile_mobile AS mobile,
+ q.profile_freetext AS freetext,
+ adr.city, gp.pays AS countrytxt, gr.name AS region,
+ e.entreprise,';
+else
+ $globals->search->result_fields .="
+ IF(q.profile_web_pub='public', q.profile_web, '') AS web,
+ IF(q.profile_mobile_pub='public', q.profile_mobile, '') AS mobile,
+ IF(q.profile_freetext_pub='public', q.profile_freetext, '') AS freetext,
+ IF(adr.pub='public', adr.city, '') AS city,
+ IF(adr.pub='public', gp.pays, '') AS countrytxt,
+ IF(adr.pub='public', gr.name, '') AS region,
+ IF(e.pub='public', e.entreprise, '') AS entreprise,";
+$globals->search->result_where_statement = '
+ LEFT JOIN applis_ins AS ai0 ON (u.user_id = ai0.uid AND ai0.ordre = 0)
+ LEFT JOIN applis_def AS ad0 ON (ad0.id = ai0.aid)
+ LEFT JOIN applis_ins AS ai1 ON (u.user_id = ai1.uid AND ai1.ordre = 1)
+ LEFT JOIN applis_def AS ad1 ON (ad1.id = ai1.aid)
+ LEFT JOIN entreprises AS e ON (e.entrid = 0 AND e.uid = u.user_id)
+ LEFT JOIN emploi_secteur AS es ON (e.secteur = es.id)
+ LEFT JOIN fonctions_def AS ef ON (e.fonction = ef.id)
+ LEFT JOIN geoloc_pays AS n ON (u.nationalite = n.a2)
+ LEFT JOIN adresses AS adr ON (u.user_id = adr.uid AND FIND_IN_SET(\'active\',adr.statut))
+ 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)';
+
+// }}}
+// {{{ function display_lines()
+
+/**
+ * This function is a heuristic that approximatively tells
+ * how many lines of output the contact list will use.
+ */
+function display_lines($text)
+{
+ $n = 0;
+ $tokens = Array('<tr>', '<div class="nom">');
+ foreach ($tokens as $t) {
+ $i = -1;
+ while ( ($i = strpos($text,$t,$i+1))!==false) { $n++; }
+ }
+ return $n;
+}
+
+// }}}
+// {{{ class ThrowError
+
+/** handle errors for end-users queries
+ * assign the error message and runs the templates
+ *
+ * @author Jean-Sebastien Bedo
+ */
+class ThrowError
+{
+ /** constuctor
+ * @param $explain string the error (in natural language)
+ */
+ function ThrowError($explain)
+ {
+ global $page;
+ $page->trig_run('Erreur : '.$explain);
+ }
+}
+
+// }}}
+// {{{ class SField [Base class]
+
+/** classe de base représentant un champ de recherche
+ * (correspond à un champ du formulaire mais peut être à plusieurs champs de la bdd)
+ * interface étendue pour chaque type de champ particulier
+ */
+class SField
+{
+ // {{{ properties
+
+ /** le nom du champ dans le formulaire HTML */
+ var $fieldFormName;
+ /** champs de la bdd correspondant à ce champ sous forme d'un tableau */
+ var $fieldDbName;
+ /** champ résultat dans la requête MySQL correspondant à ce champ
+ * (alias utilisé pour la clause ORDER BY) */
+ var $fieldResultName;
+ /** valeur du champ instanciée par l'utilisateur */
+ var $value;
+
+ // }}}
+ // {{{ constructor
+
+ /** constructeur
+ * (récupère la requête de l'utilisateur pour ce champ) */
+ function SField($_fieldFormName, $_fieldDbName='', $_fieldResultName='')
+ {
+ $this->fieldFormName = $_fieldFormName;
+ $this->fieldDbName = $_fieldDbName;
+ $this->fieldResultName = $_fieldResultName;
+ $this->get_request();
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ /** récupérer la requête de l'utilisateur
+ * on met une chaîne vide si le champ n'a pas été complété */
+ function get_request()
+ {
+ $this->value = trim(Env::get($this->fieldFormName));
+ }
+
+ // }}}
+ // {{{ function get_where_statement()
+
+ /** récupérer la clause correspondant au champ dans la clause WHERE de la requête
+ * on parcourt l'ensemble des champs de la bdd de $fieldDbName et on associe
+ * à chacun d'entre eux une clause spécifique
+ * la clause totale et la disjonction de ces clauses spécifiques */
+ function get_where_statement()
+ {
+ if ($this->value=='') {
+ return false;
+ }
+ $res = implode(' OR ', array_filter(array_map(array($this, 'get_single_where_statement'), $this->fieldDbName)));
+ return empty($res) ? '' : "($res)";
+ }
+
+ // }}}
+ // {{{ function get_order_statement()
+
+ /** récupérer la clause correspondant au champ dans la clause ORDER BY de la requête
+ * utilisé par exemple pour placer d'abord le nom égal à la requête avant les approximations */
+ function get_order_statement()
+ {
+ return false;
+ }
+
+ // }}}
+ // {{{ function get_select_statement()
+
+ function get_select_statement()
+ {
+ return false;
+ }
+
+ // }}}
+ // {{{ function get_url()
+
+ /** récupérer le bout d'URL correspondant aux paramètres permettant d'imiter une requête d'un
+ * utilisateur assignant la valeur $this->value à ce champ */
+ function get_url()
+ {
+ if (empty($this->value)) {
+ return false;
+ } else {
+ return $this->fieldFormName.'='.urlencode($this->value);
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class QuickSearch [Google Like]
+
+class QuickSearch extends SField
+{
+ // {{{ properties
+
+ /** stores tokens */
+ var $strings;
+ /** stores numerical ranges */
+ var $ranges;
+
+ // }}}
+ // {{{ constructor
+
+ function QuickSearch($_fieldFormName)
+ {
+ $this->fieldFormName = $_fieldFormName;
+ $this->get_request();
+ if (preg_match(":[\]\[{}~/§_`|%$^=+]|\*\*:", $this->value)) {
+ new ThrowError('Un champ contient un caractère interdit rendant la recherche impossible.');
+ }
+ }
+
+ // }}}
+ // {{{ function isempty()
+
+ function isempty()
+ {
+ return empty($this->strings) && empty($this->ranges);
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request()
+ {
+ parent::get_request();
+ $s = replace_accent(trim($this->value));
+ $s = preg_replace('!\d+!', ' ', $s);
+ $s = str_replace('*','%',$s);
+ $this->strings = preg_split("![^a-zA-Z%]+!",$s, -1, PREG_SPLIT_NO_EMPTY);
+
+ $s = trim($this->value);
+ $s = preg_replace('! *- *!', '-', $s);
+ $s = preg_replace('!([<>]) *!', ' \1', $s);
+ $s = preg_replace('![^0-9\-><]!', ' ', $s);
+ $s = preg_replace('![<>\-] !', '', $s);
+ $ranges = preg_split('! +!', $s, -1, PREG_SPLIT_NO_EMPTY);
+ $this->ranges=Array();
+ foreach ($ranges as $r) {
+ if (preg_match('!^([<>]\d{4}|\d{4}(-\d{4})?)$!', $r)) $this->ranges[] = $r;
+ }
+ }
+
+ // }}}
+ // {{{ function get_where_statement()
+
+ function get_where_statement()
+ {
+ $where = Array();
+ foreach ($this->strings as $i => $s) {
+ $t = str_replace('*', '%', $s).'%';
+ $t = str_replace('%%', '%', $t);
+ $where[] = "sn$i.token LIKE '$t'";
+ }
+
+ $wherep = Array();
+ foreach ($this->ranges as $r) {
+ if (preg_match('!^\d{4}$!', $r)) {
+ $wherep[] = "u.promo=$r";
+ } elseif (preg_match('!^(\d{4})-(\d{4})$!', $r, $matches)) {
+ $p1=min(intval($matches[1]), intval($matches[2]));
+ $p2=max(intval($matches[1]), intval($matches[2]));
+ $wherep[] = "(u.promo>=$p1 AND u.promo<=$p2)";
+ } elseif (preg_match('!^<(\d{4})!', $r, $matches)) {
+ $wherep[] = "u.promo<={$matches[1]}";
+ } elseif (preg_match('!^>(\d{4})!', $r, $matches)) {
+ $wherep[] = "u.promo>={$matches[1]}";
+ }
+ }
+ if (!empty($wherep)) {
+ $where[] = '('.join(' OR ',$wherep).')';
+ }
+ return join(" AND ", $where);
+ }
+
+ // }}}
+ // {{{ get_select_statement
+ function get_select_statement()
+ {
+ $join = "";
+ foreach ($this->strings as $i => $s) {
+ $join .= "INNER JOIN search_name AS sn$i ON (u.user_id = sn$i.uid)\n";
+ }
+ return $join;
+ }
+ // }}}
+ // {{{ function get_order_statement()
+
+ function get_order_statement()
+ {
+ return false;
+ }
+
+ // }}}
+ // {{{ function get_score_statement
+
+ function get_score_statement()
+ {
+ $sum = array('0');
+ foreach ($this->strings as $i => $s) {
+ $sum[] .= "SUM(sn$i.score + IF('$s'=sn$i.token,5,0))";
+ }
+ return join('+', $sum).' AS score';
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class NumericSField [Integer fields]
+
+/** classe de champ numérique entier (offset par exemple)
+ */
+class NumericSField extends SField
+{
+ // {{{ constructor
+
+ /** constructeur
+ * (récupère la requête de l'utilisateur pour ce champ) */
+ function NumericSField($_fieldFormName)
+ {
+ $this->fieldFormName = $_fieldFormName;
+ $this->get_request();
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ /** récupère la requête de l'utilisateur et échoue s'il ne s'agit pas d'un entier */
+ function get_request()
+ {
+ parent::get_request();
+ if (empty($this->value)) {
+ $this->value = 0;
+ }
+ if (!preg_match("/^[0-9]+$/", $this->value)) {
+ new ThrowError('Un champ numérique contient des caractères alphanumériques.');
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class RefSField [ ??? ]
+
+class RefSField extends SField
+{
+ // {{{ properties
+
+ var $refTable;
+ var $refAlias;
+ var $refCondition;
+ var $exact = true;
+
+ // }}}
+ // {{{ constructor
+
+ function RefSField($_fieldFormName, $_fieldDbName='', $_refTable, $_refAlias, $_refCondition, $_exact=true)
+ {
+ $this->fieldFormName = $_fieldFormName;
+ $this->fieldDbName = $_fieldDbName;
+ $this->refTable = $_refTable;
+ $this->refAlias = $_refAlias;
+ $this->refCondition = $_refCondition;
+ $this->exact = $_exact;
+ $this->get_request();
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request() {
+ parent::get_request();
+ if ($this->value=='00' || $this->value=='0') {
+ $this->value='';
+ }
+ }
+
+ // }}}
+ // {{{ function too_large()
+
+ function too_large()
+ {
+ return ($this->value=='');
+ }
+
+ // }}}
+ // {{{ function compare()
+
+ function compare()
+ {
+ $val = addslashes($this->value);
+ return $this->exact ? "='$val'" : " LIKE '%$val%'";
+ }
+
+ // }}}
+ // {{{ function get_single_match_statement()
+
+ function get_single_match_statement($field)
+ {
+ return $field.$this->compare();
+ }
+
+ // }}}
+ // {{{ function get_single_where_statement()
+
+ function get_single_where_statement($field)
+ {
+ return $this->refTable=='' ? $this->get_single_match_statement($field) : false;
+ }
+
+ // }}}
+ // {{{ function get_select_statement()
+
+ function get_select_statement()
+ {
+ if ($this->value=='' || $this->refTable=='') {
+ return false;
+ }
+ $res = implode(' OR ', array_filter(array_map(array($this, 'get_single_match_statement'), $this->fieldDbName)));
+ return "INNER JOIN {$this->refTable} AS {$this->refAlias} ON ({$this->refCondition} AND ($res) )";
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class RefWithSoundexSField [ ??? ]
+
+class RefWithSoundexSField extends RefSField
+{
+ // {{{ function compare()
+
+ function compare()
+ {
+ return "='".soundex_fr($this->value)."'";
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class StringSField [String fields]
+
+/** classe de champ texte (nom par exemple)
+ */
+class StringSField extends SField
+{
+ // {{{ function get_request()
+
+ /** récupère la requête de l'utilisateur et échoue si la chaîne contient des caractères
+ * interdits */
+ function get_request()
+ {
+ parent::get_request();
+ if (preg_match(":[\]\[<>{}~/§_`|%$^=+]|\*\*:", $this->value)) {
+ new ThrowError('Un champ contient un caractère interdit rendant la recherche impossible.');
+ }
+ }
+
+ // }}}
+ // {{{ function length()
+
+ /** donne la longueur de la requête de l'utilisateur
+ * (au sens strict i.e. pas d'* ni d'espace ou de trait d'union -> les contraintes réellement
+ * imposées par l'utilisateur) */
+ function length()
+ {
+ global $lc_accent,$uc_accent;
+ return strlen($this->value) - strlen(ereg_replace('[a-z'.$lc_accent.$uc_accent.']', '', strtolower($this->value)));
+ }
+
+ // }}}
+ // {{{ function too_large()
+
+ function too_large()
+ {
+ return ($this->length()<2);
+ }
+
+ // }}}
+ // {{{ function get_single_where_statement()
+
+ /** clause WHERE correspondant à un champ de la bdd et à ce champ de formulaire
+ * @param field nom de champ de la bdd concerné par la clause */
+ function get_single_where_statement($field)
+ {
+ $regexp = strtr(addslashes($this->value), '-*', '_%');
+ return "$field LIKE '$regexp%'";
+ }
+
+ // }}}
+ // {{{ function get_order_statement()
+
+ /** clause ORDER BY correspondant à ce champ de formulaire */
+ function get_order_statement()
+ {
+ if ($this->value!='' && $this->fieldResultName!='') {
+ return "{$this->fieldResultName}!='".addslashes($this->value)."'";
+ } else {
+ return false;
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class NameSField [Names : serach 'n%' + '% b']
+
+/** classe pour les noms : on cherche en plus du like 'foo%' le like '% foo' (particules)
++*/
+class NameSField extends StringSField
+{
+ // {{{ function get_single_where_statement()
+
+ function get_single_where_statement($field)
+ {
+ $regexp = strtr(addslashes($this->value), '-*', '_%');
+ return "$field LIKE '$regexp%' OR $field LIKE '% $regexp%' OR $field LIKE '%-$regexp%'";
+ }
+
+ // }}}
+ // {{{ function get_order_statement()
+
+ function get_order_statement()
+ {
+ if ($this->value!='' && $this->fieldResultName!='') {
+ return "{$this->fieldResultName} NOT LIKE '".addslashes($this->value)."'";
+ } else {
+ return false;
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class StringWithSoundexSField [Strings + soundex]
+
+/** classe de champ texte avec soundex (nom par exemple)
+ */
+class StringWithSoundexSField extends StringSField
+{
+ // {{{ function get_single_where_statement()
+
+ /** clause WHERE correspondant à un champ de la bdd et à ce champ de formulaire
+ * @param field nom de champ de la bdd concerné par la clause */
+ function get_single_where_statement($field) {
+ return $field.'="'.soundex_fr($this->value).'"';
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class PromoSField [Prom field]
+
+/** classe de champ de promotion */
+class PromoSField extends SField
+{
+ // {{{ properties
+
+ /** opérateur de comparaison (<,>,=) de la promo utilisé pour ce champ de formulaire */
+ var $compareField;
+
+ // }}}
+ // {{{ constructor
+
+ /** constructeur
+ * compareField est un champ de formulaire très simple qui ne sert qu'à la construction de la
+ * clause WHERE de la promo */
+ function PromoSField($_fieldFormName, $_compareFieldFormName, $_fieldDbName, $_fieldResultName)
+ {
+ parent::SField($_fieldFormName, $_fieldDbName, $_fieldResultName);
+ $this->compareField = new SField($_compareFieldFormName);
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ /** récupère la requête utilisateur et échoue si le champ du formulaire ne représente pas une
+ * promotion (nombre à 4 chiffres) */
+ function get_request()
+ {
+ parent::get_request();
+ if (preg_match('/^[0-9]{2}$/', $this->value)){
+ $this->value = intval($this->value) + 1900;
+ }
+ if (!(empty($this->value) or preg_match('/^[0-9]{4}$/', $this->value))) {
+ new ThrowError('La promotion est une année à quatre chiffres.');
+ }
+ }
+
+ // }}}
+ // {{{ function is_a_single_promo()
+
+ /** teste si la requête est de la forme =promotion -> contrainte forte imposée -> elle suffit
+ * pour autoriser un affichage des résultats alors que <promotion est insuffisant */
+ function is_a_single_promo()
+ {
+ return ($this->compareField->value=='=' && $this->value!='');
+ }
+
+ // }}}
+ // {{{ function too_large()
+
+ function too_large()
+ {
+ return !$this->is_a_single_promo();
+ }
+
+ // }}}
+ // {{{ function get_single_where_statement()
+
+ /** clause WHERE correspondant à ce champ */
+ function get_single_where_statement($field)
+ {
+ return $field.$this->compareField->value.$this->value;
+ }
+
+ // }}}
+ // {{{ function get_url()
+
+ /** récupérer le bout d'URL correspondant aux paramètres permettant d'imiter une requête
+ * d'un utilisateur assignant la valeur $this->value à ce champ et assignant l'opérateur de
+ * comparaison adéquat */
+ function get_url()
+ {
+ if (!($u=parent::get_url())) {
+ return false;
+ }
+ return $u.'&'.$this->compareField->get_url();
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class SFieldGroup [Group fields]
+
+/** classe groupant des champs de formulaire de recherche */
+class SFieldGroup
+{
+ // {{{ properties
+
+ /** tableau des classes correspondant aux champs groupés */
+ var $fields;
+ /** type de groupe : ET ou OU */
+ var $and;
+
+ // }}}
+ // {{{ constuctor
+
+ /** constructeur */
+ function SFieldGroup($_and, $_fields)
+ {
+ $this->fields = $_fields;
+ $this->and = $_and;
+ }
+
+ // }}}
+ // {{{ function too_large()
+
+ function too_large()
+ {
+ $b = true;
+ for ($i=0; $b && $i<count($this->fields); $i++) {
+ $b &= $this->fields[$i]->too_large();
+ }
+ return $b;
+ }
+
+ // }}}
+ // {{{ function field_get_select()
+
+ function field_get_select($f)
+ {
+ return $f->get_select_statement();
+ }
+
+ // }}}
+ // {{{ function field_get_where()
+
+ /** récupérer la clause WHERE d'un objet champ de recherche */
+ function field_get_where($f)
+ {
+ return $f->get_where_statement();
+ }
+
+ // }}}
+ // {{{ function field_get_order()
+
+ /** récupérer la clause ORDER BY d'un objet champ de recherche */
+ function field_get_order($f)
+ {
+ return $f->get_order_statement();
+ }
+
+ // }}}
+ // {{{ function field_get_url()
+
+ /** récupérer le bout d'URL correspondant à un objet champ de recherche */
+ function field_get_url($f)
+ {
+ return $f->get_url();
+ }
+
+ // }}}
+ // {{{ function get_select_statement()
+
+ function get_select_statement()
+ {
+ return implode(' ', array_filter(array_map(array($this, 'field_get_select'), $this->fields)));
+ }
+
+ // }}}
+ // {{{ function get_where_statement()
+
+ /** récupérer la clause WHERE du groupe de champs = conjonction (ET) ou disjonction (OU) de
+ * clauses des champs élémentaires */
+ function get_where_statement()
+ {
+ $joinText = $this->and ? ' AND ' : ' OR ';
+ $res = implode($joinText, array_filter(array_map(array($this, 'field_get_where'), $this->fields)));
+ return $res == '' ? '' : "($res)";
+ }
+
+ // }}}
+ // {{{ function get_order_statement()
+
+ /** récupérer la clause ORDER BY du groupe de champs = conjonction (ET) ou disjonction (OU) de
+ * clauses des champs élémentaires */
+ function get_order_statement()
+ {
+ $order = array_filter(array_map(array($this, 'field_get_order'), $this->fields));
+ return count($order)>0 ? implode(',', $order) : false;
+ }
+
+ // }}}
+ // {{{ function get_url()
+
+ /** récupérer le bout d'URL correspondant à ce groupe de champs = concaténation des bouts d'URL
+ * des champs élémentaires */
+ function get_url($others=Array())
+ {
+ $url = array_filter(array_map(array($this, 'field_get_url'), $this->fields));
+ foreach ($url as $key=>$val) {
+ if (empty($val)) {
+ unset($url[$key]);
+ }
+ }
+ foreach ($others as $key=>$val) {
+ if (!empty($val)) {
+ $url[] = "$key=$val";
+ }
+ }
+ return count($url)>0 ? implode('&', $url) : false;
+ }
+
+ // }}}
+}
+
+// }}}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+function select_secteur($secteur){
+ global $globals;
+ if ($secteur == '') {
+ $secteur = -1;
+ }
+ $html = "<option value=\"\" ". (($secteur == '')?"selected='selected'":"") ."> </option>\n";
+ $res = $globals->xdb->iterRow("SELECT id, label FROM emploi_secteur");
+ while (list($tmp_id, $tmp_label) = $res->next()) {
+ $html .= "<option value=\"$tmp_id\" " . (($secteur == $tmp_id)?"selected='selected'":"") . ">$tmp_label</option>\n";
+ }
+ return $html;
+}
+
+function select_ss_secteur($secteur,$ss_secteur){
+ global $globals;
+ if ($secteur) {
+ $html = "<option value=\"\"> </option>\n";
+ $res = $globals->xdb->iterRow("SELECT id, label FROM emploi_ss_secteur WHERE secteur = {?}", $secteur);
+ while (list($tmp_id, $tmp_label) = $res->next()){
+ $html .= "<option value=\"$tmp_id\" ". (($ss_secteur == $tmp_id)?"selected='selected'":"") .">$tmp_label</option>\n";
+ }
+ return $html;
+ }
+ else{
+ return "<option value=\"\" selected='selected'> </option>\n";
+ }
+}
+
+//fonctions pour smarty
+function _select_secteur_smarty($params){
+ return select_secteur($params['secteur']);
+}
+
+function _select_ss_secteur_smarty($params){
+ return select_ss_secteur($params['secteur'], $params['ss_secteur']);
+}
+$page->register_function('select_secteur', '_select_secteur_smarty');
+$page->register_function('select_ss_secteur', '_select_ss_secteur_smarty');
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+require_once("xorg.inc.php");
+
+require_once('user.func.inc.php');
+
+function get_user_ax($uid, $raw=false)
+{
+ require_once('webservices/ax/client.inc');
+
+ global $globals;
+
+ $res = $globals->xdb->query(
+ "SELECT matricule_ax
+ FROM auth_user_md5 AS u
+ WHERE u.user_id = {?}", $uid);
+ $matricule_ax = $res->fetchOneCell();
+
+ $ancien = recupere_infos_ancien($matricule_ax);
+
+ $userax = Array();
+ $userax['matricule_ax'] = $matricule_ax;
+ $userax['uid'] = $uid;
+
+ $userax['nom'] = $ancien->Nom_patr();
+ $userax['nom_usage'] = $ancien->Nom_usuel();
+ if ($userax['nom_usage'] == $userax['nom']) $userax['nom_usage'] = '';
+ $userax['prenom'] = $ancien->Prenom();
+ $userax['sexe'] = ($ancien->Civilite() != 'M')?1:0;
+ $userax['promo'] = $ancien->Promo();
+ $userax['nationalite'] = $ancien->Nationalite();
+ if ($userax['nationalite'] == 'F') $userax['nationalite'] = 'Français';
+ //$userax['date'] = substr($ancien[12], 0, 10);
+ $userax['mobile'] = $ancien->Mobile(0);
+ if ($ancien->Corps() == 'D' || $ancien->Corps() == 'Z') {
+ $userax['applis_join'] = "pas un corps";
+ } else {
+ $userax['applis_join'] = "Corps ".$ancien->Corps()." - ".$ancien->Grade();
+ }
+ $userax['adr_pro'] = array();
+
+ for ($i = 0; $i < $ancien->Num_Activite(); $i++) {
+ $jobax = array();
+ $jobax['entreprise'] = $ancien->Entreprise($i);
+ $jobax['fonction'] = $ancien->Fonction($i);
+ $jobax['adr1'] = $ancien->Adresse_act_adresse1($i);
+ $jobax['adr2'] = $ancien->Adresse_act_adresse2($i);
+ $jobax['adr3'] = $ancien->Adresse_act_adresse3($i);
+ $jobax['postcode'] = $ancien->Adresse_act_code_pst($i);
+ $jobax['city'] = $ancien->Adresse_act_ville($i);
+ $jobax['region'] = $ancien->Adresse_act_etat_region($i);
+ $jobax['country'] = $ancien->Adresse_act_pays($i);
+ $jobax['tel'] = $ancien->Adresse_act_tel($i);
+ $jobax['fax'] = $ancien->Adresse_act_fax($i);
+ $jobax['mobile'] = $ancien->Adresse_act_mobile($i);
+ $userax['adr_pro'][] = $jobax;
+ }
+
+ $userax['adr'] = array();
+ foreach ($array['dump']['adresse'] as $adr) {
+ $adrax = array();
+ $adrax['adr1'] = $ancien->Adresse1($i);
+ $adrax['adr2'] = $ancien->Adresse2($i);
+ $adrax['adr3'] = $ancien->Adresse3($i);
+ $adrax['postcode'] = $ancien->Code_pst($i);
+ $adrax['city'] = $ancien->Ville($i);
+ $adrax['region'] = $ancien->Etat_region($i);
+ $adrax['country'] = $ancien->Pays($i);
+ $adrax['tel'] = $ancien->Tel($i);
+ $adrax['fax'] = $ancien->Fax($i);
+ $userax['adr'][] = $adrax;
+ }
+ if ($raw) {
+ $userax['raw'] = $ancien;
+ }
+
+ return $userax;
+}
+
+function import_from_ax($userax, $nom_usage=false, $mobile=false, $del_address=null, $add_address=null, $del_pro=null, $add_pro=null, $nationalite=false)
+{
+ global $globals;
+
+ if ($nom_usage) {
+ $globals->xdb->execute("UPDATE auth_user_md5 SET nom_usage = {?} WHERE user_id = {?}", strtoupper($userax['nom_usage']), $userax['uid']);
+ }
+
+ if ($mobile) {
+ $globals->xdb->execute("UPDATE auth_user_quick SET profile_mobile = {?} WHERE user_id = {?}", $userax['mobile'], $userax['uid']);
+ }
+
+ if ($nationalite) {
+ if ($userax['nationalite'] == 'Français') {
+ $userax['nationalite'] = 'FR';
+ }
+ $globals->xdb->execute("UPDATE auth_user_md5 SET nationalite = {?} WHERE user_id = {?}", $userax['nationalite'], $userax['uid']);
+ }
+ if (is_array($del_address)) foreach($del_address as $adrid) {
+ $globals->xdb->execute("DELETE FROM adresses WHERE uid = {?} AND adrid = {?}", $userax['uid'], $adrid);
+ }
+
+ if (is_array($del_pro)) foreach($del_pro as $entrid) {
+ $globals->xdb->execute("DELETE FROM entreprises WHERE uid = {?} AND entrid = {?}", $userax['uid'], $entrid);
+ }
+
+ if (is_array($add_address)) {
+
+ $res = $globals->xdb->query(
+ "SELECT adrid
+ FROM adresses
+ WHERE uid = {?} AND adrid >= 1
+ ORDER BY adrid",
+ $userax['uid']);
+ $adrids = $res->fetchColumn();
+ $i_adrid = 0;
+ $new_adrid = 1;
+
+ foreach($add_address as $adrid) {
+
+ $adr = $userax['adr'][$adrid];
+
+ // find the next adrid not used
+ while ($adrids[$i_adrid] == $new_adrid) {
+ $i_adrid++;
+ $new_adrid++;
+ }
+
+ if ($adr['city']) {
+
+ $res = $globals->xdb->query(
+ "SELECT a2 FROM geoloc_pays
+ WHERE pays LIKE {?} OR country LIKE {?}",
+ $adr['country'], $adr['country']);
+
+ $a2 = $res->fetchOneCell();
+ }
+ if (!$a2) { $a2 = '00'; }
+
+ $globals->xdb->execute(
+ "INSERT INTO adresses
+ SET uid = {?}, adrid = {?},
+ adr1 = {?}, adr2 = {?}, adr3 = {?},
+ postcode = {?}, city = {?},
+ country = {?},
+ tel = {?}, fax = {?},
+ datemaj = NOW(),
+ pub = 'ax',
+ tel_pub = 'ax'",
+ $userax['uid'], $new_adrid,
+ $adr['adr1'], $adr['adr2'], $adr['adr3'],
+ $adr['postcode'], $adr['city'],
+ $a2,
+ $adr['tel'], $adr['fax']);
+ }
+ }
+
+ if (is_array($add_pro)) {
+
+ $res = $globals->xdb->query(
+ "SELECT entrid FROM entreprises
+ WHERE uid = {?} AND entrid >= 1 ORDER BY entrid",
+ $userax['uid']);
+ $entrids = $res->fetchColumn();
+ $i_entrid = 0;
+ $new_entrid = 1;
+
+ $nb_entr = count($entrids);
+
+ foreach($add_pro as $entrid) if ($nb_entr < 2) {
+
+ $nb_entr++;
+
+ $pro = $userax['adr_pro'][$entrid];
+
+ // find the next adrid not used
+ while ($entrids[$i_entrid] == $new_entrid) {
+ $i_entrid++;
+ $new_entrid++;
+ }
+
+ if ($pro['country']) {
+ $res = $globals->xdb->query(
+ "SELECT a2 FROM geoloc_pays
+ WHERE pays LIKE {?} OR country LIKE {?}",
+ $pro['country'], $pro['country']);
+ $a2 = $res->fetchOneCell();
+ }
+ if (!$a2) { $a2 = '00'; }
+
+ $globals->xdb->execute(
+ "INSERT INTO entreprises
+ SET uid = {?}, entrid = {?},
+ entreprise = {?}, poste = {?},
+ adr1 = {?}, adr2 = {?}, adr3 = {?},
+ postcode = {?}, city = {?},
+ country = {?},
+ tel = {?}, fax = {?},
+ pub = 'ax', adr_pub = 'ax', tel_pub = 'ax'",
+ $userax['uid'], $new_entrid,
+ $pro['entreprise'], $pro['fonction'],
+ $pro['adr1'], $pro['adr2'], $pro['adr3'],
+ $pro['postcode'], $pro['city'],
+ $a2,
+ $pro['tel'], $pro['fax']);
+ }
+ }
+}
+
+function copy_from_ax($uid)
+{
+ $uax = get_user_ax($uid);
+ import_from_ax($uax, false, true, null, array_keys($uax['adr']), null, array_keys($uax['adr_pro']), true);
+}
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+$tabname_array = Array(
+ "general" => "Informations\ngénérales",
+ "adresses" => "Adresses\npersonnelles",
+ "poly" => "Informations\npolytechniciennes",
+ "deco" => "Décorations\nMédailles",
+ "emploi" => "Informations\nprofessionnelles",
+ "skill" => "Compétences\ndiverses",
+ "mentor" => "Mentoring"
+);
+
+$opened_tab = 'general';
+
+$page->assign("onglets",$tabname_array);
+$page->assign("onglet_last",'mentor');
+
+function get_last_tab(){
+ end($GLOBALS['tabname_array']);
+ return key($GLOBALS['tabname_array']);
+}
+
+function get_next_tab($tabname){
+ global $tabname_array;
+ reset($tabname_array);
+ $marker = false;
+ while(list($current_tab,$current_tab_desc) = each($tabname_array)){
+ if($current_tab == $tabname){
+ $res = key($tabname_array);// each() sets key to the next element
+ if($res != NULL)// if it was the last call of each(), key == NULL => we return the first key
+ return $res;
+ else{
+ reset($tabname_array);
+ return key($tabname_array);
+ }
+ }
+ }
+ // We should not arrive to this point, but at least, we return the first key
+ reset($tabname_array);
+ return key($tabname_array);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('xorg.plugin.inc.php');
+
+// {{{ class Trombi
+
+class Trombi extends XOrgPlugin
+{
+ // {{{ properties
+
+ var $_get_vars = Array('offset');
+ var $limit = 24;
+ var $admin = false;
+ var $showpromo = true;
+
+ // }}}
+ // {{{ function setNbRows()
+
+ function setNbRows($row)
+ { $this->limit = $row*3; }
+
+ // }}}
+ // {{{ function setAdmin()
+
+ function setAdmin()
+ { $this->admin = true; }
+
+ // }}}
+ // {{{ function hidePromo()
+
+ function hidePromo()
+ { $this->showpromo = false; }
+
+ // }}}
+ // {{{ function show()
+
+ function show()
+ {
+ /* this point is nasty... but since show() is called from the template ...
+ * I can't see any more clever way to achieve that
+ */
+ global $page;
+
+ $offset = intval($this->get_value('offset'));
+ list($total, $list) = call_user_func($this->_callback, $offset, $this->limit);
+ $page_max = intval(($total-1)/$this->limit);
+
+ $links = Array();
+ if ($offset) {
+ $links[] = Array('u'=> $this->make_url($offset-1), 'i' => $offset-1, 'text' => 'précédent');
+ }
+ for ($i = 0; $i <= $page_max ; $i++) {
+ $links[] = Array('u'=>$this->make_url($i), 'i' => $i, 'text' => $i+1);
+ }
+ if ($offset < $page_max) {
+ $links[] = Array ('u' => $this->make_url($offset+1), 'i' => $offset+1, 'text' => 'suivant');
+ }
+
+ $page->assign_by_ref('trombi_show_promo', $this->showpromo);
+ $page->assign_by_ref('trombi_list', $list);
+ $page->assign_by_ref('trombi_links', $links);
+ $page->assign('trombi_admin', $this->admin);
+ return $page->fetch('include/trombi.tpl');
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ function user_clear_all_subs()
+/** kills the inscription of a user.
+ * we still keep his birthdate, adresses, and personnal stuff
+ * kills the entreprises, mentor, emails and lists subscription stuff
+ */
+function user_clear_all_subs($user_id, $really_del=true)
+{
+ // keep datas in : aliases, adresses, applis_ins, binets_ins, contacts, groupesx_ins, homonymes, identification_ax, photo
+ // delete in : auth_user_md5, auth_user_quick, competences_ins, emails, entreprises, langues_ins, mentor,
+ // mentor_pays, mentor_secteurs, newsletter_ins, perte_pass, requests, user_changes, virtual_redirect, watch_sub
+ // + delete maillists
+
+ global $globals;
+ $uid = intval($user_id);
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE type='a_vie' AND id={?}", $uid);
+ $alias = $res->fetchOneCell();
+
+ if ($really_del) {
+ $globals->xdb->execute("DELETE FROM emails WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM newsletter_ins WHERE user_id={?}", $uid);
+ }
+
+ $globals->xdb->execute("DELETE FROM virtual_redirect WHERE redirect = {?}", $alias.'@'.$globals->mail->domain);
+ $globals->xdb->execute("DELETE FROM virtual_redirect WHERE redirect = {?}", $alias.'@'.$globals->mail->domain2);
+
+ $globals->xdb->execute("UPDATE auth_user_md5 SET password='',smtppass='' WHERE user_id={?}", $uid);
+ $globals->xdb->execute("UPDATE auth_user_quick SET watch_flags='' WHERE user_id={?}", $uid);
+
+ $globals->xdb->execute("DELETE FROM competences_ins WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM entreprises WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM langues_ins WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM mentor_pays WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM mentor_secteur WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM mentor WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM perte_pass WHERE uid={?}", $uid);
+ $globals->xdb->execute("DELETE FROM requests WHERE user_id={?}", $uid);
+ $globals->xdb->execute("DELETE FROM user_changes WHERE user_id={?}", $uid);
+ $globals->xdb->execute("DELETE FROM watch_sub WHERE uid={?}", $uid);
+
+ include_once('lists.inc.php');
+ if (function_exists(lists_xmlrpc)) {
+ $client =& lists_xmlrpc(Session::getInt('id'), Session::get('password'));
+ $client->kill($alias, $really_del);
+ }
+}
+
+// }}}
+// {{{ function get_user_login()
+
+function get_user_login($data, $get_forlife = false) {
+ global $globals, $page;
+
+ if (preg_match(',^[0-9]*$,', $data)) {
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE type='a_vie' AND id={?}", $data);
+ if ($res->numRows()) {
+ return $res->fetchOneCell();
+ } else {
+ $page->trig("il n'y a pas d'utilisateur avec cet id");
+ return false;
+ }
+ }
+
+ $data = trim(strtolower($data));
+
+ if (strstr($data, '@')===false) {
+ $data = $data.'@'.$globals->mail->domain;
+ }
+
+ list($mbox, $fqdn) = split('@', $data);
+ if ($fqdn == $globals->mail->domain || $fqdn == $globals->mail->domain2) {
+
+ $res = $globals->xdb->query("SELECT a.alias
+ FROM aliases AS a
+ INNER JOIN aliases AS b ON (a.id = b.id AND b.type IN ('alias', 'a_vie') AND b.alias={?})
+ WHERE a.type = 'a_vie'", $mbox);
+ if ($res->numRows()) {
+ return $get_forlife ? $res->fetchOneCell() : $mbox;
+ } else {
+ $page->trig("il n'y a pas d'utilisateur avec ce login");
+ return false;
+ }
+
+ } elseif ($fqdn == $globals->mail->alias_dom || $fqdn == $globals->mail->alias_dom2) {
+
+ $res = $globals->xdb->query("SELECT redirect
+ FROM virtual_redirect
+ INNER JOIN virtual USING(vid)
+ WHERE alias={?}", $mbox.'@'.$globals->mail->alias_dom);
+ if ($redir = $res->fetchOneCell()) {
+ list($alias) = split('@', $redir);
+ } else {
+ $page->trig("il n'y a pas d'utilisateur avec cet alias");
+ $alias = false;
+ }
+ return $alias;
+
+ } else {
+
+ $res = $globals->xdb->query("SELECT alias
+ FROM aliases AS a
+ INNER JOIN emails AS e ON e.uid=a.id
+ WHERE e.email={?} AND a.type='a_vie'", $data);
+ switch ($i = $res->numRows()) {
+ case 0:
+ $page->trig("il n'y a pas d'utilisateur avec cette addresse mail");
+ return false;
+
+ case 1:
+ return $res->fetchOneCell();
+
+ default:
+ if (has_perms()) {
+ $aliases = $res->fetchColumn();
+ $page->trig("Il y a $i utilisateurs avec cette adresse mail : ".join(', ', $aliases));
+ } else {
+ $res->free();
+ }
+ }
+ }
+
+ return false;
+}
+
+// }}}
+// {{{ function get_user_forlife()
+
+function get_user_forlife($data) {
+ return get_user_login($data, true);
+}
+
+// }}}
+// {{{ function get_user_details()
+
+function &get_user_details($login, $from_uid = '')
+{
+ global $globals;
+ $reqsql = "SELECT u.user_id, u.promo, u.promo_sortie, u.prenom, u.nom, u.nom_usage, u.date, u.cv,
+ u.perms IN ('admin','user') AS inscrit, FIND_IN_SET('femme', u.flags) AS sexe, u.deces != 0 AS dcd, u.deces,
+ q.profile_nick AS nickname, q.profile_from_ax, q.profile_mobile AS mobile, q.profile_web AS web, q.profile_freetext AS freetext,
+ q.profile_mobile_pub AS mobile_pub, q.profile_web_pub AS web_pub, q.profile_freetext_pub AS freetext_pub,
+ q.profile_medals_pub AS medals_pub,
+ IF(gp.nat='',gp.pays,gp.nat) AS nationalite, gp.a2 AS iso3166,
+ a.alias AS forlife, a2.alias AS bestalias,
+ c.uid IS NOT NULL AS is_contact,
+ s.text AS section, p.x, p.y, p.pub AS photo_pub,
+ m.expertise != '' AS is_referent
+
+ FROM auth_user_md5 AS u
+ INNER JOIN auth_user_quick AS q USING(user_id)
+ INNER JOIN aliases AS a ON (u.user_id=a.id AND a.type='a_vie')
+ INNER JOIN aliases AS a2 ON (u.user_id=a2.id AND FIND_IN_SET('bestalias',a2.flags))
+ LEFT JOIN contacts AS c ON (c.uid = {?} and c.contact = u.user_id)
+ LEFT JOIN geoloc_pays AS gp ON (gp.a2 = u.nationalite)
+ INNER JOIN sections AS s ON (s.id = u.section)
+ LEFT JOIN photo AS p ON (p.uid = u.user_id)
+ LEFT JOIN mentor AS m ON (m.uid = u.user_id)
+ WHERE a.alias = {?}";
+ $res = $globals->xdb->query($reqsql, $from_uid, $login);
+ $user = $res->fetchOneAssoc();
+ $uid = $user['user_id'];
+
+ $sql = "SELECT e.entreprise, s.label as secteur , ss.label as sous_secteur , f.fonction_fr as fonction,
+ e.poste, e.adr1, e.adr2, e.adr3, e.postcode, e.city,
+ gp.pays AS countrytxt, gr.name AS region, e.tel, e.fax, e.mobile, e.entrid,
+ e.pub, e.adr_pub, e.tel_pub, e.email, e.email_pub, e.web
+ FROM entreprises AS e
+ LEFT JOIN emploi_secteur AS s ON(e.secteur = s.id)
+ LEFT JOIN emploi_ss_secteur AS ss ON(e.ss_secteur = ss.id AND e.secteur = ss.secteur)
+ LEFT JOIN fonctions_def AS f ON(e.fonction = f.id)
+ LEFT JOIN geoloc_pays AS gp ON (gp.a2 = e.country)
+ LEFT JOIN geoloc_region AS gr ON (gr.a2 = e.country and gr.region = e.region)
+ WHERE e.uid = {?}
+ ORDER BY e.entrid";
+ $res = $globals->xdb->query($sql, $uid);
+ $user['adr_pro'] = $res->fetchAllAssoc();
+
+ $sql = "SELECT a.adr1,a.adr2,a.adr3,a.postcode,a.city,
+ gp.pays AS countrytxt,gr.name AS region,a.tel,a.fax,
+ FIND_IN_SET('active', a.statut) AS active, a.adrid,
+ FIND_IN_SET('res-secondaire', a.statut) AS secondaire,
+ a.pub, a.tel_pub
+ FROM adresses AS a
+ LEFT JOIN geoloc_pays AS gp ON (gp.a2=a.country)
+ LEFT JOIN geoloc_region AS gr ON (gr.a2=a.country and gr.region=a.region)
+ WHERE uid= {?} AND NOT FIND_IN_SET('pro',a.statut)
+ ORDER BY NOT FIND_IN_SET('active',a.statut), FIND_IN_SET('temporaire',a.statut), FIND_IN_SET('res-secondaire',a.statut)";
+ $res = $globals->xdb->query($sql, $uid);
+ $user['adr'] = $res->fetchAllAssoc();
+
+ $sql = "SELECT text
+ FROM binets_ins
+ LEFT JOIN binets_def ON binets_ins.binet_id = binets_def.id
+ WHERE user_id = {?}";
+ $res = $globals->xdb->query($sql, $uid);
+ $user['binets'] = $res->fetchColumn();
+ $user['binets_join'] = join(', ', $user['binets']);
+
+ $res = $globals->xdb->iterRow("SELECT text, url
+ FROM groupesx_ins
+ LEFT JOIN groupesx_def ON groupesx_ins.gid = groupesx_def.id
+ WHERE guid = {?}", $uid);
+ $user['gpxs'] = Array();
+ while (list($gxt, $gxu) = $res->next()) {
+ $user['gpxs'][] = $gxu ? "<a href=\"$gxu\">$gxt</a>" : $gxt;
+ }
+ $user['gpxs_join'] = join(', ', $user['gpxs']);
+
+ $res = $globals->xdb->iterRow("SELECT applis_def.text, applis_def.url, applis_ins.type
+ FROM applis_ins
+ INNER JOIN applis_def ON applis_def.id = applis_ins.aid
+ WHERE uid={?}
+ ORDER BY ordre", $uid);
+
+ $user['applis_fmt'] = Array();
+ while (list($txt, $url, $type) = $res->next()) {
+ require_once('applis.func.inc.php');
+ $user['applis_fmt'][] = applis_fmt($type, $txt, $url);
+ }
+ $user['applis_join'] = join(', ', $user['applis_fmt']);
+
+ $res = $globals->xdb->iterator("SELECT m.id, m.text AS medal, m.type, m.img, s.gid, g.text AS grade
+ FROM profile_medals_sub AS s
+ INNER JOIN profile_medals AS m ON ( s.mid = m.id )
+ LEFT JOIN profile_medals_grades AS g ON ( s.mid = g.mid AND s.gid = g.gid )
+ WHERE s.uid = {?}", $uid);
+ $user['medals'] = Array();
+ while ($tmp = $res->next()) {
+ $user['medals'][] = $tmp;
+ }
+
+ return $user;
+}
+
+// }}}
+// {{{ function _user_reindex
+
+function _user_reindex($uid, $keys, $muls) {
+ global $globals;
+ foreach ($keys as $i => $key) {
+ if ($key == '') {
+ continue;
+ }
+ $toks = preg_split('/[ \'\-]+/', $key);
+ $token = "";
+ $first = 5;
+ while ($toks) {
+ $token = strtolower(replace_accent(array_pop($toks) . $token));
+ $score = ($toks ? 0 : 10 + $first) * $muls[$i];
+ mysql_query("REPLACE INTO search_name (token, uid, score) VALUES('$token',$uid,$score)");
+ $first = 0;
+ }
+ }
+}
+
+// }}}
+// {{{ function user_reindex
+
+function user_reindex($uid) {
+ global $globals;
+ $globals->xdb->execute("DELETE FROM search_name WHERE uid={?}", $uid);
+ $res = $globals->xdb->query("SELECT prenom, nom, nom_usage, profile_nick FROM auth_user_md5 INNER JOIN auth_user_quick USING(user_id) WHERE auth_user_md5.user_id = {?}", $uid);
+ _user_reindex($uid, $res->fetchOneRow(), array(1,1,1,0.2));
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ DEFINES
+
+define('SIZE_MAX', 32768);
+
+// }}}
+// {{{ class ValidateIterator
+
+/**
+ * Iterator class, that lists objects through the database
+ */
+class ValidateIterator extends XOrgDBIterator
+{
+ // {{{ constuctor
+
+ function ValidateIterator ()
+ {
+ parent::XOrgDBIterator('SELECT data,stamp FROM requests ORDER BY stamp', MYSQL_NUM);
+ }
+
+ // }}}
+ // {{{ function next()
+
+ function next ()
+ {
+ if (list($result, $stamp) = parent::next()) {
+ $result = unserialize($result);
+ $result->stamp = $stamp;
+ return($result);
+ } else {
+ return null;
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class Validate
+
+/** classe "virtuelle" à dériver pour chaque nouvelle implémentation
+ */
+class Validate
+{
+ // {{{ properties
+
+ var $uid;
+ var $prenom;
+ var $nom;
+ var $promo;
+ var $bestalias;
+ var $forlife;
+
+ var $stamp;
+ var $unique;
+ // enable the refuse button
+ var $refuse = true;
+ var $type;
+ var $comments = Array();
+ // the validations rules : comments for admins
+ var $rules = "Mieux vaut laisser une demande de validation à un autre admin que de valider une requête illégale ou que de refuser une demande légitime";
+
+ // }}}
+ // {{{ constructor
+
+ /** constructeur
+ * @param $_uid user id
+ * @param $_unique requête pouvant être multiple ou non
+ * @param $_type type de la donnée comme dans le champ type de x4dat.requests
+ */
+ function Validate($_uid, $_unique, $_type)
+ {
+ global $globals;
+ $this->uid = $_uid;
+ $this->stamp = date('YmdHis');
+ $this->unique = $_unique;
+ $this->type = $_type;
+ $res = $globals->xdb->query(
+ "SELECT u.prenom, u.nom, u.promo, a.alias, b.alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( u.user_id=a.id AND a.type='a_vie' )
+ INNER JOIN aliases AS b ON ( u.user_id=b.id AND b.type!='homonyme' AND FIND_IN_SET('bestalias', b.flags) )
+ WHERE u.user_id={?}", $_uid);
+ list($this->prenom, $this->nom, $this->promo, $this->forlife, $this->bestalias) = $res->fetchOneRow();
+ }
+
+ // }}}
+ // {{{ function submit()
+
+ /** fonction à utiliser pour envoyer les données à la modération
+ * cette fonction supprimme les doublons sur un couple ($user,$type) si $this->unique est vrai
+ */
+ function submit ()
+ {
+ global $globals;
+ if ($this->unique) {
+ $globals->xdb->execute('DELETE FROM requests WHERE user_id={?} AND type={?}', $this->uid, $this->type);
+ }
+
+ $this->stamp = date('YmdHis');
+ $globals->xdb->execute('INSERT INTO requests (user_id, type, data, stamp) VALUES ({?}, {?}, {?}, {?})',
+ $this->uid, $this->type, $this, $this->stamp);
+
+ return true;
+ }
+
+ // }}}
+ // {{{ function update()
+
+ function update ()
+ {
+ global $globals;
+ $globals->xdb->execute('UPDATE requests SET data={?}, stamp=stamp
+ WHERE user_id={?} AND type={?} AND stamp={?}',
+ $this, $this->uid, $this->type, $this->stamp);
+
+ return true;
+ }
+
+ // }}}
+ // {{{ function clean()
+
+ /** fonction à utiliser pour nettoyer l'entrée de la requête dans la table requests
+ * attention, tout est supprimé si c'est un unique
+ */
+ function clean ()
+ {
+ global $globals;
+ if ($this->unique) {
+ return $globals->xdb->execute('DELETE FROM requests WHERE user_id={?} AND type={?}',
+ $this->uid, $this->type);
+ } else {
+ return $globals->xdb->execute('DELETE FROM requests WHERE user_id={?} AND type={?} AND stamp={?}',
+ $this->uid, $this->type, $this->stamp);
+ }
+ }
+
+ // }}}
+ // {{{ function handle_formu()
+
+ /** fonction à réaliser en cas de valistion du formulaire
+ */
+ function handle_formu()
+ {
+ if (Env::has('delete')) {
+ $this->clean();
+ $this->trig('requete supprimée');
+ return true;
+ }
+
+ // ajout d'un commentaire
+ if (Env::has('hold') && Env::has('comm')) {
+ $this->comments[] = Array(Session::get('bestalias'), Env::get('comm'));
+
+ // envoi d'un mail à hotliners
+ global $globals;
+ require_once('diogenes/diogenes.hermes.inc.php');
+ $mailer = new HermesMailer;
+ $mailer->setSubject("Commentaires de validation {$this->type}");
+ $mailer->setFrom("validation+{$this->type}@{$globals->mail->domain}");
+ $mailer->addTo("hotliners@{$globals->mail->domain}");
+
+ $body = "Validation {$this->type} pour {$this->prenom} {$this->nom}\n\n"
+ . Session::get('bestalias')." a ajouté le commentaire :\n\n"
+ . Env::get('comm')."\n\n"
+ . "cf la discussion sur : ".$globals->baseurl."/admin/valider.php";
+
+ $mailer->setTxtBody(wordwrap($body));
+ $mailer->send();
+
+ $this->update();
+ $this->trig('commentaire ajouté');
+ return true;
+ }
+
+ if (Env::has('accept')) {
+ if ($this->commit()) {
+ $this->sendmail(true);
+ $this->clean();
+ $this->trig('mail envoyé');
+ return true;
+ } else {
+ $this->trig('erreur lors de la validation');
+ return false;
+ }
+ }
+
+ if (Env::has('refuse')) {
+ if (Env::get('comm')) {
+ $this->sendmail(false);
+ $this->clean();
+ $this->trig('mail envoyé');
+ return true;
+ } else {
+ $this->trig('pas de motivation pour le refus !!!');
+ }
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ function sendmail
+
+ function sendmail($isok)
+ {
+ global $globals;
+ require_once('diogenes/diogenes.hermes.inc.php');
+ $mailer = new HermesMailer;
+ $mailer->setSubject($this->_mail_subj());
+ $mailer->setFrom("validation+{$this->type}@{$globals->mail->domain}");
+ $mailer->addTo("\"{$this->prenom} {$this->nom}\" <{$this->bestalias}@{$globals->mail->domain}>");
+ $mailer->addCc("validation+{$this->type}@{$globals->mail->domain}");
+
+ $body = "Cher(e) camarade,\n\n"
+ . $this->_mail_body($isok)
+ . (Env::has('comm') ? "\n\n".Env::get('comm') : '')
+ . "\n\nCordialement,\nL'équipe Polytechnique.org\n";
+
+ $mailer->setTxtBody(wordwrap($body));
+ $mailer->send();
+ }
+
+ // }}}
+ // {{{ function trig()
+
+ function trig($msg) {
+ global $page;
+ $page->trig($msg);
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ /** fonction statique qui renvoie la requête de l'utilisateur d'id $uidau timestamp $t
+ * @param $uid l'id de l'utilisateur concerné
+ * @param $type le type de la requête
+ * @param $stamp le timestamp de la requête
+ *
+ * XXX fonction "statique" XXX
+ * à utiliser uniquement pour récupérer un objet dans la BD avec Validate::get_request(...)
+ */
+ function get_request($uid, $type, $stamp = -1)
+ {
+ global $globals;
+ if ($stamp == -1) {
+ $res = $globals->xdb->query('SELECT data FROM requests WHERE user_id={?} and type={?}', $uid, $type);
+ } else {
+ $res = $globals->xdb->query("SELECT data, stamp FROM requests WHERE user_id={?} AND type={?} and stamp={?}", $uid, $type, $stamp);
+ }
+ if ($result = $res->fetchOneCell()) {
+ $result = unserialize($result);
+ } else {
+ $result = false;
+ }
+ return($result);
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ /** fonction à utiliser pour insérer les données dans x4dat
+ * XXX la fonction est "virtuelle" XXX
+ */
+ function commit ()
+ { }
+
+ // }}}
+ // {{{ function formu()
+
+ /** nom du template qui contient le formulaire */
+ function formu()
+ { return null; }
+
+ // }}}
+}
+
+// }}}
+// {{{ IMPLEMENTATIONS
+
+foreach (glob(dirname(__FILE__).'/validations/*.inc.php') as $file) {
+ require_once($file);
+}
+
+// }}}
+
+/* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 foldmethod=marker: */
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class AliasReq
+
+class AliasReq extends Validate
+{
+ // {{{ properties
+
+ var $alias;
+ var $raison;
+ var $unique = true;
+
+ var $old='';
+ var $public='private';
+
+ var $rules = "Interdire ce qui peut nous servir (virus@, postmaster@, ...),
+ les alias vulgaires, et les prenom.nom (sauf si c'est pour l'utilisateur prenom.nom).
+ Pas de contrainte pour les tirets ou les points, en revanche le souligné (_) est interdit";
+
+ // }}}
+ // {{{ constructor
+
+ function AliasReq ($_uid, $_alias, $_raison, $_public, $_stamp=0)
+ {
+ global $globals;
+ $this->Validate($_uid, true, 'alias', $_stamp);
+ $this->alias = $_alias.'@'.$globals->mail->alias_dom;
+ $this->raison = $_raison;
+ $this->public = $_public;
+
+ $res = $globals->xdb->query("
+ SELECT v.alias
+ FROM virtual_redirect AS vr
+ INNER JOIN virtual AS v ON (v.vid=vr.vid AND v.alias LIKE '%@{$globals->mail->alias_dom}')
+ WHERE vr.redirect={?} OR vr.redirect={?}",
+ "{$this->forlife}@{$globals->mail->domain}", "{$this->forlife}@{$globals->mail->domain2}");
+ $this->old = $res->fetchOneCell();
+ if (empty($this->old)) { unset($this->old); }
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request($uid)
+ {
+ return parent::get_request($uid,'alias');
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.aliases.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/MELIX] Demande de l'alias {$this->alias}";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " L'adresse mail {$this->alias} que tu avais demandée vient d'être créée, tu peux désormais l'utiliser à ta convenance.".(($this->public == 'public')?" A ta demande, cette adresse apparaît maintenant sur ta fiche.":"");
+ } else {
+ return " La demande que tu avais faite pour l'alias {$this->alias} a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit ()
+ {
+ global $globals;
+
+ $globals->xdb->execute("UPDATE auth_user_quick SET emails_alias_pub = {?} WHERE user_id = {?}", $this->public, $this->uid);
+
+ if ($this->old) {
+ return $globals->xdb->execute('UPDATE virtual SET alias={?} WHERE alias={?}', $this->alias, $this->old);
+ } else {
+ $globals->xdb->execute('INSERT INTO virtual SET alias={?},type="user"', $this->alias);
+ $vid = mysql_insert_id();
+ $dom = $globals->mail->shorter_domain();
+ return $globals->xdb->query('INSERT INTO virtual_redirect (vid,redirect) VALUES ({?}, {?})', $vid, $this->forlife.'@'.$dom);
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class EvtReq
+
+class EvtReq extends Validate
+{
+ // {{{ properties
+
+ var $evtid;
+ var $titre;
+ var $texte;
+ var $pmin;
+ var $pmax;
+ var $peremption;
+ var $comment;
+
+ // }}}
+ // {{{ constructor
+
+ function EvtReq($_titre, $_texte, $_pmin, $_pmax, $_peremption, $_comment, $_uid) {
+ global $globals;
+ $this->Validate($_uid, false, 'evts');
+ $this->titre = $_titre;
+ $this->texte = $_texte;
+ $this->pmin = $_pmin;
+ $this->pmax = $_pmax;
+ $this->peremption = $_peremption;
+ $this->comment = $_comment;
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.evts.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/EVENEMENTS] Proposition d'événement";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " L'annonce que tu avais proposée ({$this->titre}) vient d'être validée.";
+ } else {
+ return " L'annonce que tu avais proposée ({$this->titre}) a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+ return $globals->xdb->execute(
+ "INSERT INTO evenements
+ SET user_id = {?}, creation_date=NOW(), titre={?}, texte={?},
+ peremption={?}, promo_min={?}, promo_max={?}, flags=CONCAT(flags,',valide')",
+ $this->uid, $this->titre, $this->texte,
+ $this->peremption, $this->pmin, $this->pmax);
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('validations.inc.php');
+// {{{ class HomonymeReq
+
+class HomonymeReq extends Validate
+{
+ // {{{ properties
+
+ var $loginbis;
+
+ var $warning = true;
+
+ var $homonymes_forlife;
+
+ var $rules = "Accepter, sauf cas particulier d'utilisateur dont l'homonymie est traité plus ... manuellement";
+
+ // }}}
+ // {{{ constructor
+
+ function HomonymeReq($_uid, $_loginbis, $_homonymes_forlife, $warning=true)
+ {
+ global $global;
+
+ $this->warning = $warning;
+
+ $this->Validate($_uid, true, $this->title());
+
+ $this->refuse = false;
+
+ $this->loginbis = $_loginbis;
+
+ $this->homonymes_forlife = $_homonymes_forlife;
+
+ }
+
+ // }}}
+ // {{{ title()
+
+ function title() {
+ return $this->warning?'alerte alias':'robot répondeur';
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request($uid)
+ {
+ return parent::get_request($uid,$this->title);
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.homonymes.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/Support] ".($this->warning?"Dans une semaine : suppression de l'alias":"Mise en place du robot")." $loginbis@polytechnique.org";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ global $globals;
+ return
+"
+Comme nous t'en avons informé par mail il y a quelques temps,
+pour respecter nos engagements en terme d'adresses e-mail devinables,
+tu te verras bientôt retirer l'alias ".$this->loginbis."@".$globals->mail->domain." pour
+ne garder que ".$this->forlife."@".$globals->mail->domain.".
+
+Toute personne qui écrira à ".$this->loginbis."@".$globals->mail->domain." recevra la
+réponse d'un robot qui l'informera que ".$this->loginbis."@".$globals->mail->domain."
+est ambigu pour des raisons d'homonymie et signalera ton email exact.";
+ }
+
+ // }}}
+ // {{{ function sendmail()
+
+ function sendmail($isok)
+ {
+ if (!$isok) return false;
+ global $globals;
+ require_once('diogenes/diogenes.hermes.inc.php');
+ $mailer = new HermesMailer;
+ $cc = "support+homonyme@".$globals->mail->domain;
+ $FROM = "\"Support Polytechnique.org\" <$cc>";
+ $mailer->setSubject($this->_mail_subj());
+ $mailer->setFrom($FROM);
+ $mailer->addTo("\"{$this->prenom} {$this->nom}\" <{$this->bestalias}@{$globals->mail->domain}>");
+ $mailer->addCc($cc);
+
+ $body = $this->prenom.",\n\n"
+ . $this->_mail_body($isok)
+ . (Env::has('comm') ? "\n\n".Env::get('comm') : '')
+ . "\n\nCordialement,\nL'équipe Polytechnique.org\n";
+
+ $mailer->setTxtBody(wordwrap($body));
+ $mailer->send();
+ }
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+ require_once('homonymes.inc.php');
+
+ switch_bestalias($this->uid, $this->loginbis);
+ if (!$this->warning) {
+ $globals->xdb->execute("UPDATE aliases SET type='homonyme',expire=NOW() WHERE alias={?}", $this->loginbis);
+ $globals->xdb->execute("REPLACE INTO homonymes (homonyme_id,user_id) VALUES({?},{?})", $this->uid, $this->uid);
+ }
+
+ return true;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class ListeReq
+
+class ListeReq extends Validate
+{
+ // {{{ properties
+
+ var $liste;
+ var $desc;
+
+ var $advertise;
+ var $modlevel;
+ var $inslevel;
+
+ var $owners;
+ var $members;
+
+ var $rules = "Refuser les listes de binets si elles ne sont pas datées (apv20002@ et non apv@).
+ Refuser également des listes qui pourraient nous servir (admin, postmaster,...)";
+ // }}}
+ // {{{ constructor
+
+ function ListeReq($_uid, $_liste, $_desc, $_advertise, $_modlevel, $_inslevel, $_owners, $_members, $_stamp=0)
+ {
+ global $globals;
+ $this->Validate($_uid, true, 'liste', $_stamp);
+
+ $this->liste = $_liste;
+ $this->desc = $_desc;
+ $this->advertise = $_advertise;
+ $this->modlevel = $_modlevel;
+ $this->inslevel = $_inslevel;
+ $this->owners = $_owners;
+ $this->members = $_members;
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.listes.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/LISTES] Demande de la liste {$this->liste}";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " La mailing list {$this->liste} que tu avais demandée vient d'être créée.";
+ } else {
+ return " La demande que tu avais faite pour la mailing list {$this->liste} a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+ require_once('xml-rpc-client.inc.php');
+ require_once('lists.inc.php');
+
+ $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+ $ret = $client->create_list($this->liste, $this->desc,
+ $this->advertise, $this->modlevel, $this->inslevel,
+ $this->owners, $this->members);
+ $liste = strtolower($this->liste);
+ if ($ret) {
+ foreach(Array($liste, $liste."-owner", $liste."-admin", $liste."-bounces") as $l) {
+ $globals->xdb->execute("INSERT INTO aliases (alias,type) VALUES({?}, 'liste')", $l);
+ }
+ }
+ return $ret;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class MarkReq
+
+class MarkReq extends Validate
+{
+ // {{{ properties
+
+ var $perso;
+
+ var $m_id;
+ var $m_email;
+ var $m_nom;
+ var $m_prenom;
+ var $m_promo;
+
+ var $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.
+ Ne pas marqueter au nom de Polytechnique.org plus d'une
+ fois par an.";
+ // }}}
+ // {{{ constructor
+
+ function MarkReq($sender, $mark_id, $email, $perso = false) {
+ global $globals;
+ $this->Validate($sender, false, 'marketing');
+ $this->m_id = $mark_id;
+ $this->m_email = $email;
+ $this->perso = $perso;
+
+ $res = $globals->xdb->query('SELECT nom, prenom, promo FROM auth_user_md5 WHERE user_id = {?}', $mark_id);
+ list ($this->m_nom, $this->m_prenom, $this->m_promo) = $res->fetchOneRow();
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.mark.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org] Marketing de {$this->m_prenom} {$this->m_nom} ({$this->m_promo})";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " Un mail de marketing vient d'être envoyé "
+ .($this->perso ? 'en ton nom' : 'en notre nom')
+ ." à {$this->m_prenom} {$this->m_nom} ({$this->m_promo}) pour l'encourager à s'inscrire !\n\n"
+ ."Merci de ta participation !\n";
+ } else {
+ return " Nous n'avons pas jugé bon d'envoyer de mail de marketing à {$this->m_prenom} {$this->m_nom} ({$this->m_promo}).";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+ require_once('marketing.inc.php');
+ mark_send_mail($this->m_id, $this->m_email,(!$this->perso)?"staff":"user");
+ return true;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class NLReq
+
+require_once("newsletter.inc.php");
+
+class NLReq extends Validate
+{
+ // {{{ properties
+
+ var $art;
+ var $rules = "Laisser valider par le NL-MASTER";
+
+ // }}}
+ // {{{ constructor
+
+ function NlReq($uid, $title, $body, $append) {
+ $this->Validate($uid, false, 'nl');
+ $this->art = new NLArticle($title, $body, $append);
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ {
+ return 'include/form.valid.nl.tpl';
+ }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/NL] Proposition d'article dans la NL";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return ' L\'article que tu avais proposé ('.$this->art->title().') vient d\'être validé.';
+ } else {
+ return ' L\'article que tu avais proposé ('.$this->art->title().') a été refusé.';
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ $nl = new Newsletter();
+ $nl->saveArticle($this->art);
+ return true;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class UsageReq
+
+class UsageReq extends Validate
+{
+ // {{{ properties
+
+ var $unique = true;
+
+ var $nom_usage;
+ var $alias = '';
+
+ var $oldusage;
+ var $oldalias;
+
+ var $homonyme;
+
+ var $rules = "Refuser
+ tout ce qui n'est visiblement pas un nom de famille (ce qui est
+ extremement rare car à peu près n'importe quoi peut être un nom de
+ famille...)";
+
+ // }}}
+ // {{{ constructor
+
+ function UsageReq($_uid, $_usage)
+ {
+ global $globals;
+ $this->Validate($_uid, true, 'usage');
+ $this->nom_usage = $_usage;
+ $this->alias = make_username($this->prenom, $this->nom_usage);
+ if (!$this->nom_usage) $this->alias = "";
+
+ $res = $globals->xdb->query("
+ SELECT e.alias, u.nom_usage, a.id
+ FROM auth_user_md5 as u
+ LEFT JOIN aliases as e ON(e.type='alias' AND FIND_IN_SET('usage',e.flags) AND e.id = u.user_id)
+ LEFT JOIN aliases as a ON(a.alias = {?} AND a.id != u.user_id)
+ WHERE u.user_id = {?}", $this->alias, $this->uid);
+ list($this->oldalias, $this->oldusage, $this->homonyme) = $res->fetchOneRow();
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request($uid)
+ {
+ return parent::get_request($uid,'usage');
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.nomusage.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj()
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/USAGE] Changement de nom d'usage";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ global $globals;
+ if ($isok) {
+ $res = " La demande de changement de nom d'usage que tu as demandée vient d'être effectuée.";
+ if ($this->oldalias) {
+ $res .= "\n\n Les alias {$this->oldalias}@{$globals->mail->domain} et @{$globals->mail->domain2} ont été supprimés.";
+ }
+ if ($nom_usage) {
+ $res .= "\n\n Les alias {$this->alias}@{$globals->mail->domain} et @{$globals->mail->domain2} sont maintenant à ta disposition !";
+ }
+ return $res;
+ } else {
+ return " La demande de changement de nom d'usage que tu avais faite a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ require_once('nomusage.inc.php');
+ set_new_usage($this->uid, $this->nom_usage, $this->alias);
+ return true;
+ }
+
+ // }}}
+}
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class OrangeReq
+
+class OrangeReq extends Validate
+{
+ // {{{ properties
+
+ var $unique = true;
+
+ var $promo;
+ var $promo_sortie;
+
+ var $rules = "A priori accepter (la validation sert à repousser les
+ petits malins). Refuse si tu connais la personne et que tu es sure
+ qu'elle n'est pas orange.";
+
+ // }}}
+ // {{{ constructor
+
+ function OrangeReq($_uid, $_sortie)
+ {
+ global $globals;
+ $this->Validate($_uid, true, 'orange');
+ $this->promo_sortie = $_sortie;
+ $res = $globals->xdb->query("SELECT promo FROM auth_user_md5 WHERE user_id = {?}", $_uid);
+ $this->promo = $res->fetchOneCell();
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request($uid)
+ {
+ return parent::get_request($uid,'orange');
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.orange.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj()
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/ORANGE] Changement de nom de promo de sortie";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ global $globals;
+ if ($isok) {
+ $res = " La demande de changement de promo de sortie que tu as demandée vient d'être effectuée.";
+ return $res;
+ } else {
+ return " La demande de changement de promo de sortie tu avais faite a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+
+ $globals->xdb->execute("UPDATE auth_user_md5 set promo_sortie={?} WHERE user_id={?}",$this->promo_sortie ,$this->uid);
+ return true;
+ }
+
+ // }}}
+}
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class PayReq
+
+class PayReq extends Validate
+{
+ // {{{ properties
+
+ var $titre;
+ var $site;
+
+ var $montant;
+ var $montant_min;
+ var $montant_max;
+
+ var $msg_reponse;
+ var $asso_id;
+ var $asso;
+ var $evt;
+ var $evt_intitule;
+
+ var $rules = "Laisser la validation à un trésorier";
+ // }}}
+ // {{{ constructor
+
+ function PayReq($_uid, $_intitule, $_site, $_montant, $_msg, $_montantmin=0, $_montantmax=999, $_asso_id = 0, $_evt = 0, $_stamp=0)
+ {
+ global $globals;
+ $this->Validate($_uid, false, 'paiements', $_stamp);
+
+ $this->titre = $_intitule;
+ $this->site = $_site;
+ $this->msg_reponse = $_msg;
+ $this->asso_id = $_asso_id;
+ $this->evt = $_evt;
+ $this->montant = $_montant;
+ $this->montant_min = $_montantmin;
+ $this->montant_max = $_montantmax;
+
+ if ($_asso_id) {
+ $res = $globals->xdb->query("SELECT nom FROM groupex.asso WHERE id = {?}", $_asso_id);
+ $this->asso = $res->fetchOneCell();
+ }
+ if ($_asso_id && $_evt) {
+ $res = $globals->xdb->query("SELECT intitule FROM groupex.evenements WHERE asso_id = {?} AND eid = {?}", $_asso_id, $_evt);
+ $this->evt_intitule = $res->fetchOneCell();
+ }
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.paiements.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/Paiments] Demande de création de paiement {$this->titre}";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " Le paiement que tu avais demandé pour {$this->titre} vient d'être créé.".($this->evt?" Il a bien été associé à la gestion de l'événement du groupe":"");
+ } else {
+ return " La demande que tu avais faite pour le paiement de {$this->intitule} a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+ $res = $globals->xdb->query("SELECT MAX(id) FROM paiement.paiements");
+ $id = $res->fetchOneCell()+1;
+ $ret = $globals->xdb->execute("INSERT INTO paiement.paiements VALUES
+ ( {?}, {?}, {?}, '',
+ {?}, {?}, {?},
+ {?}, {?}, {?} )
+ ",
+ $id, $this->titre, $this->site,
+ $this->montant, $this->montant_min, $this->montant_max,
+ $this->bestalias."@".$globals->mail->domain, $this->msg_reponse, $this->asso_id);
+ if ($this->asso_id && $this->evt)
+ $ret = $globals->xdb->execute("UPDATE groupex.evenements SET paiement_id = {?} WHERE asso_id = {?} AND eid = {?}", $id, $this->asso_id, $this->evt);
+
+ return $ret;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class PhotoReq
+
+class PhotoReq extends Validate
+{
+ // {{{ properties
+
+ var $mimetype;
+ var $data;
+ var $x;
+ var $y;
+
+ var $unique = true;
+
+ var $rules = "Refuser les photos copyrightées, de mineurs, ou ayant
+ un caractère pornographique, violent, etc... Si une photo est mal
+ cadrée (20% de photo et 80% de blanc par exemple), si c'est un
+ camarade antique, on lui arrange sinon on lui
+ refuse en lui expliquant gentiment le problème. Idem si les dimensions de
+ la photo sont archi trop grandes ou archi trop petites.";
+
+ // }}}
+ // {{{ constructor
+
+ function PhotoReq($_uid, $_data, $_stamp=0)
+ {
+ global $globals, $page;
+
+ $this->Validate($_uid, true, 'photo', $_stamp);
+
+ // calcul de la taille de l'image
+ require_once('xorg.varstream.inc.php');
+ $GLOBALS['photoreq'] = $_data;
+ $image_infos = getimagesize('var://photoreq');
+ unset ($GLOBALS['photoreq']);
+
+ if (empty($image_infos)) {
+ $page->trig("Image invalide");
+ return ($this = null);
+ }
+ list($this->x, $this->y, $this->mimetype) = $image_infos;
+
+ switch ($this->mimetype) {
+ case 1: $this->mimetype = "gif"; break;
+ case 2: $this->mimetype = "jpeg"; break;
+ case 3: $this->mimetype = "png"; break;
+ default:
+ $page->trig("Type d'image invalide");
+ return ($this = null);
+ }
+
+ if (strlen($_data) > SIZE_MAX) {
+ $img = imagecreatefromstring($_data);
+ if (!$img) {
+ $page->trig("image trop grande et impossible à retailler automatiquement");
+ return ($this = null);
+ }
+
+ $nx = $x = imagesx($img);
+ $ny = $y = imagesy($img);
+
+ if ($nx > 240) { $ny = intval($ny*240/$nx); $nx = 240; }
+ if ($ny > 300) { $ny = intval($nx*300/$nx); $ny = 300; }
+ if ($nx < 160) { $ny = intval($ny*160/$nx); $nx = 160; }
+
+ $comp = '90';
+ $file = tempnam('/tmp', 'photo');
+
+ while (strlen($_data) > SIZE_MAX) {
+ $img2 = imagecreatetruecolor($nx, $ny);
+ imagecopyresampled($img2, $img, 0, 0, 0, 0, $nx, $ny, $x, $y);
+ imagejpeg($img2, $file, $comp);
+ $_data = file_get_contents($file);
+ $this->mimetype = 'jpeg';
+
+ $comp --;
+ }
+
+ unlink($file);
+ }
+ $this->data = $_data;
+ }
+
+ // }}}
+ // {{{ function get_request()
+
+ function get_request($uid)
+ {
+ return parent::get_request($uid,'photo');
+ }
+
+ // }}}
+ // {{{ function formu()
+
+ function formu()
+ { return 'include/form.valid.photos.tpl'; }
+
+ // }}}
+ // {{{ function _mail_subj
+
+ function _mail_subj()
+ {
+ return "[Polytechnique.org/PHOTO] Changement de photo";
+ }
+
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " La demande de changement de photo que tu as demandée vient d'être effectuée.";
+ } else {
+ return " La demande de changement de photo que tu avais faite a été refusée.";
+ }
+ }
+
+ // }}}
+ // {{{ function commit()
+
+ function commit()
+ {
+ global $globals;
+
+ $globals->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);
+ return true;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php\r
+\r
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:\r
+ class Ancien { \r
+ var $NOM_PATR; \r
+ var $PART_NOM;\r
+ var $PRENOM;\r
+ var $NOM_USUEL;\r
+ var $PART_NOMUS;\r
+ var $NOM_COMPLET;\r
+ var $CIVILITE;\r
+ var $GRADE;\r
+ var $CORPS;\r
+ var $PROMO;\r
+ var $NATIONALITE;\r
+ var $CORPS_LIBELLE;\r
+ var $EMAIL; \r
+ var $ADRESSE = array();\r
+ var $NUM_ADRESSE = 0;\r
+ var $ACTIVITE = array();\r
+ var $NUM_ACTIVITE = 0;\r
+ var $FORMATION = array();\r
+ var $NUM_FORMATION = 0; \r
+ var $Erreur;\r
+ \r
+ function Ancien ($aa) {\r
+ if ($aa<>'')\r
+ {\r
+ foreach ($aa as $k=>$v)\r
+ $this->$k = $aa[$k];\r
+ } \r
+ } \r
+ function Ajout_adresse ($adresse,$i) {\r
+ $this->ADRESSE[$i] = $adresse; \r
+ $this->NUM_ADRESSE++;\r
+ } \r
+ function Ajout_activite ($activite,$i) {\r
+ $this->ACTIVITE[$i] = $activite; \r
+ $this->NUM_ACTIVITE++;\r
+ } \r
+ function Ajout_formation ($formation,$i) {\r
+ $this->FORMATION[$i] = $formation; \r
+ $this->NUM_FORMATION++;\r
+ } \r
+ function Ajout_erreur ($erreur) {\r
+ $this->Erreur = $erreur; \r
+ } \r
+ function Erreur() {\r
+ return $this->Erreur;\r
+ } \r
+ function Nom_patr() {\r
+ return $this->NOM_PATR;\r
+ }\r
+ function Part_nom() {\r
+ return $this->PART_NOM;\r
+ }\r
+ function Prenom() {\r
+ return $this->PRENOM;\r
+ }\r
+ function Nom_usuel() {\r
+ return $this->NOM_USUEL;\r
+ }\r
+ function Part_nomus() {\r
+ return $this->PART_NOMUS;\r
+ }\r
+ function Nom_complet() {\r
+ return $this->NOM_COMPLET;\r
+ } \r
+ function Civilite() {\r
+ return $this->CIVILITE;\r
+ } \r
+ function Grade() {\r
+ return $this->GRADE;\r
+ } \r
+ function Corps() {\r
+ return $this->CORPS;\r
+ } \r
+ function Corps_Libelle() {\r
+ return $this->CORPS_LIBELLE;\r
+ } \r
+ function Promo() {\r
+ return $this->PROMO;\r
+ } \r
+ function Nationalite() {\r
+ return $this->NATIONALITE;\r
+ } \r
+ function Email() {\r
+ return $this->EMAIL;\r
+ } \r
+ function Adresse_type($i) {\r
+ return $this->ADRESSE[$i]->TYPE;\r
+ } \r
+ function Adresse1($i) {\r
+ return $this->ADRESSE[$i]->ADRESS1;\r
+ }\r
+ function Adresse2($i) {\r
+ return $this->ADRESSE[$i]->ADRESS2;\r
+ }\r
+ function Adresse3($i) {\r
+ return $this->ADRESSE[$i]->ADRESS3;\r
+ }\r
+ function Code_pst($i) {\r
+ return $this->ADRESSE[$i]->CODE_PST;\r
+ }\r
+ function Ville($i) {\r
+ return $this->ADRESSE[$i]->VILLE;\r
+ }\r
+ function Zip_cedex($i) {\r
+ return $this->ADRESSE[$i]->ZIPCEDEX;\r
+ }\r
+ function Etat_region($i) {\r
+ return $this->ADRESSE[$i]->ETATREGION;\r
+ }\r
+ function Pays($i) {\r
+ return $this->ADRESSE[$i]->PAYS;\r
+ }\r
+ function Mobile($i) {\r
+ return $this->ADRESSE[$i]->MOBILE;\r
+ }\r
+ function Tel($i) {\r
+ return $this->ADRESSE[$i]->TEL;\r
+ } \r
+ function Fax($i) {\r
+ return $this->ADRESSE[$i]->FAX;\r
+ } \r
+ function Num_adresse() {\r
+ return $this->NUM_ADRESSE;\r
+ } \r
+ function Entreprise($i) {\r
+ return $this->ACTIVITE[$i]->ENTREPRISE;;\r
+ }\r
+ function Raison_sociale($i) {\r
+ return $this->ACTIVITE[$i]->RAISON_SOCIALE;\r
+ }\r
+ function Fonction($i) {\r
+ return $this->ACTIVITE[$i]->FONCTION;\r
+ } \r
+ function Adresse_act_type($i) {\r
+ return $this->ACTIVITE[$i]->TYPE;\r
+ }\r
+ function Adresse_act_adresse1($i) {\r
+ return $this->ACTIVITE[$i]->ADRESS1;\r
+ }\r
+ function Adresse_act_adresse2($i) {\r
+ return $this->ACTIVITE[$i]->ADRESS2;\r
+ }\r
+ function Adresse_act_adresse3($i) {\r
+ return $this->ACTIVITE[$i]->ADRESS3;\r
+ }\r
+ function Adresse_act_code_pst($i) {\r
+ return $this->ACTIVITE[$i]->CODE_PST;\r
+ }\r
+ function Adresse_act_ville($i) {\r
+ return $this->ACTIVITE[$i]->VILLE;\r
+ }\r
+ function Adresse_act_zip_cedex($i) {\r
+ return $this->ACTIVITE[$i]->ZIPCEDEX;\r
+ }\r
+ function Adresse_act_etat_region($i) {\r
+ return $this->ACTIVITE[$i]->ETATREGION;\r
+ }\r
+ function Adresse_act_pays($i) {\r
+ return $this->ACTIVITE[$i]->PAYS;\r
+ }\r
+ function Adresse_act_mobile($i) {\r
+ return $this->ACTIVITE[$i]->MOBILE;\r
+ }\r
+ function Adresse_act_tel($i) {\r
+ return $this->ACTIVITE[$i]->TEL;\r
+ } \r
+ function Adresse_act_fax($i) {\r
+ return $this->ACTIVITE[$i]->FAX;\r
+ } \r
+ function Num_activite() {\r
+ return $this->NUM_ACTIVITE;\r
+ } \r
+ function Formation($i) {\r
+ return $this->FORMATION[$i]->LIBELLE;\r
+ } \r
+ function Num_formation() {\r
+ return $this->NUM_FORMATION;\r
+ } \r
+ }\r
+\r
+ class Adresse { \r
+ var $TYPE; \r
+ var $ADRESS1;\r
+ var $ADRESS2;\r
+ var $ADRESS3;\r
+ var $CODE_PST;\r
+ var $VILLE;\r
+ var $ZIPCEDEX;\r
+ var $ETATREGION;\r
+ var $PAYS;\r
+ var $MOBILE;\r
+ var $TEL;\r
+ var $FAX;\r
+ \r
+ function Adresse ($aa) {\r
+ foreach ($aa as $k=>$v)\r
+ $this->$k = $aa[$k]; \r
+ } \r
+ }\r
+ \r
+ class Activite { \r
+ var $ENTREPRISE;\r
+ var $RAISON_SOCIALE;\r
+ var $FONCTION;\r
+ var $TYPE; \r
+ var $ADRESS1;\r
+ var $ADRESS2;\r
+ var $ADRESS3;\r
+ var $CODE_PST;\r
+ var $VILLE;\r
+ var $ZIPCEDEX;\r
+ var $ETATREGION;\r
+ var $PAYS;\r
+ var $MOBILE;\r
+ var $TEL;\r
+ var $FAX;\r
+ \r
+ function Activite ($aa) {\r
+ foreach ($aa as $k=>$v)\r
+ $this->$k = $aa[$k]; \r
+ } \r
+ } \r
+ \r
+ class Formation { \r
+ var $LIBELLE;\r
+ \r
+ function Formation ($aa) {\r
+ foreach ($aa as $k=>$v)\r
+ $this->$k = $aa[$k]; \r
+ } \r
+ } \r
+ \r
+ function xml_get_children($vals, &$i) {\r
+ $children = array();\r
+ if (isset($vals[$i]['value'])) $children[] = $vals[$i]['value'];\r
+ \r
+ while (++$i < count($vals)) {\r
+ switch ($vals[$i]['type']) {\r
+ case 'cdata':\r
+ $children[] = $vals[$i]['value'];\r
+ break;\r
+\r
+ case 'complete':\r
+ $children[] = array(\r
+ 'tag' => $vals[$i]['tag'],\r
+ 'attributes' => isset($vals[$i]['attributes'])?\r
+ $vals[$i]['attributes'] : null,\r
+ 'value' => $vals[$i]['value'],\r
+ );\r
+ break;\r
+\r
+ case 'open':\r
+ $children[] = array(\r
+ 'tag' => $vals[$i]['tag'],\r
+ 'attributes' => isset($vals[$i]['attributes'])?\r
+ $vals[$i]['attributes'] : null,\r
+ 'children' => xml_get_children($vals, $i),\r
+ );\r
+ break;\r
+\r
+ case 'close':\r
+ return $children;\r
+ }\r
+ }\r
+ }\r
+\r
+ //fonction principale de récupération des données de l'ancien\r
+ //à indiquer: matricule de l'ancien\r
+ function recupere_infos_ancien($AX_MATRICULE)\r
+ {\r
+ include('config.inc');\r
+ \r
+ $id =13;//13 params persos ancien\r
+ $id_ad = 11; //12 params adresse\r
+ $id_ac = 14; //15 params adresse \r
+ $id_fo = 1; //1 params fonction \r
+ \r
+ $erreur = "";\r
+ \r
+ // Génération d'un identifiant de "session" inter-serveurs\r
+ $id_session = md5 (uniqid (rand())); \r
+ \r
+ // Connexion au serveur pour lui fournir l'identifiant et lui demander un challenge\r
+ $challenge = file_get_contents ($nom_script_renvoi_challenge."?id_session=".urlencode($id_session)); \r
+ if ($challenge == 'ERROR') \r
+ {\r
+ $erreur = "Erreur lors de la demande du challenge";\r
+ } \r
+ else\r
+ {\r
+ // On va relire la clé privée (codée)\r
+ $privkeypass = $phrase;\r
+ $pkey_txt = file_get_contents ($chemin_cle_privee);\r
+ if (($pkey_res = openssl_pkey_get_private($pkey_txt, $privkeypass)) == false) \r
+ {\r
+ $erreur = "Erreur lors de l'ouverture de la clé privée";\r
+ }\r
+ else\r
+ {\r
+ // Signature du challenge (cryptage avec clé privée)\r
+ if ( openssl_private_encrypt($challenge, $response, $pkey_res) == false ) \r
+ {\r
+ $erreur = "Erreur lors du cryptage du challenge avec la clé privée";\r
+ }\r
+ else\r
+ {\r
+ // Signature du login (cryptage avec clé privée)\r
+ if ( openssl_private_encrypt($AX_MATRICULE, $AX_MATRICULE_CRYPTE, $pkey_res) == false ) \r
+ {\r
+ $erreur = "Erreur lors du cryptage du matricule avec la clé privée";\r
+ }\r
+ else\r
+ {\r
+ // Envoi de la réponse au serveur avec l'identifiant de l'ancien dont on veut récupérer les infos\r
+ $reponse_serveur .= file_get_contents ($nom_script_renvoi_infos."?id_session=".urlencode($id_session)."&AX_MATRICULE_CRYPTE=".urlencode($AX_MATRICULE_CRYPTE)."&response=".urlencode($response));\r
+ \r
+ $parser = xml_parser_create();\r
+ xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r
+ xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r
+ xml_parse_into_struct($parser, $reponse_serveur, $vals, $index);\r
+ xml_parser_free($parser);\r
+ \r
+ $tree = array();\r
+ $tree[] = array(\r
+ 'tag' => $vals[0]['tag'],\r
+ 'attributes' => isset($vals[0]['attributes'])?\r
+ $vals[0]['attributes'] : null,\r
+ 'children' => xml_get_children($vals, $i = 0),\r
+ );\r
+ \r
+ for ($i=0; $i < $id; $i++) \r
+ {\r
+ $val_ancien[$tree[0]['children'][0]['children'][$i]['tag']] = $tree[0]['children'][0]['children'][$i]['value']; \r
+ } \r
+ \r
+ $Ancien_renvoye = new Ancien($val_ancien); \r
+ \r
+ //adresse while pour nbre d'adresses\r
+ $num_ad = 0;\r
+ while ($tree[0]['children'][0]['children'][$id]['tag'] == 'ADRESSE')\r
+ {\r
+ for ($i=0; $i <= $id_ad; $i++) \r
+ {\r
+ $val_adresse[$tree[0]['children'][0]['children'][$id]['children'][$i]['tag']] = $tree[0]['children'][0]['children'][$id]['children'][$i]['value']; \r
+ } \r
+ \r
+ $Adresse_renvoyee = new Adresse($val_adresse);\r
+ $Ancien_renvoye->Ajout_adresse($Adresse_renvoyee,$num_ad); \r
+ \r
+ //prochaine adresse\r
+ $num_ad = $num_ad + 1;\r
+ $id = $id+1;\r
+ }\r
+ \r
+ //idem pour activité \r
+ $num_ac = 0;\r
+ while ($tree[0]['children'][0]['children'][$id]['tag'] == 'ACTIVITE')\r
+ {\r
+ for ($i=0; $i <= $id_ac; $i++) \r
+ {\r
+ $val_activite[$tree[0]['children'][0]['children'][$id]['children'][$i]['tag']] = $tree[0]['children'][0]['children'][$id]['children'][$i]['value']; \r
+ \r
+ for ($j=0; $j <= $id_ad; $j++) \r
+ {\r
+ $val_activite[$tree[0]['children'][0]['children'][$id]['children'][$i]['children'][$j]['tag']] = $tree[0]['children'][0]['children'][$id]['children'][$i]['children'][$j]['value']; \r
+ }\r
+ } \r
+ \r
+ $Activite_renvoyee = new Activite($val_activite);\r
+ $Ancien_renvoye->Ajout_activite($Activite_renvoyee,$num_ac); \r
+ \r
+ //prochaine activité\r
+ $num_ac = $num_ac + 1;\r
+ $id = $id+1;\r
+ }\r
+ //idem pour formation \r
+ $num_fo = 0;\r
+ while ($tree[0]['children'][0]['children'][$id]['tag'] == 'FORMATION')\r
+ {\r
+ for ($i=0; $i <= $id_fo; $i++) \r
+ {\r
+ $val_formation[$tree[0]['children'][0]['children'][$id]['children'][$i]['tag']] = $tree[0]['children'][0]['children'][$id]['children'][$i]['value']; \r
+ } \r
+ \r
+ $Formation_renvoyee = new Formation($val_formation);\r
+ $Ancien_renvoye->Ajout_formation($Formation_renvoyee,$num_fo); \r
+ \r
+ //prochaine formation\r
+ $num_fo = $num_fo + 1;\r
+ $id = $id+1;\r
+ } \r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ //erreur indiquée\r
+ if ($erreur) //erreur ici\r
+ {\r
+ $Ancien_renvoye = new Ancien('');\r
+ $Ancien_renvoye->Ajout_erreur($erreur); \r
+ }\r
+ else\r
+ { //renvoyée par le fichier serveur_renvoie_infos\r
+ $Ancien_renvoye->Ajout_erreur($tree[0]['children'][1]['value']);\r
+ } \r
+ \r
+ return $Ancien_renvoye;\r
+ }\r
+ \r
+?>\r
--- /dev/null
+<?php\r
+ \r
+ global $globals;\r
+ //chemin de stockage de la clé privée A MODIFIER\r
+ $chemin_cle_privee = $globals->spoolroot."/configs/cle_privee_ax.pem";\r
+ //phrase cryptant la clé privée\r
+ $phrase = $globals->webservice->pass_ax;\r
+// "Cryptage de la cle pour polytechnique.org";\r
+ \r
+ //paramètres serveurs \r
+ $nom_script_renvoi_challenge = $globals->webservice->host_ax."serveur_genere_challenge.php";\r
+ $nom_script_renvoi_infos = $globals->webservice->host_ax."serveur_renvoie_infos_ancien_direct.php";\r
+?>\r
--- /dev/null
+ <!ELEMENT MESSAGE (CODE_RETOUR, ANCIEN)>\r
+ <!ELEMENT CODE_RETOUR (#PCDATA)>\r
+ <!ELEMENT ANCIEN (NOM_PATR, PART_NOM, PRENOM, NOM_USUEL, PART_NOMUS, NOM_COMPLET, CIVILITE, GRADE, CORPS, PROMO, NATIONALITE, CORPS_LIBELLE, EMAIL, ADRESSE, ACTIVITE, FORMATION)>\r
+ <!ELEMENT NOM_PATR (#PCDATA)>\r
+ <!ELEMENT PART_NOM (#PCDATA)>\r
+ <!ELEMENT PRENOM (#PCDATA)>\r
+ <!ELEMENT NOM_USUEL (#PCDATA)>\r
+ <!ELEMENT PART_NOMUS (#PCDATA)>\r
+ <!ELEMENT NOM_COMPLET (#PCDATA)>\r
+ <!ELEMENT CIVILITE (#PCDATA)>\r
+ <!ELEMENT GRADE (#PCDATA)>\r
+ <!ELEMENT CORPS (#PCDATA)>\r
+ <!ELEMENT PROMO (#PCDATA)>\r
+ <!ELEMENT NATIONALITE (#PCDATA)> \r
+ <!ELEMENT EMAIL (#PCDATA)> \r
+ <!ELEMENT CORPS_LIBELLE (#PCDATA)> \r
+ <!ELEMENT ADRESSE (TYPE, ADRESS1, ADRESS2, ADRESS3, CODE_PST, VILLE, ZIPCEDEX, ETATREGION, PAYS, MOBILE,TEL,FAX)>\r
+ <!ELEMENT TYPE (#PCDATA)>\r
+ <!ELEMENT ADRESS1 (#PCDATA)>\r
+ <!ELEMENT ADRESS2 (#PCDATA)>\r
+ <!ELEMENT ADRESS3 (#PCDATA)>\r
+ <!ELEMENT CODE_PST (#PCDATA)>\r
+ <!ELEMENT VILLE (#PCDATA)>\r
+ <!ELEMENT ZIPCEDEX (#PCDATA)>\r
+ <!ELEMENT ETATREGION (#PCDATA)>\r
+ <!ELEMENT PAYS (#PCDATA)>\r
+ <!ELEMENT MOBILE (#PCDATA)>\r
+ <!ELEMENT TEL (#PCDATA)>\r
+ <!ELEMENT FAX (#PCDATA)>\r
+ <!ELEMENT ACTIVITE (ENTREPRISE, RAISON_SOCIALE, FONCTION, ADRESSE)>\r
+ <!ELEMENT ENTREPRISE (#PCDATA)>\r
+ <!ELEMENT RAISON_SOCIALE (#PCDATA)>\r
+ <!ELEMENT FONCTION (#PCDATA)>\r
+ <!ELEMENT FORMATION (LIBELLE)>\r
+ <!ELEMENT LIBELLE (#PCDATA)>
\ No newline at end of file
--- /dev/null
+<?php
+
+require_once('webservices/manageurs.inc.php');
+
+require_once('xml-rpc-client.inc.php');
+
+function get_annuaire_infos($amicale, $id_assoce, $adresse){
+
+ $url = '';
+
+ $url = 'http://www.polytechniciens.org:80/manageurs.php';
+ //decommenter pour ajouter un webservice chez l'AX :
+ // return array('adresse' => array(0 => array('adr1' => 'test AX', 'city' => 'Trou perdu')));
+
+ $client = new xmlrpc_client($url);
+
+ global $globals;
+ if($array = $client->get_annuaire_infos($globals->webservice->pass, $id_assoce, $adresse)){
+
+ if( is_string($array) ){
+ $erreur = xmlrpc_decode($array);
+ echo $erreur['erreurstring']."\n";
+ return $erreur['erreur'];
+ }
+ else{
+ manageurs_encrypt_init($id_assoce);
+ $reply = manageurs_decrypt_array($array);
+ manageurs_encrypt_close();
+ return $reply;
+ }
+ }
+ else return false;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+$tripledes = '';
+
+
+function manageurs_encrypt_init($id_assoce){
+ global $tripledes, $globals;
+ $cipher_key = $globals->manageurs->manageurs_cipher_key;
+ if(!$tripledes){
+ if(empty($cipher_key)){
+ return 1;
+ }
+ $tripledes = mcrypt_module_open('tripledes', '', 'ecb', '');
+ $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($tripledes), MCRYPT_RAND);
+ mcrypt_generic_init($tripledes, $cipher_key.$id_assoce, $iv);
+ return 0;
+ }
+}
+
+function manageurs_encrypt_close(){
+ global $tripledes;
+ if($tripledes){
+ mcrypt_generic_deinit($tripledes);
+ mcrypt_module_close($tripledes);
+ $tripledes = '';
+ }
+}
+
+function manageurs_encrypt($message){
+ global $tripledes;
+ return base64_encode(mcrypt_generic($tripledes, $message));
+}
+
+function manageurs_decrypt($message){
+ global $tripledes;
+ return trim(mdecrypt_generic($tripledes, base64_decode($message)));
+}
+
+function manageurs_encrypt_array($array){
+ foreach($array as $key => $value){
+ if(is_array($value)){
+ $result[manageurs_encrypt($key)] = manageurs_encrypt_array($value);
+ }
+ else{
+ $result[manageurs_encrypt($key)] = manageurs_encrypt($value);
+ }
+ }
+ return $result;
+}
+
+function manageurs_decrypt_array($array){
+ foreach($array as $key => $value){
+ if(is_array($value)){
+ $result[manageurs_decrypt($key)] = manageurs_decrypt_array($value);
+ }
+ else{
+ $result[manageurs_decrypt($key)] = manageurs_decrypt($value);
+ }
+ }
+ return $result;
+}
+
+?>
--- /dev/null
+<?php
+
+require_once('webservices/manageurs.inc.php');
+
+$error_mat = "You didn't provide me with a valid matricule number...";
+$error_key = "You didn't provide me with a valid cipher key...";
+
+/**
+ le premier parametre doit etre le matricule
+ le second parametre facultatif doit etre le numero de l'adresse voulue :
+ -1 => on ne veut pas d'adresse
+ 0 => on veut toutes les adresses
+ n => on veut l'adresse numero n
+*/
+function get_annuaire_infos($method, $params) {
+ global $error_mat, $error_key, $globals;
+
+ //verif du mdp
+ if(!isset($params[0]) || ($params[0] != $globals->manageurs->pass)){return false;}
+
+ //si on a adresse == -1 => on ne recupère aucune adresse
+ if(isset($params[2]) && ($params[2] == -1)) unset($params[2]);
+
+
+ if( !empty($params[1]) ){ // on verifie qu'on a bien un matricule
+
+ //on ne recupere pas les adresses inutilement
+ if(!isset($params[2])){
+ $res = $globals->xdb->iterRow(
+ "SELECT q.profile_mobile AS cell, a.naissance AS age
+ FROM auth_user_md5 AS a
+ INNER JOIN auth_user_quick AS q USING (user_id)
+ WHERE a.matricule = {?}", $params[1]);
+ }
+ else{
+ $res = $globals->xdb->iterRow(
+ "SELECT q.profile_mobile AS cell, a.naissance AS age,
+ adr.adr1, adr.adr2, adr.adr3,
+ adr.postcode, adr.city, adr.country,
+ adr.tel, adr.fax
+ FROM auth_user_md5 AS a
+ INNER JOIN auth_user_quick AS q USING (user_id)
+ LEFT JOIN adresses AS adr ON(adr.uid = a.user_id)
+ WHERE a.matricule = {?} AND
+ NOT FIND_IN_SET('pro', adr.statut)
+ ORDER BY NOT FIND_IN_SET('active', adr.statut),
+ FIND_IN_SET('res-secondaire', adr.statut),
+ NOT FIND_IN_SET('courrier', adr.statut)", $params[1]);
+
+ }
+
+ //traitement des adresss si necessaire
+ if (isset($params[2])) {
+ if(list($cell, $age, $adr['adr1'], $adr['adr2'], $adr['adr3'], $adr['postcode'], $adr['city'],
+ $adr['country'], $adr['tel'], $adr['fax']) = $res->next())
+ {
+ $array['cell'] = $cell;
+ $array['age'] = $age;
+ $array['adresse'][] = $adr;
+
+ //on clamp le numero au nombre d'adresses dispo
+ $adresse = min((int) $params[2], $res->total());
+
+ if ($adresse != 1) { //on ne veut pas la premiere adresse
+ $i = 2;
+ while(list($cell, $age, $adr['adr1'], $adr['adr2'], $adr['adr3'], $adr['postcode'], $adr['city'],
+ $adr['country'], $adr['tel'], $adr['fax']) = $res->next())
+ {
+ if($adresse == $i){//si on veut cette adresse en particulier
+ $array['adresse'][0] = $adr;
+ //$res->free();
+ break;
+ }
+ elseif($adresse == 0){//si on veut toutes les adresses
+ $array['adresse'][] = $adr;
+ }
+ $i++;
+ }
+ }
+ }
+ else{
+ $array = false;
+ }
+ }
+ else { //cas où on ne veut pas d'adresse
+ $array = $res->next();
+ }
+
+ if ($array) { // on a bien eu un résultat : le matricule etait bon
+
+ //on n'envoit que l'age à manageurs le format est YYYY-MM-DD 0123-56-89
+ $year = (int) substr($array['age'],0,4);
+ $month = (int) substr($array['age'],5,2);
+ $day = (int) substr($array['age'],8,2);
+ $age = (int) date('Y') - $year - 1;
+ if(( $month < (int)date('m')) ||
+ (($month == (int)date('m')) && ($day >= (int)date('d'))))
+ {
+ $age += 1;
+ }
+ $array['age'] = $age;
+
+ //on commence le cryptage des donnees
+ if (manageurs_encrypt_init($params[1]) == 1) {//on a pas trouve la cle pour crypter
+ $args = array("erreur" => 3, "erreurstring" => $error_key);
+ $reply = xmlrpc_encode_request(NULL,$args);
+ } else {
+ $reply = manageurs_encrypt_array($array);
+ manageurs_encrypt_close();
+ }
+ } else {//le matricule n'etait pas valide
+ $args = array("erreur" => 2, "erreurstring" => $erreur_mat);
+ $reply = xmlrpc_encode_request(NULL,$args);
+ }
+ } else {//le matricule n'etait pas en argument
+ $args = array("erreur" => 1, "erreurstring" => $error_mat);
+ $reply = xmlrpc_encode_request(NULL,$args);
+ }
+ return $reply;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/xml-rpc.inc.php');
+
+/* taken from : http://fr2.php.net/xml-rpc
+ * Author mboeren@php.net
+ *
+ * Usage:
+ * $client = new xmlrpc_client("http://localhost:7080");
+ * print $client->echo('x')."\n";
+ * print $client->add(1, 3)."\n";
+ */
+
+class xmlrpc_client
+{
+ var $url;
+ var $urlparts;
+
+ function xmlrpc_client($url)
+ {
+ $this->url = $url;
+ $this->urlparts = parse_url($this->url);
+ foreach(array('scheme', 'host', 'user', 'pass', 'path', 'query', 'fragment') as $part) {
+ if (!isset($this->urlparts[$part])) {
+ $this->urlparts[$part] = NULL;
+ }
+ }
+ }
+
+ function __call($function, $arguments, &$return)
+ {
+ $requestprms['host'] = $this->urlparts['host'];
+ $requestprms['port'] = $this->urlparts['port'];
+ $requestprms['uri'] = $this->urlparts['path'];
+ $requestprms['method'] = $function;
+ $requestprms['args'] = $arguments;
+ $requestprms['debug'] = 0;
+ $requestprms['timeout'] = 0;
+ $requestprms['user'] = $this->urlparts['user'];
+ $requestprms['pass'] = $this->urlparts['pass'];
+ $requestprms['secure'] = 0;
+
+ $result = xu_rpc_http_concise($requestprms);
+ if (is_array($result) && isset($result['faultCode'])) {
+ print('Error in xmlrpc call \''.$function.'\''."\n");
+ print(' code : '.$result['faultCode']."\n");
+ print(' message: '.$result['faultString']."\n");
+ return false;
+ }
+ $return = $result;
+ return true;
+ }
+
+}
+
+overload('xmlrpc_client');
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal.inc.php');
+require_once('xnet/globals.inc.php');
+require_once('xnet/session.inc.php');
+XnetGlobals::init();
+XnetGlobals::setlocale();
+XnetSession::init();
+
+// {{{ function new_skinned_page()
+
+function new_page($tpl_name, $min_auth)
+{
+ global $page,$globals;
+ require_once("xnet/page.inc.php");
+ switch($min_auth) {
+ case AUTH_PUBLIC:
+ $page = new XnetPage($tpl_name, $type);
+ break;
+
+ default:
+ $page = new XnetAuth($tpl_name, $type);
+ }
+ $page->assign('xorg_tpl', $tpl_name);
+}
+
+// }}}
+// {{{ function new_group_page()
+
+function new_group_page($tpl_name)
+{
+ global $page,$globals;
+ require_once("xnet/page.inc.php");
+ $page = new XnetGroupPage($tpl_name);
+ $page->assign('xorg_tpl', $tpl_name);
+}
+
+// }}}
+// {{{ function new_groupadmin_page()
+
+function new_groupadmin_page($tpl_name)
+{
+ global $page,$globals;
+ require_once("xnet/page.inc.php");
+ $page = new XnetGroupAdmin($tpl_name);
+ $page->assign('xorg_tpl', $tpl_name);
+}
+
+// }}}
+// {{{ function new_admin_page()
+
+function new_admin_page($tpl_name)
+{
+ global $page,$globals;
+ require_once("xnet/page.inc.php");
+ $page = new XnetAdmin($tpl_name);
+ $page->assign('xorg_tpl', $tpl_name);
+}
+
+// }}}
+// {{{ function new_nonhtml_page()
+
+function new_nonhtml_page($tpl_name)
+{
+ global $page, $globals;
+ require_once("xnet/page.inc.php");
+ $page = new XnetGroupPage($tpl_name, NO_SKIN);
+ $page->assign('xorg_tpl', $tpl_name);
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ function get_event_detail()
+function get_event_detail($eid, $item_id = false) {
+ global $globals;
+ $res = $globals->xdb->query(
+ "SELECT SUM(nb) AS nb_tot, e.intitule, ei.titre,
+ debut AS deb, fin, membres_only, descriptif, e.eid,
+ e.show_participants, e.paiement_id, e.short_name,
+ al.vid AS absent_list, pl.vid AS participant_list,
+ a.nom, a.prenom, a.promo
+ FROM groupex.evenements AS e
+ INNER JOIN groupex.evenements_items AS ei ON (e.eid = ei.eid)
+ LEFT JOIN groupex.evenements_participants AS ep ON(e.eid = ep.eid AND ei.item_id = ep.item_id)
+ 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, {?}))
+ LEFT JOIN auth_user_md5 AS a ON (a.user_id = e.organisateur_uid)
+ WHERE e.eid = {?} AND ei.item_id = {?} AND e.asso_id = {?}
+ GROUP BY ei.item_id",
+ '-absents@'.$globals->xnet->evts_domain,
+ '-participants@'.$globals->xnet->evts_domain,
+ $eid, $item_id?$item_id:1, $globals->asso('id'));
+ $evt = $res->fetchOneAssoc();
+ if (!$evt) return false;
+
+ // smart calculation of the total number
+ if (!$item_id) {
+ $res = $globals->xdb->query(
+ "SELECT MAX(nb)
+ FROM groupex.evenements AS e
+ INNER JOIN groupex.evenements_items AS ei ON (e.eid = ei.eid)
+ LEFT JOIN groupex.evenements_participants AS ep ON(e.eid = ep.eid AND ei.item_id = ep.item_id)
+ WHERE e.eid = {?}
+ GROUP BY ep.uid", $eid);
+ $evt['nb_tot'] = array_sum($res->fetchColumn());
+ $evt['titre'] = '';
+ $evt['item_id'] = 0;
+ }
+
+ $res = $globals->xdb->iterator(
+ "SELECT eid, item_id, titre, montant
+ FROM groupex.evenements_items
+ WHERE eid = {?}",
+ $eid);
+ $moments = array(); $evt['money'] = false;
+ while ($m = $res->next()) {
+ $moments[$m['item_id']] = $m;
+ if ($m['montant'] > 0) $evt['money'] = true;
+ }
+ $evt['moments'] = $moments;
+ return $evt;
+}
+// }}}
+
+// {{{ function get_event_participants()
+function get_event_participants($eid, $item_id, $where, $tri, $limit, $money, $pay_id) {
+ global $globals;
+ $query =
+ "SELECT IF(u.nom IS NULL,m.nom,IF(u.nom_usage<>'', u.nom_usage, u.nom)) AS nom,
+ IF(u.nom IS NULL,m.prenom,u.prenom) AS prenom,
+ IF(u.nom IS NULL,'extérieur',u.promo) AS promo,
+ IF(u.nom IS NULL,m.email,a.alias) AS email,
+ IF(u.nom IS NULL,0,FIND_IN_SET('femme', u.flags)) AS femme,
+ m.perms='admin' AS admin,
+ NOT(u.nom IS NULL) AS x,
+ ep.uid, ep.paid, SUM(nb) AS nb
+ FROM groupex.evenements_participants AS ep
+ INNER JOIN groupex.evenements AS e ON (ep.eid = e.eid)
+ LEFT JOIN groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id)
+ 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 = {?}
+ ".(($item_id)?" AND item_id = $item_id":"")."
+ $where
+ GROUP BY ep.uid
+ ORDER BY $tri
+ $limit";
+ if ($item_id) {
+ $res = $globals->xdb->query($query, $eid);
+ return $res->fetchAllAssoc();
+ }
+ $res = $globals->xdb->iterator($query, $eid);
+ $tab = array();
+ $user = 0;
+ while ($u = $res->next()) {
+ $u['montant'] = 0;
+ if ($money && $pay_id) {
+ $res_ = $globals->xdb->query(
+ "SELECT montant
+ FROM {$globals->money->mpay_tprefix}transactions AS t
+ WHERE ref = {?} AND uid = {?}",
+ $pay_id, $u['uid']);
+ $montants = $res_->fetchColumn();
+ foreach ($montants as $m) {
+ $p = strtr(substr($m, 0, strpos($m, "EUR")), ",", ".");
+ $u['paid'] += trim($p);
+ }
+ }
+ $res_ = $globals->xdb->iterator(
+ "SELECT ep.nb, ep.item_id, ei.montant
+ FROM groupex.evenements_participants AS ep
+ INNER JOIN groupex.evenements_items AS ei ON (ei.eid = ep.eid AND ei.item_id = ep.item_id)
+ WHERE ep.eid = {?} AND ep.uid = {?}",
+ $eid, $u['uid']);
+ while ($i = $res_->next()) {
+ $u[$i['item_id']] = $i['nb'];
+ $u['montant'] += $i['montant']*$i['nb'];
+ }
+ $tab[] = $u;
+ }
+ return $tab;
+}
+// }}}
+
+// {{{ function subscribe_lists_event()
+function subscribe_lists_event($participate, $uid, $participant_list, $absent_list) {
+ global $globals,$page;
+
+ $email = Session::get('forlife');
+
+ if ($email) {
+ $email .= '@'.$globals->mail->domain;
+ } else {
+ $res = $globals->xdb->query("SELECT email FROM groupex.membres WHERE uid = {?} AND asso_id = {?}", Session::get('uid'), $globals->asso('id'));
+ $email = $res->fetchOneCell();
+ }
+
+ $subscribe = $participate?$participant_list:(is_member()?$absent_list:0);
+ $unsubscri = $participate?$absent_list:$participant_list;
+
+ if ($subscribe) {
+ $globals->xdb->execute(
+ "REPLACE INTO virtual_redirect VALUES({?},{?})",
+ $subscribe, $email);
+ }
+
+ if ($unsubscri) {
+ $globals->xdb->execute(
+ "DELETE FROM virtual_redirect WHERE vid = {?} AND redirect = {?}",
+ $unsubscri, $email);
+ }
+
+}
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/globals.inc.php');
+
+// {{{ class XorgGlobals
+
+class XnetGlobals extends PlatalGlobals
+{
+ function XnetGlobals()
+ {
+ $this->PlatalGlobals('XnetSession');
+ }
+
+ function init()
+ {
+ global $globals;
+ require_once('xorg/hook.inc.php');
+
+ $globals = new XnetGlobals;
+ $globals->core = new CoreConfig;
+ $globals->root = dirname(dirname(dirname(__FILE__)));
+ $globals->hook = new XOrgHook();
+
+ $globals->hook->config(null);
+
+ $globals->read_config();
+
+ $globals->dbconnect();
+ if ($globals->debug & 1) {
+ $globals->db->trace_on();
+ }
+ $globals->xdb =& new XOrgDB;
+ }
+
+ function asso($key=null)
+ {
+ static $aid = null;
+ if ($aid === null) {
+ $gp = basename(dirname($_SERVER['PHP_SELF']));
+ // for url like /groupex/event.php/file.csv
+ if (substr($gp, -4) == ".php")
+ $gp = basename(dirname(dirname($_SERVER['PHP_SELF'])));
+ $res = $this->xdb->query('SELECT a.*, d.nom AS domnom
+ FROM groupex.asso AS a
+ LEFT JOIN groupex.dom AS d ON d.id = a.dom
+ WHERE diminutif = {?}', $gp);
+ if (!($aid = $res->fetchOneAssoc())) {
+ $aid = array();
+ }
+ }
+ if (empty($key)) {
+ return $aid;
+ } elseif ( isset($aid[$key]) ) {
+ return $aid[$key];
+ } else {
+ return null;
+ }
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'diogenes/diogenes.hermes.inc.php';
+
+// {{{ get_all_redirects
+
+function get_all_redirects($membres, $mls, $alias, &$client)
+{
+ global $globals;
+
+ $tos = array();
+
+ if ($membres) {
+ $res = $globals->xdb->query(
+ 'SELECT IF(u.nom <> "", u.nom, m.nom) AS nom,
+ IF(u.prenom <> "", u.prenom, m.prenom) AS prenom,
+ IF(m.email <> "", m.email, CONCAT(a.alias, "@polytechnique.org")) as email,
+ FIND_IN_SET("femme", u.flags) AS sexe
+ FROM groupex.membres AS m
+ LEFT JOIN auth_user_md5 AS u ON (m.uid=u.user_id AND m.uid<50000)
+ LEFT JOIN aliases AS a ON (a.id=u.user_id and a.type="a_vie")
+ WHERE asso_id = {?}', $globals->asso('id'));
+ $tos = $res->fetchAllAssoc();
+ }
+
+ foreach ($mls as $ml) {
+ if (list(,$members) = $client->get_members($ml)) {
+ foreach ($members as $mem) {
+ list($m, $dom) = split('@',$mem[1]);
+ if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
+ $res = $globals->xdb->query('SELECT prenom, nom, FIND_IN_SET("femme", u.flags) AS sexe
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON u.user_id = a.id
+ WHERE a.alias = {?}', $m);
+ if ($person = $res->fetchOneAssoc()) {
+ $person['email'] = $mem[1];
+ $tos[] = $person;
+ }
+ } else {
+ $res = $globals->xdb->query('SELECT prenom, nom FROM groupex.membres WHERE email={?}', $mem);
+ if ($person = $res->fetchOneAssoc()) {
+ $person['email'] = $mem[1];
+ $tos[] = $person;
+ } else {
+ $tos[] = array('email' => $mem[1]);
+ }
+ }
+ }
+ }
+ }
+
+ return $tos;
+}
+
+// }}}
+// {{{ _send_xnet_mail
+
+function _send_xnet_mail($user, $body, $mailer)
+{
+ $cher = isset($user['sexe']) ? ($user['sexe'] ? 'Chère' : 'Cher') : 'Cher(e)';
+ $nom = isset($user['nom']) ? $user['nom'] : "";
+ $pnom = isset($user['prenom']) ? $user['prenom'] : preg_replace('!@.*!', '', $user['email']);
+ $to = isset($user['prenom']) ? "\"{$user['prenom']} {$user['nom']}\" <{$user['email']}>" : $user['email'];
+
+ $text = $body;
+ $text = preg_replace('!<cher>!i', $cher, $text);
+ $text = preg_replace('!<nom>!i', $nom, $text);
+ $text = preg_replace('!<prenom>!i', $pnom, $text);
+
+ $mailer->addHeader('To', $to);
+ $mailer->setTxtBody(wordwrap($text, 72));
+ $mailer->send();
+}
+
+// }}}
+// {{{ send_xnet_mails
+
+function send_xnet_mails($from, $sujet, $body, $tos)
+{
+ $sent = array();
+
+ $mailer = new HermesMailer();
+ $mailer->setSubject($sujet);
+ $mailer->setFrom($from);
+
+ foreach ($tos as $user) {
+ if ($sent[$user['email']]) continue;
+ _send_xnet_mail($user, $body, $mailer);
+ $sent[$user['email']] = true;
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/page.inc.php');
+require_once('xnet/smarty.plugins.inc.php');
+
+// {{{ class XnetPage
+
+class XnetPage extends PlatalPage
+{
+ // {{{ function XnetPage()
+
+ function XnetPage($tpl, $type=SKINNED)
+ {
+ $this->PlatalPage($tpl, $type);
+ }
+
+ // }}}
+ // {{{ function run()
+
+ function run()
+ {
+ $this->_run('xnet/skin.tpl');
+ }
+
+ // }}}
+ // {{{ function setType
+
+ function setType($type)
+ {
+ $this->assign('xnet_type', strtolower($type));
+ }
+
+ // }}}
+ // {{{ function useMenu
+
+ function useMenu()
+ {
+ global $globals;
+
+ $menu = array();
+
+ $sub = array();
+ $sub['accueil'] = 'index.php';
+ $sub['liste des groupes'] = 'plan.php';
+ if (logged()) {
+ if (has_perms()) {
+ $sub['admin X.net'] = 'admin.php';
+ }
+ $sub['déconnexion'] = 'deconnexion.php';
+ }
+ $menu["Menu Principal"] = $sub;
+
+ if (logged() && (is_member() || may_update())) {
+ $sub = array();
+ $dim = $globals->asso('diminutif');
+ $sub['présentation'] = "$dim/asso.php";
+ if (may_update() || $globals->asso('pub') == 'public')
+ $sub['annuaire du groupe'] = "$dim/annuaire.php";
+ if ($globals->asso('mail_domain')) {
+ $sub['listes de diffusion'] = "$dim/listes.php";
+ }
+ $sub['événement'] = "$dim/evenements.php";
+ if (false) {
+ $sub['carnet'] = "$dim/carnet.php";
+ }
+ $sub['télépaiement'] = "$dim/telepaiement.php";
+
+ $menu[$globals->asso('nom')] = $sub;
+ }
+
+ if (logged() && may_update()) {
+ $sub = array();
+ $sub['modifier l\'accueil'] = "$dim/edit.php";
+ if ($globals->asso('mail_domain')) {
+ $sub['envoyer un mail'] = "$dim/mail.php";
+ $sub['créer une liste'] = "$dim/listes-create.php";
+ $sub['créer un alias'] = "$dim/alias-create.php";
+ }
+ $menu['Administrer Groupe'] = $sub;
+ }
+
+ $this->assign('menu', $menu);
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ function doAuth()
+ {
+ $this->register_function('list_all_my_groups', 'list_all_my_groups');
+ $this->register_modifier('cat_pp', 'cat_pp');
+ $this->assign('it_is_xnet', true);
+ if (!logged() && Get::has('auth')) {
+ $_SESSION['session']->doAuthX($this);
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XnetAuth
+
+/** Une classe pour les pages nécessitant l'authentification.
+ * (equivalent de controlauthentification.inc.php)
+ */
+class XnetAuth extends XnetPage
+{
+ // {{{ function XnetAuth()
+
+ function XnetAuth($tpl, $type=SKINNED)
+ {
+ $this->XnetPage($tpl, $type);
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ function doAuth()
+ {
+ parent::doAuth();
+ $_SESSION['session']->doAuth($this);
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XnetAdmin
+
+/** Une classe pour les pages réservées aux admins (authentifiés!).
+ */
+class XnetAdmin extends XnetAuth
+{
+ // {{{ function XnetAdmin()
+
+ function XnetAdmin($tpl, $type=SKINNED)
+ {
+ global $globals;
+
+ $this->XnetAuth($tpl, $type);
+ check_perms();
+
+ $this->useMenu();
+ if ($globals->asso('cat')) {
+ $this->assign('asso', $globals->asso());
+ $this->setType($globals->asso('cat'));
+ }
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XnetGroupPage
+
+/** Une classe pour les pages réservées aux admins (authentifiés!).
+ */
+class XnetGroupPage extends XnetAuth
+{
+ // {{{ function XnetAdmin()
+
+ function XnetGroupPage($tpl, $type=SKINNED)
+ {
+ global $globals;
+
+ $this->XnetAuth($tpl, $type);
+ if (!is_member() && !has_perms()) {
+ $this->kill("You have not sufficient credentials");
+ }
+
+ $this->useMenu();
+ $this->assign('asso', $globals->asso());
+ $this->setType($globals->asso('cat'));
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XnetGroupAdmin
+
+/** Une classe pour les pages réservées aux admins (authentifiés!).
+ */
+class XnetGroupAdmin extends XnetAuth
+{
+ // {{{ function XnetAdmin()
+
+ function XnetGroupAdmin($tpl, $type=SKINNED)
+ {
+ global $globals;
+
+ $this->XnetAuth($tpl, $type);
+ if (!may_update()) {
+ $this->kill("You have not sufficient credentials");
+ }
+
+ $this->useMenu();
+ $this->assign('asso', $globals->asso());
+ $this->setType($globals->asso('cat'));
+ }
+
+ // }}}
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/session.inc.php');
+
+// {{{ class XorgSession
+
+class XnetSession extends DiogenesCoreSession
+{
+ // {{{ function XnetSession()
+
+ function XnetSession()
+ {
+ $this->DiogenesCoreSession();
+ }
+
+ // }}}
+ // {{{ function init
+
+ function init() {
+ global $globals;
+
+ @session_start();
+ if (!Session::has('session')) {
+ $_SESSION['session'] = new XnetSession;
+ }
+ if (!logged()) {
+ // prevent connexion to be linked to deconnexion
+ if (($i = strpos($_SERVER['REQUEST_URI'], 'deconnexion.php')) !== false)
+ $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 .= "?session=" . session_id();
+ $url .= "&challenge=" . $_SESSION['session']->challenge;
+ $url .= "&pass=" . md5($_SESSION['session']->challenge . $globals->xnet->secret);
+ $url .= "&url=".urlencode($returl);
+ $_SESSION['session']->loginX = $url;
+ }
+ }
+
+ // }}}
+ // {{{ function destroy()
+
+ function destroy() {
+ @session_destroy();
+ unset($_SESSION);
+ XnetSession::init();
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ /** Try to do an authentication.
+ *
+ * @param page the calling page (by reference)
+ */
+ function doAuth(&$page)
+ {
+ global $globals;
+ if (identified()) { // ok, c'est bon, on n'a rien à faire
+ return true;
+ }
+
+ if (Get::has('auth')) {
+ return $this->doAuthX($page);
+ } elseif (Post::has('challenge') && Post::has('username') && Post::has('response')) {
+ return $this->doAuthOther($page);
+ } else {
+ $this->doLogin($page);
+ }
+ }
+
+ // }}}
+ // {{{ doAuthX
+
+ function doAuthX(&$page) {
+ global $globals;
+
+ if (md5('1'.$this->challenge.$globals->xnet->secret.Get::getInt('uid').'1') != Get::get('auth')) {
+ $page->kill("Erreur d'authentification avec polytechnique.org !");
+ }
+
+ $res = $globals->xdb->query("
+ SELECT u.user_id AS uid, prenom, nom, perms, promo, password, FIND_IN_SET('femme', u.flags) AS femme,
+ a.alias AS forlife, a2.alias AS bestalias, q.core_mail_fmt AS mail_fmt, q.core_rss_hash
+ FROM auth_user_md5 AS u
+ INNER JOIN auth_user_quick AS q USING(user_id)
+ INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie')
+ INNER JOIN aliases AS a2 ON (u.user_id = a2.id AND FIND_IN_SET('bestalias',a2.flags))
+ WHERE u.user_id = {?} AND u.perms IN('admin','user')
+ LIMIT 1", Get::getInt('uid'));
+ $_SESSION = array_merge($_SESSION, $res->fetchOneAssoc());
+ $_SESSION['auth'] = AUTH_MDP;
+ unset($this->challenge);
+ unset($this->loginX);
+ Get::kill('auth');
+ Get::kill('uid');
+ $args = array();
+ foreach($_GET as $key=>$val) {
+ $args[] = urlencode($key).'='.urlencode($val);
+ }
+ header('Location: '.$_SERVER['PHP_SELF'] . '?' . join('&', $args));
+ }
+
+ // }}}
+ // {{{ doAuthOther
+
+ function doAuthOther(&$page) {
+ if (Post::has('challenge') && Post::has('username') && Post::has('response')) {
+ $username = Post::get('username');
+ }
+ $this->doLogin($page);
+ }
+
+ // }}}
+ // {{{ doLogin
+
+ function doLogin(&$page) {
+ $page->addJsLink('javascript/md5.js');
+ $page->addJsLink('javascript/do_challenge_response.js');
+ $page->assign("xorg_tpl", "xnet/login.tpl");
+ $page->run();
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ may_update
+
+function may_update() {
+ global $globals;
+ if (!$globals->asso('id')) { return false; }
+ if (has_perms()) { return true; }
+ $res = $globals->xdb->query(
+ "SELECT perms
+ FROM groupex.membres
+ WHERE uid={?} AND asso_id={?}", Session::getInt('uid'), $globals->asso('id'));
+ return $res->fetchOneCell() == 'admin';
+}
+
+// }}}
+// {{{ is_member
+
+function is_member() {
+ global $globals;
+ if (!$globals->asso('id')) { return false; }
+ $res = $globals->xdb->query(
+ "SELECT COUNT(*)
+ FROM groupex.membres
+ WHERE uid={?} AND asso_id={?}", Session::getInt('uid'), $globals->asso('id'));
+ return $res->fetchOneCell() == 1;
+}
+
+// }}}
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ function list_all_my_groups
+
+require_once $globals->spoolroot.'/plugins/function.rel.php';
+
+function list_all_my_groups($params)
+{
+ if (!logged()) {
+ return;
+ }
+ global $globals;
+ $res = $globals->xdb->iterRow(
+ "SELECT a.nom, a.diminutif
+ FROM groupex.asso AS a
+ INNER JOIN groupex.membres AS m ON m.asso_id = a.id
+ WHERE m.uid={?}", Session::getInt('uid'));
+ $html = '<div>Mes groupes :</div>';
+ while (list($nom, $mini) = $res->next()) {
+ $html .= "<a class='gp' href='".smarty_function_rel()."/$mini/asso.php'>• $nom</a>";
+ }
+ return $html;
+}
+
+// }}}
+// {{{ cat_pp
+
+function cat_pp($cat)
+{
+ $trans = array(
+ 'groupesx' => 'Groupes X' ,
+ 'binets' => 'Binets' ,
+ 'institutions' => 'Institutions' ,
+ 'promotions' => 'Promotions'
+ );
+
+ return $trans[strtolower($cat)];
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal.inc.php');
+require_once('xorg/globals.inc.php');
+require_once('xorg/session.inc.php');
+XorgGlobals::init();
+XorgGlobals::setlocale();
+XorgSession::init();
+
+// {{{ function _new_page()
+
+function _new_page($type, $tpl_name, $min_auth, $admin=false)
+{
+ global $page,$globals;
+ require_once("xorg/page.inc.php");
+ if (!empty($admin)) {
+ $page = new XorgAdmin($tpl_name, $type);
+ } else switch($min_auth) {
+ case AUTH_PUBLIC:
+ $page = new XorgPage($tpl_name, $type);
+ break;
+
+ case AUTH_COOKIE:
+ $page = new XorgCookie($tpl_name, $type);
+ break;
+
+ case AUTH_MDP:
+ $page = new XorgAuth($tpl_name, $type);
+ }
+
+ $page->assign('xorg_tpl', $tpl_name);
+}
+
+// }}}
+// {{{ function new_skinned_page()
+
+function new_skinned_page($tpl_name, $min_auth)
+{
+ _new_page(SKINNED, $tpl_name, $min_auth);
+}
+
+// }}}
+// {{{ function new_simple_page()
+
+function new_simple_page($tpl_name, $min_auth)
+{
+ global $page;
+ _new_page(SKINNED, $tpl_name, $min_auth);
+ $page->assign('simple', true);
+}
+
+// }}}
+// {{{ function new_nonhtml_page()
+
+function new_nonhtml_page($tpl_name, $min_auth)
+{
+ _new_page(NO_SKIN, $tpl_name, $min_auth, false);
+}
+
+// }}}
+// {{{ function new_admin_page()
+
+function new_admin_page($tpl_name)
+{
+ _new_page(SKINNED, $tpl_name, AUTH_MDP, true);
+}
+
+// }}}
+// {{{ function new_admin_table_editor()
+
+function new_admin_table_editor($table, $idfield, $idedit=false)
+{
+ array_walk($_GET, 'unfix_gpc_magic');
+ array_walk($_POST, 'unfix_gpc_magic');
+ array_walk($_REQUEST, 'unfix_gpc_magic');
+
+ global $editor;
+ new_admin_page('table-editor.tpl');
+ require_once('xorg.table-editor.inc.php');
+ $editor = new XOrgAdminTableEditor($table,$idfield,$idedit);
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('diogenes/diogenes.hermes.inc.php');
+require_once('Smarty.class.php');
+
+// {{{ class XOrgMailer
+
+/** Classe de mail avec corps en templates.
+ */
+class XOrgMailer extends Smarty
+{
+ // {{{ properties
+
+ /** Directory used to store mails_templates.
+ * Smarty::template_dir subdir used to sotre the mails templates.
+ * The body of the message is taken from a tsmarty template
+ */
+ var $mail_dir = "mails";
+ /** stores the mail template name */
+ var $_tpl;
+
+ /** stores the mail From: header */
+ var $_from;
+ /** stores the recipients of the mail */
+ var $_to = Array();
+ /** stores the Cc recipients of the mail */
+ var $_cc = Array();
+ /** stores the Bcc recipients of the mail */
+ var $_bcc = Array();
+ /** stores the subject of the mail */
+ var $_subject;
+
+ // }}}
+ // {{{ constructor
+
+ function XorgMailer($tpl)
+ {
+ global $globals;
+ $this->_tpl = $tpl;
+ $this->caching=false;
+ $this->compile_check=true;
+
+ $this->template_dir = $globals->root . "/templates/";
+ $this->compile_dir = $globals->root . "/templates_c/";
+ $this->config_dir = $globals->root . "/configs/";
+
+ $this->register_outputfilter('mail_format');
+ $this->register_function('from', 'set_from');
+ $this->register_function('to', 'set_to');
+ $this->register_function('cc', 'set_cc');
+ $this->register_function('bcc', 'set_bcc');
+ $this->register_function('subject', 'set_subject');
+ }
+
+ // }}}
+ // {{{ function send()
+
+ function send()
+ {
+ // do not try to optimize, in the templates, some function can modify our object, then we
+ // have to fetch in the first time, and only then send the mail.
+ $body = $this->fetch($this->mail_dir."/".$this->_tpl);
+ $mailer = new HermesMailer();
+ $mailer->setFrom($this->_from);
+ $mailer->addTo(implode(',',$this->_to));
+ $mailer->setSubject($this->_subject);
+ if (!empty($this->_cc)) {
+ $mailer->addCc(implode(',',$this->_cc));
+ }
+ if (!empty($this->_bcc)) {
+ $mailer->addBcc(implode(',',$this->_bcc));
+ }
+ $mailer->setTxtBody($body);
+ $mailer->send();
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ function mail_format()
+
+/** used to remove the empty lines due to {from ...}, {to ...} ... functions */
+function mail_format($output, &$smarty)
+{
+ return wordwrap("\n".trim($output)."\n",75);
+}
+
+// }}}
+// {{{ function format_addr()
+
+function format_addr(&$params)
+{
+ if (isset($params['full'])) {
+ return $params['full'];
+ } elseif (empty($params['text'])) {
+ return $params['addr'];
+ } else {
+ return $params['text'].' <'.$params['addr'].'>';
+ }
+}
+
+// }}}
+// {{{ function set_from()
+
+/** template function : from.
+ * {from full=...} for an already formatted address
+ * {from addr=... [text=...]} else
+ */
+function set_from($params, &$smarty)
+{ $smarty->_from = format_addr($params); }
+
+// }}}
+// {{{ function set_to()
+
+/** template function : to.
+ * {to full=...} for an already formatted address
+ * {to addr=... [text=...]} else
+ */
+function set_to($params, &$smarty)
+{ $smarty->_to[] = format_addr($params); }
+
+// }}}
+// {{{ function set_cc()
+
+/** template function : cc.
+ * {cc full=...} for an already formatted address
+ * {cc addr=... [text=...]} else
+ */
+function set_cc($params, &$smarty)
+{ $smarty->_cc[] = format_addr($params); }
+
+// }}}
+// {{{ function set_bcc()
+
+/** template function : bcc.
+ * {bcc full=...} for an already formatted address
+ * {bcc addr=... [text=...]} else
+ */
+function set_bcc($params, &$smarty)
+{ $smarty->_bcc[] = format_addr($params); }
+
+// }}}
+// {{{ function set_subject()
+
+/** template function : subject.
+ * {subject text=...}
+ */
+function set_subject($params, &$smarty)
+{
+ $smarty->_subject = $params['text'];
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function quoted_printable_encode($input, $line_max = 76) {
+ $lines = preg_split("/(?:\r\n|\r|\n)/", $input);
+ $eol = "\n";
+ $linebreak = "=0D=0A=\n ";
+ $escape = "=";
+ $output = "";
+
+ foreach ($lines as $j => $line) {
+ $linlen = strlen($line);
+ $newline = "";
+ for($i = 0; $i < $linlen; $i++) {
+ $c = $line{$i};
+ $dec = ord($c);
+ if ( ($dec == 32) && ($i == ($linlen - 1)) ) {
+ // convert space at eol only
+ $c = "=20";
+ } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) {
+ // always encode "\t", which is *not* required
+ $c = $escape.strtoupper(sprintf("%02x",$dec));
+ }
+ if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
+ $output .= $newline.$escape.$eol;
+ $newline = " ";
+ }
+ $newline .= $c;
+ } // end of for
+ $output .= $newline;
+ if ($j<count($lines)-1) $output .= $linebreak;
+ }
+ return trim($output);
+}
+
+/** vérifie si une adresse email convient comme adresse de redirection
+ * @param $email l'adresse email a verifier
+ * @return BOOL
+ */
+function isvalid_email_redirection($email) {
+ return isvalid_email($email) &&
+ !preg_match("/@(polytechnique\.(org|edu)|melix\.(org|net)|m4x\.org)$/", $email);
+}
+
+/* Un soundex en français posté par Frédéric Bouchery
+ Voici une adaptation en PHP de la fonction soundex2 francisée de Frédéric BROUARD (http://sqlpro.developpez.com/Soundex/).
+ C'est une bonne démonstration de la force des expressions régulières compatible Perl.
+ trouvé sur http://expreg.com/voirsource.php?id=40&type=Chaines%20de%20caract%E8res */
+function soundex_fr($sIn)
+{
+ // Si il n'y a pas de mot, on sort immédiatement
+ if ( $sIn === '' ) return ' ';
+ // On met tout en minuscule
+ $sIn = strtoupper( $sIn );
+ // On supprime les accents
+ $sIn = strtr( $sIn, 'ÂÄÀÇÈÉÊ˼ÎÏÔÖÙÛÜ', 'AAASEEEEEIIOOUUU' );
+ // On supprime tout ce qui n'est pas une lettre
+ $sIn = preg_replace( '`[^A-Z]`', '', $sIn );
+ // Si la chaîne ne fait qu'un seul caractère, on sort avec.
+ if ( strlen( $sIn ) === 1 ) return $sIn . ' ';
+ // on remplace les consonnances primaires
+ $convIn = array( 'GUI', 'GUE', 'GA', 'GO', 'GU', 'CA', 'CO', 'CU', 'Q', 'CC', 'CK' );
+ $convOut = array( 'KI', 'KE', 'KA', 'KO', 'K', 'KA', 'KO', 'KU', 'K', 'K', 'K' );
+ $sIn = str_replace( $convIn, $convOut, $sIn );
+ // on remplace les voyelles sauf le Y et sauf la première par A
+ $sIn = preg_replace( '`(?<!^)[EIOU]`', 'A', $sIn );
+ // on remplace les préfixes puis on conserve la première lettre
+ // et on fait les remplacements complémentaires
+ $convIn = array( '`^KN`', '`^(PH|PF)`', '`^MAC`', '`^SCH`', '`^ASA`', '`(?<!^)KN`', '`(?<!^)(PH|PF)`', '`(?<!^)MAC`', '`(?<!^)SCH`', '`(?<!^)ASA`' );
+ $convOut = array( 'NN', 'FF', 'MCC', 'SSS', 'AZA', 'NN', 'FF', 'MCC', 'SSS', 'AZA' );
+ $sIn = preg_replace( $convIn, $convOut, $sIn );
+ // suppression des H sauf CH ou SH
+ $sIn = preg_replace( '`(?<![CS])H`', '', $sIn );
+ // suppression des Y sauf précédés d'un A
+ $sIn = preg_replace( '`(?<!A)Y`', '', $sIn );
+ // on supprime les terminaisons A, T, D, S
+ $sIn = preg_replace( '`[ATDS]$`', '', $sIn );
+ // suppression de tous les A sauf en tête
+ $sIn = preg_replace( '`(?!^)A`', '', $sIn );
+ // on supprime les lettres répétitives
+ $sIn = preg_replace( '`(.)\1`', '$1', $sIn );
+ // on ne retient que 4 caractères ou on complète avec des blancs
+ return substr( $sIn . ' ', 0, 4);
+}
+
+function make_forlife($prenom,$nom,$promo) {
+ $prenomUS = replace_accent(trim($prenom));
+ $nomUS = replace_accent(trim($nom));
+
+ $forlife = strtolower($prenomUS.".".$nomUS.".".$promo);
+ $forlife = str_replace(" ","-",$forlife);
+ $forlife = str_replace("'","",$forlife);
+ return $forlife;
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class XOrgPlugin
+
+/**
+ * XOrg Plugins class
+ *
+ * this class is used for plugins whose behavior depends only from the GET.
+ *
+ * @category XOrgCore
+ * @package XOrgCore
+ * @author Pierre Habouzit <pierre.habouzit@polytechnique.org>
+ * @access public
+ * @since Classe available since 0.9.2
+ */
+class XOrgPlugin
+{
+ // {{{ properties
+
+ /** have to override, contents the fields names used to drive the plugin */
+ var $_get_vars = Array();
+ /** some polymorphism at low cost, may be used, or not */
+ var $_callback;
+
+ // }}}
+ // {{{ function XOrgPlugin()
+
+ /** constructor.
+ * the constructor override $_get_vars settings by prefixing the names with $prefix
+ */
+ function XOrgPlugin($funcname='', $prefix='')
+ {
+ $this->_callback = $funcname;
+ $this->_prefix = $prefix;
+ foreach ($this->_get_vars as $key=>$val) {
+ $this->_get_vars[$key] = $prefix.$val;
+ }
+ }
+
+ // }}}
+ // {{{ function get_value()
+
+ /** transparent access to $_GET, wrt the right $prefix
+ */
+ function get_value($key)
+ {
+ return Get::get($this->_prefix.$key);
+ }
+
+ // }}}
+ // {{{ function make_url()
+
+ /** construct an url with the given parameters to drive the plugin.
+ * leave all other GET params alone
+ */
+ function make_url($params)
+ {
+ $get = Array();
+ $args = isset($params) ? $params : Array();
+
+ if (!is_array($args)) {
+ if (count($this->_get_vars)!=1) {
+ return "<p class='erreur'>params should be an array</p>";
+ } else {
+ $args = Array($this->_get_vars[0]=>$params);
+ }
+ }
+
+ foreach ($_GET as $key=>$val) {
+ if (in_array($key,$this->_get_vars) && array_key_exists($key,$args)) {
+ continue;
+ }
+ $get[] = urlencode($key) . '=' . urlencode($val);
+ }
+
+ foreach ($this->_get_vars as $key) {
+ if (array_key_exists($key,$args)) {
+ if ($args[$key]) {
+ $get[] = urlencode($key) . '=' . urlencode($args[$key]);
+ }
+ } elseif (Get::has('key')) {
+ $get[] = urlencode($key) . '=' . urlencode(Get::get($key));
+ }
+ }
+
+ return $_SERVER['PHP_SELF'] . '?' . join('&',$get);
+ }
+
+ // }}}
+ // {{{ function show()
+
+ /** need to be overriden. */
+ function show ()
+ { return ''; }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('diogenes/diogenes.table-editor.inc.php');
+
+class XOrgAdminTableEditor extends DiogenesTableEditor {
+ function XOrgTableEditor($table,$idfield,$editid=false) {
+ $this->DiogenesTableEditor($table,$idfield,$editid);
+ }
+
+ function assign($var_name, $contenu) {
+ global $page;
+ $page->assign($var_name, $contenu);
+ }
+
+ function run() {
+ global $page;
+ parent::run($page);
+ $page->run();
+ }
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ class VarStream
+
+class VarStream
+{
+ // {{{ properties
+
+ // Stream handler to read from global variables
+ var $varname;
+ var $position;
+
+ // }}}
+ // {{{ stream_open
+
+ function stream_open($path, $mode, $options, &$opened_path)
+ {
+ $url = parse_url($path);
+ $this->varname = $url['host'];
+ $this->position = 0;
+ if (!isset($GLOBALS[$this->varname]))
+ {
+ trigger_error('Global variable '.$this->varname.' does not exist', E_USER_WARNING);
+ return false;
+ }
+ return true;
+ }
+
+ // }}}
+ // {{{ stream_close
+
+ function stream_close()
+ {
+ }
+
+ // }}}
+ // {{{ stream_read
+
+ function stream_read($count)
+ {
+ $ret = substr($GLOBALS[$this->varname], $this->position, $count);
+ $this->position += strlen($ret);
+ return $ret;
+ }
+
+ // }}}
+ // {{{ stream_write
+
+ function stream_write($data)
+ {
+ $len = strlen($data);
+ if ($len > $this->position + strlen($GLOBALS[$this->varname])) {
+ str_pad($GLOBALS[$this->varname], $len);
+ }
+
+ $GLOBALS[$this->varname] = substr_replace($GLOBALS[$this->varname], $data, $this->position, $len);
+ $this->position += $len;
+ }
+
+ // }}}
+ // {{{ stream_eof
+
+ function stream_eof()
+ {
+ return $this->position >= strlen($GLOBALS[$this->varname]);
+ }
+
+ // }}}
+ // {{{ stream_tell
+
+ function stream_tell()
+ {
+ return $this->position;
+ }
+
+ // }}}
+ // {{{ stream_seek
+
+ function stream_seek($offs, $whence)
+ {
+ switch ($whence) {
+ case SEEK_SET:
+ $final = $offs;
+ break;
+
+ case SEEK_CUR:
+ $final += $offs;
+ break;
+
+ case SEEK_END:
+ $final = strlen($GLOBALS[$this->varname]) + $offs;
+ break;
+ }
+
+ if ($final < 0) {
+ return -1;
+ }
+ $this->position = $final;
+ return 0;
+ }
+
+ // }}}
+ // {{{ stream_flush
+
+ function stream_flush()
+ {
+ }
+
+ // }}}
+}
+
+// }}}
+
+stream_wrapper_register('var','VarStream');
+
+// vim:set et sw=4 sts=4 sws=4:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/globals.inc.php');
+
+// {{{ class XorgGlobals
+
+class XorgGlobals extends PlatalGlobals
+{
+ function XorgGlobals()
+ {
+ $this->PlatalGlobals('XorgSession');
+ }
+
+ function init()
+ {
+ global $globals;
+ require_once('xorg/hook.inc.php');
+ require_once('xorg/menu.inc.php');
+
+ $globals = new XorgGlobals;
+ $globals->core = new CoreConfig;
+ $globals->root = dirname(dirname(dirname(__FILE__)));
+ $globals->hook = new XOrgHook();
+ $globals->menu = new XOrgMenu();
+
+ $globals->hook->config(null);
+
+ $globals->read_config();
+
+ $globals->hook->menu(null);
+
+ $globals->dbconnect();
+ if ($globals->debug & 1) {
+ $globals->db->trace_on();
+ }
+ $globals->xdb =& new XOrgDB;
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ **************************************************************************/
+
+// {{{ class XOrgHook
+
+/**
+ * XOrg's Hooks API
+ *
+ * Hooks are used in modules to allow modules that depends upon us to hook
+ * themselves in our core functionnalities.
+ *
+ * Every module will use some hools, and define their names.
+ * Pretend « myhook » is one of those names, then :
+ * - hooks/myhook/API has to exists, and will explain the API of the hook
+ * - every module "mod" may have a file hooks/myhook/mod.inc.php that implements
+ * fully or partially the API of the hook.
+ *
+ * If the hook's API has to change, the functions that change MUST change their
+ * name to avoid any compatibility problem.
+ *
+ * @category XOrgCore
+ * @package XOrgCore
+ * @author Pierre Habouzit <pierre.habouzit@polytechnique.org>
+ * @access public
+ * @link http://doc.polytechnique.org/XOrgModule/#hook
+ * @since Classe available since 0.9.3
+ */
+class XOrgHook
+{
+ // {{{ properties
+
+ /**
+ * list of all the modules names that have implemented some reactions to our triggers
+ *
+ * @var array
+ * @access private
+ */
+ var $_mods = Array();
+
+ // }}}
+ // {{{ constructor XOrgHook()
+
+ /**
+ * Instanciates our Hook.
+ *
+ * @param string $name the name of the hook
+ */
+ function XOrgHook()
+ {
+ global $globals;
+
+ foreach (glob($globals->root."/hooks/*.inc.php") as $file) {
+ require_once("$file");
+ $this->_mods[] = basename($file, '.inc.php');
+ }
+ }
+
+ // }}}
+ // {{{ function config
+
+ function config()
+ {
+ foreach ($this->_mods as $mod) {
+ if (!function_exists($mod.'_config')) continue;
+ call_user_func($mod.'_config');
+ }
+ }
+
+ // }}}
+ // {{{ function menu
+
+ function menu()
+ {
+ foreach ($this->_mods as $mod) {
+ if (!function_exists($mod.'_menu')) continue;
+ call_user_func($mod.'_menu');
+ }
+ }
+
+ // }}}
+ // {{{ function subscribe
+
+ function subscribe($forlife, $uid, $promo, $pass)
+ {
+ foreach ($this->_mods as $mod) {
+ if (!function_exists($mod.'_subscribe')) continue;
+ call_user_func($mod.'_subscribe', $forlife, $uid, $promo, $pass);
+ }
+ }
+
+ // }}}
+ // {{{ function prefs
+
+ function prefs()
+ {
+ $res = Array();
+ foreach ($this->_mods as $mod) {
+ if (!function_exists($mod.'_prefs')) continue;
+ $res = array_merge($res, call_user_func($mod.'_prefs'));
+ }
+ usort($res, create_function('$a, $b', 'return strcmp($a["weight"], $b["weight"]);'));
+ return $res;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+// {{{ defines
+
+define('XOM_NO',0);
+define('XOM_CUSTOM', "Personnaliser");
+define('XOM_SERVICES', "Services");
+define('XOM_GROUPS', "Communauté X");
+define('XOM_ADMIN', "***");
+
+define('XOM_US', 'Polytechniciens');
+define('XOM_EXT', 'Visiteurs');
+
+define('XOM_INFOS', "Informations");
+
+// }}}
+// {{{ class XOrgMenu
+
+/**
+ * Class used for the left menu construction
+ *
+ * @category XOrgCore
+ * @package XOrgCore
+ * @author Pierre Habouzit <pierre.habouzit@m4x.org>
+ * @access public
+ */
+
+class XOrgMenu
+{
+ // {{{ properties
+
+ var $_ext = Array();
+ var $_int = Array();
+
+ // }}}
+ // {{{ constructor
+
+ function XOrgMenu()
+ {
+ global $globals;
+
+ $this->_int[XOM_NO] = Array();
+ $this->_int[XOM_CUSTOM] = Array();
+ $this->_int[XOM_SERVICES] = Array();
+ $this->_int[XOM_GROUPS] = Array();
+ $this->_int[XOM_INFOS] = Array();
+ $this->_int[XOM_ADMIN] = Array();
+
+ $this->_ext[XOM_US] = Array();
+ $this->_ext[XOM_EXT] = Array();
+ $this->_ext[XOM_INFOS] = Array();
+ }
+
+ // }}}
+ // {{{ function addPublicEntry
+
+ function addPublicEntry($head, $prio, $text, $url)
+ {
+ $this->_ext[$head][] = Array($prio, 'text' => $text, 'url' => $url);
+ }
+
+ // }}}
+ // {{{ function addPrivateEntry
+
+ function addPrivateEntry($head, $prio, $text, $url)
+ {
+ $this->_int[$head][] = Array($prio, 'text' => $text, 'url' => $url);
+ }
+
+ // }}}
+ // {{{ function menu()
+
+ function menu()
+ {
+ $res = logged() ? $this->_int : $this->_ext;
+ if (identified()) {
+ $res[XOM_NO][] = Array(0, 'text' => 'Déconnexion', 'url' => 'deconnexion.php');
+ } elseif (Cookie::has('ORGaccess')) {
+ $res[XOM_NO][] = Array(0, 'text' => 'Déconnexion totale', 'url' => 'deconnexion.php?forget=1');
+ }
+ if (!has_perms()) {
+ unset($res[XOM_ADMIN]);
+ }
+ foreach (array_keys($res) as $key) {
+ if (empty($res[$key])) {
+ unset($res[$key]);
+ } else {
+ sort($res[$key]);
+ }
+ }
+ return $res;
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/page.inc.php');
+
+// {{{ class XorgPage
+
+class XorgPage extends PlatalPage
+{
+ // {{{ function XorgPage()
+
+ function XorgPage($tpl, $type=SKINNED)
+ {
+ $this->PlatalPage($tpl, $type);
+ }
+
+ // }}}
+ // {{{ function run()
+
+ function run()
+ {
+ global $globals;
+ if ($this->_page_type != NO_SKIN) {
+ $this->assign('menu', $globals->menu->menu());
+ }
+ $this->_run('skin/'.Session::get('skin'));
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XOrgAuth
+
+/** Une classe pour les pages nécessitant l'authentification.
+ * (equivalent de controlauthentification.inc.php)
+ */
+class XorgAuth extends XorgPage
+{
+ // {{{ function XorgAuth()
+
+ function XorgAuth($tpl, $type=SKINNED)
+ {
+ $this->XorgPage($tpl, $type);
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ function doAuth()
+ {
+ $_SESSION['session']->doAuth($this);
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XorgCookie
+
+/** Une classe pour les pages nécessitant l'authentification permanente.
+ * (equivalent de controlpermanent.inc.php)
+ */
+class XorgCookie extends XorgPage
+{
+ // {{{ function XorgCookie()
+
+ function XorgCookie($tpl, $type=SKINNED)
+ {
+ $this->XorgPage($tpl, $type);
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ function doAuth()
+ {
+ $_SESSION['session']->doAuthCookie($this);
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ class XorgAdmin
+
+/** Une classe pour les pages réservées aux admins (authentifiés!).
+ */
+class XorgAdmin extends XorgAuth
+{
+ // {{{ function XorgAdmin()
+
+ function XorgAdmin($tpl, $type=SKINNED)
+ {
+ $this->XorgAuth($tpl, $type);
+ check_perms();
+ }
+
+ // }}}
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once('platal/session.inc.php');
+
+// {{{ class XorgSession
+
+class XorgSession extends DiogenesCoreSession
+{
+ // {{{ function XorgSession()
+
+ function XorgSession()
+ {
+ $this->DiogenesCoreSession();
+ if (!Session::has('uid')) {
+ try_cookie();
+ }
+ set_skin();
+ }
+
+ // }}}
+ // {{{ function init
+
+ function init() {
+ @session_start();
+ if (!Session::has('session')) {
+ $_SESSION['session'] = new XorgSession;
+ }
+ }
+
+ // }}}
+ // {{{ function destroy()
+
+ function destroy() {
+ @session_destroy();
+ unset($_SESSION);
+ XorgSession::init();
+ }
+
+ // }}}
+ // {{{ function doAuth()
+
+ /** Try to do an authentication.
+ *
+ * @param page the calling page (by reference)
+ */
+ function doAuth(&$page,$new_name=false)
+ {
+ global $globals;
+ if (identified()) { // ok, c'est bon, on n'a rien à faire
+ return true;
+ }
+
+ if (Session::has('session')) {
+ $session =& Session::getMixed('session');
+ }
+
+ if (Env::has('username') && Env::has('response') && isset($session->challenge))
+ {
+ // si on vient de recevoir une identification par passwordpromptscreen.tpl
+ // ou passwordpromptscreenlogged.tpl
+ $uname = Env::get('username');
+
+ if (Env::get('domain') == "alias") {
+
+ $res = $globals->xdb->query(
+ "SELECT redirect
+ FROM virtual
+ INNER JOIN virtual_redirect USING(vid)
+ WHERE alias LIKE {?}", $uname."@".$globals->mail->alias_dom);
+ $redirect = $res->fetchOneCell();
+ if ($redirect) {
+ $login = substr($redirect, 0, strpos($redirect, '@'));
+ } else {
+ $login = "";
+ }
+ } else {
+ $login = $uname;
+ }
+
+ $field = (!$redirect && preg_match('/^\d*$/', $uname)) ? 'id' : 'alias';
+ $res = $globals->xdb->query(
+ "SELECT u.user_id, u.password
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( a.id=u.user_id AND type!='homonyme' )
+ WHERE a.$field = {?} AND u.perms IN('admin','user')", $login);
+
+ $logger =& Session::getMixed('log');
+
+ if (list($uid, $password) = $res->fetchOneRow()) {
+ $expected_response=md5("$uname:$password:{$session->challenge}");
+ if (Env::get('response') == $expected_response) {
+ if (Env::has('domain')) {
+ if (($domain = Env::get('domain', 'login')) == 'alias') {
+ setcookie('ORGdomain', "alias", (time()+25920000), '/', '', 0);
+ } else {
+ setcookie('ORGdomain', '', (time()-3600), '/', '', 0);
+ }
+ // pour que la modification soit effective dans le reste de la page
+ $_COOKIE['ORGdomain'] = $domain;
+ }
+
+ unset($session->challenge);
+ if ($logger) {
+ $logger->log('auth_ok');
+ }
+ start_connexion($uid, true);
+ if (Env::get('remember', 'false') == 'true') {
+ $cookie = md5(Session::get('password'));
+ setcookie('ORGaccess',$cookie,(time()+25920000),'/','',0);
+ if ($logger) {
+ $logger->log("cookie_on");
+ }
+ } else {
+ setcookie('ORGaccess', '', time() - 3600, '/', '', 0);
+
+ if ($logger) {
+ $logger->log("cookie_off");
+ }
+ }
+ return true;
+ } elseif ($logger) {
+ $logger->log('auth_fail','bad password');
+ }
+ } elseif ($logger) {
+ $logger->log('auth_fail','bad login');
+ }
+ }
+ $this->doLogin($page,$new_name);
+ }
+
+ // }}}
+ // {{{ function doAuthCookie()
+
+ /** Try to do a cookie-based authentication.
+ *
+ * @param page the calling page (by reference)
+ */
+ function doAuthCookie(&$page)
+ {
+ if (logged()) {
+ return;
+ }
+
+ if (Env::has('username') and Env::has('response')) {
+ return $this->doAuth($page);
+ }
+
+ if ($r = try_cookie()) {
+ return $this->doAuth($page,($r>0));
+ }
+ }
+
+ // }}}
+ // {{{ function doLogin()
+
+ /** Display login screen.
+ */
+ function doLogin(&$page, $new_name=false)
+ {
+ $page->addJsLink('javascript/md5.js');
+ if (logged() and !$new_name) {
+ $page->changeTpl('password_prompt_logged.tpl');
+ $page->addJsLink('javascript/do_challenge_response_logged.js');
+ $page->assign("xorg_tpl", "password_prompt_logged.tpl");
+ $page->run();
+ } else {
+ $page->changeTpl('password_prompt.tpl');
+ $page->addJsLink('javascript/do_challenge_response.js');
+ $page->assign("xorg_tpl", "password_prompt.tpl");
+
+ global $globals;
+ if ($globals->mail->alias_dom) {
+ $page->assign("domains", Array(
+ $globals->mail->domain."/".$globals->mail->domain2,
+ $globals->mail->alias_dom."/".$globals->mail->alias_dom2));
+ $page->assign("domains_value", Array("login", "alias"));
+ $page->assign("r_domain", Cookie::get('ORGdomain', 'login'));
+ }
+ $page->run();
+ }
+ exit;
+ }
+
+ // }}}
+ // {{{ function getUserId()
+
+ function getUserId($auth,$username)
+ {
+ global $globals;
+ $res = $globals->xdb->query("SELECT id FROM aliases WHERE alias = {?}",$username);
+ return $res->fetchOneCell();
+ }
+
+ // }}}
+ // {{{ function getUsername()
+
+ function getUsername($auth,$uid)
+ {
+ global $globals;
+ $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id = {?} AND type='a_vie'", $uid);
+ return $res->fetchOneCell();
+ }
+
+ // }}}
+}
+
+// }}}
+// {{{ function try_cookie()
+
+/** réalise la récupération de $_SESSION pour qqn avec cookie
+ * @return int 0 if all OK, -1 if no cookie, 1 if cookie with bad hash,
+ * -2 should not happen
+ */
+function try_cookie()
+{
+ global $globals;
+ if (Cookie::get('ORGaccess') == '' or !Cookie::has('ORGuid')) {
+ return -1;
+ }
+
+ $res = @$globals->xdb->query(
+ "SELECT user_id,password FROM auth_user_md5 WHERE user_id = {?} AND perms IN('admin','user')",
+ Cookie::getInt('ORGuid')
+ );
+ if ($res->numRows() != 0) {
+ list($uid, $password) = $res->fetchOneRow();
+ $expected_value = md5($password);
+ if ($expected_value == Cookie::get('ORGaccess')) {
+ start_connexion($uid, false);
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+
+ return -2;
+}
+
+// }}}
+// {{{ function start_connexion()
+
+/** place les variables de session dépendants de auth_user_md5
+ * et met à jour les dates de dernière connexion si nécessaire
+ * @return void
+ * @see controlpermanent.inc.php controlauthentication.inc.php
+ */
+function start_connexion ($uid, $identified)
+{
+ global $globals;
+ $res = $globals->xdb->query("
+ SELECT u.user_id AS uid, prenom, nom, perms, promo, matricule, password, FIND_IN_SET('femme', u.flags) AS femme,
+ UNIX_TIMESTAMP(s.start) AS lastlogin, s.host, a.alias AS forlife, a2.alias AS bestalias,
+ q.core_mail_fmt AS mail_fmt, UNIX_TIMESTAMP(q.banana_last) AS banana_last, q.watch_last, q.core_rss_hash
+ FROM auth_user_md5 AS u
+ INNER JOIN auth_user_quick AS q USING(user_id)
+ INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie')
+ INNER JOIN aliases AS a2 ON (u.user_id = a2.id AND FIND_IN_SET('bestalias',a2.flags))
+ LEFT JOIN logger.sessions AS s ON (s.uid=u.user_id AND s.suid=0)
+ WHERE u.user_id = {?} AND u.perms IN('admin','user')
+ ORDER BY s.start DESC
+ LIMIT 1", $uid);
+ $sess = $res->fetchOneAssoc();
+ $suid = Session::getMixed('suid');
+
+ if ($suid) {
+ $logger = new DiogenesCoreLogger($uid, $suid);
+ $logger->log("suid_start", Session::get('forlife')." by {$suid['uid']}");
+ $sess['suid'] = $suid;
+ } else {
+ $logger = Session::getMixed('log', new DiogenesCoreLogger($uid));
+ $logger->log("connexion", $_SERVER['PHP_SELF']);
+ setcookie('ORGuid', $uid, (time()+25920000), '/', '', 0);
+ }
+
+ $_SESSION = $sess;
+ $_SESSION['log'] = $logger;
+ $_SESSION['auth'] = ($identified ? AUTH_MDP : AUTH_COOKIE);
+ set_skin();
+}
+
+// }}}
+// {{{ function set_skin()
+
+function set_skin()
+{
+ global $globals;
+ if (logged() && $globals->skin->enable) {
+ $uid = Session::getInt('uid');
+ $res = $globals->xdb->query("SELECT skin,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 (list($_SESSION['skin_id'], $_SESSION['skin']) = $res->fetchOneRow()) {
+ return;
+ }
+ }
+ if ($globals->skin->enable) {
+ $_SESSION['skin'] = $globals->skin->def_tpl;
+ $_SESSION['skin_id'] = $globals->skin->def_id;
+ } else {
+ $_SESSION['skin'] = 'default.tpl';
+ $_SESSION['skin_id'] = -1;
+ }
+}
+
+// }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+MODULES IN GOOD SHAPE
+---------------------
+
+emails
+lists
+newsletter
+webredirect
+
+skins one minor bug
+money move paiments.* into x4dat.money_*
+
+STILL NEED SOME WORK
+--------------------
+
+banana
+
+ quite good shape.
+ converting banana into templates would be great though
+
+
+IN PROGRESS
+-----------
+
+
+ALL REMAINS TO DO
+-----------------
+
+contacts
+exalead
+marketing
+news
+platal
+platal-dev
+profile
+register
+search
+stats
+xorg-stuff
--- /dev/null
+Alias /xorg /usr/share/xorg/htdocs
+
+<Directory /usr/share/xorg>
+ Options FollowSymLinks MultiViews
+ Order allow,deny
+ Allow from all
+ <IfModule mod_dir.c>
+ DirectoryIndex index.php
+ </IfModule>
+ <IfModule mod_php4.c>
+ php_value magic_quotes_gpc On
+ php_value register_globals Off
+ php_value include_path ".:/usr/share/xorg/include:/usr/share/xorg/configs:/usr/share/diogenes/lib:/usr/share/php/smarty/libs:/usr/share/php"
+ </IfModule>
+</Directory>
--- /dev/null
+
+ Notes for the banana module for plat/al
+
+
+STATUS
+------
+
+ This package is not ready for release.
+
+ It's a Polytechnique.org only module, and is not supported.
+ Use at your own risk !
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [Banana]
+
+ server = "localhost" ; server name or IP address.
+ port = 119 ; port of the news server.
+ password = "***" ; password for the web_* accounts
+ web_user = "***" ; name of the web account
+ web_pass = "***" ; pass of the web account
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=12
+
+
+DEPENDS
+-------
+
+ platal
+ + uncompface (usually in compface)
+ + convert (usually in imagemagick)
+
--- /dev/null
+bin/banana.spoolgen.php
+hooks/banana.inc.php
+htdocs/banana/index.php
+htdocs/banana/profile.php
+htdocs/banana/xface.php
+include/banana.inc.php
+templates/banana/index.head.tpl
+templates/banana/index.tpl
+templates/banana/profile.tpl
--- /dev/null
+alter table auth_user_quick add column banana_last timestamp not null;
+
+--
+-- Table structure for table `abos`
+--
+
+CREATE TABLE banana_abos (
+ fid tinyint(3) unsigned NOT NULL default '0',
+ uid smallint(5) unsigned NOT NULL default '0',
+ PRIMARY KEY (fid,uid)
+) TYPE=MyISAM COMMENT='abonnements aux forums';
+
+--
+-- Table structure for table `list`
+--
+
+CREATE TABLE banana_list (
+ fid tinyint(3) unsigned NOT NULL auto_increment,
+ nom varchar(40) NOT NULL default '',
+ PRIMARY KEY (fid)
+) TYPE=MyISAM COMMENT='liste des fora';
+
+--
+-- Table structure for table `profils`
+--
+
+CREATE TABLE banana_profils (
+ uid smallint(5) unsigned NOT NULL default '0',
+ nom varchar(50) NOT NULL default '',
+ mail varchar(70) NOT NULL default '',
+ sig tinytext NOT NULL,
+ flags set('threads','automaj') NOT NULL default '',
+ PRIMARY KEY (uid)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `respofaqs`
+--
+
+CREATE TABLE banana_respofaqs (
+ fid tinyint(3) unsigned NOT NULL default '0',
+ uid smallint(5) unsigned NOT NULL default '0',
+ PRIMARY KEY (fid,uid)
+) TYPE=MyISAM COMMENT='responsables des FAQs';
+
--- /dev/null
+alter table auth_user_quick drop column banana_last;
+
+drop table banana_abos;
+drop table banana_list;
+drop table banana_profils;
+drop table banana_respofaqs;
--- /dev/null
+include/notifs.inc.php
+bin/cron/send_notifs.php
+htdocs/carnet/index.php
+htdocs/carnet/mescontacts_pdf.php
+htdocs/carnet/mescontacts.php
+htdocs/carnet/notifs.php
+htdocs/carnet/panel.php
+templates/carnet/index.tpl
+templates/carnet/mescontacts.tpl
+templates/carnet/notifs.tpl
+templates/carnet/panel.tpl
+include/texify.inc.php
--- /dev/null
+
+ Notes for the emails module for plat/al
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [Mail]
+
+ domain = '' ; main domain for email addresses
+ domain2 = '' ; secondary domain for email addresses
+
+ alias_dom = '' ; main domain for ``PAPS'' aliases
+ alias_dom2 = '' ; secondary domain for ``PAPS'' aliases
+
+ send_form = 1 ; enable the emails/send.php form
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=17
+
+
+DEPENDS
+-------
+
+ platal
+
--- /dev/null
+bin/emails.broken.php
+htdocs/alias.php
+htdocs/antispam.php
+htdocs/emails/broken.php
+htdocs/emails.php
+htdocs/emails/redirect.php
+htdocs/emails/send.php
+include/emails.inc.php
+include/validations/aliases.inc.php
+templates/alias.tpl
+templates/antispam.tpl
+templates/emails/broken.tpl
+templates/emails/redirect.tpl
+templates/emails/send.tpl
+templates/emails.tpl
+templates/include/form.valid.aliases.tpl
+templates/preferences.tpl.d/10.mails.tpl
+templates/preferences.tpl.d/20.alias.tpl
--- /dev/null
+--
+-- Table structure for table `emails`
+--
+
+CREATE TABLE `emails` (
+ `uid` smallint(5) unsigned NOT NULL default '0',
+ `email` char(60) NOT NULL default '',
+ `rewrite` char(128) NOT NULL default '',
+ `panne` date NOT NULL default '0000-00-00',
+ `flags` enum('active','filter') NOT NULL default '',
+ PRIMARY KEY (`uid`,`email`),
+ KEY `emails` (`email`(20)),
+ KEY `uid` (`uid`)
+) TYPE=MyISAM PACK_KEYS=1 COMMENT='listes des emails';
+
+--
+-- Table structure for table `virtual`
+--
+
+CREATE TABLE `virtual` (
+ `vid` int(11) NOT NULL auto_increment,
+ `alias` varchar(255) NOT NULL default '',
+ `type` enum('user','list','dom') NOT NULL default 'user',
+ PRIMARY KEY (`vid`),
+ UNIQUE KEY `alias` (`alias`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `virtual_domains`
+--
+
+CREATE TABLE `virtual_domains` (
+ `domain` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`domain`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `virtual_redirect`
+--
+
+CREATE TABLE `virtual_redirect` (
+ `vid` int(11) NOT NULL auto_increment,
+ `redirect` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`vid`,`redirect`),
+ KEY `redirect` (`redirect`)
+) TYPE=MyISAM;
+
--- /dev/null
+DROP TABLE `emails`;
+DROP TABLE `virtual`;
+DROP TABLE `virtual_domains`;
+DROP TABLE `virtual_redirect`;
--- /dev/null
+include/exalead/exalead.class.php
+include/exalead/exalead.parser.inc.php
--- /dev/null
+
+ Notes for the lists module for plat/al
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [lists]
+
+ rpchost = "localhost" ; the host that runs the xml-rpc
+ rpcport = 4949 ; the port for the xml-rpc server
+
+ spool = "/var/spool/platal/archives/"
+ ; the directory that holds mhonarc archives
+
+ vhost_sep = '-' ; the vhost separator in mailman hack
+ admin_owner = '' ; the owner that distinguish admin ML's
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=15
+
+
+DEPENDS
+-------
+
+ platal, mail
+ + mailman
+ + python-mysql
+ + mhonarc
+
--- /dev/null
+bin/lists.mhonarc_by_month.pl
+bin/lists.mhonarc_pipe.sh
+bin/lists.rpc.py
+hooks/lists.inc.php
+htdocs/admin/lists.php
+htdocs/images/lists_date.png
+htdocs/images/lists_firstia.png
+htdocs/images/lists_first.png
+htdocs/images/lists_lastia.png
+htdocs/images/lists_last.png
+htdocs/images/lists_nextia.png
+htdocs/images/lists_next.png
+htdocs/images/lists_previa.png
+htdocs/images/lists_prev.png
+htdocs/images/lists_thread.png
+htdocs/listes/admin.php
+htdocs/listes/archives.php
+htdocs/listes/check.php
+htdocs/listes/create.php
+htdocs/listes/delete.php
+htdocs/listes/index.php
+htdocs/listes/members.php
+htdocs/listes/moderate.php
+htdocs/listes/options.php
+htdocs/listes/soptions.php
+htdocs/listes/trombi.php
+include/lists.inc.php
+include/validations/listes.inc.php
+templates/admin/lists.tpl
+templates/include/form.valid.listes.tpl
+templates/listes/admin.tpl
+templates/listes/archives.head.tpl
+templates/listes/archives.tpl
+templates/listes/check.tpl
+templates/listes/create.tpl
+templates/listes/delete.tpl
+templates/listes/header_listes.tpl
+templates/listes/index.tpl
+templates/listes/listes.inc.tpl
+templates/listes/members.tpl
+templates/listes/moderate_mail.tpl
+templates/listes/moderate_sub.tpl
+templates/listes/moderate.tpl
+templates/listes/options.tpl
+templates/listes/soptions.tpl
+templates/listes/trombi.tpl
+templates/mails/listes.promo.tpl
--- /dev/null
+insert into admin_a values(7, 'Listes', 'admin/lists.php', 10);
--- /dev/null
+Nous vous confirmons l'abonnement de %(member)s
+à la liste de diffusion {{{LIST}}}.
+
+
--- /dev/null
+La liste {{{LIST}}} a %(count)d requête(s) en attente
+d'une action de votre part sur la page web :
+
+ {{{MODERATE}}}
+
+Merci de bien vouloir prendre le temps de les traiter.
+Cet avis de requête(s) en attente vous sera envoyé
+chaque jour où des messages sont en attente de modération.
--- /dev/null
+La liste de diffusion {{{LIST}}} vient d'être créée pour vous.
+
+Vous pouvez en régler les paramètres depuis la page web :
+
+ {{{ADMIN}}}
+
+Pour toute question adressez-vous à support@polytechnique.org.
--- /dev/null
+En tant que modérateur de la liste, votre autorisation est nécessaire
+pour que le message suivant soit acheminé vers les abonnés à la liste
+de diffusion :
+
+ Liste: {{{LIST}}}
+ De: %(sender)s
+ Objet: %(subject)s
+ Raison: %(reason)s
+
+Quand vous le souhaitez, consultez la page web pour accepter ou refuser
+le message :
+
+ {{{MODERATE}}}
--- /dev/null
+Votre courrier à '{{{LIST}}}' dont l'objet est
+
+ %(subject)s
+
+a bien été transmis à l'animateur de la liste de diffusion,
+afin qu'il puisse le valider.
+
+En effet,
+
+ %(reason)s
+
+Vous serez informé de l'action prise par le modérateur dans
+les plus brefs délais.
--- /dev/null
+Vous avez envoyé un message à la liste de diffusion {{{LIST}}} :
+
+ %(request)s
+
+Le modérateur n'a pas souhaité diffuser votre message vers les
+abonnés à la liste pour la raison suivante :
+
+ "%(reason)s"
+
+Toute question ou commentaire doit être adressé aux modérateurs de la
+liste à cette adresse :
+
+ {{{ALIST}}}
--- /dev/null
+En tant qu'animateur de la liste de diffusion, votre
+autorisation est requise pour une demande d'abonnement :
+
+ Pour: %(username)s
+
+Quand vous le pourrez, consultez la page web :
+
+ {{{MODERATE}}}
+
+pour indiquer la suite que vous donnez à cette demande.
--- /dev/null
+Bienvenue sur la liste {{{LIST}}}
+
+%(welcome)s
+
+Pour écrire à la liste, envoyez votre message à :
+
+ {{{LIST}}}
+
+Les informations générales concernant cette liste (composition,
+trombinoscope, ...) sont à l'adresse :
+
+ {{{MEMBERS}}}
+
--- /dev/null
+<MultiPg>
+<NoDoc>
+<UseLocalTime>
+<MsgLocalDateFmt>
+%d-%m-%y
+</MsgLocalDateFmt>
+<IdxSize>
+50
+</IdxSize>
+<NoFolRefs>
+
+
+<MIMEAltPrefs>
+text/plain
+text/html
+</MIMEAltPrefs>
+
+<MIMEArgs>
+m2h_external::filter; forceinline
+m2h_text_plain::filter; fancyquote maxwidth=80 quoteclass=quote
+</MIMEArgs>
+
+<AttachmentDir>
+/var/spool/platal/archives/attachments/
+</AttachmentDir>
+
+<AttachmentURL>
+../attach
+</AttachmentURL>
+
+<!-- ------------------------------------------------------------------------ -->
+<!-- -->
+<!-- VARS -->
+<!-- -->
+<!-- ------------------------------------------------------------------------ -->
+
+<DefineVar>
+MY-LINK
+?liste={$$smarty.request.liste}&rep={$$smarty.request.rep}&file=
+</DefineVar>
+
+<DefineVar>
+TOP-ARCH
+<p>[<a href="?liste={$$smarty.request.liste}">toutes les archives</a>]</p>
+</DefineVar>
+
+<DefineVar>
+MY-ESCSUBJ
+$SUBJECTNA$
+</DefineVar>
+
+<DefineVar>
+MY-SUBJ
+<a href="$MY-LINK$$MSG$" id="m$MSGNUM$" title="$MY-ESCSUBJ$">$MY-ESCSUBJ$</a>
+</DefineVar>
+
+<DefineVar>
+MY-SUBJNA
+<strong title="$MY-ESCSUBJ$">$MY-ESCSUBJ$</strong>
+</DefineVar>
+
+
+<!-- ------------------------------------------------------------------------ -->
+<!-- -->
+<!-- LINKS -->
+<!-- -->
+<!-- ------------------------------------------------------------------------ -->
+
+<PrevPgLink>
+<a href="$MY-LINK$$PG(PREV)$"><img src="/images/lists_prev.png" alt="précédent" /></a>
+</PrevPgLink>
+
+<PrevPgLinkIA>
+<img src="/images/lists_previa.png" alt="précedent" />
+</PrevPgLinkIA>
+
+<NextPgLink>
+<a href="$MY-LINK$$PG(NEXT)$"><img src="/images/lists_next.png" alt="suivant" /></a>
+</NextPgLink>
+
+<NextPgLinkIA>
+<img src="/images/lists_nextia.png" alt="suivant" />
+</NextPgLinkIA>
+
+<FirstPgLink>
+<a href="$MY-LINK$$PG(FIRST)$"><img src="/images/lists_first.png" alt="début" /></a>
+</FirstPgLink>
+
+<LastPgLink>
+<a href="$MY-LINK$$PG(LAST)$"><img src="/images/lists_last.png" alt="fin" /></a>
+</LastPgLink>
+
+
+<TPrevPgLink>
+<a href="$MY-LINK$$PG(TPREV)$"><img src="/images/lists_prev.png" alt="précédent" /></a>
+</TPrevPgLink>
+
+<TPrevPgLinkIA>
+<img src="/images/lists_previa.png" alt="précedent" />
+</TPrevPgLinkIA>
+
+<TNextPgLink>
+<a href="$MY-LINK$$PG(TNEXT)$"><img src="/images/lists_next.png" alt="suivant" /></a>
+</TNextPgLink>
+
+<TNextPgLinkIA>
+<img src="/images/lists_nextia.png" alt="suivant" />
+</TNextPgLinkIA>
+
+<TFirstPgLink>
+<a href="$MY-LINK$$PG(TFIRST)$"><img src="/images/lists_first.png" alt="début" /></a>
+</TFirstPgLink>
+
+<TLastPgLink>
+<a href="$MY-LINK$$PG(TLAST)$"><img src="/images/lists_last.png" alt="fin" /></a>
+</TLastPgLink>
+
+
+<TPrevInButton>
+<a href="$MY-LINK$$MSG(TPREVIN)$"><img src="/images/lists_prev.png" alt="précédent" /></a>
+</TPrevInButton>
+
+<TPrevInButtonIA>
+<img src="/images/lists_previa.png" alt="précedent" />
+</TPrevInButtonIA>
+
+<TNextInButton>
+<a href="$MY-LINK$$MSG(TNEXTIN)$"><img src="/images/lists_next.png" alt="suivant" /></a>
+</TNextInButton>
+
+<TNextInButtonIA>
+<img src="/images/lists_nextia.png" alt="suivant" />
+</TNextInButtonIA>
+
+<TPrevTopButton>
+<a href="$MY-LINK$$MSG(TPREVTOP)$"><img src="/images/lists_first.png" alt="début" /></a>
+</TPrevTopButton>
+
+<TNextTopButton>
+<a href="$MY-LINK$$MSG(TNEXTTOP)$"><img src="/images/lists_last.png" alt="fin" /></a>
+</TNextTopButton>
+
+<TPrevTopButtonIA>
+<img src="/images/lists_firstia.png" alt="début" />
+</TPrevTopButtonIA>
+
+<TNextTopButtonIA>
+<img src="/images/lists_lastia.png" alt="fin" />
+</TNextTopButtonIA>
+
+<!-- ------------------------------------------------------------------------ -->
+<!-- -->
+<!-- MESSAGE INDEX -->
+<!-- -->
+<!-- ------------------------------------------------------------------------ -->
+
+<MsgPgSSMarkup>
+
+</MsgPgSSMarkup>
+
+<MsgPgBegin>
+
+</MsgPgBegin>
+
+<MsgPgEnd>
+
+</MsgPgEnd>
+
+<TopLinks>
+ <h1>Vue de message</h1>
+ $TOP-ARCH$
+ <table class='bicol' cellpadding="0" cellspacing="0">
+ <tr>
+ <th>fil précédent</th>
+ <th>msg. précédent</th>
+ <th>vue par dates/fils</th>
+ <th>msg. suivant</th>
+ <th>fil suivant</th>
+ </tr>
+ <tr class="impair">
+ <td class="center">$BUTTON(TPREVTOP)$</td>
+ <td class="center">$BUTTON(TPREVIN)$</td>
+ <td class="center">
+ <a href="$MY-LINK$$IDXFNAME$#m$MSGNUM$"><img src="/images/lists_date.png" alt="par dates" /></a>
+ /
+ <a href="$MY-LINK$$TIDXFNAME$#m$MSGNUM$"><img src="/images/lists_thread.png" alt="par fils" /></a>
+ </td>
+ <td class="center">$BUTTON(TNEXTIN)$</td>
+ <td class="center">$BUTTON(TNEXTTOP)$</td>
+ </tr>
+ </table>
+</TopLinks>
+
+<SubjectHeader>
+
+</SubjectHeader>
+
+<FieldsBeg>
+ <table class="bicol" cellpadding="0" cellspacing="0">
+</FieldsBeg>
+
+<LabelBeg>
+ <tr>
+ <td class="right">
+</LabelBeg>
+<LabelStyles>
+-default-:
+</LabelStyles>
+<LabelEnd>
+ </td>
+</LabelEnd>
+
+<FldBeg>
+ <td>
+</FldBeg>
+<FieldOrder>
+subject
+from
+to
+date
+</FieldOrder>
+<FieldStyles>
+subject:strong
+-default-:
+</FieldStyles>
+<FldEnd>
+ </td>
+ </tr>
+</FldEnd>
+
+<FieldsEnd>
+ </table>
+</FieldsEnd>
+
+<HeadBodySep>
+ <table class="bicol" cellpadding="0" cellspacing="0">
+ <tr class="pair">
+ <td>{literal}
+</HeadBodySep>
+
+<MsgBodyEnd>
+ {/literal}</td>
+ </tr>
+ </table>
+ $TSLICE$
+</MsgBodyEnd>
+
+<BotLinks>
+
+</BotLinks>
+
+<MsgFoot>
+</MsgFoot>
+
+<!-- ------------------------------------------------------------------------ -->
+<!-- -->
+<!-- THREAD INDEX -->
+<!-- -->
+<!-- ------------------------------------------------------------------------ -->
+
+<TIdxPgSSMarkup>
+
+</TIdxPgSSMarkup>
+
+<TIdxPgBegin>
+
+</TIdxPgBegin>
+
+<TIdxPgEnd>
+
+</TIdxPgEnd>
+
+<THead>
+ <h1>Archives de la liste {$$smarty.request.liste} ($PAGENUM$/$NUMOFPAGES$)</h1>
+ $TOP-ARCH$
+ <table class='bicol' cellpadding="0" cellspacing="0">
+ <tr>
+ <th> </th>
+ <th>précédent</th>
+ <th>vue par date</th>
+ <th>suivant</th>
+ <th> </th>
+ </tr>
+ <tr class="impair">
+ <td class="center">$PGLINK(TFIRST)$</td>
+ <td class="center">$PGLINK(TPREV)$</td>
+ <td class="center"><a href="$MY-LINK$$IDXFNAME$"><img src="/images/lists_date.png" alt="par dates" /></a></td>
+ <td class="center">$PGLINK(TNEXT)$</td>
+ <td class="center">$PGLINK(TLAST)$</td>
+ </tr>
+ </table>
+ <table class="bicol" cellspacing="0" cellpadding="0">
+</THead>
+
+<TFoot>
+ </table>
+</TFoot>
+
+<!-- ------------------------------------------------------------------------ -->
+
+<TIndentBegin>
+
+</TIndentBegin>
+<TIndentEnd>
+
+</TIndentEnd>
+
+<!-- ------------------------------------------------------------------------ -->
+
+<TTopBegin>
+<tr class="pair"><td colspan="3" class="center"> - - - </td></tr>
+<tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj' style="padding-left: $TLEVEL$em">$MY-SUBJ$</td>
+ <td class='right'><em>$FROMNAME$</em></td>
+</tr>
+</TTopBegin>
+<TTopEnd>
+
+</TTopEnd>
+
+<TContBegin>
+<tr>
+ <td> </td>
+ <td style="padding-left: $TLEVEL$em"><em>[...]</em></td>
+ <td> </td>
+</tr>
+</TContBegin>
+<TContEnd>
+
+</TContEnd>
+
+<!-- ------------------------------------------------------------------------ -->
+
+<TSublistBeg>
+
+</TSublistBeg>
+<TSublistEnd>
+
+</TSublistEnd>
+
+
+<TSubjectBeg>
+
+</TSubjectBeg>
+<TSubjectEnd>
+
+</TSubjectEnd>
+
+<!-- ------------------------------------------------------------------------ -->
+
+<TSingleTxt>
+<tr class="pair"><td colspan="3" class="center"> - - - </td></tr>
+<tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj' style="padding-left: $TLEVEL$em">$MY-SUBJ$</td>
+ <td class='right'><em>$FROMNAME$</em></td>
+</tr>
+</TSingleTxt>
+
+<TLiTxt>
+<tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj' style="padding-left: $TLEVEL$em">$MY-SUBJ$</td>
+ <td class='right'><em>$FROMNAME$</em></td>
+</tr>
+</TLiTxt>
+<TLiEnd>
+
+</TLiEnd>
+
+<TLiNone>
+<tr>
+ <td style="padding-left: $TLEVEL$em"><em><non disponnible></em></td>
+ <td> </td>
+</tr>
+</TLiNone>
+
+
+<!-- ------------------------------------------------------------------------ -->
+
+<TSlice>
+10;10;1
+</TSlice>
+
+<TSliceBeg>
+<table class="bicol" cellpadding="0" cellspacing="0">
+</TSliceBeg>
+<TSliceEnd>
+</table>
+</TSliceEnd>
+
+<TSliceTopBegin>
+<tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj' style="padding-left: $TLEVEL$em">$MY-SUBJ$</td>
+ <td class='right'><em>$FROMNAME$</em></td>
+</tr>
+</TSliceTopBegin>
+
+<TSliceTopBeginCur>
+<tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj' style="padding-left: $TLEVEL$em">$MY-SUBJNA$</td>
+ <td class='right'><strong><em>$FROMNAME$</em></strong></td>
+</tr>
+</TSliceTopBeginCur>
+<TSliceTopEndCur>
+
+</TSliceTopEndCur>
+
+
+<TSliceLiTxtCur>
+<tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj' style="padding-left: $TLEVEL$em">$MY-SUBJNA$</td>
+ <td class='right'><strong><em>$FROMNAME$</em></strong></td>
+</tr>
+</TSliceLiTxtCur>
+<TSliceLiEndCur>
+
+</TSliceLiEndCur>
+
+<!-- ------------------------------------------------------------------------ -->
+<!-- -->
+<!-- DATE INDEX -->
+<!-- -->
+<!-- ------------------------------------------------------------------------ -->
+
+<Sort>
+<IdxFname>
+dates.html
+</IdxFname>
+<IdxPrefix>
+date
+</IdxPrefix>
+
+
+<IdxPgSSMarkup>
+
+</IdxPgSSMarkup>
+
+<IdxPgBegin>
+
+</IdxPgBegin>
+
+<IdxPgEnd>
+
+</IdxPgEnd>
+
+<ListBegin>
+ <h1>Archives de la liste {$$smarty.request.liste} ($PAGENUM$/$NUMOFPAGES$)</h1>
+ $TOP-ARCH$
+ <table class='bicol' cellpadding="0" cellspacing="0">
+ <tr>
+ <th> </th>
+ <th>précédent</th>
+ <th>vue par fils</th>
+ <th>suivant</th>
+ <th> </th>
+ </tr>
+ <tr class="impair">
+ <td class="center">$PGLINK(FIRST)$</td>
+ <td class="center">$PGLINK(PREV)$</td>
+ <td class="center"><a href="$MY-LINK$$TIDXFNAME$"><img src="/images/lists_thread.png" alt="par fils" /></a></td>
+ <td class="center">$PGLINK(NEXT)$</td>
+ <td class="center">$PGLINK(LAST)$</td>
+ </tr>
+ </table>
+ <table class="bicol" cellpadding="0" cellspacing="0">
+</ListBegin>
+
+<ListEnd>
+ </table>
+</ListEnd>
+
+<!-- ------------------------------------------------------------------------ -->
+<DayBegin>
+</DayBegin>
+
+<DayEnd>
+</DayEnd>
+
+<LITemplate>
+ <tr>
+ <td>$MSGLOCALDATE$</td>
+ <td class='subj'>$MY-SUBJ$</td>
+ <td class='right'><em>$FROMNAME$</em></td>
+ </tr>
+</LITemplate>
+
+
+<!-- ------------------------------------------------------------------------ -->
--- /dev/null
+
+delete from admin_a where url='admin/lists.php';
+
--- /dev/null
+htdocs/marketing/envoidirect.php
+htdocs/marketing/index.php
+htdocs/marketing/ins_confirmees.php
+htdocs/marketing/promo.php
+htdocs/marketing/public.php
+htdocs/marketing/relance.php
+htdocs/marketing/utilisateurs_marketing.php
+htdocs/marketing/volontaire.php
+templates/mails/marketing.relance.tpl
+templates/mails/marketing.thanks.tpl
+templates/mails/marketing.utilisateur.tpl
+templates/marketing/envoidirect.tpl
+templates/marketing/index.tpl
+templates/marketing/ins_confirmees.tpl
+templates/marketing/promo.tpl
+templates/marketing/public.tpl
+templates/marketing/relance.tpl
+templates/marketing/utilisateurs_edit.tpl
+templates/marketing/utilisateurs_form.tpl
+templates/marketing/utilisateurs_inscrire.tpl
+templates/marketing/utilisateurs_marketing.tpl
+templates/marketing/utilisateurs_recherche.tpl
+templates/marketing/utilisateurs_select.tpl
+templates/marketing/volontaire.tpl
--- /dev/null
+
+ Notes for the money module for plat/al
+
+STATUS
+------
+
+TODO:
+ tables are atm in paiments.* and we should put it in x4dat.money_*
+ we have to wait for x.net here.
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [Money]
+
+ mpay_enable = 1 ; enable micro-payments
+ mpay_def_id = 0 ; id of the default micro-payment id
+ mpay_def_meth = 0 ; id of the default payment method
+ mpay_tprefix = paiments.
+ ; obsolete when TODO will be closed
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=16
+
+
+DEPENDS
+-------
+
+ platal
+
--- /dev/null
+htdocs/admin/gerer_paiement.php
+htdocs/paiement/cyberpaiement_retour.php
+htdocs/paiement/index.php
+htdocs/trezo/gere_operations.php
+htdocs/trezo/index.php
+include/money/cyberpaiement.inc.php
+include/money.inc.php
+include/money/trezo.inc.php
+templates/paiment/index.tpl
+templates/trezo/choix_date.tpl
+templates/trezo/gere_operations.tpl
+templates/trezo/index.tpl
--- /dev/null
+INSERT INTO `admin_h2` VALUES (2,9,'Trésorerie',60);
+
+INSERT INTO `admin_a` VALUES (9,'Comptes','admin/gere_operations.php',0);
+INSERT INTO `admin_a` VALUES (9,'Paiements','admin/gerer_paiement.php',10);
+
--- /dev/null
+
+delete from admin_h2 where h2id=9;
+delete from admin_a where h2id=9;
+
--- /dev/null
+htdocs/admin/evenements.php
+htdocs/evenements.php
+htdocs/rss.php
+include/validations/evts.inc.php
+templates/admin/evenements.tpl
+templates/evenements.tpl
+templates/include/form.evenement.tpl
+templates/include/form.valid.evts.tpl
+templates/rss.tpl
--- /dev/null
+
+ Notes for the newsletter module for plat/al
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [NewsLetter]
+
+ from = "Lettre Mensuelle <null@example.org>" ; from for NL mails
+ replyto = "null@example.org" ; Reply-to for NL mails
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=14
+
+
+DEPENDS
+-------
+
+ platal
+
--- /dev/null
+bin/newsletter.send.php
+hooks/newsletter.inc.php
+htdocs/admin/newsletter_cats.php
+htdocs/admin/newsletter_edit.php
+htdocs/admin/newsletter.php
+htdocs/css/nl.css
+htdocs/newsletter/index.php
+htdocs/newsletter/show.php
+htdocs/newsletter/submit.php
+include/newsletter.inc.php
+templates/admin/newsletter_edit.tpl
+templates/admin/newsletter.tpl
+templates/newsletter/head.tpl
+templates/newsletter/index.tpl
+templates/newsletter/show.tpl
+templates/newsletter/submit.tpl
--- /dev/null
+insert into admin_h2 VALUES (2,6,'Newsletter',30);
+
+INSERT INTO admin_a VALUES (6,'Liste','admin/newsletter.php',0);
+INSERT INTO admin_a VALUES (6,'Catégories','admin/newsletter_cats.php',10);
+INSERT INTO admin_a VALUES (6,'Adresses en panne','admin/newsletter_pattecassee.php',20);
+
+--
+-- Table structure for table `newsletter`
+--
+
+CREATE TABLE `newsletter` (
+ `id` int(11) NOT NULL auto_increment,
+ `date` date NOT NULL default '0000-00-00',
+ `titre` varchar(255) NOT NULL default '',
+ `bits` enum('sent','new') NOT NULL default 'new',
+ `head` mediumtext NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM COMMENT='liste des NL envoyes';
+
+--
+-- Table structure for table `newsletter_art`
+--
+
+CREATE TABLE `newsletter_art` (
+ `id` int(10) unsigned NOT NULL default '0',
+ `aid` smallint(5) unsigned NOT NULL default '0',
+ `cid` smallint(5) unsigned NOT NULL default '0',
+ `pos` tinyint(3) unsigned NOT NULL default '0',
+ `title` mediumtext NOT NULL,
+ `body` mediumtext NOT NULL,
+ `append` mediumtext NOT NULL,
+ PRIMARY KEY (`id`,`aid`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `newsletter_cat`
+--
+
+CREATE TABLE `newsletter_cat` (
+ `cid` tinyint(3) unsigned NOT NULL auto_increment,
+ `pos` tinyint(3) unsigned NOT NULL default '0',
+ `titre` varchar(128) NOT NULL default '',
+ PRIMARY KEY (`cid`),
+ KEY `pos` (`pos`)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table `newsletter_ins`
+--
+
+CREATE TABLE `newsletter_ins` (
+ `user_id` smallint(4) unsigned NOT NULL default '0',
+ `last` int(11) NOT NULL default '0',
+ `pref` enum('text','html') NOT NULL default 'html',
+ PRIMARY KEY (`user_id`),
+ KEY `last` (`last`)
+) TYPE=MyISAM COMMENT='liste des abonnés à la newsletter';
+
--- /dev/null
+
+delete from admin_h2 where h2id=6;
+delete from admin_a where h2id=6;
+
+drop TABLE newsletter;
+drop TABLE newsletter_art;
+drop TABLE newsletter_cat;
+drop TABLE newsletter_ins;
--- /dev/null
+bin/devel/modules_status
+bin/devel/tplgettext.php
+bin/devel/lists.foreach_template.py
+
+bin/devel/xhtml.classes.pl
+bin/devel/xhtml.validate.pl
+
+templates/database-debug.tpl
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require('xorg.inc.php');
+
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
--- /dev/null
+#! /usr/bin/perl -w
+#***************************************************************************
+#* Copyright (C) 2003-2004 Polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************
+
+use strict;
+
+exit 0;
--- /dev/null
+
+Copyright (C) 2003-2004 Polytechnique.org
+http://opensource.polytechnique.org/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc.,
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
--- /dev/null
+# Objective Caml source
+ ".*\\.ml[il]?" -> frame open:"(*" line:"*" close:"*)"
+| ".*\\.mly" -> frame open:"/*" line:"*" close:"*/"
+# C source
+| ".*\\.[ch]" -> frame open:"/*" line:"*" close:"*/"
+# tpls
+| ".*\\.tpl" -> frame open:"{*" line:"*" close:"*}"
+# Misc
+| ".*Makefile.*" -> frame open:"#" line:"#" close:"#"
+| ".*README.*" -> frame open:"*" line:"*" close:"*"
+| ".*LICENSE.*" -> frame open:"*" line:"*" close:"*"
--- /dev/null
+bin/cron/clean.php
+bin/cron/connect.db.inc.php
+bin/cron/cron_validations.php
+htdocs/acces_smtp.php
+htdocs/admin/index.php
+htdocs/admin/logger_actions.php
+htdocs/admin/logger.php
+htdocs/admin/valider.php
+htdocs/clear_all_cache.php
+htdocs/css/default.css
+htdocs/deconnexion.php
+htdocs/exit.php
+htdocs/images/admin.png
+htdocs/images/ajouter.gif
+htdocs/images/cadenas_rouge.png
+htdocs/images/favicon.png
+htdocs/images/flag.png
+htdocs/images/flags/AD.gif
+htdocs/images/flags/AE.gif
+htdocs/images/flags/AF.gif
+htdocs/images/flags/AG.gif
+htdocs/images/flags/AI.gif
+htdocs/images/flags/AL.gif
+htdocs/images/flags/AM.gif
+htdocs/images/flags/AN.gif
+htdocs/images/flags/AR.gif
+htdocs/images/flags/AS.gif
+htdocs/images/flags/AT.gif
+htdocs/images/flags/AU.gif
+htdocs/images/flags/AW.gif
+htdocs/images/flags/AX.gif
+htdocs/images/flags/AZ.gif
+htdocs/images/flags/BA.gif
+htdocs/images/flags/BB.gif
+htdocs/images/flags/BD.gif
+htdocs/images/flags/BE.gif
+htdocs/images/flags/BF.gif
+htdocs/images/flags/BG.gif
+htdocs/images/flags/BH.gif
+htdocs/images/flags/BI.gif
+htdocs/images/flags/BJ.gif
+htdocs/images/flags/BM.gif
+htdocs/images/flags/BN.gif
+htdocs/images/flags/BO.gif
+htdocs/images/flags/BS.gif
+htdocs/images/flags/BT.gif
+htdocs/images/flags/BZ.gif
+htdocs/images/flags/CA.gif
+htdocs/images/flags/CD.gif
+htdocs/images/flags/CF.gif
+htdocs/images/flags/CG.gif
+htdocs/images/flags/CH.gif
+htdocs/images/flags/CI.gif
+htdocs/images/flags/CK.gif
+htdocs/images/flags/CL.gif
+htdocs/images/flags/CM.gif
+htdocs/images/flags/CN.gif
+htdocs/images/flags/CO.gif
+htdocs/images/flags/CR.gif
+htdocs/images/flags/CS.gif
+htdocs/images/flags/CU.gif
+htdocs/images/flags/CV.gif
+htdocs/images/flags/CX.gif
+htdocs/images/flags/CY.gif
+htdocs/images/flags/CZ.gif
+htdocs/images/flags/DE.gif
+htdocs/images/flags/DJ.gif
+htdocs/images/flags/DK.gif
+htdocs/images/flags/DM.gif
+htdocs/images/flags/DO.gif
+htdocs/images/flags/DZ.gif
+htdocs/images/flags/EC.gif
+htdocs/images/flags/EE.gif
+htdocs/images/flags/EG.gif
+htdocs/images/flags/EH.gif
+htdocs/images/flags/ER.gif
+htdocs/images/flags/ES.gif
+htdocs/images/flags/ET.gif
+htdocs/images/flags/FI.gif
+htdocs/images/flags/FJ.gif
+htdocs/images/flags/FK.gif
+htdocs/images/flags/FM.gif
+htdocs/images/flags/FO.gif
+htdocs/images/flags/FR.gif
+htdocs/images/flags/GA.gif
+htdocs/images/flags/GB.gif
+htdocs/images/flags/GD.gif
+htdocs/images/flags/GE.gif
+htdocs/images/flags/GG.gif
+htdocs/images/flags/GH.gif
+htdocs/images/flags/GI.gif
+htdocs/images/flags/GL.gif
+htdocs/images/flags/GM.gif
+htdocs/images/flags/GN.gif
+htdocs/images/flags/GQ.gif
+htdocs/images/flags/GR.gif
+htdocs/images/flags/GS.gif
+htdocs/images/flags/GT.gif
+htdocs/images/flags/GU.gif
+htdocs/images/flags/GW.gif
+htdocs/images/flags/GY.gif
+htdocs/images/flags/HK.gif
+htdocs/images/flags/HN.gif
+htdocs/images/flags/HR.gif
+htdocs/images/flags/HT.gif
+htdocs/images/flags/HU.gif
+htdocs/images/flags/ID.gif
+htdocs/images/flags/IE.gif
+htdocs/images/flags/IL.gif
+htdocs/images/flags/IM.gif
+htdocs/images/flags/IN.gif
+htdocs/images/flags/IO.gif
+htdocs/images/flags/IQ.gif
+htdocs/images/flags/IR.gif
+htdocs/images/flags/IS.gif
+htdocs/images/flags/IT.gif
+htdocs/images/flags/JE.gif
+htdocs/images/flags/JM.gif
+htdocs/images/flags/JO.gif
+htdocs/images/flags/JP.gif
+htdocs/images/flags/KE.gif
+htdocs/images/flags/KG.gif
+htdocs/images/flags/KH.gif
+htdocs/images/flags/KI.gif
+htdocs/images/flags/KM.gif
+htdocs/images/flags/KN.gif
+htdocs/images/flags/KP.gif
+htdocs/images/flags/KR.gif
+htdocs/images/flags/KW.gif
+htdocs/images/flags/KY.gif
+htdocs/images/flags/KZ.gif
+htdocs/images/flags/LA.gif
+htdocs/images/flags/LB.gif
+htdocs/images/flags/LC.gif
+htdocs/images/flags/LI.gif
+htdocs/images/flags/LK.gif
+htdocs/images/flags/LR.gif
+htdocs/images/flags/LS.gif
+htdocs/images/flags/LT.gif
+htdocs/images/flags/LU.gif
+htdocs/images/flags/LV.gif
+htdocs/images/flags/LY.gif
+htdocs/images/flags/MA.gif
+htdocs/images/flags/MC.gif
+htdocs/images/flags/MD.gif
+htdocs/images/flags/MG.gif
+htdocs/images/flags/MH.gif
+htdocs/images/flags/MK.gif
+htdocs/images/flags/ML.gif
+htdocs/images/flags/MM.gif
+htdocs/images/flags/MO.gif
+htdocs/images/flags/MP.gif
+htdocs/images/flags/MQ.gif
+htdocs/images/flags/MR.gif
+htdocs/images/flags/MS.gif
+htdocs/images/flags/MT.gif
+htdocs/images/flags/MU.gif
+htdocs/images/flags/MV.gif
+htdocs/images/flags/MW.gif
+htdocs/images/flags/MX.gif
+htdocs/images/flags/MY.gif
+htdocs/images/flags/MZ.gif
+htdocs/images/flags/NA.gif
+htdocs/images/flags/NE.gif
+htdocs/images/flags/NF.gif
+htdocs/images/flags/NG.gif
+htdocs/images/flags/NI.gif
+htdocs/images/flags/NL.gif
+htdocs/images/flags/NO.gif
+htdocs/images/flags/NP.gif
+htdocs/images/flags/NR.gif
+htdocs/images/flags/NU.gif
+htdocs/images/flags/NZ.gif
+htdocs/images/flags/OM.gif
+htdocs/images/flags/PA.gif
+htdocs/images/flags/PC.gif
+htdocs/images/flags/PE.gif
+htdocs/images/flags/PF.gif
+htdocs/images/flags/PG.gif
+htdocs/images/flags/PH.gif
+htdocs/images/flags/PK.gif
+htdocs/images/flags/PL.gif
+htdocs/images/flags/PM.gif
+htdocs/images/flags/PN.gif
+htdocs/images/flags/PR.gif
+htdocs/images/flags/PS.gif
+htdocs/images/flags/PT.gif
+htdocs/images/flags/PW.gif
+htdocs/images/flags/PY.gif
+htdocs/images/flags/QA.gif
+htdocs/images/flags/RO.gif
+htdocs/images/flags/RU.gif
+htdocs/images/flags/RW.gif
+htdocs/images/flags/SA.gif
+htdocs/images/flags/SB.gif
+htdocs/images/flags/SC.gif
+htdocs/images/flags/SD.gif
+htdocs/images/flags/SE.gif
+htdocs/images/flags/SG.gif
+htdocs/images/flags/SH.gif
+htdocs/images/flags/SI.gif
+htdocs/images/flags/SK.gif
+htdocs/images/flags/SL.gif
+htdocs/images/flags/SM.gif
+htdocs/images/flags/SN.gif
+htdocs/images/flags/SO.gif
+htdocs/images/flags/SR.gif
+htdocs/images/flags/ST.gif
+htdocs/images/flags/SU.gif
+htdocs/images/flags/SV.gif
+htdocs/images/flags/SY.gif
+htdocs/images/flags/SZ.gif
+htdocs/images/flags/TC.gif
+htdocs/images/flags/TD.gif
+htdocs/images/flags/TG.gif
+htdocs/images/flags/TH.gif
+htdocs/images/flags/TJ.gif
+htdocs/images/flags/TK.gif
+htdocs/images/flags/TL.gif
+htdocs/images/flags/TM.gif
+htdocs/images/flags/TN.gif
+htdocs/images/flags/TO.gif
+htdocs/images/flags/TR.gif
+htdocs/images/flags/TT.gif
+htdocs/images/flags/TW.gif
+htdocs/images/flags/TZ.gif
+htdocs/images/flags/UA.gif
+htdocs/images/flags/UG.gif
+htdocs/images/flags/US.gif
+htdocs/images/flags/UY.gif
+htdocs/images/flags/VA.gif
+htdocs/images/flags/VC.gif
+htdocs/images/flags/VE.gif
+htdocs/images/flags/VG.gif
+htdocs/images/flags/VI.gif
+htdocs/images/flags/VN.gif
+htdocs/images/flags/VU.gif
+htdocs/images/flags/WF.gif
+htdocs/images/flags/WS.gif
+htdocs/images/flags/YE.gif
+htdocs/images/flags/YU.gif
+htdocs/images/flags/ZA.gif
+htdocs/images/flags/ZM.gif
+htdocs/images/loupe.gif
+htdocs/images/mail.png
+htdocs/images/none.png
+htdocs/images/pi.png
+htdocs/images/retirer.gif
+htdocs/images/sk_default_ban.jpg
+htdocs/images/sk_default_headlogo.jpg
+htdocs/images/sk_default_lesX.gif
+htdocs/images/sk_default_snapshot.png
+htdocs/images/sk_default_titre.gif
+htdocs/index.php
+htdocs/javascript/do_challenge_response.js
+htdocs/javascript/md5.js
+htdocs/javascript/xorg.js
+htdocs/motdepassemd5.php
+htdocs/preferences.php
+htdocs/recovery.php
+htdocs/tmpPWD.php
+include/validations.inc.php
+include/xml-rpc-client.inc.php
+include/xorg/database.inc.php
+include/xorg/env.inc.php
+include/xorg/errors.inc.php
+include/xorg.globals.inc.php
+include/xorg.globals.inc.php.in
+include/xorg/hook.inc.php
+include/xorg.inc.php
+include/xorg/iterator.inc.php
+include/xorg.mailer.inc.php
+include/xorg/menu.inc.php
+include/xorg.misc.inc.php
+include/xorg/page.inc.php
+include/xorg.plugin.inc.php
+include/xorg/session.inc.php
+include/xorg/smarty.plugins.inc.php
+include/xorg.table-editor.inc.php
+include/xorg/xml-rpc.inc.php
+plugins/block.min_auth.php
+plugins/block.only_public.php
+plugins/block.perms.php
+plugins/function.rel.php
+plugins/function.select_db_table.php
+plugins/function.select_nat.php
+plugins/insert.getName.php
+plugins/insert.getNbIns.php
+plugins/insert.getNbNotifs.php
+plugins/insert.getUserName.php
+plugins/insert.mkStats.php
+plugins/modifier.glob.php
+plugins/modifier.url.php
+templates/acces_smtp.tpl
+templates/admin/index.tpl
+templates/admin/valider.tpl
+templates/cookie_off.tpl
+templates/cookie_on.tpl
+templates/deconnexion.tpl
+templates/index.tpl
+templates/logger-view.tpl
+templates/motdepassemd5.success.tpl
+templates/motdepassemd5.tpl
+templates/password_prompt_logged.tpl
+templates/password_prompt.tpl
+templates/preferences.tpl
+templates/recovery.tpl
+templates/skin/common.devel.tpl
+templates/skin/common.footer.tpl
+templates/skin/common.header.tpl
+templates/skin/default.tpl
+templates/table-editor.tpl
+templates/tmpPWD.success.tpl
--- /dev/null
+htdocs/admin/admin_trombino.php
+htdocs/admin/gerer_applis.php
+htdocs/admin/gerer_binets.php
+htdocs/admin/gerer_groupesx.php
+htdocs/epouse.php
+htdocs/fiche.php
+htdocs/getphoto.php
+htdocs/images/vcard.png
+htdocs/profil.php
+htdocs/trombino.php
+htdocs/vcard.php
+include/applis.func.inc.php
+include/geoloc.inc.php
+include/profil/assign_adresses.inc.php
+include/profil/assign_emploi.inc.php
+include/profil/assign_general.inc.php
+include/profil/assign_mentor.inc.php
+include/profil/assign_poly.inc.php
+include/profil/assign_skill.inc.php
+include/profil.func.inc.php
+include/profil/get_adresses.inc.php
+include/profil/get_emploi.inc.php
+include/profil/get_general.inc.php
+include/profil/get_mentor.inc.php
+include/profil/get_poly.inc.php
+include/profil/get_skill.inc.php
+include/profil/update_adresses.inc.php
+include/profil/update_emploi.inc.php
+include/profil/update_general.inc.php
+include/profil/update_mentor.inc.php
+include/profil/update_poly.inc.php
+include/profil/update_skill.inc.php
+include/profil/verif_adresses.inc.php
+include/profil/verif_emploi.inc.php
+include/profil/verif_general.inc.php
+include/profil/verif_mentor.inc.php
+include/profil/verif_poly.inc.php
+include/profil/verif_skill.inc.php
+include/validations/epouses.inc.php
+include/validations/photos.inc.php
+templates/admin/admin_trombino.tpl
+templates/applis.js.tpl
+templates/epouse.tpl
+templates/fiche.tpl
+templates/include/form.valid.epouses.tpl
+templates/include/form.valid.photos.tpl
+templates/include/minifiche.tpl
+templates/profil/adresses.tpl
+templates/profil/emploi.tpl
+templates/profil/general.tpl
+templates/profil.head.tpl
+templates/profil/mentor.tpl
+templates/profil/naissance.tpl
+templates/profil/poly.tpl
+templates/profil/skill.tpl
+templates/profil.tpl
+templates/trombino.tpl
+templates/vcard.tpl
--- /dev/null
+templates/admin/homonymes.tpl
+htdocs/admin/homonymes.php
+htdocs/inscription/index.php
+htdocs/inscription/maj.php
+htdocs/inscription/step1.php
+htdocs/inscription/step2.php
+htdocs/inscription/step3.php
+htdocs/inscription/step4.php
+bin/cron/rapports_inscription.php
+templates/inscription/error.tpl
+templates/inscription/index.tpl
+templates/inscription/maj.tpl
+templates/inscription/step1a.tpl
+templates/inscription/step1.tpl
+templates/inscription/step2.tpl
+templates/inscription/step3.tpl
+templates/inscription/step4.tpl
+templates/mails/inscription.reussie.tpl
+templates/mails/inscrire.mail.tpl
+htdocs/admin/deces_promo.php
+templates/admin/deces_promo.tpl
+templates/admin/utilisateurs.tpl
--- /dev/null
+
+ Notes for the search module for plat/al
+
+
+STATUS
+------
+
+ This package is not ready for release.
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [Search]
+
+ public_max = 25 ; number of max answers for non logged people
+ private_max = 800 ; number of max answers for logged people
+
+ per_page = 20 ; number of answer per page of result
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=9
+
+
+DEPENDS
+-------
+
+ ???
+
--- /dev/null
+htdocs/advanced_search.php
+htdocs/search.php
+include/search.classes.inc.php
+bin/cron/recherche.php
+bin/cron/recherche.pl
+bin/cron/recherche.sql
+templates/search.adv.form.tpl
+templates/search.adv.links.tpl
+templates/search.quick.form.tpl
+templates/search.quick.tpl
+templates/search.tpl
--- /dev/null
+
+ Notes for the skin module for plat/al
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [Skin]
+
+ enable = 1 ; enable skin choices for the user.
+
+ def_id = 1 ; id (in the skins sql table) of the default skin.
+ def_tpl = "default.tpl" ; template name of the default skin.
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=11
+
+
+DEPENDS
+-------
+
+ platal
+
+
--- /dev/null
+hooks/skin.inc.php
+htdocs/admin/gerer_skins.php
+htdocs/css/espace.css
+htdocs/css/humlinux.css
+htdocs/css/linux.css
+htdocs/css/liteskin.css
+htdocs/css/nbviolet.css
+htdocs/css/newxorg.css
+htdocs/css/oldtimes.css
+htdocs/css/openweb.css
+htdocs/css/sharky.css
+htdocs/css/spectral.css
+htdocs/css/trapped.css
+htdocs/images/sk_espace_ban.jpg
+htdocs/images/sk_espace_lesX.gif
+htdocs/images/sk_espace_logo.gif
+htdocs/images/sk_espace_menu.jpg
+htdocs/images/sk_espace_titre.jpg
+htdocs/images/sk_humlinux_background.jpg
+htdocs/images/sk_humlinux_lesX.gif
+htdocs/images/sk_humlinux_logo.gif
+htdocs/images/sk_humlinux_menu.jpg
+htdocs/images/skins/Defaut.png
+htdocs/images/skins/Espace.png
+htdocs/images/skins/HumLinux.png
+htdocs/images/skins/Linux.png
+htdocs/images/skins/NBviolet.png
+htdocs/images/skins/NewXorg.png
+htdocs/images/skins/OldTimes.png
+htdocs/images/skins/OpenWeb.png
+htdocs/images/skins/Sharky.png
+htdocs/images/skins/Spectral.png
+htdocs/images/skins/Trapped.png
+htdocs/images/sk_linux_ban.jpg
+htdocs/images/sk_linux_lesX.jpg
+htdocs/images/sk_linux_logo.jpg
+htdocs/images/sk_linux_menu.gif
+htdocs/images/sk_linux_snapshot.png
+htdocs/images/sk_linux_titre.jpg
+htdocs/images/sk_liteskin_logo.png
+htdocs/images/sk_liteskin_titre.png
+htdocs/images/sk_nbviolet_ban.jpg
+htdocs/images/sk_nbviolet_lesX.gif
+htdocs/images/sk_nbviolet_logo.gif
+htdocs/images/sk_nbviolet_menu.jpg
+htdocs/images/sk_nbviolet_titre.jpg
+htdocs/images/sk_newxorg_background.jpg
+htdocs/images/sk_newxorg_ban.gif
+htdocs/images/sk_newxorg_ban.png
+htdocs/images/sk_newxorg_logo.jpg
+htdocs/images/sk_newxorg_menu.jpg
+htdocs/images/sk_newxorg_titre.jpg
+htdocs/images/sk_oldtimes_ban.jpg
+htdocs/images/sk_oldtimes_lesX.gif
+htdocs/images/sk_oldtimes_logo.gif
+htdocs/images/sk_oldtimes_menu.jpg
+htdocs/images/sk_oldtimes_titre.jpg
+htdocs/images/sk_sharky_ban.png
+htdocs/images/sk_sharky_bubbles.png
+htdocs/images/sk_sharky_logo.png
+htdocs/images/sk_spectral_ban.jpg
+htdocs/images/sk_spectral_lesX.jpg
+htdocs/images/sk_spectral_logo.gif
+htdocs/images/sk_spectral_menu.jpg
+htdocs/images/sk_spectral_titre.jpg
+htdocs/images/sk_trapped_ban.jpg
+htdocs/images/sk_trapped_lesX.gif
+htdocs/images/sk_trapped_logo.gif
+htdocs/images/sk_trapped_menu.gif
+htdocs/images/sk_trapped_monstre.jpg
+htdocs/images/sk_trapped_titre.gif
+htdocs/skins.php
+templates/preferences.tpl.d/90.skin.tpl
+templates/skin/espace.tpl
+templates/skin/humlinux.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/sharky.tpl
+templates/skin/spectral.tpl
+templates/skins.tpl
+templates/skin/trapped.tpl
--- /dev/null
+alter table auth_user_quick add column skin tinyint not null;
+insert into admin_a values(5, 'Skins', 'admin/gerer_skins.php', 30);
+
+--
+-- Table structure for table `skins`
+--
+
+DROP TABLE IF EXISTS skins;
+CREATE TABLE skins (
+ id tinyint(1) unsigned NOT NULL default '0',
+ name varchar(32) NOT NULL default '',
+ date varchar(10) NOT NULL default '',
+ comment varchar(255) NOT NULL default '',
+ auteur varchar(30) NOT NULL default '',
+ skin_tpl varchar(32) NOT NULL default '',
+ ext char(3) NOT NULL default '',
+ PRIMARY KEY (id)
+) TYPE=MyISAM PACK_KEYS=1 COMMENT='liste des skins';
+
+--
+-- Dumping data for table `skins`
+--
+
+INSERT INTO skins VALUES (1,'Defaut','2000-03-07','Skin par défaut','Equipe X.org','default.tpl','png');
+INSERT INTO skins VALUES (2,'Sharky','2003-04-01','Une skin aquatique','Jeremy Lainé','sharky.tpl','png');
+INSERT INTO skins VALUES (3,'Spectral','2000-03-21','Un peu plus haut en couleurs :))','Equipe X.org','spectral.tpl','png');
+INSERT INTO skins VALUES (4,'Espace','2000-03-25','Thème spatial','Equipe X.org','espace.tpl','png');
+INSERT INTO skins VALUES (5,'Linux','2000-03-23','Une skin sérieuse pour polytechniciens linuxiens','Equipe X.org','linux.tpl','png');
+INSERT INTO skins VALUES (6,'HumLinux','2000-03-29','Une skin sexy inspirée d\'un thème WindowMaker...','Equipe X.org','humlinux.tpl','png');
+INSERT INTO skins VALUES (7,'Trapped','2002-12-21','La légende continue...','Thierry Bonnefous','trapped.tpl','png');
+INSERT INTO skins VALUES (8,'NewXorg','2001-06-02','Skin avec le logo officiel de l\'association','Equipe X.org','newxorg.tpl','png');
+INSERT INTO skins VALUES (9,'OldTimes','2000-03-08','La skin historique','Equipe X.org','oldtimes.tpl','png');
+INSERT INTO skins VALUES (10,'NBviolet','2000-03-08','Purple Rain en noir et blanc','Equipe X.org','nbviolet.tpl','png');
+INSERT INTO skins VALUES (11,'LiteSkin','','Un thème visuellement léger et doux','Alexandre HÔ (Xandrex)','liteskin.tpl','png');
+
--- /dev/null
+alter table auth_user_quick drop column skin;
+delete from admin_a where url='admin/gerer_skins.php';
+DROP TABLE skins;
--- /dev/null
+htdocs/admin/gerer_coupure.php
+htdocs/stats/coupure.php
+htdocs/stats/graph_promo.php
+htdocs/stats/index.php
+htdocs/stats/nb_by_promo.php
+htdocs/stats/parselog.php
+htdocs/stats/stats_promo.php
+bin/cron/stats/evolution-inscrits-mails
+bin/cron/stats/genereParselogCat
+bin/cron/stats/mailParselog
+bin/cron/stats/pflogsumm-1.1.0-x.org.pl
+bin/cron/stats/pflogsumm-betaD-x.org.pl
+bin/cron/stats/pflogsumm-betaN-x.org.pl
+bin/cron/stats/pflogsumm-betaR-x.org.pl
+bin/cron/stats/plot-graphs
+templates/stats/coupure.tpl
+templates/stats/index.tpl
+templates/stats/nb_by_promo.tpl
+templates/stats/parselog.tpl
+templates/stats/stats_promo.tpl
--- /dev/null
+
+ Notes for the webredirect module for plat/al
+
+
+CONFIG OPTIONS
+--------------
+
+ All settings of the module are shown here with their default and meaning
+
+ [WebRedirect]
+
+ domain = '' ; the domain used for web redirections.
+
+
+BUGS
+----
+
+ http://trackers.polytechnique.org/index.php?cat=13
+
+
+DEPENDS
+-------
+
+ platal
+
+
--- /dev/null
+htdocs/webredirect.php
+scripts/webredirect_error.php
+scripts/webredirect.php
+templates/webredirect.tpl
+templates/preferences.tpl.d/80.webredirect.tpl
--- /dev/null
+
+alter table auth_user_quick add column redirecturl varchar(255) not null;
+
--- /dev/null
+
+alter table auth_user_quick drop column webredirect;
+
--- /dev/null
+htdocs/admin/ax-xorg.php
+htdocs/admin/gerer_auth-groupex.php
+htdocs/admin/postfix_blacklist.php
+htdocs/admin/postfix_delayed.php
+htdocs/admin/postfix_whitelist.php
+htdocs/auth-groupex.php
+htdocs/auth-redirect.php
+htdocs/cacert.php
+htdocs/docs/apropos.php
+htdocs/docs/charte.php
+htdocs/docs/contacts.php
+htdocs/docs/convention_ax.php
+htdocs/docs/doc_carva.php
+htdocs/docs/doc_emails.php
+htdocs/docs/doc_forums.php
+htdocs/docs/doc_from.php
+htdocs/docs/doc_gratuits.php
+htdocs/docs/doc_melix.php
+htdocs/docs/doc_nn.php
+htdocs/docs/doc_nntp.php
+htdocs/docs/doc_oe.php
+htdocs/docs/doc_patte_cassee.php
+htdocs/docs/doc_smtp.php
+htdocs/docs/doc_ssl.php
+htdocs/docs/en-cours.php
+htdocs/docs/ethique.php
+htdocs/docs/faq.php
+htdocs/docs/index.php
+htdocs/docs/plan.php
+htdocs/docs/services.php
+htdocs/dons.php
+htdocs/groupex/donne-chall.php
+htdocs/groupex/export-econfiance.php
+htdocs/images/ax.png
+htdocs/images/docs_compte1.png
+htdocs/images/docs_compte2.png
+htdocs/images/docs_from1.png
+htdocs/images/docs_from2.png
+htdocs/images/docs_from3.png
+htdocs/images/docs_from4.png
+htdocs/images/docs_from5.png
+htdocs/images/docs_from6.png
+htdocs/images/docs_from7.png
+htdocs/images/docs_from8.png
+htdocs/images/docs_moz1.png
+htdocs/images/docs_moz2.png
+htdocs/images/docs_moz_nntp1.png
+htdocs/images/docs_moz_nntp2.png
+htdocs/images/docs_moz_nntp3.png
+htdocs/images/docs_moz_nntp4.png
+htdocs/images/docs_moz_nntp5.png
+htdocs/images/docs_news1.png
+htdocs/images/docs_news2.png
+htdocs/images/docs_news3.png
+htdocs/images/docs_news4.png
+htdocs/images/docs_nntp_nn4.png
+htdocs/images/docs_smtp1.png
+htdocs/images/docs_smtp2.png
+htdocs/images/docs_smtp3.png
+htdocs/images/docs_smtp4.png
+htdocs/images/docs_ssl_accept.png
+htdocs/images/docs_ssl_dl.png
+htdocs/images/docs_ssl_install.png
+htdocs/images/equipe.jpg
+htdocs/images/logoBR.jpg
+htdocs/images/logo.jpg
+htdocs/images/SceauCertplus_petit.png
+htdocs/images/verisign.png
+htdocs/images/x.png
+htdocs/index.coupure.php
+htdocs/webservices/manageurs.php
+include/webservices/manageurs.inc.php
+include/webservices/manageurs.server.inc.php
+templates/admin/ax-xorg.tpl
+templates/admin/postfix_delayed.tpl
+templates/docs/apropos.tpl
+templates/docs/charte.tpl
+templates/docs/contacts.tpl
+templates/docs/convention_ax.tpl
+templates/docs/doc_carva.tpl
+templates/docs/doc_emails.tpl
+templates/docs/doc_forums.tpl
+templates/docs/doc_from.tpl
+templates/docs/doc_gratuits.tpl
+templates/docs/doc_melix.tpl
+templates/docs/doc_nn.tpl
+templates/docs/doc_nntp.tpl
+templates/docs/doc_oe.tpl
+templates/docs/doc_patte_cassee.tpl
+templates/docs/doc_smtp.tpl
+templates/docs/doc_ssl.tpl
+templates/docs/en-cours.tpl
+templates/docs/ethique.tpl
+templates/docs/faq.tpl
+templates/docs/index.tpl
+templates/docs/plan.tpl
+templates/docs/secu.tpl
+templates/docs/services.tpl
+templates/dons.tpl
+templates/skin/common.bandeau.head.tpl
+templates/skin/common.bandeau.tpl
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: block.min_auth.php
+ * Type: block
+ * Name: min_auth
+ * Purpose:
+ * -------------------------------------------------------------
+ */
+function smarty_block_min_auth($params, $content, &$smarty)
+{
+ if( empty($content) || empty($params['level'] ))
+ return;
+ if( ($params['level'] == 'public') ||
+ ($params['level'] == 'cookie' && logged()) ||
+ ($params['level'] == 'auth' && identified()) )
+ return $content;
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: block.min_auth.php
+ * Type: block
+ * Name: min_auth
+ * Purpose:
+ * -------------------------------------------------------------
+ */
+function smarty_block_only_public($params, $content, &$smarty)
+{
+ if( empty($content) || logged() )
+ return;
+ return $content;
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: block.min_perms.php
+ * Type: block
+ * Name: min_perms
+ * Purpose:
+ * -------------------------------------------------------------
+ */
+function smarty_block_perms($params, $content, &$smarty)
+{
+ if( empty($content) || empty($params['level'] ))
+ return;
+ if( ($params['level'] == 'public') ||
+ ($params['level'] == 'admin' && has_perms()) )
+ return $content;
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+$tidy_on = Array(
+ 'drop-empty-paras',
+ 'drop-font-tags',
+ 'drop-proprietary-attributes',
+ 'hide-comments',
+ 'logical-emphasis',
+ 'output-xhtml',
+ 'replace-color',
+ 'show-body-only'
+);
+$tidy_off = Array(
+ 'clean',
+ 'join-styles',
+ 'join-classes'
+);
+
+foreach($tidy_on as $opt) { tidy_setopt($opt, true); }
+foreach($tidy_off as $opt) { tidy_setopt($opt, false); }
+tidy_setopt('alt-text', '[ inserted by TIDY ]');
+tidy_setopt('wrap', '120');
+unset($tidy_o, $tydy_off);
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: block.min_perms.php
+ * Type: block
+ * Name: min_perms
+ * Purpose:
+ * -------------------------------------------------------------
+ */
+function smarty_block_tidy($params, $content, &$smarty)
+{
+ return tidy_repair_string($content);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function iterate_end($tag_attrs, &$compiler) {
+ return 'endwhile;';
+}
+
+function smarty_compiler_iterate($tag_attrs, &$compiler)
+{
+ static $reg = false;
+ if (!$reg) {
+ $reg = true;
+ $compiler->register_compiler_function("/iterate", 'iterate_end');
+ }
+
+ $_params = $compiler->_parse_attrs($tag_attrs);
+
+ if (!isset($_params['from'])) {
+ $compiler->_syntax_error("iterate: missing 'from' parameter", E_USER_ERROR, __FILE__, __LINE__);
+ return;
+ }
+
+ if (empty($_params['item'])) {
+ $compiler->_syntax_error("iterate: missing 'item' attribute", E_USER_ERROR, __FILE__, __LINE__);
+ return;
+ }
+
+ $_from = $compiler->_dequote($_params['from']);
+ $_item = $compiler->_dequote($_params['item']);
+
+ return "\$_iterate_$_item = $_from;\n"
+ . "while ((\$this->_tpl_vars['$_item'] = \$_iterate_{$_item}->next()) !== null):";
+}
+
+/* vim: set expandtab: */
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function smarty_function_rel()
+{
+ static $rel;
+ if (empty($rel)) {
+ global $globals;
+ $url = parse_url($globals->baseurl);
+ return ($rel = $url['path']);
+ }
+ return $rel;
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+function select_options($table,$valeur,$champ="text",$pad=false,$where="") {
+ global $globals;
+ $sql = "SELECT id,$champ FROM $table $where ORDER BY $champ";
+ $res = $globals->xdb->iterRow($sql);
+ $sel = ' selected="selected"';
+
+ // on ajoute une entree vide si $pad est vrai
+ $html = "";
+ if ($pad) {
+ $html.= '<option value="0"'.($valeur==0?$sel:"")."></option>\n";
+ }
+ while (list($my_id,$my_text) = $res->next()) {
+ $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",$my_id,($valeur==$my_id?$sel:""),$my_text);
+ }
+ return $html;
+}
+
+function smarty_function_select_db_table($params, &$smarty) {
+ if(empty($params['table']))
+ return;
+ if(empty($params['champ']))
+ $params['champ'] = 'text';
+ if(empty($params['pad']) || !($params['pad']))
+ $pad = false;
+ else
+ $pad = true;
+ if(empty($params['where']))
+ $params['where'] = '';
+ return select_options($params['table'], $params['valeur'], $params['champ'], $pad, $params['where']);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+function select_nat($valeur,$pad=false) {
+ global $globals;
+ $sql = "SELECT a2 AS id,IF(nat='',pays,nat) AS text FROM geoloc_pays ORDER BY text";
+ $res = $globals->xdb->iterRow($sql);
+ $sel = ' selected="selected"';
+
+ // on ajoute une entree vide si $pad est vrai
+ $html = "";
+ if ($pad) {
+ $html.= '<option value="0"'.($valeur==0?$sel:"")."></option>\n";
+ }
+ while (list($my_id,$my_text) = $res->next()) {
+ $html .= sprintf("<option value=\"%s\" %s>%s</option>\n",$my_id,($valeur==$my_id?$sel:""),$my_text);
+ }
+ return $html;
+}
+
+function smarty_function_select_nat($params, &$smarty) {
+ if(empty($params['pad']) || !($params['pad']))
+ $pad = false;
+ else
+ $pad = true;
+ return select_nat($params['valeur'], $pad);
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function smarty_insert_getName()
+{
+ global $globals;
+ $uid = Cookie::get('ORGuid', -1);
+ if ($uid < 0) {
+ return "";
+ }
+ $res = $globals->xdb->query("SELECT prenom FROM auth_user_md5 WHERE user_id={?}", $uid);
+ return $res->fetchOneCell();
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: insert.getNbIns.php
+ * Type: insert
+ * Name: getNbIns
+ * Purpose:
+ * -------------------------------------------------------------
+ */
+function smarty_insert_getNbIns($params, &$smarty)
+{
+ global $globals;
+ $res = $globals->xdb->query("SELECT COUNT(*) FROM auth_user_md5 WHERE perms IN ('admin','user') AND deces=0");
+ $cnt = $res->fetchOneCell();
+ return number_format($cnt, 0, ",", ".");
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+function smarty_insert_getNbNotifs($params, &$smarty)
+{
+ if(logged()) {
+ require_once('notifs.inc.php');
+ return getNbNotifs();
+ }
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function smarty_insert_getUsername()
+{
+ global $globals;
+
+ $id = Cookie::getInt('ORGuid', -1);
+ $id = Session::getInt($_SESSION['uid'], $id);
+
+ if ($id<0) {
+ return "";
+ }
+
+ if (Cookie::get('ORGdomain', 'login') != 'alias') {
+ $res = $globals->xdb->query("SELECT alias FROM aliases
+ WHERE id={?} AND (type IN ('a_vie','alias') AND FIND_IN_SET('bestalias', flags))", $id);
+ return $res->fetchOneCell();
+ } else {
+ $res = $globals->xdb->query("
+ SELECT v.alias
+ FROM virtual AS v
+ INNER JOIN virtual_redirect USING(vid)
+ INNER JOIN aliases AS a ON(id={?} AND a.type='a_vie')
+ WHERE redirect = CONCAT(a.alias, {?})
+ OR redirect = CONCAT(a.alias, {?})",
+ $id, "@".$globals->mail->domain, "@".$globals->mail->domain2);
+ $alias = $res->fetchOneCell();
+ return substr($alias, 0, strpos($alias, "@"));
+ }
+
+ return $login;
+
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File: insert.mkStats.php
+ * Type: insert
+ * Name: mkStats
+ * Purpose:
+ * -------------------------------------------------------------
+ */
+function smarty_insert_mkStats($params, &$smarty)
+{
+ global $globals;
+ $res = $globals->xdb->query('select count(*) from requests');
+ $cnt = $res->fetchOneCell();
+ return ($cnt ? $cnt : '-');
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function smarty_modifier_date_format($string, $format = '%x', $default_date=null)
+{
+ $d = empty($string) ? $default_date : $string;
+ if (empty($format) || preg_match('/^[ 0\-]*$/', $d)) return;
+ $f = str_replace('%X', '%T', str_replace('%x', '%e %B %Y', $format));
+
+ if (preg_match('/^\d{14}$/', $d)) {
+ $t = mktime(substr($d,8,2), substr($d,10,2), substr($d,12,2), substr($d,4,2), substr($d,6,2), substr($d,0,4));
+ } else {
+ $t = strtotime($d);
+ }
+
+ if ( $t != -1 ) {
+ return strftime($f , $t);
+ } else {
+ require_once('Date.php');
+ $date = new Date($d);
+ return $date->format($f);
+ }
+}
+
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+function smarty_modifier_url($string)
+{
+ if(strpos($string, "http://")!==false)
+ return $string;
+ $chemins = Array('', '../', '../../');
+ foreach ($chemins as $ch) {
+ if (file_exists($ch.'../htdocs/')) {
+ return $ch.$string;
+ }
+ }
+ return '';
+}
+?>
--- /dev/null
+<?php
+preg_match("/^\/(moderate|admin|members)\/(.*)_([^_]*)$/", $_SERVER["REQUEST_URI"], $matches);
+if (empty($matches)) {
+ exit();
+} else {
+ $action = $matches[1];
+ $mbox = $matches[2];
+ $fqdn = strtolower($matches[3]);
+ if ($fqdn == 'polytechnique.org') {
+ header("Location: https://www.polytechnique.org/listes/$action.php?liste=$mbox");
+ } else {
+ require("../include/xorg.inc.php");
+ $res = $globals->xdb->query("select diminutif from groupex.asso where mail_domain = {?}", $fqdn);
+ if ($gpx = $res->fetchOneCell()) {
+ header("Location: http://www.polytechnique.net/$gpx/listes-$action.php?liste=$mbox");
+ }
+ }
+}
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require("../include/xorg.inc.php");
+
+// on coupe la chaîne REQUEST_URI selon les / et on ne garde que
+// le premier non vide et éventuellement le second
+// la config d'apache impose la forme suivante pour REQUEST_URI :
+// REQUEST_URI = /prenom.nom(/path/fichier.hmtl)?
+list($username, $path) = preg_split('/\//', $_SERVER["REQUEST_URI"], 2, PREG_SPLIT_NO_EMPTY);
+$res = $globals->xdb->query(
+ "SELECT redirecturl
+ FROM auth_user_quick AS a
+ INNER JOIN aliases AS al ON (al.id = a.user_id AND (al.type='a_vie' OR al.type='alias'))
+ WHERE al.alias = {?}", $username);
+
+if ($url = $res->fetchOneCell()) {
+ $url = preg_replace('@/+$@', '', $url);
+ if($path) {
+ header("Location: http://$url/$path");
+ } else {
+ header("Location: http://$url");
+ }
+ exit();
+}
+
+// si on est ici, il y a eu un erreur ou on n'a pas trouvé le redirect
+header("HTTP/1.0 404 Not Found");
+
+?>
+
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title>404 Not Found</title>
+</head><body>
+<h1>Not Found</h1>
+The requested URL <?php echo $_SERVER['REQUEST_URI'] ?> was not found on this server.<p>
+<hr>
+<address>Apache Server at www.carva.org Port 80</address>
+</body></html>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+header("HTTP/1.0 404 Not Found");
+?>
+
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title>404 Not Found</title>
+</head><body>
+<h1>Not Found</h1>
+The requested URL <?php echo $_SERVER['REQUEST_URI'] ?> was not found on this server.<p>
+<hr>
+<address>Apache Server at www.carva.org Port 80</address>
+</body></html>
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+{if $actif}Modification du mot de passe SMTP/NNTP{else}Activation de ton compte SMTP/NNTP{/if}
+</h1>
+
+{literal}
+<script type="text/javascript">
+ <!--
+ function CheckResponse() {
+ 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 !");
+ exit;
+ return false;
+ }
+ if (pw1.length < 6) {
+ alert ("\nErreur : le nouveau mot de passe doit faire au moins 6 caractères !");
+ exit;
+ return false;
+ }
+ document.forms.smtppass_form.op.value='Valider';
+ document.forms.smtppass_form.submit();
+ return true;
+ }
+
+ function SupprimerMdp() {
+ document.forms.smtppass_form.op.value='Supprimer';
+ document.forms.smtppass_form.submit();
+ }
+ // -->
+</script>
+{/literal}
+
+<p>
+ <a href="docs/doc_smtp.php">Pourquoi et comment</a> utiliser le serveur SMTP de Polytechnique.org. <br />
+ <a href="docs/doc_nntp.php">Pourquoi et comment</a> utiliser le serveur NNTP de Polytechnique.org. <br />
+</p>
+<p>
+{if $actif}
+ Clique sur <strong>"Supprimer"</strong> si tu veux supprimer ton compte SMTP/NNTP.
+{else}
+ Pour activer un compte SMTP/NNTP sur <strong>ssl.polytechnique.org</strong>, tape un mot de passe ci-dessous.
+{/if}
+</p>
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="smtppass_form">
+ <table class="tinybicol" cellpadding="3" summary="Définition du mot de passe">
+ <tr>
+ <th colspan="2">
+ Définition du mot de passe
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Mot de passe :
+ </td>
+ <td>
+ <input type="password" size="15" maxlength="15" name="smtppass1" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Retape-le une fois (pour vérification):
+ </td>
+ <td>
+ <input type="password" size="15" maxlength="15" name="smtppass2" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="hidden" name="op" value="" />
+ <input type="submit" value="Valider" onclick="CheckResponse(); return false;" />
+{if $actif}
+ <input type="submit" value="Supprimer" onclick="SupprimerMdp();" />
+{/if}
+ </td>
+ </tr>
+ </table>
+</form>
+<p>
+ Ce mot de passe peut être le même que celui d'accès au site. Il doit faire au
+ moins <strong>6 caractères</strong> quelconques. Attention au type de clavier que tu
+ utilises (qwerty?) et aux majuscules/minuscules.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Gestion du trombino
+</h1>
+
+<p>
+Photo actuelle de {$forlife}
+</p>
+
+<img src="../getphoto.php?x={$forlife}" alt="[ PHOTO ]" />
+<br />
+
+<p>
+<a href="?uid={$smarty.request.uid}&action=supprimer">Supprimer cette photo</a>
+</p>
+
+<p>
+<a href="?uid={$smarty.request.uid}&action=ecole">Voir sa photo de trombi récupérée à l'école (si disponible)</a>
+</p>
+
+<form action="{$smarty.server.PHP_SELF}" method="post" enctype="multipart/form-data">
+ <div>
+ <input type="hidden" name="uid" value="{$smarty.request.uid}" />
+ <input type="hidden" name="action" value="valider" />
+ <input name="userfile" type="file" size="20" maxlength="150" />
+ <input type="submit" value="Envoyer" />
+ </div>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Vérifier notre table de correspondance entre l'annuaire de l'AX et le nôtre
+</h1>
+
+<h2>
+ Liste des camarades qui n'apparaissent pas sous le même nom dans les deux annuaires
+</h2>
+
+<table class="bicol" summary="liste des absents de notre annuaire">
+ <tr>
+ <th>Promo</th>
+ <th>Nom X.org</th> <th>Prénom X.org</th> <th>Mat X.org</th>
+ <th>Nom AX</th> <th>Prénom AX</th> <th>Mat AX</th>
+ </tr>
+{foreach item=x from=$diffs}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$x.promo}</td>
+ <td>{$x.nom}</td> <td>{$x.prenom}</td> <td>{$x.mat}</td>
+ <td>{$x.nomax}</td> <td>{$x.prenomax}</td> <td>{$x.matax}</td>
+ </tr>
+{/foreach}
+</table>
+
+<p>
+ <strong>{$diffs|@count} camarades ont un état civil différent dans les 2 annuaires.</strong>
+</p>
+
+<br />
+<br />
+
+<h2>
+ Liste des camarades de l'annuaire de l'AX qui manquent à notre annuaire
+</h2>
+
+<table class="bicol" summary="liste des absents de notre annuaire">
+ <tr>
+ <th>Promo</th> <th>Nom</th> <th>Prénom</th>
+ </tr>
+{foreach item=x from=$mank}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$x.promo}</td>
+ <td>{$x.nom} {if $x.nom_patro neq $x.nom}({$c.nom_patro}){/if}</td>
+ <td>{$x.prenom}</td>
+ </tr>
+{/foreach}
+</table>
+<p>
+ <strong>{$mank|count} camarades sont absents de notre annuaire.</strong>
+</p>
+
+<br />
+<br />
+
+<h2>
+ Liste des camarades de notre annuaire qui ne sont pas dans l'annuaire de l'AX
+</h2>
+
+<table class="bicol" summary="liste des absents de l'AX">
+ <tr>
+ <th>Promo</th> <th>Nom</th> <th>Prénom</th>
+ </tr>
+{foreach item=x from=$plus}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$x.promo}</td> <td>{$x.nom}</td> <td>{$x.prenom}</td>
+ </tr>
+{/foreach}
+</table>
+
+<p>
+ <strong>{$plus|count} camarades sont absents de l'annuaire de l'AX.</strong>
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<form action="{$smarty.server.PHP_SELF}" method="get">
+ <table class="tinybicol">
+ <tr>
+ <td><input type="submit" value="<<" name="sub10" /></td>
+ <td><input type="submit" value="<" name="sub01" /></td>
+ <td>
+ Promotion :
+ <input type="text" name="promo" value="{$promo}" size="4" maxlength="4" />
+ <input type="submit" value="GO" />
+ </td>
+ <td><input type="submit" value=">" name="add01" /></td>
+ <td><input type="submit" value=">>" name="add10" /></td>
+ </tr>
+ </table>
+</form>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post">
+ <table class="bicol" summary="liste des dates de décès">
+ <tr>
+ <th>Nom</th>
+ <th>Date de décès</th>
+ </tr>
+ {iterate item=x from=$decedes}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$x.nom} {$x.prenom}</td>
+ <td class="center">
+ <input type="text" name="{$x.matricule}" value="{$x.deces}" size="10" maxlength="10" />
+ </td>
+ </tr>
+ {/iterate}
+ <tr>
+ <td class="center" colspan="2">
+ <input type="hidden" name="promo" value="{$promo}" />
+ <input type="submit" name="valider" value="Valider" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Regexps pour les détections de bounces</h1>
+
+<p>
+Rappel sur les niveaux :
+</p>
+<ul>
+ <li>0: IGNORE == ignorer le bounce</li>
+ <li>1: NOTICE == forwarder le bounce (typiquement vacation)</li>
+ <li>2: ERREUR == erreur</li>
+</ul>
+
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>Position/Niveau</th>
+ <th>Regexp/Raison</th>
+ </tr>
+ {if $smarty.get.new}
+ <tr class="impair">
+ <td>
+ <input type='text' name='pos[NULL]' value='' size='4' maxlength='4' />
+ </td>
+ <td>
+ <input type="text" size="82" name='re[NULL]' value="{$re.re}" />
+ </td>
+ </tr>
+ <tr class="impair">
+ <td style="white-space: nowrap">
+ <input type='radio' name='lvl[NULL]' value='0' {if $re.lvl eq 0}checked="checked"{/if} />
+ <input type='radio' name='lvl[NULL]' value='1' {if $re.lvl eq 1}checked="checked"{/if} />
+ <input type='radio' name='lvl[NULL]' value='2' {if $re.lvl eq 2}checked="checked"{/if} />
+ </td>
+ <td>
+ <input type="text" size="32" name='text[NULL]' value="{$re.text}" />
+ </td>
+ </tr>
+ {else}
+ <tr class="impair">
+ <td colspan="2" class="right action">
+ <a href="?new=1">nouveau</a>
+ </td>
+ </tr>
+ {/if}
+ {iterate from=$bre item=re}
+ <tr class="{cycle values="pair,pair,impair,impair"}">
+ <td>
+ <input type='text' name='pos[{$re.id}]' value='{$re.pos}' size='4' maxlength='4' />
+ </td>
+ <td>
+ <input type="text" size="82" name='re[{$re.id}]' value="{$re.re}" />
+ </td>
+ </tr>
+ <tr class="{cycle values="pair,pair,impair,impair"}">
+ <td style="white-space: nowrap">
+ <input type='radio' name='lvl[{$re.id}]' value='0' {if $re.lvl eq 0}checked="checked"{/if} />
+ <input type='radio' name='lvl[{$re.id}]' value='1' {if $re.lvl eq 1}checked="checked"{/if} />
+ <input type='radio' name='lvl[{$re.id}]' value='2' {if $re.lvl eq 2}checked="checked"{/if} />
+ </td>
+ <td>
+ <input type="text" size="32" name='text[{$re.id}]' value="{$re.text}" /><br />
+ </td>
+ </tr>
+ {/iterate}
+ <tr class="{cycle values="pair,impair"}">
+ <td colspan="2" class="center">
+ <input type="submit" value="valider" name="submit" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>
+ Gestion des événements :
+ {if $arch}
+ [ <a href="{$smarty.server.PHP_SELF}?arch=0">Actualités</a> | Archives ]
+ {else}
+ [ Actualités | <a href="{$smarty.server.PHP_SELF}?arch=1">Archives</a> ]
+ {/if}
+</h1>
+
+{if $mode}
+
+{include file="include/form.evenement.tpl"}
+
+{else}
+
+{iterate from=$evs item=ev}
+<table class="bicol">
+ <tr>
+ <th>
+ Posté par <a href="{rel}/fiche.php?user={$ev.forlife}" class='popup2'>{$ev.prenom} {$ev.nom} (X{$ev.promo})</a>
+ </th>
+ </tr>
+ <tr class="{if $ev.fvalide}impair{else}pair{/if}">
+ <td>
+ <strong>{$ev.titre}</strong>
+ </td>
+ </tr>
+ <tr class="{if $ev.fvalide}impair{else}pair{/if}">
+ <td>
+ {tidy}{$ev.texte|nl2br}{/tidy}
+ </td>
+ </tr>
+ <tr class="{if $ev.fvalide}impair{else}pair{/if}">
+ <td>
+ Création : {$ev.creation_date}<br />
+ Péremption : {$ev.peremption}<br />
+ Promos : {$ev.promo_min} - {$ev.promo_max}<br />
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <div>
+ <input type="hidden" name="evt_id" value="{$ev.id}" />
+ <input type="hidden" name="arch" value="{$ev.arch}" />
+ {if $ev.farch}
+ <input type="submit" name="action" value="Desarchiver" />
+ {else}
+ <input type="submit" name="action" value="Editer" />
+ {if $ev.fvalide}
+ <input type="submit" name="action" value="Invalider" />
+ <input type="submit" name="action" value="Archiver" />
+ {else}
+ <input type="submit" name="action" value="Valider" />
+ {/if}
+ <input type="submit" name="action" value="Supprimer" />
+ {/if}
+ </div>
+ </form>
+ </th>
+ </tr>
+</table>
+
+<br />
+{/iterate}
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Geoloc</h1>
+
+<h2>Synchroniser des villes avec geoloc.org</h2>
+
+{if $nb_missinglat}
+<p>[<a href='?missinglat=1'>toutes les villes sans coordonnées ({$nb_missinglat})</a>]</p>
+{/if}
+
+<form action='{$smarty.server.PHP_SELF}' method='get'>
+<p>
+La ville dont l'id est : <input size="6" name="id" />
+</p>
+</form>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{include file=table-editor.tpl}
+
+<h1>Administration Polytechnique.org</h1>
+
+{literal}
+<script type="text/javascript">
+ <!--
+ function new_grade() {
+ document.forms.form_grade.act.value = "new";
+ document.forms.form_grade.submit();
+ return true;
+ }
+
+ function del_grade( myid ) {
+ if (confirm ("You are about to delete this entry. Do you want to proceed?")) {
+ document.forms.form_grade.act.value = "del";
+ document.forms.form_grade.gid.value = myid;
+ document.forms.form_grade.submit();
+ return true;
+ }
+ }
+ // -->
+</script>
+{/literal}
+
+<form method="post" action='#form_grade' id='form_grade'>
+ <table class='bicol'>
+ <tr>
+ <th>id</th>
+ <th>intitulé</th>
+ <th>ordre</th>
+ <th> </th>
+ </tr>
+ <tr>
+ <td colspan='3'>
+ Nouveau ...
+ </td>
+ <td class='action'>
+ <a href='javascript:new_grade()'>nouveau</a>
+ </td>
+ </tr>
+ {iterate from=$grades item=g}
+ <tr class="{cycle values="pair,impair"}">
+ <td>{$g.gid}</td>
+ <td>
+ <input type='text' size='65' value="{$g.text}" name="grades[{$g.gid}]" />
+ </td>
+ <td>
+ <input type='text' maxlength='2' value="{$g.pos}" name="pos[{$g.gid}]" />
+ </td>
+ <td class='action'>
+ <a href='javascript:del_grade({$g.gid})'>suppr.</a>
+ </td>
+ </tr>
+ {/iterate}
+ <tr class="{cycle values="impair,pair"}">
+ <td colspan='4' class="center">
+ <input type='hidden' name='frm_id' value='{$smarty.post.frm_id}' />
+ <input type='hidden' name='action' value='{$smarty.post.action}' />
+ <input type='hidden' name='act' value='' />
+ <input type='hidden' name='gid' value='' />
+ <input type='submit' name='gr_sub' value='Sauver' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Gestion des homonymes
+</h1>
+
+
+{if $op eq 'mail'}
+<p class="erreur">mail envoyé à {$forlife}</p>
+{elseif $op eq 'correct'}
+<p class="erreur">mail envoyé à {$forlife}, alias supprimé</p>
+{/if}
+
+{if $op eq 'list' || $op eq 'mail' || $op eq 'correct'}
+
+<p>
+ Les utilisateurs signalés en rouge sont ceux qui conservent actuellement
+ l'alias prenom.nom et empêchent donc la mise en place du robot détrompeur.
+</p>
+
+<table class="bicol">
+ <tr>
+ <th>alias concerné</th>
+ <th>date de péremption de l'alias</th>
+ <th>op</th>
+ </tr>
+ {foreach from=$hnymes key=login item=row}
+ <tr class="pair">
+ <td colspan="3">
+ <strong>{$login}</strong>
+ </td>
+ </tr>
+ {foreach from=$row item=user}
+ <tr class="impair">
+ <td>
+ {if $user.type eq 'alias'}
+ <span class="erreur"><strong>{$user.forlife}</strong></span>
+ {else}
+ {$user.forlife}
+ {/if}
+ </td>
+ <td>{$user.expire|date_format}</td>
+ <td>
+ <a href="{"fiche.php"|url}?user={$user.forlife}" class='popup2'>fiche</a>
+ <a href="utilisateurs.php?login={$user.forlife}">edit</a>
+ {if $user.type eq 'alias'}
+ <a href="?op=mail-conf&target={$user.user_id}">mailer</a>
+ <a href="?op=correct-conf&target={$user.user_id}">corriger</a>
+ {/if}
+ </td>
+ </tr>
+ {/foreach}
+ {/foreach}
+</table>
+
+{elseif $op eq 'mail-conf'}
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <table class="bicol">
+ <tr>
+ <th>Envoyer un mail pour prévenir l'utilisateur</th>
+ </tr>
+ <tr>
+ <td>
+ <textarea cols="80" rows="20" name="mailbody">
+{$prenom},
+
+
+Comme nous t'en avons informé par mail il y a quelques temps,
+pour respecter nos engagements en terme d'adresses e-mail devinables,
+tu te verras bientôt retirer l'alias {$loginbis}@polytechnique.org pour
+ne garder que {$forlife}@polytechnique.org.
+
+Toute personne qui écrira à {$loginbis}@polytechnique.org recevra la
+réponse d'un robot qui l'informera que {$loginbis}@polytechnique.org
+est ambigu pour des raisons d'homonymie et signalera ton email exact.
+
+L'équipe Polytechnique.org
+{$baseurl}
+ </textarea>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="hidden" name="target" value="{$target}" />
+ <input type="hidden" name="op" value="mail" />
+ <input type="submit" value="Envoyer" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{elseif $op eq 'correct-conf'}
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <table class="bicol">
+ <tr>
+ <th>Mettre en place le robot {$loginbis}@polytechnique.org</th>
+ </tr>
+ <tr>
+ <td>
+ <textarea cols="80" rows="20" name="mailbody">
+{$prenom},
+
+Comme nous t'en avons informé par mail il y a quelques temps,
+nous t'avons retiré de façon définitive l'adresse
+{$loginbis}@polytechnique.org.
+
+Toute personne qui écrit à {$loginbis}@polytechnique.org reçoit la
+réponse d'un robot qui l'informe que {$loginbis}@polytechnique.org
+est ambigu pour des raisons d'homonymie et signale ton email exact
+
+Tu peux faire l'essai toi-même en écrivant à {$loginbis}@polytechnique.org.
+
+L'équipe Polytechnique.org
+{$baseurl}
+ </textarea>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="hidden" name="target" value="{$target}" />
+ <input type="hidden" name="op" value="correct" />
+ <input type="submit" value="Envoyer et corriger" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Administration Polytechnique.org</h1>
+
+{foreach from=$index key=h1 item=index2}
+<table class="bicol" cellpadding="3" summary="Système">
+ <tr><th>{$h1}</th></tr>
+ {foreach from=$index2 key=h2 item=index3}
+ <tr class="{cycle values="impair,pair"}">
+ <td>
+ <strong>{$h2} :</strong>
+ {foreach from=$index3 item=ln name=ln}
+ <a href="{rel}/{$ln.url}">{$ln.txt}</a>
+ {if !$smarty.foreach.ln.last}
+ |
+ {/if}
+ {/foreach}
+ </td>
+ </tr>
+ {/foreach}
+</table>
+<br />
+{/foreach}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Mail Lists
+</h1>
+
+<table class='bicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>Listes</th>
+ </tr>
+ {foreach from=$listes item=l}
+ <tr class='{cycle values="impair,pair"}'>
+ <td><a href='{"listes/soptions.php"|url}?liste={$l}'>{$l}</a></td>
+ </tr>
+ {/foreach}
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Lettre de Polytechnique.org
+</h1>
+
+<table class="bicol" cellpadding="3" cellspacing="0" summary="liste des NL">
+ <tr>
+ <th>date</th>
+ <th>titre</th>
+ </tr>
+ <tr>
+ <td colspan='2'><a href='?new'>Créer une nouvelle lettre</a></td>
+ </tr>
+ {foreach item=nl from=$nl_list}
+ <tr class="{cycle values="pair,impair"}">
+ <td>{$nl.date|date_format}</td>
+ <td>
+ <a href="{"admin/newsletter_edit.php"|url}?nid={$nl.id}">{$nl.titre|default:"[no title]"}</a>
+ </td>
+ </tr>
+ {/foreach}
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Lettre de Polytechnique.org de {$nl->_date|date_format:"%B %Y"}
+</h1>
+
+{if !$art}
+
+<p>
+[<a href="{"admin/newsletter.php"|url}">liste</a>]
+[<a href="{"newsletter/show.php"|url}?nid={$nl->_id}">visualiser</a>]
+</p>
+
+<form action='{$smarty.server.PHP_SELF}?nid={$nl->_id}' method='post'>
+ <table class="bicol" cellpadding="3" cellspacing="0">
+ <tr>
+ <th colspan='2'>
+ Propriétés de la newsletter
+ </th>
+ </tr>
+ <tr>
+ <td class='titre'>
+ Titre
+ </td>
+ <td>
+ <input type='text' size='60' name='title' value="{$nl->title()}" />
+ </td>
+ </tr>
+ <tr>
+ <td class='titre'>
+ Date d'envoi
+ </td>
+ <td>
+ <input type='text' size='60' name='date' value="{$nl->_date}" />
+ </td>
+ </tr>
+ <tr>
+ <td class='titre'>
+ Intro de la lettre
+ </td>
+ <td>
+ <textarea name='head' cols='60' rows='6'>{$nl->head()}</textarea>
+ </td>
+ </tr>
+ <tr class='center'>
+ <td colspan='2'>
+ <input type='submit' name='update' value='sauver' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+<br />
+
+<table class="bicol" cellpadding="3" cellspacing="0">
+ <tr>
+ <td>
+ Créer un nouvel article ...
+ </td>
+ <td style='vertical-align:middle; border-left: 1px gray solid'>
+ [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&edit_aid=-1#edit">créer</a>]
+ </td>
+ </tr>
+ {foreach from=$nl->_arts item=arts key=cat}
+ <tr>
+ <th>
+ {$nl->_cats[$cat]|default:"[no cat]"}
+ </th>
+ <th></th>
+ </tr>
+ {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>
+ </td>
+ <td style='vertical-align:middle; border-left: 1px gray solid'>
+ <strong>Pos: {$art->_pos}</strong><br />
+ [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&edit_aid={$art->_aid}#edit">edit</a>]<br />
+ [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&del_aid={$art->_aid}">delete</a>]
+ </td>
+ </tr>
+ {/foreach}
+ {/foreach}
+</table>
+
+{else}
+
+<p>
+[<a href="?nid={$nl->_id}">retour</a>]
+</p>
+
+{if !$art->check()}<p class='erreur'>article trop long !</p>{/if}
+<table class='bicol'>
+ <tr><th>Version texte</th></tr>
+ <tr id='text'>
+ <td><pre>{$art->toText()}</pre></td>
+ </tr>
+ <tr><th>Version html</th></tr>
+ <tr id='html'>
+ <td>
+ <div class='nl'>
+ {$art->toHtml()|smarty:nodefaults}
+ </div>
+ </td>
+ </tr>
+</table>
+
+<br />
+
+<form action="{$smarty.server.REQUEST_URI}#edit" method="post">
+ <table class='bicol'>
+ <tr>
+ <th colspan='2'>
+ <a id='edit'></a>Editer un article
+ <input type='hidden' name='aid' value='{$smarty.get.edit_aid}' />
+ </th>
+ </tr>
+ <tr class="impair">
+ <td class='titre'>Sujet</td>
+ <td>
+ <input size='60' type='text' value="{$art->title()}" name='title' />
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class='titre'>Catégorie</td>
+ <td>
+ <select name='cid'>
+ <option value='0'>-- none --</option>
+ {foreach from=$nl->_cats item=text key=cid}
+ <option value='{$cid}' {if $art->_cid eq $cid}selected="selected"{/if}>{$text}</option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class='titre'>Position</td>
+ <td>
+ <input type='text' value='{$art->_pos}' name='pos' />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class='titre'>Contenu</td>
+ <td>
+ <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td>
+ <td>
+ <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea>
+ </td>
+ </tr>
+ <tr class='pair'>
+ <td colspan='2' class='center'>
+ <input type='submit' value='visualiser' />
+ <input type='submit' name='save' value='Sauver' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Mails en attente de décision</h1>
+
+<table class="bicol" cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>Checksum</th>
+ <th>Nb mails reçus</th>
+ <th>Dernier reçu</th>
+ <th>Premier reçu</th>
+ <th>Etat</th>
+ <th>Actions</th>
+ </tr>
+ {iterate from=$mails item=m}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$m.crc}</td>
+ <td><strong>{$m.nb}</strong></td>
+ <td>{$m.update_time|date_format}</td>
+ <td>{$m.create_time|date_format}</td>
+ <td><strong>{if $m.del}Poubelle{elseif $m.ok}Autorisé{else}En attente{/if}</strong></td>
+ <td>
+ <form method="post" action="{$smarty.server.PHP_SELF}">
+ <div>
+ <input type="hidden" name="crc" value="{$m.crc}" />
+ <input type="submit" name="ok" value="Laisser passer" />
+ <input type="submit" name="del" value="Effacer les mails" />
+ </div>
+ </form>
+ </td>
+ </tr>
+ {/iterate}
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Synchronisation depuis l'AX
+</h1>
+
+<form action='{$smarty.request.PHP_SELF}' method='get'>
+<table class="tinybicol">
+<tr>
+ <th>Synchroniser un utilisateur</th>
+</tr>
+<tr>
+ <td style='padding:5px'>
+ <input type='text' name='user' value='{$smarty.request.user}' size='40' maxlength='255'/>
+ <input type='submit' value='Chercher' />
+ </td>
+</tr>
+</table>
+</form>
+
+{if $x}
+<form action='{$smarty.request.PHP_SELF}' method='post'>
+{if $x.profile_from_ax}
+<div style="text-align:center;margin:5px;background:green">
+<strong>Cet utilisateur a accepeté la synchronisation</strong>
+</div>
+{else}
+<div style="text-align:center;margin:5px;background:red">
+<strong>ATTENTION ! Cet utilisateur n'a pas accepté la synchronisation</strong>
+</div>
+{/if}
+<table class="bicol" cellpadding="0" cellspacing="0" border="1">
+ <tr>
+ <th>champ</th>
+ <th style='width:50%'>x.org</th>
+ <th>importer</th>
+ <th style='width:50%'>AX</th>
+ </tr>
+ <tr class="impair">
+ <td>fiche</td>
+ <td>
+ <a href='{rel}/fiche.php?user={$x.user_id}' class='popup2'>polytechnique.org</a>
+ </td>
+ <td>
+ </td>
+ <td>
+ <a href='http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$x.matricule_ax}'>polytechniciens.com</a>
+ </td>
+ </tr>
+{foreach from=$watch_champs item='i'}
+ {if $x[$i] or $ax[$i]}
+ <tr class="{if ($x[$i] eq $ax[$i]) or !$ax[$i]}im{/if}pair">
+ <td>
+ {$i}
+ </td>
+ <td>
+ {$x[$i]}
+ </td>
+ <td class='center'>
+ {if $x[$i] eq $ax[$i]}
+ ==
+ {else}
+ {if $ax[$i]}
+ <input style='flat:right' type='checkbox' name='{$i}' />
+ {/if}
+ {/if}
+ </td>
+ <td>
+ {$ax[$i]}
+ </td>
+ </tr>
+ {/if}
+{/foreach}
+</table>
+
+<table>
+<tr>
+<td>
+{if $ax.adr[0]}
+{if $x.adr}
+<div>
+ Supprimer les adresses suivantes :
+</div>
+<table>
+ {foreach from=$x.adr item='adr'}
+ <tr style="padding:5px">
+ <td>
+ <input type='checkbox' name='del_address{$adr.adrid}' />
+ </td>
+ <td>
+ {include file='geoloc/address.tpl' address=$adr no_div=1}
+ </td>
+ </tr>
+ {/foreach}
+</table>
+<div>
+ et les remplacer par les adresses suivantes de l'AX :
+</div>
+{else}
+<div>
+ Importer les adresses AX suivantes :
+</div>
+{/if}
+<table>
+ {foreach from=$ax.adr item='adr' key='adrid'}
+ <tr style='padding:5px'>
+ <td>
+ <input type='checkbox' name='add_address{$adrid}' />
+ </td>
+ <td>
+ {include file='geoloc/address.tpl' address=$adr no_div=1}
+ </td>
+ </tr>
+ {/foreach}
+</table>
+{/if}
+</td>
+
+<td>
+{if $ax.adr_pro[0].entreprise}
+{if $x.adr_pro}
+<div>
+ Supprimer les emplois suivants :
+</div>
+<table>
+ {foreach from=$x.adr_pro item='pro'}
+ {if ($pro.poste) or ($pro.fonction) or ($pro.entreprise)}
+ <tr style='padding:5px'>
+ <td>
+ <input type='checkbox' name='del_pro{$pro.entrid}' />
+ </td>
+ <td>
+ {if $pro.entreprise}
+ <div>
+ <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong>
+ </div>
+ {/if}
+ {if $pro.secteur}
+ <div>
+ <em>Secteur : </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>
+ </div>
+ {/if}
+ {if $pro.poste}
+ <div>
+ <em>Poste : </em> <strong>{$pro.poste}</strong>
+ </div>
+ {/if}
+ {include file='geoloc/address.tpl' address=$pro no_div=1}
+ </td>
+ </tr>
+ {/if}
+ {/foreach}
+</table>
+
+<div>
+ et les remplacer par les emplois suivants de l'AX :
+</div>
+{else}
+<div>
+ Importer les emplois suivants depuis l'AX :
+</div>
+{/if}
+<table>
+ {foreach from=$ax.adr_pro item='pro' key='proid'}
+ {if ($pro.poste) or ($pro.fonction) or ($pro.entreprise)}
+ <tr style='padding:5px'>
+ <td>
+ <input type='checkbox' name='add_pro{$proid}' />
+ </td>
+ <td>
+ {if $pro.entreprise}
+ <div>
+ <em>Entreprise/Organisme : </em> <strong>{$pro.entreprise}</strong>
+ </div>
+ {/if}
+ {if $pro.fonction}
+ <div>
+ <em>Fonction : </em> <strong>{$pro.fonction}</strong>
+ </div>
+ {/if}
+ {include file='geoloc/address.tpl' address=$pro no_div=1}
+ </td>
+ </tr>
+ {/if}
+ {/foreach}
+</table>
+{/if}
+</td>
+</tr>
+</table>
+<div class='center'>
+ <input type='hidden' name='user' value='{$ax.uid}' />
+ <input type='submit' name='importe' value='Importer' />
+</div>
+</form>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $smarty.session.suid}
+<p class="erreur">
+Attention, déjà en SUID !!!
+</p>
+{/if}
+
+<h1>
+ Gestion des utilisateurs
+</h1>
+
+
+{if $smarty.post.u_kill_conf}
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <div class="center">
+ <input type="hidden" name="user_id" value="{$smarty.request.user_id}" />
+ Confirmer la suppression de {$smarty.request.user_id}
+ <input type="submit" name="u_kill" value="continuer" />
+ </div>
+</form>
+{else}
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <table class="tinybicol" cellspacing="0" cellpadding="2">
+ <tr>
+ <th>
+ Administrer
+ </th>
+ </tr>
+ {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.
+ </td>
+ </tr>
+ {/if}
+ <tr>
+ <td class="center">
+ <input type="text" name="login" size="40" maxlength="255" value="{$smarty.request.login|default:$mr.forlife}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="center">
+ <input type="hidden" name="hashpass" value="" />
+ <input type="submit" name="select" value=" edit " />
+ <input type="submit" name="suid_button" value=" su " />
+ <input type="submit" name="ax_button" value=" AX " />
+ <input type="submit" name="logs_button" value=" logs " />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{if $mr}
+
+<p class="smaller">
+Derniére connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
+depuis <strong>{$host}</strong>
+</p>
+
+{literal}
+<script type="text/javascript">
+//<![CDATA[
+function doEditUser() {
+ document.forms.auth.hashpass.value = MD5(document.forms.edit.password.value);
+ document.forms.auth.password.value = "";
+ document.forms.auth.submit();
+}
+
+function del_alias(alias) {
+ document.forms.alias.del_alias.value = alias;
+ document.forms.alias.submit();
+}
+
+function del_fwd(fwd) {
+ document.forms.fwds.del_fwd.value = fwd;
+ document.forms.fwds.submit();
+}
+// ]]>
+</script>
+{/literal}
+
+<form id="auth" method="post" action="{$smarty.server.PHP_SELF}">
+ <table cellspacing="0" cellpadding="2" class="tinybicol">
+ <tr>
+ <th>
+ UID et Matricule
+ </th>
+ <th>
+ {$mr.user_id} / {$mr.matricule}
+ <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ </th>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Mot de passe
+ </td>
+ <td>
+ <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
+ <input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
+ <input type="hidden" name="hashpass" value="" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Nom
+ </td>
+ <td>
+ <input type="text" name="nomN" size="20" maxlength="255" value="{$mr.nom}" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Nom d'usage
+ </td>
+ <td>
+ <input type="text" name="nomusageN" size="20" maxlength="255" value="{$mr.nom_usage}" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Prénom
+ </td>
+ <td>
+ <input type="text" name="prenomN" size="20" maxlength="30" value="{$mr.prenom}" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Droits
+ </td>
+ <td>
+ <select name="permsN">
+ <option value="user" {if $mr.perms eq "user"}selected="selected"{/if}>user</option>
+ <option value="admin" {if $mr.perms eq "admin"}selected="selected"{/if}>admin</option>
+ <option value="pending" {if $mr.perms eq "pending"}selected="selected"{/if}>pending</option>
+ <option value="disabled" {if $mr.perms eq "disabled"}selected="selected"{/if}>disabled</option>
+ </select>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Date de naissance
+ </td>
+ <td>
+ <input type="text" name="naissanceN" size="12" maxlength="10" value="{$mr.naissance}" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Promo
+ </td>
+ <td>
+ <input type="text" name="promoN" size="4" maxlength="4" value="{$mr.promo}" />
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Commentaire
+ </td>
+ <td>
+ <input type="text" name="commentN" size="40" maxlength="64" value="{$mr.comment}" />
+ </td>
+ </tr>
+ <tr class="center">
+ <td>
+ <a href="{"fiche.php"|url}?user={$mr.forlife}" class="popup2">[Voir fiche]</a>
+ </td>
+ <td>
+ <input onclick="doEditUser(); return true;" type="submit" name="u_edit" value="UPDATE" />
+ </td>
+ </tr>
+ <tr class="center">
+ <td>
+ <a href="admin_trombino.php?uid={$mr.user_id}">[Trombino]</a>
+ </td>
+ <td>
+ <input type="submit" name="u_kill_conf" value="Désinscrire" />
+ </td>
+ </tr>
+ </table>
+</form>
+<p>
+Ne pas utiliser [Désinscrire] si le but est d'exclure la personne.
+Pour ceci changer ses permissions en 'disabled'.
+</p>
+<form id="alias" method="post" action="{$smarty.server.PHP_SELF}">
+ <table class="tinybicol" cellpadding="2" cellspacing="0">
+ <tr>
+ <th class="alias" colspan="2">
+ Alias e-mail
+ </th>
+ </tr>
+ {iterate from=$aliases item=a}
+ <tr class="{cycle values="impair,pair"}">
+ <td>
+ <input type="radio" name='best' {if $a.best}checked="checked"{/if} value='{$a.alias}' onclick="this.form.submit()" />
+ {if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}
+ {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
+ </td>
+ {if $a.for_life}
+ <td>garanti à vie*</td>
+ {else}
+ <td class="action">
+ <a href="javascript:del_alias('{$a.alias}')">delete</a>
+ </td>
+ {/if}
+ </tr>
+ {/iterate}
+ <tr class="{cycle values="impair,pair"}">
+ <td class="detail">
+ <input type="text" name="email" size="29" maxlength="60" value="" />
+ </td>
+ <td class="action">
+ <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ <input type="hidden" name="del_alias" value="" />
+ <input type="submit" name="add_alias" value="Ajouter" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p>
+<strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
+</p>
+
+<form id="fwds" method="post" action="{$smarty.server.PHP_SELF}">
+ <table class="bicol" cellpadding="2" cellspacing="0">
+ <tr>
+ <th colspan="3">
+ Redirections
+ </th>
+ </tr>
+ {foreach item=mail from=$emails}
+ <tr>
+ <td class="titre">
+ {if $mail->active}active{/if}
+ </td>
+ <td>
+ {$mail->email}
+ </td>
+ <td class="action">
+ <a href="javascript:del_fwd('{$mail->email}')">delete</a>
+ </td>
+ </tr>
+ {/foreach}
+ <tr>
+ <td class="titre">
+ Ajouter un email
+ </td>
+ <td>
+ <input type="text" name="email" size="29" maxlength="60" value="" />
+ </td>
+ <td class="action">
+ <input type="hidden" name="user_id" value="{$mr.user_id}" />
+ <input type="hidden" name="del_fwd" value="" />
+ <input type="submit" name="add_fwd" value="Ajouter" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{foreach from=$emails item=mail}
+{if $email->panne && $email->panne neq "0000-00-00"}
+<p class="erreur">
+Panne pour l'email "{$mail->email}" le {$mail->panne|date_format}
+</p>
+{/if}
+{/foreach}
+{/if}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Validation</h1>
+
+
+{if $vit->total()}
+
+{iterate item=valid from=$vit|smarty:nodefaults}
+<br />
+<table class="bicol">
+ <tr>
+ <th colspan="2">{$valid->type}</th>
+ </tr>
+ <tr>
+ <td class="titre" style="width: 20%">Demandeur :</td>
+ <td>
+ <a href="{rel}/fiche.php?user={$valid->bestalias}" class="popup2">
+ {$valid->prenom} {$valid->nom} (X{$valid->promo})
+ </a>
+ </td>
+ </tr>
+ {include file=$valid->formu()}
+ <tr><th colspan='2'>Commentaires</th></tr>
+ {foreach from=$valid->comments item=c}
+ <tr class="{cycle values="impair,pair"}">
+ <td class="titre">
+ <a href="{rel}/fiche.php?user={$c[0]}" class="popup2">{$c[0]}</a>
+ </td>
+ <td>{$c[1]}</td>
+ </tr>
+ {/foreach}
+ <tr id='comment{$valid->uid}'>
+ <td colspan='2' class='center'>
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <div>
+ <input type="hidden" name="uid" value="{$valid->uid}" />
+ <input type="hidden" name="type" value="{$valid->type}" />
+ <input type="hidden" name="stamp" value="{$valid->stamp}" />
+ <textarea rows="3" cols="50" name="comm"></textarea>
+ <br />
+ <input type="submit" name="hold" value="Commenter" />
+ </div>
+ </form>
+ </td>
+ </tr>
+ <tr><th colspan='2'>Réponse</th></tr>
+ <tr>
+ <td colspan='2' class='center' {popup caption="Règles de validation" text=$valid->rules}>
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <div>
+ Ajouté dans l'email :<br />
+ <textarea rows="5" cols="50" name="comm"></textarea><br />
+
+ <input type="hidden" name="uid" value="{$valid->uid}" />
+ <input type="hidden" name="type" value="{$valid->type}" />
+ <input type="hidden" name="stamp" value="{$valid->stamp}" />
+ <input type="submit" name="accept" value="Accepter" />
+ {if $valid->refuse}<input type="submit" name="refuse" value="Refuser" />{/if}
+ <input type="submit" name="delete" value="Supprimer" />
+ </div>
+ </form>
+ </td>
+ </tr>
+</table>
+{/iterate}
+
+{else}
+
+<p>Rien à valider</p>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $success}
+ <p>
+ a demande de création des alias <strong>{$success}@{#globals.mail.alias_dom#}</strong> et
+ <strong>{$success}@{#globals.mail.alias_dom2#}</strong> a bien été enregistrée. Après
+ vérification, tu recevras un mail te signalant l'ouverture de ces adresses.
+ </p>
+ <p>
+ Encore merci de nous faire confiance pour tes e-mails !
+ </p>
+{else}
+ <h1>
+ Adresses e-mail personnalisées
+ </h1>
+
+{if $actuel}
+<form action="?visible={if $mail_public}private{else}public{/if}" method='post'>
+ <table class="flags">
+ <tr>
+ <td class="orange">
+ <input type="checkbox" {if $mail_public}checked="checked"{/if} onclick="this.form.submit()" />
+ </td>
+ <td>
+ Ton alias est actuellement : <strong>{$actuel}</strong>. Il est pour l'instant
+ {if $mail_public}public et apparaît donc sur ta fiche.{else}privé et n'apparaît nulle part sur le site{/if}
+ </td>
+ </tr>
+ </table>
+</form>
+
+{else}
+ <p>
+ Pour plus de <strong>convivialité</strong> dans l'utilisation de tes mails, tu peux choisir une adresse
+ e-mail discrète et personnalisée. Ce nouvel e-mail peut par exemple correspondre à ton surnom.
+ </p>
+{/if}
+
+ <p>
+ Pour de plus amples informations sur ce service, nous t'invitons à consulter
+ <a href="{rel}/docs/doc_melix.php">cette documentation</a> qui répondra
+ sans doute à toutes tes questions
+ </p>
+
+ {if $actuel}
+ <p>
+ <strong>Note : 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
+ en cours. Si tu souhaites modifier ceci refais une demande, sinon ce n'est pas la peine.</strong>
+ </p>
+ {/if}
+
+ <br />
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" cellpadding="4" summary="Demande d'alias">
+ <tr>
+ <th>Demande d'alias</th>
+ </tr>
+ <tr>
+ <td>Alias demandé :</td>
+ </tr>
+ <tr>
+ <td><input type="text" name="alias" value="{$r_alias}" />@{#globals.mail.alias_dom#} et @{#globals.mail.alias_dom2#}</td>
+ </tr>
+ <tr>
+ <td>
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="orange">
+ <input type="checkbox" name="public" {if $mail_public}checked="checked"{/if}/>
+ </td>
+ <td class="texte">
+ adresse publique (apparaît sur ta fiche).
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>Brève explication :</td>
+ </tr>
+ <tr>
+ <td><textarea rows="5" cols="50" name="raison">{$r_raison}</textarea></td>
+ </tr>
+ <tr>
+ <td><input type="submit" name="submit" value="Envoyer" /></td>
+ </tr>
+ </table>
+ </form>
+ {if $actuel}
+ <form action="{$smarty.server.PHP_SELF}" method="post"
+ onsubmit="return confirm('Es-tu sûr de vouloir supprimer {$actuel} ?')">
+ <table class="bicol" cellpadding="4" summary="Suppression d'alias">
+ <tr>
+ <th>Suppression d'alias</th>
+ </tr>
+ <tr>
+ <td class="center">
+ <input type="hidden" name="suppr" value="{$actuel}" />
+ <input type="submit" value="Supprimer l'alias {$actuel}" />
+ </td>
+ </tr>
+ </table>
+ </form>
+ {/if}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Ton filtre anti-spam</h1>
+
+<h2>Qu'est-ce qu'un spam ? Comment m'en débarrasser ?</h2>
+<p>
+Un spam est un courrier électronique <strong>non sollicité</strong>. Ce peut-être un
+message de publicité, une proposition commerciale, etc... qui t'est envoyé
+par une personne que tu ne connais pas.<br />
+Notre logiciel antispam tente de déterminer, parmi les courriers électroniques
+que tu reçois, lesquels sont des spams, et lesquels n'en sont pas.
+Trois réglages sont possibles :
+</p>
+<ul>
+ <li>soit le logiciel est coupé et <strong>ne filtre pas du tout</strong> tes courriels,</li>
+ <li>soit les spams détectés portent la mention [spam probable] dans leur
+ objet, afin que tu puisses les <strong>identifier plus facilement</strong>,
+ </li>
+ <li>soit nous <strong>supprimons les courriels</strong> que tu reçois dont notre
+ logiciel pense que ce sont des spams.
+ </li>
+</ul>
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="tinybicol" summary="filtre anti-spam">
+ <tr>
+ <td>
+ <strong>Choisis ton propre réglage :</strong><br />
+ <input type='radio' name='statut_filtre' value='0' {if $filtre eq 0}checked="checked"{/if} onchange='this.form.submit()' />
+ (1) le filtre anti-spam est coupé<br />
+ <input type='radio' name='statut_filtre' value='1' {if $filtre eq 1}checked="checked"{/if} onchange='this.form.submit()' />
+ (2) le filtre anti-spam est activé, et marque les mails<br />
+ <input type='radio' name='statut_filtre' value='2' {if $filtre eq 2}checked="checked"{/if} onchange='this.form.submit()' />
+ (3) le filtre anti-spam est activé, et élimine les mails détectés comme spams<br />
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p>
+Evidement, <strong>le système n'étant pas infaillible, il est possible qu'un
+ message normal soit classé comme spam</strong>, auquel cas, si tu as choisi
+l'option (3), tu perdras un message que tu aurais sans doute souhaité
+recevoir.
+Aussi, <em>nous te conseillons, au moins dans un premier temps, d'utiliser
+ l'option (2)</em>, qui elle n'efface aucun message, et te donne juste une
+indication visuelle des messages qui semblent être des spams.
+<br />
+Si après quelques temps d'utilisation de l'option (2), tu en es satisfait,
+tu peux envisager d'opter pour l'option (3).
+</p>
+
+<h2>Que faire si jamais je me rends compte que le filtre s'est trompé ?</h2>
+<p>
+Pour que le logiciel fonctionne bien, il est préférable de lui indiquer,
+lorsqu'il s'est trompé, qu'il a fait une erreur ! Il est plutôt intelligent,
+et en tirera une leçon si on lui signale ses fautes, pour moins se tromper
+par la suite. L'aide de tous est donc la bienvenue.<br />
+Si un courriel qui est un spam n'est pas détecté comme tel, réexpédie-le
+à l'adresse <a href="mailto:spam@polytechnique.org">spam@polytechnique.org</a>
+<strong>sous forme de pièce jointe</strong>.<br />
+Inversement, si un message est considéré comme un spam alors que ce n'en est
+pas un, il faut le réexpédier à l'adresse
+<a href="mailto:nonspam@polytechnique.org">nonspam@polytechnique.org</a>
+<strong>sous forme de pièce jointe</strong>.
+Ainsi notre base de données de spams restera à jour, et, alors
+que les spammers enverront des spams de plus en plus durs à détecter,
+tous nos camarades bénéficieront d'un filtre anti-spam de meilleure qualité.
+</p>
+<h3 style="text-decoration: underline">Plus tu nous enverras tes spams, moins tu en recevras !!!</h3>
+
+<h2>Et techniquement, comment ça marche ?</h2>
+<p>
+Le filtre anti-spam tente de repérer les spams en fonction des mots
+qu'il contiennent, il extrait donc les mots d'un message et les comparer
+à deux ensembles de référence l'un contenant des spams, l'autre des
+messages normaux. Il calcule ainsi une probabilité qu'un message soit
+un spam et si cette probabilité est forte, ce courriel est considéré comme
+un spam.
+</p>
+<p>
+Le marquage est fait de deux manières :
+</p>
+<ul>
+ <li>la chaîne "[spam probable]" est ajoutée au début du sujet pour permettre une reconnaissance visuelle facile des spams,</li>
+ <li>un en-tête "X-Spam-Flag: YES" est ajouté au message pour permettre l'ajout d'un filtre dans ton lecteur de mail pour trier le spam dans une boîte indépendante, ce qui facilite la vérification que les spams marqués sont bien des spams.</li>
+</ul>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<script type="text/javascript">
+//<![CDATA[
+ applisType = new Array(
+{applis_type}
+);
+
+applisTypeAll = new Array(
+{applis_type_all}
+);
+{literal}
+function fillType( selectCtrl, appli, fill ) {
+var i;
+var i0=0;
+
+for (i = selectCtrl.options.length; i >=0; i--) {
+selectCtrl.options[i] = null;
+}
+
+if (fill || appli <0) {
+ selectCtrl.options[0] = new Option(' ');
+ i0=1;
+}
+if (appli>=0)
+ for (i=0; i < applisType[appli].length; i++)
+ selectCtrl.options[i0+i] = new Option(applisType[appli][i]);
+else if (fill)
+ for (i=0; i < applisTypeAll.length; i++)
+ selectCtrl.options[i0+i] = new Option(applisTypeAll[i]);
+}
+
+function selectType( selectCtrl, type ) {
+ for (i = 0; i < selectCtrl.options.length; i++) {
+ if (selectCtrl.options[i].text == type)
+ selectCtrl.selectedIndex=i;
+ }
+}
+{/literal}
+//]]>
+</script>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Options</h1>
+
+{if !$banana->profile.autoup}
+[<a href="?banana=updateall">Mettre à jour</a>]
+{/if}
+[<a href="profile.php">Profil</a>]
+
+<br />
+
+{$banana_res|smarty:nodefaults}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Configuration de Banana
+</h1>
+
+{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>
+<p class="normal">
+Retour aux <a href="{rel}/banana/">forums</a>
+</p>
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" cellpadding="3" cellspacing="0" summary="Configuration de Banana">
+ <tr>
+ <th colspan="2">
+ Profil Banana
+ </th>
+ </tr>
+ <tr class="pair">
+ <td class="bicoltitre">
+ Nom
+ </td>
+ <td>
+ <input type="text" name="banananame" value="{$nom}" />
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="bicoltitre">
+ Adresse électronique
+ </td>
+ <td>
+ <input type="text" name="bananamail" value="{$mail}" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="bicoltitre">
+ Signature
+ </td>
+ <td>
+ <textarea name="bananasig" cols="50" rows="4">{$sig}</textarea>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="bicoltitre">
+ 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="bicoltitre">
+ 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="impair">
+ <td class="bouton" colspan="2">
+ <input type="submit" name="action" value="OK" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{else}
+<p class="normal">
+ Ton profil est enregistré !!!
+</p>
+<p class="normal">
+Retour aux <a href="{rel}/banana/">forums</a>
+</p>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Carnet polytechnicien</h1>
+
+<table class="bicol">
+ <tr>
+ <th colspan="2">
+ Tes contacts
+ </th>
+ </tr>
+ <tr class="impair">
+ <td class='half'>
+ <h3>
+ <a href="{"carnet/mescontacts.php"|url}">Page de tes contacts</a>
+ </h3>
+ <div class="explication">
+ Tu peux ici lister tes contacts, en ajouter et en retirer.
+ </div>
+ </td>
+ <td class='half'>
+ <h3>
+ <a href="{"carnet/mescontacts.php?trombi=1"|url}">Le trombi de tes contacts</a>
+ </h3>
+ <div class="explication">
+ La même chose que la page de tes contacts... <strong>en images !</strong>
+ </div>
+ </td>
+ </tr>
+</table>
+
+<br />
+
+<table class="bicol">
+ <tr>
+ <th colspan="2">
+ Notifications
+ </th>
+ </tr>
+ <tr class="pair">
+ <td class='half'>
+ <h3>
+ <a href="{"carnet/panel.php"|url}">Tous les évenements de la semaine</a>
+ </h3>
+ <div class="explication">
+ Affichage de tous les évenements de camarades/promos
+ {if $smarty.session.core_rss_hash}
+ <a href='{rel}/carnet/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
+ {/if}
+ </div>
+ </td>
+ <td class='half'>
+ <h3>
+ <a href="{"carnet/notifs.php"|url}">Configurer tes notifications</a>
+ </h3>
+ <div class="explication">
+ Être notifié des inscriptions, décès, changement de fiche, ...
+ </div>
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>
+ Ma liste personnelle de contacts
+</h1>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post">
+<p>
+ Ajouter la personne suivante à ma liste de contacts (prenom.nom) :<br />
+ <input type="hidden" name="action" value="ajouter" />
+ <input type="text" name="user" size="20" maxlength="70" />
+ <input type="submit" value="Ajouter" />
+</p>
+</form>
+<p>
+ Tu peux également rajouter des camarades dans tes contacts lors d'une recherche dans l'annuaire :
+ il te suffit de cliquer sur l'icône <img src="{"images/ajouter.gif"|url}" alt="ajout contact" /> en face de son nom dans les résultats !
+</p>
+
+{if $trombi || $citer->total()}
+<p>
+Pour récupérer ta liste de contacts dans un PDF imprimable :<br />
+(attention, les photos font beaucoup grossir les fichiers !)
+</p>
+<ul>
+ <li>avec les photos :
+ [<a href="mescontacts_pdf.php/mes_contacts.pdf?order=promo&photo" class='popup'><strong>tri par promo</strong></a>]
+ [<a href="mescontacts_pdf.php/mes_contacts.pdf?photo" class='popup'><strong>tri par noms</strong></a>]
+ </li>
+ <li>sans les photos :
+ [<a href="mescontacts_pdf.php/mes_contacts.pdf?order=promo" class='popup'><strong>tri par promo</strong></a>]
+ [<a href="mescontacts_pdf.php/mes_contacts.pdf" class='popup'><strong>tri par noms</strong></a>]
+ </li>
+</ul>
+
+{if $trombi}
+
+<h1>
+ Mon trombino de contacts
+</h1>
+
+<p>
+Pour afficher la liste détaillée de tes contacts: [<a href="{$smarty.server.PHP_SELF}?order={$order}&inv={$inv}"><strong>vue classique</strong></a>]
+</p>
+
+{include file=carnet/tricontacts.tpl order=$order}
+
+{$trombi->show()|smarty:nodefaults}
+
+{else}
+
+<h1>
+ Vue classique des contacts
+</h1>
+
+<p>
+Pour afficher le trombi de tes contacts : [<a href="?trombi=1&order={$order}&inv={$inv}"><strong>vue sous forme de trombi</strong></a>]
+</p>
+
+{include file=carnet/tricontacts.tpl order=$order}
+
+<br />
+
+<div class="contact-list">
+{iterate from=$citer item=contact}
+{include file=include/minifiche.tpl c=$contact show_action="retirer"}
+{/iterate}
+</div>
+
+{/if}
+
+{else}
+<p>Actuellement ta liste de contacts est vide...</p>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1 id='top'>Notifications automatiques</h1>
+
+<p>Les mails sont hebdomadaires (pour éviter une trop grosse charge du serveur de mails et de ta boite mail).
+S'il n'y a rien à te signaler le mail ne t'est pas envoyé.</p>
+
+<form action="#top" method="post">
+ <fieldset>
+ <legend>Mail</legend>
+ <input type='checkbox' name='mail' onclick="this.form.submit();" {if $watch->watch_mail}checked="checked"{/if} />
+ Recevoir un mail hebdomadaire des évènements que je n'ai pas déjà vus sur le site<br />
+ <input type='hidden' name='flags_mail' value='valider' />
+ </fieldset>
+</form>
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <fieldset>
+ <legend>Événements à surveiller</legend>
+ {foreach from=$watch->cats() item=s key=i}
+ <input type='checkbox' name='sub[{$i}]' {if $watch->subs($i)}checked="checked"{/if} />
+ {$s.short} {if $s.type eq near}<sup>o</sup>{elseif $s.type eq often}<sup>*</sup>{/if}<br />
+ {/foreach}
+ <span class='smaller'><sup>*</sup>: ne concerne pas les promos (évènements très fréquents)</span><br />
+ <span class='smaller'><sup>o</sup>: ne concerne que les promos entre {$smarty.session.promo-1} et {$promo_sortie-2} que tu surveilles</span>
+ </fieldset>
+ <div class='center'>
+ <input type='submit' name='subs' value='valider' />
+ </div>
+</form>
+
+<h1 id='middle'>Qui/Que surveiller ?</h1>
+
+<h2>Surveiller ses contacts</h2>
+
+<form action="#middle" method="post">
+ <fieldset>
+ <legend>Contacts</legend>
+ <input type='checkbox' name='contacts' onclick="this.form.submit();" {if $watch->watch_contacts}checked="checked"{/if} /> Surveiller mes contacts<br />
+ <input type='hidden' name='flags_contacts' value='valider' />
+ </fieldset>
+</form>
+
+<br />
+
+<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).
+</p>
+
+<form action="{$smarty.server.PHP_SELF}" 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 />
+ <input type='text' name='promo' />
+ <input type='submit' name='add_promo' value='ajouter' />
+ <input type='submit' name='del_promo' value='retirer' />
+ <br />
+ {if $watch->promos()|@count eq 0}
+ <p>Tu ne surveilles actuellement aucune promo.</p>
+ {else}
+ <p>Tu surveilles les promos suivantes :</p>
+ <ul>
+ {foreach from=$watch->promos() item=p}
+ <li>{if $p.0 eq $p.1}{$p.0}{else}{$p.0} à {$p.1}{/if}</li>
+ {/foreach}
+ </ul>
+ {/if}
+ </fieldset>
+</form>
+
+<h2>Surveiller des non inscrits</h2>
+
+<p>
+Si un non-inscrit que tu surveilles s'inscrit, il sera automatiquement ajouté à tes contacts.
+</p>
+
+<p>
+Pour surveiller des membres non-inscrits, il faut passer par la <a href="{"search.php"|url}" class='popup'>recherche</a>
+et cliquer sur les icones <img src="{"images/ajouter.gif"|url}" alt="Ajouter" /> pour les ajouter à cette liste
+</p>
+
+<table class='tinybicol' cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {if $watch->nonins()|@count eq 0}
+ <p>Tu ne surveilles actuellement aucun non-inscrit.</p>
+ {elseif $watch->nonins()|@count}
+ <p>Tu surveilles {if $watch->nonins()|@count eq 1}le non-inscrit{else}les non-inscrits{/if} :</p>
+ <ul>
+ {foreach from=$watch->nonins() item=p}
+ <li>
+ {$p.prenom} {$p.nom} ({$p.promo}) <a href="?del_nonins={$p.user_id}"><img src="{"images/retirer.gif"|url}" alt="retirer" /></a>
+ </li>
+ {/foreach}
+ </ul>
+ {/if}
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Bilan des Notifications</h1>
+
+<p>
+Cette page récapitule tous les évènements que tu surveilles de la semaine écoulée
+</p>
+
+<p>
+Les lignes en gras sont les événements qui ont été porté à notre connaissance
+depuis ta dernière connexion sur cette page.<br />
+Tu peux les <a href="?read={$now}">marquer comme vus</a> sans te déconnecter.
+</p>
+
+<p>
+Tu peux choisir plus finement les données affichées sur cette page.
+Il faut pour celà se rendre sur la page de <a href='notifs.php'>configuration des notifications</a>.
+</p>
+
+<div class="right">
+{if $smarty.session.core_rss_hash}
+<a href='{rel}/carnet/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
+{/if}
+</div>
+
+{foreach from=$notifs->_data item=c key=cid}
+<h2>{if ($c|@count) > 1}
+{$notifs->_cats[$cid].mail} :
+{else}
+ {foreach from=$c item=promo}
+ {if ($promo|@count) > 1}
+ {$notifs->_cats[$cid].mail} :
+ {else}
+ {$notifs->_cats[$cid].mail_sg} :
+ {/if}
+ {/foreach}
+{/if}</h2>
+
+<br />
+
+<table class='tinybicol'>
+ {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>
+ {if $promo[row].inscrit}
+ <a href="{"fiche.php"|url}?user={$promo[row].bestalias}" class="popup2">
+ {$promo[row].prenom} {$promo[row].nom}
+ </a>
+ {if !$promo[row].contact}
+ <a href="{"carnet/mescontacts.php"|url}?action=ajouter&user={$promo[row].bestalias}">{*
+ *}<img src="{"images/ajouter.gif"|url}" alt="ajouter à mes contacts" />{*
+ *}</a>
+ {/if}
+ {else}
+ {$promo[row].prenom} {$promo[row].nom}
+ {/if}
+ </td>
+ <td style="width:25%">
+ {$promo[row].date|date_format}
+ </td>
+ </tr>
+ {/section}
+ {/foreach}
+</table>
+
+<br />
+{/foreach}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<?xml version="1.0"?>
+{***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************}
+<rss version="2.0">
+ <channel>
+ <title>Polytechnique.org :: Carnet</title>
+ <language>fr</language>
+ <link>{#globals.baseurl#}/carnet/panel.php</link>
+ <description>Ton carnet polytechnicien...</description>
+ <image>
+ <title>Polytechnique.org</title>
+ <url>{#globals.baseurl#}/images/logo.png</url>
+ <link>{#globals.baseurl#}/</link>
+ </image>
+ {foreach from=$notifs->_data item=c key=cid}
+ {foreach from=$c item=promo}
+ {foreach from=$promo item=x}
+ <item>
+ <title>
+ [{$notifs->_cats[$cid].short}] {$x.prenom} {$x.nom} ({$x.promo}) - le {$x.date|date_format|utf8_encode}
+ </title>
+ <link>{#globals.baseurl#}/fiche.php?user={$x.bestalias}</link>
+ <description><![CDATA[
+ {if !$x.contact}
+ <a href="{#globals.baseurl#}/carnet/mescontacts.php?action=ajouter&user={$x.bestalias}">
+ ajouter à mes contacts
+ </a>
+ {/if}
+ ]]></description>
+ <pubDate>{$x->known|rss_date}</pubDate>
+ </item>
+ {/foreach}
+ {/foreach}
+ {/foreach}
+ </channel>
+</rss>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<p>
+Trier par :
+{if ($order eq 'nom') and not($smarty.request.inv)}
+[<a href='?order=nom&trombi={$smarty.request.trombi}&inv=1'><strong>nom <img src='{rel}/images/dn.png' alt='decr.' /></strong></a>]
+{else}
+[<a href='?order=nom&trombi={$smarty.request.trombi}'>{if ($order eq 'nom')}<strong>nom <img src='{rel}/images/up.png' alt='crois.' /></strong>{else}nom{/if}</a>]
+{/if}
+{if ($order eq 'promo') and ($smarty.request.inv)}
+[<a href='?order=promo&trombi={$smarty.request.trombi}'><strong>promo <img src='{rel}/images/up.png' alt='decr.' /></strong></a>]
+{else}
+[<a href='?order=promo&trombi={$smarty.request.trombi}&inv=1'>{if ($order eq 'promo')}<strong>promo <img src='{rel}/images/dn.png' alt='crois.' /></strong>{else}promo{/if}</a>]
+{/if}
+{if ($order eq 'last') and ($smarty.request.inv)}
+[<a href='?order=last&trombi={$smarty.request.trombi}'><strong>dernière modification <img src='{rel}/images/up.png' alt='decr.' /></strong></a>]
+{else}
+[<a href='?order=last&trombi={$smarty.request.trombi}&inv=1'>{if ($order eq 'last')}<strong>dernière modification <img src='{rel}/images/dn.png'i alt='crois.' /></strong>{else}dernière modification{/if}</a>]
+{/if}
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Contrôle d'accès au site
+</h1>
+<p>
+ L'accès sans mot de passe au site vient d'être supprimé pour l'ordinateur sur lequel tu
+ es connecté en ce moment. Depuis ce poste de travail, tu devras donc entrer ton mot de
+ passe à nouveau pour te connecter sur le site comme sur un poste normal quelconque où
+ tout le monde peut accéder.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Contrôle d'accès au site
+</h1>
+<p>
+ L'accès permanent sans mot de passe <strong>vient d'être attribué</strong> à cet ordinateur.
+ Toute personne accédant au web par ce poste de travail peut donc consulter l'annuaire
+ on-line et accéder à la partie privée du site.
+</p>
+<p>
+ Nous te recommandons donc la plus grande prudence avec cette fonctionnalité si tu n'es
+ pas sûr de comprendre de quoi il s'agit. Il est notamment souhaitable de n'utiliser
+ cette
+ option que pour un ordinateur à la maison.
+</p>
+<p class="erreur">
+ En tout état de cause, si tu ne sais pas donner une définition simple du mot
+ "cookie", tu ne devrais pas utiliser cette option.
+</p>
+<p>
+ Si tu te dis que ceci n'est pas pour toi, alors
+ <a href="cookie_off.php">clique ici pour annuler</a>.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{foreach item=query from=$trace_data}
+<table class="bicol" style="width: 75%; font-family: monospace; font-size: smaller; margin-left:2px; margin-top: 3px;">
+ <tr class="impair">
+ <td>
+ <strong>QUERY:</strong><br />
+ {$query.query|nl2br}
+ <br />
+ </td>
+ </tr>
+ {if $query.error}
+ <tr>
+ <td>
+ <strong>ERROR:</strong><br />
+ {$query.error|nl2br}
+ </td>
+ </tr>
+ {/if}
+</table>
+{if $query.explain}
+<table class="bicol" style="width: 75%; font-family: monospace; font-size: smaller; margin-left: 2px; margin-bottom: 3px;">
+ <tr>
+ {foreach key=key item=item from=$query.explain[0]}
+ <th>{$key}</th>
+ {/foreach}
+ </tr>
+ {foreach item=explain_row from=$query.explain}
+ <tr class="impair">
+ {foreach item=item from=$explain_row}
+ <td class="center">{$item}</td>
+ {/foreach}
+ </tr>
+ {/foreach}
+</table>
+{/if}
+{/foreach}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Déconnexion {if $smarty.cookies.ORGaccess}partielle {/if}effectuée
+</h1>
+<p>
+<strong>Merci et à bientôt !</strong>
+</p>
+
+{if $smarty.cookies.ORGaccess}
+
+<p>
+Tu as demandé la connexion permanente donc cette deconnexion ne t'empêche pas d'utiliser la plupart
+des fonctionnalités de consultation du site.
+</p>
+<p>
+Tu peux donc aussi te <a href='?forget=1'>deconnecter complètement</a>.
+</p>
+<p>
+De plus, ton adresse e-mail est toujours en mémoire dans ton navigateur afin de faciliter ta
+prochaine connexion. Si tu utilises un ordinateur public ou que tu désires l'effacer, tu peux
+<a href='?forgetUid=1&forget=1'>supprimer cette information et te déconnecter complètement</a>.
+</p>
+
+{elseif $smarty.cookies.ORGuid}
+
+<p>
+Ton adresse e-mail est toujours en mémoire dans ton navigateur afin de faciliter ta prochaine
+connexion. Si tu utilises un ordinateur public ou que tu désires l'effacer, tu peux
+<a href='?forgetUid=1'>supprimer cette information</a>.
+</p>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<table cellpadding="0" cellspacing="0" summary="L'équipe" style="width: 100%">
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ L'équipe des services aux Polytechniciens
+ </td>
+ <td>
+ <strong>Jean-Sébastien Bedo</strong> (X2000) <br />
+ <strong>Damien Bobillot</strong> (X2002) <br />
+ <strong>Yann Chevalier</strong> (X2000) <br />
+ <strong>Jean-Marc Coïc</strong> (X2000) <br />
+ <strong>Olivier Guillaumin</strong> (X80) <br />
+ <strong>Eric Gruson</strong> (X2002) <br />
+ <strong>Pierre Habouzit</strong> (X2000) <br />
+ <strong>Alexandre Hô</strong> (X98) <br />
+ <strong>Jeremy Lainé</strong> (X99) <br />
+ <strong>Cyril Lathuilière</strong> (X2001) <br />
+ <strong>Loïc Le Loarer</strong> (X97) <br />
+ <strong>Raphaël Marichez</strong> (X2002) <br />
+ <strong>Alexandre Mege</strong> (X2002) <br />
+ <strong>Vincent Palatin</strong> (X2000) <br />
+ <strong>Jean-Michel Yolin</strong> (X65) <br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ L'équipe des services aux associations polytechniciennes
+ </td>
+ <td>
+ <strong>Jean-Sébastien Bedo</strong> (X2000) <br />
+ <strong>Matthieu Bergot</strong> (X89) <br />
+ <strong>Damien Bobillot</strong> (X2002) <br />
+ <strong>Sophie Charbonnier</strong> (X2000) <br />
+ <strong>Yann Chevalier</strong> (X2000) <br />
+ <strong>Jean-Marc Coïc</strong> (X2000) <br />
+ <strong>Olivier Guillaumin</strong> (X80) <br />
+ <strong>Eric Gruson</strong> (X2002) <br />
+ <strong>Pierre Habouzit</strong> (X2000) <br />
+ <strong>Olivier Herz</strong> (X79) <br />
+ <strong>Alexandre Hô</strong> (X98) <br />
+ <strong>Jeremy Lainé</strong> (X99) <br />
+ <strong>Cyril Lathuilière</strong> (X2001) <br />
+ <strong>Raphaël Marichez</strong> (X2002) <br />
+ <strong>Alexandre Mege</strong> (X2002) <br />
+ <strong>Vincent Palatin</strong> (X2000) <br />
+ <strong>Bertrand de Singly</strong> (X95) <br />
+ <strong>Cyril Tikhomiroff</strong> (X95) <br />
+ <strong>Quoc-Anh Tran</strong> (X62) <br />
+ <strong>Jean-Michel Yolin</strong> (X65) <br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ L'équipe des relations extérieures
+ </td>
+ <td>
+ <strong>Matthieu Bergot</strong> (X89) <br />
+ <strong>Damien Bobillot</strong> (X2002) <br />
+ <strong>Yann Buril</strong> (X96) <br />
+ <strong>Sophie Charbonnier</strong> (X2000) <br />
+ <strong>Yann Chevalier</strong> (X2000) <br />
+ <strong>Olivier Guillaumin</strong> (X80) <br />
+ <strong>Eric Gruson</strong> (X2002) <br />
+ <strong>Olivier Herz</strong> (X79) <br />
+ <strong>Alexandre Hô</strong> (X98) <br />
+ <strong>Jeremy Lainé</strong> (X99) <br />
+ <strong>Cyril Lathuilière</strong> (X2001) <br />
+ <strong>Raphaël Marichez</strong> (X2002) <br />
+ <strong>Alexandre Mege</strong> (X2002) <br />
+ <strong>Vincent Palatin</strong> (X2000) <br />
+ <strong>Bertrand de Singly</strong> (X95) <br />
+ <strong>Quoc-Anh Tran</strong> (X62) <br />
+ <strong>Jean-Michel Yolin</strong> (X65) <br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ Le conseil d'administration de l'assocation
+ </td>
+ <td>
+ <strong>Raphaël Marichez</strong> (X2002) <em>- président</em><br />
+ <strong>Olivier Guillaumin</strong> (X80) <em>- trésorier</em><br />
+ <strong>Cyril Lathuilière</strong> (X2001) <em>- secrétaire</em><br />
+ <strong>Yann Chevalier</strong> (X2000) <em>- en charge des relations extérieures</em><br />
+ <strong>Pierre Habouzit </strong> (X2000) <em>- responsable services individuels</em><br />
+ <strong>Sophie Charbonnier</strong> (X2000) <em>- responsable services aux associations X</em><br />
+ <strong>Jean-Marc Coïc</strong> (X2000) <em>- responsable du projet Manageurs</em><br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ Fondateurs<br /><br />
+ </td>
+ <td>
+ <strong>Yann Buril</strong> (X96) <br />
+ <strong>Norbert Lataille</strong> (X97) <br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ Idée originale <br /><br />
+ </td>
+ <td>
+ <strong>Jean-Michel Yolin</strong> (X65) <br />
+ <strong>Joan Moreau</strong> (X94) <br />
+ <strong>Bertrand de Singly</strong> (X95) <br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ Remerciements<br /><br />
+ </td>
+ <td>
+ <strong>Jean Novacq</strong> (X67, Directeur Général de l'École polytechnique de 1997 à 2000)<br />
+ <strong>Gérard Guillerm</strong> (responsable technique de la DSI de l'École polytechnique)<br /><br />
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 33%; padding-right:1em;">
+ Anciens<br />responsables<br /><br />
+ </td>
+ <td>
+ <strong>Maxime Austruy</strong> (X98) <br />
+ <strong>Yann Buril</strong> (X96) <br />
+ <strong>David Bachelart</strong> (X99) <br />
+ <strong>Norbert Lataille</strong> (X97) <br />
+ <strong>Grégory Massal</strong> (X96) <br />
+ <strong>Joan Moreau</strong> (X94) <br />
+ <strong>Bertrand de Singly</strong> (X95) <br /><br />
+ </td>
+ </tr>
+</table>
+<div class="center">
+ <table summary="l'équipe" style="width:550px">
+ <tr>
+ <td>
+ <a href="../images/equipe.jpg">
+ <img src="../images/equipe.jpg" alt=" [ L'EQUIPE ] " />
+ </a>
+ <p>
+ Sur cette photo un peu sombre, on peut reconnaître une partie de
+ l'équipe. De gauche à droite :<br />
+ Matthieu, Sophie, Loïc, Jean-Marc, Yann C, Cyril, Yann B, Eric,
+ Julien T, Jean-Michel, Thomas-Xavier, et Olivier G.
+ </p>
+ </td>
+ </tr>
+ </table>
+</div>
+<div class="center">
+ <a href="http://x-org.polytechnique.org/">
+ <img src="../images/logo.jpg" alt=" [ LOGO POLYTECHNIQUE.ORG ] " />
+ </a>
+ <img src="../images/logoBR.jpg" alt=" [ LOGO BR ] " />
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Conditions générales d'utilisation</h1>
+<p>
+L'utilisation des services de Polytechnique.org est soumise à certaines règles qui sont
+rappelées ici :
+</p>
+
+<h2>1 - MOT DE PASSE :</h2>
+<p>
+Intransmissible et secret, tu es responsable de ton mot de passe et de son secret.
+</p>
+<h2>2 - TRANSMISSION D'INFORMATIONS :</h2>
+<p>
+Tu ne dois pas reprendre d'informations contenues dans le site, et les transmettre
+à qui que ce soit, s'il y a un risque de nuisance pour un X ou plusieurs enregistré
+sur Polytechnique.org ou pour l'image de l'école.
+</p>
+<h2>3 - SPAM :</h2>
+<p>
+Tu n'es pas autorisé à écrire de mail collectif, sauf par l'intermédiaire des
+"mailing-lists". Tu autorises Polytechnique.org à filtrer tous les mails de plus
+de N destinataires polytechniciens où N est fixé par décision des administrateurs
+techniques du site et doit en tout état de cause être supérieur à 20.
+</p>
+<h2>4 - REROUTAGE :</h2>
+<p>
+Tu t'assures que tu as le droit d'utiliser ton adresse e-mail pour un reroutage
+(en particulier e-mail professionnel).
+</p>
+<h2>5 - LEGALITE :</h2>
+<p>
+La liberté d'expression est limitée en France par certaines lois que tu dois respecter.
+</p>
+<h2>6 - ETHIQUE :</h2>
+<p>
+Tu t'engages à ne pas utiliser les outils de communication mis en place par le site
+pour des actions de calomnie ou de diffamation ou de publicité. D'autre part, l'e-mail
+fourni par le site est associé à l'image de l'X. Tu dois donc être attentif à ne pas
+porter atteinte à l'image de l'Ecole polytechnique lorsque tu utilises son nom par
+l'intermédiaire de l'adresse e-mail à vie fournie par le site.
+</p>
+<h2>7- RUPTURE :</h2>
+<p>
+Polytechnique.org se réserve le droit de refuser le service à toute personne ne
+respectant pas l'une des conditions générales, notamment, mais pas seulement, en cas
+d'atteinte à l'image de l'école ou de nuisance avérée à l'égard d'un ou plusieurs
+polytechniciens utilisateurs des services de l'association Polytechnique.org.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if !$smarty.request.topic}
+<h1>
+ Contacts
+</h1>
+
+<table class="bicol" cellspacing="0" cellpadding="4">
+ <tr>
+ <th>
+ Merci de choisir une rubrique parmi les suivantes.
+ </th>
+ </tr>
+ <tr class="impair">
+ <td>
+ <a href="contacts.php?topic=1">1) Je n'arrive pas à m'inscrire sur le site</a>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td style="border-bottom: 1px solid inherit">
+ <a href="contacts.php?topic=2">2) J'ai perdu mon mot de passe</a>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td>
+ <a href="contacts.php?topic=3">3) Ca ne marche pas, je ne comprends pas !</a>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td style="border-bottom: 1px solid inherit">
+ <a href="contacts.php?topic=4">4) J'ai une amélioration/correction à proposer</a>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td>
+ <a href="contacts.php?topic=5">5) Je voudrais ajouter un article dans la newsletter</a>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td>
+ <a href="contacts.php?topic=6">6) Je voudrais vous contacter</a>
+ </td>
+ </tr>
+</table>
+<p>
+Nous vous remercions de bien choisir la rubrique qui est la plus adaptée à votre besoin.
+Cela nous permettra d'être les plus efficaces possible et de traiter votre demande au plus vite.
+</p>
+
+{elseif $smarty.request.topic eq 1}
+<h1>
+ Je n'arrive pas à m'inscrire sur le site
+</h1>
+<p>
+L'inscription se déroule en <a href="{rel}/register/">une étape sur notre site web</a>,
+suivie d'une étape de confirmation basée sur l'e-mail que tu as donné.
+</p>
+<p>
+<strong>En cas de problème pour vous enregistrer:</strong>
+</p>
+<ul>
+ <li class="item"> <strong>Problème d'identification:</strong> écrivez-nous en précisant bien vos prénom,
+ nom, nom de mariage, promo, date de naissance, matricule (pour les X des promos plus récentes que 1995 seulement), etc...
+ </li>
+ <li class="item"><strong>Problème avec le site:</strong>
+ téléchargez la dernière version de votre navigateur et réessayez avant de nous écrire.
+ </li>
+ <li class="item"><strong>Vous ne recevez rien par e-mail:</strong> réessayez avec un autre email, celui
+ que vous utilisiez était peut-être en panne ou mal orthographié.
+ </li>
+</ul>
+Pour toute question ou problème relatif à l'inscription, merci
+d'utiliser uniquement l'adresse
+{mailto address='register@polytechnique.org' encode='hex'}
+
+{elseif $smarty.request.topic eq 2}
+<h1>
+ J'ai perdu mon mot de passe
+</h1>
+<p>
+Il y a deux façons de faire.
+</p>
+<p>
+La première méthode est automatique, sécurisée et vous prendra environ 5 minutes.
+Il faut que vous accèdiez encore à vos emails en polytechnique.org
+pour récupérer vos paramètres par cette méthode.
+</p>
+<a href="{"recovery.php"|url}"><strong>Cliquez ici pour retrouver un mot de passe.</strong></a>
+<p>
+La seconde méthode est entièrement manuelle. Pour cette raison, assurez-vous de nous fournir
+toutes les informations dont nous disposons sur vous dans votre dernière fiche. En particulier :
+login, promo, date de naissance, matricule, adresse/téléphone mobile. Les mots de passe sont
+réinitialisés environ toutes les deux semaines si vous avez été correctement identifié. Ainsi, <strong>merci
+ d'attendre au minimum deux semaines</strong> dans le cas où vous ne receviez pas de réponse à votre première
+demande avant de nous réécrire.
+</p>
+<p>
+L'adresse à utiliser est uniquement <strong>{mailto address='resetpass@polytechnique.org' encode='hex'}</strong>.
+</p>
+
+{elseif $smarty.request.topic eq 3}
+<h1>
+ Ca ne marche pas, je ne comprends pas !
+</h1>
+<p>
+Deux solutions, ou bien c'est un bug du site, ce qui est rare mais peut
+encore arriver. Ou bien un problème de configuration sur votre ordinateur/réseau
+vous empêche d'utiliser correctement le site. Avant de nous écrire,
+mettez à jour votre navigateur et consultez également <a href="faq.php">notre FAQ</a>. Les réponses sur les
+problèmes de connexion y sont toutes traitées.
+</p>
+<p>
+En cas de problème persistant, vous pouvez nous écrire à l'adresse
+<strong>{mailto address='support@polytechnique.org' encode='hex'}</strong>
+</p>
+
+{elseif $smarty.request.topic eq 4}
+<h1>
+ J'ai une amélioration/correction à proposer
+</h1>
+<p>
+Pour toute suggestion concernant la liste des binets, des groupes x, des pays, des formations
+complémentaires, écrivez-nous à l'adresse <strong>{mailto address='support@polytechnique.org' encode='hex'}</strong> :
+nous essayerons de les rajouter au plus vite.
+</p>
+<p>
+Pour les suggestions de fond, nous lisons les emails avec le plus grand
+intérêt, mais réservons les changements à des versions ultérieures
+du site (c'est à dire qu'il faut attendre quelques semaines avant que
+l'innovation proposée, si elle est retenue, apparaisse sur le site).
+</p>
+<p>
+Merci de nous aider à améliorer la qualité du site Polytechnique.org. Ecrivez à
+<strong>{mailto address='support@polytechnique.org' encode='hex'}</strong>
+ou postez un message sur le forum
+<a href="../banana/thread.php?group=xorg.m4x.support">xorg.m4x.support</a>
+pour toute idée de développement ou d'amélioration du site.
+</p>
+
+{elseif $smarty.request.topic eq 5}
+<h1>
+ Je voudrais ajouter un article dans la newsletter
+</h1>
+<p>
+Par soucis de légèreté, nous devons imposer quelques contraintes sur les annonces de
+la newsletter : le texte du message doit faire au plus <strong>8 lignes de 68 caractères</strong>
+(le titre et les éventuels numéros de téléphones / sites web / adresses emails sont en
+sus).
+</p>
+<p>
+Un formulaire en ligne vous permet de nous soumettre un article, et se chargera de vérifier
+ces contraintes pour vous : <a href='{"newsletter/submit.php"|url}'>soumission d'article</a>.
+</p>
+<p>
+Sinon, une fois que votre article est prêt et qu'il ne dépasse pas la taille indiquée,
+vous pouvez aussi nous le soumettre par email (éviter les pièces jointes) à cette adresse :
+<strong>{mailto address='info_nlp@polytechnique.org' encode='hex'}</strong>.
+</p>
+<p>
+Les anciennes newsletters de <strong>Polytechnique.org</strong> sont
+<strong><a href="{"newsletter/"|url}">archivées</a></strong> si vous voulez vous en inspirer.
+</p>
+
+{elseif $smarty.request.topic eq 6}
+<h1>
+ Je voudrais vous contacter
+</h1>
+<p>
+Polytechnique.org ne s'occupe que de l'Internet. Pour l'annuaire des
+Polytechniciens sur papier et d'une manière générale le support papier, merci
+de contacter l'Amicale des X à l'adresse <strong>{mailto address='info@amicale.polytechnique.org' encode='hex'}</strong>.
+</p>
+<p>
+Pour toute demande qui concerne le recrutement de polytechniciens, vous pouvez consulter
+<a href="http://www.manageurs.com/?langue=fr"><strong>le site Manageurs.com, dédié aux problématique d'emploi et de gestion de carrière.</strong></a>
+</p>
+<p>
+Pour toute question n'ayant aucun rapport avec l'utilisation du site, vous pouvez nous contacter à
+l'adresse <strong>{mailto address='contact@polytechnique.org' encode='hex'}</strong>.
+</p>
+
+{/if}
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Le rapprochement de l'AX et de Polytechnique.org
+</h1>
+<p>
+ Polytechnique.org est une association loi de 1901 créée en mai 2000. Son
+objet est la promotion et la dynamisation des liens communautaires
+polytechniciens grâce à Internet. L'association est en charge de la création,
+du développement et de l'administration des services proposés par les sites
+web <a href="https://www.polytechnique.org/">Polytechnique.org</a> et
+<a href="http://www.polytechnique.net/">Polytechnique.net</a>.
+Polytechnique.org propose notamment un annuaire en ligne, intégrant une fiche
+détaillée sur tous les polytechniciens, que ceux-ci peuvent mettre à jour
+directement sur
+<a href="https://www.polytechnique.org/profil.php">le site</a>.
+</p>
+<p>
+ Polytechnique.org se distingue de la Société amicale des anciens élèves de
+l'Ecole Polytechnique (AX) dont les objectifs principaux figurent dans
+l'article premier de ses statuts. L'AX a ainsi pour but :
+</p>
+ <ul>
+ <li>d'établir un lien de solidarité et d'amitié entre tous les anciens élèves,</li>
+ <li>de venir en aide aux élèves et aux anciens élèves et leurs familles en situation de précarité matérielle ou morale,</li>
+ <li>de représenter la collectivité des anciens élèves de l'Ecole polytechnique,</li>
+ <li>de tout mettre en oeuvre pour que l'Ecole polytechnique reste en tête du haut enseignement scientifique et pour maintenir la renommée de la formation qu'elle dispense.</li>
+ </ul>
+ Les activités de l'AX comprennent notamment la publication de l'annuaire
+ papier, spécifique à l'AX, l'édition de la revue <em>La Jaune et la Rouge</em>
+ et le fonctionnement de la Caisse de Secours. L'AX dispose également d'un
+ <a href="http://www.polytechniciens.com/">site web</a>, distinct des deux précédents.
+<p>
+ Les deux associations ont décidé conjointement d'un rapprochement,
+concrétisé par la mise en place, l'animation et le développement du réseau
+baptisé RETIX. Cette coopération fait l'objet d'une
+<a href="http://x-org.polytechnique.org/convention-ax/">convention</a>
+entre l'AX et Polytechnique.org, signée en janvier 2004.
+</p>
+<p>
+ RETIX poursuit un double objectif : la promotion des X à l'international,
+et la mise à disposition d'outils de communication pour tous nos camarades.
+</p>
+<p>
+ RETIX se veut ainsi l'emblème des X sur le web, en France et à
+l'international. Dans un souci d'unification et d'identification de la
+communauté polytechnicienne, RETIX regroupe les sites web de l'AX, de
+Polytechnique.org, et tous les sites web animés par et pour des communautés
+polytechniciennes.
+</p>
+<p>
+ Le développement de la communication nécessite parallèlement des services
+devenus aujourd'hui indispensables : routages de courriels à partir
+d'adresses "à vie", filtrage "anti-Spam", mailing-lists, forums... Qui sont
+assurés par l'équipe de Polytechnique.org.
+</p>
+<p>
+ La mise en oeuvre de RETIX s'accompagne d'évolutions techniques comme la
+synchronisation des deux annuaires, déjà amorcée par Polytechnique.org. Ainsi,
+l'icône "transmettre mes coordonnées à l'AX", présente sur les fiches
+individuelles, autorise Polytechnique.org à donner les informations
+personnelles concernées, à l'AX, qui les répercute sur son annuaire papier.
+</p>
+<p>
+ Plus généralement, des passerelles entre les différents sites web ont été
+créées, via les portails
+<a href="https://www.polytechnique.org/">Polytechnique.org</a> et
+<a href="http://www.polytechnique.net/">Polytechnique.net</a>, et par
+l'intermédiaire du bandeau fédérateur présent sur la plupart des sites web
+polytechniciens (sites sus référencés,
+<a href="http://www.polytechnique.edu/">Polytechnique.edu</a>, groupes X, etc.).
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Redirection de page WEB</h1>
+
+<h2>Pourquoi une redirection de page WEB ?</h2>
+
+<p>
+ Dans la lignée du service de redirection d'emails de <strong>Polytechnique.org</strong>,
+ il est possible de faire pointer
+{if $smarty.session.alias}
+ l'adresse <strong>http://www.carva.org/{$smarty.session.forlife}</strong>
+{else}
+ les adresses <strong>http://www.carva.org/{$smarty.session.forlife}</strong>
+ et <strong>http://www.carva.org/{$smarty.session.alias}</strong> ";
+{/if}
+ vers la page WEB de ton choix.
+</p>
+<p>
+ La redirection fournie par <strong>carva.org</strong> t'offre ainsi une adresse Internet
+ simple et immuable pour référencer ton site personnel, quelle que soit la solution
+ d'hébergement retenue (free.fr, wanadoo.fr, ifrance.com, etc.).
+</p>
+<h2>Pourquoi le nom de domaine carva.org ?</h2>
+<p>
+ Dans le jargon de l'école, un 'carva' signifiait un 'X' lorsque celle-ci était
+ située sur la montagne Ste Geneviève (<a href="{"docs/index.php#carva"|url}" class="popup_800x480">
+ voir la FAQ à ce sujet</a>).
+</p>
+<br />
+
+<h1>
+ <a id="charte"></a>Conditions d'usage de la redirection de page WEB
+</h1>
+<p>
+ L'utilisateur s'engage à ce que le contenu du site référencé soit en conformité
+ avec les lois et règlements en vigueur et d'une manière générale ne porte pas
+ atteinte aux droits des tiers.
+</p>
+<hr />
+<p>
+ Notamment, mais non exclusivement, l'utilisateur s'engage à ce que le contenu
+ du site référencé :
+</p>
+<ul>
+ <li>
+ ne porte pas atteinte ou ne soit pas contraire à l'ordre public ou aux bonnes
+ mœurs ou ne puisse pas heurter la sensibilité des mineurs ;
+ </li>
+ <li>
+ ne porte pas atteinte de quelque manière que ce soit aux droits, à la
+ réputation, à la vie privée de tiers ;
+ </li>
+ <li>
+ ne contienne pas de propos ou d'images dénigrantes, diffamatoires ou portant
+ atteinte à l'image ou à la réputation d'une marque ou d'une quelconque personne
+ physique ou morale de quelque que manière que ce soit ;
+ </li>
+ <li>
+ ne présente pas de caractère pornographique ou pédophile ;
+ </li>
+ <li>
+ ne propose pas la vente, le don ou l'échange de biens volés ou issus d'un
+ détournement, d'une escroquerie, d'un abus de confiance ou de tout autre
+ infraction pénale ;
+ </li>
+ <li>
+ ne propose pas la vente, le don ou l'échange de biens pouvant présenter de
+ vices et de défauts de fabrication de nature à causer un danger pour les
+ personnes et les biens ;
+ </li>
+ <li>
+ ne porte pas atteinte aux droits de propriété intellectuelle protégés par la loi ;
+ </li>
+ <li>
+ n'incite pas à la haine, à la violence, au suicide, au racisme, à l'antisémitisme,
+ à la xénophobie, ne fasse pas l'apologie des crimes de guerre ou des crimes contre
+ l'humanité ;
+ </li>
+ <li>
+ n'incite pas à la discrimination d'une personne ou d'une groupe de personne en
+ raison de son appartenance à une ethnie ou à une religion ;
+ </li>
+ <li>
+ ne porte pas atteinte à la sécurité ou à l'intégrité d'un Etat ou d'un territoire,
+ quel qu'il soit ;
+ </li>
+ <li>
+ n'incite pas à commettre un crime, un délit ou un acte de terrorisme ;
+ </li>
+ <li>
+ ne permette pas à des tiers de se procurer des logiciels piratés ou des numéros
+ de série de logiciels, ou tout logiciel pouvant nuire ou porter atteinte, de
+ quelque manière que ce soit, aux droits ou aux biens des tiers.
+ </li>
+</ul>
+<p>
+ Cette liste doit être considérée comme non limitative.
+</p>
+<p>
+ Polytechnique.org ne peut être considéré comme responsable du contenu des pages
+ WEB redirigées.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Mes Redirections d'adresses emails</h1>
+<h2>En quoi ça consiste, comment ça marche ?</h2>
+<p>
+ Polytechnique.org te fournit un service de redirection de tes mails à vie. Toute ta vie, tu auras
+ l'adresse <strong>{$smarty.session.forlife}@polytechnique.org</strong>
+ à ta disposition. Cependant, il s'agit d'une redirection, il faut donc que tu aies une boite au
+ lettres fonctionnelles pour recevoir ton courrier (il en existe des
+ <a href="{"docs/doc_gratuits.php"|url}">gratuites</a>).
+</p>
+<p>
+ Ainsi, durant toute ta vie, et malgré d'eventuels nombreux changements d'adresses réelles, tous
+ tes correspondants pourront toujours te contacter sur
+ <strong>{$smarty.session.forlife}@polytechnique.org</strong> et
+ <strong>{$smarty.session.forlife}@m4x.org</strong>.
+</p>
+<p>
+ L'utilisation de ce service est très simple. Sur <a href="{"emails.php"|url}">cette
+ page</a>, tu trouveras un formulaire pour ajouter de nouvelles adresses de redirection. Tous
+ les courries envoyés sur tes adresses @polytechnique.org et @m4x.org seront redirigés vers
+ <strong>toutes</strong> les boites de redirection que tu auras spécifiées <strong>et</strong>
+ activées.
+</p>
+
+<br />
+
+<h2>
+ <a href="{"docs/doc_from.php"|url}">Utiliser mon adresse @polytechnique.org dans FROM:</a> (150 Ko)
+</h2>
+<p>
+ Ce lien t'explique comment configurer facilement plusieurs comptes e-mail dans Outlook Express.
+ Quel intérêt? Tu peux écrire des e-mails en choisissant l'identité de toi qui envoie le mail. Tu
+ peux ainsi envoyer des mails en tant que "prenom.nom@polytechnique.org", ou "prenom.nom@m4x.org"
+ ou encore ton e-mail professionnel, ou encore ton e-mail personnel. Ceci te permet de contrôler
+ aussi où les gens te répondront.
+</p>
+<p>
+ Et choisir ton identité peut être intéressant, on n'a pas toujours envie de montrer qui on est
+ par son adresse e-mail.
+</p>
+<br />
+
+<h2>Se protéger du courrier non solicité (SPAM)</h2>
+<p>
+ Beaucoup d'entre vous se plaignent de recevoir du courrier non solicité, communément appelé
+ SPAM. Très souvent, celà vient d'un manque de prudence. En effet, il faut bien faire attention
+ de ne pas laisser son adresse mails trop facilement compréhensible par des robots.
+</p>
+<p>
+ Il existe plusieurs manières de se prémunir de l'indexation de ton adresse mail par des robots :
+</p>
+<ul>
+ <li>Utiliser son adresse <strong>@m4x.org</strong> plutot que @polytechnique.org, elle est plus discrète
+ </li>
+ <li>rendre son adresse mail invalide : par exemple, sur les forums Usenet, il n'est pas rare de
+ rencontrer des adresses mails du type <j.dupont@_NOSPAM_wanadoo.fr>. Tous les humains
+ sauront enlever le <em>_NOSPAM_</em> qui a été ajouté, mais les robots non.
+ </li>
+ <li>Il est aussi possible d'utiliser des services comme ceux de
+ <a href="http://marreduspam.com/">http://marreduspam.com/</a> qui reste de loin le moyen le plus
+ sur de camoufler son adresse aux robots trop curieux
+ </li>
+</ul>
+<br />
+
+<h2>Une infinité d'alias e-mails en polytechnique.org et m4x.org</h2>
+<p>
+ Lorsque tu écris à <strong>destinataire+truc@polytechnique.org</strong> ou
+ <strong>destinataire_truc@polytechnique.org</strong> tout ce qui se trouve derrière le + ou le _
+ est ignoré.
+</p>
+<p>
+ Autrement dit, c'est comme écrire à <strong>destinataire@polytechnique.org</strong>.
+ Tu peux te servir de cette infinité d'alias pour un tas d'usages différents. Citons-en deux.
+</p>
+<ul>
+ <li>
+ Sur le web, tu t'exposes à recevoir des spams en communiquant ton adresse. Mais si tu fournis à
+ Amazon une adresse prenom.nom+amazon@m4x.org, lorsque tu recevras un mail (spam) sur l'adresse
+ prenom.nom+amazon@ tu pourras savoir d'où vient la fuite... Et même éventuellement bloquer
+ spécifiquement l'adresse prenom.nom+amazon et pas l'adresse prenom.nom.<br />
+ Tu peux utiliser cette technique conjointement à celles citées ci-dessus.
+ </li>
+ <li>
+ En combinant cette fonction avec les comptes ci-dessus, tu peux même te créer des comptes
+ d'envoi de mail du style prenom.nom+chose@. Si tu fais un mail où tu attends de nombreuses
+ réponses, tu peux par exemple l'écrire depuis prenom.nom+sondage et filtrer les réponses en
+ fonction de l'adresse de utilisée.
+ </li>
+</ul>
+<p><em>
+ <strong>NB:</strong> Le _ a été ajouté car certains sites web refusent le + dans une adresse
+ email, qui est pourtant parfaitement valide d'après les RFCs...
+</em></p>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Règles générales d'utilisation des forums de Polytechnique.org
+</h1>
+<p>
+ Afin de permettre à tous une utilisation confortable des forums de
+ Polytechnique.org, il est nécéssaire de respecter quelques règles.
+</p>
+<p>
+ Bien que nous n'ayons pas vocation à avoir un rayonnement aussi large que
+ Usenet, l'ensemble des règles relatives à Usenet (la netiquette), consultables
+ <a href="http://www.usenet-fr.net/fr-chartes/rfc1855.html">
+ sur la page de usenet france</a>, sont applicables sur les forums de
+ Polytechnique.org.
+</p>
+<h2>Principes moraux et éthiques</h2>
+<ul>
+ <li>
+ Le <strong>respect</strong> mutuel doit être la base de toute communication
+ sur les forums, les propos injurieux ou dégradants n'y ont pas leur place.
+ Toute intervention illégale par son contenu pourra faire l'objet d'une
+ annulation, et l'accès de l'auteur aux forums de Polytechnique.org pourra
+ être supprimé en cas d'abus.
+ </li>
+ <li>
+ Il n'est pas possible d'écrire anonymement sur les forums, et les
+ utilisateurs sont tenus pour responsables des propos émis avec
+ leur login et leur mot de passe.
+ </li>
+ <li>
+ L'ensemble des informations publiées sur Polytechnique.org n'a pas
+ vocation à sortir du cadre des forums de Polytechnique.org. La
+ diffusion de tout ou partie des messages des forums de
+ Polytechnique.org pourra entraîner une interdiction d'accès à
+ certains services de Polytechnique.org.
+ </li>
+ <li>
+ L'équipe technique de Polytechnique.org se réserve le droit
+ d'annuler les messages en cas de non-respect des règles.
+ </li>
+</ul>
+<h2>Principes techniques</h2>
+<p>
+ Afin de permettre à tous de consulter les forums avec un certain
+ confort, certaines règles doivent être respectées.
+</p>
+<ul>
+ <li>
+ Lorsqu'un message intéresse plusieurs forums, il faut réaliser un
+ <strong>crosspost</strong>, c'est à dire qu'il faut indiquer à ton logiciel
+ de messagerie qu'il doit diffuser ce message à plusieurs forums en
+ même temps. Tu devras alors spécifier un forum de suivi (<strong>Followup-To</strong>)
+ qui canalisera toutes les discussions qui suivront. Si tu ne le fais
+ pas, les lecteurs devront lire plusieurs fois le même message, et
+ plusieurs discussions parallèles se créeront, ce qui nuit à la
+ lisibilité des forums.
+ <p>
+ Si tu ne respectes pas ce principe, le serveur peut refuser ton
+ message avec les erreurs suivantes : <br />
+ <strong>Le forum de suivi doit être destinataire</strong> : tu as indiqué
+ un forum de suivi, mais tu n'y écris pas. Il peut être difficile
+ pour les lecteurs de comprendre à quoi correspondraient les
+ réponses à ton message.<br />
+ <strong>Un seul forum peut accueillir le suivi des discussions</strong> :
+ il est vraiment pénible de voir les même messages sur plusieurs
+ forums, et cela prend de la place inutilement sur nos serveurs.
+ Par conséquent, nous n'autorisons qu'un seul forum pour le suivi
+ des discussions.<br />
+ <strong>Un forum de suivi de discussion pertinent doit être mentionné
+ dans les en-têtes</strong> : tu n'as pas indiqué de forum de suivi.
+ <br />
+ <strong>Tu as déjà diffusé ce message sur le serveur</strong> : Tu as déjà
+ diffusé ce message, tu ne peux donc en diffuser un identique sur
+ un autre forum.
+ </p>
+ </li>
+ <li>
+ La diffusion d'un même message sur plus de dix forums en même
+ temps est interdite
+ <p>
+ Si tu ne respectes pas ce principe, le serveur peut refuser ton
+ message avec l'erreur suivante : <br />
+ <strong>Il n'est pas possible de poster sur plus de 10 forums en même
+ temps</strong>
+ </p>
+ </li>
+ <li>
+ Afin de ne pas augmenter les temps de téléchargement des
+ utilisateurs aux connexions lentes, les messages doivent
+ absolument être en <strong>texte brut</strong> (text/plain). Cela signifie
+ également que les pièces jointes sont interdites sur les forums.
+ Si tu dois diffuser un document, place-le sur un endroit
+ accessible sur internet (internet regorge d'hébergeurs gratuits),
+ et indique juste dans ton message un lien vers ton document.
+ <p>
+ Si tu ne respectes pas ce principe, le serveur peut refuser ton
+ message avec l'erreur suivante : <br />
+ <strong>Seuls les messages en text/plain sont acceptés sur la
+ hiérarchie xorg.*</strong>
+ </p>
+ </li>
+</ul>
+<h1>
+ Contact
+</h1>
+<p>
+ Si tu as des difficultés avec les forums, n'hésite pas à envoyer un mail à
+ {mailto address='forums@polytechnique.org' text='l\\\'équipe Polytechnique.org' encode="javascript"}
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<div class="texte">
+ <h1>
+ Polytechnique.org comme e-mail dans le champ FROM
+ </h1>
+ <p>
+ Comme pour toute aide à la configuration, la première étape
+ consiste souvent à mettre à jour ses logiciels installés.
+ En effet, la page suivante a été écrite pour la version
+ 5.5 d'Outlook Express qui est la dernière version actuellement
+ disponible, elle marche correctement et nous recommandons la mise à
+ jour pour tout type de configuration d'ordinateur.
+ </p>
+ <p>
+ <a href="http://windowsupdate.microsoft.com/">Clique ici pour faire la mise à
+ jour à partir du site de Microsoft.</a>
+ </p>
+ <p>
+ La page suivante te propose de configurer différents comptes de
+ messagerie sur un même ordinateur, afin de pouvoir choisir ton adresse
+ d'envoi à chaque e-mail envoyé (polytechnique.org, m4x.org,
+ ton entreprise, ton fournisseur d'accès, etc).
+ </p>
+ <hr />
+ <table summary="Premiere étape" cellpadding="5">
+ <tr>
+ <td>
+ <p>
+ Dans le menu principal d'Outlook Express, choisis le sous-menu
+ <strong>"Comptes"</strong>.
+ </p>
+ <p>
+ La fenêtre qui s'affiche à l'écran suivant montre la liste des
+ comptes actuellement paramétrés.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <table summary="Deuxième étape" cellpadding="5">
+ <tr>
+ <td>
+ <p>
+ Un compte est désigné par un nom, ici c'est <em>adupont@mail.com</em>
+ qui désigne le compte utilisé dans l'exemple. Le plus souvent,
+ la différence entre deux comptes est l'adresse e-mail d'envoi uniquement,
+ mais parfois, les comptes se différencient aussi par les serveurs
+ utilisés pour recevoir ou envoyer un e-mail.
+ </p>
+ <p>
+ Nous allons créer un nouveau compte pour utiliser polytechnique.org
+ comme adresse d'envoi. Clique sur <strong>"Ajouter"</strong>, puis
+ <strong>"Courrier..."</strong>.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from2.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <table summary="Troisieme étape" cellpadding="5">
+ <tr>
+ <td>
+ <p>
+ Mettre Polytechnique.org dans le champ FROM (ou "De"), il faut bien
+ comprendre que c'est une opération essentiellement formelle. Tes mails
+ restent stockés sur le même serveur, et Outlook Express utilise le même
+ autre serveur pour poster les mails sortants. En fait, on crée plutôt un
+ compte virtuel qu'un véritable compte.
+ </p>
+ <p>
+ Le <strong>"Nom complet"</strong>, c'est la façon dont ton identité
+ apparaît dans le logiciel d'e-mail de tes destinataires. Tu peux
+ taper absolument ce que tu veux, y compris un surnom pourquoi pas.
+ </p>
+ <p>
+ Ensuite, clique sur <strong>"Suivant >"</strong>.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from3.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <table cellpadding="5" summary="Quatrième étape">
+ <tr>
+ <td>
+ <p>
+ L'écran suivant te demande l'adresse e-mail que tu veux afficher
+ dans tes correspondances.
+ </p>
+ <p>
+ Tu peux créer autant de comptes que tu veux sur le même ordinateur
+ avec tes différentes adresses e-mail, ce qui te permettra de choisir,
+ au moment de composer un nouvel e-mail, quelle adresse tu veux utiliser.
+ </p>
+ <p>
+ Ainsi, tu peux utiliser ton adresse professionnelle, ton adresse à
+ la maison, ou ton adresse à vie. Nous te conseillons de refaire toute
+ la procédure autant de fois que tu as d'adresses e-mail.
+ </p>
+ <p>
+ Dans le cas présent, nous créons un compte qui envoie des e-mails sous
+ l'identité<br />
+ "Alice DUPONT <
+ <a href="mailto:alice.dupont@m4x.org/">alice.dupont@m4x.org</a>>".
+ </p>
+ <p>
+ Clique sur <strong>"Suivant >"</strong>.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from4.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <table cellpadding="5" summary="Cinquième étape">
+ <tr>
+ <td>
+ <p>
+ Cet écran te demande quels serveurs utiliser pour ce compte.
+ </p>
+ <p>
+ <strong>Le serveur POP3</strong>, c'est celui sur lequel l'ordinateur va chercher ton
+ mail. Si tu as ouvert une adresse e-mail gratuite sur www.netcourrier.com par
+ exemple, ce serveur est pop.netcourrier.com. D'une manière générale,
+ cette ligne n'a pas d'importance pour un compte formel (le mail reste au
+ même endroit). En effet, comme le logiciel dispose déjà du compte habituel
+ configuré avec l'indication du serveur POP3, ton ordinateur sait déjà où
+ aller chercher ton mail. Tape donc n'importe quoi dans la case, ça marchera
+ très bien. On va d'ailleurs dire plus loin de ne pas tenir compte de ce
+ réglage.
+ </p>
+ <p>
+ L'autre case est par contre très importante. Il s'agit du <strong>serveur
+ SMTP</strong>, qui est utilisé pour envoyer un e-mail. En général, tu n'as
+ pas le choix, il s'agit du serveur indiqué par ton fournisseur d'accès
+ à Internet. Chez wanadoo, c'est smtp.wanadoo.fr, chez libertysurf,
+ c'est smtp.libertysurf.fr. Au travail, le serveur SMTP appartient à
+ l'entreprise et pour connaître son nom, il faut regarder sur le compte
+ déjà configuré par défaut, ou alors demander à un administrateur système.
+ Si tu utilises <strong>plusieurs fournisseurs d'accès</strong> ou que ton serveur
+ SMTP refuse les champs From avec une adresse en polytechnique.org, utilise
+ <strong>le serveur SMTP de polytechnique.org</strong>, dans ce cas,
+ <a href="doc_smtp.php">regarde la configuration</a>.
+ </p>
+ <p>
+ Clique ensuite sur <strong>"Suivant >"</strong>.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from5.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <p>
+ L'écran suivant te demande un compte et un mot de passe pour rechercher
+ ton mail. Laisse-le tomber pour la même raison que le serveur POP3.
+ Tu as déjà un compte par défaut qui vérifie ton e-mail, il est inutile
+ de reconfigurer le compte ici et d'aller vérifier une seconde fois tes
+ mails sur le même serveur.
+ </p>
+ <p>
+ -> Le seul cas où cet écran a de l'importance, c'est si ton mail est stocké à
+ plusieurs endroits sur Internet. Exemple typique : ton e-mail au travail est
+ stocké sur un serveur au travail, ton e-mail netcourrier est stocké sur
+ pop.netcourrier.com. Dans ce cas, tu peux configurer un deuxième compte avec
+ un autre accès POP3. Quand tu rechercheras ton mail, tu verras apparaître non
+ seulement tes e-mails professionnels, mais bien sûr aussi ceux personnels
+ recherchés sur netcourrier.com. Ce cas est traité tout à la fin dans le
+ paragraphe "configuration avancée".
+ </p>
+ <p>
+ Clique ensuite sur <strong>"Suivant >"</strong>, puis enfin
+ <strong>"Terminer"</strong>.
+ </p>
+ <hr />
+ <table summary="Sixième étape" cellpadding="5">
+ <tr>
+ <td>
+ <p>
+ Voilà maintenant la physionomie de la liste des comptes.
+ </p>
+ <p>
+ Le nouveau compte a été nommé du nom du serveur sur lequel les mails
+ sont stockés (le serveur POP3) en l'occurrence dans notre exemple, il
+ s'agit de pop.netcourrier.com (ou n'importe quoi si tu as rentré n'importe
+ quoi plus haut).
+ </p>
+ <p>
+ Sélectionne-le et clique sur <strong>"Propriétés"</strong>.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from6.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <table cellspacing="5" summary="Septième étape">
+ <tr>
+ <td>
+ <p>
+ Cet écran permet d'éditer directement tous les paramètres rentrés
+ au fur et à mesure de l'assistant de création de nouveau compte
+ détaillé ci-dessus.
+ </p>
+ <p>
+ Dans l'onglet <strong>"Général"</strong>, on trouve l'adresse d'envoi
+ du compte, et le <strong>"Nom"</strong> affiché.
+ </p>
+ <p>
+ La petite case <strong>"Inclure ce compte" </strong>est importante.
+ Si tu la coches, cela veut dire que ce compte est réel et pas seulement
+ formel. En gros, si elle n'est pas cochée, le compte sert uniquement
+ pour envoyer un mail avec l'adresse e-mail spécifiée, qui sera utilisée
+ aussi pour la réponse, et si elle est cochée, Outlook Express va aller
+ vérifier sur le serveur POP3 les e-mails. Dans l'étape de tout à l'heure,
+ on avait tapé n'importe quoi pour le serveur POP3, pour être cohérent, il
+ ne faut pas cocher la case ici, sinon une erreur sera affichée à chaque
+ vérification de mail. En d'autres termes, le compte crée dans cet exemple
+ n'est pas un compte de réception mais un compte d'envoi, on ne va donc pas
+ l'inclure en réception !
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from7.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <table cellspacing="5" summary="Huitième étape">
+ <tr>
+ <td>
+ <p>
+ Et voilà le résultat ! Quand tu composes un nouveau mail, Outlook Express
+ te donne le choix de l'adresse que ton destinataire va voir et à laquelle
+ il te répondra.
+ </p>
+ <p>
+ Tu peux donc écrire à qui tu veux avec une adresse en polytechnique.org
+ ou en m4x.org. Pour créer autant de comptes virtuels que d'adresses e-mail,
+ il suffit de recommencer au début.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_from8.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ </table>
+ <hr />
+ <h1>
+ Configuration avancée
+ </h1>
+ <p>
+ Prenons un exemple. Tu travailles chez MyCompany où tu as un e-mail
+ prenom.nom@mycompany.fr et d'autre part, tu as ouvert un email chez netcourrier.com
+ de la forme truc@netcourrier.com.
+ </p>
+ <p>
+ De plus, tu reroutes polytechnique.org vers ton adresse e-mail personnelle
+ chez netcourrier.com mais pas sur ton adresse professionnelle pour des
+ raisons éthiques/de sécurité/de confidentialité.
+ </p>
+ <p>
+ Cependant, tu souhaiterais pouvoir accéder à ton e-mail en polytechnique.org à
+ ton travail ou sur ton portable par exemple. C'est en effet toujours très
+ ennuyeux de lire son e-mail à des endroits différents.
+ </p>
+ <p>
+ Dans ce cas, la bonne configuration est la suivante.
+ </p>
+ <h2>Premier compte :</h2>
+ <p>
+ <strong>E-mail:</strong> prenom.nom@mycompany.fr<br />
+ <strong>Serveur POP3:</strong>
+ pop.mycompany.fr (vérifier le nom au cas par cas)<br />
+ <strong>Serveur SMTP:</strong>
+ smtp.mycompany.fr (même remarque)<br />
+ <strong>Case "inclure ce compte":</strong> cochée
+ </p>
+ <h2>Deuxième compte :</h2>
+ <p>
+ <strong>E-mail:</strong> prenom.nom@polytechnique.org<br />
+ <strong>Serveur POP3:</strong> pop.netcourrier.com<br />
+ <strong>Serveur SMTP:</strong> smtp.mycompany.fr<br />
+ <strong>Case "inclure ce compte":</strong> cochée<br />
+ </p>
+ <p>
+ A supposer maintenant que tu es réellement sur un portable. Quand
+ tu le ramènes chez toi, que tu te connectes via libertysurf, tu
+ écris un e-mail avec le compte polytechnique.org ci-dessus, et quand tu l'envoies,
+ une erreur s'affiche dont le message est du style "Relaying
+ denied".<br /><br />
+ </p>
+ <p>
+ <strong>Explication:</strong> chez toi, tu es relié directement aux serveurs de libertysurf
+ avant même d'atteindre Internet. Lorsque tu envoies un e-mail, libertysurf refuse
+ d'être uniquement un transit vers le serveur utilisé pour envoyer l'email, en
+ l'occurrence smtp.mycompany.fr pour le compte polytechnique.org ci-dessus
+ (le serveur SMTP).
+ </p>
+ <p>
+ Pourquoi ce refus de transmettre ton mail au serveur de smtp.mycompany.fr
+ pour l'envoi ?
+ </p>
+ <p>
+ Car un FAI (founisseur d'accès à Internet) a une responsabilité lorsqu'il
+ fournit l'accès à Internet à une personne. S'il autorisait le relaying, tu
+ pourrais tout à fait envoyer un spam en utilisant un serveur de mycompany en
+ étant connecté par libertysurf, ou bien aussi des attaques e-mail (virus
+ notamment) via toujours ce serveur de mycompany. Or, seul ton FAI sait exactement
+ qui tu es, à la fois techniquement et en terme de responsabilité. Si un virus
+ mondial part grâce au serveur de mycompany, et que mycompany est incapable
+ d'identifier l'envoyeur (il sait juste qu'il a transité par libertysurf juste
+ avant d'arriver chez lui, rien de plus), on imagine bien les conséquences sur
+ l'entreprise MyCompany.
+ </p>
+ <p>
+ <strong>Conclusion:</strong> le serveur SMTP est toujours celui du prestataire le plus
+ proche de toi sur le réseau (celui qui te relie à Internet en clair). Quand tu
+ es au travail, connecté par le réseau de ton entreprise, tu envoies un email
+ grâce au serveur SMTP smtp.mycompany.fr, quand tu es à la maison, connecté à
+ Internet par l'intermédiaire des serveurs de Libertysurf, tu dois utiliser
+ smtp.libertysurf.fr pour envoyer un e-mail. Et ainsi de suite.
+ </p>
+ <p>
+ Pour résoudre le problème initial du portable à la maison, il faut donc créer
+ un nouveau compte, cette fois-ci "formel", car il ne va pas aller chercher de
+ mails ailleurs que les deux premiers, il va juste servir à envoyer du mail par
+ un serveur différent des deux premiers comptes qui utilisent tous les deux
+ smtp.mycompany.fr.
+ </p>
+ <h2>Troisième compte :</h2>
+ <p>
+ <strong>E-mail:</strong> prenom.nom@polytechnique.org<br />
+ <strong>Serveur POP3:</strong> <em>peu importe, inutilisé</em><br />
+ <strong>Serveur SMTP:</strong> smtp.libertysurf.fr (ce compte sert
+ quand le premier serveur rencontré sur le réseau est un serveur libertysurf)<br />
+ <strong>Case "inclure ce compte":</strong> non cochée (en effet,
+ ce compte sert à envoyer un email en étant connecté à Libertysurf, pas à en
+ réceptionner)
+ </p>
+ <p>
+ Voilà, le principe est simple une fois qu'on a saisi les petites
+ subtilités de vocabulaire. Une personne avec deux adresses e-mails
+ qu'elle veut pouvoir utiliser à la maison et au bureau sur la même
+ machine a donc quatre comptes configurés. Et si en plus on rajoute
+ la possibilité d'utiliser des alias comme m4x.org, il faut rajouter
+ autant de comptes nécessaires. Avec l'habitude, créer un
+ nouveau compte ou en éditer un prend à peine quelques minutes. Allez,
+ un peu de pratique!
+ </p>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Pourquoi et comment choisir un e-mail gratuit</h1>
+
+
+<h2>A quoi sert un e-mail gratuit ?</h2>
+<ul>
+ <li>Accessibilité depuis tout lieu relié à Internet</li>
+ <li>Confidentialité</li>
+ <li>Plus de fonctionnalités</li>
+</ul>
+
+<p>
+ Un service d'e-mail gratuit est particulièrement adapté pour les
+ <strong>utilisateurs itinérants</strong> qui souhaitent accéder à leur
+ e-mail du bureau, de la maison, de l'étranger ou en déplacement, etc.
+ <br />
+ Avec un service de messagerie électronique gratuit, les e-mails sont
+ stockés physiquement hors du bureau ; ils sont donc facilement lisibles
+ aussi bien du bureau que de n'importe quel lieu disposant d'un accès internet
+ (comme un cyber-café ou une borne Internet).
+ <br />
+ Pourquoi ne pas simplement utiliser l'e-mail professionnel ? Parce que
+ celui-ci est <strong>rarement accessible facilement de l'extérieur
+ du bureau</strong> (à cause de pare-feu ou de fermeture du port
+ <code>POP3</code>). Cela rend sa consultation très fastidieuse et
+ parfois tout simplement impossible hors du bureau.
+</p>
+<p>
+ D'autre part, la loi autorise les
+ employeurs à <strong>lire et sauvegarder le contenu des
+ e-mails</strong> écrits/lus sur la boîte e-mail professionnelle. En
+ choisissant de stocker tous ses mails sur
+ un serveur d'e-mail gratuit, c'est-à-dire sur un serveur anonyme public
+ contenant des centaines de milliers d'utilisateurs, c'est la meilleure
+ garantie de <strong>confidentialité</strong> d'un e-mail vis-à-vis de
+ l'employeur ou de toute personne qui partage un outil informatique (un
+ collègue par exemple),
+</p>
+<p>
+ Enfin, les services d'e-mails gratuits étant souvent bien plus
+ avancés que ceux mis en place par les directions informatiques des organismes
+ où vous travaillez (entreprises, ministères, universités...),
+ <strong>des possibilités supplémentaires</strong>, comme le téléchargement de ses e-mails sur téléphone
+ portable ou PDA, ou encore téléchargement chiffré de ses e-mails "en POP-SSL") qui sont offertes à l'utilisateur.
+</p>
+<p>
+ Plus d'hésitation ! Mais il n'est pas aisé de choisir le service gratuit adéquat : ils
+ sont loins d'être tous fiables, ce qui peut se traduire (pour certains) par des e-mails
+ perdus... Nous allons voir comment on peut objectivement faire un choix.
+</p>
+
+<h1>Lequel choisir?</h1>
+<p>
+ Nous allons d'abord indiquer les critères retenus pour nos
+ benchmarks, avant de nommer les services que nous recommandons
+ ou déconseillons vivement.
+</p>
+<h2>Les critères</h2>
+<ol>
+ <li>
+ Fiabilité et performance
+ </li>
+ <li>
+ Possibilité de télécharger le mail en POP3 sur son ordinateur avec un
+ logiciel classique de mail
+ </li>
+</ol>
+<p>
+ Explications. <strong>Le critère 1</strong> est vital. Avec certains services de
+ messagerie électronique, des e-mails
+ sont perdus. C'est inacceptable, c'est pourquoi Polytechnique.org est très
+ attentif à maintenir un service performant et permanent. Même si la
+ réception finale de l'e-mail dépend de Polytechnique.org, elle dépend
+ surtout du prestataire (celui qui héberge la boîte mail) qui est souvent
+ le responsable de la perte d'e-mails. La performance est donc nécessaire.
+ Ce premier critère permet déjà
+ d'éliminer un grand nombre de services de messagerie gratuits.
+</p>
+<p>
+ <strong>Le critère 2</strong> permet de consulter ses e-mails sur son ordinateur
+ normalement sans passer par le web. On bénéficie donc de toute l'interface
+ et des fonctions du logiciel de messagerie (Outlook Express ou Netscape
+ par exemple) à la place de celle du site web (qui est généralement assez
+ sommaire).
+</p>
+<p>
+ D'autres questions en vrac que nous nous sommes posées pour classer les
+ services :
+ Existence d'un webmail efficace?
+ Présence du champ BCC (ou CCI) ?
+ Possibilité d'insérer des pièces jointes ?
+ Possibilité de mettre en service un répondeur automatique pendant
+ une absence prolongée?
+ Possibilité de filtrer ses e-mails ?
+ Possibiliter de rediriger ses e-mails sur une autre boîte e-mail ?
+ Nombre de mails pouvant être stockés sur le serveur ?
+ Présence d'une petite bannière de publicité en bas de chaque e-mail ?
+ Présence du champ FROM ou Reply-To?...
+</p>
+<h2>Benchmarks</h2>
+<p>
+ Vous trouverez dans la page des statistiques un lien vers la liste de tous
+ les mailers avec lesquels Polytechnique.org est en contact. Les temps de
+ réponse et performances de chacuns d'eux sont mesurés tous les jours et la
+ page est réactualisée en permanence. L'observation sur une longue période
+ de ces statistiques fournit des informations précieuses sur la qualité
+ d'un service.
+</p>
+<p>
+<strong>Les forums de discusssion, notament <a href="{rel}/banana/?group=xorg.informatique.divers">xorg.informatique.divers</a>
+ te permettront de recevoir les conseils du moment sur quel fournisseur il vaut mieux choisir</strong>
+</p>
+<br />
+<table class="bicol" cellspacing="0" cellpadding="4" summary="Benchmark">
+ <tr>
+ <th>
+ Qualité de service
+ </th>
+ <th>
+ Nom du service
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ à éviter impérativement
+ </td>
+ <td>
+ caramail.com
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ mauvaise
+ </td>
+ <td>
+ mail.com<br />
+ multimania.com
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ moyenne
+ </td>
+ <td>
+ freesurf.fr<br />
+ hotmail.com<br />
+ yahoo.fr
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ bonne ou satisfaisante
+ </td>
+ <td>
+ free.fr<br />
+ ifrance.com<br />
+ libertysurf.fr
+ </td>
+ </tr>
+</table>
+<h2>Commentaires</h2>
+<p>
+ Il convient surtout d'éviter caramail.com dont les performances sont
+ désespérantes, les logs prouvent que chaque semaine des mails sont
+ <strong>PERDUS</strong> à destination de caramail. Pour le reste, les services mauvais
+ sont ceux qui connaissent des pannes régulières et relativement fréquentes,
+ le plus souvent sans aucune perte de mail mais avec des retards qui peuvent
+ atteindre plusieurs jours. En ce qui concerne les services moyens, on trouve
+ les poids lourds du marché qui patissent d'une part du nombre d'utilisateurs
+ (des dizaines de millions) et d'autre part des attaques de hackers contre
+ Microsoft ou Yahoo qui rendent couramment les services très lents voire
+ inaccessibles.
+</p>
+<p>
+ Dans la catégorie des services recommandés, une remarque s'impose, les providers
+ internet sont en général très performants compte-tenu de leurs installations en
+ serveurs probablement. On peut tout à fait s'abonner à un provider internet
+ gratuit comme freesurf ou libertysurf sans jamais se connecter à internet par
+ ailleurs par modem avec ce provider! Cela n'empêche pas d'utiliser leurs serveurs.
+</p>
+<p>
+<strong>Toutes caractéristiques confondues, nos deux services préférés et recommandés
+ sont freesurf.fr et netcourrier.com. Le service gmx.net est également très bon,
+ mais il comporte une option par défaut qui bloque les mails en provenance de
+ hotmail ou yahoo à décocher.</strong>
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ alias @melix.net
+</h1>
+<p>
+ <strong>Pourquoi un alias, alors que j'ai déjà mes adresses @polytechnique.org ?</strong>
+</p>
+<p>
+ Les adresses <strong>@polytechnique.org</strong> et <strong>@m4x.org</strong> sont figées, et ne peuvent pas être
+ personnalisées. Pour plus de convivialité dans l'utilisation de tes mails, tu peux donc choisir
+ une adresse e-mail discrète et personnalisée. Ce nouvel e-mail peut par exemple correspondre à
+ ton surnom.
+</p>
+<p>
+ Par soucis de distinction avec les adresses prenom.nom@polytechnique.org ou prenom.nom@m4x.org,
+ ces adresses personnalisées auront pour suffixe <strong>@melix.net</strong> et <strong>@melix.org</strong>. Ces
+ domaines sont aussi gérés par nos serveurs, et tous les mails que tu recevras à cette adresse
+ seront immédiatement redirigés sur tes adresses de renvoi habituelles définies sur
+ <a href="{"emails.php"|url}">cette page</a>.
+</p>
+<p>
+ <strong>A combien d'alias @melix.net ai-je droit ?</strong>
+</p>
+<p>
+ Afin d'éviter tout abus, une seule adresse par personne est disponible et cette demande doit
+ être accompagnée d'une brève explication concernant le choix de l'adresse. A titre d'exemple, un
+ surnom ou un raccourci de ton nom seront acceptés. Tu recevras un mail une fois ta demande
+ validée par un administrateur.
+</p>
+<p>
+ <strong>Je veux changer d'alias ...</strong>
+</p>
+<p>
+ Il est interdit d'avoir deux alias différents. Donc pour changer d'alias melix, il te suffit
+ d'en demander un autre, si il est accepté par les administrateurs, cela annulera l'ancien.
+</p>
+<p>
+ Attention, toute utilisation abusive de la création d'alias melix sera interdite, et sanctionnée
+ par un refus de toutes les demandes de changement d'alias qui suivront.
+</p>
+<p>
+ <strong>Je n'ai plus besoin d'aucun alias</strong>
+</p>
+<p>
+ Aucun problème, si tu as un alias et que tu veux l'abandonner, il te suffit de cliquer sur le
+ bouton idoine, ton alias sera automatiquement détruit.
+</p>
+<p>
+ Attention, celà veut dire que tu ne recevras plus le courrier qui sera adressé à cet alias, donc
+ n'oublie pas de prévenir tout ceux qui connaissent cet alias que tu l'abandonnes.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<p>
+ [<a href="{"docs/doc_nn.php?doc=smtp"|url}">Configuration du smtp</a>]
+ [<a href="{"docs/doc_nn.php?doc=nntp"|url}">Configuration du nntp</a>]
+ [<a href="{"docs/doc_nn.php?doc=all"|url}">Doc. complète (gros)</a>]
+</p>
+<h1>
+ Utiliser le SMTP sécurisé et le NNTP sécurisé avec Mozilla (ou Netscape 7+)
+</h1>
+<h2>Prérequis</h2>
+<p>
+Les copies d'écran ont été réalisées avec la version 1.7.3 sous Windows, mais restent valables pour
+les autres versions de Mozilla sous d'autres systèmes d'exploitation.
+Cette page est tout à fait transposable à Netscape 6/7.
+</p>
+<p>
+ Tous les services de polytechnique.org étant sécurisés, il faut commencer par faire accepter à
+ ton système d'exploitation les certificats de sécurités de polytechnique.org. Pour ceci, suis
+ les instructions de la <a href="{"docs/doc_ssl.php"|url}">documentation ssl</a>.
+</p>
+<p>
+ Il faut ensuite activer <a href="{"acces_smtp.php"|url}">ton compte SMTP/NNTP</a>.
+ Dans la suite, ton <strong>login</strong> désigne le login que tu as utilise pour te connecter au site,
+ et <strong>le mot de passe</strong> celui que tu as indiqué lors de
+ l'<a href="{"acces_smtp.php"|url}">activation de ton compte SMTP/NNTP</a>.
+</p>
+<h2>SMTP, NNTP, qu'est-ce ?</h2>
+<p>
+ Le SMTP est la machine sur laquelle ton client de courrier électronique se connecte pour envoyer
+ des mails. En général, ton fournisseur d'accès internet t'en propose un. Mais il arrive souvent
+ que ces serveurs aient des limitations (notament sur l'adresse mail que tu veux mettre dans le
+ champ expéditeur). Pour tous ses inscrits, Polytechnique.org en propose une version sécurisée,
+ accessible depuis tout le web.
+</p>
+<p>
+ Le NNTP est un autre nom pour désigner les <a href="{"banana/"|url}">forums</a> de
+ discussions de Polytechnique.org. Il s'agit de les consulter depuis un logiciel comme Netscape,
+ ce qui est tout de même bien plus pratique que le WebForum.
+</p>
+<div class="center">
+ <span class="erreur">
+ Avant toute opération, <a href="{"acces_smtp.php"|url}">active ton compte SMTP/NNTP</a>.
+ </span>
+</div>
+<br />
+{if $smarty.get.doc eq 'smtp' || $smarty.get.doc eq 'all'}
+<h1>
+ Utiliser le SMTP sécurisé
+</h1>
+
+<table summary="Première étape" cellpadding="5">
+<tr>
+ <td colspan="2" class='center'>
+ <img src="{"images/docs_moz1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ 1. Dans le module de courier de Mozilla, choisis le sous-menu
+ <strong>"Édition/Paramètres des comptes courriers et forums"</strong>.
+ </td>
+ <td>
+ 2. Remplis ensuite les paramètres du <strong>Serveur sortant (SMTP)</strong> comme la copie
+ d'écran ci-contre, en remplacant pierre.habouzit.2000 par ton alias à vie @polytechnique.org.
+ <br />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Troisème étape" cellpadding="5">
+<tr>
+ <td class='center'>
+ <img src="{"images/docs_moz2.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ Si tu envoyes un courriel, tu verras apparaître la fenêtre ci-dessus.
+ Tape le mot de passe que tu as indiqué lors de l'<a href="{"acces_smtp.php"|url}">activation de ton compte</a>.
+ </td>
+</tr>
+</table>
+
+<hr />
+
+Et maintenant quelques remarques :
+<ul>
+ <li>
+ Il est possible d'utiliser le port 587 (en cochant l'option SSL au lieu de TLS).
+ </li>
+ <li>
+ Certaines <abbr title="direction des systèmes informatiques">DSI</abbr>
+ locales interdisent l'utilisation de ports inférieurs à 1024. Il suffit
+ alors de spécifier comme numéro de port SMTP non pas 587, mais 2525.
+ </li>
+</ul>
+{/if}
+{if $smarty.get.doc eq 'nntp' || $smarty.get.doc eq 'all'}
+<br />
+<h1>
+ Utiliser le NNTP sécurisé
+</h1>
+
+<table summary="Première étape" cellpadding="5">
+<tr>
+ <td colspan="3" class='center'>
+ <img src="{"images/docs_moz_nntp1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ 1. Dans le module de courier de Mozilla, choisis le sous-menu
+ <strong>"Édition/Paramètres des comptes courriers et forums"</strong>.
+ </td>
+ <td>
+ 2. Clique sur <strong>'Ajouter un compte ...'</strong> et choisis alors <strong>Compte
+ Forums</strong>. clique ensuite sur <strong>suivant</strong>.
+ </td>
+ <td>
+ 3. Mozilla te demande ton nom et ton adresse mail, ce sont les coordonnées qui seront vu par les
+ autres abonnés sur notre serveur. Nous te conseillons donc d'utiliser ton adresse
+ polytechnicienne !. clique ensuite à nouveau sur <strong>suivant</strong>.
+ </td>
+</tr>
+</table>
+
+<table summary="Première étape" cellpadding="5">
+<tr>
+ <td colspan="3" class='center'>
+ <img src="{"images/docs_moz_nntp2.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ 1. Saisis alors le nom du serveur NNTP de Polytechnique.org :
+ <strong>ssl.polytechnique.org</strong>, puis clique sur <strong>Suivant</strong>.
+ </td>
+ <td>
+ 2. Mozilla te demande alors comment tu veux nommer ce compte, tu peux laisser ce qu'il te
+ propose par défaut et cliquer à nouveau sur <strong>Suivant</strong>.
+ </td>
+ <td>
+ 3. Un écran récapitule tes choix, tu n'as plus qu'à cliquer sur <strong>Terminer</strong>.
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Deuxième étape" cellpadding="5">
+<tr>
+ <td class='center' colspan='2'>
+ <img src="{"images/docs_moz_nntp3.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ Il faut ensuite dire à mozilla que le serveur de Forum est sécurisé. Pour ceci coche la case
+ <strong>Utiliser une connexion sécurisée (SSL).</strong> comme sur la capture d'écran ci dessus.
+ clique ensuite sur <strong>OK</strong>.
+ </td>
+ <td>
+ En te positionnant sur la ligne <strong>ssl.polytechnique.org</strong> alors créée, tu as la
+ possibilité de <strong>Gérer les inscriptions aux groupes de discussions</strong>. Suis ce
+ lien.
+ </td>
+</tr>
+<tr>
+ <td class='center' colspan='2'>
+ <img src="{"images/docs_moz_nntp4.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td colspan='2'>
+ La boite ci dessus apparait alors, donne alors un de tes <strong>alias</strong>
+ @polytechnique.org, puis valide.
+ </td>
+</tr>
+<tr>
+ <td class='center' colspan='2'>
+ <img src="{"images/docs_moz_nntp5.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td colspan='2'>
+ La boite ci dessus apparait enfin, tape le mot de passe que tu as indiqué lors de
+ l'<a href="{"acces_smtp.php"|url}">activation de ton compte</a>.
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Troisième étape" cellpadding="5">
+<tr>
+ <td>
+ <img src="{"images/docs_nntp_nn4.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ Tu vois alors un écran proche de celui ci-dessus apparaitre, il ne te reste plus qu'à choisir
+ les newsgroups qui t'intéressent, et à t'y abonner.
+ </td>
+</tr>
+</table>
+{/if}
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Les forums de Polytechnique.org</h1>
+<p>
+ Polytechnique.org propose un serveur de news (forums de discussion)
+ sécurisé <strong>ouvert à tous les inscrits</strong> qui ont
+ <strong><a href="{"acces_smtp.php"|url}">activé leur compte SMTP/NNTP</a></strong>.
+</p>
+
+<h2>A quoi sert le serveur de forums ?</h2>
+<p>
+ Le serveur de forums te permet de consulter les forums de discussion de
+ Polytechnique.org depuis ton logiciel de courrier électronique (Outlook
+ Express, Netscape...).
+</p>
+
+<h2>Quel logiciel utiliser ?</h2>
+<p>
+ Nous avons testé les logiciels capables de lire les forums de discussion les plus courants. La colonne <strong>O</strong> indique les logiciels qui fonctionnent, la colonne <strong>N</strong> ceux qui ne fonctionnent pas.
+</p>
+<p>
+<em>
+ <span class="smaller">
+ La colonne <strong>S</strong> s'adresse aux utilisateurs aguerris et indique la possibilité de
+ faire fonctionner le logiciel de news avec stunnel. La <a href="#stunnel">procédure</a> est
+ décrite plus bas.
+ </span>
+</em>
+</p>
+
+<table class="bicol" summary="liste des clients" cellpadding="4">
+<tr>
+ <th>Logiciel</th>
+ <th>O</th>
+ <th>N</th>
+ <th>S</th>
+</tr>
+<tr class="impair">
+ <td>Gnus</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="pair">
+ <td>Gravity / SuperGravity</td><td> </td><td> </td><td>x</td>
+</tr>
+<tr class="impair">
+ <td>KNode</td><td> </td><td> </td><td>x</td>
+</tr>
+<tr class="pair">
+ <td>Lotus Notes 5/6</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="impair">
+ <td>Microsoft Outlook Express 4.x/5.x/6.x</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="pair">
+ <td>Mozilla 1.x</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="impair">
+ <td>Netscape Communicator 4.x</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="pair">
+ <td>Netscape 6.x/7.x</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="impair">
+ <td>Opera 6.x</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="pair">
+ <td>Pan</td><td> </td><td> </td><td>x</td>
+</tr>
+<tr class="impair">
+ <td>slrn</td><td>x</td><td> </td><td>x</td>
+</tr>
+<tr class="pair">
+ <td>sylpheed / sylpheed-claws</td><td>x</td><td> </td><td> </td>
+</tr>
+<tr class="impair">
+ <td>Xnews</td><td> </td><td> </td><td>x</td>
+</tr>
+</table>
+
+<br />
+<h2>Comment me connecter ?</h2>
+<p>
+ Avant de configurer ton lecteur, il faut avoir accepté le certificat SSL de
+ Polytechnique.org. <em><a href="{"docs/doc_ssl.php"|url}">Comment faire ?</a></em>.
+</p>
+<p>
+ Pour te connecter, tu as besoin des paramètres suivants:
+</p>
+<ul>
+ <li><strong>Serveur</strong> : <code>ssl.polytechnique.org</code></li>
+ <li>Utiliser une connexion <strong>sécurisée</strong> (SSL, port 563)</li>
+ <li>
+ Ce serveur demande à ce que tu t'identifies : utilise ton identifiant (prenom.nom) et le mot de passe que tu as choisi pour le service SMTP/NNTP.
+ </li>
+</ul>
+<p>
+ La configuration pas à pas, images à l'appui :
+</p>
+<ul>
+ <li><a href="{"docs/doc_oe.php?doc=nntp"|url}">Outlook Express</a></li>
+ <li><a href="{"docs/doc_nn.php?doc=nntp"|url}">Netscape</a></li>
+</ul>
+
+<h2><a id="stunnel">Utiliser stunnel</a></h2>
+<p>
+ Certains logiciels de news sont capables de s'authentifier mais ne reconnaisent pas les connexions sécurisées de type SSL. Il est possible de faire fonctionner ces logiciels à l'aide de <a href="http://www.stunnel.org/">stunnel</a> qui gère la couche sécurisée.
+</p>
+<table class="bicol" summary="conf stunnel">
+<tr>
+ <th>
+ Pour les versions 3.x
+ </th>
+</tr>
+<tr>
+ <td>
+ <p>Tu peux <a href="http://www.stunnel.org/">télécharger</a>
+ stunnel et une fois celui-ci installé, taper la commande :<br />
+ <code>stunnel -c -d localhost:119 -r ssl.polytechnique.org:563</code></p>
+ </td>
+</tr>
+<tr>
+ <th>
+ Pour les versions 4.0x (GNU/linux)
+ </th>
+</tr>
+<tr>
+ <td>
+ Il suffit d'éditer stunnel.conf et d'y ajouter les lignes suivantes :
+<pre> # location of pid file
+ pid = /var/run/stunnel.pid
+ # user to run as
+ setuid = root
+ setgid = root
+
+ # Use it for client mode
+ client = yes
+
+ [nntps]
+ accept = localhost:119
+ connect = ssl.polytechnique.org:563
+ TIMEOUTclose = 0</pre>
+ Ensuite, il suffit d'exécuter en tant que <em>root</em> la commande : <code>stunnel /etc/stunnel.conf</code>
+ <br /><br />
+ Il faut noter que la plupart des distributions utilisent stunnel, et ont créé un script de lancement
+ automatique de stunnel par : <code>/etc/init.d/stunnel start</code>
+ </td>
+</tr>
+<tr>
+ <th>
+ Pour les versions 4.0x (Windows)
+ </th>
+</tr>
+<tr>
+ <td>
+ Il suffit d'éditer stunnel.conf et d'y ajouter les lignes suivantes :
+ <pre> # Use it for client mode
+ client = yes
+
+ [nntps]
+ accept = localhost:119
+ connect = ssl.polytechnique.org:563
+ TIMEOUTclose = 0</pre>
+ <br />
+ Si tu le souhaites, tu peux placer stunnel dans le groupe démarrage,
+ il sera lancé automatiquement.
+ </td>
+</tr>
+</table>
+<p>
+Ceci met en place un "tunnel" entre ton port local 119 et le port de NNTP sécurisé de Polytechnique.org.
+Il ne te reste alors plus qu'à indiquer à ton logiciel de forums que le serveur est "localhost" sur le port 119.
+</p>
+
+<h2>slrn (GNU/linux)</h2>
+<p>
+ Le cas de slrn est particulier. Il est par défaut compilé sans le support du ssl, et on peut utiliser la méthode indiquée ci-dessus.
+</p>
+<p>
+ Mais il est aussi possible de compiler slrn avec le support du ssl, auquel
+ cas il suffit d'indiquer à slrn : <code>snews://ssl.polytechnique.org/</code> comme
+ serveur. Tout ceci est expliqué sur
+ <a href="http://slrn.sourceforge.net/docs/README.SSL">la documentation officielle</a> (en anglais).
+</p>
+
+<h2>Attention !</h2>
+<p>
+ Les forums de discussion ne sont pas considérés comme un service prioritaire (contrairement aux adresses à vie) et donc pourra être interrompu pour de courtes périodes si nous ne pouvons pas faire autrement.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<p>
+ [<a href="{"docs/doc_oe.php?doc=smtp"|url}">Configuration du smtp</a>]
+ [<a href="{"docs/doc_oe.php?doc=nntp"|url}">Configuration du nntp</a>]
+ [<a href="{"docs/doc_oe.php?doc=all"|url}">Doc. complète (gros)</a>]
+</p>
+
+<h1>
+ Utiliser le SMTP sécurisé et le NNTP sécurisé avec Outlook Express
+</h1>
+
+<h2>Prérequis</h2>
+
+<p>
+ Comme pour toute aide à la configuration, la première étape consiste
+ souvent à mettre à jour ses logiciels installés. En effet, la présente page
+ a été écrite pour la version 5.5 d'Outlook Express qui est une version déja
+ ancienne, mais tu peux t'en inspirer pour configurer la dernière version
+ disponible (Outlook Express 6), elle marche correctement et nous
+ recommandons la mise à jour pour tout type de configuration d'ordinateur.
+</p>
+
+<p>
+ Cependant, les principes de cette configuration sont toujours les mêmes
+ dans les autres versions du logiciel et il est simple de leur transposer
+ cette explication.
+ Clique <a href="http://windowsupdate.microsoft.com/">ici</a> pour faire
+ la mise à jour à partir du site de Microsoft.
+</p>
+
+<p>
+ Tous les services de polytechnique.org sont sécurisés, il faut donc
+ commencer par ajouter les certificats de sécurité de polytechnique.org au
+ panier des certificats de Windows. Pour ce faire, suis les instructions de
+ la <a href="{"docs/doc_ssl.php"|url}">documentation ssl</a>.
+</p>
+<p>
+ Il faut ensuite activer <a href="{"acces_smtp.php"|url}">ton compte SMTP/NNTP</a>.
+ Par la suite, ton <strong>login</strong> désigne l'identifiant que tu utilises pour te connecter au site,
+ et <strong>le mot de passe</strong> celui que tu as indiqué lors de
+ l'<a href="{"acces_smtp.php"|url}">activation de ton compte SMTP/NNTP</a>.
+</p>
+
+<h2>SMTP, NNTP, qu'est-ce ?</h2>
+<p>
+ Le serveur SMTP est la machine sur laquelle ton client de courrier électronique se
+ connecte pour envoyer des mails. En général, ton fournisseur d'accès
+ internet t'en propose un. Mais il arrive souvent que ces serveurs aient des
+ limitations (notament sur l'adresse mail que tu veux mettre dans le champ
+ expéditeur). Pour tous ses inscrits, Polytechnique.org propose un serveur
+ sécurisé, accessible depuis tout internet.
+</p>
+<p>
+ Le NNTP est un autre nom pour désigner les <a href="{"banana/"|url}">forums</a> de
+ discussions de Polytechnique.org. Il s'agit de les consulter depuis un
+ logiciel comme Outlook Express,
+ ce qui est plus configurable que la page web du site depuis laquelle tu
+ peux également les voir.
+</p>
+<div class="center">
+ <span class="erreur">
+ Avant toute opération, <a href="{"acces_smtp.php"|url}">il faut avoir activé ton compte SMTP/NNTP</a>.
+ </span>
+</div>
+<br />
+
+{if $smarty.get.doc eq 'smtp' || $smarty.get.doc eq 'all'}
+<h1>
+ La configuration pour utiliser le serveur SMTP de Polytechnique.org
+</h1>
+
+<table summary="Première étape" cellpadding="5">
+<tr>
+ <td colspan="2">
+ <img src="{"images/docs_compte1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ 1. Dans le menu principal d'Outlook Express, choisis le sous-menu
+ <strong>"Comptes"</strong>.
+ </td>
+ <td>
+ 2. La fenêtre qui s'affiche à l'écran suivant montre la liste des comptes
+ actuellement paramétrés.
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Deuxième étape" cellpadding="5">
+<tr>
+ <td>
+ <img src="{"images/docs_compte2.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td>
+ Un compte est désigné par un nom, ici c'est <em>adupont@mail.com</em>
+ qui désigne le compte utilisé dans l'exemple. Le plus souvent,
+ la différence entre deux comptes est l'adresse e-mail d'envoi uniquement,
+ mais parfois, les comptes se différencient aussi par les serveurs
+ utilisés pour recevoir ou envoyer un e-mail. C'est ce que nous allons faire
+ ici. <br /><br />
+ Sélectionne le compte que tu utilises pour envoyer ton courrier puis
+ clique sur le bouton <strong>Propriétés</strong>.
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Troisième étape" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Cet écran permet d'éditer directement tous les paramètres du compte.
+ </p>
+ <p>
+ Dans l'onglet <strong>"Général"</strong>, on trouve l'adresse
+ d'envoi du compte, et le <strong>"Nom"</strong> affiché.
+ </p>
+ <p>
+ La petite case <strong>"Inclure ce compte" </strong>est importante.
+ Si tu la coches, cela veut dire que ce compte est réel et pas
+ seulement formel et Outlook Express va aller vérifier la présence
+ de messages sur le serveur POP3 (courrier entrant). Si elle n'est
+ pas cochée, le compte sert uniquement pour envoyer un mail avec
+ l'adresse e-mail spécifiée, qui sera utilisée aussi pour la réponse.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_smtp1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Quatrième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ 1. Dans l'onglet <strong>"Serveurs"</strong>, indique
+ <strong>ssl.polytechnique.org</strong> comme serveur SMTP
+ et coche la case <strong>"Mon serveur nécessite une
+ authentification"</strong>.
+ </p>
+ <p>
+ 2. Dans la case <strong>"Courrier entrant (POP3)"</strong>
+ indique le serveur POP du compte mail où tu redirige ton
+ courrier (par exemple le serveur de courier entrant de ton
+ fournisseur d'accès Internet).
+ </p>
+ <p>
+ 3. Tu peux alors cliquer sur le bouton <strong>"Paramètres..."</strong>
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_smtp2.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Cinquième étape" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ La boîte ci-contre s'affiche alors. Indique ton <em>login</em>
+ et ton mot de passe,
+ </p>
+ <p>
+ puis clique sur <strong>"OK"</strong>
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_smtp3.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Sixième étape" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Enfin, dans l'onglet <strong>"Avancée"</strong>, spécifie le port <strong>465</strong>
+ pour le <strong>Courrier sortant (SMTP)</strong> et coche la case
+ <strong>"Ce serveur utilise une connexion SSL"</strong>.
+ </p>
+ <p class="erreur">
+ Cette dernière étape est indispensable, sinon ton mot de passe
+ risque de ne pas être chiffré lors de l'envoi de courriels.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_smtp4.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+<hr />
+
+Et maintenant quelques remarques :
+<ul>
+ <li>
+ <p>
+ Le port de communication avec le serveur SMTP est officiellement le port
+ 587. Cependant, certaines versions d'Outlook Express ne fonctionnent
+ qu'avec le port 465. L'équipe de Polytechnique.org ne peut qu'insister
+ sur le fait que les mises à jour sont importantes et doivent être
+ effectuées.
+ </p>
+ </li>
+ <li>
+ <p>
+ Certaines <abbr title="direction des systèmes informatiques">DSI</abbr>
+ locales interdisent l'utilisation de ports inférieurs à 1024. Il faut
+ alors spécifier comme numéro de port non pas 587 ou 465, mais 2525 (ne
+ fonctionne pas avec les anciennes versions de MSOE).
+ </p>
+ </li>
+</ul>
+
+<hr />
+<table summary="Conclusion" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Voilà, c'est terminé, tes messages sont maintenant envoyés par
+ Polytechnique.org, la connexion est authentifiée et chiffrée jusqu'à
+ notre serveur, donc ni ton mot de passe ni ton mail ne passe en clair
+ entre toi et nous.
+ </p>
+ <p>
+ La première fois que tu enverras un mail par notre serveur tu auras
+ certainement un message t'expliquant que notre certificat n'est pas signé
+ par une autorité de confiance, c'est normal. Nous allons essayer de changer
+ cela mais de toute façon cela n'influe pas sur la sécurité du système.
+ Indique que tu fais confiance à notre certificat.
+ </p>
+ </td>
+</tr>
+</table>
+<br />
+{/if}
+{if $smarty.get.doc eq 'nntp' || $smarty.get.doc eq 'all'}
+<h1>
+ <a id="nntp">La configuration pour utiliser le serveur NNTP de Polytechnique.org</a>
+</h1>
+
+<table summary="Première étape" cellpadding="5">
+<tr>
+ <td colspan="2">
+ <img src="{"images/docs_compte1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td class="half">
+ 1. Dans le menu principal d'Outlook Express, choisis le sous-menu
+ <strong>"Comptes"</strong>.
+ </td>
+ <td>
+ 2. La fenêtre qui s'affiche à l'écran suivant montre la liste des comptes
+ actuellement paramétrés.
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Deuxième étape" cellpadding="5">
+<tr>
+ <td colspan="2">
+ <img src="{"images/docs_news1.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td class="half">
+ 1. Un compte est désigné par un nom de serveur. Il est possible que tu aies une liste
+ vide la première fois que tu ouvres cette boite.
+ Ici tu vois à quoi tu devras arriver en fin de configuration.
+ </td>
+ <td>
+ 2. Choisis d'ajouter un nouveau serveur de news comme montré sur l'image,
+ en choisissant <strong>Ajouter</strong>, puis <strong>News</strong>
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Troisième étape" cellpadding="5">
+<tr>
+ <td colspan="2">
+ <img src="{"images/docs_news2.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+<tr>
+ <td class="half">
+ 1. Tu vas alors arriver à l'écran de configuration suivant
+ (après avoir éventuellement du cliquer plusieurs fois sur <strong>suivant</strong>).
+ </td>
+ <td>
+ 2. Choisis <strong>ssl.polytechnique.org</strong> comme serveur puis clique autant de fois que nécessaire
+ sur <strong>Suivant</strong>, en remplissant les champs qui te seront demandés. Valide par <strong>Terminer</strong>
+ à la fin.
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Quatrième étape" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Il faut ensuite aller changer quelques options pour pouvoir utiliser les forums.
+ Retourne dans le menu <strong>"Outils/Comptes"</strong> du début, puis choisis de modifier
+ les <strong>"Propriétés"</strong> du compte de News que tu viens de créer.
+ </p>
+ <p>
+ Choisis alors l'onglet <strong>"Serveur"</strong> et remplis le comme sur la capture
+ d'écran. Le <em>login</em> est ton identifiant <em>prenom.nom</em> et le mot
+ de passe, le <a href="{"acces_smtp.php"|url}">mot de passe de ton compte NNTP/SMTP</a>.
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_news3.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Cinquième étape" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Dernière étape, choisis l'onglet <strong>"Avancé"</strong> et coche la case
+ <strong>ce serveur nécessite une connexion sécurisée (SSL)</strong>,
+ puis clique sur <strong>"OK"</strong>.
+ Tu es alors prêt à utiliser les news de polytechnique.org.<br />
+ Bonne lecture !
+ </p>
+ </td>
+ <td>
+ <img src="{"images/docs_news4.png"|url}" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Vérifier une patte cassée
+</h1>
+<p>
+ <strong>Qu'est-ce qu'une patte cassée ?</strong>
+</p>
+<p>
+ Tu peux choisir un nombre illimité d'adresses emails de redirection pour ton
+ courrier reçu par Polytechnique.org : ces pattes de redirection peuvent parfois
+ tomber en panne...! Par exemple, ton adresse de redirection @yahoo.fr ou
+ @wanadoo.fr pourrait très bien s'arrêter de fonctionner temporairement ou
+ définitivement (panne du fournisseur de boîte email, résililation de ton contrat
+ avec ton fournisseur d'accès...).
+</p>
+<p>
+ Nous t'aidons donc à <strong>analyser les messages</strong> d'erreurs que tu recois
+ lorsque tu envoies un mail à des utilisateurs de Polytechnique.org. Plus
+ précisément, si après avoir rédigé un email, tu reçois en retour un message
+ t'indiquant que l'un des destinataires n'a pas eu ton message sur l'une de
+ ses adresses de redirections, nous allons pouvoir te dire s'il a reçu ton
+ email sur une autre adresse de redirection...!
+</p>
+<p>
+ Nous pouvons t'aider si par exemple tu as envoyé un mail et l'un de tes
+ correspondants a une adresse de redirection qui est devenue invalide. Tu
+ veux alors sans doute savoir si le destinataire a tout de même reçu ton
+ email sur une autre adresse de redirection.
+</p>
+<br />
+<p>
+ <strong>Comment se sert-on de ce service ?</strong>
+</p>
+<p>
+ Rien ne vaut un exemple simple. imaginons que tu écrives à
+ jean.dupont@polytechnique.org, et que tu recoives peu de temps après un mail
+ du type :
+</p>
+<table summary="mail de bounce" class="bicol" cellspacing="0" cellpadding="10">
+<tr class="pair">
+<td>
+<pre>
+The original message was received at Thu, 23 Jan 2003 13:30:30 +0100 (MET)
+from [129.104.218.132]
+
+----- The following addresses had permanent fatal errors -----
+<jdupont@wanadoo.fr>
+
+----- Transcript of session follows -----
+... while talking to smtp.wanadoo.fr.:
+>>> RCPT To:<jdupont@wanadoo.fr>
+<<< 550 RCPT TO:<jdupont@wanadoo.fr> User unknown
+550 <jdupont@wanadoo.fr>... User unknown
+</pre>
+</td>
+</tr>
+</table>
+<p>
+ J'imagine que tu veux savoir si Jean Dupont a effectivement recu ton
+ courrier grâce à une autre adresse de redirection. Il te suffit de te
+ rendre sur la page des <a href="{"pattecassee.php"|url}">pattes cassées</a>
+ et tu soumets <strong>l'adresse de redirection</strong> qui a posé un problème
+ (dans notre exemple il s'agit de <strong>jdupont@wanadoo.fr</strong>).
+ On te dira si ton interlocuteur a d'autres adresses de redirections actives.
+ On te proposera aussi un lien pour signaler à ton interlocuteur
+ qu'une de ses adresses de redirections a un problème.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<p>
+ [<a href="{"docs/doc_pocketpc.php?doc=smtp"|url}">Configuration du smtp</a>]
+</p>
+
+<h1>
+ Utiliser le SMTP sécurisé avec Microsoft Windows Pocket PC
+</h1>
+
+<h2>Prérequis</h2>
+
+<p>
+ Cette documentation a été écrite pour Windows CE 4.20.0.
+</p>
+
+<p>
+ Cependant, les principes de cette configuration sont toujours les mêmes
+ dans les autres versions du logiciel et il est simple de leur transposer
+ cette explication.
+</p>
+
+<p>
+ Il faut ensuite activer <a href="{"acces_smtp.php"|url}">ton compte SMTP/NNTP</a> dans Polytechnique.org.
+ Par la suite, ton <strong>login</strong> désigne l'identifiant que tu utilises pour te connecter au site,
+ et <strong>le mot de passe</strong> celui que tu as indiqué lors de
+ l'<a href="{"acces_smtp.php"|url}">activation de ton compte SMTP/NNTP</a>.
+</p>
+
+<h2>SMTP, NNTP, qu'est-ce ?</h2>
+<p>
+ Le serveur SMTP est la machine sur laquelle ton client de courrier électronique se
+ connecte pour envoyer des mails. En général, ton fournisseur d'accès
+ internet t'en propose un. Mais il arrive souvent que ces serveurs aient des
+ limitations (notamment sur l'adresse mail que tu veux mettre dans le champ
+ expéditeur). Pour tous ses inscrits, Polytechnique.org propose un serveur
+ sécurisé, accessible depuis tout internet.
+</p>
+<div class="center">
+ <span class="erreur">
+ Avant toute opération, <a href="{"acces_smtp.php"|url}">il faut avoir activé ton compte SMTP/NNTP</a>.
+ </span>
+</div>
+<br />
+
+{if $smarty.get.doc eq 'smtp' || $smarty.get.doc eq 'all'}
+<h1>
+ La configuration pour utiliser le serveur SMTP de Polytechnique.org
+</h1>
+
+<table summary="Première étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ Dans le menu démarrer, choisis la <strong>"Boîte de Réception"</strong>. Puis dans le menu <strong>Comptes</strong>, choisis <strong>"Nouveau compte..."</strong>.
+ </p>
+ <p>
+ La procédure de création du compte se déroule en cinq étapes plus trois étapes d'options (nécessaires pour ce qui nous concerne).
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc1.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Deuxième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ 1. Dans la première étape de configuration de la messagerie, tu peux indiquer l'adresse mail qui sera indiquée dans les mails que tu envoies.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc2.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Troisième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ 2. On te propose alors de configurer automatiquement la messagerie. Accepte et passe à l'étape suivante.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc3.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Quatrième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ 3. La troisième étape te demande ton nom ainsi que ton nom d'utilisateur. Ce nom d'utilisateur doit obligatoirement être ton <strong>login</strong>. De même ton mot de passe doit être celui que tu as choisi lors de l'activation de ton compte SMTP sécurisé.
+ </p>
+ <p>
+ Malheureusement cela t'oblige à avoir le même login pour ton compte mail que celui de ton compte polytechnique.org. Il faut également le même mot de passe.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc4.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Cinquième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ 4. L'étape quatre te permet de choisir le type de compte POP3 ou IMAP4. Tu peux choisir le type en fonction de ton hébergeur de mail : il s'agit d'un paramètre de réception et non d'envoi. Si tu ne sais pas quoi choisir, la plupart du temps il faut mettre POP3.
+ </p>
+ <p>
+ Le nom du compte, n'apparaîtra nulle part dans les communications mais te permet simplement d'identifier ces paramètres sur ton PDA par rapport à d'autres comptes.
+ </p>
+ <p>
+ Remarque : tu peux configurer plusieurs comptes mail sur ton PDA, mais tu ne peux te connecter qu'à un seul à la fois. Pour changer de compte, il faut d'abord se déconnecter du compte en cours.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc5.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Sixième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ 5. Le serveur de courrier entrant correspond à ton hébergeur de mail. Par contre le serveur sortant doit être <strong>ssl.polytechnique.org</strong>.
+ </p>
+ <p>
+ Clique maintenant sur Options pour paramétrer les paramètres de sécurité.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc6.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+
+<table summary="Septième étape" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Nous te déconseillons de récupérer automatiquement les mails, notamment parce que ton PDA essaiera alors très régulièremet de se connecter à Internet, même si tu n'as pas démarré ta boîte de réception, ce qui peut est très désagréable.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc7.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Huitième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ Ces deux cases sont importantes à cocher. La <strong>connexion SSL</strong> établira un dialogue sécurisé entre le PDA et notre serveur pour ne pas envoyer ton mot de passe en clair.
+ Comme pour le login la méthode de connexion est commune au courrier entrant et sortant. Mais dans le cas d'un PDA, il est important de récupérer ses mails de manière crypté également.
+ </p>
+ <p>
+ Coche également la case pour l'<strong>authentification</strong>.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc8.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+<hr />
+<table summary="Neufième étape" cellpadding="5">
+<tr>
+ <td class="middle">
+ <p>
+ Enfin, pour terminer tu peux choisir de ne récupérer que les en-têtes des mails que tu reçois. Ce qui évite de surcharger ton PDA. Tu pourras ensuite, au cas par cas, choisir de récupérer la totalité des messages qui t'intéressent.
+ </p>
+ </td>
+ <td>
+ <img src="{rel}/images/docs_pocketpc9.png" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+</tr>
+</table>
+
+<hr />
+<table summary="Conclusion" cellpadding="5">
+<tr>
+ <td>
+ <p>
+ Voilà, c'est terminé, tes messages sont maintenant envoyés par
+ Polytechnique.org, la connexion est authentifiée et chiffrée jusqu'à
+ notre serveur, donc ni ton mot de passe ni ton mail ne passe en clair
+ entre toi et nous.
+ </p>
+ </td>
+</tr>
+</table>
+<br />
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Le serveur SMTP de Polytechnique.org</h1>
+<p>
+ Polytechnique.org propose un serveur SMTP ouvert à tous les inscrits
+ <a href="{"acces_smtp.php"|url}">qui en font la demande</a>.
+</p>
+<h2>A quoi sert le serveur SMTP ?</h2>
+<p>
+ Le serveur <abbr title="Simple Mail Transfert Protocol">SMTP</abbr> est la
+ machine sur laquelle se connecte ton logiciel de courrier électronique
+ (Outlook Express, Netscape, Eudora...) pour envoyer le courrier. On l'appelle
+ aussi <em>serveur de courrier sortant</em>.
+ <br />C'est la première machine qui prend la responsabilité d'envoyer le
+ message, elle doit donc être capable d'identifier l'émetteur du courrier en
+ cas de problème, sinon c'est la porte ouverte au spam (pollution des boîtes
+ aux lettres par envoi de courrier non sollicités).
+ Ainsi, quand on utilise un ordinateur portable à la fois au bureau et à la maison, il faut sans cesse changer de serveur SMTP.
+</p>
+<h2>Pourquoi un tel service ?</h2>
+<ul>
+ <li>
+ <p>
+ Afin d'éviter le spam, les serveurs SMTP sont généralement assez
+ <strong>restrictifs</strong> sur les personnes autorisées à les utiliser,
+ ainsi pour
+ utiliser le serveur SMTP de LibertySurf pour envoyer des messages, il est
+ nécessaire d'être connecté(e) à Internet par l'intermédiaire de
+ LibertySurf. Si tu te connectes par un autre fournisseur d'accès, il
+ faudra changer ta configuration de ton logiciel de courrier, ce qui peut
+ devenir ennuyeux si les changements sont fréquents.
+ </p>
+ </li>
+ <li>
+ <p>
+ De plus, certains serveurs SMTP n'autorisent dans le champ d'expéditeur (
+ <code>From:</code>) qu'une adresse mail se terminant par leur domaine, ce
+ qui empêche l'envoi de courrier avec une adresse d'expéditeur en
+ <code>@polytechnique.org</code>.
+ </p>
+ </li>
+ <li>
+ <p>
+ Tu es dans une entreprise qui s'autorise la lecture des messages qui
+ passent par son serveur SMTP et tu veux
+ envoyer un messsage qui ne pourra être intercepté par le service
+ informatique de ton entreprise.
+ </p>
+ </li>
+</ul>
+<p>
+ Pour toutes ces raisons (et d'autres moins parlantes),
+ le serveur SMTP de Polytechnique.org apporte une bonne solution.
+ Pour des raisons d'identification, ce serveur te demandera un <em>login</em>
+ et un mot de passe, <a href="{"acces_smtp.php"|url}"><strong>il faut
+ donc activer ton compte</strong></a> avant de continuer la configuration.
+ Évidement, le SPAM est interdit en utilisant le serveur SMTP de
+ Polytechnique.org, et si tu te rends coupable de spam, ton compte sera
+ supprimé.
+</p>
+
+<h2>Configuration</h2>
+<p>
+ Avant toute chose, il faut avoir accepté le certificat SSL de
+ Polytechnique.org.
+ Si tu ne l'as jamais fait, avant de configurer ton logiciel de messagerie
+ électronique, lis <a href="doc_ssl.php">ces instructions</a>.
+</p>
+<ul>
+ <li><a href="{"docs/doc_oe.php?doc=smtp"|url}">Configuration sous Outlook Express</a> (page longue à charger)</li>
+ <li><a href="{"docs/doc_nn.php?doc=smtp"|url}">Configuration sous Netscape</a> (page longue à charger)</li>
+</ul>
+
+<h2>Attention !</h2>
+<p>
+ L'utilisation de <strong>certains logiciels antivirus</strong> (comme <em>Norton Antivirus</em>)
+ nécessite un élément de configuration supplémentaire : il faut indiquer au
+ logiciel de ne pas scanner le courrier sortant.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1><a id="ssl"></a>Le certificat SSL de Polytechnique.org</h1>
+<h2>Pourquoi un certificat ?</h2>
+<p>
+ En plus du serveur web sécurisé, Polytechnique.org met à ta disposition
+ d'autres services sécurisés comme le <a href="doc_smtp.php">
+ serveur SMTP</a> ou le <a href="doc_nntp.php">serveur de news</a>.
+ A ces services sont associées des clés de chiffrement et pour garantir
+ l'authenticité de ces clés, nous les signons avec notre certificat.
+</p>
+
+<h2>Notre certificat</h2>
+<p>
+ A l'installation, ton logiciel de courrier électronique n'a pas connaissance
+ du certificat SSL de Polytechnique.org et il faut donc le lui fournir. Si ton
+ logiciel de courrier électronique fonctionne de pair avec ton navigateur web
+ (Outlook Express avec Internet Explorer, Netscape Mail avec Navigator, Mozilla
+ Mail avec Mozilla, etc..) il te suffit de cliquer <a href="{"cacert.php/cacert.cer"|url}">ici</a>
+ pour télécharger et installer notre certificat.
+</p>
+<h2>Sous windows</h2>
+<p>
+Après avoir cliqué sur <a href="{"cacert.php/cacert.cer"|url}">ce lien</a>, tu vas recevoir notre
+ certificat. Ton navigateur devrait te demander si tu veux télécharger ce fichier,
+ clique sur "ouvrir" :
+</p>
+<div class="center">
+ <img src="{"images/docs_ssl_dl.png"|url}" alt="[téléchargement]" />
+</div>
+<p>
+ Ceci devrait t'ouvrir la fenêtre suivante.
+</p>
+<div class="center">
+ <img src="{"images/docs_ssl_install.png"|url}" alt="[Certificat]" />
+</div>
+<p>
+ Choisis d'installer le certificat, cliques autant de fois sur "suivant" que nécessaire,
+ tu devrais alors voir la fenêtre suivante apparaître, valide-la.
+ Un message apparaît alors, te signifiant que tout s'est bien déroulé
+</p>
+<div class="center">
+ <img src="{"images/docs_ssl_accept.png"|url}" alt="[Valider]" />
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Développements en cours</h1>
+
+<p>
+L'équipe Polytechnique.org t'informe des nouveaux services qu'elle est en
+train de mettre en place. Si tu as des idées d'améliorations ou de services que
+nous pourrions développer ou installer, nous t'invitons à nous en faire part
+<a href="mailto:info_developpement@polytechnique.org">en nous écrivant</a> !
+</p>
+
+<h2>Site de l'emploi</h2>
+
+<p>
+Nous travaillons en collaboration avec l'AX à la mise au point d'un portail
+de l'emploi qui permettra à tous nos camarades de déposer en ligne des CVs,
+de consulter des offres d'emploi, de la documentation, et bien plus encore.
+Ce site devrait voir le jour au printemps.
+</p>
+
+
+<h2>Rendre notre site personnalisable</h2>
+
+<p>
+Actuellement nous sommes en train de faire en sorte que notre site web soit
+réutilisable par une autre assocation d'anciens. Nous faisons donc en sorte
+qu'il soit personnalisable aux couleurs et textes d'une autre école.
+Nous prévoyons de publier nos sources sous licence de logiciel libre.
+</p>
+
+
+<h2>Répondeur automatique pour les courriers électroniques</h2>
+
+<p>
+Il s'agit d'un service que tu pourras activer durant tes absences (vacances,
+voyages professionnels, ...) et qui transmettra un message d'information de
+ton choix aux personnes essayant de te joindre par email.
+</p>
+
+
+<h2>Intégration des PDA</h2>
+
+<p>
+Une fois cette fonction finalisée, il te sera possible d'exporter tes contacts
+vers ton agenda électronique.
+</p>
+
+
+<h2>Site WAP</h2>
+
+<p>
+Nous sommes en train de créer une version allégée du site qui sera accessible
+plus facilement depuis les téléphones mobiles supportant le WAP. Nous comptons
+rendre accessible l'annuaire en ligne, la modification de ses adresses emails
+de redirection, et enfin les contacts.
+</p>
+
+
+<h2>Services aux groupes X</h2>
+
+<p>
+Le site <a href="http://www.polytechnique.net/">www.polytechnique.net</a>
+va regrouper rapidement l'ensemble des services aux groupes X. Ainsi l'ensemble
+des services plutôt orientés vers l'individu seront accessibles depuis le
+présent site "X.org", alors que les services aux groupes seront concentrés sur
+"X.net".
+</p>
+
+
+<h2>Filtrage des courriers électroniques</h2>
+
+<p>
+Nous développons un logiciel, nommé Philter, qui te permettra bientôt de créer
+des règles de filtrage des courriers électroniques que tu reçois sur ton
+adresse polytechnicienne, en fonction de critères comme l'expéditeur, le
+sujet du message, etc...
+</p>
+
+
+<h2>Et toujours...</h2>
+
+<p>
+Nous continuons, bien entendu, à travailler à l'amélioration des fonctionnalités
+existantes !
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<p>
+L'association Polytechnique.org fournit à la communauté divers <strong>services</strong>, cette
+page les liste et te permet de connaitre les engagements pris par les administrateurs quant à la
+maintenance de ces services.
+</p>
+<p>
+Cette association est constituée de membres bénévoles, nous nous engageons donc à fournir ces
+services dans la limite de nos disponibilités respectives, en mettant un point d'honneur à
+fournir un <strong>service mail continu</strong>.
+</p>
+
+<h1>
+ Annuaire
+</h1>
+<p>
+Le site te permet de réaliser des recherches sur tous les camarades <strong>inscrits</strong>,
+ces recherches portant non seulement sur leur nom ou leur prénom, mais aussi sur des critères de binet, de lieu de
+résidence ou même de section sportive à l'X.
+</p>
+<h2>Profil, et photo</h2>
+<p>
+Tu as accès à une page te permettant de modifier ton <strong>profil</strong>. La mise à jour de
+ces informations t'es confiée : plus tu les tiens complètes et à jour, plus le site est d'intérêt.
+</p>
+<p>
+Pour des raisons légales nous sommes obligés de vérifier et de modérer les photos soumises une à
+une (droits d'auteurs par exemple). Il y a donc un délai entre le moment où ta photo est soumise
+et le moment où tu la verras réellement aparaitre sur le site. (En général, la validation d'une
+photo est réalisée sous quelques heures en journée).
+</p>
+
+<h1>
+ Services liés au mail
+</h1>
+<h2>Redirection à vie</h2>
+<p>
+Une adresse prenom.nom.promo@polytechnique.org (ou @m4x.org) t'es fournie à vie par Polytechnique.org.
+L'alias prenom.nom@polytechnique.org ou @m4x.org est aussi disponible, mais non garanti. En effet, en
+cas d'homonyme, le premier arrivé sur le site gardera son alias prenom.nom pendant 1 mois, ce après quoi il
+lui sera retiré. Ensuite c'est un robot qui répond aux mails envoyés à cette adresse pour signaler la
+présence d'un homonyme à l'auteur du mail, permettant ainsi que les mails arrivent bien à leur
+destinataire et non à un autre polytechnicien du même nom. <strong>Le critère d'attribution que nous avons retenu est
+donc la devinabilité de l'adresse !</strong>
+</p>
+<p>
+Les femmes qui se marient n'ont qu'à renseigner leur nom de mariage sur leur fiche de profil pour obtenir immédiatement
+(après validation de la demande par un administrateur - pour éviter tout abus), un alias prenom.nom_de_femme_mariée en plus de
+leur alias prenom.nom_de_jeune_fille qu'elle conserveront bien entendu.
+</p>
+<p>
+Pour les personnes ayant des patronymes particulièrement longs, il est possible de créer un alias
+prenom.nom_usuel à la manière des femmes mariées. Il suffit de nous en faire la demande en écrivant à
+{mailto address='support@polytechnique.org' encode='hex'}. Pour les autres, préférer plutôt l'utilisation
+d'un alias melix.
+</p>
+<h2>Alias melix</h2>
+<p>
+Les alias melix permettent de créer une nouvelle adresse plus courte, et pourquoi pas fantaisiste. Ce sont
+des adresses qui utilisent tes redirections d'adresses en polytechnique.org et m4x.org. Il est
+possible d'en avoir une par personne. Chaque demande d'alias melix doit être validé par un
+administrateur.
+</p>
+<h2>Protection antivirale et antispam</h2>
+<p>
+Un logiciel antivirus est installé sur Polytechnique.org. Il vise à te
+protéger des virus informatiques, qui ont souvent des effets destructeurs.
+Il filtre chacun des emails que tu reçois à tes adresses polytechnique.org,
+m4x.org, et melix.org et .net si tu as ouvert un tel alias. Il n'est pas
+possible de garantir que ce logiciel est efficace à 100% : il est par
+exemple possible que notre antivirus laisse passer quelques virus trop
+récents dont il n'a pas encore la connaissance... Un antivirus n'est jamais
+parfait, et nous ne pouvons être tenus responsables dans le cas où un virus
+arriverait dans ta boîte aux lettres.
+</p>
+<p>
+Un logiciel antispam est en cours d'installation. Plusieurs tests ont été
+menés avec succès. Il sera bientôt installé en production, et pourra être
+activé par chacun des utilisateurs, de manière individuelle.
+</p>
+
+<h1>
+ Forums
+</h1>
+<p>
+Les forums visent à favoriser les échanges entre X, sur des thèmes aussi
+variés que la vie de promotion, l'emploi, les loisirs, etc...
+La charte d'utilisation des forums est <a href="{"docs/doc_forums.php"|url}">accessible ici</a>.
+</p>
+
+<h1>
+ Qualité de service
+</h1>
+<h2>Temps de réponse</h2>
+<p>
+Nous cherchons dans la mesure du possible à répondre le plus rapidement à toutes les questions
+des utilisateurs de Polytechnique.org. En temps normal, nous répondons aux couriers qui nous sont adressés
+dans la semaine. Il ne faut pas hésiter à nous contacter par le biais des <strong>forums</strong>
+où d'autres utilisateurs avertis pourront vous répondre.
+</p>
+<p>
+Quelques services sont soumis à la modération des administrateurs (changement de photo, alias
+mélix, femmes mariées, demande de Mailing list, etc ...). Nous essayons dans la mesure du
+possible de valider ces demandes dans les heures qui suivent en journée.
+</p>
+<h2>Éthique</h2>
+<p>
+L'association Polytechnique.org est très attentive à maintenir un <strong>engagement
+ éthique de très haut niveau</strong>.
+</p>
+<p>
+Dans cette optique, nous tenons à rappeler que nous sommes notamment
+vigilants à l'égard de toute pratique de <strong>spam</strong>. Les lois contre le spam
+devenant de plus en plus en sévères, celles-ci nous donnent la possibilité de
+défendre nos abonnés contre les pratiques de ce genre.
+</p>
+<p>
+D'autre part, toutes les données contenues sur le site sont soumises aux
+lois sur l'informatique et la liberté du 6 janvier 1978. Aucune donnée concernant
+un polytechnicien n'est transmise à un tiers sans son accord. Toutes les informations
+publiques de ce site sont soumises à une <strong>règle d'usage strictement individuel et
+ privé</strong>. Toute utilisation commerciale de ces données est formellement interdite.
+</p>
+<p>
+Pour tout problème ou complément éthique, une adresse est à votre disposition,
+il s'agit de {mailto address="abuse@polytechnique.org"}.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Foire aux questions</h1>
+<p>
+Cette rubrique est sans doute incomplète. N'hésite pas à nous demander
+de la compléter sur un sujet en rapport avec le site si tu estimes
+que des informations manquent.
+</p>
+<hr />
+<h2>Problèmes de connexion</h2>
+<ul>
+ <li>
+ <a href="#config">Quels sont les paramètres et la configuration nécessaires
+ pour se connecter correctement ?</a>
+ </li>
+ <li>
+ <a href="#passe">J'ai perdu mon mot de passe, que faire ?</a>
+ </li>
+ <li>
+ <a href="#acces">Je n'arrive pas à me connecter ! Que faut-il essayer ?</a>
+ </li>
+</ul>
+<h2>Questions générales</h2>
+<ul>
+ <li>
+ <a href="#pop">Comment récupérer mon courrier sur polytechnique.org ?</a>
+ </li>
+ <li>
+ <a href="#smtp">Comment envoyer mon courrier avec comme champ expéditeur
+ (From) mon adresse en polytechnique.org ?</a>
+ </li>
+ <li>
+ <a href="#nntp">Comment lire les forums avec mon logiciel de courrier éléctronique ?</a>
+ </li>
+ <li>
+ <a href="#carva">Quelle est l'origine du nom de domaine carva.org ?</a>
+ </li>
+</ul>
+<h2>Remplissage des champs</h2>
+<ul>
+ <li>
+ <a href="#mails1">Quelle est la différence entre les mails promo, emploi,
+ et les autres mails collectifs ?</a>
+ </li>
+ <li>
+ <a href="#flags">Quelle est la différence entre les cases de visibilité vert ou orange ?</a>
+ </li>
+ <li>
+ <a href="#niveau_langue">A quoi correspondent les niveaux de langues ?</a>
+ </li>
+ <li>
+ <a href="#cv">Faut-il remplir le CV et comment ?</a>
+ </li>
+</ul>
+<h2>Utilisation post-connexion</h2>
+<ul>
+ <li>
+ <a href="#ethique">Quelle est l'éthique que vous privilégiez pour les mails
+ collectifs ?</a>
+ </li>
+ <li>
+ <a href="#mails2">Puis-je envoyer un mail à des X et comment ?</a>
+ </li>
+ <li>
+ <a href="#secu">Puis-je utiliser le même mot de passe qu'ailleurs ?</a>
+ </li>
+ <li>
+ <a href="#secu2">Quel est le niveau de sécurité de Polytechnique.org ?</a>
+ </li>
+ <li>
+ <a href="#panne">Vous tombez souvent en panne ?</a>
+ </li>
+</ul>
+<br /><br />
+<hr />
+<a id="connect"></a>
+<h1>Problèmes de connexion</h1>
+<a id="config"></a>
+<h2>
+ Quels sont les paramètres et la configuration nécessaires pour se connecter
+ correctement ?
+</h2>
+<div class="explication">
+ <p>
+ Il faut un navigateur qui exécute le javascript.
+ Ce point est absolument nécessaire pour accéder au site sans problème.
+ Il y a de grandes chances que ton problème vienne de là, nous te conseillons de
+ vérifier déjà que ce paramètre est bien activé avant de continuer.
+ </p>
+</div>
+<a id="passe"></a>
+<h2>
+ J'ai perdu mon mot de passe, que faire ?
+</h2>
+<div class="explication">
+ <p>
+ Rends toi sur la page "me connecter", là où tu aurais tapé ton mot de passe
+ si tu t'en souvenais. Il y a un lien "j'ai perdu mon mot de passe". Clique
+ dessus. Il te sera alors proposé une procédure de récupération automatique
+ de ton mot de passe !
+ </p>
+</div>
+<a id="acces"></a>
+<h2>
+ Je n'arrive pas à me connecter ! Que faut-il essayer ?
+</h2>
+<div class="explication">
+ <p>
+ Bon, il y a beaucoup de possibilités, on va les prendre dans l'ordre.
+ </p>
+ <p>
+ As-tu déjà accédé au site ?
+ </p>
+ <p>
+ Si oui, vérifie que tu rentres correctement ton login (début de ton adresse
+ en polytechnique.org sans @polytechnique.org) et ton mot de passe. Un
+ copier/coller avec un espace de trop est vite fait, un clavier qwerty au lieu
+ d'azerty ou l'inverse aussi, et la touche "CAPS LOCK" enfoncée n'arrange pas
+ non plus les choses.
+ </p>
+ <p>
+ Une fois que tu es sûr de ton mot de passe et de ton login, vérifie que ton
+ browser exécute correctement le javascript. Par exemple, la date est-elle
+ correctement affichée en haut de la page ? Le javascript est complètement
+ nécessaire, car ton mot de passe doit être crypté localement pour ne pas
+ passer en clair sur Internet. C'est à ça qu'il sert notamment pour la
+ connexion.
+ </p>
+ <p>
+ Sinon, tu n'es peut-être pas inscrit (en es-tu vraiment sûr ?). Pour
+ le savoir, vérifie que ton adresse en polytechnique.org répond. Si c'est le
+ cas, tu es inscrit, sinon rends-toi sur la page d'inscription : pour une
+ raison quelconque, ton inscription n'existe pas dans notre base. Tu viens de
+ t'inscrire et l'accès ne marche pas ? Attention, tu n'as pas dû confirmer ta
+ pré-inscription. Une inscription ce n'est pas juste un formulaire à remplir
+ et puis voilà. C'est un échange de mails ensuite, et enfin la visite d'une
+ page web bien précise reçue par e-mail. Si tu n'as rien reçu par e-mail, tu
+ t'es trompé dans ton adresse e-mail ou alors elle était en panne au moment
+ où le serveur t'a envoyé l'e-mail de demande de confirmation. Vérifie que tu
+ as reçu une confirmation par mail et que tu l'as bien effectuée. Ton login/mot
+ de passe n'est actif qu'après. Dans le cas contraire, refais une inscription,
+ de toute façon, les doublons ne peuvent pas exister.
+ </p>
+</div>
+<hr />
+<h1>Questions générales</h1>
+<a id="pop"></a>
+<h2>Comment récupérer mon courrier sur polytechnique.org ?</h2>
+<div class="explication">
+ <p>
+ Les mails envoyés sur polytechnique.org sont redirigés vers la ou les adresses e-mails
+ que tu as précisée(s) dans ton profil (premier sous-menu dans "Mes Paramètres"). Tu
+ dois donc récupérer ton courrier sur cette (ces) adresse(s) comme tu en as l'habitude,
+ aucun changement n'est introduit par l'existence de ton adresse sur polytechnique.org.
+ </p>
+</div>
+<a id="smtp"></a>
+<h2>
+ Comment envoyer mon courrier avec comme champ expéditeur (From) mon adresse en
+ polytechnique.org ?
+</h2>
+<div class="explication">
+ <p>
+ Normalement, il suffit de <a href="{"docs/doc_emails.php"|url}">configurer son identité</a>
+ avec l'adresse en polytechnique.org, mais certains serveurs SMTP
+ (la première machine qui prend en charge l'expédition du courrier)
+ refusent que le champ From contienne une adresse quelconque
+ (c'est le cas de ifrance, dont le serveur smtp.ifrance.com n'accepte que
+ les champs contenant une adresse @ifrance.com). Dans ce cas, tu peux utiliser
+ <a href="{"docs/doc_smtp.php"|url}">le serveur SMTP de polytechnique.org</a>.
+ Quand tu n'as pas accès au un logiciel de courrier électronique, tu peux aussi
+ utiliser <a href="{rel}/emails/send.php">cette page</a> pour envoyer un petit courriel.
+ </p>
+</div>
+
+<a id="nntp"></a>
+<h2>
+ Comment lire les forums avec mon logiciel de courrier électronique ?
+</h2>
+<div class="explication">
+ <p>
+ En complément de l'interface web il t'est possible d'accéder aux forums
+ de Polytechnique.org directement depuis ton logiciel de courrier
+ électronique. Les explications se trouvent
+ <a href="{"docs/doc_nntp.php"|url}">ici</a>.
+ </p>
+</div>
+
+<a id="carva"></a>
+<h2>
+ Quelle est l'origine du nom de domaine carva.org ?
+</h2>
+<div class="explication">
+ <p>
+ Dans le jargon de l'école, un 'carva' signifiait un 'X' lorsque celle-ci était
+ sur la montagne Ste Geneviève. <br /><br />
+ </p>
+ <p>
+ <strong>Définition de Carva:</strong>
+ </p>
+ <ul>
+ <li>
+ Mod. Ecole polytechnique, ou, n. Polytechnique (argot: l'X, Pipo, et, pour
+ les élèves Carva), nom donné en 1795 à l'école créée en 1794 pour former
+ les ingénieurs des divers services de l'Etat (mines, ponts et chaussées...)
+ et les officiers de certain armes (artillerie, génie...); Pépinière, cit. 2,
+ Balzac). Préparation à Polytechnique.
+ </li>
+ <li>
+ Taupe. Elève ancien élève de Polytechnique. Promotions ("rouge" et "jaune")
+ de Polytechnique; Polytechnique et Normale (® Elite, cit.)
+ </li>
+ <li>
+ Sortir de Polytechnique. 6. Botte, 2. bottier. 1. Je n'ose confier qu'à vous
+ le secret de sa nullité, abritée par le renom de l'Ecole Polytechnique.
+ (Balzac, Le Curé de village, Pl. t. VIII, p. 695).
+ </li>
+ </ul>
+ <p>
+ (Dictionnaire de la langue française, Le Robert, Paris 1987)
+ </p>
+</div>
+<hr />
+<h1>Remplissage des champs</h1>
+<a id="mails1"></a>
+<h2>
+ Quelle est la différence entre les mails promo, emploi, et les autres mails collectifs ?
+</h2>
+<div class="explication">
+ <p>
+ Les mails promo concernent des événements promo, réunion, informations sur les
+ cocons, bref la vie d'une promo. Il y a seulement quelques personnes par promo qui
+ peuvent les envoyer, pour éviter que chacun le fasse de son côté. Le mieux si tu
+ souhaites envoyer une information à toute ta promo, est de passer par un kessier
+ ou un responsable du web de ta promo, qui se chargera éventuellement de nous demander
+ un envoi propre à tous les inscrits ayant accepté les mails promo dans leur profil.
+ </p>
+ <p>
+ Les mails emplois sont assez mal définis à l'heure actuelle. Ca peut aller de
+ proposition d'embauche ou de stage venant de camarades ou d'entreprises, jusqu'à
+ présentation d'entreprises. Dans la mesure du possible, ces mails seront dirigés
+ vers les mailings lists correspondantes du secteur intéressé, et à défaut aux
+ e-mails des profils d'inscrits appropriés ayant par ailleurs accepté ce type de
+ mail collectif.
+ </p>
+ <p>
+ Tous les autres mails collectifs, c'est-à-dire envoyer un mail à une liste de
+ destinataires, ensemble ou individuellement, supérieure à 20, ne sont pas
+ autorisés (sauf évidemment mailing lists).
+ </p>
+</div>
+<a id="flags"></a>
+<h2>
+ Quelle est la différence entre les cases de visibilité ?
+</h2>
+<div class="explication">
+ <p>
+ Pour chaque information, il est possible de choisir son degré de visibilité.
+ Certaines informations peuvent être mises sur le site public accessible par
+ les non-polytechniciens : si tu le souhaites, coche la case verte "site
+ public" correspondante. Ces informations peuvent par ailleurs être
+ transmises à l'AX pour la mise à jour de l'annuaire papier et de son
+ annuaire en ligne sur polytechniciens.com : si tu le souhaites, coche la
+ case orange "transmis à l'AX".
+ Certains champs sont rouges comme le CV, c'est-à-dire qu'ils sont
+ exclusivement vus sur la partie privée de Polytechnique.org, réservée
+ aux polytechniciens.
+ </p>
+</div>
+<a id="niveau_langue"></a>
+<h2>
+ A quoi correspondent les niveaux de langues ?
+</h2>
+<div class="explication">
+ <ul>
+ <li>Niveau 6 : Maîtrise complète de la langue.
+ <p>Tu comprends tout ce que tu lis ou écoutes dans des
+ domaines variés. Tu saisis les nuances de la langue et
+ interprétes avec finesse des documents complexes.
+ Tu t'exprimes spontanément avec justesse et fluidité.
+ Tu sais argumenter sur des sujets complexes.
+ </p>
+ </li>
+ <li>Niveau 5 : Bonne maîtrise de la langue.
+ <p>
+ Tu comprends dans le détail des textes complexes et des
+ productions orales sur des sujets relatifs à la vie sociale et
+ professionnelle.
+ Tu t'exprimes avec assurance et précision sur des sujets
+ variés.
+ </p>
+ </li>
+ <li>Niveau 4 : Maîtrise générale de la langue.
+ <p>
+ Tu comprends les informations détaillées des textes ou des
+ productions orales traitant d'un sujet familier, concret ou
+ abstrait.
+ Tu t'exprimes clairement sur des sujets en relation avec
+ ton
+ domaine d'intérêt.
+ </p>
+ </li>
+ <li>Niveau 3 : Maîtrise limitée de la langue.
+ <p>
+ Tu comprends les informations significatives des textes et des
+ productions orales se rapportant à des situations connues ou
+ prévisibles.
+ Tu t'exprimes de manière compréhensible sur des sujets de
+ la vie quotidienne.
+ </p>
+ </li>
+ <li>Niveau 2 : Maîtrise des structures de base de la langue.
+ <p>
+ Tu comprends les informations pratiques de la vie courante
+ dans les messages simples.
+ Tu peux te faire comprendre dans des situations familières
+ et prévisibles.
+ </p>
+ </li>
+ <li>Niveau 1 : Connaissance basique de la langue.
+ <p>
+ Tu comprends de courts énoncés s'ils sont connus et répétés.
+ Tu sais exprimer des besoins élémentaires.
+ </p>
+ </li>
+ </ul>
+</div>
+
+<a id="cv"></a>
+<h2>
+ Faut-il remplir le CV et comment ?
+</h2>
+<div class="explication">
+ <p>
+ D'abord, le CV reste d'accès limité aux inscrits, il n'est pas possible de
+ l'afficher dans les recherches publiques. D'autre part, nous ne le transmettrons
+ jamais, à quiconque.
+ </p>
+ <p>
+ Ton CV complet, si tu veux le mettre, a plutôt sa place sur ta page web et pas
+ sur Polytechnique.org. L'idée du CV ici, c'est surtout d'avoir des mots-clés qui
+ permettent de faire des recherches plus évoluées. Ainsi, les loisirs peuvent être
+ mis dans le champ CV aussi bien que des expériences professionnelles et autres.
+ Un remplissage succinct comme ci-dessous est donc bien adapté au champ en question.
+ Néanmoins, la place dans nos bases de données n'est pas limitée et sois libre de
+ remplir ce champ avec toutes les informations que tu souhaites. A priori, tu ne
+ peux qu'y gagner.
+ </p>
+ <div class="center">
+ <textarea name="cv_example" rows="7" cols="34" readonly="readonly">
+ * internet e-commerce startup
+ 1996-1999 Amazon.com USA Washington Ingénieur
+ 1999-2001 ... ...
+
+ * loisirs
+ parapente cinéma styx ...
+
+ * ...
+ </textarea>
+ </div>
+</div>
+<hr />
+<h1>Utilisation post-connexion</h1>
+<a id="ethique"></a>
+<h2>
+ Quelle est l'éthique que vous privilégiez pour les mails collectifs ?
+</h2>
+<div class="explication">
+ <p>
+ Nous ne faisons pas d'éthique. C'est à toi de dire ce que tu es prêt à recevoir
+ et pas à nous. Les règles imposées concernent avant tout le bon fonctionnement
+ du service, aussi bien du point de vue purement technique (surcharge) que
+ satisfaction des inscrits (publi-mailing).
+ </p>
+</div>
+<a id="mails2"></a>
+<h2>
+ Puis-je envoyer un mail à des X et comment ?
+</h2>
+<div class="explication">
+ <p>
+ Oui, bien sûr. Si tu as une information promo, envoie-la aux responsables web
+ de ta promo (qui ne sont pas forcément des kessiers) qui se chargeront de l'envoi
+ avec nous (ils jouent le rôle de filtre pour éviter que chaque personne ne
+ décide de son côté d'envoyer un mail promo). Cependant, nous faisons remarquer
+ que des outils de communication promo sont ou seront mis en place sur le site.
+ Comme le message au login, ou les forums. Evite les mails promo quand tu peux !
+ </p>
+ <p>
+ Tu veux recruter des X pour des stages ou des embauches ? Il n'y a pas de règle
+ générale dans ce domaine, il faut nous contacter pour voir à qui on peut l'envoyer.
+ Si tu es inscrit, tu peux commencer par l'envoyer à une mailing list bien choisie
+ si elle existe déjà... Sinon, s'il faut tirer des profils de la base de données
+ correspndant à ta demande, car tu n'as pas accès aux champs d'autorisation de
+ mail emploi. Ne fais surtout pas ta sélection toi-même au moyen des recherches
+ puis un envoi massif, tu inclurais ainsi des gens qui ne sont pas d'accord pour
+ recevoir ce type de mail, en plus de ne pas respecter les conditions générales
+ du service.
+ </p>
+ <p>
+ Tu as besoin d'envoyer un mail à 50 X assez souvent ? Malheureusement pour ton
+ mail, la configuration actuelle va bloquer au bout du 20ème mail. Ce besoin est
+ exactement celui d'une mailing list. Pour l'instant, coupe ton mail en plusieurs
+ envois.
+ </p>
+</div>
+<a id="secu"></a>
+<h2>
+ Puis-je utiliser le même mot de passe qu'ailleurs ?
+</h2>
+<div class="explication">
+ <p>
+ D'une manière générale, le système le mieux sécurisé pâtit de l'utilisation du
+ même mot de passe dans un système moins sécurisé. En effet, le système sécurisé
+ ne craint pas normalement que ton mot de passe soit percé. Par contre, en
+ l'utilisant dans un autre système moins sécurisé, tu diminues d'autant la sécurité
+ du premier (puisqu'il suffit de trouver le mot de passe sur le second pour accéder
+ au premier). Le site www.polytechnique.org a actuellement une sécurité très forte
+ pour ton mot de passe (plus forte qu'un site bancaire par exemple), vu que celui-ci
+ est crypté irréversiblement (contrairement à HTTPS qui est réversible). Ainsi, si
+ tu utilises le même mot de passe qu'ailleurs, c'est Polytechnique.org qui risque
+ d'en être victime. Mais d'un autre côté, nous avons forcé sur la sécurité alors que
+ les informations derrière sont finalement peu stratégiques (pas de mot de passe
+ visible, pas de numéro de carte bancaire). Donc, à notre avis, tu peux utiliser
+ le même mot de passe qu'ailleurs, le risque est limité pour nous et nul pour
+ l'autre système.
+ </p>
+</div>
+
+<a id="secu2"></a>
+<h2>
+ Quel est le niveau de sécurité de Polytechnique.org ?
+</h2>
+<div class="explication">
+ <p>
+ Concernant le mot de passe de l'utilisateur : le plus élevé imaginable puisqu'il
+ circule de manière cryptée irréversible. En fait, avant même d'être envoyé sur
+ Internet, ton ordinateur le chiffre sur place irréversiblement grâce au javascript
+ (d'où son utilité pour se connecter). Puis il est mélangé à un challenge envoyé par
+ le serveur, et enfin seulement la réponse part sur le Web.
+ </p>
+ <p>
+ Concernant la protection des informations du site en général, le niveau de sécurité
+ est correct par rapport au type d'information contenu. Il est possible de simuler
+ un accès à partir de la connaissance d'un mot de passe crypté et d'un challenge,
+ mais comme d'un autre côté de nombreuses informations sont publiques, y a-t-il
+ vraiment intérêt à développer toute cette ingénierie pour si peu ?
+ </p>
+</div>
+
+<a id="panne"></a>
+<h2>
+ Vous tombez souvent en panne ?
+</h2>
+<div class="explication">
+ <p>
+ En fait, il arrive au service d'être interrompu, bien que nous n'y puissions rien.
+ En un an, on a dénombré quatre arrêts de deux jours dus à nos prestataires, et un
+ dû à notre changement important de configuration, serveur, scripts, etc.... Il faut
+ savoir que dans ce cas, le mail n'est en général pas perdu (quand il est perdu,
+ l'envoyeur est informé). Il arrive en retard de deux jours, ce qui peut être assez
+ gênant mais reste vraiment exceptionnel. Quant à l'accès web, il est maintenant
+ complètement indépendant de l'e-mail. Il se peut donc tout à fait que le site web
+ ne réponde pas tout en pouvant utiliser l'e-mail normalement. En tout cas, ces cas
+ de figure sont rares et ont toujours été prévus et prévenus (maintenance régulière).
+ Tous les développeurs de polytechnique.org ne peuvent plus se passer de leur adresse
+ sur ce site, et nous recevons tous largement une cinquantaine de mails par jour, donc
+ un jour d'arrêt vaut au moins 100 mails le suivant.
+ </p>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Documentations et Aides diverses
+</h1>
+
+<table class="bicol" summary="Docs: Services" >
+ <tr>
+ <th colspan="2">Utilisation des services de Polytechnique.org
+ </th>
+ </tr>
+ <tr class="impair">
+ <td class="half">
+ <div class="lien">
+ <a href="doc_emails.php">Mes adresses de redirection</a>
+ </div>
+ <div class="explication">
+ Comment les utiliser, à quoi servent elles, etc ...
+ </div>
+ </td>
+ <td><div class="lien">
+ <a href="doc_melix.php">Mon alias mail @melix.net</a>
+ </div>
+ <div class="explication">
+ Quel intéret par rapport à mon adresse @polytechnique.org ?
+ </div>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td>
+ <div class="lien">
+ <a href="doc_gratuits.php">Services d'emails gratuits</a>
+ </div>
+ <div class="explication">
+ Pourquoi et comment choisir un service d'e-mail gratuit
+ </div>
+ </td>
+ <td><div class="lien">
+ <a href="doc_patte_cassee.php">Patte cassée</a>
+ </div>
+ <div class="explication">
+ Détection des adresses de redirections en panne !
+ </div>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td>
+ <div class="lien">
+ <a href="doc_carva.php">Ma redirection de page WEB</a>
+ </div>
+ <div class="explication">
+ Charte et utilisation de la redirection WEB http://www.carva.org/prenom.nom
+ </div>
+ </td>
+ <td>
+ <div class="lien">
+ <a href="doc_forums.php">Utilisation des forums</a>
+ </div>
+ <div class="explication">
+ Charte et règles de bon usage des forums de Polytechnique.org
+ </div>
+ </td>
+ </tr>
+</table>
+
+<br />
+<table class="bicol" summary="Docs: Services sécurisés">
+ <tr>
+ <th colspan="2">Utilisation des services <em>sécurisés</em> de Polytechnique.org
+ </th>
+ </tr>
+ <tr class="impair">
+ <td colspan="2">
+ <div class="lien">
+ <a href="doc_ssl.php">Certificat de sécurité</a>
+ </div>
+ <div class="explication">
+ <strong>Avant toute chose</strong>, il faut configurer ton système pour accepter notre certificat de sécurité !
+ </div>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="half">
+ <div class="lien">
+ <a href="doc_smtp.php">SMTP sécurisé</a>
+ </div>
+ <div class="explication">
+ Le SMTP est la machine sur laquelle se connecte ton
+ logiciel de courrier électronique pour envoyer le courrier.
+ </div>
+ </td>
+ <td><div class="lien">
+ <a href="doc_nntp.php">NNTP sécurisé</a>
+ </div>
+ <div class="explication">
+ Il permet de lire les <a href="{"banana/"|url}">forums</a> directement
+ dans un logiciel comme Outlook Express ou Netscape.
+ </div>
+ </td>
+ </tr>
+</table>
+
+<br />
+<table class="bicol" summary="Docs: Services sécurisés">
+ <tr>
+ <th colspan="2">Utiliser des logiciels de courrier/news avec Polytechnique.org
+ </th>
+ </tr>
+ <tr class="impair">
+ <td class="half">
+ <div class="lien">
+ <a href="doc_oe.php">Outlook Express</a>
+ </div>
+ <div class="explication">
+ Configurer Outlook Express pour utiliser le SMTP et le NNTP sécurisés de
+ Polytechnique.org.
+ </div>
+ </td>
+ <td><div class="lien">
+ <a href="doc_nn.php">Netscape/Mozilla</a>
+ </div>
+ <div class="explication">
+ Configurer Netscape ou Mozilla pour utiliser le SMTP et le NNTP sécurisés de
+ Polytechnique.org.
+ </div>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="half">
+ <div class="lien">
+ <a href="doc_pocketpc.php">Pocket PC</a>
+ </div>
+ <div class="explication">
+ Configurer Windows pour utiliser le SMTP sécurisé de
+ Polytechnique.org sur un Pocket PC.
+ </div>
+ </td>
+ </tr>
+</table>
+<br />
+
+{include file="docs/faq.tpl"}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+{if $smarty.request.txt}
+
+<p>{$smarty.request.txt}</p>
+<p><a href="#" onclick="self.close()">Fermer cette fenêtre</a></p>
+
+{else}
+<script language="JavaScript" type="text/javascript">
+ <!--
+ function textpopup(desc)
+ {ldelim}
+ var w = window.open("plan.php?txt="+desc, "textpopup" url="resizable,menubar=no,status=no,width=400,height=200");
+ w.focus();
+ return true;
+ {rdelim}
+ //-->
+</script>
+
+
+<ol>
+ <li><a href="#perso">Informations personnelles</a>
+ </li>
+ <li><a href="#services">Services</a>
+ </li>
+ <li><a href="#communaute">Communauté X</a>
+ </li>
+ <li><a href="#general">Informations générales</a>
+ </li>
+ <li><a href="#doc">Documentation</a>
+ </li>
+ <li><a href="#asso">L'association Polytechnique.org</a>
+ </li>
+</ol>
+
+<br/>
+
+<h1>
+ Informations personnelles
+</h1>
+
+<ul>
+ {page title="Mon profil" url="profil.php"|url}
+ Cette page permet de modifier les informations publiques te concernant, comme tes coordonnées url=ta formation, etc...
+ {/page}
+
+ {page title="Mon carnet" url="carnet/"|url}
+ A travers cette page tu peux gérer la liste de tes contacts X. Cela te permettra d'accéder
+ plus facilement à ces personnes sur les pages de ce site. Cette liste est aussi disponible en
+ format imprimable.
+ {/page}
+
+ {page title="Mes contacts en version imprimable (PDF)" url="carnet/mescontacts_pdf.php"|url}
+ Cette page crée un document PDF imprimable avec la liste de tes contacts. Tu dois avoir Acrobat
+ sur ton ordinateur pour pouvoir bénéficier de ce service. Si tu n'as pas ce logiciel, tu peux
+ le télécharger gratuitement sur le site d'Adobe.
+ {/page}
+
+ {page title="Mes préférences" url="preferences.php"|url}
+ Sur cette page tu pourra configurer le site Polytechnique.org pour qu'il s'adapte à tes
+ besoins.
+ {/page}
+
+ <li>
+ <ul>
+ {page title="Mes adresses de redirection" url="emails.php"|url}
+ Cette page te permet de configurer les adresses mails sur lesquelles pointent tes adresses
+ Polytechnique.org.
+ {/page}
+
+ {page title="Mon alias mail @melix.net/.org" url="alias.php"|url}
+ Tu peux bénéficier d'adresses mail conviviales @melix.net ou @melix.org, pour cela il te
+ suffit de faire une demande sur cette page.
+ {/page}
+
+ {page title="Ma redirection de page WEB" url="acces_redirect.php"|url}
+ De la même manière que pour la redirection d'adresse mail, tu peux bénéficier de la
+ redirection à vie de site web. Cette page est là pour t'y aider.
+ {/page}
+
+ {page title="Apparence du site (skins)" url="skins.php"|url}
+ Que tu aimes les pingouins ou que tu préfères le site sous une apparence plus traditionnelle url=tu trouvera de quoi mettre le site Polytechnique.org à ton gout !
+ {/page}
+
+ {page title="Changer mon mot de passe pour le site" url="motdepassemd5.php"|url}
+ Grâce à cette page, tu peux changer le mot de passe qui te permet d'accéder au site
+ Polytechnique.org ainsi que les groupes X associés.
+ {/page}
+
+ {page title="Activer l'accès SMTP et NNTP" url="acces_smtp.php"|url}
+ Pour pouvoir envoyer des mails en utilisant le serveur de Polytechnique.org, ou pour pouvoir
+ lire les forums avec Outlook Express (ou ton logiciel de news préféré), tu dois d'abord
+ activer ton compte smtp/nntp.
+ {/page}
+
+ {page title="Attribuer un cookie d'authentification permanente" url="AccesPermanentOn.php"|url}
+ Cette page te permettra de te passer d'authentification pour une utilisation restreinte du
+ site à partir de ton ordinateur uniquement. A utiliser avec précautions !
+ {/page}
+
+ {page title="Supprimer l'accès permanent" url="AccesPermanentOff.php"|url}
+ Cette page te permet de supprimer l'accès permanent que tu pouvais avoir demandé.
+ {/page}
+ </ul>
+
+ </li>
+</ul>
+
+<br/>
+
+<h1>
+ Services
+</h1>
+
+<ul>
+ {page title="Envoyer un mail" url="emqils/send.php"|url}
+ Tu peux rédiger tes mails directement par le site web de Polytechnique.org.
+ {/page}
+
+ {page title="Forums et petites annonces" url="banana/"|url}
+ Les forums sont des lieux de rencontre et de convivialité entre personnes partageant de même
+ centres d'intérêts. Rejoins nous vite !
+ {/page}
+
+ <li>
+ <ul>
+ {page title="Configuration de Banana" url="confbanana.php"|url}
+ Pour configurer les paramètres de l'interface web Banana de lecture de forums.
+ {/page}
+
+ {page title="Abonnements aux forums" url="banana/subscribe.php"|url}
+ Cette page permet de choisir les forums que tu souhaites lire.
+ {/page}
+ </ul>
+ </li>
+ {page title="Listes de diffusion (inscriptions, créations, listes promo et newsletter)"
+ url="listes/"|url}
+ Les listes de diffusion te permettent de recevoir ou de communiquer par mail des informations
+ avec d'autres camarades partageant un même centre d'intérêt. Sur cette page tu peux choisir
+ quelles sont celles que tu souhaites recevoir.
+ {/page}
+
+ {page title="Télépaiement" url="paiement/"|url}
+ Un outil bien pratique pour l'organisation de manifestation ou le paiement de cotisations entre
+ autres. Grâce à lui, tu pourra payer en ligne pour participer à diverses manifestations.
+ {/page}
+
+ {page title="Patte cassée" url="pattecassee.php"|url}
+ Si tu remarques que l'adresse d'un camarade génère des erreurs, tu peux vérifier si il a reçu
+ le mail sur un autre adresse. Nous en profiterons pour lui signaler l'erreur en question.
+ {/page}
+
+ {page title="Gérer un sondage" url="sondage/accueil.php"|url}
+ Cette page t'aide à créer un sondage en ligne qui s'adressera à la communauté internaute des X.
+ {/page}
+</ul>
+
+<br/>
+
+<h1>
+ Communauté X
+</h1>
+
+<ul>
+ {page title="Annuaire" url="recherche.php"|url}{/page}
+
+ {page title="Trombinoscope promo" url="trombipromo.php"|url}
+ Pour se revoir de temps à autres la tête de ses cocons !
+ {/page}
+
+ {page title="Portail des associations polytechniciennes" url="http://www.polytechnique.net/"}
+ Site regroupant des liens vers de nombreux sites d'associations d'X.
+ {/page}
+</ul>
+
+<br/>
+
+<h1>
+ Informations générales
+</h1>
+
+<ul>
+ {page title="Accueil et évènements" url="login.php"|url}{/page}
+ {page title="Proposition d'information événementielle" url="evenements.php"|url}{/page}
+ {page title="Lettre de Polytechnique.org" url="newsletter.php"|url}{/page}
+ {page title="Page de l'emploi" url="emploi.php"|url}{/page}
+ {page title="Forum emploi" url="banana/thread.php?group=xorg.pa.emploi"|url}{/page}
+</ul>
+
+<br/>
+<h1>
+ Documentation
+</h1>
+
+<ul>
+ {page title="Foire aux questions" url="docs/index.php"|url}{/page}
+ <li>Configuration générale
+ <ul>
+ {page title="Utiliser le SMTP sécurisé et le NNTP sécurisé avec Outlook Express"
+ url="docs/doc_oe.php"|url}{/page}
+ {page title="Utiliser le SMTP sécurisé et le NNTP sécurisé avec Netscape (ou Mozilla)"
+ url="docs/doc_nn.php"|url}{/page}
+ {page title="Certificat de sécurité" url="docs/doc_ssl.php"|url}{/page}
+ </ul>
+
+ </li>
+ <li>Services de mails
+ <ul>
+ {page title="Mes redirections d'adresses emails" url="docs/doc_emails.php"|url}{/page}
+ {page title="Polytechnique.org comme e-mail dans le champ FROM"
+ url="docs/FROM.php"|url}{/page}
+ {page title="alias @melix.net" url="docs/doc_melix.php"|url}{/page}
+ {page title="Pourquoi et comment choisir un e-mail gratuit"
+ url="docs/doc_gratuits.php"|url}{/page}
+ {page title="Patte cassée" url="docs/doc_patte_cassee.php"|url}{/page}
+ </ul>
+
+ </li>
+ <li>Autres services internet
+ <ul>
+ {page title="Redirection de page WEB" url="docs/doc_carva.php"|url}{/page}
+ {page title="Comment se connecter aux forums" url="docs/doc_nntp.php"|url}{/page}
+ </ul>
+
+ </li>
+ <li>Chartes d'utilisation et éthique
+ <ul>
+ {page title="Charte" url="charte.php"|url}{/page}
+ {page title="Services et éthique" url="ethique.php"|url}{/page}
+ {page title="Règles générales d'utilisation des forums" url="docs/doc_forums.php"|url}{/page}
+ </ul>
+
+ </li>
+</ul>
+
+
+<br/>
+<h1>
+ L'association Polytechnique.org
+</h1>
+
+<ul>
+ {page title="Le site de l'association" url="http://x-org.polytechnique.org"}{/page}
+ {page title="A propos de l'association" url="apropos.php"|url}{/page}
+ {page title="Nous contacter" url="contacts.php"|url}{/page}
+ {page title="Faire un don à l'association" url="dons.php"|url}{/page}
+ {page title="Interruptions de service" url="coupure.php"|url}{/page}
+ {page title="Statistiques du site" url="stats.php"|url}{/page}
+ {page title="Performance des serveurs de mails" url="parselogR.php"|url}{/page}
+ </li>
+</ul>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Services offerts aux X
+</h1>
+
+<p>
+Polytechnique.org est le site web dédié aux Polytechniciens, anciens ou élèves.
+Site fédérateur, il te propose divers services destinés à faciliter la
+communication et l'échange d'informations, au sein de la communauté X, mais
+aussi avec les anciens d'autres grandes écoles, et des extérieurs.
+</p>
+
+<p>
+Service toujours le plus important : <a href="doc_emails.php">l'adresse email à vie</a>.
+Polytechnique.org t'offre une adresse email sur le domaine @polytechnique.org
+(et @m4x.org) que tu gardes à vie (sauf si tu as un homonyme et qu'il s'inscrit).
+Cette adresse email est protégée par un antivirus et un <a href="{"antispam.php"|url}">
+antispam</a>.
+</p>
+
+<p>
+Le site héberge également un <a href="{"search.php"|url}">annuaire complet</a> que
+tu peux consulter pour obtenir des renseignements sur un camarade, sur tes
+cocons. Il te permet aussi <a href="{"profil.php"|url}">d'enrichir et de compléter</a>
+ta fiche personnelle. Cet annuaire a une vocation professionnelle puisque
+tu peux mettre en ligne ton mini-CV. Enfin, tu peux <a href="{"trombipromo.php"|url}">
+consulter le trombinoscope</a> des promotions.
+</p>
+
+<p>
+Le site te permet <a href="{rel}/emails/send.php">d'envoyer des mails</a>,
+de consulter <a href="{"banana/"|url}">des forums de
+ discussions</a>, aux sujets variés, de <a href="{"listes/"|url}">t'inscrire sur des
+ listes de diffusion</a> dédiées à une thème particulier.
+</p>
+
+<p>
+Il t'offre aussi des services plus techniques, utiles aux X responsables de
+groupes ou chargés d'organiser des manifestations polytechniciennes.
+qui réalisent des questionnaires consultables en ligne, aux résultats anonymes,
+ou encore <a href="{"paiement/"|url}">le système de télépaiement</a> qui sert entre autres
+à l'organisation de repas et séminaires de groupes ou de promotions.
+</p>
+
+<p>
+Enfin Polytechnique.org favorise le développement d'activités associatives. Le
+site <a href="http://www.polytechnique.net/">www.polytechnique.net</a> te
+présente ainsi des groupes existants et la <a href="{rel}/newsletter/">newsletter
+ mensuelle</a> te met au courant des dernières actualités de la communauté.
+</p>
+
+<p>
+Cependant, cette liste n'est pas exhaustive, car d'autres fonctionnalités sont
+encore à l'étude et t'offriront bientôt des services encore plus innovants.
+Tu peux <a href="{rel}/docs/en-cours.php">en consulter la liste</a>.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Dons au profit de l'association Polytechnique.org
+</h1>
+
+<p>
+Comme tu le sais sans doute, le site Polytechnique.org est géré par
+l'<a href="http://x-org.polytechnique.org/">association</a> loi 1901 du même
+nom. Le travail effectué sur le site est entièrement bénévole et les outils
+que nous utilisons sont des <a href="http://www.fsf.org/philosophy/free-sw.fr.html">logiciels libres</a>
+donc nos frais de fonctionnement restent très modérés,
+mais ils n'en existent pas moins. Parmis ces frais on peut citer l'achat des
+différents noms de domaines du site et l'achat de matériel informatique pour
+suivre la progression rapide du nombre d'inscrits au site.
+</p>
+
+<p>
+Nous mettons à ta disposition les informations concernant nos comptes <a
+href="trezo/">ici</a>.
+</p>
+
+<p>
+Si tu le souhaites, tu peux nous aider à maintenir et à développer la qualité
+de nos services à la communauté polytechnicienne en <a href="paiement/?ref=0">effectuant un don</a>
+du montant de ton choix à l'association.
+Nous te remercions par avance de ta générosité!
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Gestion de mes courriers électroniques
+</h1>
+
+
+<table class="bicol">
+ <tr>
+ <th>Mes adresses polytechniciennes à vie</th>
+ </tr>
+ <tr class="impair">
+ <td>
+ Tes adresses polytechniciennes sont :<br /><br />
+ <form method='post' action='{$smarty.server.PHP_SELF}'>
+ <div>
+ {iterate from=$aliases item=a}
+ <input type='radio' {if $a.best}checked="checked"{/if} name='best' value='{$a.alias}' onclick='this.form.submit()' />
+ {if $a.a_vie}(*){/if} <strong>{$a.alias}</strong>@{#globals.mail.domain#} et @{#globals.mail.domain2#}
+ {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
+ <br />
+ {/iterate}
+ </div>
+ </form>
+ <br />
+ L'adresse cochée est celle que tu utilises le plus (et qui sera donc affichée sur ta carte de visite, ta fiche, etc...).
+ Coche une autre case pour en changer !
+ </td>
+ </tr>
+ <tr class="pair">
+ <td>
+ (M4X signifie <em>mail for X</em>, son intérêt est de te doter d'une adresse à vie
+ moins "voyante" que l'adresse @{#globals.mail.domain#}).
+ </td>
+ </tr>
+</table>
+
+<p class="smaller">
+(*) l'adresse email marquée d'une (*) t'est réservée pour une période 100 ans après ton entrée à l'X (dans ton cas, jusqu'en
+{$smarty.session.promo+100}). Les autres te sont attribuées a priori à vie, sauf si tu venais à avoir un homonyme X. Dans ce cas, ni ton
+homonyme ni toi-même n'auriez d'autres adresses que celles de la forme prenom.nom.promo@{#globals.mail.domain#}.
+</p>
+
+
+<br />
+
+<table class="bicol">
+ <tr>
+ <th>Où est-ce que je reçois le courrier qui m'y est adressé ?</th>
+ </tr>
+ <tr class="pair">
+ <td>
+ Actuellement, tout courrier électronique qui t'y est adressé, est envoyé
+ {if $mails->total() eq 1} à l'adresse {else} aux adresses {/if}
+ <ul>
+ {iterate from=$mails item=m}
+ <li><strong>{$m.email}</strong></li>
+ {/iterate}
+ </ul>
+ Si tu souhaites <strong>modifier ce reroutage de ton courrier,</strong>
+ <a href="{rel}/emails/redirect.php">il te suffit de te rendre ici !</a>
+ </td>
+ </tr>
+</table>
+
+<br />
+
+<table class="bicol">
+ <tr>
+ <th colspan="2">Antivirus, antispam</th>
+ </tr>
+ <tr class="impair">
+ <td class="half">
+ Tous les courriers qui te sont envoyés sur tes adresses polytechniciennes sont
+ <strong>filtrés par un logiciel antivirus</strong> très performant. Il te protège de ces
+ vers très gênants, qui se propagent souvent par le courrier électronique.
+ </td>
+ <td class="half">
+ De même, un <strong>service antispam évolué</strong> est en place. Tu peux lui demander
+ de te débarrasser des spams que tu reçois. Pour en savoir plus, et l'activer,
+ <a href="antispam.php">c'est très simple, suis ce lien </a>!
+ <br />
+ </td>
+ </tr>
+</table>
+
+<br />
+
+<table class="bicol">
+ <tr>
+ <th>Un alias sympatique : {#globals.mail.alias_dom#} !</th>
+ </tr>
+ <tr class="pair">
+ <td>
+ Tu peux ouvrir en supplément une adresse synonyme de ton adresse @{#globals.mail.domain#},
+ sur les domaines @{#globals.mail.alias_dom#} et @{#globals.mail.alias_dom2#} (melix = Mél X).
+ </td>
+ </tr>
+ <tr class="impair">
+ <td>
+ {if $melix}
+ Tu disposes à l'heure actuelle de l'alias <strong>{$melix}</strong>
+ Pour <strong>demander à la place un autre alias @{#globals.mail.alias_dom#}</strong>,
+ <a href="alias.php">il te suffit de te rendre ici</a>
+ {else}
+ A l'heure actuelle <strong>tu n'as pas activé d'adresse @{#globals.mail.alias_dom#}</strong>.
+ Si tu souhaites le faire, <a href="alias.php">il te suffit de venir ici</a>
+ {/if}
+ </td>
+ </tr>
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>Vérifier une patte cassée</h1>
+
+{if $x && $x.nb_mails}
+ <p>
+ Ton correspondant a à l'heure actuelle <span class="erreur">{$x.nb_mails} adresse(s) email(s) de redirection active(s)
+ en dehors de celle que tu nous as communiquée</span>. Cela ne veut pas forcément dire qu'il les avait
+ déjà activées lorsque tu as envoyé ton email, mais c'est fort probable.
+ </p>
+ <p>
+ Nous pensons qu'il serait une bonne idée de le prévenir que cette adresse email ne fonctionne plus.
+ Si tu veux que nous lui envoyions un mail automatique de ta part pour le prévenir,
+ <a href="?email={$email}&action=mail">clique sur ce lien</a>.
+ </p>
+{elseif $x}
+ <p>
+ Désolé, mais ton correspondant, {$x.prenom} {$x.nom} (X{$x.promo}),
+ n'a actuellement <span class="erreur">aucune adresse email de redirection
+ active autre que celle que tu viens de rentrer.</span>
+ Nous t'invitons à prendre contact avec lui autrement que par email,
+ l'idéal étant de l'informer si possible que sa patte Polytechnique.org est cassée...!
+ </p>
+{elseif $email}
+<p class="erreur">
+ Désolé mais plus personne n'utilise l'adresse {$email} comme adresse de redirection.
+ Nous ne pouvons donc malheureusement te fournir aucune information...
+</p>
+{/if}
+
+<p>
+ <strong>Qu'est-ce qu'une patte cassée ?</strong>
+</p>
+<p>
+ Cette page sert à <strong>analyser les messages d'erreur</strong> que tu reçois
+ lorsque tu envoies un mail à des utilisateurs de Polytechnique.org. Plus
+ précisément, si après avoir rédigé un email, tu reçois en retour un message
+ t'indiquant que l'un des destinataires n'a pas eu ton message sur l'une de
+ ses adresses de redirections, nous allons pouvoir te dire s'il a reçu ton
+ email sur une autre adresse de redirection...!
+</p>
+<p>
+ Pour plus d'explications concernant cette page, nous t'invitons à consulter
+ la <a href="{rel}/docs/doc_patte_cassee.php">documentation suivante</a>
+</p>
+<p>
+ Rentre dans la zone de saisie ci-dessous l'adresse email à laquelle ton
+ courrier n'a pas été distribué puis valide. Nous te dirons si le
+ destinataire possède d'autres adresses de redirection grâce auxquelles il a
+ tout de même eu ton message.
+</p>
+<br />
+<div class="center">
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="tinybicol" cellpadding="3" summary="Saisie email en panne">
+ <tr>
+ <th>Adresse email défectueuse</th>
+ </tr>
+ <tr>
+ <td class='center'><input type="text" name="email" size="60" /></td>
+ </tr>
+ <tr>
+ <td class="center"><input type="submit" value="Ok" /></td>
+ </tr>
+ </table>
+ </form>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $retour == $smarty.const.ERROR_INACTIVE_REDIRECTION}
+ <p class="erreur">
+ Tu ne peux pas avoir aucune adresse de redirection active, sinon ton adresse
+ {$smarty.session.forlife}@{#globals.mail.domain#} ne fonctionnerait plus.
+ </p>
+{/if}
+{if $retour == $smarty.const.ERROR_INVALID_EMAIL}
+ <p class="erreur">
+ Erreur: l'email n'est pas valide.
+ </p>
+{/if}
+{if $retour == $smarty.const.ERROR_LOOP_EMAIL}
+ <p class="erreur">
+ Erreur: {$smarty.session.forlife}@{#globals.mail.domain#} doit renvoyer vers un email
+ existant valide. En particulier, il ne peut pas être renvoyé vers lui-même,
+ ni son équivalent en {#globals.mail.domain2#}.
+ </p>
+{/if}
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <h1>
+ Tes adresses de redirection
+ </h1>
+ <p>
+ Tu configures ici les adresses emails vers lesquelles tes adresses (listées ci-dessous) sont dirigées :
+ </p>
+ <ul>
+ {if $melix}
+ <li>
+ <strong>{$melix}@{#globals.mail.alias_dom#}</strong>,
+ <strong>{$melix}@{#globals.mail.alias_dom2#}</strong>
+ </li>
+ {/if}
+ {foreach from=$alias item=a}
+ <li>
+ <strong>{$a.alias}@{#globals.mail.domain#}</strong>
+ {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
+ </li>
+ {/foreach}
+ </ul>
+ <p>
+ Le routage est en place pour les adresses dont la case "<strong>Actif</strong>" est cochée.
+ Si tu modifies souvent ton routage, tu as tout intérêt à rentrer toutes les
+ adresses qui sont susceptibles de recevoir ton routage, de sorte qu'en
+ jouant avec les cases "<strong>Actif</strong>" tu pourras facilement mettre en place les unes
+ ou bien les autres.
+ </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
+ {#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
+ <a href="{rel}/docs/doc_smtp.php">service d'envoi de courrier SMTP sécurisé</a>.
+ </p>
+ <div class="center">
+ <table class="bicol" summary="Adresses de redirection">
+ <tr>
+ <th>Email</th>
+ <th>Actif</th>
+ <th>Réécriture</th>
+ <th> </th>
+ </tr>
+ {foreach from=$emails item=e}
+ <tr class="{cycle values="pair,impair"}">
+ <td><strong>{$e->email}</strong></td>
+ <td>
+ <input type="checkbox" name="emails_actifs[]" value="{$e->email}" {if $e->active}checked="checked"{/if} /></td>
+ <td>
+ <select name="emails_rewrite[{$e->email}]">
+ <option value=''>--- aucune ---</option>
+ {foreach from=$alias item=a}
+ <option {if $e->rewrite eq "`$a.alias`@polytechnique.org"}selected='selected'{/if}
+ value='{$a.alias}@polytechnique.org'>{$a.alias}@polytechnique.org</option>
+ <option {if $e->rewrite eq "`$a.alias`@m4x.org"}selected='selected'{/if}
+ value='{$a.alias}@m4x.org'>{$a.alias}@m4x.org</option>
+ {/foreach}
+ </select>
+ </td>
+ <td><a href="{$smarty.server.PHP_SELF}?emailop=retirer&email={$e->email}">retirer</a></td>
+ </tr>
+ {/foreach}
+ </table>
+ <br />
+ <input type="submit" value="Mettre à jour les emails actifs" name="emailop" />
+ </div>
+</form>
+ <p>
+ Tu peux ajouter à cette liste une adresse email en la tapant ici et en cliquant sur Ajouter.
+ </p>
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <div>
+ <input type="text" size="35" maxlength="60" name="email" value="" />
+
+ <input type="submit" value="ajouter" name="emailop" />
+ </div>
+</form>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>
+ Envoyer un mail
+</h1>
+
+<ul>
+ <li>
+ Les destinataires sont simplement séparés par des virgules
+ </li>
+ <li>
+ Pense à te mettre en copie cachée du mail sinon tu n'auras aucun moyen de retrouver
+ le mail que tu envoies par cette page
+ </li>
+</ul>
+
+<script type="text/javascript">//<![CDATA[
+ {literal}
+ function check(form) {
+ if(form.sujet.value == "") {
+ form.sujet.focus();
+ return confirm ("Le sujet du mail est vide, veux tu continuer ?");
+ }
+ return true;
+ }
+ {/literal}
+//]]>
+</script>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post" onsubmit="return check(this);">
+ <table class="bicol" cellpadding="2" cellspacing="0">
+ <tr>
+ <th colspan="2">Destinataires</th>
+ </tr>
+ <tr>
+ <td class="titre">de :</td>
+ <td>
+ <input type='hidden' name='signature' value='1' />
+ <input type='text' name='from' size='60' value='{if $smarty.request.from}
+{$smarty.request.from}
+{else}
+"{$smarty.session.prenom} {$smarty.session.nom}" <{$smarty.session.bestalias}@{#globals.mail.domain#}>
+{/if}' />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">à :</td>
+ <td>
+ <input type='text' name='to' size='60' value="{$smarty.request.to}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">copie :</td>
+ <td>
+ <input type='text' name='cc' size='60' value="{$smarty.request.cc}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">copie cachée :</td>
+ <td>
+ <input type='text' name='bcc' size='60' value="{$smarty.request.bcc}" />
+ </td>
+ </tr>
+ </table>
+
+ {if $contacts|@count}
+ <ul>
+ <li>
+ <p>
+ Tu peux également ajouter certains de tes contacts aux destinataires :
+ </p>
+ </li>
+ </ul>
+
+ <table class="bicol" cellpadding="2" cellspacing="0" summary="Destinataires parmi les contacts">
+{foreach key=key item=contact from=$contacts}
+{if $key is even}
+ <tr class="{cycle values="impair,pair"}">
+{/if}
+ <td>
+ <input type="checkbox" name="contacts[{$contact.forlife}]"
+ value="{$contact.prenom} {$contact.nom} <{$contact.forlife}@{#globals.mail.domain#}>"
+ {if $smarty.request.contacts && $smarty.request.contacts.forlife}checked="checked"{/if} />
+ <a href="{"fiche.php"|url}?user={$contact.forlife}" class="popup2">{$contact.prenom} {$contact.nom}</a> (X{$contact.promo})
+ </td>
+{if $key is odd}
+ </tr>
+{/if}
+{/foreach}
+{if $key is even}
+ <td></td>
+ </tr>
+{/if}
+ </table>
+{/if}
+
+ <ul>
+ <li>
+ Ne mets que du texte dans le contenu, pas de tags HTML
+ </li>
+ <li>
+ Il n'est pas possible d'envoyer un fichier en attachement
+ </li>
+ </ul>
+
+ <table class="bicol" cellspacing="0" cellpadding="2" summary="Corps du message">
+ <tr>
+ <th>sujet</th>
+ </tr>
+ <tr>
+ <td class="center">
+ <input type='text' name='sujet' size='75' value="{$smarty.request.sujet}" />
+ </td>
+ </tr>
+ <tr>
+ <th>
+ Corps du mail
+ </th>
+ </tr>
+ <tr>
+ <td class="center">
+ <textarea name='contenu' rows="30" cols="75">
+{$smarty.request.contenu}
+{if !$smarty.request.contenu}
+--
+{$smarty.session.prenom} {$smarty.session.nom}
+{/if}</textarea>
+ </td>
+ </tr>
+ <tr>
+ <td class="center">
+ <input type="submit" name="submit" value="Envoyer" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Proposition d'information événementielle
+</h1>
+
+
+{if $action eq "proposer"}
+
+<p>
+Voici ton annonce :
+</p>
+
+<table class="bicol">
+ <tr>
+ <th>{$titre|nl2br}</th>
+ </tr>
+ <tr>
+ <td>{$texte|nl2br}</td>
+ </tr>
+</table>
+
+<p>
+Ce message est à destination
+{if $promo_min || $promo_max}
+des promotions {if $promo_min}X{$promo_min}{/if} {if $promo_max}jusqu'à X{$promo_max}{else}et plus{/if}
+{else}
+de toutes les promotions
+{/if}
+et sera affiché sur la page d'accueil jusqu'au {$peremption|date_format}
+</p>
+
+{if $validation_message}
+<p>
+Tu as ajouté le message suivant à l'intention du validateur : {$validation_message|nl2br}
+</p>
+{/if}
+
+<form action="{$smarty.request.PHP_SELF}" method="post">
+ <div>
+ <input type="hidden" name="titre" value="{$titre}" />
+ <input type="hidden" name="texte" value="{$texte}" />
+ <input type="hidden" name="promo_min" value="{$promo_min}" />
+ <input type="hidden" name="promo_max" value="{$promo_max}" />
+ <input type="hidden" name="peremption" value="{$peremption}" />
+ <input type="hidden" name="validation_message" value="{$validation_message}" />
+ <input type="submit" name="action" value="Confirmer" />
+ <input type="submit" name="action" value="Modifier" />
+ </div>
+</form>
+
+
+{elseif $action eq "confirmer"}
+
+{if $ok}
+<p>
+Ta proposition a bien été enregistrée, un administrateur va se charger de la valider aussi rapidement que possible.
+</p>
+<p>
+Merci pour ta contribution à la vie du site!
+</p>
+<p>
+<a href="login.php">Retour à la page d'accueil</a>
+</p>
+{else}
+<p class="erreur">
+Une erreur s'est produite pendant l'enregistrement de ta proposition. Merci de nous <a href="contacts.php">contacter</a>!
+</p>
+{/if}
+
+{else}
+
+{include file="include/form.evenement.tpl"}
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{literal}
+<script type="text/javascript">
+function chgMainWinLoc( strPage ) {
+ parent.opener.document.location = strPage;
+}
+</script>
+{/literal}
+
+<table id="fiche" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="fiche_identite">
+ <div class="civilite">
+ {if $x.sexe}•{/if}
+ {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
+ {if $logged}
+ {if $x.nickname} (aka {$x.nickname}){/if}
+ <a href="vcard.php/{$x.forlife}.vcf?x={$x.forlife}">
+ <img src="images/vcard.png" alt="Afficher la carte de visite" title="Afficher la carte de visite"/>
+ </a>
+ {if !$x.is_contact}
+ <a href="javascript:x()" onclick="chgMainWinLoc('{rel}/carnet/mescontacts.php?action=ajouter&user={$x.forlife}')">
+ <img src="images/ajouter.gif" alt="Ajouter à mes contacts" title="Ajouter à mes contacts" />
+ </a>
+ {else}
+ <a href="javascript:x()" onclick="chgMainWinLoc('{rel}/carnet/mescontacts.php?action=retirer&user={$x.forlife}')">
+ <img src="images/retirer.gif" alt="Retirer de mes contacts" title="Retirer de mes contacts" />
+ </a>
+ {/if}
+ {perms level=admin}
+ <a href="javascript:x()" onclick="chgMainWinLoc('{rel}/admin/utilisateurs.php?login={$x.forlife}')">
+ <img src="images/admin.png" alt='admin' title="administrer user" />
+ </a>
+ {/perms}
+ {/if}
+ </div>
+ {if $logged}
+ <div class='maj'>
+ Fiche mise à jour<br />
+ le {$x.date|date_format}
+ </div>
+ {/if}
+ {if $logged || $x.mobile}
+ <div class="contact">
+ {if $logged}
+ <div class='email'>
+ {if $x.dcd}
+ Décédé{if $x.sexe}e{/if} le {$x.deces|date_format}
+ {elseif !$x.inscrit}
+ Le compte de cette personne n'est pas actif (personne non inscrite ou exclue).
+ {else}
+ {if $virtualalias}
+ <a href="mailto:{$virtualalias}">{$virtualalias}</a><br />
+ {/if}
+ <a href="mailto:{$x.bestalias}@polytechnique.org">{$x.bestalias}@polytechnique.org</a>
+ {if $bestalias neq $x.forlife}<br />
+ <a href="mailto:{$x.forlife}@polytechnique.org">{$x.forlife}@polytechnique.org</a>
+ {/if}
+ {/if}
+ </div>
+ {/if}
+ <div class="mob">
+ {if $x.mobile}<em class="intitule">Mobile : </em>{$x.mobile}<br />{/if}
+ </div>
+ <div class='spacer'></div>
+ </div>
+ {/if}
+ <div class='formation'>
+ {if $x.iso3166}
+ <img src='{rel}/images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='14' title='{$x.nationalite}' />
+ {/if}
+ X {$x.promo}
+ {if ($x.promo_sortie-3 > $x.promo)}
+ - X {math equation="a-b" a=$x.promo_sortie b=3}
+ {/if}
+ {if $x.applis_join}
+ - Formation : {$x.applis_join|smarty:nodefaults}
+ {/if}
+ {if $logged}
+ {if $x.is_referent}
+ [<a href="fiche_referent.php?user={$x.forlife}" class='popup2'>Ma fiche référent</a>]
+ {/if}
+ {/if}
+ </div>
+ </td>
+ <td rowspan="4" id='photo'>
+ {if $photo_url}<img alt="Photo de {$x.forlife}" src="{$photo_url}" width="{$x.x}" height="{$x.y}" />{/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) X : </em><span>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
+ {/if}
+ {if $x.web}<div><em class="intitule">Site Web : </em><a href="{$x.web}" class='popup'>{$x.web}</a></div>{/if}
+ {if $x.freetext}<div><em class="intitule">Commentaires : </em><br /><span>{$x.freetext|nl2br}</span></div>{/if}
+ </td>
+ </tr>
+ {if $x.adr}
+ <tr>
+ <td>
+ <h2>Contact : </h2>
+ {foreach from=$x.adr item="address" key="i"}
+ {if $address.active}
+ {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle :"}
+ {elseif $address.secondaire}
+ {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire :"}
+ {else}
+ {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale :"}
+ {/if}
+ {/foreach}
+ <div class="spacer"> </div>
+ </td>
+ </tr>
+ {/if}
+ {if $x.adr_pro}
+ <tr>
+ <td>
+ <h2>Informations professionnelles :</h2>
+ {foreach from=$x.adr_pro item="address" key="i"}
+ {include file="include/emploi.tpl" address=$address}
+ {include file="geoloc/address.tpl" address=$address titre="Adresse : "}
+ <div class="spacer"> </div>
+ {/foreach}
+ </td>
+ </tr>
+ {/if}
+ {if $x.medals}
+ <tr>
+ <td>
+ <h2>Distinctions : </h2>
+ {foreach from=$x.medals item=m}
+ <table style="float: left; width: 33%;">
+ <tr>
+ <td>
+ <img src="{rel}/images/medals/{$m.img}" width="24" alt="{$m.medal}" title="{$m.medal}" style='float: left;' />
+ </td>
+ <td>
+ <strong>{$m.medal}</strong>
+ <br />{$m.grade}
+ </td>
+ </tr>
+ </table>
+ {/foreach}
+ <div class="spacer"> </div>
+ </td>
+ </tr>
+ {/if}
+ {if $logged}
+ {if $x.cv}
+ <tr>
+ <td>
+ <h2>Curriculum Vitae :</h2>
+ {$x.cv|nl2br}
+ </td>
+ </tr>
+ {/if}
+ {/if}
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{literal}
+<script type="text/javascript" src="javascript/close_on_esc.js">
+</script>
+{/literal}
+
+<div id="fiche">
+
+ <div class="center">
+ <strong>{$prenom} {$nom}</strong><br />
+ <span>X{$promo} - </span> <a href="mailto:{$bestalias}@polytechnique.org">{$bestalias}@polytechnique.org</a>
+ </div>
+
+ {if $expertise != '' || $secteurs|count || $pays|count }
+
+ <h2>Informations de référent :</h2>
+
+ <div id="fiche_referent">
+ {if $expertise}
+ <div class="rubrique_referent">
+ <em>Expertise : </em><br />
+ <span>{$expertise|nl2br}</span>
+ </div>
+ {/if}
+ {if $secteurs|count}
+ <div class="rubrique_referent">
+ <em>Secteurs :</em><br />
+ <ul>
+ {foreach from=$secteurs item="secteur" key="i"}
+ <li>{$secteur}{if $ss_secteurs.$i != ''} ({$ss_secteurs.$i}){/if}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+ {if $pays|count}
+ <div class="rubrique_referent">
+ <em>Pays :</em>
+ <ul>
+ {foreach from=$pays item="pays_i"}
+ <li>{$pays_i}</li>
+ {/foreach}
+ </ul>
+ </div>
+ {/if}
+ <div class="spacer"> </div>
+ </div>
+ {/if}
+
+ {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 : "}
+
+ <div class="spacer"> </div>
+ {/foreach}
+
+ {if $cv}
+ <h2>Curriculum Vitae : </h2>
+ <div>{$cv|nl2br}</div>
+ {/if}
+
+
+
+</div>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+ {if $address.adr1 || $address.countrytxt || $geoloc_address.city || $address.tel || $address.fax || $address.mobile}
+ {if $no_div neq 1}
+ <div class="adresse">
+ {/if}
+ {if $titre && ($address.adr1 || $address.city || $address.countrytxt)}
+ {if $titre_div}
+ <div class="titre">
+ {$titre}
+ </div>
+ {else}
+ <em>{$titre}</em><br />
+ {/if}
+ {/if}
+ {if $address.adr1}<strong>{$address.adr1}</strong><br />{/if}
+ {if $address.adr2}<strong>{$address.adr2}</strong><br />{/if}
+ {if $address.adr3}<strong>{$address.adr3}</strong><br />{/if}
+ {if $address.city}<strong>{$address.postcode} {$address.city}</strong><br />{/if}
+ {if $address.countrytxt}
+ <strong>{$address.countrytxt}{if $address.region && $address.countrytxt != 'France'} ({$address.region}){/if}</strong>
+ {/if}
+
+ {if $address.tel}
+ <div>
+ <em>Tél : </em>
+ <strong>{$address.tel}</strong>
+ </div>
+ {/if}
+
+ {if $address.fax}
+ <div>
+ <em>Fax : </em>
+ <strong>{$address.fax}</strong>
+ </div>
+ {/if}
+
+ {if $address.mobile}
+ <div>
+ <em>Mobile : </em>
+ <strong>{$address.mobile}</strong>
+ </div>
+ {/if}
+
+ {if $no_div neq 1}
+ </div>
+ {/if}
+ {/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+ {if $adr.geoloc}
+ <tr>
+ <td class="cold" colspan="5">
+ <input type="hidden" name="change{$adrid}" value="0"/>
+ <span class="erreur">La geolocalisation n'a pas donné un résultat certain, valide la nouvelle adresse ou modifie l'ancienne pour que ton adresse puisse être prise en compte.</span><br />
+ <script type="text/javascript">setTimeout("document.location += '#adr{$adrid}'", 10);</script>
+ <textarea name="txt[{$adrid}]" cols="30" rows="4" onchange="form.change{$adrid}.value=1"
+ {if !$adr.cityid}style="background:#FAA"{/if}
+ >{$adr.txt}</textarea>
+ <textarea cols="30" rows="4"
+ style="border:inherit;background:#AFA"
+ onclick="blur()"
+ >{$adr.geoloc}</textarea><p class="right">
+ [<a href="{$smarty.server.PHP_SELF}?old_tab={$smarty.request.old_tab}&parsevalid[{$adrid}]=1&modifier=1">Valider</a>]
+ </p>
+ {else}
+ <tr class="center">
+ <td class="cold" colspan="2">
+ <input type="hidden" name="change{$adrid}" />
+ <textarea name="txt[{$adrid}]" cols="43" rows="4" onchange="form.change{$adrid}.value=1"
+ {if $adr.nouvelle != 'new' && !$adr.cityid}style="background:#FAA"{/if}
+ >{$adr.txt}</textarea>
+ {/if}
+ <input type="hidden" name="cityid[{$adrid}]" value="{$adr.cityid}" />
+ <input type="hidden" name="adr1[{$adrid}]" value="{$adr.adr1}" />
+ <input type="hidden" name="adr2[{$adrid}]" value="{$adr.adr2}" />
+ <input type="hidden" name="adr3[{$adrid}]" value="{$adr.adr3}" />
+ <input type="hidden" name="postcode[{$adrid}]" value="{$adr.postcode}"/>
+ <input type="hidden" name="city[{$adrid}]" value="{$adr.city}" />
+ <input type="hidden" name="country[{$adrid}]" value="{$adr.country}" />
+ <input type="hidden" name="region[{$adrid}]" value="{$adr.region}" />
+ </td>
+ </tr>
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Géolocalisation</h1>
+
+<p class="descr">Aujourd'hui {$localises} de nos camarades sont localisés grâce à leurs adresses personnelles. La géolocalisation permet de :
+</p>
+<ul>
+<li>standardiser les adresses</li>
+<li>rechercher de manière précise par lieu géographique</li>
+<li>dans un deuxième temps, faire des jolies cartes</li>
+</ul>
+
+<p class="center">
+<img src="globe.php" alt="Carte du monde des X"/>
+</p>
+
+<p class="descr">Pour savoir comment ça marche tu peux aller faire un tour sur le <a href="http://www.aaege.org/GeolocDev/">site de développement</a> du projet.</p>
+
+<p class="descr">Pour toute question, problème ou suggestion tu peux envoyer un mail à <a href="mailto:contact+geoloc@polytechnique.org">contact+geoloc@polytechnique.org</a></p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+{if $address.entreprise || $address.secteur || $address.fonction ||
+ $address.poste || $address.fonction || $address.email || $address.web}
+ <div class="adresse">
+ <table>
+ {if $address.entreprise || $address.web}
+ <tr>
+ <td><em>Ent/Org: </em></td>
+ <td><strong>{$address.entreprise}{if $address.web} [<a href='{$address.web}'>site</a>]{/if}</strong></td>
+ </tr>
+ {/if}
+ {if $address.secteur}
+ <tr>
+ <td><em>Secteur: </em></td>
+ <td><strong>{$address.secteur}{if $address.ss_secteur} ({$address.ss_secteur}){/if}</strong></td>
+ </tr>
+ {/if}
+
+ {if $address.fonction}
+ <tr>
+ <td><em>Fonction: </em></td>
+ <td><strong>{$address.fonction}</strong></td>
+ </tr>
+ {/if}
+ {if $address.poste}
+ <tr>
+ <td><em>Poste: </em></td>
+ <td><strong>{$address.poste}</strong></td>
+ </tr>
+ {/if}
+ {if $address.email}
+ <tr>
+ <td><em>E-mail: </em></td>
+ <td><strong>{$address.email}</strong></td>
+ </tr>
+ {/if}
+ </table>
+ </div>
+{/if}
+
+{* vim:set et sws=2 sts=2 sw=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+ <tr>
+ <td colspan="5" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="vert">
+ <input type="radio" name="{$name}" value="public" {if $val eq 'public'}checked="checked"{/if} />
+ </td>
+ <td class="texte">
+ site public
+ </td>
+ <td class="orange">
+ <input type="radio" name="{$name}" value="ax" {if $val eq 'ax'}checked="checked"{/if} />
+ </td>
+ <td class="texte">
+ transmis à l'AX
+ </td>
+ <td class="rouge">
+ <input type="radio" name="{$name}" value="private" {if $val eq 'private'}checked="checked"{/if} />
+ </td>
+ <td class="texte">
+ prive
+ </td>
+ <td class="texte">
+ <a href="{"docs/faq.php"|url}#flags" class="popup_800x240">Quelle couleur ??</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol">
+ <tr>
+ <th colspan="2">Contenu du message</th>
+ </tr>
+ <tr>
+ <td><strong>Titre</strong></td>
+ <td>
+ <input type="text" name="titre" size="50" maxlength="200" value="{$titre}" />
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Texte</strong></td>
+ <td><textarea name="texte" rows="10" cols="60">{$texte}</textarea></td>
+ </tr>
+ </table>
+
+ <table class="bicol">
+ <tr>
+ <th colspan="2">Informations complémentaires</th>
+ </tr>
+ <tr>
+ <td>
+ <strong>Promo min *</strong> (incluse)
+ </td>
+ <td>
+ <input type="text" name="promo_min" size="4" maxlength="4" value="{$promo_min}" />
+ <em>0 signifie pas de minimum</em>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <strong>Promo max *</strong> (incluse)
+ </td>
+ <td>
+ <input type="text" name="promo_max" size="4" maxlength="4" value="{$promo_max}" />
+ <em>0 signifie pas de maximum</em>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ * sert à limiter l'affichage de l'annonce aux camarades appartenant à certaines promos seulement.
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <strong>Dernier jour d'affichage</strong>
+ </td>
+ <td>
+ <select name="peremption">
+ {$select|smarty:nodefaults}
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ <div class="center">
+ <input type="hidden" name="evt_id" value="{$smarty.post.evt_id}" />
+ <input type="submit" name="action" value="Proposer" />
+ </div>
+
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="pair">
+ <td class="titre">Ancien alias</td>
+ <td>{$valid->old|default:"-none-"}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Nouvel alias :</td>
+ <td>{$valid->alias}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Visibilité :</td>
+ <td>{$valid->public}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Motif :</td>
+ <td>{$valid->raison|nl2br}</td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="impair">
+ <td class="titre">Titre</td>
+ <td>{$valid->titre}</td>
+</tr>
+<tr class="impair">
+ <td class="titre">Texte</td>
+ <td>{$valid->texte}</td>
+</tr>
+<tr class="impair">
+ <td class="titre">Péremption</td>
+ <td>{$valid->peremption|date_format}</td>
+</tr>
+<tr class="impair">
+ <td class="titre">Promos</td>
+ <td>{$valid->pmin} - {$valid->pmax}</td>
+</tr>
+<tr class="impair">
+ <td class="titre">Commentaire</td>
+ <td>{$valid->comment}</td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<tr class="pair">
+ <td class="titre">Adresse litigieuse :</td>
+ <td>
+ {$valid->loginbis}@polytechnique.org
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Homonymes :</td>
+ <td>
+ {foreach from=$valid->homonymes_forlife item=o}
+ <a href='{rel}/fiche.php?user={$o}' class='popup2'>{$o}</a>
+ {/foreach}
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="pair">
+ <td class="titre">Liste :</td>
+ <td>{$valid->liste}@polytechnique.org</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Desc :</td>
+ <td style="border: 1px dotted inherit">
+ {$valid->desc}
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Propriétés :</td>
+ <td>
+ <table cellpadding='2' cellspacing='0'>
+ <tr>
+ <td>visibilité:</td>
+ <td>{if $valid->advertise}publique{else}privée{/if}</td>
+ </tr>
+ <tr>
+ <td>diffusion:</td>
+ <td>{if $valid->modlevel eq 2}modérée{elseif $valid->modlevel}restreinte{else}libre{/if}</td>
+ </tr>
+ <tr>
+ <td>inscription:</td>
+ <td>{if $valid->inslevel}modérée{else}libre{/if}</td>
+ </tr>
+ </table>
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Gestionnaires :</td>
+ <td>
+ {foreach from=$valid->owners item=o}
+ <a href="{rel}/fiche.php?user={$o}" class="popup2">{$o}</a>
+ {/foreach}
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Membres :</td>
+ <td>
+ {foreach from=$valid->members item=o}
+ <a href="{rel}/fiche.php?user={$o}" class="popup2">{$o}</a>
+ {/foreach}
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="pair">
+ <td class="titre">Marketing sur</td>
+ <td><a href='{rel}/marketing/private.php?uid={$valid->m_id}'>{$valid->m_prenom} {$valid->m_nom} ({$valid->m_promo})</a></td>
+</tr>
+<tr class="pair">
+ <td class="titre">Mail deviné</td>
+ <td>{$valid->m_email}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Envoi de mail ...</td>
+ <td>{if $valid->perso}perso{else}par poly.org{/if}</td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<tr class="pair">
+ <td class="titre">Version texte</td>
+ <td style='border: 1px dotted #888'><pre>{$valid->art->toText()}</pre></td>
+</tr>
+<tr class="pair">
+ <td class="titre">Version html</td>
+ <td style='border: 1px dotted #888'>
+ <div class='nl'>
+ {$valid->art->toHtml()|smarty:nodefaults}
+ </div>
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="impair">
+ <td class="titre">Nom d'usage :</td>
+ <td>{$valid->nom_usage}</td>
+</tr>
+<tr class="impair">
+ <td class="titre">Nouvel alias :</td>
+ <td>{$valid->alias|default:"<span class='erreur'>suppression</span>"}</td>
+</tr>
+{if $valid->homonyme}
+<tr class="impair">
+ <td colspan="2">
+ <span class="erreur">Probleme d'homonymie !
+ <a href="{rel}/fiche.php?user=$valid->homonyme" class="popup2">{$valid->homonyme}</a>
+ </span>
+ </td>
+</tr>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="impair">
+ <td class="titre">Promotion :</td>
+ <td>{$valid->promo}</td>
+</tr>
+<tr class="impair">
+ <td class="titre">Année de sortie :</td>
+ <td>{$valid->promo_sortie} au lieu de {math equation="a + b" a=$valid->promo b=3}</td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<tr class="pair">
+ <td class="titre">Paiement :</td>
+ <td>{$valid->titre}</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Site web :</td>
+ <td>
+ <a href="{$valid->site}">{$valid->site}</a>
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Montant :</td>
+ <td>
+ {$valid->montant} ({$valid->montant_min} < x < {$valid->montant_max})
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Contact :</td>
+ <td>
+ {$valid->bestalias}@polytechnique.org
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Message de confirmation :</td>
+ <td><pre>{$valid->msg_reponse|wordwrap:"72"}</pre></td>
+</tr>
+{if $valid->asso_id}
+<tr class="pair">
+ <td class="titre">Lié à l'asso :</td>
+ <td>{$valid->asso}</td>
+</tr>
+{if $valid->evt}
+<tr class="pair">
+ <td class="titre">événement :</td>
+ <td>{$valid->evt_intitule}</td>
+</tr>
+{/if}
+{/if}
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<tr class="pair">
+ <td class="titre">Photos</td>
+ <td>
+ <img src="{rel}/getphoto.php?x={$valid->forlife}" style="width:110px;" alt=" [ PHOTO ] " />
+
+ <img src="{rel}/getphoto.php?x={$valid->forlife}&req=true" style="width:110px;" alt=" [ PHOTO ] " />
+ </td>
+</tr>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if !$c.inscrit || $c.dcd}<div class='grayed'>{/if}
+<div class="contact" {if $c.inscrit}{min_auth level='cookie'}title="fiche mise à jour le {$c.date|date_format}"{/min_auth}{/if}>
+
+ <div class="nom">
+ {if $c.sexe}•{/if}
+ {min_auth level="cookie"}
+ {if !$c.dcd && $c.inscrit}<a href="{"fiche.php"|url}?user={$c.forlife}" class="popup2">{/if}
+ {/min_auth}
+ {only_public}
+ {if !$c.dcd && $c.inscrit}<a href="{"fiche.php"|url}?user={$c.user_id}" class="popup2">{/if}
+ {/only_public}
+ {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="appli">
+ {if $c.iso3166}
+ <img src='{"images/"|url}flags/{$c.iso3166}.gif' alt='{$c.nat}' height='14' title='{$c.nat}' />
+ {/if}
+ (X {$c.promo}{if $c.app0text}, {applis_fmt type=$c.app0type text=$c.app0text url=$c.app0url}
+ {/if}{if $c.app1text}, {applis_fmt type=$c.app1type text=$c.app1text url=$c.app1url}{/if})
+ {if $c.dcd}décédé{if $c.sexe}e{/if} le {$c.deces|date_format}{/if}
+ {min_auth level="cookie"}
+ {if !$c.dcd && !$c.wasinscrit}
+ <a href="{rel}/marketing/public.php?num={$c.user_id}" class='popup'>clique ici si tu connais son adresse email !</a>
+ {/if}
+ {/min_auth}
+ </div>
+
+ <div class="bits">
+ {min_auth level="cookie"}
+ {if !$c.wasinscrit}
+ {if $show_action eq ajouter}
+ <a href="{rel}/carnet/notifs.php?add_nonins={$c.user_id}">{*
+ *}<img src="{rel}/images/ajouter.gif" alt="Ajouter à la liste de mes surveillances" title="Ajouter à la liste de mes surveillances" /></a>
+ {else}
+ <a href="{rel}/carnet/notifs.php?del_nonins={$c.user_id}">{*
+ *}<img src="{rel}/images/retirer.gif" alt="Retirer de la liste de mes surveillances" title="Retirer de la liste de mes surveillances" /></a>
+ {/if}
+ {elseif !$c.dcd}
+ <a href="{rel}/fiche.php?user={$c.forlife}" class="popup2">{*
+ *}<img src="{rel}/images/loupe.gif" alt="Afficher la fiche" title="Afficher la fiche" /></a>
+ <a href="{rel}/vcard.php/{$c.forlife}.vcf?x={$c.forlife}">{*
+ *}<img src="{rel}/images/vcard.png" alt="Afficher la carte de visite" title="Afficher la carte de visite" /></a>
+ <a href="{rel}/carnet/mescontacts.php?action={$show_action}&user={$c.forlife}">{*
+ *}<img src="{rel}/images/{$show_action}.gif" alt="{if $show_action eq "ajouter"}Ajouter à mes{else}Retirer de mes{/if} contacts"
+ title="{if $show_action eq "ajouter"}Ajouter à mes{else}Retirer de mes{/if} contacts" /></a>
+ {/if}
+ {/min_auth}
+
+ {perms level='admin'}
+ {if !$c.wasinscrit}
+ <a href="{rel}/marketing/private.php?uid={$c.user_id}">{*
+ *}<img src="{rel}/images/admin.png" alt='admin' title="marketter user" /></a>
+ {elseif !$c.dcd}
+ <a href="{rel}/admin/utilisateurs.php?login={$c.forlife}">{*
+ *}<img src="{rel}/images/admin.png" alt='admin' title="administrer user" /></a>
+ {/if}
+ <a href="http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$c.matricule_ax}">{*
+ *}<img src="{rel}/images/ax.png" alt='AX' title="fiche AX" /></a>
+ {/perms}
+ </div>
+
+ <div class="long">
+ {if $c.wasinscrit}
+ {if $c.web || $c.mobile || $c.countrytxt || $c.city || $c.region || $c.entreprise || $c.freetext}
+ <table cellspacing="0" cellpadding="0">
+ {if $c.web}
+ <tr>
+ <td class="lt">Page web:</td>
+ <td class="rt"><a href="{$c.web}">{$c.web}</a></td>
+ </tr>
+ {/if}
+ {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}
+ <tr>
+ <td class="lt">Mobile:</td>
+ <td class="rt">{$c.mobile}</td>
+ </tr>
+ {/if}
+ {if $c.entreprise}
+ <tr>
+ <td class="lt">Profession:</td>
+ <td class="rt">
+ {$c.entreprise} {if $c.secteur}({$c.secteur}){/if}
+ {if $c.fonction}<br />{$c.fonction}{/if}
+ </td>
+ </tr>
+ {/if}
+ {if $c.freetext}
+ <tr>
+ <td class="lt">Commentaire:</td>
+ <td class="rt">{$c.freetext|nl2br}</td>
+ </tr>
+ {/if}
+ </table>
+ {/if}
+ {/if}
+ </div>
+
+</div>
+{if !$c.inscrit || $c.dcd}</div>{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<table cellpadding="8" cellspacing="2" style="width:100%;">
+ {foreach from=$trombi_list item=p}
+ {cycle values="1,2,3" assign="loop"}
+ {if $loop eq "1"}
+ <tr>
+ {/if}
+ <td class="center">
+ <a href="{"fiche.php"|url}?user={$p.forlife}" class="popup2">
+ <img src="{"getphoto.php"|url}?x={$p.forlife}" width="110" alt=" [ PHOTO ] " />
+ </a>
+ {if $trombi_admin && $smarty.session.perms eq 'admin'}
+ <a href="{"admin/admin_trombino.php"|url}?uid={$p.user_id}">
+ <img src="{"images/admin.png"}" alt="[admin]" title="[admin]" />
+ </a>
+ {/if}
+ <br />
+ <a href="{"fiche.php"|url}?user={$p.forlife}" class="popup2">
+ {$p.prenom} {$p.nom}{if $trombi_show_promo} ({$p.promo}){/if}
+ </a>
+ </td>
+ {if $loop eq "3"}
+ </tr>
+ {/if}
+ {/foreach}
+ {if $loop eq "1"}
+ <td></td><td></td></tr>
+ {elseif $loop eq "2"}
+ <td></td></tr>
+ {/if}
+ <tr>
+ <td colspan='3' class='center'>
+ {foreach from=$trombi_links item=l}
+ {if $l.i eq $smarty.request.offset}
+ <span class="erreur">{$l.text}</span>
+ {else}
+ <a href="{$l.u}">{$l.text}</a>
+ {/if}
+ {/foreach}
+ </td>
+ </tr>
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Bienvenue sur le portail des élèves et anciens élèves de l'X !
+</h1>
+
+<p>
+ Polytechnique.org est le site qui connecte la communauté des polytechniciens.
+ Il comporte une partie publique, et une partie privée réservée aux
+ polytechniciens.
+</p>
+<br />
+<strong>Si vous êtes un recruteur ou une entreprise, / if you are a recruiter or a company,</strong>
+ <ul>
+ <li class="spaced">vous avez la possibilité <strong><a href="http://www.manageurs.com/?langue=fr">d'utiliser le site Manageurs.com</a></strong> pour rentrer en contact avec les Polytechniciens, mettre en ligne des offres d'emploi, consulter l'annuaire inter-écoles et consulter la base de données de CV.</li>
+ <li class="spaced">you can <strong><a href="http://www.manageurs.com/?langue=en">access Manageurs.com</a></strong> to get in touch with alumni and students of Ecole Polytechnique, submit job offers, use the directory and browse the resume database.</li>
+ </ul>
+ <strong>Si vous êtes polytechnicien,</strong>
+ <ul>
+ <li class="spaced">vous pouvez <strong><a href="/register/">vous inscrire à Polytechnique.org</a></strong> si ce n'est pas encore fait,</li>
+ <li class="spaced">ou <strong><a href="login.php">vous connecter</a></strong> si vous êtes inscrit !</li>
+ </ul>
+ Vous pouvez <strong><a href="docs/services.php">consulter la liste de ce que vous apporte Polytechnique.org</a></strong> si vous hésitez à vous inscrire !
+ <br />
+ <br />
+ <strong>Dans tous les cas,</strong> vous pouvez :
+ <ul>
+ <li class="spaced"><strong><a href="search.php">rechercher un ancien élève ou un élève</a></strong> dans l'annuaire en ligne,</li>
+ <li class="spaced"><strong><a href="http://asso.polytechnique.org/">accéder à la liste des sites en rapport avec l'École</a></strong> - les sites officiels de l'École sont <a href="http://www.polytechnique.fr">polytechnique.fr</a> et <a href="http://www.polytechnique.edu">polytechnique.edu</a>, le portail des X sur le web est <a href="http://www.polytechnique.org/">polytechnique.org</a>, et le site de l'amicale des Anciens Eleves (AX) est <a href="http://www.polytechniciens.com/">polytechniciens.com</a>.</li>
+ </ul>
+
+<p>
+ <strong>Bonne visite !</strong>
+ <br /><cite>L'équipe Polytechnique.org</cite>
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Dernière étape</h1>
+<p>
+ Tu as maintenant accès au site en utilisant les paramètres reçus par mail.
+ Ton adresse électronique à vie <strong>{$forlife}@polytechnique.org</strong>
+ est déjà ouverte, essaie-la !
+</p>
+<p>
+ Remarque: 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>
+<p>
+<strong><a href="{#globals.baseurl#}/motdepassemd5.php">Clique ici pour changer ton mot de passe.</a></strong>
+</p>
+<p>
+ N'oublie pas : 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.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if !$details.own}
+<p class='erreur'>
+Tu n'es pas administrateur de la liste, mais du site.
+</p>
+{/if}
+
+{include file="listes/header_listes.tpl" on=admin}
+
+<p>
+Pour inscrire un utilisateur, il faut remplir les champs prévus à cet effet en saisissant un de
+ses identifiants, de la forme "prenom.nom", ou "prenom.nom.promo" en cas d'homonymie. Pour inscrire plusieurs utilisateurs, les séparer par des espaces.
+L'icône <img src='{rel}/images/retirer.gif' alt='retirer membre' title='retirer membre' /> permet de désinscrire de la liste quelqu'un
+qui y était abonné.
+</p>
+
+<h1>
+ modérateurs de la liste
+</h1>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='tinybicol' cellpadding='0' cellspacing='0'>
+ {foreach from=$owners item=xs key=promo}
+ <tr>
+ <td class='titre'>{if $promo}{$promo}{else}non-X{/if}</td>
+ <td>
+ {foreach from=$xs item=x}
+ {if $promo}
+ <a href="{"fiche.php"|url}?user={$x.l}" class="popup2">{$x.n}</a>
+ {else}
+ {$x.l}
+ {/if}
+ <a href='?liste={$smarty.get.liste}&del_owner={$x.l}'><img src='{rel}/images/retirer.gif' alt='retirer modérateur' title='retirer modérateur' /></a>
+ <br />
+ {/foreach}
+ </td>
+ </tr>
+ {/foreach}
+ <tr>
+ <td class='titre'>Ajouter ... </td>
+ <td>
+ <input type='text' size='30' name='add_owner' />
+
+ <input type='submit' value='ajouter' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+
+<h1>
+ {$np_m|default:"0"} membre(s) dans la liste
+</h1>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='bicol' cellpadding='0' cellspacing='0'>
+ {foreach from=$members item=xs key=promo}
+ <tr>
+ <td class='titre'>{if $promo}{$promo}{else}non-X{/if}</td>
+ <td>
+ {foreach from=$xs item=x}
+ {if $promo}
+ <a href="{"fiche.php"|url}?user={$x.l}" class="popup2">{$x.n}</a>
+ {else}
+ {$x.l}
+ {/if}
+ <a href='?liste={$smarty.get.liste}&del_member={$x.l}'><img src='{rel}/images/retirer.gif' alt='retirer membre' title='retirer membre' /></a>
+ <br />
+ {/foreach}
+ </td>
+ </tr>
+ {/foreach}
+ <tr>
+ <td class='titre'>Ajouter ...</td>
+ <td>
+ <input type='text' size='40' name='add_member' />
+
+ <input type='submit' value='ajouter' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="listes/header_listes.tpl" on=archives}
+
+
+{if $archs}
+<h1>Archives de la liste {$smarty.request.liste}</h1>
+
+<h2>Triés par fils de discussion</h2>
+
+<table class="tinybicol" cellspacing="0" cellpadding="0">
+ <tr>
+ <th>Année</th>
+ <th colspan="6">
+ Mois
+ </th>
+ </tr>
+ {foreach from=$archs item=m key=y}
+ <tr class="center {if $y is odd}pair{else}impair{/if}">
+ <td class="titre" rowspan="2">{$y}</td>
+ {foreach from=$range item=i}
+ <td>
+ {if $m[$i]}
+ <a href="?liste={$smarty.request.liste}&rep={$y}/{$i|string_format:"%02u"}&file=threads.html">{"0000-$i-01"|date_format:"%B"}</a>
+ {else}
+
+ {/if}
+ </td>
+ {if $i eq 6}</tr><tr class="center {if $y is odd}pair{else}impair{/if}">{/if}
+ {/foreach}
+ </tr>
+ {/foreach}
+</table>
+
+<h2>Triés par date</h2>
+
+<table class="tinybicol" cellspacing="0" cellpadding="0">
+ <tr>
+ <th>Année</th>
+ <th colspan="6">
+ Mois
+ </th>
+ </tr>
+ {foreach from=$archs item=m key=y}
+ <tr class="center {if $y is odd}pair{else}impair{/if}">
+ <td class="titre" rowspan="2">{$y}</td>
+ {foreach from=$range item=i}
+ <td>
+ {if $m[$i]}
+ <a href="?liste={$smarty.request.liste}&rep={$y}/{$i|string_format:"%02u"}&file=dates.html">{"0000-$i-01"|date_format:"%B"}</a>
+ {else}
+
+ {/if}
+ </td>
+ {if $i eq 6}</tr><tr class="center {if $y is odd}pair{else}impair{/if}">{/if}
+ {/foreach}
+ </tr>
+ {/foreach}
+</table>
+{elseif $archives}
+{tidy}
+{include file="$archives"}
+{/tidy}
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="listes/header_listes.tpl" on=check}
+
+{if $options|@count}
+<table class='bicol' cellpadding='2' cellspacing='0'>
+ <tr><th colspan='3'>Options incorrectes pour {$details.addr}</th></tr>
+ <tr><th>champs</th><th>devrait être:</th><th>est ...</th></tr>
+ {foreach from=$options key=k item=o}
+ <tr>
+ <td class='titre'>{$k}</td>
+ <td>{if $o[0] === false}False{elseif $o[0] === true}True{elseif $o[0] === ''}" "{else}{$o[0]}{/if}</td>
+ <td>{if $o[1] === false}False{elseif $o[1] === true}True{elseif $o[1] === ''}" "{else}{$o[1]}{/if}</td>
+ </tr>
+ {/foreach}
+</table>
+<form action='{$smarty.server.REQUEST_URI}' method='post'>
+ <div class='center'>
+ <br />
+ <input type='submit' name='correct' value='Corriger les valeurs !' />
+ </div>
+</form>
+{else}
+<p>Liste correcte !</p>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Création d'une liste de diffusion
+</h1>
+
+{if $created}
+
+<p class='erreur'>Demande de création envoyée !</p>
+
+{else}
+
+<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 :
+</p>
+
+<form action='{$smarty.server.PHP_SELF}' method='post'>
+ <table class='bicol' cellspacing='0' cellpadding='2'>
+ <tr>
+ <th colspan='2'>Caractéristiques de la Liste</th>
+ </tr>
+ <tr>
+ <td class='titre'>Addresse souhaitée :</td>
+ <td>
+ <input type='text' name='liste' value='{$smarty.post.liste}' />@polytechnique.org
+ </td>
+ </tr>
+ <tr>
+ <td class='titre'>Sujet (bref) :</td>
+ <td>
+ <input type='text' name='desc' size='50' value="{$smarty.post.desc}" />
+ </td>
+ </tr>
+ <tr>
+ <td class='titre'>Propriétés :</td>
+ <td>
+ <table style='width: 100%'>
+ <tr>
+ <td>visibilité :</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'
+ {if $smarty.post.advertise neq 0 || !$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 eq 0 && $smarty.post}checked='checked'{/if} />libre</td>
+ <td><input type='radio' name='inslevel' value='1'
+ {if $smarty.post.inslevel neq 0 || !$smarty.post}checked='checked'{/if} />modérée</td>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><th colspan='2'>Membres et Gestionnaires</th></tr>
+ <tr>
+ <td class='titre'>Gestionnaires</td>
+ <td>
+ <input type='hidden' name='owners' value='{$owners}' />
+ {$owners|nl2br|default:"<span class='erreur'>pas de gestionnaires</span>"}
+ <br />
+ <input type='text' name='add_owner' />
+ <input type='submit' name='add_owner_sub' value='Ajouter' />
+ </td>
+ </tr>
+ <tr>
+ <td class='titre'>Membres</td>
+ <td>
+ <input type='hidden' name='members' value='{$members}' />
+ {$members|nl2br|default:"<span class='erreur'>pas de membres</span>"}
+ <br />
+ <input type='text' name='add_member' />
+ <input type='submit' name='add_member_sub' value='Ajouter' />
+ </td>
+ </tr>
+ </table>
+ <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
+ pas d'être le premier à le demander :-)
+ </p>
+ <p>
+ La liste est habituellement créée dans les jours qui suivent la demande sauf exception. Pour plus
+ d'informations écris-nous à l'adresse {mailto address='listes@polytechnique.org'} en mettant dans
+ le sujet de ton mail le nom de la liste souhaité afin de faciliter les échanges de mails
+ ultérieurs éventuels.
+ </p>
+ <div class='center'>
+ <br />
+ <input type='submit' name='submit' value='Soumettre' />
+ </div>
+</form>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $deleted}
+
+<p>[<a href='{if $it_is_xnet}listes.php{else}index.php{/if}'>Voir toutes les listes</a>]</p>
+<p class="erreur">La liste a été détruite !</p>
+
+{else}
+
+{if !$details.own}
+<p class='erreur'>
+Tu n'es pas administrateur de la liste, mais du site.
+</p>
+{/if}
+
+{include file="listes/header_listes.tpl" on=delete}
+
+<h1>
+ Détruire la liste {$details.addr} ?
+</h1>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='tinybicol' cellpadding='2' cellspacing='0'>
+ <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 » :
+ <input type='text' size='3' maxlength='3' name="valid" />
+ </td>
+ </tr>
+ <tr class='pair'>
+ <td>
+ Si tu veux préserver les archives de la liste, décoche la case ci-contre.
+ <input type="checkbox" checked="checked" name="del_archive" />
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td class="center">
+ <input type="submit" value="Détruire !" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $it_is_xnet}
+{assign var=index value="listes.php"}
+{assign var=prefix value="listes-"}
+{else}
+{assign var=index value="index.php"}
+{assign var=prefix value=""}
+{/if}
+
+<table>
+ <tr>
+ <td colspan='2'>
+ [<a href='{$index}'>Voir toutes les listes</a>]
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Liste {$smarty.request.liste} :</strong></td>
+ <td>
+ {if $on neq members}
+ [<a href='{$prefix}members.php?liste={$smarty.request.liste}'>liste des membres</a>]
+ {else}
+ [liste des membres]
+ {/if}
+ {if !$it_is_xnet}
+ {if $on neq trombi}
+ [<a href='{$prefix}trombi.php?liste={$smarty.request.liste}'>trombinoscope</a>]
+ {else}
+ [trombinoscope]
+ {/if}
+ {/if}
+ {if $on neq archives}
+ [<a href='{$prefix}archives.php?liste={$smarty.request.liste}'>archives</a>]
+ {else}
+ [archives]
+ {/if}
+ </td>
+ </tr>
+ {if $details.own || $smarty.session.perms eq admin || $force_list_super}
+ <tr>
+ <td><strong>Administrer la liste :</strong></td>
+ <td>
+ {if $on neq moderate}
+ [<a href='{$prefix}moderate.php?liste={$smarty.get.liste}'>modération</a>]
+ {else}
+ [modération]
+ {/if}
+ {if $on neq admin}
+ [<a href='{$prefix}admin.php?liste={$smarty.get.liste}'>ajout/retrait de membres</a>]
+ {else}
+ [ajout/retrait de membres]
+ {/if}
+ {if $on neq options}
+ [<a href='{$prefix}options.php?liste={$smarty.get.liste}'>options</a>]
+ {else}
+ [options]
+ {/if}
+ {if $on neq delete}
+ [<a href='{$prefix}delete.php?liste={$smarty.get.liste}'>détruire</a>]
+ {else}
+ [détruire liste]
+ {/if}
+ </td>
+ </tr>
+ {/if}
+ {if $smarty.session.perms eq admin || $force_list_super}
+ <tr>
+ <td><strong>Administrer (avancé) :</strong></td>
+ <td>
+ {if $on neq soptions}
+ [<a href='{$prefix}soptions.php?liste={$smarty.get.liste}'>options avancées</a>]
+ {else}
+ [options avancées]
+ {/if}
+ {if $on neq check}
+ [<a href='{$prefix}check.php?liste={$smarty.get.liste}'>vérifications</a>]
+ {else}
+ [vérifications]
+ {/if}
+ </td>
+ </tr>
+ {/if}
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Listes de diffusion de Polytechnique.org
+</h1>
+
+<h2>L'inscription à une liste de diffusion</h2>
+
+<p>
+Pour t'inscrire à une liste il suffit de cliquer sur l'icone
+<img src="{"images/ajouter.gif"|url}" alt="[ inscription ]" /> située en fin de ligne.
+</p>
+
+<p>
+Certaines listes sont à inscription modérée, l'inscription n'y est pas
+immédiate. Il faut en effet l'action d'un modérateur de la liste pour valider
+(ou éventuellement refuser) ta candidature. Ces listes apparaissent avec l'icone
+<img src="{"images/flag.png"|url}" alt="[ en cours ]" />.
+</p>
+
+<p>
+Pour se désinscrire, il suffit de la même manière de cliquer sur l'icone
+<img src="{"images/retirer.gif"|url}" alt="[ désinscription ]" />.
+</p>
+
+<h2>La diffusion sur une liste de diffusion</h2>
+<p>
+La diffusion a trois niveaux de modération. La diffusion peut être :
+</p>
+<ul>
+ <li>libre : tout le monde peut y envoyer des mails, la diffusion y est
+ immédiate;</li>
+ <li>restreinte : les membres de la liste peuvent envoyer librement des mails,
+ les extérieurs sont modérés;</li>
+ <li>modérée: 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>
+
+<p class='smaller'>
+NB : les gestionnaires d'une liste sont aussi ses modérateurs.<br />
+les listes avec une asterisque sont les listes dont tu es le gestionnaire.
+</p>
+
+<h2>Demander la création d'une liste de diffusion</h2>
+
+<p>
+Nos listes ont pour but de réunir des X autour de thèmes ou centres d'intérêt communs. C'est un
+moyen pratique et efficace de rassembler plusieurs personnes autour d'un projet commun ou d'une
+thématique particulière.
+</p>
+<p>
+Tu peux demander <a href='create.php'>la création</a> d'une liste de diffusion sur le thème de ton choix.
+</p>
+
+
+<h1>
+ Listes de diffusion publiques
+</h1>
+
+<p>
+Les listes de diffusion publiques sont visibles par tous les X inscrits à Polytechnique.org.
+</p>
+
+{include file='listes/listes.inc.tpl' min=0}
+
+<h1>
+ Listes de diffusion privées (et de promo)
+</h1>
+
+<p>
+Si tu te désinscris de ces listes, tu ne seras plus capable de t'y réinscrire par toi-même !
+</p>
+
+{if $smarty.session.perms eq admin}
+{include file='listes/listes.inc.tpl' min=1}
+{else}
+{include file='listes/listes.inc.tpl' min=1 max=4}
+{/if}
+
+<br />
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='tinybicol' cellspacing='0' cellpadding='2'>
+ <tr>
+ <th colspan='2'>Inscription à une liste de diffusion promo</th>
+ </tr>
+ <tr>
+ <td class='titre'>Promotion:</td>
+ <td>
+ <input type='text' size='4' maxlength='4' name='promo_add' />
+
+ <input type='submit' value="m'inscrire" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{perms level=admin}
+<h1>
+ Listes d'administration
+</h1>
+
+{include file='listes/listes.inc.tpl' min=2 max=4}
+
+{/perms}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<table class='bicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>Liste</th>
+ <th>Description</th>
+ <th>Diff.</th>
+ <th>Inscr.</th>
+ <th>Nb</th>
+ <th></th>
+ </tr>
+ {foreach from=$listes item=liste}
+ {if $liste.priv >= $min && $liste.priv <= $max|default:$min}
+ <tr class='{cycle values="impair,pair"}'>
+ <td>
+ <a href='members.php?liste={$liste.list}'>{$liste.list}{if $liste.own} *{/if}</a>
+ </td>
+ <td>{$liste.desc}</td>
+ <td class='center'>
+ {if $liste.diff eq 2}modérée{elseif $liste.diff}restreinte{else}libre{/if}
+ </td>
+ <td class='center'>
+ {if $liste.ins}modérée{else}libre{/if}
+ </td>
+ <td class='right'>{$liste.nbsub}</td>
+ <td class='right'>
+ {if $liste.sub eq 2}
+ <a href='{$smarty.server.PHP_SELF}?del={$liste.list}'>
+ <img src="{"images/retirer.gif"|url}" alt="[ désinscription ]" title="me désinscrire de {$liste.list}" />
+ </a>
+ {elseif $liste.sub eq 1}
+ <img src="{"images/flag.png"|url}" alt="[ en cours ]" title='inscription en attente de modération' />
+ {else}
+ <a href='{$smarty.server.PHP_SELF}?add={$liste.list}'>
+ <img src="{"images/ajouter.gif"|url}" alt="[ inscription ]" title="m'inscrire sur {$liste.list}" />
+ </a>
+ {/if}
+ </td>
+ </tr>
+ {/if}
+ {/foreach}
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="listes/header_listes.tpl" on=members}
+
+<h1>
+ Liste {$smarty.request.liste}
+</h1>
+
+<table class='tinybicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <td class='titre'> Adresse </td>
+ <td>{mailto address=$details.addr}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Sujet </td>
+ <td>{$details.desc}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Visibilité </td>
+ <td>{if $details.priv eq 0}publique{elseif $details.priv eq 1}privée{else}admin{/if}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Diffusion </td>
+ <td>{if $details.diff eq 2}modérée{elseif $details.diff}restreinte{else}libre{/if}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Inscription </td>
+ <td>{if $details.ins}modérée{else}libre{/if}</td>
+ </tr>
+ <tr>
+ <td class='titre'>Nb. membres:</td>
+ <td>{$nb_m|default:"0"}</td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">Ton statut:</td>
+ <td>
+ {if $details.sub>1}
+ Tu es inscrit sur la liste.<br />
+ Te désinscrire :
+ <a href='?liste={$smarty.request.liste}&del=1'><img src="{rel}/images/retirer.gif" alt="[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 :
+ <a href="?liste={$smarty.request.liste}&add=1"><img src="{rel}/images/ajouter.gif" alt="[demander mon inscription]" /></a>
+ {/if}
+ </td>
+ </tr>
+</table>
+{if $details.info}
+<br />
+<table class='tinybicol' cellpadding='0' cellspacing='0'>
+ <tr><th colspan='2'>Informations sur la liste</th></tr>
+ <tr>
+ <td colspan='2'>{$details.info|nl2br}</td>
+ </tr>
+</table>
+{/if}
+
+<h1>
+ modérateurs de la liste
+</h1>
+
+{if $owners|@count}
+<table class='tinybicol' cellpadding='0' cellspacing='0'>
+ {foreach from=$owners item=xs key=promo}
+ <tr>
+ <td class='titre'>{if $promo}{$promo}{else}non-X{/if}</td>
+ <td>
+ {foreach from=$xs item=x}
+ {if $promo}
+ <a href="{"fiche.php"|url}?user={$x.l}" class="popup2">{$x.n}</a><br />
+ {else}
+ {$x.l}<br />
+ {/if}
+ {/foreach}
+ </td>
+ </tr>
+ {/foreach}
+</table>
+{/if}
+
+<h1>
+ membres de la liste
+ {if $smarty.get.alpha}
+ (<a href='?liste={$smarty.request.liste}'>trier par promo</a>)
+ {else}
+ (<a href='?liste={$smarty.request.liste}&alpha=1'>trier par nom</a>)
+ {/if}
+</h1>
+
+{if $members|@count}
+<table class='bicol' cellpadding='0' cellspacing='0'>
+ {foreach from=$members item=xs key=promo}
+ <tr>
+ <td class='titre'>{if $promo}{$promo}{else}non-X{/if}</td>
+ <td>
+ {foreach from=$xs item=x}
+ {if $promo}
+ <a href="{"fiche.php"|url}?user={$x.l}" class="popup2">{$x.n}</a><br />
+ {else}
+ {$x.l}<br />
+ {/if}
+ {/foreach}
+ </td>
+ </tr>
+ {/foreach}
+</table>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="listes/header_listes.tpl" on=moderate}
+
+<h1>
+ Inscriptions en attente de modération
+</h1>
+
+{if $subs|@count}
+<table class='bicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>Nom</th>
+ <th>Adresse</th>
+ <th></th>
+ </tr>
+ {foreach from=$subs item=s}
+ <tr class='{cycle values="pair,impair"}'>
+ <td>{$s.name}{if $s.login}
+ <a href="{rel}/fiche.php?user={$s.login}" class="popup2">{*
+ *}<img src="{rel}/images/loupe.gif" alt="Afficher la fiche" title="Afficher la fiche" /></a>
+ {/if}
+ </td>
+ <td>{$s.addr}</td>
+ <td class='action'>
+ <a href='?liste={$smarty.request.liste}&sadd={$s.id}'>ajouter</a>
+ <a href='?liste={$smarty.request.liste}&sid={$s.id}'>refuser</a>
+ </td>
+ </tr>
+ {/foreach}
+</table>
+{else}
+<p>pas d'inscriptions en attente de modération</p>
+{/if}
+
+<h1>
+ Mails en attente de modération
+</h1>
+
+{if $mails|@count}
+<ul>
+ <li>
+ <strong>accepter:</strong> le mail est immédiatement libéré, et envoyé à la
+ liste.
+ </li>
+ <li>
+ <strong>refuser:</strong> pour refuser un mail, suivre le lien [voir] et
+ remplir le formulaire en bas de page.
+ </li>
+ <li>
+ <strong>détruire:</strong> le mail est effacé sans autre forme de procès.
+ N'utiliser <strong>QUE</strong> pour les virus et les courriers indésirables.
+ </li>
+</ul>
+
+<table class='bicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>émetteur</th>
+ <th>sujet</th>
+ <th>taille</th>
+ <th>date</th>
+ <th></th>
+ </tr>
+ {foreach from=$mails item=m}
+ <tr class='{cycle values="pair,impair"}'>
+ <td>{$m.sender}</td>
+ <td>{$m.subj|default:"[pas de sujet]"}</td>
+ <td class='right'>{$m.size}o</td>
+ <td class='right'>{$m.stamp|date_format:"%X<br />%x"}</td>
+ <td class='action'>
+ <a href='?liste={$smarty.request.liste}&mid={$m.id}'>voir</a>
+ <a href='?liste={$smarty.request.liste}&mid={$m.id}&mok=1'>accepter</a><br />
+ <a href='?liste={$smarty.request.liste}&mid={$m.id}&mdel=1'>détruire</a></td>
+ </tr>
+ {/foreach}
+</table>
+{else}
+<p>pas de mails en attente de modération</p>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Propriétés du mail en attente
+</h1>
+
+<table class='tinybicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <td class='titre'>émetteur</td>
+ <td>{$mail.sender}</td>
+ </tr>
+ <tr>
+ <td class='titre'>sujet</td>
+ <td>{$mail.subj}</td>
+ </tr>
+ <tr>
+ <td class='titre'>taille</td>
+ <td>{$mail.size} octets</td>
+ </tr>
+ <tr>
+ <td class='titre'>date</td>
+ <td>{$mail.stamp|date_format:"%X le %x"}</td>
+ </tr>
+</table>
+
+<h1>
+ Contenu du mail en attente
+</h1>
+
+{if $mail.parts|@count}
+<table class='bicol' cellpadding='0' cellspacing='0'>
+ {foreach from=$mail.parts item=part key=i}
+ <tr><th>Partie n°{$i}</th></tr>
+ <tr class='{cycle values="impair,pair"}'>
+ <td><tt>{$part|qpd|nl2br}</tt></td>
+ </tr>
+ {/foreach}
+</table>
+<br />
+{/if}
+
+<form method='post' action='?liste={$smarty.request.liste}'>
+ <table class='tinybicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th class='titre'>Modérer le mail</th>
+ </tr>
+ <tr>
+ <td>raison (pour les refus) :
+ <textarea cols='50' rows='10' name='reason'></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td class='center'>
+ <input type='hidden' name='mid' value='{$smarty.get.mid}' />
+ <input type='submit' name='mok' value='Accepter !' />
+ <input type='submit' name='mno' value='Refuser !' />
+ <input type='submit' name='mdel' value='Détruire !' style='color:red;' />
+ </td>
+ </tr>
+ </table>
+ <ul>
+ <li>« Refuser » rejette le mail avec un message à son auteur (celui que tu tapes dans le cadre)</li>
+ <li>
+ Détruire efface le mail sans autre forme de procès, et c'est à utiliser UNIQUEMENT pour les
+ virus et les courriers indésirables
+ </li>
+ </ul>
+</form>
+<p>
+En cas de refus, le mail envoyé à l'auteur du mail que tu modères actuellement sera de la forme suivante :
+</p>
+<pre>{$msg}</pre>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Refuser l'inscription d'un utilisateur
+</h1>
+
+<form method='post' action='?liste={$smarty.request.liste}'>
+ <table class='tinybicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th class='titre'>refuser l'inscription de :</th>
+ </tr>
+ <tr>
+ <td>{$del_user.name}</td>
+ </tr>
+ <tr>
+ <td>raison:
+ <textarea cols='50' rows='10' name='reason'></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td class='center'>
+ <input type='hidden' name='sdel' value='{$del_user.id}' />
+ <input type='submit' value='Refuser !' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if !$details.own}
+<p class='erreur'>
+Tu n'es pas administrateur de la liste, mais du site.
+</p>
+{/if}
+
+{include file="listes/header_listes.tpl" on=options}
+
+<h1>
+ Changer les options de la liste {$details.addr}
+</h1>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='bicol' cellpadding='2' cellspacing='0'>
+ <tr><th colspan='2'>Options de la liste {$details.addr}</th></tr>
+ <tr class='impair'>
+ <td>
+ <strong>description courte :</strong><br />
+ <span class='smaller'>une courte phrase pour décrire la liste.</span>
+ </td>
+ <td>
+ <input type='text' size='40' name='description' value="{$options.description}" />
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>description longue :</strong><br />
+ <span class='smaller'>une description plus longue de la liste.</span>
+ </td>
+ <td>
+ <textarea cols='40' rows='8' name='info'>{$options.info}</textarea>
+ </td>
+ </tr>
+ <tr class='pair'>
+ <td>
+ <strong>message de bienvenue :</strong><br />
+ <span class='smaller'>un texte de bienvenue incorporé au mail envoyé aux nouveaux
+ abonnés à la liste.</span>
+ </td>
+ <td>
+ <textarea cols='40' rows='8' name='welcome_msg'>{$options.welcome_msg}</textarea>
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>message d'adieu :</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>
+ <td>
+ <input type='checkbox' name='send_goodbye_msg'
+ {if $options.send_goodbye_msg}checked='checked'{/if} /> activer le mail d'adieu. <br />
+ <textarea cols='40' rows='8' name='goodbye_msg'>{$options.goodbye_msg}</textarea>
+ </td>
+ </tr>
+ <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 />
+ <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>
+ <input type='text' name='subject_prefix' size='40' value="{$options.subject_prefix}" />
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>notification de (dés)abonnement :</strong><br />
+ <span class='smaller'>notifier les modérateurs des inscriptions/désinscriptions d'utilisateurs sur cette liste.</span>
+ </td>
+ <td>
+ <input type='checkbox' name='admin_notify_mchanges'
+ {if $options.admin_notify_mchanges}checked='checked'{/if} /> Notification activée.
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>diffusion :</strong>
+ </td>
+ <td>
+ <input type='radio' name='moderate' value='0'
+ {if !$options.generic_nonmember_action && !$options.default_member_moderation}
+ checked='checked'{/if} />libre<br />
+ <input type='radio' name='moderate' value='1'
+ {if $options.generic_nonmember_action && !$options.default_member_moderation}
+ checked='checked'{/if} />modérée aux extérieurs<br />
+ <input type='radio' name='moderate' value='2'
+ {if $options.generic_nonmember_action && $options.default_member_moderation}
+ checked='checked'{/if} />modérée
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>inscription libre ou modérée :</strong><br />
+ <span class='smaller'>détermine si les inscriptions à la liste sont modérées ou non.</span>
+ </td>
+ <td>
+ <input type='checkbox' name='subscribe_policy'
+ {if $options.subscribe_policy eq 2}checked='checked'{/if} /> Inscription modérée.
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>antispam :</strong><br />
+ <span class='smaller'>détermine la politique de l'antispam sur cette liste.</span>
+ </td>
+ <td>
+ <em>que faire des mails marqués « [spam probable] » ?</em><br />
+ <input type='radio' name='bogo_level' value='0' {if !$bogo_level}checked='checked'{/if} /> les laisser passer<br />
+ <input type='radio' name='bogo_level' value='1' {if $bogo_level eq 1}checked='checked'{/if} /> les envoyer aux modérateurs pour approbation<br />
+ <input type='radio' name='bogo_level' value='2' {if $bogo_level eq 2}checked='checked'{/if} /> les supprimer
+ </td>
+ </tr>
+ </table>
+
+ <div class='center'>
+ <br />
+ <input type='submit' name='submit' value="Valider les modifications" />
+ </div>
+</form>
+
+{if $details.diff eq 1}
+
+<h1>
+ Adresses non modérées de {$details.addr}
+</h1>
+<p>
+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 :
+</p>
+<p>
+les X inscrits à la liste doivent ajouter leurs adresses usuelles parmis leurs adresses de
+redirection en mode 'inactif'. le logiciel de mailing list saura se débrouiller tout seul.
+</p>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='tinybicol' cellpadding='2' cellspacing='0'>
+ <tr><th>Addresses non modérées</th></tr>
+ <tr>
+ <td>
+ {if $options.accept_these_nonmembers|@count}
+ {foreach from=$options.accept_these_nonmembers item=addr}
+ {$addr}<a href='?liste={$smarty.get.liste}&atn_del={$addr}'>
+ <img src='{"images/retirer.gif"|url}' alt='retirer de la whitelist' title="retirer {$addr} de la whitelist" />
+ </a><br />
+ {/foreach}
+ {else}
+ <em>vide</em>
+ {/if}
+ </td>
+ </tr>
+ <tr class='center'>
+ <td>
+ <input type='text' size='32' name='atn_add' />
+
+ <input type='submit' value='ajouter' />
+ </td>
+ </tr>
+ </table>
+</form>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="listes/header_listes.tpl" on=soptions}
+
+<h1>
+ Changer les options de la liste {$details.addr}
+</h1>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class='bicol' cellpadding='2' cellspacing='0'>
+ <tr><th colspan='2'>Options de la liste {$details.addr}</th></tr>
+ <tr class='impair'>
+ <td>
+ <strong>msg_header :</strong><br />
+ <span class='smaller'>ajouté au début de tous les messages.</span>
+ </td>
+ <td>
+ <textarea cols='40' rows='8' name='msg_header'>{$options.msg_header}</textarea>
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>msg_footer :</strong><br />
+ <span class='smaller'>ajouté à la fin de tous les messages.</span>
+ </td>
+ <td>
+ <textarea cols='40' rows='8' name='msg_footer'>{$options.msg_footer}</textarea>
+ </td>
+ </tr>
+ <tr><th colspan='2'>Options avancées de la liste {$details.addr}</th></tr>
+ <tr class='impair'>
+ <td>
+ <strong>visibilité :</strong><br />
+ <span class='smaller'>si coché, la liste sera listée dans listes/index.php.
+ (les listes d'admin doivent être décochées)</span>
+ </td>
+ <td>
+ <input type='checkbox' name='advertised' {if $options.advertised}checked='checked'{/if} />
+ publique
+ </td>
+ </tr>
+ <tr class='pair'>
+ <td>
+ <strong>archive :</strong><br />
+ <span class='smaller'>Liste archivée ?</span>
+ </td>
+ <td>
+ <input type='checkbox' name='archive' {if $options.archive}checked='checked'{/if} />
+ liste archivée
+ </td>
+ </tr>
+ <tr class='impair'>
+ <td>
+ <strong>max_message_size :</strong><br />
+ <span class='smaller'>Taille maximale des posts en Ko:</span>
+ </td>
+ <td>
+ <input type='text' name='max_message_size' value='{$options.max_message_size}' /> Ko
+ </td>
+ </tr>
+ </table>
+
+ <div class='center'>
+ <br />
+ <input type='submit' name='submit' value='Valider les modifications' />
+ </div>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="listes/header_listes.tpl" on=trombi}
+
+<h1>
+ Liste {$smarty.request.liste}
+</h1>
+
+<table class='tinybicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <td class='titre'> Adresse </td>
+ <td>{mailto address=$details.addr}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Sujet </td>
+ <td>{$details.desc}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Visibilité </td>
+ <td>{if $details.priv eq 0}publique{elseif $details.priv eq 1}privée{else}admin{/if}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Diffusion </td>
+ <td>{if $details.diff eq 2}modérée{elseif $details.diff}restreinte{else}libre{/if}</td>
+ </tr>
+ <tr>
+ <td class='titre'> Inscription </td>
+ <td>{if $details.ins}modérée{else}libre{/if}</td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">Ton statut:</td>
+ <td>
+ {if $details.sub>1}
+ Tu es inscrit sur la liste.<br />
+ Te désinscrire :
+ <a href='?liste={$smarty.request.liste}&del=1'><img src="{rel}/images/retirer.gif" alt="[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 :
+ <a href="?liste={$smarty.request.liste}&add=1"><img src="{rel}/images/ajouter.gif" alt="[demander mon inscription]" /></a>
+ {/if}
+ </td>
+ </tr>
+</table>
+
+<h1>
+ modérateurs de la liste
+</h1>
+
+<table cellpadding="8" cellspacing="2" style="width:100%;">
+ {foreach from=$owners item=xs key=promo}
+ {foreach from=$xs item=x}
+ {if $promo}
+ {cycle values="1,2,3" assign="loop"}
+ {if $loop eq "1"}<tr>{/if}
+ <td class='center'>
+ <img src="{"getphoto.php"|url}?x={$x.l}" width="110" alt=" [ PHOTO ] " />
+ <br />
+ <a href="{"fiche.php"|url}?user={$x.l}" class="popup2">
+ {$x.n} ({$promo})
+ </a>
+ </td>
+ {if $loop eq "3"}</tr>{/if}
+ {/if}
+ {/foreach}
+ {/foreach}
+ {if $loop eq "1"}
+ {cycle values="1,2,3" assign="loop"}
+ {cycle values="1,2,3" assign="loop"}
+ <td></td><td></td></tr>
+ {elseif $loop eq "2"}
+ {cycle values="1,2,3" assign="loop"}
+ <td></td></tr>
+ {/if}
+</table>
+
+<h1>
+ membres de la liste
+</h1>
+
+{$trombi->show()|smarty:nodefaults}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Parcours des logs du site
+</h1>
+
+
+{if $smarty.request.logsess}
+
+<table class="bicol">
+<tr>
+ <th colspan="2">{$msg_session_properties}</th>
+</tr>
+<tr class="impair">
+ <td class="titre">{$msg_user}</td>
+ <td>{$session.username} {if $session.suer}(suid by {$session.suer}){/if} [<a href="?logauth={$session.auth}&loguser={$session.username}">user's log</a>]</td>
+</tr>
+<tr class="pair">
+ <td class="titre">{$msg_host}</td>
+ <td><em>{$session.host}</em> <tt>IP: {$session.ip}</tt></td>
+</tr>
+<tr class="impair">
+ <td class="titre">{$msg_browser}</td>
+ <td>{$session.browser}</td>
+</tr>
+</table>
+
+<br />
+
+<table class="bicol">
+<tr>
+ <th>{$msg_date}</th>
+ <th>{$msg_action}</th>
+ <th>{$msg_data}</th>
+</tr>
+{foreach from=$events item=myevent}
+<tr class="{cycle values="impair,pair"}">
+ <td style="font-size:90%;">{$myevent.stamp|date_format:"%x %X"}</td>
+ <td><strong>{$myevent.text}</strong></td>
+ <td>{$myevent.data}</td>
+</tr>
+{/foreach}
+</table>
+
+{else}
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+<table class="bicol">
+<tr>
+ <th colspan="2">{$msg_filter_by}</th>
+</tr>
+<tr>
+ <td><strong>{$msg_date}</strong></td>
+ <td>
+ {$msg_year}
+ <select name="year" onchange="this.form.submit()">
+ {html_options options=$years selected=$year}
+ </select>
+ {$msg_month}
+ <select name="month" onchange="this.form.submit()">
+ {html_options options=$months selected=$month}
+ </select>
+ {$msg_day}
+ <select name="day" onchange="this.form.submit()">
+ {html_options options=$days selected=$day}
+ </select>
+ </td>
+</tr>
+<tr>
+ <td><strong>{$msg_user}</strong></td>
+ <td>
+ <input type="text" name="loguser" value="{$loguser}" />
+ {html_options name="logauth" options=$auths selected=$logauth}
+ <input type="submit" value="{$msg_submit}" />
+ </td>
+</tr>
+</table>
+
+</form>
+
+<br />
+
+<table class="bicol" style="font-size: 90%">
+ <tr>
+ <th>{$msg_start}</th>
+ <th>{$msg_user}</th>
+ <th>{$msg_summary}</th>
+ <th>{$msg_actions}</th>
+ </tr>
+{foreach from=$sessions item=mysess}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$mysess.start|date_format:"%x %X"}</td>
+ <td><strong>{$mysess.username}</strong> <span class="smaller">({$mysess.lauth})</span></td>
+ <td>
+ {foreach from=$mysess.events item=myevent}{$myevent}<br />{/foreach}
+ </td>
+ <td class="action">
+{foreach from=$mysess.actions item=myaction}
+ {a lnk=$myaction}
+{/foreach}
+ </td>
+ </tr>
+ {/foreach}
+{if $msg_nofilters}
+<tr>
+ <td>{$msg_nofilters}</td>
+</tr>
+{/if}
+</table>
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $ask_naissance}
+
+{include file='include/form_naissance.tpl'}
+
+{else}
+
+<h1>
+Bienvenue {$smarty.session.prenom}
+{if $birthday}
+ et joyeux anniversaire de {$birthday} ans de la part de toute l'équipe !
+{else}
+:o)
+{/if}
+</h1>
+
+<div class="smaller">
+ Ta connexion précédente date du
+ <strong>{$smarty.session.lastlogin|date_format:"%x, %X"}</strong>
+ depuis la machine <strong>{$smarty.session.host}</strong>
+</div>
+
+{if $fiche_incitation}
+ <p>La dernière mise à jour de ta
+ <a href="{rel}/fiche.php}?user={$smarty.session.forlife}" class="popup2">fiche</a>
+ date du {$fiche_incitation|date_format}.
+ Il est possible qu'elle ne soit pas à jour.
+ Si tu souhaites la modifier, <a href="profil.php">clique ici !</a>
+ </p>
+{/if}
+
+{if $photo_incitation}
+ <p>
+ Tu n'as pas mis de photo de toi sur ta fiche, c'est dommage.
+ Clique <a href="{rel}/trombino.php">ici</a> si tu souhaites en ajouter une.
+ </p>
+{/if}
+
+{if $geoloc_incitation > 0}
+ <p>
+ Parmi tes adresses, il y en a {$geoloc_incitation} que nous n'avons pas pu localiser. Clique <a href="{rel}/profil.php?old_tab=adresses">ici</a> pour rectifier.
+ </p>
+{/if}
+<br />
+
+ <table class="bicol">
+ <tr class="pair">
+{foreach item=links from=$publicite}
+ <td class="half">
+{foreach key=url item=text from=$links}
+ <a href="{$url}">{$text}</a><br />
+{/foreach}
+ </td>
+{/foreach}
+ </tr>
+ </table>
+
+ {iterate item=ev from=$evenement}
+ <br />
+
+ <table class="bicol">
+ <tr>
+ <th>
+ <a id="newsid{$ev.id}"></a>
+ {tidy}
+ {$ev.titre|nl2br}
+ {/tidy}
+ </th>
+ </tr>
+ <tr class="{cycle values="impair,pair"}">
+ <td class="half">
+ {tidy}
+ {$ev.texte|smarty:nodefaults|nl2br}
+ {/tidy}
+ <br />
+ <p class="smaller">Annonce proposée par
+ <a href="{rel}/fiche.php?user={$ev.forlife}" class="popup2">
+ {$ev.prenom} {$ev.nom} X{$ev.promo}
+ </a>
+ </p>
+ </td>
+ </tr>
+ </table>
+ {/iterate}
+
+ <p class="smaller">
+ Nota Bene : 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
+ refuser ou de retirer toute information de nature diffamante ou pouvant être
+ interprétée comme polémique par un membre de la communauté polytechnicienne.
+ </p>
+
+ <p>
+ <a href="evenements.php">Proposer une information événementielle</a>
+ </p>
+ {if $smarty.session.core_rss_hash}
+ <div class="right">
+ <a href='{rel}/rss.php/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}.xml'><img src='{rel}/images/rssicon.gif' alt='fil rss' /></a>
+ </div>
+ {/if}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="forums_promo"}
+{from full=#from#}
+{to addr=#to#}
+{subject text="Création du forum promo $promo"}
+
+Création du forum promo {$promo} à faire !
+(+ de 20% d'inscrits)
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="inscription"}
+{from full=#from#}
+{to addr="$forlife@polytechnique.org"}
+{subject text="Bienvenue parmi les X sur le web !"}
+
+{$prenom}, félicitations pour ton inscription :o))
+
+N'oublie pas de changer ton mot de passe sur le site. C'est très important
+si tu veux garder accès au site et ton e-mail en fonction.
+
+Tu as maintenant accès à l'annuaire en ligne, aux services de listes de
+diffusion, aux infos promo, etc. N'oublie pas de mettre ta fiche-annuaire
+à jour.
+
+--
+Polytechnique.org
+"Le portail des élèves & anciens élèves de l'Ecole polytechnique"
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="inscrire"}
+{subject text="$subj"}
+{from full=#from#}
+{to addr="$lemail"}
+Bonjour,
+
+Ton inscription sur Polytechnique.org est presque terminée, un clic sur le lien ci-dessous et c'est fini.
+
+Après activation, tes paramètres 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 :
+
+{$baseurl}/register/end.php?hash={$hash}
+
+Si en cliquant dessus tu n'y arrives pas, copie intégralement l'adresse dans la barre 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 !
+
+Bien cordialement,
+Polytechnique.org
+"Le portail des élèves & anciens élèves de l'Ecole polytechnique"
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="listes_promo"}
+{from full=#from#}
+{to addr=#to#}
+{subject text="Création de la liste promo $promo"}
+
+Création de la liste promo {$promo} à faire !
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{config_load file="mails.conf" section="marketing_relance"}
+{subject text="$subj"}
+{from full=#from#}
+{to addr="$lemail"}
+Bonjour,
+
+Il y a quelques temps, le {$fdate}, tu as commencé ton inscription à Polytechnique.org ! Tu n'as toutefois pas tout à fait terminé cette inscription, aussi nous nous permettons de te renvoyer cet email pour te rappeler tes paramètres de connexion, au cas où tu souhaiterais terminer cette inscription, et accéder à l'ensemble des services que nous offrons aux {$nbdix} Polytechniciens déjà inscrits (email à vie, annuaire en ligne, etc...).
+
+UN SIMPLE CLIC sur le lien ci-dessous et ton compte sera activé !
+
+Après activation, tes paramètres seront :
+
+login : {$lusername}
+mot de passe : {$nveau_pass}
+
+(ceci annule les paramètres envoyés par le mail initial)
+
+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 :
+
+{$baseurl}/register/end.php?hash={$lins_id}
+
+Si en cliquant dessus tu n'y arrives pas, copie intégralement l'adresse dans la barre de ton navigateur.
+
+En cas de difficulté, nous sommes bien entendu à ton entière disposition !
+
+Bien cordialement,
+Polytechnique.org
+"Le portail des élèves & anciens élèves de l'Ecole polytechnique"
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>
+ Marketing Polytechnique.org
+</h1>
+
+<table class="bicol" cellpadding="3" summary="Système">
+ <tr>
+ <th>actions disponibles</th>
+ </tr>
+ <tr class="impair">
+ <td>
+ <a href="{rel}/search.php?nonins=1">Chercher un non inscrit</a>
+ |
+ <a href="promo.php">Marketing promo</a>
+ |
+ <a href="volontaire.php">Addresses données par les inscrits</a>
+ </td>
+ </tr>
+</table>
+
+<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 />
+</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 />
+</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 />
+</p>
+
+<p>
+Nombre d'<a href="this_week.php">inscrits depuis le début de la semaine</a> : {$nbInsSem}<br />
+Nombre d'<a href="relance.php">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}
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Marketing de {$prenom} {$nom}</h1>
+
+<h2>Matricules</h2>
+
+Matricule polytechnique.org : {$matricule}
+{if $matricule_X}
+<br />
+Matricule École (à rentrer lors de l'inscription) : <strong>{$matricule_X}</strong>
+{/if}
+
+{if $pending}
+
+<h2>Inscription en cours</h2>
+
+<p>
+Cet utilisateur a une inscription en cours depuis le {$pending|date_format}.
+</p>
+<p>
+{if $relance eq '0000-00-00'}
+il n'a jamais été relancé.
+{else}
+sa dernière relance date du {$relance|date_format}
+{/if}
+</p>
+
+<p>[<a href='?uid={$smarty.request.uid}relance=1'>le relancer</a>]</p>
+
+{/if}
+
+<h2>Adresses connues</h2>
+
+<form action="{$smarty.request.PHP_SELF}" method="post">
+<table class="bicol" cellpadding="0" cellspacing="0">
+ <tr>
+ <th>Adresse</th>
+ <th>Marketeur</th>
+ <th>Date</th>
+ <th>Envois</th>
+ <th>Nb.</th>
+ <th> </th>
+ </tr>
+ {iterate from=$addr item=a}
+ <tr class="{cycle values='impair,pair'}">
+ <td>{$a.email}</td>
+ <td><a href="{rel}/fiche.php?user={$a.alias}" class="popup2">{$a.alias}</a> {if $a.type eq user}(*){/if}</td>
+ <td>{$a.date|date_format|default:'-'}</td>
+ <td>{$a.last|date_format|default:'-'}</td>
+ <td class='center'>{$a.nb|default:"-"}</td>
+ <td class='action'>
+ <a href='?uid={$smarty.request.uid}&del={$a.email}'>del</a><br />
+ <a href='?uid={$smarty.request.uid}&rel={$a.email}'>relance</a>
+ </td>
+ </tr>
+ {/iterate}
+ <tr>
+ <td></td>
+ <td colspan='5' class='smaller'>(*): mail perso</td>
+ </tr>
+ <tr>
+ <td>
+ <input type='text' name='email' />
+ </td>
+ <td colspan="4">
+ <select name="type">
+ <option value="staff">staff</option>
+ <option value="user">user</option>
+ </select>
+ </td>
+ <td class='action'>
+ <input type='hidden' name='uid' value='{$smarty.request.uid}' />
+ <input type='submit' name='action' value='ajouter' />
+ </td>
+ </tr>
+</table>
+</form>
+
+{if $rel_to}
+<form action="{$smarty.request.PHP_SELF}" method="post">
+ <table class="bicol">
+ <tr class="pair">
+ <th colspan="2">Edition du mail de relance</th>
+ </tr>
+ <tr class="pair">
+ <td align="right"><strong>From:</strong></td>
+ <td><select name="from">
+ <option value="staff">{$rel_from_staff}</option>
+ <option value="user">{$rel_from_user}</option>
+ </select></td>
+ </tr>
+ <tr class="pair">
+ <td align="right"><strong>To:</strong></td>
+ <td>
+ <input type="text" value="{$rel_to}" name="to" size="40" maxlength="100" />
+ <input type="submit" name="valider" value="Envoyer" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td align="right"><strong>Objet:</strong></td>
+ <td><input type="text" name="title" value="{$rel_title}" size="50" maxlength="100" /></td>
+ </tr>
+ <tr class="pair">
+ <td align="right"><strong>Message:</strong></td>
+ <td>
+ <textarea name="message" rows="40" cols="60">{$rel_text}</textarea>
+ </td>
+ </tr>
+ </table>
+ <div class="center">
+ <input type="hidden" name="uid" value="{$smarty.request.uid}" />
+ <input type="hidden" name="email" value="{$smarty.request.rel}" />
+ <input type="reset" value="Recommencer" />
+ <input type="submit" name="valider" value="Envoyer" />
+ </div>
+</form>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<table style="margin-left: auto; margin-right: auto">
+ <tr>
+ <td>
+ <form action="?" method="get">
+ <div>
+ <input type="hidden" name="promo" value="{$promo-10}" />
+ <input type="submit" value="<<" />
+ </div>
+ </form>
+ </td>
+ <td>
+ <form action="?" method="get">
+ <div>
+ <input type="hidden" name="promo" value="{$promo-1}" />
+ <input type="submit" value="<" />
+ </div>
+ </form>
+ </td>
+ <td>
+ <form action="?" method="get">
+ <div>
+ Promotion : <input type="text" name="promo" value="{$promo}" size="4" maxlength="4" />
+ <input type="submit" value="GO" />
+ </div>
+ </form>
+ </td>
+ <td>
+ <form action="?" method="get">
+ <div>
+ <input type="hidden" name="promo" value="{$promo+1}" />
+ <input type="submit" value=">" />
+ </div>
+ </form>
+ </td>
+ <td>
+ <form action="?" method="get">
+ <div>
+ <input type="hidden" name="promo" value="{$promo+10}" />
+ <input type="submit" value=">>" />
+ </div>
+ </form>
+ </td>
+ </tr>
+</table>
+
+<br />
+
+<div class="center">
+ <a href="javascript:void(window.open('{"stats/stats_promo.php"|url}?promo={$promo}','','width=800,height=600,toolbar=no'))">
+ Voir l'évolution des inscriptions de la promotion
+ </a>
+</div>
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" summary="liste des inscriptions non confirmées">
+ <tr>
+ <th>Nom</th>
+ <th>Dernière adresse connue</th>
+ <th>Statut</th>
+ <th> </th>
+ </tr>
+ {iterate from=$nonins item=it}
+ <tr class="{cycle values="pair,impair"}">
+ <td>{$it.nom} {$it.prenom}</td>
+ <td>{if $it.last_known_email}{mailto address=$it.last_known_email}{/if}</td>
+ <td class="center">
+ {if $it.dern_rel && $it.dern_rel != '0000-00-00'}
+ Relance le: {$it.dern_rel}
+ {elseif $it.email}
+ En cours : {$it.email}
+ {else}
+ -
+ {/if}
+ </td>
+ <td class="center">
+ <a href="private.php?uid={$it.user_id}">{*
+ *}<img src="{rel}/images/admin.png" alt='Marketing' title="Marketing" /></a>
+ <a href="http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$it.matricule_ax}">{*
+ *}<img src="{rel}/images/ax.png" alt='AX' title="fiche AX" /></a>
+ </td>
+ </tr>
+ {/iterate}
+ </table>
+</form>
+
+<p>
+{$nonins->total()} Polytechniciens de la promo {$promo} ne sont pas inscrits !
+</p>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $already}
+
+<p>
+Merci de nous avoir communiqué cette information !
+</p>
+<p>
+Nous avions déjà connaissance de cette adresse, nous espérons donc comme toi que {$prenom} va s'inscrire au plus vite.
+</p>
+<p>
+Si tu le connais personnellement, un petit mail pour lui expliquer les atouts de Polytechnique.org
+peut sans aucun doute l'aider à se décider !
+</p>
+
+{elseif $ok}
+
+<p>
+ Merci de nous avoir communiqué cette information ! Un administrateur de Polytechnique.org va
+ envoyer un email de proposition d'inscription à Polytechnique.org à {$prenom} {$nom} dans les
+ toutes prochaines heures (ceci est fait à la main pour vérifier qu'aucun utilisateur malveillant
+ ne fasse mauvais usage de cette fonctionnalité...).
+</p>
+<p>
+ <strong>Merci de ton aide à la reconnaissance de notre site !</strong> Tu seras informé par email de
+ l'inscription de {$prenom} {$nom} si notre camarade accepte de rejoindre la communauté des X sur
+ le web !
+</p>
+
+{else}
+
+{if $prenom}
+<h1>
+ Et si nous proposions à {$prenom} {$nom} de s'inscrire à Polytechnique.org ?
+</h1>
+
+<p>
+ En effet notre camarade n'a pour l'instant pas encore rejoint la communauté des X sur le web...
+ C'est dommage, et en nous indiquant son adresse email, tu nous permettrais de lui envoyer une
+ proposition d'inscription.
+</p>
+<p>
+ Si tu es d'accord, merci d'indiquer ci-dessous l'adresse email de {$prenom} {$nom} si tu la
+ connais. Nous nous permettons d'attirer ton attention sur le fait que nous avons besoin d'être
+ sûrs que cette adresse est bien la sienne, afin que la partie privée du site reste uniquement
+ accessible aux seuls polytechniciens. Merci donc de ne nous donner ce renseignement uniquement si
+ tu es certain de sa véracité !
+</p>
+<p>
+ Nous pouvons au choix lui écrire au nom de l'équipe Polytechnique.org, ou bien, si tu le veux
+ bien, en ton nom. A toi de choisir la solution qui te paraît la plus adaptée !! Une fois {$prenom}
+ {$nom} inscrit, nous t'enverrons un email pour te prévenir que son inscription a réussi.
+</p>
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <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="pair">
+ <td>Adresse email :</td>
+ <td>
+ <input type="text" name="mail" size="30" maxlength="50" />
+ </td>
+ </tr>
+ <tr class="impair">
+ <td>Nous lui écrirons :</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
+ </td>
+ </tr>
+ </table>
+ <div>
+ <br />
+ <input type="hidden" name="num" value="{$smarty.request.num}" />
+ <input type="submit" name="valide" value="Valider" />
+ </div>
+</form>
+{/if}
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Relance</h1>
+
+{foreach from=$sent item=l}
+<p>{$l}</p>
+{/foreach}
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" summary="liste des inscriptions non confirmées">
+ <tr>
+ <th>Date</th>
+ <th>Promo</th>
+ <th>Nom</th>
+ <th>Dernière relance</th>
+ <th> </th>
+ </tr>
+ {iterate from=$relance item=it}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="center">{$it.date}</td>
+ <td class="center">{$it.promo}</td>
+ <td>{$it.nom} {$it.prenom}</td>
+ <td class="center">
+ {if $it.relance eq "0000-00-00"}Jamais{else}{$it.relance}{/if}
+ </td>
+ <td class="center">
+ <input type="checkbox" name="relance[{$it.uid}]" value="1" />
+ </td>
+ </tr>
+ {/iterate}
+ </table>
+
+ <p>
+ {$relance->total()} Polytechniciens n'ont pas effectué jusqu'au bout leur inscription.
+ </p>
+ <div class="center">
+ <input type="submit" name="relancer" value="Relancer" />
+ </div>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Inscrits des 7 derniers jours</h1>
+
+<p>
+{$ins->total()} Polytechniciens se sont inscrits ces 7 derniers jours !
+</p>
+
+<div class="right">
+ [<a href="{$smarty.server.PHP_SELF}?sort=date_ins">par date</a>]
+ [<a href="{$smarty.server.PHP_SELF}?sort=promo">par promo</a>]
+</div>
+
+<table class="tinybicol">
+ <tr>
+ <th>Inscription</th>
+ <th>Promo</th>
+ <th>Nom</th>
+ </tr>
+{iterate item=in from=$ins}
+ <tr class="{cycle values="impair,pair"}">
+ <td class="center">{$in.date_ins|date_format:"%x %X"}</td>
+ <td class="center">
+ <a href="promo.php?promo={$in.promo}">{$in.promo}</a>
+ </td>
+ <td>
+ <a href="{"fiche.php"|url}?user={$in.forlife}" class="popup2">
+ {$in.nom} {$in.prenom}</a>
+ </td>
+ </tr>
+{/iterate}
+</table>
+
+<div class="right">
+ [<a href="{$smarty.server.PHP_SELF}?sort=date_ins">par date</a>]
+ [<a href="{$smarty.server.PHP_SELF}?sort=promo">par promo</a>]
+</div>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Marketing volontaire</h1>
+
+<p>
+Choix de la promo :
+</p>
+<p>
+{foreach from=$promos item=p}
+<a href="?promo={$p}">{$p}</a>
+{cycle values=",,,,,,,,,,,,,,<br />"}
+{/foreach}
+</p>
+
+{if $addr}
+
+<p>[<a href="promo.php?promo={$smarty.get.promo}">Marketing promo pour la promo {$smarty.get.promo}</a>]</p>
+
+{if $addr->total()}
+<h2>Marketing volontaire</h2>
+<table class="bicol" cellpadding="3" summary="Adresses déjà utilisées">
+ <tr>
+ <th>Camarade concerné</th>
+ <th>Adresse email</th>
+ <th>"informateur"</th>
+ </tr>
+ {iterate from=$addr item=it}
+ <tr class="{cycle values="pair,impair"}">
+ <td><a href="private.php?uid={$it.user_id}">{$it.nom} {$it.prenom}</a></td>
+ <td>{$it.email}</td>
+ <td>{$it.forlife}</td>
+ </tr>
+ {/iterate}
+</table>
+{else}
+<p>
+pas d'informations pour les gens de cette promo
+</p>
+{/if}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Changer de mot de passe
+</h1>
+
+<p>
+<strong>Mot de passe enregistré le {$smarty.now|date_format}</strong>
+</p>
+<p>
+ <strong>Attention!</strong> Il est crypté irréversiblement,
+ donc <strong>non récupérable</strong>. Pour retrouver un accès au site
+ consécutivement à une perte de mot de passe, la procédure
+ est longue et laborieuse...
+</p>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Changer de mot de passe
+</h1>
+
+<p>
+ Ton mot de passe doit faire au moins <strong>6 caractères</strong> quelconques. Attention
+ au type de clavier que tu utilises (qwerty?) et aux majuscules/minuscules.
+</p>
+<p>
+ Pour une sécurité optimale, ton mot de passe circule de manière cryptée (https) et est
+ stocké crypté irréversiblement sur nos serveurs.
+</p>
+<br />
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="changepass">
+ <table class="tinybicol" cellpadding="3" cellspacing="0"
+ summary="Formulaire de mot de passe">
+ <tr>
+ <th colspan="2">
+ Saisie du nouveau mot de passe
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Nouveau mot de passe :
+ </td>
+ <td>
+ <input type="password" size="10" maxlength="10" name="nouveau" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Retape-le une fois :
+ </td>
+ <td>
+ <input type="password" size="10" maxlength="10" name="nouveau2" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="submit" value="Changer" name="submitn" onclick="EnCryptedResponse(); return false;" />
+ </td>
+ </tr>
+ </table>
+</form>
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="changepass2">
+<p>
+<input type="hidden" name="response2" value="" />
+</p>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Lettre de Polytechnique.org
+</h1>
+
+<p>
+<strong>Pour demander l'ajout d'une annonce dans la prochaine lettre mensuelle</strong>,
+utilise <a href='submit.php'>le formulaire dédié !</a>
+</p>
+
+<h2>Ton statut</h2>
+
+{if $nls}
+<p>
+Tu es actuellement inscrit à la lettre mensuelle de Polytechnique.org (pour choisir le format HTML ou texte, rends toi sur la page <a href='../preferences.php'>des préférences</a>)
+</p>
+<div class='center'>
+ [<a href='?out=1'>me désinscrire de la lettre mensuelle</a>]
+</div>
+{else}
+<p>
+Tu n'es actuellement pas inscrit à la lettre mensuelle de Polytechnique.org.
+</p>
+<div class='center'>
+ [<a href='?in=1'>m'inscrire à la lettre mensuelle</a>]
+</div>
+{/if}
+
+<h2>Les archives</h2>
+
+<table class="bicol" cellpadding="3" cellspacing="0" summary="liste des NL">
+ <tr>
+ <th>date</th>
+ <th>titre</th>
+ </tr>
+ {foreach item=nl from=$nl_list}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$nl.date|date_format}</td>
+ <td>
+ <a href="{"newsletter/show.php"|url}?nid={$nl.id}">{$nl.titre}</a>
+ </td>
+ </tr>
+ {/foreach}
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Lettre de Polytechnique.org du {$nl->_date|date_format}
+</h1>
+
+<p>
+[<a href='index.php'>liste des lettres</a>]
+{if $smarty.get.text}
+[<a href='?nid={$nl->_id}'>version HTML</a>]
+{else}
+[<a href='?nid={$nl->_id}&text=1'>version Texte</a>]
+{/if}
+{perms level='admin'}
+[<a href='{"admin/newsletter_edit.php"|url}?nid={$nl->_id}'>Editer</a>]
+{/perms}
+</p>
+
+<form method="post" action="{$smarty.server.PHP_SELF}?nid={$nl->_id}">
+ <div class='center'>
+ <input type='submit' value="me l'envoyer" name='send' />
+ </div>
+</form>
+
+<table class="bicol" cellpadding="3" cellspacing="0">
+ <tr>
+ <th>{$nl->title()}</th>
+ </tr>
+ <tr>
+ <td>
+ {if $smarty.get.text}
+ <pre>{$nl->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)}</pre>
+ {else}
+ <div class='nl'>
+ {$nl->toHtml($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)|smarty:nodefaults}
+ </div>
+ {/if}
+ </td>
+ </tr>
+</table>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Proposer un article à sur la prochaine Lettre mensuelle
+</h1>
+
+
+{if $submited}
+
+<p>
+ton article a bien été pris en compte.
+</p>
+
+<p>
+Nous te recontacterons éventuellement (certainement vers la fin du mois) si nous avons des
+renseignements à te demander à son sujet !
+</p>
+
+{else}
+
+
+{if $art}
+
+{if !$art->check()}
+<p class='erreur'>
+article trop long !<br />
+il faut te limiter à 8 lignes de 68 caractères.
+</p>
+{/if}
+
+<form action="{$smarty.server.PHP_SELF}" method='post'>
+ <table class='tinybicol'>
+ <tr><th>Version texte</th></tr>
+ <tr id='text'>
+ <td><pre>{$art->toText()}</pre></td>
+ </tr>
+ {if $art->check()}
+ <tr><th>Version html</th></tr>
+ <tr id='html'>
+ <td>
+ <div class='nl'>
+ {$art->toHtml()|smarty:nodefaults}
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th>Soumettre</th>
+ </tr>
+ <tr>
+ <td>
+ Si tu es content de ton article, tu peux le soumetre.
+ Sinon, tu peux continuer à l'éditer en dessous
+ </td>
+ </tr>
+ <tr>
+ <td class='center'>
+ <input type='hidden' value="{$smarty.request.title}" name='title' />
+ <input type='hidden' value="{$art->body()}" name="body" />
+ <input type='hidden' value="{$art->append()}" name='append' />
+ <input type='submit' name='valid' value='soumettre' />
+ </td>
+ </tr>
+ {/if}
+ </table>
+</form>
+
+<br />
+
+{/if}
+
+<p>
+Il faut absolument que ton article fasse moins de 8 lignes (non vides) de 68 caractères.
+</p>
+
+<p>
+Les contacts, prix, adresses mail utiles, liens web, ... sont en sus, et sont à placer dans la case "Ajouts"
+</p>
+
+<form action="{$smarty.server.PHP_SELF}" method='post'>
+ <table class="bicol" cellpadding="3" cellspacing="0" summary="liste des NL">
+ <tr>
+ <th colspan='2'>proposer un article</th>
+ </tr>
+ <tr class="impair">
+ <td class='titre'>Sujet</td>
+ <td>
+ <input size='60' type='text' value='{$smarty.request.title}' name='title' />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class='titre'>Contenu</td>
+ <td>
+ <textarea cols="68" rows="10" name='body'>{if $art}{$art->body()}{/if}</textarea>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td>
+ <td>
+ <textarea cols="68" rows="6" name='append'>{if $art}{$art->append()}{/if}</textarea>
+ </td>
+ </tr>
+ <tr class='pair'>
+ <td colspan='2' class='center'>
+ <input type='submit' name='see' value='visualiser' />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Nom d'usage
+</h1>
+
+{if $same}
+<p class="erreur">
+ Si ton nom d'usage est identique à ton nom à l'X, il n'est pas
+ nécessaire de le saisir ici!
+</p>
+{else}
+ {if $myusage}
+ {if $usage_old}
+ <p>
+ Ta demande de suppression de ton nom d'usage ainsi que de tes
+ alias {$alias_old}@polytechnique.org et
+ {$alias_old}@m4x.org a bien été enregistrée.
+ </p>
+ {/if}
+
+ {if $myusage->alias}
+ <p>
+ Ta demande d'ajout de ton nom d'usage a bien été enregistrée. Sa
+ validation engendrera la création des alias
+ <strong>{$myusage->alias}@polytechnique.org</strong> et
+ <strong>{$myusage->alias}@m4x.org</strong>.
+ </p>
+ {/if}
+
+ <p>
+ Tu recevras un mail dès que les changements demandés auront été effectués.
+ Encore merci de nous faire confiance pour tes e-mails !
+ </p>
+
+{else}
+
+ <p>
+ Afin d'être joignable à la fois sous ton nom à l'X et sous ton nom d'usage, tu peux
+ saisir ici ce dernier. Il apparaîtra alors dans l'annuaire et tu disposeras
+ des adresses correspondantes @m4x.org et @polytechnique.org, en plus de
+ celles que tu possèdes déjà.
+ </p>
+
+ <br />
+
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" cellpadding="4" summary="Nom d'usage">
+ <tr>
+ <th>Nom d'usage</th>
+ </tr>
+ <tr>
+ <td class="center"><input type="text" name="nom_usage" value="{$usage_old}" /></td>
+ </tr>
+ <tr>
+ <td class="center"><input type="submit" name="submit" value="Envoyer" /></td>
+ </tr>
+ </table>
+ </form>
+ {/if}
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Année de sortie
+</h1>
+
+{if $myorange}
+
+ <p>
+ Tu recevras un mail dès que les changements demandés auront été effectués.
+ Encore merci de nous faire confiance pour tes e-mails !
+ </p>
+
+{else}
+
+ <p>
+ Afin de pouvoir être considéré(e) à la fois dans ta promotion d'origine et ta
+ ou tes promotions d'adoption tu peux entrer ici ton année de sortie de l'école.
+ Plus précisément, il s'agit de l'année d'entrée en quatrième année ou année d'application. Pour tes cocons d'origine (X{$promo}) il s'agit de l'année {math equation="a + b" a=$promo b=3}.
+ </p>
+
+ <br />
+
+ <form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class="bicol" cellpadding="4" summary="Année de sortie">
+ <tr>
+ <th>Année de sortie</th>
+ </tr>
+ <tr>
+ <td class="center"><input type="text" name="promo_sortie" value="{$promo_sortie_old}" /></td>
+ </tr>
+ <tr>
+ <td class="center"><input type="submit" name="submit" value="Envoyer" /></td>
+ </tr>
+ </table>
+ </form>
+ {/if}
+<p>[<a href="profil.php">Revenir au profil</a>]</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Micropaiments</h1>
+
+{if $smarty.request.op eq "submit" and !$xorg_error->errs|count}
+
+<table class="bicol">
+ <tr>
+ <th colspan="2">Paiement via {$meth->text}</th>
+ </tr>
+ <tr>
+ <td><b>Transaction</b></td>
+ <td>{$pay->text}</td>
+ </tr>
+ <tr>
+ <td><b>Montant (euros)</b></td>
+ <td>{$montant}</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <form method="post" action="{$pay->api->urlform}">
+ <div>
+ <!-- infos commercant -->
+ {foreach from=$pay->api->infos.commercant key="name" item="value"}
+ <input type="hidden" name="{$name}" value="{$value}" />
+ {/foreach}
+ <!-- infos client -->
+ {foreach from=$pay->api->infos.client key="name" item="value"}
+ <input type="hidden" name="{$name}" value="{$value}" />
+ {/foreach}
+ <!-- infos commande -->
+ {foreach from=$pay->api->infos.commande key="name" item="value"}
+ <input type="hidden" name="{$name}" value="{$value}" />
+ {/foreach}
+
+ <!-- infos divers -->
+ {foreach from=$pay->api->infos.divers key="name" item="value"}
+ <input type="hidden" name="{$name}" value="{$value}" />
+ {/foreach}
+ <input type="submit" value="Valider" />
+ </div>
+ </form>
+ </td>
+ </tr>
+</table>
+<p>
+En cliquant sur "Valider", tu seras redirigé{if $smarty.session.sexe}e{/if} vers le site de {$pay->api->nomsite}, où il te
+sera demandé de saisir ton numéro de carte bancaire. Lorsque le paiement aura été effectué, tu
+recevras une confirmation par email.
+</p>
+{if $pay->api->text}
+<p>
+{$pay->api->text}
+</p>
+{/if}
+
+{else}
+
+<form method="post" action="{$smarty.server.PHP_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
+ 30004 00314 00010016782 60. 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>
+ <th colspan="2">Effectuer un télépaiement</th>
+ </tr>
+ <tr>
+ <td>Transaction</td>
+ <td>
+ <select name="ref" onchange="this.form.op.value='select'; this.form.submit();">
+ {select_db_table table="`$prefix`paiements" valeur=$pay->id where=" WHERE FIND_IN_SET('old',flags)=0"}
+ </select>
+ {if $pay->url}
+ <br />
+ <a href="{$pay->url}">plus d'informations</a>
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td>Méthode</td>
+ <td>
+ <select name="methode">
+ {select_db_table table="paiement.methodes" valeur=$methode}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Montant (euros)</td>
+ <td><input type="text" name="montant" size="13" class='right' value="{$montant}" /></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <input type="hidden" name="op" value="submit" />
+ <input type="submit" value="Continuer" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{if $transactions}
+<p class="descr">Tu as déjà effecuté des paiements pour cette transaction :</p>
+<table class="bicol">
+<tr><th>Date</th><th>Montant</th></tr>
+{iterate from=$transactions item=t}
+ <tr class="{cycle values="pair,impair"}">
+ <td>{$t.timestamp|date_format}</td>
+ <td>{$t.montant}</td>
+ </tr>
+{/iterate}
+</table>
+{/if}
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Micropaiments</h1>
+
+{if $erreur}
+<p>Aucun paiement n'a été effectué.</p>
+{else}
+<p>Merci de nous avoir fait confiance pour ton paiement. La transaction
+est terminée et s'est déroulée correctement. Tu vas recevoir un email accusant
+réception de ton paiement.</p>
+
+<p>{$texte|nl2br}</p>
+{/if}
+<p>[<a href='index.php'>retour aux micropaiements</a>]</p>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<noscript>
+ <p class="erreur">
+ Ton navigateur n'accepte pas le javaScript !!
+ </p>
+ <p>
+ Cette forme de script web est nécessaire pour l'utilisation du site.
+ Pour en savoir plus, regarde la <a href="faq.php#connect">FAQ</a>.
+ </p>
+</noscript>
+
+<h1>
+ Accès réservé aux Polytechniciens
+</h1>
+{min_auth level="cookie"}
+<p>
+<strong>Merci de rentrer ton mot de passe pour démarrer une connexion au site.</strong>
+Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi sur
+<a href="{rel}/register/">la page d'inscription</a>.
+</p>
+{/min_auth}
+
+{only_public}
+<p>
+<strong>Tu ne connais pas ton mot de passe ?</strong>
+</p>
+<ul>
+ <li>
+ Si tu viens de terminer ta pré-inscription, <strong>il est dans le mail</strong> que
+ nous t'avons envoyé (expéditeur pre-inscription@polytechnique.org).
+ </li>
+ <li>
+ Si tu n'es jamais venu sur le site, <strong>il faut t'enregistrer auprès de
+ nous</strong> pour obtenir un accès. Polytechnique.org c'est l'e-mail des X,
+ l'annuaire en ligne, plus un tas d'autres services. Nous te fournirons un accès le plus
+ rapidement possible. <strong> <a href="{rel}/register/">Clique ici pour nous demander tes
+ paramètres personnels.</a></strong>
+ </li>
+</ul>
+{/only_public}
+
+<br />
+
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;">
+ <table class="bicol" cellpadding="4" summary="Formulaire de login">
+ <tr>
+ <th colspan="2">Connexion</th>
+ </tr>
+ <tr style="white-space: nowrap">
+ <td class="titre">
+ Adresse email :
+ </td>
+ <td>
+ <input type="text" name="username" size="20" maxlength="50" value="{insert name="getUserName"}" /> @ <select name="domain">
+ <option value="login">{#globals.mail.domain#} / {#globals.mail.domain2#}</option>
+ <option value="alias" {if $smarty.cookies.ORGdomain eq alias}selected="selected"{/if}>
+ {#globals.mail.alias_dom#} / {#globals.mail.alias_dom2#}
+ </option>
+ {$smarty.cookies.domain}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Mot de passe:
+ </td>
+ <td>
+ <input type="password" name="password" size="10" maxlength="10" />
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td {popup caption='Connexion permanente' width='300' text="Coche cette case pour que le site se souvienne de ce navigateur.<br />
+ Il n'est pas conseillé de cocher la case si cette machine n'est pas <b>strictement</b> personnelle"}>
+ <input type="checkbox" name="remember" /> Garder l'accès aux services après déconnexion
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table width="100%"><tr>
+ <td>
+ <img src="{rel}/images/pi.png" alt=" [ ? ] " />
+ <a href="{rel}/recovery.php">mot de passe perdu ?</a>
+ </td>
+ <td class="right">
+ <input type="submit" name="submitbtn" value="Envoyer" />
+ </td>
+ </tr></table>
+ </td>
+ </tr>
+ </table>
+</form>
+<p>
+Problème de connexion ? <a href="{rel}/docs/faq.php#connect">La réponse est là.</a>
+<br />
+(Activer obligatoirement le <strong>javascript</strong>)
+</p>
+
+{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>
+ <input type="hidden" name="challenge" value="{$smarty.session.session->challenge}" />
+ <input type="hidden" name="response" value="" />
+ <input type="hidden" name="username" value="" />
+ <input type="hidden" name="remember" value="" />
+ <input type="hidden" name="domain" value="" />
+ </div>
+</form>
+
+{literal}
+<script type="text/javascript">
+ <!--
+ // Activate the appropriate input form field.
+ if (document.forms.login.username.value == '') {
+ document.forms.login.username.focus();
+ } else {
+ document.forms.login.password.focus();
+ }
+ // -->
+</script>
+{/literal}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<div class="center">
+ <table>
+ <tr>
+ <td>
+ <img src="{"images/cadenas_rouge.png"|url}" alt=" [ CADENAS ROUGE ] " />
+ </td>
+ <td>
+ <span class="smaller">
+ <strong>
+ Pour des raisons de sécurité, il est obligatoire de taper ton mot de passe, même
+ avec l'accès permanent, pour certaines opérations sensibles.
+ </strong>
+ </span>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit='doChallengeResponse(); return false;'>
+ <table class="tinybicol" cellpadding="4" summary="Formulaire de login">
+ <tr>
+ <td class="titre">
+ Mot de passe:
+ </td>
+ <td>
+ <input type="password" name="password" size="10" maxlength="10" />
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td {popup caption='Connexion permanente' width='300' text="Décoche cette case pour que le site oublie ce navigateur.<br />
+ Il est conseillé de décocher la case si cette machine n'est pas <b>strictement</b> personnelle"}>
+ <input type="checkbox" name="remember" checked="checked" /> Garder l'accès aux services après déconnexion
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <img src="{"images/pi.png"|url}" alt=" [ ? ] " />
+ <a href="{rel}/recovery.php">Mot de passe perdu ?</a>
+ </td>
+ <td class="right">
+ <input type="submit" name="submitbtn" value="Envoyer" />
+ </td>
+ </tr>
+ </table>
+</form>
+<br />
+{if $smarty.request.response}<!-- failed login code -->
+<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>
+ <input type="hidden" name="challenge" value="{$smarty.session.session->challenge}" />
+ <input type="hidden" name="username" value="{$smarty.cookies.ORGuid}" />
+ <input type="hidden" name="remember" value="" />
+ <input type="hidden" name="response" value="" />
+ </div>
+</form>
+
+{literal}
+<script type="text/javascript">
+ <!--
+ // Activate the appropriate input form field.
+ document.forms.login.password.focus();
+ // -->
+</script>
+{/literal}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Préférences
+</h1>
+
+<table class="bicol" summary="Préférences: services" cellpadding="0" cellspacing="0">
+ <tr>
+ <th colspan="2">
+ Configuration des différents services du site
+ </th>
+ </tr>
+ {foreach from=$prefs item=pref key=id name=glob}
+ {if $id is even}
+ <tr class="{cycle values="impair,pair"}">
+ {/if}
+ <td class="half">
+ <h3><a href="{rel}/{$pref.url}">{$pref.title}</a></h3>
+ <div class='explication'>{$pref.text|smarty:nodefaults}</div>
+ </td>
+ {if $id is even && $smarty.foreach.glob.last}
+ <td class="half"></td>
+ {/if}
+ {if $id is odd || $smarty.foreach.glob.last}
+ </tr>
+ {/if}
+ {/foreach}
+</table>
+
+<br />
+
+<table class="bicol" summary="Préférences: mdp" cellpadding="3">
+ <tr>
+ <th>Mots de passe et accès au site</th>
+ </tr>
+ <tr class="impair">
+ <td>
+ <h3><a href="{"motdepassemd5.php"|url}">Changer mon mot de passe pour le site</a></h3>
+ <div class='explication'>
+ permet de changer ton mot de passe pour accéder au site Polytechnique.org
+ </div>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td>
+ <h3><a href="{"acces_smtp.php"|url}">Activer l'accès SMTP et NNTP</a></h3>
+ <div class='explication'>
+ Pour activer ton compte sur le serveur SMTP et NNTP de Polytechnique.org.
+ Cela te permet d'envoyer tes mails plus souplement (SMTP), et de consulter
+ les forums directement depuis ton logiciel habituel de courrier électronique.
+ </div>
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{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="{rel}/fiche.php?user={$smarty.session.forlife}" class="popup2">l'état actuel de ta fiche</a>
+tel qu'elle apparaîtra pour un camarade,
+ou <a href="{rel}/fiche.php?user={$smarty.session.forlife}&public=1" class="popup2">tel</a> qu'elle apparaîtra à tout le monde.</p>
+
+<form action="{$smarty.server.PHP_SELF}" 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="{$smarty.server.PHP_SELF}?old_tab={$o}">{$i|nl2br}</a></li>
+ {/if}
+ {/foreach}
+ </ul>
+ <input type="hidden" value="{$onglet}" name="old_tab" />
+ <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>
+ {if $onglet != $onglet_last}
+ <td>
+ <input type="submit" value="Valider et passer au prochain onglet" name="suivant" />
+ </td>
+ {/if}
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<div class="blocunite_tab">
+ <table class="bicol" cellspacing="0" cellpadding="0" summary="Profil: Adresses personnelles">
+ <tr>
+ <th colspan="5">
+ Adresses personnelles
+ </th>
+ </tr>
+
+ {section name=i loop=$nb_adr start=1 max=$nb_adr}
+ {*
+ $adrid = $ordre_adrid[$i];
+ $adr = &$adresses[$adrid];
+ *}
+ {assign var='adrid' value=$ordre_adrid[i]}
+ {assign var='adr' value=$adresses.$adrid}
+ <tr>
+ <th colspan="5">
+ <a id='adr{$adrid}'></a>
+ {if $adr.nouvelle != 'new'}Adresse n°{$smarty.section.i.index}{else}Rentre ici une nouvelle adresse{/if}
+ <input type="hidden" name="adrid[{$adrid}]" value="{$adrid}" />
+ {if $adr.nouvelle == 'new'}
+ <input type="hidden" name="numero_formulaire[{$adrid}]" value="0" />
+ {else}
+ <input type="hidden" name="numero_formulaire[{$adrid}]" value="{$smarty.section.i.index}" />
+ {/if}
+ {if $adr.nouvelle != 'new'}
+ [<a href="{$smarty.server.PHP_SELF}?old_tab={$smarty.request.old_tab}&adrid_del[{$adrid}]=1" style="color:inherit">La supprimer !</a>]
+ {/if}
+ </th>
+ </tr>
+ {include file="include/flags.radio.tpl" name="pub[$adrid]" val=$adr.pub}
+ <tr>
+ <td class="left">
+
+ </td>
+ <td colspan="4" class="right">
+ <em>c'est à cette adresse que je suis actuellement</em>
+ <input name="adrid_active" type="radio" value="{$adrid}" {if $adr.active}checked="checked"{/if} />
+ </td>
+ </tr>
+ {if $adr.nouvelle != 'new'}
+ {assign var="titre" value="Adresse n°`$smarty.section.i.index` :"}
+ {else}
+ {assign var="titre" value="Nouvelle adresse :"}
+ {/if}
+ {include file="geoloc/form.address.tpl" adr=$adr titre=$titre url="`$smarty.server.PHP_SELF`?old_tab=`$smarty.request.old_tab`"}
+ <tr>
+ <td class="colg">
+ <span class="titre">Cette adresse est :</span>
+ </td>
+ <td class="cold">
+ <input type="radio" name="temporaire[{$adrid}]" value="0" {if !$adr.temporaire}checked="checked"{/if} />
+ permanente
+ <input type="radio" name="temporaire[{$adrid}]" value="1" {if $adr.temporaire}checked="checked"{/if} />
+ temporaire
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+
+ </td>
+ <td class="cold">
+ <input type="radio" name="secondaire[{$adrid}]" value="0" {if !$adr.secondaire}checked="checked"{/if} />
+ ma résidence principale
+ <input type="radio" name="secondaire[{$adrid}]" value="1" {if $adr.secondaire}checked="checked"{/if} />
+ une résidence secondaire
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+
+ </td>
+ <td class="cold">
+ <input type="checkbox" name="courrier[{$adrid}]" value="1" {if $adr.courrier}checked="checked"{/if} /> on peut m'y envoyer du courrier par la poste
+ </td>
+ </tr>
+ {include file="include/flags.radio.tpl" name="tel_pub[$adrid]" val=$adr.tel_pub}
+ <tr>
+ <td class="colg">
+ <span class="titre">Téléphone associé :</span>
+ </td>
+ <td>
+ <input type="text" size="19" maxlength="28" name="tel[{$adrid}]" value="{$adr.tel}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Fax :</span>
+ </td>
+ <td>
+ <input type="text" size="19" maxlength="28" name="fax[{$adrid}]" value="{$adr.fax}" />
+ </td>
+ </tr>
+ <tr><td colspan="5"> </td></tr>
+ {/section}
+ <tr><td colspan="5"> </td></tr>
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{literal}
+<script type="text/javascript">//<![CDATA[
+ function medal_add()
+ {
+ var selid = document.forms.prof_annu.medal_sel.selectedIndex;
+ document.forms.prof_annu.medal_id.value = document.forms.prof_annu.medal_sel.options[selid].value;
+ document.forms.prof_annu.medal_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ }
+
+ function medal_del( id )
+ {
+ document.forms.prof_annu.medal_id.value = id;
+ document.forms.prof_annu.medal_op.value = "retirer";
+ document.forms.prof_annu.submit();
+ }
+ //]]>
+</script>
+{/literal}
+
+<div class="blocunite_tab">
+ <input type="hidden" value="" name="medal_op" />
+ <input type="hidden" value="" name="medal_id" />
+ <table class="bicol" cellspacing="0" cellpadding="0">
+ <tr>
+ <th colspan="3">
+ Médailles, Décorations, Prix, ...
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="vert">
+ <input type="checkbox" name="medals_pub"{if $medals_pub eq 'public'} checked="checked"{/if} />
+ </td>
+ <td class="texte">
+ ces informations sont normalement publiques (JO, ...) mais tu peux choisir de les associer a ta fiche publique
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ {foreach from=$medals item=m}
+ <tr>
+ <td class="colg">
+ <img src='{rel}/images/medals/{$m.img}' width="32" alt="{$m.medal}" title="{$m.medal}" />
+ </td>
+ <td class="colm">
+ <span class="valeur">{$m.medal}</span><br />
+ {if $grades[$m.id]|@count}
+ <select name="grade[{$m.id}]">
+ <option value='0'>-- non précisé --</option>
+ {foreach from=$grades[$m.id] item=g}
+ <option value='{$g.gid}' {if $g.gid eq $m.gid}selected='selected'{/if}>{$g.text}</option>
+ {/foreach}
+ </select>
+ {else}
+ -- non précisé --
+ {/if}
+ </td>
+ <td class="cold">
+ <span class="lien">
+ <a href="javascript:medal_del({$m.id});">retirer</a>
+ </span>
+ </td>
+ </tr>
+ {/foreach}
+ <tr>
+ <td class="colg">
+
+ </td>
+ <td class="colm">
+ <select name="medal_sel">
+ <option value=''></option>
+ {foreach from=$medal_list key=type item=list}
+ <optgroup label="{$trad[$type]}">
+ {foreach from=$list item=m}
+ <option value="{$m.id}">{$m.text}</option>
+ {/foreach}
+ </optgroup>
+ {/foreach}
+ </select>
+ </td>
+ <td class="cold">
+ <span class="lien">
+ <a href="javascript:medal_add();">ajouter</a>
+ </span>
+ </td>
+ </tr>
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{section name=adresses_pro loop=2}
+{assign var='i' value=$smarty.section.adresses_pro.index}
+
+<div class="blocunite{if !$i}tab{/if}">
+
+ <table class="bicol" cellspacing="0" cellpadding="0" summary="Profil: Informations professionnelles - Entreprise n°{$i+1}">
+ <tr>
+ <th colspan="2">
+ Informations professionnelles - Entreprise n°{$i+1}
+ </th>
+ </tr>
+ {include file=include/flags.radio.tpl name="pubpro[$i]" val=$pubpro.$i}
+ <tr>
+ <td class="colg">
+ <span class="titre">Entreprise ou organisme</span>
+ </td>
+ <td class="cold">
+ <input type="text" size="35" maxlength="100" name="entreprise[{$i}]"
+ value="{$entreprise.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Secteur d'activité</span>
+ </td>
+ <td class="cold">
+ <select name="secteur[{$i}]" onchange="this.form.submit();">
+ {select_secteur secteur=$secteur.$i}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Sous-Secteur d'activité</span>
+ </td>
+ <td class="cold">
+ <select name="ss_secteur[{$i}]">
+ {select_ss_secteur secteur=$secteur.$i ss_secteur=$ss_secteur.$i}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Poste occupé</span>
+ </td>
+ <td class="cold">
+ <input type="text" size="35" maxlength="120" name="poste[{$i}]"
+ value="{$poste.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Fonction occupée</span>
+ </td>
+ <td class="cold">
+ <select name="fonction[{$i}]">
+ {select_fonction fonction=$fonction.$i}
+ </select>
+ </td>
+ </tr>
+ {include file=include/flags.radio.tpl name="adr_pubpro[$i]" val=$adr_pubpro.$i}
+ <tr>
+ <td class="colg">
+ <span class="titre">Adresse professionnelle</span>
+ </td>
+ <td class="cold">
+ <input type="text" name="adrpro1[{$i}]" size="40" maxlength="88" value="{$adrpro1.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+
+ </td>
+ <td class="cold">
+ <input type="text" name="adrpro2[{$i}]" size="40" maxlength="88" value="{$adrpro2.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+
+ </td>
+ <td class="cold">
+ <input type="text" name="adrpro3[{$i}]" size="40" maxlength="88" value="{$adrpro3.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Code postal</span><br />
+ </td>
+ <td class="cold">
+ <input type="text" name="postcodepro[{$i}]" value="{$postcodepro.$i}" size="8" maxlength="8" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Ville</span><br />
+ </td>
+ <td class="cold">
+ <input type="text" name="citypro[{$i}]" value="{$citypro.$i}" size="40" maxlength="50" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Pays</span>
+ </td>
+ <td class="cold">
+ <select name="countrypro[{$i}]" onchange="this.form.submit();">
+ {geoloc_country country=$countrypro.$i}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Région ou département</span><br />
+ <span class="comm">(selon pays)</span>
+ </td>
+ <td class="cold">
+ <select name="regionpro[{$i}]">
+ {geoloc_region country=$countrypro.$i region=$regionpro.$i}
+ </select>
+ </td>
+ </tr>
+ {include file=include/flags.radio.tpl name="tel_pubpro[$i]" val=$tel_pubpro.$i}
+ <tr>
+ <td class="colg">
+ <span class="titre">Téléphone professionnel</span>
+ </td>
+ <td>
+ <input type="text" size="18" maxlength="18" name="telpro[{$i}]" value="{$telpro.$i}" />
+
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Fax</span>
+ </td>
+ <td>
+ <input type="text" size="18" maxlength="18" name="faxpro[{$i}]" value="{$faxpro.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Mobile</span>
+ </td>
+ <td>
+ <input type="text" size="18" maxlength="18" name="mobilepro[{$i}]" value="{$mobilepro.$i}" />
+ </td>
+ </tr>
+ {include file=include/flags.radio.tpl name="email_pubpro[$i]" val=$email_pubpro.$i}
+ <tr>
+ <td class="colg">
+ <span class="titre">E-mail</span>
+ </td>
+ <td>
+ <input type="text" size="30" maxlength="60" name="emailpro[{$i}]" value="{$emailpro.$i}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Page web</span>
+ </td>
+ <td>
+ <input type="text" size="30" maxlength="255" name="webpro[{$i}]" value="{$webpro.$i}" />
+ </td>
+ </tr>
+ </table>
+</div>
+
+{/section}
+
+<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Informations professionnelles - CV">
+ <tr>
+ <th colspan="2">
+ Informations professionnelles - CV
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2" class="flags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesCV" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="dcolg">
+ <span class="titre">Curriculum vitae</span><br />
+ <span class="comm">Le CV n'est <strong>jamais</strong> public.<br />
+ <a href="{"docs/faq.php"|url}#cv" class="popup_800x480">Comment remplir mon CV ?</a></span>
+ </td>
+ <td class="dcold">
+ <textarea name="cv" rows="15" cols="33">{$cv}</textarea>
+ </td>
+ </tr>
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{include file="applis.js.tpl"}
+<div class="blocunite_tab">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil : Informations générales">
+ <tr>
+ <th colspan="2">
+ Informations générales
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2" class="pflags">
+ <table class="flags" cellspacing="0" summary="Flags">
+ <tr>
+ <td class="vert">
+ <input type="checkbox" disabled="disabled" checked="checked" />
+ </td>
+ <td class="texte">
+ site public
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Nom</span>
+ <span class="comm"></span>
+ </td>
+ <td class="cold">
+ <input type='text' name='nom' value="{$nom}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Prénom</span>
+ <span class="comm"></span>
+ </td>
+ <td class="cold">
+ <input type='text' name='prenom' value="{$prenom}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Promotion</span>
+ </td>
+ <td class="cold">
+ <span class="nom">X{$promo}{if ($promo != $promo_sortie - 3)} - X{math equation="a - b" a=$promo_sortie b=3}{/if}</span>
+ <span class="lien"><a href="orange.php">modifier</a>{if ($promo_sortie -3 == $promo)} pour les oranges{/if}</span>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Nom d'usage</span><br />
+ {if $smarty.session.sexe}
+ <span class="comm">(Notamment nom d'épouse)</span>
+ {else}
+ <span class="comm">(si différent de {$nom} seulement)</span>
+ {/if}
+ </td>
+ <td class="cold">
+ <span class="nom">{$nom_usage|default:"Aucun"}</span>
+ <span class="lien"><a href="nomusage.php">modifier</a></span>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Nationalité</span>
+ </td>
+ <td class="cold">
+ <select name="nationalite">
+ {select_nat valeur=$nationalite}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Application</span><br />
+ <span class="comm">(4ème année de l'X)</span>
+ </td>
+ <td class="cold">
+ <select name="appli_id1" onchange="fillType(this.form.appli_type1, this.selectedIndex-1);">
+ {applis_options selected=$appli_id1}
+ </select>
+ <br />
+ <select name="appli_type1">
+ <option value=""></option>
+ </select>
+ <script type="text/javascript">
+ <!--
+ fillType(document.forms.prof_annu.appli_type1, document.forms.prof_annu.appli_id1.selectedIndex-1);
+ selectType(document.forms.prof_annu.appli_type1, '{$appli_type1}');
+ //-->
+ </script>
+ </td>
+ </tr>
+ <tr>
+ <td class="dcolg">
+ <span class="titre">Post-application</span>
+ </td>
+ <td class="dcold">
+ <select name="appli_id2" onchange="fillType(this.form.appli_type2, this.selectedIndex-1);">
+ {applis_options selected=$appli_id2}
+ </select>
+ <br />
+ <select name="appli_type2">
+ <option value=""></option>
+ </select>
+ <script type="text/javascript">
+ <!--
+ fillType(document.forms.prof_annu.appli_type2, document.forms.prof_annu.appli_id2.selectedIndex-1);
+ selectType(document.forms.prof_annu.appli_type2, '{$appli_type2}');
+ //-->
+ </script>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Trombinoscope">
+ <tr>
+ <th colspan="3">
+ Trombinoscope
+ </th>
+ </tr>
+ <tr>
+ <td class="col" colspan="3">
+ Pour profiter de cette fonction intéressante, tu dois disposer
+ quelque part (sur ton ordinateur ou sur Internet) d'une photo
+ d'identité (dans un fichier au format JPEG, PNG ou GIF).<br />
+ <div class="center">
+ <span class="lien">
+ <a href="trombino.php">Éditer ta photo</a>
+ </span>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="col" colspan="3">
+ <table class="flags" cellspacing="0" summary="Flags">
+ <tr>
+ <td class="vert">
+ <input type="checkbox" name="photo_pub" {if $photo_pub eq 'public'}checked="checked" {/if}/>
+ </td>
+ <td class="texte">
+ site public
+ </td>
+ </tr>
+ </table>
+ <table cellspacing="0" cellpadding="0" summary="Trombinoscope">
+ <tr>
+ <td class="dcold">
+ Voilà la photo qui apparaîtra sur la fiche de ton profil{if $nouvellephoto} (tu viens
+ de changer ta photo, celle-ci correspond à ton ancien
+ profil car la nouvelle n'a pas encore été validée par un administrateur du site !
+ <a href="{"fiche.php"|url}?user={$smarty.session.forlife}&modif=new" class="popup2">Ta fiche avec la nouvelle photo</a>)
+ {/if}.
+ </td>
+ <td class="dcolg">
+ <img src="getphoto.php?x={$smarty.session.forlife}" alt=" [ PHOTO ] " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</div>
+<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Divers">
+ <tr>
+ <th colspan="2">
+ Divers
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" disabled="disabled" checked="checked" />
+ </td>
+ <td class="texte">
+ privé
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Surnom</span>
+ </td>
+ <td class="cold">
+ <input type="text" size="35" maxlength="64" name="nickname" value="{$nickname}" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="vert">
+ <input type="radio" name="mobile_pub" {if $mobile_pub eq 'public'}checked="checked"{/if} value='public' />
+ </td>
+ <td class="texte">
+ site public
+ </td>
+ <td class="orange">
+ <input type="radio" name="mobile_pub" {if $mobile_pub eq 'ax'}checked="checked"{/if} value='ax' />
+ </td>
+ <td class="texte">
+ transmis à l'AX
+ </td>
+ <td class="rouge">
+ <input type="radio" name="mobile_pub" {if $mobile_pub eq 'private'}checked="checked"{/if} value='private' />
+ </td>
+ <td class="texte">
+ privé
+ </td>
+ <td class="texte">
+ <a href="{"docs/faq.php"|url}#flags" class="popup_800x240">Quelle couleur ??</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+ <span class="titre">Téléphone mobile</span>
+ </td>
+ <td class="cold">
+ <input type="text" size="18" maxlength="18" name="mobile"
+ value="{$mobile}" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="flags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="vert">
+ <input type="checkbox" name="web_pub" {if $web_pub eq 'public'}checked="checked"{/if} />
+ </td>
+ <td class="texte">
+ site public
+ </td>
+ <td class="texte">
+ <a href="{"docs/faq.php"|url}#flags" class="popup_800x240">Quelle couleur ??</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="dcolg">
+ <span class="titre">Page web Perso</span>
+ </td>
+ <td class="dcold">
+ <input type="text" size="35" maxlength="95" name="web"
+ value="{$web}" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="vert">
+ <input type="checkbox" name="freetext_pub" {if $freetext_pub eq 'public'}checked="checked"{/if} />
+ </td>
+ <td class="texte">
+ site public
+ </td>
+ <td class="texte">
+ <a href="{"docs/faq.php"|url}#flags" class="popup_800x240">Quelle couleur ??</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="dcolg">
+ <span class="titre">Complément libre</span>
+ <span class="comm">Commentaire? ICQ? etc...</span>
+ </td>
+ <td class="dcold">
+ <textarea name="freetext" rows="3" cols="29" >{$freetext}</textarea>
+ </td>
+ </tr>
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{literal}
+<script type="text/javascript">
+ //<![CDATA[
+ function mentor_pays_add()
+ {
+ var selid = document.forms.prof_annu.mentor_pays_id_new.selectedIndex;
+ document.forms.prof_annu.mentor_pays_id.value = document.forms.prof_annu.mentor_pays_id_new.options[selid].value;
+ document.forms.prof_annu.mentor_pays_name.value = document.forms.prof_annu.mentor_pays_id_new.options[selid].text;
+ document.forms.prof_annu.mentor_pays_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ } // function mentor_pays_add()
+
+ function mentor_pays_del( pid )
+ {
+ document.forms.prof_annu.mentor_pays_id.value = pid;
+ document.forms.prof_annu.mentor_pays_op.value = "retirer";
+ document.forms.prof_annu.submit();
+ } // function mentor_pays_del( pid )
+
+ function mentor_secteur_add()
+ {
+ var selid_secteur = document.forms.prof_annu.mentor_secteur_id_new.selectedIndex;
+ document.forms.prof_annu.mentor_secteur_id.value = document.forms.prof_annu.mentor_secteur_id_new.options[selid_secteur].value;
+ document.forms.prof_annu.mentor_secteur_name.value = document.forms.prof_annu.mentor_secteur_id_new.options[selid_secteur].text;
+ var selid_ss_secteur = document.forms.prof_annu.mentor_ss_secteur_id_new.selectedIndex;
+ document.forms.prof_annu.mentor_ss_secteur_id.value = document.forms.prof_annu.mentor_ss_secteur_id_new.options[selid_ss_secteur].value;
+ document.forms.prof_annu.mentor_ss_secteur_name.value = document.forms.prof_annu.mentor_ss_secteur_id_new.options[selid_ss_secteur].text;
+ document.forms.prof_annu.mentor_secteur_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ } // function mentor_secteur_add()
+
+ function mentor_secteur_del( sid )
+ {
+ document.forms.prof_annu.mentor_secteur_id.value = sid;
+ document.forms.prof_annu.mentor_secteur_op.value = "retirer";
+ document.forms.prof_annu.submit();
+ } // function mentor_secteur_del( sid )
+
+ //]]>
+</script>
+{/literal}
+
+<p>
+Si tu acceptes que ceux de nos camarades qui,
+</p>
+<ul>
+ <li>encore jeunes, sont en train de bâtir leur projet professionnel,</li>
+ <li>ou bien, plus âgés, souhaitent réorienter leur carrière,</li>
+</ul>
+<p>
+te contactent afin de te demander conseil, dans les domaines que tu connais
+bien, et pour lesquels tu pourrais les aider, remplis cette rubrique.<br />
+Tu peux mentionner ici les domaines de compétences, les expériences
+notamment internationales sur la base desquels tu seras identifiable depuis
+<a href="referent.php">la page de recherche d'un conseil professionnel</a>.
+</p>
+
+<div class="blocunite_tab">
+ <table class="bicol" cellspacing="0" cellpadding="0" summary="Profil: Mentoring">
+ <tr>
+ <th colspan="3">
+ Pays dont tu connais bien la culture professionnelle
+ <input type="hidden" value="" name="mentor_pays_op" />
+ <input type="hidden" value="00" name="mentor_pays_id" />
+ <input type="hidden" value="" name="mentor_pays_name" />
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="colg">
+ <span class="titre">Pays</span>
+ </td>
+ <td class="colm">
+ <span class="titre"></span>
+ </td>
+ <td class="cold" style="width:15%">
+
+ </td>
+ </tr>
+ {foreach from=$mentor_pays item=pays key=i}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <span class="valeur">{$pays}</span>
+ </td>
+ <td class="colm">
+ <span class="valeur"> </span>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:mentor_pays_del('{$mentor_pid.$i}');">retirer</a></span>
+ </td>
+ </tr>
+ {/foreach}
+ {if $can_add_pays}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <select name="mentor_pays_id_new">
+ {geoloc_country country='00'}
+ </select>
+ </td>
+ <td class="colm">
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:mentor_pays_add();">ajouter</a></span>
+ </td>
+ </tr>
+ {/if}
+ </table>
+</div>
+
+<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Mentoring">
+ <tr>
+ <th colspan="3">
+ Secteurs d'activité dans lesquels tu as beaucoup exercé
+ <input type="hidden" value="" name="mentor_secteur_op" />
+ <input type="hidden" value="" name="mentor_secteur_id" />
+ <input type="hidden" value="" name="mentor_secteur_name" />
+ <input type="hidden" value="" name="mentor_ss_secteur_id" />
+ <input type="hidden" value="" name="mentor_ss_secteur_name" />
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="colg">
+ <span class="titre">Secteur</span>
+ </td>
+ <td class="colm">
+ <span class="titre">Sous-Secteur</span>
+ </td>
+ <td class="cold" style="width:15%">
+
+ </td>
+ </tr>
+ {foreach from=$mentor_secteur item=secteur key=i}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <span class="valeur">{$secteur}</span>
+ </td>
+ <td class="colm">
+ <span class="valeur">{$mentor_ss_secteur.$i}</span>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:mentor_secteur_del('{$mentor_sid.$i}');">retirer</a></span>
+ </td>
+ </tr>
+ {/foreach}
+ {if $can_add_secteurs}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <select name="mentor_secteur_id_new" onchange="javascript:submit()">
+ {select_secteur secteur=$mentor_secteur_id_new}
+ </select>
+ </td>
+ <td class="colm">
+ <select name="mentor_ss_secteur_id_new">
+ {select_ss_secteur secteur=$mentor_secteur_id_new ss_secteur=''}
+ </select>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:mentor_secteur_add();">ajouter</a></span>
+ </td>
+ </tr>
+ {/if}
+ </table>
+</div>
+
+<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Mentoring">
+ <tr>
+ <th colspan="3">
+ Expérience et expertises que tu acceptes de faire partager
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ Dans cette case il te faut indiquer en quelques mots ce qui t'a
+ amené à acquérir l'expérience indiquée, et dans quelle mesure tu
+ veux bien que ceux de nos camarades qui seraient intéressés par un
+ contact avec toi, en prenne l'initiative. <strong>Il est obligatoire de
+ remplir cette dernière case pour apparaître dans la base de données
+ des "Mentors".</strong>
+ <br />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <textarea rows="8" cols="60" name="mentor_expertise">{$mentor_expertise}</textarea>
+ </td>
+ </tr>
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $etat_naissance == 'ok'}
+<script language="javascript" type="text/javascript">
+ <!--
+ alert ("\nDate de naissance enregistrée.\n\nTu peux maintenant modifier ton profil.");
+ // -->
+</script>
+{else}
+
+<h1>Date de naissance</h1>
+
+<form action="profil.php" method="post">
+ <p>
+ Avant d'accéder à ton profil pour la première fois, tu dois donner ta date de naissance au format JJMMAAAA.
+ Elle ne sera plus demandée par la suite et ne pourra être changée.
+ Elle servira en cas de perte du mot de passe comme sécurité supplémentaire, et uniquement à cela.
+ Elle n'est jamais visible ou lisible.
+ </p>
+ <br />
+ <table class="tinybicol" cellpadding="4" cellspacing="0" summary="Formulaire de naissance">
+ <tr>
+ <th colspan="2">
+ Date de naissance
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <strong>Date</strong> (JJMMAAAA)
+ </td>
+ <td>
+ <input type="text" size="8" maxlength="8" name="birth" />
+ </td>
+ </tr>
+ <tr>
+ <td class="center" colspan="2">
+ <input type="submit" value="Enregistrer" name="submit" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{literal}
+<script type="text/javascript">//<![CDATA[
+ /** defgroup user_profile Gestion du profil utilisateur */
+
+ /** ajout d'un binet au profil de l'utilisateur en base de données
+ * le binet est déterminé par binet_id qui est sélectionné dans un SELECT
+ * @ingroup user_profile
+ * @return VOID
+ */
+ function binet_add()
+ {
+ var selid = document.forms.prof_annu.binet_sel.selectedIndex;
+ document.forms.prof_annu.binet_id.value = document.forms.prof_annu.binet_sel.options[selid].value;
+ document.forms.prof_annu.binet_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ } // function binet_add()
+
+
+
+ /** suppression d'un binet du profil de l'utilisateur en base de données
+ * @ingroup user_profile
+ * @param id INT id du binet
+ * @return VOID
+ */
+ function binet_del( id )
+ {
+ document.forms.prof_annu.binet_id.value = id;
+ document.forms.prof_annu.binet_op.value = "retirer";
+ document.forms.prof_annu.submit();
+ } // END function binet_del( id )
+
+
+
+ /** ajout d'un groupeX au profil de l'utilisateur en base de données
+ * le groupeX est déterminé par groupex_id qui est sélectionné dans un SELECT
+ * @ingroup user_profile
+ * @return VOID
+ */
+ function groupex_add()
+ {
+ var selid = document.forms.prof_annu.groupex_sel.selectedIndex;
+ document.forms.prof_annu.groupex_id.value = document.forms.prof_annu.groupex_sel.options[selid].value;
+ document.forms.prof_annu.groupex_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ } // END function groupex_add()
+
+ /** suppression d'un groupeX du profil de l'utilisateur en base de données
+ * @ingroup user_profile
+ * @param id INT id du groupeX
+ * @return VOID
+ */
+ function groupex_del( id )
+ {
+ document.forms.prof_annu.groupex_id.value = id;
+ document.forms.prof_annu.groupex_op.value = 'retirer';
+ document.forms.prof_annu.submit();
+ } // END function groupex_del( id )
+
+ //]]>
+</script>
+{/literal}
+<div class="blocunite_tab">
+ <input type="hidden" value="" name="binet_op" />
+ <input type="hidden" value="" name="binet_id" />
+ <input type="hidden" value="" name="groupex_op" />
+ <input type="hidden" value="" name="groupex_id" />
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Informations Polytechniciennes">
+ <tr>
+ <th colspan="3">
+ Informations polytechniciennes
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="top">
+ <td class="colg">
+ <span class="titre">(ex-)Section</span>
+ </td>
+ <td class="colm">
+ <select name="section">
+ {select_db_table table="sections" valeur=$section}
+ </select>
+ </td>
+ <td class="cold">
+
+ </td>
+ </tr>
+ <!-- Binets -->
+ <tr class="top">
+ <td class="colg">
+ <span class="titre">(ex-)Binet(s)</span>
+ </td>
+ {foreach from=$binets item=b}
+ <td class="colm">
+ <span class="valeur">{$b.text}</span>
+ </td>
+ <td class="cold">
+ <span class="lien">
+ <a href="javascript:binet_del({$b.id});">retirer</a>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+
+ </td>
+ {/foreach}
+ <td class="colm">
+ <select name="binet_sel">
+ {select_db_table table="binets_def" valeur=0 champ="text" pad='1'}
+ </select>
+ </td>
+ <td class="cold">
+ <span class="lien">
+ <a href="javascript:binet_add();">ajouter</a>
+ </span>
+ </td>
+ </tr>
+ <!-- Groupes X -->
+ <tr class="top">
+ <td class="colg">
+ <span class="titre">Groupe(s) X</span>
+ </td>
+ {foreach from=$groupesx item=g}
+ <td class="colm">
+ <span class="valeur">{$g.text}</span>
+ </td>
+ <td class="cold">
+ <span class="lien">
+ <a href="javascript:groupex_del({$g.id});">retirer</a>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td class="colg">
+
+ </td>
+ {/foreach}
+ <td class="colm">
+ <select name="groupex_sel">
+ {select_db_table table="groupesx_def" valeur=0 champ="text" pad='1'}
+ </select>
+ </td>
+ <td class="dcold">
+ <span class="lien">
+ <a href="javascript:groupex_add();">ajouter</a>
+ </span>
+ </td>
+ </tr>
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{literal}
+<script type="text/javascript">
+ //<![CDATA[
+ function langue_add()
+ {
+ var selectid = document.forms.prof_annu.langue_sel_add.selectedIndex;
+ document.forms.prof_annu.langue_id.value = document.forms.prof_annu.langue_sel_add.options[selectid].value;
+ var selectid_level = document.forms.prof_annu.langue_level_sel_add.selectedIndex;
+ document.forms.prof_annu.langue_level.value = document.forms.prof_annu.langue_level_sel_add.options[selectid_level].value;
+ document.forms.prof_annu.langue_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ } // function langue_add()
+
+ function langue_del( lid )
+ {
+ document.forms.prof_annu.langue_id.value = lid;
+ document.forms.prof_annu.langue_op.value = "retirer";
+ document.forms.prof_annu.submit();
+ } // function langue_del( id )
+
+ function comppros_add()
+ {
+ var selectid = document.forms.prof_annu.comppros_sel_add.selectedIndex;
+ document.forms.prof_annu.comppros_id.value = document.forms.prof_annu.comppros_sel_add.options[selectid].value;
+ var selectid_level = document.forms.prof_annu.comppros_level_sel_add.selectedIndex;
+ document.forms.prof_annu.comppros_level.value = document.forms.prof_annu.comppros_level_sel_add.options[selectid_level].value;
+ document.forms.prof_annu.comppros_op.value = "ajouter";
+ document.forms.prof_annu.submit();
+ } // function langue_add()
+
+ function comppros_del( cid )
+ {
+ document.forms.prof_annu.comppros_id.value = cid;
+ document.forms.prof_annu.comppros_op.value = "retirer";
+ document.forms.prof_annu.submit();
+ } // function comppros_del( id )
+ //]]>
+</script>
+{/literal}
+
+<div class="blocunite_tab">
+ <table class="bicol"cellspacing="0" cellpadding="0"
+ summary="Profil: Compétences professionnelles">
+ <tr>
+ <th colspan="3">
+ Compétences professionnelles
+ <input type="hidden" value="" name="comppros_op" />
+ <input type="hidden" value="" name="comppros_id" />
+ <input type="hidden" value="" name="comppros_level" />
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="colg">
+ <span class="titre">Domaine</span>
+ </td>
+ <td class="colm">
+ <span class="titre">Niveau</span>
+ </td>
+ <td class="cold" style="width:15%">
+
+ </td>
+ </tr>
+ {foreach from=$cpro_name key=i item=name}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <span class="valeur">{$name}</span>
+ </td>
+ <td class="colm">
+ <span class="valeur"> {$cpro_level.$i}</span>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:comppros_del('{$cpro_id.$i}');">retirer</a></span>
+ </td>
+ </tr>
+ {/foreach}
+ {if $nb_cpro < $nb_cpro_max}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <select name="comppros_sel_add">
+ <option value=""></option>
+ {foreach from=$comppros_def item=cn key=id}
+ <option value="{$id}">{if $comppros_title.$id}-{else} {/if} {$cn}</option>
+ {/foreach}
+ </select>
+ </td>
+ <td class="colm">
+ <select name="comppros_level_sel_add">
+ <option value=""></option>
+ {foreach from=$comppros_levels item=ln key=l}
+ <option value="{$l}">{$ln}</option>
+ {/foreach}
+ </select>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:comppros_add();">ajouter</a></span>
+ </td>
+ </tr>
+ {/if}
+ </table>
+</div>
+
+<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil: Compétences linguistiques">
+ <tr>
+ <th colspan="3">
+ Compétences linguistiques
+ <input type="hidden" value="" name="langue_op" />
+ <input type="hidden" value="" name="langue_id" />
+ <input type="hidden" value="" name="langue_level" />
+ </th>
+ </tr>
+ <tr>
+ <td colspan="3" class="pflags">
+ <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="rouge">
+ <input type="checkbox" name="accesX" checked="checked" disabled="disabled" />
+ </td>
+ <td class="texte">
+ ne peut être ni public ni transmis à l'AX
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="colg">
+ <span class="titre">Langue</span>
+ </td>
+ <td class="colm">
+ <span class="titre">Niveau</span>
+ </td>
+ <td class="cold" style="width:15%">
+ <span class="lien"><a href="{"docs/faq.php"|url}#niveau_langue" class="popup_800x600">Quel niveau ?</a></span>
+ </td>
+ </tr>
+ {foreach from=$langue_name item=name key=i}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <span class="valeur">{$name}</span>
+ </td>
+ <td class="colm">
+ <span class="valeur"> {if $langue_level.$i == 0}-{else}{$langue_level.$i}{/if}</span>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:langue_del('{$langue_id.$i}');">retirer</a></span>
+ </td>
+ </tr>
+ {/foreach}
+ {if $nb_lg < $nb_lg_max}
+ <tr class="{cycle values="pair,impair"}">
+ <td class="colg">
+ <select name="langue_sel_add">
+ <option value=""></option>
+ {foreach from=$langues_def item=n key=i}
+ <option value="{$i}">{$n}</option>
+ {/foreach}
+ </select>
+ </td>
+ <td class="colm">
+ <select name="langue_level_sel_add">
+ <option value=""></option>
+ {foreach from=$langues_levels item=l key=i}
+ <option value="{$i}">{$l}</option>
+ {/foreach}
+ </select>
+ </td>
+ <td class="cold">
+ <span class="lien"><a href="javascript:langue_add();">ajouter</a></span>
+ </td>
+ </tr>
+ {/if}
+ </table>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Perte du mot de passe</h1>
+
+
+{if $ok}
+
+<p>
+<strong>Un certificat d'authentification aléatoire</strong> vient de t'être attribué et envoyé à
+ton adresse en polytechnique.org.<span class="erreur"> Il expire dans six heures.</span> Tu dois donc
+<strong>consulter ton mail avant son expiration</strong> et utiliser le certificat comme expliqué
+dans le mail pour changer ton mot de passe.
+</p>
+<p>
+Si tu n'accèdes pas à ton mail dans les
+6 heures, sollicite un nouveau
+certificat sur cette page.
+</p>
+
+{else}
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <p>
+ Il est impossible de récupérer le mot de passe perdu (nous n'avons que le résultat après un
+ chiffrement irréversible de ton mot de passe). La procédure suivante va te permettre de choisir un
+ nouveau mot de passe.
+ </p>
+ <p>
+ Après avoir complété les informations suivantes, tu recevras à ton adresse Polytechnique.org un
+ courrier électronique te permettant de choisir ce nouveau mot de passe. Si jamais tu n'as plus
+ accès aux boîtes aux lettres vers lesquelles ton adresse Polytechnique.org reroute ton courrier,
+ alors indique nous ci-dessous l'adresse à laquelle tu souhaites recevoir le courrier. Nous t'y
+ adresserons le message de création d'un nouveau mot de passe si et seulement si tes anciennes
+ boîtes sont réellement inaccessibles.
+ </p>
+ <table class="tinybicol" cellpadding="3" cellspacing="0" summary="Récupération du mot de passe">
+ <tr>
+ <th colspan="2">
+ Perte de mot de passe
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Login :<br />
+ <span class="smaller">"prenom.nom"</span>
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="50" name="login" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Adresse électronique : <span class="smaller">(facultatif)</span>
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="50" name="email" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Date de naissance :
+ </td>
+ <td>
+ <input type="text" size="8" maxlength="8" name="birth" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <span class="smaller">
+ (format JJMMAAAA soit 01032000 pour 1er mars 2000)
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="submit" value="Continuer" name="submit" />
+ </td>
+ </tr>
+ </table>
+</form>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{literal}
+<script type="text/javascript">
+ <!-- Begin
+ function showPage( pNumber ) {
+ document.forms.form_result.page_courante.value = pNumber;
+ document.forms.form_result.submit();
+ }
+ // End -->
+</script>
+{/literal}
+
+<h1>
+ Rechercher un camarade pouvant m'aider à orienter mon parcours professionnel
+</h1>
+{if $recherche_trop_large}
+<p>
+Les critères de recherche que tu as rentrés n'ont pas produit de résultats,
+sans doute car ta requête était trop générale. Nous t'invitons à
+<a href="referent.php">procéder à une nouvelle recherche</a>, en essayant
+d'être plus précis.
+</p>
+{elseif $resultats}
+<form action="{$smarty.server.PHP_SELF}" method="post" id="form_result">
+ <div class="contact-list" style="clear:both" >
+ <input type="hidden" name="pays" value="{$pays_selectionne}" />
+ <input type="hidden" name="expertise" value="{$expertise_champ}" />
+ <input type="hidden" name="secteur" value="{$secteur_selectionne}" />
+ <input type="hidden" name="ss_secteur" value="{$ss_secteur_selectionne}" />
+ <input type="hidden" name="page_courante" value="1" />
+ <input type="hidden" name="Chercher" value="1" />
+ {section name="resultat" loop=$personnes}
+ <div class="contact">
+ <div class="nom">
+ {$personnes[resultat].nom} {$personnes[resultat].prenom}
+ </div>
+ <div class="appli">
+ X{$personnes[resultat].promo}
+ </div>
+ <div class="bits" style="width: 40%;">
+ <span class='smaller'>
+ <a href="{"fiche.php"|url}?user={$personnes[resultat].bestalias}" class="popup2">
+ <img src="images/loupe.gif" alt="voir sa fiche" title="Voir sa fiche" /></a> -
+ <a href="{"fiche_referent.php"|url}?user={$personnes[resultat].bestalias}" class="popup2">Voir sa fiche référent</a>
+ </span>
+ </div>
+ <div class="long">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="lt">Expertise :</td>
+ <td class="rt" colspan="2">{$personnes[resultat].expertise|nl2br}</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ {/section}
+ </div>
+ <p>
+ Pages :
+ {section name="page_number" start=1 loop=$nb_pages_total+1}
+ {if $smarty.section.page_number.index == $page_courante}
+ {$page_courante} {else}
+ <a href="javascript:showPage({$smarty.section.page_number.index})">{$smarty.section.page_number.index} </a>
+ {/if}
+ {/section}
+ </p>
+</form>
+{/if}
+{if $show_formulaire}
+<span class="erreur">
+ Si tu utilises ce service pour la première fois, lis attentivement le texte
+ qui suit.
+</span>
+<p>
+En <a href="profil.php">renseignant sa fiche dans l'annuaire</a>, chacun
+d'entre nous a la possibilité de renseigner, dans la section "Mentoring",
+s'il accepte de recevoir des messages de la part de camarades qui pourraient
+souhaiter lui poser quelques questions et recevoir quelques conseils.<br />
+Ces informations sont rentrées par chacun sur la base du volontariat et sont
+totalement déclaratives. Chaque X qui complète cette rubrique accepte alors
+de recevoir un courrier électronique des jeunes camarades qui sont en train
+de bâtir leur projet professionnel, mais aussi des moins jeunes qui cherchent
+à réorienter leur carrière. Bien entendu, chacun se réserve le droit de ne
+pas donner suite à une sollicitation !<br />
+Pour que ce système soit profitable, il est nécessaire que dans ta recherche
+de conseils professionnels, tu agisses sagement, en évitant de contacter
+un trop grand nombre de camarades. De même, pense bien que les quelques
+personnes que tu vas éventuellement contacter suite à ta recherche
+accepteront éventuellement de t'aider et de te guider <strong>sur la base du
+ volontariat</strong>. Il va de soi que plus ton comportement lors de votre
+contact sera éthique et reconnaissant, plus cette pratique de conseil
+inter-générations sera encouragée et bien perçue par ceux qui la pratiquent.
+<br />
+Nous avons peiné à trouver un nom pour désigner ceux qui sont volontaires
+pour guider les camarades qui en ressentent le besoin : nous avons finalement
+retenu le terme de <em>mentors</em> pour désigner ceux qui sont prêts à aider de
+manière suivie un camarade plus jeune, à plusieurs moments de sa carrière,
+et avons appelé <em>référents</em> ceux qui s'impliquent plutôt en tant que
+"relai d'informations", dans le sens où ils ont vécu des expériences
+professionnelles susceptibles d'intéresser certains d'entre nous (expérience
+de stage ou d'emploi à l'étranger), sans forcément souhaiter consacrer
+autant de temps à quelqu'un que le ferait un mentor attentionné.
+La recherche proposée ici permet de trouver les deux types d'aide.
+</p>
+
+<p>
+Dans le formulaire ci-dessous, tu peux rechercher des avis en fonction des
+domaines de compétence recherchés, des cultures professionnelles des pays
+connues par le référent, et enfin une dernière case te permettra de faire
+une recherche par mots-clefs.<br />
+Nous t'incitons à prendre plutôt 2 ou 3 contacts qu'un seul, cela te
+permettant certainement d'avoir une vision des choses plus complète.
+</p>
+
+<p>
+Actuellement, {$mentors_number} mentors et référents se sont déclarés sur Polytechnique.org.
+</p>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post">
+ <table cellpadding="0" cellspacing="0" summary="Formulaire de recherche de referents" class="bicol">
+ <tr class="impair">
+ <td class="titre">
+ Secteur de compétence <br /> du référent
+ </td>
+ <td >
+ <select name="secteur" onchange="javascript:submit()">
+ {html_options options=$secteurs selected=$secteur_selectionne}
+ </select>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Sous-Secteur
+ </td>
+ <td >
+ <select name="ss_secteur">
+ {html_options options=$ss_secteurs selected=$ss_secteur_selectionne}
+ </select>
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Pays bien connu du référent
+ </td>
+ <td >
+ <select name="pays">
+ {html_options options=$pays selected=$pays_selectionne}
+ </select>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td colspan="2">
+
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">
+ Expertise (rentre un ou plusieurs mots clés)
+ </td>
+ <td >
+ <input type="text" name="expertise" size="30" value="{$expertise_champ}" />
+ </td>
+ </tr>
+ </table>
+ <div class="center" style="margin-top: 1em;">
+ <input type="submit" value="Chercher" name="Chercher" />
+ </div>
+</form>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>:'(</h1>
+
+<p class="erreur">
+Une erreur est survenue lors de ton inscription ...
+</p>
+<p>
+Contacte nous au plus vite, en nous indiquant ce nombre : {$uid} sur
+<a href="mailto:support@m4x.org">support@m4x.org</a>
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Conditions générales</h1>
+
+<p>
+L'enregistrement se déroule <strong>en deux étapes</strong> :
+</p>
+<ul>
+ <li>
+ la pré-inscription quit 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 !
+ </li>
+</ul>
+
+{include file="docs/charte.tpl"}
+
+<form action="?" method="post">
+ <div class="center">
+ <input type="submit" value="J'accepte ces conditions" name="step1" />
+ </div>
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Identification</h1>
+
+<form action="?" method="post">
+ <p>
+ Avant toute chose, il te faut nous donner ta promotion :
+ </p>
+ <table class="tinybicol">
+ <tr>
+ <th>
+ Promotion
+ </th>
+ </tr>
+ <tr>
+ <td>
+ Donne ta promotion sur 4 chiffres :
+ <input type="text" size="4" maxlength="4" name="promo" value="{$smarty.post.promo}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="center">
+ <input type="submit" value="Valider" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Identification</h1>
+
+<p>
+<a href="?back=1">retour</a>
+</p>
+
+<form action="?" method="post">
+ <table class="bicol" summary="Identification" cellpadding="3">
+ {if $smarty.session.sub_state.promo >= 1996}
+ <tr>
+ <th colspan="2">matricule</th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Matricule X :
+ </td>
+ <td>
+ <input type="text" size="6" maxlength="6" name="mat"
+ value="{$smarty.request.matricule|default:$smarty.session.sub_state.mat}" />
+ </td>
+ </tr>
+ <tr class="pair">
+ <td></td>
+ <td>
+ 6 chiffres terminant par le numéro d'entrée (ex: 960532 ou 101532)<br />
+ 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 :<br />
+ Promotion: 1996, Matricule: 970XXX - Promotion: 2001, Matricule 102XXX.
+ </td>
+ </tr>
+ {/if}
+ <tr>
+ <th colspan="2">
+ Identification
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Nom<br />
+ <span class="smaller">(Xettes mariées : nom à l'X)</span>
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="30" name="nom" value="{$smarty.request.nom}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Prénom
+ </td>
+ <td>
+ <input type="text" size="15" maxlength="20" name="prenom" value="{$smarty.request.prenom}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Promotion
+ </td>
+ <td>
+ <input type="text" size="4" readonly="readonly" value="{$smarty.session.sub_state.promo}" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="submit" value="Continuer l'inscription" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $smarty.session.sub_state.forlife}
+
+<h1>Formulaire de pré-inscription</h1>
+
+<form action="?" 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
+ donc te donner l'adresse <strong>{$smarty.session.sub_state.bestalias}@polytechnique.org</strong>,
+ en plus de ton adresse à vie <strong>{$smarty.session.sub_state.forlife}@polytechnique.org</strong>.
+ Sache que tu peux perdre l'adresse <strong>{$smarty.session.sub_state.bestalias}@polytechnique.org</strong>
+ si un homonyme s'inscrit (même si 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
+ donc te donner l'adresse <strong>{$smarty.session.sub_state.bestalias}@polytechnique.org</strong>, en plus
+ de ton adresse à vie <strong>{$smarty.session.sub_state.forlife}@polytechnique.org</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.
+ </p>
+ <p>
+ Attention, il doit <strong>impérativement être correct</strong> pour que nous puissions
+ t'envoyer ton mot de passe.
+ </p>
+
+ <table class="bicol">
+ <tr>
+ <th colspan="2">
+ Contact et sécurité
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ E-mail<br />
+ <span class="smaller">(Première redirection)</span>
+ </td>
+ <td>
+ <input type="text" size="35" maxlength="50" name="email" value="{$smarty.post.email}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Date de naissance<br />
+ <span class="smaller">(Format JJMMAAAA)</span>
+ </td>
+ <td>
+ <input type="text" size="8" maxlength="8" name="naissance" value="{$smarty.post.naissance}" />
+ (demandée si perte de mot de passe)
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="submit" value="Terminer la pré-inscription" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Pré-inscription réussie</h1>
+
+<p>
+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}@polytechnique.org</strong>, ainsi que 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.
+</p>
+<p>
+Si tu ne reçois rien, vérifie bien l'adresse <strong>{$smarty.session.sub_state.email}</strong>.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Bravo !!!</h1>
+
+<p>
+Tu as maintenant accès au site !!!
+Ton adresse électronique à vie <strong>{$smarty.session.forlife}@polytechnique.org</strong> est déjà ouverte, essaie-la !
+</p>
+<p>
+ Remarque: 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>
+
+
+<h2>Mot de passe</h2>
+
+{if $mdpok}
+
+<p class="erreur">
+ton mot de passe a bien été mis à jour !
+</p>
+
+{else}
+
+<p>
+Tu as recu un mot de passe par défaut, si tu souhaites en changer, tu peux le faire ici :
+</p>
+
+<form action="{$smarty.server.PHP_REQUEST}" method="post" id="changepass">
+ <table class="tinybicol" cellpadding="3" cellspacing="0">
+ <tr>
+ <th colspan="2">
+ Saisie du nouveau mot de passe
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Nouveau mot de passe :
+ </td>
+ <td>
+ <input type="password" size="10" maxlength="10" name="nouveau" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Retape-le une fois :
+ </td>
+ <td>
+ <input type="password" size="10" maxlength="10" name="nouveau2" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="submit" value="Changer" name="submitn" onclick="EnCryptedResponse(); return false;" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+<form action="{$smarty.server.PHP_REQUEST}" method="post" id="changepass2">
+<div><input type="hidden" name="response2" value="" /></div>
+</form>
+
+<p>
+N'oublie pas : 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.
+</p>
+
+{/if}
+
+<h2>Rejoindre la communauté</h2>
+
+<form action='{rel}/profil.php' method='post'>
+ <p>
+ Pour rejoindre la communauté des X sur le web, nous te convions le plus vivement à remplir ton profil !!!
+ </p>
+
+ <p>
+ Cette fonctionnalités n'est pas du tout redondante avec l'annuaire de l'AX, car nous pouvons synchroniser pour toi
+ les données qu'il contient :
+ </p>
+
+ <ul>
+ <li>
+ tu peux choisir dans ton profil sur Polytechnique.org d'automatiquement transmettre à l'AX (et <strong>uniquement</strong> ces données)
+ des parties de ta fiche, au fur et à mesure que tu les modifies.
+ </li>
+ <li>
+ de même, nous mettons à jour ta fiche depuis les données de l'annuaire de l'AX si tu le souhaites.
+ (si tu ne le souhaite pas, décoche la case ci contre : <input type='checkbox' value='1' checked="checked" name='register_from_ax_question' />)
+ </li>
+ </ul>
+
+ <div class="center">
+ <input type="submit" value="Rejoindre les X sur le Net !" class="erreur" />
+ </div>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<?xml version="1.0"?>
+{***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************}
+<rss version="2.0">
+ <channel>
+ <title>Polytechnique.org :: News</title>
+ <language>fr</language>
+ <link>{#globals.baseurl#}/</link>
+ <description>L'actualite polytechnicienne...</description>
+ <image>
+ <title>Polytechnique.org</title>
+ <url>{#globals.baseurl#}/images/logo.png</url>
+ <link>{#globals.baseurl#}/</link>
+ </image>
+ {iterate item=line from=$rss}
+ <item>
+ <title>{$line.titre|strip_tags}</title>
+ <link>{#globals.baseurl#}/login.php#newsid{$line.id}</link>
+ <description><![CDATA[{$line.texte|nl2br}]]></description>
+ <pubDate>{$line.creation_date|rss_date}</pubDate>
+ </item>
+ {/iterate}
+ </channel>
+</rss>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Recherche avancée</h1>
+
+<p>[<a href="search.php">Recherche simple</a>]</p>
+
+<form id="recherche" action="{$smarty.server.PHP_SELF}" method="get">
+ <table class="bicol" cellpadding="3" summary="Recherche">
+ <tr>
+ <td>Nom</td>
+ <td>
+ <input type="text" name="name" size="32" value="{$smarty.request.name}" />
+ {if $smarty.request.name && !$with_soundex && $smarty.request.recherche}
+ <a class='smaller' href="{$smarty.server.PHP_SELF}?with_soundex=1&{$url_args}">
+ étendre par proximité sonore
+ </a>
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td>Prénom</td>
+ <td>
+ <input type="text" name="firstname" size="32" value="{$smarty.request.firstname}" />
+ {if $smarty.request.firstname && !$with_soundex && $smarty.request.recherche}
+ <a class='smaller' href="{$smarty.server.PHP_SELF}?with_soundex=1&{$url_args}">
+ étendre par proximité sonore
+ </a>
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td>Surnom</td>
+ <td>
+ <input type="text" name="nickname" size="32" value="{$smarty.request.nickname}" />
+ </td>
+ </tr>
+ <tr>
+ <td>Promotion</td>
+ <td>
+ <select name="egal1">
+ <option value="=" {if $smarty.request.egal1 eq "="}selected="selected"{/if}> = </option>
+ <option value=">=" {if $smarty.request.egal1 eq ">="}selected="selected"{/if}> >= </option>
+ <option value="<=" {if $smarty.request.egal1 eq "<="}selected="selected"{/if}> <= </option>
+ </select>
+ <input type="text" name="promo1" size="4" maxlength="4" value="{$smarty.request.promo1}" />
+ ET
+ <select name="egal2">
+ <option value="=" {if $smarty.request.egal2 eq "="}selected="selected"{/if}> = </option>
+ <option value=">=" {if $smarty.request.egal2 eq ">="}selected="selected"{/if}> >= </option>
+ <option value="<=" {if $smarty.request.egal2 eq "<="}selected="selected"{/if}> <= </option>
+ </select>
+ <input type="text" name="promo2" size="4" maxlength="4" value="{$smarty.request.promo2}" />
+ </td>
+ </tr>
+ <tr>
+ <td>Sexe</td>
+ <td>
+ <table>
+ <tr>
+ <td style="width:100px">
+ <input type="radio" name="woman" value="0" {if !$smarty.request.woman}checked="checked"{/if} />Indifférent
+ </td>
+ <td style="width:100px">
+ <input type="radio" name="woman" value="1" {if $smarty.request.woman eq 1}checked="checked"{/if} />Homme
+ </td>
+ <td style="width:100px">
+ <input type="radio" name="woman" value="2" {if $smarty.request.woman eq 2}checked="checked"{/if} />Femme
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>Sur polytechnique.org</td>
+ <td>
+ <table>
+ <tr>
+ <td style="width:100px">
+ <input type="radio" name="subscriber" value="0" {if !$smarty.request.subscriber}checked="checked"{/if} />Indifférent
+ </td>
+ <td style="width:100px">
+ <input type="radio" name="subscriber" value="1" {if $smarty.request.subscriber eq 1}checked="checked"{/if} />Inscrit
+ </td>
+ <td style="width:100px">
+ <input type="radio" name="subscriber" value="2" {if $smarty.request.subscriber eq 2}checked="checked"{/if} />Non inscrit
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>En vie</td>
+ <td>
+ <table>
+ <tr>
+ <td style="width:100px">
+ <input type="radio" name="alive" value="0" {if !$smarty.request.alive}checked="checked"{/if} />Indifférent
+ </td>
+ <td style="width:100px">
+ <input type="radio" name="alive" value="1" {if $smarty.request.alive eq 1}checked="checked"{/if} />Vivant
+ </td>
+ <td style="width:100px">
+ <input type="radio" name="alive" value="2" {if $smarty.request.alive eq 2}checked="checked"{/if} />Décédé
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">Géographie</th>
+ </tr>
+ <tr>
+ <td>Ville</td>
+ <td><input type="text" name="city" size="32" value="{$smarty.request.city}" /></td>
+ </tr>
+ <tr>
+ <td>Pays</td>
+ <td>
+ <select name="country" onchange="javascript:document.forms.recherche.submit();">
+ {if $smarty.request.country}
+ {assign var="country" value=$smarty.request.country}
+ {else}
+ {assign var="country" value=""}
+ {/if}
+ {geoloc_country country=$country}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Région ou département</td>
+ <td>
+ <select name="region">
+ {if $smarty.request.region}
+ {assign var="region" value=$smarty.request.region}
+ {else}
+ {assign var="region" value=""}
+ {/if}
+ {if $smarty.request.country neq ""}
+ {geoloc_region country=$smarty.request.country region=$region}
+ {else}
+ <option value=""></option>
+ {/if}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">Activité</th>
+ </tr>
+ <tr>
+ <td>Entreprise</td>
+ <td><input type="text" name="entreprise" size="32" value="{$smarty.request.entreprise}" /></td>
+ </tr>
+ <tr>
+ <td>Fonction</td>
+ <td>
+ <select name="fonction">
+ <option value="0"></option>
+ {iterate from=$choix_postes item=cp}
+ <option value="{$cp.id}" {if $smarty.request.fonction eq $cp.id}selected{/if}>
+ {$cp.fonction_fr}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Poste</td>
+ <td><input type="text" name="poste" size="32" value="{$smarty.request.poste}" /></td>
+ </tr>
+ <tr>
+ <td>Secteur</td>
+ <td>
+ <select name="secteur">
+ <option value="0"></option>
+ {iterate item=cs from=$choix_secteurs}
+ <option value="{$cs.id}" {if $smarty.request.secteur eq $cs.id}selected{/if}>
+ {$cs.label}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>CV contient</td>
+ <td><input type="text" name="cv" size="32" value="{$smarty.request.cv}" /></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type='checkbox' name='only_referent' {if $smarty.request.only_referent}checked='checked'{/if} />
+ chercher uniquement parmi les camarades se proposant comme référents
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">Divers</th>
+ </tr>
+ <tr>
+ <td>Nationalité</td>
+ <td>
+ <select name="nationalite">
+ {iterate from=$choix_nats item=cn}
+ <option value="{$cn.id}" {if $smarty.request.nationalite eq $cn.id}selected="selected"{/if}>
+ {$cn.text}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Binet</td>
+ <td>
+ <select name="binet">
+ <option value="0"></option>
+ {iterate item=cb from=$choix_binets}
+ <option value="{$cb.id}" {if $smarty.request.binet eq $cb.id}selected="selected"{/if}>
+ {$cb.text}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Groupe X</td>
+ <td>
+ <select name="groupex">
+ <option value="0"></option>
+ {iterate item=cg from=$choix_groupesx}
+ <option value="{$cg.id}" {if $smarty.request.groupex eq $cg.id}selected="selected"{/if}>
+ {$cg.text}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Section</td>
+ <td>
+ <select name="section">
+ {iterate item=cs from=$choix_sections}
+ <option value="{$cs.id}" {if $smarty.request.section eq $cs.id}selected="selected"{/if}>
+ {$cs.text}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Formation</td>
+ <td>
+ <select name="school" onchange="javascript:document.forms.recherche.submit();">
+ <option value="0"></option>
+ {iterate item=cs from=$choix_schools}
+ <option value="{$cs.id}" {if $smarty.request.school eq $cs.id}selected="selected"{/if}>
+ {$cs.text}
+ </option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <select name="diploma">
+ <option value="0"></option>
+ {section name=diploma loop=$choix_diplomas}
+ <option value="{$choix_diplomas[diploma]}" {if $smarty.request.diploma eq
+ $choix_diplomas[diploma]}selected="selected"{/if}>
+ {$choix_diplomas[diploma]}
+ </option>
+ {/section}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Commentaire contient</td>
+ <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
+ </tr>
+ </table>
+ <div class="center">
+ <br />
+ {min_auth level='cookie'}
+ <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
+ mettre les fiches modifiées récemment en premier <br /> <br />
+ {/min_auth}
+ <input type="submit" name="rechercher" value="Chercher" />
+ </div>
+</form>
+<p>
+ <strong>N.B.</strong> Le caractère joker * peut remplacer une ou plusieurs lettres dans les recherches.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $do_title}<h1>Recherche avancée</h1>{/if}
+
+<ul>
+ {if $with_soundex && ($smarty.request.firstname || $smarty.request.name)}
+ <li>Étendre ta recherche par <strong>
+ <a href="{$with_soundex}">proximité sonore</a>
+ </strong>
+ </li>
+ {/if}
+
+ <li><strong><a href="{$url_search_form}">Modifier</a>
+ </strong> ta recherche
+ </li>
+
+ <li>Effectuer une nouvelle <strong>
+ <a href="{$smarty.server.PHP_SELF}">recherche avancée</a>
+ </strong>
+ </li>
+
+ <li>Effectuer une nouvelle <strong>
+ <a href="{"search.php"|url}">recherche simple</a>
+ </strong>
+ </li>
+</ul>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Recherche simple dans l'annuaire</h1>
+
+<form action="{"search.php"|url}" method="get"{if $show_js} id="quick_form"{/if}>
+ <table class="bicol" cellspacing="0" cellpadding="4">
+ <tr>
+ <td style="width: 78%">
+ <input type='text' name="quick" value="{$smarty.request.quick}" style="width: 100%" /><br />
+ {min_auth level='cookie'}
+ <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} />
+ mettre les fiches modifiées récemment en premier
+ {if $smarty.request.nonins}
+ <br /><input type='checkbox' name='nonins' readonly="readonly" checked='checked' value='1' /> Chercher uniquement des non inscrits
+ {/if}
+ {/min_auth}
+ </td>
+ <td>
+ <input type="submit" value="Chercher" />
+ {min_auth level="cookie"}
+ <br /><a class='smaller' href="advanced_search.php">Recherche avancée</a>
+ {/min_auth}
+ </td>
+ </tr>
+ </table>
+</form>
+
+<br />
+
+{if $show_js}
+{literal}
+<script type="text/javascript">
+ <!--
+ // Activate the first search input field.
+ document.getElementById("quick_form").quick.focus();
+ // -->
+</script>
+{/literal}
+{/if}
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{include file="search.quick.form.tpl" show_js=1}
+<h1>Comment faire une recherche ?</h1>
+
+<h2>Nom, Prenom, Promo ...</h2>
+
+<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>promos</strong> :
+</p>
+<ul>
+ <li>1990 : signifie appartient à la promo 1990</li>
+ <li>1990-2000 : signifie sur la promo 1990 à 2000</li>
+ <li><1990 : signifie promos inférieures ou égales à 1990</li>
+ <li>>1990 : signifie promos supérieures ou égales à 1990</li>
+</ul>
+<p>
+Ainsi, rechercher tous les "Dupont" sur les promos 1980 à 1990 et sur la promo 2000 se fait avec la recherche :
+[ Dupont 1980-1990 2000 ]
+</p>
+
+<h2>Astuce pour les noms ...</h2>
+<p>
+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 [ Le Normand ].<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>
+
+{min_auth level="cookie"}
+<h2>Barre de recherche pour Firefox</h2>
+<script type="text/javascript">
+{literal}
+function addEngine() {
+ if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {
+ {/literal}
+ window.sidebar.addSearchEngine(
+ "{$baseurl|replace:"https":"http"}/xorg.src",
+ "{$baseurl|replace:"https":"http"}/images/xorg.png",
+ "Recherche rapide X.org",
+ "Academic");
+ {literal}
+ } else { alert("Impossible d'installer la barre de recherche Firefox"); }
+}
+{/literal}
+</script>
+<p>Tu peux <a href="javascript:addEngine()">installer</a> la barre de recherche rapide directement dans ton navigateur.
+</p>
+{/min_auth}
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $formulaire==0 and !$xorg_error->errs|count}
+ {if !$advanced}
+ {include file='search.quick.form.tpl' show_js=1}
+ {else}
+ {include file=search.adv.links.tpl do_title=1 with_soundex=$with_soundex}
+ {/if}
+
+ <h1 class='right'>
+ {if $search_results_nb==0}Aucune{else}{$search_results_nb}{/if} réponse{if $search_results_nb>1}s{/if}.
+ </h1>
+
+ {if $search_results_nb > 1}
+ <div>
+ Trier par :
+ {foreach from=$search_order_link item=tri}
+ [<a href='{$tri.url}'>
+ {if $tri.asc or $tri.desc}<strong>{/if}
+ {$tri.text}
+ {if $tri.desc}<img src='{rel}/images/up.png' alt='tri ascendant' />{/if}
+ {if $tri.asc}<img src='{rel}/images/dn.png' alt='tri descendant' />{/if}
+ {if $tri.asc or $tri.desc}</strong>{/if}
+ </a>]
+ {/foreach}
+ </div>
+ {/if}
+
+ <div class="contact-list" style="clear:both">
+ {capture name=list}
+ {iterate item=res from=$search_results}
+ {if $res.contact || $res.watch}
+ {include file=include/minifiche.tpl c=$res show_action="retirer"}
+ {else}
+ {include file=include/minifiche.tpl c=$res show_action="ajouter"}
+ {/if}
+ {/iterate}
+ {/capture}
+ {$smarty.capture.list|smarty:nodefaults}
+ </div>
+
+ {if $search_pages_nb > 1}
+ <p>
+ {foreach from=$search_pages_link item=l}
+ {if $l.i eq $search_page}
+ <span class="erreur">{$l.text}</span>
+ {else}
+ <a href="{$l.u}">{$l.text}</a>
+ {/if}
+ {/foreach}
+ </p>
+ {/if}
+
+ {min_auth level='cookie'}
+ <br />
+ {if $smarty.capture.list|smarty:nodefaults|display_lines > 20}
+ {if $advanced}
+ {include file=search.adv.links.tpl do_title=1}
+ {else}
+ {include file='search.quick.form.tpl'}
+ {/if}
+ {/if}
+
+ <p>
+ <strong>Astuce:</strong>
+ Si tu survoles une fiche, tu sauras quand elle a été mise à jour la dernière fois !</p>
+ {/min_auth}
+{else}
+ {if $advanced}
+ {include file="search.adv.form.tpl"}
+ {else}
+ {include file="search.quick.tpl"}
+ {/if}
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{literal}
+ <!-- BANDEAU DEBUT -->
+ <style type="text/css">
+ body { margin: 0 0 0 0; }
+ table.ligne { background: #e7e7e7; }
+ td.ligne { width: 100%; }
+ td.xdx {
+ padding: 0; background: #CCCCCC ; height: 14px; width: auto; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;
+ }
+ td.xdx img {border: 0; padding: 0; margin: 0; }
+ a.xdx { vertical-align: bottom; color: #505050; }
+ a.xdx:link { text-decoration: none ; }
+ a.xdx:visited { text-decoration: none ; }
+ a.xdx:hover { text-decoration: underline; }
+ a.xdx:active { color: #CCCCCC ; background: #505050 ; }
+ </style>
+ <meta name="MSSmartTagsPreventParsing" content="true" />
+ <!-- BANDEAU FIN -->
+{/literal}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+ <!-- BANDEAU DEBUT -->
+
+ <!-- ligne grise de 1px -->
+ <table class="ligne" cellspacing="0" cellpadding="0" style="width:100%; border:none;" summary=""><tr><td class="ligne"></td></tr></table>
+
+ <table cellspacing="0" cellpadding="1" style="width:100%; border:none;" summary=""><tr><td class="xdx"><img alt="" src="/images/x.png" /> <a class="xdx" href="http://www.polytechnique.fr/">L'École</a> · <a class="xdx" href="http://www.polytechnique.edu/">Institutional site</a> ~~ <a class="xdx" href="http://www.fondationx.org/">FX</a> · <a class="xdx" href="http://www.polytechniciens.com/">AX</a> ~~ <a class="xdx" href="http://www.polytechnique.org/">Polytechnique.org</a> · <a class="xdx" href="http://www.polytechnique.net/">Associations polytechniciennes</a> · <a class="xdx" href="http://www.polytechnique.fr/eleves/">Élèves</a></td></tr></table>
+ <!-- ligne grise de 1px -->
+ <table class="ligne" cellspacing="0" cellpadding="0" style="width:100%; border:none;" summary=""><tr><td class="ligne"></td></tr></table>
+
+ <!-- BANDEAU FIN -->
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if !$smarty.server.HTTP_USER_AGENT|regex_replace:"/^Mozilla\/(3|4\.[^0]).*$/":""}
+<h1>ATTENTION !</h1>
+
+<p class="erreur">
+Netscape 4 et certains autres navigateurs très anciens ne sont pas supportés par ce site !!!
+</p>
+<p>
+En effet, ils ne comprenent qu'une trop faible partie des standards du web.
+Il faut donc s'attendre à ce que nombre des fonctionnalités de ce site soient de ce fait indisponnibles.
+</p>
+<p>
+Nous conseillons très vivement d'utiliser des navigateurs récents, tels
+<a href="http://www.mozilla.org/products/firefox/">Firefox</a>
+</p>
+<br />
+{/if}
+
+{foreach from=$xorg_error->errs|smarty:nodefaults item=err}
+<div class="erreur">{$err|smarty:nodefaults}</div>
+{/foreach}
+
+{if !$xorg_error->failure && $xorg_tpl}{include file=$xorg_tpl}{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if #globals.debug#}
+{if $db_trace && $db_trace neq "\n\n"}
+ <div id="db-trace">
+ <h1>
+ Trace de l'exécution de cette page sur mysql (hover me)
+ </h1>
+ <div class="hide">
+ {$db_trace|smarty:nodefaults}
+ </div>
+ </div>
+{/if}
+
+{if $validate}
+ <div id="dev">
+ @HOOK@
+ Validation:
+ <a href="http://jigsaw.w3.org/css-validator/validator?uri={$validate}">CSS</a>
+ |
+ références :
+ <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>
+{/if}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<div>
+ Copyright © 1999-2005 <a href="http://x-org.polytechnique.org/">Polytechnique.org</a>
+ -
+ <a href="{rel}/docs/convention_ax.php">Lien avec l'AX</a>
+ -
+ <a href="{rel}/docs/apropos.php">A propos de ce site</a>
+<br />
+ <a href="{rel}/docs/ethique.php">Services et Ethique</a>
+ | <a href="{rel}/docs/charte.php">Charte</a>
+{min_auth level=cookie}
+ | <a href="{rel}/stats/coupure.php">Disponibilité</a>
+ | <a href="{rel}/stats/">Statistiques</a>
+{/min_auth}
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta name="description" content="Le Portail des Polytechniciens" />
+ <meta name="keywords" content="Ecole polytechnique, anciens eleves, portail, alumni, AX, X, routage, reroutage, e-mail, email, mail" />
+ <link rel="icon" type="image/png" href="images/favicon.png" />
+
+ <link rel="index" href="{rel}/index.php" />
+ <link rel="author" href="{rel}/docs/faq.php" />
+ <link rel="search" href="{rel}/search.php" />
+ <link rel="help" href="{rel}/docs/faq.php" />
+ <link rel="bookmark" href="http://www.polytechnique.fr/" title="| École polytechnique" />
+ <link rel="bookmark" href="http://www.polytechnique.edu/" title="| Institutionnal site" />
+ <link rel="bookmark" href="http://www.fondationx.org/" title="| FX" />
+ <link rel="bookmark" href="http://www.polytechniciens.com/" title="| AX" />
+ <link rel="bookmark" href="http://www.polytechnique.org/" title="| Polytechnique.org" />
+ <link rel="bookmark" href="http://www.polytechnique.fr/eleves/" title="| Site d'élèves" />
+
+ {foreach from=$xorg_css item=css}
+ <link rel="stylesheet" type="text/css" href="{rel}/{$css}" />
+ {/foreach}
+ {foreach from=$xorg_js item=js}
+ <script type="text/javascript" src="{rel}/{$js}"></script>
+ {/foreach}
+ <script type="text/javascript" src="{rel}/javascript/overlib.js"></script>
+
+ {if $xorg_rss}
+ <link rel="alternate" type="application/rss+xml" title="{$xorg_rss.title}" href="{rel}{$xorg_rss.href}" />
+ {/if}
+
+ <title>{$xorg_title|default:"Anciens eleves Polytechnique, annuaire email, Alumni"}</title>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{"css/default.css"|url}" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_default_headlogo.jpg"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_default_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_default_lesX.gif"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/espace.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_espace_logo.gif"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_espace_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_espace_lesX.gif"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/humlinux.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_humlinux_logo.gif"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_humlinux_lesX.gif"|url}" alt="[LES X SUR LE WEB]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/linux.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_linux_logo.jpg"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_linux_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_linux_lesX.jpg"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/liteskin.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_liteskin_logo.png"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_liteskin_titre.png"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/nbviolet.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_nbviolet_logo.gif"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_nbviolet_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_nbviolet_lesX.gif"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/newxorg.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_newxorg_logo.jpg"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_newxorg_ban.png"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/oldtimes.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_oldtimes_logo.gif"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_oldtimes_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_oldtimes_lesX.gif"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/openweb.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{rel}/exit.php">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="body">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{rel}/login.php"><img src="{rel}/images/sk_default_headlogo.jpg" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{rel}/login.php"><img src="{rel}/images/sk_default_ban.jpg" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <a href="{$mi.url|url}">{$mi.text}</a>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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="{rel}/admin/valider.php">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td>
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan='2'>
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/sharky.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_sharky_logo.png"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_sharky_ban.png"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/spectral.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_spectral_logo.gif"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_spectral_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_spectral_lesX.jpg"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link rel="stylesheet" type="text/css" href="{rel}/css/default.css" media="screen" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/trapped.css" media="screen" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="{"exit.php"|url}">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+
+ {else}
+
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-logo">
+ <a href="{"login.php"|url}"><img src="{"images/sk_trapped_logo.gif"|url}" alt="[ LOGO ]" /></a>
+ </td>
+ <td id="body-top">
+ <a href="{"login.php"|url}"><img src="{"images/sk_trapped_ban.jpg"|url}" alt="[ Polytechnique.org ]" /></a>
+ <table>
+ <tr>
+ <td class="date-heure">
+ <script type="text/javascript">
+ <!--
+ document.write(getNow());
+ //-->
+ </script>
+ </td>
+ <td class="inscrits">
+ {insert name="getNbIns"} polytechniciens sur le web<br />
+ {insert name="getNbNotifs"}
+ </td>
+ </tr>
+ </table>
+ <a href="{"login.php"|url}"><img src="{"images/sk_trapped_lesX.gif"|url}" alt="[LES X SUR LE WEB]" /></a>
+ </td>
+ </tr>
+ <tr>
+ <td id="body-menu">
+ {foreach key=menu_title item=menu_list from=$menu}
+ {if $menu_title}
+ <div class="menu_title">{$menu_title}</div>
+ {/if}
+ {foreach item=mi from=$menu_list}
+ <div class='menu_item'><a href="{$mi.url|url}">{$mi.text}</a></div>
+ {/foreach}
+ {/foreach}
+ {perms level=admin}
+ <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/valider.php"|url}">{insert name="mkStats"}</a></td>
+ </tr>
+ </table>
+ {/perms}
+ </td>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ <tr>
+ <td id="body-bottom" colspan="2">
+ {include file=skin/common.footer.tpl}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Skins Polytechnique.org</h1>
+
+<p>
+Tu n'aimes pas les couleurs ou l'apparence de Polytechnique.org ? 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 :)
+</p>
+<p>
+Note aux utilisateurs du navigateur Netscape 4.x ou équivalent.
+La fonctionalité "skins" n'est hélas pas compatible avec ces navigateurs
+qui ne respectent pas les standards du web. <br />
+Pour profiter de toutes les fonctionnalités de Polytechnique.org,
+nous te conseillons de télécharger une version récente de ton navigateur.
+</p>
+<p>
+Pour toute information complémentaire, n'hésite pas à écrire à
+{mailto address='support@polytechnique.org' subject='navigateurs'}
+</p>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post">
+ <table id="skin" cellpadding="0" cellspacing="0" summary="Choix de skins">
+ {iterate item=skin from=$skins}
+ <tr>
+ <td class="skigauche">
+ <input type="radio" name="newskin" value="{$skin.id}" {if $smarty.session.skin_id eq $skin.id}checked="checked"{/if} onclick="this.form.submit();" />
+ </td>
+ <td class="skimilieu">
+ <strong>{$skin.name}</strong>
+ ajoutée le {$skin.date|date_format}<br />
+ {$skin.comment}
+ <br /><br />
+ Créée par <strong>{$skin.auteur}</strong>
+ <br /><br />
+ Utilisée par <strong>{$skin.nb}</strong> inscrit{if $skin.nb>1}s{/if}
+ </td>
+ <td class="skidroite">
+ <img src="images/skins/{$skin.name}.{$skin.ext}" style="width:160px; height:160px;" alt=" [ CAPTURE D'ECRAN ] " />
+ </td>
+ </tr>
+ {/iterate}
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if $cp}
+<table class="bicol" summary="Ruptures de service">
+ <tr>
+ <th colspan="2">détails de l'interruption de service</th>
+ </tr>
+ <tr class="pair">
+ <td class="titre">début</td>
+ <td>{$cp.debut|date_format:"%x %X"}</td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">durée</td>
+ <td>{$cp.duree}</td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">résumé</td>
+ <td>{$cp.resume}</td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">services</td>
+ <td>
+ {$cp.lg_services}
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">description </td>
+ <td>{$cp.description}</td>
+ </tr>
+</table>
+
+<p class="center">
+<a href="{$smarty.server.PHP_SELF}">retour à la liste</a>
+</p>
+
+{else}
+
+<p>
+ Tu trouveras ici les interruptions de service de Polytechnique.org qui ont été
+ constatées <strong>durant les trois dernières semaines</strong>, ou qui sont prévues dans le futur.
+ Il est à noter qu'à ce jour la quasi-totalité des coupures proviennent
+ de défaillances du réseau de l'Ecole, où nos serveurs sont hébergés (rupture de la
+ connexion internet de l'Ecole, problème électrique, etc...).
+</p>
+<p>
+ Pour avoir les détails d'une interruption particulière il te suffit de cliquer dessus.
+</p>
+
+<table class="bicol" summary="Détail de la coupure">
+ <tr>
+ <th>date</th>
+ <th>résumé</th>
+ <th>services affectés</th>
+ </tr>
+{iterate item=cp from=$coupures}
+ <tr class="{cycle values="pair,impair"}">
+ <td>
+ <span class="smaller">
+ {$cp.debut|date_format}
+ </span>
+ </td>
+ <td>
+ <span class="smaller">
+ <a href="{$smarty.server.PHP_SELF}?cp_id={$cp.id}">{$cp.resume}</a>
+ </span>
+ </td>
+ <td>
+ <span class="smaller">
+ {$cp.services}
+ </span>
+ </td>
+ </tr>
+{/iterate}
+</table>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Evolution du nombre d'inscrits au site polytechnique.org
+</h1>
+
+<div class="center">
+{if $smarty.request.jours eq 1826}
+[<strong>depuis 5 ans</strong>]
+{else}
+[<a href="?jours=1826">depuis 5 ans</a>]
+{/if}
+{if $smarty.request.jours eq 731}
+[<strong>depuis 2 ans</strong>]
+{else}
+[<a href="?jours=731">depuis 2 ans</a>]
+{/if}
+{if (!$smarty.request.jours) or ($smarty.request.jours eq 364)}
+[<strong>depuis un an</strong>]
+{else}
+[<a href="?jours=364">depuis un an</a>]
+{/if}
+{if $smarty.request.jours eq 30}
+[<strong>depuis un mois</strong>]
+{else}
+[<a href="?jours=30">depuis 1 mois</a>]
+{/if}
+</div>
+<div class="center">
+ <img src="{"stats/graph_evolution.php?jours="|url}{$smarty.request.jours}" alt=" [ INSCRITS ] " />
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Statistiques
+</h1>
+
+<p>
+Quelques statistiques sur l'utilisation des services de Polytechnique.org ainsi que sur l'evolution et la repartition du nombre d'inscrits.
+</p>
+
+<ul>
+<li><a href="evolution_inscrits.php">Nombre d'inscrits au cours du temps</a></li>
+<li><a href="stats_promo.php">Nombre d'inscrits dans ta promotion</a></li>
+<li><a href="nb_by_promo.php">Nombre d'inscrits par promotion</a></li>
+</ul>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Inscrits par promo
+</h1>
+
+<p>
+Voici le nombre d'inscrits par promo :
+</p>
+
+<table class="bicol" cellpadding="3" cellspacing="0" summary="Statistiques">
+ <tr>
+ <th></th>
+ <th>0</th><th>1</th><th>2</th><th>3</th><th>4</th>
+ <th>5</th><th>6</th><th>7</th><th>8</th><th>9</th>
+ </tr>
+ {foreach item=nb10 key=lustre from=$nbs}
+ <tr>
+ <th>{$lustre}-</th>
+ {foreach item=nb from=$nb10}
+ <td class="center">
+ {if $nb && $nb.promo eq $smarty.request.promo}
+ <span class='erreur'>{$nb.nb}</span>
+ {elseif $nb}
+ <a href="?promo={$nb.promo}">{$nb.nb}</a>
+ {else}
+ -
+ {/if}
+ </td>
+ {/foreach}
+ </tr>
+ {/foreach}
+</table>
+
+{if $smarty.request.promo}
+
+<p class='center'>
+[<a href="{$smarty.server.PHP_SELF}">répartition des inscrits par promo</a>]
+</p>
+
+<h1>Courbe d'inscription de la promo {$smarty.request.promo}</h1>
+
+<div class="center">
+ <img src="{"stats/graph_promo.php"|url}?promo={$smarty.request.promo}" alt=" [ INSCRITS ] " />
+</div>
+
+{else}
+
+<h1>Inscrits par promo en (%)</h1>
+
+<div class="center">
+ <img src="{"stats/graph_by_promo.php"|url}" alt="[graphe du nombre d'inscrits par promo]" />
+</div>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>
+ Statistiques de la promotion {$promo}
+</h1>
+
+<h2>
+ Nombre d'inscrits de la promotion {$promo}
+</h2>
+
+<div class="center">
+ <img src="{"stats/graph_promo.php?promo=$promo"|url}" alt=" [ INSCRITS ] " />
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>{$title}</h1>
+
+{if !$doedit}
+{if !$readonly}
+
+{literal}
+<script type="text/javascript">
+ <!--
+ function del( myid ) {
+ if (confirm ("You are about to delete this entry. Do you want to proceed?")) {
+ document.forms.operations.action.value = "del";
+ document.forms.operations.{/literal}{$prefix}{literal}id.value = myid;
+ document.forms.operations.submit();
+ return true;
+ }
+ }
+ function edit( myid ) {
+ document.forms.operations.action.value = "edit";
+ document.forms.operations.{/literal}{$prefix}{literal}id.value = myid;
+ document.forms.operations.submit();
+ return true;
+ }
+ // -->
+</script>
+{/literal}
+{/if}
+
+<form method="post" action="{$smarty.server.PHP_SELF}" id="operations">
+ <div>
+ <input type="hidden" name="action" value="" />
+ <input type="hidden" name="{$prefix}id" value="" />
+ </div>
+</form>
+
+<table class="bicol">
+<tr>
+ {if $idsum}<th>id</th>{/if}
+ {foreach from=$vars item=myval}
+ {if $myval.sum}<th>{$myval.desc}</th>{/if}
+ {/foreach}
+ {if !$hideactions}
+ <th>action</th>
+ {/if}
+</tr>
+{if !$readonly}
+<tr class="impair">
+ <td colspan="{$ncols}"><strong>nouvelle entrée</strong></td>
+ <td class="action">
+ <a href="javascript:edit('');">create</a>
+ </td>
+</tr>
+{/if}
+{foreach from=$rows item=myrow}{assign var="myarr" value=$myrow[1]}
+<tr class="{cycle values="pair,impair"}">
+ {if $idsum}<td>{$myrow[0]}</td>{/if}
+{foreach from=$vars key=mykey item=myval}
+{if $myval.sum}
+ <td>
+ {if $myval.type=="timestamp"}
+ <span class="smaller">{$myarr.$mykey|date_format:"%x %X"}</span>
+ {elseif $myval.type=="set" and $myval.trans}
+ {$myval.trans[$myval.value]}
+ {elseif $myval.type=="ext"}
+ {extval table=$table field=$mykey value=$myarr.$mykey vtable=$myval.vtable vjoinid=$myval.vjoinid vfield=$myval.vfield}
+ {else}
+ {$myarr.$mykey}
+ {/if}
+ </td>
+{/if}
+{/foreach}
+ {if !$hideactions}
+ <td class="action">
+ {if !$readonly}
+ <a href="javascript:edit('{$myrow[0]}');">edit</a>
+ <a href="javascript:del('{$myrow[0]}');">delete</a>
+ {/if}
+ {foreach from=$myrow[2] item=myaction}
+ {a lnk=$myaction}
+ {/foreach}
+ </td>
+ {/if}
+</tr>
+{/foreach}
+</table>
+
+{if ($p_prev > -1) || ($p_next > -1)}
+<p class="pagenavigation">
+{if $p_prev > -1}<a href="?start={$p_prev}">{$msg_previous_page}</a> {/if}
+{if $p_next > -1}<a href="?start={$p_next}">{$msg_next_page}</a>{/if}
+</p>
+{/if}
+
+{else}
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <table class="bicol">
+ <tr class="impair">
+ <th colspan="2">
+ <input type="hidden" name="action" value="update" />
+ {if $id!=''}
+ modification de l'entrée
+ <input type="hidden" name="{$prefix}id" value="{$id}" />
+ {else}
+ nouvelle entrée
+ {/if}
+ </th>
+ </tr>
+ {foreach from=$vars key=mykey item=myval}
+ <tr class="{cycle values="pair,impair"}">
+ <td>
+ <strong>{$myval.desc}</strong>
+ {if $myval.type=="password"}<br /><em>(blank=no change)</em>{/if}
+ </td>
+ <td>
+ {if $myval.edit}
+ {if $myval.type=="textarea"}
+ <textarea name="{$prefix}{$mykey}" rows="10" cols="70">{$myval.value}</textarea>
+ {elseif $myval.type=="set"}
+ {if $myval.trans}
+ {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.trans[$myval.value] trans=$myval.trans}
+ {else}
+ {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.value}
+ {/if}
+ {elseif $myval.type=="ext"}
+ {extval table=$table field=$mykey name="$prefix$mykey" vtable=$myval.vtable vjoinid=$myval.vjoinid vfield=$myval.vfield selected=$myval.value}
+ {elseif $myval.type=="timestamp"}
+ <input type="text" name="{$prefix}{$mykey}" value="{$myval.value|date_format:"%x %X"}" />
+ {elseif $myval.type=="password"}
+ <input type="password" name="{$prefix}{$mykey}" size="40" />
+ {else}
+ <input type="{$myval.type}" name="{$prefix}{$mykey}" size="40" value="{$myval.value}" />
+ {/if}
+ {else}
+ {$myval.value|escape}
+ {/if}
+ </td>
+ </tr>
+ {/foreach}
+ </table>
+
+ <p class="center">
+ <input type="submit" value="enregistrer" />
+ </p>
+
+</form>
+
+<p>
+<a href="{$smarty.server.PHP_SELF}">back</a>
+</p>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Récupération de mot de passe</h1>
+
+<p>
+<strong>Mot de passe enregistré le {$smarty.now|date_format}</strong>
+</p>
+<p>
+ Cette procédure n'est pas sécurisée. Ton mot de passe est certes crypté, mais le
+ certificat envoyé par mail permet à toute personne pouvant lire ton mail (qui n'est
+ pas crypté), de changer ton mot de passe. C'est pourquoi, dans ton intérêt, il est
+ préférable que tu ne perdes pas ton mot de passe !!!
+</p>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <div class="center">
+ <input type="hidden" name="action" value="lister" />
+ Afficher la période suivante :
+ <select name="mois" size="1">
+ {foreach key=key item=item from=$month_arr}
+ <option value="{$key}" {if $mois_sel eq $key}selected="selected"{/if}>{$item}</option>
+ {/foreach}
+ </select>
+ <input type="text" name="annee" size="10" value="{$smarty.request.annee|default:$annee_sel}" />
+ <input type="submit" value="lister" />
+ </div>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+{if $smarty.request.action eq "edit"}
+<h1>
+ Gestion des opérations de trésorerie
+</h1>
+
+<form method="post" action="{$smarty.server.PHP_SEL}">
+ <table class="bicol">
+ <tr>
+ <th colspan="2">
+ {if $op_id}
+ Modifier une opération
+ {else}
+ Ajouter une opération
+ {/if}
+ </th>
+ </tr>
+ <tr>
+ <td>Date (DD/MM/YYYY)</td>
+ <td><input type="text" name="op_date" size="40"
+ value="{$op_date|date_format}" /></td>
+ </tr>
+ <tr>
+ <td>Description libre</td>
+ <td><input type="text" name="op_label" size="40" value="{$op_label}" /></td>
+ </tr>
+ <tr>
+ <td>Débit</td>
+ <td><input type="text" name="op_debit" size="40" value="{$op_debit}" /></td>
+ </tr>
+ <tr>
+ <td>Crédit</td>
+ <td><input type="text" name="op_credit" size="40" value="{$op_credit}" /></td>
+ </tr>
+ <tr>
+ <td class="center" colspan="2">
+ <input type="hidden" name="op_id" value="{$op_id}" />
+ <input type="hidden" name="action" value="update" />
+ <input type="hidden" name="annee" value="{$annee_sel}" />
+ <input type="hidden" name="mois" value="{$mois_sel}" />
+ <input type="submit" value="enregistrer" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+<a href="{$smarty.server.PHP_SELF}">retour</a>
+{elseif $smarty.request.action eq "update" && $op_id}
+<strong>modification de l'opération</strong>
+{elseif $smarty.request.action eq "update"}
+<strong>ajout de l'opération</strong>
+{elseif $smarty.request.action eq "del"}
+<strong>suppression de l'opération</strong>
+{/if}
+
+{if $smarty.request.action neq "edit"}
+<h1>
+ Trésorerie pour {$mon_sel}
+</h1>
+
+<table class="bicol">
+<tr>
+ <th>Solde en début de mois</th>
+</tr>
+<tr>
+ <td class="right">{$from_solde}</td>
+</tr>
+</table>
+
+<br />
+
+<table class="bicol" style="font-size: 90%">
+ <tr>
+ <th>Id</th>
+ <th>Date</th>
+ <th>Description</th>
+ <th>Débit</th>
+ <th>Crédit</th>
+ <th>Action</th>
+ </tr>
+ <tr class="impair">
+ <td> </td>
+ <td> </td>
+ <td><strong>Nouvelle opération</strong></td>
+ <td> </td>
+ <td> </td>
+ <td>
+ <form method="post" action="{$smarty.server.PHP_SELF}">
+ <div>
+ <input type="hidden" name="op_id" value="0" />
+ <input type="hidden" name="action" value="edit" />
+ <input type="hidden" name="annee" value="{$annee_sel}" />
+ <input type="hidden" name="mois" value="{$mois_sel}" />
+ <input type="submit" value="new" />
+ </div>
+ </form>
+ </td>
+ </tr>
+{iterate item=op from=$ops}
+ <tr class="{cycle values="pair,impair"}">
+ <td>{$op.id}</td>
+ <td>{$op.date|date_format}</td>
+ <td>{$op.label}</td>
+ <td class="right">{$op.debit}</td>
+ <td class="right">{$op.credit}</td>
+ <td>
+ <form method="post" action="{$smarty.server.PHP_SELF}">
+ <div>
+ <input type="hidden" name="op_id" value="{$op.id}" />
+ <input type="hidden" name="annee" value="{$annee_sel}" />
+ <input type="hidden" name="mois" value="{$mois_sel}" />
+ <input type="submit" name="action" value="edit" />
+ <input type="submit" name="action" value="del" />
+ </div>
+ </form>
+ </td>
+ </tr>
+{/iterate}
+</table>
+
+<br />
+
+<table class="bicol">
+<tr>
+ <th>Solde en fin de mois</th>
+</tr>
+<tr>
+ <td class="right">{$to_solde}</td>
+</tr>
+</table>
+
+<br />
+
+{include file=trezo/choix_date.tpl month_arr=$month_arr}
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+<h1>Trésorerie pour {$mon_sel}</h1>
+
+{perms level=admin}
+<p>[<a href="{rel}/trezo/gere_operations.php">éditer les comptes</a>]</p>
+{/perms}
+
+<table class="bicol">
+<tr>
+ <th>Solde en début de période</th>
+</tr>
+<tr>
+ <td class="right">{$from_solde}</td>
+</tr>
+</table>
+
+<br />
+
+<table class="bicol">
+ <tr>
+ <th>Date</th>
+ <th>Description</th>
+ <th>Dépenses</th>
+ <th>Recettes</th>
+ </tr>
+{iterate item=op from=$ops}
+ <tr class="{cycle values="impair,pair"}">
+ <td>{$op.date|date_format}</td>
+ <td>{$op.label}</td>
+ <td class="right">{$op.debit}</td>
+ <td class="right">{$op.credit}</td>
+ </tr>
+{/iterate}
+</table>
+
+<br />
+
+<table class="bicol">
+<tr>
+ <th>Solde en fin de mois</th>
+</tr>
+<tr>
+ <td class="right">{$to_solde}</td>
+</tr>
+</table>
+
+<br />
+
+{include file=trezo/choix_date.tpl month_arr=$month_arr}
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Trombinoscope</h1>
+
+<form enctype="multipart/form-data" action="{$smarty.server.REQUEST_URI}" method="post">
+ <table class="flags" cellspacing="0" summary="Flags">
+ <tr>
+ <td class="rouge"><input type="radio" checked="checked" /></td>
+ <td class="texte">privé</td>
+ </tr>
+ </table>
+
+ {if ($session.promo ge 1995) || ($session.promo le 2002)}
+ <p>
+ Si tu n'as pas encore fourni de photo, c'est celle du trombinoscope de l'X qui est
+ affichée par défaut dans le profil. Si elle ne te plaît pas, ou si tu n'es quand même
+ plus un tos, tu peux la remplacer par ta photo en suivant les instructions suivantes.
+ </p>
+ {/if}
+
+ <table class="bicol" cellspacing="0" cellpadding="2">
+ <tr>
+ <th>
+ Photo actuelle
+ </th>
+ <th>
+ Photo en cours de validation<sup>(*)</sup>
+ </th>
+ </tr>
+ <tr>
+ <td class="center">
+ <img src="{rel}/getphoto.php?x={$smarty.session.forlife}" width="200" alt=" [ PHOTO ] " />
+ </td>
+ <td class="center half">
+ {if $submited}
+ <img src="{rel}/getphoto.php?x={$smarty.session.forlife}&req=true" width="200" alt=" [ PHOTO ] " />
+ {else}
+ Pas d'image soumise
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="smaller">
+ * Les photos sont soumises à une validation manuelle en raison des législations relatives
+ aux droits d'auteur et à la protection des mineurs. Il faut donc attendre l'intervention
+ d'un administrateur pour que la photo soit prise en compte. Tu recevras un mail lorsque ta
+ photo aura été contrôlée.
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">
+ Actions immédiates
+ </th>
+ </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 />
+ {if $has_trombi_x}
+ <input type="submit" value="Trombino de l'X" name="trombi" /><br />
+ {/if}
+ <input type="submit" value="Image par défaut" name="suppr" />
+ </td>
+ {if $submited}
+ <td class="center">
+ Tu peux annuler ta soumission et garder ta photo actuelle : <br />
+ <input type="submit" value="Annuler ta soumission" name="cancel" />
+ </td>
+ {/if}
+ </tr>
+ <tr>
+ <th colspan="2">
+ Changement de ta photo
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <p>
+ Nous te proposons deux possibilités pour mettre à jour ta photo (30 Ko maximum). Tout dépend
+ de savoir où se trouve ta photo. Si elle est sur ton poste de travail local, c'est la première
+ solution qu'il faut choisir.
+ </p>
+ <p>
+ Si elle est sur Internet, choisis la seconde solution et nos robots iront la télécharger
+ directement où il faut :-)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Sur ton ordinateur
+ </td>
+ <td class="titre">
+ Sur Internet
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input name="userfile" type="file" size="20" maxlength="150" />
+ </td>
+ <td>
+ <input type="text" size="45" maxlength="140" name="photo"
+ value="{$smarty.request.photo|default:"http://www.multimania.com/joe/maphoto.jpg"}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="center">
+ <input type="submit" value="Envoyer !" name="upload" />
+ </td>
+ <td class="center">
+ <input type="submit" value="Envoyer !" name="upload" />
+ </td>
+ </tr>
+ </table>
+
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+
+{if !$smarty.request.xpromo || $error}
+<h1>
+ Trombinoscope promo
+</h1>
+<p>
+Cette page te permet de voir l'album photo d'une promotion
+donnée.
+</p>
+<p>
+Fais attention, si tu as une connexion à internet lente (par
+exemple si tu es sur un vieux modem), la page que tu vas télécharger
+en validant peut être longue à afficher. Pour te donner une
+idée de la taille, chaque photo est limitée à 30 ko, et
+chaque page affiche au plus {$limit} photos.
+</p>
+
+<form action="{$smarty.server.PHP_SELF}" method="get">
+ <table class="tinybicol" cellpadding="3" summary="Saisie promo" style="width: 30%; margin-left:35%">
+ <tr>
+ <th colspan="2">
+ Trombinoscope
+ </th>
+ </tr>
+ <tr>
+ <td class="titre" style="vertical-align: middle;">
+ Promotion
+ </td>
+ <td>
+ <input type="text" name="xpromo" size="4" maxlength="4" />
+ <input type="hidden" name="offset" value="0" /> <input type="submit" value="Ok" />
+ </td>
+ </tr>
+ </table>
+</form>
+
+<h1>Site web promo</h1>
+<p>Pour accéder à la liste des sites web promo, clique <a href="http://www.polytechnique.net/groupes.php?cat=promotions">ici</a>.</p>
+
+{else}
+
+<h1>
+ {if $smarty.request.xpromo eq 'all'}
+ Album photo Polytechnique.org
+ {else}
+ Album photo promotion {$smarty.request.xpromo}
+ {/if}
+</h1>
+
+{$trombi->show()|smarty:nodefaults}
+
+{/if}
+
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+BEGIN:VCARD
+VERSION:3.0
+{if $vcard.nom_usage}
+FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom_usage` (`$vcard.nom`)"|qp_enc}
+{else}
+FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom`"|qp_enc}
+{/if}
+N;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc};{$vcard.prenom|qp_enc};{$vcard.nom_usage|qp_enc};;
+EMAIL;TYPE=internet:{$vcard.bestalias}@polytechnique.org
+{if $vcard.bestalias neq $vcard.forlife}
+EMAIL;TYPE=internet:{$vcard.forlife}@polytechnique.org
+{/if}
+{if $vcard.virtualalias}
+EMAIL;TYPE=internet:{$vcard.virtualalias}
+{/if}
+{if $vcard.mobile}
+TEL;TYPE=cell;ENCODING=QUOTED-PRINTABLE:{$vcard.mobile|qp_enc}
+{/if}
+{if $vcard.adr_pro}
+{if $vcard.adr_pro[0].entreprise}
+ORG;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].entreprise|qp_enc}
+{/if}
+{if $vcard.adr_pro[0].poste}
+TITLE;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].poste|qp_enc}
+{/if}
+{if $vcard.adr_pro[0].fonction}
+ROLE;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].fonction|qp_enc}
+{/if}
+{if $vcard.adr_pro[0].tel}
+TEL;TYPE=work;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].tel|qp_enc}
+{/if}
+{if $vcard.adr_pro[0].fax}
+FAX;TYPE=work;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].fax|qp_enc}
+{/if}
+ADR;TYPE=work;ENCODING=QUOTED-PRINTABLE:{format_adr adr=$vcard.adr_pro[0]}
+{/if}
+{foreach item=adr from=$vcard.adr}
+ADR;TYPE=home{if $adr.courier},postal{/if};ENCODING=QUOTED-PRINTABLE:{format_adr adr=$adr}
+{if $adr.tel}
+TEL;TYPE=home;ENCODING=QUOTED-PRINTABLE:{$adr.tel|qp_enc}
+{/if}
+{if $adr.fax}
+FAX;TYPE=home;ENCODING=QUOTED-PRINTABLE:{$adr.fax|qp_enc}
+{/if}
+{/foreach}
+{if $vcard.web}
+URL;ENCODING=QUOTED-PRINTABLE:{$vcard.web|qp_enc}
+{/if}
+NOTE;ENCODING=QUOTED-PRINTABLE:{"(X`$vcard.promo`)\n`$vcard.libre`"|qp_enc}
+SORT-STRING;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc}
+REV:{$vcard.date|date_format:"%Y%m%dT000000Z"}
+END:VCARD
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>Redirection de page WEB</h1>
+
+<h2>Pourquoi une redirection de page WEB ?</h2>
+<p>
+ Dans la lignée du service de redirection d'emails de <strong>Polytechnique.org</strong>,
+ il est possible de faire pointer
+ les adresses <strong>http://{#globals.webredirect.domain#}/{$smarty.session.bestalias}</strong>
+ et <strong>http://{#globals.webredirect.domain#}/{$smarty.session.forlife}</strong>
+ vers la page WEB de ton choix. Pour de plus amples détails, consulte
+ <a href="{"docs/doc_carva.php"|url}">cette page</a>
+</p>
+
+<h2>Conditions d'usage</h2>
+<p>
+ L'utilisateur s'engage à ce que le contenu du site référencé soit en conformité
+ avec les lois et règlements en vigueur et d'une manière générale ne porte pas
+ atteinte aux droits des tiers
+ (<a href="{"docs/doc_carva.php#charte"|url}">plus de précisions</a>).
+</p>
+
+<h1>
+ Mise en place de la redirection
+</h1>
+<p>
+{if $carva}
+ Actuellement, les adresses
+ <a href="http://{#globals.webredirect.domain#}/{$smarty.session.bestalias}">
+ http://{#globals.webredirect.domain#}/{$smarty.session.bestalias}
+ </a> et <a href="http://{#globals.webredirect.domain#}/{$smarty.session.forlife}">
+ http://{#globals.webredirect.domain#}/{$smarty.session.forlife}
+ </a> sont redirigées sur <a href="http://{$carva}">http://{$carva}</a>
+{else}
+ La redirection n'est pas utilisée ...
+{/if}
+</p>
+
+<p>
+ Pour modifier cette redirection remplis le champ suivant et clique sur <strong>Modifier</strong>.
+{if $carva}
+ Si tu veux annuler ta redirection, clique sur <strong>Supprimer</strong>.
+{/if}
+</p>
+
+<br />
+
+<form action="{$smarty.server.REQUEST_URI}" method="post">
+ <table class="bicol" summary="[ redirection ]">
+ <tr>
+ <th colspan="2">
+ Adresse de redirection
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <strong>http://</strong> <input size="50" maxlength="255" name="url"
+ value="{$smarty.post.url|default:$carva}" />
+ </td>
+ </tr>
+ <tr>
+{if $carva}
+ <td class="center">
+ <input type="submit" value="Modifier" name="submit" />
+ </td>
+ <td class="center">
+ <input type="submit" value="Supprimer" name="submit" />
+ </td>
+{else}
+ <td colspan="2" class="center">
+ <input type="submit" value="Valider" name="submit" />
+ </td>
+{/if}
+ </tr>
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $smarty.get.del}
+
+<h1>Suppression du groupe {$nom}</h1>
+
+<form action="?del={$smarty.request.del}" method="post">
+ <div class="center">
+ <input type="submit" name="del" value="Oui, je veux supprimer ce groupe" />
+ </div>
+</form>
+
+{else}
+
+<h1>Ajouter un groupe</h1>
+
+<form action="{$smarty.server.PHP_SELF}" 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 :
+ </p>
+ <div class="center">
+ <input type="text" name="diminutif" value="{$smarty.request.diminutif}" />
+ <input type="submit" name="del" value="Ajouter" />
+ </div>
+</form>
+
+
+<h1>Administration des groupes X.net</h1>
+
+<table cellspacing="0" cellpadding="0" class='large'>
+ {foreach from=$assos item=a key=i name=all}
+ {if $i is even}<tr>{/if}
+ <td><a href='?del={$a.diminutif}'><img src='{rel}/images/del.png' alt='delete' /></a></td>
+ <td><a href='{rel}/{$a.diminutif}/edit.php'>{$a.nom}</a></td>
+ {if $i is odd || $smarty.foreach.all.last}</tr>{/if}
+ {/foreach}
+</table>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<div id="content">
+ <p class="descr">
+ Polytechnique.net présente les activités associatives des Polytechniciens, élèves et anciens.
+ Ce portail a été conçu par l'équipe qui anime le site <a href="https://www.polytechnique.org/">Polytechnique.org</a>.
+ Il a vocation à favoriser la communication entre les groupes X, et leur promotion à
+ l'extérieur de la communauté polytechnicienne.
+ </p>
+ <p class="descr">
+ <a href="https://www.polytechnique.org/apropos.php">L'équipe</a> tient à remercier
+ <strong>David Bachelart (X99) et Sylvain Joyeux (X2000)</strong> qui ont participé à l'élaboration de
+ la charte graphique du site, ainsi que <strong>Laurent El Kaim (X1984)</strong>, qui a protégé le
+ domaine Polytechnique.net durant plusieurs années, avant d'en faire don début 2004 à
+ l'association.
+ </p>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<div id="content">
+ <h1>Article 12</h1>
+
+ <p class="descr">
+ L'association reconnaît comme groupes affiliés :
+ </p>
+ <ul class="descr">
+ <li>
+ le groupe des Caissiers et Délégués de promotion, qui a un rôle consultatif général sur
+ toutes les questions intéressant les diverses promotions et notamment sur celles concernant
+ l'aide et le secours ;
+ </li>
+ <li>
+ sous réserve d'un agrément du conseil d'administration ratifié par l'assemblée générale, les
+ groupes d'anciens élèves constitués par région géographique soit en France soit hors de
+ France et ceux constitués par affinités culturelles, techniques ou professionnelles. Les
+ groupes ont pour but d'aider l'action de l'association. Ils jouissent de la liberté
+ nécessaire à leur activité et à leur développement, mais s'interdisent formellement toute
+ discussion politique ou confessionnelle. Leurs règles de fonctionnement doivent être
+ formulées par écrit et recevoir l'approbation du conseil d'administration.
+ </li>
+ </ul>
+ <p class="descr">
+ Si des difficultés quelconques s'élèvent entre plusieurs groupes elles
+ sont soumises au conseil d'administration qui statue, sauf recours à
+ l'assemblée générale qui se prononce en dernier ressort.
+ </p>
+ <p class="descr">
+ <a href="services.php">Revenir à la page décrivant les services...</a>
+ </p>
+</div>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<div id="content">
+ <h1>Extrait du réglement intérieur de l'AX - Titre V : GROUPES AFFILIÉS</h1>
+ <p class="descr">
+ (en référence à l'article 12 des Statuts)
+ </p>
+
+ <p class="descr">
+ Les demandes d'agrément des groupes par le conseil, sous réserve de la ratification de l'assemblée
+ générale, doivent être signées par au moins vingt membres de l'association à jour de leur
+ cotisation. Les groupes peuvent comprendre des personnes qui ne sont pas membres de l'association,
+ anciens élèves ou non, les membres de l'association devant y être majoritaires et être à jour de
+ leur cotisation. Les groupes dont l'effectif des membres de l'association tombe en-dessous de dix
+ pendant plus d'une année sont considérés par l'association comme ayant cessé leur activité.
+ </p>
+ <p class="descr">
+ Les bureaux des groupes font connaître à l'association aussi longtemps à l'avance que possible les
+ dates et objets de leurs réunions, pour en permettre l'annonce dans la revue de l'association et
+ faciliter ainsi aux membres l'assistance à ces réunions. Des comptes rendus sommaires des réunions
+ des groupes peuvent être publiés dans la revue. Les groupes rendent compte succinctement de leur
+ activité par écrit chaque année à l'association; le compte rendu peut être publié dans la revue.
+ </p>
+ <p class="descr">
+ La liste des groupes affiliés est publiée dans l'annuaire aux pages de renseignements concernant
+ l'AX. Les groupes qui cessent leur activité ou qui n'en rendent plus compte à l'association sont
+ retirés de cette liste. Ce retrait vaut retrait de l'agrément.
+ </p>
+ <p class="descr">
+ <a href="services.php">Revenir à la page décrivant les services...</a>
+ </p>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<div id="content">
+ <h1>
+ Statuts Types de Groupe-X<br />
+ Document rédigé par l'AX le lundi 15 mai 2000
+ </h1>
+
+ <p class="descr">
+ Des informations relatives à la <a href="#creation">création de groupes X</a> sont disponibles.
+ </p>
+
+ <h2>
+ Article 1 - Désignation
+ </h2>
+ <p class="descr">
+ Il est formé au sein de l'AX un groupe "X- ________", sous réserve de l'agrément
+ du Conseil de l'AX ratifié par l'Assemblée générale.
+ </p>
+ <h2>
+ Article 2 - Objet
+ </h2>
+ <p class="descr">
+ L'objet du Groupe est de __________.
+ </p>
+ <h2>
+ Article 3 - Siège social
+ </h2>
+ <p class="descr">
+ Le siège du groupe est fixé à _________. Il pourra être transféré en
+ tout autre lieu en France par simple décision du Bureau.
+ </p>
+ <h2>
+ Article 4 - Membres
+ </h2>
+ <p class="descr">
+ Tout ancien élève de l'École polytechnique peut adhérer au Groupe, les membres de l'AX à
+ jour de leur cotisation devant y être majoritaires. Pour adhérer, il doit faire une demande
+ au secrétariat du Groupe et régler sa cotisation annuelle s'il y en a une. Le Président du
+ Groupe doit être membre de l'AX à jour de sa cotisation.
+ </p>
+ <p class="descr">
+ Le Groupe peut admettre des membres associés non X. Les X doivent toujours être en majorité
+ et l'effectif des membres de l'AX à jour de leur cotisation doit être au moins de dix. Le
+ Bureau décide si les membres associés payent ou non la cotisation instituée.
+ </p>
+ <h2>
+ Article 5 - Modalités d'action
+ </h2>
+ <p class="descr">
+ Le Groupe organisera des réunions, débats, conférences auxquels pourront participer des
+ personnalités extérieures. Il s'interdit d'aborder tout sujet de nature politique ou
+ confessionnelle.
+ </p>
+ <p class="descr">
+ Il s'interdit toute activité à caractère commercial ou lucratif.
+ </p>
+ <p class="descr">
+ Il pourra diffuser auprès de ses membres et de l'AX les comptes rendus de ses réunions
+ et des conférences qu'il aura organisées ainsi que les résultats de ses réflexions et
+ de ses travaux. Un résumé pourra en être publié dans La Jaune et la Rouge.
+ </p>
+ <p class="descr">
+ Il doit avoir reçu l'autorisation du Conseil de l'AX préalablement à toute diffusion
+ ou intervention à l'extérieur de l'AX.
+ </p>
+ <p class="descr">
+ Le Groupe n'est pas habilité à représenter l'AX ou à prendre position en son nom.
+ </p>
+ <h2>
+ Article 6 - Gestion
+ </h2>
+ <p class="descr">
+ Le Groupe est dirigé par un Bureau comprenant un Président et au moins un Vice-Président,
+ un Trésorier et un Secrétaire. Les membres du Bureau sont élus par l'Assemblée Générale
+ pour n années<sup><a href="#c1">[1]</a></sup>, avec renouvellement par 1/n.
+ Le Bureau décide d'instituer ou non une cotisation annuelle et fixe son montant. Les
+ membres du Bureau sont rééligibles, le Président ne l'étant qu'une seule fois.
+ </p>
+ <p class="descr">
+ En aucun cas le Groupe ne pourra engager la responsabilité financière de l'AX.
+ </p>
+ <h2>
+ Article 7 - Assemblée Générale
+ </h2>
+ <p class="descr">
+ L'Assemblée Générale est constituée par tous les membres, à jour de leur cotisation
+ s'il y en a une. Elle est présidée par le Président ou, à défaut, par un Vice-Président.
+ L'ordre du jour est fixé par le Bureau.
+ </p>
+ <h2>
+ Article 8 - Modification des statuts - dissolution
+ </h2>
+ <p class="descr">
+ Les statuts pourront être modifiés en Assemblée générale par vote à la majorité des trois
+ quarts des membres du Groupe, sur convocation par le Président avec un préavis d'un mois.
+ Si le quorum n'est pas atteint, une nouvelle Assemblée Générale se réunit un mois plus tard
+ et statue à la majorité des trois quarts des membres présents.
+ </p>
+ <p class="descr">
+ Si le nombre des membres de l'AX à jour de leur cotisation tombe en-dessous de 10, la
+ dissolution devra être prononcée.
+ </p>
+ <hr />
+ <p class="descr">
+ <sup><a id="c1"></a>[1]</sup>: n et 1/n étant compatibles avec le nombre de membres du Bureau.
+ </p>
+ <h2>
+ <a id="creation"></a>Création d'un Groupe X
+ </h2>
+ <p class="descr">
+ L'article 12 des statuts de l'AX précise :
+ </p>
+ <blockquote>
+ <p class="descr">
+ « les groupes (affiliés) ont pour but d'aider l'action de l'AX. Ils
+ jouissent de la liberté nécessaire à leur activité et à leur développement (...).
+ Leurs règles de fonctionnement doivent être formulées par écrit et recevoir
+ l'approbation du Conseil d'administration ».
+ </p>
+ </blockquote>
+ <p class="descr">
+ Les principales règles à suivre sont les suivantes :
+ </p>
+ <ul>
+ <li>
+ <p class="descr">
+ conformément au Règlement intérieur de l'AX, pour créer un Groupe, il faut réunir
+ au moins vingt signatures d'X décidés à adhérer, membres de l'AX et à jour de leur
+ cotisation à l'AX. Le Groupe peut admettre des membres extérieurs à l'AX, anciens
+ élèves ou non. Mais les membres de l'AX à jour de leur cotisation doivent être en
+ majorité, et toujours au moins dix. S'ils tombent en dessous de ce nombre, le Groupe
+ est dissous.
+ </p>
+ </li>
+ <li>
+ <p class="descr">
+ il faut des règles de fonctionnement, ou statuts, qui précisent notamment le mode
+ d'élection et la durée des membres du Bureau et du Président et s'il y a (ou non)
+ une cotisation.
+ </p>
+ </li>
+ <li>
+ <p class="descr">
+ le siège du Groupe est généralement chez le Président ou le Secrétaire général.
+ Il peut être rue Descartes mais les adresses courrier, téléphone, fax et mél doivent
+ être ailleurs.
+ </p>
+ </li>
+ <li>
+ <p class="descr">
+ le Groupe n'est pas habilité à représenter l'AX ou à prendre position en son nom.
+ </p>
+ </li>
+ <li>
+ <p class="descr">
+ il s'interdit toute discussion et manifestation de nature politique ou
+ confessionnelle.
+ </p>
+ </li>
+ <li>
+ <p class="descr">
+ il s'interdit toute activité à caractère commercial ou lucratif.
+ </p>
+ </li>
+ </ul>
+
+ <p class="descr">
+ Moyennant ces quelques conditions, l'agrément est donné en principe sans difficulté par
+ le Conseil et ratifié par l'Assemblée Générale. Dès lors, le Groupe figure dans les pages
+ bleues de l'annuaire avec les noms et adresses du Président et du Secrétaire général ou du
+ Trésorier, tant qu'ils sont tenus à jour.
+ </p>
+ <p class="descr">
+ Le Président du Groupe doit être membre de l'AX à jour de sa cotisation et il est apprécié
+ par l'AX que les membres du Bureau et la grande majorité des membres d'un Groupe X soient
+ également membres de l'AX à jour de leur cotisation à l'AX.
+ </p>
+ <p class="descr">
+ Les Groupes X ne reçoivent pas d'aide ni de subsides de l'AX, mais La Jaune et la Rouge
+ publie l'annonce de leur création et éventuellement les comptes rendus succincts de leurs
+ réunions.
+ </p>
+ <p class="descr">
+ Il est bon de faire le point avec l'AX une fois par an de l'activité du Groupe et de lui
+ communiquer une liste de membres à jour, et surtout ne pas hésiter à dissoudre si le
+ Groupe ne présente plus d'intérêt !
+ </p>
+ <p class="descr">
+ Attention, si le Groupe a l'intention de <em>rayonner</em> ou d'agir à l'extérieur (par
+ des interventions auprès des services publics, ou dans la presse par exemple) il faut être
+ extrêmement prudent : le groupe n'a le droit de le faire qu'après avoir reçu l'autorisation
+ du Conseil de l'AX.
+ </p>
+ <p class="descr">
+ Le futur Groupe peut se réunir officieusement, sans être encore Groupe-X, avant même d'avoir
+ l'agrément de l'AX, mais dans ce cas il ne paraît pas encore dans l'annuaire (pages bleues)
+ ni dans La Jaune et la Rouge. Si après son agrément, il désire avoir une personnalité morale,
+ ce qui est généralement souhaitable, il remplit les formalités nécessaires pour être une
+ association loi 1901.
+ </p>
+ <p class="descr">
+ <a href="services.php">Revenir à la page décrivant les services...</a>
+ </p>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1> déconnexion de Polytechnique.net </h1>
+
+<p class="descr">
+Au revoir !
+<br />
+Tu as bien été déconnecté du site Polytechnique.net.
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<p>[<a href='listes.php'>retour à la page des listes</a>]</p>
+
+<h1>Membres de {$smarty.request.liste}</h1>
+
+<table class='tiny'>
+ <tr>
+ <td class='titre'>Membres</td>
+ <td>
+ {if $mem->total()}
+ {iterate from=$mem item=m}
+ {$m.redirect}
+ <a href='?liste={$smarty.request.liste|urlencode}&del_member={$m.redirect|urlencode}'>
+ <img src='{rel}/images/del.png' alt='retirer membre' title='retirer membre' />
+ </a>
+ <br />
+ {/iterate}
+ {else}
+ <em>aucun membres ...</em>
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Ajouter</strong></td>
+ <td>
+ <form method="post" action="{$smarty.server.REQUEST_URI}">
+ <div>
+ <input type='text' name='add_member' />
+
+ <input type='submit' value='ajouter' />
+ </div>
+ </form>
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Création d'un alias</h1>
+<p class='descr'>
+Les alias sont concus pour répondre aux problèmes suivants :
+</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».
+ </li>
+ <li>
+ 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)
+ </li>
+ <li>
+ fédérer plusieurs listes/alias sous un même nom (ce que ne peuvent faire les listes de diffusion).
+ </li>
+</ul>
+
+<p class='descr'>
+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="listes-create.php">une liste de diffusion</a>.
+</p>
+<form action='{$smarty.server.PHP_SELF}' method='post'>
+ <table class='large'>
+ <tr>
+ <th colspan='2'>Caractéristiques de l'alias</th>
+ </tr>
+ <tr>
+ <td><strong>Addresse souhaitée :</strong></td>
+ <td>
+ <input type='text' name='liste' value='{$smarty.post.liste}' />@{$asso.mail_domain}
+ </td>
+ </tr>
+ </table>
+ <p class="center">
+ <input name='submit' type='submit' value="Créer !" />
+ </p>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>{$asso.nom} : Annuaire du groupe </h1>
+
+<p class="descr">
+Le groupe {$asso.nom} compte {$nb_tot} membres.
+</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>
+
+{if $admin}
+<p class="descr">
+Fonctionnalités visibles uniquement par les administrateurs :
+</p>
+<ul class="descr">
+ <li><a href="membres-edit.php?new=x">Ajouter un membre X</a></li>
+ <li><a href="membres-edit.php?new=ext">Ajouter un membre extérieur</a></li>
+</ul>
+{/if}
+
+<p class="center">
+[<a href="{$smarty.server.PHP_SELF}" {if !$smarty.request.initiale}class="erreur"{/if}>tout</a>]
+{foreach from=$alphabet item=c}
+[<a href="?initiale={$c}"{if $smarty.request.initiale eq $c} class="erreur"{/if}>{$c}</a>]
+{/foreach}
+</p>
+
+<table summary="membres du groupe" class="{if $admin}large{else}tiny{/if}">
+ <tr>
+ <th>Prénom NOM</th>
+ <th>Promo</th>
+ <th>Infos</th>
+ {if $admin}
+ <th>Éditer</th>
+ <th>suppr.</th>
+ {/if}
+ </tr>
+ {iterate from=$ann item=m}
+ <tr {if $m.admin}style="background:#d0c198;"{/if}>
+ <td>{if $m.femme}•{/if}{$m.prenom} {$m.nom}</td>
+ <td>{$m.promo}</td>
+ <td>
+ {if $m.x}
+ <a href="https://www.polytechnique.org/fiche.php?user={$m.email}"><img src="{rel}/images/loupe.gif" alt="[fiche]" /></a>
+ <a href="https://www.polytechnique.org/vcard.php/{$m.email}.vcf/?x={$m.email}"><img src="{rel}/images/vcard.png" alt="[vcard]" /></a>
+ <a href="mailto:{$m.email}@polytechnique.org"><img src="{rel}/images/mail.png" alt="mail" /></a>
+ {else}
+ <a href="mailto:{$m.email}"><img src="{rel}/images/mail.png" alt="mail" /></a>
+ {/if}
+ </td>
+ {if $admin}
+ <td><a href="membres-edit.php?edit={$m.email}"><img src="{rel}/images/profil.png" alt="Edition du profil" /></a></td>
+ <td><a href="membres-edit.php?del={$m.email}"><img src="{rel}/images/del.png" alt="Suppression de {$m.prenom} {$m.nom}" /></a></td>
+ {/if}
+ </tr>
+ {/iterate}
+</table>
+
+<p class="descr">
+{foreach from=$links item=ofs key=txt}
+<a href="?offset={$ofs}&initiale={$smarty.request.initiale}"{if $smarty.request.offset eq $ofs} class="erreur"{/if}>{$txt}</a>
+{/foreach}
+</p>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $asso.site}
+<a href="{$asso.site}"><img src='getlogo.php' alt="LOGO" style="float: right;" /></a>
+{else}
+<img src='getlogo.php' alt="LOGO" style="float: right;" />
+{/if}
+
+<h1>{$asso.nom} : Accueil</h1>
+
+<table cellpadding="0" cellspacing="0" class='tiny'>
+ {if $asso.site}
+ <tr>
+ <td class="titre">
+ Site Web:
+ </td>
+ <td><a href="{$asso.site}">{$asso.site}</a></td>
+ </tr>
+ {/if}
+
+ {if $asso.resp || $asso.mail}
+ <tr>
+ <td class="titre">
+ Contact:
+ </td>
+ <td>
+ {if $asso.mail}
+ {mailto address=$asso.mail text=$asso.resp|default:"par mail" encode=javascript}
+ {else}
+ {$asso.resp}
+ {/if}
+ </td>
+ </tr>
+ {/if}
+
+ {if $asso.forum}
+ <tr>
+ <td class="titre">
+ Forum:
+ </td>
+ <td>
+ <a href="https://www.polytechnique.org/banana/thread.php?group={$asso.forum}">par le web</a>
+ ou <a href="news://ssl.polytechnique.org/{$asso.forum}">par nntp</a>
+ </td>
+ </tr>
+ {/if}
+
+ {if !$is_member && $logged && $asso.pub eq 'public'}
+ <tr>
+ <td class="titre">
+ M'inscrire :
+ </td>
+ <td>
+ <a href="{$asso.sub_url|default:"inscrire.php"}">m'inscrire</a>
+ </td>
+ </tr>
+ {/if}
+
+ {if $asso.ax}
+ <tr>
+ <td class="titre center" colspan="2">
+ groupe agréé par l'AX
+ </td>
+ </tr>
+ {/if}
+</table>
+
+<br />
+
+<div>
+ {$asso.descr|smarty:nodefaults}
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<img src='getlogo.php' alt="LOGO" style="float: right;" />
+
+<h1>{$asso.nom} : Éditer l'accueil</h1>
+
+<form method="post" action="{$smarty.server.PHP_SELF}" enctype="multipart/form-data">
+ {if $super}
+ <table cellpadding="0" cellspacing="0" class='tiny'>
+ <tr>
+ <td class="titre">
+ Nom:
+ </td>
+ <td>
+ <input type="text" size="40" value="{$asso.nom}" name="nom" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Diminutif:
+ </td>
+ <td>
+ <input type="text" size="40" value="{$asso.diminutif}" name="diminutif" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Domaine DNS:
+ </td>
+ <td>
+ <input type="text" size="40" value="{$asso.mail_domain}" name="mail_domain" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Catégorie :
+ </td>
+ <td>
+ <select name="cat">
+ <option value="groupesx" {if $asso.cat eq GroupesX}selected="selected"{/if}>Groupes X</option>
+ <option value="binets" {if $asso.cat eq Binets}selected="selected"{/if}>Binets</option>
+ <option value="promotions" {if $asso.cat eq Promotions}selected="selected"{/if}>Promotions</option>
+ <option value="institutions" {if $asso.cat eq Institutions}selected="selected"{/if}>Institutions</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Domaine:
+ </td>
+ <td>
+ <select name="dom">
+ <option value=""></option>
+ {iterate from=$dom item=d}
+ <option value="{$d.id}" {if $d.id eq $asso.dom}selected="selected"{/if}>{$d.nom} [{$d.cat}]</option>
+ {/iterate}
+ </select>
+ </td>
+ </tr>
+ </table>
+ <p></p>
+ {/if}
+ <table cellpadding="0" cellspacing="0" class='tiny'>
+ <tr>
+ <td class="titre">
+ Logo:
+ </td>
+ <td>
+ <input type="file" name="logo" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre">
+ Site Web:
+ </td>
+ <td>
+ <input type="text" size="40" value="{$asso.site}" name="site" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre">
+ Contact:
+ </td>
+ <td>
+ <input type="text" size="40" name="resp" value="{$asso.resp}" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre">
+ Adresse mail:
+ </td>
+ <td>
+ <input type="text" size="40" name="mail" value="{$asso.mail}" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre">
+ Forum:
+ </td>
+ <td>
+ <input type="text" size="40" name="forum" value="{$asso.forum}" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre">
+ Lien pour l'inscription:<br />
+ <em>laisser vide par défaut</em>
+ </td>
+ <td>
+ <input type="text" size="40" name="sub_url" value="{$asso.sub_url}" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre center" colspan="2">
+ <input type="checkbox" value="1" name="ax" {if $asso.ax}checked="checked"{/if} />
+ groupe agréé par l'AX
+ </td>
+ </tr>
+
+ <tr>
+ <td class="titre center" colspan="2">
+ <input type="checkbox" value="1" name="pub" {if $asso.pub eq 'private'}checked="checked"{/if} />
+ liste des membres privée
+ </td>
+ </table>
+
+ <div class="center">
+ <br />
+ <textarea name="descr" cols="70" rows="15">{$asso.descr}</textarea>
+ <input type="submit" name="submit" value="Enregistrer" />
+ </div>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>{$asso.nom} :
+{if ($smarty.request.add || $smarty.request.mod) && $admin}
+<a href='{$smarty.server.PHP_SELF}'>Evénements</a>
+{else}
+Evénements
+{/if}
+</h1>
+
+{if !$logged}
+ <p class="descr">
+ Aucune manifestation publique n'a été saisie par ce groupe pour l'instant...
+ </p>
+{elseif $get_form}
+ {include file='xnet/groupe/form_evenement.tpl'}
+{else}
+
+ {if $admin}
+ <p class="center">
+ [<a href="{$marty.server.PHP_SELF}?add=1">Annoncer un nouvel événement</a>]
+ </p>
+ {/if}
+
+ {if $nb_evt eq 0}
+
+ <p class="descr">
+ Aucun événement n'a été référencé par les animateurs du groupe.
+ </p>
+
+ {else}
+
+ {iterate from=$evenements item=e}
+ <table class="tiny" cellspacing="0" cellpadding="0">
+ <tr>
+ <th colspan="2">
+ {$e.intitule}
+ {if $admin || $e.show_participants}
+ <a href="evt-admin.php?eid={$e.eid}"><img src="{rel}/images/loupe.gif" title="Liste des participants" alt="Liste des participants" /></a>
+ {/if}
+ {if $admin}
+ <a href="{$smarty.session.PHP_SELF}?mod=1&eid={$e.eid}"><img src="{rel}/images/profil.png" title="Edition de l'événement" alt="Edition de l'événement" /></a>
+ <a href="{$smarty.session.PHP_SELF}?sup=1&eid={$e.eid}"><img src="{rel}/images/del.png" alt="Suppression de {$e.intitule}" title="Suppression de {$e.intitule}" /></a>
+ {/if}
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">date :</td>
+ <td>
+ {if $e.fin}
+ du {$e.debut|date_format:"%d %B %Y à %H:%M"}<br />
+ au {$e.fin|date_format:"%d %B %Y à %H:%M"}
+ {else}
+ le {$e.debut|date_format:"%d %B %Y à %H:%M"}
+ {/if}
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">annonceur :</td>
+ <td>
+ <a href='https://polytechnique.org/fiche.php?user={$e.alias}' class='popup2'>{$e.prenom} {$e.nom} ({$e.promo})</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ <a href='evt-detail.php?eid={$e.eid}'>Détails...</a>
+ </td>
+ <td>
+ {if $e.inscrit}
+ <small>tu es inscrit à cet événément !</small>
+ {else}
+ <small>tu n'es pas encore inscrit à cet événément !</small>
+ {/if}
+ </td>
+ </tr>
+ </table>
+ <br />
+ {/iterate}
+
+ {/if}
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>{$asso.nom} : <a href='evenements.php'>Evénements</a> </h1>
+
+<p>
+L'événement {$evt.intitule} {if $evt.titre} - {$evt.titre}{/if} comptera {$evt.nb_tot} personne{if $evt.nb_tot > 1}s{/if}.
+</p>
+
+{if $evt.participant_list}
+<p class="center">
+[<a href="mailto:{$evt.short_name}-participants@evts.polytechnique.org">envoyer un mail à ceux qui viennent</a>] - [<a href="mailto:{$evt.short_name}-absents@evts.polytechnique.org">envoyer un mail aux membres non inscrits</a>]
+</p>
+{/if}
+
+{if $moments}
+<p class="center">
+[<a href="{$smarty.server.PHP_SELF}?eid={$smarty.request.eid}"{if !$smarty.request.item_id}class="erreur"{/if}>tout</a>]
+{foreach from=$moments item=m}
+[<a href="{$smarty.server.PHP_SELF}?eid={$m.eid}&item_id={$m.item_id}" {if $smarty.request.item_id eq $m.item_id}class="erreur"{/if}>{$m.titre}</a>]
+{/foreach}
+</p>
+{/if}
+
+<p class="center">
+[<a href="{$url_page}" {if !$smarty.request.initiale}class="erreur"{/if}>tout</a>]
+{foreach from=$alphabet item=c}
+[<a href="{$url_page}&initiale={$c}"{if $smarty.request.initiale eq $c} class="erreur"{/if}>{$c}</a>]
+{/foreach}
+</p>
+
+{if $admin}{literal}
+<script type="text/javascript">
+function remplitAuto(mail) {
+ document.getElementById('inscription').mail.value=mail;
+ document.getElementById('montant').mail.value=mail;
+ return false;
+}
+</script>
+{/literal}
+
+{if $oublis}
+<p class="erreur">
+Ils ont payé mais ont oublié de s'inscrire :
+</p>
+
+<table summary="payé mais non inscrits" class="tiny">
+ <tr>
+ <th>Prénom NOM</th>
+ <th>Promo</th>
+ <th>Infos</th>
+ <th>Montant</th>
+ </tr>
+ {iterate from=$oubliinscription item=m}
+ <tr style="background:#d0c198;">
+ <td>
+ <a href="" {if $admin}onclick="return remplitAuto('{$m.email}')"{/if}>
+ {$m.prenom} {$m.nom}
+ </a>
+ </td>
+ <td>{$m.promo}</td>
+ <td>
+ <a href="https://www.polytechnique.org/fiche.php?user={$m.email}"><img src="{rel}/images/loupe.gif" alt="[fiche]" /></a>
+ <a href="https://www.polytechnique.org/vcard.php/{$m.email}.vcf/?x={$m.email}"><img src="{rel}/images/vcard.png" alt="[vcard]" /></a>
+ <a href="mailto:{$m.email}@polytechnique.org"><img src="{rel}/images/mail.png" alt="mail" /></a>
+ </td>
+ <td>{$m.montant}</td>
+ </tr>
+ {/iterate}
+</table>
+
+<hr />
+{/if}
+
+{/if}
+
+<table summary="participants a l'evenement" class="{if $tout}large{else}tiny{/if}">
+ <tr>
+ <th>Prénom NOM</th>
+ <th>Promo</th>
+ <th>Info</th>
+ {if $tout}
+ {foreach from=$moments item=m}
+ <th>{$m.titre}</th>
+ {/foreach}
+ {if $admin && $money}
+ <th>Montant</th>
+ <th>Payé</th>
+ {/if}
+ {else}
+ <th>Nombre</th>
+ {/if}
+ </tr>
+ {foreach from=$participants item=m}
+ <tr style="background:#d0c198;">
+ <td>
+ <a href="" {if $admin}onclick="return remplitAuto('{$m.email}')"{/if}>
+ {if $m.femme}•{/if}{$m.prenom} {$m.nom}
+ </a>
+ </td>
+ <td>{$m.promo}</td>
+ <td>
+ {if $m.x}
+ <a href="https://www.polytechnique.org/fiche.php?user={$m.email}"><img src="{rel}/images/loupe.gif" alt="[fiche]" /></a>
+ <a href="https://www.polytechnique.org/vcard.php/{$m.email}.vcf/?x={$m.email}"><img src="{rel}/images/vcard.png" alt="[vcard]" /></a>
+ <a href="mailto:{$m.email}@polytechnique.org"><img src="{rel}/images/mail.png" alt="mail" /></a>
+ {else}
+ <a href="mailto:{$m.email}"><img src="{rel}/images/mail.png" alt="mail"></a>
+ {/if}
+ </td>
+ {if $tout}
+ {foreach from=$moments item=i}
+ <td>{$m[$i.item_id]}</td>
+ {/foreach}
+ {if $admin && $money}
+ <td {if $m.montant > $m.paid}class="erreur"{/if}>{$m.montant}€</td>
+ <td>{$m.paid}€</td>
+ {/if}
+ {else}
+ <td>
+ {$m.nb}
+ </td>
+ {/if}
+ </tr>
+ {/foreach}
+</table>
+
+<p class="descr">
+{foreach from=$links item=ofs key=txt}
+<a href="{$url_page}&offset={$ofs}&initiale={$smarty.request.initiale}"{if $smarty.request.offset eq $ofs} class="erreur"{/if}>{$txt}</a>
+{/foreach}
+</p>
+
+{if $admin}
+
+<p class="descr">
+[<a href="evt-csv.php/{$evt.intitule}{if $evt.titre}.{$evt.titre}{/if}.csv?eid={$smarty.request.eid}&item_id={$smarty.request.item_id}">Télécharger le fichier Excel</a>]
+</p>
+
+<hr />
+
+<p class="descr">
+En tant qu'administrateur, tu peux fixer la venue (accompagnée ou pas) d'un des membres du groupe.
+Donne ici son mail (complet pour les extérieurs, sans @polytechnique.org pour les X), ainsi que le
+nombre de participants.
+</p>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="inscription">
+ <p class="descr">
+ <input type="hidden" name="eid" value="{$smarty.request.eid}" />
+ <input type="hidden" name="adm" value="nbs" />
+
+ Mail: <input name="mail" size="20" />
+ {if $smarty.request.item_id}
+ <input type="hidden" name="item_id" value="{$smarty.request.item_id}" />
+ {$evt.titre}: <input name="nb{$smarty.request.item_id}" size="1" value="1" />
+ {else}
+ {foreach from=$moments item=m}
+ {$m.titre}: <input name="nb{$m.item_id}" size="1" value="1"/>
+ {/foreach}
+ {/if}
+ <input type="submit" />
+ </p>
+</form>
+
+<hr />
+
+<p class="descr">
+En tant qu'administrateur, tu peux entrer un paiement reçu par une autre source que le télépaiement
+du site X.org. Ce montant s'ajoutera aux montants déjà entrés. Si tu as fait une erreur, tu peux
+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
+</p>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="montant">
+ <p class="descr">
+ <input type="hidden" name="eid" value="{$smarty.request.eid}" />
+ <input type="hidden" name="adm" value="prix" />
+ Mail: <input name="mail" size="20" />
+ montant: <input name="montant" size="3" value="0,00" /> €
+ <input type="submit" />
+ </p>
+</form>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software, you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation, either version 2 of the License; or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY, without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program, if not; write to the Free Software *}
+{* Foundation, Inc.; *}
+{* 59 Temple Place, Suite 330; Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+Nom;Prénom;Promotion{if $tout}{foreach from=$moments item=m};{$m.titre}{/foreach}{if $admin && $money};À payer;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}
+
+{/foreach}
+;
+{/if}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $smarty.request.ins && !$no_ins}
+ {if $participate}
+ Tu es maintenant inscrit à l'évenement.
+ {if $evt.paiement_id} Suis le lien en bas si tu souhaites procéder à un paiement par le web.{/if}
+ {else}
+ Tu es maintenant désinscrit de cet évenement.
+ {/if}
+{/if}
+
+<h1>{$asso.nom} : <a href="{$smarty.server.PHP_SELF}">Evénements</a></h1>
+
+<h2>{$evt.intitule}</h2>
+
+<form method='post' action='{$smarty.server.REQUEST_URI}'>
+ <table class="tiny" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="titre">Annoncé par</td>
+ <td>{$evt.prenom} {$evt.nom} (X{$evt.promo})</td>
+ </tr>
+ <tr>
+ <td class="titre">Description</td>
+ <td>{$evt.descriptif}</td>
+ </tr>
+ <tr>
+ <td class="titre">Date</td>
+ <td>
+ {if $evt.fin}
+ du {$evt.deb|date_format:"%d %B %Y à %H:%M"}<br />
+ au {$evt.fin|date_format:"%d %B %Y à %H:%M"}
+ {else}
+ le {$evt.deb|date_format:"%d %B %Y à %H:%M"}
+ {/if}
+ </td>
+ </tr>
+ </table>
+
+ <div><br /><br /></div>
+
+ {assign var="montant" value=0}
+
+ <table class="bicol" cellpadding="0" cellspacing="0">
+ {iterate from=$moments item=m}
+ {assign var="montant" value=$montant+$m.montant*$m.nb}
+ {if $m.titre || $m.montant}
+ <tr>
+ <th>
+ <input type="hidden" name="item_id{counter}" value="{$m.item_id}" />
+ <input type="hidden" name="eid" value="{$evt.eid}" />
+ <strong>{$m.titre} - {if $m.montant > 0}{$m.montant}€{else}gratuit{/if}</strong>
+ </th>
+ </tr>
+ {/if}
+ <tr>
+ <td>{$m.details}</td>
+ </tr>
+ <tr>
+ <td>
+ <input name='item_{$m.item_id}' value='0' type='radio' {if $m.nb eq 0}checked="checked"{/if} /> je ne participe pas<br />
+ <input name='item_{$m.item_id}' value='1' type='radio' {if $m.nb eq 1}checked="checked"{/if} /> je participe, seul<br />
+ <input name='item_{$m.item_id}' value='+' type='radio' {if $m.nb > 1}checked{/if} /> je viens, et serai accompagné de
+ <input type='text' name='itemnb_{$m.item_id}' value='{if $m.nb < 2}0{else}{$m.nb-1}{/if}' size="2" maxlength="2" /> personnes
+ </td>
+ </tr>
+ {/iterate}
+ </table>
+
+ {if $montant > 0 || $paid > 0}
+ <p {if $montant > $paid}class="erreur"{/if}>
+ Pour cet événement tu dois payer {$montant|replace:'.':','} € {if $paid > 0}, et tu as déjà payé {$paid|replace:'.':','} €{/if}
+ {if $evt.paiement_id} [<a href="https://www.polytechnique.org/paiement/?ref={$evt.paiement_id}">Effectuer le paiement</a>]{/if}
+ </p>
+ {/if}
+ <div class="center">
+ <input type='submit' name='ins' value='valider ma participation' />
+ <input type='reset' value='annuler' />
+ </div>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<p class="descr">
+ Un événement peut être une réunion, un séminaire, une conférence, un voyage promo,
+ etc... Pour en organiser un et bénéficier des outils de suivi d'inscription et de
+ paiement offerts, il te faut remplir les quelques champs du formulaire ci-dessous.
+</p>
+<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
+ 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
+ restaurant.
+</p>
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+ <hr />
+ <table>
+ <tr>
+ <td>Intitulé de l'événement :</td>
+ <td>
+ <input type="hidden" name="eid" value="{$evt.eid}" />
+ <input type="text" name="intitule" value="{$evt.intitule}" size="45" maxlength="100" />
+ </td>
+ </tr>
+ <tr>
+ <td>Evénement en raccourci (pour les mailings listes) :</td>
+ <td><input type="text" name="short_name" value="{$evt.short_name}" size="20"/></td>
+ </tr>
+ <tr>
+ <td>Descriptif :</td>
+ <td><textarea name="descriptif" cols="45" rows="6">{$evt.descriptif}</textarea></td>
+ </tr>
+ <tr>
+ <td>Date de début :</td>
+ <td>
+ le
+ {html_select_date prefix='deb_' end_year='+5' day_value_format='%02d' field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.debut}
+ à
+ {html_select_time use_24_hours=true display_seconds=false time=$evt.debut prefix='deb_' minute_interval=5}
+ </td>
+ </tr>
+ <tr>
+ <td>Date de fin :</td>
+ <td>
+ le
+ {html_select_date prefix='fin_' end_year='+5' day_value_format='%02d' field_order='DMY' field_separator=' / ' month_format='%m' time=$evt.fin}
+ à
+ {html_select_time use_24_hours=true display_seconds=false time=$evt.fin prefix='fin_' minute_interval=5}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">Ouvert aux membres du groupe uniquement :
+ <input type="radio" name="membres_only" value="1" {if $evt.membres_only}checked="checked"{/if} /> oui
+ <input type="radio" name="membres_only" value="0" {if !$evt.membres_only}checked="checked"{/if} /> non
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">Annoncer l'événement publiquement sur le site :
+ <input type="radio" name="advertise" value="1" {if $evt.advertise}checked="checked"{/if} /> oui
+ <input type="radio" name="advertise" value="0" {if !$evt.advertise}checked="checked"{/if} /> non
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">Montrer la liste des participants à tous les membres :
+ <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
+ </td>
+ </tr>
+ <tr>
+ <td>Référence de paiement :
+ </td>
+ <td>
+ <select name="paiement" onchange="document.getElementById('new_pay').style.display=(value < 0?'block':'none')">
+ <option value=''>Pas de paiement</option>
+ <option value='-1'>- Nouveau paiement -</option>
+ {html_options options=$paiements selected=$evt.paiement_id}
+ </select>
+ </td>
+ </tr>
+ </table>
+ <div id="new_pay" style="display:none">
+ Nouveau paiement, message de confirmation :<br />
+ <textarea name="confirmation" rows="12" cols="65"><salutation> <prenom> <nom>,
+
+ Ton inscription à [METS LE NOM DE L'EVENEMENT ICI] a bien été enregistrée et ton paiement de <montant> a bien été reçu.
+ [COMPLETE EN PRECISANT LA DATE ET LA PERSONNE A CONTACTER]
+
+ A très bientot,
+
+ [SIGNE ICI]</textarea><br />
+ Le nouveau paiement n'est pas rajouté automatiquement mais doit être validé par le trésorier de l'association Polytechnique.org, ce qui sera fait sous peu.<br /><br />
+ Page internet de l'événement :<br />
+ <input size="40" name="site" value="{$asso.site}" />
+ </div>
+
+ {foreach from=$moments item=i}
+ {assign var='moment' value=$items[$i]}
+ <hr />
+ <table>
+ <tr><td colspan="2" align="center"><strong>"Moment" {$i}</strong></td></tr>
+ <tr>
+ <td>Intitulé :</td>
+ <td><input type="text" name="titre{$i}" value="{$moment.titre}" size="45" maxlength="100" /></td>
+ </tr>
+ <tr>
+ <td>Détails pratiques :</td>
+ <td><textarea name="details{$i}" rows="6" cols="45">{$moment.details}</textarea></td>
+ </tr>
+ <tr>
+ <td>Montant par participant :<br /><small>(0 si gratuit)</small></td>
+ <td><input type="text" name="montant{$i}" value="{if $moment.montant}{$moment.montant|replace:".":","}{else}0,00{/if}" size="7" maxlength="7" /> €</td>
+ </tr>
+ </table>
+ {/foreach}
+
+ <div class="center">
+ <input type="submit" name="valid" value="Valider" />
+
+ <input type="reset" value="Annuler" />
+ </div>
+
+</form>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>Demande d'inscription à {$asso.nom}</h1>
+
+{if $smarty.request.u && $admin && $show_form}
+
+<h2>
+ Demande de la part de : {$prenom} {$nom} (X{$promo})
+ <a href="https://www.polytechnique.org/fiche.php?user={$smarty.request.u}">Voir sa fiche</a>
+</h2>
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <input type="hidden" name="u" value="{$smarty.request.u}" />
+ <input type="submit" value="Accepter" name="accept" />
+ <br />
+ ou bien
+ <br />
+ <input type="submit" value="Refuser avec le motif ci-dessous" name="refuse" />
+ <textarea cols="70" rows="8" name="motif"></textarea>
+ <br />
+</form>
+
+{elseif $smarty.post.inscrire}
+
+<p class="descr">
+<strong>Ta demande d'inscription a bien été envoyée !</strong> Tu seras averti par email de la suite qui lui sera donnée.
+<p>
+<p class="descr">[<a href="asso.php">Retour à la page d'accueil de {$asso.nom}</a>]</p>
+
+{else}
+
+<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
+[ m'inscrire ]
+</p>
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <p class="descr">
+ <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 :
+ </p> <textarea cols=80 rows=12 name="message">
+Chers Camarades,
+
+Je souhaite m'inscrire à {$asso.nom}.
+
+Merci d'avance d'avoir la gentillesse de valider mon inscription.
+
+Bien cordialement,
+{$smarty.session.prenom} {$smarty.session.nom} (X{$smarty.session.promo})
+
+--
+Ma fiche sur Polytechnique.org :
+https://www.polytechnique.org/fiche.php?user={$smarty.session.forlife}
+</textarea>
+ <div class="center">
+ <input type="submit" name="inscrire" value="M'inscrire !" />
+
+ <input type="reset" value="Annuler" />
+ </div>
+</form>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>{$asso.nom} : 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
+s'avèrent peu praticables pour des discussions plus restreintes. Il est alors préférable
+d'utiliser <a href="alias-create.php">un alias</a>, à la gestion beaucoup plus souple.
+</p>
+<p class="descr">
+D'autre part, il est impossible d'inscrire une liste de diffusion à une autre liste de diffusion.
+Si tu as besoin de cette fonctionnalité, il faut alors <strong>impérativement</strong> utiliser
+<a href="alias-create.php">un alias</a> qui, lui, est capable de regrouper plusieurs listes.
+</p>
+<form action='{$smarty.server.PHP_SELF}' method='post'>
+ <table class="large">
+ <tr>
+ <th colspan='2'>Caractéristiques de la Liste</th>
+ </tr>
+ <tr>
+ <td><strong>Addresse souhaitée :</strong></td>
+ <td>
+ <input type='text' name='liste' value='{$smarty.post.liste}' />@{$asso.mail_domain}
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Sujet (bref) :</strong></td>
+ <td>
+ <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>
+ </tr>
+ </table>
+ <p class="center"><input name='submit' type='submit' value="Créer !" /></p>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $smarty.get.del_alias}
+
+<p class="error">Est tu sur de supprimer l'alias {$smarty.get.del_alias} ?</p>
+<form action='{$smarty.server.PHP_SELF}' method="post">
+ <div class="center">
+ <input type='submit' value="Oui, je suis sur" />
+ <input type='hidden' name='del_alias' value="{$smarty.get.del_alias}" />
+ </div>
+</form>
+<p>[<a href='listes.php'>retour à la page des listes</a>]</p>
+
+{else}
+
+<h1>{$asso.nom} : Listes de diffusion</h1>
+
+<h2>Listes de diffusion du groupe {$asso.nom} :</h2>
+
+<p class="descr">
+Une liste dont <strong>la diffusion</strong> est modérée est une liste dont les mails sont validés
+par les administrateurs avant d'être transmis aux membres de la liste. Une liste dont
+<strong>l'inscription</strong> est modérée est une liste pour laquelle l'abonnement est soumis à
+l'accord préalable des responsables du groupe.
+</p>
+<p class="descr">
+La dernière colonne du tableau t'indique si tu es inscrit{if $smarty.session.femme}e{/if} ou non à
+la liste. Dans le premier cas, une croix rouge te permet de te désabonner. Dans le second cas, une
+croix verte te permet de t'inscrire, après accord des responsables si l'inscription est modérée.
+</p>
+
+<table cellpadding="0" cellspacing="0" class='large'>
+ <tr>
+ <th>Liste</th>
+ <th>Description</th>
+ <th>Diffusion</th>
+ <th>Inscription</th>
+ <th>Nb</th>
+ <th> </th>
+ </tr>
+ {foreach from=$listes item=l}
+ <tr>
+ <td>
+ <a href="mailto:{$l.list}@{$asso.mail_domain}"><img src="{rel}/images/mail.png" alt='[mail]' /></a>
+ <a href='listes-members.php?liste={$l.list}'>{$l.list} {if $l.priv}<sup>#</sup>{/if}{if $l.own}<sup>o</sup>{/if}</a>
+ </td>
+ <td>{$l.desc}</td>
+ <td class='center'>
+ {if $l.diff eq 2}modérée{elseif $l.diff eq 1}restreinte{else}libre{/if}
+ </td>
+ <td class='center'>{if $l.ins}modérée{else}libre{/if}</td>
+ <td align='right'>{$l.nbsub}</td>
+ <td align='right'>
+ {if $l.sub eq 2}
+ <a href="?del={$l.list}"><img src="{rel}/images/del.png" alt="[désinscrire]" title="me désinscrire" /></a>
+ {elseif $l.sub eq 1}
+ <img src="{rel}/images/flag.png" alt="[en attente]" title="en attente de modération" />
+ {else}
+ <a href="?add={$l.list}"><img src="{rel}/images/ajouter.gif" alt="[m'inscrire]" title="m'inscrire" /></a>
+ {/if}
+ </td>
+ </tr>
+ {foreachelse}
+ <tr><td colspan='6'>Pas de listes pour ce groupe</td></tr>
+ {/foreach}
+</table>
+
+<p class="descr">
+<sup>o</sup>: tu es {if $smarty.session.femme}modératrice{else}moderateur{/if} sur cette liste<br />
+<sup>#</sup>: 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>
+
+{if $alias->total()}
+<table cellspacing="0" cellpadding="0" class='large'>
+ <tr>
+ <th{if $may_update} colspan='3'{/if}>Alias</th>
+ </tr>
+ {iterate from=$alias item=a}
+ <tr>
+ {if $may_update}
+ <td class="center"><a href='mailto:{$a.alias}'><img src='{rel}/images/mail.png' alt='[mail]' /></a></td>
+ <td><a href="alias-admin.php?liste={$a.alias}">{$a.alias}</a></td>
+ <td class="center"><a href="?del_alias={$a.alias}"><img src='{rel}/images/del.png' alt='[supprimer]' /></a></td>
+ {else}
+ <td><a href='mailto:{$a.alias}'><img src='{rel}/images/mail.png' alt='[mail]' /> {$a.alias}</a></td>
+ {/if}
+ </tr>
+ {/iterate}
+</table>
+{else}
+<p>Aucun alias pour ce groupe</p>
+{/if}
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+<h1>{$asso.nom} : Envoyer un mail</h1>
+
+<p class="descr">
+Ton message peut être personnalisé : si tu rentres les mots <cher>, <prenom>,
+<nom>, 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>
+
+<form action="{$smarty.server.PHP_SELF}" method="post">
+ <table class='large'>
+ <tr>
+ <th colspan="2">Ecrire un mail :</th>
+ </tr>
+ <tr>
+ <td class="titre">Expéditeur :</td>
+ <td>
+ <input type="text" name="from" size="55" maxlength="70"
+ value="{if $smarty.request.from}{$smarty.request.from}{else}"{$smarty.session.prenom} {$smarty.session.nom}" <{$smarty.session.bestalias}@polytechnique.org>{/if}" />
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan="2">Destinataires</th>
+ </tr>
+ <tr valign="top">
+ <td style='padding-left: 1em' class='titre'>
+ * <em>membres</em>
+ </td>
+ <td>
+ <input type="checkbox" name="membres" value="1" {if $smarty.request.membres}checked="checked"{/if} />
+ <em>écrit à tous les membres du groupe</em> <a href="annuaire.php" class='popup'>(voir membres)</a>
+ </td>
+ </tr>
+
+ {foreach from=$listes item=l}
+ <tr>
+ <td style='padding-left: 1em' class='titre'>
+ * {$l.list}
+ </td>
+ <td>
+ <input type="checkbox" name="ml[{$l.list}]" value="1" {if $smarty.request.ml[$l.list]}checked="checked"{/if} />
+ {$l.addr}
+ <a href="listes-admin.php?liste={$l.list}" class="popup">(voir composition)</a>
+ </td>
+ </tr>
+ {/foreach}
+
+ {* NOT SUPPORTED ATM
+ {foreach from=$alias item=a}
+ {assign var=b value=$a|regex_replace:"!@.*!":""}
+ <tr>
+ <td style='padding-left: 1em' class='titre'>
+ * {$b}
+ </td>
+ <td>
+ <input type="checkbox" name="al[{$b}]" value="1" {if $smarty.request.al[$b]}checked="checked"{/if} />
+ {$a} <a href="alias-admin.php?liste={$b}" class='popup'>(voir composition)</a>
+ </td>
+ </tr>
+ {/foreach}
+ *}
+
+ <tr>
+ <th colspan="2">Contenu du mail</th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Sujet :
+ </td>
+ <td><input type="text" name="sujet" value="{$smarty.request.sujet|default:"remplir le sujet ..."}" size=55 maxlength=70></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <textarea name="body" cols="72" rows="25">{if $smarty.request.body}{$smarty.request.body}{else} <cher> <prenom>,
+
+ Nous avons le plaisir de t'adresser la lettre mensuelle du groupe {$asso.nom}.
+
+ (insérer le texte...)
+
+ Le bureau du groupe {$asso.nom}.{/if}
+</textarea>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center"><input type="submit" name="send" value="Envoyer le message"></td>
+ </tr>
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $smarty.request.new eq x}
+
+<h1>{$asso.nom} : Ajout d'un membre X</h1>
+
+<form method="post" action="{$smarty.server.REQUEST_URI}">
+ <p class="descr">
+ Pour ajouter un X dans ton groupe, il suffit d'entrer ici une de ses adresses mail @polytechnique.org:
+ </p>
+ <div class="center">
+ <input type="text" name="email" size="40" value="{$smarty.request.email}" />
+ <input type='submit' value='Ajouter' />
+ </div>
+</form>
+
+{else}
+
+<h1>{$asso.nom} : Ajout d'un membre extérieur</h1>
+
+<form method="post" action="{$smarty.server.REQUEST_URI}">
+ <p class="descr">
+ Pour ajouter un extérieur dans ton groupe, il suffit d'entrer ici son adresse mail,
+ tu seras ensuite redirigé vers une page te permettant d'éditer son profil (nom, prenom, ...) :
+ </p>
+ <div class="center">
+ <input type="text" name="email" size="40" value="{$smarty.request.email}" />
+ <input type='submit' value='Ajouter' />
+ </div>
+</form>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $smarty.post.confirm}
+
+<p class="descr">
+<a href="annuaire.php">retour à l'annuaire</a>
+</p>
+
+{else}
+
+<h1>{$asso.nom} : gestion des memebres</h1>
+
+<h2>
+ Suppression du membre : {$user.prenom} {$user.nom}
+</h2>
+
+
+<form method="post" action="{$smarty.server.REQUEST_URI}">
+ <div class="center">
+ <p class="descr">
+ Etes-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 ?
+ </p>
+ <input type='submit' name='confirm' value='Oui, je le désinscris complètement du groupe !' />
+ </div>
+</form>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>{$asso.nom} : gestion des membres</h1>
+
+<h2>
+ Édition du profil de {$user.prenom} {$user.nom}
+ {if $user.origine eq 'X'}
+ (X{$user.promo})
+ <a href="https://www.polytechnique.org/fiche.php?user={$user.alias}"><img src="{rel}/images/loupe.gif" alt="Voir la fiche" /></a>
+ {/if}
+ <a href="?del={$user.email}"><img src="{rel}/images/del.png" alt="Suppression du compte" /></a>
+ <a href="mailto:{$user.email}"><img src="{rel}/images/mail.png" alt="Ecrire un mail" /></a>
+</h2>
+
+<form method="post" action="{$smarty.server.REQUEST_URI}">
+ <table cellpadding="0" cellspacing="0" class='tiny'>
+ <tr>
+ <td class="titre">
+ Permissions:
+ </td>
+ <td>
+ <select name="is_admin">
+ <option value="0" {if !$user.perms}selected="selected"{/if}>Membre</option>
+ <option value="1" {if $user.perms}selected="selected"{/if}>Administrateur</option>
+ </select>
+ </td>
+ </tr>
+ {if $user.origine neq X}
+ <tr>
+ <td class="titre">
+ Prénom:
+ </td>
+ <td>
+ <input type="text" value="{$user.prenom}" name="prenom" size="40" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Nom:
+ </td>
+ <td>
+ <input type="text" value="{$user.nom}" name="nom" size="40" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Email:
+ </td>
+ <td>
+ <input type="text" value="{$user.email}" name="email" size="40" />
+ </td>
+ </tr>
+ {/if}
+ </table>
+
+ <h2>Abonnement aux listes</h2>
+
+ <table cellpadding="0" cellspacing="0" class='large'>
+ <tr>
+ <th> </th>
+ <th>Liste</th>
+ <th>Description</th>
+ <th>Nb</th>
+ </tr>
+ {foreach from=$listes item=liste}
+ <tr>
+ <td class='right'>
+ <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' />
+ <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} />
+ </td>
+ <td>
+ <a href='listes-members.php?liste={$liste.list}'>{$liste.list}</a>
+ </td>
+ <td>{$liste.desc}</td>
+ <td class='right'>{$liste.nbsub}</td>
+ </tr>
+ {foreachelse}
+ <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr>
+ {/foreach}
+ </table>
+
+ <h2>Abonnement aux alias</h2>
+
+ <table cellpadding="0" cellspacing="0" class='large'>
+ <tr>
+ <th> </th>
+ <th>Alias</th>
+ </tr>
+
+ {foreach from=$alias item=a}
+ <tr>
+ <td align='right'>
+ <input type='hidden' name='ml3[{$a.alias}]' value='{$a.sub}' />
+ <input type='checkbox' name='ml4[{$a.alias}]' {if $a.sub}checked="checked"{/if} />
+ </td>
+ <td>
+ <a href='alias-admin.php?liste={$a.alias}'>{$a.alias}</a>
+ </td>
+ </tr>
+ {foreachelse}
+ <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr>
+ {/foreach}
+ </table>
+
+ <div class="center">
+ <br />
+ <input type="submit" name='change' value="Valider ces changements" />
+
+ <input type="reset" value="Annuler ces changements" />
+ </div>
+
+</form>
+
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>{$asso.nom} : Gestion des télépaiements </h1>
+
+<p class="descr">
+Voici la liste des paiements en ligne possible pour le groupe {$asso.nom}
+</p>
+
+{foreach from=$titres item=p}
+
+<hr />
+<h2>
+<a href="https://www.polytechnique.org/paiement/?ref={$p.id}">{$p.text}</a>
+</h2>
+
+{if $trans[$p.id]}
+<table cellpadding="0" cellspacing="0" class='bicol'>
+ <tr>
+ <th colspan="3">{$p.text} : détails pour les administrateurs</th>
+ </tr>
+ <tr>
+ {foreach from=$trans[$p.id] item=p}
+ <td>{$p.date|date_format}</td>
+ <td>
+ <a href="https://www.polytechnique.org/fiche.php?user={$p.alias}">{$p.nom} {$p.prenom} (X{$promo})</a>
+ (<a href="mailto:{$p.alias}@polytechnique.org">mail</a>)
+ </td>
+ <td>{$p.montant}</td>
+ {/foreach}
+ </tr>
+</table>
+{/if}
+
+{foreachelse}
+
+<p class="descr">
+<em>Pas de micropaiement en cours ...</em>
+</p>
+
+{/foreach}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<table id="content" cellspacing="0" cellpadding="4">
+ <tr>
+ <td colspan="2">
+ {include file="xnet/include/descr.tpl" cat=$smarty.get.cat}
+ </td>
+ </tr>
+ <tr>
+ {if !$doms || !$gps}
+ <td style="vertical-align: top">
+ <div class="cat {if $smarty.get.cat eq groupesx}sel{/if}"><a href="?cat=groupesx">Groupes X</a></div>
+ <div class="cat {if $smarty.get.cat eq binets}sel{/if}"><a href="?cat=binets">Binets</a></div>
+ <div class="cat {if $smarty.get.cat eq institutions}sel{/if}"><a href="?cat=institutions">Institutions</a></div>
+ <div class="cat {if $smarty.get.cat eq promotions}sel{/if}"><a href="?cat=promotions">Promotions</a></div>
+ </td>
+ {/if}
+
+ {if $doms}
+ <td style="vertical-align: top">
+ {foreach from=$doms item=g}
+ <div class="cat {if $g.id eq $smarty.get.dom}sel{/if}">
+ <a href="?cat={$smarty.get.cat}&dom={$g.id}">{$g.nom}</a>
+ </div>
+ {/foreach}
+ </td>
+ {/if}
+
+ {if $gps}
+ <td style="text-align:right;">
+ {iterate from=$gps item=g}
+ <table style="float: left;" cellspacing="2" cellpadding="0">
+ <tr><td class="oval{if $doms}2{/if}"><a href="{rel}/{$g.diminutif}/asso.php">{$g.nom}</a></td></tr>
+ </table>
+ {/iterate}
+ </td>
+ {/if}
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{if $cat eq groupesx}
+
+<p class="descr">
+Les groupes X rassemblent des polytechniciens partageant les mêmes centres d'intérêt,
+autour de sujets très différents. Certains de ces groupes sont des associations
+dépendant de l'Amicale des Anciens, définis par <a href='article12.php'>l'article 12</a>
+des statuts de l'AX. Les groupes déclarés auprès de l'AX sont indiqués par une petite
+note en bas de la page qui leur est dédiée sur ce site.
+</p>
+<p class="descr">
+Pour créer un nouveau Groupe X agréé par l'AX au titre de
+<a href='article12.php'>l'article 12</a> des statuts, tu peux te référer
+<a href='services.php#creation'> aux documents de l'AX</a>.
+</p>
+<p class="descr">
+Si tu souhaites obtenir le statut d'association loi de 1901, tu peux obtenir des
+renseignements auprès de <a href='services.php#loi1901'>sites spécialisés</a>.
+</p>
+
+{elseif $cat eq binets}
+
+<p class="descr">
+Les binets sont les associations des élèves polytechniciens effectuant leur scolarité à l'X (sur le
+plateau). Cette appellation, qui peut sembler étrange, est, pour certains, simplement un diminutif
+de "cabinet". Pour d'autres, elle aurait pour origine un certain général Binet, commandant l'Ecole
+Polytechnique, qui aurait le premier autorisé ces regroupements d'élèves. Les binets présents à
+l'Ecole n'ont pas tous leur site web présenté ici. Vous pouvez voir tous les sites des binets en
+cliquant <a href= "http://www.polytechnique.fr/eleves/acces/binets/">ici</a>.
+</p>
+
+{elseif $cat eq institutions}
+
+<p class="descr">
+De nombreuses organismes officiels sont liés à l'Ecole Polytechnique: le collège de l'Ecole
+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:
+</p>
+
+{elseif $cat eq promotions}
+
+<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:
+</p>
+
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<table id="content" cellpadding="2" cellspacing="0">
+ <tr>
+ <td style="vertical-align: middle;">
+ <img src="images/parfait.jpg" width="459" height="200" alt="Logo des groupes" />
+ </td>
+
+ <td>
+ <p class="descr">
+ Polytechnique.net est le site dédié à toutes les activités associatives des polytechniciens,
+ Élèves ou Anciens. Il décrit aussi les organismes institutionnels relatifs à l'Ecole
+ Polytechnique et les promotions présentes sur le web.
+ </p>
+ <p class="descr">
+ Ce site vous propose des liens vers les forums de discussions et les sites webs des
+ différentes associations, des adresses où les contacter, et tous les renseignements utiles
+ pour mieux les connaître. Il offre d'autre part des
+ <a href="services.php"> outils de gestion de groupe</a> à l'intention de leurs responsables.
+ </p>
+ <p class="descr">
+ Si vous recherchez la page d'un groupe particulier, vous pouvez
+ <a href="plan.php">en consulter la liste</a>.
+ </p>
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>
+ Accès à Polytechnique.net
+</h1>
+
+<noscript>
+ <p class="erreur">
+ Ton navigateur n'accepte pas le javaScript !!
+ </p>
+ <p>
+ Cette forme de script web est nécessaire pour l'utilisation du site.
+ Pour en savoir plus, regarde la <a href="faq.php#connect">FAQ</a>.
+ </p>
+</noscript>
+
+<table class='large' cellpadding="4" cellspacing="0">
+ <tr>
+ <th style="width: 50%;">
+ Accès pour les Polytechniciens
+ </th>
+ <th>
+ Accès pour les extérieurs
+ </th>
+ </tr>
+ <tr>
+ <td style="padding: 1em">
+ <p class="descr">
+ Il suffit de suivre <strong><a href="{$smarty.session.session->loginX}">ce lien</a></strong> qui va te rediriger vers
+ <a href="https://www.polytechnique.org/">Polytechnique.org</a> brièvement.
+ </p>
+ <p class="descr">
+ Une fois autentifié sur Polytechnique.org, tu seras redirigé sur X.net
+ </p>
+ <div class="center">
+ <strong>
+ <a href="{$smarty.session.session->loginX}">ME CONNECTER</a>
+ </strong>
+ </div>
+ </td>
+ <td style="padding: 1em">
+ <form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;">
+ <table class="large" cellpadding="4" cellspacing="0" summary="Formulaire de login">
+ <tr>
+ <th colspan="2">Connexion
+ <input type="hidden" name="remember" value="" />
+ <input type="hidden" name="domain" value="" />
+ </th>
+ </tr>
+ <tr>
+ <td class="titre">
+ Login
+ </td>
+ <td>
+ <input type="text" name="username" size="20" maxlength="50" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td class="titre">
+ Mot de passe:
+ </td>
+ <td>
+ <input type="password" name="password" size="10" maxlength="10" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="center">
+ <input type="submit" name="submitbtn" value="Envoyer" />
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ (Activer obligatoirement le <strong>javascript</strong>)
+ {if $smarty.request.response}<!-- failed login code //-->
+ <div class="erreur">
+ Erreur d'identification. Essaie à nouveau !
+ </div>
+ {/if}
+ </td>
+ </tr>
+</table>
+
+<!-- Set up the form with the challenge value and an empty reply value //-->
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
+ <div>
+ <input type="hidden" name="challenge" value="{$smarty.session.session->challenge}" />
+ <input type="hidden" name="response" value="" />
+ <input type="hidden" name="username" value="" />
+ <input type="hidden" name="remember" value="" />
+ <input type="hidden" name="domain" value="" />
+ </div>
+</form>
+
+{literal}
+<script type="text/javascript">
+ <!--
+ // Activate the appropriate input form field.
+ if (document.forms.login.username.value == '') {
+ document.forms.login.username.focus();
+ } else {
+ document.forms.login.password.focus();
+ }
+ // -->
+</script>
+{/literal}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>X.net : Mode d'emploi</h1>
+
+<h2><u>Polytechnique.net : au service des administrateurs</u></h2>
+
+Les fonctions d'administration sont accessibles depuis le menu de gauche sur la
+page du groupe dont tu es le responsable. Certaines fonctions sont isolées car
+ne concernent que les administrateurs, et ne sont vues que par eux. D'autres
+sont accessibles depuis les liens du menu de gauche, visibles par tous les
+membres. Mais dans ce cas, les fonctions réservées aux administrateurs sont
+indiquées clairement comme telles, et les autres membres ne les voient pas.
+
+
+<br /><br />
+<a href="#annuaire">L'annuaire et les inscriptions</a><br>
+<a href="#evenement">La création d'un événement</a><br>
+<a href="#envoi">L'envoi de mail</a><br>
+<a href="#liste">La création d'une liste de diffusion</a><br>
+<a href="#alias">La création d'un alias</a><br>
+
+
+<h3><a name="annuaire">L'annuaire et les inscriptions</a></h3>
+
+La
+page d'annuaire comprend deux liens destinés aux administrateurs : ajout d'un
+membre X, et ajout d'un membre non-X. Ces liens t'emmènent vers une page,
+depuis laquelle tu peux inscrire manuellement un nouveau membre, en lui
+attribuant les qualités souhaitées (administrateurs, inscriptions aux listes de
+diffusion, ...).
+Un
+Polytechnicien intéressé par ton groupe, peut aussi vouloir s'inscrire depuis
+le site (en mode connecté). Suite à sa demande, tu reçois un mail semblable à
+celui-ci :
+
+<br />
+<img src="images/mail_inscription.jpg" />
+<br />
+
+Le
+mail t'indique la démarche à suivre pour valider ou non cette inscription.
+L'inscription est ensuite automatique : les listes de diffusion, ainsi que
+l'annuaire, sont auto-complétés par le site Polytechnique.net, et la personne
+demandant l'inscription est avertie par mail de la suite donnée à sa requête. <br>
+
+Tu
+peux également gérer les désinscriptions, ou éditer les profils des membres
+composant ton groupe depuis cette page d'annuaire. Les trois colonnes de droite
+de l'annuaire sont des colonnes d'administration, visibles seulement par les
+responsables du groupe.
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="evenement">La création d'un événement</a></h3>
+
+L'interface
+d'administration t'offre la possibilité d'ajouter une manifestation à la liste
+des événements du groupe. Depuis la page de création, tu peux décrire la
+manifestation, renseigner ses dates. N'oublie pas d'indiquer quelle visibilité
+tu veux donner à cette manifestation : est-elle ouverte seulement aux
+membres du groupe, ou accueille-t-elle toutes les personnes intéressées par le
+thème ? Souhaites-tu en communiquer l'existence à tous les membres du
+groupe, ou à tous les X ? Selon les réponses que tu fournis, la diffusion
+de cet événement via les sites polytechniciens est plus ou moins large
+
+<br />
+<img src="images/evnt_creation.jpg" />
+<br />
+
+La page de création d'événements te permet également de décrire précisément les
+temps forts de la manifestation. Cette distinction peut s'avérer utile si
+certains des "moments" n'intéressent pas tous les participants, et
+qu'ils souhaitent s'inscrire seulement à certains d'entre eux.
+
+<br />
+<img src="images/evnt_moments.jpg" />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="envoi">L'envoi de mail</a></h3>
+
+Depuis
+Polytechnique.net, il t'est possible d'envoyer des mails aux différentes listes
+de diffusion créées pour le groupe. Tu choisis ainsi les destinataires, en
+sélectionnant les listes que tu souhaites. Si tu as oublié la composition d'une
+liste, n'hésite pas à te la remémorer en cliquant sur "voir les
+membres". Ensuite, tu remplis les champs du mail, de la même façon que
+sur un logiciel de messagerie. Toutefois, Polytechnique.net t'offre en plus la
+possibilité d'envoyer des mails personnalisés. Si tu laisses les champs
+<cher> et <prenom> tels qu'indiqués sur la page, ces champs seront
+adaptés à chaque envoi : une femme s'appelant Annie recevra ainsi un mail
+commençant par "Chère Annie", et un homme dénommé Pierre un mail
+commençant par "Cher Pierre". Cette personnalisation touche plus
+les destinataires et conduit à un meilleur taux de réponse. C'est pourquoi nous te conseillons de
+l'utiliser autant que possible.
+
+<br />
+<img src="images/mail.jpg" />
+<br />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="liste">La création d'une liste de diffusion</a></h3>
+
+Un
+groupe X a besoin de plusieurs listes de diffusion internes au groupe, qui
+améliorent la communication et la circulation des informations. Des listes
+"traditionnelles" sont ainsi celles qui regroupent les membres du
+bureau, ou du conseil d'administration. Pour les groupes internationaux à large
+portée (tels les X-Continents), il est également très pratique d'avoir des
+listes spécifiques à chaque pays.
+<br>
+Chaque
+liste peut être soumise à modération :
+
+<ul>
+ <li><u>Pour l'inscription </u>: par exemple tous les membres d'un groupe ne
+ peuvent pas être inscrits sur la liste du bureau.</li>
+ <li><u>Pour la
+ modération </u>: si une liste est à large diffusion, il peut être
+ commode qu'un administrateur valide les mails avant leur envoi à tous les
+ membres de la liste. Cela évite un encombrement inutile des messageries,
+ qui, à terme, brouille la communication.</li>
+</ul>
+
+La
+page ci-dessous te permet de créer autant de listes de diffusion que tu le
+souhaites. Sache cependant qu'une liste de diffusion, pour son bon
+fonctionnement, doit comporter un nombre minimal d'inscrits (supérieur à 6).
+Pour des listes plus restreintes, opte plutôt pour un alias. Si tu souhaites
+regrouper plusieurs listes de diffusion au sein d'une liste englobante, choisis
+aussi d'utiliser un alias, dont la gestion est plus souple.
+
+<br />
+<img src="images/liste.jpg" />
+<br />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="alias">La création d'un alias</a></h3>
+Cette
+page t'indique la procédure à suivre pour créer un alias. Les alias sont des
+listes de diffusion plus souples à gérer, mais offrant moins de fonctionnalités
+que les listes de diffusion classique (modération de l'inscription et de la
+diffusion notamment).
+
+<br />
+<img src="images/alias.jpg" />
+<br />
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2>Polytechnique.net : le mode authentifié</h2>
+
+Polytechnique.net
+a également été conçu pour répondre aux besoins des associations en termes de
+gestion et d'organisation d'un groupe. C'est pourquoi Polytechnique.net te
+propose des fonctionnalités facilitant la communication et l'information au
+sein de ton groupe.
+
+<br />
+<a href="#accueil">Accueil</a><br>
+<a href="#tongroupe">La page de ton groupe</a><br>
+<a href="#annuaire">L'annuaire</a><br>
+<a href="#listes">Les listes de diffusion</a><br>
+<a href="#agenda">L'agenda privé du groupe</a><br>
+<a href="#carnet">Le carnet</a><br>
+<a href="#evenements">Les événements</a><br>
+<a href="#telepaiement">Le télépaiement</a><br>
+
+<h3><a name="accueil">Accueil</a></h3>
+Pour
+bénéficier de tous ces services, tu dois auparavant t'authentifier.
+<br />
+<img src="images/identification.jpg" />
+<br />
+
+Pour
+les Polytechniciens, l'identifiant X et le mot de passe sont les mêmes que sur
+le site Polytechnique.org. Si jamais tu as oublié ton mot de passe, tu peux
+utiliser la procédure de récupération de mot de passe en cliquant sur le
+porte-clés. Après t'être authentifié, tu entres en mode connecté, et tu as
+accès directement aux pages des groupes auxquels tu es inscrit, depuis la page d'accueil.
+
+<br />
+<img src="images/index_auth.jpg" />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="tongroupe">La page de ton groupe</a></h3>
+
+La
+page de ton groupe est désormais complétée et offre des fonctionnalités
+avancées, visibles seulement en mode connecté. Ces fonctionnalités sont listées
+dans le menu de droite.
+<br />
+<img src="images/x-internet.jpg" />
+<br />
+
+<img src="images/fns_membres.jpg" />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="annuaire">L'annuaire</a></h3>
+
+Il liste les membres du groupe, par ordre alphabétique ou par promotions.
+<br />
+<img src="images/annuaire.jpg" />
+<br />
+Les
+femmes sont repérées par un point à gauche de leurs noms. Les trois colonnes de
+droite sont destinées aux administrateurs du groupe.
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="listes">Les listes de diffusion</a></h3>
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="agenda">L'agenda privé du groupe</a></h3>
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="carnet">Le carnet</a></h3>
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="evenements">Les événements</a></h3>
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="telepaiement">Le télépaiement</a></h3>
+
+Le
+site Polytechnique.net offre aux groupes la possibilité de gérer leurs
+téléaiements en ligne. Cette fonctionnalité s'avère utile pour organiser des
+réunions ou des manifestations qui intègrent un repas, voire des voyages
+promotions. Si ton groupe ou ta promo bénéficie de ce service, tu peux te
+connecter sur cette page pour y régler ta participation financière.
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h1>X.net : Mode d'emploi</h1>
+
+<h2>Polytechnique.net : Le site public</h2>
+
+<p>
+Polytechnique.net propose deux modes de connexion. Un internaute non authentifié a accès à de
+nombreuses pages d'information, qui le renseigne sur ce que sont les associations
+polytechniciennes : groupes X, binets, promotions et institutions. Cette première partie a pour
+objectif la présentation du site public, ouvert aux X, et aux non-X.
+</p>
+
+<p>
+<a href="#accueil">Accueil</a><br />
+<a href="#general">Les présentations générales</a><br />
+<a href="#dedie">Les pages dédiées</a><br />
+<a href="#inscription">L'inscription à un groupe X</a><br />
+<a href="#boite">La boîte à outils</a><br />
+<a href="#recherche">La fonction recherche d'Exalead</a><br />
+<a href="#evenements">Les événements</a><br />
+<a href="#plan">Le plan du site</a>
+</p>
+
+
+<h3><a name="accueil">Accueil</a></h3>
+
+<a href="http://www.polytechnique.net/index.php">Voir l'accueil du site</a>
+
+
+Depuis la page d'accueil, les visiteurs choisissent un des 4 types d'associations
+recensées par Polytechnique.net, en cliquant sur le lien adéquat (ici <i>groupe
+X</i>). Mais ils peuvent également accéder directement à la liste complète des
+associations, en cliquant sur <i>plan du site</i>.
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="general">Les présentations générales</a></h3>
+
+<img src="images/groupeX.jpg" />
+
+<br />
+Chacune des 4 catégories dispose d'une page descriptive. L'adresse de cette page varie
+suivant la catégorie représentée :
+<ul>
+<li><a href="http://www.polytechnique.net/groupes.php?cat=GroupesX">pour les Groupes X</a></li>
+<li><a href="http://www.polytechnique.net/groupes.php?cat=Binets">pour les Binets</a></li>
+<li><a href="http://www.polytechnique.net/autres.php?cat=Institutions">pour les Institutions</a></li>
+<li><a href="http://www.polytechnique.net/autres.php?cat=Promotions">Pour les promotions</a></li>
+</ul>
+
+
+Les groupes X et les binets représentés sur le site sont nombreux, c'est pourquoi
+ils sont regroupés dans différentes sous-catégories (Internationaux, Loisirs,
+Professionnels) qui permettent un repérage plus facile sur le site.
+
+<br />
+
+<img src="images/gpx_liste.jpg" />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="dedie">Les pages dédiées</a></h3>
+
+Après avoir sélectionné l'association
+polytechnicienne de ton choix, tu arrives sur la page qui lui est dédiée.
+<a href="http://www.polytechnique.net/X-Israel/asso.php"> L'exemple d'X-Israël</a
+La page de chaque association comporte ainsi :
+
+<ul style='margin-top:0cm' type=disc>
+ <li style='text-align:justify'>Un menu (à droite), nécessaire à la navigation vers le reste du site</li>
+ <li style='text-align:justify'>Des liens, pour revenir vers les autres associations de la même
+ catégorie, ou vers les autres catégories (en haut, au milieu)</li>
+ <li style='text-align:justify'> Une courte description de ses activités (au milieu)</li>
+ <li style='text-align:justify'> Des informations utiles pour savoir davantage (à droite). Ce menu
+ te permet également de demander ton inscription au groupe si celui-ci t'intéresse.</li>
+</ul>
+
+<br /><br />
+
+<a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="inscription">L'inscription à un groupe X</a></h3>
+
+<p>
+Pour t'inscrire à un groupe, clique sur le lien correspondant, depuis la page du
+groupe. Une page s'ouvre, et te permet d'envoyer un mail d'inscription aux
+administrateurs du groupe. Tu seras averti par retour de mail, de la suite
+donnée à ta demande.
+</p>
+
+<img src="images/inscription.jpg" />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="boite">La boîte à outils</a></h3>
+
+Polytechnique.net
+offre la possibilité de faire une recherche avancée, non seulement sur le site
+lui-même, mais sur tous les sites polytechniciens. Pour en profiter, il te
+suffit de cliquer le mot clé de ta recherche dans la boîte à outils présente
+sur toutes les pages.
+<br />
+<img src="images/toolbar.jpg" />
+<br />
+En cliquant sur la loupe à droite, tu pourras faire une recherche via le moteur
+d'<a href="http://www.exalead.fr" target="new">Exalead</a>.
+Le petit carnet à droite te permet de revenir à tout instant à la page des événements. L'ampoule
+te dirige vers le mode d'emploi de Polytechnique.net, destiné à faciliter
+l'usage du site.
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="recherche">La fonction recherche d'Exalead</a></h3>
+<a href="http://www.polytechnique.net/recherche.php">http://www.polytechnique.net/recherche.php</a>
+<br />
+<img src="images/exalead.jpg" />
+<br />
+
+<a href="http://www.exalead.fr">Exalead</a>
+est un moteur de recherche, qui fonctionne comme les moteurs de recherche
+indexant le web. La seule différence est l'étendue de la recherche :
+Exalead effectue depuis X.net des recherches sur Polytechnique.net, et sur les
+sites propres aux activités polytechniciennes recensés sur X.net.
+
+Comme
+indiqué sur la page de recherche, tu peux affiner tes critères si les résultats
+obtenus ne te satisfont pas. Les résultats sont affichés sur la page.
+<img src="images/exalead_res.jpg" />
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="evenements">Les événements</a></h3>
+
+La
+page événement recense les différentes manifestations organisées par les
+groupes X. Elle est accessible depuis l'icône "carnet " de la boîte
+à outils, ou depuis le lien "Manifestations" sur la page d'un
+groupe
+
+<br /><br /><a href="#"><i><small>Retour au menu</small></i></a><br />
+
+<h3><a name="plan">Le plan du site</a></h3>
+<a href="http://www.polytechnique.net/plan.php">Lien vers le plan</a>
+<br />
+<img src="images/plan.jpg" />
+
+<br />
+Cette
+page recense toutes les associations polytechniciennes présentes sur le site.
+Tu les trouveras triées par catégories, puis par sous-catégories. Ce plan peut
+t'être utile si tu recherches un groupe particulier.
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<div id="content">
+ <h1>Manuel d'utilisation de Polytechnique.net</h1>
+
+ {if !$smarty.get.type}
+ <p>
+ Nous te proposons divers manuels :
+ </p>
+ <ul>
+ <li>
+ <a href="?type=public">fonctionnalités publiques du site</a>
+ <a href="{rel}/docs/manuel.pdf">(version PDF)</a>
+ </li>
+ <li>
+ <a href="?type=auth">fonctionnalités accessibles par les membres des groupes X</a>
+ <a href="{rel}/docs/manuel.pdf">(version PDF)</a>
+ </li>
+ <li>
+ <a href="?type=admin">fonctionnalités à disposition des animateurs des groupes X</a>
+ <a href="{rel}/docs/manuel-admin.pdf">(version PDF)</a>
+ </li>
+ </ul>
+ {elseif $smarty.get.type eq public || $smarty.get.type eq auth || $smarty.get.type eq admin}
+ {include file="xnet/manuel-`$smarty.get.type`.tpl"}
+ {/if}
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<table id="liste">
+ <tr>
+ <td class="fourth">
+ <table>
+ <tr>
+ <td class="oval"><a href="groupes.php?cat=groupesx">Groupes X</a></td>
+ </tr>
+ <tr>
+ <td class="liste">
+ {foreach from=$groupesx key=id item=dom}
+ <a class="cat" href="groupes.php?cat=groupesx&dom={$id}">{$dom[0].domnom}</a>
+ {foreach from=$dom item=g}
+ <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+ {/foreach}
+ {/foreach}
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ <td class="fourth">
+ <table>
+ <tr>
+ <td class="oval"><a href="groupes.php?cat=binets">Binets</a></td>
+ </tr>
+ <tr>
+ <td class="liste">
+ {foreach from=$binets key=id item=dom}
+ <a class="cat" href="sommaire.php?cat=binets&dom={$id}">{$dom[0].domnom}</a>
+ {foreach from=$dom item=g}
+ <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+ {/foreach}
+ {/foreach}
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ <td class="fourth">
+ <table>
+ <tr>
+ <td class="oval"><a href="groupes.php?cat=promotions">Promotions</a></td>
+ </tr>
+ <tr>
+ <td class="listec">
+ {iterate from=$promos item=g}
+ <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+ {/iterate}
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ <td class="fourth">
+ <table>
+ <tr>
+ <td class="oval"><a href="groupes.php?cat=institutions">Institutions</a></td>
+ </tr>
+ <tr>
+ <td class="listec">
+ {iterate from=$inst item=g}
+ <a href="{$g.diminutif}/asso.php">{$g.nom}</a>
+ {/iterate}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+
+{if !$exalead_data}
+<p class="descr">
+Cette page de recherche fonctionne grâce au moteur développé par <a href="http://www.exalead.com/">Exalead</a>.
+</p>
+{/if}
+
+<p class="descr">
+Ce moteur est capable de dégager des catégories à partir des résultats qu'il a trouvé, tu peux alors
+affiner ta recherche et éliminer les résultats d'une catégorie particulière
+(<img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/>)
+ou ne demander que les résultats appartenant à une catégorie particulière
+(<img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]"/>).
+</p>
+
+<p class="descr">
+Ce moteur sait aussi détecter des mots clés qu'il a pu rencontrer parmi les résultats, et permet
+d'affiner la recherche sur ces critères, suivant le même fonctionnement que les catégories.
+</p>
+
+<span><a href="http://www.exalead.com">Powered by <img src="images/Exalead-logo-Carved-100.gif" alt="Logo Exalead" /></a></span>
+
+{if $exalead_data && $exalead_data->hits}
+<table class="exa_data">
+ <tr>
+ <td class="exa_left">
+ <form method="post" action="{$smarty.server.PHP_SELF}">
+ <div class="exa_form">
+ <div>Rechercher</div>
+ <div><input type="text" name="query" value="{$exalead_data->query->query}" size="30" /></div>
+ <div><input type="submit" name="chercher" value="Chercher" /></div>
+ </div>
+ </form>
+ {if $exalead_data}
+
+ {if !$exalead_data->hits}
+ <p class="erreur">Il n'y a aucun résultat...</p>
+ {else}
+ <div id="nb_results">
+ {if $exalead_data->estimated}
+ <div class="nb_results">Votre recherche a retourné <strong>environ {$exalead_data->nmatches}</strong> résultats.</div>
+ {else}
+ <div class="nb_results">Votre recherche a retourné <strong>{$exalead_data->nmatches}</strong> résultats.</div>
+ {/if}
+ </div>
+ {/if}
+
+ {*
+ //Correction orthographique
+ {if $exalead_data->spellings|@count > 0}
+ <div class="exa_groupe">
+ <div class="titre">Voulais-tu dire :</div>
+ {foreach from=$exalead_data->spellings item="spelling"}
+ <div class="exa_categorie"><a href="exalead.php?query={$spelling->query_href}">{$spelling->display}</a></div>
+ {/foreach}
+ </div>
+ {/if}
+
+ //Categories
+ {if $exalead_data->groups|@count > 0}
+ {foreach from=$exalead_data->groups item="group"}
+ <div class="exa_groupe">
+ <div class="titre">{$group->title} :</div>
+ {foreach from=$group->categories item="categorie"}
+ {if $categorie->reset_href}
+ {if $categorie->count == 0}
+ <div class="exa_categorie" style="background-color: {cycle values="inherit,inherit"}"><span style="text-decoration: line-through;">
+ <a href="?_C={$exalead_data->query->context}/{$categorie->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" /> {$categorie->display}</a></span>
+ </div>
+ {else}
+ <div class="exa_categorie" style="background-color: {cycle values="inherit,inherit"}"><strong>{$categorie->display}</strong>
+ <a href="?_C={$exalead_data->query->context}/{$categorie->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a>
+ </div>
+ {/if}
+ {else}
+ <div class="exa_categorie" style="background-color: {cycle values="inherit,inherit"}">
+ <a style="text-decoration: none;" href="?_C={$exalead_data->query->context}/{$categorie->refine_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" />{$categorie->display} ({$categorie->count})</a>
+ <a href="?_C={$exalead_data->query->context}/{$categorie->exclude_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a>
+ </div>
+ {/if}
+ {/foreach}
+ </div>
+ {/foreach}
+ {/if}
+
+ *}
+
+
+ {if $exalead_data->keywords}
+ <div class="exa_groupe">
+ <div class="titre">Affiner la recherche par mot-clés :</div>
+ {foreach from=$exalead_data->keywords item=keyword}
+ {if !$keyword->is_normal()}
+ {if $keyword->is_excluded()}
+ <div class="exa_categorie">
+ <span style="text-decoration: line-through;">
+ <a href="?_C={$exalead_data->query->context}/{$keyword->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" />
+ {$keyword->display}</a>
+ </span>
+ </div>
+ {else}
+ <div class="exa_categorie">
+ <strong>{$keyword->display}</strong>
+ <a href="?_C={$exalead_data->query->context}/{$keyword->reset_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a>
+ </div>
+ {/if}
+ {else}
+ <div class="exa_categorie">
+ <a href="?_C={$exalead_data->query->context}/{$keyword->refine_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/select.png" alt="[+]" />
+ {$keyword->display} ({$keyword->count})</a>
+ <a href="?_C={$exalead_data->query->context}/{$keyword->exclude_href}&_f=xml2"><img style="vertical-align: text-bottom;" src="images/moins.png" alt="[-]"/></a>
+ </div>
+ {/if}
+ {/foreach}
+ </div>
+ {/if}
+ </td>
+ <td class="exa_right">
+ {if $exalead_data->start > 0}
+ {if $exalead_data->start < 9}
+ <a href=?_C={$exalead_data->query->context}&_s=0">[1-10]</a>
+ {else}
+ <a href="?_C={$exalead_data->query->context}&_s={$exalead_data->start-10}">[{$exalead_data->start-9}-{$exalead_data->end-9}]</a>
+ {/if}
+ {/if}
+
+ Classer
+ <a href="?_C={$exalead_data->query->context}/_sf=-date&_f=xml2">[par date]</a>
+ <a href="?_C={$exalead_data->query->context}/_sf=relevance&_f=xml2">[par pertinence]</a>
+
+ {if $exalead_data->end + 1 < $exalead_data->nhits}
+ {if $exalead_data->end + 11 > $exalead_data->nhits}
+ <a href="?_C={$exalead_data->query->context}&_s={$exalead_data->start+10}">[{$exalead_data->start+11}-{$exalead_data->nhits}]</a>
+ {else}
+ <a href="?_C={$exalead_data->query->context}&_s={$exalead_data->start+10}">[{$exalead_data->start+11}-{$exalead_data->end+11}]</a>
+ {/if}
+ {/if}
+
+ {foreach from=$exalead_data->hits item=hit}
+ <div class="exa_result">
+ <div class="header">
+ <a href="{$hit->url|regex_replace:"!(\?|\&|&)PHPSESSID=.*$!":""}">{$hit->url|regex_replace:"!(\?|\&|&)PHPSESSID=.*$!":""}</a>
+ </div>
+ {foreach from=$hit->hitgroups item=hitgroup}
+ <div class="field">
+ {$hitgroup->title} :
+ {if $hitgroup->hitcategories[0]->browsehref}
+ <a href="?_C={$exalead_data->query->context}/{$hitgroup->hitcategories[0]->browsehref}">{$hitgroup->hitcategories[0]->display}</a>
+ {else}
+ {$hitgroup->hitcategories[0]->display}
+ {/if}
+ </div>
+ {/foreach}
+ </div>
+ {/foreach}
+ {/if}
+ </td>
+ </tr>
+</table>
+{/if}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<div id="content">
+ <p class="descr">
+ L'équipe Polytechnique.org met à disposition des groupes X et des associations
+ polytechniciennes trois outils majeurs, destinés à faciliter la communication au sein des
+ groupes et promouvoir leur présence sur le web :
+ </p>
+ <ul class="descr">
+ <li>
+ <strong>Polytechnique.net</strong>, le portail des associations qui consacre à chacune une page
+ descriptive, modifiable à volonté par les responsables des groupes, ainsi que des outils
+ opérationnels pour une gestion simplifiée des membres;
+ </li>
+ <li>
+ <a href="http://diogenes.polytechnique.org/"><strong>Diogènes</strong></a>, un logiciel qui permet à
+ tous les groupes qui le souhaitent de créer un site web complet, en toute facilité. Ce site
+ est alors hébergé par les soins de Polytechnique.org. Si le groupe X possède déjà un site
+ web, il peut, au choix, en confier l'hébergement à l'équipe de Polytechnique.org, ou bien à
+ un fournisseur d'accès (tel que <a href="http://www.free.fr/">free</a> ou
+ <a href="http://www.freesurf.fr/">freesurf</a>). Dans tous les cas, Polytechnique.org offre
+ aux groupes la possibilité de disposer d'un nom de domaine
+ <em>http://nomdugroupe.polytechnique.org</em> qui pointera vers le site concerné;
+ </li>
+ </ul>
+
+ <p class="descr">
+ Enfin, des services développés sur Polytechnique.net permettent aux membres d'un groupe de
+ communiquer facilement entre eux, et aux responsables de gérer son fonctionnement plus
+ efficacement, grâce à différentes fonctionnalités :
+ </p>
+
+ <ul class="descr">
+ <li>consultation de l'annuaire du groupe,</li>
+ <li>administration, par sous-ensembles, des listes de membres,</li>
+ <li>création, gestion et suppression de listes de diffusion,</li>
+ <li>suivi en ligne des télépaiements,</li>
+ <li>envoi de courriers électroniques aux sous-ensembles du groupe,</li>
+ <li>et bien sûr, modification de la page publique de présentation du groupe sur X.net.</li>
+ </ul>
+
+ <p class="descr">
+ Ces services sont soumis à l'authentification centralisée et sécurisée des inscrits à
+ Polytechnique.org. Certains sont accessibles à tous les membres, d'autres, orientés gestion,
+ sont réservés aux animateurs des groupes.
+ </p>
+
+ <p class="descr">
+ Si tu souhaites davantage de renseignements à ce sujet, n'hésite pas à
+ {mailto address="contact@polytechnique.org" text="nous contacter" encode="javascript"}
+ </p>
+
+ <p class="descr">
+ <a id='creation'></a>Certains groupes pourront souhaiter acquérir le statut de "Groupe X
+ reconnu par l'AX", ce qui leur confère certains avantages décrits dans les articles 12 et 16
+ mentionnés ci-dessous:
+ </p>
+ <ul class="descr">
+ <li>
+ <a href="creation-groupex.php">sur la création d'un groupe X</a>;
+ </li>
+ <li>
+ <a href="article12.php">l'article 12 des statuts de l'AX</a>;
+ </li>
+ <li>
+ <a href="article16.php">l'article 16 du réglement intérieur de l'AX</a>.
+ </li>
+ </ul>
+
+
+ <p class="descr">
+ <a id='loi1901'></a>D'autres, notamment quand ils ont à gérer des fonds (cotisations,
+ financement d'opérations, ...), peuvent avoir besoin de créer une "personne morale", qui prend
+ souvent la forme, en France, d'une association de loi 1901. Si tu désires obtenir des
+ informations plus générales sur les associations, tu peux te rendre sur les sites suivants.
+ Les premiers sont des sites institutionnels:
+ </p>
+
+ <ul class="descr">
+ <li>
+ <a href="http://www.prefecture-police-paris.interieur.gouv.fr/demarches/associations/associations.htm">le site de la préfecture</a>
+ qui décrit les démarches nécessaires à la création d'une association;
+ </li>
+ <li>
+ <a href="http://vosdroits.service-public.fr/ARBO/2001-FXVAS101.html">le site des services publics</a>
+ pour connaître les droits relatifs aux associations;
+ </li>
+ <li><a href="http://www.legifrance.gouv.fr/texteconsolide/AAEBG.htm">le site de légifrance</a>
+ qui énonce la loi de 1901.
+ </li>
+ </ul>
+
+ <p class="descr">
+ Les suivants sont des sites dédiés aux associations, sans avoir pour autant de valeur légale.
+ Quelquefois, le site comporte une partie réservée à ses membres (voire payante), mais sa
+ partie publique présente des informations susceptibles d'aider les responsables dans la
+ gestion quotidienne de leur association.
+ </p>
+ <ul class="descr">
+ <li>
+ <a href="http://www.association-infoservice.com/">le site "Réf-asso.com"</a>
+ qui se veut le site de référence de toutes les associations françaises;
+ </li>
+ <li>
+ Un site personnel qui présente <a href="http://perso.wanadoo.fr/association.1901/HTLM/main/index.htm">les aspects juridiques relatifs aux associations de loi 1901</a>;
+ </li>
+ <li>
+ <a href="http://www.associationmodeemploi.fr/">le site "Association-mode d'emploi"</a>
+ pour se tenir au courant des dernières actualités françaises au sujet des associations.
+ </li>
+ </ul>
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+
+ <title>Les associations polytechniciennes</title>
+ <meta name="description" content="Les associations polytechniciennes" />
+ <meta name="keywords" content="Ecole polytechnique, associations polytechniciennes, groupes X, binets" />
+ <link rel="stylesheet" type="text/css" href="{rel}/css/xnet.css" media="screen" />
+ <link rel="icon" type="image/png" href="{rel}/images/favicon.png" />
+
+ <link rel="bookmark" href="http://www.polytechnique.fr/" title="| École polytechnique" />
+ <link rel="bookmark" href="http://www.polytechnique.edu/" title="| Institutionnal site" />
+ <link rel="bookmark" href="http://www.fondationx.org/" title="| FX" />
+ <link rel="bookmark" href="http://www.polytechniciens.com/" title="| AX" />
+ <link rel="bookmark" href="http://www.polytechnique.org/" title="| Polytechnique.org" />
+ <link rel="bookmark" href="http://www.polytechnique.fr/eleves/" title="| Site d'élèves" />
+
+ {foreach from=$xorg_css item=css}
+ <link rel="stylesheet" type="text/css" href="{rel}/{$css}" />
+ {/foreach}
+ {foreach from=$xorg_js item=js}
+ <script type="text/javascript" src="{rel}/{$js}"></script>
+ {/foreach}
+ <script type="text/javascript" src="{rel}/javascript/overlib.js"></script>
+
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body onload='pa_onload()'>
+ {include file=skin/common.devel.tpl}
+ {include file=skin/common.bandeau.tpl}
+
+ <table id="layout" cellspacing="0" cellpadding="0">
+ {if $xnet_type}
+ <tr id="top">
+ <td>
+ <a href="{rel}/index.php"><img src="{rel}/images/asso-montants.png" alt="Logo Assos" /></a>
+ </td>
+ <td>
+ <img src="{rel}/images/logo_{$xnet_type}.png" alt="Logo {$xnet_type}" width="106" height="96" />
+ </td>
+ <td colspan="2">
+ <img src="{rel}/images/texte_{$xnet_type}.jpg" alt="{$xnet_type}" width="490" height="96" />
+ </td>
+ </tr>
+ {else}
+ <tr id="top">
+ <td>
+ <img src="{rel}/images/logo.png" alt="LOGO Assos" />
+ </td>
+ <td colspan="3" style="text-align: right">
+ <a href="https://www.polytechnique.org/"><img src="{rel}/images/logo-xorg.png" alt="LOGO X.Org" /></a>
+ <img src="{rel}/images/asso2.png" alt="titre_du_site" />
+ </td>
+ </tr>
+ <tr><td colspan="4"><img src="{rel}/images/barre.png" alt="----------" width="765" /></td></tr>
+ {/if}
+
+ {if $menu}
+ <tr>
+ <td id="menu">
+ {foreach from=$menu key=title item=submenu}
+ <h1>{$title}</h1>
+ {foreach from=$submenu key=tit item=url}
+ <a href="{rel}/{$url}">{$tit}</a>
+ {/foreach}
+ {/foreach}
+ </td>
+ <td colspan="3">
+ <div class="breadcrumb">
+ {if $asso}
+ <a href="{rel}/groupes.php?cat={$asso.cat}">{$asso.cat|cat_pp}</a> »
+ {if $asso.dom}
+ <a href="{rel}/groupes.php?cat={$asso.cat}&dom={$asso.dom}">{$asso.domnom}</a> »
+ {/if}
+ {$asso.nom}
+ {elseif $smarty.request.cat}
+ <a href="{rel}/groupes.php?cat={$smarty.request.cat}">{$smarty.request.cat|cat_pp}</a> »
+ {if $smarty.request.dom || !$doms}
+ Choix de l'Asso
+ {else}
+ Choix du domaine
+ {/if}
+ {/if}
+ </div>
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ {else}
+ <tr>
+ <td colspan="4">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+
+ <tr><td colspan="4"><img src="{rel}/images/barre.png" alt="----------" width="765" /></td></tr>
+
+ <tr>
+ <td colspan="4">
+ <table class="links" summary="liens" cellspacing="0" cellpadding="0">
+ <tr>
+ <td> <a href="{rel}/plan.php">PLAN DU SITE</a> </td>
+ <td> <a href="{rel}/groupes.php?cat=groupesx">groupes X</a> </td>
+ <td> <a href="{rel}/groupes.php?cat=binets">binets</a> </td>
+ <td> <a href="{rel}/groupes.php?cat=promotions">promotions</a> </td>
+ <td> <a href="{rel}/groupes.php?cat=institutions">institutions</a> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ {/if}
+
+ <tr><td colspan="4"><img src="{rel}/images/barre.png" alt="----------" width="765" /></td></tr>
+
+ <tr>
+ <td colspan="3" id="perso">
+ {list_all_my_groups}
+ {only_public}
+ <div>Me connecter :</div>
+ <a class='gp' href="{$smarty.session.session->loginX}">polytechnicien</a>
+ <a class='gp' href="{rel}/login.php">extérieur</a>
+ {/only_public}
+ </td>
+ <td id="search">
+ <form method="get" action="{rel}/recherche.php">
+ <div>
+ <a href="{rel}/manuel.php" title="Manuel d'aide en ligne"><img src="{rel}/images/manuel.png" alt="manuel" /></a>
+ <input type="text" name="query" value="{$exalead_data->query->query}" size="25" maxlength="60" />
+ <input type="image" src="{rel}/images/recherche.png" title="Chercher" value="submit" />
+
+ <br />
+ <strong><a href="http://www.exalead.com/">Powered by</a></strong>
+ <a href="http://www.exalead.com/"><img src="{rel}/images/Exalead-logo-Carved-100.gif" alt="exalead" /></a>
+ </div>
+ </form>
+ </td>
+ </tr>
+
+ <tr><td colspan="4"><img src="{rel}/images/barre.png" alt="----------" width="765" /></td></tr>
+
+ <tr>
+ <td colspan="4" id="credits">
+ <a href="{rel}/index.php">page d'accueil</a> -
+ <a href="{rel}/plan.php">liste des associations</a> -
+ <a href="{rel}/services.php">services proposés</a> -
+ <a href="{rel}/apropos.php">à propos de ce site</a> -
+ <a href="https://www.polytechnique.org/">polytechnique.org</a> -
+ {mailto address="contact@polytechnique.org" text="nous contacter" encode="javascript"}
+ <br />
+ © Copyright 2000-2005 <a href="http://x-org.polytechnique.org/">Association Polytechnique.org</a>
+ </td>
+ </tr>
+
+ </table>
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+
+1- run the python script first, in order to update ML
+2- mysql x4dat < emails.sql
+3- mysql x4dat < migration.sql
+4- mysql x4dat < skins.sql
+
--- /dev/null
+--------------------------------------------------------------------------------
+-- emails
+--------------------------------------------------------------------------------
+update x4dat.emails set flags=CONCAT_WS(',',flags,'active') where find_in_set('filtre',flags);
+alter table x4dat.emails add column rewrite CHAR(128) NOT NULL after email;
+update x4dat.emails as e inner join x4dat.aliases as a ON(a.id=e.uid AND a.type='a_vie') set e.rewrite=CONCAT(a.alias,'@m4x.org') where find_in_set('m4x',flags);
+update x4dat.emails as e inner join x4dat.aliases as a ON(a.id=e.uid AND a.type='a_vie') set e.rewrite=CONCAT(a.alias,'@polytechnique.org') where find_in_set('rewrite',flags) AND rewrite='';
+alter table x4dat.emails change flags flags set('active','filter','mtic');
+update x4dat.emails set flags='filter' WHERE num=0;
+alter table x4dat.emails drop primary key;
+alter table x4dat.emails add index uid (uid);
+alter table x4dat.emails add primary key (uid,email);
+alter table x4dat.emails drop column num;
+
--- /dev/null
+-- passage à diogenes
+ALTER TABLE logger.sessions ADD `auth` ENUM( 'native' ) DEFAULT 'native' NOT NULL AFTER `id`;
+ALTER TABLE logger.sessions ADD `sauth` ENUM( 'native' ) DEFAULT 'native' NOT NULL AFTER `host`;
+INSERT INTO logger.actions SET text="connexion_auth_ext",description="connection via l'auth des groupes X";
+
+-- modifs diogenes/logger
+ALTER TABLE logger.events DROP `id` ;
+ALTER TABLE logger.sessions ADD INDEX ( `uid` );
+ALTER TABLE logger.sessions ADD INDEX ( `uid` );
+ALTER TABLE logger.events ADD INDEX ( `session` );
+DROP TABLE x4dat.log;
+
+drop trackers;
+--------------------------------------------------------------------------------
+
+
+--------------------------------------------------------------------------------
+-- X4DAT
+--------------------------------------------------------------------------------
+-- pas sur que je veuille le dropper pr le moment celui la ... a voir
+--*-- ALTER TABLE x4dat.auth_user_md5 DROP COLUMN lastnewslogin;
+
+-- cgt de type pour les ML
+ALTER TABLE x4dat.requests CHANGE `type` `type` ENUM('alias','epouse','liste','photo','sondage','emploi','evts' ) DEFAULT 'alias' NOT NULL;
+-- lastlogin --> logger
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN lastlogin;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN host;
+-- drop du soundex
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN nom_soundex;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN prenom_soundex;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN epouse_soundex;
+-- drop des anciens alias --> aliases
+alter table x4dat.aliases add column expire date;
+delete from x4dat.aliases where `type` LIKE 'liste-%';
+ALTER TABLE x4dat.aliases CHANGE `type` `type` ENUM( 'a_vie', 'epouse', 'alias', 'homonyme', 'liste' ) DEFAULT 'alias' NOT NULL;
+delete from x4dat.aliases where type='';
+
+-- auth_user_md5
+update x4dat.aliases as a inner join x4dat.auth_user_md5 as u ON(u.loginbis=a.alias)
+ set a.expire=ADDDATE(u.date_mise_alias_temp,INTERVAL 1 MONTH)
+ WHERE u.date_mise_alias_temp!='' AND u.date_mise_alias_temp!='0000-00-00';
+update x4dat.aliases as a inner join x4dat.auth_user_md5 as u ON(u.loginbis=a.alias) set a.id=u.user_id;
+insert into homonymes select a.id,u.user_id from aliases as a inner join auth_user_md5 as u ON(u.loginbis=a.alias);
+-- drop des colones inutiles
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN date_mise_alias_temp;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN loginbis;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN username;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN alias;
+ALTER TABLE x4dat.auth_user_md5 DROP COLUMN username_sasl;
+--------------------------------------------------------------------------------
+
+
+--------------------------------------------------------------------------------
+-- MELIX
+--------------------------------------------------------------------------------
+update groupex.aliases AS gx
+ inner join x4dat.aliases AS a ON (gx.email = a.alias)
+ inner join x4dat.aliases AS b ON (a.id=b.id AND b.type='a_vie')
+ set gx.email = b.alias
+ where gx.id = 12;
+
+--------------------------------------------------------------------------------
+-- DROP des LISTES
+--------------------------------------------------------------------------------
+drop table x4dat.listes_def;
+drop table x4dat.listes_ins;
+drop table x4dat.listes_mod;
+update x4dat.aliases set id=0 where `type`='liste';
+--------------------------------------------------------------------------------
+
--- /dev/null
+#! /bin/sh
+mysql x4dat < newsleter.sql
+
+list_members polytechnique.org-newsletter | \
+ sed -e 's!^\(.*\)@polytechnique.org!INSERT INTO newsletter_ins SELECT id FROM aliases WHERE alias="\1";!' | \
+ mysql x4dat
+
+echo "DELETE FROM aliases WHERE alias LIKE 'newsletter%';" | mysql x4dat
--- /dev/null
+
+CREATE TABLE newsletter_ins (
+ user_id smallint(4) unsigned NOT NULL default '0',
+ PRIMARY KEY (user_id)
+) TYPE=MyISAM COMMENT='liste des abonnés à la newsletter';
--- /dev/null
+-- MySQL dump 9.11
+--
+-- Host: localhost Database: x4dat
+-- ------------------------------------------------------
+-- Server version 4.0.21-log
+
+--
+-- Table structure for table `skins`
+--
+
+DROP TABLE IF EXISTS skins;
+CREATE TABLE skins (
+ id tinyint(1) unsigned NOT NULL default '0',
+ name varchar(32) NOT NULL default '',
+ date varchar(10) NOT NULL default '',
+ comment varchar(255) NOT NULL default '',
+ auteur varchar(30) NOT NULL default '',
+ skin_tpl varchar(32) NOT NULL default '',
+ ext char(3) NOT NULL default '',
+ PRIMARY KEY (id)
+) TYPE=MyISAM PACK_KEYS=1 COMMENT='liste des skins';
+
+--
+-- Dumping data for table `skins`
+--
+
+INSERT INTO skins VALUES (1,'Defaut','2000-03-07','Skin par défaut','Equipe X.org','default.tpl','png');
+INSERT INTO skins VALUES (2,'Sharky','2003-04-01','Une skin aquatique','Jeremy Lainé','sharky.tpl','png');
+INSERT INTO skins VALUES (3,'Spectral','2000-03-21','Un peu plus haut en couleurs :))','Equipe X.org','spectral.tpl','png');
+INSERT INTO skins VALUES (4,'Espace','2000-03-25','Thème spatial','Equipe X.org','espace.tpl','png');
+INSERT INTO skins VALUES (5,'Linux','2000-03-23','Une skin sérieuse pour polytechniciens linuxiens','Equipe X.org','linux.tpl','png');
+INSERT INTO skins VALUES (6,'HumLinux','2000-03-29','Une skin sexy inspirée d\'un thème WindowMaker...','Equipe X.org','humlinux.tpl','png');
+INSERT INTO skins VALUES (7,'Trapped','2002-12-21','La légende continue...','Thierry Bonnefous','trapped.tpl','png');
+INSERT INTO skins VALUES (8,'NewXorg','2001-06-02','Skin avec le logo officiel de l\'association','Equipe X.org','newxorg.tpl','png');
+INSERT INTO skins VALUES (9,'OldTimes','2000-03-08','La skin historique','Equipe X.org','oldtimes.tpl','png');
+INSERT INTO skins VALUES (10,'NBviolet','2000-03-08','Purple Rain en noir et blanc','Equipe X.org','nbviolet.tpl','png');
+
+update auth_user_md5 set skin=skin+100;
+
+update auth_user_md5 set skin=10 where skin=110;
+update auth_user_md5 set skin=9 where skin=101;
+update auth_user_md5 set skin=8 where skin=106;
+update auth_user_md5 set skin=7 where skin=112;
+update auth_user_md5 set skin=6 where skin=107;
+update auth_user_md5 set skin=5 where skin=104;
+update auth_user_md5 set skin=4 where skin=105;
+update auth_user_md5 set skin=3 where skin=103;
+update auth_user_md5 set skin=2 where skin=115;
+update auth_user_md5 set skin=1 where skin>=100;
--- /dev/null
+#!/usr/bin/env python
+#***************************************************************************
+#* Copyright (C) 2004 polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************
+
+import base64, MySQLdb, os, getopt, sys, MySQLdb.converters, sha
+from pwd import getpwnam
+from grp import getgrnam
+
+from SimpleXMLRPCServer import SimpleXMLRPCServer
+from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
+
+import paths
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import Message
+from Mailman import Errors
+from Mailman import mm_cfg
+from Mailman import i18n
+from Mailman.UserDesc import UserDesc
+from Mailman.ListAdmin import readMessage
+
+#-------------------------------------------------------------------------------
+# helpers
+#
+
+def connectDB():
+ db = MySQLdb.connect(
+ db='x4dat',
+ user=mm_cfg.MYSQL_USER,
+ passwd=mm_cfg.MYSQL_PASS,
+ unix_socket='/var/run/mysqld/mysqld.sock')
+ db.ping()
+ return db.cursor()
+
+def set_options(vhost,listname,opts,vals):
+ try:
+ mlist = MailList.MailList(vhost+'-'+listname)
+ except:
+ return 0
+ try:
+ for (k,v) in vals.iteritems():
+ if k not in opts:
+ continue
+ if k == 'default_member_moderation':
+ for member in mlist.getMembers():
+ mlist.setMemberOption(member, mm_cfg.Moderate, int(v))
+ t = type(mlist.__dict__[k])
+ if t is bool: mlist.__dict__[k] = bool(v)
+ elif t is int: mlist.__dict__[k] = int(v)
+ elif t is str: mlist.__dict__[k] = Utils.uncanonstr(v,'fr')
+ else: mlist.__dict__[k] = v
+ mlist.Save()
+ mlist.Unlock()
+ return 1
+ except:
+ mlist.Unlock()
+ raise
+ return 0
+
+def mass_subscribe(vhost,listname,users):
+ try:
+ mlist = MailList.MailList(vhost+'-'+listname)
+ except:
+ return 0
+ try:
+ members = mlist.getRegularMemberKeys()
+ added = []
+ for user in users:
+ name, forlife = user;
+ if forlife+'@polytechnique.org' in members:
+ continue
+ userd = UserDesc(forlife+'@polytechnique.org', name, None, 0)
+ mlist.ApprovedAddMember(userd, 0, 0)
+ added.append( (userd.fullname, userd.address) )
+ mlist.Save()
+ finally:
+ mlist.Unlock()
+ return added
+
+def add_owner(vhost,listname,forlife):
+ try:
+ mlist = MailList.MailList(vhost+'-'+listname)
+ except:
+ return 0
+ try:
+ if forlife+'@polytechnique.org' not in mlist.owner:
+ mlist.owner.append(forlife+'@polytechnique.org')
+ mlist.Save()
+ finally:
+ mlist.Unlock()
+ return True
+
+#-------------------------------------------------------------------------------
+# admin procedures [ check.php ]
+#
+
+check_opts = {
+ 'acceptable_aliases' : '',
+ 'admin_immed_notify' : True,
+ 'administrivia' : True,
+ 'anonymous_list' : False,
+ 'autorespond_admin' : False,
+ 'autorespond_postings' : False,
+ 'autorespond_requests' : False,
+ 'available_languages' : ['fr'],
+ 'ban_list' : [],
+ 'bounce_matching_headers' : '',
+ 'bounce_processing' : False,
+ 'convert_html_to_plaintext' : False,
+ 'digestable' : False,
+ 'digest_is_default' : False,
+ 'discard_these_nonmembers' : [],
+ 'emergency' : False,
+ 'encode_ascii_prefixes' : 2,
+ 'filter_content' : False,
+ 'first_strip_reply_to' : False,
+ 'forward_auto_discards' : True,
+ 'header_filter_rules' : [],
+ 'hold_these_nonmembers' : [],
+ 'include_list_post_header' : False,
+ 'include_rfc2369_headers' : False,
+ 'new_member_options' : 256,
+ 'nondigestable' : True,
+ 'obscure_addresses' : True,
+ 'preferred_language' : 'fr',
+ 'reject_these_nonmembers' : [],
+ 'reply_goes_to_list' : 0,
+ 'reply_to_address' : '',
+ 'require_explicit_destination' : False,
+ 'send_reminders' : 0,
+ 'send_welcome_msg' : True,
+ 'topics_enabled' : False,
+ 'umbrella_list' : False,
+ 'unsubscribe_policy' : 0,
+}
+
+def check_options(vhost,listname,correct=False):
+ try:
+ mlist = MailList.MailList(vhost+'-'+listname)
+ except:
+ return 0
+ try:
+ options = { }
+ for (k,v) in check_opts.iteritems():
+ if mlist.__dict__[k] != v:
+ options[k] = v,mlist.__dict__[k]
+ if correct: mlist.__dict__[k] = v
+ if mlist.real_name != listname:
+ options['real_name'] = listname, mlist.real_name
+ if correct: mlist.real_name = listname
+ if mlist.host_name != vhost:
+ options['real_name'] = vhost, mlist.host_name
+ if correct: mlist.host_name = vhost
+ if correct: mlist.Save()
+ mlist.Unlock()
+ return (details,options)
+ except:
+ mlist.Unlock()
+ return 0
+
+#-------------------------------------------------------------------------------
+# admin procedures [ soptions.php ]
+#
+
+def create_list(vhost,listname,desc,advertise,modlevel,inslevel,owners,members):
+ name = vhost+'-'+listname;
+ if Utils.list_exists(name):
+ return 0
+
+ mlist = MailList.MailList()
+ try:
+ oldmask = os.umask(002)
+ pw = sha.new('foobar').hexdigest()
+ try:
+ mlist.Create(name, owners[0], pw)
+ finally:
+ os.umask(oldmask)
+
+ mlist.real_name = listname
+ mlist.host_name = vhost
+ mlist.description = desc
+
+ mlist.advertised = int(advertise) > 0
+ mlist.default_member_moderation = int(modlevel) is 2
+ mlist.generic_nonmember_action = int(modlevel) > 0
+ mlist.subscribe_policy = 2 * (int(inslevel) is 1)
+
+ mlist.owner = owners
+
+ mlist.subject_prefix = '['+listname+'] '
+ mlist.max_message_size = 0
+
+ mlist.Save()
+ mlist.Unlock()
+ check_options(vhost,listname,True)
+ mass_subscribe(vhost,listname,members)
+ except:
+ raise
+ return 0
+ return 1
+
+uid = getpwnam(mm_cfg.MAILMAN_USER)[2]
+gid = getgrnam(mm_cfg.MAILMAN_GROUP)[2]
+
+if not os.getuid():
+ os.setregid(gid,gid)
+ os.setreuid(uid,uid)
+
+if ( os.getuid() is not uid ) or ( os.getgid() is not gid):
+ sys.exit(0)
+
+opts, args = getopt.getopt(sys.argv[1:], 'f')
+for o, a in opts:
+ if o == '-f' and os.fork():
+ sys.exit(0)
+
+mysql = connectDB()
+
+#-------------------- LOGIC ---------------------
+
+mysql.execute ("""SELECT a.id, a.alias, d.topic, d.bienvenue,
+ FIND_IN_SET('publique',d.type) AND NOT FIND_IN_SET('promo',d.type) AS advertised,
+ (1-FIND_IN_SET('freeins',d.type)) AS inslevel,
+ (1-FIND_IN_SET('libre',d.type))*2 AS modlevel
+ FROM aliases AS a
+ INNER JOIN listes_def AS d USING(id)
+ WHERE a.type='liste'""")
+lists = mysql.fetchall()
+i=0
+l=len(lists)
+
+for id,alias,desc,welcome,advertise,inslevel,modlevel in lists:
+ mysql.execute ( """SELECT a.alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( a.id=u.user_id AND a.type='a_vie' )
+ INNER JOIN listes_mod AS m ON ( m.idu=u.user_id AND m.idl='%i' )""" %(id) )
+ owners = map(lambda x: x[0]+'@polytechnique.org', mysql.fetchall())
+ if owners == []: owners = ['listes@m4x.org']
+ if desc.startswith('ADMIN/'): owners=[mm_cfg.ADMIN_ML_OWNER]
+ mysql.execute ( """SELECT CONCAT(u.prenom, ' ',u.nom),a.alias
+ FROM auth_user_md5 AS u
+ INNER JOIN aliases AS a ON ( a.id=u.user_id AND a.type='a_vie' )
+ INNER JOIN listes_ins AS m ON ( m.idu=u.user_id AND m.idl='%i' )""" %(id) )
+ members = mysql.fetchall()
+ create_list('polytechnique.org',alias,desc,advertise,modlevel,inslevel,owners,members)
+ set_options('polytechnique.org',alias,['welcome_msg'],{'welcome_msg':welcome})
+ i = i+1
+ print ("""[%3i/%i] '%s' created""" %(i,l,alias))
+
+# vim:set et:
--- /dev/null
+#!/usr/bin/env python
+#***************************************************************************
+#* Copyright (C) 2004 polytechnique.org *
+#* http://opensource.polytechnique.org/ *
+#* *
+#* This program is free software; you can redistribute it and/or modify *
+#* it under the terms of the GNU General Public License as published by *
+#* the Free Software Foundation; either version 2 of the License, or *
+#* (at your option) any later version. *
+#* *
+#* This program is distributed in the hope that it will be useful, *
+#* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+#* GNU General Public License for more details. *
+#* *
+#* You should have received a copy of the GNU General Public License *
+#* along with this program; if not, write to the Free Software *
+#* Foundation, Inc., *
+#* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+#***************************************************************************
+
+import base64, MySQLdb, os, getopt, sys, MySQLdb.converters, sha
+
+sys.path.append('/usr/lib/mailman/bin')
+
+from pwd import getpwnam
+from grp import getgrnam
+
+from SimpleXMLRPCServer import SimpleXMLRPCServer
+from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
+
+import paths
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import Message
+from Mailman import Errors
+from Mailman import mm_cfg
+from Mailman import i18n
+from Mailman.UserDesc import UserDesc
+from Mailman.ListAdmin import readMessage
+from email.Iterators import typed_subpart_iterator
+
+names = Utils.list_names()
+for listname in names:
+ try:
+ mlist = MailList.MailList(listname,lock=0)
+ except:
+ print 'ERROR '+listname
+ continue
+ try:
+ print 'BEGIN '+listname
+ mlist.Lock()
+ mlist.header_filter_rules = []
+ mlist.header_filter_rules.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False))
+ print ' set new bogofilter policy'
+ mlist.Save()
+ mlist.Unlock()
+ print 'END'
+ except:
+ mlist.Unlock()
+ print 'ERROR '+listname
+
+
+# vim:set et:
--- /dev/null
+-- MySQL dump 9.11
+--
+-- Host: localhost Database: x4dat
+-- ------------------------------------------------------
+-- Server version 4.0.21-log
+
+--
+-- Table structure for table `newsletter`
+--
+
+DROP TABLE IF EXISTS `newsletter`;
+CREATE TABLE `newsletter` (
+ `id` int(11) NOT NULL auto_increment,
+ `date` date NOT NULL default '0000-00-00',
+ `titre` varchar(255) NOT NULL default '',
+ `bits` enum('sent','new') NOT NULL default 'new',
+ `head` mediumtext NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM COMMENT='liste des NL envoyes';
+
+--
+-- Dumping data for table `newsletter`
+--
+
+INSERT INTO `newsletter` VALUES (3,'2001-11-04','Lettre n°3 de Polytechnique.org : novembre 2001','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 3ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (4,'2001-12-22','Lettre n°4 de Polytechnique.org : décembre 2001','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 4ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (5,'2002-03-01','Lettre n°5 de Polytechnique.org : mars 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 5ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (6,'2002-04-01','Lettre n°6 de Polytechnique.org : avril 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 6ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (7,'2002-05-02','Lettre n°7 de Polytechnique.org : mai 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 7ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (9,'2002-07-01','Lettre n°9 de Polytechnique.org : juillet 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 9ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (8,'2002-06-02','Lettre n°8 de Polytechnique.org : juin 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 8ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (13,'2002-11-01','Lettre n°13 de Polytechnique.org : novembre 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 13ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (14,'2002-12-02','Lettre n°14 de Polytechnique.org : décembre 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 14ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (15,'2003-01-02','Lettre n°15 de Polytechnique.org : janvier 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 15ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (21,'2003-07-10','Lettre n°21 de Polytechnique.org : juillet 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 21ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (20,'2003-06-01','Lettre n°20 de Polytechnique.org : juin 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 20ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (19,'2003-04-27','Lettre n°19 de Polytechnique.org : mai 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 19ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (18,'2003-04-01','Lettre n°18 de Polytechnique.org : avril 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 18ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (35,'2004-09-01','Lettre n°34 de Polytechnique.org : septembre 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 34ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (29,'2004-03-01','Lettre n°29 de Polytechnique.org : mars 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 29ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (36,'2004-10-01','Lettre n°35 de Polytechnique.org : octobre 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 35ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (26,'2003-12-30','Lettre n°26 de Polytechnique.org : décembre 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 26ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (27,'2004-01-01','Lettre n°27 de Polytechnique.org : janvier 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 27ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (25,'2003-10-25','Lettre n°25 de Polytechnique.org : novembre 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 25ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (22,'2003-09-01','Lettre n°22 de Polytechnique.org : septembre 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 22ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (24,'2003-10-01','Lettre n°24 de Polytechnique.org : octobre 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 24ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (30,'2004-03-08','Lettre exceptionnelle \"speciale virus\"','','');
+INSERT INTO `newsletter` VALUES (31,'2004-04-01','Lettre n°30 de Polytechnique.org : avril 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 30ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (32,'2004-05-01','Lettre n°31 de Polytechnique.org : mai 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 31ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (33,'2004-06-01','Lettre n°32 de Polytechnique.org : juin 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 32ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (34,'2004-07-01','Lettre n°33 de Polytechnique.org : juillet 2004','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 33ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (28,'2004-02-01','Lettre n°28 de Polytechnique.org : février 2004','','<cher> <prenom>,\r\n \r\nL\'équipe de Polytechnique.org est fière de te présenter la 28ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (23,'2003-09-24','Réseaux polytechniciens, réseau Internet : même combat ?','','<cher> <prenom>,\r\n\r\nVoici une lettre d\'information exceptionnelle du site Polytechnique.org.\r\n');
+INSERT INTO `newsletter` VALUES (1,'2001-04-24','Lettre n°1 de Polytechnique.org : avril 2001','','<cher> <prenom>,\r\n \r\n L\'équipe de Polytechnique.org est fière de te présenter la 1ère lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (2,'2001-09-28','Lettre n°2 de Polytechnique.org : octobre 2001','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 2ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (12,'2002-10-01','Lettre n°12 de Polytechnique.org : octobre 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 12ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (16,'2003-02-01','Lettre n°16 de Polytechnique.org : février 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 16ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (10,'2002-08-01','Lettre n°10 de Polytechnique.org : août 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 10ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (11,'2002-09-02','Lettre n°11 de Polytechnique.org : septembre 2002','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 11ème lettre d\'information des polytechniciens sur le net.');
+INSERT INTO `newsletter` VALUES (17,'2003-03-01','Lettre n°17 de Polytechnique.org : mars 2003','','<cher> <prenom>,\n\nL\'équipe de Polytechnique.org est fière de te présenter la 17ème lettre d\'information des polytechniciens sur le net.');
+
--- /dev/null
+-- MySQL dump 9.11
+--
+-- Host: localhost Database: x4dat
+-- ------------------------------------------------------
+-- Server version 4.0.21-log
+
+--
+-- Table structure for table `newsletter_art`
+--
+
+DROP TABLE IF EXISTS `newsletter_art`;
+CREATE TABLE `newsletter_art` (
+ `id` int(10) unsigned NOT NULL default '0',
+ `aid` smallint(5) unsigned NOT NULL default '0',
+ `cid` smallint(5) unsigned NOT NULL default '0',
+ `pos` tinyint(3) unsigned NOT NULL default '0',
+ `title` mediumtext NOT NULL,
+ `body` mediumtext NOT NULL,
+ `append` mediumtext NOT NULL,
+ PRIMARY KEY (`id`,`aid`)
+) TYPE=MyISAM;
+
+--
+-- Dumping data for table `newsletter_art`
+--
+
+INSERT INTO `newsletter_art` VALUES (1,7,3,7,'Initiation aux nouvelles technologies pour les X','A l\'initiative de la Maison des X, du Collège de l\'X et du GPX, des réunions de sensibilisation aux NTIC à usage domestique vont être organisées. Ces sessions se veulent très pratiques (comment utiliser une messagerie, un traitement de texte...) pour des besoins personnels. Des séances plus sophistiquées pourront être organisées plus tard en fonction des réponses (que dire de la confidentialité sur Internet, comment utiliser le cryptage, qui est anonyme sur l\'Internet et qui ne l\'est pas, l\'espionnage sur les réseaux, autant de thèmes qui peuvent faire l\'objet d\'une initiation).\r\n\r\nLe GPX et la Maison des X se chargent de faire les annonces par leur bulletin et par la Jaune et Rouge. L\'équipe de Polytechnique.org a été sollicitée, à la fois pour faire passer le message, mais aussi pour participer à la transmission de compétences \"nouvelles technologies\" à ceux qui le souhaitent. Vous en saurez plus prochainement.','');
+INSERT INTO `newsletter_art` VALUES (1,6,3,6,'Infos maison des X','Si vous ne connaissez pas la maison des X, sachez que \"Le Club\", son restaurant gastronomique accueille les X sur réservation, à des tarifs attractifs (180 Frs le menu pour un X, 120 Frs si tu es étudiant de l\'X ou d\'une école d\'application).\r\nConsultez le site http://www.maison-des-x.com pour plus de renseignements.\r\n','Dominique DESCROIX, X58');
+INSERT INTO `newsletter_art` VALUES (1,5,1,5,'Performance de l\'email','La qualité d\'un reroutage dépend de la qualité de l\'email final. Aussi nous avons mis en place des statistiques pour mesurer l\'efficacité des serveurs de mail que vous utilisez. L\'objectif étant notamment d\'éviter les serveurs qui perdent des mails chaque semaine (caramail...).\r\nCes statistiques sont mêmes mélangées à la performance des emails de vos entreprises puisque nous en disposons.\r\n','http://www.polytechnique.org/parselogN.php');
+INSERT INTO `newsletter_art` VALUES (1,4,1,4,'Sponsoring','Polytechnique.org tient à remercier Laurent MALHOMME, X92 et la société Certplus SA, filiale française du groupe américain Verisign, qui nous a offert la certification de sécurité du site Polytechnique.org. Vous pouvez dorénavant vous connecter à notre site par des échanges cryptés à 128bits, ce qui assurera une confidentialité des communications.\r\n','http://www.certplus.com');
+INSERT INTO `newsletter_art` VALUES (1,3,1,3,'Avancement avec l\'AX','Suite au sondage effectué auprès de vous en janvier, nous avons proposé à l\'AX de lui fournir les données de chaque X quand celui-ci modifie son profil sur le site polytechnique.org afin de mettre à jour l\'annuaire papier, et l\'AX nous a donné son accord pour prendre en compte ces données. Cette fonction sera donc prête très prochainement.\n\n','');
+INSERT INTO `newsletter_art` VALUES (1,1,1,1,'Listes de diffusion','Le site Polytechnique.org vient de se doter de nouveaux services en ligne.\r\nNos 4400 inscrits peuvent maintenant utiliser un service de mailing-list.\r\nConçu au départ pour les binets, groupes X et associations, ce service connaît depuis sa sortie une croissance importante. Nous venons d\'ouvrir des mailing-lists promo, qui sont modérées, la plupart du temps par la Kès de chaque promo. Quel meilleur moyen d\'organiser une réunion promo ou d\'essayer de maintenir un petit lien avec sa promo que de recevoir quelques fois dans l\'année des news sur un email promo?\r\nDe nombreuses promos n\'ont pas encore de modérateurs, manifestez-vous auprès de nous.\r\n','http://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (1,2,1,2,'Annuaire des X','Autre innovation du site : les champs de l\'annuaire on-line collent maintenant à ceux de l\'annuaire papier. La consultation s\'est enrichie de nombreuses options.\r\nMerci de mettre vite à jour vos fiches en vous connectant sur le site.\r\n','http://www.polytechnique.org/profil.php');
+INSERT INTO `newsletter_art` VALUES (3,1,1,1,'Adresses de Redirection :','Le nombre d\'adresses de redirection de ton adresse prénom.nom@polytechnique.org (et @m4x.org, c\'est la même chose) est maintenant ILLIMITÉ, avec en plus la possibilité d\'activer et de désactiver chaque adresse en quelques clics.\nVoir la rubrique \"Emails\" du menu.\n\n','');
+INSERT INTO `newsletter_art` VALUES (3,2,1,2,'Ré-écriture de l\'adresse d\'expéditeur :','Parfois, tu ne peux pas choisir l\'adresse d\'expéditeur que tu utilises ; dorénavant, pour les destinataires sur polytechnique.org, si tu utilises une des adresses de redirection que tu as indiquées dans la rubrique \"Emails\", celle-ci sera remplacée par ton adresse prenom.nom@polytechnique.org.\nVoir la rubrique \"Emails\" du menu.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (3,3,3,3,'X-Israël','Polytechnique.org est heureux de vous annoncer la création sur Polytechnique.org du groupe X-Israël.\nVisite son site http://x-israel.polytechnique.org/\n\n','');
+INSERT INTO `newsletter_art` VALUES (3,4,3,4,'X-Asie','À l\'initiative de Jérôme Fourel (X92) et Jean-Philippe Vert (X92), le groupe X-Asie est en cours de formation et a besoin de ton soutien.\r\nSon but est de tisser un réseau orienté business et culture entre ceux qui sont en Asie et ceux qui veulent pénétrer ces marchés ou nouer des partenariats.\r\nSi tu es intéressé par les pays asiatiques en général ou si tu vis en Asie, contacte-les !','membres@x-asie.polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (3,5,3,5,'Groupe X-eConfiance','Les listes eTrustPKI et eTrustMarket, créées en juillet dernier, ont connu un succès inespéré : plus de 70 camarades s\'y sont inscrits en très peu de temps. Le sujet, il est vrai, en vaut la peine. Il s\'agit tout simplement de réfléchir aux outils et enjeux de la Confiance dans le e-business. Devant l\'importance de cet enjeu, il est apparu essentiel d\'élargir la réflexion aux générations les plus expérimentées de notre communauté X. C\'est pourquoi, avec quelques uns, nous avons décidé de postuler auprès de l\'AX pour la création du groupe X-eConfiance.\nUn premier pot amical, le mercredi 7 novembre de 18h à 20h à la Maison des X, réunira les membres sympathisants de ce futur groupe qui auront pu se libérer ce jour là, et permettra de faire connaissance. Enfin, un site web est en cours de création ( http://X-eConfiance.polytechnique.org/ ) pour faciliter échange d\'infos, newsgroups, etc.\nPour tout renseignement, matthieu.bergot@m4x.org .\n \n\n','');
+INSERT INTO `newsletter_art` VALUES (3,6,4,6,'Opération \"Beaujolais Nouveau\" à la Maison des X','Cette soirée amicale et conviviale aura lieu le vendredi 16 novembre à partir de 20 h (apéritif et dîner). Elle se déroulera dans les caves voûtées du Styx et sera animée par les Compagnons du Beaujolais. L\'Union interprofessionnelle nous fournira le liquide nécessaire en quantité suffisante !\nLa soirée est ouverte à toutes les promotions, et vous pouvez bien entendu venir en famille et ou entre amis. N\'hésitez pas non plus à en parler à nos camarades qui n\'ont peut être pas encore Internet, ça existe!\nLa date : vendredi 16 novembre à partir de 20 h\nLe lieu : maison des X 12 rue de Poitiers 75007 PARIS\nLe prix : 190 francs TTC par personne (la boisson est bien sûr\ncomprise) ou 28,97 euros.\nComment s\'inscrire ?\nPar courrier à la maison des X (préciser sur l\'enveloppe \"Soirée beaujolais\" cela facilitera les choses). Merci de joindre votre chèque Par internet, en attendant d\'envoyer votre chèque mais en précisant bien le nombre de personnes à direction@maison-des-x.com , ou par fax au 01 49 54 74 84 .\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (4,1,1,1,'Fetes de fin d\'année','En cette fin d\'année 2001 riche en événements, nous souhaitons à l\'ensemble de la communauté polytechnicienne de joyeuses fêtes, et une année 2002 pleine d\'innovations, de développement et d\'aboutissements.\r\n','Association Polytechnique.org\r\n\"Le portail des élèves & anciens élèves de l\'X\"\r\nhttp://www.polytechnique.org/contacts.php');
+INSERT INTO `newsletter_art` VALUES (4,2,1,2,'Demande d\'idées','Les domaines melix.net et melix.org sont gérés par l\'association et nous aimerions proposer des alias libres dans ces domaines, avec une éventuelle limite de trois par personne.\r\n\r\nDe plus les domaines carva.net et carva.org ont aussi été acquis, as-tu une idée de l\'utilisation que nous pourrions faire de ces domaines ?\r\n\r\nN\'hésite pas à nous faire part de tes idées !\r\n','innovation@polytechnique.org?subject=melix_carva');
+INSERT INTO `newsletter_art` VALUES (4,3,1,3,'Ré-écriture de l\'adresse d\'expéditeur','Le mois dernier nous avons mis en place un système de réécriture de l\'adresse d\'expéditeur pour les destinataires en polytechnique.org, mais il nous a été demandé de laisser le choix de faire cette réécriture ou pas, et quand elle est faite, de choisir l\'adresse par laquelle est remplacée (@polytechnique.org ou @m4x.org).\r\n\r\nCette réécriture est disponible depuis le 7 novembre 2001.\r\n','https://www.polytechnique.org/emails.php');
+INSERT INTO `newsletter_art` VALUES (4,4,1,4,'Recherche dans l\'annuaire','Il est maintenant possible, en plus des tris déjà existants, de trier les résultats selon la date de dernière mise à jour, la plus récente en premier.\r\n','https://www.polytechnique.org/search.php');
+INSERT INTO `newsletter_art` VALUES (4,5,1,5,'SPAM','\nPolytechnique.org te protège des messages non sollicités (SPAM) envoyés à un grand nombre de destinataires (générés par exemple en prenant la liste des diplômés et en formant les adresses prenom.nom@polytechnique.org).\nCependant, un SPAM isolé ne peut être détecté par cette méthode et ton adresse email peut être obtenue par les spammeurs à diverses occasions. Par exemple, si tu écris sur une liste de diffusion publique (autre que celles proposées sur Polytechnique.org) qui archive ces messages et publie les archives sur le web, il est très simple de récupérer ton adresse. Si tu t\'inscris sur un site quelconque avec ton adresse, elle peut aussi être spammée.\n\nPour éviter ce désagrément, utilise le + ou le _ pour donner une adresse différente à chaque endroit. Ainsi, si tu reçois du SPAM à cette adresse, tu pourras facilement le filtrer (un système de filtre sera prochainement mis en place sur Polytechnique.org pour\n\n\nfiltrer « [i]à la source[/i] »).\nVoir https://www.polytechnique.org/EmailOutils.php (en bas).\n\nSi tu reçois un message que tu considères comme du SPAM, c\'est-à-dire non sollicité, n\'hésite pas à nous transmettre le message, nous mettrons en place des systèmes de filtre des expéditeurs en question. Un certain nombre d\'expéditeurs sont déjà répertoriés sur notre liste noire.\n\nPour nous transmettre un message, envoie-nous le message [b]complet[/b] en pièce jointe, ainsi nous disposerons des informations nécessaires pour bannir le spammer efficacement. Sous Outlook Express, clic droit sur le message puis \"Transmettre en attachement\" ; sous Netscape, clic droit sur le message puis \"Faire suivre en tant que fichier joint\".\nMerci d\'avance.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (4,6,3,6,'X-Biotech :','Enjeux, applications et recherche concernant des domaines biotech\n(environnement/agro/pharmacie/médecine).\nCette liste est en inscription libre (cochez la case [i]ad hoc[/i]) :\nhttps://www.polytechnique.org/listes/\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (4,7,4,7,'FX','La Fondation de l\'Ecole polytechnique a lancé depuis juin 2001 son Concours FX-CREATEUR2002, destiné à récompenser le projet de création d\'entreprise le plus intéressant présenté.\r\nLe prix sera attribué en décembre 2002, et aidera ses créateurs par la notoriété qu\'ils en tireront. Les dossiers devront parvenir à la Fondation avant le 31 octobre 2002, pour les diplômés ou docteurs de l\'Ecole polytechnique, ainsi que les thésards dans les laboratoires de l\'Ecole. Il faut être agé de moins de 35 ans.','web : http://www.fondationx.org/\r\ntél/fax : 01 53 85 40 10 / 01 53 85 40 11\r\nmail : fondation@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (5,1,1,1,'Plus de clarté','Les différentes rubriques du site ont été réorganisées. Le site est désormais plus clair et l\'accès aux fonctionnalités est facilité.\r\n','https://www.polytechnique.org/login.php');
+INSERT INTO `newsletter_art` VALUES (5,2,1,2,'Adresse web : la redirection','Il est désormais possible d\'avoir son site web avec une adresse du type : http://www.carva.org/prenom.nom .\nDe plus amples informations sont disponibles sur :\nhttps://www.polytechnique.org/acces_redirect.php\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (5,3,1,3,'Et toujours... le multiroutage !','Polytechnique.org proposait initialement un bi-reoutage du mail. Aujourd\'hui, ton adresse prenom.nom@polytechnique.org peut renvoyer vers autant de boîtes mails que tu le désires, avec réécriture éventuelle de l\'expéditeur.\r\n','https://www.polytechnique.org/emails.php');
+INSERT INTO `newsletter_art` VALUES (5,4,3,4,'X-Israël','Le Groupe X-Israël organise un diner-débat le lundi 11 mars au soir avec Marcel Shaton, directeur général de l\'ISERD, organisme du Gouvernement israélien chargé de coordonner la participation d\'Israël au 5ème Programme Cadre de R&D de l\'Union européenne. Marcel Shaton évoquera les succès de la coopération scientifique et technologique entre l\'Union européenne et Israël.','Renseignements et inscriptions : info@x-israel.polytechnique.org\r\nX-Israel: http://x-israel.polytechnique.org/\r\nISERD: http://www.iserd.org.il/NewIserd/indexNonIsraeli.htm\r\n5ème PCRD: http://www.europa.eu.int/comm/research/fp5_fr.html');
+INSERT INTO `newsletter_art` VALUES (5,5,3,5,'X-Asie','Le site web est là ! Cette première version s\'étoffera par la suite (forums en ligne, mailing-lists, \"portail\",...), en fonction des actions décidées par les membres du groupe.\r\n','http://x-asie.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (5,6,4,6,'Bal de l\'X','Pour sa 112ème édition, le bal de l\'X quitte l\'Opéra Garnier pour la Grande Halle de la Villette. Le spectacle prévu est un opéra baroque d\'Antonio Vivaldi, [i]La Senna Festeggiante[/i]. De nombreux autres spectacles s\'y ajouteront tout au cours de la nuit : théâtre de rue, animations, musique (jazz, musique de chambre, discothèque...).\nAlors pensez à réserver votre soirée du 28 juin !\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (5,7,4,7,'Communiquer ton mail à l\'AX','Lorsque tu communiques ton mél à l\'AX, utilise préférentiellement ton adresse en polytechnique.org, plutôt que celle en m4x.org (qui n\'a pas vocation à être largement affichée).\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (5,8,4,8,'Fondation X','A tous les anciens élèves des promos 92 à 96\r\n\r\nCher, Chère Camarade,\r\nPour honorer la mémoire de Pierre Faurre disparu en 2001, qui fut membre de l\'Académie des Sciences et Président du Conseil d\'Administration de l\'École polytechnique, plusieurs grandes entreprises membres de la Fondation ont constitué un fonds permettant de décerner annuellement un prix Pierre Faurre destiné à distinguer un jeune polytechnicien dont le début de carrière dans l\'industrie apparaît particulièrement prometteur.\r\nLes Directions des entreprises qui sont appelées à adresser à la Fondation, avant fin mai 2002, les candidatures qu\'elles présentent.\r\nSi tu estimes que ton parcours peut justifier d\'être pris en compte dans ce processus, fais le savoir à la Direction de ton entreprise pour qu\'elle fasse le nécessaire : elle sera probablement sensible à l\'aspect notoriété de ce prix.\r\nLa Direction des entreprises qui soutiennent habituellement la Fondation ou qui viennent au Forum aura reçu directement une lettre sur le sujet mais elle n\'ont pas l\'exclusivité.\r\n','Paul COMBEAU, Délégué Général (X 47)\r\nhttp://www.fondationx.org/');
+INSERT INTO `newsletter_art` VALUES (6,1,1,1,'Version c0w3oy2','Après le système de \"skins\", le site propose maintenant sa version c0w3oy2.','http://www.polytechnique.org/l0gin.php');
+INSERT INTO `newsletter_art` VALUES (6,2,1,2,'Et toujours... le couteau suisse des groupes X !','polytechnique.org propose aux groupes X des outils facilitant la gestion internet : adresse web, mailing-lists, visibilité, pour un groupe X branché !','adresse web : https://www.polytechnique.org/groupex.php\r\nmailing-lists : https://www.polytechnique.org/listes/\r\nvisibilité : http://asso.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (6,3,1,3,'Et toujours... le forum en ligne des petites annonces !','https://www.polytechnique.org/forums/Forum.php?Forum=PA\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (6,4,3,4,'Nouveau groupe X : X-US/Canada','Cher(e) camarade, nous sommes heureux d\'annoncer la création officielle du groupe X-US/Canada. Notre objectif est de favoriser le développement des entreprises françaises dans la région d\'Amérique du Nord, sans pour autant oublier la composante culturelle. Le site web est actuellement en construction. Pour l\'instant, tu peux t\'inscrire en envoyant un mail au bureau : bureau@x-us.polytechnique.org?subject=Inscription\nSi tu es intéressé, tu devras t\'inscrire à la liste xus-creation@polytechnique.org en allant sur la page des listes.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (6,5,3,5,'G.P.X : newsletter','Notre mailing-list s\'enrichit d\'une nouvelle newsletter, celle du Groupe Parisien des X. Si tu veux être informé des diverses activités du GPX et recevoir son bulletin mensuel GPX-Contact, inscris-toi à la newsletter-gpx en allant sur https://www.polytechnique.org/listes/ .\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (6,6,4,6,'Petit Déjeuner Polytechnicien : 3 avril 2002','Le prochain petit déjeuner polytechnicien se déroulera le mercredi 3 avril 2002 de 8h à 9h30, à la Maison des X. L\'invité sera Jean-Luc Lagardère.\r\n','Inscriptions au 01 47 20 62 81');
+INSERT INTO `newsletter_art` VALUES (6,7,4,7,'Jumping de l\'X 2002 : 27-28-29 avril 2002','http://www.polytechnique.fr/eleves/binets/jumping/\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (6,8,4,8,'Point Gamma 2002 : le 25 mai 2002 !','http://pointgamma.polytechnique.org/\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (6,9,4,9,'Bal de l\'X le 28 juin 2002','Pour sa 112ème édition, le bal de l\'X quitte l\'Opéra Garnier pour la Grande Halle de la Villette. Le spectacle principal prévu est [i]La Senna Festeggiante[/i], un opéra baroque d\'Antonio Vivaldi. De nombreux autres spectacles s\'y ajouteront...\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (8,1,1,1,'Nouveau site','L\'équipe de poly.org te prépare un nouveau site ! Au programme, des fonctionnalités nouvelles, mais aussi une petite surprise... ;-)\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (8,2,1,2,'Qualité du service','Quelques interruptions de services sont apparues durant le mois de mai ; elles sont liées au réseau sur lequel nos machines sont connectées. Les mails envoyés ou reçus par l\'intermédiaire de poly.org ne sont jamais perdus, ils sont retardés, ou, dans le pire des cas, l\'expéditeur est informé que l\'envoi n\'a pas encore pu être effectué.\nL\'équipe de poly.org suit de près ces événements et fait son possible pour les résoudre promptement.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (8,3,3,3,'Assemblée Générale de l\'AX','L\'AG se tiendra mardi 18 juin 2002 à l\'ENSTA (amphi Charles Renard)\r\nà partir de 17 heures.\r\n1ère partie - rapport moral et comptes\r\n2nde partie - débat sur la communauté polytechnicienne (18:00)\r\nL\'AG se terminera par un verre de l\'amitié (19:30).\r\n','Comment s\'y rendre :\r\n32, bd Victor Paris XV\r\nAccès par le bus PC1, métro 8 Balard ou RER C bd Victor.');
+INSERT INTO `newsletter_art` VALUES (8,4,3,4,'Groupement Parisien des X','Le GPX organise une [b]randonnée pédestre[/b] dimanche 9 juin, de Gazeran à Rambouillet en passant par les rochers et les étangs d\'Angennes (soit environ 20km).\r\n','Renseignements auprès de Michel Marx (57) : 1 45 32 27 81.');
+INSERT INTO `newsletter_art` VALUES (8,5,3,5,'X-Histoire et Archéologie','Une manifestation est prévue le mercredi 12 juin. L\'invitée sera Marguerite Harl, professeur émérite à la Sorbonne et auteur de [i]La bible des Septante[/i], qui retrace l\'histoire de la traduction en grec des cinq premiers livres de la Bible.\r\n','Renseignements au 1 42 50 65 57.');
+INSERT INTO `newsletter_art` VALUES (8,6,3,6,'X-Environnement','Le groupe vous invite à une réunion-débat sur [b]le bruit[/b] le 12 juin à 18 heures à la Maison des X. Jean-Marc Jancovici (81) animera le débat, ainsi que Jacques Lambert (directeur de recherche à l\'INRETS), Alain Muzet (directeur du Centre d\'études de physiologie appliquée du CNRS) et Pascal Lemonnier (chef de la Mission bruit du ministère de l\'Environnement).\r\n','http://www.x-environnement.org/');
+INSERT INTO `newsletter_art` VALUES (8,7,3,7,'Assemblée Générale de X-Résistance','L\'AG 2002 de l\'association X-Résistance se tiendra vendredi 21 juin à 18 heures, à la Maison des X, (12, rue de Poitiers Paris VII).\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (8,8,3,8,'Appel X-Internet','Lors de la dernière réunion X-Internet le jeudi 30 mai, une idée de projet est apparue. Il s\'agit pour les Anciens de profiter du savoir des Anciens plus jeunes. Si tu es demandeur ou volontaire bénévole, contacte-nous et nous ferons suivre : info_vc@m4x.org.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (8,9,3,9,'Groupement Parisien des X','Un club micro-informatique est en cours de création à la Maison des X avec le concours du Collège de Polytechnique. Il a pour but de permettre à ses membres de se perfectionner, chacun dans les utilisations qui l\'intéressent. Ce club aura trois types d\'activités - des réunion avec démonstrations sur des sujets choisis,\r\n - un réseau de messagerie réservé aux membres,\r\n - des séances classiques de formation.\r\n','gpx@polytechnique.org ou par téléphone 1 45 48 52 04.');
+INSERT INTO `newsletter_art` VALUES (8,10,4,10,'Record de l\'heure','Le record de l\'heure aura lieu mercredi 5 juin sur la circulaire de l\'X. Le principe est de parcourir la plus grande distance en vélo en une heure. Cette épreuve organisée par le [b]Binet Vélo[/b] est ouverte à tous : pratiquants occasionnels ou mordus. De nombreux vélos de course, VTT et tandems seront disponibles en prêt gratuit. La participation est gratuite, ainsi que le barbecue après la course.\r\n','Pour toutes questions, romain.beaume@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (8,11,4,11,'Raid Gauloises','Après leur retour du Vietnam, le [b]binet Raid Gauloises[/b] vous invite à assister à la présentation du déroulement de cette épreuve mercredi 5 juin à 18:30 en amphi Monge à l\'École.\r\nUn cocktail au salon de Marbre sera ensuite offert.\r\n','http://www.polytechnique.fr/eleves/binets/grgx/');
+INSERT INTO `newsletter_art` VALUES (8,12,4,12,'Drive In de l\'X','Retrouve l\'ambiance du Drive In , les jeudi 13 et vendredi 14 juin.\r\nDe nombreuses animations se dérouleront sur le site de l\'École, ainsi que les [b]projections grand écran en plein air[/b] de [i]Matrix[/i] et du [i]Fabuleux destin d\'Amélie Poulain[/i].\r\n','http://www.polytechnique.fr/eleves/binets/drivein/');
+INSERT INTO `newsletter_art` VALUES (8,13,4,13,'Petit Déjeuner polytechnicien','Serge Tchuruk, PDG d\'Alcatel, sera présent à la Maison des X le mercredi 5 juin, dès 8 heures du matin. Il n\'y aura pas de PDX en juillet et en août.','Renseignements au 01 47 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (8,14,4,14,'Promo 91','Le repas de promotion des 10 ans se tiendra dimanche 23 juin.\nPour tout renseignement, contacte rapidement Dominique :\ndominique.labilloy@m4x.org.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (8,15,4,15,'Bal de l\'X','Le 112eme Bal de l\'X aura lieu le jeudi 28 juin 2002.\r\nNe ratez pas le premier bal du troisième millénaire !\r\n','http://bal.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (8,16,4,16,'Collège de Polytechnique','Le Collège, formation continue de l\'École polytechnique, élabore et organise des séminaires et des formations intensives pour les entreprises qui souhaitent perfectionner les cadres dirigeants et les ingénieurs.\r\n','http://www.collegepolytechnique.com/');
+INSERT INTO `newsletter_art` VALUES (11,1,1,1,'Interruptions de service : 7 septembre et 5 octobre','Les machines de polytechnique.org sont hébergées gracieusement par\nl\'École.\nDes coupures de courant électrique seront effectuées sur le site :\n - samedi 7 septembre de 9 à 17 heures,\n - samedi 5 octobre de 9 à 17 heures.\n\nLe site web ainsi que tous les services relatifs à polytechnique.org seront donc interrompus pendant les mêmes périodes.\nL\'Équipe de polytechnique.org vous présente d\'emblée ses excuses pour ces discontinuités de services indépendantes de sa volonté.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (11,2,3,2,'Groupement parisien des X','\nLa prochaine randonnée pédestre du GPX aura lieu le dimanche 8 septembre 2002, avec Jacqueline Brandeis (tél : +33 145 34 24 17). De Plaisir à Versailles, par la forêt de Bois-d\'Arcy et le bois de Satory, parcours vallonné de 22km. Il est possible d\'interrompre le trajet à Saint-Cyr (13km).\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (11,3,3,3,'X-Environnement','Le groupe X-Environnement vous invite à participer à la réunion-\r\n-débat organisée sur le thème :\r\n[u]Environnement et entreprises : éco-conception des produits[/u] , le mercredi 25 septembre 2002 de 18 à 20 heures à la Maison des X.\r\nL\'éco-conception des produits est caractérisée par une vision globale et une approche multi-critères de l\'environnement. Elle prend en compte l\'ensemble des étapes du cycle de vie d\'un produit.\r\nLe débat, préparé et animé par Gérard Idé, membre du bureau X-Environnement, sera introduit par trois conférenciers :\r\n + monsieur Dubois [i]Alcatel[/i] analysera les différents concepts de l\'éco-conception et ses méthodologies ;\r\n + monsieur Coste [i]Airbus-Industrie[/i] présentera des études de cas de réduction des nuisances à la source ;\r\n + monsieur du Sablon exposera le point de vue des associations de comsommateurs.','http://www.x-environnement.org/');
+INSERT INTO `newsletter_art` VALUES (11,4,3,4,'X-Europe','\nLe groupe \"X-Europe\" a été créé en 1989 à l\'initiative de Louis Leprince-Ringuet (X20), avec le soutien de Valéry Giscard d\'Estaing (X44), par des X désireux de promouvoir la construction européenne.\nNous avons aujourd\'hui besoin de bonnes volontés pour participer à notre réflexion et nous aider à accompagner les travaux de la Convention ; c\'est pourquoi nous invitons tous les volontaires à s\'inscrire sur notre liste de diffusion x-europe@polytechnique.org et à consulter notre site http://x-europe.polytechnique.org/.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (11,5,4,5,'C\'est la rentrée','Chacune des trois promos (re)peuple le plateau de Palaiseau. C\'est déjà le cas pour la promo 2001 (26 août), suivie de près par la promotion entrante X2002 (2 septembre) qui découvrira fugacement l\'École. La promotion 2000, quant à elle, retrouvera les kazerts le 23 septembre.\nL\'Équipe pousse un grand [i]Chic à la Rouje[/i] , et un non moins grand [i]Chic à la Jaune[/i] .\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (11,6,4,6,'Colloque Raymond Abellio aujourd\'hui','Le colloque se déroulera du 2 au 9 septembre au Centre Culturel International de Cerisy la Salle (Manche).\r\nRaymond Abellio est le pseudonyme de Georges Soulès (X27), écrivain et philosophe, auteur de quatre romans, de nombreux essais (dont [u]La Structure Absolue[/u] , Gallimard, 1965), et de trois tomes de Mémoires.\r\nL\'objet de ce colloque, organisé par Jean-Baptiste de Foucauld (ancien Commissaire au Plan) et Antoine Faivre (professeur à la Sorbonne), est d\'étudier les divers aspects de cette ?uvre qui se situent aux confins de la philosophie, de la science, de l\'éthique et de la spiritualité, et de s\'interroger sur son actualité.','Renseignements :\r\nCentre Culturel International de Cerisy\r\n+33 233 46 91 66\r\n50210 Cerisy la Salle\r\nhttp://www.ccic-cerisy.asso.fr/');
+INSERT INTO `newsletter_art` VALUES (11,7,4,7,'Promotion 92','Le Barbecue Promo X92 aura lieu le samedi 14 septembre à Palaiseau.','Contacts :\r\nJérôme Wagner jerome.wagner@m4x.org\r\nMarc Flender marc.flender@m4x.org ou +33 147 39 94 16.');
+INSERT INTO `newsletter_art` VALUES (11,8,4,8,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le mardi 10 septembre de 8h à 9h30 avec Francis MER (X59), Ministre de l\'Économie et des Finances.','Renseignements au +33 147 20 62 81 (après le 18 août).');
+INSERT INTO `newsletter_art` VALUES (11,9,4,9,'Cérémonie de la Flamme','L\'AX ravivera la Flamme à l\'Arc de Triomphe le lundi 14 octobre à 18:30 (le rassemblement devra être terminé pour 18:15).\nRetenez donc dès maintenant ce rendez-vous sur votre agenda, en particulier les membres des promos 92, 82, 72, 62, 52, 42 et 32. \n\n','');
+INSERT INTO `newsletter_art` VALUES (10,1,1,1,'Change de peau','C\'est l\'été, change de peau ! Toute l\'équipe de poly.org te souhaite des vacances reposantes et ensoleillées.\r\n','https://www.polytechnique.org/skins.php');
+INSERT INTO `newsletter_art` VALUES (10,2,3,2,'X-Côte basque','Déjeuner traditionnel des résidents du Pays basque (au sens large, géographiquement), permanents ou estivants, et de leurs conjoints, le samedi 24 août 2002.','[u]Renseignements[/u] : Armand Bouttier (50) 6, chemin de Grenouillette, 31170 Tournefeuille.\r\nTél et fax : 561 86 25 81\r\narmand.bouttier@wanadoo.fr');
+INSERT INTO `newsletter_art` VALUES (10,3,3,3,'Groupement parisien des X','La prochaine randonnée pédestre du GPX aura lieu le dimanche 8 septembre 2002, avec Jacqueline Brandeis (tél : 145 34 24 17). De Plaisir à Versailles, par la forêt de Bois-d\'Arcy et le bois de Satory, parcours valloné de 22km.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (10,4,4,4,'Petit Déjeuner polytechnicien','Le prochain PDX aura lieu le mardi 10 septembre de 8h à 9h30 avec Francis MER, Ministre de l\'Économie et des Finances.\nRenseignements au 147 20 62 81 (après le 18 août).\n\n','');
+INSERT INTO `newsletter_art` VALUES (9,1,1,1,'Bureau des carrières','\nLe Bureau des carrières est à la disposition des camarades recherchant un emploi ou réfléchissant à une nouvelle orientation de leur carrière professionnelle. Il est à leur écoute et leur propose ses services. Fort de son expérience professionnelle, le BK peut aussi répondre aux questions que se posent les jeunes polytechniciens avant leur premier emploi, ou, plus généralement, au moment où ils pensent à leur orientation et cherchent à définir leur projet professionnel.\n\nLes nouvelles offres d\'emploi disponibles sont résumées et publiées dans des listes bimensuelles ; il est possible de les obtenir (cotisation de 30EUR pour six mois sauf cas particulier, permettant aussi leur consultation au jour le jour sur le site web du BK).\n\nhttp://carriere.polytechnique.org/\n\nLes camarades intéressés par ces offres s\'adressent directement au BK, par lettre, fax, téléphone ou Internet, pour avoir communication des offres détaillées et des détails nécessaires (cabinet de recrutement concerné, personne à contacter, etc.). Ils contactent ensuite directement les offreurs s\'il y a lieu.\n\nPar ailleurs, le BK publie dans [i]La Jaune et la Rouge[/i] et sur son site web sous forme de mini-CV, les demandes de situations des camarades qui le souhaitent.\n\nDans le cadre de la solidarité polytechnicienne, des responsables opérationnels en activité ont, en outre, accepté de conseiller les camarades, que leur adresse le BK.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (9,2,1,2,'Du nouveau sur les retraites des X','L\'AX informe depuis plusieurs années les X pantouflards sur les droits à la retraite générés par les trois années passées par eux à l\'École. Une brochure a été éditée par l\'AX sur le sujet, mise à jour régulièrement dans le passé ; elle est aujourd\'hui remplacée par un texte qui figure sur le site internet de l\'AX :\r\nhttp://www.polytechniciens.com/\r\npuis rubrique \'Services de l\'AX\' - \'Retraite\'.\r\n\r\nDans ce texte il est en particulier indiqué la justification des trois ans à l\'École validés pour le régime de retraite pour la Sécurité Sociale.\r\n\r\n','Un lien direct est disponible pour impression :\r\nhttp://www.polytechniciens.com/index.php?page=serv_retraite.html');
+INSERT INTO `newsletter_art` VALUES (9,3,1,3,'Appel','Faisant suite à l\'appel dans la dernière newsletter (il s\'agit pour les Anciens de profiter du savoir des Anciens plus jeunes, en particulier en informatique), de nombreux volontaires se sont manifestés. Si tu es demandeur ou volontaire bénévole, contactenous et nous ferons suivre : info_vc@m4x.org.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (9,4,1,4,'Qualité du service','Dans un souci de transparence, l\'équipe de poly.org a mis en place une page présentant les interruptions de service de Poly.org qui ont été constatées ou qui sont prévues. Il est à noter qu\'à ce jour, la quasi-totalité des coupures proviennent de défaillances du réseau de l\'École, où nos serveurs sont hébergés, et que ces coupures sont rares comparées à d\'autres services présentant les outils de poly.org .\r\n','https://www.polytechnique.org/coupures.php');
+INSERT INTO `newsletter_art` VALUES (9,5,3,5,'X-Inde','L\'organisation au sein d\'X-Asie de groupes-Pays (X-Japon, X-Chine, X-Vietnam, X-Océan Indien) s\'est poursuivie en juin avec la naissance d\'X-Cambodge animé par Alain Goye (85) et d\'X-Inde animé par Jean-Luc Minet (96).\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (9,6,3,6,'Groupement Parisien des X','La prochaine randonnée pédestre du GPX aura lieu le dimanche 7 juillet 2002, avec Gilbert Grandil (61).\nBoucle de 25km au départ de la gare de Cognières, en passant devant les hangars agricoles du hameau des Hautes-Bruyères, par le bois domanial des Plainvaux, la forêt de Rambouillet, les Mesnuls, Saint-Rémy-l\'Honoré. Le total des dénivellations est d\'environ 280m.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (9,7,3,7,'X-Léman','Ce groupe, fondé en 1999, regroupe un quart des X de l\'Ain, la Savoie, la Haute-Savoie, et la Suisse romande. Chaque année, deux sorties sont proposées, une de printemps, une d\'été. La sortie d\'été aura lieu à la mi-août. La date sera précisée dès que possible. Elle comportera :\r\n - la visite guidée et commentée de la mine de sel de Bex en Suisse,\r\n - un repas gastronomique au restaurant à Martigny,\r\n - la visite de la Fondation Gianadda, qui expose des peintres\r\n célèbres.\r\n\r\nTous les camarades intéressés par cette sortie sont cordialement invités, qu\'ils aient payé ou non leur cotisation!\r\n\r\n','[u]Contact[/u] (avant le 1er août) : Henri Hovasse (X48)\r\n8, chemin Moynat, 74200 Thonon-les-Bains\r\nTéléphone : 4 50.71.36.54');
+INSERT INTO `newsletter_art` VALUES (9,8,3,8,'X-Côte basque','Déjeuner traditionnel des résidents du Pays basque (au sens large, géographiquement), permanents ou estivants, et de leurs conjoints, le samedi 24 août 2002.\r\n','[u]Renseignements[/u] : Armand Bouttier (50)\r\n6, chemin de Grenouillette, 31170 Tournefeuille.\r\nTél et fax : 5 61.86.25.81\r\narmand.bouttier@wanadoo.fr');
+INSERT INTO `newsletter_art` VALUES (9,9,4,9,'X et parachutisme','Les paras X et anciens X se retrouvent à Gap cet été !\r\nLe stage de l\'X à lieu du 13 au 27 juillet, nous nous retrouverons plus précisement du vendredi 19 au dimanche 21 juillet pour un [i]X boogie[/i] et une tentative de grande formation de VR d\'X : à 16 ou plus !!\r\n','Pour tous renseignements (niveau requis, logement, etc.) :\r\nhugues.duplantier@m4x.org (X1995).');
+INSERT INTO `newsletter_art` VALUES (9,10,4,10,'Défilé sur les Champs','Cette année, c\'est la promotion X2000 [i]Chic à la Rouje![/i] qui mènera le défilé du 14 juillet sur les Champs-Élysées. Nous leur souhaitons ni trop de soleil, ni trop de vent, ni trop de pluie ;-)\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (2,1,1,1,'De nombreuses améliorations cette fois-ci:','\n Pour les Groupes X, nous proposons une redirection gratuite des mails de leur domaine groupex.polytechnique.org, en plus de la redirection web. Ce système permet de rediriger toutes les adresses désirées dans le domaine groupex.polytechnique.org vers des boîtes existantes. Il permet aussi d\'ajouter des destinataires non polytechniciens aux listes de diffusions.\n https://www.polytechnique.org/groupex.php\n\n Nous avons ouvert un serveur SMTP, permettant d\'envoyer ses courriers électroniques via polytechnique.org sans pub et sans restriction.\n https://www.polytechnique.org/SmtpPolytechnique.php\n\n Une page permettant d\'envoyer rapidement un courrier depuis son adresse polytechnique.org, sans bannière de pub, utile quand on ne peut pas faire autrement.\n https://www.polytechnique.org/sendmail.php\n\n Au caractère spécial + permettant d\'avoir une infinité d\'adresses sur Polytechnique.org, s\'ajoute maintenant le _, utile sur les sites qui refusent le + dans une adresse mail.\n https://www.polytechnique.org/EmailOutils.php\n\n Les forums sont revenus ! Certains y voient un moyen simple de discuter avec la communauté sur des sujets aussi divers que le film \'Absolument Fabuleux\', les dernières actions de la Khômiss, ou encore le dernier article anti-élite de l\'Express. D\'autres se contentent de mettre des petites annonces avec une visibilité assurée.\n http://www.polytechnique.org/forums/\n\n','');
+INSERT INTO `newsletter_art` VALUES (2,2,1,2,'Listes de diffusion promos','Elles existent et sont une aide précieuse pour les kessiers, qui sont invités à nous contacter.','http://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (2,3,1,3,'Sponsoring','Nous remercions nos sponsors Certplus et Openwave, sans qui le site ne pourrait fonctionner. De nouveaux sponsors vont nous rejoindre et si tu souhaites en faire partie contacte-nous ; nous recherchons en particulier un soutien pour le renouvellement des machines, et pour le financement de logiciels de filtrage permettant d\'éliminer les virus qui pourraient vous être adressés (le plus souvent involontairement) par vos correspondants.\n\n','');
+INSERT INTO `newsletter_art` VALUES (2,4,1,4,'Nouvelles listes de diffusion',' - Inde-espoir :\n\nChère ou cher ami(e),\nSi tu as, au cours de tes études, effectué un chantier de développement en Inde, nous avons créé pour toi la liste inde-espoir@polytechnique.org . A très bientôt sur la mailing list !\nThomas Mulliez et Thomas Lefebvre (X97 - Inde-Espoir 99)\n\n\n - eTrustMarket et eTrustPki :\n\nLa Confiance sur Internet et la PKI apparaissent comme des thèmes à la fois passionnants et fédérateurs. Vu sous l\'angle des communautés d\'utilisateurs d\'Internet, rendre possible sur Internet ce qui l\'est dans le monde réel (signature électronique, etc.), et ouvrir de possibilités nouvelles et inédites (et là tout reste à inventer), tel est l\'enjeu de la mise en place de la confiance sur Internet. En cela il est bien loin du discours souvent perçu comme sécuritaire, voire paranoïaque, classique : virus / anti-virus / hackers / espions etc. Il s\'agit en effet bien davantage d\'ouverture au monde et de création de\nnouveaux espaces, que de création de cyber-barbelés.\n\nVu sous l\'angle technique, la PKI catalyse des enjeux considérables :\non peut citer sans être exhaustif les domaines de la cryptologie, de la sécurité logique et physique, des plates-formes temps réel et haute disponibilité, de l\'interopérabilité, de la gestion de secrets, de leur conservation dans le temps, de l\'intégration dans les applications,etc. Si ces enjeux vous intéressent, et que vous souhaitez recevoir la Newsletter associée spécialisée sur ces sujets (ou participer à sa rédaction en envoyant vos articles), n\'hésitez pas à vous inscrire sur ces listes de diffusion respectives (voir http://www.polytechnique.org/listes/ ).\n\n','');
+INSERT INTO `newsletter_art` VALUES (2,5,2,5,'Le site officiel de l\'AX est sorti le 18 juin 2001.','Tu as probablement reçu ton identifiant (1ère lettre du prénom, nom, 2 chiffres) et ton mot de passe d\'accès. Sans doute es-tu un peu perdu par l\'existence de 2 sites.\n\nVoici les points sur lesquels polytechnique.org se concentre :\n - un système de redirection d\'emails rodé depuis plus de 2 ans\n - plus de 5000 inscrits (soit plus du tiers des anciens élèves) au service dans toutes les promotions\n - un système évolué permettant d\'éviter tout mail commercial non sollicité (moteur anti-SPAM développé par des X)\n - ouverture à tou(te)s les polytechnicien(ne)s (y compris les X en école)\n - adresse à vie et identifiant simple (prenom.nom)\n - annuaire puissant (nombreux champs, photographie, etc.)\n - adresse pour les groupes X , comme http://x-resistance.polytechnique.org/\n - listes de diffusion, forums\n - modification des informations prise en compte instantanément\n - accès direct au site possible (pas de clic)\n - identification automatique possible (si tu es seul utilisateur de l\'ordinateur)\nDe bonnes raisons pour que tu continues à parler autour de toi de polytechnique.org!\n\nPour que tu n\'aies plus à faire des mises à jour sur les 2 sites, un accord a été mis en place avec l\'AX :\nLorsque tu mettras à jour ton profil sur http://www.polytechnique.org/ les modifications seront transmises à l\'AX pour l\'annuaire papier et pour polytechniciens.com.\n\nSi tu souhaites que cette transmission ait lieu, pense à cliquer ici http://www.polytechnique.org/ et dans ton profil (clique en haut à gauche sur ton prénom) de faire précéder les champs que tu souhaites communiquer à l\'AX d\'un carré orange ou vert (ce n\'est pas le cas par défaut).\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (2,6,3,6,'X-Environnement :','Le groupe X-Environnement publie l\'ensemble de ses manifestations sur Internet.\r\n','Accueil du site : http://x-environnement.polytechnique.org/\r\nAccès direct aux manifestations :\r\nhttp://www.x-environnement.org/manifestations.html');
+INSERT INTO `newsletter_art` VALUES (2,7,3,7,'X-Europe :','Le groupe X-Europe vous invite à soutenir ses activités en visitant le site http://x-europe.polytechnique.org/\n\n','');
+INSERT INTO `newsletter_art` VALUES (2,8,3,8,'Initiation aux nouvelles technologies pour les X','La première séance d\'initiation à la bureautique et à Internet a été réalisée à l\'initiative de la Maison des X, du Collège de l\'X et du GPX. Pour en savoir plus, prendre contact avec le GPX : gpx@polytechnique.org\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (7,1,1,1,'6000 inscrits','Plus de 6000 élèves et anciens ont fait confiance à l\'équipe de Poly.org et se sont inscrits sur le site !\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (7,2,1,2,'Élèves étrangers et promotions','Des erreurs concernant la promotion de certains élèves étrangers se sont glissées dans notre base de données. Si tu es concerné, tu peux nous écrire à : support@polytechnique.org .\nPour les mailing-lists promo, tu peux modifier tes abonnements sur la page des mailing-lists (en bas de la page) : il suffit de t\'inscrire à la bonne liste promo et de te désinscrire de la mauvaise.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (7,3,2,3,'Des infos de l\'École','Un projet d\'ampleur, autour du nom de domaine polytechnique.edu, est en train de voir le jour à l\'école. [b]Polytechnique.edu[/b] , ce sera :\n - un [b]site web[/b] , orienté vers l\'international, destiné à mieux faire connaître l\'école auprès des étudiants, universités, et recruteurs étrangers ;\n - une [b]adresse mail[/b] @polytechnique.edu que partagera toute la communauté polytechnicienne : élèves et anciens élèves, mais aussi chercheurs, et administratifs.\n\nLe site web est en phase active de développement, et sera en ligne fin juin. Quant à l\'adresse mail, ce sera une redirection vers une autre adresse, et elle est développée par l\'équipe technique de Polytechnique.org.\n\nNous vous donnerons des nouvelles de tout cela prochainement.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (7,4,3,4,'Groupement parisien des X','Le mardi 28 mai aura lieu une conférence-dîner sur le thème de [i]L\'énergie nucléaire et l\'Europe[/i] , par Georges Vendryes (X40), ancien directeur des applications industrielles nucléaires au CEA.\r\n\r\nDimanche 2 juin aura lieu le rallye touristique X-ECP !\r\nInscriptions avant le 24 mai.\r\n','Pour toute information, téléphone au GPX au 1 45 48 52 04 ou écris\r\nà gpx@polytechnique.org .');
+INSERT INTO `newsletter_art` VALUES (7,5,3,5,'X-Environnement','Le groupe X-Environnement vous invite à participer à la réunion-débat organisée le mercredi 15 mai à la Maison des X, sur le thème : [i]Environnement et entreprises : vers de nouvelles pratiques volontaires[/i]\r\n','http://www.x-environnement.org/');
+INSERT INTO `newsletter_art` VALUES (7,6,3,6,'X-Histoire et Archéologie','Une manifestation est prévue le mercredi 12 juin. L\'invitée sera Marguerite Harl, professeur émérite à la Sorbonne et auteur de [u]La bible des Septante[/u] . ','Renseignements au 1 42 50 65 57.');
+INSERT INTO `newsletter_art` VALUES (7,7,3,7,'X-Israël','Le groupe X-Israël recevra le 27 mai 2002 Michel Louis Levy (X57), qui donnera une conférence sur le thème : [i]L\'État d\'Israël, la Bible et la loi, une lecture laïque[/i] .\r\n','http://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (7,8,4,8,'Rencontres rolistes de l\'X','Les 6èmes RRX auront lieu les 4 et 5 mai 2002. Le binet FaëriX organisera trois rondes de cinq heures chacune, ainsi que des tournois de jeux de plateaux.\r\n','http://www.polytechnique.fr/eleves/binets/faerix/');
+INSERT INTO `newsletter_art` VALUES (7,9,4,9,'Point Gamma 2002','Le Point Gamma aura lieu le samedi 25 mai, dès 19h et jusqu\'au bout de la nuit! Tout a été prévu pour que tu ne puisses pas t\'ennuyer une seule minute : concert des Saïan Supa Crew, set house d\'Antoine Clamaran, Jean-Luc Lemoine sur la scène de l\'amphi Poincaré... Si une montée d\'adrénaline ne te fait pas peur : viens t\'essayer au saut à l\'élastique ou à la tyrolienne ! Nos gentils barmen seront ensuite là pour te réconforter...\r\n\r\nTu pourras réserver tes places très bientôt au tarif prévente (22EUR), pour toi et pour tes amis (étudiants ou non), sur polytechnique.org !\r\nIl suffit pour cela de t\'authentifier et de cliquer sur le lien qui apparaît en page d\'accueil. Cette inscription en ligne sera activée dès que possible.\r\nPour les élèves 99, 2000 et 2001, deux places à 17EUR chacune vous sont réservées. Il suffit de les chercher au local du Point Gamma, où l\'équipe vous attend.\r\n','http://pointgamma.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (7,10,4,10,'Drive In de l\'X','Retrouve l\'ambiance du Drive In , les jeudi 13 et vendredi 14 juin.\r\nDe nombreuses animations se dérouleront sur le site de l\'École, ainsi que les projections grand écran du [i]Fabuleux destin d\'Amélie Poulain[/i] et de [i]Matrix[/i].\r\n','http://www.polytechnique.fr/eleves/binets/drivein/');
+INSERT INTO `newsletter_art` VALUES (7,11,4,11,'Petits Déjeuners polytechniciens','Nicolas Sarkozy sera présent à la Maison des X le vendredi 3 mai, et ce dès 8 heures du matin. Mercredi 5 juin, c\'est Serge Tchuruk, PDG d\'Alcatel, qui sera invité.\r\n','Renseignements au 01 47 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (7,12,4,12,'112ème Bal de l\'X','Il aura lieu le jeudi 28 juin 2002.\r\nNe ratez pas le premier bal du troisième millénaire !\r\n','http://bal.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (12,1,1,1,'Interruption de service : 4-5-6 octobre','Les machines de polytechnique.org sont hébergées gracieusement par l\'École.\nUne coupure de courant électrique sera effectuée sur le site entre vendredi 4 et dimanche 6 octobre.\n\nLe site web ainsi que le serveur SMTP seront donc interrompus pendant cette journée. Un serveur de mail extérieur sera mis en place pour maintenir le service mail, aucun mail ne sera perdu ou retardé.\n\nL\'Équipe de polytechnique.org vous présente d\'emblée ses excuses pour cette discontinuité de services indépendante de sa volonté.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (12,2,1,2,'Patte cassée','Cette page sert à analyser les messages d\'erreur que tu reçois lorsque tu envoies un mail @polytechnique.org.\r\nAinsi, si après l\'envoi d\'un mail, tu reçois en retour un message t\'indiquant que le destinataire n\'a pas reçu ton message (sur l\'une de ses adresses de redirection), nous pouvons te dire s\'il a reçu ton message sur une autre adresse de redirection.','https://www.polytechnique.org/pattecassee.php');
+INSERT INTO `newsletter_art` VALUES (12,3,1,3,'Accessibilité des forums','Le système de forums de Polytechnique.org souffrait jusqu\'à présent d\'incompatibilités avec certains navigateurs web. Ce service a donc été repensé pour permettre à tous d\'en profiter.','https://www.polytechnique.org/news/');
+INSERT INTO `newsletter_art` VALUES (12,4,1,4,'Anti-spam','L\'équipe de Polytechnique.org développe actuellement un nouveau système pour contrer les spams (mails non sollicités). Si tu es volontaire pour le tester, écris-nous :\nsupport_antispam@polytechnique.org\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (12,5,1,5,'Nouvelles skins','Chaque utilisateur de Polytechnique.org a son navigateur préféré ; afin de combiner des visages différents du site (les [i]skins[/i]) et une compatibilité maximale, l\'équipe de Polytechnique.org a opéré une refonte du site, s\'alignant sur les [u]standards du web[/u] .','Les standards du web\r\n-> http://www.w3.org/Consortium/#mission\r\nChoisis ta skin !\r\n-> https://www.polytechnique.org/preferences.php');
+INSERT INTO `newsletter_art` VALUES (12,6,1,6,'Listes de diffusion','Pour faciliter la gestion des listes de diffusion, il est désormais possible de trier les abonnés d\'une liste soit par nom, soit par promotion.','https://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (12,7,3,7,'X-Internet','Le groupe [u]X-Informatique[/u] organise un certain nombre de manifestations de qualité, seul ou avec d\'autres écoles d\'ingénieurs avec le G9+. Le groupe [u]X-eConfiance[/u] réfléchit aux outils et enjeux de la confiance dans le e-business.Les deux groupes ont décidé de mutualiser au maximum leurs efforts et ressources, pour un meilleur service à la communauté polytechnicienne.','X-Informatique : http://www.cyberix.org/');
+INSERT INTO `newsletter_art` VALUES (12,8,3,8,'X-Israël','Les deux prochaines manifestations organisées par le Groupe X-Israël sont les suivantes:\r\n ~ une conférence-rencontre le mardi 29 octobre sur l\'intérêt touristique d\'Israël, avec Charles Ayache, guide israélien (thèmes: la réalité de la vie en Israël depuis octobre 2000; les Manuscrits de la Mer Morte, vus par les chercheurs de la nouvelle génération ; Tsipori, la perle de la Galilée, ancienne capitale qui a fait l\'objet de fouilles extensives ces dernières années) ;\r\n ~ un dîner-débat le lundi 18 novembre avec Michel Gurfinkiel, écrivain et journaliste.','Renseignements et inscriptions :\r\nMail : info@x-israel.polytechnique.org\r\nSite web : http://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (12,9,4,9,'C\'est la rentrée (bis)','Les élèves de la promotion X1999 ont pour la plupart effectué leur rentrée en école d\'application, en corps de l\'État, en formation universitaire, en formation en partenariat avec l\'industrie ou en formation complémentaire à l\'étranger.\r\nL\'Équipe pousse un grand [i]Chic à la Jaune[/i] .','');
+INSERT INTO `newsletter_art` VALUES (12,10,4,10,'Cérémonie de la Flamme','L\'AX ravivera la Flamme à l\'Arc de Triomphe le lundi 14 octobre à 18:30 (le rassemblement devra être terminé pour 18:15). Retenez donc dès maintenant ce rendez-vous sur votre agenda, en particulier les membres des promos 92, 82, 72, 62, 52, 42 et 32. \n\n\n','');
+INSERT INTO `newsletter_art` VALUES (12,11,4,11,'Musique','Sous la direction de Lionel Stoléru (X56), l\'orchestre romantique européen vous propose sa soirée [b]La Sérénité romantique[/b] le mardi 22 octobre à 20h3O, Salle Gaveau.\r\nAu programme : [u]Le cygne[/u] (poème de Sully-Prudhomme) suivi du [u]Cygne[/u] de Saint-Saens, du [u]concerto pour violon[/u] de Brahms avec Gérard Poulet, de l\'Adagietto de la [u]cinquième symphonie[/u] de Mahler, et de la [u]cinquième symphonie[/u] de Schubert.\r\n','Inscriptions \"spécial X\" (20 et 30EUR) :\r\ntéléphone +33 147 20 62 81, ou fax +33 147 23 57 17 .');
+INSERT INTO `newsletter_art` VALUES (12,12,4,12,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le mardi 5 novembre de 8h à 9h30 à la Maison des X avec Ernest-Antoine Seillière, président du MEDEF.\r\n','Renseignements au +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (13,1,1,1,'Lancement du site Polytechnique.edu','Le site Polytechnique.edu, site développé par l\'école avec l\'aide, pour la partie la plus technique, d\'un groupe d\'élèves, a vu le jour le mois dernier. Le but est à la fois de : \r\n - mieux faire connaître l\'école auprès des étudiants étrangers qui pourraient la rejoindre,\r\n - mieux faire connaître la spécificité de la formation polytechnicienne aux recruteurs étrangers,\r\n - nouer de nouveaux partenariats avec des universités étrangères.\r\nCe projet s\'inscrit bien entendu dans l\'effort d\'ouverture à l\'international de l\'école, entrepris avec la réforme X2000.\r\n','http://www.polytechnique.edu/');
+INSERT INTO `newsletter_art` VALUES (13,2,1,2,'Partage de données avec l\'AX','Tu peux permettre à Polytechnique.org de donner certaines informations personnelles à l\'AX pour lui permettre de mettre à jour son annuaire. Le transfert des données s\'effectue régulièrement, et automatiquement. Si tu ne sais pas comment indiquer quelles informations doivent être données à l\'AX, tu obtiendras les renseignements nécessaires ici :\nhttps://www.polytechnique.org/faq.php#flags\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (13,3,1,3,'Système d\'authentification pour tous les sites X','Polytechnique.org a adapté son système d\'authentification afin de pouvoir le partager avec d\'autres sites : sites des groupes-X, mais aussi tous ceux qui le souhaitent parmi les sites de la communauté polytechnicienne.\r\nLe principe est simple : un bloc (identifiant + mot de passe) [b]unique[/b] pour se connecter à tous les sites de la communauté, au moyen d\'un [b]système centralisé[/b].\r\nNous invitons les responsables des sites intéressés à nous contacter pour les modalités de mise en place de ce système sur leurs sites.\r\n','support_authentification@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (13,4,1,4,'Archivage des lettres d\'informations','L\'Équipe de Polytechnique.org envoie tous les premiers du mois une lettre d\'information à ses inscrits. Les lettres des mois passés sont désormais disponibles sur le site web ; il est par ailleurs possible de se les faire réexpédier.\r\n','https://www.polytechnique.org/newsletter/');
+INSERT INTO `newsletter_art` VALUES (13,5,1,5,'Trombi promo','La cohésion dans une promotion ! Mais il est parfois difficile de retenir les noms... Il est désormais possible d\'afficher les photos de tous les élèves d\'une promotion ; puisse cette page permettre de joyeuses retrouvailles !\r\n','https://www.polytechnique.org/trombipromo.php');
+INSERT INTO `newsletter_art` VALUES (13,6,1,6,'Liste de contacts','Le site permet maintenant de créer et éditer sa liste personnelle de contacts. Tu pourras ainsi limiter le champ d\'une recherche à ce carnet d\'adresses. Tu as aussi la possibilité d\'imprimer cette liste pour l\'emmener en vacances, ou dans les endroits où tu n\'as plus accès à internet.\r\n','https://www.polytechnique.org/mescontacts.php');
+INSERT INTO `newsletter_art` VALUES (13,7,1,7,'Nouveautés des forums','La hiérarchie de forums a été remaniée pour répondre à des demandes différentes, et beaucoup de promotions ont maintenant leur forum. Les nostalgiques du serveur du binet réseau ne seront pas trop dépaysés ! \r\n','https://www.polytechnique.org/news/');
+INSERT INTO `newsletter_art` VALUES (13,8,3,8,'X-Israël','La prochaine manifestation organisée par le Groupe X-Israël sera un dîner-débat le lundi 18 novembre avec Michel Gurfinkiel, écrivain et journaliste.\r\n','Renseignements et inscriptions :\r\nMail : info@x-israel.polytechnique.org\r\nSite web : http://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (13,9,3,9,'GPX','Le Groupement parisien des X organise la soirée [b]BEAUJOLAIS NOUVEAU[/b] vendredi 22 novembre. La soirée aura lieu au Styx (Maison des X), avec un diner animé par les [u]Compagnons du Beaujolais[/u]. Le GPX se charge de collecter les inscriptions.\r\n','http://gpx.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (13,10,3,10,'X-Europe','L\'Assemblée Générale se tiendra à Paris, jeudi 28 novembre à 18:00. Fais-nous connaître tes idées sur ce que tu attendrais du Groupe en 2003, et dis-nous si tu souhaites assister à l\'AG.\r\n','xeurope@noos.fr');
+INSERT INTO `newsletter_art` VALUES (13,11,3,11,'X-Europe','Nous avons besoin de bonnes volontés pour nous aider dans notre action en cours, [u]Débat entre citoyens d\'Europe s\'appuyant sur les villes jumelées[/u]. Nous te demandons simplement une [i]lecture critique[/i] d\'un (ou plusieurs...) thèmes du site de débat.\r\n','http://mapage.noos.fr/xeurosite\r\nContacte-nous si tu es intéressé(e) : xeurosite@noos.fr');
+INSERT INTO `newsletter_art` VALUES (13,12,4,12,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le mardi 5 novembre de 8h à 9h30 à la Maison des X avec Ernest-Antoine Seillière, président du MEDEF.\r\nLe 10 décembre, Jean-Paul Bailly (président de La Poste) sera l\'invité du PDX.\r\n','Renseignements au +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (13,13,4,13,'Musique classique','L\'orchestre romantique européen, sous la direction de Lionel Stoléru (56), se produira mardi 3 décembre en salle Gaveau.\r\nAu programme :\r\n ~ [u]Pierre et le Loup[/u] (conte musical de Prokofiev) ;\r\n ~ [u]Fantaisie hongroise[/u] pour piano et orchestre, de Liszt, avec France Clidat ;\r\n ~ [u]Capriccio italien[/u] de Tchaikowsky ;\r\nAmenez vos enfants (dès 8 ans) écouter Eve Ruggieri les initier à l\'orchestre avec Pierre et le Loup !\r\n','Réservation (15, 20, 30EUR) spécial anciens X au +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (14,1,1,1,'Réforme de la Jaune et la Rouge : sondage','\nLa création d\'une [b]revue trimestrielle[/b] de haute tenue, originale, iconoclaste et rigoureuse, destinée à promouvoir le rayonnement de l\'École et des X, est à l\'étude.\nL\'information purement [i]polytechnicienne[/i] serait, elle, diffusée aux seuls X dans un bulletin périodique distinct. Cet ensemble se substituerait à [u]La Jaune et la Rouge[/u] .\n\nIl est essentiel pour nous d\'avoir ton opinion sur ce projet. Nous comptons sur toi pour nous répondre au moyen du questionnaire suivant : https://www.polytechnique.org/sondage-ax.php .\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (14,2,1,2,'Réforme de la scolarité : nouveau diplôme','\nAfin de permettre aux élèves d\'effectuer leur troisième année dans certaines organisations, l\'École délivrera en fin de deuxième année un diplôme de [b]gradué en ingénierie[/b] .\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (14,3,3,3,'Groupe X-Israël','X-Israël s\'est engagé dans une collaboration avec l\'Association Technion France (le [b]Technion[/b], Israel Institute of Technology de Haïfa, est depuis quelques années une École de formation complémentaire de l\'X, actuellement la seule en Israël). Ainsi X-Israël s\'associe à la soirée du 17 décembre à 20:00 sur le thème des partenariats technologiques France-Israël, avec comme sujet dominant le Technion.','Renseignements http://x-israel.polytechnique.org/\r\nATF http://www.col.fr/ATF-technionfrance/\r\nTechnion http://www.technion.ac.il/');
+INSERT INTO `newsletter_art` VALUES (14,4,3,4,'Groupe X-Internet','Le groupe s\'est réuni le 28 novembre, avec comme fil conducteur les outils développés par l\'équipe de polytechnique.org pour satisfaire les besoins de la communauté.\r\nLe compte-rendu, ainsi que les transparents de la présentation, sont disponibles sur le site, tous vos commentaires sont les bienvenus.','http://x-internet.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (14,5,3,5,'Groupe X-eConfiance','\nComment instaurer la confiance dans les échanges numériques ? Après le cocktail du 26 novembre à la maison des X sur ce thème, la prochaine contribution visible du groupe à cette question fondamentale sera [u]La Jaune et la Rouge[/u] de février 2003. D\'autres événements seront organisés au cours de l\'année.\n\nPour mieux connaître le groupe, être informé des événements, ou y contribuer, il suffit de s\'inscrire sur la liste de diffusion X-eConfiance en cochant la case [i]ad hoc[/i] :\nhttps://www.polytechnique.org/listes/\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (14,6,3,6,'X-Afrique, X-Tiers-monde ou X-Coopération','Je cherche des camarades intéressés par les problèmes du tiers-monde en vue d\'échanger des idées (par exemple la crise ivoirienne) et de créer un groupe X afin :\r\n - d\'appuyer des actions pour le développement et la paix,\r\n - de recueillir un large consensus par des actions spécifiques (dons, courriers à des personnalités influentes...).','Alain Ducass (73) alain.ducass@m4x.org ou +33 153 44 98 59.');
+INSERT INTO `newsletter_art` VALUES (14,7,4,7,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le mardi 10 décembre de 8:00 à 9:30 à la Maison des X avec Jean-Paul Bailly (65), président de La Poste.','[u]Renseignements[/u] : +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (14,8,4,8,'Cycle de conférences','\nDans le cadre des conférences de la direction de la formation humaine et militaire se déroulant du 5 déc. 2002 au 23 jan. 2003, le cycle \"Grands Témoins\" s\'organisera comme suit :\n - jeudi 5 décembre à 10:30 : [u]L\'expérience spatiale d\'un ancien élève de l\'X[/u] par le colonel Philippe Perrin (Spationaute, CNES)\n - jeudi 12 décembre à 10:30 : [u]Les enseignements pratiqués en[/u]\n [u]France aujourd\'hui laissent-ils la liberté de penser[/u] par Philippe Raynaud (professeur à Paris 2 en Sciences Politiques).\n - jeudi 19 décembre à 10:30 : [u]La menace terroriste[/u] par Jean-Louis Bruguière (1er Vice-président au Tribunal de Grande Instance de Paris).\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (14,9,4,9,'SABIX : Concert classique','À l\'occasion de la parution du bulletin n°32 consacré à l\'X et à la musique, l\'École, la SABIX et Musicalix animé par Patrice Holiner (directeur musical de l\'École) vous invitent au concert exceptionnel à Palaiseau en amphithéâtre Poincaré, mercredi 9 janvier à 20:30.\r\n\r\nLes oeuvres interprétées s\'étendront du romantisme à nos jours. Jonathan Gilad (2001), pianiste concertiste international se produira à cette occasion, et la soirée se poursuivra autour d\'une collation ([i]marché de Noël[/i]) organisé par le binet Germanix.','http://www.bibliotheque.polytechnique.fr/');
+INSERT INTO `newsletter_art` VALUES (15,1,1,1,'Ton alias @melix.net, @melix.org','Pour plus de convivialité dans l\'utilisation de tes mails, tu peux choisir une adresse e-mail discrète et personnalisée. Cette nouvelle adresse de messagerie peut par exemple correspondre à ton surnom.\r\n','https://www.polytechnique.org/alias.php');
+INSERT INTO `newsletter_art` VALUES (15,2,1,2,'[b]Serveur de forums de discussion (NNTP)[b]','Ce serveur te permet désormais de consulter les forums de discussion de Polytechnique.org avec ton lecteur de forums favori (Outlook Express, Netscape, ...). Par ailleurs, de plus en plus de forums promo sont disponibles ! Le forum de ta promo a peut-être déjà été créé, il te permettra de retrouver tes camarades ! (l\'interface web reste quant à elle disponible)\r\n','https://www.polytechnique.org/NntpPolytechnique.php');
+INSERT INTO `newsletter_art` VALUES (15,3,1,3,'Nouvelle gestion des formations complémentaires','Pour plus de souplesse, et afin de faciliter les recherches par diplome, la gestion des formations dans les profils a été revue. Tu peux à présent saisir à la fois l\'établissement et le type de diplôme pour ton application et ton éventuelle post-application. (Les formations déjà saisies ont bien entendu été converties !)\r\n','https://www.polytechnique.org/profil.php');
+INSERT INTO `newsletter_art` VALUES (15,4,3,4,'X-Histoire','[u]De la fin de l\'Histoire au gouvernement de la Raison[/u] : les sources du libéralisme français à travers l\'oeuvre de François Guizot (historien et homme d\'état du XIXème siècle) seront présentées le mercredi 15 janvier par Lauren Theis, ancien élève de l\'ENS, agrégé et docteur en histoire, président de la Société de l\'histoire du protestantisme français.\r\n','[u]Inscriptions[/u] auprès de Jacqueline Pottier +33 142 50 65 57.');
+INSERT INTO `newsletter_art` VALUES (15,5,3,5,'X-Gaziers','Le groupe X-Gaziers se réunira le mercredi 29 janvier 2003 au cours d\'un dîner où l\'invité sera Syrota (58), président de la Commission de régulation de l\'énergie.\r\n','Demande de renseignements sur :\r\nhttps://www.polytechnique.org/listes/liste.php?Lid=218');
+INSERT INTO `newsletter_art` VALUES (15,6,4,6,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le mardi 7 janvier de 8:00 à 9:30 à la Maison des X avec François Roussely, président d\'EDF.\r\nJean-Pierre Raffarin, Premier Ministre, sera quant à lui présent le lundi 3 février aux mêmes horaires.\r\n','[u]Renseignements[/u] : +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (15,7,4,7,'SABIX : Concert classique','À l\'occasion de la parution du bulletin n°32 consacré à l\'X et à la musique, l\'École, la SABIX et Musicalix animé par Patrice Holiner (directeur musical de l\'École) vous invitent au concert exceptionnel à Palaiseau en amphithéâtre Poincaré, jeudi 9 janvier à 20:30.\r\n\r\nLes oeuvres interprétées s\'étendront du romantisme à nos jours.\r\nJonathan Gilad (2001), pianiste concertiste international se produira à cette occasion, et la soirée se poursuivra autour d\'une collation ([i]marché de Noël[/i]) organisé par le binet Germanix.\r\n','Programme détaillé : http://www.bibliotheque.polytechnique.fr/');
+INSERT INTO `newsletter_art` VALUES (15,8,4,8,'Magnan de promo 38','Le prochain magnan aura lieu jeudi 16 janvier 2003 (épouses et veuves conviées) au Restaurant administratif de la Montagne-Sainte-Geneviève à 12:30. Ce sera l\'occasion de tenir l\'Assemblée générale annuelle de l\'Association.\r\n','[u]Inscriptions[/u] : 10 janvier au plus tard auprès d\'Alain Guillemin +33 147 51 69 73 .');
+INSERT INTO `newsletter_art` VALUES (15,9,4,9,'6ème Trophée Voiles X-HEC','\nLe Trophée Voiles X-HEC est un week-end de régates amicales rassemblant élèves et anciens de l\'X et d\'HEC dans des conditions exceptionnelles : le week-end est fourni [i]clef en main[/i]. Tu t\'inscris et l\'équipe s\'occupe du reste : tu seras alors logé, nourri et placé sur un équipage.\nCette année encore, la régate sera homologuée par la FFV et le comité de course sera dirigé par Roland Galliot.\nLe 6ème Trophée aura lieu cette année les 17-18 mai 2003 à Bénodet.\n\nSite web : http://www.xhec.org/\nContact : Silvain Abadie (X2000) silvain.abadie@m4x.org\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (16,1,1,1,'Un forum pour chaque groupe X','Il est désormais possible de créer des forums destinés aux groupes X. Accessibles à tous les inscrits, ces forums permettent d\'élargir les débats au-delà du strict cadre des inscrits aux listes de diffusion des groupes X. À ce titre, la création de forums peut permettre aux non-membres des listes de diffusion d\'un groupe X de découvrir le groupe avant de s\'inscrire.','forums@m4x.org?subject=creation\r\nhttps://www.polytechnique.org/news/');
+INSERT INTO `newsletter_art` VALUES (16,2,1,2,'Message d\'accueil pour les listes','Lors de l\'abonnement à une liste de diffusion, le(la) nouvel(le) abonné(e) reçoit un message de bienvenue. Ce message peut désormais être personnalisé par les gestionnaires de la liste. Pour le modifier, il leur suffit de se rendre sur la page d\'administration de la liste.','https://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (16,3,3,3,'Groupe X-eConfiance','La eConfiance sera le dossier de fond du prochain numéro de [u]La Jaune et la Rouge[/u]. Parmi les signatures : Francis Mer (59), Michel Pébereau (61), Jean-Paul Bailly (65), Henri Serres (69), Jean-Séverin Lair (87), Fabrice Mattatia (90), Philippe Chauve (89), Julien Billot (88), et Antoine Hermite (93). Pour s\'inscrire au Groupe X-eConfiance et être informés des activités en 2003 : https://www.polytechnique.org/listes/ .\r\n','Renseignements : Matthieu Bergot (89) matthieu.bergot@m4x.org');
+INSERT INTO `newsletter_art` VALUES (16,4,3,4,'Groupe X-Aviation','Le jeudi 27 mars à 19:30 aura lieu à la Maison des X un dîner-débat sur le thème [i]Le transport spatial des prochaines années[/i]. Le débat sera animé par Jean-Marie Luton (61), Président-Directeur Général d\'Arianespace.\r\nContribution aux frais de 43EUR par personne (un reçu vous sera remis sur place). Merci de me confirmer votre présence par mail et de m\'adresser un chèque à l\'ordre de [u]Choquel X-Aviation[/u] par courrier postal .','jean-paul.choquel@m4x.org?subject=diner-debat\r\n[u]Adresse postale[/u] : Jean-Paul Choquel, 4, villa de Saxe 75007 Paris\r\n[u]Maison des Polytechniciens[/u] : http://www.maisondesx.com/');
+INSERT INTO `newsletter_art` VALUES (16,5,3,5,'Groupe X-Afrique','Le groupe X-Afrique est né le 15 janvier du rapprochement entre les groupes X-Afrique Subsaharienne et X-Sud créés séparément. Les objectifs sont entre autres de créer un lieu d\'échange et d\'entraide entre tous les X connaissant ou souhaitant découvrir le continent, favoriser la coopération Sud-Sud et Nord-Sud. La première réunion portera sur les nouvelles technologies de l\'information en Afrique et aura lieu fin mars.\r\n','[u]Site[/u] : http://x-afrique.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (16,6,4,6,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le lundi 3 février de 8:00 à 9:30 à la Maison des X avec Jean-Pierre Raffarin, Premier Ministre.\r\nDalil Boubakeur, recteur de l\'Institut Musulman de Paris, sera pour sa part présent le lundi 3 mars.\r\n','[u]Renseignements[/u] : +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (16,7,4,7,'Soirée Agro par le Styx99','Après les deux dernières soirées à l\'ENGREF de novembre et décembre, le Styx99 s\'associe cette fois-ci à l\'École d\'agronomie de Paris (AGRO) pour vous proposer sa prochaine soirée. Vous êtes donc conviés jeudi 6 février dès 21 heures dans les locaux de l\'ENGREF. La soirée est [b]OPEN-BAR[/b], et l\'entrée (7EUR) se fera uniquement par pré-ventes, alors contactez-nous vite !','[u]ENGREF[/u] : 19, avenue du Maine, Paris 15e (à 100m de Montparnasse)\r\n[u]Contact[/u] : preventes@styx.polytechnique.org?subject=Agro\r\n[u]Site[/u] : http://www.styx99.fr.st/');
+INSERT INTO `newsletter_art` VALUES (16,8,4,8,'Les 24 heures de natation 2003','Plus de 112km en 24h ! C\'est ce défi que les élèves de la section natation se proposent de relever, au cours d\'un relais par 50m, du jeudi 6 février au lendemain, à la piscine de l\'École.\r\n','http://www.polytechnique.fr/eleves/binets/natation/presentation.html');
+INSERT INTO `newsletter_art` VALUES (16,9,4,9,'Promo 55','Nos déjeuners mensuels au Club X (épouses bienvenues) auront lieu pour l\'année 2003 les jeudis 6 février, 6 mars, 3 avril, 8 mai, 5 juin, 3 juillet, 4 septembre, 2 octobre, 6 novembre et 4 décembre. Venez nombreux !\r\n','[u]Renseignements[/u] : Club X, +33 149 54 74 54');
+INSERT INTO `newsletter_art` VALUES (16,10,4,10,'AX : candidature au Conseil d\'administration','Dans le cadre du renouvellement de 9 membres du conseil de l\'AX en juin 2003, l\'AX fait un appel à candidature pour deux postes de sortants non rééligibles : \"Le conseil souhaite que des camarades des jeunes promotions s\'intéressent à la vie de l\'AX et fassent acte de candidature. Il adresse la même requête à nos camarades femmes de toutes promotions : 5 seulement siègent au conseil.\"\r\nLes candidat(e)s intéressé(e)s doivent adresser par courrier postal à l\'AX leur candidature motivée le 15 février au plus tard.\r\n','[u]Adresse postale[/u] : Secrétariat de l\'AX 5, rue Descartes 75005 Paris\r\nhttp://ax.polytechnique.org/index.php?page=asso_conseil.html');
+INSERT INTO `newsletter_art` VALUES (17,1,1,1,'Vie de l\'École','Le procès-verbal du Conseil d\'administration de l\'AX du 8 octobre a été publié dans la Jaune et la Rouge de février. Concernant les résultats du passage de deuxième en troisième année de la promotion 2000, sur 445 élèves, une centaine n\'ont pas obtenu leur passage direct et ont dû septembriser :\r\n - 86 ont été repêchés ou admis à passer en 3A sous conditions,\r\n - 12 ont été admis à redoubler,\r\n - 2 ont été exclus.\r\nParmi les cas qualifiés de graves, certains n\'ont manifestement pas travaillé, mais d\'autres ont été mal orientés (en particulier des élèves étrangers mal orientés dans leurs choix de matières principales à option par leur gouvernement).','');
+INSERT INTO `newsletter_art` VALUES (17,2,1,2,'Bal de l\'X','\nL\'AX ne sera pas en mesure d\'organiser un bal en 2003.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (17,3,3,3,'X & Ponts Londres','Le jeudi 13 Mars à 20:00 aura lieu à la Mission Économique de l\'ambassade de France à Londres un exposé/débat sur le thème :\r\n[i]La Livre Sterling entrera-t-elle dans l\'Euro ?[/i]. Les intervenants seront deux spécialistes anglais de l\'Euro, Graham Bishop et John Turner.','[u]Informations[/u] : info@xponts-londres.polytechnique.org\r\n[u]Ambassade de France à Londres[/u] : http://www.dree.org/gb');
+INSERT INTO `newsletter_art` VALUES (17,4,3,4,'X-Internet','Le groupe se réunira le mercredi 26 mars à 19h aux Mines de Paris, avec comme fil conducteur les outils destinés aux groupes X et aux promotions. Nous accueillerons notamment Dujardin (65), président des Y, Descroix (58) ancien président des Y, Herz (79) président du groupe X-Israel.\r\n','http://x-internet.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (17,5,3,5,'Groupe X-Aviation','Le jeudi 27 mars à 19:30 aura lieu à la Maison des X un dîner-débat sur le thème [i]Le transport spatial des prochaines années[/i]. Le débat sera animé par Jean-Marie Luton (61), Président-Directeur Général d\'Arianespace.\r\nContribution aux frais de 43EUR par personne (un reçu vous sera remis sur place). Merci de me confirmer votre présence par mail et de m\'adresser un chèque à l\'ordre de [u]Choquel X-Aviation[/u] par courrier postal .\r\n','jean-paul.choquel@m4x.org?subject=diner-debat\r\n[u]Adresse postale[/u] : Jean-Paul Choquel, 4, villa de Saxe 75007 Paris\r\n[u]Maison des Polytechniciens[/u] : http://www.maisondesx.com/');
+INSERT INTO `newsletter_art` VALUES (17,6,4,6,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu le lundi 3 mars de 8:00 à 9:30 à la Maison des X avec Dalil Boubakeur, recteur de l\'Institut Musulman de Paris. Howard Leach, ambassadeur des États-Unis à Paris, sera pour sa part présent le mardi 15 avril.\r\n','[u]Renseignements[/u] : +33 147 20 62 81.');
+INSERT INTO `newsletter_art` VALUES (17,7,4,7,'Promo 38','Le prochain magnan de promo aura lieu jeudi 20 mars (épouses et veuves conviées) au Restaurant administratif de la Montagne Sainte-Geneviève (25, rue de la Montagne Ste-Geneviève, Paris V) à 12:30.\r\n','[u]Inscription (au plus tard le 14 mars)[/u]\r\nGuillemin +33 147 51 69 73');
+INSERT INTO `newsletter_art` VALUES (17,8,4,8,'X-Vinicole','Le 13eme Salon des vignerons polytechniciens se déroulera à la Maison des X dimanche 23 mars, de 11 à 19 heures.\r\n','[u]Informations[/u] : +33 149 54 74 74\r\n[u]Maison des X[/u] : http://www.maisondesx.com/');
+INSERT INTO `newsletter_art` VALUES (17,9,4,9,'Musique classique','L\'Orchestre Romantique Européen, sous la direction de Lionel Stoléru (56), se produira mardi 25 mars à 20:30, Salle Gaveau, sur le thème:\r\n[i]La nature romantique[/i] :\r\n - Lamartine : [u]Le Vallon[/u]\r\n - Schubert et A.Thomas : [u]La truite, le tilleul, Mignon[/u]\r\n (soprano Marie Devellereau)\r\n - Massenet : [u]Scènes pittoresques[/u]\r\n - Beethoven : [u]Symphonie pastorale[/u]\r\n','[u]Réservations Spécial X[/u] : +33 147 20 62 81');
+INSERT INTO `newsletter_art` VALUES (17,10,4,10,'Garden-Party pour les jeunes Anciens','Le 17 mai aura lieu un nouvel événement parallèlement au Jumping : la Garden-Party de l\'X. C\'est une journée de détente et d\'échanges organisée par les élèves et destinée aux Anciens des dix dernières promos (depuis 91) et leur famille.\r\nElle comportera de nombreuses activités sportives et ludiques, et sera l\'occasion pour les anciens de revoir des camarades de promo et d\'échanger leurs expériences professionnelles de jeunes cadres avec les élèves en cours de scolarité, avides de conseils. L\'événement est vivement soutenu par l\'AX.\r\n','[u]Pour plus d\'infos[/u] : http://jumping.polytechnique.org/\r\n[u]Inscriptions[/u] : nicolas.de-lauriston@m4x.org');
+INSERT INTO `newsletter_art` VALUES (18,1,1,1,'Géo-localisation','L\'équipe de polytechnique.org travaille actuellement avec les Gadz\'arts et d\'autres écoles dans le cadre de l\'AAEGE sur un projet de géo-localisation commun. L\'objectif à terme est de pouvoir effectuer une recherche dans notre annuaire sur des critères géographiques fins, cartes à l\'appui !\r\nIl est d\'ores et déjà possible, pour chacune de tes adresses, de préciser à quel pays, région, ou département ton adresse correspond.\r\n','https://www.polytechnique.org/profil.php');
+INSERT INTO `newsletter_art` VALUES (18,2,1,2,'Annonces sur la page d\'accueil','La page toute vide qui s\'affichait lorsque tu venais de te connecter a aujourd\'hui trouvé sa vocation : elle permet désormais de poster des annonces d\'événements, des informations, qui peuvent être destinées à tous les camarades inscrits au site, ou bien seulement à certaines promotions.\r\nUn lien en bas de la page te permet d\'insérer ta propre annonce !\r\n','https://www.polytechnique.org/login.php');
+INSERT INTO `newsletter_art` VALUES (18,3,1,3,'Micro-paiement','Polytechnique.org a installé sur le site un système de micropaiement en ligne, avec le soutien important de Jean-Paul Figer (62), président du groupe X-Informatique, que nous remercions vivement.\r\nTout kessier, ou toute association polytechnicienne qui le désire peut dès à présent nous contacter pour profiter de ce système, pour organiser des repas de promotions, des séminaires d\'association, ou simplifier la cotisation à un groupe X.\r\n','Contact : info_m-paiement@m4x.org?subject=micro-paiement');
+INSERT INTO `newsletter_art` VALUES (18,4,1,4,'Dons à polytechnique.org','La mise en place du micro-paiement en ligne présenté ci-dessus permet également aux personnes qui le souhaitent de faire un don à l\'association Polytechnique.org.\r\nNous avons des frais fixes annuels peu élevés (principalement le renouvellement des noms de domaines et la mise à niveau de nos serveurs). Toutefois, nous avons des projets un peu plus coûteux, comme l\'achat d\'une machine supplémentaire qui pourrait faire office de filtre anti-virus pour tous les emails que vous recevez par l\'intermédiaire de polytechnique.org.\r\nTu peux si tu le souhaites nous aider à réaliser ces projets...\r\n','https://www.polytechnique.org/dons.php');
+INSERT INTO `newsletter_art` VALUES (18,5,3,5,'GLAX','Le groupement lyonnais des anciens élèves de l\'École polytechnique (dont les X Stéphanois) propose samedi 12 avril la soirée du repas dansant du GLAX.\r\n','[u]Contact[/u] : Philippe Stuyven (77) au +33 478 399 551');
+INSERT INTO `newsletter_art` VALUES (18,6,4,6,'Musicalix : Concours de piano','Mercredi 2 avril 2003, à 20:30, Musicalix présentera, en amphithéâtre Poincaré, la finale avec orchestre du concours de piano de l\'École polytechnique, avec trois finalistes dans les concerti de Beethoven. Un vote du public déterminera le gagnant. La finale sera suivie d\'une fantaisie-chorale pour piano, choeur et orchestre de Beethoven (au piano : Jonathan Gilad, X2001). L\'entrée est gratuite.','Contact : musicalix@poly.polytechnique.fr?subject=concours\r\nRenseignements : http://musicalix.polytechnique.org/concours_piano/');
+INSERT INTO `newsletter_art` VALUES (18,7,4,7,'Challenge international d\'escrime de l\'X','Les 10 et 11 avril 2003 se tiendra le 11ème Challenge international d\'escrime de l\'École polytechnique, une compétition qui rassemble 150 tireurs venus d\'écoles et d\'universités françaises et étrangères (allemandes, américaines, hongroises, suisses, etc.).\r\nLes éliminatoires se dérouleront toute la journée du jeudi 10 avril dans les gymnases, et les finales auront lieu vendredi 11 avril en début d\'après-midi dans le Grand Hall. L\'entrée sera libre les deux journées.','Informations : http://www.polytechnique.fr/eleves/binets/escrime/\r\nContact : matthieu.delaby@m4x.org?subject=escrime');
+INSERT INTO `newsletter_art` VALUES (18,8,4,8,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu mardi 15 avril de 8:00 à 9:30 à la Maison des X avec Howard Leach, ambassadeur des États-Unis à Paris, qui s\'exprimera en anglais.\r\nRené Carron, président du Crédit Agricole, sera pour sa part présent mardi 13 mai.\r\n','[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (18,9,4,9,'Soirée Promo 85','À la demande des participants de la session 2000 : Soirée Promo 85 avec conjoint(e) à la Maison des X vendredi 25 avril 2003, à 19:00 sur le thème [u]BAC+20[/u] . Par avance merci de :\r\n 1 Réserver d\'ores et déjà cette date ;\r\n 2 Faire circuler l\'information et faire converger vos chèques d\'inscription (40 EUR/pers.) à l\'ordre de [i]PROMO X85[/i], à l\'adresse postale ci-dessous.\r\n 3 Et surtout d\'inciter vos proches à s\'inscrire au site polytechnique.org, pour recevoir régulièrement toutes les précisions.\r\nA très bientôt donc,\r\n[i]La Kès 85[/i]\r\n','francois.flusson@m4x.org\r\nandre.levisse@m4x.org\r\nx85@jwa.fr\r\n[u]Adresse[/u] : JWA / F Girault - X85, 9, rue Beaujon 75008 Paris');
+INSERT INTO `newsletter_art` VALUES (18,10,4,10,'Mi-centenaire','Les retardataires de la 53 peuvent encore s\'inscrire pour le voyage en Auvergne du 1er au 4 mars. Détails et inscriptions à [b]Sites et Valeurs[/b].','[u]Téléphone[/u] : +33 148 04 03 57');
+INSERT INTO `newsletter_art` VALUES (18,11,4,11,'Concert romantique','L\'Orchestre Romantique Européen, sous la direction de Lionel Stoléru (56), se produira mardi 6 mai à 20:30, Salle Gaveau, sur le thème :\r\n[i]Le romantisme slave[/i] :\r\n - V.Hugo : [u]Mazeppa[/u]\r\n - Verdi : [u]Choeur du Trouvère[/u]\r\n - Smetana : [u]Chant tchèque pour choeur et orchestre[/u]\r\n - Chopin : [u]Cracovienne pour piano et orchestre[/u]\r\n - Liszt : [u]Rhapsodie n°9 pour piano[/u]\r\n - Dvorak : [u]Symphonie n°7[/u]\r\nPiano : A.Golovin\r\n','[u]Réservations spécial X[/u] : +33 147 206 281 (places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (18,12,4,12,'Garden-Party pour les jeunes Anciens','Anciens des promos 91 à 99, il n\'est pas trop tard pour vous inscrire à la Garden-Party qui aura lieu samedi 17 mai à l\'X. Il suffit pour cela de remplir un formulaire en ligne sur le site avant le 22 avril. De nouvelles activités sportives peuvent s\'organiser en fonction de vos demandes, n\'hésitez pas à mentionner vos souhaits sur le formulaire. Consultez régulièrement le site pour voir les mises à jour.\r\nSuite à de nombreuses demandes, les anciens de promos précédentes qui souhaitent participer à cette journée peuvent envoyer un mail.\r\n','Contact : nicolas.de-lauriston@m4x.org\r\nSite web : http://jumping.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (19,1,1,1,'Offres d\'emploi','Suite a la disparition du site de l\'Aval a l\'X, Polytechnique.org lance un service expérimental d\'offres d\'emploi et de stages : les employeurs peuvent désormais poster une offre sur le forum emploi xorg.pa.emploi depuis la partie publique du site.\r\n\r\nMerci de faire connaître cette possibilité auprès des services recruteurs de ton entreprise. Suivant son succès, nous comptons développer d\'autres outils pour l\'emploi avec offres, moteur de recherche, conseils, interviews d\'X en poste, ou toute suggestion que tu nous feras (l\'équipe remercie chaleureusement tous ceux qui lui ont écrit pour suggérer de développer la partie emploi).','https://www.polytechnique.org/emploi_public.php');
+INSERT INTO `newsletter_art` VALUES (19,2,2,2,'[b]Tous à l\'AG de l\'AX... le 18 juin ![b]','Nous vous signalons un événement particulièrement inhabituel pour une AG de l\'AX : cette année, après les formalités statutaires, un forum animé par Jean-Claude Pelissolo (58), membre de X-Internet et président de X-Consult, permettra à la salle de débattre sur le thème : [i]Réseaux polytechniciens, réseau Internet : même combat ?[/i].\r\nIl est hautement souhaitable que tous ceux et toutes celles, jeunes ou moins jeunes, qui participent à Polytechnique.org ou l\'utilisent, soient présents pour apporter leur témoignage et leurs idées.','À 17:00 sur l\'ancien site de l\'X, amphi Gay-Lussac\r\n25, rue de la Montagne Sainte Geneviève 75 005 Paris');
+INSERT INTO `newsletter_art` VALUES (19,3,2,3,'Fondation de l\'École Polytechnique','Polytechnicien, Docteur ou Doctorant, vous avez moins de 35 ans et vous avez un projet de création d\'entreprise, seul ou en partenariat.\r\nNous lançons la quatrième édition de notre Concours FX-CREATEUR 2003 destiné à récompenser un projet de création d\'entreprise. Le prix sera attribué en décembre 2003 ; les dossiers devront parvenir à la\'Fondation avant le 31 octobre 2003.\r\n','http://fondation.polytechnique.org/\r\nfondation@polytechnique.org?subject=FX_CREATEUR_2003\r\n[u]Téléphone[/u] : +33 153 85 40 10');
+INSERT INTO `newsletter_art` VALUES (19,4,3,4,'Rallye X-ECP 2003','Une journée de détente dimanche 18 mai en Île-de-France, avec des énigmes défiant intuition, astuce, culture et sens de l\'observation. Au cours du traditionnel dîner, nous donnerons les réponses complètes aux énigmes et problèmes de la journée, puis nous procéderons à la lecture du classement, à la remise des trophées et distribuerons les lots récompensant l\'ensemble des participants. Constituez dès maintenant votre équipe pour venir vous mesurer à vos camarades (et aux Centraliens !), et inscrivez-vous au GPX.','[u]Téléphone[/u] : +33 145 48 52 04\r\nhttp://gpx.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (19,5,3,5,'X-Europe : conférence sur l\'acier et l\'Europe','ARCELOR, leader mondial de l\'acier, se retrouve aujourd\'hui au coeur des enjeux européens : négociations avec Bruxelles, conquête de nouveaux marchés dans les pays candidats, conflit transatlantique sur l\'acier...\r\nGuy Dollé, Président de la DG du grand groupe industriel, viendra à l\'X le 21 mai à 18:30 pour témoigner de son expérience quotidienne de l\'Europe, et parlera de sa vision du futur d\'une Europe qui commença il y a 50 ans par le charbon et l\'acier.','Inscriptions : Aurelien.Tignol@m4x.org');
+INSERT INTO `newsletter_art` VALUES (19,6,3,6,'X-Histoire : sur les traces des missions Flatters','En 1879, une mission gouvernementale commandée par le colonel Flatters étudie les tracés possibles pour construire une voie ferrée reliant l\'Algérie au Soudan. Marcel Cassou (61) a tenté, lors de plusieurs voyages récents, de reconstituer l\'itinéraire de la mission, et de comprendre les raisons de l\'échec sanglant de celle-ci. Il livrera mercredi 21 mai les conclusions de ses travaux.','[u]Informations[/u] : Jacqueline Pottier +33 142 50 65 57');
+INSERT INTO `newsletter_art` VALUES (19,7,4,7,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel Stoléru (56), se produira mardi 6 mai à 20:30, Salle Gaveau, sur le thème :\r\n[i]Le romantisme slave[/i] :\r\n - V.Hugo : [u]Mazeppa[/u]\r\n - Verdi : [u]Choeur du Trouvère[/u]\r\n - Smetana : [u]Chant tchèque pour choeur et orchestre[/u]\r\n - Chopin : [u]Cracovienne pour piano et orchestre[/u]\r\n - Liszt : [u]Rhapsodie n°9 pour piano[/u]\r\n - Dvorak : [u]Symphonie n°7[/u]\r\nPiano : A.Golovin\r\n\r\nEt aussi mardi 17 juin à 20:30, sur le thème [i]L\'épopée romantique[/i] :\r\n - Goethe : _Le roi des aulnes_\r\n - Wagner : _La chevauchée des Walkyries_\r\n - Tchaikowsky : _Concerto n°1 pour piano_\r\n (avec Roustem Saitkoulov)\r\n - Borodine : _Symphonie épique_','[u]Réservations spécial X[/u] : +33 147 206 281 (places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (19,8,4,8,'Drive In de l\'X','Les mardi 6 et mercredi 7 mai, le Drive-In aura lieu sur le campus de l\'École. Ne ratez pas cette occasion de revivre l\'atmosphère de l\'Amérique des années 50. Au programme :\r\n - mardi : concert du groupe [i]Alpha Jet[/i]\r\n projection de [i]Minority Report[/i]\r\n - mercredi : karting et défilé de voitures de collection\r\n projection de [i]Astérix & Obélix: Mission Cléopâtre[/i]\r\nVenez nombreux !','Renseignements : olivier.jonglez@m4x.org');
+INSERT INTO `newsletter_art` VALUES (19,9,4,9,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu mardi 13 mai de 8:00 à 9:30 à la Maison des X avec René Carron, président du Crédit Agricole. Patrick Poivre d\'Arvor sera pour sa part présent mardi 10 juin.','[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (19,10,4,10,'Rassemblement d\'Anciens : la garden party le 17 mai','La Garden, c\'est dans 15 jours (déjà) ! Vous etes nombreux à être déjà inscrits (comme en témoigne la liste des inscrits disponible sur le site), mais il est encore possible de s\'inscrire en remplissant le formulaire en ligne. Les retardataires peuvent malgré tout venir même sans s\'être inscrits au préalable, notre seul désir étant la réussite de cet événement. Apportez tous une tenue sportive avec vous !','Contact : nicolas.de-lauriston@m4x.org?subject=garden-party\r\nSite web : http://jumping.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (19,11,4,11,'Point Gamma','Le Point Gamma a lieu samedi 24 mai 2003. Au programme :\r\n - un concert de Sinsemilia (avec Orchestr\'Anonyme en première partie),\r\n - une scène de rock indé,\r\n - une comédie musicale des élèves d\'HEC,\r\n - une troupe de danse modern\'jazz,\r\n - et les animations habituelles : saut à l\'élastique, tyrolienne, bars-restos montés par les élèves de la 2001, impro, avant-première de ciné...\r\n\r\nCette année encore, le Point Gam promet d\'être énoooOÔOooorme!','Contact : veronique.juramy@m4x.org\r\nPré-ventes (23EUR) : https://www.polytechnique.org/pg.php');
+INSERT INTO `newsletter_art` VALUES (20,1,1,1,'Sondages','Un outil de sondage destiné aux associations polytechniciennes vient d\'être mis en place sur Polytechnique.org. Cet outil permet de sonder en ligne et de manière anonyme, sur un sujet donné, l\'ensemble des camarades désignés par le sondeur. Les résultats du sondage sont consultables par son créateur en temps réel.','Il est possible de créer son sondage à l\'adresse : https://www.polytechnique.org/sondage/accueil.php');
+INSERT INTO `newsletter_art` VALUES (20,2,2,2,'[b]Tous à l\'AG de l\'AX... le 18 juin ![b]','L\'AX organise mercredi 18 juin, à l\'occasion de son Assemblée Générale, un débat animé par notre camarade Jean-Claude Pelissolo (58) sur le thème \"Réseaux polytechniciens, réseau Internet : même combat ?\".\r\nVenez nombreux pour exprimer vos idées sur les projets de notre communauté, à l\'évidence essentiels pour l\'efficacité de nos réseaux tant sur le plan professionnel que sur celui de la solidarité polytechnicienne.','À 17:00 sur l\'ancien site de l\'X, amphi Gay-Lussac\r\n25, rue de la Montagne Sainte Geneviève 75 005 Paris');
+INSERT INTO `newsletter_art` VALUES (20,3,2,3,'Hymne de l\'École polytechnique','L\'hymne de l\'École polytechnique a été choisi le 26 janvier 2003 sur le site de l\'École.','http://musicalix.polytechnique.org/hymne de l\'X/hymne.html');
+INSERT INTO `newsletter_art` VALUES (20,4,3,4,'X-Internet : rencontre reportée au 18 juin','Étant donnée l\'importance du débat de mercredi 18 juin organisé à l\'occasion de l\'AG de l\'AX et animé par Jean-Claude Pelissolo (58), membre fondateur de notre groupe, et dont la thématique rejoint très étroitement la nôtre, nous annulons notre réunion prévue le 12 juin et nous vous invitons à participer nombreux le 18 juin.\r\n \r\nPour ceux qui ne pourraient se déplacer physiquement (notamment nos camarades en province ou à l\'étranger), n\'hésitez pas à nous transmettre vos questions ou propositions afin que nous soyons en mesure de nous faire vos portes-paroles...','jean-michel.yolin@m4x.org\r\nbertrand.de-singly@m4x.org');
+INSERT INTO `newsletter_art` VALUES (20,5,3,5,'Soirée X-eConfiance + X-Informatique','Les groupes X-eConfiance et X-Informatique te proposent deux événements mercredi 25 juin 2003 à la Maison des X, dès 18:45 :\r\n \r\n[u]Cocktail-Conférence du groupe X-eConfiance[/u]\r\n18:45, début de la conférence à 19:00 précises, suivie d\'un cocktail amical de 20:00 à 21:00 sur le thème \"Ni Big Brother, ni Ben Laden : comment construire une Administration électronique de confiance ?\" avec Jacques SAURET, Directeur de l\'Agence pour le Développement de l\'Administration Électronique.\r\n \r\n[u]Dîner-Débat du groupe X-Informatique[/u]\r\n19h45, début du dîner-débat à 20:15 précises sur le thème \"La déclaration des revenus en ligne : un exemple réussi de transition vers les services en ligne au citoyen\" avec Marc-Henri DESPORTES, directeur du programme Copernic, direction générale des Impôts et Jean-Marie LAPEYRE, directeur technique du programme Copernic, direction générale des Impôts.\r\n \r\n \r\nLes horaires des deux événements ont été aménagés pour permettre à ceux qui le souhaitent de participer à l\'ensemble du programme. Le cocktail-conférence du groupe X- eConfiance est réservé aux Polytechniciens.\r\n \r\n[i]Cocktail Conférence X-eConfiance[/i]\r\n 18:45 (participation : 15EUR/personne)\r\n http://www.cyberix.org/econfiance25062003.htm\r\n[i]Dîner Débat X-Informatique[/i]\r\n 19h45 (participation : 43EUR/personne)\r\n http://www.cyberix.org/xinfo25062003.asp\r\n[i]Maison des X[/i] http://www.maisondesx.com/','Amicalement,\r\nMatthieu Bergot (89), Jean-Paul Figer (62)');
+INSERT INTO `newsletter_art` VALUES (20,6,4,6,'Soirée X-Mines à l\'Hôtel Intercontinental','Vendredi 6 juin, l\'Hôtel Intercontinental accueille la soirée commune X-Mines dans ses salons.\r\nElle débutera à 21:00 précises par un concert exceptionnel de Jonathan Gilad (2001), pianiste concertiste, suivi du groupe de jazz Food. Tu pourras ensuite danser le rock et la valse toute la soirée. Attention, les places sont en nombre restreint.','Plus d\'infos auprès de la Kès kes@polytechnique.org ou +33 169 33 40 50 ou http://kes.polytechnique.org/\r\nPréventes : 20EUR [i] Sur place : 25EUR');
+INSERT INTO `newsletter_art` VALUES (20,7,4,7,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu mardi 10 juin de 8:00 à 9:30 à la Maison des X avec Patrick Poivre d\'Arvor.','[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (20,8,4,8,'Trophée X-Handisport','Samedi 14 juin aura lieu la 4ème édition du Trophée X-Handisport.\r\nComme chaque année, cette journée réunira des sportifs de toute l\'Île de France dans des disciplines aussi variées que le basket, le tir à l\'arc ou encore le handbike. Toutes les personnes désirant assister à des rencontres sportives de qualité sont bien entendu conviées à assister à cette grande fête du sport !','Programme : http://handisport.polytechnique.org[/i]\r\nContact : edouard.boujo@m4x.org?subject=Handisport');
+INSERT INTO `newsletter_art` VALUES (20,9,4,9,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel Stoléru (56), se produira mardi 17 juin à 20:30, Salle Gaveau, sur le thème [i]L\'épopée romantique[/i] :\r\n - Goethe : [u]Le roi des aulnes[/u]\r\n - Wagner : [u]La chevauchée des Walkyries[/u]\r\n - Tchaikowsky : [u]Concerto n°1 pour piano[/u]\r\n (avec Roustem Saitkoulov)\r\n - Borodine : [u]Symphonie épique[/u]','[u]Réservations spécial X[/u] : +33 147 206 281 (places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (20,10,4,10,'Pique-nique promo 38','Les camarades, épouses et veuves sont cordialement invités au pique-nique annuel chez A.Guillemin à Rueil-Malmaison le jeudi 19 juin à partir de 11 heures. S\'inscrire pour le 14 juin au plus tard auprès de Guillemin.','Téléphone : +33 147 51 69 73');
+INSERT INTO `newsletter_art` VALUES (21,1,1,1,'Antivirus','\nUn système d\'antivirus a été installé sur Polytechnique.org.\nTout mail t\'arrivant par l\'une de tes adresses polytechniciennes (@polytechnique.org, @m4x.org, @melix.org et .net) est filtré par ce logiciel. Ainsi tu es mieux protégé de ces nuisances qui sévissent sur Internet. Ce service étant en test ce mois-ci, il se peut qu\'il soit coupé par courts moments pour les réglages finaux. Sa mise en place permanente et définitive est prévue d\'ici la rentrée !\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (21,2,1,2,'Évolution du nombre d\'inscrits','\nNous atteignons ces jours-ci 8800 inscrits à Polytechnique.org.\nLa proportion d\'Xettes (promotions 1972 à 2002) vivantes inscrites sur Polytechnique.org vient de dépasser les 75% !!\nLes X atteignent quant à eux 42% d\'inscrits... À méditer ! ;-)\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (21,3,2,3,'réunion \"Réseaux polytechniciens et Internet\"','\nSuite à l\'AG de l\'AX du 18 juin, avec le débat animé par Jean-Claude Pelissolo (58) sur le thème \"Réseaux polytechniciens, réseau Internet : même combat ?\", une réunion d\'information sur le même thème et ouverte à toute la communauté polytechnicienne aura lieu le 1er octobre à 18 heures dans les locaux de l\'ancienne école.\nElle permettra d\'aborder les sujets non traités lors de l\'AG faute de temps, et de répondre aux questions, suggestions et attentes de l\'assistance.\nLes détails vous seront communiqués dans une prochaine lettre mensuelle.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (21,4,4,4,'14 juillet','C\'est la promo 2001 qui défilera cette année sur les Champs Élysées. Les élèves de la promotion 2002 sont pour leur part arrivés sur le plateau le 2 mai dernier. En effet depuis la réforme X2000 les élèves arrivent en mai de la première année de l\'école et non plus en septembre de la seconde année. De septembre à mai s\'est déroulée leur période de formation humaine et militaire.\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (21,5,4,5,'Association Poincaré','Une Association (loi de 1901) a été créée sous le nom :\r\n\"Association Poincaré et la Relativité\". Elle a pour objet de célébrer dignement le centenaire du principe de relativité énoncé le 26 septembre 1904 par Poincaré à Saint Louis (Missouri). Ce nouveau principe fondamental a été un des deux piliers de la physique du XXème siècle.\r\nOn rappelera à cette occasion que Poincaré avait donné dès 1900 la formule relativiste de l\'inertie de l\'énergie : E = mc².','Renseignements concernant l\'adhésion :\r\n115, boulevard Koenig 92 200 Neuilly sur Seine FRANCE \r\nassociation.poincare.relativite@wanadoo.fr');
+INSERT INTO `newsletter_art` VALUES (22,1,1,1,'L\'antivirus se révèle très efficace','L\'antivirus installé par l\'équipe au début de l\' été bloque chaque jour de 100 à 2000 courriels infectés. Les curieux pourront bientôt consulter ces chiffres au côté des autres graphiques de la page de statistiques.\r\nPour information, le virus le plus virulent de l\'été était SoBig.F, décrit sur le site de CommentÇaMarche.','[u]les stats[/u]: https://www.polytechnique.org/stats.php\r\nhttp://www.commentcamarche.net/forum/affich-376285-Virus-Sobig-F');
+INSERT INTO `newsletter_art` VALUES (22,2,1,2,'Incite nos camarades à s\'inscrire !','Alors que nous atteignons bientôt 9000 inscrits, soit près d\'un X vivant sur deux inscrit à Polytechnique.org, nous mettons en ligne un nouveau service : lorsqu\'une recherche dans l\'annuaire affiche le nom d\'un camarade qui n\'est pas encore inscrit à Polytechnique.org, tu peux nous indiquer son adresse de courriel. Nous lui adresserons alors une proposition d\'inscription simplifiée afin qu\'il rejoigne la communauté des X sur le web !','https://www.polytechnique.org/search.php');
+INSERT INTO `newsletter_art` VALUES (22,3,2,3,'Rentrée des classes','\nLa promotion 2003, fraîchement recrutée, effectue sa première rentrée à l\'École lundi 1er septembre. Les résultats du concours sont consultables sur le site de l\'École. http://www.polytechnique.fr/concours/resultats/admis.htm\nAprès une semaine sur le plateau, les X2003 rejoindront pendant deux semaines le CIECM, avant de rejoindre leurs Écoles d\'Armes respectives :\n - Armée de Terre : Coëtquidan,\n - Armée de l\'Air : Salon-de-Provence et Dijon,\n - Marine : Brest,\n - Gendarmerie : Melun.\nhttp://www.ciecm.terre.defense.gouv.fr/\n\nToute l\'équipe de Polytechnique.org souhaite la bienvenue à nos jeunes camarades qui pourront rejoindre notre communauté des X sur le web dès qu\'ils auront été ajoutés à notre base de données, courant septembre.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (22,4,2,4,'Réunion \"Réseaux polytechniciens et Internet\"','\nSuite à l\'AG de l\'AX du 18 juin, avec le débat animé par Jean-Claude Pelissolo (58) sur le thème \"Réseaux polytechniciens, réseau Internet : même combat ?\", une réunion d\'information sur le même thème et ouverte à toute la communauté polytechnicienne aura lieu le 1er octobre à 18 heures dans les locaux de l\'ancienne école.\nElle permettra d\'aborder les sujets non traités lors de l\'AG faute de temps, et de répondre aux questions, suggestions et attentes de l\'assistance.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (22,5,4,5,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu jeudi 11 septembre de 8:00 à 9:30 à la Maison des X avec Claude Bébéar, Président du Conseil de surveillance de AXA.\r\nJean-François Mattéi, Ministre de la santé, sera pour sa part présent mardi 7 octobre.\r\n','[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (23,1,1,1,'Réseaux polytechniciens, réseau Internet : même combat ?','Lors de l\'Assemblée générale de l\'AX du 18 juin 2003, un débat a été animé par Jean-Claude Pelissolo (58) sur le thème :\r\n [u]Réseaux polytechniciens, réseau Internet : même combat ?[/u]\r\nFaute de temps cependant, tous les sujets n\'ont pu être abordés, et l\'auditoire n\'a pu exprimer toutes ses idées.\r\n\r\nUne réunion d\'information sur le même thème, animée à nouveau par Pelissolo, aura par conséquent lieu le 1er octobre à 18 heures.\r\nOuverte à toute la communauté polytechnicienne, elle se déroulera dans les locaux de l\'ancienne École.\r\nL\'équipe de Polytechnique.org commencera par faire une démonstration synthétique des fonctionnalités proposées par son site web, puis l\'auditoire prendra la parole, pour des questions, commentaires, et idées.','mercredi 1er octobre, à 18:00\r\nAmphithéâtre Poincaré\r\nAncienne École polytechnique\r\n25, rue de la Montagne Sainte Geneviève\r\nParis V');
+INSERT INTO `newsletter_art` VALUES (25,10,2,6,'X-Gaziers','Le groupe X-Gaziers se réunira lundi 26 janvier 2004 au cours d\'un dîner dont l\'invité sera George Verberg, PDG de Gasunie et président de l\'Union Internationale de l\'Industrie du Gaz (UIIG).','Informations ou adhésion : http://x-gaziers.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (24,1,1,1,'Les forums font peau neuve !','Banana, la nouvelle interface web pour les forums, a vu le jour.\r\n\r\nPlus rapide que le désormais désuet WebForum, Banana apporte son lot de nouvelles fonctionnalités, bénéficiant de quelques mois de gestation. On peut citer (entre autres) la possibilité de :\r\n - marquer manuellement les forum comme lus ;\r\n - personnaliser sa signature et son nom de posteur ;\r\n - voir le contenu du message et le fil de discussion en même temps ;\r\n - accéder au message parent d\'un clic ;\r\n - (et d\'autres, la présente lettre ne suffirait pas à tout détailler).\r\n\r\nParallèlement au rajeunissement de l\'interface web des forums, la création de nombreux forums thématiques (dont les forums section et de nouveaux forums promo) achèveront de te convaincre de visiter les forums et les faire vivre un peu plus !','Les forums, c\'est ici ===> https://www.polytechnique.org/banana/');
+INSERT INTO `newsletter_art` VALUES (24,2,2,2,'Réunion \"Réseaux polytechniciens et Internet\"','Lors de l\'Assemblée générale de l\'AX du 18 juin 2003, un débat a été animé par Jean-Claude Pelissolo (58) sur le thème :\r\n [u]Réseaux polytechniciens, réseau Internet : même combat ?[/u]\r\nFaute de temps cependant, tous les sujets n\'ont pu être abordés, et l\'auditoire n\'a pu exprimer toutes ses idées.\r\n\r\nUne réunion d\'information sur le même thème, animée à nouveau par Pelissolo, aura par conséquent lieu le 1er octobre à 18 heures.\r\nOuverte à toute la communauté polytechnicienne, elle se déroulera dans les locaux de l\'ancienne École.\r\nL\'équipe de Polytechnique.org commencera par faire une démonstration synthétique des fonctionnalités proposées par son site web, puis l\'auditoire prendra la parole, pour des questions, commentaires, et idées.','mercredi 1er octobre, à 18:00\r\nAmphithéâtre Poincaré\r\nAncienne École polytechnique\r\n25, rue de la Montagne Sainte Geneviève\r\nParis V');
+INSERT INTO `newsletter_art` VALUES (24,3,4,3,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu mercredi 8 octobre de 8:00 à 9:30 à la Maison des X avec Anne-Marie Idrac, présidente de la RATP (Jean-François Mattéi, ministre de la santé, a un empêchement).\r\nJacques Nikonoff, président de ATTAC, sera pour sa part présent au PDX du vendredi 7 novembre, à l\'occasion du Forum social mondial à Saint-Denis.','[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (24,4,4,4,'Cérémonie de la Flamme à l\'Arc de Triomphe','\nL\'AX ravivera la Flamme à l\'Arc de Triomphe le lundi 13 octobre à 18:30.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (24,5,4,5,'X-Résistance','Dans le cadre du cycle Humanités et Sciences Sociales (\"conférences DFHM\"), l\'amphi du 16 octobre sera ouvert à toutes les promotions. Il prendra la forme non d\'une conférence mais d\'un spectacle intitulé [u]Passé Décomposé 1940-44[/u] .\r\nIl s\'agit d\'un montage mis en scène de textes (articles de journaux, discours politiques, lettres), de films et de chansons de l\'époque. Le spectacle sera suivi d\'un échange entre les acteurs et la salle.','jeudi 16 octobre 2003 à 10:30 précises\r\nÉcole polytechnique (Palaiseau), amphi Poincaré\r\nhttp://x-resistance.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (24,6,4,6,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel Stoléru (56), se produira mardi 14 octobre à 20:30, Salle Gaveau, sur le thème [i]L\'harmonie romantique[/i] :\r\n - Baudelaire : [u]Harmonie du soir[/u]\r\n - Strauss : [u]4 lieder[/u] avec Susan Gouthro, soprano lauréate du Concours des Voix Musicales de Paris\r\n - Boieldieu : [u]concerto pour harpe et orchestre[/u] , avec le soliste S. Blassel\r\n - Schubert : [u]symphonie n°4[/u] , [i]Tragique[/i]\r\n - Schubert : [u]Ave Maria[/u] (chant et orchestre)','[u]Réservations spécial X[/u] : +33 149 530 507\r\n(places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (24,7,4,7,'Nuit de la rentrée','Jeudi 16 octobre aura lieu la première grande soirée sur l\'X de l\'année, la traditionnelle Nuit de la rentrée. 8 bars [i]gue-dins[/i] (bar ô mètre, bar champagne, ...), Disco Géante, salle rock et ambiance un peu plus douce pour souffler un peu, avant d\'essayer de gagner un voyage à Londres.','Préventes dans les Grandes Écoles : 10EUR\r\nVentes sur place : 12EUR\r\nNavettes depuis Denfert-Rochereau, Centrale et Supélec\r\n[u]Renseignements[/u] : Spectokessiers (+33 169 3333 4050)\r\nhttp://styx.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (25,1,1,1,'Nouvelle version du portail des associations','Après quelques mois de préparation, l\'équipe Polytechnique.org est heureuse d\'annoncer la sortie de la nouvelle version du site Asso, portail des sites webs polytechniciens. Ce site recense les sites relatifs à la vie associative des X, aussi bien les binets, les groupes X, que les promotions, les associations et les institutions.\r\n\r\nLa nouvelle version du site essaie de guider au mieux le visiteur dans le dédale des 87 activités présentées, dans un environnement graphique modernisé.\r\nSi tu souhaites que ton groupe soit lui aussi référencé sur Asso, il te suffit d\'envoyer un courriel à info_asso@polytechnique.org.','http://asso.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (25,2,2,2,'X-Mémorial : Cérémonie au Monument aux Morts du Boncourt','\nLe samedi 15 novembre à 10:30, l\'AX déposera une gerbe au Monument aux Morts du Boncourt, dans la cour d\'honneur.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (25,3,2,3,'Groupe X-Israël','Dans le cadre de sa collaboration avec l\'Association Technion France (le Technion de Haïfa est une École d\'application de l\'X, actuellement la seule en Israël), X-Israël s\'associe à une conférence mardi 18 novembre 2003 à 18:30 sur le thème \"Innovation et Transferts de Technologie, performances et compétences israéliennes\".\r\n','Mardi 18 novembre 2003 à 18:30\r\nRenseignements : http://x-israel.polytechnique.org/\r\nATF : http://www.technionfrance.org/\r\nTechnion de Haïfa : http://www.technion.ac.il/');
+INSERT INTO `newsletter_art` VALUES (25,4,2,4,'X-Biotech: les biotechnologies vues de l\'intérieur','Lors d\'une soirée-débat lundi 24 novembre, David Sourdive (86), Directeur Général de Cellectis, et Frédéric Revah (82), Directeur Scientifique de Cerep (deux sociétés parmi les plus renommées de la biotechnologie française), nous feront partager leur aventure passionnante et répondront à toutes les questions de ceux qui s\'intéressent de près ou de loin à cette industrie qui se développe à grande vitesse et qui attire de plus en plus de capitaux en Europe. La soirée-débat sera suivie d\'un pot.','École des Mines (60, bd St Michel à Paris) de 19:30 à 22:30\r\n[u]Participation[/u] : 10 EUR (gratuit pour les X01, X02, X03)');
+INSERT INTO `newsletter_art` VALUES (25,5,2,5,'Groupe X-Israël','À l\'occasion de son dixième anniversaire, le groupe X-Israël organise un dîner-débat en présence de S.E. M. Nissim Zvili, ambassadeur d\'Israël en France.','Jeudi 4 décembre 2003 à 20:00\r\nRenseignements : http://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (25,6,4,6,'Concert de jazz','Mercredi 5 novembre, Jean-Michel Pilc (79) au piano, accompagné de Thomas Bramerie à la contrebasse et de Mark Mondésir à la batterie, se produira à l\'École au Salon d\'Honneur lors d\'un concert gratuit.','Renseignements : adrien.peyronnel@m4x.org');
+INSERT INTO `newsletter_art` VALUES (25,7,4,7,'Petit-déjeuner polytechnicien','Le prochain PDX aura lieu vendredi 7 novembre de 8:00 à 9:30 à la Maison des X avec Jacques Nikonoff, président de ATTAC, à l\'occasion du Forum social mondial à Saint-Denis.','[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (25,8,4,8,'Conférence','La Direction de l\'École polytechnique organise des conférences politiques et culturelles destinées aux Élèves, et ouvertes aux Anciens.\r\nDans le cadre du cycle [u]Défense et relations internationales[/u] , Valéry Giscard D\'Estaing (44), ancien président de la République, sera l\'invité de la conférence sur [u]l\'Europe[/u] .','École polytechnique, amphithéâtre Poincaré\r\nmercredi 26 novembre à 11:00');
+INSERT INTO `newsletter_art` VALUES (25,9,4,9,'Forum de l\'X 2003','Le Forum de l\'École se tiendra cette année sur deux journées :\r\n - [u]mercredi 26 novembre après-midi[/u] : points-débats animés par des personnalités d\'entreprises françaises et internationales ;\r\n - [u]jeudi 27 novembre dès 09:00[/u] : stands avec les représentants de plus de 100 entreprises de divers domaines (chimie, industrie, transport, BTP, banques...), Écoles et Corps de l\'État.\r\nLe Forum se tiendra sur le site de l\'École, et l\'entrée sera libre.','[u]Renseignements[/u] : +33 169 33 4295\r\nhttp://www.xentreprises.com/');
+INSERT INTO `newsletter_art` VALUES (26,1,1,1,'Bientôt un X sur deux sera inscrit sur Polytechnique.org','Un double-événement approche : tout d\'abord celui de l\'inscription du 10 000ème Polytechnicien sur notre site communautaire, mais aussi celui du 10 025ème, qui élèvera à 50% nombre d\'X vivants inscrits à Polytechnique.org (notre communauté représente 20 050 X en vie actuellement...).\r\n\r\nNous comptons sur toi pour nous aider à accélérer le processus : si tu connais l\'adresse de courriel d\'un camarade qui n\'est pas encore inscrit, recherche-le dans l\'annuaire en ligne, puis clique sur le lien : \"clique ici si tu connais son adresse email\". Nous lui enverrons alors un courriel pour lui présenter notre site, le site de tous les X !','https://www.polytechnique.org/recherche.php');
+INSERT INTO `newsletter_art` VALUES (26,2,3,2,'Groupe X-Histoire : les Tanagras','Les Tanagras, par Anne BOUQUILLON, chargée de recherche au Laboratoire des musées de France, et Violaine JEAMMET, conservateur au département des Antiquités grecques, étrusques et romaines du Louvre.','mercredi 3 décembre.\r\nPour tout renseignements, contacter Jacqueline POTTIER :\r\nTél. : +33 142 506 557\r\nMél. : jeanpot@club-internet.fr');
+INSERT INTO `newsletter_art` VALUES (26,3,3,3,'Groupe X-Israël','À l\'occasion de son dixième anniversaire, le groupe X-Israël organise un dîner-débat en présence de S.E. M. Nissim ZVILI, ambassadeur d\'Israël en France.','Jeudi 4 décembre 2003 à 20:00\r\nhttp://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (26,4,3,4,'Tournoi triangulaire X-HEC-Centrale','Le prochain tournoi triangulaire X-HEC-Centrale de cross-country se déroulera dimanche 14 décembre 2003 à l\'École polytechnique (Palaiseau). 9:30 inscription sur place (3EUR), 10:30 départs des courses. Cinq catégories seront disponibles : \r\n - Femmes,\r\n - jeunes (20-29 ans),\r\n - seniors (30-39 ans),\r\n - anciens (40-49 ans),\r\n - vétérans (50 ans et +).\r\n\r\nNous en appelons particulièrement aux jeunes et aux seniors, dont la trop faible participation nous met souvent en position de faiblesse vis-à-vis de nos concurrents pour le titre ! Sur nos terres, nous devons récupérer le trophée perdu l\'an passé au profit d\'HEC...\r\n[u]Nota[/u] : les enfants sont toujours les bienvenus. ','Tél. : +33 140 607 588 : Dominique DESCROIX (58)\r\nMél. : dominique.descroix@polytechnique.org\r\nPré-inscription sur Internet (recommandée) :\r\nhttp://www.claywall.com/cross.html');
+INSERT INTO `newsletter_art` VALUES (26,5,3,5,'Groupe X-Gaziers','Le groupe X-Gaziers se réunira lundi 26 janvier 2004 au cours d\'un dîner dont l\'invité sera George VERBERG, PDG de Gasunie et président de l\'Union Internationale de l\'Industrie du Gaz (UIIG).','http://x-gaziers.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (26,6,4,6,'Conférence sur l\'astronomie','À l\'occasion de l\'inauguration de l\'exposition consacrée à l\'astronomie à la bibliothèque, André BRAHIC, astrophysicien, tiendra une conférence en amphithéâtre Gay-Lussac mercredi 3 décembre à 18:30 intitulée : Enfants du Soleil, de Saturne à l\'âge de l\'Univers. L\'entrée sera libre.','Renseignements : jean-marc.espinasse@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (26,7,4,7,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel STOLÉRU (56), se produira mardi 9 décembre à 20:30, Salle Gaveau, sur le thème Le romantisme allemand :\r\n - H. Heine : [u]La Lorelei[/u]\r\n - Beethoven : [u]Ouverture de Coriolan[/u]\r\n - Brahms : [u]Concerto n°2 pour piano[/u] (D. PASCAL)\r\n - Schumann : [u]Symphonie n°1[/u] ( Le Printemps)','[u]Réservations spécial X[/u] : +33 149 530 507\r\n(places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (26,8,4,8,'La mort du JOD - X Course au Large a besoin des Anciens !','Le 7 octobre 2003, le voilier \"École polytechnique\" a été détruit par un incendie d\'origine encore floue. Pour continuer à régater à l\'X, nous cherchons à acquérir un bateau, en remplacement de celui-ci.\r\nTout soutien, toute possibilité de partenariat, nous serait d\'une très grande aide pour assurer la survie du Binet. Avec votre soutien, une solution pourra être trouvée afin de continuer à représenter l\'École dans le monde de la régate et faire découvrir notre passion aux promotions.\r\nL\'ensemble du bureau est à votre disposition pour tout renseignement.','http://xcourseaularge.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (27,1,1,1,'Voeux de l\'équipe','\nChère Camarade, cher Camarade,\n\nnous profitons de cette 27ème lettre mensuelle pour te formuler nos voeux les plus sincères de bonne santé, de réussite, mais aussi de bonheur, pour toi-même, tes proches, et tes amis. Nous espérons que 2004 sera pour toi l\'occasion de réaliser les projets qui te tiennent le plus à coeur !\nNous serons heureux, de notre côté, de te présenter de nouveaux services et des innovations, durant toute l\'année, par la présente lettre.\n\n L\'équipe Polytechnique.org\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (27,2,1,2,'Panne de notre hébergeur la semaine du 5 janvier 2004','La semaine du 5 janvier 2004, des coupures de courant répétées vont nous obliger à éteindre nos serveurs. Dès dimanche 4 au soir, nous basculerons tous nos services en ligne sur des machines de secours (chez un autre hébergeur). Cependant, lundi 5 et mercredi 7, nous serons obligés de couper le service de forums de discussion (de 9:00 à 18:00).\r\nNous te prions de nous excuser pour la gêne occasionnée et t\'assurons que nous ferons le maximum pour limiter ces coupures aux seuls forums, et pour les plages horaires les plus courtes.','https://www.polytechnique.org/coupure.php');
+INSERT INTO `newsletter_art` VALUES (27,3,3,3,'Groupe X-Israël','Le prochain dîner-débat du groupe X-Israël aura lieu en présence de Philippe RICHERT, président du Groupe d\'Amitié France-Israël du Sénat.','Mercredi 21 janvier 2004, à 20 heures.\r\nRenseignements : info@x-israel.polytechnique.org\r\nhttp://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (27,4,3,4,'Groupe X-Gaziers','Le groupe X-Gaziers se réunira au cours d\'un dîner dont l\'invité sera George VERBERG, PDG de Gasunie et président de l\'Union Internationale de l\'Industrie du Gaz (UIIG).','Lundi 26 janvier 2004\r\nhttp://x-gaziers.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (27,5,3,5,'X-Biotech : conférence-débat','Dans le cadre de son cycle de conférences 2003-2004 sur le thème [i]Pour l\'essor des biotechnologies en France[/i] , le groupe X-Biotech est heureux de vous convier à une conférence-débat par Matthieu BONNET, attaché Pharmacie et Biotechnologies au PEE de Washington, sur le thème : [u]Forces et faiblesses des biotechnologies françaises vues des États-Unis[/u].','lundi 26 janvier 2004, 19:30 à l\'École des Mines de Paris.\r\nRenseignements : http://x-biotech.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (27,6,3,6,'Déjeuner des Caissiers et Délégués de promo','\n2004 sera l\'année du bicentenaire de la création de Kès des élèves, 10 ans après celle de notre École. [u]La Jaune et la Rouge[/u] rappellera l\'événement tout au long de l\'année, par la publication de plusieurs articles sur les Kès au travers des âges.\nPour fêter cet événement exceptionnel, les Caissiers et Délégués de promotion seront conviés à un déjeuner festif samedi 20 mars, dans le Magnan de notre ancienne école, rue Descartes.\nRetenez cette date sur vos agendas !\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (27,7,4,7,'Fondation de l\'X','La Fondation a remis le prix d\'Option 2003 à Samuel MAMAN (2000) pour son travail dans le cadre du cursus X-Oxford, durant un stage effectué chez Glaxo Smith Kline au Royaume-Uni. Pour en savoir plus, le flash info du mois est consultable sur le site de la FX.','http://www.fondationx.org/');
+INSERT INTO `newsletter_art` VALUES (27,8,4,8,'Petit-déjeuners polytechnicien','Bernard STASI, président de la Commission sur la laïcité, Thierry BRETON, PDG de France Télécom, et Jean-René FOURTOU, PDG de Vivendi Universal, seront les invités des trois prochains PDX, de 8:00 à 9:30 dans les locaux de la Maison des X.','mercredi 7 janvier : Bernard STASI\r\nmardi 3 février : Thierry BRETON\r\nmardi 2 mars : Jean-René FOURTOU\r\n[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (27,9,4,9,'XMP-Entrepreneur','La prochaine réunion de l\'association présentera deux expériences entrepreneuriales :\r\n - Thomas RENAUDIN (82), créateur de la société en [i]spin-off[/i] : So Near,\r\n - Pascal DURAND-SMET (82), repreneur de la société Bihr.\r\nLe tour de salle des participants sera suivi du pot traditionnel.','lundi 19 janvier 2004 à 18:00, à la Maison des X\r\nhttp://www.xmp-entrepreneur.org/manifestations.php');
+INSERT INTO `newsletter_art` VALUES (27,10,4,10,'Promo 38','Le prochain magnan aura lieu jeudi 15 janvier 2004 (épouses et veuves conviées) au restaurant administratif de la montagne Sainte-Geneviève.\r\nCe sera l\'occasion de tenir l\'Assemblée générale annuelle de l\'Association, le présent communiqué valant convocation conformément aux statuts.','[u]Inscription[/u] (avant le 9 janvier) : GUILLEMIN (+33 147 516 973)\r\n25, rue de la montagne Sainte-Geneviève, à 12:30.');
+INSERT INTO `newsletter_art` VALUES (27,11,4,11,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel STOLÉRU (56), se produira mardi 20 janvier 2004 à 20:30, Salle Gaveau, sur le thème [i]La rêverie romantique[/i] :\r\n - Hugo : [u]La pente de la rêverie[/u]\r\n - Schubert : [u]Chant nocturne en foret[/u] (4 cors et chorale)\r\n - Offenbach : [u]Barcarolle des Contes d\'Hoffmann[/u]\r\n - Dvorak : [u]Concerto pour violon[/u] (soliste : Gérard Poulet)\r\n - Tchaikowsky : [u]Symphonie n°2[/u] ([i]Petite Russie[/i])','[u]Réservations spécial X[/u] : +33 147 206 281\r\n(places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (27,12,4,12,'Soirée dédiée aux Xettes','Membre du Conseil de l\'AX, Nathalie Charles (84) représente celle-ci au sein de [u]Grandes Écoles au Féminin[/u], qui réunit les anciennes des principales écoles d\'ingénieur et de commerce, en vue de promouvoir la place des femmes dirigeantes en entreprise.\r\nGEF organise une soirée pour présenter son action passée et future. Si tu n\'as pas reçu le mail adressé à xettes@polytechnique.org, si tu n\'es pas encore inscrite (à la liste de diffusion et/ou à la soirée), ou si tu veux en savoir plus sur GEF, tu es invitée à visiter le site web ou contacter Nathalie.','mardi 20 janvier 2004 au Carrousel du Louvre\r\nsite web : http://www.grandesecolesaufeminin.net/\r\nnathalie.charles@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (28,1,1,1,'Filtre anti-spam permanent','L\'équipe de Polytechnique.org est heureuse de t\'annoncer la sortie de son filtre anti-spam permanent, nommé Bogofilter. Le filtre installé jusqu\'à présent, et qui marquait tes spams avec la mention \"[spam probable]\" vient d\'être désactivé.\r\nBogofilter est un [b]filtre intelligent[/b] qui, si tu le corriges quand il se trompe (comme la non-détection d\'un spam), apprendra à mieux détecter les spams. Tu peux l\'activer et comprendre comment lui dire de se corriger sur la page dédiée. Celle-ci est aussi accessible depuis la page \"Mes emails\" de la rubrique \"Personnaliser\".','https://www.polytechnique.org/antispam.php');
+INSERT INTO `newsletter_art` VALUES (28,2,1,2,'Enrichissement de l\'annuaire','Les rubriques de l\'annuaire en ligne ont été enrichies afin qu\'un inscrit puisse indiquer plus largement quelles sont ses compétences spécifiques, quelles langues il maîtrise, dans quel secteur d\'activité précis il travaille, etc.\r\nNous t\'incitons très fortement à [b]compléter ton profil[/b], en particulier les nouvelles rubriques.','https://www.polytechnique.org/profil.php');
+INSERT INTO `newsletter_art` VALUES (28,3,1,3,'Conseils professionnels','\nAfin de favoriser les contacts entre les X qui sont à la recherche d\'un conseil pour l\'orientation de leur carrière professionnelle, et les camarades qui feraient bien volontiers partager leur expérience, l\'équipe de Polytechnique.org a mis en place un base de [i]référents[/i] (ou [i]mentors[/i]) qui permet :\n - aux jeunes X qui bâtissent leur projet professionnel, et aux moins jeunes qui souhaitent se ré-orienter, de [b]rechercher[/b] un Ancien susceptible de les aider :\n https://www.polytechnique.org/referent.php\n - aux camarades qui sont prêts à faire [b]partager[/b] leurs expériences de certains domaines d\'activité, ou de la culture professionnelle de certains pays, d\'indiquer qu\'ils sont volontaires :\n https://www.polytechnique.org/profil.php?old_tab=mentor\n\nLa base de mentors est pour l\'instant peu remplie puisque cette fonctionnalité est nouvelle, mais nous espérons qu\'elle deviendra bien plus fournie suite à la présente annonce.\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (28,4,1,4,'Télé-paiements : délais raccourcis','Le service de télé-paiements mis en place en avril 2003 vient d\'être amélioré : le délai entre le paiement et le moment où le commanditaire recevra le virement bancaire est désormais de [b]deux semaines[/b] et non plus de six semaines.\r\nComme auparavant, tout ensemble peut être commanditaire : groupe X, promotion, binet, etc.','https://www.polytechnique.org/paiement/');
+INSERT INTO `newsletter_art` VALUES (28,5,3,5,'Déjeuner X-Banque sur la presse économique et financière','La prochaine réunion du groupe X-Banque aura pour invité Olivier FLEUROT, CEO du [u]FT Publishing Group[/u] (qui publie les journaux [i]The Financial Times[/i] et [i]Les Échos[/i]). Le thème est la presse économique et financière : [b]Contre-pouvoir ou chambre d\'écho[/b].','Déjeuner jeudi 12 février à 12:30.\r\nPlus d\'informations : http://x-banque.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (28,6,3,6,'Groupe X-Vinicole','Ce groupe contribue au développement convivial d\'une culture oenologique de qualité parmi les X, en s\'appuyant sur ceux qui exercent une profession en relation avec l\'oenologie et les activités vinicoles et viticoles.\r\nLa prochaine manifestation programmée est le salon exposition : [i]Les Vignerons Polytechniciens[/i] qui vous propose la dégustation des produits d\'une vingtaine de camarades.\r\nPour être tenu au courant de nos prochaines manifestations, inscris-toi sur la liste X-Vinicole.','Salon exposition : dimanche 14 mars de 11:00 à 19:00\r\nMaison des X : 12, rue de Poitiers Paris\r\nContact : x.vinicole@maisondesx.com\r\nInscription à la liste : https://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (28,7,4,7,'Petit-déjeuners polytechniciens','Jean-Paul HUCHON, président sortant du Conseil Régional d\'Île-de-France, et Jean-René FOURTOU (60), PDG de Vivendi Universal, seront les invités des prochains PDX, de 8:00 à 9:30 à la Maison des X.\r\nThierry BRETON a annulé sa participation du 3 février, et viendra mardi 1er juin.','mardi 3 février : pas de PDX\r\nmercredi 11 février : Jean-Paul HUCHON\r\nmardi 2 mars : Jean-René FOURTOU\r\n[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (28,8,4,8,'Dîner des Anciennes','Suite au grand succès du dîner de [u]Grandes Écoles au Féminin[/u], et à la demande de nombreuses Anciennes de l\'X (Xettes), nous organisons un dîner [i]Au Féminin[/i]. Une occasion d\'échanger entre Xettes sur nos parcours et expériences.\r\nToutes les Xettes inscrites sur la liste de diffusion \"xettes\" recevront prochainement une invitation à s\'inscrire, qui précisera toute la logistique. Le dîner aura lieu à Paris, mais nous penserons à celles au loin !','Dîner lundi 8 mars à Paris (Journée de la Femme)\r\nListe de diffusion : https://www.polytechnique.org/listes/\r\nSite web : http://www.grandesecolesaufeminin.net/\r\nNathalie (84) nathalie.charles@polytechnique.org\r\nAvra (94) avra.tzevelekis@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (28,9,4,9,'XMP Entrepreneur : réunion générale','La prochaine réunion générale de XMP sera animée par Bernard ZIMMERN (X49 - ENA) qui viendra nous parler des sujets développés dans son dernier livre [u]La dictacture des syndicats[/u].\r\nBernard ZIMMERN était venu en 2001 nous exposer ses idées sur l\'entreprenariat lors de la sortie de [u]Les profiteurs de l\'État[/u].','Réunion générale : lundi 15 mars\r\nhttp://www.xmp-entrepreneur.org/');
+INSERT INTO `newsletter_art` VALUES (28,10,4,10,'Résultats de l\'enquête sur La J&R et le projet de réforme','Les résultats de l\'enquête sur [u]La Jaune et la Rouge[/u] menée en décembre 2002 ont été publiés par le groupe de travail de l\'AX présidé par Jean SALMONA (56). L\'ensemble de ces résultats est disponible sur le site du sondage.','http://sondage-ljlr.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (28,11,4,11,'Humour polytechnicien','L\'humour polytechnicien a toujours fait partie de notre culture : être sérieux sans trop se prendre au sérieux, décrisper, décoincer, créer une atmosphère détendue propice à l\'innovation et aux évolutions (certains de nos camarades l\'ont même érigé en méthode de management comme dans le [i]Humour Consulting Group[/i]).\r\nTu peux apporter ta pierre dans ce domaine, en reflétant toi-aussi [b]l\'humour à travers les ages[/b].','http://humour.polytechnique.org/\r\nContact : JMY (65) jean-michel.yolin@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (29,1,1,1,'De généreux donateurs','Olivier GUILLAUMIN (80) et Thomas-Xavier MARTIN (89) ont décidé de faire chacun un don de 1000 EUR à notre association. Nous les remercions vivement pour ce geste qui nous permettra de maintenir durablement le service entièrement gratuit que nous offrons.\r\nLeur intention était de donner l\'exemple et nous espérons que quelques camarades ou leurs entreprises suivront cet exemple.\r\n\r\nPolytechnique.org est une association de loi 1901 constituée de 25 camarades bénévoles de toutes promotions, qui fournit à la fois des services individuels à chaque X (Ancien ou Élève), et des outils en ligne destinés aux groupes X, aux binets, aux promotions.\r\n\r\nLa forte croissance du nombre d\'inscriptions et l\'adoption de plus en plus large de nos services par l\'ensemble de la communauté nous conduit à acquerir du nouveau matériel. Les fonds collectés serviront d\'une part à financer ce matériel, d\'autre part à nous doter d\'un hébergement supplémentaire destiné à assurer la disponibilité constante de nos services.\r\nSi toi aussi tu souhaites nous aider à améliorer notre qualité de service, rends-toi sur la page des dons.','https://www.polytechnique.org/dons.php');
+INSERT INTO `newsletter_art` VALUES (29,2,3,2,'Groupe X-Santé : l\'accès aux médicaments pour les PVD','Les intervenants de la réunion sont Philippe BAETZ (Vice-Président de Sanofi-Synthelabo) et Stéphane MANTION (secrétaire général de l\'OPALS, et directeur du partenariat à la Croix Rouge). Seront abordées des questions très actuelles autour de la mondialisation de la santé, des évolutions industrielles majeures, de la place fondamentale des choix éthiques dans l\'organisation des systèmes de soins. Un autre regard sera développé sur les fondamentaux qui sous-tendent nos systèmes de santé.','Lundi 8 mars à 18:30\r\n1, rue Descartes, Amphi Poincaré\r\nInscriptions avant le 5 mars philippe.brunswick@m4x.org\r\n\r\nOPALS : Organisation panafricaine de lutte contre le sida\r\nhttp://www.croix-rouge.fr/goto/actions/sida/index.asp');
+INSERT INTO `newsletter_art` VALUES (29,3,3,3,'Groupe X-Vinicole','Le salon des Vignerons Polytechniciens est devenu un [i]must[/i] de la collectivité polytechnicienne. Vous pourrez déguster, lors du prochain salon, la production vinicole de 22 de nos camarades, en provenance de la plupart des grands vignobles français. Le déjeuner sur place avec des invités est possible.\r\nPour être tenu au courant des autres manifestations organisées par le Groupe X-Vinicole, inscris-toi sur la liste [b]X-Vinicole[/b].','Salon exposition : dimanche 14 mars de 11:00 à 19:00\r\nMaison des X : 12, rue de Poitiers, Paris 7ème\r\nContact : +33 149 54 74 74 ou x.vinicole@maisondesx.com\r\nInscription à la liste : https://www.polytechnique.org/listes/\r\nRepas hors boisson : 33EUR sur réservation uniquement');
+INSERT INTO `newsletter_art` VALUES (29,4,3,4,'XMP Entrepreneur : réunion générale','La prochaine réunion générale de XMP aura lieu lundi 15 mars.','http://www.xmp-entrepreneur.org/');
+INSERT INTO `newsletter_art` VALUES (29,5,3,5,'X-Informatique : Dîner-débat du 31 mars 2004','Transports en commun et nouvelles technologies : gadget ou nécessité\r\nDîner-débat animé par André AMPELAS (X66-ENST71), DSI de la RATP, élu DSI de l\'année 2003.','Tous les détails et pour s\'inscrire : http://www.cyberix.org/');
+INSERT INTO `newsletter_art` VALUES (29,6,3,6,'Réunion X-Expertise','Lors de la prochaine réunion, Pierre CHEMILLER (53), président de Qualibat, fera un exposé sur :\r\n [i]Comment améliorer la qualité du bâtiment[/i]\r\nL\'exposé sera suivi d\'un dîner.','mercredi 31 mars à la Maison des X\r\nMaison des X : 12, rue de Poitiers, 75007 Paris\r\nRenseignements : Jacques LUTFALLA (53)\r\njacques.lutfalla@m4x.org ou +33 148 878 592');
+INSERT INTO `newsletter_art` VALUES (29,16,4,7,'Petit-déjeuners polytechniciens','Jean-René FOURTOU (60), PDG de Vivendi Universal, Jean-Claude TRICHET, président de la Banque Centrale Européenne, et Jean-Claude MAILLY, secrétaire de Force Ouvrière, seront les prochains invités des PDX, de 8:00 à 9:30 à la Maison des X.','mardi 2 mars : Jean-René FOURTOU\r\nmercredi 7 avril : Jean-Claude TRICHET\r\nmardi 4 mai : Jean-Claude MAILLY\r\n_Renseignements_ : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (29,8,4,8,'Dîner des Anciennes','Suite au grand succès du dîner de [u]Grandes Écoles au Féminin[/u], et à la demande de nombreuses Anciennes de l\'X (Xettes), nous organisons un dîner [i]Au Féminin[/i]. Une occasion d\'échanger entre Xettes sur nos parcours et expériences.\r\nToutes les Xettes inscrites sur la liste de diffusion \"xettes\" recevront prochainement une invitation à s\'inscrire, qui précisera toute la logistique. Le dîner aura lieu à Paris, mais nous penserons à celles au loin !','Dîner lundi 8 mars à Paris (Journée de la Femme)\r\nListe de diffusion : https://www.polytechnique.org/listes/\r\nSite web : http://www.grandesecolesaufeminin.net/\r\nNathalie (84) nathalie.charles@m4x.org\r\nAvra (94) avra.tzevelekis@m4x.org');
+INSERT INTO `newsletter_art` VALUES (29,9,4,9,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel STOLÉRU (56), se produira mardi 9 mars à 20:30, Salle Gaveau, sur le thème [i]La splendeur romantique[/i] :\r\n - Baudelaire : [u]L\'Albatros[/u]\r\n - Berlioz : [u]Marche Hongroise[/u]\r\n - Schumann : [u]Converto pour violoncelle[/u] (Jean-Marie Gamard)\r\n - Tchaikowsky : [u]Variations rococo pour violoncelle[/u]\r\n - Beethoven : [u]Huitième symphonie[/u]','[u]Réservations spécial X[/u] : +33 147 206 281\r\n(places à 15, 20 & 30 EUR)');
+INSERT INTO `newsletter_art` VALUES (29,10,4,10,'Représentations de théâtre par des X2001','Dix jours magistraux, d\'évènements théâtraux\r\n Pour animer Poincaré, à vingt heures trente bien sonnées\r\n\r\n Un programme bien soigné, pour une mi-mars printanière,\r\n Amusante et pimentée, avant tout d\'humeur légère !\r\n\r\nAu programme sur le site de l\'École :\r\n - [u]Un air de famille[/u] (Jaoui-Bacri), comédie à couteaux tirés autour d\'un gâteau et de quelques Suzes, à siroter en famille.\r\n - [u]Les Robins des Bois[/u] qui \"construisent ou plutôt déconstruisent leur style. Des personnages très spéciaux et des décors pour le moins inhabituels\" que vous appRRRrrrécierez assurément ! http://www.robinsdesbois.com/\r\n - [u]Art[/u] (Yasmina Réza), c\'est... trois amis, un tableau blanc, entièrement blanc. Et une amitié de toujours qui vole en éclat. Un trio d\'amis, réunis et désunis, autour d\'un tableau cher... très cher. Une comédie dramatique, \"dingue\", au rythme d\'enfer : à ne pas manquer !','mardi 9 mars, jeudi 11 mars : [u]Un air de famille[/u]\r\nmercredi 10 mars, vendredi 19 mars : [u]Les Robins des Bois[/u]\r\nlundi 15 mars : [u]Art[/u]\r\n[b]Renseignements[/b]\r\n+33 169 335 723 sebastien.boyaval@m4x.org\r\n+33 169 335 041 julien.castres-saint-martin@m4x.org');
+INSERT INTO `newsletter_art` VALUES (29,11,4,11,'Promotion 38','Le prochain magnan aura lieu jeudi 18 mars (épouses et veuves conviées).','jeudi 18 mars à 12:30\r\nRestaurant administratif de la Montagne Sainte-Geneviève\r\n25, rue de la Montagne Sainte-Geneviève 75005 Paris\r\n[u]Inscriptions[/u] : GUILLEMIN +33 147 516 973 (avant le 13 mars)');
+INSERT INTO `newsletter_art` VALUES (29,12,4,12,'Bal de l\'X','Le 113ème bal de l\'X aura lieu jeudi 1er avril à l\'Opéra Garnier, fraîchement rénové. Vous pouvez commander vos places et payer en ligne dès à présent !\r\nMain dans la main avec la Commission du bal, la promotion 2001 s\'investit cette année de façon toute particulière dans le bal, n\'hésitez-pas à nous contacter!','http://www.baldelx.com/');
+INSERT INTO `newsletter_art` VALUES (29,13,4,13,'7ème Trophée RBS Cup Voiles X-HEC','Le Trophée Voiles X-HEC est un week-end de régates amicales rassemblant élèves et anciens de l\'X et d\'HEC dans des conditions exceptionnelles : le week-end est fourni [i]clef en main[/i]. Tu t\'inscris et l\'équipe s\'occupe du reste : tu seras alors logé, nourri et placé sur un équipage. Cette année encore, la régate sera homologuée par la FFV et le comité de course sera dirigé par Roland Galliot.','7ème Trophée : 8 et 9 mai à Bénodet (29)\r\nContact : bureau@xhec.org\r\nhttp://www.xhec.org/');
+INSERT INTO `newsletter_art` VALUES (29,14,4,14,'Nuit du Jazz X','Trois camarades jazzmen organisent une nuit du jazz X, réservée aux X jazzmen amateurs et aux ensembles de jazz dont une partie au moins des musiciens sont des X. Cette nuit aura lieu à l\'automne 2004 dans un club de jazz parisien sur le modèle de ce qui avait été organisé dans le cadre des fêtes du bicentenaire. \r\n \r\nLa nuit sera consacrée au jazz proprement dit (tous styles sauf free jazz) à l\'exclusion des musiques connexes telles que rock, folk, hip-hop, rap, salsa, etc.','Gérard Glandier (59) gerard.glandier@m4x.org\r\nPhilippe Souplet (85) philippe.souplet@m4x.org\r\nJean Salmona (56) jean.salmona@m4x.org');
+INSERT INTO `newsletter_art` VALUES (29,15,4,15,'X-Allemagne : appel','X-Allemagne a été créé à l\'initiative des X99 et X00 en cours de spécialisation en Allemagne, afin de mieux informer les promos plus jeunes des avantages de la formation complémentaire en Allemagne et d\'aider les élèves intéressés dans leurs choix et la préparation des dossiers.\r\nÀ terme, ce groupe pourrait aussi rassembler tous les X (Élèves et Anciens) ayant un lien avec l\'Allemagne... Que les intéressés se signalent !','http://x-allemagne.polytechnique.org/ (évolution permanente)');
+INSERT INTO `newsletter_art` VALUES (30,1,1,1,'Lettre exceptionnelle \"speciale virus\"','Cher Camarade,\r\n\r\nTu as peut-être reçu, ces derniers jours, des messages en anglais signés par \"The Polytechnique.org team\", ou \"The m4x.org team\", de la même façon que tu as peut-être reçu des messages semblables signés par \"The Wanadoo team\" ou \"The Club-internet team\" si tu es par exemple chez l\'un ou l\'autre de ces fournisseurs d\'accès à Internet.\r\n\r\nCes messages sont des faux, dus à des virus. Si tu connais bien la façon de fonctionner des virus, alors le présent message ne t\'apportera pas grand chose. Dans le cas contraire, nous te suggérons vivement de prendre les 3 minutes nécessaires pour le lire jusqu\'au bout.\r\n\r\nD\'abord quelques principes :\r\n- nous ne communiquerons jamais avec toi par des messages écrits intégralement en anglais,\r\n- nous n\'envoyons jamais de pièce jointe dans les messages qui proviennent de nos équipes,\r\n- nous ne te demanderons jamais ton mot de passe,\r\n- dès lors que tu reçois un message signé par notre équipe et qu\'il te semble \"louche\", tu peux nous l\'envoyer à support@polytechnique.org, afin que nous te disions s\'il provient bien de nous (beaucoup d\'entre vous ont eu ce réflexe ces derniers temps).\r\n\r\nEnsuite, voici l\'explication du phénomène. Depuis plusieurs semaines, l\'activité des virus sur Internet a fortement augmenté. Beaucoup de virus, lorsqu\'ils envoient un courrier électronique, usurpent une fausse identité pour envoyer leur message infecté. Pour cela, ils piochent au hasard une identité présente dans le carnet d\'adresses et les messages de l\'ordinateur qu\'ils ont réussi à infecter, puis écrivent à toutes les personnes de ce carnet d\'adresses et des messages stockés sur l\'ordinateur, afin de contaminer le maximum de monde.\r\n\r\nPolytechnique.org est équipé d\'un antivirus performant, qui bloque des quantités considérables de messages infectés. Cependant, entre le moment où un virus apparaît sur Internet, et le moment où il est répertorié chez les compagnies de logiciels antivirus et qu\'un vaccin sort, il se passe souvent quelques heures, durant lesquelles notre antivirus ne détecte pas encore le virus (ceci est valable pour tous les serveurs de messagerie de l\'Internet, et n\'est pas spécifique à Polytechnique.org). Ainsi, même si tu es très bien protégé, il n\'est pas exclu que notre serveur laisse passer malgré tout une quantité infime de messages infectés, lors de l\'apparition d\'un nouveau virus sur Internet.\r\n\r\nDernier point sur lequel nous souhaitons insister ici : il doit t\'arriver de recevoir des messages disant : \"tu as envoyé à M. Untel un message infecté, lequel a donc été supprimé\". Or tu ne te souviens pas d\'avoir écrit à M. Untel, et d\'ailleurs tu ne le connais peut-être même pas ! Ce type de phénomène est du au fait qu\'une relation commune à M. Untel et toi-même a été contaminée par un virus. Son ordinateur a envoyé à M. Untel un message infecté, en le signant de ton nom. Le serveur de messagerie de M. Untel a rejeté le virus et, croyant que tu es l\'auteur du message, te notifie donc que le message est contaminé. Cela ne veut absolument pas dire, pour autant, que tu es infecté ! Ton adresse et ton nom ont juste été récupérés par le virus dans le carnet d\'adresses de la personne infectée. Nous n\'y pouvons malheureusement pas grand chose, et cela ne signifie pas du tout que l\'annuaire de notre serveur a été piraté !! Si tu souhaites plus de précisions sur la façon dont les virus fonctionnent, nous te renvoyons à l\'un des nombreux sites web qui détaillent le sujet, par exemple : \r\nhttp://www.secuser.com/\r\n\r\nEnfin, deux précautions valant mieux qu\'une, nous te conseillons d\'utiliser un antivirus sur ton ordinateur. Bien que notre antivirus soit une excellente protection, tu peux recevoir du courrier à d\'autres adresses que ton adresse polytechnicienne, lesquelles ne sont peut-être pas ou peu protégées. Si tu ne souhaites pas investir de l\'argent dans une solution logicielle, sache qu\'il existe des antivirus gratuits sur le marché, et ceux-ci nous paraissent tout à fait efficaces. Par exemple, Avast (http://www.avast.com/) a été testé par quelques camarades qui l\'ont trouvé très bon (il est gratuit pour une utilisation personnelle).\r\n\r\nJ\'espère que ces quelques lignes t\'auront permis de mieux comprendre pourquoi tu as éventuellement reçu des messages étranges ces derniers temps. Tu vois donc qu\'il ne s\'agit pas du tout d\'un problème lié à Polytechnique.org. Malheureusement, c\'est une tendance générale sur l\'Internet tout entier. Nous réfléchissons aux moyens de permettre de discerner un message effectivement envoyé par l\'expéditeur qui est affiché, d\'un message où l\'expéditeur a été usurpé. Il existe des solutions techniques de signature numérique des courriers électroniques. Si certains camarades, compétents dans le domaine ou souhaitant le devenir, voulaient accorder un peu de leur temps à aider notre équipe bénévole à mettre de telles solutions en place, nous serions ravis de les intégrer à notre groupe, afin de fournir des services de qualité à l\'ensemble de la communauté.\r\n\r\nNous te souhaitons une agréable semaine et espérons que cette lettre exceptionnelle t\'aura aidé à y voir plus clair.\r\n\r\nTrès cordialement,\r\nL\'équipe Polytechnique.org, \r\nhttps://www.polytechnique.org/apropos.php','https://www.polytechnique.org/ : le portail des X sur le web\r\nhttp://www.polytechnique.net/ : le portail des associations polytechniciennes (groupes X, binets, promotions)');
+INSERT INTO `newsletter_art` VALUES (31,1,1,1,'Discuter des formations complémentaires','Afin de favoriser la communication entre promotions sur les formations complémentaires, l\'équipe de Polytechnique.org a mis en place des forums de discussions spécifiques, classés par zones géographiques. Les formations complémentaires ayant accueilli un nombre suffisant d\'élèves après l\'X ont chacune leur forum spécifique.\r\n\r\nPour les discussions plus générales et pour les formations moins fréquentées, des forums de type \"***.general\" ont été mis en place.\r\n\r\nN\'hésite pas à faire part de ton expérience sur ces forums !','https://www.polytechnique.org/banana/\r\n(les noms des forums sont en \"xorg.fc.***\")');
+INSERT INTO `newsletter_art` VALUES (31,2,3,2,'X-Aviation : baptème de voltige aérienne','Pour démarrer 2004, le Groupe X-Aviation vous propose de se retrouver pour un baptême de voltige aérienne.\r\nC\'est l\'école de Catherine MAUNOURY (double-championne du monde de voltige), le CPCM, qui sera responsable de la journée. Évidemment, vos invité(e)s, polytechnicien(ne)s ou non, sont les bienvenu(e)s !','Rendez-vous à Chartres, samedi 17 avril au CPCM\r\nInformations : jean-paul.choquel@polytechnique.org (68)');
+INSERT INTO `newsletter_art` VALUES (31,3,3,3,'X-Vinicole : dîners autour d\'un vin','Faisant suite au succès du salon des Vignerons Polytechniciens de mars, les vignerons polytechniciens du Groupe développent la série de réceptions [b]Dîner autour d\'un vin[/b], ouvertes à tous ceux qui s\'inscrivent sur la liste du groupe.\r\nDeux dîners autour d\'un vin auront lieu prochaînement, l\'occasion d\'approfondir par la pratique tes connaissances oenologiques !\r\n\r\nPour être tenu au courant des autres manifestations organisées par le Groupe X-Vinicole, inscris-toi sur la liste [b]X-Vinicole[/b].','Dîner \"Champagne\" : 13 mai\r\nDîner \"Bordeaux\" : en juin\r\nContact : x.vinicole@maisondesx.com\r\nInscription à la liste : https://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (31,4,4,4,'Bal de l\'X','Le 113ème bal de l\'X aura lieu jeudi 1er avril à l\'Opéra Garnier, fraîchement rénové. Le Quadrille des Lanciers sera cette année dansé par des Élèves de la promotion 2001, vers 22:15 et vers minuit.\r\nPour les Élèves et les étudiants, n\'oubliez pas votre carte Magnan ou votre carte étudiant pour justifier vos entrées.','http://www.baldelx.com/');
+INSERT INTO `newsletter_art` VALUES (31,5,4,5,'Petit-déjeuners polytechniciens','Jean-Claude TRICHET, président de la Banque Centrale Européenne, et Jean-Claude MAILLY, secrétaire de Force Ouvrière, seront les prochains invités des PDX, de 8:00 à 9:30 à la Maison des X.','mercredi 7 avril : Jean-Claude TRICHET\r\nmardi 4 mai : Jean-Claude MAILLY\r\n[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (31,6,4,6,'7ème Trophée RBS Cup Voiles X-HEC','Le Trophée Voiles X-HEC est un week-end de régates amicales rassemblant élèves et anciens de l\'X et d\'HEC dans des conditions exceptionnelles : le week-end est fourni [i]clef en main[/i]. Tu t\'inscris et l\'équipe s\'occupe du reste : tu seras alors logé, nourri et placé sur un équipage.\r\nCette année encore, la régate sera homologuée par la FFV et le comité de course sera dirigé par Roland Galliot.','7ème Trophée : 8 et 9 mai à Bénodet (29)\r\nContact : bureau@xhec.org\r\nhttp://www.xhec.org/');
+INSERT INTO `newsletter_art` VALUES (32,12,4,12,'FX : Appel à candidature au Prix Pierre Faurre','Pour honorer la mémoire de Pierre Faurre (60) disparu en 2001, la Fondation décerne annuellement un prix destiné à distinguer un jeune Polytechnicien dont le début de carrière dans l\'industrie apparaît particulièrement prometteur.\r\nSi tu estimes que ton parcours le justifie, fais-le savoir à ta direction pour qu\'elle présente ton dossier à la Fondation avant fin juin 2004.','http://perso.wanadoo.fr/fondation.fx/pfaurre.html');
+INSERT INTO `newsletter_art` VALUES (32,11,4,11,'Groupe X-Musique : concert','X-Musique donne un concert avec au programme des oeuvres de musique de chambre (du duo au septuor...) de Bach, Mozart, Beethoven, Schubert, Borodine, Prokofiev, Poulenc et Saint-Saëns.','samedi 5 juin à 17:30\r\nCité Internationale des Arts\r\n18, rue de l\'Hôtel de Ville, Paris 4\r\nRenseignements : http://x-musique.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (32,10,4,10,'17 ème tournoi inter-promotion de basket-ball','Le tournoi se déroulera samedi 5 juin 2004, à l\'École. Il commencera par des matches de poule, suivis d\'un barbecue le midi et des phases finales l\'après-midi (fin prévue vers 17:30).\r\nLes habitués, peuvent contacter leurs responsables de promotion.\r\nPour ceux qui n\'ont pas joué depuis longtemps et qui veulent renouer avec la tradition, n\'hésitez pas à vous faire connaître, nous organiserons une ou plusieurs équipes en fonction des inscriptions.\r\nSont recherchées en particulier les promos 84, 85, 86, 88, 89, 90, et avant 80.','Samedi 5 juin 2004 à 09:00, École polytechnique, gymnases T5/T6\r\nContact : paul.brossier@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (32,9,4,9,'Point Gamma 2004','Lors du Point Gamma 2004, les Anciens, les X2000 et X2001 et leurs invités sont VIP! Un cocktail dinatoire vous attendra dans l\'Espace Prestige, réservé pour vous de 20:00 à minuit.\r\nPour réserver une table, il suffit de commander une bouteille de champagne par téléphone et d\'acheter vos places dans la section \"Télépaiements\" du site web de Polytechnique.org (ce service sera disponible dans les jours qui viennent).','[b]Réservations[/b] (une bouteille par table de six) :\r\n +33 169 335 225\r\n flore.andre-mazeaud@polytechnique.org\r\n[b]Achat de places (23EUR)[/b] :\r\n https://www.polytechnique.org/paiement/');
+INSERT INTO `newsletter_art` VALUES (32,8,4,8,'XXIIIème Jumping de l\'X','Le Jumping de l\'X est un concours hippique de saut d\'obstacles de niveau [i]National1[/i], comportant cette année trois épreuves qualificatives pour les championnats de France [i]Pro1/-/Pro2[/i].\r\nSi le Jumping est l\'occasion de voir les meilleurs cavaliers français tester leurs chevaux en vue des épreuves internationales, c\'est aussi une manière originale de revenir sur le campus de l\'École, et passer un agréable week-end puisque de nombreuses animations auront lieu en parallèle des épreuves (poneys pour les plus petits, Smart dévoilant son tout dernier modèle de voiture...).','15 et 16 mai, École polytechnique, accès libre et gratuit\r\nRenseignements : http://jumping.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (32,7,4,7,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel STOLÉRU (56), se produira sur le thème [i]Hommage à la nouvelle Europe[/i] :\r\n - Verdi : [u]Hymne aux Nations[/u] (orchestre, ténor et choeurs)\r\n - Chopin : [u]Grande Polonaise[/u] (orchestre, Romain Hervé (piano))\r\n - Liszt : [u]Rhapsodies hongroises 1 et 2[/u] (pour orchestre)\r\n - Dvorak : [u]Symphonie du Nouveau Monde[/u]\r\n - Beethoven : [u]Hymne européen[/u]','mardi 11 mai, 20:30, salle Gaveau\r\n[u]Réservations spécial X[/u] : +33 147 206 281\r\n(places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (32,6,4,6,'Réunion générale de XMP-Entrepreneur','Bernard ZIMMERN (X49, ENA), président et fondateur de l\'IFRAP, animera la prochaine réunion générale sur les thèmes développés dans son dernier ouvrage, [u]La dictature des syndicats[/u] .','IFRAP : Institut français des recherches des institutions des administrations publiques\r\nhttp://www.xmp-entrepreneur.org/manifestations.php\r\nInscriptions : xentrepreneur@wanadoo.fr ou +33 142 228 645\r\n10 Mai 2004, 18:00, Maison des X : 12, Rue de Poitiers, Paris 7');
+INSERT INTO `newsletter_art` VALUES (32,5,4,5,'Groupe X-Musique : réunion','X-Musique, groupe X tourné vers la pratique de la musique de chambre, permet aux camarades (et membres de leurs familles) instrumentistes de se rencontrer pour jouer en petites formations (duos, trios, quatuors, quintettes...) lors de séances informelles ou en concert amical.\r\nLe groupe comprend une variété d\'instruments : violon, alto, violoncelle, flûte, hautbois, basson, clarinette, trompette, chant, piano, harpe... ce qui permet une multitude de combinaisons !\r\nLa prochaine réunion aura lieu en mai.','dimanche 9 mai, 15:00, chez Jean-François GUILBERT (66)\r\nRenseignements : http://x-musique.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (32,4,4,4,'7ème Trophée RBS Cup Voiles X-HEC','Le Trophée Voiles X-HEC est un week-end de régates amicales rassemblant élèves et anciens de l\'X et d\'HEC dans des conditions exceptionnelles : le week-end est fourni [i]clef en main[/i]. Tu t\'inscris et l\'équipe s\'occupe du reste : tu seras alors logé, nourri et placé sur un équipage.\r\nCette année encore, la régate sera homologuée par la FFV et le comité de course sera dirigé par Roland GALLIOT.','7ème Trophée : 8 et 9 mai à Bénodet (29)\r\nContact : bureau@xhec.org\r\nhttp://www.xhec.org/');
+INSERT INTO `newsletter_art` VALUES (32,3,4,3,'Petit-déjeuners polytechniciens','Jean-Claude MAILLY, secrétaire de Force Ouvrière, et Thierry BRETON, président-directeur général de France Télécom, seront les prochains invités des PDX, de 8:00 à 9:30 à la Maison des X.','mardi 4 mai : Jean-Claude MAILLY\r\nmardi 1er juin : Thierry BRETON\r\n[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (32,1,1,1,'Convention entre l\'AX et Polytechnique.org','Une convention a été signée, définissant la coopération entre l\'AX et Polytechnique.org .\r\nElle est publiée à la fois dans [u]La Jaune et la Rouge[/u] et sur le site web de l\'association Polytechnique.org.','La Jaune et la Rouge : numéro d\'avril 2004, n°594, p.54-60\r\nhttp://x-org.polytechnique.org/convention-AX/');
+INSERT INTO `newsletter_art` VALUES (32,2,3,2,'X-Vinicole : dîners autour d\'un vin','Faisant suite au succès du salon des Vignerons Polytechniciens de mars, les vignerons polytechniciens du Groupe développent la série de réceptions [b]Dîner autour d\'un vin[/b], ouvertes à tous ceux qui s\'inscrivent sur la liste du groupe.\r\nUn dîner autour d\'un vin aura lieu en mai, l\'occasion d\'approfondir par la pratique tes connaissances oenologiques !\r\n\r\nPour être tenu au courant des autres manifestations organisées (dîner de prestige, dîner rustique, dîner en cave...) par le Groupe X-Vinicole, inscris-toi sur la liste [b]X-Vinicole[/b].','Dîner [i]Champagne[/i] : jeudi 13 mai\r\nDîner [i]Bordeaux[/i] : non plus en juin mais à l\'automne\r\nContact : x.vinicole@maisondesx.com\r\nInscription à la liste : https://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (33,9,3,9,'AX : Assemblée Générale','Après une partie partie consacrée au rapport moral, au rapport financier et aux questions, l\'assemblée générale annuelle de l\'AX se poursuivra par une conférence de Bernard Larrouturou (77), Directeur général du CNRS, sur le thème : \"La recherche française face à la compétitivité internationale\".','Lundi 21 juin à 17h\r\nAncienne Ecole polytechnique - 5, rue Descartes - Paris 5è');
+INSERT INTO `newsletter_art` VALUES (33,6,3,6,'X-Résistance','Suite à l\'ouverture du groupe à des descendants de Polytechniciens résistants le 27 mars 2004, vous êtes conviés à l\'Assemblée Générale du groupe.','mercredi 16 juin à 17:00\r\nMaison des X http://www.maison-des-x.com/\r\nRenseignements : http://x-resistance.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (33,7,3,7,'X-Banque : Assemblée Générale','La prochaine Assemblée Générale sera suivie d\'un déjeuner avec Francis MAYER, Directeur Général de la Caisse des Dépôts et Consignations.','jeudi 17 juin\r\nRenseignements : http://x-banque.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (33,8,3,8,'GPX : Rallye touristique automobile','Le traditionnel rallye touristique automobile organisé par le GPX aura pour thème : les grands détectives. Transformés en inspecteurs de police, les concurrents devront résoudre énigmes et jeux et faire preuve de sagacité et d\'humour. Inscription urgente.','Samedi 19 juin\r\nRenseignements : gpx@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (33,5,3,5,'XMP Entrepreneurs : Création d\'un groupe de Business Angels','Les associations des Anciens Élèves de l\'X, des Mines et des Ponts (AX, Intermines, AAENPC), avec XMP Entrepreneur, proposent aux Business Angels déjà actifs ou voulant le devenir de s\'organiser au sein d\'un groupe qui leur permettrait entre autres :\r\n - de s\'informer et de discuter sur des thèmes d\'intérêt commun,\r\n - de partager des expériences,\r\n - de monter des alliances entre investisseurs.','mercredi 9 juin à 18:00\r\nMaison des X http://www.maison-des-x.com/\r\nXMP Entrepreneurs http://www.xmp-entrepreneur.org/\r\nRenseignements : francois.cherruau@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (33,1,1,1,'Lancement de Manageurs.com','Polytechnique.org a développé le site http://www.manageurs.com/ dans le cadre d\'un partenariat avec l\'AX. Ce site a été préparé en collaboration avec les anciens d\'autres écoles d\'ingénieurs, de commerce et de gestion, lesquels nous y rejoindront bientôt.\r\nCe site vise à aider tous les X (élèves et anciens élèves) dans la gestion de leur carrière et de leur employabilité. Des services leur sont ouverts, ainsi qu\'aux recruteurs (entreprises, cabinets).\r\nManageurs.com ouvre aujourd\'hui en test : ses fonctionnalités vont être ouvertes jour après jour, tout au long du mois, ainsi que dans le courant de l\'été.\r\nNous attendons avec impatience tes remarques, idées, commentaires.','Site web : http://www.manageurs.com/\r\nContact de l\'équipe : anciens-eleves@manageurs.com');
+INSERT INTO `newsletter_art` VALUES (33,2,1,2,'Nouveau taux de commission pour les télépaiements','\nNous proposons depuis plusieurs mois déjà un système de paiement en ligne, par CB, à l\'usage des groupes X, promotions, et binets. Notre banque, la Banque Populaire Lorraine Champagne, a diminué le montant de la commission qu\'elle prélevait sur ces paiements : elle s\'élève désormais à 20 centimes par opération plus 0,5 0u montant. En cas de paiement avec une carte étrangère, 0,76 euros supplémentaires sont prélevés. Polytechnique.org ne prend bien entendu aucune commission sur les paiements faits via son système de télépaiement !\n\n\n\n','');
+INSERT INTO `newsletter_art` VALUES (33,3,3,3,'Groupe X-Musique : concert','X-Musique donne un concert avec au programme des oeuvres de musique de chambre (du duo au septuor...) de Bach, Mozart, Beethoven, Schubert, Borodine, Prokofiev, Poulenc et Saint-Saëns.','samedi 5 juin à 17:30\r\nCité Internationale des Arts\r\n18, rue de l\'Hôtel de Ville, Paris 4\r\nRenseignements : http://x-musique.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (33,4,3,4,'X-Environnement : risques industriels','Le groupe X-Environnement, en association avec le groupe HEC-Environnement, organise une réunion-débat sur les risques industriels. Relations entre industriels, collectivités locales, et administration. Entrée libre.\r\nLes invités seront :\r\n - Olivier MONFORT (SOLVAY France),\r\n - Bruno CAHEN (Ministère de l\'Écologie et du Développement Durable DPPR),\r\n - et Jean-Michel DAUBIGNEY (maire de Tavaux, Jura). ','mardi 8 juin à 19:00\r\nAssociation HEC : 9 avenue Franklin Roosevelt, Paris VIII\r\nhttp://www.x-environnement.org/manifestations.html');
+INSERT INTO `newsletter_art` VALUES (33,14,4,14,'17 ème tournoi inter-promotion de basket-ball','Le tournoi se déroulera samedi 5 juin 2004, à l\'École. Il commencera par des matches de poule, suivis d\'un barbecue le midi et des phases finales l\'après-midi (fin prévue vers 17:30).\r\nLes habitués, peuvent contacter leurs responsables de promotion.\r\nPour ceux qui n\'ont pas joué depuis longtemps et qui veulent renouer avec la tradition, n\'hésitez pas à vous faire connaître, nous organiserons une ou plusieurs équipes en fonction des inscriptions.\r\nSont recherchées en particulier les promos 84, 85, 86, 88, 89, 90, et avant 80.','Samedi 5 juin 2004 à 09:00, École polytechnique, gymnases T5/T6\r\nContact : paul.brossier@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (33,13,4,13,'Point Gamma 2004','Lors du Point Gamma 2004, les Anciens, les X2000 et X2001 et leurs invités sont VIP! Un cocktail dinatoire vous attendra dans l\'Espace Prestige, réservé pour vous de 20:00 à minuit.\r\nPour réserver une table, il suffit de commander une bouteille de champagne par téléphone et d\'acheter vos places dans la section \"Télépaiements\" du site web de Polytechnique.org .','Réservations (une bouteille par table de six) :\r\n +33 169 335 225\r\n flore.andre-mazeaud@polytechnique.org\r\nAchat de places (23EUR)\r\n https://www.polytechnique.org/paiement/');
+INSERT INTO `newsletter_art` VALUES (33,11,3,11,'X-Vinicole : Activités pour la rentrée','Le \"Dîner autour d\'un vin de Champagne\" a réuni 20 convives, qui ont découvert une nouvelle façon d\'apprécier le champagne en relation avec des mets inattendus. Les prochaines activités sont maintenant prévues après l\'été : visites de caves dans le Val de Loire, dîner autour d\'un vin de Bordeaux, rencontres amicales autour d\'un verre...\r\nPour être tenu au courant du détail des manifestations organisées par le Groupe X-Vinicole, inscris-toi sur la liste X-Vinicole.','Contact : x.vinicole@maisondesx.com\r\nInscription à la liste : https://www.polytechnique.org/listes/');
+INSERT INTO `newsletter_art` VALUES (33,12,4,12,'Colloque Gaspard MONGE','Un colloque sur Gaspard MONGE un savant en son temps est organisé, avec le soutien de l\'X et de l\'AX. Rappelons qu\'on doit la création de l\'École au géomètre MONGE.','http://www.bibmath.net/bios/index.php3?action=affiche&quoi=monge\r\nmercredi 2 juin de 09:00 à 17:00\r\nMuséum d\'histoire naturelle, amphi Verniquet-Jardin des Plantes');
+INSERT INTO `newsletter_art` VALUES (34,1,1,1,'Anti-spam : activation pour tous les inscrits','Beaucoup de camarades nous ont indiqué qu\'ils recevaient du spam (courrier électronique non sollicité) sur leur adresse polytechnicienne prenom.nom@polytechnique.org. Ils n\'avaient simplement pas activé l\'outil anti-spam proposé par Polytechnique.org.\r\n\r\nL\'équipe a donc décidé de l\'activer par défaut : chaque fois que l\'outil détecte un spam, il ajoute \"[spam probable]\" dans son sujet, sans pour autant supprimer le message.\r\n\r\nPour supprimer automatiquement ces messages, paramétrer ou désactiver l\'outil, rends-toi sur la page de l\'anti-spam.','https://www.polytechnique.org/antispam.php');
+INSERT INTO `newsletter_art` VALUES (34,2,2,2,'BDC : Préparation à la recherche d\'une nouvelle activité','Le changement d\'activité, choisi ou subi, est devenu un des passages quasi-obligés de toute carrière. Il est donc nécessaire d\'être préparé à une telle éventualité, et ceci de manière professionnelle.\r\n\r\nNous souhaitons recueillir l\'expérience accumulée par les camarades pour en tirer les conclusions nécessaires à l\'orientation de l\'action du bureau des carrières (BDC).\r\n\r\nMerci de consacrer quelques minutes au questionnaire, il va de soi que les réponses seront exploitées de façon anonyme.','Site web : http://www.abcdx.com/\r\nQuestionnaire : http://sondageabcdx.free.fr/');
+INSERT INTO `newsletter_art` VALUES (34,3,3,3,'Réunion Générale XMP-Entrepreneurs','Prochaine réunion générale lundi 13 septembre à 18:00','Maison des X : 12, rue de Poitiers, 75007 PARIS\r\nhttp://www.xmp-entrepreneur.org/manifestations.php');
+INSERT INTO `newsletter_art` VALUES (34,4,3,4,'X-Golf : Cinquantenaire de la rencontre X-Centrale','Le cinquantenaire de la rencontre X-Centrale se célèbrera les 2 et 3 octobre 2004 au golf du Domaine de Vaugouard à Fontenay sur Loing (45) :\r\n - sam : parcours de qualification (stableford)\r\n - dim : match-play (11 hommes et 5 dames dans chaque camp)\r\n stableford (pour les non-qualifiés)\r\nLogement à l\'hôtel, restauration au club-house, utilisation d\'une voiturette possible, sur réservation avant le 10 septembre.','Informations : http://www.ax-golf.com/\r\nDomaine de Vaugouard : http://www.vaugouard.com/');
+INSERT INTO `newsletter_art` VALUES (34,5,4,5,'Du Wi-Fi à l\'École','Le BR (association gérant le réseau informatique des élèves de l\'X) recherche un partenaire susceptible de l\'aider à financer la mise en place d\'un réseau Wi-Fi à l\'intention des élèves et des personnes résidant sur le plateau de l\'École. \r\nNous proposons à un éventuel sponsor la publicité la plus large, tant auprès de nos camarades, qu\'auprès de nos partenaires d\'autres écoles.','Contact : br2002@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (33,10,3,10,'X-Environnement : développement de mégapoles','Le groupe programmera plusieurs manifestations sur les problèmes posés par les très grandes concentrations urbaines, en prévision du numéro de septembre 2005 de la Jaune et la Rouge. Les intervenants seront :\r\n - Pierre CALAME (63), Président de la Fondation Charles Léopold Mayer pour le Progrès de l\'Homme,\r\n - Jean-Paul LACAZE (49), urbaniste,\r\n - et un intervenant de l\'Agence Française de Développement.','mercredi 23 juin à 18:00\r\nMaison des X http://www.maison-des-x.com/ entrée libre\r\nhttp://www.x-environnement.org/manifestations.html');
+INSERT INTO `newsletter_art` VALUES (35,9,3,9,'Petit-déjeuners polytechniciens','Dominique STRAUSS-KAHN et Dominique BUSSEREAU, Secrétaire d\'État au Budget, seront les prochains invités des PDX, de 8:00 à 9:30 à la Maison des X.','mardi 14 septembre : Dominique STRAUSS-KAHN\r\nlundi 4 octobre : Dominique BUSSEREAU\r\n[u]Renseignements[/u] : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (35,8,2,8,'X-Europe : projets récents','Le groupe a récemment initié quelques projets :\r\n - mise en réseau des Anciens en fonction dans les divers pays de l\'Union Européenne, afin de favoriser l\'essaimage de la communauté polytechnicienne ;\r\n\r\n - réflexion sur les institutions au sein d\'un atelier sur la question d\'un \"noyau fédéral dans l\'Union Européenne\" ;\r\n\r\n - proposition d\'un enseignement sur l\'Europe à l\'École par Jacques LAFITTE.','Détail des objectifs : http://x-europe.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (35,6,2,6,'X-Golf : Cinquantenaire de la rencontre X-Centrale','Le cinquantenaire de la rencontre X-Centrale se célébrera les 2 et 3 octobre 2004 au golf du Domaine de Vaugouard à Fontenay sur Loing (45) :\r\n - sam : parcours de qualification (stableford)\r\n - dim : match-play (11 hommes et 5 dames dans chaque camp)\r\n stableford (pour les non-qualifiés)\r\nLogement à l\'hôtel, restauration au club-house, utilisation d\'une voiturette possible, sur réservation avant le 10 septembre.','Informations : http://www.ax-golf.com/\r\nDomaine de Vaugouard : http://www.vaugouard.com/');
+INSERT INTO `newsletter_art` VALUES (35,7,2,7,'X-Europe : semaine de l\'Europe à l\'École','Le groupe organise la semaine de l\'Europe à l\'École, qui comportera quatre conférences majeures :\r\n - \"Europe fédérale ou Europe des nations, regard d\'un Polonais sur une Europe élargie\" : P. NOWINA KONOPKA, vice-recteur du Collège d\'Europe de Natolin (Pologne) ;\r\n\r\n - \"Quelle ambition pour l\'Europe\" : Pascal LAMY (Commissaire européen chargé du commerce) et Alain LAMASSOURE (Député européen, ancien Ministre et ancien Membre de la Convention européenne) ;\r\n\r\n - \"L\'Europe de la Recherche : atouts et handicaps\" : Catherine CESARSKY (Présidente de l\'European Southern Observatory) ;\r\n\r\n - \"Quelles limites pour l\'Europe\" : Pascal BONIFACE (Directeur de l\'Institut des Relations Internationales et Stratégiques) et Pierre BÉHAR (Professeur à l\'Université de la Sarre, à l\'université Paris VIII et à l\'Académie diplomatique de Vienne)\r\n\r\nLes invitations sont à retirer auprès du secrétariat de la Direction des Études.','Semaine de l\'Europe : 4 au 7 octobre à l\'École (Palaiseau)\r\nProgramme complet : http://x-europe.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (35,4,2,4,'Réunion Générale XMP-Entrepreneurs','Prochaine réunion générale lundi 13 septembre à 18:00','Maison des X : 12, rue de Poitiers, 75007 PARIS\r\nhttp://www.xmp-entrepreneur.org/manifestations.php');
+INSERT INTO `newsletter_art` VALUES (35,5,2,5,'Groupe X-Israël','Le prochain dîner-débat du Groupe aura lieu lundi 27 septembre 2004 à 20:00. L\'orateur sera Jean-Marc DREYFUS, historien, spécialiste d\'histoire contemporaine, chercheur au Centre Marc Bloch à Berlin, qui traitera du sujet suivant :\r\n [i]Pour une histoire de l\'antisionisme au XXè siècle[/i]','Renseignements : info@x-israel.polytechnique.org\r\nSite web : http://x-israel.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (35,3,1,3,'CNISF : Avis sur l\'enquête annuelle','Le CNISF (conseil national des ingénieurs et scientifiques de France regroupant l\'ensemble des Associations d\'Anciens Élèves d\'Écoles d\'Ingénieurs - dont l\'AX) souhaitent, avant de reconduire l\'enquête socio-économique annuelle traditionnelle, recueillir votre avis sur l\'intérêt que vous portez à cette enquête. Quelques clics suffisent pour répondre anonymement au sondage en ligne.\r\nLes résultats du sondage vous seront transmis par l\'AX.','CNISF : http://www.cnisf.org/\r\nSondage en ligne : http://193.252.55.161/qs/sondage.html');
+INSERT INTO `newsletter_art` VALUES (35,2,1,2,'X.org ouvre un gestionnaire de bugs','Avec la croissance du site et de son nombre d\'utilisateurs, nous avons décidé d\'ouvrir un BTS (Bug Tracking System) pour centraliser les rapports de bogues.\r\nTout le monde peut s\'y connecter (avec un login, ou anonymement) et y rapporter des bogues, ou exprimer des souhaits. Si tu n\'es pas habitué à ce genre d\'interfaces, tu peux continuer à faire tes remarques sur les forums ou par mail.','BTS X.org : http://trackers.polytechnique.org/\r\nForum : news://ssl.polytechnique.org/xorg.m4x.innovation\r\nMail : support@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (35,1,1,1,'X.org améliore son service après-vente !','L\'équipe de Polytechnique.org, pour améliorer son service, traite maintenant tout le support grâce à un logiciel dédié (OTRS). Le service est en place depuis maintenant un mois et la latence de réponse s\'est fortement réduite. Nous recherchons des utilisateurs confirmés, intéressés pour nous aider à assurer ce support.','Nous contacter : support@polytechnique.org\r\nOTRS est un logiciel libre : http://otrs.org/');
+INSERT INTO `newsletter_art` VALUES (36,1,1,1,'Polytechnique.org fait appel à ta générosité','Pour faire suite à la demande d\'un grand nombre d\'entre vous, Polytechnique.org a ouvert cette année le chantier de l\'emploi et de la gestion de carrière : http://www.manageurs.com/. L\'AX, l\'association des Centraliens et celles des diplômés d\'HEC sont nos partenaires dans ce projet.\r\n\r\nPolytechnique.org a un besoin exceptionnel de fonds, afin de financer (à part égale avec les autres partenaires) l\'essor de Manageurs.com. Cela ne remet évidemment pas en cause la gestion désintéressée de l\'association, mais le développement de Manageurs passe par la mise en place d\'une structure et d\'une équipe opérationnelle de permanents. Nous souhaitons offrir à tous ceux d\'entre vous qui le souhaitent des services liés à l\'emploi et à la mise en relation à but professionnel.\r\n\r\nFace à ce besoin de fonds tout à fait ponctuel, Polytechnique.org ne dispose pas des sommes nécessaires, son activité ayant toujours été soutenue par le bénévolat de ses animateurs. Aussi, nous te remercions par avance de la générosité dont tu voudras bien faire preuve!','Pour tout renseignement : association@polytechnique.org\r\nFaire un don : https://www.polytechnique.org/paiement/');
+INSERT INTO `newsletter_art` VALUES (36,2,2,2,'Association \"Géostratégies 2000\"','L\'AX est membre de l\'association [i]Géostratégies 2000[/i]. Ouverte en particulier aux élèves de l\'École et aux membres de l\'AX, cette association organise des manifestations (visites,petits-déjeuners,débats, etc.) auxquelles participent des personnalités de premier plan (politiques, culturelles, monde des affaires, ambassadeurs étrangers, etc...).','Prochains invités : Renaud DONNEDIEU DE VABRES, Jean-Louis BEFFA, Dominique de VILLEPIN, Daniel COHN-BENDIT.\r\n\r\nInformations : http://www.geo2000.org/\r\nCotisation annuelle : 56 EUR (élèves : 28 EUR)\r\nPetit-déjeuner débat : 24 EUR (élèves : 12 EUR, invités : 40 EUR)');
+INSERT INTO `newsletter_art` VALUES (36,3,3,3,'X-Golf : Cinquantenaire de la rencontre X-Centrale','Le cinquantenaire de la rencontre X-Centrale se célébrera les 2 et 3 octobre 2004 au golf du Domaine de Vaugouard à Fontenay sur Loing (45) :\r\n - sam : parcours de qualification (stableford)\r\n - dim : match-play (11 hommes et 5 dames dans chaque camp)\r\n stableford (pour les non-qualifiés)\r\nLogement à l\'hôtel, restauration au club-house, utilisation d\'une voiturette possible, sur réservation avant le 10 septembre.','Informations : http://www.ax-golf.com/\r\nDomaine de Vaugouard : http://www.vaugouard.com/');
+INSERT INTO `newsletter_art` VALUES (36,4,3,4,'X-Europe : semaine de l\'Europe à l\'École','Le groupe organise la semaine de l\'Europe à l\'École, qui comportera quatre conférences majeures :\r\n - \"Europe fédérale ou Europe des nations, regard d\'un Polonais sur une Europe élargie\" : P. NOWINA KONOPKA, vice-recteur du Collège d\'Europe de Natolin (Pologne) ;\r\n\r\n - \"Quelle ambition pour l\'Europe\" : Pascal LAMY (Commissaire européen chargé du commerce) et Jean FRANÇOIS-PONCET (sénateur, ancien Ministre des affaires étrangères)\r\n\r\n - \"L\'Europe de la Recherche : atouts et handicaps\" : Catherine CESARSKY (Présidente de l\'European Southern Observatory)\r\n\r\n - \"Quelles limites pour l\'Europe\" : Pascal BONIFACE (Directeur de l\'Institut des Relations Internationales et Stratégiques) et Pierre BÉHAR (Professeur à l\'Université de la Sarre, à l\'université Paris VIII et à l\'Académie diplomatique de Vienne)','Semaine de l\'Europe : 4 au 7 octobre à l\'École (Palaiseau)\r\nProgramme complet:\r\nhttp://www.polytechnique.fr/eleves/binets/xeurope/');
+INSERT INTO `newsletter_art` VALUES (36,5,3,5,'Groupe X-Musique : réunion','X-Musique, groupe tourné vers la pratique de la musique de chambre, permet aux camarades (et membres de leurs familles) instrumentistes de se rencontrer pour jouer en petites formations (duos, trios, quatuors, quintettes...) lors de séances informelles ou en concert amical.\r\nLe groupe comprend une variété d\'instruments : violon, alto, violoncelle, flûte, hautbois, basson, clarinette, trompette, chant, piano, harpe... ce qui permet une multitude de combinaisons !','Réunion de rentrée : dimanche 10 octobre, à partir de 15h,\r\nchez Jean-François GUILBERT (66)\r\nRenseignements : http://x-musique.polytechnique.org/');
+INSERT INTO `newsletter_art` VALUES (36,6,3,6,'X-Informatique : rencontre annuelle','Tous les détails concernant la 9ème rencontre annuelle du G9+ qui se déroulera mercredi 13 octobre sont disponibles sur le site web.','Site web : http://www.cyberix.org/');
+INSERT INTO `newsletter_art` VALUES (36,7,3,7,'Arplastix : Exposition','Le groupe Arplastix, regroupant peintres et sculpteurs polytechniciens, expose en octobre à l\'ARGR (Amicale Régionale du Groupe Renault)','Exposition : du vendredi 15 au mercredi 27, Lu-Ve 9h-19h\r\nARGR : 27, rue des Abondances 92100 Boulogne-Billancourt');
+INSERT INTO `newsletter_art` VALUES (36,8,3,8,'X-Résistance : Un nouvel ascendant','Le groupe X-Résistance vient de se trouver un nouvel ascendant. \r\nJusqu\'à présent il se considérait seulement comme la réactivation et la transformation en association d\'un groupe X-Résistance réuni de 1947 à 1958, les rangements effectués dans les archives de l\'AX par son délégué général Alain BRISAC ont permis de mettre en évidence un groupe X-Libre, créé à Brazzaville en mai 1941, avec des listes des membres de sa section de Londres. L\'ensemble des archives ainsi retrouvées rejoignent les fonds d\'archives \"X Résistance\" déposé à la bibliothèque de l\'École.','Fonds X-Résistance http://www.xresistance.org/Xarchive.html\r\nX-Résistance http://www.xresistance.org/');
+INSERT INTO `newsletter_art` VALUES (36,9,3,9,'X-Asie : Cambodge : base de données d\'informations','Un site web destiné à recueillir informations et témoignages sur les entreprises et les ONG cambodgiennes a été mis en place par X-Cambodge.','http://x-asie.polytechnique.org/extranet/X-Cambodge/organismes/');
+INSERT INTO `newsletter_art` VALUES (36,10,3,10,'X-Vinicole : Programme d\'activités','Trois manifestations sont définivement arrêtées par des membres du groupe X-Vinicole :\r\n\r\n - Samedi 23 et dimanche 24 octobre, au domaine \"Château Magence\" à St-Pierre-de-Mons (33) : Journée \"Portes ouvertes\" dans le cadre des manifestations du vignoble de Graves.\r\n\r\n - Jeudi 18 novembre de 10:00 à 19:00 au Café \"Signes\", 33 avenue Jean Moulin à Paris (14ème) : Fête du Beaujolais Nouveau.\r\n\r\n - Samedi 20 novembre de 11:00 à 18:00 à la Brasserie \"Georges\", 30 cours de Verdun à Lyon (69) : 8ème salon des Vignerons polytechniciens à Lyon.','Inscriptions et informations sur la liste du groupe X-Vinicole\r\nInscription à la liste : https://www.polytechnique.org/listes/\r\nContact : x.vinicole@maisondesx.com');
+INSERT INTO `newsletter_art` VALUES (36,11,4,11,'Petit-déjeuners polytechniciens','Dominique BUSSEREAU, Secrétaire d\'État au Budget et Bertand DELANOË, Maire de Paris, seront les prochains invités des PDX, de 8:00 à 9:30 à la Maison des X.','lundi 4 octobre : Dominique BUSSEREAU\r\nmardi 9 novembre : Bertrand DELANOË\r\nRenseignements : +33 147 206 281');
+INSERT INTO `newsletter_art` VALUES (36,12,4,12,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel STOLÉRU (56), se produira sur le thème [i]La nuit romantique[/i] :\r\n - A. De Musset : La nuit de mai\r\n - M. Moussorgski : une nuit sur le mont chauve\r\n - De Falla : Une nuit dans les jardins d\'Espagne (pianiste Chantal Riou)\r\n - R.Strauss : concerto pour cor (soliste E. Karcher)\r\n - Ch. Gounod : la nuit de Walpurgis (Faust)','mardi 19 octobre, 20:30, salle Gaveau\r\nRéservations spécial X : 01 47 20 62 81 (places à 30, 20 & 15 EUR)');
+INSERT INTO `newsletter_art` VALUES (36,13,4,13,'Congrès en l\'honneur de Benoît MANDELBROT','Un colloque international sur la géométrie fractale aura lieu les 12 et 13 novembre prochains en l\'honneur du 80ième anniversaire de Benoît MANDELBROT (44), le père des fractales. Il aura pour thème : \"FRACTALES EN PROGRES, des mathématiques à la physique, l\'économie, la finance, l\'image,la biologie.\" ','12 et 13 novembre, Paris\r\nsite web http://aeis.ifrance.com/aeis/');
+INSERT INTO `newsletter_art` VALUES (33,15,4,15,'60ème anniversaire de la promo 44','La promo 44, première promo de l\'après-guerre, célèbre son soixantième anniversaire : cérémonie aux Monument aux Morts, puis amphi sur l\'École aujourd\'hui. Une visite de l\'École est prévue l\'après-midi, suivie d\'une partie festive à l\'amphi Arago avec l\'orchestre de jazz de René MAYER (45) et Jean Amadou. Les élèves sont cordialement invités à ce spectacle.','jeudi 10 juin, à l\'École polytechnique');
+INSERT INTO `newsletter_art` VALUES (33,16,4,16,'Concert classique','L\'Orchestre Romantique Européen, sous la direction de Lionel STOLÉRU\r\n(56), se produira sur le thème La Féérie Romantique :\r\n - Verlaine : Amour (récitant : F.Beaulieu)\r\n - Weber : ouverture d\'Obéron\r\n - Massenet : Cendrillon\r\n - Rossini : Variations pour clarinette et orchestre (soliste : M. Arrignon)\r\n - Mendelssohn : ouverture du Songe d\'une nuit d\'été\r\n - Tchaikowsky : La belle au bois dormant (suite de ballet)','mardi 15 juin, 20:30, salle Gaveau\r\nRéservations spécial X : +33 147 206 281\r\n(places à 30, 20 & 15EUR)');
+INSERT INTO `newsletter_art` VALUES (33,17,4,17,'Magnan Promo 58','Nous proposons de nous retrouver à un magnan de promo à mi-décade.\r\nQue ceux qui ont films et photos du voyage au Maroc les apportent pour en faire profiter tout le monde. La participation au magnan est de 35EUR par personne.','Mardi 15 juin à 20:00\r\nMaison des X http://www.maison-des-x.com/\r\nInscription par courrier postal : chèque à l\'ordre de \"Promo 58\" 120, avenue Félix Faure, 75015 Paris\r\nRenseignements : promo58@wanadoo.fr\r\nInscription et paiement en ligne :\r\n http://www.claywall.com/cgi-bin/RAD2/PROX/mod99.cgi\r\n (serveur web de Jacques LEVIN qui a développé l\'application)');
+INSERT INTO `newsletter_art` VALUES (33,18,4,18,'250ème anniversaire de Columbia','À l\'occasion de la célébration du 250ème anniversaire de l\'université Columbia (New York), avec son Président Lee C. BOLLIGER, les Anciens de Columbia sont invités à Londres et à Paris.','http://alumni.columbia.edu/\r\nLondres : 21-22 juin\r\nParis : 24-26 juin');
+INSERT INTO `newsletter_art` VALUES (33,19,4,19,'Hommage à Jean-Louis BASDEVANT','Le Professeur Jean-Louis BASDEVANT, avant de prendre sa retraite, donnera, devant la Promotion 2003, son dernier cours à l\'École mardi 29 juin. Afin de lui rendre hommage, vous êtes conviés à assister à cette ultime prestation, créant ainsi une véritable surprise pour ce personnage qui a marqué de nombreuses générations de Polytechniciens par son enseignement fort apprécié de la mécanique quantique.','mardi 29 juin à 10:30\r\nÉcole polytechnique (Palaiseau), amphithéâtre Poincarré\r\nContact : Patrice Holiner holiner@poly.polytechnique.fr');
+INSERT INTO `newsletter_art` VALUES (33,20,4,20,'L\'ASK subventionne les actions sociales et humanitaires des X','Que l\'ASK vous rappelle tous vos meilleurs souvenirs à l\'X, ou que ces trois lettres n\'évoquent absolument rien, vous êtes concernés. L\'Action Sociale de la Kes est un binet qui dispose effectivement un budget destiné à aider ou encourager les Élèves et Anciens à s\'investir dans des actions à caractère social ou humanitaire.\r\nSi vous souhaitez vous investir (ou si c\'est déjà le cas) dans un projet ou une association, nous pouvons vous apporter conseils et aide (par exemple financière).',' Action Sociale de la Kes\r\nKes des élèves \r\nÉcole polytechnique\r\n91128 Palaiseau cedex\r\n\r\nPrésident : olivier.delande@polytechnique.org\r\nTrésorier : laurent.michelin@polytechnique.org');
+INSERT INTO `newsletter_art` VALUES (33,21,4,21,'Enquête Grandes Écoles au Féminin','Le groupe GEF conduit actuellement une enquête auprès des diplomées de ses huit écoles sur la situation de leurs anciennes. Des groupes qualitatifs se sont tenus en avril, un questionnaire va être envoyé par courriel courant juin, et les résultats seront disponibles à l\'automne.\r\nAvis aux kessiers des promos 72 et plus récentes, aux xettes et à tout camarade qui sait joindre une xette... mesdames, inscrivez-vous sur la liste Xettes de polytechnique.org !','Liste de diffusion : https://www.polytechnique.org/listes/\r\nSite web : http://www.grandesecolesaufeminin.net/\r\nNathalie (84) nathalie.charles@polytechnique.org\r\nAvra (94) avra.tzevelekis@polytechnique.org');
+
--- /dev/null
+-- -----------------------------------------------------------------------------
+-- newsletter categories
+--
+create table newsletter_cat (
+ cid tinyint unsigned not null auto_increment,
+ pos tinyint unsigned not null,
+ titre varchar(128) not null,
+ PRIMARY KEY (cid),
+ INDEX (pos)
+);
+insert into newsletter_cat values(1,1,'Flash Info');
+insert into newsletter_cat values(2,2,'Communications institutionnelles');
+insert into newsletter_cat values(3,3,'Groupes X');
+insert into newsletter_cat values(4,4,'Activités polytechniciennes');
+--
+-- -----------------------------------------------------------------------------
--- /dev/null
+alter table newsletter_ins add column last int not null default 0;
+alter table newsletter_ins add column pref enum('text','html') not null default 'html';
+alter table newsletter_ins add index (last);
--- /dev/null
+#!/bin/bash
+
+set -e
+
+if [ "$UID" != 0 ]; then
+ echo "has to be run as root"
+ exit 1
+fi
+
+
+
+###########################################################
+echo -n "stops mailman"
+/etc/init.d/mailman stop &>/dev/null
+echo .
+
+echo -n "now updates mailman to use new Bogofilter policy"
+./mailman_update.py | grep "ERROR" || echo .
+
+echo -n "copies new mails templates"
+cp -f ../../mailman/mails/*.txt /etc/mailman/fr/
+echo .
+
+echo -n "starts mailman"
+/etc/init.d/mailman start &>/dev/null
+echo .
+
+###########################################################
+echo -n "now drop x4dat.emploi_naf"
+echo 'drop table x4dat.emploi_naf;' | mysql -u root x4dat &>/dev/null || echo -n ": FAILED"
+echo .
+
+###########################################################
+echo -n "updating newsletter tables"
+mysql -u root x4dat < newsleter.sql &>/dev/null || echo 'newsletter.sql FAILED'
+mysql -u root x4dat < newsleter_art.sql &>/dev/null || echo 'newsletter_art.sql FAILED'
+mysql -u root x4dat < newsleter_cat.sql &>/dev/null || echo 'newsletter_cat.sql FAILED'
+mysql -u root x4dat < newsleter_ins.sql &>/dev/null || echo 'newsletter_ins.sql FAILED'
+echo '.'
+
+###########################################################
+echo "ALL IS OK.
+
+don't forget to kill current mailman-rpc.py
+you shoul be able to run the new one only with :
+
+ ./mailman-rpc.py -f
+
+fork problems + SIGHUP handling have been solved."
--- /dev/null
+create table auth_user_quick (
+ user_id smallint not null,
+ lastnewslogin timestamp not null,
+ skin tinyint not null,
+ primary key(user_id)
+);
+
+insert into auth_user_quick (
+ select user_id,lastnewslogin,skin
+ from auth_user_md5
+);
+
+alter table auth_user_md5 drop column lastnewslogin;
+alter table auth_user_md5 drop column skin;
--- /dev/null
+--------------------------------------------------------------------------------
+-- alters
+--------------------------------------------------------------------------------
+alter table virtual change column vid vid int not null auto_increment;
+alter table virtual change column alias alias varchar(255) not null;
+alter table virtual change column type type enum('user','list','dom') not null default 'user';
+alter table virtual add unique (alias) ;
+alter table virtual_redirect change column vid vid int not null auto_increment;
+alter table virtual_redirect add index (redirect);
+
+--------------------------------------------------------------------------------
+-- copies melix.net
+--------------------------------------------------------------------------------
+insert into virtual
+ select null,domain,'user'
+ from groupex.aliases
+ where domain like '%@melix.net';
+
+insert into virtual_redirect
+ select vid,CONCAT(email,'@m4x.org')
+ from virtual AS v
+ inner join groupex.aliases as d ON(v.alias=d.domain);
+
+delete from groupex.aliases where domain like '%@melix.net';
+
+--------------------------------------------------------------------------------
+-- establish @melix.org -> @melix.net
+--------------------------------------------------------------------------------
+insert into virtual (alias,type) VALUES('@melix.org','dom');
+insert into virtual_redirect
+ select vid,'@melix.net'
+ from virtual
+ where alias='@melix.org';
+
+delete from groupex.aliases where domain = '@melix.org';
+
--- /dev/null
+drop table x4dat.alias_demande;
+drop table x4dat.skin_concept;
+drop table x4dat.nb_recherches;
--- /dev/null
+ALTER TABLE auth_user_md5 MODIFY perms enum('user', 'admin', 'ext', 'non-inscrit') NOT NULL DEFAULT 'user';
+ALTER TABLE auth_user_md5 ADD COLUMN matricule_ax char(8) NULL DEFAULT NULL AFTER matricule;
+ALTER TABLE auth_user_md5 ADD COLUMN nom_ini char(255) NOT NULL DEFAULT '' AFTER promo;
+ALTER TABLE auth_user_md5 ADD COLUMN prenom_ini char(40) NOT NULL DEFAULT '' AFTER nom_ini;
+ALTER TABLE auth_user_md5 ADD COLUMN nom_ini_soundex char(4) NOT NULL DEFAULT '' AFTER prenom_ini;
+ALTER TABLE auth_user_md5 ADD COLUMN prenom_ini_soundex char(4) NOT NULL DEFAULT '' AFTER nom_ini_soundex;
+ALTER TABLE auth_user_md5 ADD COLUMN comment char(10) NOT NULL DEFAULT '';
+ALTER TABLE auth_user_md5 ADD COLUMN appli char(10) NOT NULL DEFAULT '';
+ALTER TABLE auth_user_md5 ADD COLUMN flags set('femme') NOT NULL DEFAULT '' AFTER prenom_ini_soundex;
+ALTER TABLE auth_user_md5 ADD COLUMN last_known_email char(60) NOT NULL DEFAULT '';
+ALTER TABLE auth_user_md5 ADD COLUMN deces date NOT NULL AFTER flags;
+UPDATE auth_user_md5 AS a INNER JOIN identification AS i ON (a.matricule = i.matricule) SET a.matricule_ax = i.matricule_ax, a.nom_ini = i.nom, a.prenom_ini = i.prenom, a.nom_ini_soundex = i.nom_soundex, a.prenom_ini_soundex = i.prenom_soundex, a.comment = i.comment, a.appli = i.appli, a.flags = i.flags, a.last_known_email = i.last_known_email, a.deces = i.deces;
+INSERT INTO auth_user_md5 (matricule, matricule_ax, promo, nom, prenom, nom_ini, prenom_ini, nom_ini_soundex, prenom_ini_soundex, comment, appli, flags, last_known_email, deces, perms) SELECT i.matricule, i.matricule_ax, i.promo, i.nom, i.prenom, i.nom, i.prenom, i.nom_soundex, i.prenom_soundex, i.comment, i.appli, i.flags, i.last_known_email, i.deces, 'non-inscrit' FROM identification AS i LEFT JOIN auth_user_md5 AS a ON a.matricule = i.matricule WHERE a.user_id IS NULL;
+DROP TABLE identification;
+
+alter table auth_user_md5 add index (epouse);
--- /dev/null
+
+alter table `nationalites` add column iso3166 varchar(2) not null;
+
+replace INTO `nationalites` VALUES (1,'Albanais','AL');
+replace INTO `nationalites` VALUES (2,'Algérien','DZ');
+replace INTO `nationalites` VALUES (3,'Allemand','DE');
+replace INTO `nationalites` VALUES (4,'Américain','US');
+replace INTO `nationalites` VALUES (5,'Argentin','AR');
+replace INTO `nationalites` VALUES (6,'Australien','AU');
+replace INTO `nationalites` VALUES (7,'Autrichien','AT');
+replace INTO `nationalites` VALUES (8,'Belge','BE');
+replace INTO `nationalites` VALUES (9,'Benin','BJ');
+replace INTO `nationalites` VALUES (10,'Botswanais','BW');
+replace INTO `nationalites` VALUES (11,'Bouthan','BT');
+replace INTO `nationalites` VALUES (12,'Brésilien','BR');
+replace INTO `nationalites` VALUES (13,'Britannique','GB');
+replace INTO `nationalites` VALUES (14,'Bulgare','BG');
+replace INTO `nationalites` VALUES (15,'Burkina Faso','BF');
+replace INTO `nationalites` VALUES (16,'Cambodgien','KH');
+replace INTO `nationalites` VALUES (17,'Camerounais','CM');
+replace INTO `nationalites` VALUES (18,'Canadien','CA');
+replace INTO `nationalites` VALUES (19,'Chilien','CL');
+replace INTO `nationalites` VALUES (20,'Chinois','CN');
+replace INTO `nationalites` VALUES (21,'Colombien','CO');
+replace INTO `nationalites` VALUES (22,'Coréen','KR');
+replace INTO `nationalites` VALUES (86,'Costaricien','CR');
+replace INTO `nationalites` VALUES (80,'Croate','HR');
+replace INTO `nationalites` VALUES (23,'Cubain','CU');
+replace INTO `nationalites` VALUES (24,'Danois','DK');
+replace INTO `nationalites` VALUES (26,'Egyptien','EG');
+replace INTO `nationalites` VALUES (81,'Equatorien','EC');
+replace INTO `nationalites` VALUES (27,'Espagnol','ES');
+replace INTO `nationalites` VALUES (28,'Estonien','EE');
+replace INTO `nationalites` VALUES (29,'Finlandais','FI');
+replace INTO `nationalites` VALUES (30,'Français','FR');
+replace INTO `nationalites` VALUES (31,'Gabonais','GA');
+replace INTO `nationalites` VALUES (32,'Georgien','GE');
+replace INTO `nationalites` VALUES (33,'Grec','GR');
+replace INTO `nationalites` VALUES (34,'Haïtien','HT');
+replace INTO `nationalites` VALUES (36,'Hong-Kong','HK');
+replace INTO `nationalites` VALUES (37,'Hongrois','HU');
+replace INTO `nationalites` VALUES (38,'Indien','IN');
+replace INTO `nationalites` VALUES (39,'Iranien','IR');
+replace INTO `nationalites` VALUES (40,'Irlandais','IE');
+replace INTO `nationalites` VALUES (41,'Islandais','IS');
+replace INTO `nationalites` VALUES (42,'Israélien','IL');
+replace INTO `nationalites` VALUES (43,'Italien','IT');
+replace INTO `nationalites` VALUES (44,'Ivoirien','CI');
+replace INTO `nationalites` VALUES (45,'Jamaïcain','JM');
+replace INTO `nationalites` VALUES (46,'Japonais','JP');
+replace INTO `nationalites` VALUES (47,'Kazakh','KZ');
+replace INTO `nationalites` VALUES (49,'Lettonien','LV');
+replace INTO `nationalites` VALUES (50,'Libanais','LB');
+replace INTO `nationalites` VALUES (51,'Lituanien','LT');
+replace INTO `nationalites` VALUES (52,'Luxembourgeois','LU');
+replace INTO `nationalites` VALUES (53,'Macédonien','MK');
+replace INTO `nationalites` VALUES (82,'Malgache','MG');
+replace INTO `nationalites` VALUES (54,'Malien','ML');
+replace INTO `nationalites` VALUES (55,'Marocain','MA');
+replace INTO `nationalites` VALUES (56,'Mexicain','MX');
+replace INTO `nationalites` VALUES (35,'Néerlandais','NL');
+replace INTO `nationalites` VALUES (57,'Néo-Zélandais','NZ');
+replace INTO `nationalites` VALUES (58,'Norvégien','NO');
+replace INTO `nationalites` VALUES (59,'Palestinien','PS');
+replace INTO `nationalites` VALUES (60,'Péruvien','PE');
+replace INTO `nationalites` VALUES (61,'Polonais','PL');
+replace INTO `nationalites` VALUES (62,'Portugais','PT');
+replace INTO `nationalites` VALUES (63,'Roumain','RO');
+replace INTO `nationalites` VALUES (64,'Russe','RU');
+replace INTO `nationalites` VALUES (65,'Sénégalais','SN');
+replace INTO `nationalites` VALUES (66,'Serbe','CS');
+replace INTO `nationalites` VALUES (84,'Singapourien','SG');
+replace INTO `nationalites` VALUES (67,'Slovaque','SI');
+replace INTO `nationalites` VALUES (69,'Sud-Africain','ZA');
+replace INTO `nationalites` VALUES (70,'Suédois','SE');
+replace INTO `nationalites` VALUES (71,'Suisse','CH');
+replace INTO `nationalites` VALUES (72,'Tadjik','TJ');
+replace INTO `nationalites` VALUES (73,'Taïwanais','TW');
+replace INTO `nationalites` VALUES (74,'Tchèque','CZ');
+replace INTO `nationalites` VALUES (75,'Tunisien','TN');
+replace INTO `nationalites` VALUES (76,'Turc','TR');
+replace INTO `nationalites` VALUES (83,'Ukrainien','UA');
+replace INTO `nationalites` VALUES (85,'Uruguayen','UY');
+replace INTO `nationalites` VALUES (77,'Vénézuélien','VE');
+replace INTO `nationalites` VALUES (78,'Vietnamien','VN');
+replace INTO `nationalites` VALUES (79,'Yougoslave','CS');
+
+alter table geoloc_pays add column nat varchar(100) not null;
+update geoloc_pays inner join nationalites ON iso3166=a2 set nat=text;
+update auth_user_md5 set nationalite='' where nationalite='0' or nationalite='36';
+alter table auth_user_md5 change column nationalite nationalite varchar(2) not null;
+update auth_user_md5 AS u
+ inner join nationalites AS n ON u.nationalite=n.id
+ inner join geoloc_pays AS g ON iso3166=a2
+ set u.nationalite = a2;
+
+drop table nationalites;
--- /dev/null
+alter table aliases add index (type);
+alter table auth_user_quick add column watch_flags set('contacts','mail') not null default 'contacts';
+alter table auth_user_quick add column watch_last timestamp not null;
+alter table auth_user_quick add index(watch_flags);
+
+create table watch_cat (
+ id smallint not null auto_increment,
+ short varchar(40),
+ mail varchar(80),
+ frequent smallint(1) default 0,
+ primary key (id),
+ index (frequent)
+);
+
+insert into watch_cat VALUES(1,'Mise à jour de fiche', 'Ces camarades ont mis leur fiche à jour', 1);
+insert into watch_cat VALUES(2,'Nouveaux inscrits', 'Ces camarades se sont inscrit', 0);
+insert into watch_cat VALUES(3,'Décès', 'Ces camarades nous ont quitté', 0);
+
+create table watch_ops (
+ uid smallint not null,
+ cid smallint not null,
+ known timestamp not null,
+ date date not null,
+ info varchar(255),
+ primary key (uid,cid),
+ index (known)
+);
+
+create table watch_sub (
+ uid smallint not null,
+ cid smallint not null,
+ primary key (uid,cid)
+);
+
+create table watch_nonins (
+ uid smallint not null,
+ ni_id smallint not null,
+ primary key (uid,ni_id)
+);
+
+create table watch_promo (
+ uid smallint not null,
+ promo smallint not null,
+ primary key (uid,promo)
+);
+
+replace into watch_sub
+ select u.user_id,id
+ from auth_user_md5 AS u
+ join watch_cat
+ where u.perms != 'non-inscrit';
+
+
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+ echo -n $sql
+ $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+ echo .
+done
+
+###########################################################
+echo "STILL TODO :
+ - update the mailman-rpc daemon
+ - insert scripts/cron/send_notifs.php in the crontab
+ suggested : 0 4 * * 6 (it means every saturday at 4 AM)
+"
+
+###########################################################
+echo "To make statistics work :
+ - remove old cron (web cron) : /home/web/bin/nbx,
+ genere.sh,genereParselog,genereParselog2
+ - add new scripts (from scripts/cron/stats)in cron
+ evolution-inscrits-mails, plot-graphs, mailParselog
+ - add symlinks :
+ in htdocs/stats : ln -s /home/web/stats/graph-* .
+ in templates/stats : ln -s /home/web/stats/lastParselog* .
+
+"
--- /dev/null
+alter table aliases add column flags set('epouse','bestalias') not null after type;
+update aliases set flags='epouse' where type='epouse';
+update aliases set type='epouse' where type='epouse';
+alter table aliases change column type type enum('a_vie','alias','homonyme','liste') not null;
+alter table aliases add index (flags);
+
+ update aliases AS a
+left join aliases AS b
+ ON(a.id=b.id and b.alias like '%.%' and length(b.alias)<length(a.alias) and b.type!='homonyme')
+ set a.flags=CONCAT(a.flags,',bestalias')
+ where a.alias LIKE '%.%' and b.alias IS NULL and a.type!='homonyme';
--- /dev/null
+insert into skins (id,name,date,comment,auteur,skin_tpl,ext)
+ VALUES (12,'OpenWeb','2004-11-17','Skin inspirée de http://www.openweb.eu.org/','Pierre Habouzit','openweb.tpl','png');
--- /dev/null
+--
+-- PERMS
+--
+alter table auth_user_md5 change column perms perms enum('user','admin','non-inscrit','pending','disabled');
+update auth_user_md5 set perms='pending' where perms='non-inscrit';
+alter table auth_user_md5 change column perms perms enum('user','admin','pending','disabled');
+alter table auth_user_md5 change column comment comment varchar(64) not null;
+
+--
+-- be naissance live as a date
+--
+
+alter table auth_user_md5 add column foo int;
+update auth_user_md5 set foo=naissance ;
+alter table auth_user_md5 change column naissance naissance date not null;
+update auth_user_md5 set naissance = concat(foo % 10000, '-', (foo / 10000) % 100, '-', foo / 1000000);
+alter table auth_user_md5 drop column foo;
+
+alter table en_cours add column foo int;
+update en_cours set foo=naissance ;
+alter table en_cours change column naissance naissance date not null;
+update en_cours set naissance = concat(foo % 10000, '-', (foo / 10000) % 100, '-', foo / 1000000);
+alter table en_cours drop column foo;
+
+--
+-- webredirect
+--
+
+alter table auth_user_quick add column redirecturl varchar(255) not null;
+replace into auth_user_quick (user_id,lastnewslogin,skin,watch_flags,watch_last,redirecturl)
+ select q.user_id,q.lastnewslogin,q.skin,q.watch_flags,q.watch_last,u.redirecturl
+ from auth_user_md5 as u
+ inner join auth_user_quick as q USING(user_id)
+ where u.redirecturl!='';
+alter table auth_user_md5 drop column redirecturl;
--- /dev/null
+DROP TABLE ins_confirmees;
--- /dev/null
+--
+-- Table structure for table `admin_h1`
+--
+
+CREATE TABLE `admin_h1` (
+ `h1id` tinyint(4) NOT NULL default '0',
+ `h1` varchar(64) NOT NULL default '',
+ `prio` tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (h1id),
+ KEY `prio` (`prio`)
+) TYPE=MyISAM;
+
+insert into admin_h1 values(1, 'Système', 0);
+insert into admin_h1 values(2, 'Contenu du site', 10);
+insert into admin_h1 values(3, 'Gestion et entretien', 30);
+
+--
+-- Table structure for table `admin_h2`
+--
+
+CREATE TABLE `admin_h2` (
+ `h1id` tinyint(4) NOT NULL default '0',
+ `h2id` tinyint(4) NOT NULL default '0',
+ `h2` varchar(64) NOT NULL default '',
+ `prio` tinyint(4) NOT NULL default '0',
+ PRIMARY KEY (h2id),
+ KEY `prio` (`prio`)
+) TYPE=MyISAM;
+
+insert into admin_h2 values(1, 1, 'Postfix', 0);
+insert into admin_h2 values(1, 2, 'Sécurité', 20);
+
+insert into admin_h2 values(2, 3, 'Utilisateurs', 0);
+insert into admin_h2 values(2, 4, 'Infos dynamiques', 10);
+insert into admin_h2 values(2, 5, 'Champs profil', 20);
+insert into admin_h2 values(2, 6, 'Newsletter', 30);
+insert into admin_h2 values(2, 7, 'Administrer', 40);
+insert into admin_h2 values(2, 8, 'Valider demandes', 50);
+insert into admin_h2 values(2, 9, 'Trésorerie', 60);
+
+insert into admin_h2 values(3, 10, 'Reformatage Prenom NOM', 0);
+
+--
+-- Table structure for table `admin_a`
+--
+
+CREATE TABLE `admin_a` (
+ `h2id` tinyint(4) NOT NULL default '0',
+ `texte` varchar(64) NOT NULL default '',
+ `url` varchar(64) NOT NULL default '',
+ `prio` tinyint(4) NOT NULL default '0',
+ KEY `prio` (`prio`)
+
+) TYPE=MyISAM;
+
+insert into admin_a values(1, 'Blacklist', 'admin/postfix_blacklist.php', 0);
+insert into admin_a values(1, 'Whitelist', 'admin/postfix_whitelist.php', 10);
+insert into admin_a values(1, 'Retardés', 'admin/postfix_delayed.php', 20);
+
+insert into admin_a values(2, 'Logs des sessions', 'admin/logger.php', 0);
+insert into admin_a values(2, 'Actions', 'admin/logger_actions.php', 10);
+
+insert into admin_a values(3, 'Edit/Su/Logs', 'admin/utilisateurs.php', 0);
+insert into admin_a values(3, 'Homonymes', 'admin/homonymes.php', 10);
+insert into admin_a values(3, 'AX/X.org', 'admin/ax-xorg.php', 20);
+insert into admin_a values(3, 'Décès', 'admin/deces_promo.php', 30);
+
+insert into admin_a values(4, 'Coupures', 'admin/gerer_coupure.php', 0);
+insert into admin_a values(4, 'Événements', 'admin/evenements.php', 10);
+
+insert into admin_a values(5, 'Formations', 'admin/gerer_applis.php', 0);
+insert into admin_a values(5, 'Binets', 'admin/gerer_binets.php', 10);
+insert into admin_a values(5, 'Groupes X', 'admin/gerer_groupesx.php', 20);
+insert into admin_a values(5, 'Skins', 'admin/gerer_skins.php', 30);
+
+insert into admin_a values(6, 'Liste', 'admin/newsletter.php', 0);
+insert into admin_a values(6, 'Catégories', 'admin/newsletter_cats.php', 10);
+insert into admin_a values(6, 'Adresses en panne', 'admin/newsletter_pattecassee.php', 20);
+
+insert into admin_a values(7, 'Auth Groupes X', 'admin/gerer_auth-groupex.php', 0);
+insert into admin_a values(7, 'Listes', 'admin/lists.php', 10);
+
+insert into admin_a values(8, 'Valider', 'admin/valider.php', 0);
+insert into admin_a values(8, 'Événements', 'admin/evenements.php', 10);
+
+insert into admin_a values(9, 'Comptes', 'trezo/gere_operations.php', 0);
+insert into admin_a values(9, 'Paiements', 'admin/gerer_paiement.php', 10);
+
+insert into admin_a values(10, 'Table auth_user_md5', 'admin/FormatePrenomNOM.php', 0);
+
--- /dev/null
+alter table auth_user_quick change column lastnewslogin banana_last timestamp not null;
--- /dev/null
+-- MySQL dump 9.11
+--
+-- Host: localhost Database: trezo
+-- ------------------------------------------------------
+-- Server version 4.0.22-log
+
+--
+-- Table structure for table `operations`
+--
+
+CREATE TABLE `money_trezo` (
+ `id` int(11) NOT NULL auto_increment,
+ `date` date NOT NULL default '0000-00-00',
+ `label` varchar(80) NOT NULL default '',
+ `credit` decimal(10,2) NOT NULL default '0.00',
+ `debit` decimal(10,2) NOT NULL default '0.00',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM COMMENT='Table des comptes de l''assoce';
+
+insert into money_trezo
+ select * from trezo.operations;
+
+drop table trezo.operations;
+drop database trezo;
+
--- /dev/null
+--
+-- obsolete fields
+--
+alter table envoidirect drop column prenom;
+alter table envoidirect drop column nom;
+alter table envoidirect drop column promo;
--- /dev/null
+--
+-- "nationalite" is no longer an integer
+--
+alter table en_cours change column nationalite nationalite char(2);
--- /dev/null
+create table emails_bounces_re (
+ id int not null auto_increment,
+ pos smallint unsigned not null default 0,
+ lvl tinyint unsigned not null default 0,
+ re text not null,
+ text varchar(255) not null,
+ primary key (id),
+ index (lvl),
+ index (pos)
+);
+
+insert into admin_a values(1,'Regexps Bounces', 'admin/emails_bounces_re.php', 30);
+
+alter table emails add column last date not null after panne;
+
+create table emails_broken (
+ uid int not null,
+ email varchar(255) not null,
+ primary key (uid,email)
+);
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+ echo -n $sql
+ $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+ echo .
+done
+
+###########################################################
+
+echo "BE CAREFUL :
+
+* scripts/ is now essentially in bin/
+ --> have to modify crons
+ --> have to modify xml-rpc path in the daemontools
+
+* carva redirects are still in scripts/ but their path and name have changed.
+ --> the error page is scripts/webredirect_error.php
+ --> the redirect page is scripts/webredirect.php
+
+* mailman : update the conf to use the mhonarc archiver
+"
--- /dev/null
+alter table evenements drop column validation_message;
+alter table evenements drop column validation_user_id;
+alter table evenements drop column validation_date;
--- /dev/null
+-- MySQL dump 9.11
+
+--
+-- Table structure for table register_pending
+--
+
+CREATE TABLE register_pending (
+ uid int NOT NULL default '0',
+ forlife varchar(255) NOT NULL default '',
+ bestalias varchar(255) NOT NULL default '',
+ mailorg2 varchar(255) default null,
+ password varchar(32) NOT NULL default '',
+ email varchar(255) NOT NULL default '',
+ date date NOT NULL default '0000-00-00',
+ relance date NOT NULL default '0000-00-00',
+ naissance date NOT NULL default '0000-00-00',
+ hash varchar(12) NOT NULL default '',
+ PRIMARY KEY (uid),
+ UNIQUE KEY (forlife),
+ UNIQUE KEY (bestalias),
+ INDEX (hash)
+);
+
+create table register_marketing (/*{{{*/
+ uid int not null default 0,
+ sender int not null default 0,
+ email varchar(255) not null default '',
+ date date not null default '0000-00-00',
+ last date not null default '0000-00-00',
+ nb tinyint not null default 0,
+ type enum('user', 'staff') not null default 'user',
+ hash char(32) not null,
+ PRIMARY KEY (uid, email),
+ INDEX (date),
+ INDEX (last),
+ INDEX (nb)
+);
+
+create table register_mstats (
+ uid int not null default 0,
+ sender int not null default 0,
+ success date not null default '0000-00-00',
+ PRIMARY KEY (uid)
+);
+
+
+--
+-- envoidirect -> register_mstats
+--
+
+insert into register_mstats (uid, sender, success)
+ select distinct u.user_id, e.sender, u.date_ins
+ from envoidirect as e
+ inner join auth_user_md5 as u using(matricule)
+ where u.date_ins != 0 group by user_id;
+
+insert into register_marketing (uid, sender, email, date, last, nb, type, hash)
+ select u.user_id, m.expe, m.email, 0, 0, FIND_IN_SET('envoye', m.flags), IF(FIND_IN_SET('mail_perso', m.flags), 'user', 'staff'), ''
+ from marketing as m
+ inner join auth_user_md5 as u on u.matricule = m.dest
+ where date_ins = 0 and deces = 0
+ group by user_id, m.email;
+
+replace into register_marketing (uid, sender, email, date, last, nb, type, hash)
+ select u.user_id, e.sender, e.email, date_envoi, date_envoi, 1, 'staff', e.uid
+ from envoidirect as e
+ inner join auth_user_md5 as u using(matricule)
+ where date_ins = 0 and deces = 0;
+
+drop table envoidirect;
+drop table marketing;/*}}}*/
+
+insert into register_pending (uid, forlife, bestalias, mailorg2, password, email, date, relance, naissance, hash)
+ select u.user_id, e.username,
+ IF(e.loginbis, e.loginbis, REPLACE(REPLACE(e.username, '.19', ''), '.20', '')),
+ IF(e.loginbis, REPLACE(REPLACE(e.username, '.19', ''), '.20', ''), NULL),
+ e.password, email, e.date, relance, e.naissance, ins_id
+ from en_cours AS e
+ inner join auth_user_md5 AS u USING( matricule )
+ where u.perms = 'pending';
+
+drop table en_cours;
--- /dev/null
+alter table auth_user_quick add column foo timestamp after user_id;
+
+alter table auth_user_quick add column emails_alias_pub enum('public', 'private') not null default 'private';
+alter table auth_user_quick add column profile_from_ax INT(1) not null default 0;
+alter table auth_user_quick add column core_mail_fmt enum('html', 'texte') not null default 'html';
+
+alter table auth_user_quick add column profile_nick varchar(64) not null;
+alter table auth_user_quick add index(profile_nick);
+
+alter table auth_user_quick add column core_rss_hash char(32) not null default '';
--- /dev/null
+alter table requests change column type type char(16);
+
--- /dev/null
+alter table entreprises add `mobile`varchar(30) not null after `fax`;
--- /dev/null
+alter table watch_cat add column type enum('basic', 'near', 'often') not null default 'basic';
+update watch_cat set type='often' where frequent=1;
+alter table watch_cat drop column frequent;
+
+alter table watch_cat add mail_sg varchar(80) default NULL after mail;
+update watch_cat set mail_sg = 'Ce camarade a mis sa fiche à jour' where id = 1;
+update watch_cat set mail_sg = 'Ce camarade s\'est inscrit' where id = 2;
+update watch_cat set mail_sg = 'Ce camarade nous a quitté' where id = 3;
+
+insert into watch_cat (id, short, mail, mail_sg, type)
+ values(4, 'Anniversaires', 'Ces camarades fêtent leur anniversaire cette semaine', 'Ce camarade fête son anniversaire cette semaine', 'near');
+replace into watch_sub (uid, cid) select user_id, 4 from auth_user_md5 where perms in ('admin', 'user') and deces=0;
+
--- /dev/null
+update auth_user_quick as q INNER JOIN newsletter_ins as n USING(user_id) SET q.core_mail_fmt = n.pref;
+alter table newsletter_ins drop pref;
+
--- /dev/null
+-- http://www.medailles-decorations.com/
+-- http://perso.wanadoo.fr/tnr.g/
+
+drop table if exists profile_medals;
+create table profile_medals (
+ id int not null auto_increment,
+ type enum('ordre', 'croix', 'militaire', 'honneur', 'resistance', 'prix') not null,
+ text varchar(255),
+ img varchar(255),
+ primary key (id)
+);
+
+drop table if exists profile_medals_grades;
+create table profile_medals_grades (
+ mid int not null,
+ gid int not null,
+ text varchar(255),
+ pos int not null,
+ index (pos),
+ primary key (mid, gid)
+);
+
+drop table if exists profile_medals_sub;
+create table profile_medals_sub (
+ uid int not null,
+ mid int not null,
+ gid int not null,
+ primary key (uid,mid)
+);
+
+insert into profile_medals (type, text, img)
+ values ('ordre', 'Ordre National de la Legion d\'Honneur', 'ordre_onlh.jpg'),
+ ('ordre', 'Ordre de la libération', 'ordre_lib.jpg'),
+ ('ordre', 'Ordre National du Mérite', 'ordre_nm.jpg'),
+ ('ordre', 'Ordre des Palmes Académiques', 'ordre_pa.jpg'),
+ ('ordre', 'Ordre du Mérite Agricole', 'ordre_ma.jpg'),
+ ('ordre', 'Ordre du Mérite Maritime', 'ordre_mm.jpg'),
+ ('ordre', 'Ordre des Arts et des Lettres', 'ordre_al.jpg'),
+
+ ('croix', 'Croix de Guerre 1914 - 1918', 'croix_1418.jpg'),
+ ('croix', 'Croix de Guerre 1939 - 1945', 'croix_3945.jpg'),
+ ('croix', 'Croix des T. O. E.', 'croix_toe.jpg'),
+ ('croix', 'Croix de la Valeur Militaire', 'croix_vm.jpg'),
+ ('croix', 'Croix du Combattant Volontaire 1914 - 1918', 'croix_cv1418.jpg'),
+ ('croix', 'Croix du Combattant Volontaire', 'croix_cv.jpg'),
+ ('croix', 'Croix du Combattant', 'croix_cc.jpg'),
+
+ ('militaire', 'Médaille Militaire', 'mili_mili.jpg'),
+ ('militaire', 'Médaille des Évadés', 'mili_eva.jpg'),
+ ('militaire', 'Médaille de la Gendarmerie Nationale', 'mili_gn.jpg'),
+ ('militaire', 'Médaille de l\'Aéronautique', 'mili_aero.jpg'),
+ ('militaire', 'Médaille du Service de Santé des Armées', 'mili_ssa.jpg'),
+ ('militaire', 'Médaille de la Défense Nationale', 'mili_defnat.jpg'),
+ ('militaire', 'Médaille des Services Militaires Volontaires', 'mili_smv.jpg'),
+ ('militaire', 'Médaille d\'Outre-Mer', 'mili_om.jpg'),
+ ('militaire', 'Insignes des Bléssés Militaires', 'mili_ib.jpg'),
+ ('militaire', 'Médaille d\'Afrique du Nord', 'mili_an.jpg'),
+ ('militaire', 'Titre de la Reconnaissance de la Nation', 'mili_trn.jpg'),
+ ('militaire', 'Médaille des Engagés Volontaires', 'mili_ev.jpg'),
+
+ ('honneur', 'Actes de Dévouement et Faits de Sauvetage', 'honn_adfs.jpg'),
+ ('honneur', 'Actes de Courage et de Dévouement', 'honn_acd.jpg'),
+ ('honneur', 'Médaille des Secours Mutuels', 'honn_sm.jpg'),
+ ('honneur', 'Médaille d\'Honneur des Eaux et Forêts', 'honn_ef.jpg'),
+ ('honneur', 'Enseignement du Premier Degré', 'honn_pd.jpg'),
+ ('honneur', 'Ministère du Commerce et de l\'Industrie', 'honn_mci.jpg'),
+ ('honneur', 'Médaille d\'Honneur des Affaires Etrangères', 'honn_ae.jpg'),
+ ('honneur', 'Médaille d\'Honneur Agricole', 'honn_agr.jpg'),
+ ('honneur', 'Médaille d\'Honneur de l\'Assistance Publique', 'honn_ap.jpg'),
+ ('honneur', 'Médaille d\'Honneur des Epidémies', 'honn_epi.jpg'),
+ ('honneur', 'Médaille d\'Honneur des Douanes', 'honn_dou.jpg'),
+ ('honneur', 'Médaille d\'Honneur Pénitentiaire', 'honn_pen.jpg'),
+
+ ('resistance','Médaille de la Résistance Française', 'resi_rf.jpg'),
+ ('resistance','Croix du Volontaire de la Résistance', 'resi_cvr.jpg'),
+ ('resistance','Médaille de la Déportation - Résistance', 'resi_dr.jpg'),
+
+ ('prix', 'Médaille Fields', 'prix_fields.gif'),
+ ('prix', 'Prix Nobel d\'Économie', 'prix_nb_eco.jpg'),
+ ('prix', 'Prix Nobel de Littérature', 'prix_nb_lit.jpg'),
+ ('prix', 'Prix Nobel de Médecine', 'prix_nb_med.jpg'),
+ ('prix', 'Prix Nobel de la Paix', 'prix_nb_paix.jpg'),
+ ('prix', 'Prix Nobel de Physique/Chimie', 'prix_nb_pc.jpg');
+
+insert into admin_a values (5, 'Décorations', 'admin/gerer_decos.php', 40);
+
--- /dev/null
+alter table emails change column flags flags enum('active', 'filter') not null ;
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+ echo -n $sql
+ $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+ echo .
+done
+
+###########################################################
+
+echo "
+You now have to :
+
+(*) install FPDF (pdflatex and tetex are not required anymore)
+ apt-get install php-fpdf
+
+(*) apt-get install php4-gd2
+ add extension=gd.so in /etc/php/apache(2?)/php.ini
+
+(*) apt-get install php-banana (may not be on public servers)
+ and add a rewrite rule on www.polytechnique.org (http and https) :
+ ^/banana/([^/]*/.*)$ /usr/share/banana/\$1
+
+(*) install the new cron system :
+ delete ALL web crons from the crontab EXCEPT for the /home/web/bin/espace_disque that is not a plat/al feature
+ and then, link /etc/cron.d/platal -> platal/configs/platal.cron
+"
--- /dev/null
+ALTER TABLE auth_user_quick
+ADD profile_mobile VARCHAR(20) NOT NULL,
+ADD profile_mobile_pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL,
+ADD profile_web VARCHAR(255) NOT NULL,
+ADD profile_web_pub ENUM('private', 'public') DEFAULT 'private' NOT NULL,
+ADD profile_freetext VARCHAR(255) NOT NULL,
+ADD profile_freetext_pub ENUM('private', 'public') DEFAULT 'private' NOT NULL,
+ADD profile_medals_pub ENUM('private', 'public') DEFAULT 'private' NOT NULL;
+UPDATE auth_user_quick AS q INNER JOIN auth_user_md5 AS u USING(user_id) SET
+q.profile_mobile = u.mobile,
+q.profile_mobile_pub = IF(FIND_IN_SET('mobile_public', u.bits), 'public', IF(FIND_IN_SET('mobile_ax', u.bits), 'ax', 'private')),
+q.profile_web = u.web,
+q.profile_web_pub = IF(FIND_IN_SET('web_public', u.bits), 'public', 'private'),
+q.profile_freetext = u.libre,
+q.profile_freetext_pub = IF(FIND_IN_SET('libre_public', u.bits), 'public', 'private');
+ALTER TABLE auth_user_md5 DROP mobile, DROP web, DROP libre, CHANGE bits bits SET('mail_ax') NOT NULL;
--- /dev/null
+ALTER TABLE adresses
+ADD pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL,
+ADD tel_pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL;
+UPDATE adresses SET pub = IF(FIND_IN_SET('adr_public', visibilite), 'public', IF(FIND_IN_SET('adr_ax', visibilite), 'ax', 'private')), tel_pub = IF(FIND_IN_SET('tel_public', visibilite), 'public', IF(FIND_IN_SET('tel_ax', visibilite),'ax', 'private'));
+ALTER TABLE adresses DROP visibilite;
--- /dev/null
+ALTER TABLE entreprises
+ADD pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL,
+ADD adr_pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL,
+ADD tel_pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL;
+UPDATE entreprises SET
+pub = IF(FIND_IN_SET('entreprise_public', visibilite), 'public', IF(FIND_IN_SET('entreprise_ax', visibilite), 'ax', 'private')),
+adr_pub = IF(FIND_IN_SET('adr_public', visibilite), 'public', IF(FIND_IN_SET('adr_ax', visibilite), 'ax', 'private')),
+tel_pub = IF(FIND_IN_SET('tel_public', visibilite), 'public', IF(FIND_IN_SET('tel_ax', visibilite),'ax', 'private'));
+ALTER TABLE entreprises DROP visibilite;
+ALTER TABLE entreprises
+ADD email VARCHAR(60) NOT NULL AFTER mobile,
+ADD web VARCHAR(255) NOT NULL AFTER email,
+ADD email_pub ENUM('private', 'ax', 'public') DEFAULT 'private' NOT NULL;
--- /dev/null
+ALTER TABLE photo ADD column pub ENUM('private', 'public') DEFAULT 'private' NOT NULL;
+
--- /dev/null
+ALTER TABLE aliases CHANGE flags flags SET('bestalias','usage','epouse') NOT NULL;
+UPDATE aliases SET flags = 'usage,epouse' WHERE flags='epouse';
+UPDATE aliases SET flags = 'usage,epouse,bestalias' WHERE flags='epouse,bestalias';
+
--- /dev/null
+ALTER TABLE auth_user_md5 CHANGE epouse nom_usage VARCHAR(255) NOT NULL;
+
--- /dev/null
+INSERT INTO admin_a VALUES(3, 'Synchro AX', 'admin/synchro_ax.php', 40);
+
--- /dev/null
+INSERT INTO paiement.methodes VALUES (1, "PayPal", "paypal.inc.php");
+
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+ echo -n $sql
+ $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+ echo .
+done
+
+###########################################################
+
--- /dev/null
+update groupex.asso set nom=replace(nom, '<small>', '');
+update groupex.asso set nom=replace(nom, '</small>', '');
+
+alter table groupex.asso drop column m_list;
+alter table groupex.asso change column nom nom CHAR(255) not null;
+alter table groupex.asso change column diminutif diminutif CHAR(64) not null;
+alter table groupex.asso change column site site CHAR(255) not null;
+alter table groupex.asso change column mail mail CHAR(255) not null;
+alter table groupex.asso change column resp resp CHAR(255) not null;
+alter table groupex.asso change column forum forum CHAR(255) not null;
+alter table groupex.asso change column mail_domain mail_domain CHAR(255) not null;
+alter table groupex.asso add unique index (diminutif);
+alter table groupex.asso add column sub_url char(255) not null;
+
+alter table groupex.membres change column uid uid int not null;
+
+update groupex.asso set sub_url='http://www2.x-consult.org/xconsult/register.php' where diminutif = 'X-Mines-Consult';
+
--- /dev/null
+
+CREATE TABLE `search_name` (
+ `uid` int(11) NOT NULL default '0',
+ `token` char(255) NOT NULL default '',
+ `score` int(11) NOT NULL default '0',
+ PRIMARY KEY (token,uid),
+ INDEX (uid)
+);
+
+
+drop table recherche;
+
--- /dev/null
+UPDATE watch_cat SET mail = "Ces camarades nous ont quittés", mail_sg = "Ce camarade nous a quittés" WHERE id = 3;
--- /dev/null
+ALTER TABLE auth_user_md5 ADD promo_sortie SMALLINT(4) UNSIGNED NOT NULL AFTER promo;
+UPDATE auth_user_md5 SET promo_sortie = promo + 3;
+
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+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
+
+###########################################################
+
--- /dev/null
+ALTER TABLE virtual CHANGE `type` `type` ENUM('user', 'list', 'dom', 'evt') DEFAULT 'user' NOT NULL;
+
+ALTER TABLE groupex.asso ADD `pub` ENUM( 'public', 'private' ) DEFAULT 'public' NOT NULL AFTER `ax` ;
+INSERT INTO virtual_domains VALUES ('evts.polytechnique.org');
+
+use groupex;
+
+DROP TABLE IF EXISTS groupex.evenements;
+CREATE TABLE groupex.evenements (
+ `eid` int unsigned NOT NULL auto_increment,
+ `asso_id` int unsigned NOT NULL default '0',
+ `organisateur_uid` int unsigned NOT NULL default '0',
+ `intitule` varchar(100) NOT NULL default '',
+ `short_name` varchar(30) NOT NULL default '',
+ `paiement_id` int unsigned default NULL,
+ `descriptif` text NOT NULL,
+ `debut` datetime NOT NULL default '0000-00-00 00:00:00',
+ `fin` datetime default NULL,
+ `membres_only` tinyint(1) NOT NULL default '0',
+ `advertise` tinyint(1) NOT NULL default '0',
+ `show_participants` tinyint(1) NOT NULL default '0',
+ PRIMARY KEY (`eid`)
+);
+
+drop table IF EXISTS evenements_items;
+CREATE TABLE evenements_items (
+ `eid` int unsigned NOT NULL default '0',
+ `item_id` int unsigned NOT NULL default '0',
+ `titre` varchar(100) NOT NULL default '',
+ `details` text NOT NULL,
+ `montant` decimal(10,2) NOT NULL default '0.00',
+ PRIMARY KEY (`eid`,`item_id`)
+);
+
+drop table IF EXISTS evenements_participants;
+CREATE TABLE evenements_participants (
+ `eid` int unsigned NOT NULL default '0',
+ `uid` int unsigned NOT NULL default '0',
+ `item_id` int NOT NULL default '0',
+ `nb` int NOT NULL default '0',
+ `paid` float NOT NULL default '0',
+ PRIMARY KEY (`eid`,`item_id`,`uid`)
+);
+
--- /dev/null
+ALTER TABLE adresses
+CHANGE ville city VARCHAR(80) DEFAULT '' NOT NULL,
+CHANGE cp postcode VARCHAR(20) DEFAULT '' NOT NULL,
+CHANGE pays country VARCHAR(2) DEFAULT '00' NOT NULL;
+ALTER TABLE entreprises
+CHANGE ville city VARCHAR(80) DEFAULT '' NOT NULL,
+CHANGE cp postcode VARCHAR(20) DEFAULT '' NOT NULL,
+CHANGE pays country VARCHAR(2) DEFAULT '00' NOT NULL;
+
+ALTER TABLE adresses ADD cityid INT DEFAULT NULL AFTER city;
+
+ALTER TABLE adresses ADD INDEX(cityid);
+
+CREATE TABLE `geoloc_city` (
+ `id` int(11) NOT NULL default '0',
+ `alias` smallint(6) NOT NULL default '0',
+ `name` varchar(200) NOT NULL default '',
+ `search_name` varchar(200) NOT NULL default '',
+ `prefix` varchar(30) NOT NULL default '',
+ `lat` int(11) NOT NULL default '0',
+ `lon` int(11) NOT NULL default '0',
+ `country` char(2) NOT NULL default '',
+ `region` char(2) NOT NULL default '',
+ `subregion` varchar(200) NOT NULL default '',
+ `postcode` varchar(8) NOT NULL default '',
+ `level` tinyint(4) NOT NULL default '5',
+ `population` int(11) NOT NULL default '0',
+ `x` float NOT NULL default '0',
+ `y` float NOT NULL default '0',
+ `z` float NOT NULL default '0',
+ PRIMARY KEY (`id`,`alias`),
+ KEY `famous` (`level`,`search_name`),
+ KEY `name` (`country`,`search_name`),
+ KEY `postcode` (`country`,`postcode`),
+ KEY `lat` (`lat`),
+ KEY `lon` (`lon`)
+);
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+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
+
+###########################################################
+
--- /dev/null
+INSERT INTO admin_h2 VALUES(2, 11, 'Géoloc', 70);
+INSERT INTO admin_a VALUES(11, 'Synchro', 'admin/geoloc.php',0);
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+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
+
+###########################################################
+
--- /dev/null
+#!/bin/bash
+
+MYSQL='mysql -u admin '
+
+
+set -e
+
+if [ "$UID" != 0 ]; then
+ echo "has to be run as root"
+ exit 1
+fi
+
+function mailman_stop() {
+ echo -n "stops mailman"
+ /etc/init.d/mailman stop &>/dev/null
+ echo .
+}
+
+function mailman_templates() {
+ echo -n "copies new mails templates"
+ mkdir -p /etc/mailman/xorg
+ cp -f ../../install.d/lists/mail_templates/*.txt /etc/mailman/xorg
+ echo .
+}
+
+function mailman_start() {
+ echo -n "starts mailman"
+ /etc/init.d/mailman start &>/dev/null
+ echo .
+}
+